From e56bd7ac691b6f8fb15d9330a5aaa0bb45e6181c Mon Sep 17 00:00:00 2001 From: Kam Date: Wed, 30 Sep 2026 17:13:47 +0300 Subject: [PATCH 01/10] chore(release): ng-devtools 0.0.6 Bump the package version and start the changelog. --- packages/ng-devtools/CHANGELOG.md | 35 +++++++++++++++++++++++++++++++ packages/ng-devtools/package.json | 2 +- 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 packages/ng-devtools/CHANGELOG.md diff --git a/packages/ng-devtools/CHANGELOG.md b/packages/ng-devtools/CHANGELOG.md new file mode 100644 index 0000000..0a65ae3 --- /dev/null +++ b/packages/ng-devtools/CHANGELOG.md @@ -0,0 +1,35 @@ +# Changelog + +All notable changes to `@santoshyadavdev/ng-devtools` are recorded in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). The Chrome extension has its own version in `extension/manifest.json`. + +## 0.0.6 - 2026-09-30 + +### Upgrade notes + +- **Vite plugin: tunnel hosts now need the one-time code.** When `server.allowedHosts` or `allowedOrigins` allows a host other than `localhost` or a loopback address (or `allowedHosts: true`), the devtools ask for the one-time code printed in the terminal. Pass `auth: true` to always ask, or `auth: false` to never ask. Don't pass `auth: false` while a tunnel is allowed. ([#52](https://github.com/santoshyadavdev/angular-devtools/pull/52)) +- **MCP HTTP route needs a bearer token when the one-time code is on.** This is the Express hub by default, and the Vite plugin when its code is on. The hub prints a token at startup, or set `NG_DEVTOOLS_MCP_TOKEN` to choose one. Requests without `Authorization: Bearer ` get `401`. Loopback setups without the code and the stdio `mcp` command are unaffected. ([#57](https://github.com/santoshyadavdev/angular-devtools/pull/57)) +- **Express hub accepts `chrome-extension://` origins by default.** Other sites are still refused. If you pass your own `allowedOrigins` list, it replaces the extension default, so add `chrome-extension://` to it to keep using the extension. ([#53](https://github.com/santoshyadavdev/angular-devtools/pull/53)) +- **The overlay refreshes on change detection.** On Angular 20 and later, the overlay refreshes about 250 ms after change detection, with a 4 s heartbeat, instead of polling every 3 s. Older versions keep the 3 s poll. ([#58](https://github.com/santoshyadavdev/angular-devtools/pull/58)) +- **One overlay per page.** `initOverlay()` now replaces an overlay that is already running, including the auto-started one. ([#55](https://github.com/santoshyadavdev/angular-devtools/pull/55)) + +### Security fixes + +- Vite plugin: turn on the one-time code whenever a non-loopback host or origin is allowed, and add an `auth` option to override it. A tunnel client runs on your machine, so the loopback check alone let anyone with the tunnel URL read devtools data. ([#52](https://github.com/santoshyadavdev/angular-devtools/pull/52)) +- Express hub: require a bearer token on the MCP HTTP route when the one-time code is on, from `NG_DEVTOOLS_MCP_TOKEN` or one printed at startup. ([#57](https://github.com/santoshyadavdev/angular-devtools/pull/57)) +- Express hub: accept the Chrome extension panel's `chrome-extension://` origin by default and keep refusing other sites, so the extension works without turning the origin check off. ([#53](https://github.com/santoshyadavdev/angular-devtools/pull/53)) + +### Features + +- Configuration: one `NgDevtoolsConfig` for `initNgDevtoolsHub()`, the `ngDevtools()` Vite plugin and `createNgDevtools()`. Turn inspectors off, make the agent read-only or hide tools, block panel and agent write actions, add redaction `secretNames` and change limits. The types are exported from the new `@santoshyadavdev/ng-devtools/config` entry point, and the Dashboard shows the active config. ([#56](https://github.com/santoshyadavdev/angular-devtools/pull/56)) +- Router: detect redirect loops, code-driven navigation loops and `redirectTo` cycles in the route config. They show in the navigation timeline, `explain-navigation`, `export-navigation` and the Lint tab. ([#54](https://github.com/santoshyadavdev/angular-devtools/pull/54)) +- Overlay: add `disposeOverlay()`, which stops the running overlay (including the auto-started one), closes its connection and removes the floating button. ([#55](https://github.com/santoshyadavdev/angular-devtools/pull/55)) +- Overlay: refresh after change detection on Angular 20 and later instead of polling, with the 3 s poll kept as a fallback for older versions. `disposeOverlay()` also removes the change detection hook. ([#58](https://github.com/santoshyadavdev/angular-devtools/pull/58)) +- Chrome extension: on hosts other than loopback, the panel waits for you to click **Allow access** and grants only that host. Selecting an element in the Elements panel selects its component while the Components tab is open. Loopback host permissions now cover `*.localhost` subdomains and `[::1]`. ([#50](https://github.com/santoshyadavdev/angular-devtools/pull/50)) +- Components: the source scan reports each component's change detection strategy (`OnPush`, `Eager` or `unknown`), taking Angular 22's implicit `OnPush` default into account. The components tree and the component list returned to agents show it. ([#45](https://github.com/santoshyadavdev/angular-devtools/pull/45)) + +### Documentation + +- Add the documentation site in `apps/docs`, including Getting started, Inspectors, Agent tools, Security, Configuration and Contributing pages. ([#49](https://github.com/santoshyadavdev/angular-devtools/pull/49)) +- Add contributor guidelines, agent skills, warn-only commit message and docs checks, git hooks, issue forms, a PR labeler, release notes by label, `SECURITY.md` and a Code of Conduct. ([#59](https://github.com/santoshyadavdev/angular-devtools/pull/59)) diff --git a/packages/ng-devtools/package.json b/packages/ng-devtools/package.json index c268226..be47754 100644 --- a/packages/ng-devtools/package.json +++ b/packages/ng-devtools/package.json @@ -1,6 +1,6 @@ { "name": "@santoshyadavdev/ng-devtools", - "version": "0.0.5", + "version": "0.0.6", "description": "Angular DevTools \u2014 inspect components, signals, DI, and routes. Runs standalone, embedded, or over MCP.", "license": "MIT", "repository": { From 0f23b2ceb9f6cee9ac9aaa8b1ee24501458dbf20 Mon Sep 17 00:00:00 2001 From: Kam Date: Wed, 30 Sep 2026 19:03:11 +0300 Subject: [PATCH 02/10] fix: keep the index in sync when the pre-commit hook formats a partial commit `git commit ` and `git commit --only` build the commit from a temporary index (next-index-*.lock) and write the paths to the real index separately. The hook only restaged the formatted files in the temporary index, so the real index kept the unformatted content and the next commit reverted the formatting. The hook now also restages the formatted files in the real index lock in that case, and skips formatting with a warning if that lock is missing. --- .githooks/pre-commit | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.githooks/pre-commit b/.githooks/pre-commit index 7364808..2206d93 100755 --- a/.githooks/pre-commit +++ b/.githooks/pre-commit @@ -5,6 +5,20 @@ cd "$root" || exit 0 list="$(mktemp)" || exit 0 trap 'rm -f "$list"' EXIT +main_index= +case "${GIT_INDEX_FILE:-}" in + *next-index-*.lock) + main_index="$( + unset GIT_INDEX_FILE + git rev-parse --path-format=absolute --git-path index + ).lock" || exit 0 + if [ ! -f "$main_index" ]; then + echo "pre-commit: not formatting because the index for this partial commit was not found. Run pnpm format:check before you push." >&2 + exit 0 + fi + ;; +esac + unstaged="$(git -c core.quotePath=false diff --name-only)" git -c core.quotePath=false diff --cached --name-only --diff-filter=ACMR | @@ -23,4 +37,7 @@ git -c core.quotePath=false diff --cached --name-only --diff-filter=ACMR | tr '\n' '\0' <"$list" | xargs -0 pnpm --silent exec prettier --write --ignore-unknown >/dev/null 2>&1 || echo "WARNING: failed to format staged files." >&2 tr '\n' '\0' <"$list" | xargs -0 git --literal-pathspecs add -- +if [ -n "$main_index" ]; then + tr '\n' '\0' <"$list" | GIT_INDEX_FILE="$main_index" xargs -0 git --literal-pathspecs add -- +fi exit 0 From 4d1f588f3350600710a2ce87e62fbe9731a4c168 Mon Sep 17 00:00:00 2001 From: Kam Date: Wed, 30 Sep 2026 19:06:40 +0300 Subject: [PATCH 03/10] fix(router): ignore query-only navigate cycles in loop detection A burst of navigate() calls that returns to an earlier URL was reported as a navigation loop even when every URL shared one path. Search boxes, filters and pagers that keep their state in the query hit this on every few keystrokes or toggles, and the Lint tab turned it into a redirect-loop warning or error. A cycle is now skipped only when all its URLs share one path and every hop is a navigate() call. Cycles with a guard, redirectTo or error handler hop still count, so a guard that keeps adding and removing a query param on one path is still a redirect loop. --- apps/docs/src/content/inspectors/router.md | 2 + .../src/__tests__/router-loops.test.ts | 109 +++++++++++++++++- packages/ng-devtools/src/rpc/router-loops.ts | 14 ++- 3 files changed, 119 insertions(+), 6 deletions(-) diff --git a/apps/docs/src/content/inspectors/router.md b/apps/docs/src/content/inspectors/router.md index b8a9a85..f84c29f 100644 --- a/apps/docs/src/content/inspectors/router.md +++ b/apps/docs/src/content/inspectors/router.md @@ -45,6 +45,8 @@ The **Navigations** view looks for loops in the recorded navigations. A loop is | **navigation loop** | Your code calls `navigate` or `navigateByUrl` within 500 ms of the previous navigation ending, and the chain returns to an earlier URL. | | **redirect loop** (`NG04016`) | Angular stops a navigation with `NG04016` because `redirectTo` entries of the config form a cycle. | +A chain of `navigate` calls that stays on one path is not a loop, even when it returns to an earlier URL. Only the query or fragment changes there, as with a search box or a filter that keeps its state in the URL. A redirect loop counts even on one path, for example a guard that keeps adding and removing a query param. + When the view finds a loop, a **Loop detected** section appears above the list. It shows the cycle of URLs, such as `/account → /login → /account`. Under it, each hop names its cause: the guard, the `redirectTo` entry or the `navigate` call. A last line lists the navigation ids, how many times the chain came back, how it ended and the guards involved. Each navigation in a loop gets a **loop** badge and a red edge. Its details gain a **Loop** row with the cycle and the hop this navigation caused. diff --git a/packages/ng-devtools/src/__tests__/router-loops.test.ts b/packages/ng-devtools/src/__tests__/router-loops.test.ts index e76de44..d2e24a4 100644 --- a/packages/ng-devtools/src/__tests__/router-loops.test.ts +++ b/packages/ng-devtools/src/__tests__/router-loops.test.ts @@ -3,10 +3,10 @@ import '@angular/compiler'; import { Component, inject } from '@angular/core'; import { TestBed } from '@angular/core/testing'; import { BrowserTestingModule, platformBrowserTesting } from '@angular/platform-browser/testing'; -import { Router, provideRouter, type Routes } from '@angular/router'; +import { Router, provideRouter, type ActivatedRouteSnapshot, type Routes } from '@angular/router'; import { afterEach, beforeEach, describe, expect, it } from 'vitest'; import { watchRouter, type NavigationRecord } from '../router.ts'; -import { instrument } from '../router-actions.ts'; +import { captureCallers, instrument } from '../router-actions.ts'; import type { RouteNode } from '../router-config.ts'; import { lintRoutes } from '../rpc/router-config-tools.ts'; import { detectLoops, redirectCycles } from '../rpc/router-loops.ts'; @@ -186,6 +186,80 @@ describe('detectLoops', () => { expect(detectLoops(slow)).toEqual([]); }); + it('ignores search-as-you-type query updates on the same path', () => { + const typed = (id: number, q: string, extras?: string[]) => + nav(id, { + url: `/list?q=${q}`, + startedAt: id * 200, + endedAt: id * 200 + 5, + caller: 'navigate() from SearchPage.onQuery', + extras, + }); + const navigations = [ + typed(1, 'a'), + typed(2, 'ab', ['replaceUrl']), + typed(3, 'a', ['replaceUrl']), + typed(4, 'ab', ['skipLocationChange']), + typed(5, 'a', ['skipLocationChange']), + ]; + expect(detectLoops(navigations)).toEqual([]); + expect(lintRoutes(page(navigations)).map((f) => f.rule)).not.toContain('redirect-loop'); + }); + + it('ignores a filter toggled back and forth', () => { + const navigations = [1, 2, 3, 4, 5, 6].map((id) => + nav(id, { + url: id % 2 ? '/products?inStock=true#grid' : '/products#grid', + caller: 'navigate() from ProductsPage.toggleStock', + }), + ); + expect(detectLoops(navigations)).toEqual([]); + }); + + it('still finds code-started navigations bouncing between two paths through query updates', () => { + const navigations = [ + nav(1, { url: '/a?x=1', caller: 'navigate() from BPage.ngOnInit' }), + nav(2, { url: '/a?x=2', caller: 'navigate() from APage.ngOnInit' }), + nav(3, { url: '/b', caller: 'navigate() from APage.ngOnInit' }), + nav(4, { url: '/a?x=1', caller: 'navigate() from BPage.ngOnInit' }), + ]; + const [loop] = detectLoops(navigations); + expect(loop).toMatchObject({ kind: 'burst', cycle: ['/a?x=1', '/a?x=2', '/b', '/a?x=1'] }); + }); + + it('finds a guard redirect loop that only changes a guard-added query', () => { + const navigations = [ + redirect(1, '/list', '/list?page=1', 'pageGuard'), + redirect(2, '/list?page=1', '/list', 'pageGuard', 1), + redirect(3, '/list', '/list?page=1', 'pageGuard', 2), + nav(4, { url: '/list?page=1', redirectedFrom: 3 }), + ]; + const [loop] = detectLoops(navigations); + expect(loop).toMatchObject({ + kind: 'redirect', + cycle: ['/list', '/list?page=1', '/list'], + guards: ['pageGuard'], + }); + }); + + it('finds a loop on one path when a guard redirect is one of the hops', () => { + const navigations = [ + nav(1, { url: '/list?page=0', caller: 'navigate() from ListPage.ngOnInit' }), + redirect(2, '/list?page=0', '/list?page=1', 'pageGuard'), + nav(3, { + url: '/list?page=1', + redirectedFrom: 2, + caller: 'navigate() from ListPage.ngOnInit', + }), + nav(4, { url: '/list?page=0', caller: 'navigate() from ListPage.ngOnInit' }), + ]; + const [loop] = detectLoops(navigations); + expect(loop).toMatchObject({ + kind: 'burst', + cycle: ['/list?page=0', '/list?page=1', '/list?page=0'], + }); + }); + it('reports each loop as a redirect-loop lint finding with the guards involved', () => { const navigations = [ redirect(1, '/account', '/login', 'authGuard'), @@ -212,6 +286,11 @@ const guestGuard = () => { return inject(Router).parseUrl('/account'); }; const toStep = (n: number) => () => inject(Router).parseUrl(`/step/${n + 1}`); +let pageBounces = 0; +const pageGuard = (route: ActivatedRouteSnapshot) => { + if (!route.queryParamMap.has('page')) return inject(Router).parseUrl('/list?page=1'); + return ++pageBounces >= 3 || inject(Router).parseUrl('/list'); +}; const routes: Routes = [ { path: '', component: Page }, @@ -223,6 +302,7 @@ const routes: Routes = [ { path: 'step/2', component: Page, canActivate: [toStep(2)] }, { path: 'step/3', component: Page, canActivate: [toStep(3)] }, { path: 'step/4', component: Page }, + { path: 'list', component: Page, canActivate: [pageGuard] }, ]; describe('detectLoops on a real Router', () => { @@ -242,6 +322,7 @@ describe('detectLoops on a real Router', () => { await router.navigateByUrl('/'); signedIn = false; bounces = 0; + pageBounces = 0; }); afterEach(() => { @@ -279,6 +360,30 @@ describe('detectLoops on a real Router', () => { ]); }); + it('flags a guard that keeps adding and removing a query param on one path', async () => { + await router.navigateByUrl('/list'); + expect(router.url).toBe('/list?page=1'); + const [loop, ...rest] = detectLoops(navigations); + expect(rest).toEqual([]); + expect(loop).toMatchObject({ + kind: 'redirect', + cycle: ['/list', '/list?page=1', '/list'], + guards: ['pageGuard'], + }); + }); + + it('does not flag search-as-you-type navigations on a real Router', async () => { + await router.navigateByUrl('/list?page=1'); + cleanup.push(captureCallers(router as never, navigations)); + navigations.length = 0; + for (const q of ['a', 'ab', 'a', 'ab', 'a']) { + await router.navigate(['/list'], { queryParams: { page: 1, q }, replaceUrl: true }); + } + expect(navigations).toHaveLength(5); + expect(navigations.every((n) => n.caller?.startsWith('navigate()'))).toBe(true); + expect(detectLoops(navigations)).toEqual([]); + }); + it('does not flag a chain of guard redirects that ends somewhere new', async () => { await router.navigateByUrl('/step/1'); expect(router.url).toBe('/step/4'); diff --git a/packages/ng-devtools/src/rpc/router-loops.ts b/packages/ng-devtools/src/rpc/router-loops.ts index ac75ea8..45b538d 100644 --- a/packages/ng-devtools/src/rpc/router-loops.ts +++ b/packages/ng-devtools/src/rpc/router-loops.ts @@ -247,12 +247,16 @@ function firstLoop(sequence: NavigationRecord[], config?: RouteNode[]): Navigati seen.set(key, j); continue; } - if (j - i < 2 && steps[j].hop?.via === 'navigate') { + const cycle = steps.slice(i, j + 1); + const hops = cycle.slice(1).map((step) => step.hop!); + const onePath = cycle.every((step) => pathOf(step.url) === pathOf(cycle[0].url)); + if ( + (j - i < 2 && steps[j].hop?.via === 'navigate') || + (onePath && hops.every((hop) => hop.via === 'navigate')) + ) { seen.set(key, j); continue; } - const cycle = steps.slice(i, j + 1); - const hops = cycle.slice(1).map((step) => step.hop!); const first = sequence.indexOf(steps[i].nav); const navs = sequence.slice(first); const cycleEnd = sequence.indexOf(steps[j].nav); @@ -305,7 +309,9 @@ function configLoop(nav: NavigationRecord, config?: RouteNode[]): NavigationLoop * canMatch or error handler redirects, followed through redirectedFrom, plus * the config redirectTo inside each navigation) or a burst of navigations * that code started right after each other, that visits the same URL twice; - * and navigations Angular stopped with NG04016 (a redirectTo loop). + * and navigations Angular stopped with NG04016 (a redirectTo loop). A cycle + * made only of navigate calls that stays on one path (a search box or filter + * updating the query or fragment) is not a loop. */ export function detectLoops( navigations: NavigationRecord[], From 1030330d6c520384603117f5c2e100bceffa966b Mon Sep 17 00:00:00 2001 From: Kam Date: Wed, 30 Sep 2026 19:07:08 +0300 Subject: [PATCH 04/10] docs: add the router loop fix to the 0.0.6 changelog --- packages/ng-devtools/CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/ng-devtools/CHANGELOG.md b/packages/ng-devtools/CHANGELOG.md index 0a65ae3..a3e8599 100644 --- a/packages/ng-devtools/CHANGELOG.md +++ b/packages/ng-devtools/CHANGELOG.md @@ -20,6 +20,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). - Express hub: require a bearer token on the MCP HTTP route when the one-time code is on, from `NG_DEVTOOLS_MCP_TOKEN` or one printed at startup. ([#57](https://github.com/santoshyadavdev/angular-devtools/pull/57)) - Express hub: accept the Chrome extension panel's `chrome-extension://` origin by default and keep refusing other sites, so the extension works without turning the origin check off. ([#53](https://github.com/santoshyadavdev/angular-devtools/pull/53)) +### Bug fixes + +- Router: quick query or fragment updates on the same path, such as a search box or a filter toggle, are no longer reported as a navigation loop. Redirect loops on one path are still caught. + ### Features - Configuration: one `NgDevtoolsConfig` for `initNgDevtoolsHub()`, the `ngDevtools()` Vite plugin and `createNgDevtools()`. Turn inspectors off, make the agent read-only or hide tools, block panel and agent write actions, add redaction `secretNames` and change limits. The types are exported from the new `@santoshyadavdev/ng-devtools/config` entry point, and the Dashboard shows the active config. ([#56](https://github.com/santoshyadavdev/angular-devtools/pull/56)) From ae8a38e04746e3838ffa8c1dfc734bfe21c1c68e Mon Sep 17 00:00:00 2001 From: Kam Date: Wed, 30 Sep 2026 19:14:00 +0300 Subject: [PATCH 05/10] fix(extension): ask for the one-time code in the panel When the Vite plugin or the Express hub asks for the one-time code, the extension panel stayed empty: its UI runs in a frame on the chrome-extension origin, so devframe never shows its prompt, and no token from the page origin reaches it. Every call failed with "Not authorized by the devframe server". The panel now watches the client's trust state. When the server refuses trust it shows an "Enter the one-time code" form that asks the server to print the code, exchanges it with requestTrustWithCode, reports a wrong code, can ask for a fresh code, and loads the inspector once the client is trusted. The token is saved per server origin in the panel's own storage and passed back on the next load, so a reload does not ask again. The same form replaces devframe's native prompt when the panel is opened as a page on the server itself. --- app/src/app.ts | 77 ++++-- app/src/auth.ts | 118 +++++++++ app/src/ui/code-entry.ts | 242 ++++++++++++++++++ ...=> browser-agent-rpc-BXhoSh1z-Dkf4zF1R.js} | 2 +- .../{index-D5KJvLO4.js => index-D2sQgzNq.js} | 165 +++++++++++- extension/ui/index.html | 2 +- .../src/__tests__/panel-auth-real.test.ts | 148 +++++++++++ .../src/__tests__/panel-auth.test.ts | 187 ++++++++++++++ 8 files changed, 917 insertions(+), 24 deletions(-) create mode 100644 app/src/auth.ts create mode 100644 app/src/ui/code-entry.ts rename extension/ui/assets/{browser-agent-rpc-BXhoSh1z-DhKB9Hkz.js => browser-agent-rpc-BXhoSh1z-Dkf4zF1R.js} (93%) rename extension/ui/assets/{index-D5KJvLO4.js => index-D2sQgzNq.js} (96%) create mode 100644 packages/ng-devtools/src/__tests__/panel-auth-real.test.ts create mode 100644 packages/ng-devtools/src/__tests__/panel-auth.test.ts diff --git a/app/src/app.ts b/app/src/app.ts index 7968118..6478d01 100644 --- a/app/src/app.ts +++ b/app/src/app.ts @@ -30,6 +30,8 @@ import { TabIcon } from './pages/tab-icon'; import { styleHubRail } from './hub-rail-style'; import { followHubDocks, selectHubDock } from './hub-dock-sync'; import { panelConfig, tabEnabled } from './devtools-config'; +import { savedToken, serverOrigin, watchTrust, type TrustState } from './auth'; +import { CodeEntry } from './ui/code-entry'; const HUB_VIEWS = ['angular', 'ngrx', 'analog', 'nativescript', 'capacitor'] as const; @@ -127,6 +129,7 @@ function readView(): View | null { NetworkInspector, ComingSoon, TabIcon, + CodeEntry, ], template: `
@@ -238,10 +241,11 @@ function readView(): View | null { class="status" [class.connected]="connected()" [class.failed]="connectionFailed()" + [class.locked]="needsCode()" role="status" > - {{ connected() ? 'Live' : connectionFailed() ? 'Disconnected' : 'Connecting…' }} + {{ statusLabel() }}
@@ -249,6 +253,8 @@ function readView(): View | null { + } @else if (needsCode() && client(); as client) { + } @else if (comingSoon(); as info) { } @else if (!tabEnabled(tab(), config())) { @@ -530,6 +536,13 @@ function readView(): View | null { background: var(--danger); animation: none; } + .status.locked { + border-color: color-mix(in srgb, var(--warn) 36%, transparent); + color: var(--text); + } + .status.locked .dot span { + animation: none; + } .status.connected .dot::before { background: var(--ok); animation: ping 2s var(--ease) infinite; @@ -658,6 +671,17 @@ export class App implements OnInit, OnDestroy { rpc = signal(null); connected = signal(false); readonly connectionFailed = signal(false); + readonly client = signal(null); + readonly trust = signal('pending'); + readonly needsCode = computed(() => this.trust() === 'needs-code'); + readonly server = signal(''); + protected readonly pageOrigin = location.origin; + readonly statusLabel = computed(() => { + if (this.connected()) return 'Live'; + if (this.connectionFailed()) return 'Disconnected'; + return this.needsCode() ? 'Code needed' : 'Connecting…'; + }); + private stopTrust = () => {}; private stopFollowing = () => {}; private readonly nav = viewChild>('nav'); @@ -721,28 +745,23 @@ export class App implements OnInit, OnDestroy { } const baseURL = detectBaseURL(); - connectDevframe(baseURL ? { baseURL } : {}).then( + const server = serverOrigin(baseURL, location.href); + this.server.set(server); + connectDevframe({ + ...(baseURL ? { baseURL } : {}), + authToken: savedToken(server, this.pageOrigin), + simpleAuth: false, + }).then( (client) => { - this.rpc.set(client); - this.connected.set(true); - const scoped = client.scope('ng-devtools').rpc as unknown as { - call: (name: string) => Promise; - }; - scoped.call('analog-project').then( - (project) => { - const isAnalog = !!(project as { analog?: boolean } | null)?.analog; - this.analog.set(isAnalog); - this.analogKnown.set(true); - if (!isAnalog && this.tab() === 'analog' && !this.view()) this.tab.set('dashboard'); - }, - () => { - this.analogKnown.set(true); - if (this.tab() === 'analog' && !this.view()) this.tab.set('dashboard'); - }, - ); + this.client.set(client); + this.connected.set(client.status === 'connected'); client.events.on('connection:status', (status) => { this.connected.set(status === 'connected'); }); + this.stopTrust = watchTrust(client, (state) => { + this.trust.set(state); + if (state === 'trusted' && !this.rpc()) this.start(client); + }); }, () => { this.connectionFailed.set(true); @@ -751,8 +770,28 @@ export class App implements OnInit, OnDestroy { ); } + private start(client: DevframeRpcClient) { + this.rpc.set(client); + const scoped = client.scope('ng-devtools').rpc as unknown as { + call: (name: string) => Promise; + }; + scoped.call('analog-project').then( + (project) => { + const isAnalog = !!(project as { analog?: boolean } | null)?.analog; + this.analog.set(isAnalog); + this.analogKnown.set(true); + if (!isAnalog && this.tab() === 'analog' && !this.view()) this.tab.set('dashboard'); + }, + () => { + this.analogKnown.set(true); + if (this.tab() === 'analog' && !this.view()) this.tab.set('dashboard'); + }, + ); + } + ngOnDestroy() { this.stopFollowing(); + this.stopTrust(); this.navObserver?.disconnect(); } diff --git a/app/src/auth.ts b/app/src/auth.ts new file mode 100644 index 0000000..9feec3c --- /dev/null +++ b/app/src/auth.ts @@ -0,0 +1,118 @@ +import type { DevframeRpcClient } from 'devframe/client'; + +/** What the panel needs from the devframe client to run the one-time code flow. */ +export type TrustClient = Pick< + DevframeRpcClient, + 'isTrusted' | 'status' | 'events' | 'connection' | 'requestAuthCode' | 'requestTrustWithCode' +>; + +export type TrustState = 'pending' | 'trusted' | 'needs-code'; + +export type CodeResult = 'trusted' | 'empty' | 'wrong' | 'unreachable'; + +type TokenStorage = Pick; + +const TOKENS_KEY = 'ng-devtools:auth-tokens'; + +export function trustState(client: Pick): TrustState { + if (client.isTrusted) return 'trusted'; + return client.status === 'unauthorized' ? 'needs-code' : 'pending'; +} + +/** Reports the trust state now and on every change; returns the unsubscribe. */ +export function watchTrust(client: TrustClient, onChange: (state: TrustState) => void): () => void { + const emit = () => onChange(trustState(client)); + const offStatus = client.events.on('connection:status', emit); + const offTrust = client.events.on('rpc:is-trusted:updated', emit); + emit(); + return () => { + offStatus(); + offTrust(); + }; +} + +/** The origin of the devtools server the panel connects to. */ +export function serverOrigin(baseURL: string | undefined, page: string): string { + try { + return new URL(baseURL ?? './', page).origin; + } catch { + return new URL(page).origin; + } +} + +function defaultStorage(): TokenStorage | null { + try { + return globalThis.localStorage ?? null; + } catch { + return null; + } +} + +function readTokens(storage: TokenStorage | null): Record { + try { + const parsed: unknown = JSON.parse(storage?.getItem(TOKENS_KEY) ?? '{}'); + return parsed && typeof parsed === 'object' ? (parsed as Record) : {}; + } catch { + return {}; + } +} + +/** + * The token saved for a server on another origin, such as the dev server seen + * from the extension panel. A page on the server's own origin already shares + * devframe's stored token, so it gets none here. + */ +export function savedToken( + server: string, + pageOrigin: string, + storage = defaultStorage(), +): string | undefined { + if (server === pageOrigin) return undefined; + const token = readTokens(storage)[server]; + return typeof token === 'string' && token ? token : undefined; +} + +export function saveToken( + server: string, + pageOrigin: string, + token: string | undefined, + storage = defaultStorage(), +): void { + if (server === pageOrigin || !token || !storage) return; + try { + storage.setItem(TOKENS_KEY, JSON.stringify({ ...readTokens(storage), [server]: token })); + } catch { + // Storage is full or blocked; the panel asks for a code again next time. + } +} + +/** Exchanges a one-time code for a token and saves it for the server. */ +export async function submitCode( + client: TrustClient, + code: string, + server: string, + pageOrigin: string, + storage = defaultStorage(), +): Promise { + const trimmed = code.replace(/\s+/g, ''); + if (!trimmed) return 'empty'; + let trusted: boolean; + try { + trusted = await client.requestTrustWithCode(trimmed); + } catch { + return 'unreachable'; + } + if (!trusted) return 'wrong'; + saveToken(server, pageOrigin, client.connection.authToken, storage); + return 'trusted'; +} + +/** Asks the server to print its code in the terminal; `reissue` rotates it first. */ +export async function requestCode(client: TrustClient, reissue = false): Promise { + try { + await client.requestAuthCode(reissue ? { reissue: true } : undefined); + return true; + } catch { + return false; + } +} diff --git a/app/src/ui/code-entry.ts b/app/src/ui/code-entry.ts new file mode 100644 index 0000000..8e7fca4 --- /dev/null +++ b/app/src/ui/code-entry.ts @@ -0,0 +1,242 @@ +import { + Component, + ElementRef, + OnInit, + afterNextRender, + input, + signal, + viewChild, +} from '@angular/core'; +import { requestCode, submitCode, type CodeResult, type TrustClient } from '../auth'; + +const ERRORS: Record, string> = { + empty: 'Enter the code from the terminal.', + wrong: 'That code did not work. Check the terminal for the current code and try again.', + unreachable: + "Can't reach the devtools server. Check that the dev server is running, then try again.", +}; + +@Component({ + selector: 'app-code-entry', + template: ` +
+

Enter the one-time code

+

+ The devtools server at {{ server() }} asks for a one-time code before it shares + data with this panel. +

+

+ Find the 6-digit auth code in the terminal that runs your dev server. A + code lasts 5 minutes and changes after 5 wrong tries. +

+
+ +
+ + +
+ +
+
+ +

{{ note() }}

+
+
+ `, + styles: ` + @use 'mixins' as m; + + :host { + display: block; + } + section { + @include m.panel; + @include m.enter; + display: grid; + gap: 12px; + max-width: 520px; + padding: 20px; + } + h2 { + margin: 0; + color: var(--text-strong); + font-size: 16px; + font-weight: 600; + } + p { + margin: 0; + color: var(--text); + line-height: 1.5; + } + .hint { + color: var(--text-2); + } + code { + font-family: var(--font-mono); + font-size: 12px; + overflow-wrap: anywhere; + } + form { + display: grid; + gap: 6px; + } + label { + color: var(--text-2); + font-size: 12px; + font-weight: 500; + } + .row { + display: flex; + flex-wrap: wrap; + gap: 8px; + } + input { + flex: 1 1 160px; + min-width: 0; + height: var(--control-h); + padding: 0 10px; + border: 1px solid var(--border-strong); + border-radius: var(--radius-sm); + background: var(--bg); + color: var(--text-strong); + font-family: var(--font-mono); + font-size: 15px; + letter-spacing: 0.2em; + transition: + border-color 0.2s var(--ease), + box-shadow 0.2s var(--ease); + } + input:hover { + border-color: color-mix(in srgb, var(--border-strong) 60%, var(--text-3)); + } + input:focus-visible { + @include m.field-focus; + } + input[aria-invalid='true'] { + border-color: color-mix(in srgb, var(--danger) 60%, transparent); + } + button { + display: inline-flex; + align-items: center; + justify-content: center; + height: var(--control-h); + padding: 0 14px; + border: 1px solid var(--border-strong); + border-radius: var(--radius-sm); + background: var(--surface-2); + color: var(--text); + font: inherit; + font-weight: 500; + white-space: nowrap; + cursor: pointer; + transition: + background-color 0.2s var(--ease), + border-color 0.2s var(--ease); + } + button:focus-visible { + @include m.focus-ring; + } + button[type='submit'] { + border-color: var(--accent); + background: var(--accent); + color: var(--accent-ink); + font-weight: 600; + } + button[type='submit']:hover:not(:disabled) { + border-color: var(--accent-hover); + background: var(--accent-hover); + } + button:disabled { + opacity: 0.5; + cursor: not-allowed; + } + button.ghost { + border-color: transparent; + background: none; + color: var(--text-2); + } + button.ghost:hover:not(:disabled) { + border-color: var(--border); + background: var(--surface-2); + color: var(--text); + } + .error { + color: var(--danger); + font-size: 12px; + } + .more { + display: flex; + flex-wrap: wrap; + align-items: center; + gap: 4px 12px; + } + .note { + color: var(--text-2); + font-size: 12px; + } + `, +}) +export class CodeEntry implements OnInit { + readonly client = input.required(); + readonly server = input.required(); + readonly pageOrigin = input.required(); + + protected readonly code = signal(''); + protected readonly busy = signal(false); + protected readonly error = signal(''); + protected readonly note = signal(''); + private readonly field = viewChild.required>('field'); + + constructor() { + afterNextRender(() => this.field().nativeElement.focus()); + } + + ngOnInit() { + void requestCode(this.client()); + } + + protected async submit(event: Event) { + event.preventDefault(); + if (this.busy()) return; + this.busy.set(true); + this.note.set(''); + const result = await submitCode(this.client(), this.code(), this.server(), this.pageOrigin()); + this.busy.set(false); + if (result === 'trusted') { + this.error.set(''); + return; + } + this.error.set(ERRORS[result]); + const field = this.field().nativeElement; + field.focus(); + field.select(); + } + + protected async newCode() { + this.error.set(''); + this.note.set(''); + const printed = await requestCode(this.client(), true); + if (printed) { + this.code.set(''); + this.note.set('A new code is in the terminal.'); + this.field().nativeElement.focus(); + } else { + this.error.set(ERRORS.unreachable); + } + } +} diff --git a/extension/ui/assets/browser-agent-rpc-BXhoSh1z-DhKB9Hkz.js b/extension/ui/assets/browser-agent-rpc-BXhoSh1z-Dkf4zF1R.js similarity index 93% rename from extension/ui/assets/browser-agent-rpc-BXhoSh1z-DhKB9Hkz.js rename to extension/ui/assets/browser-agent-rpc-BXhoSh1z-Dkf4zF1R.js index bd9c795..d976470 100644 --- a/extension/ui/assets/browser-agent-rpc-BXhoSh1z-DhKB9Hkz.js +++ b/extension/ui/assets/browser-agent-rpc-BXhoSh1z-Dkf4zF1R.js @@ -1 +1 @@ -import{t as e}from"./index-D5KJvLO4.js";var t=Symbol.for(`devframe:browser-agent-registry`),{tools:n,listeners:r}=globalThis[t]??={tools:new Map,listeners:new Set};function i(){return[...n.values()]}function a(e){return r.add(e),()=>r.delete(e)}var o=`devframe:client-id`,s;function c(t=globalThis.window){try{let n=t?.sessionStorage;if(n){let t=n.getItem(o);return t||(t=e(),n.setItem(o,t)),t}}catch{}return s??=e(),s}function l(e){e.client.register({name:`devframe:agent:invoke-client-tool`,type:`action`,jsonSerializable:!0,handler:async(e,t)=>{let n=i().find(t=>t.id===e);if(!n)throw Error(`[devframe/agent] browser tool "${e}" not found`);return await n.invoke(t)}});let t=!1,n=!1,r=0,o=()=>{t||n||(t=!0,queueMicrotask(async()=>{if(t=!1,n)return;let a=i().map(({invoke:e,...t})=>t);(a.length!==0||r!==0)&&(r=a.length,await e.callOptional(`devframe:agent:sync-client-tools`,c(),a).catch(()=>{}))}))},s=a(o),l=e.events.on(`connection:status`,e=>{e===`connected`&&o()});return o(),()=>{n=!0,s(),l()}}export{l as setupBrowserAgentRpcBridge}; \ No newline at end of file +import{t as e}from"./index-D2sQgzNq.js";var t=Symbol.for(`devframe:browser-agent-registry`),{tools:n,listeners:r}=globalThis[t]??={tools:new Map,listeners:new Set};function i(){return[...n.values()]}function a(e){return r.add(e),()=>r.delete(e)}var o=`devframe:client-id`,s;function c(t=globalThis.window){try{let n=t?.sessionStorage;if(n){let t=n.getItem(o);return t||(t=e(),n.setItem(o,t)),t}}catch{}return s??=e(),s}function l(e){e.client.register({name:`devframe:agent:invoke-client-tool`,type:`action`,jsonSerializable:!0,handler:async(e,t)=>{let n=i().find(t=>t.id===e);if(!n)throw Error(`[devframe/agent] browser tool "${e}" not found`);return await n.invoke(t)}});let t=!1,n=!1,r=0,o=()=>{t||n||(t=!0,queueMicrotask(async()=>{if(t=!1,n)return;let a=i().map(({invoke:e,...t})=>t);(a.length!==0||r!==0)&&(r=a.length,await e.callOptional(`devframe:agent:sync-client-tools`,c(),a).catch(()=>{}))}))},s=a(o),l=e.events.on(`connection:status`,e=>{e===`connected`&&o()});return o(),()=>{n=!0,s(),l()}}export{l as setupBrowserAgentRpcBridge}; \ No newline at end of file diff --git a/extension/ui/assets/index-D5KJvLO4.js b/extension/ui/assets/index-D2sQgzNq.js similarity index 96% rename from extension/ui/assets/index-D5KJvLO4.js rename to extension/ui/assets/index-D2sQgzNq.js index a173076..95587cf 100644 --- a/extension/ui/assets/index-D5KJvLO4.js +++ b/extension/ui/assets/index-D2sQgzNq.js @@ -5,7 +5,7 @@ `):``,this.name=`UnsubscriptionError`,this.errors=t}});function mr(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var hr=function(){function e(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var e,t,n,r,i;if(!this.closed){this.closed=!0;var a=this._parentage;if(a){if(this._parentage=null,Array.isArray(a))try{for(var o=cr(a),s=o.next();!s.done;s=o.next())s.value.remove(this)}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}else a.remove(this)}var c=this.initialTeardown;if(dr(c))try{c()}catch(e){i=e instanceof pr?e.errors:[e]}var l=this._finalizers;if(l){this._finalizers=null;try{for(var u=cr(l),d=u.next();!d.done;d=u.next()){var f=d.value;try{vr(f)}catch(e){i??=[],e instanceof pr?i=ur(ur([],lr(i)),lr(e.errors)):i.push(e)}}}catch(e){n={error:e}}finally{try{d&&!d.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}}if(i)throw new pr(i)}},e.prototype.add=function(t){if(t&&t!==this){if(this.closed)vr(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=this._finalizers??[]).push(t)}}},e.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},e.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},e.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&mr(t,e)},e.prototype.remove=function(t){var n=this._finalizers;n&&mr(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=(function(){var t=new e;return t.closed=!0,t})(),e}(),gr=hr.EMPTY;function _r(e){return e instanceof hr||e&&`closed`in e&&dr(e.remove)&&dr(e.add)&&dr(e.unsubscribe)}function vr(e){dr(e)?e():e.unsubscribe()}var yr={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},br={setTimeout:function(e,t){var n=[...arguments].slice(2),r=br.delegate;return r?.setTimeout?r.setTimeout.apply(r,ur([e,t],lr(n))):setTimeout.apply(void 0,ur([e,t],lr(n)))},clearTimeout:function(e){return(br.delegate?.clearTimeout||clearTimeout)(e)},delegate:void 0};function xr(e){br.setTimeout(function(){var t=yr.onUnhandledError;if(t)t(e);else throw e})}function Sr(){}var Cr=(function(){return Er(`C`,void 0,void 0)})();function wr(e){return Er(`E`,void 0,e)}function Tr(e){return Er(`N`,e,void 0)}function Er(e,t,n){return{kind:e,value:t,error:n}}var Dr=null;function Or(e){if(yr.useDeprecatedSynchronousErrorHandling){var t=!Dr;if(t&&(Dr={errorThrown:!1,error:null}),e(),t){var n=Dr,r=n.errorThrown,i=n.error;if(Dr=null,r)throw i}}else e()}function kr(e){yr.useDeprecatedSynchronousErrorHandling&&Dr&&(Dr.errorThrown=!0,Dr.error=e)}var Ar=function(e){sr(t,e);function t(t){var n=e.call(this)||this;return n.isStopped=!1,t?(n.destination=t,_r(t)&&t.add(n)):n.destination=Rr,n}return t.create=function(e,t,n){return new Pr(e,t,n)},t.prototype.next=function(e){this.isStopped?Lr(Tr(e),this):this._next(e)},t.prototype.error=function(e){this.isStopped?Lr(wr(e),this):(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped?Lr(Cr,this):(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(hr),jr=Function.prototype.bind;function Mr(e,t){return jr.call(e,t)}var Nr=function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){Fr(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){Fr(e)}else Fr(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){Fr(e)}},e}(),Pr=function(e){sr(t,e);function t(t,n,r){var i=e.call(this)||this,a;if(dr(t)||!t)a={next:t??void 0,error:n??void 0,complete:r??void 0};else{var o;i&&yr.useDeprecatedNextContext?(o=Object.create(t),o.unsubscribe=function(){return i.unsubscribe()},a={next:t.next&&Mr(t.next,o),error:t.error&&Mr(t.error,o),complete:t.complete&&Mr(t.complete,o)}):a=t}return i.destination=new Nr(a),i}return t}(Ar);function Fr(e){yr.useDeprecatedSynchronousErrorHandling?kr(e):xr(e)}function Ir(e){throw e}function Lr(e,t){var n=yr.onStoppedNotification;n&&br.setTimeout(function(){return n(e,t)})}var Rr={closed:!0,next:Sr,error:Ir,complete:Sr},zr=(function(){return typeof Symbol==`function`&&Symbol.observable||`@@observable`})();function Br(e){return e}function Vr(e){return e.length===0?Br:e.length===1?e[0]:function(t){return e.reduce(function(e,t){return t(e)},t)}}var Hr=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(e,t,n){var r=this,i=Gr(e)?e:new Pr(e,t,n);return Or(function(){var e=r,t=e.operator,n=e.source;i.add(t?t.call(i,n):n?r._subscribe(i):r._trySubscribe(i))}),i},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var n=this;return t=Ur(t),new t(function(t,r){var i=new Pr({next:function(t){try{e(t)}catch(e){r(e),i.unsubscribe()}},error:r,complete:t});n.subscribe(i)})},e.prototype._subscribe=function(e){return this.source?.subscribe(e)},e.prototype[zr]=function(){return this},e.prototype.pipe=function(){return Vr([...arguments])(this)},e.prototype.toPromise=function(e){var t=this;return e=Ur(e),new e(function(e,n){var r;t.subscribe(function(e){return r=e},function(e){return n(e)},function(){return e(r)})})},e.create=function(t){return new e(t)},e}();function Ur(e){return e??yr.Promise??Promise}function Wr(e){return e&&dr(e.next)&&dr(e.error)&&dr(e.complete)}function Gr(e){return e&&e instanceof Ar||Wr(e)&&_r(e)}function Kr(e){return dr(e?.lift)}function qr(e){return function(t){if(Kr(t))return t.lift(function(t){try{return e(t,this)}catch(e){this.error(e)}});throw TypeError(`Unable to lift unknown Observable type`)}}function Jr(e,t,n,r,i){return new Yr(e,t,n,r,i)}var Yr=function(e){sr(t,e);function t(t,n,r,i,a,o){var s=e.call(this,t)||this;return s.onFinalize=a,s.shouldUnsubscribe=o,s._next=n?function(e){try{n(e)}catch(e){t.error(e)}}:e.prototype._next,s._error=i?function(e){try{i(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,s._complete=r?function(){try{r()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,s}return t.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;e.prototype.unsubscribe.call(this),!n&&((t=this.onFinalize)==null||t.call(this))}},t}(Ar),Xr=fr(function(e){return function(){e(this),this.name=`ObjectUnsubscribedError`,this.message=`object unsubscribed`}}),Zr=function(e){sr(t,e);function t(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return t.prototype.lift=function(e){var t=new Qr(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new Xr},t.prototype.next=function(e){var t=this;Or(function(){var n,r;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||=Array.from(t.observers);try{for(var i=cr(t.currentObservers),a=i.next();!a.done;a=i.next())a.value.next(e)}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}})},t.prototype.error=function(e){var t=this;Or(function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var n=t.observers;n.length;)n.shift().error(e)}})},t.prototype.complete=function(){var e=this;Or(function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){return this.observers?.length>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var t=this,n=this,r=n.hasError,i=n.isStopped,a=n.observers;return r||i?gr:(this.currentObservers=null,a.push(e),new hr(function(){t.currentObservers=null,mr(a,e)}))},t.prototype._checkFinalizedStatuses=function(e){var t=this,n=t.hasError,r=t.thrownError,i=t.isStopped;n?e.error(r):i&&e.complete()},t.prototype.asObservable=function(){var e=new Hr;return e.source=this,e},t.create=function(e,t){return new Qr(e,t)},t}(Hr),Qr=function(e){sr(t,e);function t(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r}return t.prototype.next=function(e){var t,n;(n=(t=this.destination)?.next)==null||n.call(t,e)},t.prototype.error=function(e){var t,n;(n=(t=this.destination)?.error)==null||n.call(t,e)},t.prototype.complete=function(){var e,t;(t=(e=this.destination)?.complete)==null||t.call(e)},t.prototype._subscribe=function(e){return this.source?.subscribe(e)??gr},t}(Zr),$r=function(e){sr(t,e);function t(t){var n=e.call(this)||this;return n._value=t,n}return Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(t){var n=e.prototype._subscribe.call(this,t);return!n.closed&&t.next(this._value),n},t.prototype.getValue=function(){var e=this,t=e.hasError,n=e.thrownError,r=e._value;if(t)throw n;return this._throwIfClosed(),r},t.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},t}(Zr);function ei(e,t){return qr(function(n,r){var i=0;n.subscribe(Jr(r,function(n){r.next(e.call(t,n,i++))}))})}var ti=`https://angular.dev/best-practices/security#preventing-cross-site-scripting-xss`,T=class extends Error{code;constructor(e,t){super(ri(e,t)),this.code=e}};function ni(e){return`NG0${Math.abs(e)}`}function ri(e,t){return`${ni(e)}${t?`: `+t:``}`}function ii(e){for(let t in e)if(e[t]===ii)return t;throw Error(``)}function ai(e){if(typeof e==`string`)return e;if(Array.isArray(e))return`[${e.map(ai).join(`, `)}]`;if(e==null)return``+e;let t=e.overriddenName||e.name;if(t)return`${t}`;let n=e.toString();if(n==null)return``+n;let r=n.indexOf(` `);return r>=0?n.slice(0,r):n}function oi(e,t){return e?t?`${e} ${t}`:e:t||``}var si=ii({__forward_ref__:ii});function ci(e){return e.__forward_ref__=ci,e}function li(e){return ui(e)?e():e}function ui(e){return typeof e==`function`&&Object.hasOwn(e,si)&&e.__forward_ref__===ci}function di(e){return{token:e.token,providedIn:e.providedIn||null,factory:e.factory,value:void 0}}function fi(e){return pi(e,gi)}function pi(e,t){return Object.hasOwn(e,t)&&e[t]||null}function mi(e){return(e?.[gi]??null)||null}function hi(e){return e&&Object.hasOwn(e,_i)?e[_i]:null}var gi=ii({ɵprov:ii}),_i=ii({ɵinj:ii}),vi=class{_desc;ngMetadataName=`InjectionToken`;ɵprov;constructor(e,t){this._desc=e,this.ɵprov=void 0,typeof t==`number`?this.__NG_ELEMENT_ID__=t:t!==void 0&&(this.ɵprov=di({token:this,providedIn:t.providedIn||`root`,factory:t.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}};function yi(e){return e&&!!e.ɵproviders}var bi=ii({ɵcmp:ii}),xi=ii({ɵdir:ii}),Si=ii({ɵpipe:ii}),Ci=ii({ɵfac:ii}),wi=ii({__NG_ELEMENT_ID__:ii}),Ti=ii({__NG_ENV_ID__:ii});function Ei(e){return ki(e,`@Component`),e[bi]||null}function Di(e){return ki(e,`@Directive`),e[xi]||null}function Oi(e){return ki(e,`@Pipe`),e[Si]||null}function ki(e,t){if(e==null)throw new T(-919,!1)}function Ai(e){return typeof e==`string`?e:e==null?``:String(e)}var ji=ii({ngErrorCode:ii}),Mi=ii({ngErrorMessage:ii}),Ni=ii({ngTokenPath:ii});function Pi(e,t){return Ii(``,-200,t)}function Fi(e,t){throw new T(-201,!1)}function Ii(e,t,n){let r=new T(t,e);return r[ji]=t,r[Mi]=e,n&&(r[Ni]=n),r}function Li(e){return e[ji]}var Ri;function zi(){return Ri}function Bi(e){let t=Ri;return Ri=e,t}function Vi(e,t,n){let r=fi(e);if(r&&r.providedIn==`root`)return r.value===void 0?r.value=r.factory():r.value;if(n&8)return null;if(t!==void 0)return t;Fi(e,``)}var Hi=globalThis,Ui={},Wi=`__NG_DI_FLAG__`,Gi=class{injector;constructor(e){this.injector=e}retrieve(e,t){let n=Ji(t)||0;try{return this.injector.get(e,n&8?null:Ui,n)}catch(e){if(er(e))return e;throw e}}};function Ki(e,t=0){let n=Zn();if(n===void 0)throw new T(-203,!1);if(n===null)return Vi(e,void 0,t);{let r=Yi(t),i=n.retrieve(e,r);if(er(i)){if(r.optional)return null;throw i}return i}}function qi(e,t=0){return(zi()||Ki)(li(e),t)}function E(e,t){return qi(e,Ji(t))}function Ji(e){return e===void 0||typeof e==`number`?e:0|(e.optional&&8)|(e.host&&1)|(e.self&&2)|(e.skipSelf&&4)}function Yi(e){return{optional:!!(e&8),host:!!(e&1),self:!!(e&2),skipSelf:!!(e&4)}}function Xi(e){let t=[];for(let n=0;nArray.isArray(e)?ta(e,t):t(e))}function na(e,t,n){t>=e.length?e.push(n):e.splice(t,0,n)}function ra(e,t){return t>=e.length-1?e.pop():e.splice(t,1)[0]}function ia(e,t,n,r){let i=e.length;if(i==t)e.push(n,r);else if(i===1)e.push(r,e[0]),e[0]=n;else{for(i--,e.push(e[i-1],e[i]);i>t;){let t=i-2;e[i]=e[t],i--}e[t]=n,e[t+1]=r}}function aa(e,t,n){let r=sa(e,t);return r>=0?e[r|1]=n:(r=~r,ia(e,r,t,n)),r}function oa(e,t){let n=sa(e,t);if(n>=0)return e[n|1]}function sa(e,t){return ca(e,t,1)}function ca(e,t,n){let r=0,i=e.length>>n;for(;i!==r;){let a=r+(i-r>>1),o=e[a<t?i=a:r=a+1}return~(i<{n.push(e)};return ta(t,e=>{let t=e;va(t,a,[],r)&&(i||=[],i.push(t))}),i!==void 0&&_a(i,a),n}function _a(e,t){for(let n=0;n{t(e,r)})}}function va(e,t,n,r){if(e=li(e),!e)return!1;let i=null,a=hi(e),o=!a&&Ei(e);if(!a&&!o){let t=e.ngModule;if(a=hi(t),a)i=t;else return!1}else if(o&&!o.standalone)return!1;else i=e;let s=r.has(i);if(o){if(s)return!1;if(r.add(i),o.dependencies){let e=typeof o.dependencies==`function`?o.dependencies():o.dependencies;for(let i of e)va(i,t,n,r)}}else if(a){if(a.imports!=null&&!s){r.add(i);let e;try{ta(a.imports,i=>{va(i,t,n,r)&&(e||=[],e.push(i))})}finally{}e!==void 0&&_a(e,t)}if(!s){let e=Qi(i)||(()=>new i);t({provide:i,useFactory:e,deps:ua},i),t({provide:pa,useValue:i,multi:!0},i),t({provide:da,useValue:()=>qi(i),multi:!0},i)}let o=a.providers;if(o!=null&&!s){let n=e;ya(o,e=>{t(e,n)})}}else return!1;return i!==e&&e.providers!==void 0}function ya(e,t){for(let n of e)yi(n)&&(n=n.ɵproviders),Array.isArray(n)?ya(n,t):t(n)}var ba=ii({provide:String,useValue:ii});function xa(e){return typeof e==`object`&&!!e&&ba in e}function Sa(e){return!!(e&&e.useExisting)}function Ca(e){return!!(e&&e.useFactory)}function wa(e){return typeof e==`function`}var Ta=new vi(``),Ea={},Da={},Oa=void 0;function ka(){return Oa===void 0&&(Oa=new ma),Oa}var Aa=class{},ja=class extends Aa{parent;source;scopes;records=new Map;_ngOnDestroyHooks=new Set;_onDestroyHooks=[];get destroyed(){return this._destroyed}_destroyed=!1;injectorDefTypes;constructor(e,t,n,r){super(),this.parent=t,this.source=n,this.scopes=r,Va(e,e=>this.processProvider(e)),this.records.set(fa,La(void 0,this)),r.has(`environment`)&&this.records.set(Aa,La(void 0,this));let i=this.records.get(Ta);i!=null&&typeof i.value==`string`&&this.scopes.add(i.value),this.injectorDefTypes=new Set(this.get(pa,ua,{self:!0}))}retrieve(e,t){let n=Ji(t)||0;try{return this.get(e,Ui,n)}catch(e){if(er(e))return e;throw e}}destroy(){Ia(this),this._destroyed=!0;let e=w(null);try{for(let e of this._ngOnDestroyHooks)e.ngOnDestroy();let e=this._onDestroyHooks;this._onDestroyHooks=[];for(let t of e)t()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),w(e)}}onDestroy(e){return Ia(this),this._onDestroyHooks.push(e),()=>this.removeOnDestroy(e)}runInContext(e){Ia(this);let t=Qn(this),n=Bi(void 0);try{return e()}finally{Qn(t),Bi(n)}}get(e,t=Ui,n){if(Ia(this),Object.hasOwn(e,Ti))return e[Ti](this);let r=Ji(n),i=Qn(this),a=Bi(void 0);try{if(!(r&4)){let t=this.records.get(e);if(t===void 0){let n=Ba(e)&&fi(e);t=n&&this.injectableDefInScope(n)?La(Ma(e),Ea):null,this.records.set(e,t)}if(t!=null)return this.hydrate(e,t,r)}let n=r&2?ka():this.parent;return t=r&8&&t===Ui?null:t,n.get(e,t)}catch(e){let t=Li(e);throw t===-200||t===-201?new T(t,null):e}finally{Bi(a),Qn(i)}}resolveInjectorInitializers(){let e=w(null),t=Qn(this),n=Bi(void 0);try{let e=this.get(da,ua,{self:!0});for(let t of e)t()}finally{Qn(t),Bi(n),w(e)}}toString(){return`R3Injector[...]`}processProvider(e){e=li(e);let t=wa(e)?e:li(e&&e.provide),n=Pa(e);if(!wa(e)&&e.multi===!0){let n=this.records.get(t);n||(n=La(void 0,Ea,!0),n.factory=()=>Xi(n.multi),this.records.set(t,n)),t=e,n.multi.push(e)}this.records.set(t,n)}hydrate(e,t,n){let r=w(null);try{if(t.value===Da)throw Pi(``);return t.value===Ea&&(t.value=Da,t.value=t.factory(void 0,n)),typeof t.value==`object`&&t.value&&za(t.value)&&this._ngOnDestroyHooks.add(t.value),t.value}finally{w(r)}}injectableDefInScope(e){if(!e.providedIn)return!1;let t=li(e.providedIn);return typeof t==`string`?t===`any`||this.scopes.has(t):this.injectorDefTypes.has(t)}removeOnDestroy(e){let t=this._onDestroyHooks.indexOf(e);t!==-1&&this._onDestroyHooks.splice(t,1)}};function Ma(e){let t=fi(e),n=t===null?Qi(e):t.factory;if(n!==null)return n;if(e instanceof vi)throw new T(-204,!1);if(e instanceof Function)return Na(e);throw new T(-204,!1)}function Na(e){if(e.length>0)throw new T(-204,!1);let t=mi(e);return t===null?()=>new e:()=>t.factory(e)}function Pa(e){return xa(e)?La(void 0,e.useValue):La(Fa(e),Ea)}function Fa(e,t,n){let r;if(wa(e)){let t=li(e);return Qi(t)||Ma(t)}if(xa(e))r=()=>li(e.useValue);else if(Ca(e))r=()=>e.useFactory(...Xi(e.deps||[]));else if(Sa(e))r=(t,n)=>qi(li(e.useExisting),n!==void 0&&n&8?8:void 0);else{let t=li(e&&(e.useClass||e.provide));if(Ra(e))r=()=>new t(...Xi(e.deps));else return Qi(t)||Ma(t)}return r}function Ia(e){if(e.destroyed)throw new T(-205,!1)}function La(e,t,n=!1){return{factory:e,value:t,multi:n?[]:void 0}}function Ra(e){return!!e.deps}function za(e){return typeof e==`object`&&!!e&&typeof e.ngOnDestroy==`function`}function Ba(e){return typeof e==`function`||typeof e==`object`&&e.ngMetadataName===`InjectionToken`}function Va(e,t){for(let n of e)Array.isArray(n)?Va(n,t):n&&yi(n)?Va(n.ɵproviders,t):t(n)}function Ha(e,t){let n;e instanceof ja?(Ia(e),n=e):n=new Gi(e);let r=Qn(n),i=Bi(void 0);try{return t()}finally{Qn(r),Bi(i)}}function Ua(){return zi()!==void 0||Zn()!=null}var Wa=1;function Ga(e){return Array.isArray(e)&&typeof e[Wa]==`object`}function Ka(e){return Array.isArray(e)&&e[Wa]===!0}function qa(e){return!!(e.flags&4)}function Ja(e){return e.componentOffset>-1}function Ya(e){return(e.flags&1)==1}function Xa(e){return!!e.template}function Za(e){return!!(e[2]&512)}function Qa(e){return(e[2]&256)==256}var $a=(function(e){return e[e.NONE=0]=`NONE`,e[e.HTML=1]=`HTML`,e[e.STYLE=2]=`STYLE`,e[e.SCRIPT=3]=`SCRIPT`,e[e.URL=4]=`URL`,e[e.RESOURCE_URL=5]=`RESOURCE_URL`,e[e.ATTRIBUTE_NO_BINDING=6]=`ATTRIBUTE_NO_BINDING`,e})($a||{}),eo=`math`;function to(e){for(;Array.isArray(e);)e=e[0];return e}function no(e,t){return to(t[e])}function ro(e,t){return to(t[e.index])}function io(e,t){return e.data[t]}function ao(e,t){return e[t]}function oo(e,t,n,r){n>=e.data.length&&(e.data[n]=null,e.blueprint[n]=null),t[n]=r}function so(e,t){let n=t[e];return Ga(n)?n:n[0]}function co(e){return(e[2]&128)==128}function lo(e){return Ka(e[3])}function uo(e,t){return t==null?null:e[t]}function fo(e){e[17]=0}function po(e){e[2]&1024||(e[2]|=1024,co(e)&&_o(e))}function mo(e,t){for(;e>0;)t=t[14],e--;return t}function ho(e){return!!(e[2]&9216||e[24]?.dirty)}function go(e){e[10].changeDetectionScheduler?.notify(8),e[2]&64&&(e[2]|=1024),ho(e)&&_o(e)}function _o(e){e[10].changeDetectionScheduler?.notify(0);let t=bo(e);for(;t!==null&&!(t[2]&8192||(t[2]|=8192,!co(t)));)t=bo(t)}function vo(e,t){if(Qa(e))throw new T(911,!1);e[21]===null&&(e[21]=[]),e[21].push(t)}function yo(e,t){if(e[21]===null)return;let n=e[21].indexOf(t);n!==-1&&e[21].splice(n,1)}function bo(e){let t=e[3];return Ka(t)?t[3]:t}function xo(e){return e[7]??=[]}function So(e){return e.cleanup??=[]}function Co(e,t,n,r){let i=xo(t);i.push(n),e.firstCreatePass&&So(e).push(r,i.length-1)}var wo={lFrame:as(null),bindingsEnabled:!0,skipHydrationRootTNode:null},To=!1;function Eo(){return wo.lFrame.elementDepthCount}function Do(){wo.lFrame.elementDepthCount++}function Oo(){wo.lFrame.elementDepthCount--}function ko(){return wo.bindingsEnabled}function Ao(){return wo.skipHydrationRootTNode!==null}function jo(e){return wo.skipHydrationRootTNode===e}function Mo(){wo.skipHydrationRootTNode=null}function D(){return wo.lFrame.lView}function No(){return wo.lFrame.tView}function O(e){return wo.lFrame.contextLView=e,e[8]}function k(e){return wo.lFrame.contextLView=null,e}function Po(){let e=Fo();for(;e!==null&&e.type===64;)e=e.parent;return e}function Fo(){return wo.lFrame.currentTNode}function Io(){let e=wo.lFrame,t=e.currentTNode;return e.isParent?t:t.parent}function Lo(e,t){let n=wo.lFrame;n.currentTNode=e,n.isParent=t}function Ro(){return wo.lFrame.isParent}function zo(){wo.lFrame.isParent=!1}function Bo(){return wo.lFrame.contextLView}function Vo(){return To}function Ho(e){let t=To;return To=e,t}function Uo(){let e=wo.lFrame,t=e.bindingRootIndex;return t===-1&&(t=e.bindingRootIndex=e.tView.bindingStartIndex),t}function Wo(){return wo.lFrame.bindingIndex}function Go(e){return wo.lFrame.bindingIndex=e}function Ko(){return wo.lFrame.bindingIndex++}function qo(e){let t=wo.lFrame,n=t.bindingIndex;return t.bindingIndex+=e,n}function Jo(){return wo.lFrame.inI18n}function Yo(e,t){let n=wo.lFrame;n.bindingIndex=n.bindingRootIndex=e,Zo(t)}function Xo(){return wo.lFrame.currentDirectiveIndex}function Zo(e){wo.lFrame.currentDirectiveIndex=e}function Qo(e){let t=wo.lFrame.currentDirectiveIndex;return t===-1?null:e[t]}function $o(){return wo.lFrame.currentQueryIndex}function es(e){wo.lFrame.currentQueryIndex=e}function ts(e){let t=e[1];return t.type===2?t.declTNode:t.type===1?e[5]:null}function ns(e,t,n){if(n&4){let r=t,i=e;for(;r=r.parent,r===null&&!(n&1)&&(r=ts(i),!(r===null||(i=i[14],r.type&10))););if(r===null)return!1;t=r,e=i}let r=wo.lFrame=is();return r.currentTNode=t,r.lView=e,!0}function rs(e){let t=is(),n=e[1];wo.lFrame=t,t.currentTNode=n.firstChild,t.lView=e,t.tView=n,t.contextLView=e,t.bindingIndex=n.bindingStartIndex,t.inI18n=!1}function is(){let e=wo.lFrame,t=e===null?null:e.child;return t===null?as(e):t}function as(e){let t={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:e,child:null,inI18n:!1};return e!==null&&(e.child=t),t}function os(){let e=wo.lFrame;return wo.lFrame=e.parent,e.currentTNode=null,e.lView=null,e}var ss=os;function cs(){let e=os();e.isParent=!0,e.tView=null,e.selectedIndex=-1,e.contextLView=null,e.elementDepthCount=0,e.currentDirectiveIndex=-1,e.currentNamespace=null,e.bindingRootIndex=-1,e.bindingIndex=-1,e.currentQueryIndex=0}function ls(e){return(wo.lFrame.contextLView=mo(e,wo.lFrame.contextLView))[8]}function us(){return wo.lFrame.selectedIndex}function ds(e){wo.lFrame.selectedIndex=e}function fs(){let e=wo.lFrame;return io(e.tView,e.selectedIndex)}function ps(){wo.lFrame.currentNamespace=`svg`}function ms(){hs()}function hs(){wo.lFrame.currentNamespace=null}function gs(){return wo.lFrame.currentNamespace}var _s=!0;function vs(){return _s}function ys(e){_s=e}function bs(e,t=null,n=null,r){let i=xs(e,t,n,r);return i.resolveInjectorInitializers(),i}function xs(e,t=null,n=null,r,i=new Set){return new ja([n||ua,ha(e)],t||ka(),null,i)}var Ss=class e{static THROW_IF_NOT_FOUND=Ui;static NULL=new ma;static create(e,t){if(Array.isArray(e))return bs({name:``},t,e,``);{let t=e.name??``;return bs({name:t},e.parent,e.providers,t)}}static ɵprov=di({token:e,providedIn:`any`,factory:()=>qi(fa)});static __NG_ELEMENT_ID__=-1},Cs=new vi(``),ws=class{static __NG_ELEMENT_ID__=Es;static __NG_ENV_ID__=e=>e},Ts=class extends ws{_lView;constructor(e){super(),this._lView=e}get destroyed(){return Qa(this._lView)}onDestroy(e){let t=this._lView;return vo(t,e),()=>yo(t,e)}};function Es(){return new Ts(D())}var Ds=new vi(``),Os=(()=>{class e{taskId=0;pendingTasks=new Set;destroyed=!1;pendingTask=new $r(!1);debugTaskTracker=E(Ds,{optional:!0});get hasPendingTasks(){return!this.destroyed&&this.pendingTask.value}get hasPendingTasksObservable(){return this.destroyed?new Hr(e=>{e.next(!1),e.complete()}):this.pendingTask}add(){!this.hasPendingTasks&&!this.destroyed&&this.pendingTask.next(!0);let e=this.taskId++;return this.pendingTasks.add(e),this.debugTaskTracker?.add(e),e}has(e){return this.pendingTasks.has(e)}remove(e){this.pendingTasks.delete(e),this.debugTaskTracker?.remove(e),this.pendingTasks.size===0&&this.hasPendingTasks&&this.pendingTask.next(!1)}ngOnDestroy(){this.pendingTasks.clear(),this.hasPendingTasks&&this.pendingTask.next(!1),this.destroyed=!0,this.pendingTask.unsubscribe()}static ɵprov=di({token:e,providedIn:`root`,factory:()=>new e})}return e})(),ks=class extends Zr{__isAsync;destroyRef=void 0;pendingTasks=void 0;constructor(e=!1){super(),this.__isAsync=e,Ua()&&(this.destroyRef=E(ws,{optional:!0})??void 0,this.pendingTasks=E(Os,{optional:!0})??void 0)}emit(e){let t=w(null);try{super.next(e)}finally{w(t)}}subscribe(e,t,n){let r=e,i=t||(()=>null),a=n;if(e&&typeof e==`object`){let t=e;r=t.next?.bind(t),i=t.error?.bind(t),a=t.complete?.bind(t)}this.__isAsync&&(i=this.wrapInTimeout(i),r&&=this.wrapInTimeout(r),a&&=this.wrapInTimeout(a));let o=super.subscribe({next:r,error:i,complete:a});return e instanceof hr&&e.add(o),o}wrapInTimeout(e){return t=>{let n=this.pendingTasks?.add();setTimeout(()=>{try{e(t)}finally{n!==void 0&&this.pendingTasks?.remove(n)}})}}};function As(...e){}function js(e){let t,n;function r(){e=As;try{n!==void 0&&typeof cancelAnimationFrame==`function`&&cancelAnimationFrame(n),t!==void 0&&clearTimeout(t)}catch{}}return t=setTimeout(()=>{e(),r()}),typeof requestAnimationFrame==`function`&&(n=requestAnimationFrame(()=>{e(),r()})),()=>r()}function Ms(e){return queueMicrotask(()=>e()),()=>{e=As}}var Ns=`isAngularZone`,Ps=`isAngularZone_ID`,Fs=0,Is=class e{hasPendingMacrotasks=!1;hasPendingMicrotasks=!1;isStable=!0;onUnstable=new ks(!1);onMicrotaskEmpty=new ks(!1);onStable=new ks(!1);onError=new ks(!1);constructor(e){let{enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:n=!1,shouldCoalesceRunChangeDetection:r=!1,scheduleInRootZone:i=!1}=e;if(typeof Zone>`u`)throw new T(908,!1);Zone.assertZonePatched();let a=this;a._nesting=0,a._outer=a._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(a._inner=a._inner.fork(new Zone.TaskTrackingZoneSpec)),t&&Zone.longStackTraceZoneSpec&&(a._inner=a._inner.fork(Zone.longStackTraceZoneSpec)),a.shouldCoalesceEventChangeDetection=!r&&n,a.shouldCoalesceRunChangeDetection=r,a.callbackScheduled=!1,a.scheduleInRootZone=i,Bs(a)}static isInAngularZone(){return typeof Zone<`u`&&Zone.current.get(Ns)===!0}static assertInAngularZone(){if(!e.isInAngularZone())throw new T(909,!1)}static assertNotInAngularZone(){if(e.isInAngularZone())throw new T(909,!1)}run(e,t,n){return this._inner.run(e,t,n)}runTask(e,t,n,r){let i=this._inner,a=i.scheduleEventTask(`NgZoneEvent: `+r,e,Ls,As,As);try{return i.runTask(a,t,n)}finally{i.cancelTask(a)}}runGuarded(e,t,n){return this._inner.runGuarded(e,t,n)}runOutsideAngular(e){return this._outer.run(e)}},Ls={};function Rs(e){if(e._nesting==0&&!e.hasPendingMicrotasks&&!e.isStable)try{e._nesting++,e.onMicrotaskEmpty.emit(null)}finally{if(e._nesting--,!e.hasPendingMicrotasks)try{e.runOutsideAngular(()=>e.onStable.emit(null))}finally{e.isStable=!0}}}function zs(e){if(e.isCheckStableRunning||e.callbackScheduled)return;e.callbackScheduled=!0;function t(){js(()=>{e.callbackScheduled=!1,Vs(e),e.isCheckStableRunning=!0,Rs(e),e.isCheckStableRunning=!1})}e.scheduleInRootZone?Zone.root.run(()=>{t()}):e._outer.run(()=>{t()}),Vs(e)}function Bs(e){let t=()=>{zs(e)},n=Fs++;e._inner=e._inner.fork({name:`angular`,properties:{[Ns]:!0,[Ps]:n,[Ps+n]:!0},onInvokeTask:(n,r,i,a,o,s)=>{if(Gs(s))return n.invokeTask(i,a,o,s);try{return Hs(e),n.invokeTask(i,a,o,s)}finally{(e.shouldCoalesceEventChangeDetection&&a.type===`eventTask`||e.shouldCoalesceRunChangeDetection)&&t(),Us(e)}},onInvoke:(n,r,i,a,o,s,c)=>{try{return Hs(e),n.invoke(i,a,o,s,c)}finally{e.shouldCoalesceRunChangeDetection&&!e.callbackScheduled&&!Ks(s)&&t(),Us(e)}},onHasTask:(t,n,r,i)=>{t.hasTask(r,i),n===r&&(i.change==`microTask`?(e._hasPendingMicrotasks=i.microTask,Vs(e),Rs(e)):i.change==`macroTask`&&(e.hasPendingMacrotasks=i.macroTask))},onHandleError:(t,n,r,i)=>(t.handleError(r,i),e.runOutsideAngular(()=>e.onError.emit(i)),!1)})}function Vs(e){e.hasPendingMicrotasks=!!(e._hasPendingMicrotasks||(e.shouldCoalesceEventChangeDetection||e.shouldCoalesceRunChangeDetection)&&e.callbackScheduled===!0)}function Hs(e){e._nesting++,e.isStable&&(e.isStable=!1,e.onUnstable.emit(null))}function Us(e){e._nesting--,Rs(e)}var Ws=class{hasPendingMicrotasks=!1;hasPendingMacrotasks=!1;isStable=!0;onUnstable=new ks;onMicrotaskEmpty=new ks;onStable=new ks;onError=new ks;run(e,t,n){return e.apply(t,n)}runGuarded(e,t,n){return e.apply(t,n)}runOutsideAngular(e){return e()}runTask(e,t,n,r){return e.apply(t,n)}};function Gs(e){return qs(e,`__ignore_ng_zone__`)}function Ks(e){return qs(e,`__scheduler_tick__`)}function qs(e,t){return!Array.isArray(e)||e.length!==1?!1:e[0]?.data?.[t]===!0}var Js=class{_console=console;handleError(e){this._console.error(`ERROR`,e)}},Ys=new vi(``,{factory:()=>{let e=E(Is),t=E(Aa),n;return r=>{e.runOutsideAngular(()=>{t.destroyed&&!n?setTimeout(()=>{throw r}):(n??=t.get(Js),n.handleError(r))})}}}),Xs={provide:da,useValue:()=>{E(Js,{optional:!0})},multi:!0};function A(e,t){let[n,r,i]=Hn(e,t?.equal),a=n;return a[dn],a.set=r,a.update=i,a.asReadonly=Zs.bind(a),a}function Zs(){let e=this[dn];if(e.readonlyFn===void 0){let t=()=>this();t[dn]=e,e.readonlyFn=t}return e.readonlyFn}var Qs=new vi(``,{factory:()=>$s}),$s=`ng`,ec=new vi(``),tc=new vi(``,{providedIn:`platform`,factory:()=>`unknown`}),nc=new vi(``,{factory:()=>E(Cs).body?.querySelector(`[ngCspNonce]`)?.getAttribute(`ngCspNonce`)||null}),rc=(()=>{class e{view;node;constructor(e,t){this.view=e,this.node=t}static __NG_ELEMENT_ID__=ic}return e})();function ic(){return new rc(D(),Po())}var ac=class{},oc=new vi(``,{factory:()=>!0}),sc=new vi(``),cc=(()=>{class e{static ɵprov=di({token:e,providedIn:`root`,factory:()=>new lc})}return e})(),lc=class{dirtyEffectCount=0;queues=new Map;add(e){this.enqueue(e),this.schedule(e)}schedule(e){e.dirty&&this.dirtyEffectCount++}remove(e){let t=e.zone,n=this.queues.get(t);n.has(e)&&(n.delete(e),e.dirty&&this.dirtyEffectCount--)}enqueue(e){let t=e.zone;this.queues.has(t)||this.queues.set(t,new Set);let n=this.queues.get(t);n.has(e)||n.add(e)}flush(){for(;this.dirtyEffectCount>0;){let e=!1;for(let[t,n]of this.queues)e||=t===null?this.flushQueue(n):t.run(()=>this.flushQueue(n));e||(this.dirtyEffectCount=0)}}flushQueue(e){let t=!1;for(let n of e)n.dirty&&(this.dirtyEffectCount--,t=!0,n.run());return t}},uc=class{[dn];constructor(e){this[dn]=e}destroy(){this[dn].destroy()}};function dc(e,t){let n=t?.injector??E(Ss),r=t?.manualCleanup===!0?null:n.get(ws),i,a=n.get(rc,null,{optional:!0}),o=n.get(ac);return a===null?i=gc(e,n.get(cc),o):(i=hc(a.view,o,e),r instanceof Ts&&r._lView===a.view&&(r=null)),i.injector=n,r!==null&&(i.onDestroyFns=[r.onDestroy(()=>i.destroy())]),new uc(i)}var fc={...Jn,cleanupFns:void 0,zone:null,onDestroyFns:null,run(){let e=Ho(!1);try{Yn(this)}finally{Ho(e)}},cleanup(){if(!this.cleanupFns?.length)return;let e=w(null);try{for(;this.cleanupFns.length;)this.cleanupFns.pop()()}finally{this.cleanupFns=[],w(e)}}},pc={...fc,consumerMarkedDirty(){this.scheduler.schedule(this),this.notifier.notify(12)},destroy(){if(En(this),this.onDestroyFns!==null)for(let e of this.onDestroyFns)e();this.cleanup(),this.scheduler.remove(this)}},mc={...fc,consumerMarkedDirty(){this.view[2]|=8192,_o(this.view),this.notifier.notify(13)},destroy(){if(En(this),this.onDestroyFns!==null)for(let e of this.onDestroyFns)e();this.cleanup(),this.view[23]?.delete(this)}};function hc(e,t,n){let r=Object.create(mc);return r.view=e,r.zone=typeof Zone<`u`?Zone.current:null,r.notifier=t,r.fn=_c(r,n),e[23]??=new Set,e[23].add(r),r.consumerMarkedDirty(r),r}function gc(e,t,n){let r=Object.create(pc);return r.fn=_c(r,e),r.scheduler=t,r.notifier=n,r.zone=typeof Zone<`u`?Zone.current:null,r.scheduler.add(r),r.notifier.notify(12),r}function _c(e,t){return()=>{t(t=>(e.cleanupFns??=[]).push(t))}}function vc(e){return typeof e==`function`&&e[dn]!==void 0}function yc(e){return vc(e)&&typeof e.set==`function`}var bc=Symbol(`InputSignalNode#UNSET`),xc={...Kn,transformFn:void 0,applyValueToInputSignal(e,t){Wn(e,t)}};function Sc(e){return{toString:e}.toString()}var Cc=(function(e){return e[e.TemplateCreateStart=0]=`TemplateCreateStart`,e[e.TemplateCreateEnd=1]=`TemplateCreateEnd`,e[e.TemplateUpdateStart=2]=`TemplateUpdateStart`,e[e.TemplateUpdateEnd=3]=`TemplateUpdateEnd`,e[e.LifecycleHookStart=4]=`LifecycleHookStart`,e[e.LifecycleHookEnd=5]=`LifecycleHookEnd`,e[e.OutputStart=6]=`OutputStart`,e[e.OutputEnd=7]=`OutputEnd`,e[e.BootstrapApplicationStart=8]=`BootstrapApplicationStart`,e[e.BootstrapApplicationEnd=9]=`BootstrapApplicationEnd`,e[e.BootstrapComponentStart=10]=`BootstrapComponentStart`,e[e.BootstrapComponentEnd=11]=`BootstrapComponentEnd`,e[e.ChangeDetectionStart=12]=`ChangeDetectionStart`,e[e.ChangeDetectionEnd=13]=`ChangeDetectionEnd`,e[e.ChangeDetectionSyncStart=14]=`ChangeDetectionSyncStart`,e[e.ChangeDetectionSyncEnd=15]=`ChangeDetectionSyncEnd`,e[e.AfterRenderHooksStart=16]=`AfterRenderHooksStart`,e[e.AfterRenderHooksEnd=17]=`AfterRenderHooksEnd`,e[e.ComponentStart=18]=`ComponentStart`,e[e.ComponentEnd=19]=`ComponentEnd`,e[e.DeferBlockStateStart=20]=`DeferBlockStateStart`,e[e.DeferBlockStateEnd=21]=`DeferBlockStateEnd`,e[e.DynamicComponentStart=22]=`DynamicComponentStart`,e[e.DynamicComponentEnd=23]=`DynamicComponentEnd`,e[e.HostBindingsUpdateStart=24]=`HostBindingsUpdateStart`,e[e.HostBindingsUpdateEnd=25]=`HostBindingsUpdateEnd`,e})(Cc||{});function wc(e,t,n,r){t===null?e[n]=r:t.applyValueToInputSignal(t,r)}var Tc=null;function Ec(){return Tc}var Dc=[],Oc=function(e,t=null,n){for(let r=0;r=r)break}else t[c]<0&&(e[17]+=65536),(s>14>16&&(e[2]&3)===t&&(e[2]+=16384,Fc(o,a)):Fc(o,a)}var Lc=-1,Rc=class{factory;name;injectImpl;resolving=!1;canSeeViewProviders;multi;componentProviders;index;providerFactory;constructor(e,t,n,r){this.factory=e,this.name=r,this.canSeeViewProviders=t,this.injectImpl=n}};function zc(e){return!!(e.flags&8)}function Bc(e){return!!(e.flags&16)}function Vc(e,t,n){let r=0;for(;rt){o=a-1;break}}}for(;a>16}function Yc(e,t){let n=Jc(e),r=t;for(;n>0;)r=r[14],n--;return r}var Xc=!0;function Zc(e){let t=Xc;return Xc=e,t}var Qc=255,$c=5,el=0,tl={};function nl(e,t,n){let r;typeof n==`string`?r=n.charCodeAt(0)||0:Object.hasOwn(n,wi)&&(r=n[wi]),r??=n[wi]=el++;let i=r&Qc,a=1<>$c)]|=a}function rl(e,t){let n=al(e,t);if(n!==-1)return n;let r=t[1];r.firstCreatePass&&(e.injectorIndex=t.length,il(r.data,e),il(t,null),il(r.blueprint,null));let i=ol(e,t),a=e.injectorIndex;if(Kc(i)){let e=qc(i),n=Yc(i,t),r=n[1].data;for(let i=0;i<8;i++)t[a+i]=n[e+i]|r[e+i]}return t[a+8]=i,a}function il(e,t){e.push(0,0,0,0,0,0,0,0,t)}function al(e,t){return e.injectorIndex===-1||e.parent&&e.parent.injectorIndex===e.injectorIndex||t[e.injectorIndex+8]===null?-1:e.injectorIndex}function ol(e,t){if(e.parent&&e.parent.injectorIndex!==-1)return e.parent.injectorIndex;let n=0,r=null,i=t;for(;i!==null;){if(r=xl(i),r===null)return Lc;if(n++,i=i[14],r.injectorIndex!==-1)return r.injectorIndex|n<<16}return Lc}function sl(e,t,n){nl(e,t,n)}function cl(e,t,n){if(n&8||e!==void 0)return e;Fi(t,`NodeInjector`)}function ll(e,t,n,r){if(n&8&&r===void 0&&(r=null),!(n&3)){let i=e[9],a=Bi(void 0);try{return i?i.get(t,r,n&8):Vi(t,r,n&8)}finally{Bi(a)}}return cl(r,t,n)}function ul(e,t,n,r=0,i){if(e!==null){if(t[2]&2048&&!(r&2)){let i=bl(e,t,n,r,tl);if(i!==tl)return i}let i=dl(e,t,n,r,tl);if(i!==tl)return i}return ll(t,n,r,i)}function dl(e,t,n,r,i){let a=hl(n);if(typeof a==`function`){if(!ns(t,e,r))return r&1?cl(i,n,r):ll(t,n,r,i);try{let e;if(e=a(r),e==null&&!(r&8))Fi(n);else return e}finally{ss()}}else if(typeof a==`number`){let i=null,o=al(e,t),s=Lc,c=r&1?t[15][5]:null;for((o===-1||r&4)&&(s=o===-1?ol(e,t):t[o+8],s===Lc||!_l(r,!1)?o=-1:(i=t[1],o=qc(s),t=Yc(s,t)));o!==-1;){let e=t[1];if(gl(a,o,e.data)){let e=fl(o,t,n,i,r,c);if(e!==tl)return e}s=t[o+8],s!==Lc&&_l(r,t[1].data[o+8]===c)&&gl(a,o,t)?(i=e,o=qc(s),t=Yc(s,t)):o=-1}}return i}function fl(e,t,n,r,i,a){let o=t[1],s=o.data[e+8],c=pl(s,o,n,r==null?Ja(s)&&Xc:r!=o&&!!(s.type&3),i&1&&a===s);return c===null?tl:ml(t,o,c,s,i)}function pl(e,t,n,r,i){let a=e.providerIndexes,o=t.data,s=a&1048575,c=e.directiveStart,l=e.directiveEnd,u=a>>20,d=r?s:s+u,f=i?s+u:l;for(let e=d;e=c&&t.type===n)return e}if(i){let e=o[c];if(e&&Xa(e)&&e.type===n)return c}return null}function ml(e,t,n,r,i){let a=e[n],o=t.data;if(a instanceof Rc){let s=a;if(s.resolving)throw Pi(``);let c=Zc(s.canSeeViewProviders);s.resolving=!0,o[n].type||o[n];let l=s.injectImpl?Bi(s.injectImpl):null;ns(e,r,0);try{a=e[n]=s.factory(void 0,i,o,e,r),t.firstCreatePass&&n>=r.directiveStart&&kc(n,o[n],t)}finally{l!==null&&Bi(l),Zc(c),s.resolving=!1,ss()}}return a}function hl(e){if(typeof e==`string`)return e.charCodeAt(0)||0;let t=Object.hasOwn(e,wi)?e[wi]:void 0;return typeof t==`number`?t>=0?t&Qc:yl:t}function gl(e,t,n){let r=1<>$c)]&r)}function _l(e,t){return!(e&2)&&!(e&1&&t)}var vl=class{_tNode;_lView;constructor(e,t){this._tNode=e,this._lView=t}get(e,t,n){return ul(this._tNode,this._lView,e,Ji(n),t)}};function yl(){return new vl(Po(),D())}function bl(e,t,n,r,i){let a=e,o=t;for(;a!==null&&o!==null&&o[2]&2048&&!Za(o);){let e=dl(a,o,n,r|2,tl);if(e!==tl)return e;r&=-5;let t=a.parent;if(!t){let e=o[20];if(e){let t=e.get(n,tl,r);if(t!==tl)return t}t=xl(o),o=o[14]}a=t}return i}function xl(e){let t=e[1],n=t.type;return n===2?t.declTNode:n===1?e[5]:null}function Sl(e){return{token:e.token,providedIn:e.autoProvided===!1?null:`root`,factory:e.factory,value:void 0}}function Cl(){return wl(Po(),D())}function wl(e,t){return new Tl(ro(e,t))}var Tl=(()=>{class e{nativeElement;constructor(e){this.nativeElement=e}static __NG_ELEMENT_ID__=Cl}return e})();function El(e){return e instanceof Tl?e.nativeElement:e}function Dl(){return this._results[Symbol.iterator]()}var Ol=class{_emitDistinctChangesOnly;dirty=!0;_onDirty=void 0;_results=[];_changesDetected=!1;_changes=void 0;length=0;first=void 0;last=void 0;get changes(){return this._changes??=new Zr}constructor(e=!1){this._emitDistinctChangesOnly=e}get(e){return this._results[e]}map(e){return this._results.map(e)}filter(e){return this._results.filter(e)}find(e){return this._results.find(e)}reduce(e,t){return this._results.reduce(e,t)}forEach(e){this._results.forEach(e)}some(e){return this._results.some(e)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(e,t){this.dirty=!1;let n=ea(e);(this._changesDetected=!$i(this._results,n,t))&&(this._results=n,this.length=n.length,this.last=n[this.length-1],this.first=n[0])}notifyOnChanges(){this._changes!==void 0&&(this._changesDetected||!this._emitDistinctChangesOnly)&&this._changes.next(this)}onDirty(e){this._onDirty=e}setDirty(){this.dirty=!0,this._onDirty?.()}destroy(){this._changes!==void 0&&(this._changes.complete(),this._changes.unsubscribe())}[Symbol.iterator]=Dl};function kl(e){return(e.flags&128)==128}var Al=(function(e){return e[e.OnPush=0]=`OnPush`,e[e.Eager=1]=`Eager`,e[e.Default=1]=`Default`,e})(Al||{}),jl=new Map,Ml=0;function Nl(){return Ml++}function Pl(e){jl.set(e[19],e)}function Fl(e){jl.delete(e[19])}var Il=`__ngContext__`;function Ll(e,t){Ga(t)?(e[Il]=t[19],Pl(t)):e[Il]=t}function Rl(e){return Bl(e[12])}function zl(e){return Bl(e[4])}function Bl(e){for(;e!==null&&!Ka(e);)e=e[4];return e}var Vl=void 0;function Hl(e){Vl=e}function Ul(){if(Vl!==void 0)return Vl;if(typeof document<`u`)return document;throw new T(210,!1)}var Wl=!1,Gl=new vi(``,{factory:()=>Wl}),Kl=new WeakMap;function ql(e,t){if(typeof e!=`object`||!e)return;let n=Kl.get(e);n||(n=new WeakSet,Kl.set(e,n)),n.add(t)}function Jl(e){return(e.flags&32)==32}var Yl=()=>null;function Xl(e,t,n=!1){return Yl(e,t,n)}function Zl(e,t){let n=e.contentQueries;if(n!==null){let r=w(null);try{for(let r=0;r-1){let e;for(;++ia?``:i[u+1].toLowerCase(),r&2&&l!==e){if(Du(r))return!1;o=!0}}}}}return Du(r)||o}function Du(e){return!(e&1)}function Ou(e,t,n,r){if(t===null)return-1;let i=0;if(r||!n){let n=!1;for(;i-1)for(n++;n0?`="`+t+`"`:``)+`]`}else r&8?i+=`.`+o:r&4&&(i+=` `+o)}else i!==``&&!Du(o)&&(t+=Mu(a,i),i=``),r=o,a||=!Du(r);n++}return i!==``&&(t+=Mu(a,i)),t}function Pu(e){return e.map(Nu).join(`,`)}function Fu(e){let t=[],n=[],r=1,i=2;for(;r!1});function Vu(e){if(!e)return 0;let t=e.toLowerCase().indexOf(`ms`)>-1?1:1e3;return parseFloat(e)*t}function Hu(e,t){return e.getPropertyValue(t).split(`,`).map(e=>e.trim())}function Uu(e){let t=Hu(e,`transition-property`),n=Hu(e,`transition-duration`),r=Hu(e,`transition-delay`),i={propertyName:``,duration:0,animationName:void 0};for(let e=0;ei.duration&&(i.propertyName=t[e],i.duration=a)}return i}function Wu(e){let t=Hu(e,`animation-name`),n=Hu(e,`animation-delay`),r=Hu(e,`animation-duration`),i=Hu(e,`animation-iteration-count`),a={animationName:``,propertyName:void 0,duration:0};for(let e=0;ea.duration&&s!==`infinite`&&(a.animationName=t[e],a.duration=o)}return a}function Gu(e,t){return e!==void 0&&e.duration>t.duration}function Ku(e){return(e.animationName!=null||e.propertyName!=null)&&e.duration>0}function qu(e){let t=e.effect?.getTiming();if(t===void 0)return;let n=typeof t.duration==`number`?t.duration:0,r=(t.delay??0)+n,i=e.playbackRate;return i!==void 0&&i!==0&&i!==1&&(r/=Math.abs(i)),r}function Ju(e,t){let n=getComputedStyle(e),r=Wu(n),i=Uu(n),a=r.duration>i.duration?r:i;Gu(t.get(e),a)||Ku(a)&&t.set(e,a)}function Yu(e,t,n){if(!n)return;let r=e.getAnimations();return r.length===0?Ju(e,t):Xu(e,t,r)}function Xu(e,t,n){let r={animationName:void 0,propertyName:void 0,duration:0};for(let e of n){if(e.effect?.getTiming()?.iterations===1/0)continue;let t=qu(e)??0,n,i;e.animationName?i=e.animationName:n=e.transitionProperty,t>=r.duration&&(r={animationName:i,propertyName:n,duration:t})}Gu(t.get(e),r)||Ku(r)&&t.set(e,r)}var Zu=new Set,Qu=!1,$u=1,ed=typeof document<`u`&&typeof document?.documentElement?.getAnimations==`function`;function td(e){return e[9].get(Bu,Qu)}function nd(e,t,n){let r=id.get(e);if(r){for(let e of t)r.classList.push(e);for(let e of n)r.cleanupFns.push(e)}else id.set(e,{classList:t,cleanupFns:n})}function rd(e){let t=id.get(e);if(t){for(let e of t.cleanupFns)e();id.delete(e)}ad.delete(e)}var id=new WeakMap,ad=new WeakMap,od=new WeakMap;function sd(e){return e?e[14]??e:null}var cd=new WeakSet;function ld(e,t,n){let r=od.get(e);if(!r||r.length===0)return;let i=t.parentNode,a=t.previousSibling,o=sd(n);for(let e=r.length-1;e>=0;e--){let{el:n,declarationView:s}=r[e],c=n.parentNode;n===t?(r.splice(e,1),cd.add(n),n.dispatchEvent(new CustomEvent(`animationend`,{detail:{cancel:!0}}))):(a&&n===a||c&&i&&c!==i&&(o===null||s===null||o===s))&&(r.splice(e,1),n.dispatchEvent(new CustomEvent(`animationend`,{detail:{cancel:!0}})),n.parentNode?.removeChild(n))}}function ud(e,t,n){let r=sd(n),i=od.get(e);i?i.some(e=>e.el===t)||i.push({el:t,declarationView:r}):od.set(e,[{el:t,declarationView:r}])}function dd(e){let t=e[26]??={};return t.enter??=new Map}function fd(e){let t=typeof e==`function`?e():e,n=Array.isArray(t)?t:null;return typeof t==`string`&&(n=t.trim().split(/\s+/).filter(e=>e)),n}function pd(e){return e.composedPath?e.composedPath()[0]:e.target}function md(e,t){let n=ad.get(t);if(n===void 0)return!0;if(t!==pd(e))return!1;let r=e.animation;if(r){let e=qu(r);if(e!==void 0&&e+$u{class e{impl=null;execute(){this.impl?.execute()}static ɵprov=di({token:e,providedIn:`root`,factory:()=>new e})}return e})(),xd=[0,1,2,3],Sd=(()=>{class e{ngZone=E(Is);scheduler=E(ac);errorHandler=E(Js,{optional:!0});sequences=new Set;deferredRegistrations=new Set;executing=!1;constructor(){E(_d,{optional:!0})}execute(){let e=this.sequences.size>0;e&&Oc(Cc.AfterRenderHooksStart),this.executing=!0;for(let e of xd)for(let t of this.sequences)if(!t.erroredOrDestroyed&&t.hooks[e])try{t.pipelinedValue=this.ngZone.runOutsideAngular(()=>this.maybeTrace(()=>{let n=t.hooks[e];return n(t.pipelinedValue)},t.snapshot))}catch(e){t.erroredOrDestroyed=!0,this.errorHandler?.handleError(e)}this.executing=!1;for(let e of this.sequences)e.afterRun(),e.once&&(this.sequences.delete(e),e.destroy());for(let e of this.deferredRegistrations)this.sequences.add(e);this.deferredRegistrations.size>0&&this.scheduler.notify(7),this.deferredRegistrations.clear(),e&&Oc(Cc.AfterRenderHooksEnd)}register(e){let{view:t}=e;t===void 0?this.executing?this.deferredRegistrations.add(e):this.addSequence(e):((t[25]??=[]).push(e),_o(t),t[2]|=8192)}addSequence(e){this.sequences.add(e),this.scheduler.notify(7)}unregister(e){this.executing&&this.sequences.has(e)?(e.erroredOrDestroyed=!0,e.pipelinedValue=void 0,e.once=!0):(this.sequences.delete(e),this.deferredRegistrations.delete(e))}maybeTrace(e,t){return t?t.run(gd.AFTER_NEXT_RENDER,e):e()}static ɵprov=di({token:e,providedIn:`root`,factory:()=>new e})}return e})(),Cd=class{impl;hooks;view;once;snapshot;erroredOrDestroyed=!1;pipelinedValue=void 0;unregisterOnDestroy;constructor(e,t,n,r,i,a=null){this.impl=e,this.hooks=t,this.view=n,this.once=r,this.snapshot=a,this.unregisterOnDestroy=i?.onDestroy(()=>this.destroy())}afterRun(){this.erroredOrDestroyed=!1,this.pipelinedValue=void 0,this.snapshot?.dispose(),this.snapshot=null}destroy(){this.impl.unregister(this),this.unregisterOnDestroy?.();let e=this.view?.[25];e&&(this.view[25]=e.filter(e=>e!==this))}};function wd(e,t){let n=t?.injector??E(Ss);return yd(`NgAfterNextRender`),Ed(e,n,t,!0)}function Td(e){return e instanceof Function?[void 0,void 0,e,void 0]:[e.earlyRead,e.write,e.mixedReadWrite,e.read]}function Ed(e,t,n,r){let i=t.get(bd);i.impl??=t.get(Sd);let a=t.get(_d,null,{optional:!0}),o=n?.manualCleanup===!0?null:t.get(ws),s=t.get(rc,null,{optional:!0}),c=new Cd(i.impl,Td(e),s?.view,r,o,a?.snapshot(null));return i.impl.register(c),c}var Dd=new vi(``,{factory:()=>{let e=E(Aa),t=new Set;return e.onDestroy(()=>t.clear()),{queue:t,isScheduled:!1,scheduler:null,injector:e}}});function Od(e,t,n){let r=e.get(Dd);if(Array.isArray(t))for(let e of t)r.queue.add(e),n?.detachedLeaveAnimationFns?.push(e);else r.queue.add(t),n?.detachedLeaveAnimationFns?.push(t);r.scheduler&&r.scheduler(e)}function kd(e,t){let n=e.get(Dd);if(Array.isArray(t))for(let e of t)n.queue.delete(e);else n.queue.delete(t)}function Ad(e,t){let n=e.get(Dd);if(t.detachedLeaveAnimationFns){for(let e of t.detachedLeaveAnimationFns)n.queue.delete(e);t.detachedLeaveAnimationFns=void 0}}function jd(e){let t=e.get(Dd);t.isScheduled||=(wd(()=>{t.isScheduled=!1;for(let e of t.queue)e();t.queue.clear()},{injector:t.injector}),!0)}function Md(e){let t=e.get(Dd);t.scheduler=jd,t.scheduler(e)}function Nd(e,t){for(let[n,r]of t)Od(e,r.animateFns)}function Pd(e,t,n,r){let i=e?.[26]?.enter;t!==null&&i&&i.has(n.index)&&Nd(r,i)}function Fd(e,t,n,r){try{n.get(fa)}catch{return r(!1)}let i=e?.[26];i?.enter?.has(t.index)&&kd(n,i.enter.get(t.index).animateFns);let a=Id(e,t,i);if(a.size===0){let n=!1;if(e){let r=[];Rd(e,t,r),n=r.length>0}if(!n)return r(!1)}e&&Zu.add(e[19]),Od(n,()=>Ld(e,t,i||void 0,a,r),i||void 0)}function Id(e,t,n){let r=new Map,i=n?.leave;if(i&&i.has(t.index)&&r.set(t.index,i.get(t.index)),e&&i)for(let[n,a]of i){if(r.has(n))continue;let i=e[1].data[n].parent;for(;i;){if(i===t){r.set(n,a);break}i=i.parent}}return r}function Ld(e,t,n,r,i){let a=[];if(n&&n.leave)for(let[e]of r){if(!n.leave.has(e))continue;let t=n.leave.get(e);for(let e of t.animateFns){let{promise:t}=e();a.push(t)}n.detachedLeaveAnimationFns=void 0}if(e&&Rd(e,t,a),a.length>0){let t=n||e?.[26];if(t){let n=t.running;n&&a.push(n),t.running=Promise.allSettled(a),Bd(e,t.running,i)}else Promise.allSettled(a).then(()=>{e&&Zu.delete(e[19]),i(!0)})}else e&&Zu.delete(e[19]),i(!1)}function Rd(e,t,n){if(t.type&12){let r=e[t.index];if(Ka(r))for(let e=10;e{e[26]?.running===t&&(e[26].running=void 0,Zu.delete(e[19])),n(!0)})}function Vd(e,t,n,r,i,a,o,s){if(i!=null){let c,l=!1;Ka(i)?c=i:Ga(i)&&(l=!0,i=i[0]);let u=to(i);e===0&&r!==null?(Pd(s,r,a,n),o==null?du(t,r,u):uu(t,r,u,o||null,!0)):e===1&&r!==null?(Pd(s,r,a,n),uu(t,r,u,o||null,!0),ld(a,u,s)):e===2?(s?.[26]?.leave?.has(a.index)&&ud(a,u,s),cd.delete(u),Fd(s,a,n,e=>{if(cd.has(u)){cd.delete(u);return}pu(t,u,l,e)})):e===3&&(cd.delete(u),Fd(s,a,n,()=>{t.destroyNode(u)})),c!=null&&df(t,e,n,c,a,r,o)}}function Hd(e,t){Wd(e,t),t[0]=null,t[5]=null}function Ud(e,t,n,r,i,a){r[0]=i,r[5]=t,cf(e,r,n,1,i,a)}function Wd(e,t){t[10].changeDetectionScheduler?.notify(9),cf(e,t,t[11],2,null,null)}function Gd(e){let t=e[12];if(!t)return Jd(e[1],e);for(;t;){let n=null;if(Ga(t))n=t[12];else{let e=t[10];e&&(n=e)}if(!n){for(;t&&!t[4]&&t!==e;)Ga(t)&&Jd(t[1],t),t=t[3];t===null&&(t=e),Ga(t)&&Jd(t[1],t),n=t&&t[4]}t=n}}function Kd(e,t){let n=e[9],r=n.indexOf(t);n.splice(r,1)}function qd(e,t){if(Qa(t))return;let n=t[11];n.destroyNode&&cf(e,t,n,3,null,null),Gd(t)}function Jd(e,t){if(Qa(t))return;let n=w(null);try{t[2]&=-129,t[2]|=256,t[24]&&En(t[24]),Xd(e,t),Yd(e,t),t[1].type===1&&t[11].destroy();let n=t[16];if(n!==null&&Ka(t[3])){n!==t[3]&&Kd(n,t);let r=t[18];r!==null&&r.detachView(e)}Fl(t)}finally{w(n)}}function Yd(e,t){let n=e.cleanup,r=t[7];if(n!==null)for(let e=0;e=0?r[t]():r[-t].unsubscribe(),e+=2}else{let t=r[n[e+1]];n[e].call(t)}r!==null&&(t[7]=null);let i=t[21];if(i!==null){t[21]=null;for(let e=0;e27&&xf(e,t,27,!1),Oc(o?Cc.TemplateUpdateStart:Cc.TemplateCreateStart,i,n),n(r,i)}finally{ds(a),Oc(o?Cc.TemplateUpdateEnd:Cc.TemplateCreateEnd,i,n)}}function Tf(e,t,n){Mf(e,t,n),(n.flags&64)==64&&Nf(e,t,n)}function Ef(e,t,n=ro){let r=t.localNames;if(r!==null){let i=t.index+1;for(let a=0;a{_o(e.lView)},consumerOnSignalRead(){this.lView[24]=this}};function rp(e){let t=e[24]??Object.create(ip);return t.lView=e,t}var ip={...pn,consumerIsAlwaysLive:!0,kind:`template`,consumerMarkedDirty:e=>{let t=bo(e.lView);for(;t&&!ap(t[1]);)t=bo(t);t&&po(t)},consumerOnSignalRead(){this.lView[24]=this}};function ap(e){return e.type!==2}function op(e){if(e[23]===null)return;let t=!0;for(;t;){let n=!1;for(let t of e[23])if(t.dirty&&(n=!0,t.zone===null||Zone.current===t.zone?t.run():t.zone.run(()=>t.run()),e[23]===null))return;t=n&&!!(e[2]&8192)}}var sp=100;function cp(e,t=0){let n=e[10].rendererFactory;n.begin?.();try{lp(e,t)}finally{n.end?.()}}function lp(e,t){let n=Vo();try{Ho(!0),hp(e,t);let n=0;for(;ho(e);){if(n===sp)throw new T(103,!1);n++,hp(e,1)}}finally{Ho(n)}}function up(e,t,n,r){if(Qa(t))return;let i=t[2];rs(t);let a=!0,o=null,s=null;ap(e)?(s=$f(t),o=xn(s)):fn()===null?(a=!1,s=rp(t),o=xn(s)):t[24]&&=(En(t[24]),null);try{fo(t),Go(e.bindingStartIndex),n!==null&&wf(e,t,n,2,r);let a=(i&3)==3;if(a){let n=e.preOrderCheckHooks;n!==null&&jc(t,n,null)}else{let n=e.preOrderHooks;n!==null&&Mc(t,n,0,null),Nc(t,0)}if(fp(t),op(t),dp(t,0),e.contentQueries!==null&&Zl(e,t),a){let n=e.contentCheckHooks;n!==null&&jc(t,n)}else{let n=e.contentHooks;n!==null&&Mc(t,n,1),Nc(t,1)}_p(e,t);let o=e.components;o!==null&&gp(t,o,0);let s=e.viewQuery;if(s!==null&&Ql(2,s,r),a){let n=e.viewCheckHooks;n!==null&&jc(t,n)}else{let n=e.viewHooks;n!==null&&Mc(t,n,2),Nc(t,2)}if(e.firstUpdatePass===!0&&(e.firstUpdatePass=!1),t[22]){for(let e of t[22])e();t[22]=null}Zf(t),t[2]&=-73}catch(e){throw _o(t),e}finally{s!==null&&(Cn(s,o),a&&tp(s)),cs()}}function dp(e,t){for(let n=Rl(e);n!==null;n=zl(n))for(let e=10;e0&&(e[n-1][4]=r[4]);let a=ra(e,10+t);Hd(r[1],r);let o=a[18];o!==null&&o.detachView(a[1]),r[3]=null,r[4]=null,r[2]&=-129}return r}function wp(e,t,n,r){let i=10+r,a=n.length;r>0&&(n[i-1][4]=t),r-1&&(Cp(e,n),ra(t,n))}this._attachedToViewContainer=!1}qd(this._lView[1],this._lView)}onDestroy(e){vo(this._lView,e)}markForCheck(){vp(this._cdRefInjectingView||this._lView,4)}detach(){this._lView[2]&=-129}reattach(){go(this._lView),this._lView[2]|=128}detectChanges(){this._lView[2]|=1024,cp(this._lView)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new T(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;let e=Za(this._lView),t=this._lView[16];t!==null&&!e&&Kd(t,this._lView),Wd(this._lView[1],this._lView)}attachToAppRef(e){if(this._attachedToViewContainer)throw new T(902,!1);this._appRef=e;let t=Za(this._lView),n=this._lView[16];n!==null&&!t&&Tp(n,this._lView),go(this._lView)}},Dp=(()=>{class e{_declarationLView;_declarationTContainer;elementRef;static __NG_ELEMENT_ID__=Op;constructor(e,t,n){this._declarationLView=e,this._declarationTContainer=t,this.elementRef=n}get ssrId(){return this._declarationTContainer.tView?.ssrId||null}createEmbeddedView(e,t){return this.createEmbeddedViewImpl(e,t)}createEmbeddedViewImpl(e,t,n){return new Ep(qf(this._declarationLView,this._declarationTContainer,e,{embeddedViewInjector:t,dehydratedView:n}))}}return e})();function Op(){return kp(Po(),D())}function kp(e,t){return e.type&4?new Dp(t,e,wl(e,t)):null}function Ap(e,t,n,r,i){let a=e.data[t];if(a===null)a=jp(e,t,n,r,i),Jo()&&(a.flags|=32);else if(a.type&64){a.type=n,a.value=r,a.attrs=i;let e=Io();a.injectorIndex=e===null?-1:e.injectorIndex}return Lo(a,!0),a}function jp(e,t,n,r,i){let a=Fo(),o=Ro(),s=o?a:a&&a.parent,c=e.data[t]=Np(e,s,n,t,r,i);return Mp(e,c,a,o),c}function Mp(e,t,n,r){e.firstChild===null&&(e.firstChild=t),n!==null&&(r?n.child==null&&t.parent!==null&&(n.child=t):n.next===null&&(n.next=t,t.prev=n))}function Np(e,t,n,r,i,a){let o=t?t.injectorIndex:-1,s=0;return Ao()&&(s|=128),{type:n,index:r,insertBeforeIndex:null,injectorIndex:o,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,componentOffset:-1,controlDirectiveIndex:-1,customControlIndex:-1,propertyBindings:null,flags:s,providerIndexes:0,value:i,namespace:gs(),attrs:a,mergedAttrs:null,localNames:null,initialInputs:null,inputs:null,hostDirectiveInputs:null,outputs:null,hostDirectiveOutputs:null,directiveToIndex:null,tView:null,next:null,prev:null,projectionNext:null,child:null,parent:t,projection:null,styles:null,stylesWithoutHost:null,residualStyles:void 0,classes:null,classesWithoutHost:null,residualClasses:void 0,classBindings:0,styleBindings:0}}function Pp(e){let t=e[6]??[],n=e[3][11],r=[];for(let e of t)e.data.di===void 0?Fp(e,n):r.push(e);e[6]=r}function Fp(e,t){let n=0,r=e.firstChild;if(r){let i=e.data.r;for(;nnull,Lp=()=>null;function Rp(e,t){return Ip(e,t)}function zp(e,t,n){return Lp(e,t,n)}var Bp=class{},Vp=class{},Hp=(()=>{class e{static ɵprov=di({token:e,providedIn:`root`,factory:()=>null})}return e})();function Up(e){return e.debugInfo?.className||e.type.name||null}var Wp={},Gp=class{injector;parentInjector;constructor(e,t){this.injector=e,this.parentInjector=t}get(e,t,n){let r=this.injector.get(e,Wp,n);return r!==Wp||t===Wp?r:this.parentInjector.get(e,t,n)}};function Kp(e,t,n){return e[t]=n}function qp(e,t){return e[t]}function Jp(e,t,n){if(n===Iu)return!1;let r=e[t];return!Object.is(r,n)&&(e[t]=n,!0)}function Yp(e,t,n,r){let i=Jp(e,t,n);return Jp(e,t+1,r)||i}function Xp(e,t,n,r,i){let a=Yp(e,t,n,r);return Jp(e,t+2,i)||a}function Zp(e,t,n,r,i,a){let o=Yp(e,t,n,r);return Yp(e,t+2,i,a)||o}function Qp(e,t,n){return function r(i){let a=r.__ngNativeEl__;a!==void 0&&ql(i,a),vp(Ja(e)?so(e.index,t):t,5);let o=t[8],s=$p(t,o,n,i),c=r.__ngNextListenerFn__;for(;c;)s=$p(t,o,c,i)&&s,c=c.__ngNextListenerFn__;return s}}function $p(e,t,n,r){let i=w(null);try{return Oc(Cc.OutputStart,t,n),n(r)!==!1}catch(t){return Vf(e,t),!1}finally{Oc(Cc.OutputEnd,t,n),w(i)}}function em(e,t,n,r,i,a,o,s){let c=Ya(e),l=!1,u=null;if(!r&&c&&(u=nm(t,n,a,e.index)),u!==null){let e=u.__ngLastListenerFn__||u;e.__ngNextListenerFn__=o,u.__ngLastListenerFn__=o,l=!0}else{let o=ro(e,n),c=r?r(o):o;r||(s.__ngNativeEl__=o);let l=i.listen(c,a,s);tm(a)||rm(r?t=>r(to(t[e.index])):e.index,t,n,a,s,l,!1)}return l}function tm(e){return e.startsWith(`animation`)||e.startsWith(`transition`)}function nm(e,t,n,r){let i=e.cleanup;if(i!=null)for(let e=0;er?n[r]:null}typeof a==`string`&&(e+=2)}return null}function rm(e,t,n,r,i,a,o){let s=t.firstCreatePass?So(t):null,c=xo(n),l=c.length;c.push(i,a),s&&s.push(r,e,l,(l+1)*(o?-1:1))}function im(e,t,n,r,i,a){let o=t[n],s=t[1],c=o[s.data[n].outputs[r]].subscribe(a);rm(e.index,s,t,i,a,c,!0)}var am=Symbol(`BINDING`),om=new vi(``);function sm(e,t,n){let r=n?e.styles:null,i=n?e.classes:null,a=0;if(t!==null)for(let e=0;e0&&(n.directiveToIndex=new Map);for(let c=0;c0;){let n=e[--t];if(typeof n==`number`&&n<0)return n}return 0}function xm(e,t,n){if(n){if(t.exportAs)for(let r=0;r{let[n,r,i]=e[t],a={propName:n,templateName:t,isSignal:(r&Sf.SignalBased)!==0};return i&&(a.transform=i),a})}function km(e){return Object.keys(e).map(t=>({propName:e[t],templateName:t}))}function Am(e,t,n){let r=t instanceof Aa?t:t?.injector;return r&&e.getStandaloneInjector!==null&&(r=e.getStandaloneInjector(r)||r),r?new Gp(n,r):n}function jm(e){let t=e.get(Vp,null);if(t===null)throw new T(407,!1);return{rendererFactory:t,sanitizer:e.get(Hp,null),changeDetectionScheduler:e.get(ac,null),ngReflect:!1,tracingService:e.get(_d,null,{optional:!0})}}function Mm(e,t,n){let r=Pm(e);return lu(t,r,r===`svg`?`svg`:r===`math`?eo:n)}function Nm(e){if((e&&`localName`in e&&typeof e.localName==`string`?e.localName:e?.tagName)?.toLowerCase()===`script`)throw new T(905,!1)}function Pm(e){return(e.selectors[0][0]||`div`).toLowerCase()}var Fm=class{componentDef;ngModule;selector;componentType;ngContentSelectors;isBoundToModule;cachedInputs=null;cachedOutputs=null;get inputs(){return this.cachedInputs??=Om(this.componentDef.inputs),this.cachedInputs}get outputs(){return this.cachedOutputs??=km(this.componentDef.outputs),this.cachedOutputs}constructor(e,t){this.componentDef=e,this.ngModule=t,this.componentType=e.type,this.selector=Pu(e.selectors),this.ngContentSelectors=e.ngContentSelectors??[],this.isBoundToModule=!!t}create(e,t,n,r,i,a,o){Oc(Cc.DynamicComponentStart);let s=w(null);try{let s=this.componentDef,c=Am(s,r||this.ngModule,e),l=jm(c),u=l.tracingService;return u&&u.componentCreate?u.componentCreate(Up(s),()=>this.createComponentRef(l,c,t,n,i,a,o)):this.createComponentRef(l,c,t,n,i,a,o)}finally{w(s)}}createComponentRef(e,t,n,r,i,a,o){let s=this.componentDef,c=Im(r,s,a,i),l=e.rendererFactory.createRenderer(null,s),u=r?Df(l,r,s.encapsulation,t):Mm(s,l,o??null);Nm(u);let d=t.get(om,null),f=Lm(u,()=>t.get(Cs,null)??Ul());d&&d.addHost(f);let p=a?.some(zm)||i?.some(e=>typeof e!=`function`&&e.bindings.some(zm)),m=gf(null,c,null,512|vf(s),null,null,e,l,t,null,Xl(u,t,!0));d&&Em&&f instanceof ShadowRoot&&vo(m,()=>{d.removeHost(f)}),m[27]=u,rs(m);let h=null;try{let e=Cm(27,m,2,`#host`,()=>c.directiveRegistry,!0,0);gu(l,u,e),Ll(u,m),Tf(c,m,e),$l(c,e,m),wm(c,e),n!==void 0&&Vm(e,this.ngContentSelectors,n),h=so(e.index,m),m[8]=h[8],Gf(c,m,null)}catch(e){throw h!==null&&Fl(h),Fl(m),e}finally{Oc(Cc.DynamicComponentEnd),cs()}return new Bm(this.componentType,m,!!p)}};function Im(e,t,n,r){let i=e?[`ng-version`,`22.1.7`]:Fu(t.selectors[0]),a=null,o=null,s=0;if(n)for(let e of n)s+=e[am].requiredVars,e.create&&(e.targetIdx=0,(a??=[]).push(e)),e.update&&(e.targetIdx=0,(o??=[]).push(e));if(r)for(let e=0;e{if(n&1&&e)for(let t of e)t.create();if(n&2&&t)for(let e of t)e.update()}}function zm(e){let t=e[am].kind;return t===`input`||t===`twoWay`}var Bm=class extends Bp{_rootLView;_hasInputBindings;instance;hostView;changeDetectorRef;componentType;location;previousInputValues=null;_tNode;constructor(e,t,n){super(),this._rootLView=t,this._hasInputBindings=n,this._tNode=io(t[1],27),this.location=wl(this._tNode,t),this.instance=so(this._tNode.index,t)[8],this.hostView=this.changeDetectorRef=new Ep(t,void 0),this.componentType=e}setInput(e,t){this._hasInputBindings;let n=this._tNode;if(this.previousInputValues??=new Map,this.previousInputValues.has(e)&&Object.is(this.previousInputValues.get(e),t))return;let r=this._rootLView;Hf(n,r[1],r,e,t),this.previousInputValues.set(e,t),vp(so(n.index,r),1)}get injector(){return new vl(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(e){this.hostView.onDestroy(e)}};function Vm(e,t,n){let r=e.projection=[];for(let e=0;e{class e{static __NG_ELEMENT_ID__=Um}return e})();function Um(){return qm(Po(),D())}var Wm=class e extends Hm{_lContainer;_hostTNode;_hostLView;constructor(e,t,n){super(),this._lContainer=e,this._hostTNode=t,this._hostLView=n}get element(){return wl(this._hostTNode,this._hostLView)}get injector(){return new vl(this._hostTNode,this._hostLView)}get parentInjector(){let e=ol(this._hostTNode,this._hostLView);if(Kc(e)){let t=Yc(e,this._hostLView),n=qc(e),r=t[1].data[n+8];return new vl(r,t)}return new vl(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(e){let t=Gm(this._lContainer);return t!==null&&t[e]||null}get length(){return this._lContainer.length-10}createEmbeddedView(e,t,n){let r,i;typeof n==`number`?r=n:n!=null&&(r=n.index,i=n.injector);let a=Rp(this._lContainer,e.ssrId),o=e.createEmbeddedViewImpl(t||{},i,a);return this.insertImpl(o,r,Jf(this._hostTNode,a)),o}createComponent(e,t,n,r,i,a,o){let s,c=t||{};s=c.index,n=c.injector,r=c.projectableNodes,i=c.environmentInjector||c.ngModuleRef,a=c.directives,o=c.bindings;let l=new Fm(Ei(e)),u=n||this.parentInjector;if(!i&&l.ngModule==null){let e=this.parentInjector.get(Aa,null);e&&(i=e)}let d=Ei(l.componentType??{}),f=Rp(this._lContainer,d?.id??null),p=f?.firstChild??null,m=l.create(u,r,p,i,a,o,this._getHostElementNamespace());return this.insertImpl(m.hostView,s,Jf(this._hostTNode,f)),m}_getHostElementNamespace(){if(this._hostTNode.type&2){let e=this._hostTNode.parent??this._hostLView[5];return e!==null&&e.type&2&&typeof e.value==`string`&&e.value.toLowerCase()===`foreignobject`?null:e?.namespace??null}return this._hostTNode.namespace}insert(e,t){return this.insertImpl(e,t,!0)}insertImpl(t,n,r){let i=t._lView;if(lo(i)){let n=this.indexOf(t);if(n!==-1)this.detach(n);else{let n=i[3],r=new e(n,n[5],n[3]);r.detach(r.indexOf(t))}}let a=this._adjustIndex(n),o=this._lContainer;return xp(o,i,a,r),t.attachToViewContainerRef(),na(Km(o),a,t),t}move(e,t){return this.insert(e,t)}indexOf(e){let t=Gm(this._lContainer);return t===null?-1:t.indexOf(e)}remove(e){let t=this._adjustIndex(e,-1),n=Cp(this._lContainer,t);n&&(ra(Km(this._lContainer),t),qd(n[1],n))}detach(e){let t=this._adjustIndex(e,-1),n=Cp(this._lContainer,t);return n&&ra(Km(this._lContainer),t)!=null?new Ep(n):null}_adjustIndex(e,t=0){return e??this.length+t}};function Gm(e){return e[8]}function Km(e){return e[8]||=[]}function qm(e,t){let n,r=t[e.index];return Ka(r)?n=r:(n=yp(r,t,null,e),t[e.index]=n,bf(t,n)),Ym(n,t,e,r),new Wm(n,e,t)}function Jm(e,t){let n=e[11],r=n.createComment(``),i=ro(t,e);return uu(n,n.parentNode(i),r,n.nextSibling(i),!1),r}var Ym=Qm,Xm=()=>!1;function Zm(e,t,n){return Xm(e,t,n)}function Qm(e,t,n,r){if(e[7])return;let i;i=n.type&8?to(r):Jm(t,n),e[7]=i}var $m=class e{queryList;matches=null;constructor(e){this.queryList=e}clone(){return new e(this.queryList)}setDirty(){this.queryList.setDirty()}},eh=class e{queries;constructor(e=[]){this.queries=e}createEmbeddedView(t){let n=t.queries;if(n!==null){let r=t.contentQueries===null?n.length:t.contentQueries[0],i=[];for(let e=0;e0)r.push(o[e/2]);else{let i=a[e+1],o=t[-n];for(let e=10;ee.trim())}function mh(e,t,n){e.queries===null&&(e.queries=new nh),e.queries.track(new rh(t,n))}function hh(e,t){return e.queries.getByIndex(t)}function gh(e,t){let n=e[1],r=hh(n,t);return r.crossesNgTemplate?lh(n,e,t,[]):ch(n,e,r,t)}function _h(e,t,n){let r,i=Mn(()=>{r._dirtyCounter();let n=xh(r,e);if(t&&n===void 0)throw new T(-951,!1);return n});return r=i[dn],r._dirtyCounter=A(0),r._flatValue=void 0,i}function vh(e){return _h(!0,!1,e)}function yh(e){return _h(!0,!0,e)}function bh(e,t){let n=e[dn];n._lView=D(),n._queryIndex=t,n._queryList=uh(n._lView,t),n._queryList.onDirty(()=>n._dirtyCounter.update(e=>e+1))}function xh(e,t){let n=e._lView,r=e._queryIndex;if(n===void 0||r===void 0||n[2]&4)return t?void 0:ua;let i=uh(n,r),a=gh(n,r);return i.reset(a,El),t?i.first:i._changesDetected||e._flatValue===void 0?e._flatValue=i.toArray():e._flatValue}function Sh(e){return!!e&&typeof e.then==`function`}function Ch(e){return!!e&&typeof e.subscribe==`function`}var wh=class{},Th=class extends wh{injector;instance=null;constructor(e){super();let t=new ja([...e.providers,{provide:wh,useValue:this}],e.parent||ka(),e.debugName,new Set([`environment`]));this.injector=t,e.runEnvironmentInitializers&&t.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(e){this.injector.onDestroy(e)}};function Eh(e,t,n=null){return new Th({providers:e,parent:t,debugName:n,runEnvironmentInitializers:!0}).injector}var Dh=(()=>{class e{_injector;cachedInjectors=new Map;constructor(e){this._injector=e}getOrCreateStandaloneInjector(e){if(!e.standalone)return null;if(!this.cachedInjectors.has(e)){let t=ga(!1,e.type),n=t.length>0?Eh([t],this._injector,``):null;this.cachedInjectors.set(e,n)}return this.cachedInjectors.get(e)}ngOnDestroy(){try{for(let e of this.cachedInjectors.values())e!==null&&e.destroy()}finally{this.cachedInjectors.clear()}}static ɵprov=di({token:e,providedIn:`environment`,factory:()=>new e(qi(Aa))})}return e})();function Oh(e){return Sc(()=>{let t=Nh(e),n={...t,decls:e.decls,vars:e.vars,template:e.template,consts:e.consts||null,ngContentSelectors:e.ngContentSelectors,onPush:e.changeDetection!==Al.Eager,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&e.dependencies||null,getStandaloneInjector:t.standalone?e=>e.get(Dh).getOrCreateStandaloneInjector(n):null,getExternalStyles:null,signals:e.signals??!1,data:e.data||{},encapsulation:e.encapsulation||eu.Emulated,styles:e.styles||ua,_:null,schemas:e.schemas||null,tView:null,id:``};t.standalone&&yd(`NgStandalone`),Ph(n);let r=e.dependencies;return n.directiveDefs=Fh(r,kh),n.pipeDefs=Fh(r,Oi),n.id=Ih(n),n})}function kh(e){return Ei(e)||Di(e)}function Ah(e,t){if(e==null)return la;let n={};for(let r in e)if(Object.hasOwn(e,r)){let i=e[r],a,o,s,c;Array.isArray(i)?(s=i[0],a=i[1],o=i[2]??a,c=i[3]||null):(a=i,o=i,s=Sf.None,c=null),n[a]=[r,s,c],t[a]=o}return n}function jh(e){if(e==null)return la;let t={};for(let n in e)Object.hasOwn(e,n)&&(t[e[n]]=n);return t}function Mh(e){return{type:e.type,name:e.name,factory:null,pure:e.pure!==!1,standalone:e.standalone??!0,onDestroy:e.type.prototype.ngOnDestroy||null}}function Nh(e){let t={};return{type:e.type,providersResolver:null,viewProvidersResolver:null,factory:null,hostBindings:e.hostBindings||null,hostVars:e.hostVars||0,hostAttrs:e.hostAttrs||null,contentQueries:e.contentQueries||null,declaredInputs:t,inputConfig:e.inputs||la,exportAs:e.exportAs||null,standalone:e.standalone??!0,signals:e.signals===!0,selectors:e.selectors||ua,viewQuery:e.viewQuery||null,features:e.features||null,setInput:null,resolveHostDirectives:null,hostDirectives:null,controlDef:null,signalFormsInputPresence:null,inputs:Ah(e.inputs,t),outputs:jh(e.outputs),debugInfo:null}}function Ph(e){e.features?.forEach(t=>t(e))}function Fh(e,t){return e?()=>{let n=typeof e==`function`?e():e,r=[];for(let e of n){let n=t(e);n!==null&&r.push(n)}return r}:null}function Ih(e){let t=0,n=typeof e.consts==`function`?``:e.consts,r=[e.selectors,e.ngContentSelectors,e.hostVars,e.hostAttrs,n,e.vars,e.decls,e.encapsulation,e.standalone,e.signals,e.exportAs,JSON.stringify(e.inputs),JSON.stringify(e.outputs),Object.getOwnPropertyNames(e.type.prototype),!!e.contentQueries,!!e.viewQuery];for(let e of r.join(`|`))t=Math.imul(31,t)+e.charCodeAt(0)<<0;return t+=2147483648,`c`+t}var Lh=new vi(``),Rh=(()=>{class e{resolve;reject;initialized=!1;done=!1;donePromise=new Promise((e,t)=>{this.resolve=e,this.reject=t});appInits=E(Lh,{optional:!0})??[];injector=E(Ss);constructor(){}runInitializers(){if(this.initialized)return;let e=[];for(let t of this.appInits){let n=Ha(this.injector,t);if(Sh(n))e.push(n);else if(Ch(n)){let t=new Promise((e,t)=>{n.subscribe({complete:e,error:t})});e.push(t)}}let t=()=>{this.done=!0,this.resolve()};Promise.all(e).then(()=>{t()}).catch(e=>{this.reject(e)}),e.length===0&&t(),this.initialized=!0}static ɵfac=function(t){return new(t||e)};static ɵprov=Sl({token:e,factory:e.ɵfac})}return e})();function zh(e,t,n,r,i,a,o,s){if(n.firstCreatePass){e.mergedAttrs=Wc(e.mergedAttrs,e.attrs);let t=e.tView=pf(2,e,i,a,o,n.directiveRegistry,n.pipeRegistry,null,n.schemas,n.consts,null);n.queries!==null&&(n.queries.template(n,e),t.queries=n.queries.embeddedTView(e))}s&&(e.flags|=s),Lo(e,!1);let c=Vh(n,t,e,r);vs()&&nf(n,t,c,e),Ll(c,t);let l=yp(c,t,c,e);t[r+27]=l,bf(t,l),Zm(l,e,t)}function Bh(e,t,n,r,i,a,o,s,c,l,u){let d=n+27,f;if(t.firstCreatePass){if(f=Ap(t,d,4,o||null,s||null),l!=null){let e=uo(t.consts,l);f.localNames=[];for(let t=0;t{throw new T(600,``)})}var Kh=10,qh=(()=>{class e{_runningTick=!1;_destroyed=!1;_destroyListeners=[];_views=[];internalErrorHandler=E(Ys);afterRenderManager=E(bd);zonelessEnabled=E(oc);rootEffectScheduler=E(cc);dirtyFlags=0;tracingSnapshot=null;allTestViews=new Set;autoDetectTestViews=new Set;includeAllTestViews=!1;afterTick=new Zr;get allViews(){return[...(this.includeAllTestViews?this.allTestViews:this.autoDetectTestViews).keys(),...this._views]}get destroyed(){return this._destroyed}componentTypes=[];components=[];internalPendingTask=E(Os);get isStable(){return this.internalPendingTask.hasPendingTasksObservable.pipe(ei(e=>!e))}constructor(){E(_d,{optional:!0})}whenStable(){let e;return new Promise(t=>{e=this.isStable.subscribe({next:e=>{e&&t()}})}).finally(()=>{e.unsubscribe()})}_injector=E(Aa);_rendererFactory=null;get injector(){return this._injector}bootstrap(e,t){return this.bootstrapImpl(e,t)}bootstrapImpl(e,t,n=Ss.NULL){return this._injector.get(Is).run(()=>{if(Oc(Cc.BootstrapComponentStart),!this._injector.get(Rh).done)throw new T(405,``);let r=Ei(e),i=this._injector.get(wh),a=new Fm(r,i);this.componentTypes.push(e);let{hostElement:o,directives:s,bindings:c}=Jh(t),l=o||a.selector,u=a.create(n,[],l,i.injector,s,c),d=u.location.nativeElement,f=u.injector.get(Uh,null);return f?.registerApplication(d),u.onDestroy(()=>{this.detachView(u.hostView),Yh(this.components,u),f?.unregisterApplication(d)}),this._loadComponent(u),Oc(Cc.BootstrapComponentEnd,u),u})}tick(){this.zonelessEnabled||(this.dirtyFlags|=1),this._tick()}_tick(){Oc(Cc.ChangeDetectionStart),this.tracingSnapshot===null?this.tickImpl():this.tracingSnapshot.run(gd.CHANGE_DETECTION,this.tickImpl)}tickImpl=()=>{if(this._runningTick)throw Oc(Cc.ChangeDetectionEnd),new T(101,!1);let e=w(null);try{this._runningTick=!0,this.synchronize()}finally{this._runningTick=!1,this.tracingSnapshot?.dispose(),this.tracingSnapshot=null,w(e),this.afterTick.next(),Oc(Cc.ChangeDetectionEnd)}};synchronize(){this._rendererFactory===null&&!this._injector.destroyed&&(this._rendererFactory=this._injector.get(Vp,null,{optional:!0}));let e=0;for(;this.dirtyFlags!==0&&e++ho(e))){this.dirtyFlags|=2;return}this.dirtyFlags&=-8}attachView(e){let t=e;this._views.push(t),t.attachToAppRef(this)}detachView(e){let t=e;Yh(this._views,t),t.detachFromAppRef()}_loadComponent(e){this.attachView(e.hostView);try{this.tick()}catch(e){this.internalErrorHandler(e)}this.components.push(e),this._injector.get(Wh,[]).forEach(t=>t(e))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(e=>e()),this._views.slice().forEach(e=>e.destroy())}finally{this._destroyed=!0,this._views=[],this._destroyListeners=[]}}onDestroy(e){return this._destroyListeners.push(e),()=>Yh(this._destroyListeners,e)}destroy(){if(this._destroyed)throw new T(406,!1);let e=this._injector;e.destroy&&!e.destroyed&&e.destroy()}get viewCount(){return this._views.length}static ɵfac=function(t){return new(t||e)};static ɵprov=Sl({token:e,factory:e.ɵfac})}return e})();function Jh(e){return e===void 0||typeof e==`string`||e instanceof Element?{hostElement:e}:e}function Yh(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}function M(e,t,n,r){let i=D();return Jp(i,Ko(),t)&&(No(),If(fs(),i,e,t,n,r)),M}function Xh(e){if(yd(`NgAnimateEnter`),!ed)return Xh;let t=D();if(td(t))return Xh;let n=Po(),r=t[9].get(Is);return hd(dd(t),n,()=>Zh(t,n,e,r)),Md(t[9]),Nd(t[9],dd(t)),Xh}function Zh(e,t,n,r){let i=ro(t,e),a=e[11],o=fd(n),s=[],c=!1,l=e=>{if(pd(e)!==i)return;let t=e instanceof AnimationEvent?`animationend`:`transitionend`;r.runOutsideAngular(()=>{a.listen(i,t,u)})},u=e=>{pd(e)===i&&(md(e,i)&&(c=!0),Qh(e,i,a))};if(o&&o.length>0){r.runOutsideAngular(()=>{s.push(a.listen(i,`animationstart`,l)),s.push(a.listen(i,`transitionstart`,l))}),nd(i,o,s);for(let e of o)a.addClass(i,e);r.runOutsideAngular(()=>{requestAnimationFrame(()=>{if(!c&&(Yu(i,ad,ed),!ad.has(i))){for(let e of o)a.removeClass(i,e);rd(i)}})})}}function Qh(e,t,n){let r=id.get(t);if(pd(e)===t&&r&&md(e,t)){e.stopPropagation();for(let e of r.classList)n.removeClass(t,e);rd(t)}}var $h=class{destroy(e){}updateValue(e,t){}swap(e,t){let n=Math.min(e,t),r=Math.max(e,t),i=this.detach(r);if(r-n>1){let e=this.detach(n);this.attach(n,i),this.attach(r,e)}else this.attach(n,i)}move(e,t){this.attach(t,this.detach(e))}};function eg(e,t,n,r,i){return e===n&&Object.is(t,r)?1:Object.is(i(e,t),i(n,r))?-1:0}function tg(e,t,n,r){let i,a,o=0,s=e.length-1;if(Array.isArray(t)){w(r);let c=t.length-1;for(w(null);o<=s&&o<=c;){let r=e.at(o),l=t[o],u=eg(o,r,o,l,n);if(u!==0){u<0&&e.updateValue(o,l),o++;continue}let d=e.at(s),f=t[c],p=eg(s,d,c,f,n);if(p!==0){p<0&&e.updateValue(s,f),s--,c--;continue}let m=n(o,r),h=n(s,d),g=n(o,l);if(Object.is(g,h)){let t=n(c,f);Object.is(t,m)?(e.swap(o,s),e.updateValue(s,f),c--,s--):e.move(s,o),e.updateValue(o,l),o++;continue}if(i??=new ag,a??=ig(e,o,s,n),ng(e,i,o,g))e.updateValue(o,l),o++,s++;else if(a.has(g))i.set(m,e.detach(o)),s--;else{let n=e.create(o,t[o]);e.attach(o,n),o++,s++}}for(;o<=c;)rg(e,i,n,o,t[o]),o++}else if(t!=null){w(r);let c=t[Symbol.iterator]();w(null);let l=c.next();for(;!l.done&&o<=s;){let t=e.at(o),r=l.value,u=eg(o,t,o,r,n);if(u!==0)u<0&&e.updateValue(o,r),o++,l=c.next();else{i??=new ag,a??=ig(e,o,s,n);let u=n(o,r);if(ng(e,i,o,u))e.updateValue(o,r),o++,s++,l=c.next();else if(!a.has(u))e.attach(o,e.create(o,r)),o++,s++,l=c.next();else{let r=n(o,t);i.set(r,e.detach(o)),s--}}}for(;!l.done;)rg(e,i,n,e.length,l.value),l=c.next()}for(;o<=s;)e.destroy(e.detach(s--));i?.forEach(t=>{e.destroy(t)})}function ng(e,t,n,r){return t!==void 0&&t.has(r)?(e.attach(n,t.get(r)),t.delete(r),!0):!1}function rg(e,t,n,r,i){if(ng(e,t,r,n(r,i)))e.updateValue(r,i);else{let t=e.create(r,i);e.attach(r,t)}}function ig(e,t,n,r){let i=new Set;for(let a=t;a<=n;a++)i.add(r(a,e.at(a)));return i}var ag=class{kvMap=new Map;_vMap=void 0;has(e){return this.kvMap.has(e)}delete(e){if(!this.has(e))return!1;let t=this.kvMap.get(e);return this._vMap!==void 0&&this._vMap.has(t)?(this.kvMap.set(e,this._vMap.get(t)),this._vMap.delete(t)):this.kvMap.delete(e),!0}get(e){return this.kvMap.get(e)}set(e,t){if(this.kvMap.has(e)){let n=this.kvMap.get(e);this._vMap===void 0&&(this._vMap=new Map);let r=this._vMap;for(;r.has(n);)n=r.get(n);r.set(n,t)}else this.kvMap.set(e,t)}forEach(e){for(let[t,n]of this.kvMap)if(e(n,t),this._vMap!==void 0){let r=this._vMap;for(;r.has(n);)n=r.get(n),e(n,t)}}};function N(e,t,n,r,i,a,o,s){yd(`NgControlFlow`);let c=D(),l=No();return Bh(c,l,e,t,n,r,i,uo(l.consts,a),256,o,s),og}function og(e,t,n,r,i,a,o,s){yd(`NgControlFlow`);let c=D(),l=No();return Bh(c,l,e,t,n,r,i,uo(l.consts,a),512,o,s),og}function P(e,t){yd(`NgControlFlow`);let n=D(),r=Ko(),i=n[r]===Iu?-1:n[r],a=i===-1?void 0:fg(n,27+i);if(Jp(n,r,e)){let r=w(null);try{if(a!==void 0&&Sp(a,0),e!==-1){let r=27+e,i=fg(n,r),a=_g(n[1],r),o=zp(i,a,n);xp(i,qf(n,a,t,{dehydratedView:o}),0,Jf(a,o))}}finally{w(r)}}else if(a!==void 0){let e=bp(a,0);e!==void 0&&(e[8]=t)}}var sg=class{lContainer;$implicit;$index;constructor(e,t,n){this.lContainer=e,this.$implicit=t,this.$index=n}get $count(){return this.lContainer.length-10}};function cg(e){return e}function lg(e,t){return t}var ug=class{hasEmptyBlock;trackByFn;liveCollection;constructor(e,t,n){this.hasEmptyBlock=e,this.trackByFn=t,this.liveCollection=n}};function F(e,t,n,r,i,a,o,s,c,l,u,d,f){yd(`NgControlFlow`);let p=D(),m=No(),h=c!==void 0,g=D(),_=new ug(h,s?o.bind(g[15][8]):o);g[27+e]=_,Bh(p,m,e+1,t,n,r,i,uo(m.consts,a),256),h&&Bh(p,m,e+2,c,l,u,d,uo(m.consts,f),512)}var dg=class extends $h{lContainer;hostLView;templateTNode;operationsCounter=void 0;needsIndexUpdate=!1;constructor(e,t,n){super(),this.lContainer=e,this.hostLView=t,this.templateTNode=n}get length(){return this.lContainer.length-10}at(e){return this.getLView(e)[8].$implicit}attach(e,t){let n=t[6];this.needsIndexUpdate||=e!==this.length,xp(this.lContainer,t,e,Jf(this.templateTNode,n)),pg(this.lContainer,e)}detach(e){return this.needsIndexUpdate||=e!==this.length-1,mg(this.lContainer,e),hg(this.lContainer,e)}create(e,t){let n=Rp(this.lContainer,this.templateTNode.tView.ssrId);return qf(this.hostLView,this.templateTNode,new sg(this.lContainer,t,e),{dehydratedView:n})}destroy(e){qd(e[1],e)}updateValue(e,t){this.getLView(e)[8].$implicit=t}reset(){this.needsIndexUpdate=!1}updateIndexes(){if(this.needsIndexUpdate)for(let e=0;e0){let e=n[9];Ad(e,r),Zu.delete(n[19]),r.detachedLeaveAnimationFns=void 0}}function mg(e,t){if(e.length<=10)return;let n=e[10+t],r=n?n[26]:void 0;r&&r.leave&&r.leave.size>0&&(r.detachedLeaveAnimationFns=[])}function hg(e,t){return Cp(e,t)}function gg(e,t){return bp(e,t)}function _g(e,t){return io(e,t)}function L(e,t,n){let r=D();return Jp(r,Ko(),t)&&(No(),kf(fs(),r,e,t,r[11],n)),L}function vg(e,t,n,r,i){Hf(t,e,n,i?`class`:`style`,r)}function R(e,t,n,r){let i=D(),a=i[1],o=e+27,s=a.firstCreatePass?Cm(o,i,2,t,Ff,ko(),n,r):a.data[o];if(Ja(s)){let n=i[10].tracingService;if(n&&n.componentCreate){let o=a.data[s.directiveStart+s.componentOffset];return n.componentCreate(Up(o),()=>(yg(e,t,i,s,r),R))}}return yg(e,t,i,s,r),R}function yg(e,t,n,r,i){if(zf(r,n,e,t,bg),Ya(r)){let e=n[1];Tf(e,n,r),$l(e,r,n)}i!=null&&Ef(n,r)}function z(){let e=No(),t=Bf(Po());return e.firstCreatePass&&wm(e,t),jo(t)&&Mo(),Oo(),t.classesWithoutHost!=null&&zc(t)&&vg(e,t,D(),t.classesWithoutHost,!0),t.stylesWithoutHost!=null&&Bc(t)&&vg(e,t,D(),t.stylesWithoutHost,!1),z}function B(e,t,n,r){return R(e,t,n,r),z(),B}function V(e,t,n,r){let i=D(),a=i[1],o=e+27,s=a.firstCreatePass?Tm(o,a,2,t,n,r):a.data[o];return zf(s,i,e,t,bg),r!=null&&Ef(i,s),V}function H(){return jo(Bf(Po()))&&Mo(),Oo(),H}function U(e,t,n,r){return V(e,t,n,r),H(),U}var bg=(e,t,n,r,i)=>(ys(!0),lu(t[11],r,gs()));function W(){return D()}function xg(e,t,n){let r=D();return Jp(r,Ko(),t)&&(No(),Af(fs(),r,e,t,r[11],n)),xg}var Sg=void 0;function Cg(e){let t=Math.floor(Math.abs(e)),n=e.toString().replace(/^[^.]*\.?/,``).length;return t===1&&n===0?1:5}var wg=[`en`,[[`a`,`p`],[`AM`,`PM`]],[[`AM`,`PM`]],[[`S`,`M`,`T`,`W`,`T`,`F`,`S`],[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],[`Su`,`Mo`,`Tu`,`We`,`Th`,`Fr`,`Sa`]],Sg,[[`J`,`F`,`M`,`A`,`M`,`J`,`J`,`A`,`S`,`O`,`N`,`D`],[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`]],Sg,[[`B`,`A`],[`BC`,`AD`],[`Before Christ`,`Anno Domini`]],0,[6,0],[`M/d/yy`,`MMM d, y`,`MMMM d, y`,`EEEE, MMMM d, y`],[`h:mm a`,`h:mm:ss a`,`h:mm:ss a z`,`h:mm:ss a zzzz`],[`{1}, {0}`,Sg,Sg,Sg],[`.`,`,`,`;`,`%`,`+`,`-`,`E`,`×`,`‰`,`∞`,`NaN`,`:`],[`#,##0.###`,`#,##0%`,`¤#,##0.00`,`#E0`],`USD`,`$`,`US Dollar`,{},`ltr`,Cg],Tg=Object.create(null);function Eg(e){let t=kg(e),n=Dg(t);if(n)return n;let r=t.split(`-`)[0];if(n=Dg(r),n)return n;if(r===`en`)return wg;throw new T(701,!1)}function Dg(e){if(!(e in Tg)){let t=Hi.ng&&Hi.ng.common&&Hi.ng.common.locales&&Hi.ng.common.locales[e];return t!==void 0&&(Tg[e]=t),t}return Tg[e]}var Og={LocaleId:0,DayPeriodsFormat:1,DayPeriodsStandalone:2,DaysFormat:3,DaysStandalone:4,MonthsFormat:5,MonthsStandalone:6,Eras:7,FirstDayOfWeek:8,WeekendRange:9,DateFormat:10,TimeFormat:11,DateTimeFormat:12,NumberSymbols:13,NumberFormats:14,CurrencyCode:15,CurrencySymbol:16,CurrencyName:17,Currencies:18,Directionality:19,PluralCase:20,ExtraData:21};function kg(e){return e.toLowerCase().replace(/_/g,`-`)}var Ag=`en-US`;function jg(e){typeof e==`string`&&e.toLowerCase().replace(/_/g,`-`)}function G(e,t,n){let r=D(),i=No(),a=Po();return Mg(i,r,r[11],a,e,t,n),G}function K(e,t,n){let r=D(),i=No(),a=Po();return(a.type&3||n)&&em(a,i,r,n,r[11],e,t,Qp(a,r,t)),K}function Mg(e,t,n,r,i,a,o){let s=!0,c=null;if((r.type&3||o)&&(c??=Qp(r,t,a),em(r,e,t,o,n,i,a,c)&&(s=!1)),s){let e=r.outputs?.[i],n=r.hostDirectiveOutputs?.[i];if(n&&n.length)for(let e=0;e>17&32767}function Rg(e){return(e&2)==2}function zg(e,t){return e&131071|t<<17}function Bg(e){return e|2}function Vg(e){return(e&131068)>>2}function Hg(e,t){return e&-131069|t<<2}function Ug(e){return(e&1)==1}function Wg(e){return e|1}function Gg(e,t,n,r,i,a){let o=a?t.classBindings:t.styleBindings,s=Lg(o),c=Vg(o);e[r]=n;let l=!1,u;if(Array.isArray(n)){let e=n;u=e[1],(u===null||sa(e,u)>0)&&(l=!0)}else u=n;if(i){if(c!==0){let t=Lg(e[s+1]);e[r+1]=Ig(t,s),t!==0&&(e[t+1]=Hg(e[t+1],r)),e[s+1]=zg(e[s+1],r)}else e[r+1]=Ig(s,0),s!==0&&(e[s+1]=Hg(e[s+1],r)),s=r}else e[r+1]=Ig(c,0),s===0?s=r:e[c+1]=Hg(e[c+1],r),c=r;l&&(e[r+1]=Bg(e[r+1])),qg(e,u,r,!0),qg(e,u,r,!1),Kg(t,u,e,r,a),o=Ig(s,c),a?t.classBindings=o:t.styleBindings=o}function Kg(e,t,n,r,i){let a=i?e.residualClasses:e.residualStyles;a!=null&&typeof t==`string`&&sa(a,t)>=0&&(n[r+1]=Wg(n[r+1]))}function qg(e,t,n,r){let i=e[n+1],a=t===null,o=r?Lg(i):Vg(i),s=!1;for(;o!==0&&(s===!1||a);){let n=e[o],i=e[o+1];Jg(n,t)&&(s=!0,e[o+1]=r?Wg(i):Bg(i)),o=r?Lg(i):Vg(i)}s&&(e[n+1]=r?Bg(i):Wg(i))}function Jg(e,t){return e===null||t==null||(Array.isArray(e)?e[1]:e)===t?!0:Array.isArray(e)&&typeof t==`string`?sa(e,t)>=0:!1}var Yg={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function Xg(e){return e.substring(Yg.key,Yg.keyEnd)}function Zg(e){return $g(e),Qg(e,e_(e,0,Yg.textEnd))}function Qg(e,t){let n=Yg.textEnd;return n===t?-1:(t=Yg.keyEnd=t_(e,Yg.key=t,n),e_(e,t,n))}function $g(e){Yg.key=0,Yg.keyEnd=0,Yg.value=0,Yg.valueEnd=0,Yg.textEnd=e.length}function e_(e,t,n){for(;t32;)t++;return t}function n_(e,t,n){return a_(e,t,n,!1),n_}function J(e,t){return a_(e,t,null,!0),J}function r_(e){o_(g_,i_,e,!0)}function i_(e,t){for(let n=Zg(t);n>=0;n=Qg(t,n))aa(e,Xg(t),!0)}function a_(e,t,n,r){let i=D(),a=No(),o=qo(2);if(a.firstUpdatePass&&c_(a,e,o,r),t!==Iu&&Jp(i,o,t)){let s=a.data[us()];v_(a,s,i,i[11],e,i[o+1]=x_(t,n),r,o)}}function o_(e,t,n,r){let i=No(),a=qo(2);i.firstUpdatePass&&c_(i,null,a,r);let o=D();if(n!==Iu&&Jp(o,a,n)){let s=i.data[us()];if(S_(s,r)&&!s_(i,a)){let e=r?s.classesWithoutHost:s.stylesWithoutHost;e!==null&&(n=oi(e,n||``)),vg(i,s,o,n,r)}else __(i,s,o,o[11],o[a+1],o[a+1]=h_(e,t,n),r,a)}}function s_(e,t){return t>=e.expandoStartIndex}function c_(e,t,n,r){let i=e.data;if(i[n+1]===null){let a=i[us()],o=s_(e,n);S_(a,r)&&t===null&&!o&&(t=!1),t=l_(i,a,t,r),Gg(i,a,t,n,o,r)}}function l_(e,t,n,r){let i=Qo(e),a=r?t.residualClasses:t.residualStyles;if(i===null)(r?t.classBindings:t.styleBindings)===0&&(n=p_(null,e,t,n,r),n=m_(n,t.attrs,r),a=null);else{let o=t.directiveStylingLast;if(o===-1||e[o]!==i){if(n=p_(i,e,t,n,r),a===null){let n=u_(e,t,r);n!==void 0&&Array.isArray(n)&&(n=p_(null,e,t,n[1],r),n=m_(n,t.attrs,r),d_(e,t,r,n))}else a=f_(e,t,r)}}return a!==void 0&&(r?t.residualClasses=a:t.residualStyles=a),n}function u_(e,t,n){let r=n?t.classBindings:t.styleBindings;if(Vg(r)!==0)return e[Lg(r)]}function d_(e,t,n,r){let i=n?t.classBindings:t.styleBindings;e[Lg(i)]=r}function f_(e,t,n){let r,i=t.directiveEnd;for(let a=1+t.directiveStylingLast;a0;){let t=e[i],a=Array.isArray(t),c=a?t[1]:t,l=c===null,u=n[i+1];u===Iu&&(u=l?ua:void 0);let d=l?oa(u,r):c===r?u:void 0;if(a&&!b_(d)&&(d=oa(t,r)),b_(d)&&(s=d,o))return s;let f=e[i+1];i=o?Lg(f):Vg(f)}if(t!==null){let e=a?t.residualClasses:t.residualStyles;e!=null&&(s=oa(e,r))}return s}function b_(e){return e!==void 0}function x_(e,t){return e==null||e===``||(typeof t==`string`?e=nu(e)+t:typeof e==`object`&&(e=ai(nu(e)))),e}function S_(e,t){return!!(e.flags&(t?8:16))}function Y(e,t=``){let n=D(),r=No(),i=e+27,a=r.firstCreatePass?Ap(r,i,1,t,null):r.data[i],o=C_(r,n,a,t);n[i]=o,vs()&&nf(r,n,o,a),Lo(a,!1)}var C_=(e,t,n,r)=>(ys(!0),su(t[11],r));function w_(e,t,n,r=``){return Jp(e,Ko(),n)?t+Ai(n)+r:Iu}function T_(e,t,n,r,i,a=``){let o=Yp(e,Wo(),n,i);return qo(2),o?t+Ai(n)+r+Ai(i)+a:Iu}function E_(e,t,n,r,i,a,o,s=``){let c=Xp(e,Wo(),n,i,o);return qo(3),c?t+Ai(n)+r+Ai(i)+a+Ai(o)+s:Iu}function D_(e,t,n,r,i,a,o,s,c,l=``){let u=Zp(e,Wo(),n,i,o,c);return qo(4),u?t+Ai(n)+r+Ai(i)+a+Ai(o)+s+Ai(c)+l:Iu}function X(e){return Z(``,e),X}function Z(e,t,n){let r=D(),i=w_(r,e,t,n);return i!==Iu&&j_(r,us(),i),Z}function O_(e,t,n,r,i){let a=D(),o=T_(a,e,t,n,r,i);return o!==Iu&&j_(a,us(),o),O_}function k_(e,t,n,r,i,a,o){let s=D(),c=E_(s,e,t,n,r,i,a,o);return c!==Iu&&j_(s,us(),c),k_}function A_(e,t,n,r,i,a,o,s,c){let l=D(),u=D_(l,e,t,n,r,i,a,o,s,c);return u!==Iu&&j_(l,us(),u),A_}function j_(e,t,n){let r=no(t,e);cu(e[11],r,n)}function M_(e,t,n){yc(t)&&(t=t());let r=D();return Jp(r,Ko(),t)&&(No(),kf(fs(),r,e,t,r[11],n)),M_}function N_(e,t){let n=yc(e);return n&&e.set(t),n}function P_(e,t){let n=D(),r=No(),i=Po();return Mg(r,n,n[11],i,e,t),P_}var F_={};function I_(e){yd(`NgLet`);let t=No(),n=D(),r=e+27;return Lo(Ap(t,r,128,null,null),!1),oo(t,n,r,F_),I_}function L_(e){return oo(No(),D(),us(),e),e}function R_(e){let t=ao(Bo(),27+e);if(t===F_)throw new T(314,!1);return t}function z_(e,t){let n=Uo()+e,r=D();return r[n]===Iu?Kp(r,n,t()):qp(r,n)}function B_(e,t){let n=e[t];return n===Iu?void 0:n}function V_(e,t,n,r,i,a){let o=t+n;return Jp(e,o,i)?Kp(e,o+1,a?r.call(a,i):r(i)):B_(e,o+1)}function H_(e,t,n,r,i,a,o){let s=t+n;return Yp(e,s,i,a)?Kp(e,s+2,o?r.call(o,i,a):r(i,a)):B_(e,s+2)}function U_(e,t){let n=No(),r,i=e+27;n.firstCreatePass?(r=W_(t,n.pipeRegistry),n.data[i]=r,r.onDestroy&&(n.destroyHooks??=[]).push(i,r.onDestroy)):r=n.data[i];let a=r.factory||(r.factory=Qi(r.type,!0)),o=Bi(cm);try{let e=Zc(!1),t=a();return Zc(e),oo(n,D(),i,t),t}finally{Bi(o)}}function W_(e,t){if(t)for(let n=t.length-1;n>=0;n--){let r=t[n];if(e===r.name)return r}}function G_(e,t,n){let r=e+27,i=D(),a=ao(i,r);return q_(i,r)?V_(i,Uo(),t,a.transform,n,a):a.transform(n)}function K_(e,t,n,r){let i=e+27,a=D(),o=ao(a,i);return q_(a,i)?H_(a,Uo(),t,o.transform,n,r,o):o.transform(n,r)}function q_(e,t){return e[1].data[t].pure}var J_=(()=>{class e{applicationErrorHandler=E(Ys);appRef=E(qh);taskService=E(Os);ngZone=E(Is);zonelessEnabled=E(oc);tracing=E(_d,{optional:!0});zoneIsDefined=typeof Zone<`u`&&!!Zone.root.run;schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}];subscriptions=new hr;angularZoneId=this.zoneIsDefined?this.ngZone._inner?.get(Ps):null;scheduleInRootZone=!this.zonelessEnabled&&this.zoneIsDefined&&(E(sc,{optional:!0})??!1);cancelScheduledCallback=null;useMicrotaskScheduler=!1;runningTick=!1;pendingRenderTaskId=null;constructor(){this.subscriptions.add(this.appRef.afterTick.subscribe(()=>{let e=this.taskService.add();if(!this.runningTick&&(this.cleanup(),!this.zonelessEnabled||this.appRef.includeAllTestViews)){this.taskService.remove(e);return}this.switchToMicrotaskScheduler(),this.taskService.remove(e)})),this.subscriptions.add(this.ngZone.onUnstable.subscribe(()=>{this.runningTick||this.cleanup()}))}switchToMicrotaskScheduler(){this.ngZone.runOutsideAngular(()=>{let e=this.taskService.add();this.useMicrotaskScheduler=!0,queueMicrotask(()=>{this.useMicrotaskScheduler=!1,this.taskService.remove(e)})})}notify(e){if(!this.zonelessEnabled&&e===5)return;switch(e){case 0:case 2:this.appRef.dirtyFlags|=2;break;case 3:case 4:case 5:case 1:this.appRef.dirtyFlags|=4;break;case 6:this.appRef.dirtyFlags|=2;break;case 12:this.appRef.dirtyFlags|=16;break;case 13:this.appRef.dirtyFlags|=2;break;case 11:break;default:this.appRef.dirtyFlags|=8}if(this.appRef.tracingSnapshot=this.tracing?.snapshot(this.appRef.tracingSnapshot)??null,!this.shouldScheduleTick())return;let t=this.useMicrotaskScheduler?Ms:js;this.pendingRenderTaskId=this.taskService.add(),this.cancelScheduledCallback=this.scheduleInRootZone?Zone.root.run(()=>t(()=>this.tick())):this.ngZone.runOutsideAngular(()=>t(()=>this.tick()))}shouldScheduleTick(){return!(this.appRef.destroyed||this.pendingRenderTaskId!==null||this.runningTick||this.appRef._runningTick||!this.zonelessEnabled&&this.zoneIsDefined&&Zone.current.get(`isAngularZone_ID`+this.angularZoneId))}tick(){if(this.runningTick||this.appRef.destroyed)return;if(this.appRef.dirtyFlags===0){this.cleanup();return}!this.zonelessEnabled&&this.appRef.dirtyFlags&7&&(this.appRef.dirtyFlags|=1);let e=this.taskService.add();try{this.ngZone.run(()=>{this.runningTick=!0,this.appRef._tick()},void 0,this.schedulerTickApplyArgs)}catch(e){this.applicationErrorHandler(e)}finally{this.taskService.remove(e),this.cleanup()}}ngOnDestroy(){this.subscriptions.unsubscribe(),this.cleanup()}cleanup(){if(this.runningTick=!1,this.cancelScheduledCallback?.(),this.cancelScheduledCallback=null,this.pendingRenderTaskId!==null){let e=this.pendingRenderTaskId;this.pendingRenderTaskId=null,this.taskService.remove(e)}}static ɵfac=function(t){return new(t||e)};static ɵprov=Sl({token:e,factory:e.ɵfac})}return e})();function Y_(){return[{provide:ac,useExisting:J_},{provide:Is,useClass:Ws},{provide:oc,useValue:!0}]}function X_(){return typeof $localize<`u`&&$localize.locale||`en-US`}var Z_=new vi(``,{factory:()=>E(Z_,{optional:!0,skipSelf:!0})||X_()}),Q_=class{destroyed=!1;listeners=null;errorHandler=E(Js,{optional:!0});isEmitting=!1;hasNullListeners=!1;destroyRef=E(ws);constructor(){this.destroyRef.onDestroy(()=>{this.destroyed=!0,this.listeners=null})}subscribe(e){if(this.destroyed)throw new T(953,!1);return(this.listeners??=[]).push(e),{unsubscribe:()=>{let t=this.listeners?this.listeners.indexOf(e):-1;t>-1&&(this.isEmitting?(this.hasNullListeners=!0,this.listeners[t]=null):this.listeners.splice(t,1))}}}emit(e){if(this.destroyed){console.warn(ri(953,!1));return}if(this.listeners===null)return;this.isEmitting=!0;let t=w(null);try{for(let t of this.listeners)try{t!==null&&t(e)}catch(e){this.errorHandler?.handleError(e)}}finally{this.hasNullListeners&&(this.hasNullListeners=!1,this.listeners&&$_(this.listeners)),w(t),this.isEmitting=!1}}};function $_(e){let t=e.length-1;for(;t>-1;)e[t]===null&&e.splice(t,1),t--}function Q(e,t){return Mn(e,t?.equal)}function ev(e){return ar(e)}(class e extends Error{_brand;constructor(e){super(e)}static IDLE=new e(`IDLE`);static LOADING=new e(`LOADING`)});var tv=e=>e;function nv(e,t){return typeof e==`function`?rv(tr(e,tv,t?.equal),t?.debugName,t?.set):rv(tr(e.source,e.computation,e.equal),e.debugName,e.set)}function rv(e,t,n){let r=e[dn],i=e;if(n!==void 0){let t=e=>nr(r,e);i.set=e=>n(e,t),i.update=r=>n(r(ev(e)),t)}else i.set=e=>nr(r,e),i.update=e=>rr(r,e);return i.asReadonly=Zs.bind(e),i}function iv(e,t){let n=Object.create(xc);n.value=e,n.transformFn=t?.transform;function r(){if(mn(n),n.value===bc)throw new T(-950,null);return n.value}return r[dn]=n,r}function av(e){return new Q_}function ov(e,t){return iv(e,t)}function sv(e){return iv(bc,e)}var $=(ov.required=sv,ov);function cv(e,t){let n=Object.create(xc),r=new Q_;n.value=e;function i(){return mn(n),lv(n.value),n.value}return i[dn]=n,i.asReadonly=Zs.bind(i),i.set=e=>{n.equal(n.value,e)||(Wn(n,e),r.emit(e))},i.update=e=>{lv(n.value),i.set(e(n.value))},i.subscribe=r.subscribe.bind(r),i.destroyRef=r.destroyRef,i}function lv(e){if(e===bc)throw new T(952,!1)}function uv(e,t){return cv(e,t)}function dv(e){return cv(bc,e)}var fv=(uv.required=dv,uv);function pv(e,t){return vh(t)}function mv(e,t){return yh(t)}var hv=(pv.required=mv,pv),gv=new vi(``),_v=new vi(``);function vv(e){return!e.moduleRef}function yv(e){let t=vv(e)?e.r3Injector:e.moduleRef.injector,n=t.get(Is);return n.run(()=>{vv(e)?e.r3Injector.resolveInjectorInitializers():e.moduleRef.resolveInjectorInitializers();let r=t.get(Ys),i;if(n.runOutsideAngular(()=>{i=n.onError.subscribe({next:r})}),vv(e)){let n=()=>t.destroy(),r=e.platformInjector.get(gv);r.add(n),t.onDestroy(()=>{i.unsubscribe(),r.delete(n)})}else{let t=()=>e.moduleRef.destroy(),n=e.platformInjector.get(gv);n.add(t),e.moduleRef.onDestroy(()=>{Yh(e.allPlatformModules,e.moduleRef),i.unsubscribe(),n.delete(t)})}return xv(r,n,()=>{let n=t.get(Os),r=n.add(),i=t.get(Rh);return i.runInitializers(),i.donePromise.then(()=>{if(jg(t.get(Z_,Ag)||`en-US`),!t.get(_v,!0))return vv(e)?t.get(qh):(e.allPlatformModules.push(e.moduleRef),e.moduleRef);if(vv(e)){let n=t.get(qh);return e.rootComponent!==void 0&&n.bootstrap(e.rootComponent),n}return bv?.(e.moduleRef,e.allPlatformModules),e.moduleRef}).finally(()=>void n.remove(r))})})}var bv;function xv(e,t,n){try{let r=n();return Sh(r)?r.catch(n=>{throw t.runOutsideAngular(()=>e(n)),n}):r}catch(n){throw t.runOutsideAngular(()=>e(n)),n}}var Sv=null;function Cv(e=[],t){return Ss.create({name:t,providers:[{provide:Ta,useValue:`platform`},{provide:gv,useValue:new Set([()=>Sv=null])},...e]})}function wv(e=[]){if(Sv)return Sv;let t=Cv(e);return Sv=t,Gh(),Tv(t),t}function Tv(e){let t=e.get(ec,null);Ha(e,()=>{t?.forEach(e=>e())})}function Ev(e){let{rootComponent:t,appProviders:n,platformProviders:r,platformRef:i}=e;Oc(Cc.BootstrapApplicationStart);try{let e=i?.injector??wv(r);return yv({r3Injector:new Th({providers:[Y_(),Xs,...n||[]],parent:e,debugName:``,runEnvironmentInitializers:!1}).injector,platformInjector:e,rootComponent:t})}catch(e){return Promise.reject(e)}finally{Oc(Cc.BootstrapApplicationEnd)}}var Dv=Symbol(`NOT_SET`),Ov=new Set,kv={...Kn,kind:`afterRenderEffectPhase`,consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!0,value:Dv,cleanup:null,consumerMarkedDirty(){if(this.sequence.impl.executing){if(this.sequence.lastPhase===null||this.sequence.lastPhase(mn(r),r.value),r.signal[dn]=r,r.registerCleanupFn=e=>(r.cleanup??=new Set).add(e),this.nodes[e]=r,this.hooks[e]=e=>r.phaseFn(e)}}afterRun(){super.afterRun(),this.lastPhase=null}destroy(){if(this.onDestroyFns!==null)for(let e of this.onDestroyFns)e();super.destroy();for(let e of this.nodes)if(e)try{for(let t of e.cleanup??Ov)t()}finally{En(e)}}};function jv(e,t){let n=t?.injector??E(Ss),r=n.get(ac),i=n.get(bd),a=n.get(_d,null,{optional:!0});i.impl??=n.get(Sd);let o=e;typeof o==`function`&&(o={mixedReadWrite:e});let s=n.get(rc,null,{optional:!0}),c=new Av(i.impl,[o.earlyRead,o.write,o.mixedReadWrite,o.read],s?.view,r,n,a?.snapshot(null));return i.impl.register(c),c}var Mv=null;function Nv(){return Mv}function Pv(e){Mv??=e}var Fv=class{},Iv=(function(e){return e[e.Format=0]=`Format`,e[e.Standalone=1]=`Standalone`,e})(Iv||{}),Lv=(function(e){return e[e.Narrow=0]=`Narrow`,e[e.Abbreviated=1]=`Abbreviated`,e[e.Wide=2]=`Wide`,e[e.Short=3]=`Short`,e})(Lv||{}),Rv=(function(e){return e[e.Short=0]=`Short`,e[e.Medium=1]=`Medium`,e[e.Long=2]=`Long`,e[e.Full=3]=`Full`,e})(Rv||{}),zv={Decimal:0,Group:1,List:2,PercentSign:3,PlusSign:4,MinusSign:5,Exponential:6,SuperscriptingExponent:7,PerMille:8,Infinity:9,NaN:10,TimeSeparator:11,CurrencyDecimal:12,CurrencyGroup:13};function Bv(e){return Eg(e)[Og.LocaleId]}function Vv(e,t,n){let r=Eg(e);return Qv(Qv([r[Og.DayPeriodsFormat],r[Og.DayPeriodsStandalone]],t),n)}function Hv(e,t,n){let r=Eg(e);return Qv(Qv([r[Og.DaysFormat],r[Og.DaysStandalone]],t),n)}function Uv(e,t,n){let r=Eg(e);return Qv(Qv([r[Og.MonthsFormat],r[Og.MonthsStandalone]],t),n)}function Wv(e,t){let n=Eg(e)[Og.Eras];return Qv(n,t)}function Gv(e,t){return Qv(Eg(e)[Og.DateFormat],t)}function Kv(e,t){return Qv(Eg(e)[Og.TimeFormat],t)}function qv(e,t){let n=Eg(e)[Og.DateTimeFormat];return Qv(n,t)}function Jv(e,t){let n=Eg(e),r=n[Og.NumberSymbols][t];if(r===void 0){if(t===zv.CurrencyDecimal)return n[Og.NumberSymbols][zv.Decimal];if(t===zv.CurrencyGroup)return n[Og.NumberSymbols][zv.Group]}return r}function Yv(e){if(!e[Og.ExtraData])throw new T(2303,!1)}function Xv(e){let t=Eg(e);return Yv(t),(t[Og.ExtraData][2]||[]).map(e=>typeof e==`string`?$v(e):[$v(e[0]),$v(e[1])])}function Zv(e,t,n){let r=Eg(e);return Yv(r),Qv(Qv([r[Og.ExtraData][0],r[Og.ExtraData][1]],t)||[],n)||[]}function Qv(e,t){for(let n=t;n>-1;n--)if(e[n]!==void 0)return e[n];throw new T(2304,!1)}function $v(e){let[t,n]=e.split(`:`);return{hours:+t,minutes:+n}}var ey=/^(\d{4,})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,ty=Object.create(null),ny=/((?:[^BEGHLMOSWYZabcdhmswyz']+)|(?:'(?:[^']|'')*')|(?:G{1,5}|y{1,4}|Y{1,4}|M{1,5}|L{1,5}|w{1,2}|W{1}|d{1,2}|E{1,6}|c{1,6}|a{1,5}|b{1,5}|B{1,5}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|S{1,3}|z{1,4}|Z{1,5}|O{1,4}))([\s\S]*)/,ry=256;function iy(e,t,n,r){let i=Dy(e);ay(t),t=sy(n,t)||t;let a=[],o;for(;t;)if(o=ny.exec(t),o){a=a.concat(o.slice(1));let e=a.pop();if(!e)break;t=e}else{a.push(t);break}let s=i.getTimezoneOffset();r&&(s=wy(r,s),i=Ey(i,r));let c=``;return a.forEach(e=>{let t=Cy(e);c+=t?t(i,n,s):e===`''`?`'`:e.replace(/(^'|'$)/g,``).replace(/''/g,`'`)}),c}function ay(e){if(e.length>ry)throw new T(2300,!1)}function oy(e,t,n){let r=new Date(0);return r.setFullYear(e,t,n),r.setHours(0,0,0),r}function sy(e,t){let n=Bv(e);if(ty[n]??=Object.create(null),ty[n][t])return ty[n][t];let r=``;switch(t){case`shortDate`:r=Gv(e,Rv.Short);break;case`mediumDate`:r=Gv(e,Rv.Medium);break;case`longDate`:r=Gv(e,Rv.Long);break;case`fullDate`:r=Gv(e,Rv.Full);break;case`shortTime`:r=Kv(e,Rv.Short);break;case`mediumTime`:r=Kv(e,Rv.Medium);break;case`longTime`:r=Kv(e,Rv.Long);break;case`fullTime`:r=Kv(e,Rv.Full);break;case`short`:let t=sy(e,`shortTime`),n=sy(e,`shortDate`);r=cy(qv(e,Rv.Short),[t,n]);break;case`medium`:let i=sy(e,`mediumTime`),a=sy(e,`mediumDate`);r=cy(qv(e,Rv.Medium),[i,a]);break;case`long`:let o=sy(e,`longTime`),s=sy(e,`longDate`);r=cy(qv(e,Rv.Long),[o,s]);break;case`full`:let c=sy(e,`fullTime`),l=sy(e,`fullDate`);r=cy(qv(e,Rv.Full),[c,l])}return r&&(ty[n][t]=r),r}function cy(e,t){return t&&(e=e.replace(/\{([^}]+)}/g,function(e,n){return Object.hasOwn(t,n)?t[n]:e})),e}function ly(e,t,n=`-`,r,i){let a=``;(e<0||i&&e<=0)&&(i?e=-e+1:(e=-e,a=n));let o=String(e);for(;o.length0||s>-n)&&(s+=n),e===3)s===0&&n===-12&&(s=12);else if(e===6)return uy(s,t);let c=Jv(o,zv.MinusSign);return ly(s,t,c,r,i)}}function fy(e,t){switch(e){case 0:return t.getFullYear();case 1:return t.getMonth();case 2:return t.getDate();case 3:return t.getHours();case 4:return t.getMinutes();case 5:return t.getSeconds();case 6:return t.getMilliseconds();case 7:return t.getDay();default:throw new T(2301,!1)}}function py(e,t,n=Iv.Format,r=!1){return function(i,a){return my(i,a,e,t,n,r)}}function my(e,t,n,r,i,a){switch(n){case 2:return Uv(t,i,r)[e.getMonth()];case 1:return Hv(t,i,r)[e.getDay()];case 0:let n=e.getHours(),o=e.getMinutes();if(a){let e=Xv(t),a=Zv(t,i,r),s=e.findIndex(e=>{if(Array.isArray(e)){let[t,r]=e,i=n>=t.hours&&o>=t.minutes,a=n0?Math.floor(i/60):Math.ceil(i/60);switch(e){case 0:return(i>=0?`+`:``)+ly(o,2,a)+ly(Math.abs(i%60),2,a);case 1:return`GMT`+(i>=0?`+`:``)+ly(o,1,a);case 2:return`GMT`+(i>=0?`+`:``)+ly(o,2,a)+`:`+ly(Math.abs(i%60),2,a);case 3:return r===0?`Z`:(i>=0?`+`:``)+ly(o,2,a)+`:`+ly(Math.abs(i%60),2,a);default:throw new T(2310,!1)}}}var gy=0,_y=4;function vy(e){let t=oy(e,gy,1).getDay();return oy(e,0,1+(t<=_y?_y:11)-t)}function yy(e){let t=e.getDay(),n=t===0?-3:_y-t;return oy(e.getFullYear(),e.getMonth(),e.getDate()+n)}function by(e,t=!1){return function(n,r){let i;if(t){let e=new Date(n.getFullYear(),n.getMonth(),1).getDay()-1,t=n.getDate();i=1+Math.floor((t+e)/7)}else{let e=yy(n),t=vy(e.getFullYear()),r=e.getTime()-t.getTime();i=1+Math.round(r/6048e5)}return ly(i,e,Jv(r,zv.MinusSign))}}function xy(e,t=!1){return function(n,r){return ly(yy(n).getFullYear(),e,Jv(r,zv.MinusSign),t)}}var Sy=Object.create(null);function Cy(e){if(Sy[e])return Sy[e];let t;switch(e){case`G`:case`GG`:case`GGG`:t=py(3,Lv.Abbreviated);break;case`GGGG`:t=py(3,Lv.Wide);break;case`GGGGG`:t=py(3,Lv.Narrow);break;case`y`:t=dy(0,1,0,!1,!0);break;case`yy`:t=dy(0,2,0,!0,!0);break;case`yyy`:t=dy(0,3,0,!1,!0);break;case`yyyy`:t=dy(0,4,0,!1,!0);break;case`Y`:t=xy(1);break;case`YY`:t=xy(2,!0);break;case`YYY`:t=xy(3);break;case`YYYY`:t=xy(4);break;case`M`:case`L`:t=dy(1,1,1);break;case`MM`:case`LL`:t=dy(1,2,1);break;case`MMM`:t=py(2,Lv.Abbreviated);break;case`MMMM`:t=py(2,Lv.Wide);break;case`MMMMM`:t=py(2,Lv.Narrow);break;case`LLL`:t=py(2,Lv.Abbreviated,Iv.Standalone);break;case`LLLL`:t=py(2,Lv.Wide,Iv.Standalone);break;case`LLLLL`:t=py(2,Lv.Narrow,Iv.Standalone);break;case`w`:t=by(1);break;case`ww`:t=by(2);break;case`W`:t=by(1,!0);break;case`d`:t=dy(2,1);break;case`dd`:t=dy(2,2);break;case`c`:case`cc`:t=dy(7,1);break;case`ccc`:t=py(1,Lv.Abbreviated,Iv.Standalone);break;case`cccc`:t=py(1,Lv.Wide,Iv.Standalone);break;case`ccccc`:t=py(1,Lv.Narrow,Iv.Standalone);break;case`cccccc`:t=py(1,Lv.Short,Iv.Standalone);break;case`E`:case`EE`:case`EEE`:t=py(1,Lv.Abbreviated);break;case`EEEE`:t=py(1,Lv.Wide);break;case`EEEEE`:t=py(1,Lv.Narrow);break;case`EEEEEE`:t=py(1,Lv.Short);break;case`a`:case`aa`:case`aaa`:t=py(0,Lv.Abbreviated);break;case`aaaa`:t=py(0,Lv.Wide);break;case`aaaaa`:t=py(0,Lv.Narrow);break;case`b`:case`bb`:case`bbb`:t=py(0,Lv.Abbreviated,Iv.Standalone,!0);break;case`bbbb`:t=py(0,Lv.Wide,Iv.Standalone,!0);break;case`bbbbb`:t=py(0,Lv.Narrow,Iv.Standalone,!0);break;case`B`:case`BB`:case`BBB`:t=py(0,Lv.Abbreviated,Iv.Format,!0);break;case`BBBB`:t=py(0,Lv.Wide,Iv.Format,!0);break;case`BBBBB`:t=py(0,Lv.Narrow,Iv.Format,!0);break;case`h`:t=dy(3,1,-12);break;case`hh`:t=dy(3,2,-12);break;case`H`:t=dy(3,1);break;case`HH`:t=dy(3,2);break;case`m`:t=dy(4,1);break;case`mm`:t=dy(4,2);break;case`s`:t=dy(5,1);break;case`ss`:t=dy(5,2);break;case`S`:t=dy(6,1);break;case`SS`:t=dy(6,2);break;case`SSS`:t=dy(6,3);break;case`Z`:case`ZZ`:case`ZZZ`:t=hy(0);break;case`ZZZZZ`:t=hy(3);break;case`O`:case`OO`:case`OOO`:case`z`:case`zz`:case`zzz`:t=hy(1);break;case`OOOO`:case`ZZZZ`:case`zzzz`:t=hy(2);break;default:return null}return Sy[e]=t,t}function wy(e,t){e=e.replace(/:/g,``);let n=Date.parse(`Jan 01, 1970 00:00:00 `+e)/6e4;return isNaN(n)?t:n}function Ty(e,t){return e=new Date(e.getTime()),e.setMinutes(e.getMinutes()+t),e}function Ey(e,t,n){let r=e.getTimezoneOffset();return Ty(e,-1*(wy(t,r)-r))}function Dy(e){if(ky(e))return e;if(typeof e==`number`&&!isNaN(e))return new Date(e);if(typeof e==`string`){if(e=e.trim(),/^(\d{4}(-\d{1,2}(-\d{1,2})?)?)$/.test(e)){let[t,n=1,r=1]=e.split(`-`).map(e=>+e);return oy(t,n-1,r)}let t=parseFloat(e);if(!isNaN(e-t))return new Date(t);let n;if(n=e.match(ey))return Oy(n)}let t=new Date(e);if(!ky(t))throw new T(2311,!1);return t}function Oy(e){let t=new Date(0),n=0,r=0,i=e[8]?t.setUTCFullYear:t.setFullYear,a=e[8]?t.setUTCHours:t.setHours;e[9]&&(n=Number(e[9]+e[10]),r=Number(e[9]+e[11])),i.call(t,Number(e[1]),Number(e[2])-1,Number(e[3]));let o=Number(e[4]||0)-n,s=Number(e[5]||0)-r,c=Number(e[6]||0),l=Math.floor(parseFloat(`0.`+(e[7]||0))*1e3);return a.call(t,o,s,c,l),t}function ky(e){return e instanceof Date&&!isNaN(e.valueOf())}function Ay(e,t){return new T(2100,!1)}var jy=`mediumDate`,My=new vi(``),Ny=new vi(``),Py=(()=>{class e{locale;defaultTimezone;defaultOptions;constructor(e,t,n){this.locale=e,this.defaultTimezone=t,this.defaultOptions=n}transform(t,n,r,i){if(t==null||t===``||t!==t)return null;try{let e=n??this.defaultOptions?.dateFormat??jy,a=r??this.defaultOptions?.timezone??this.defaultTimezone??void 0;return iy(t,e,i||this.locale,a)}catch(t){throw Ay(e,t.message)}}static ɵfac=function(t){return new(t||e)(cm(Z_,16),cm(My,24),cm(Ny,24))};static ɵpipe=Mh({name:`date`,type:e,pure:!0})}return e})(),Fy=(()=>{class e{transform(e){return JSON.stringify(e,null,2)}static ɵfac=function(t){return new(t||e)};static ɵpipe=Mh({name:`json`,type:e,pure:!1})}return e})();function Iy(e,t){t=encodeURIComponent(t);for(let n of e.split(`;`)){let e=n.indexOf(`=`),[r,i]=e==-1?[n,``]:[n.slice(0,e),n.slice(e+1)];if(r.trim()!==t)continue;let a=i;try{a=decodeURIComponent(i)}catch{}return a.length>1&&a[0]===`"`&&a[a.length-1]===`"`&&(a=a.slice(1,-1)),a}return null}var Ly=`browser`,Ry=class{_doc;constructor(e){this._doc=e}manager},zy=(()=>{class e extends Ry{constructor(e){super(e)}supports(e){return!0}addEventListener(e,t,n,r){return e.addEventListener(t,n,r),()=>this.removeEventListener(e,t,n,r)}removeEventListener(e,t,n,r){return e.removeEventListener(t,n,r)}static ɵfac=function(t){return new(t||e)(qi(Cs))};static ɵprov=di({token:e,factory:e.ɵfac})}return e})(),By=new vi(``),Vy=(()=>{class e{_zone;_plugins;_eventNameToPlugin=new Map;constructor(e,t){this._zone=t,e.forEach(e=>{e.manager=this});let n=e.filter(e=>!(e instanceof zy));this._plugins=n.slice().reverse();let r=e.find(e=>e instanceof zy);r&&this._plugins.push(r)}addEventListener(e,t,n,r){return this._findPluginFor(t).addEventListener(e,t,n,r)}getZone(){return this._zone}_findPluginFor(e){let t=this._eventNameToPlugin.get(e);if(t)return t;if(t=this._plugins.find(t=>t.supports(e)),!t)throw new T(-5101,!1);return this._eventNameToPlugin.set(e,t),t}static ɵfac=function(t){return new(t||e)(qi(By),qi(Is))};static ɵprov=di({token:e,factory:e.ɵfac})}return e})(),Hy=`ng-app-id`;function Uy(e){for(let t of e)t.remove()}function Wy(e,t){let n=t.createElement(`style`);return n.textContent=e,n}function Gy(e,t,n,r){let i=e.head?.querySelectorAll(`style[${Hy}="${t}"],link[${Hy}="${t}"]`);if(!i||i.length===0)return!1;for(let e of i)e.removeAttribute(Hy),e instanceof HTMLLinkElement?r.set(e.href.slice(e.href.lastIndexOf(`/`)+1),{usage:0,elements:[e]}):e.textContent&&n.set(e.textContent,{usage:0,elements:[e]});return!0}function Ky(e,t){let n=t.createElement(`link`);return n.setAttribute(`rel`,`stylesheet`),n.setAttribute(`href`,e),n}var qy=(()=>{class e{doc;appId;nonce;inline=new Map;external=new Map;hosts=new Set;constructor(e,t,n,r={}){this.doc=e,this.appId=t,this.nonce=n,Gy(e,t,this.inline,this.external)&&this.hosts.add(e.head)}addStyles(e,t){for(let t of e)this.addUsage(t,this.inline,Wy);t?.forEach(e=>this.addUsage(e,this.external,Ky))}removeStyles(e,t){for(let t of e)this.removeUsage(t,this.inline);t?.forEach(e=>this.removeUsage(e,this.external))}addUsage(e,t,n){let r=t.get(e);r?r.usage++:t.set(e,{usage:1,elements:[...this.hosts].map(t=>this.addElement(t,n(e,this.doc)))})}removeUsage(e,t){let n=t.get(e);n&&(n.usage--,n.usage<=0&&(Uy(n.elements),t.delete(e)))}ngOnDestroy(){for(let[,{elements:e}]of[...this.inline,...this.external])Uy(e);this.hosts.clear()}addHost(e){if(!this.hosts.has(e)){this.hosts.add(e);for(let[t,{elements:n}]of this.inline)n.push(this.addElement(e,Wy(t,this.doc)));for(let[t,{elements:n}]of this.external)n.push(this.addElement(e,Ky(t,this.doc)))}}removeHost(e){this.hosts.delete(e);for(let t of[...this.inline.values(),...this.external.values()]){let n=[];for(let r of t.elements)r.parentNode===e?r.remove():n.push(r);t.elements=n}}addElement(e,t){return this.nonce&&t.setAttribute(`nonce`,this.nonce),e.appendChild(t)}static ɵfac=function(t){return new(t||e)(qi(Cs),qi(Qs),qi(nc,8),qi(tc))};static ɵprov=di({token:e,factory:e.ɵfac})}return e})(),Jy={svg:`http://www.w3.org/2000/svg`,xhtml:`http://www.w3.org/1999/xhtml`,xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`,xmlns:`http://www.w3.org/2000/xmlns/`,math:`http://www.w3.org/1998/Math/MathML`},Yy=/%COMP%/g,Xy=`%COMP%`,Zy=`_nghost-${Xy}`,Qy=`_ngcontent-${Xy}`,$y=!0,eb=new vi(``,{factory:()=>$y}),tb=new vi(``);function nb(e){return Qy.replace(Yy,e)}function rb(e){return Zy.replace(Yy,e)}function ib(e,t){return t.map(t=>t.replace(Yy,e))}var ab=(()=>{class e{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;ngZone;nonce;tracingService;rendererByCompId=new Map;defaultRenderer;cssVarNamespace;constructor(e,t,n,r,i,a,o=null,s=null,c=null){this.eventManager=e,this.sharedStylesHost=t,this.appId=n,this.removeStylesOnCompDestroy=r,this.doc=i,this.ngZone=a,this.nonce=o,this.tracingService=s,this.cssVarNamespace=c??``,this.defaultRenderer=new ob(e,i,a,this.tracingService,this.cssVarNamespace)}createRenderer(e,t){if(!e||!t)return this.defaultRenderer;let n=this.getOrCreateRenderer(e,t);return n instanceof ub?n.applyToHost(e):n instanceof lb&&n.applyStyles(),n}getOrCreateRenderer(e,t){let n=this.rendererByCompId,r=n.get(t.id);if(!r){let i=this.doc,a=this.ngZone,o=this.eventManager,s=this.sharedStylesHost,c=this.removeStylesOnCompDestroy,l=this.tracingService;switch(t.encapsulation){case eu.Emulated:r=new ub(o,s,t,this.appId,c,i,a,l,this.cssVarNamespace);break;case eu.ShadowDom:return new cb(o,e,t,i,a,this.nonce,l,this.cssVarNamespace,s);case eu.ExperimentalIsolatedShadowDom:return new cb(o,e,t,i,a,this.nonce,l,this.cssVarNamespace);default:r=new lb(o,s,t,c,i,a,l,this.cssVarNamespace)}n.set(t.id,r)}return r}ngOnDestroy(){this.rendererByCompId.clear()}componentReplaced(e){this.rendererByCompId.delete(e)}static ɵfac=function(t){return new(t||e)(qi(Vy),qi(om),qi(Qs),qi(eb),qi(Cs),qi(Is),qi(nc),qi(_d,8),qi(tb,8))};static ɵprov=di({token:e,factory:e.ɵfac})}return e})(),ob=class{eventManager;doc;ngZone;tracingService;cssVarNamespace;data=Object.create(null);throwOnSyntheticProps=!0;constructor(e,t,n,r,i=``){this.eventManager=e,this.doc=t,this.ngZone=n,this.tracingService=r,this.cssVarNamespace=i}destroy(){}destroyNode=null;createElement(e,t){return t?this.doc.createElementNS(Jy[t]||t,e):this.doc.createElement(e)}createComment(e){return this.doc.createComment(e)}createText(e){return this.doc.createTextNode(e)}appendChild(e,t){(sb(e)?e.content:e).appendChild(t)}insertBefore(e,t,n){if(e){let r=sb(e)?e.content:e;if(n!=null&&n.parentNode!==r)throw new T(-5106,!1);r.insertBefore(t,n)}}removeChild(e,t){t.remove()}selectRootElement(e,t){let n=typeof e==`string`?this.doc.querySelector(e):e;if(!n)throw new T(-5104,!1);return t||(n.textContent=``),n}parentNode(e){return e.parentNode}nextSibling(e){return e.nextSibling}setAttribute(e,t,n,r){if(r){t=r+`:`+t;let i=Jy[r];i?e.setAttributeNS(i,t,n):e.setAttribute(t,n)}else e.setAttribute(t,n)}removeAttribute(e,t,n){if(n){let r=Jy[n];r?e.removeAttributeNS(r,t):e.removeAttribute(`${n}:${t}`)}else e.removeAttribute(t)}addClass(e,t){e.classList.add(t)}removeClass(e,t){e.classList.remove(t)}setStyle(e,t,n,r){let i=t.startsWith(`--`);i&&(t=t.replace(`%NS%`,this.cssVarNamespace)),i||r&(Lu.DashCase|Lu.Important)?e.style.setProperty(t,n,r&Lu.Important?`important`:``):e.style[t]=n}removeStyle(e,t,n){let r=t.startsWith(`--`);r&&(t=t.replace(`%NS%`,this.cssVarNamespace)),r||n&Lu.DashCase?e.style.removeProperty(t):e.style[t]=``}setProperty(e,t,n){e!=null&&(e[t]=n)}setValue(e,t){e.nodeValue=t}listen(e,t,n,r){if(typeof e==`string`&&(e=Nv().getGlobalEventTarget(this.doc,e),!e))throw new T(-5102,!1);let i=this.decoratePreventDefault(n);return this.tracingService?.wrapEventListener&&(i=this.tracingService.wrapEventListener(e,t,i)),this.eventManager.addEventListener(e,t,i,r)}decoratePreventDefault(e){return t=>{if(t===`__ngUnwrap__`)return e;e(t)===!1&&t.preventDefault()}}};function sb(e){return e.tagName===`TEMPLATE`&&e.content!==void 0}var cb=class extends ob{hostEl;sharedStylesHost;shadowRoot;constructor(e,t,n,r,i,a,o,s,c){super(e,r,i,o,s),this.hostEl=t,this.sharedStylesHost=c,this.shadowRoot=t.attachShadow({mode:`open`}),this.sharedStylesHost&&this.sharedStylesHost.addHost(this.shadowRoot);let l=n.styles;l=ib(n.id,l).map(e=>e.replace(/%NS%/g,s));for(let e of l){let t=document.createElement(`style`);a&&t.setAttribute(`nonce`,a),t.textContent=e,this.shadowRoot.appendChild(t)}let u=n.getExternalStyles?.();if(u)for(let e of u){let t=Ky(e,r);a&&t.setAttribute(`nonce`,a),this.shadowRoot.appendChild(t)}}nodeOrShadowRoot(e){return e===this.hostEl?this.shadowRoot:e}appendChild(e,t){return super.appendChild(this.nodeOrShadowRoot(e),t)}insertBefore(e,t,n){return super.insertBefore(this.nodeOrShadowRoot(e),t,n)}removeChild(e,t){return super.removeChild(null,t)}parentNode(e){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(e)))}destroy(){this.sharedStylesHost&&this.sharedStylesHost.removeHost(this.shadowRoot)}},lb=class extends ob{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;constructor(e,t,n,r,i,a,o,s,c){super(e,i,a,o,s),this.sharedStylesHost=t,this.removeStylesOnCompDestroy=r;let l=n.styles,u=c?ib(c,l):l;this.styles=u.map(e=>e.replace(/%NS%/g,s)),this.styleUrls=n.getExternalStyles?.(c)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&Zu.size===0&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},ub=class extends lb{contentAttr;hostAttr;constructor(e,t,n,r,i,a,o,s,c){let l=r+`-`+n.id;super(e,t,n,i,a,o,s,c,l),this.contentAttr=nb(l),this.hostAttr=rb(l)}applyToHost(e){this.applyStyles(),this.setAttribute(e,this.hostAttr,``)}createElement(e,t){let n=super.createElement(e,t);return super.setAttribute(n,this.contentAttr,``),n}},db=class e extends Fv{supportsDOMEvents=!0;static makeCurrent(){Pv(new e)}onAndCancel(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}dispatchEvent(e,t){e.dispatchEvent(t)}remove(e){e.remove()}createElement(e,t){return t||=this.getDefaultDocument(),t.createElement(e)}createHtmlDocument(){return document.implementation.createHTMLDocument(`fakeTitle`)}getDefaultDocument(){return document}isElementNode(e){return e.nodeType===Node.ELEMENT_NODE}isShadowRoot(e){return e instanceof DocumentFragment}getGlobalEventTarget(e,t){return t===`window`?window:t===`document`?e:t===`body`?e.body:null}getBaseHref(e){let t=pb();return t==null?null:mb(t)}resetBaseElement(){fb=null}getUserAgent(){return window.navigator.userAgent}getCookie(e){return Iy(document.cookie,e)}},fb=null;function pb(){return fb||=document.head.querySelector(`base`),fb?fb.getAttribute(`href`):null}function mb(e){return new URL(e,document.baseURI).pathname}var hb=[`alt`,`control`,`meta`,`shift`],gb={"\b":`Backspace`," ":`Tab`,"":`Delete`,"\x1B":`Escape`,Del:`Delete`,Esc:`Escape`,Left:`ArrowLeft`,Right:`ArrowRight`,Up:`ArrowUp`,Down:`ArrowDown`,Menu:`ContextMenu`,Scroll:`ScrollLock`,Win:`OS`},_b={alt:e=>e.altKey,control:e=>e.ctrlKey,meta:e=>e.metaKey,shift:e=>e.shiftKey},vb=(()=>{class e extends Ry{constructor(e){super(e)}supports(t){return e.parseEventName(t)!=null}addEventListener(t,n,r,i){let a=e.parseEventName(n),o=e.eventCallback(a.fullKey,r,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>Nv().onAndCancel(t,a.domEventName,o,i))}static parseEventName(t){let n=t.toLowerCase().split(`.`),r=n.shift();if(n.length===0||r!==`keydown`&&r!==`keyup`)return null;let i=e._normalizeKey(n.pop()),a=``,o=n.indexOf(`code`);if(o>-1&&(n.splice(o,1),a=`code.`),hb.forEach(e=>{let t=n.indexOf(e);t>-1&&(n.splice(t,1),a+=e+`.`)}),a+=i,n.length!=0||i.length===0)return null;let s={};return s.domEventName=r,s.fullKey=a,s}static matchEventFullKeyCode(e,t){let n=gb[e.key]||e.key,r=``;return t.indexOf(`code.`)>-1&&(n=e.code,r=`code.`),n==null||!n?!1:(n=n.toLowerCase(),n===` `?n=`space`:n===`.`&&(n=`dot`),hb.forEach(t=>{if(t!==n){let n=_b[t];n(e)&&(r+=t+`.`)}}),r+=n,r===t)}static eventCallback(t,n,r){return i=>{e.matchEventFullKeyCode(i,t)&&r.runGuarded(()=>n(i))}}static _normalizeKey(e){return e===`esc`?`escape`:e}static ɵfac=function(t){return new(t||e)(qi(Cs))};static ɵprov=di({token:e,factory:e.ɵfac})}return e})();async function yb(e,t,n){return Ev({rootComponent:e,...bb(t,n)})}function bb(e,t){return{platformRef:t?.platformRef,appProviders:[...Tb,...e?.providers??[]],platformProviders:wb}}function xb(){db.makeCurrent()}function Sb(){return new Js}function Cb(){return Hl(document),document}var wb=[{provide:tc,useValue:Ly},{provide:ec,useValue:xb,multi:!0},{provide:Cs,useFactory:Cb}],Tb=[{provide:Ta,useValue:`root`},{provide:Js,useFactory:Sb},{provide:By,useClass:zy,multi:!0},{provide:By,useClass:vb,multi:!0},ab,{provide:om,useClass:qy},{provide:qy,useExisting:om},Vy,{provide:Vp,useExisting:ab},[]];function Eb(e,t){let n=`\x1B[${e}m`,r=`\x1B[${t}m`;return((e,...t)=>{if(Array.isArray(e)&&`raw`in e){let i=e,a=``;for(let e=0;e{let r=new Ab({code:i,why:Ob(a.why,e),fix:Ob(a.fix,e),docs:o,cause:e.cause,sources:e.sources,data:Ob(a.data,e)},s);for(let e of t)e(r,n);return r};n[i]=s}return n}function Nb(e){return t=>{let n=`${e.bold(e.red(`[${t.name}]`))} ${t.message}`,r=[];return t.fix&&r.push(`${e.dim(`fix:`)} ${t.fix}`),t.sources?.length&&r.push(`${e.dim(`sources:`)} ${t.sources.join(`, `)}`),t.docs&&r.push(`${e.dim(`see:`)} ${e.cyan(t.docs)}`),r.length===0?n:[n,...r.map((t,n)=>`${e.dim(n{e=n,t=r}),resolve:e,reject:t}}var zb=Math.random.bind(Math),Bb=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`;function Vb(e=21){let t=``,n=e;for(;n--;)t+=Bb[zb()*64|0];return t}var Hb=6e4,Ub=e=>e,Wb=Ub,{clearTimeout:Gb,setTimeout:Kb}=globalThis;function qb(e,t){let{post:n,on:r,off:i=()=>{},eventNames:a=[],serialize:o=Ub,deserialize:s=Wb,resolver:c,bind:l=`rpc`,timeout:u=Hb,proxify:d=!0}=t,f=!1,p=new Map,m,h;async function g(e,r,i,a){if(f)throw Error(`[birpc] rpc is closed, cannot call "${e}"`);let s={m:e,a:r,t:`q`};a&&(s.o=!0);let c=async e=>n(o(e));if(i){await c(s);return}if(m)try{await m}finally{m=void 0}let{promise:l,resolve:d,reject:g}=Rb(),_=Vb();s.i=_;let ee;async function v(n=s){return u>=0&&(ee=Kb(()=>{try{if(t.onTimeoutError?.call(h,e,r)!==!0)throw Error(`[birpc] timeout on calling "${e}"`)}catch(e){g(e)}p.delete(_)},u),typeof ee==`object`&&(ee=ee.unref?.())),p.set(_,{resolve:d,reject:g,timeoutId:ee,method:e}),await c(n),l}try{t.onRequest?await t.onRequest.call(h,s,v,d):await v()}catch(e){if(t.onGeneralError?.call(h,e)!==!0)throw e;return}finally{Gb(ee),p.delete(_)}return l}let _={$call:(e,...t)=>g(e,t,!1),$callOptional:(e,...t)=>g(e,t,!1,!0),$callEvent:(e,...t)=>g(e,t,!0),$callRaw:e=>g(e.method,e.args,e.event,e.optional),$rejectPendingCalls:v,get $closed(){return f},get $meta(){return t.meta},$close:ee,$functions:e};h=d?new Proxy({},{get(t,n){if(Object.hasOwn(_,n))return _[n];if(n===`then`&&!a.includes(`then`)&&!(`then`in e))return;let r=(...e)=>g(n,e,!0);if(a.includes(n))return r.asEvent=r,r;let i=(...e)=>g(n,e,!1);return i.asEvent=r,i}}):_;function ee(e){f=!0,p.forEach(({reject:t,method:n})=>{let r=Error(`[birpc] rpc is closed, cannot call "${n}"`);if(e)return e.cause??=r,t(e);t(r)}),p.clear(),i(te)}function v(e){let t=Array.from(p.values()).map(({method:t,reject:n})=>e?e({method:t,reject:n}):n(Error(`[birpc]: rejected pending call "${t}".`)));return p.clear(),t}async function te(r,...i){let a;try{a=s(r)}catch(e){if(t.onGeneralError?.call(h,e)!==!0)throw e;return}if(a.t===`q`){let{m:r,a:s,o:u}=a,d,f,p=await(c?c.call(h,r,e[r]):e[r]);if(u&&(p||=()=>void 0),!p)f=Error(`[birpc] function "${r}" not found`);else try{d=await p.apply(l===`rpc`?h:e,s)}catch(e){f=e}if(a.i){if(f&&t.onFunctionError&&t.onFunctionError.call(h,f,r,s)===!0)return;if(!f)try{await n(o({t:`s`,i:a.i,r:d}),...i);return}catch(e){if(f=e,t.onGeneralError?.call(h,e,r,s)!==!0)throw e}try{await n(o({t:`s`,i:a.i,e:f}),...i)}catch(e){if(t.onGeneralError?.call(h,e,r,s)!==!0)throw e}}}else{let{i:e,r:t,e:n}=a,r=p.get(e);r&&(Gb(r.timeoutId),n?r.reject(n):r.resolve(t)),p.delete(e)}}return m=r(te),h}function Jb(e,t){return t.safety?t.safety:e===`static`||e===`query`||e==null?`read`:`action`}var Yb=Object.freeze({type:`object`,additionalProperties:!0});function Xb(e){let t=e[`~standard`];if(t.jsonSchema)try{return t.jsonSchema.input({target:`draft-2020-12`})}catch{return Yb}return Yb}function Zb(e){if(!e||e.length===0)return{type:`object`,properties:{}};let t={},n=[];for(let r=0;rn[`arg${t}`]);if(`arg0`in n){let e=[];for(;`arg${e.length}`in n;)e.push(n[`arg${e.length}`]);return e}return Object.keys(n).length===0?[]:void 0}function $b(e,t){return Qb(e,t)??[e]}function ex(e){return typeof e==`string`?`'${e}'`:new ix().serialize(e)}var tx=` _-,;:!?.'"()[]{}@*/\\&#%\`^+<=>|~$0123456789abcdefghijklmnopqrstuvwxyz`,nx=(function(){let e=new Uint8Array(128);for(let t=0;t<69;t++)e[tx.charCodeAt(t)]=t+1;for(let t=65;t<=90;t++)e[t]=e[t+32];return e})();function rx(e,t){if(e===t)return 0;let n=Math.min(e.length,t.length),r=0;for(let i=0;ia?-1:1)}return e.length===t.length?r:e.lengththis.compare(e[0],t[0])),r=`${e}{`;for(let e=0;ethis.compare(e,t)))}`}$Map(e){return this.serializeObjectEntries(`Map`,e.entries())}}for(let t of[`Error`,`RegExp`,`URL`])e.prototype[`$`+t]=function(e){return`${t}(${e})`};for(let t of[`Int8Array`,`Uint8Array`,`Uint8ClampedArray`,`Int16Array`,`Uint16Array`,`Int32Array`,`Uint32Array`,`Float32Array`,`Float64Array`])e.prototype[`$`+t]=function(e){return`${t}[${e.join(`,`)}]`};for(let t of[`BigInt64Array`,`BigUint64Array`])e.prototype[`$`+t]=function(e){return`${t}[${e.join(`n,`)}${e.length>0?`n`:``}]`};return e})(),ax=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225],ox=[1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998],sx=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_`,cx=[],lx=class{_data=new ux;_hash=new ux([...ax]);_nDataBytes=0;_minBufferSize=0;finalize(e){e&&this._append(e);let t=this._nDataBytes*8,n=this._data.sigBytes*8;return this._data.words[n>>>5]|=128<<24-n%32,this._data.words[(n+64>>>9<<4)+14]=Math.floor(t/4294967296),this._data.words[(n+64>>>9<<4)+15]=t,this._data.sigBytes=this._data.words.length*4,this._process(),this._hash}_doProcessBlock(e,t){let n=this._hash.words,r=n[0],i=n[1],a=n[2],o=n[3],s=n[4],c=n[5],l=n[6],u=n[7];for(let n=0;n<64;n++){if(n<16)cx[n]=e[t+n]|0;else{let e=cx[n-15],t=(e<<25|e>>>7)^(e<<14|e>>>18)^e>>>3,r=cx[n-2],i=(r<<15|r>>>17)^(r<<13|r>>>19)^r>>>10;cx[n]=t+cx[n-7]+i+cx[n-16]}let d=s&c^~s&l,f=r&i^r&a^i&a,p=(r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22),m=(s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25),h=u+m+d+ox[n]+cx[n],g=p+f;u=l,l=c,c=s,s=o+h|0,o=a,a=i,i=r,r=h+g|0}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+a|0,n[3]=n[3]+o|0,n[4]=n[4]+s|0,n[5]=n[5]+c|0,n[6]=n[6]+l|0,n[7]=n[7]+u|0}_append(e){typeof e==`string`&&(e=ux.fromUtf8(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes}_process(e){let t,n=this._data.sigBytes/64;n=e?Math.ceil(n):Math.max((n|0)-this._minBufferSize,0);let r=n*16,i=Math.min(r*4,this._data.sigBytes);if(r){for(let e=0;e>>2]|=(n.charCodeAt(e)&255)<<24-e%4*8;return new e(i,r)}toBase64(){let e=[];for(let t=0;t>>2]>>>24-t%4*8&255,r=this.words[t+1>>>2]>>>24-(t+1)%4*8&255,i=this.words[t+2>>>2]>>>24-(t+2)%4*8&255,a=n<<16|r<<8|i;for(let n=0;n<4&&t*8+n*6>>6*(3-n)&63))}return e.join(``)}concat(e){if(this.words[this.sigBytes>>>2]&=4294967295<<32-this.sigBytes%4*8,this.words.length=Math.ceil(this.sigBytes/4),this.sigBytes%4)for(let t=0;t>>2]>>>24-t%4*8&255;this.words[this.sigBytes+t>>>2]|=n<<24-(this.sigBytes+t)%4*8}else for(let t=0;t>>2]=e.words[t>>>2];this.sigBytes+=e.sigBytes}};function dx(e){return new lx().finalize(e).toBase64()}function fx(e){return dx(ex(e))}function px(e){return fx(e)}function mx(){let e={};function t(t,...n){let r=e[t]||[];for(let e=0,t=r.length;e{e[t]=e[t]?.filter(e=>n!==e)}}function i(e,t){let n=r(e,((...e)=>(n(),t(...e))));return n}return{_listeners:e,emit:t,emitOnce:n,on:r,once:i}}var hx=/^[\w+.-]{2,}:\/\//;function gx(e){return e.endsWith(`/`)?e:`${e}/`}function _x(e){return(e.endsWith(`/`)?e.slice(0,-1):e)||`/`}function vx(e,...t){let n=e;for(let e of t)e&&e!==`/`&&(n=n?gx(n)+e.replace(/^\.?\//,``):e);return n}function yx(e,t){if(!t||t===`/`||hx.test(e))return e;let n=_x(t);return e.startsWith(n)?e:vx(n,e)}function bx(e,t){let n=e.match(hx);return t+(n?e.slice(n[0].length):e)}var xx=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`;function Sx(e=21){let t=``,n=e;for(;n--;)t+=xx[Math.random()*64|0];return t}var Cx=Symbol.for(`immer-nothing`),wx=Symbol.for(`immer-draftable`),Tx=Symbol.for(`immer-state`),Ex=[function(e){return`The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`},function(e){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${e}'`},`This object has been frozen and should not be mutated`,function(e){return`Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? `+e},`An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.`,`Immer forbids circular references`,"The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(e){return`'current' expects a draft, got: ${e}`},`Object.defineProperty() cannot be used on an Immer draft`,`Object.setPrototypeOf() cannot be used on an Immer draft`,`Immer only supports deleting array indices`,`Immer only supports setting array indices and the 'length' property`,function(e){return`'original' expects a draft, got: ${e}`}];function Dx(e,...t){{let n=Ex[e],r=Zx(n)?n.apply(null,t):n;throw Error(`[Immer] ${r}`)}}var Ox=Object,kx=Ox.getPrototypeOf,Ax=`constructor`,jx=`prototype`,Mx=`configurable`,Nx=`enumerable`,Px=`writable`,Fx=`value`,Ix=e=>!!e&&!!e[Tx];function Lx(e){return e?Bx(e)||qx(e)||!!e[wx]||!!e[Ax]?.[wx]||Jx(e)||Yx(e):!1}var Rx=Ox[jx][Ax].toString(),zx=new WeakMap;function Bx(e){if(!e||!Xx(e))return!1;let t=kx(e);if(t===null||t===Ox[jx])return!0;let n=Ox.hasOwnProperty.call(t,Ax)&&t[Ax];if(n===Object)return!0;if(!Zx(n))return!1;let r=zx.get(n);return r===void 0&&(r=Function.toString.call(n),zx.set(n,r)),r===Rx}function Vx(e,t,n=!0){Hx(e)===0?(n?Reflect.ownKeys(e):Ox.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Hx(e){let t=e[Tx];return t?t.type_:qx(e)?1:Jx(e)?2:Yx(e)?3:0}var Ux=(e,t,n=Hx(e))=>n===2?e.has(t):Ox[jx].hasOwnProperty.call(e,t),Wx=(e,t,n=Hx(e))=>n===2?e.get(t):e[t],Gx=(e,t,n,r=Hx(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n};function Kx(e,t){return e===t?e!==0||1/e==1/t:e!==e&&t!==t}var qx=Array.isArray,Jx=e=>e instanceof Map,Yx=e=>e instanceof Set,Xx=e=>typeof e==`object`,Zx=e=>typeof e==`function`,Qx=e=>typeof e==`boolean`;function $x(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var eS=e=>Xx(e)?e?.[Tx]:null,tS=e=>e.copy_||e.base_,nS=e=>e.modified_?e.copy_:e.base_;function rS(e,t){if(Jx(e))return new Map(e);if(Yx(e))return new Set(e);if(qx(e))return Array[jx].slice.call(e);let n=Bx(e);if(t===!0||t===`class_only`&&!n){let t=Ox.getOwnPropertyDescriptors(e);delete t[Tx];let n=Reflect.ownKeys(t);for(let r=0;r1&&Ox.defineProperties(e,{set:oS,add:oS,clear:oS,delete:oS}),Ox.freeze(e),t&&Vx(e,(e,t)=>{iS(t,!0)},!1),e)}function aS(){Dx(2)}var oS={[Fx]:aS};function sS(e){return e===null||!Xx(e)||Ox.isFrozen(e)}var cS=`MapSet`,lS=`Patches`,uS=`ArrayMethods`,dS={};function fS(e){let t=dS[e];return t||Dx(0,e),t}var pS=e=>!!dS[e];function mS(e,t){dS[e]||(dS[e]=t)}var hS,gS=()=>hS,_S=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:pS(cS)?fS(cS):void 0,arrayMethodsPlugin_:pS(uS)?fS(uS):void 0});function vS(e,t){t&&(e.patchPlugin_=fS(lS),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function yS(e){bS(e),e.drafts_.forEach(SS),e.drafts_=null}function bS(e){e===hS&&(hS=e.parent_)}var xS=e=>hS=_S(hS,e);function SS(e){let t=e[Tx];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function CS(e,t){t.unfinalizedDrafts_=t.drafts_.length;let n=t.drafts_[0];if(e!==void 0&&e!==n){n[Tx].modified_&&(yS(t),Dx(4)),Lx(e)&&(e=wS(t,e));let{patchPlugin_:r}=t;r&&r.generateReplacementPatches_(n[Tx].base_,e,t)}else e=wS(t,n);return TS(t,e,!0),yS(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e===Cx?void 0:e}function wS(e,t){if(sS(t))return t;let n=t[Tx];if(!n)return NS(t,e.handledSet_,e);if(!DS(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){let{callbacks_:t}=n;if(t)for(;t.length>0;)t.pop()(e);jS(n,e)}return n.copy_}function TS(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&iS(t,n)}function ES(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var DS=(e,t)=>e.scope_===t,OS=[];function kS(e,t,n,r){let i=tS(e),a=e.type_;if(r!==void 0&&Wx(i,r,a)===t){Gx(i,r,n,a);return}if(!e.draftLocations_){let t=e.draftLocations_=new Map;Vx(i,(e,n)=>{if(Ix(n)){let r=t.get(n)||[];r.push(e),t.set(n,r)}})}let o=e.draftLocations_.get(t)??OS;for(let e of o)Gx(i,e,n,a)}function AS(e,t,n){e.callbacks_.push(function(r){let i=t;if(!i||!DS(i,r))return;r.mapSetPlugin_?.fixSetContents(i);let a=nS(i);kS(e,i.draft_??i,a,n),jS(i,r)})}function jS(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){let{patchPlugin_:n}=t;if(n){let r=n.getPath(e);r&&n.generatePatches_(e,r,t)}ES(e)}}function MS(e,t,n){let{scope_:r}=e;if(Ix(n)){let i=n[Tx];DS(i,r)&&i.callbacks_.push(function(){HS(e),kS(e,n,nS(i),t)})}else Lx(n)&&e.callbacks_.push(function(){let i=tS(e);e.type_===3?i.has(n)&&NS(n,r.handledSet_,r):Wx(i,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&NS(Wx(e.copy_,t,e.type_),r.handledSet_,r)})}function NS(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||Ix(e)||t.has(e)||!Lx(e)||sS(e)?e:(t.add(e),Vx(e,(r,i)=>{if(Ix(i)){let t=i[Tx];DS(t,n)&&(Gx(e,r,nS(t),e.type_),ES(t))}else Lx(i)&&NS(i,t,n)}),e)}function PS(e,t){let n=qx(e),r={type_:+!!n,scope_:t?t.scope_:gS(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},i=r,a=FS;n&&(i=[r],a=IS);let{revoke:o,proxy:s}=Proxy.revocable(i,a);return r.draft_=s,r.revoke_=o,[s,r]}var FS={get(e,t){if(t===Tx)return e;let n=e.scope_.arrayMethodsPlugin_,r=e.type_===1&&typeof t==`string`;if(r&&n?.isArrayOperationMethod(t))return n.createMethodInterceptor(e,t);let i=tS(e);if(!Ux(i,t,e.type_))return zS(e,i,t);let a=i[t];if(e.finalized_||!Lx(a)||r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&$x(t))return a;if(a===LS(e.base_,t)||RS(e,t,a)){HS(e);let n=e.type_===1?+t:t,r=WS(e.scope_,a,e,n);return e.copy_[n]=r}return a},has(e,t){return t in tS(e)},ownKeys(e){return Reflect.ownKeys(tS(e))},set(e,t,n){let r=BS(tS(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){let r=LS(tS(e),t),i=r?.[Tx];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_.set(t,!1),!0;if(Kx(n,r)&&(n!==void 0||Ux(e.base_,t,e.type_)))return!0;HS(e),VS(e)}return e.copy_[t]===n&&(n!==void 0||Ux(e.copy_,t,e.type_))||Number.isNaN(n)&&Number.isNaN(e.copy_[t])?!0:(e.copy_[t]=n,e.assigned_.set(t,!0),MS(e,t,n),!0)},deleteProperty(e,t){return HS(e),LS(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),VS(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let n=tS(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[Px]:!0,[Mx]:e.type_!==1||t!==`length`,[Nx]:r[Nx],[Fx]:n[t]}},defineProperty(){Dx(11)},getPrototypeOf(e){return kx(e.base_)},setPrototypeOf(){Dx(12)}},IS={};for(let e in FS){let t=FS[e];IS[e]=function(){let e=arguments;return e[0]=e[0][0],t.apply(this,e)}}IS.deleteProperty=function(e,t){return isNaN(parseInt(t))&&Dx(13),IS.set.call(this,e,t,void 0)},IS.set=function(e,t,n){return t!==`length`&&isNaN(parseInt(t))&&Dx(14),FS.set.call(this,e[0],t,n,e[0])};function LS(e,t){let n=e[Tx];return(n?tS(n):e)[t]}function RS(e,t,n){return e.type_!==1||!e.allIndicesReassigned_||e.assigned_?.get(t)||!Lx(n)||n[Tx]?!1:e.baseRefs_.has(n)}function zS(e,t,n){let r=BS(t,n);return r?Fx in r?r[Fx]:r.get?.call(e.draft_):void 0}function BS(e,t){if(!(t in e))return;let n=kx(e);for(;n;){let e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=kx(n)}}function VS(e){e.modified_||(e.modified_=!0,e.parent_&&VS(e.parent_))}function HS(e){e.copy_||=(e.assigned_=new Map,rS(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var US=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,n)=>{if(Zx(e)&&!Zx(t)){let n=t;t=e;let r=this;return function(e=n,...i){return r.produce(e,e=>t.call(this,e,...i))}}Zx(t)||Dx(6),n!==void 0&&!Zx(n)&&Dx(7);let r;if(Lx(e)){let i=xS(this),a=WS(i,e,void 0),o=!0;try{r=t(a),o=!1}finally{o?yS(i):bS(i)}return vS(i,n),CS(r,i)}if(!e||!Xx(e)){if(r=t(e),r===void 0&&(r=e),r===Cx&&(r=void 0),this.autoFreeze_&&iS(r,!0),n){let t=[],i=[];fS(lS).generateReplacementPatches_(e,r,{patches_:t,inversePatches_:i}),n(t,i)}return r}Dx(1,e)},this.produceWithPatches=(e,t)=>{if(Zx(e))return(t,...n)=>this.produceWithPatches(t,t=>e(t,...n));let n,r;return[this.produce(e,t,(e,t)=>{n=e,r=t}),n,r]},Qx(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),Qx(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),Qx(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){Lx(e)||Dx(8),Ix(e)&&(e=GS(e));let t=xS(this),n=WS(t,e,void 0);return n[Tx].isManual_=!0,bS(t),n}finishDraft(e,t){let n=e&&e[Tx];(!n||!n.isManual_)&&Dx(9);let{scope_:r}=n;return vS(r,t),CS(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){let r=t[n];if(r.path.length===0&&r.op===`replace`){e=r.value;break}}n>-1&&(t=t.slice(n+1));let r=fS(lS).applyPatches_;return Ix(e)?r(e,t):this.produce(e,e=>r(e,t))}};function WS(e,t,n,r){let[i,a]=Jx(t)?fS(cS).proxyMap_(t,n):Yx(t)?fS(cS).proxySet_(t,n):PS(t,n);return(n?.scope_??gS()).drafts_.push(i),a.callbacks_=n?.callbacks_??[],a.key_=r,n&&r!==void 0?AS(n,a,r):a.callbacks_.push(function(e){e.mapSetPlugin_?.fixSetContents(a);let{patchPlugin_:t}=e;a.modified_&&t&&t.generatePatches_(a,[],e)}),i}function GS(e){return Ix(e)||Dx(10,e),KS(e)}function KS(e){if(!Lx(e)||sS(e))return e;let t=e[Tx],n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=rS(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=rS(e,!0);return Vx(n,(e,t)=>{Gx(n,e,KS(t))},r),t&&(t.finalized_=!1),n}function qS(){Ex.push(`Sets cannot have "replace" patches.`,function(e){return`Unsupported patch operation: `+e},function(e){return`Cannot apply patch, path doesn't resolve: `+e},`Patching reserved attributes like __proto__, prototype and constructor is not allowed`);function e(n,r=[]){if(n.key_!==void 0){let e=n.parent_.copy_??n.parent_.base_,t=eS(Wx(e,n.key_)),i=Wx(e,n.key_);if(i===void 0||i!==n.draft_&&i!==n.base_&&i!==n.copy_||t!=null&&t.base_!==n.base_)return null;let a=n.parent_.type_===3,o;if(a){let e=n.parent_;o=Array.from(e.drafts_.keys()).indexOf(n.key_)}else o=n.key_;if(!(a&&e.size>o||Ux(e,o)))return null;r.push(o)}if(n.parent_)return e(n.parent_,r);r.reverse();try{t(n.copy_,r)}catch{return null}return r}function t(e,t){let n=e;for(let e=0;e{let u=Wx(o,e,c),f=Wx(s,e,c),p=l?Ux(o,e)?n:`add`:r;if(u===f&&p===n)return;let m=t.concat(e);i.push(p===r?{op:p,path:m}:{op:p,path:m,value:d(f)}),a.push(p===`add`?{op:r,path:m}:p===r?{op:`add`,path:m,value:d(u)}:{op:n,path:m,value:d(u)})})}function s(e,t,n,i){let{base_:a,copy_:o}=e,s=0;a.forEach(e=>{if(!o.has(e)){let a=t.concat([s]);n.push({op:r,path:a,value:e}),i.unshift({op:`add`,path:a,value:e})}s++}),s=0,o.forEach(e=>{if(!a.has(e)){let a=t.concat([s]);n.push({op:`add`,path:a,value:e}),i.unshift({op:r,path:a,value:e})}s++})}function c(e,t,r){let{patches_:i,inversePatches_:a}=r;i.push({op:n,path:[],value:t===Cx?void 0:t}),a.push({op:n,path:[],value:e})}function l(e,t){return t.forEach(t=>{let{path:i,op:a}=t,o=e;for(let e=0;e[e,u(t)]));if(Yx(e))return new Set(Array.from(e).map(u));let t=Object.create(kx(e));for(let n in e)t[n]=u(e[n]);return Ux(e,wx)&&(t[wx]=e[wx]),t}function d(e){return Ix(e)?u(e):e}mS(lS,{applyPatches_:l,generatePatches_:i,generateReplacementPatches_:c,getPath:e})}globalThis.Iterator?.from;var JS=new US,YS=JS.produce,XS=JS.produceWithPatches.bind(JS),ZS=JS.applyPatches.bind(JS),QS=1e3;function $S(e,t){if(e.add(t),e.size>QS){let t=e.values().next().value;t!==void 0&&e.delete(t)}}function eC(e){let{enablePatches:t=!1}=e;t&&qS();let n=mx(),r=e.initialValue,i=new Set;return{on:n.on,value:()=>r,patch:(e,t=Sx())=>{i.has(t)||(qS(),r=ZS(r,e),$S(i,t),n.emit(`updated`,r,void 0,t))},mutate:(e,a=Sx())=>{if(!i.has(a)){if($S(i,a),t){let[t,i]=XS(r,e);if(t===r)return;r=t,n.emit(`updated`,r,i,a)}else{let t=YS(r,e);if(t===r)return;r=t,n.emit(`updated`,r,void 0,a)}}},syncIds:i}}var tC=typeof self==`object`?self:globalThis,nC=new Set([`Error`,`EvalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`,`AggregateError`]),rC=new Set([`Boolean`,`Number`,`String`,`Int8Array`,`Uint8Array`,`Uint8ClampedArray`,`Int16Array`,`Uint16Array`,`Int32Array`,`Uint32Array`,`Float16Array`,`Float32Array`,`Float64Array`,`BigInt64Array`,`BigUint64Array`]);function iC(e,t){let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o)e[r(t)]=r(n);return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o,r=nC.has(e)?tC[e]:void 0;return n(new(r??tC.Error)(t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}}if(typeof a==`string`&&rC.has(a))return n(new tC[a](o),i);throw TypeError(`unable to deserialize unsafe or unknown type: ${String(a)}`)};return r}function aC(e){return iC(new Map,e)(0)}var oC=``,{toString:sC}={},{keys:cC}=Object;function lC(e){let t=typeof e;if(t!==`object`||!e)return[0,t];let n=sC.call(e).slice(8,-1);switch(n){case`Array`:return[1,oC];case`Object`:return[2,oC];case`Date`:return[3,oC];case`RegExp`:return[4,oC];case`Map`:return[5,oC];case`Set`:return[6,oC];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:n.includes(`Error`)?[7,n]:[2,n]}function uC([e,t]){return e===0&&(t===`function`||t===`symbol`)}function dC(e,t,n,r){let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=r=>{if(n.has(r))return n.get(r);let[o,s]=lC(r);switch(o){case 0:{let t=r;switch(s){case`bigint`:o=8,t=r.toString();break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize ${s}`);t=null;break;case`undefined`:return i([-1],r)}return i([o,t],r)}case 1:{if(s){let e=r;return s===`DataView`?e=new Uint8Array(r.buffer):s===`ArrayBuffer`&&(e=new Uint8Array(r)),i([s,[...e]],r)}let e=[],t=i([o,e],r);for(let t of r)e.push(a(t));return t}case 2:{if(s)switch(s){case`BigInt`:return i([s,r.toString()],r);case`Boolean`:case`Number`:case`String`:return i([s,r.valueOf()],r)}if(t&&`toJSON`in r)return a(r.toJSON());let n=[],c=i([o,n],r);for(let t of cC(r))(e||!uC(lC(r[t])))&&n.push([a(t),a(r[t])]);return c}case 3:return i([o,r.toISOString()],r);case 4:{let{source:e,flags:t}=r;return i([o,{source:e,flags:t}],r)}case 5:{let t=[],n=i([o,t],r);for(let[n,i]of r)(e||!(uC(lC(n))||uC(lC(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!uC(lC(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a}function fC(e,t={}){let n=[];return dC(!(t.json||t.lossy),!!t.json,new Map,n)(e),n}var{parse:pC,stringify:mC}=JSON,hC={json:!0,lossy:!0};function gC(e){return aC(pC(e))}function _C(e){return mC(fC(e,hC))}function vC(e){return aC(e)}function yC(e){return _C(e)}function bC(e){return gC(e)}var xC=256,SC=class extends Error{name=`StreamClosedError`};function CC(e={}){let t=e.id??Sx(),n=Math.max(0,e.replayWindow??0),r=mx(),i=new AbortController,a=[],o=!1,s=0;function c(e){if(o)throw new SC(`Cannot write to a closed stream "${t}"`);s+=1,n>0&&(a.push({seq:s,chunk:e}),a.length>n&&(a.length-n===1?a.shift():a.splice(0,a.length-n))),r.emit(`chunk`,s,e)}function l(e){if(o)return;o=!0;let t=TC(e);i.abort(e),r.emit(`end`,t)}function u(){o||(o=!0,i.signal.aborted||i.abort(`stream closed`),r.emit(`end`,void 0))}function d(e){o||i.signal.aborted||i.abort(e??`aborted`)}let f=new WritableStream({write(e){c(e)},close(){u()},abort(e){l(e)}});return{id:t,signal:i.signal,get closed(){return o},get lastSeq(){return s},write:c,error:l,close:u,abort:d,writable:f,events:r,buffer:a}}function wC(e={}){let t=e.id??Sx(),n=Math.max(1,e.highWaterMark??xC),r=[],i=0,a=!1,o=!1,s,c,l,u;function d(){if(c){if(r.length>0){let e=r.shift(),t=c;c=void 0,t.resolve({value:e,done:!1});return}if(a){let e=c;if(c=void 0,s){let t=Error(s.message);t.name=s.name,e.reject(t)}else e.resolve({value:void 0,done:!0})}}}function f(){if(l){for(;r.length>0;){let e=r.shift();try{l.enqueue(e)}catch{break}}if(a&&l){try{if(s){let e=Error(s.message);e.name=s.name,l.error(e)}else l.close()}catch{}l=void 0}}}function p(t,s){if(!(a||o)&&!(t<=i)){if(i=t,r.push(s),r.length>n){let t=r.length-n;r.splice(0,t),e.onOverflow?.(t)}d(),u&&f()}}function m(e){a||(a=!0,s=e,d(),u&&f())}function h(){o||a||(o=!0,e.onCancel?.(),m(void 0))}function g(){return u||(u=new ReadableStream({start(e){l=e,f()},cancel(){h()}}),u)}return{id:t,get cancelled(){return o},get done(){return a},get lastSeenSeq(){return i},get readable(){return g()},cancel:h,_push:p,_end:m,[Symbol.asyncIterator](){return{next(){if(r.length>0)return Promise.resolve({value:r.shift(),done:!1});if(a){if(s){let e=Error(s.message);return e.name=s.name,Promise.reject(e)}return Promise.resolve({value:void 0,done:!0})}return new Promise((e,t)=>{c={resolve:e,reject:t}})},return(){return h(),Promise.resolve({value:void 0,done:!0})}}}}}function TC(e){if(e instanceof Error)return{name:e.name||`Error`,message:e.message};if(typeof e==`string`)return{name:`Error`,message:e};try{return{name:`Error`,message:JSON.stringify(e)}}catch{return{name:`Error`,message:String(e)}}}var EC=128;function DC(e){return e.replace(/[^\w-]+/g,`_`).slice(0,EC)}var OC=`modulepreload`,kC=function(e,t){return new URL(e,t).href},AC={},jC=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=kC(t,n),t=s(t),t in AC)return;AC[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:OC,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}).filter(e=>e!==void 0))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},MC=`__connection.json`,NC=`__DEVFRAME_CONNECTION__`,PC=`x-birpc-session`,FC=`__rpc-dump/index.json`,IC=`devframe:services`,LC=`devframe_otp`,RC=`devframe_auth_token`;Pb.postMessage.remoteAssetsError;var zC=class{cacheMap=new Map;options;keySerializer;constructor(e){this.options=e,this.keySerializer=e.keySerializer||(e=>px(e))}updateOptions(e){this.options={...this.options,...e}}cached(e,t){let n=this.cacheMap.get(e);if(n)return n.get(this.keySerializer(t))}has(e,t){return this.cacheMap.get(e)?.has(this.keySerializer(t))??!1}apply(e,t){let n=this.cacheMap.get(e.m)||new Map;n.set(this.keySerializer(e.a),t),this.cacheMap.set(e.m,n)}validate(e){return this.options.functions.includes(e)}clear(e){e?this.cacheMap.delete(e):this.cacheMap.clear()}},BC=Lb({docsBase:`https://devfra.me/errors`,codes:{DF0019:{why:e=>`RPC function "${e.name}" has \`agent\` set but \`jsonSerializable\` is \`false\`; MCP requires JSON-serializable data.`,fix:"Remove `jsonSerializable: false`, or remove `agent` to keep it RPC-only."},DF0020:{why:e=>`RPC function "${e.name}" declares \`jsonSerializable: true\` but the value at "${e.path}" is a ${e.type}.`,fix:"Either drop `jsonSerializable: true` (falls back to structured-clone) or change the value to a JSON-safe shape."},DF0021:{why:e=>`RPC function "${e.name}" is already registered`,fix:"Use the `force` parameter to overwrite an existing registration."},DF0022:{why:e=>`RPC function "${e.name}" is not registered. Use register() to add new functions.`},DF0023:{why:e=>`RPC function "${e.name}" is not registered`},DF0024:{why:e=>`Either handler or setup function must be provided for RPC function "${e.name}"`},DF0025:{why:e=>`Function "${e.name}" not found in dump store`},DF0026:{why:e=>`No dump match for "${e.name}" with args: ${e.args}`},DF0027:{why:e=>`Function "${e.name}" with type "${e.type}" cannot have dump configuration. Only "static" and "query" types support dumps.`},DF0028:{why:e=>`Function "${e.name}" with type "${e.type}" cannot use \`snapshot: true\`. Only "query" functions support this sugar; "static" functions have equivalent default behavior already.`,fix:"Remove `snapshot: true`, or change the function type to `query`."},DF0043:{why:e=>`RPC function "${e.name}" received an invalid argument at position ${e.index}: ${e.issues}`,fix:"Pass a value that satisfies the `args` schema declared for this function."},DF0044:{why:e=>`RPC function "${e.name}" returned a value that failed its \`returns\` schema: ${e.issues}`,fix:"Make the handler return a value that satisfies the `returns` schema, or relax the schema."}}});function VC(e){if(e.agent&&e.jsonSerializable===!1)throw BC.DF0019({name:e.name});e.agent&&!e.jsonSerializable&&(e.jsonSerializable=!0)}async function HC(e,t){let n=e[`~standard`].validate(t);return n instanceof Promise?await n:n}function UC(e){return e.map(e=>{let t=e.path?.map(e=>typeof e==`object`?e.key:e).join(`.`);return t?`${t}: ${e.message}`:e.message}).join(`; `)}async function WC(e,t,n){let r=n.slice();if(!t||t.length===0)return r;for(let r=0;r{n.get(t)===r&&n.delete(t)}),n.set(t,r)),await r}if(!e.__promise){let n=Promise.resolve(e.setup(t));n.catch(()=>{e.__promise===n&&(e.__promise=void 0)}),e.__promise=n}return await e.__promise}async function qC(e,t){let n=e.handler;if(!n){let r=await KC(e,t);if(!r.handler)throw BC.DF0024({name:e.name});n=r.handler}let r=e.args,i=e.returns;if(!r&&!i)return n;let a=n;return async(...t)=>{let n=await WC(e.name,r,t),o=await a(...n);return await GC(e.name,i,o)}}var JC=class{context;definitions=new Map;functions;_onChanged=[];constructor(e){this.context=e;let t=this.definitions,n=this;this.functions=new Proxy({},{get(e,r){let i=t.get(r);if(i)return qC(i,n.context)},has(e,n){return t.has(n)},getOwnPropertyDescriptor(e,n){return{value:t.get(n)?.handler,configurable:!0,enumerable:!0}},ownKeys(){return Array.from(t.keys())}})}register(e,t=!1){if(this.definitions.has(e.name)&&!t)throw BC.DF0021({name:e.name});VC(e),this.definitions.set(e.name,e),this._onChanged.forEach(t=>t(e.name))}update(e,t=!1){if(!this.definitions.has(e.name)&&!t)throw BC.DF0022({name:e.name});VC(e),this.definitions.set(e.name,e),this._onChanged.forEach(t=>t(e.name))}onChanged(e){return this._onChanged.push(e),()=>{let t=this._onChanged.indexOf(e);t!==-1&&this._onChanged.splice(t,1)}}async getHandler(e){return await qC(this.definitions.get(e),this.context)}getSchema(e){let t=this.definitions.get(e);if(!t)throw BC.DF0023({name:String(e)});return{args:t.args,returns:t.returns}}has(e){return this.definitions.has(e)}get(e){return this.definitions.get(e)}list(){return Array.from(this.definitions.keys())}};function YC(e,t=``){return JSON.stringify(e,function(e,n){let r=this,i=r==null?n:r[e];if(i===void 0){if(Array.isArray(r))throw ZC(t,`undefined`,r,e);return n}return i!==null&&XC(i,r,e,t),n})}function XC(e,t,n,r){if(typeof e==`bigint`)throw ZC(r,`BigInt`,t,n);if(typeof e!=`object`)return;if(e instanceof Map)throw ZC(r,`Map`,t,n);if(e instanceof Set)throw ZC(r,`Set`,t,n);if(e instanceof Date)throw ZC(r,`Date`,t,n);if(Array.isArray(e))return;let i=Object.getPrototypeOf(e);if(i!==null&&i!==Object.prototype)throw ZC(r,e.constructor?.name??`class instance`,t,n)}function ZC(e,t,n,r){let i=QC(n,r);return BC.DF0020({name:e||``,type:t,path:i})}function QC(e,t){return Array.isArray(e)?`[${t}]`:t===``?``:t}var $C=`__DEVFRAME_CONNECTION_META__`,ew=`__DEVFRAME_CONNECTION_AUTH_TOKEN__`;function tw(e){let t=[()=>window?.[e],()=>globalThis?.[e],()=>parent.window?.[e]];for(let e of t)try{let t=e();if(t)return t}catch{}}function nw(){return tw(NC)}function rw(){return tw($C)}function iw(e){if(e)return e;try{let e=localStorage.getItem(ew);if(e)return e}catch{}return tw(ew)}function aw(e){globalThis[NC]=e,globalThis[$C]={...e.connectionMeta,baseUrl:e.metaBaseUrl},e.authToken&&ow(e.authToken)}function ow(e){try{localStorage.setItem(ew,e)}catch{}globalThis[ew]=e;let t=nw();t&&(globalThis[NC]={...t,authToken:e})}function sw(e){let t=yx(MC,e);try{return new URL(t,globalThis.location?.href).href}catch{return t}}function cw(e,t){return t&&t!==e.authToken?{...e,authToken:t}:e}function lw(){let e=nw();if(e)return cw(e,iw()??e.authToken??e.connectionMeta.authToken);let t=rw();if(t)return{connectionMeta:t,metaBaseUrl:t.baseUrl??sw(`./`),authToken:iw(t.authToken)}}async function uw(e={}){if(e.connection){let t=cw(e.connection,iw(e.authToken??e.connection.authToken??e.connection.connectionMeta.authToken));return aw(t),t}let t=Array.isArray(e.baseURL)?e.baseURL:[e.baseURL??`./`];if(e.connectionMeta){let n={connectionMeta:e.connectionMeta,metaBaseUrl:sw(t[0]??`./`),authToken:iw(e.authToken??e.connectionMeta.authToken)};return aw(n),n}let n=lw();if(n){let t=cw(n,iw(e.authToken??n.authToken??n.connectionMeta.authToken));return aw(t),t}let r=[];for(let n of t){let t=yx(MC,n),i=sw(n);try{let n=await fetch(t);if(!n.ok)throw Error(`Failed to fetch connection meta from ${i}: ${n.status}`);let r=await n.json(),a=n.url||i,o={connectionMeta:r,metaBaseUrl:r.baseUrl?new URL(r.baseUrl,a).href:a,authToken:iw(e.authToken??r.authToken)};return aw(o),o}catch(e){r.push(e)}}throw Error(`Failed to get connection meta from ${t.join(`, `)}`,{cause:r})}var dw=class extends Error{name=`DevframeConnectionError`;kind;constructor(e,t,n){super(t,n),this.kind=e}};function fw(e=LC){try{let t=globalThis.location?.hash?.replace(/^#/,``)??``;return new URLSearchParams(t).get(e)||void 0}catch{return}}function pw(e){try{let t=new URL(globalThis.location.href),n=new URLSearchParams(t.hash.replace(/^#/,``));if(!n.has(e))return;n.delete(e),t.hash=n.toString(),globalThis.history?.replaceState(globalThis.history.state,``,t.href)}catch{}}function mw(e=LC){let t=fw(e);return t&&pw(e),t}async function hw(e,t={}){let n=mw(t.param??`devframe_otp`);return n?e.isTrusted?!0:e.requestTrustWithCode(n):!1}function gw(e){let t={},n=new WeakMap,r,i=()=>(r??=e.sharedState.get(IC,{initialValue:{}}).then(e=>(t=e.value(),e.on(`updated`,e=>{t=e}),e)),r);return i(),{state:i,has:e=>e in t,keys:()=>Object.keys(t),get:r=>{let i=t[r];if(!i)return;let a=n.get(i);return a||(a={...i,rpc:e.scope(i.scope).rpc},n.set(i,a)),a}}}function _w(e){let t=new Map,n=new Map,r=new Map,i=new Set,a=e.connectionMeta.backend===`static`;function o(e,t){let n=r.get(e);return n&&typeof n==`object`&&!Array.isArray(n)&&typeof t==`object`&&!Array.isArray(t)?{...n,...t}:t}e.client.register({name:Pb.broadcast.clientStateUpdated,type:`event`,handler:(e,n,r)=>{let i=t.get(e);i&&!i.syncIds.has(r)&&i.mutate(()=>o(e,n),r)}}),e.client.register({name:Pb.broadcast.clientStatePatch,type:`event`,handler:(e,n,r)=>{let i=t.get(e);i&&!i.syncIds.has(r)&&i.patch(n,r)}});function s(t,n){let r=[];return r.push(n.on(`updated`,(n,r,i)=>{a||(r?e.callEvent(`devframe:rpc:server-state:patch`,t,r,i):e.callEvent(`devframe:rpc:server-state:set`,t,n,i))})),()=>{for(let e of r)e()}}return{keys:()=>Array.from(t.keys()),onKeyAdded(e){return i.add(e),()=>{i.delete(e)}},delete(e){let i=n.get(e);n.delete(e);let a=t.delete(e);return r.delete(e),i?.(),a},get:async(c,l)=>{if(l?.initialValue!==void 0&&r.set(c,l.initialValue),t.has(c))return t.get(c);let u=eC({initialValue:l?.initialValue,enablePatches:!1});async function d(){if(a||e.callEvent(`devframe:rpc:server-state:subscribe`,c),l?.initialValue!==void 0){t.set(c,u);for(let e of i)e(c);return e.call(`devframe:rpc:server-state:get`,c).then(e=>{e!==void 0&&u.mutate(()=>o(c,e))}).catch(e=>{console.error(`Error getting server state`,e)}),n.set(c,s(c,u)),u}{let r=await e.call(`devframe:rpc:server-state:get`,c);u.mutate(()=>o(c,r)),t.set(c,u);for(let e of i)e(c);return n.set(c,s(c,u)),u}}return new Promise(t=>{if(e.isTrusted)d().then(t);else{t(u);let n=!1;e.events.on(Pb.client.isTrustedUpdated,e=>{e&&!n&&(n=!0,d())})}})}}}var vw=new Map;function yw(e=vw){let t=new Map;return{serialize:n=>{let r;return n.t===`q`?r=n.m:(r=t.get(n.i),t.delete(n.i)),!(n.t===`s`&&`e`in n)&&r&&e.get(r)?.jsonSerializable===!0?YC(n,r??``):`s:${yC(n)}`},deserialize:e=>{let n=e.startsWith(`s:`)?bC(e.slice(2)):JSON.parse(e);return n.t===`q`&&n.i&&n.m&&t.set(n.i,n.m),n}}}function bw(){}function xw(e){let t=e.search(/\n\n|\r\n\r\n/);if(!(t<0))return{frame:e.slice(0,t),rest:e.slice(t+(e[t]===`\r`?4:2))}}function Sw(e){let t=`message`,n=[];for(let r of e.split(/\r?\n/))r.startsWith(`:`)||(r.startsWith(`event:`)?t=r.slice(6).trimStart():r.startsWith(`data:`)&&n.push(r.slice(5).replace(/^ /,``)));return{event:t,data:n}}function Cw(e){let{onConnected:t=bw,onError:n=bw,onDisconnected:r=bw,definitions:i,fetch:a=globalThis.fetch.bind(globalThis)}=e,o=e.url;e.authToken&&(o=`${o}${o.includes(`?`)?`&`:`?`}${RC}=${encodeURIComponent(e.authToken)}`);let s=yw(i),c=new AbortController,l=!1,u,d,f,p,m=new Promise((e,t)=>{f=e,p=t});m.catch(()=>{});function h(e){l||(l=!0,p(e),n(e),r())}function g(){l||(l=!0,p(Error(`Devframe SSE stream closed`)),r())}function _(e,n){if(e===`session`){f(n),t();return}u?.(n)}async function ee(e){let t=e.getReader();d=t;let n=new TextDecoder,r=``;for(;;){let{done:e,value:i}=await t.read();if(e)break;for(r+=n.decode(i,{stream:!0});;){let e=xw(r);if(!e)break;r=e.rest;let{event:t,data:n}=Sw(e.frame);n.length>0&&_(t,n.join(` -`))}}g()}return(async()=>{try{let e=await a(o,{headers:{accept:`text/event-stream`},signal:c.signal});if(!e.ok||!e.body)throw Error(`Devframe SSE stream request failed: ${e.status}`);await ee(e.body)}catch(e){if(c.signal.aborted){g();return}h(e instanceof Error?e:Error(String(e)))}})(),{close:()=>{l=!0,c.abort(),d?.cancel().catch(()=>{})},on:e=>{u=e},post:async e=>{let t;try{t=await m}catch{return}if(l){n(Error(`Devframe SSE channel is closed; message dropped`));return}try{let n=await a(o,{method:`POST`,headers:{"content-type":`text/plain; charset=utf-8`,[PC]:t},body:e});if(n.status===200){let e=await n.text();e&&u?.(e);return}if(!n.ok)throw Error(`Devframe SSE POST failed: ${n.status}`)}catch(e){n(e instanceof Error?e:Error(String(e)))}},serialize:s.serialize,deserialize:s.deserialize}}function ww(e,t){let{channel:n,rpcOptions:r={}}=t;return qb(e,{...n,timeout:-1,...r,proxify:!1})}function Tw(e){let{transport:t,authToken:n,connectionMeta:r,events:i,clientRpc:a,rpcOptions:o={},callTimeout:s=0}=e,c=!1,l=`connecting`,u=null,d=Promise.withResolvers();function f(e,t=null){if(t?u=t:e===`connected`&&(u=null),e===l)return;let n=l;l=e,i.emit(Pb.client.connectionStatus,e,n)}let p=new Set;function m(e){for(let t of[...p])t.reject(e)}function h(){return l===`disconnected`||l===`error`?new dw(`connection`,`[devframe] Not connected to the devframe server`,{cause:u??void 0}):l===`unauthorized`?new dw(`auth`,`[devframe] Not authorized by the devframe server`,{cause:u??void 0}):null}function g(e,t){return new Promise((n,r)=>{let a=!1,o,c={reject(e){a||(l(),i.emit(Pb.client.error,e,t),r(e))}};function l(){a=!0,p.delete(c),o&&clearTimeout(o)}p.add(c),s>0&&(o=setTimeout(()=>{c.reject(new dw(`timeout`,`[devframe] RPC call "${t}" timed out after ${s}ms`))},s)),e.then(e=>{a||(l(),n(e))},e=>{if(a)return;l();let n=e instanceof Error?e:Error(String(e));i.emit(Pb.client.error,n,t),r(n)})})}let _=new Map;for(let e of r.jsonSerializableMethods??[])_.set(e,{jsonSerializable:!0});let ee=e.createChannel({definitions:_,onError(e){f(`error`,e),i.emit(Pb.client.connectionError,e),m(new dw(`connection`,`[devframe] Connection to the devframe server failed`,{cause:e}))},onDisconnected(){l!==`error`&&f(`disconnected`),m(new dw(`connection`,`[devframe] Disconnected from the devframe server`,{cause:u??void 0}))}}),v=ww(a.functions,{channel:ee,rpcOptions:o});a.register({name:Pb.broadcast.authRevoked,type:`event`,handler:()=>{c=!1;let e=new dw(`auth`,`[devframe] The devframe server revoked this client's trust`);f(`unauthorized`,e),i.emit(Pb.client.connectionError,e),m(e),i.emit(Pb.client.isTrustedUpdated,!1)}});let te=n;async function ne(e){te=e;let t=await v.$call(`anonymous:devframe:auth`,{authToken:e,ua:navigator.userAgent,origin:location.origin});if(c=t.isTrusted,c)d.resolve(!0),f(`connected`);else{let e=new dw(`auth`,`[devframe] The devframe server refused this client's credentials`);f(`unauthorized`,e),i.emit(Pb.client.connectionError,e)}return i.emit(Pb.client.isTrustedUpdated,c),t.isTrusted}async function re(e){let t=(await v.$call(`anonymous:devframe:auth:exchange`,{code:e,ua:navigator.userAgent,origin:location.origin}))?.authToken??null;return t&&(te=t,c=!0,d.resolve(!0),f(`connected`),i.emit(Pb.client.isTrustedUpdated,!0)),t}async function ie(e={}){await v.$call(`anonymous:devframe:auth:request-code`,{ua:navigator.userAgent,origin:location.origin,...e.reissue?{reissue:!0}:{}})}async function ae(){return c?!0:ne(te??``)}async function oe(e=6e4){if(c&&d.resolve(!0),e<=0)return d.promise;let t;try{return await Promise.race([d.promise,new Promise((n,r)=>{t=setTimeout(()=>{r(Error(`[devframe] Timeout waiting for rpc to be trusted`))},e)})]),c}finally{clearTimeout(t)}}return{transport:t,get isTrusted(){return c},get status(){return l},get connectionError(){return u},requestTrust:ae,requestTrustWithToken:ne,requestTrustWithCode:re,requestAuthCode:ie,ensureTrusted:oe,call:(...e)=>{let t=String(e[0]),n=h();return n?(i.emit(Pb.client.error,n,t),Promise.reject(n)):g(v.$call(...e),t)},callEvent:(...e)=>{let t=h();if(t){i.emit(Pb.client.error,t,String(e[0]));return}return v.$callEvent(...e)},callOptional:(...e)=>{let t=String(e[0]),n=h();return n?(i.emit(Pb.client.error,n,t),Promise.reject(n)):g(v.$callOptional(...e),t)},close:()=>{ee.close()}}}function Ew(e,t,n){let r=(()=>{try{return new URL(t,n.href)}catch{return new URL(n.href)}})();if(e&&typeof e==`object`){if(e.host!=null||e.port!=null){let t=e.host??`${r.hostname}:${e.port}`;return new URL(e.path??`/`,`${r.protocol}//${t}`).href}return new URL(e.path??``,r).href}let i=e??``;return/^https?:\/\//i.test(i)?i:new URL(i,r).href}function Dw(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},sseOptions:s={},callTimeout:c=0}=e,l=Ew(n.sse,r??`./`,location);return Tw({transport:`sse`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>Cw({url:l,authToken:t,definitions:e.definitions,...s,onConnected(){s.onConnected?.()},onError(t){e.onError(t),s.onError?.(t)},onDisconnected(){e.onDisconnected(),s.onDisconnected?.()}})})}function Ow(e){let{name:t,message:n,cause:r,...i}=e,a=r instanceof Error?r:kw(r)?Ow(r):r,o=a===void 0?Error(n):Error(n,{cause:a});return o.name=t,Object.assign(o,i),o}function kw(e){return typeof e==`object`&&!!e&&typeof e.message==`string`&&typeof e.name==`string`}function Aw(e){return typeof e==`object`&&!!e&&e.type===`static`&&typeof e.path==`string`}function jw(e){return typeof e==`object`&&!!e&&e.type===`query`&&typeof e.records==`object`&&e.records!==null}function Mw(e){return typeof e==`object`&&!!e&&(`output`in e||`error`in e)}function Nw(e){if(e.error)throw Ow(e.error);return e.output}function Pw(e){return e.some(e=>e!=null)}function Fw(e){return typeof e==`object`&&e&&`serialization`in e&&`data`in e?e.data:e}function Iw(e,t){let n=new Map,r=new Map;function i(e,t){return t===`structured-clone`&&Array.isArray(e)?vC(e):e}function a(e,t){return i(Fw(e),t)}async function o(e){n.has(e.path)||n.set(e.path,t(e.path).then(t=>a(t,e.serialization)));let r=await n.get(e.path);return Mw(r)?Nw(r):r}async function s(e,n){return r.has(e)||r.set(e,t(e).then(e=>a(e,n))),await r.get(e)}async function c(t,n){if(!(t in e))throw Error(`[devframe-rpc] Function "${t}" not found in dump store`);let r=e[t];if(Aw(r)){if(Pw(n))throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`);return await o(r)}if(jw(r)){let e=px(n),i=r.records[e];if(i)return Nw(await s(i,r.serialization));if(r.fallback)return Nw(await s(r.fallback,r.serialization));throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`)}if(!Pw(n))return r;throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`)}return{call:async(e,t)=>await c(e,t),callOptional:async(t,n)=>{if(t in e)return await c(t,n)},callEvent:async(e,t)=>{}}}async function Lw(e){let t=Iw(await e.fetchJsonFromBases(FC),e.fetchJsonFromBases);return{transport:`static`,isTrusted:!0,status:`connected`,connectionError:null,requestTrust:async()=>!0,requestTrustWithToken:async()=>!0,requestTrustWithCode:async()=>null,requestAuthCode:async()=>{},ensureTrusted:async()=>!0,call:(...e)=>t.call(e[0],e.slice(1)),callEvent:(...e)=>t.callEvent(e[0],e.slice(1)),callOptional:(...e)=>t.callOptional(e[0],e.slice(1)),close:()=>{}}}var Rw=``;function zw(e,t){return`${e}${Rw}${t}`}function Bw(e){let t=new Map,n=new Map;e.client.register({name:Pb.broadcast.streamingChunk,type:`event`,handler(e,n,r,i){t.get(zw(e,n))?._push(r,i)}}),e.client.register({name:Pb.broadcast.streamingEnd,type:`event`,handler(e,n,r){let i=zw(e,n),a=t.get(i);a&&(a._end(r),t.delete(i))}}),e.client.register({name:Pb.broadcast.streamingUploadCancel,type:`event`,handler(e,t){let r=zw(e,t),i=n.get(r);i&&(i.abort(`server cancelled upload`),n.delete(r))}}),e.events.on(Pb.client.isTrustedUpdated,n=>{if(n)for(let[n,r]of t){if(r.cancelled||r.done)continue;let t=n.indexOf(Rw);if(t<0)continue;let i=n.slice(0,t),a=n.slice(t+1);e.callEvent(`devframe:streaming:subscribe`,i,a,{afterSeq:r.lastSeenSeq})}});function r(n,r,i={}){let a=zw(n,r),o=t.get(a);if(o)return o;let s=wC({id:r,highWaterMark:i.highWaterMark,onOverflow(e){console.warn(`[devframe] DF0029: Stream "${n}#${r}" dropped ${e} chunk(s) after exceeding the client high-water mark.`)},onCancel(){e.callEvent(`devframe:streaming:cancel`,n,r),t.delete(a)}});if(t.set(a,s),e.isTrusted)e.callEvent(`devframe:streaming:subscribe`,n,r,{afterSeq:0});else{let i=e.events.on(Pb.client.isTrustedUpdated,o=>{o&&(i(),t.has(a)&&!s.cancelled&&!s.done&&e.callEvent(`devframe:streaming:subscribe`,n,r,{afterSeq:s.lastSeenSeq}))})}return s}function i(t,r){let i=zw(t,r),a=n.get(i);if(a)return a;let o=CC({id:r});return o.events.on(`chunk`,(n,i)=>{e.callEvent(`devframe:streaming:upload-chunk`,t,r,n,i)}),o.events.on(`end`,a=>{e.callEvent(`devframe:streaming:upload-end`,t,r,a),n.delete(i)}),n.set(i,o),o}return{subscribe:r,upload:i}}function Vw(){}var Hw=new Map;function Uw(e){let t=e.url;e.authToken&&(t=`${t}?${RC}=${encodeURIComponent(e.authToken)}`);let n=new WebSocket(t),{onConnected:r=Vw,onError:i=Vw,onDisconnected:a=Vw,definitions:o=Hw}=e;n.addEventListener(`open`,e=>{r(e)}),n.addEventListener(`error`,e=>{let t=e instanceof Error?e:Error(e.type);i(t)}),n.addEventListener(`close`,e=>{a(e)});let s=yw(o);return{close:()=>{n.close()},on:e=>{n.addEventListener(`message`,t=>{e(t.data)})},post:e=>{if(n.readyState===WebSocket.OPEN){n.send(e);return}if(n.readyState===WebSocket.CONNECTING){let t=()=>{i(),n.readyState===WebSocket.OPEN&&n.send(e)},r=()=>i();function i(){n.removeEventListener(`open`,t),n.removeEventListener(`close`,r)}n.addEventListener(`open`,t),n.addEventListener(`close`,r);return}i(Error(`Devframe WebSocket is not open; message dropped`))},serialize:s.serialize,deserialize:s.deserialize}}function Ww(e,t,n){let r=(()=>{try{return new URL(t,n.href)}catch{return new URL(n.href)}})(),i=r.protocol===`https:`?`wss:`:`ws:`;if(e&&typeof e==`object`){if(e.host!=null||e.port!=null){let t=e.host??`${r.hostname}:${e.port}`,n=new URL(e.path??`/`,`${i}//${t}`);return n.protocol=i,n.href}let t=new URL(e.path??``,r);return t.protocol=i,t.href}if(typeof e==`number`)return`${i}//${r.hostname}:${e}`;let a=e??``;if(/^wss?:\/\//i.test(a))return a;if(/^https?:\/\//i.test(a))return bx(a,/^https/i.test(a)?`wss://`:`ws://`);let o=new URL(a,r);return o.protocol=i,o.href}function Gw(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},wsOptions:s={},callTimeout:c=0}=e,l=Ww(n.websocket,r??`./`,location);return Tw({transport:`websocket`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>Uw({url:l,authToken:t,definitions:e.definitions,...s,onConnected(e){s.onConnected?.(e)},onError(t){e.onError(t),s.onError?.(t)},onDisconnected(t){e.onDisconnected(),s.onDisconnected?.(t)}})})}function Kw(e){return e.includes(`:`)}function qw(e,t){return Kw(t)?t:`${e}:${t}`}function Jw(e){return{async get(t){return(await e()).value()[t]},async set(t,n){(await e()).mutate(e=>{e[t]=n})},async delete(t){(await e()).mutate(e=>{delete e[t]})},async all(){return(await e()).value()},async onChange(t){return(await e()).on(`updated`,e=>t(e))}}}function Yw(e,t,n){let r=`devframe:settings:${n}:${t}`,i;function a(){return i||=e.sharedState.get(r,{initialValue:{}}),i}return Jw(a)}function Xw(e,t){return{global:Yw(e,t,`global`),project:Yw(e,t,`project`)}}function Zw(e,t){return{namespace:t,base:e,rpc:{namespace:t,register(n){if(Kw(n.name))throw Error(`[devframe] Scoped client RPC registration for namespace "${t}" received an already-namespaced function name "${n.name}". Pass a bare name without a ":" separator.`);e.client.register({...n,name:`${t}:${n.name}`})},call:((n,...r)=>e.call(qw(t,n),...r)),callEvent:((n,...r)=>e.callEvent(qw(t,n),...r)),callOptional:((n,...r)=>e.callOptional(qw(t,n),...r)),sharedState:((n,r)=>e.sharedState.get(qw(t,n),r)),streaming:{subscribe:(n,r,i)=>e.streaming.subscribe(qw(t,n),r,i),upload:(n,r)=>e.streaming.upload(qw(t,n),r)}},settings:Xw(e,t),scope:e.scope}}function Qw(){if(typeof document<`u`){let e=document.modelContext;if(e)return e}if(typeof navigator<`u`){let e=navigator.modelContext;if(e)return e}}function $w(e,t={}){let n=t.modelContext??Qw();if(!n)return()=>{};let r=n,i=new Map,a=new Map;function o(t,n){let o=DC(t.name),s=a.get(o);if(s&&s!==t.name){console.warn(`[devframe] WebMCP tool name "${o}" (from "${t.name}") collides with "${s}"; keeping the first registration.`);return}let c=new AbortController,l=Jb(t.type,n),u=r.registerTool({name:o,description:n.description,inputSchema:Zb(t.args),annotations:{title:n.title??t.name,readOnlyHint:l===`read`,destructiveHint:l===`destructive`},execute:n=>eT(t,e.context,n)},{signal:c.signal});u&&`then`in u&&u.then(()=>{},()=>{}),a.set(o,t.name),i.set(t.name,()=>{c.abort(),u&&`unregister`in u&&typeof u.unregister==`function`&&u.unregister(),a.delete(o)})}function s(t){let n=t?[t]:[...e.definitions.keys()];for(let t of n){i.get(t)?.(),i.delete(t);let n=e.definitions.get(t),r=n?.agent;n&&r&&o(n,r)}}s();let c=e.onChanged(e=>s(e));return()=>{c();for(let e of i.values())e();i.clear()}}async function eT(e,t,n){try{let r=$b(n,e.args?.length);return{content:[{type:`text`,text:tT(await(await qC(e,t))(...r))}]}}catch(e){return{isError:!0,content:[{type:`text`,text:nT(e)}]}}}function tT(e){return e===void 0?`undefined`:typeof e==`string`?e:JSON.stringify(e,null,2)}function nT(e){if(!(e instanceof Error))return String(e);let t=e.cause instanceof Error?` (cause: ${e.cause.message})`:``;return`${e.name}: ${e.message}${t}`}function rT(e,t){if(t.backend===`static`)return`static`;let n=t.websocket!==void 0,r=t.sse!==void 0;if(e===`websocket`){if(!n)throw Error(`[devframe] transport: 'websocket' was requested, but this server does not advertise a WebSocket endpoint`);return`websocket`}if(e===`sse`){if(!r)throw Error(`[devframe] transport: 'sse' was requested, but this server does not advertise an SSE endpoint`);return`sse`}if(t.backend===`sse`&&r)return`sse`;if(n)return`websocket`;if(r)return`sse`;throw Error(`[devframe] This server advertises no RPC transport (backend "none"), so there is nothing to connect to. Enable the WebSocket or SSE endpoint on the server, or use its static/MCP surfaces instead.`)}async function iT(e={}){let{baseURL:t=`./`,rpcOptions:n={},cacheOptions:r=!1}=e,i=mx(),a=Array.isArray(t)?t:[t],o=await uw(e),{connectionMeta:s,metaBaseUrl:c,authToken:l}=o,u=a[0]??`./`;try{u=new URL(`.`,c).href}catch{}let d=new zC({functions:[],...typeof e.cacheOptions==`object`?e.cacheOptions:{}}),f={rpc:void 0},p=new JC(f),m=e.webmcp===!1?void 0:$w(p),h,g=!1;async function _(e){let t=[u,...a.filter(e=>e!==u)].filter(e=>e!=null),n=[];for(let r of t)try{return await fetch(yx(e,r)).then(t=>{if(!t.ok)throw Error(`Failed to fetch ${e} from ${r}: ${t.status}`);return t.json()})}catch(e){n.push(e)}throw Error(`Failed to load ${e} from ${t.join(`, `)}`,{cause:n})}let ee={authToken:l,connectionMeta:s,metaBaseUrl:c,events:i,clientRpc:p,callTimeout:e.callTimeout,rpcOptions:{...n,async onRequest(e,t,i){if(await n.onRequest?.call(this,e,t,i),r&&d?.validate(e.m)){if(d.has(e.m,e.a))return i(d.cached(e.m,e.a));let n=await t(e);d.apply(e,n)}else await t(e)}}},v=rT(e.transport??`auto`,s),te=v===`static`?await Lw({fetchJsonFromBases:_}):v===`sse`?Dw({...ee,sseOptions:e.sseOptions}):Gw({...ee,wsOptions:e.wsOptions}),ne;try{ne=new BroadcastChannel(`devframe-auth`)}catch{}let re,ie=!1;function ae(e){return((...t)=>ie||!re?e(...t):re.then(()=>e(...t)))}function oe(){g=!0;try{h?.(),m?.()}finally{try{ne?.close()}finally{te.close?.()}}}let se={events:i,get isTrusted(){return te.isTrusted},get status(){return te.status},get connectionError(){return te.connectionError},get transport(){return te.transport??v},get connection(){return o},connectionMeta:s,ensureTrusted:te.ensureTrusted,requestTrust:te.requestTrust,requestTrustWithToken:async e=>(ow(e),o={...o,authToken:e},te.requestTrustWithToken(e)),requestTrustWithCode:async e=>{let t=await te.requestTrustWithCode(e);if(!t)return!1;ow(t),o={...o,authToken:t};try{ne?.postMessage({type:`auth-update`,authToken:t})}catch{}return!0},requestAuthCode:e=>te.requestAuthCode(e),call:ae(te.call),callEvent:ae(te.callEvent),callOptional:ae(te.callOptional),client:p,sharedState:void 0,services:void 0,streaming:void 0,cacheManager:d,scope:void 0,close:oe};se.sharedState=_w(se),se.streaming=Bw(se),se.services=gw(se);let ce=new Map;se.scope=(e=>{if(!e)return se;let t=ce.get(e);return t||(t=Zw(se,e),ce.set(e,t)),t}),f.rpc=se;function le(){try{return typeof window<`u`&&window.self===window.top}catch{return!1}}async function ue(){if(e.simpleAuth!==!1&&le()&&typeof globalThis.prompt==`function`)for(await se.requestAuthCode().catch(()=>{});!se.isTrusted;){let e=globalThis.prompt(`devframe: enter the authentication code shown in your terminal`);if(e==null)return;let t=e.trim();if(t&&await se.requestTrustWithCode(t))return}}async function de(){let t=await te.requestTrust(),n=e.otpParam??`devframe_otp`,r=n?await hw(se,{param:n}):!1;t||r||se.isTrusted||await ue()}return re=de().then(()=>{ie=!0},()=>{ie=!0}),s.mcp&&jC(async()=>{let{setupBrowserAgentRpcBridge:e}=await import(`./browser-agent-rpc-BXhoSh1z-DhKB9Hkz.js`);return{setupBrowserAgentRpcBridge:e}},[],import.meta.url).then(({setupBrowserAgentRpcBridge:e})=>{g||(h=e(se))}).catch(()=>{}),ne&&(ne.onmessage=e=>{e.data?.type===`auth-update`&&e.data.authToken&&se.requestTrustWithToken(e.data.authToken)}),se}var aT=iT,oT=[`components`,`injectors`,`signals`,`ngrx`,`forms`,`router`,`pipes`,`http`,`analog`],sT=[`forms`,`router`,`ngrx`,`http`,`analog`],cT={refreshMs:{default:3e3,min:500,max:8e3},navigations:{default:50,min:5,max:500},formTimeline:{default:200,min:10,max:2e3},httpCalls:{default:200,min:10,max:2e3},changeLog:{default:200,min:10,max:2e3}},lT=`ng-devtools`;function uT(e){return e&&typeof e==`object`&&!Array.isArray(e)?e:{}}function dT(e,t){return typeof e==`boolean`?e:t}var fT=100,pT=100;function mT(e){if(!Array.isArray(e))return[];let t=e.filter(e=>typeof e==`string`).map(e=>e.trim()).filter(e=>e&&e.length<=pT);return[...new Set(t)].slice(0,fT)}function hT(e,t){let{default:n,min:r,max:i}=cT[t];return typeof e!=`number`||!Number.isFinite(e)?n:Math.min(i,Math.max(r,Math.round(e)))}function gT(e,t){return Object.fromEntries(e.map(e=>[e,t(e)]))}function _T(e){let t=uT(e),n=uT(t.agent),r=uT(t.inspectors),i=uT(n.tools),a=uT(t.actions),o=dT(t.actions,!0),s=uT(t.redaction),c=uT(t.limits),l=gT(oT,e=>dT(r[e],!0));return{inspectors:l,agent:{readOnly:dT(n.readOnly,!1),tools:gT(oT,e=>l[e]&&dT(i[e],!0))},actions:gT(sT,e=>l[e]&&dT(a[e],o)),redaction:{secretNames:mT(s.secretNames),unmask:mT(s.unmask)},limits:Object.fromEntries(Object.keys(cT).map(e=>[e,hT(c[e],e)]))}}function vT(e){let t=e?.configs;return _T(t?.[lT])}function yT(e){return`${{forms:`Writing to forms`,router:`Navigating`,ngrx:`Restoring NgRx state`,http:`Changing HTTP mock rules and clearing HTTP calls`,analog:`Calling API routes`}[e]} is turned off in the devtools config (actions.${e}).`}var bT={components:`Components`,injectors:`Injectors`,signals:`Signals`,ngrx:`NgRx`,forms:`Forms`,router:`Router`,pipes:`Pipes`,http:`HTTP`,analog:`Analog`},xT={forms:`Form writes`,router:`Navigation`,ngrx:`NgRx restore`,http:`HTTP mocking`,analog:`Analog API calls`},ST={refreshMs:e=>`poll every ${e} ms`,navigations:e=>`${e} navigations`,formTimeline:e=>`${e} form events`,httpCalls:e=>`${e} HTTP calls`,changeLog:e=>`${e} NgRx changes`};function CT(e){let t=[],n=(e,n)=>{n.length&&t.push({label:e,value:n.join(`, `)})},r=oT.filter(t=>e.inspectors[t]);return n(`Inspectors off`,oT.filter(t=>!e.inspectors[t]).map(e=>bT[e])),n(`Agent`,e.agent.readOnly?[`Read-only`]:[]),n(`Hidden from the agent`,r.filter(t=>!e.agent.tools[t]).map(e=>bT[e])),n(`Blocked actions`,sT.filter(t=>e.inspectors[t]&&!e.actions[t]).map(e=>xT[e])),n(`Extra secret names`,e.redaction.secretNames),n(`Unmasked names`,e.redaction.unmask),n(`Limits`,Object.keys(cT).filter(t=>e.limits[t]!==cT[t].default).map(t=>ST[t](e.limits[t]))),t}var wT=`ng-devtools-page-id`;function TT(){try{return new URLSearchParams(location.search).get(`pageId`)||(window.top===window?null:sessionStorage.getItem(wT)||null)}catch{return null}}function ET(e){return vT(e?.connectionMeta)}function DT(e,t){return ET(e).actions[t]}var OT={components:`components`,routes:`router`,signals:`signals`,injectors:`injectors`,store:`ngrx`,forms:`forms`,pipes:`pipes`,network:`http`,analog:`analog`};function kT(e,t){let n=OT[e];return!n||t.inspectors[n]}function AT(e,t){e&1&&(ps(),U(0,`rect`,3)(1,`rect`,4)(2,`rect`,5)(3,`rect`,6))}function jT(e,t){e&1&&(ps(),U(0,`path`,7)(1,`path`,8)(2,`path`,9))}function MT(e,t){e&1&&(ps(),U(0,`circle`,10)(1,`path`,11)(2,`circle`,12))}function NT(e,t){e&1&&(ps(),U(0,`path`,1))}function PT(e,t){e&1&&(ps(),U(0,`path`,13)(1,`path`,14)(2,`path`,15)(3,`path`,16))}function FT(e,t){e&1&&(ps(),U(0,`ellipse`,17)(1,`path`,18)(2,`path`,19))}function IT(e,t){e&1&&(ps(),U(0,`rect`,20)(1,`path`,21)(2,`path`,22)(3,`path`,23))}function LT(e,t){e&1&&(ps(),U(0,`circle`,24)(1,`path`,25)(2,`path`,26))}function RT(e,t){e&1&&(ps(),U(0,`path`,27)(1,`path`,28)(2,`path`,29)(3,`path`,30)(4,`circle`,31))}function zT(e,t){e&1&&(ps(),U(0,`path`,2))}var BT=class e{name=$.required();static ɵfac=function(t){return new(t||e)};static ɵcmp=Oh({type:e,selectors:[[`app-tab-icon`]],inputs:{name:[1,`name`]},decls:11,vars:1,consts:[[`viewBox`,`0 0 24 24`,`width`,`16`,`height`,`16`,`fill`,`none`,`stroke`,`currentColor`,`stroke-width`,`1.8`,`stroke-linecap`,`round`,`stroke-linejoin`,`round`,`aria-hidden`,`true`],[`d`,`M22 12h-4l-3 9L9 3l-3 9H2`],[`d`,`m8 3 4 8 5-5 5 15H2L8 3z`],[`x`,`3`,`y`,`3`,`width`,`7`,`height`,`9`,`rx`,`1.5`],[`x`,`14`,`y`,`3`,`width`,`7`,`height`,`5`,`rx`,`1.5`],[`x`,`14`,`y`,`12`,`width`,`7`,`height`,`9`,`rx`,`1.5`],[`x`,`3`,`y`,`16`,`width`,`7`,`height`,`5`,`rx`,`1.5`],[`d`,`M12 2 3 7l9 5 9-5-9-5Z`],[`d`,`m3 12 9 5 9-5`],[`d`,`m3 17 9 5 9-5`],[`cx`,`6`,`cy`,`19`,`r`,`3`],[`d`,`M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15`],[`cx`,`18`,`cy`,`5`,`r`,`3`],[`d`,`M12 22v-5`],[`d`,`M9 8V2`],[`d`,`M15 8V2`],[`d`,`M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z`],[`cx`,`12`,`cy`,`5`,`rx`,`9`,`ry`,`3`],[`d`,`M3 5v14a9 3 0 0 0 18 0V5`],[`d`,`M3 12a9 3 0 0 0 18 0`],[`x`,`3`,`y`,`4`,`width`,`18`,`height`,`16`,`rx`,`2`],[`d`,`M7 9h10`],[`d`,`M7 13h6`],[`d`,`M7 17h8`],[`cx`,`12`,`cy`,`12`,`r`,`9`],[`d`,`M3 12h18`],[`d`,`M12 3a14 14 0 0 1 0 18a14 14 0 0 1 0-18Z`],[`d`,`M4 7h10`],[`d`,`M4 17h6`],[`d`,`m14 13 4 4-4 4`],[`d`,`M10 17h8`],[`cx`,`18`,`cy`,`7`,`r`,`3`]],template:function(e,t){if(e&1&&(ps(),V(0,`svg`,0),N(1,AT,4,0)(2,jT,3,0)(3,MT,3,0)(4,NT,1,0,`:svg:path`,1)(5,PT,4,0)(6,FT,3,0)(7,IT,4,0)(8,LT,3,0)(9,RT,5,0)(10,zT,1,0,`:svg:path`,2),H()),e&2){let e;j(),P((e=t.name())===`dashboard`?1:e===`components`?2:e===`routes`?3:e===`signals`?4:e===`injectors`?5:e===`store`?6:e===`forms`?7:e===`network`?8:e===`pipes`?9:e===`analog`?10:-1)}},styles:[`[_nghost-%COMP%] { +`))}}g()}return(async()=>{try{let e=await a(o,{headers:{accept:`text/event-stream`},signal:c.signal});if(!e.ok||!e.body)throw Error(`Devframe SSE stream request failed: ${e.status}`);await ee(e.body)}catch(e){if(c.signal.aborted){g();return}h(e instanceof Error?e:Error(String(e)))}})(),{close:()=>{l=!0,c.abort(),d?.cancel().catch(()=>{})},on:e=>{u=e},post:async e=>{let t;try{t=await m}catch{return}if(l){n(Error(`Devframe SSE channel is closed; message dropped`));return}try{let n=await a(o,{method:`POST`,headers:{"content-type":`text/plain; charset=utf-8`,[PC]:t},body:e});if(n.status===200){let e=await n.text();e&&u?.(e);return}if(!n.ok)throw Error(`Devframe SSE POST failed: ${n.status}`)}catch(e){n(e instanceof Error?e:Error(String(e)))}},serialize:s.serialize,deserialize:s.deserialize}}function ww(e,t){let{channel:n,rpcOptions:r={}}=t;return qb(e,{...n,timeout:-1,...r,proxify:!1})}function Tw(e){let{transport:t,authToken:n,connectionMeta:r,events:i,clientRpc:a,rpcOptions:o={},callTimeout:s=0}=e,c=!1,l=`connecting`,u=null,d=Promise.withResolvers();function f(e,t=null){if(t?u=t:e===`connected`&&(u=null),e===l)return;let n=l;l=e,i.emit(Pb.client.connectionStatus,e,n)}let p=new Set;function m(e){for(let t of[...p])t.reject(e)}function h(){return l===`disconnected`||l===`error`?new dw(`connection`,`[devframe] Not connected to the devframe server`,{cause:u??void 0}):l===`unauthorized`?new dw(`auth`,`[devframe] Not authorized by the devframe server`,{cause:u??void 0}):null}function g(e,t){return new Promise((n,r)=>{let a=!1,o,c={reject(e){a||(l(),i.emit(Pb.client.error,e,t),r(e))}};function l(){a=!0,p.delete(c),o&&clearTimeout(o)}p.add(c),s>0&&(o=setTimeout(()=>{c.reject(new dw(`timeout`,`[devframe] RPC call "${t}" timed out after ${s}ms`))},s)),e.then(e=>{a||(l(),n(e))},e=>{if(a)return;l();let n=e instanceof Error?e:Error(String(e));i.emit(Pb.client.error,n,t),r(n)})})}let _=new Map;for(let e of r.jsonSerializableMethods??[])_.set(e,{jsonSerializable:!0});let ee=e.createChannel({definitions:_,onError(e){f(`error`,e),i.emit(Pb.client.connectionError,e),m(new dw(`connection`,`[devframe] Connection to the devframe server failed`,{cause:e}))},onDisconnected(){l!==`error`&&f(`disconnected`),m(new dw(`connection`,`[devframe] Disconnected from the devframe server`,{cause:u??void 0}))}}),v=ww(a.functions,{channel:ee,rpcOptions:o});a.register({name:Pb.broadcast.authRevoked,type:`event`,handler:()=>{c=!1;let e=new dw(`auth`,`[devframe] The devframe server revoked this client's trust`);f(`unauthorized`,e),i.emit(Pb.client.connectionError,e),m(e),i.emit(Pb.client.isTrustedUpdated,!1)}});let te=n;async function ne(e){te=e;let t=await v.$call(`anonymous:devframe:auth`,{authToken:e,ua:navigator.userAgent,origin:location.origin});if(c=t.isTrusted,c)d.resolve(!0),f(`connected`);else{let e=new dw(`auth`,`[devframe] The devframe server refused this client's credentials`);f(`unauthorized`,e),i.emit(Pb.client.connectionError,e)}return i.emit(Pb.client.isTrustedUpdated,c),t.isTrusted}async function re(e){let t=(await v.$call(`anonymous:devframe:auth:exchange`,{code:e,ua:navigator.userAgent,origin:location.origin}))?.authToken??null;return t&&(te=t,c=!0,d.resolve(!0),f(`connected`),i.emit(Pb.client.isTrustedUpdated,!0)),t}async function ie(e={}){await v.$call(`anonymous:devframe:auth:request-code`,{ua:navigator.userAgent,origin:location.origin,...e.reissue?{reissue:!0}:{}})}async function ae(){return c?!0:ne(te??``)}async function oe(e=6e4){if(c&&d.resolve(!0),e<=0)return d.promise;let t;try{return await Promise.race([d.promise,new Promise((n,r)=>{t=setTimeout(()=>{r(Error(`[devframe] Timeout waiting for rpc to be trusted`))},e)})]),c}finally{clearTimeout(t)}}return{transport:t,get isTrusted(){return c},get status(){return l},get connectionError(){return u},requestTrust:ae,requestTrustWithToken:ne,requestTrustWithCode:re,requestAuthCode:ie,ensureTrusted:oe,call:(...e)=>{let t=String(e[0]),n=h();return n?(i.emit(Pb.client.error,n,t),Promise.reject(n)):g(v.$call(...e),t)},callEvent:(...e)=>{let t=h();if(t){i.emit(Pb.client.error,t,String(e[0]));return}return v.$callEvent(...e)},callOptional:(...e)=>{let t=String(e[0]),n=h();return n?(i.emit(Pb.client.error,n,t),Promise.reject(n)):g(v.$callOptional(...e),t)},close:()=>{ee.close()}}}function Ew(e,t,n){let r=(()=>{try{return new URL(t,n.href)}catch{return new URL(n.href)}})();if(e&&typeof e==`object`){if(e.host!=null||e.port!=null){let t=e.host??`${r.hostname}:${e.port}`;return new URL(e.path??`/`,`${r.protocol}//${t}`).href}return new URL(e.path??``,r).href}let i=e??``;return/^https?:\/\//i.test(i)?i:new URL(i,r).href}function Dw(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},sseOptions:s={},callTimeout:c=0}=e,l=Ew(n.sse,r??`./`,location);return Tw({transport:`sse`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>Cw({url:l,authToken:t,definitions:e.definitions,...s,onConnected(){s.onConnected?.()},onError(t){e.onError(t),s.onError?.(t)},onDisconnected(){e.onDisconnected(),s.onDisconnected?.()}})})}function Ow(e){let{name:t,message:n,cause:r,...i}=e,a=r instanceof Error?r:kw(r)?Ow(r):r,o=a===void 0?Error(n):Error(n,{cause:a});return o.name=t,Object.assign(o,i),o}function kw(e){return typeof e==`object`&&!!e&&typeof e.message==`string`&&typeof e.name==`string`}function Aw(e){return typeof e==`object`&&!!e&&e.type===`static`&&typeof e.path==`string`}function jw(e){return typeof e==`object`&&!!e&&e.type===`query`&&typeof e.records==`object`&&e.records!==null}function Mw(e){return typeof e==`object`&&!!e&&(`output`in e||`error`in e)}function Nw(e){if(e.error)throw Ow(e.error);return e.output}function Pw(e){return e.some(e=>e!=null)}function Fw(e){return typeof e==`object`&&e&&`serialization`in e&&`data`in e?e.data:e}function Iw(e,t){let n=new Map,r=new Map;function i(e,t){return t===`structured-clone`&&Array.isArray(e)?vC(e):e}function a(e,t){return i(Fw(e),t)}async function o(e){n.has(e.path)||n.set(e.path,t(e.path).then(t=>a(t,e.serialization)));let r=await n.get(e.path);return Mw(r)?Nw(r):r}async function s(e,n){return r.has(e)||r.set(e,t(e).then(e=>a(e,n))),await r.get(e)}async function c(t,n){if(!(t in e))throw Error(`[devframe-rpc] Function "${t}" not found in dump store`);let r=e[t];if(Aw(r)){if(Pw(n))throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`);return await o(r)}if(jw(r)){let e=px(n),i=r.records[e];if(i)return Nw(await s(i,r.serialization));if(r.fallback)return Nw(await s(r.fallback,r.serialization));throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`)}if(!Pw(n))return r;throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`)}return{call:async(e,t)=>await c(e,t),callOptional:async(t,n)=>{if(t in e)return await c(t,n)},callEvent:async(e,t)=>{}}}async function Lw(e){let t=Iw(await e.fetchJsonFromBases(FC),e.fetchJsonFromBases);return{transport:`static`,isTrusted:!0,status:`connected`,connectionError:null,requestTrust:async()=>!0,requestTrustWithToken:async()=>!0,requestTrustWithCode:async()=>null,requestAuthCode:async()=>{},ensureTrusted:async()=>!0,call:(...e)=>t.call(e[0],e.slice(1)),callEvent:(...e)=>t.callEvent(e[0],e.slice(1)),callOptional:(...e)=>t.callOptional(e[0],e.slice(1)),close:()=>{}}}var Rw=``;function zw(e,t){return`${e}${Rw}${t}`}function Bw(e){let t=new Map,n=new Map;e.client.register({name:Pb.broadcast.streamingChunk,type:`event`,handler(e,n,r,i){t.get(zw(e,n))?._push(r,i)}}),e.client.register({name:Pb.broadcast.streamingEnd,type:`event`,handler(e,n,r){let i=zw(e,n),a=t.get(i);a&&(a._end(r),t.delete(i))}}),e.client.register({name:Pb.broadcast.streamingUploadCancel,type:`event`,handler(e,t){let r=zw(e,t),i=n.get(r);i&&(i.abort(`server cancelled upload`),n.delete(r))}}),e.events.on(Pb.client.isTrustedUpdated,n=>{if(n)for(let[n,r]of t){if(r.cancelled||r.done)continue;let t=n.indexOf(Rw);if(t<0)continue;let i=n.slice(0,t),a=n.slice(t+1);e.callEvent(`devframe:streaming:subscribe`,i,a,{afterSeq:r.lastSeenSeq})}});function r(n,r,i={}){let a=zw(n,r),o=t.get(a);if(o)return o;let s=wC({id:r,highWaterMark:i.highWaterMark,onOverflow(e){console.warn(`[devframe] DF0029: Stream "${n}#${r}" dropped ${e} chunk(s) after exceeding the client high-water mark.`)},onCancel(){e.callEvent(`devframe:streaming:cancel`,n,r),t.delete(a)}});if(t.set(a,s),e.isTrusted)e.callEvent(`devframe:streaming:subscribe`,n,r,{afterSeq:0});else{let i=e.events.on(Pb.client.isTrustedUpdated,o=>{o&&(i(),t.has(a)&&!s.cancelled&&!s.done&&e.callEvent(`devframe:streaming:subscribe`,n,r,{afterSeq:s.lastSeenSeq}))})}return s}function i(t,r){let i=zw(t,r),a=n.get(i);if(a)return a;let o=CC({id:r});return o.events.on(`chunk`,(n,i)=>{e.callEvent(`devframe:streaming:upload-chunk`,t,r,n,i)}),o.events.on(`end`,a=>{e.callEvent(`devframe:streaming:upload-end`,t,r,a),n.delete(i)}),n.set(i,o),o}return{subscribe:r,upload:i}}function Vw(){}var Hw=new Map;function Uw(e){let t=e.url;e.authToken&&(t=`${t}?${RC}=${encodeURIComponent(e.authToken)}`);let n=new WebSocket(t),{onConnected:r=Vw,onError:i=Vw,onDisconnected:a=Vw,definitions:o=Hw}=e;n.addEventListener(`open`,e=>{r(e)}),n.addEventListener(`error`,e=>{let t=e instanceof Error?e:Error(e.type);i(t)}),n.addEventListener(`close`,e=>{a(e)});let s=yw(o);return{close:()=>{n.close()},on:e=>{n.addEventListener(`message`,t=>{e(t.data)})},post:e=>{if(n.readyState===WebSocket.OPEN){n.send(e);return}if(n.readyState===WebSocket.CONNECTING){let t=()=>{i(),n.readyState===WebSocket.OPEN&&n.send(e)},r=()=>i();function i(){n.removeEventListener(`open`,t),n.removeEventListener(`close`,r)}n.addEventListener(`open`,t),n.addEventListener(`close`,r);return}i(Error(`Devframe WebSocket is not open; message dropped`))},serialize:s.serialize,deserialize:s.deserialize}}function Ww(e,t,n){let r=(()=>{try{return new URL(t,n.href)}catch{return new URL(n.href)}})(),i=r.protocol===`https:`?`wss:`:`ws:`;if(e&&typeof e==`object`){if(e.host!=null||e.port!=null){let t=e.host??`${r.hostname}:${e.port}`,n=new URL(e.path??`/`,`${i}//${t}`);return n.protocol=i,n.href}let t=new URL(e.path??``,r);return t.protocol=i,t.href}if(typeof e==`number`)return`${i}//${r.hostname}:${e}`;let a=e??``;if(/^wss?:\/\//i.test(a))return a;if(/^https?:\/\//i.test(a))return bx(a,/^https/i.test(a)?`wss://`:`ws://`);let o=new URL(a,r);return o.protocol=i,o.href}function Gw(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},wsOptions:s={},callTimeout:c=0}=e,l=Ww(n.websocket,r??`./`,location);return Tw({transport:`websocket`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>Uw({url:l,authToken:t,definitions:e.definitions,...s,onConnected(e){s.onConnected?.(e)},onError(t){e.onError(t),s.onError?.(t)},onDisconnected(t){e.onDisconnected(),s.onDisconnected?.(t)}})})}function Kw(e){return e.includes(`:`)}function qw(e,t){return Kw(t)?t:`${e}:${t}`}function Jw(e){return{async get(t){return(await e()).value()[t]},async set(t,n){(await e()).mutate(e=>{e[t]=n})},async delete(t){(await e()).mutate(e=>{delete e[t]})},async all(){return(await e()).value()},async onChange(t){return(await e()).on(`updated`,e=>t(e))}}}function Yw(e,t,n){let r=`devframe:settings:${n}:${t}`,i;function a(){return i||=e.sharedState.get(r,{initialValue:{}}),i}return Jw(a)}function Xw(e,t){return{global:Yw(e,t,`global`),project:Yw(e,t,`project`)}}function Zw(e,t){return{namespace:t,base:e,rpc:{namespace:t,register(n){if(Kw(n.name))throw Error(`[devframe] Scoped client RPC registration for namespace "${t}" received an already-namespaced function name "${n.name}". Pass a bare name without a ":" separator.`);e.client.register({...n,name:`${t}:${n.name}`})},call:((n,...r)=>e.call(qw(t,n),...r)),callEvent:((n,...r)=>e.callEvent(qw(t,n),...r)),callOptional:((n,...r)=>e.callOptional(qw(t,n),...r)),sharedState:((n,r)=>e.sharedState.get(qw(t,n),r)),streaming:{subscribe:(n,r,i)=>e.streaming.subscribe(qw(t,n),r,i),upload:(n,r)=>e.streaming.upload(qw(t,n),r)}},settings:Xw(e,t),scope:e.scope}}function Qw(){if(typeof document<`u`){let e=document.modelContext;if(e)return e}if(typeof navigator<`u`){let e=navigator.modelContext;if(e)return e}}function $w(e,t={}){let n=t.modelContext??Qw();if(!n)return()=>{};let r=n,i=new Map,a=new Map;function o(t,n){let o=DC(t.name),s=a.get(o);if(s&&s!==t.name){console.warn(`[devframe] WebMCP tool name "${o}" (from "${t.name}") collides with "${s}"; keeping the first registration.`);return}let c=new AbortController,l=Jb(t.type,n),u=r.registerTool({name:o,description:n.description,inputSchema:Zb(t.args),annotations:{title:n.title??t.name,readOnlyHint:l===`read`,destructiveHint:l===`destructive`},execute:n=>eT(t,e.context,n)},{signal:c.signal});u&&`then`in u&&u.then(()=>{},()=>{}),a.set(o,t.name),i.set(t.name,()=>{c.abort(),u&&`unregister`in u&&typeof u.unregister==`function`&&u.unregister(),a.delete(o)})}function s(t){let n=t?[t]:[...e.definitions.keys()];for(let t of n){i.get(t)?.(),i.delete(t);let n=e.definitions.get(t),r=n?.agent;n&&r&&o(n,r)}}s();let c=e.onChanged(e=>s(e));return()=>{c();for(let e of i.values())e();i.clear()}}async function eT(e,t,n){try{let r=$b(n,e.args?.length);return{content:[{type:`text`,text:tT(await(await qC(e,t))(...r))}]}}catch(e){return{isError:!0,content:[{type:`text`,text:nT(e)}]}}}function tT(e){return e===void 0?`undefined`:typeof e==`string`?e:JSON.stringify(e,null,2)}function nT(e){if(!(e instanceof Error))return String(e);let t=e.cause instanceof Error?` (cause: ${e.cause.message})`:``;return`${e.name}: ${e.message}${t}`}function rT(e,t){if(t.backend===`static`)return`static`;let n=t.websocket!==void 0,r=t.sse!==void 0;if(e===`websocket`){if(!n)throw Error(`[devframe] transport: 'websocket' was requested, but this server does not advertise a WebSocket endpoint`);return`websocket`}if(e===`sse`){if(!r)throw Error(`[devframe] transport: 'sse' was requested, but this server does not advertise an SSE endpoint`);return`sse`}if(t.backend===`sse`&&r)return`sse`;if(n)return`websocket`;if(r)return`sse`;throw Error(`[devframe] This server advertises no RPC transport (backend "none"), so there is nothing to connect to. Enable the WebSocket or SSE endpoint on the server, or use its static/MCP surfaces instead.`)}async function iT(e={}){let{baseURL:t=`./`,rpcOptions:n={},cacheOptions:r=!1}=e,i=mx(),a=Array.isArray(t)?t:[t],o=await uw(e),{connectionMeta:s,metaBaseUrl:c,authToken:l}=o,u=a[0]??`./`;try{u=new URL(`.`,c).href}catch{}let d=new zC({functions:[],...typeof e.cacheOptions==`object`?e.cacheOptions:{}}),f={rpc:void 0},p=new JC(f),m=e.webmcp===!1?void 0:$w(p),h,g=!1;async function _(e){let t=[u,...a.filter(e=>e!==u)].filter(e=>e!=null),n=[];for(let r of t)try{return await fetch(yx(e,r)).then(t=>{if(!t.ok)throw Error(`Failed to fetch ${e} from ${r}: ${t.status}`);return t.json()})}catch(e){n.push(e)}throw Error(`Failed to load ${e} from ${t.join(`, `)}`,{cause:n})}let ee={authToken:l,connectionMeta:s,metaBaseUrl:c,events:i,clientRpc:p,callTimeout:e.callTimeout,rpcOptions:{...n,async onRequest(e,t,i){if(await n.onRequest?.call(this,e,t,i),r&&d?.validate(e.m)){if(d.has(e.m,e.a))return i(d.cached(e.m,e.a));let n=await t(e);d.apply(e,n)}else await t(e)}}},v=rT(e.transport??`auto`,s),te=v===`static`?await Lw({fetchJsonFromBases:_}):v===`sse`?Dw({...ee,sseOptions:e.sseOptions}):Gw({...ee,wsOptions:e.wsOptions}),ne;try{ne=new BroadcastChannel(`devframe-auth`)}catch{}let re,ie=!1;function ae(e){return((...t)=>ie||!re?e(...t):re.then(()=>e(...t)))}function oe(){g=!0;try{h?.(),m?.()}finally{try{ne?.close()}finally{te.close?.()}}}let se={events:i,get isTrusted(){return te.isTrusted},get status(){return te.status},get connectionError(){return te.connectionError},get transport(){return te.transport??v},get connection(){return o},connectionMeta:s,ensureTrusted:te.ensureTrusted,requestTrust:te.requestTrust,requestTrustWithToken:async e=>(ow(e),o={...o,authToken:e},te.requestTrustWithToken(e)),requestTrustWithCode:async e=>{let t=await te.requestTrustWithCode(e);if(!t)return!1;ow(t),o={...o,authToken:t};try{ne?.postMessage({type:`auth-update`,authToken:t})}catch{}return!0},requestAuthCode:e=>te.requestAuthCode(e),call:ae(te.call),callEvent:ae(te.callEvent),callOptional:ae(te.callOptional),client:p,sharedState:void 0,services:void 0,streaming:void 0,cacheManager:d,scope:void 0,close:oe};se.sharedState=_w(se),se.streaming=Bw(se),se.services=gw(se);let ce=new Map;se.scope=(e=>{if(!e)return se;let t=ce.get(e);return t||(t=Zw(se,e),ce.set(e,t)),t}),f.rpc=se;function le(){try{return typeof window<`u`&&window.self===window.top}catch{return!1}}async function ue(){if(e.simpleAuth!==!1&&le()&&typeof globalThis.prompt==`function`)for(await se.requestAuthCode().catch(()=>{});!se.isTrusted;){let e=globalThis.prompt(`devframe: enter the authentication code shown in your terminal`);if(e==null)return;let t=e.trim();if(t&&await se.requestTrustWithCode(t))return}}async function de(){let t=await te.requestTrust(),n=e.otpParam??`devframe_otp`,r=n?await hw(se,{param:n}):!1;t||r||se.isTrusted||await ue()}return re=de().then(()=>{ie=!0},()=>{ie=!0}),s.mcp&&jC(async()=>{let{setupBrowserAgentRpcBridge:e}=await import(`./browser-agent-rpc-BXhoSh1z-Dkf4zF1R.js`);return{setupBrowserAgentRpcBridge:e}},[],import.meta.url).then(({setupBrowserAgentRpcBridge:e})=>{g||(h=e(se))}).catch(()=>{}),ne&&(ne.onmessage=e=>{e.data?.type===`auth-update`&&e.data.authToken&&se.requestTrustWithToken(e.data.authToken)}),se}var aT=iT,oT=[`components`,`injectors`,`signals`,`ngrx`,`forms`,`router`,`pipes`,`http`,`analog`],sT=[`forms`,`router`,`ngrx`,`http`,`analog`],cT={refreshMs:{default:3e3,min:500,max:8e3},navigations:{default:50,min:5,max:500},formTimeline:{default:200,min:10,max:2e3},httpCalls:{default:200,min:10,max:2e3},changeLog:{default:200,min:10,max:2e3}},lT=`ng-devtools`;function uT(e){return e&&typeof e==`object`&&!Array.isArray(e)?e:{}}function dT(e,t){return typeof e==`boolean`?e:t}var fT=100,pT=100;function mT(e){if(!Array.isArray(e))return[];let t=e.filter(e=>typeof e==`string`).map(e=>e.trim()).filter(e=>e&&e.length<=pT);return[...new Set(t)].slice(0,fT)}function hT(e,t){let{default:n,min:r,max:i}=cT[t];return typeof e!=`number`||!Number.isFinite(e)?n:Math.min(i,Math.max(r,Math.round(e)))}function gT(e,t){return Object.fromEntries(e.map(e=>[e,t(e)]))}function _T(e){let t=uT(e),n=uT(t.agent),r=uT(t.inspectors),i=uT(n.tools),a=uT(t.actions),o=dT(t.actions,!0),s=uT(t.redaction),c=uT(t.limits),l=gT(oT,e=>dT(r[e],!0));return{inspectors:l,agent:{readOnly:dT(n.readOnly,!1),tools:gT(oT,e=>l[e]&&dT(i[e],!0))},actions:gT(sT,e=>l[e]&&dT(a[e],o)),redaction:{secretNames:mT(s.secretNames),unmask:mT(s.unmask)},limits:Object.fromEntries(Object.keys(cT).map(e=>[e,hT(c[e],e)]))}}function vT(e){let t=e?.configs;return _T(t?.[lT])}function yT(e){return`${{forms:`Writing to forms`,router:`Navigating`,ngrx:`Restoring NgRx state`,http:`Changing HTTP mock rules and clearing HTTP calls`,analog:`Calling API routes`}[e]} is turned off in the devtools config (actions.${e}).`}var bT={components:`Components`,injectors:`Injectors`,signals:`Signals`,ngrx:`NgRx`,forms:`Forms`,router:`Router`,pipes:`Pipes`,http:`HTTP`,analog:`Analog`},xT={forms:`Form writes`,router:`Navigation`,ngrx:`NgRx restore`,http:`HTTP mocking`,analog:`Analog API calls`},ST={refreshMs:e=>`poll every ${e} ms`,navigations:e=>`${e} navigations`,formTimeline:e=>`${e} form events`,httpCalls:e=>`${e} HTTP calls`,changeLog:e=>`${e} NgRx changes`};function CT(e){let t=[],n=(e,n)=>{n.length&&t.push({label:e,value:n.join(`, `)})},r=oT.filter(t=>e.inspectors[t]);return n(`Inspectors off`,oT.filter(t=>!e.inspectors[t]).map(e=>bT[e])),n(`Agent`,e.agent.readOnly?[`Read-only`]:[]),n(`Hidden from the agent`,r.filter(t=>!e.agent.tools[t]).map(e=>bT[e])),n(`Blocked actions`,sT.filter(t=>e.inspectors[t]&&!e.actions[t]).map(e=>xT[e])),n(`Extra secret names`,e.redaction.secretNames),n(`Unmasked names`,e.redaction.unmask),n(`Limits`,Object.keys(cT).filter(t=>e.limits[t]!==cT[t].default).map(t=>ST[t](e.limits[t]))),t}var wT=`ng-devtools-page-id`;function TT(){try{return new URLSearchParams(location.search).get(`pageId`)||(window.top===window?null:sessionStorage.getItem(wT)||null)}catch{return null}}function ET(e){return vT(e?.connectionMeta)}function DT(e,t){return ET(e).actions[t]}var OT={components:`components`,routes:`router`,signals:`signals`,injectors:`injectors`,store:`ngrx`,forms:`forms`,pipes:`pipes`,network:`http`,analog:`analog`};function kT(e,t){let n=OT[e];return!n||t.inspectors[n]}function AT(e,t){e&1&&(ps(),U(0,`rect`,3)(1,`rect`,4)(2,`rect`,5)(3,`rect`,6))}function jT(e,t){e&1&&(ps(),U(0,`path`,7)(1,`path`,8)(2,`path`,9))}function MT(e,t){e&1&&(ps(),U(0,`circle`,10)(1,`path`,11)(2,`circle`,12))}function NT(e,t){e&1&&(ps(),U(0,`path`,1))}function PT(e,t){e&1&&(ps(),U(0,`path`,13)(1,`path`,14)(2,`path`,15)(3,`path`,16))}function FT(e,t){e&1&&(ps(),U(0,`ellipse`,17)(1,`path`,18)(2,`path`,19))}function IT(e,t){e&1&&(ps(),U(0,`rect`,20)(1,`path`,21)(2,`path`,22)(3,`path`,23))}function LT(e,t){e&1&&(ps(),U(0,`circle`,24)(1,`path`,25)(2,`path`,26))}function RT(e,t){e&1&&(ps(),U(0,`path`,27)(1,`path`,28)(2,`path`,29)(3,`path`,30)(4,`circle`,31))}function zT(e,t){e&1&&(ps(),U(0,`path`,2))}var BT=class e{name=$.required();static ɵfac=function(t){return new(t||e)};static ɵcmp=Oh({type:e,selectors:[[`app-tab-icon`]],inputs:{name:[1,`name`]},decls:11,vars:1,consts:[[`viewBox`,`0 0 24 24`,`width`,`16`,`height`,`16`,`fill`,`none`,`stroke`,`currentColor`,`stroke-width`,`1.8`,`stroke-linecap`,`round`,`stroke-linejoin`,`round`,`aria-hidden`,`true`],[`d`,`M22 12h-4l-3 9L9 3l-3 9H2`],[`d`,`m8 3 4 8 5-5 5 15H2L8 3z`],[`x`,`3`,`y`,`3`,`width`,`7`,`height`,`9`,`rx`,`1.5`],[`x`,`14`,`y`,`3`,`width`,`7`,`height`,`5`,`rx`,`1.5`],[`x`,`14`,`y`,`12`,`width`,`7`,`height`,`9`,`rx`,`1.5`],[`x`,`3`,`y`,`16`,`width`,`7`,`height`,`5`,`rx`,`1.5`],[`d`,`M12 2 3 7l9 5 9-5-9-5Z`],[`d`,`m3 12 9 5 9-5`],[`d`,`m3 17 9 5 9-5`],[`cx`,`6`,`cy`,`19`,`r`,`3`],[`d`,`M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15`],[`cx`,`18`,`cy`,`5`,`r`,`3`],[`d`,`M12 22v-5`],[`d`,`M9 8V2`],[`d`,`M15 8V2`],[`d`,`M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z`],[`cx`,`12`,`cy`,`5`,`rx`,`9`,`ry`,`3`],[`d`,`M3 5v14a9 3 0 0 0 18 0V5`],[`d`,`M3 12a9 3 0 0 0 18 0`],[`x`,`3`,`y`,`4`,`width`,`18`,`height`,`16`,`rx`,`2`],[`d`,`M7 9h10`],[`d`,`M7 13h6`],[`d`,`M7 17h8`],[`cx`,`12`,`cy`,`12`,`r`,`9`],[`d`,`M3 12h18`],[`d`,`M12 3a14 14 0 0 1 0 18a14 14 0 0 1 0-18Z`],[`d`,`M4 7h10`],[`d`,`M4 17h6`],[`d`,`m14 13 4 4-4 4`],[`d`,`M10 17h8`],[`cx`,`18`,`cy`,`7`,`r`,`3`]],template:function(e,t){if(e&1&&(ps(),V(0,`svg`,0),N(1,AT,4,0)(2,jT,3,0)(3,MT,3,0)(4,NT,1,0,`:svg:path`,1)(5,PT,4,0)(6,FT,3,0)(7,IT,4,0)(8,LT,3,0)(9,RT,5,0)(10,zT,1,0,`:svg:path`,2),H()),e&2){let e;j(),P((e=t.name())===`dashboard`?1:e===`components`?2:e===`routes`?3:e===`signals`?4:e===`injectors`?5:e===`store`?6:e===`forms`?7:e===`network`?8:e===`pipes`?9:e===`analog`?10:-1)}},styles:[`[_nghost-%COMP%] { display: inline-flex; flex-shrink: 0; }`]})},VT=(e,t)=>t.tab,HT=(e,t)=>t.label;function UT(e,t){e&1&&Y(0),e&2&&Z(` `,q().meta()?.projectName,` `)}function WT(e,t){e&1&&Y(0,` Project details unavailable `)}function GT(e,t){e&1&&Y(0,` Loading… `)}function KT(e,t){e&1&&(R(0,`p`,4),Y(1,`Check that the dev server is running, then reload the panel.`),z())}function qT(e,t){e&1&&(R(0,`li`,6)(1,`span`),Y(2,`Analog`),z(),Y(3),z()),e&2&&(j(3),X(t))}function JT(e,t){if(e&1&&(R(0,`span`,17),Y(1),z(),R(2,`span`,18),Y(3),z()),e&2){let e=q().$implicit,t=q();j(),X(t.cards()[e.tab]?.value),j(2),X(t.cards()[e.tab]?.sub)}}function YT(e,t){e&1&&(R(0,`span`,19),Y(1,`–`),z(),R(2,`span`,18),Y(3,`Count unavailable`),z())}function XT(e,t){e&1&&(B(0,`span`,20),R(1,`span`,18),Y(2,`Counting…`),z())}function ZT(e,t){if(e&1){let e=W();R(0,`button`,11),G(`click`,function(){let t=O(e).$implicit;return k(q().navigate.emit(t.tab))}),R(1,`span`,12)(2,`span`,13),B(3,`app-tab-icon`,14),z(),R(4,`span`,15),Y(5,`→`),z()(),R(6,`span`,16),Y(7),z(),N(8,JT,4,2)(9,YT,4,0)(10,XT,3,0),z()}if(e&2){let e,n=t.$implicit,r=t.$index,i=q().stateOf(n.tab);n_(`animation-delay`,60*r,`ms`),M(`aria-busy`,i===`loading`),j(3),L(`name`,n.tab),j(4),X(n.label),j(),P((e=i)===`ready`?8:e===`error`?9:10)}}function QT(e,t){if(e&1&&(R(0,`div`)(1,`dt`),Y(2),z(),R(3,`dd`),Y(4),z()()),e&2){let e=t.$implicit;j(2),X(e.label),j(2),X(e.value)}}function $T(e,t){if(e&1&&(R(0,`dl`),F(1,QT,5,2,`div`,null,HT),z()),e&2){let e=q();j(),I(e.configItems())}}function eE(e,t){e&1&&(R(0,`p`),Y(1,`Defaults`),z())}var tE=[{tab:`components`,label:`Components`},{tab:`routes`,label:`Routes`},{tab:`signals`,label:`Signals`},{tab:`injectors`,label:`Injectors`},{tab:`store`,label:`NgRx declarations`},{tab:`pipes`,label:`Pipes`}],nE=new Set([`signal`,`computed`,`linkedSignal`,`effect`]),rE={action:[`action`,`actions`],reducer:[`reducer`,`reducers`],effect:[`effect`,`effects`],selector:[`selector`,`selectors`],feature:[`feature`,`features`],"store-setup":[`setup call`,`setup calls`],"signal-store":[`signal store`,`signal stores`],"signal-state":[`signal state`,`signal states`],"signal-method":[`signal method`,`signal methods`]};function iE(e,t,n){return`${e} ${e===1?t:n}`}function aE(e,t){for(let n of e??[])t(n),aE(n.children,t)}function oE(e){if(!e.some(e=>e.kind))return{value:e.length,sub:`discovered in source`};let t=e.filter(e=>e.kind===`directive`).length;return{value:e.length-t,sub:`components · ${iE(t,`directive`,`directives`)}`}}function sE(e){if(!e.some(e=>e.kind))return{value:e.length,sub:`route entries in source`};let t=e.filter(e=>e.kind===`redirect`).length;return{value:new Set(e.filter(e=>e.kind===`page`).map(e=>e.fullPath??e.path??``)).size,sub:`navigable paths · ${iE(t,`redirect`,`redirects`)}`}}function cE(e){let t=new Map;for(let n of e)n.kind&&t.set(n.kind,(t.get(n.kind)??0)+1);if(!t.size)return{value:e.length,sub:`declarations in source`};let n=[...t].sort((e,t)=>t[1]-e[1]).map(([e,t])=>{let[n,r]=rE[e]??[e,e];return iE(t,n,r)});return{value:e.length,sub:n.join(` · `)}}var lE=class e{rpc=$(null);navigate=av();meta=A(null);config=Q(()=>ET(this.rpc()));stats=Q(()=>tE.filter(e=>kT(e.tab,this.config())));configItems=Q(()=>CT(this.config()));metaState=A(`loading`);states=A({});rows=A({});injectorTree=A(null);signalGraph=A(null);pageId=TT();destroyRef=E(ws);stopLive=[];liveInjectors=Q(()=>{let e=this.injectorTree();if(!e?.roots?.length)return null;let t=0,n=0,r=e=>{t++,n+=e.providers?.length??0};return aE(e.roots,r),aE(e.environment,r),{injectors:t,providers:n}});liveSignals=Q(()=>{let e=this.signalGraph(),t=this.pageId&&e?.pages?.[this.pageId]||e?.graph;return t?.nodes?.length?t.nodes.filter(e=>nE.has(e.kind??``)).length:null});cards=Q(()=>{let e=this.rows(),t={};if(e.components&&(t.components=oE(e.components)),e.routes&&(t.routes=sE(e.routes)),e.store&&(t.store=cE(e.store)),e.pipes){let n=e.pipes.filter(e=>e.builtin).length;t.pipes={value:e.pipes.length-n,sub:n?`custom pipes · ${n} built-in in use`:`custom pipes in source`}}let n=this.liveSignals();n===null?e.signals&&(t.signals={value:e.signals.length,sub:`signal declarations in source`}):t.signals={value:n,sub:e.signals?`live on the page · ${e.signals.length} declared in source`:`live on the page`};let r=this.liveInjectors();return r?t.injectors={value:r.injectors,sub:`live injectors · ${iE(r.providers,`provider`,`providers`)}`}:e.injectors&&(t.injectors={value:e.injectors.filter(e=>e.type!==`injection`).length,sub:`provider declarations in source`}),t});constructor(){dc(()=>{let e=this.rpc();if(!e)return;let t=e.scope(`ng-devtools`);this.metaState.set(`loading`),this.states.set({}),this.rows.set({}),t.rpc.call(`build-meta`).then(e=>{this.meta.set(e),this.metaState.set(`ready`)}).catch(()=>this.metaState.set(`error`));let n=ET(e),r=e=>kT(e,n);r(`components`)&&this.load(t.rpc.call(`get-components`),`components`),r(`routes`)&&this.load(t.rpc.call(`get-routes`),`routes`),r(`signals`)&&this.load(t.rpc.call(`get-signals`),`signals`),r(`injectors`)&&this.load(t.rpc.call(`get-providers`),`injectors`),r(`store`)&&this.load(t.rpc.call(`get-ngrx-store`),`store`),r(`pipes`)&&this.load(t.rpc.call(`get-pipes`),`pipes`),this.watchLive(e,n)}),this.destroyRef.onDestroy(()=>this.unwatch())}stateOf(e){return(e===`signals`?this.liveSignals():e===`injectors`?this.liveInjectors():null)===null?this.states()[e]??`loading`:`ready`}load(e,t){let n=e=>this.states.update(n=>({...n,[t]:e}));e.then(e=>{this.rows.update(n=>({...n,[t]:Array.isArray(e)?e:[]})),n(`ready`)}).catch(()=>n(`error`))}async watchLive(e,t){this.unwatch();let n=e.scope(`ng-devtools`).rpc,r=async(t,r)=>{try{let i=await n.sharedState(t);if(this.destroyRef.destroyed||this.rpc()!==e)return;r(i.value()),this.stopLive.push(i.on(`updated`,e=>r(e)))}catch{r(null)}};await Promise.all([t.inspectors.injectors&&r(`injector-tree`,e=>this.injectorTree.set(e)),t.inspectors.signals&&r(`signal-graph`,e=>this.signalGraph.set(e))])}unwatch(){for(let e of this.stopLive.splice(0))e()}static ɵfac=function(t){return new(t||e)};static ɵcmp=Oh({type:e,selectors:[[`app-dashboard`]],inputs:{rpc:[1,`rpc`]},outputs:{navigate:`navigate`},decls:31,vars:12,consts:[[`aria-labelledby`,`project-title`,1,`project`],[1,`project-head`],[1,`eyebrow`],[`id`,`project-title`],[1,`hint`],[1,`chips`],[1,`analog`],[1,`grid`],[`type`,`button`,1,`stat`,3,`animation-delay`],[`aria-labelledby`,`config-title`,1,`config`],[`id`,`config-title`],[`type`,`button`,1,`stat`,3,`click`],[1,`top`],[1,`icon`],[3,`name`],[`aria-hidden`,`true`,1,`go`],[1,`label`],[1,`big`],[1,`sub`],[1,`big`,`muted`],[`aria-hidden`,`true`,1,`big`,`skeleton`]],template:function(e,t){if(e&1&&(R(0,`section`,0)(1,`div`,1)(2,`p`,2),Y(3,`Project`),z(),R(4,`h2`,3),N(5,UT,1,1)(6,WT,1,0)(7,GT,1,0),z(),N(8,KT,2,0,`p`,4),z(),R(9,`ul`,5)(10,`li`)(11,`span`),Y(12,`Angular`),z(),Y(13),z(),R(14,`li`)(15,`span`),Y(16,`TypeScript`),z(),Y(17),z(),R(18,`li`)(19,`span`),Y(20,`SSR`),z(),Y(21),z(),N(22,qT,4,1,`li`,6),z()(),R(23,`div`,7),F(24,ZT,11,6,`button`,8,VT),z(),R(26,`section`,9)(27,`h2`,10),Y(28,`Configuration`),z(),N(29,$T,3,0,`dl`)(30,eE,2,0,`p`),z()),e&2){let e,n;M(`aria-busy`,t.metaState()===`loading`),j(4),J(`muted`,t.metaState()!==`ready`),j(),P((e=t.metaState())===`ready`?5:e===`error`?6:7),j(3),P(t.metaState()===`error`?8:-1),j(),J(`pending`,t.metaState()===`loading`),j(4),X(t.meta()?.angularVersion??`…`),j(4),X(t.meta()?.typescript??`…`),j(4),X(t.meta()?t.meta()?.ssr?`On`:`Off`:`…`),j(),P((n=t.meta()?.analog)?22:-1,n),j(2),I(t.stats()),j(5),P(t.configItems().length?29:30)}},dependencies:[BT],styles:[`[_nghost-%COMP%] { @@ -11508,7 +11508,157 @@ h2[_ngcontent-%COMP%] { transition: none; } } -`;function Ez(e,t=50){let n=e?.querySelector(`devframes-dock-standalone`)?.shadowRoot;if(n){if(n.querySelector(`style[data-ng-devtools]`))return;let t=e.createElement(`style`);t.dataset.ngDevtools=``,t.textContent=Tz,n.append(t);return}t>0&&setTimeout(()=>Ez(e,t-1),100)}var Dz=`__DEVFRAME_HUB_CLIENT_CONTEXT__`,Oz=`ng-devtools:`;function kz(){try{return window.parent===window?void 0:window.parent[Dz]}catch{return}}function Az(e,t,n=50){let r=kz();if(!r){if(n<=0||window.parent===window)return()=>{};let r=()=>{},i=setTimeout(()=>r=Az(e,t,n-1),100);return()=>{clearTimeout(i),r()}}let i=e.map(e=>r.docks.getStateById(Oz+e)?.events.on(`entry:activated`,()=>t(e))??(()=>{})),a=r.docks.selectedId,o=e.find(e=>Oz+e===a);return o&&t(o),()=>i.forEach(e=>e())}async function jz(e){let t=kz();if(!t)return!1;try{return await t.docks.switchEntry(Oz+e)}catch{return!1}}var Mz=[`nav`],Nz=[`main`],Pz=(e,t)=>t.id;function Fz(e,t){e&1&&(ps(),R(0,`svg`,4),B(1,`path`,17),z())}function Iz(e,t){e&1&&(ps(),R(0,`svg`,4),B(1,`path`,18)(2,`path`,19)(3,`path`,20)(4,`path`,21)(5,`path`,22)(6,`path`,23),z())}function Lz(e,t){e&1&&(ps(),R(0,`svg`,5),B(1,`path`,24)(2,`path`,25)(3,`path`,26)(4,`path`,27),z())}function Rz(e,t){e&1&&(ps(),R(0,`svg`,6),B(1,`path`,28),z())}function zz(e,t){e&1&&(ps(),R(0,`svg`,7)(1,`defs`)(2,`linearGradient`,29),B(3,`stop`,30)(4,`stop`,31)(5,`stop`,32)(6,`stop`,33)(7,`stop`,34)(8,`stop`,35),z()(),B(9,`path`,36),z())}function Bz(e,t){e&1&&(ps(),R(0,`svg`,8),B(1,`path`,37),z())}function Vz(e,t){if(e&1){let e=W();R(0,`button`,39),G(`click`,function(){let t=O(e).$implicit;return k(q(2).switchTab(t.id))}),B(1,`app-tab-icon`,40),R(2,`span`),Y(3),z()()}if(e&2){let e=t.$implicit,n=q(2);J(`active`,n.tab()===e.id),M(`aria-current`,n.tab()===e.id?`page`:null),j(),L(`name`,e.id),j(2),X(e.label)}}function Hz(e,t){e&1&&F(0,Vz,4,5,`button`,38,Pz),e&2&&I(q().tabs())}function Uz(e,t){e&1&&(R(0,`p`,14),Y(1,` Can't reach the devtools server. Check that the dev server is running, then reload. `),z())}function Wz(e,t){e&1&&B(0,`app-coming-soon`,15),e&2&&L(`info`,t)}function Gz(e,t){e&1&&(R(0,`p`,16),Y(1,` This inspector is turned off in the devtools config (`),R(2,`code`),Y(3,`inspectors`),z(),Y(4,`). `),z())}function Kz(e,t){if(e&1){let e=W();R(0,`app-dashboard`,43),G(`navigate`,function(t){return O(e),k(q(2).switchTab(t))}),z()}e&2&&L(`rpc`,q(2).rpc())}function qz(e,t){if(e&1){let e=W();R(0,`app-component-tree`,44),G(`focusHandled`,function(){return O(e),k(q(2).componentFocus.set(null))})(`showForm`,function(t){return O(e),k(q(2).showForm(t))}),z()}if(e&2){let e=q(2);L(`rpc`,e.rpc())(`focus`,e.componentFocus())}}function Jz(e,t){e&1&&B(0,`app-route-inspector`,41),e&2&&L(`rpc`,q(2).rpc())}function Yz(e,t){e&1&&B(0,`app-signal-inspector`,41),e&2&&L(`rpc`,q(2).rpc())}function Xz(e,t){e&1&&B(0,`app-di-inspector`,41),e&2&&L(`rpc`,q(2).rpc())}function Zz(e,t){e&1&&B(0,`app-store-inspector`,41),e&2&&L(`rpc`,q(2).rpc())}function Qz(e,t){e&1&&B(0,`app-network-inspector`,41),e&2&&L(`rpc`,q(2).rpc())}function $z(e,t){if(e&1){let e=W();R(0,`app-forms-inspector`,45),G(`focusHandled`,function(){return O(e),k(q(2).formFocus.set(null))}),z()}if(e&2){let e=q(2);L(`rpc`,e.rpc())(`focus`,e.formFocus())}}function eB(e,t){e&1&&B(0,`app-pipes-inspector`,41),e&2&&L(`rpc`,q(2).rpc())}function tB(e,t){e&1&&B(0,`app-analog-inspector`,41),e&2&&L(`rpc`,q(2).rpc())}function nB(e,t){if(e&1&&N(0,Kz,1,1,`app-dashboard`,41)(1,qz,1,2,`app-component-tree`,42)(2,Jz,1,1,`app-route-inspector`,41)(3,Yz,1,1,`app-signal-inspector`,41)(4,Xz,1,1,`app-di-inspector`,41)(5,Zz,1,1,`app-store-inspector`,41)(6,Qz,1,1,`app-network-inspector`,41)(7,$z,1,2,`app-forms-inspector`,42)(8,eB,1,1,`app-pipes-inspector`,41)(9,tB,1,1,`app-analog-inspector`,41),e&2){let e;P((e=q().tab())===`dashboard`?0:e===`components`?1:e===`routes`?2:e===`signals`?3:e===`injectors`?4:e===`store`?5:e===`network`?6:e===`forms`?7:e===`pipes`?8:e===`analog`?9:-1)}}var rB=[`angular`,`ngrx`,`analog`,`nativescript`,`capacitor`],iB={angular:`Angular`,ngrx:`NgRx Store`,analog:`Analog`,nativescript:`NativeScript`,capacitor:`Capacitor`},aB={ngrx:`#d770e8`,analog:`#ff5470`,nativescript:`#8196ff`,capacitor:`#53b9ff`},oB={ngrx:`store`,analog:`analog`},sB={store:`ngrx`,analog:`analog`},cB={nativescript:{id:`nativescript`,name:`NativeScript`,badge:`Coming Soon`,heading:`NativeScript Support`,summary:`Inspect NativeScript Angular apps running natively on iOS and Android, with the same tools.`,color:`#3c5afd`,plans:[`Native overlay that reports the component tree from the device`,`Standalone devtools server your phone or simulator connects to`,`Example NativeScript app to try it end to end`],pr:16,author:{name:`Nathan Walker`,login:`NathanWalker`}},capacitor:{id:`capacitor`,name:`Capacitor`,badge:`Coming Soon`,heading:`Capacitor Support`,summary:`Connect Ionic and Capacitor apps running in a device WebView back to these tools.`,color:`#119eff`,plans:[`Manual overlay start for apps that load from capacitor:// or a device`,`Connection settings passed in, no cross-origin probing`,`Setup guides for the Android emulator and iOS simulator`],pr:21,author:{name:`Erkam Yaman`,login:`erkamyaman`}}},lB={id:`analog`,name:`Analog`,badge:`Not in this app`,heading:`This app doesn’t use Analog`,summary:`In an Analog app this dock shows your file routes, server load() and API calls, render modes and route lint.`,color:`#dd0330`,plans:[`Which page, layout and .server.ts files render a URL`,`Every load(), server function and API call with timing`,`SSR, prerendered or client only, per page`],link:{label:`Get started with Analog`,href:`https://analogjs.org/docs/getting-started`}};function uB(){let e=new URLSearchParams(location.search).get(`view`);return rB.find(t=>t===e)??null}var dB=class e{analog=A(!1);allTabs=[{id:`dashboard`,label:`Dashboard`},{id:`analog`,label:`Analog`},{id:`components`,label:`Components`},{id:`routes`,label:`Routes`},{id:`signals`,label:`Signals`},{id:`injectors`,label:`Injectors`},{id:`store`,label:`Store`},{id:`forms`,label:`Forms`},{id:`pipes`,label:`Pipes`},{id:`network`,label:`SSR & HTTP`}];view=A(uB());viewAccent=Q(()=>{let e=this.view();return(e&&aB[e])??null});title=Q(()=>{let e=this.view();return e?iB[e]:`Angular DevTools`});analogKnown=A(!1);comingSoon=Q(()=>{let e=this.view();return e===`analog`?this.analogKnown()&&!this.analog()?lB:void 0:e?cB[e]:void 0});config=Q(()=>ET(this.rpc()));tabEnabled=kT;tabs=Q(()=>{if(this.comingSoon())return[];let e=this.view(),t=e?oB[e]:void 0,n=this.allTabs.filter(e=>kT(e.id,this.config()));return t?n.filter(e=>e.id===t):n.filter(t=>(t.id!==`analog`||this.analog())&&!(e===`angular`&&sB[t.id]))});tab=nv(()=>{let e=this.view();return e&&oB[e]||`dashboard`});rpc=A(null);connected=A(!1);connectionFailed=A(!1);stopFollowing=()=>{};nav=hv(`nav`);main=hv(`main`);injector=E(Ss);navObserver;navFade=A({start:!1,end:!1});constructor(){wd(()=>{let e=this.nav()?.nativeElement;e&&typeof ResizeObserver<`u`&&(this.navObserver=new ResizeObserver(()=>this.measureNav()),this.navObserver.observe(e))}),jv(()=>{this.tab(),this.tabs(),ev(()=>{this.revealActiveTab(),this.measureNav()})})}measureNav(){let e=this.nav()?.nativeElement;if(!e)return;let t=e.scrollWidth-e.clientWidth,n=e.scrollLeft>1,r=t>1&&e.scrollLeftn?e.scrollLeft=Math.max(0,n):e.scrollLeftthis.showView(e)));try{window.parent!==window&&Ez(window.parent.document)}catch{}let e=new URLSearchParams(location.hash.replace(/^#/,``)).get(`tab`);e&&this.tabs().some(t=>t.id===e)&&this.tab.set(e);let t=mB();aT(t?{baseURL:t}:{}).then(e=>{this.rpc.set(e),this.connected.set(!0),e.scope(`ng-devtools`).rpc.call(`analog-project`).then(e=>{let t=!!e?.analog;this.analog.set(t),this.analogKnown.set(!0),!t&&this.tab()===`analog`&&!this.view()&&this.tab.set(`dashboard`)},()=>{this.analogKnown.set(!0),this.tab()===`analog`&&!this.view()&&this.tab.set(`dashboard`)}),e.events.on(`connection:status`,e=>{this.connected.set(e===`connected`)})},()=>{this.connectionFailed.set(!0),this.analogKnown.set(!0)})}ngOnDestroy(){this.stopFollowing(),this.navObserver?.disconnect()}showView(e){if(e===this.view())return;this.view.set(e);let t=new URL(location.href);t.searchParams.set(`view`,e),t.hash=``,history.replaceState(history.state,``,t)}formFocus=A(null);componentFocus=nv({source:this.tab,computation:()=>null});showForm(e){this.formFocus.set({id:e}),this.switchTab(`forms`)}inspectFromPanel({source:e,origin:t,data:n}){if(e!==window.parent||t!==location.origin)return;let r=n;r?.type===`ng-devtools:inspect-component`&&typeof r.id==`string`&&this.tab()===`components`&&this.config().inspectors.components&&this.componentFocus.set({id:r.id})}switchTab(e){let t=sB[e];if(this.view()===`angular`&&t){this.activateDock(t,e);return}this.setTab(e),history.replaceState(history.state,``,`#tab=${e}`)}setTab(e){this.keepFocus(),this.tab.set(e)}keepFocus(){let e=document.activeElement,t=this.main()?.nativeElement;(!e||e===document.body||t?.contains(e))&&wd(()=>{let e=document.activeElement;e&&e!==document.body||(this.nav()?.nativeElement.querySelector(`button.active`)??this.main()?.nativeElement)?.focus()},{injector:this.injector})}async activateDock(e,t){if(await jz(e))return;if(window.parent===window){this.keepFocus(),this.showView(e);return}let n=this.rpc();if(!n?.call){this.setTab(t);return}try{await n.call(`hub:docks:activate`,{dockId:`ng-devtools:${e}`}),this.keepFocus(),this.showView(e)}catch{this.setTab(t)}}static ɵfac=function(t){return new(t||e)};static ɵcmp=Oh({type:e,selectors:[[`app-root`]],viewQuery:function(e,t){e&1&&Ng(t.nav,Mz,5)(t.main,Nz,5),e&2&&Pg(2)},hostVars:2,hostBindings:function(e,t){e&1&&G(`message`,function(e){return t.inspectFromPanel(e)},yu),e&2&&n_(`--%NS%accent`,t.viewAccent())},decls:24,vars:17,consts:[[`nav`,``],[`main`,``],[1,`brand`],[1,`mark`],[`width`,`22`,`height`,`22`,`viewBox`,`0 0 256 256`,`aria-hidden`,`true`],[`width`,`24`,`height`,`17`,`viewBox`,`0 0 256 182`,`aria-hidden`,`true`],[`width`,`22`,`height`,`22`,`viewBox`,`0 0 24 24`,`fill`,`currentColor`,`aria-hidden`,`true`],[`width`,`20`,`height`,`22`,`viewBox`,`0 0 223 236`,`aria-hidden`,`true`],[`width`,`20`,`height`,`22`,`viewBox`,`0 0 223 236`,`fill`,`currentColor`,`aria-hidden`,`true`],[1,`title`],[`aria-label`,`Inspectors`,3,`scroll`],[`role`,`status`,1,`status`],[`aria-hidden`,`true`,1,`dot`],[`tabindex`,`-1`],[`role`,`alert`,1,`connection-error`],[3,`info`],[1,`turned-off`],[`fill`,`#3c5afd`,`d`,`M237.248 18.752q18.061 18.06 18.748 45.247V192c-.457 18.12-6.707 33.207-18.748 45.247c-12.04 12.04-27.127 18.291-45.251 18.752H63.999q-27.187-.69-45.247-18.752C6.712 225.208.46 210.121 0 192.001V64q.69-27.187 18.752-45.247Q36.812.692 63.999 0h127.998c18.124.46 33.211 6.711 45.251 18.752m-17.655 103q-6.033-6.003-6.28-15.066V64q-.192-9.063-6.221-15.091c-4.02-4.023-9.054-6.093-15.095-6.22h-21.312v106.626L85.315 42.687H63.999c-6.042.128-11.072 2.198-15.091 6.221c-4.023 4.02-6.093 9.05-6.22 15.09v42.688q-.249 9.063-6.281 15.066q-6.03 5.996-15.091 6.246q9.062.255 15.09 6.25c4.024 4.002 6.115 9.024 6.281 15.066V192c.128 6.037 2.198 11.072 6.221 15.091q6.03 6.03 15.09 6.22h21.317V106.687l85.37 106.627h21.312c6.041-.128 11.076-2.202 15.095-6.221s6.093-9.054 6.22-15.09v-42.688q.249-9.063 6.281-15.066q6.03-5.995 15.091-6.25q-9.062-.25-15.09-6.246`],[`fill`,`#53b9ff`,`d`,`M39.863 54.115L.311 93.716l60.995 61.179L0 216.385l39.428 39.619l61.43-61.507l61.097 61.068l39.552-39.602z`],[`fill`,`#119eff`,`d`,`m140.517 154.896l-39.658 39.601l61.097 61.069l39.552-39.602z`],[`fill-opacity`,`.2`,`d`,`m140.517 154.896l-39.658 39.601l15.267 15.182z`],[`fill`,`#53b9ff`,`d`,`M194.57 100.985L256 39.478L216.431 0l-61.412 61.384L93.917.311L54.365 39.913L216.01 201.761l39.552-39.602z`],[`fill`,`#119eff`,`d`,`m115.36 100.987l39.659-39.602L93.917.313L54.365 39.914z`],[`fill-opacity`,`.2`,`d`,`m115.359 100.985l39.659-39.601l-15.271-15.186z`],[`fill`,`#c30f2e`,`d`,`M152.228.001L48.455 181.046H256L152.228 0z`],[`fill`,`#dd0330`,`d`,`M88.314 26.967L0 181.52h176.628L88.315 26.967z`],[`fill`,`#fff`,`d`,`M18.167 135.294h220.236v-2.419H18.167z`],[`fill`,`#fff`,`d`,`M204.38 170.667c-.861 0-1.67-.358-2.348-1.034c-4.045-4.063-4.221-20.586-4.026-45.33c.11-13.521.257-32.043-1.9-33.504c-2.104.873-2.315 16.172-2.451 26.301c-.162 11.785-.327 23.98-2.242 30.189c-.57 1.84-1.306 3.525-2.786 3.39c-2.086-.185-2.76-3.48-4.317-16.478c-.647-5.4-1.317-10.98-2.101-13.14a11 11 0 0 0-.269-.66c-.835 1.889-1.8 7.079-2.47 10.682c-.927 4.976-1.803 9.676-2.9 11.726c-.847 1.575-2.19 3.63-4.067 3.231c-2.558-.537-3.323-5.693-3.552-8.719c0-25.455-3.33-28.417-3.997-28.753l-.107.081l-.162-.036c-2.377 1.038-2.506 9.294-2.627 17.276c-.096 5.856-.198 12.492-1.053 18.701c-1.108 8.05-2.448 9.603-4.115 9.507c-3.838-.262-3.95-13.482-3.95-14.987c0-.472.012-1.028.027-1.642c.074-3.076.205-8.8-1.687-10.604c-.25-.239-.603-.515-.879-.437c-1.347.339-2.745 4.714-3.209 6.153c-.147.457-.265.833-.364 1.09c-.078.214-.177.515-.294.88c-1.02 3.095-2.18 6.183-4.16 6.944c-.732.284-1.498.222-2.216-.183c-.953-.541-1.73-1.646-2.455-3.482c-.397-1.016-.735-2.046-1.082-3.081c-.419-1.263-.85-2.569-1.384-3.808c-.419-.965-1.464-1.4-2.796-1.164c-2.768.494-3.232 3.29-3.622 7.5c-.07.733-.137 1.452-.228 2.128c-.011.198-.501 6.38-.814 8.344c-.865 5.39-2.002 7.512-3.89 7.358c-4.66-.398-6.798-20.836-6.684-29.47c.088-6.592-1.104-9-1.818-9.382c-.074-.034-.189-.096-.46.095c-.843.571-1.594 2.348-1.363 4.215c2.566 20.32.674 43.592-3.96 48.833c-1.46 1.649-3.448 1.627-4.832.236c-4.049-4.064-4.218-20.586-4.026-45.33c.11-13.521.254-32.043-1.9-33.504c-2.105.873-2.311 16.172-2.45 26.301c-.163 11.785-.329 23.98-2.246 30.189c-.57 1.84-1.307 3.525-2.782 3.39c-2.091-.186-2.761-3.48-4.321-16.478c-.649-5.4-1.319-10.98-2.101-13.14c-.1-.273-.189-.49-.27-.66c-.832 1.889-1.796 7.079-2.466 10.682c-.927 4.976-1.803 9.676-2.904 11.726c-.846 1.575-2.19 3.63-4.063 3.231c-2.558-.537-3.324-5.693-3.552-8.719c-.003-25.455-3.33-28.417-3.997-28.753l-.106.081l-.166-.036c-2.374 1.038-2.503 9.293-2.629 17.276c-.091 5.856-.194 12.492-1.048 18.701c-1.107 8.05-2.437 9.618-4.111 9.507c-3.846-.262-3.958-13.482-3.958-14.987c0-.472.016-1.028.03-1.642c.074-3.076.207-8.8-1.685-10.604c-.25-.239-.603-.515-.88-.438c-1.347.34-2.75 4.715-3.206 6.155a47 47 0 0 1-.364 1.09q-.16.432-.298.875c-1.02 3.096-2.18 6.187-4.155 6.95c-.736.282-1.506.22-2.22-.185c-.953-.541-1.734-1.646-2.454-3.482c-.398-1.016-.74-2.046-1.083-3.081c-.42-1.263-.854-2.569-1.387-3.808c-.416-.965-1.465-1.4-2.797-1.164c-3.188.567-3.943 4.52-4.55 9.238l-.106.839l-2.411-.32l.114-.824c.527-4.137 1.328-10.39 6.53-11.31c2.446-.435 4.585.581 5.446 2.583c.578 1.34 1.031 2.695 1.466 4.008c.324.99.654 1.98 1.037 2.959c.674 1.708 1.197 2.15 1.392 2.257c1.218-.38 2.462-4.167 2.873-5.414c.13-.402.24-.732.328-.968c.085-.233.195-.571.328-.98c1.097-3.43 2.474-7.144 4.918-7.762c.747-.191 1.903-.166 3.157 1.035c2.665 2.544 2.525 8.48 2.433 12.41c-.014.59-.028 1.126-.028 1.583c0 6.272.93 10.655 1.64 12.16c.367-.77.998-2.63 1.598-7.007c.831-6.066.938-12.624 1.027-18.41c.161-10.24.275-17.663 3.982-19.408c.552-.339 1.469-.522 2.436-.033c3.586 1.803 5.326 11.885 5.326 30.817c.225 2.926 1.013 6.006 1.66 6.448c.004-.066.53-.39 1.394-2.01c.925-1.718 1.845-6.665 2.655-11.026c1.792-9.614 2.606-12.989 4.726-13.166c1.615-.158 2.362 1.896 2.676 2.76c.883 2.422 1.537 7.888 2.23 13.678c.54 4.49 1.31 10.902 2.094 13.497c.084-.228.18-.5.283-.836c1.815-5.878 1.98-17.887 2.14-29.507c.22-16.14.503-26.139 3.448-28.226a2.44 2.44 0 0 1 2.233-.316c3.448 1.144 3.714 11.254 3.519 35.8c-.14 17.799-.313 39.952 3.323 43.603c.317.32.542.32.622.32c.17 0 .413-.161.67-.452c3.681-4.162 6.01-26.022 3.372-46.927c-.328-2.602.677-5.337 2.392-6.514c.946-.652 2.036-.736 2.978-.232c2.145 1.14 3.187 5.024 3.102 11.546c-.15 11.387 2.584 24.714 4.37 26.842c.282-.471.842-1.763 1.379-5.145c.301-1.87.799-8.153.806-8.216c.09-.71.155-1.398.217-2.097c.369-3.924.82-8.804 5.613-9.654c2.444-.435 4.583.577 5.448 2.583c.577 1.34 1.027 2.695 1.46 4.008c.332.99.664 1.98 1.046 2.959c.67 1.708 1.197 2.15 1.387 2.257c1.218-.38 2.467-4.167 2.875-5.41c.132-.402.243-.737.328-.973c.088-.228.195-.57.324-.979c1.1-3.43 2.477-7.144 4.924-7.762c.74-.191 1.9-.166 3.154 1.035c2.665 2.543 2.526 8.48 2.437 12.41q-.029.792-.033 1.583c0 6.272.931 10.655 1.641 12.16c.365-.77.994-2.63 1.601-7.007c.832-6.066.931-12.624 1.027-18.41c.159-10.24.273-17.663 3.98-19.408c.55-.339 1.467-.522 2.44-.033c3.58 1.803 5.325 11.884 5.325 30.817c.224 2.926 1.012 6.006 1.656 6.448c.008-.066.526-.39 1.399-2.01c.923-1.718 1.84-6.665 2.653-11.026c1.786-9.614 2.602-12.989 4.722-13.166c1.62-.158 2.367 1.896 2.68 2.76c.88 2.422 1.535 7.888 2.233 13.678c.534 4.49 1.304 10.902 2.092 13.497c.08-.228.176-.5.28-.836c1.813-5.878 1.976-17.887 2.138-29.507c.216-16.14.504-26.139 3.448-28.226a2.45 2.45 0 0 1 2.234-.316c3.452 1.144 3.718 11.254 3.52 35.8c-.141 17.799-.314 39.952 3.319 43.603c.324.32.544.32.63.32c.165 0 .408-.161.662-.452c3.687-4.162 6.014-26.022 3.375-46.927c-.342-2.723.43-5.47 1.84-6.526c.71-.537 1.575-.647 2.37-.313c2.054.877 3.445 4.63 4.255 11.484c.339 2.87.641 5.974.931 9.036c.641 6.683 1.509 15.69 2.684 17.67c.36-.46 1.096-1.704 2.19-5.038l2.307.753c-1.696 5.157-3.026 7.1-4.755 6.902c-2.69-.299-3.468-5.734-4.84-20.055c-.29-3.048-.59-6.132-.928-8.989c-1.03-8.74-2.782-9.532-2.801-9.54c-.342.174-1.137 1.992-.842 4.31c2.558 20.32.673 43.597-3.964 48.834c-.747.842-1.587 1.27-2.485 1.27`],[`d`,`M12.024.017V0L12 .008L11.976 0v.017L.812 3.892l1.605 14.875l9.559 5.207V24l.024-.013l.024.013v-.026l9.559-5.207l1.605-14.875zm6.868 14.244q-1.64 3.948-6.031 4.166c-2.829 0-4.661-1.7-4.66-1.7q-1.745-1.359-2.398-3.417c-.695-.76-.702-.841-.774-1.145c-.072-.303.045-.388.249-.685q.204-.298.098-.85q-.26-.36-.3-1.128q0-.37.496-.783q.495-.413.607-.632q.083-.119.065-1.031q-.006-.897.995-.975c1-.08 1.565-.832 1.879-1.174c.21-.228.52-.339.91-.341c.551-.026 1.052.185 1.484.62c1.075-.055 2.176.235 3.292.863q2.379 1.414 2.596 3.055q-.257 2.158-5.788-.113q-2.895.819-2.846 3.552q0 2.508 2.422 3.643c-.787-.772-1.122-1.422-1.01-1.959q2.456 2.906 5.588 2.173c-.92.032-1.65-.264-2.198-.893q2.116-.05 3.998-1.972c-.724.576-1.482.794-2.284.657q3.26-2.563 2.307-5.98l-.002-.006a3.02 3.02 0 0 1 .788 2.03q.023 1.175-.795 2.477q.613-.478 1.413-2.047c.23 2.117-.625 3.724-2.574 4.825q.934-.085 2.473-1.23m-5.567-6.63a.319.319 0 1 1 .638 0a.319.319 0 0 1-.638 0`],[`id`,`ng-grad`,`x1`,`49`,`x2`,`226`,`y1`,`214`,`y2`,`130`,`gradientUnits`,`userSpaceOnUse`],[`stop-color`,`#E40035`],[`offset`,`.24`,`stop-color`,`#F60A48`],[`offset`,`.352`,`stop-color`,`#F20755`],[`offset`,`.494`,`stop-color`,`#DC087D`],[`offset`,`.745`,`stop-color`,`#9717E7`],[`offset`,`1`,`stop-color`,`#6C00F5`],[`fill`,`url(#ng-grad)`,`d`,`m222.077 39.192-8.019 125.923L137.387 0l84.69 39.192Zm-53.105 162.825-57.933 33.056-57.934-33.056 11.783-28.556h92.301l11.783 28.556ZM111.039 62.675l30.357 73.803H80.681l30.358-73.803ZM7.937 165.115 0 39.192 84.69 0 7.937 165.115Z`],[`d`,`m222.077 39.192-8.019 125.923L137.387 0l84.69 39.192Zm-53.105 162.825-57.933 33.056-57.934-33.056 11.783-28.556h92.301l11.783 28.556ZM111.039 62.675l30.357 73.803H80.681l30.358-73.803ZM7.937 165.115 0 39.192 84.69 0 7.937 165.115Z`],[`type`,`button`,3,`active`],[`type`,`button`,3,`click`],[3,`name`],[3,`rpc`],[3,`rpc`,`focus`],[3,`navigate`,`rpc`],[3,`focusHandled`,`showForm`,`rpc`,`focus`],[3,`focusHandled`,`rpc`,`focus`]],template:function(e,t){if(e&1&&(R(0,`header`)(1,`h1`,2)(2,`span`,3),N(3,Fz,2,0,`:svg:svg`,4)(4,Iz,7,0,`:svg:svg`,4)(5,Lz,5,0,`:svg:svg`,5)(6,Rz,2,0,`:svg:svg`,6)(7,zz,10,0,`:svg:svg`,7)(8,Bz,2,0,`:svg:svg`,8),z(),R(9,`span`,9),Y(10),z()(),R(11,`nav`,10,0),G(`scroll`,function(){return t.measureNav()}),N(13,Hz,2,0),z(),R(14,`span`,11)(15,`span`,12),B(16,`span`),z(),Y(17),z()(),R(18,`main`,13,1),N(20,Uz,2,0,`p`,14)(21,Wz,1,1,`app-coming-soon`,15)(22,Gz,5,0,`p`,16)(23,nB,10,1),z()),e&2){let e;j(2),J(`ng-mark`,t.view()===`angular`),j(),P(t.view()===`nativescript`?3:t.view()===`capacitor`?4:t.view()===`analog`?5:t.view()===`ngrx`?6:t.view()===`angular`?7:8),j(6),J(`ng-text`,t.view()===`angular`),j(),X(t.title()),j(),J(`fade-start`,t.navFade().start)(`fade-end`,t.navFade().end),j(2),P(t.tabs().length>1?13:-1),j(),J(`connected`,t.connected())(`failed`,t.connectionFailed()),j(3),Z(` `,t.connected()?`Live`:t.connectionFailed()?`Disconnected`:`Connecting…`,` `),j(3),P(t.connectionFailed()?20:(e=t.comingSoon())?21:t.tabEnabled(t.tab(),t.config())?23:22,e)}},dependencies:[lE,vD,GA,jj,LM,QN,WF,BI,DR,_z,wz,BT],styles:[`[_nghost-%COMP%] { +`;function Ez(e,t=50){let n=e?.querySelector(`devframes-dock-standalone`)?.shadowRoot;if(n){if(n.querySelector(`style[data-ng-devtools]`))return;let t=e.createElement(`style`);t.dataset.ngDevtools=``,t.textContent=Tz,n.append(t);return}t>0&&setTimeout(()=>Ez(e,t-1),100)}var Dz=`__DEVFRAME_HUB_CLIENT_CONTEXT__`,Oz=`ng-devtools:`;function kz(){try{return window.parent===window?void 0:window.parent[Dz]}catch{return}}function Az(e,t,n=50){let r=kz();if(!r){if(n<=0||window.parent===window)return()=>{};let r=()=>{},i=setTimeout(()=>r=Az(e,t,n-1),100);return()=>{clearTimeout(i),r()}}let i=e.map(e=>r.docks.getStateById(Oz+e)?.events.on(`entry:activated`,()=>t(e))??(()=>{})),a=r.docks.selectedId,o=e.find(e=>Oz+e===a);return o&&t(o),()=>i.forEach(e=>e())}async function jz(e){let t=kz();if(!t)return!1;try{return await t.docks.switchEntry(Oz+e)}catch{return!1}}var Mz=`ng-devtools:auth-tokens`;function Nz(e){return e.isTrusted?`trusted`:e.status===`unauthorized`?`needs-code`:`pending`}function Pz(e,t){let n=()=>t(Nz(e)),r=e.events.on(`connection:status`,n),i=e.events.on(`rpc:is-trusted:updated`,n);return n(),()=>{r(),i()}}function Fz(e,t){try{return new URL(e??`./`,t).origin}catch{return new URL(t).origin}}function Iz(){try{return globalThis.localStorage??null}catch{return null}}function Lz(e){try{let t=JSON.parse(e?.getItem(Mz)??`{}`);return t&&typeof t==`object`?t:{}}catch{return{}}}function Rz(e,t,n=Iz()){if(e===t)return;let r=Lz(n)[e];return typeof r==`string`&&r?r:void 0}function zz(e,t,n,r=Iz()){if(e!==t&&n&&r)try{r.setItem(Mz,JSON.stringify({...Lz(r),[e]:n}))}catch{}}async function Bz(e,t,n,r,i=Iz()){let a=t.replace(/\s+/g,``);if(!a)return`empty`;let o;try{o=await e.requestTrustWithCode(a)}catch{return`unreachable`}return o?(zz(n,r,e.connection.authToken,i),`trusted`):`wrong`}async function Vz(e,t=!1){try{return await e.requestAuthCode(t?{reissue:!0}:void 0),!0}catch{return!1}}var Hz=[`field`],Uz={empty:`Enter the code from the terminal.`,wrong:`That code did not work. Check the terminal for the current code and try again.`,unreachable:`Can't reach the devtools server. Check that the dev server is running, then try again.`},Wz=class e{client=$.required();server=$.required();pageOrigin=$.required();code=A(``);busy=A(!1);error=A(``);note=A(``);field=hv.required(`field`);constructor(){wd(()=>this.field().nativeElement.focus())}ngOnInit(){Vz(this.client())}async submit(e){if(e.preventDefault(),this.busy())return;this.busy.set(!0),this.note.set(``);let t=await Bz(this.client(),this.code(),this.server(),this.pageOrigin());if(this.busy.set(!1),t===`trusted`){this.error.set(``);return}this.error.set(Uz[t]);let n=this.field().nativeElement;n.focus(),n.select()}async newCode(){this.error.set(``),this.note.set(``),await Vz(this.client(),!0)?(this.code.set(``),this.note.set(`A new code is in the terminal.`),this.field().nativeElement.focus()):this.error.set(Uz.unreachable)}static ɵfac=function(t){return new(t||e)};static ɵcmp=Oh({type:e,selectors:[[`app-code-entry`]],viewQuery:function(e,t){e&1&&Ng(t.field,Hz,5),e&2&&Pg()},inputs:{client:[1,`client`],server:[1,`server`],pageOrigin:[1,`pageOrigin`]},decls:28,vars:8,consts:[[`field`,``],[`aria-labelledby`,`code-entry-title`],[`id`,`code-entry-title`],[1,`hint`],[`novalidate`,``,3,`submit`],[`for`,`code-entry-input`],[1,`row`],[`id`,`code-entry-input`,`name`,`code`,`type`,`text`,`inputmode`,`numeric`,`autocomplete`,`one-time-code`,`spellcheck`,`false`,`maxlength`,`16`,`aria-describedby`,`code-entry-error`,3,`input`,`value`],[`type`,`submit`,3,`disabled`],[`id`,`code-entry-error`,`role`,`alert`,1,`error`],[1,`more`],[`type`,`button`,1,`ghost`,3,`click`,`disabled`],[`role`,`status`,1,`note`]],template:function(e,t){if(e&1){let e=W();V(0,`section`,1)(1,`h2`,2),Y(2,`Enter the one-time code`),H(),V(3,`p`),Y(4,` The devtools server at `),V(5,`code`),Y(6),H(),Y(7,` asks for a one-time code before it shares data with this panel. `),H(),V(8,`p`,3),Y(9,` Find the 6-digit `),V(10,`strong`),Y(11,`auth code`),H(),Y(12,` in the terminal that runs your dev server. A code lasts 5 minutes and changes after 5 wrong tries. `),H(),V(13,`form`,4),K(`submit`,function(e){return t.submit(e)}),V(14,`label`,5),Y(15,`One-time code`),H(),V(16,`div`,6)(17,`input`,7,0),K(`input`,function(){O(e);let n=Fg(18);return k(t.code.set(n.value))}),H(),V(19,`button`,8),Y(20),H()(),V(21,`p`,9),Y(22),H()(),V(23,`div`,10)(24,`button`,11),K(`click`,function(){return t.newCode()}),Y(25,` Print a new code `),H(),V(26,`p`,12),Y(27),H()()()}e&2&&(j(6),X(t.server()),j(11),xg(`value`,t.code()),M(`aria-invalid`,t.error()?`true`:null),j(2),xg(`disabled`,t.busy()),j(),X(t.busy()?`Checking…`:`Connect`),j(2),X(t.error()),j(2),xg(`disabled`,t.busy()),j(3),X(t.note()))},styles:[`[_nghost-%COMP%] { + display: block; +} + +section[_ngcontent-%COMP%] { + border: 1px solid var(--%NS%border); + border-radius: var(--%NS%radius); + background: var(--%NS%surface); + animation: enter 0.35s var(--%NS%ease) both; + display: grid; + gap: 12px; + max-width: 520px; + padding: 20px; +} + +h2[_ngcontent-%COMP%] { + margin: 0; + color: var(--%NS%text-strong); + font-size: 16px; + font-weight: 600; +} + +p[_ngcontent-%COMP%] { + margin: 0; + color: var(--%NS%text); + line-height: 1.5; +} + +.hint[_ngcontent-%COMP%] { + color: var(--%NS%text-2); +} + +code[_ngcontent-%COMP%] { + font-family: var(--%NS%font-mono); + font-size: 12px; + overflow-wrap: anywhere; +} + +form[_ngcontent-%COMP%] { + display: grid; + gap: 6px; +} + +label[_ngcontent-%COMP%] { + color: var(--%NS%text-2); + font-size: 12px; + font-weight: 500; +} + +.row[_ngcontent-%COMP%] { + display: flex; + flex-wrap: wrap; + gap: 8px; +} + +input[_ngcontent-%COMP%] { + flex: 1 1 160px; + min-width: 0; + height: var(--%NS%control-h); + padding: 0 10px; + border: 1px solid var(--%NS%border-strong); + border-radius: var(--%NS%radius-sm); + background: var(--%NS%bg); + color: var(--%NS%text-strong); + font-family: var(--%NS%font-mono); + font-size: 15px; + letter-spacing: 0.2em; + transition: border-color 0.2s var(--%NS%ease), box-shadow 0.2s var(--%NS%ease); +} + +input[_ngcontent-%COMP%]:hover { + border-color: color-mix(in srgb, var(--%NS%border-strong) 60%, var(--%NS%text-3)); +} + +input[_ngcontent-%COMP%]:focus-visible { + outline: none; + border-color: var(--%NS%accent); + box-shadow: 0 0 0 3px var(--%NS%accent-soft); +} + +input[aria-invalid=true][_ngcontent-%COMP%] { + border-color: color-mix(in srgb, var(--%NS%danger) 60%, transparent); +} + +button[_ngcontent-%COMP%] { + display: inline-flex; + align-items: center; + justify-content: center; + height: var(--%NS%control-h); + padding: 0 14px; + border: 1px solid var(--%NS%border-strong); + border-radius: var(--%NS%radius-sm); + background: var(--%NS%surface-2); + color: var(--%NS%text); + font: inherit; + font-weight: 500; + white-space: nowrap; + cursor: pointer; + transition: background-color 0.2s var(--%NS%ease), border-color 0.2s var(--%NS%ease); +} + +button[_ngcontent-%COMP%]:focus-visible { + outline: 2px solid var(--%NS%accent); + outline-offset: 2px; +} + +button[type=submit][_ngcontent-%COMP%] { + border-color: var(--%NS%accent); + background: var(--%NS%accent); + color: var(--%NS%accent-ink); + font-weight: 600; +} + +button[type=submit][_ngcontent-%COMP%]:hover:not(:disabled) { + border-color: var(--%NS%accent-hover); + background: var(--%NS%accent-hover); +} + +button[_ngcontent-%COMP%]:disabled { + opacity: 0.5; + cursor: not-allowed; +} + +button.ghost[_ngcontent-%COMP%] { + border-color: transparent; + background: none; + color: var(--%NS%text-2); +} + +button.ghost[_ngcontent-%COMP%]:hover:not(:disabled) { + border-color: var(--%NS%border); + background: var(--%NS%surface-2); + color: var(--%NS%text); +} + +.error[_ngcontent-%COMP%] { + color: var(--%NS%danger); + font-size: 12px; +} + +.more[_ngcontent-%COMP%] { + display: flex; + flex-wrap: wrap; + align-items: center; + gap: 4px 12px; +} + +.note[_ngcontent-%COMP%] { + color: var(--%NS%text-2); + font-size: 12px; +}`]})},Gz=[`nav`],Kz=[`main`],qz=(e,t)=>t.id;function Jz(e,t){e&1&&(ps(),R(0,`svg`,4),B(1,`path`,18),z())}function Yz(e,t){e&1&&(ps(),R(0,`svg`,4),B(1,`path`,19)(2,`path`,20)(3,`path`,21)(4,`path`,22)(5,`path`,23)(6,`path`,24),z())}function Xz(e,t){e&1&&(ps(),R(0,`svg`,5),B(1,`path`,25)(2,`path`,26)(3,`path`,27)(4,`path`,28),z())}function Zz(e,t){e&1&&(ps(),R(0,`svg`,6),B(1,`path`,29),z())}function Qz(e,t){e&1&&(ps(),R(0,`svg`,7)(1,`defs`)(2,`linearGradient`,30),B(3,`stop`,31)(4,`stop`,32)(5,`stop`,33)(6,`stop`,34)(7,`stop`,35)(8,`stop`,36),z()(),B(9,`path`,37),z())}function $z(e,t){e&1&&(ps(),R(0,`svg`,8),B(1,`path`,38),z())}function eB(e,t){if(e&1){let e=W();R(0,`button`,40),G(`click`,function(){let t=O(e).$implicit;return k(q(2).switchTab(t.id))}),B(1,`app-tab-icon`,41),R(2,`span`),Y(3),z()()}if(e&2){let e=t.$implicit,n=q(2);J(`active`,n.tab()===e.id),M(`aria-current`,n.tab()===e.id?`page`:null),j(),L(`name`,e.id),j(2),X(e.label)}}function tB(e,t){e&1&&F(0,eB,4,5,`button`,39,qz),e&2&&I(q().tabs())}function nB(e,t){e&1&&(R(0,`p`,14),Y(1,` Can't reach the devtools server. Check that the dev server is running, then reload. `),z())}function rB(e,t){if(e&1&&B(0,`app-code-entry`,15),e&2){let e=q();L(`client`,t)(`server`,e.server())(`pageOrigin`,e.pageOrigin)}}function iB(e,t){e&1&&B(0,`app-coming-soon`,16),e&2&&L(`info`,t)}function aB(e,t){e&1&&(R(0,`p`,17),Y(1,` This inspector is turned off in the devtools config (`),R(2,`code`),Y(3,`inspectors`),z(),Y(4,`). `),z())}function oB(e,t){if(e&1){let e=W();R(0,`app-dashboard`,44),G(`navigate`,function(t){return O(e),k(q(2).switchTab(t))}),z()}e&2&&L(`rpc`,q(2).rpc())}function sB(e,t){if(e&1){let e=W();R(0,`app-component-tree`,45),G(`focusHandled`,function(){return O(e),k(q(2).componentFocus.set(null))})(`showForm`,function(t){return O(e),k(q(2).showForm(t))}),z()}if(e&2){let e=q(2);L(`rpc`,e.rpc())(`focus`,e.componentFocus())}}function cB(e,t){e&1&&B(0,`app-route-inspector`,42),e&2&&L(`rpc`,q(2).rpc())}function lB(e,t){e&1&&B(0,`app-signal-inspector`,42),e&2&&L(`rpc`,q(2).rpc())}function uB(e,t){e&1&&B(0,`app-di-inspector`,42),e&2&&L(`rpc`,q(2).rpc())}function dB(e,t){e&1&&B(0,`app-store-inspector`,42),e&2&&L(`rpc`,q(2).rpc())}function fB(e,t){e&1&&B(0,`app-network-inspector`,42),e&2&&L(`rpc`,q(2).rpc())}function pB(e,t){if(e&1){let e=W();R(0,`app-forms-inspector`,46),G(`focusHandled`,function(){return O(e),k(q(2).formFocus.set(null))}),z()}if(e&2){let e=q(2);L(`rpc`,e.rpc())(`focus`,e.formFocus())}}function mB(e,t){e&1&&B(0,`app-pipes-inspector`,42),e&2&&L(`rpc`,q(2).rpc())}function hB(e,t){e&1&&B(0,`app-analog-inspector`,42),e&2&&L(`rpc`,q(2).rpc())}function gB(e,t){if(e&1&&N(0,oB,1,1,`app-dashboard`,42)(1,sB,1,2,`app-component-tree`,43)(2,cB,1,1,`app-route-inspector`,42)(3,lB,1,1,`app-signal-inspector`,42)(4,uB,1,1,`app-di-inspector`,42)(5,dB,1,1,`app-store-inspector`,42)(6,fB,1,1,`app-network-inspector`,42)(7,pB,1,2,`app-forms-inspector`,43)(8,mB,1,1,`app-pipes-inspector`,42)(9,hB,1,1,`app-analog-inspector`,42),e&2){let e;P((e=q().tab())===`dashboard`?0:e===`components`?1:e===`routes`?2:e===`signals`?3:e===`injectors`?4:e===`store`?5:e===`network`?6:e===`forms`?7:e===`pipes`?8:e===`analog`?9:-1)}}var _B=[`angular`,`ngrx`,`analog`,`nativescript`,`capacitor`],vB={angular:`Angular`,ngrx:`NgRx Store`,analog:`Analog`,nativescript:`NativeScript`,capacitor:`Capacitor`},yB={ngrx:`#d770e8`,analog:`#ff5470`,nativescript:`#8196ff`,capacitor:`#53b9ff`},bB={ngrx:`store`,analog:`analog`},xB={store:`ngrx`,analog:`analog`},SB={nativescript:{id:`nativescript`,name:`NativeScript`,badge:`Coming Soon`,heading:`NativeScript Support`,summary:`Inspect NativeScript Angular apps running natively on iOS and Android, with the same tools.`,color:`#3c5afd`,plans:[`Native overlay that reports the component tree from the device`,`Standalone devtools server your phone or simulator connects to`,`Example NativeScript app to try it end to end`],pr:16,author:{name:`Nathan Walker`,login:`NathanWalker`}},capacitor:{id:`capacitor`,name:`Capacitor`,badge:`Coming Soon`,heading:`Capacitor Support`,summary:`Connect Ionic and Capacitor apps running in a device WebView back to these tools.`,color:`#119eff`,plans:[`Manual overlay start for apps that load from capacitor:// or a device`,`Connection settings passed in, no cross-origin probing`,`Setup guides for the Android emulator and iOS simulator`],pr:21,author:{name:`Erkam Yaman`,login:`erkamyaman`}}},CB={id:`analog`,name:`Analog`,badge:`Not in this app`,heading:`This app doesn’t use Analog`,summary:`In an Analog app this dock shows your file routes, server load() and API calls, render modes and route lint.`,color:`#dd0330`,plans:[`Which page, layout and .server.ts files render a URL`,`Every load(), server function and API call with timing`,`SSR, prerendered or client only, per page`],link:{label:`Get started with Analog`,href:`https://analogjs.org/docs/getting-started`}};function wB(){let e=new URLSearchParams(location.search).get(`view`);return _B.find(t=>t===e)??null}var TB=class e{analog=A(!1);allTabs=[{id:`dashboard`,label:`Dashboard`},{id:`analog`,label:`Analog`},{id:`components`,label:`Components`},{id:`routes`,label:`Routes`},{id:`signals`,label:`Signals`},{id:`injectors`,label:`Injectors`},{id:`store`,label:`Store`},{id:`forms`,label:`Forms`},{id:`pipes`,label:`Pipes`},{id:`network`,label:`SSR & HTTP`}];view=A(wB());viewAccent=Q(()=>{let e=this.view();return(e&&yB[e])??null});title=Q(()=>{let e=this.view();return e?vB[e]:`Angular DevTools`});analogKnown=A(!1);comingSoon=Q(()=>{let e=this.view();return e===`analog`?this.analogKnown()&&!this.analog()?CB:void 0:e?SB[e]:void 0});config=Q(()=>ET(this.rpc()));tabEnabled=kT;tabs=Q(()=>{if(this.comingSoon())return[];let e=this.view(),t=e?bB[e]:void 0,n=this.allTabs.filter(e=>kT(e.id,this.config()));return t?n.filter(e=>e.id===t):n.filter(t=>(t.id!==`analog`||this.analog())&&!(e===`angular`&&xB[t.id]))});tab=nv(()=>{let e=this.view();return e&&bB[e]||`dashboard`});rpc=A(null);connected=A(!1);connectionFailed=A(!1);client=A(null);trust=A(`pending`);needsCode=Q(()=>this.trust()===`needs-code`);server=A(``);pageOrigin=location.origin;statusLabel=Q(()=>this.connected()?`Live`:this.connectionFailed()?`Disconnected`:this.needsCode()?`Code needed`:`Connecting…`);stopTrust=()=>{};stopFollowing=()=>{};nav=hv(`nav`);main=hv(`main`);injector=E(Ss);navObserver;navFade=A({start:!1,end:!1});constructor(){wd(()=>{let e=this.nav()?.nativeElement;e&&typeof ResizeObserver<`u`&&(this.navObserver=new ResizeObserver(()=>this.measureNav()),this.navObserver.observe(e))}),jv(()=>{this.tab(),this.tabs(),ev(()=>{this.revealActiveTab(),this.measureNav()})})}measureNav(){let e=this.nav()?.nativeElement;if(!e)return;let t=e.scrollWidth-e.clientWidth,n=e.scrollLeft>1,r=t>1&&e.scrollLeftn?e.scrollLeft=Math.max(0,n):e.scrollLeftthis.showView(e)));try{window.parent!==window&&Ez(window.parent.document)}catch{}let e=new URLSearchParams(location.hash.replace(/^#/,``)).get(`tab`);e&&this.tabs().some(t=>t.id===e)&&this.tab.set(e);let t=OB(),n=Fz(t,location.href);this.server.set(n),aT({...t?{baseURL:t}:{},authToken:Rz(n,this.pageOrigin),simpleAuth:!1}).then(e=>{this.client.set(e),this.connected.set(e.status===`connected`),e.events.on(`connection:status`,e=>{this.connected.set(e===`connected`)}),this.stopTrust=Pz(e,t=>{this.trust.set(t),t===`trusted`&&!this.rpc()&&this.start(e)})},()=>{this.connectionFailed.set(!0),this.analogKnown.set(!0)})}start(e){this.rpc.set(e),e.scope(`ng-devtools`).rpc.call(`analog-project`).then(e=>{let t=!!e?.analog;this.analog.set(t),this.analogKnown.set(!0),!t&&this.tab()===`analog`&&!this.view()&&this.tab.set(`dashboard`)},()=>{this.analogKnown.set(!0),this.tab()===`analog`&&!this.view()&&this.tab.set(`dashboard`)})}ngOnDestroy(){this.stopFollowing(),this.stopTrust(),this.navObserver?.disconnect()}showView(e){if(e===this.view())return;this.view.set(e);let t=new URL(location.href);t.searchParams.set(`view`,e),t.hash=``,history.replaceState(history.state,``,t)}formFocus=A(null);componentFocus=nv({source:this.tab,computation:()=>null});showForm(e){this.formFocus.set({id:e}),this.switchTab(`forms`)}inspectFromPanel({source:e,origin:t,data:n}){if(e!==window.parent||t!==location.origin)return;let r=n;r?.type===`ng-devtools:inspect-component`&&typeof r.id==`string`&&this.tab()===`components`&&this.config().inspectors.components&&this.componentFocus.set({id:r.id})}switchTab(e){let t=xB[e];if(this.view()===`angular`&&t){this.activateDock(t,e);return}this.setTab(e),history.replaceState(history.state,``,`#tab=${e}`)}setTab(e){this.keepFocus(),this.tab.set(e)}keepFocus(){let e=document.activeElement,t=this.main()?.nativeElement;(!e||e===document.body||t?.contains(e))&&wd(()=>{let e=document.activeElement;e&&e!==document.body||(this.nav()?.nativeElement.querySelector(`button.active`)??this.main()?.nativeElement)?.focus()},{injector:this.injector})}async activateDock(e,t){if(await jz(e))return;if(window.parent===window){this.keepFocus(),this.showView(e);return}let n=this.rpc();if(!n?.call){this.setTab(t);return}try{await n.call(`hub:docks:activate`,{dockId:`ng-devtools:${e}`}),this.keepFocus(),this.showView(e)}catch{this.setTab(t)}}static ɵfac=function(t){return new(t||e)};static ɵcmp=Oh({type:e,selectors:[[`app-root`]],viewQuery:function(e,t){e&1&&Ng(t.nav,Gz,5)(t.main,Kz,5),e&2&&Pg(2)},hostVars:2,hostBindings:function(e,t){e&1&&G(`message`,function(e){return t.inspectFromPanel(e)},yu),e&2&&n_(`--%NS%accent`,t.viewAccent())},decls:25,vars:19,consts:[[`nav`,``],[`main`,``],[1,`brand`],[1,`mark`],[`width`,`22`,`height`,`22`,`viewBox`,`0 0 256 256`,`aria-hidden`,`true`],[`width`,`24`,`height`,`17`,`viewBox`,`0 0 256 182`,`aria-hidden`,`true`],[`width`,`22`,`height`,`22`,`viewBox`,`0 0 24 24`,`fill`,`currentColor`,`aria-hidden`,`true`],[`width`,`20`,`height`,`22`,`viewBox`,`0 0 223 236`,`aria-hidden`,`true`],[`width`,`20`,`height`,`22`,`viewBox`,`0 0 223 236`,`fill`,`currentColor`,`aria-hidden`,`true`],[1,`title`],[`aria-label`,`Inspectors`,3,`scroll`],[`role`,`status`,1,`status`],[`aria-hidden`,`true`,1,`dot`],[`tabindex`,`-1`],[`role`,`alert`,1,`connection-error`],[3,`client`,`server`,`pageOrigin`],[3,`info`],[1,`turned-off`],[`fill`,`#3c5afd`,`d`,`M237.248 18.752q18.061 18.06 18.748 45.247V192c-.457 18.12-6.707 33.207-18.748 45.247c-12.04 12.04-27.127 18.291-45.251 18.752H63.999q-27.187-.69-45.247-18.752C6.712 225.208.46 210.121 0 192.001V64q.69-27.187 18.752-45.247Q36.812.692 63.999 0h127.998c18.124.46 33.211 6.711 45.251 18.752m-17.655 103q-6.033-6.003-6.28-15.066V64q-.192-9.063-6.221-15.091c-4.02-4.023-9.054-6.093-15.095-6.22h-21.312v106.626L85.315 42.687H63.999c-6.042.128-11.072 2.198-15.091 6.221c-4.023 4.02-6.093 9.05-6.22 15.09v42.688q-.249 9.063-6.281 15.066q-6.03 5.996-15.091 6.246q9.062.255 15.09 6.25c4.024 4.002 6.115 9.024 6.281 15.066V192c.128 6.037 2.198 11.072 6.221 15.091q6.03 6.03 15.09 6.22h21.317V106.687l85.37 106.627h21.312c6.041-.128 11.076-2.202 15.095-6.221s6.093-9.054 6.22-15.09v-42.688q.249-9.063 6.281-15.066q6.03-5.995 15.091-6.25q-9.062-.25-15.09-6.246`],[`fill`,`#53b9ff`,`d`,`M39.863 54.115L.311 93.716l60.995 61.179L0 216.385l39.428 39.619l61.43-61.507l61.097 61.068l39.552-39.602z`],[`fill`,`#119eff`,`d`,`m140.517 154.896l-39.658 39.601l61.097 61.069l39.552-39.602z`],[`fill-opacity`,`.2`,`d`,`m140.517 154.896l-39.658 39.601l15.267 15.182z`],[`fill`,`#53b9ff`,`d`,`M194.57 100.985L256 39.478L216.431 0l-61.412 61.384L93.917.311L54.365 39.913L216.01 201.761l39.552-39.602z`],[`fill`,`#119eff`,`d`,`m115.36 100.987l39.659-39.602L93.917.313L54.365 39.914z`],[`fill-opacity`,`.2`,`d`,`m115.359 100.985l39.659-39.601l-15.271-15.186z`],[`fill`,`#c30f2e`,`d`,`M152.228.001L48.455 181.046H256L152.228 0z`],[`fill`,`#dd0330`,`d`,`M88.314 26.967L0 181.52h176.628L88.315 26.967z`],[`fill`,`#fff`,`d`,`M18.167 135.294h220.236v-2.419H18.167z`],[`fill`,`#fff`,`d`,`M204.38 170.667c-.861 0-1.67-.358-2.348-1.034c-4.045-4.063-4.221-20.586-4.026-45.33c.11-13.521.257-32.043-1.9-33.504c-2.104.873-2.315 16.172-2.451 26.301c-.162 11.785-.327 23.98-2.242 30.189c-.57 1.84-1.306 3.525-2.786 3.39c-2.086-.185-2.76-3.48-4.317-16.478c-.647-5.4-1.317-10.98-2.101-13.14a11 11 0 0 0-.269-.66c-.835 1.889-1.8 7.079-2.47 10.682c-.927 4.976-1.803 9.676-2.9 11.726c-.847 1.575-2.19 3.63-4.067 3.231c-2.558-.537-3.323-5.693-3.552-8.719c0-25.455-3.33-28.417-3.997-28.753l-.107.081l-.162-.036c-2.377 1.038-2.506 9.294-2.627 17.276c-.096 5.856-.198 12.492-1.053 18.701c-1.108 8.05-2.448 9.603-4.115 9.507c-3.838-.262-3.95-13.482-3.95-14.987c0-.472.012-1.028.027-1.642c.074-3.076.205-8.8-1.687-10.604c-.25-.239-.603-.515-.879-.437c-1.347.339-2.745 4.714-3.209 6.153c-.147.457-.265.833-.364 1.09c-.078.214-.177.515-.294.88c-1.02 3.095-2.18 6.183-4.16 6.944c-.732.284-1.498.222-2.216-.183c-.953-.541-1.73-1.646-2.455-3.482c-.397-1.016-.735-2.046-1.082-3.081c-.419-1.263-.85-2.569-1.384-3.808c-.419-.965-1.464-1.4-2.796-1.164c-2.768.494-3.232 3.29-3.622 7.5c-.07.733-.137 1.452-.228 2.128c-.011.198-.501 6.38-.814 8.344c-.865 5.39-2.002 7.512-3.89 7.358c-4.66-.398-6.798-20.836-6.684-29.47c.088-6.592-1.104-9-1.818-9.382c-.074-.034-.189-.096-.46.095c-.843.571-1.594 2.348-1.363 4.215c2.566 20.32.674 43.592-3.96 48.833c-1.46 1.649-3.448 1.627-4.832.236c-4.049-4.064-4.218-20.586-4.026-45.33c.11-13.521.254-32.043-1.9-33.504c-2.105.873-2.311 16.172-2.45 26.301c-.163 11.785-.329 23.98-2.246 30.189c-.57 1.84-1.307 3.525-2.782 3.39c-2.091-.186-2.761-3.48-4.321-16.478c-.649-5.4-1.319-10.98-2.101-13.14c-.1-.273-.189-.49-.27-.66c-.832 1.889-1.796 7.079-2.466 10.682c-.927 4.976-1.803 9.676-2.904 11.726c-.846 1.575-2.19 3.63-4.063 3.231c-2.558-.537-3.324-5.693-3.552-8.719c-.003-25.455-3.33-28.417-3.997-28.753l-.106.081l-.166-.036c-2.374 1.038-2.503 9.293-2.629 17.276c-.091 5.856-.194 12.492-1.048 18.701c-1.107 8.05-2.437 9.618-4.111 9.507c-3.846-.262-3.958-13.482-3.958-14.987c0-.472.016-1.028.03-1.642c.074-3.076.207-8.8-1.685-10.604c-.25-.239-.603-.515-.88-.438c-1.347.34-2.75 4.715-3.206 6.155a47 47 0 0 1-.364 1.09q-.16.432-.298.875c-1.02 3.096-2.18 6.187-4.155 6.95c-.736.282-1.506.22-2.22-.185c-.953-.541-1.734-1.646-2.454-3.482c-.398-1.016-.74-2.046-1.083-3.081c-.42-1.263-.854-2.569-1.387-3.808c-.416-.965-1.465-1.4-2.797-1.164c-3.188.567-3.943 4.52-4.55 9.238l-.106.839l-2.411-.32l.114-.824c.527-4.137 1.328-10.39 6.53-11.31c2.446-.435 4.585.581 5.446 2.583c.578 1.34 1.031 2.695 1.466 4.008c.324.99.654 1.98 1.037 2.959c.674 1.708 1.197 2.15 1.392 2.257c1.218-.38 2.462-4.167 2.873-5.414c.13-.402.24-.732.328-.968c.085-.233.195-.571.328-.98c1.097-3.43 2.474-7.144 4.918-7.762c.747-.191 1.903-.166 3.157 1.035c2.665 2.544 2.525 8.48 2.433 12.41c-.014.59-.028 1.126-.028 1.583c0 6.272.93 10.655 1.64 12.16c.367-.77.998-2.63 1.598-7.007c.831-6.066.938-12.624 1.027-18.41c.161-10.24.275-17.663 3.982-19.408c.552-.339 1.469-.522 2.436-.033c3.586 1.803 5.326 11.885 5.326 30.817c.225 2.926 1.013 6.006 1.66 6.448c.004-.066.53-.39 1.394-2.01c.925-1.718 1.845-6.665 2.655-11.026c1.792-9.614 2.606-12.989 4.726-13.166c1.615-.158 2.362 1.896 2.676 2.76c.883 2.422 1.537 7.888 2.23 13.678c.54 4.49 1.31 10.902 2.094 13.497c.084-.228.18-.5.283-.836c1.815-5.878 1.98-17.887 2.14-29.507c.22-16.14.503-26.139 3.448-28.226a2.44 2.44 0 0 1 2.233-.316c3.448 1.144 3.714 11.254 3.519 35.8c-.14 17.799-.313 39.952 3.323 43.603c.317.32.542.32.622.32c.17 0 .413-.161.67-.452c3.681-4.162 6.01-26.022 3.372-46.927c-.328-2.602.677-5.337 2.392-6.514c.946-.652 2.036-.736 2.978-.232c2.145 1.14 3.187 5.024 3.102 11.546c-.15 11.387 2.584 24.714 4.37 26.842c.282-.471.842-1.763 1.379-5.145c.301-1.87.799-8.153.806-8.216c.09-.71.155-1.398.217-2.097c.369-3.924.82-8.804 5.613-9.654c2.444-.435 4.583.577 5.448 2.583c.577 1.34 1.027 2.695 1.46 4.008c.332.99.664 1.98 1.046 2.959c.67 1.708 1.197 2.15 1.387 2.257c1.218-.38 2.467-4.167 2.875-5.41c.132-.402.243-.737.328-.973c.088-.228.195-.57.324-.979c1.1-3.43 2.477-7.144 4.924-7.762c.74-.191 1.9-.166 3.154 1.035c2.665 2.543 2.526 8.48 2.437 12.41q-.029.792-.033 1.583c0 6.272.931 10.655 1.641 12.16c.365-.77.994-2.63 1.601-7.007c.832-6.066.931-12.624 1.027-18.41c.159-10.24.273-17.663 3.98-19.408c.55-.339 1.467-.522 2.44-.033c3.58 1.803 5.325 11.884 5.325 30.817c.224 2.926 1.012 6.006 1.656 6.448c.008-.066.526-.39 1.399-2.01c.923-1.718 1.84-6.665 2.653-11.026c1.786-9.614 2.602-12.989 4.722-13.166c1.62-.158 2.367 1.896 2.68 2.76c.88 2.422 1.535 7.888 2.233 13.678c.534 4.49 1.304 10.902 2.092 13.497c.08-.228.176-.5.28-.836c1.813-5.878 1.976-17.887 2.138-29.507c.216-16.14.504-26.139 3.448-28.226a2.45 2.45 0 0 1 2.234-.316c3.452 1.144 3.718 11.254 3.52 35.8c-.141 17.799-.314 39.952 3.319 43.603c.324.32.544.32.63.32c.165 0 .408-.161.662-.452c3.687-4.162 6.014-26.022 3.375-46.927c-.342-2.723.43-5.47 1.84-6.526c.71-.537 1.575-.647 2.37-.313c2.054.877 3.445 4.63 4.255 11.484c.339 2.87.641 5.974.931 9.036c.641 6.683 1.509 15.69 2.684 17.67c.36-.46 1.096-1.704 2.19-5.038l2.307.753c-1.696 5.157-3.026 7.1-4.755 6.902c-2.69-.299-3.468-5.734-4.84-20.055c-.29-3.048-.59-6.132-.928-8.989c-1.03-8.74-2.782-9.532-2.801-9.54c-.342.174-1.137 1.992-.842 4.31c2.558 20.32.673 43.597-3.964 48.834c-.747.842-1.587 1.27-2.485 1.27`],[`d`,`M12.024.017V0L12 .008L11.976 0v.017L.812 3.892l1.605 14.875l9.559 5.207V24l.024-.013l.024.013v-.026l9.559-5.207l1.605-14.875zm6.868 14.244q-1.64 3.948-6.031 4.166c-2.829 0-4.661-1.7-4.66-1.7q-1.745-1.359-2.398-3.417c-.695-.76-.702-.841-.774-1.145c-.072-.303.045-.388.249-.685q.204-.298.098-.85q-.26-.36-.3-1.128q0-.37.496-.783q.495-.413.607-.632q.083-.119.065-1.031q-.006-.897.995-.975c1-.08 1.565-.832 1.879-1.174c.21-.228.52-.339.91-.341c.551-.026 1.052.185 1.484.62c1.075-.055 2.176.235 3.292.863q2.379 1.414 2.596 3.055q-.257 2.158-5.788-.113q-2.895.819-2.846 3.552q0 2.508 2.422 3.643c-.787-.772-1.122-1.422-1.01-1.959q2.456 2.906 5.588 2.173c-.92.032-1.65-.264-2.198-.893q2.116-.05 3.998-1.972c-.724.576-1.482.794-2.284.657q3.26-2.563 2.307-5.98l-.002-.006a3.02 3.02 0 0 1 .788 2.03q.023 1.175-.795 2.477q.613-.478 1.413-2.047c.23 2.117-.625 3.724-2.574 4.825q.934-.085 2.473-1.23m-5.567-6.63a.319.319 0 1 1 .638 0a.319.319 0 0 1-.638 0`],[`id`,`ng-grad`,`x1`,`49`,`x2`,`226`,`y1`,`214`,`y2`,`130`,`gradientUnits`,`userSpaceOnUse`],[`stop-color`,`#E40035`],[`offset`,`.24`,`stop-color`,`#F60A48`],[`offset`,`.352`,`stop-color`,`#F20755`],[`offset`,`.494`,`stop-color`,`#DC087D`],[`offset`,`.745`,`stop-color`,`#9717E7`],[`offset`,`1`,`stop-color`,`#6C00F5`],[`fill`,`url(#ng-grad)`,`d`,`m222.077 39.192-8.019 125.923L137.387 0l84.69 39.192Zm-53.105 162.825-57.933 33.056-57.934-33.056 11.783-28.556h92.301l11.783 28.556ZM111.039 62.675l30.357 73.803H80.681l30.358-73.803ZM7.937 165.115 0 39.192 84.69 0 7.937 165.115Z`],[`d`,`m222.077 39.192-8.019 125.923L137.387 0l84.69 39.192Zm-53.105 162.825-57.933 33.056-57.934-33.056 11.783-28.556h92.301l11.783 28.556ZM111.039 62.675l30.357 73.803H80.681l30.358-73.803ZM7.937 165.115 0 39.192 84.69 0 7.937 165.115Z`],[`type`,`button`,3,`active`],[`type`,`button`,3,`click`],[3,`name`],[3,`rpc`],[3,`rpc`,`focus`],[3,`navigate`,`rpc`],[3,`focusHandled`,`showForm`,`rpc`,`focus`],[3,`focusHandled`,`rpc`,`focus`]],template:function(e,t){if(e&1&&(R(0,`header`)(1,`h1`,2)(2,`span`,3),N(3,Jz,2,0,`:svg:svg`,4)(4,Yz,7,0,`:svg:svg`,4)(5,Xz,5,0,`:svg:svg`,5)(6,Zz,2,0,`:svg:svg`,6)(7,Qz,10,0,`:svg:svg`,7)(8,$z,2,0,`:svg:svg`,8),z(),R(9,`span`,9),Y(10),z()(),R(11,`nav`,10,0),G(`scroll`,function(){return t.measureNav()}),N(13,tB,2,0),z(),R(14,`span`,11)(15,`span`,12),B(16,`span`),z(),Y(17),z()(),R(18,`main`,13,1),N(20,nB,2,0,`p`,14)(21,rB,1,3,`app-code-entry`,15)(22,iB,1,1,`app-coming-soon`,16)(23,aB,5,0,`p`,17)(24,gB,10,1),z()),e&2){let e;j(2),J(`ng-mark`,t.view()===`angular`),j(),P(t.view()===`nativescript`?3:t.view()===`capacitor`?4:t.view()===`analog`?5:t.view()===`ngrx`?6:t.view()===`angular`?7:8),j(6),J(`ng-text`,t.view()===`angular`),j(),X(t.title()),j(),J(`fade-start`,t.navFade().start)(`fade-end`,t.navFade().end),j(2),P(t.tabs().length>1?13:-1),j(),J(`connected`,t.connected())(`failed`,t.connectionFailed())(`locked`,t.needsCode()),j(3),Z(` `,t.statusLabel(),` `),j(3),P(t.connectionFailed()?20:(e=t.needsCode()&&t.client())?21:(e=t.comingSoon())?22:t.tabEnabled(t.tab(),t.config())?24:23,e)}},dependencies:[lE,vD,GA,jj,LM,QN,WF,BI,DR,_z,wz,BT,Wz],styles:[`[_nghost-%COMP%] { --%NS%accent-soft: color-mix(in srgb, var(--%NS%accent) 12%, transparent); --%NS%accent-line: color-mix(in srgb, var(--%NS%accent) 45%, transparent); display: flex; @@ -11740,6 +11890,15 @@ nav[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:focus-visible { animation: none; } +.status.locked[_ngcontent-%COMP%] { + border-color: color-mix(in srgb, var(--%NS%warn) 36%, transparent); + color: var(--%NS%text); +} + +.status.locked[_ngcontent-%COMP%] .dot[_ngcontent-%COMP%] span[_ngcontent-%COMP%] { + animation: none; +} + .status.connected[_ngcontent-%COMP%] .dot[_ngcontent-%COMP%]::before { background: var(--%NS%ok); animation: _ngcontent-%COMP%_ping 2s var(--%NS%ease) infinite; @@ -11821,4 +11980,4 @@ main[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] { flex-shrink: 1; gap: 8px; } -}`]})};function fB(e){try{return new URL(e,location.href).origin===location.origin}catch{return!1}}function pB(e){if(location.protocol!==`chrome-extension:`)return!1;try{let{protocol:t}=new URL(e);return t===`http:`||t===`https:`}catch{return!1}}function mB(){let e=new URLSearchParams(location.search).get(`baseURL`);if(e&&(fB(e)||pB(e)))return e;if(!(location.pathname.includes(`__ng-devtools`)||location.pathname.includes(`__devframes/`)))return`/__ng-devtools/`}yb(dB).catch(console.error);export{Sx as t}; \ No newline at end of file +}`]})};function EB(e){try{return new URL(e,location.href).origin===location.origin}catch{return!1}}function DB(e){if(location.protocol!==`chrome-extension:`)return!1;try{let{protocol:t}=new URL(e);return t===`http:`||t===`https:`}catch{return!1}}function OB(){let e=new URLSearchParams(location.search).get(`baseURL`);if(e&&(EB(e)||DB(e)))return e;if(!(location.pathname.includes(`__ng-devtools`)||location.pathname.includes(`__devframes/`)))return`/__ng-devtools/`}yb(TB).catch(console.error);export{Sx as t}; \ No newline at end of file diff --git a/extension/ui/index.html b/extension/ui/index.html index af81128..6e3bff1 100644 --- a/extension/ui/index.html +++ b/extension/ui/index.html @@ -7,7 +7,7 @@ Angular DevTools - + diff --git a/packages/ng-devtools/src/__tests__/panel-auth-real.test.ts b/packages/ng-devtools/src/__tests__/panel-auth-real.test.ts new file mode 100644 index 0000000..13294a2 --- /dev/null +++ b/packages/ng-devtools/src/__tests__/panel-auth-real.test.ts @@ -0,0 +1,148 @@ +// @vitest-environment node +import { afterAll, beforeAll, describe, expect, it, vi } from 'vitest'; +import { createServer, type ViteDevServer } from 'vite'; +import { connectDevframe, type DevframeRpcClient } from 'devframe/client'; +import ngDevtoolsVite from '../vite.ts'; +import { makeProject } from './analog-fixture.ts'; +import { + savedToken, + serverOrigin, + submitCode, + trustState, + watchTrust, + type TrustState, +} from '../../../../app/src/auth.ts'; + +const PANEL = 'chrome-extension://abcdefghijklmnopabcdefghijklmnop/ui/index.html'; +const PANEL_ORIGIN = new URL(PANEL).origin; + +function memoryStorage() { + const map = new Map(); + return { + getItem: (key: string) => map.get(key) ?? null, + setItem: (key: string, value: string) => void map.set(key, value), + removeItem: (key: string) => void map.delete(key), + clear: () => map.clear(), + }; +} + +let server: ViteDevServer; +let baseURL: string; +const banner: string[] = []; +const clients: DevframeRpcClient[] = []; + +function lastCode(): string | undefined { + const text = banner.join('\n').replace(/\u001b\[[0-9;]*m/g, ''); + return [...text.matchAll(/auth code\s+(\d{6})/g)].at(-1)?.[1]; +} + +// Each panel load starts in a fresh window; drop what devframe cached on this one. +function freshWindow() { + const scope = globalThis as Record; + for (const key of Object.keys(scope)) if (key.startsWith('__DEVFRAME_')) delete scope[key]; +} + +async function connect(storage: ReturnType) { + freshWindow(); + vi.stubGlobal('localStorage', storage); + const server = serverOrigin(baseURL, PANEL); + const client = await connectDevframe({ + baseURL, + authToken: savedToken(server, PANEL_ORIGIN, storage), + simpleAuth: false, + }); + clients.push(client); + return client; +} + +function settled(client: DevframeRpcClient): Promise { + return new Promise((resolve) => { + const stop = watchTrust(client, (state) => { + if (state === 'pending') return; + queueMicrotask(() => stop()); + resolve(state); + }); + }); +} + +function analogProject(client: DevframeRpcClient) { + const rpc = client.scope('ng-devtools').rpc as unknown as { + call: (name: string) => Promise; + }; + return rpc.call('analog-project'); +} + +beforeAll(async () => { + vi.stubGlobal('location', new URL(PANEL)); + const log = console.log; + vi.spyOn(console, 'log').mockImplementation((...args: unknown[]) => { + const text = args.map(String).join(' '); + if (text.includes('auth code')) banner.push(text); + else log(...args); + }); + const root = makeProject({ 'package.json': '{}' }); + server = await createServer({ + root, + configFile: false, + logLevel: 'silent', + server: { host: '127.0.0.1', port: 0, allowedHosts: ['myapp.test'] }, + plugins: [ngDevtoolsVite()], + }); + await server.listen(); + const address = server.httpServer?.address(); + if (!address || typeof address === 'string') throw new Error('no port'); + baseURL = `http://127.0.0.1:${address.port}/__devframes/ng-devtools/`; +}, 30_000); + +afterAll(async () => { + for (const client of clients) client.close?.(); + await server?.close(); + vi.unstubAllGlobals(); + vi.restoreAllMocks(); +}); + +describe('extension panel against a Vite server that asks for the one-time code', () => { + it('asks for the code, rejects a wrong one, then connects with the right one', async () => { + const storage = memoryStorage(); + const client = await connect(storage); + expect(await settled(client)).toBe('needs-code'); + await expect(analogProject(client)).rejects.toThrow(/Not authorized/); + + await client.requestAuthCode(); + const code = lastCode(); + expect(code).toMatch(/^\d{6}$/); + + const server = serverOrigin(baseURL, PANEL); + const wrong = code === '000000' ? '111111' : '000000'; + expect(await submitCode(client, wrong, server, PANEL_ORIGIN, storage)).toBe('wrong'); + expect(trustState(client)).toBe('needs-code'); + expect( + await submitCode( + client, + `${code!.slice(0, 3)} ${code!.slice(3)}`, + server, + PANEL_ORIGIN, + storage, + ), + ).toBe('trusted'); + expect(trustState(client)).toBe('trusted'); + expect(await analogProject(client)).toMatchObject({ analog: false }); + expect(savedToken(server, PANEL_ORIGIN, storage)).toBe(client.connection.authToken); + }, 30_000); + + it('reuses the saved token when the panel reloads', async () => { + const storage = memoryStorage(); + const first = await connect(storage); + expect(await settled(first)).toBe('needs-code'); + await first.requestAuthCode({ reissue: true }); + const server = serverOrigin(baseURL, PANEL); + expect(await submitCode(first, lastCode()!, server, PANEL_ORIGIN, storage)).toBe('trusted'); + first.close?.(); + + const panelOnly = memoryStorage(); + panelOnly.setItem('ng-devtools:auth-tokens', storage.getItem('ng-devtools:auth-tokens')!); + const reloaded = await connect(panelOnly); + expect(await settled(reloaded)).toBe('trusted'); + expect(await analogProject(reloaded)).toMatchObject({ analog: false }); + }, 30_000); +}); diff --git a/packages/ng-devtools/src/__tests__/panel-auth.test.ts b/packages/ng-devtools/src/__tests__/panel-auth.test.ts new file mode 100644 index 0000000..2773daa --- /dev/null +++ b/packages/ng-devtools/src/__tests__/panel-auth.test.ts @@ -0,0 +1,187 @@ +// @vitest-environment node +import { describe, expect, it, vi } from 'vitest'; +import { + requestCode, + saveToken, + savedToken, + serverOrigin, + submitCode, + trustState, + watchTrust, + type TrustClient, + type TrustState, +} from '../../../../app/src/auth.ts'; + +const PANEL = 'chrome-extension://abcdefghijklmnop'; +const SERVER = 'http://myapp.test:5173'; + +function memoryStorage(initial: Record = {}) { + const map = new Map(Object.entries(initial)); + return { + getItem: (key: string) => map.get(key) ?? null, + setItem: (key: string, value: string) => void map.set(key, value), + }; +} + +function mockClient(overrides: Partial> = {}) { + const listeners = new Map void>>(); + const state = { + isTrusted: false as boolean | null, + status: 'connecting' as TrustClient['status'], + authToken: undefined as string | undefined, + }; + const client = { + get isTrusted() { + return state.isTrusted; + }, + get status() { + return state.status; + }, + get connection() { + return { authToken: state.authToken }; + }, + events: { + on(event: string, listener: () => void) { + const set = listeners.get(event) ?? new Set(); + set.add(listener); + listeners.set(event, set); + return () => set.delete(listener); + }, + }, + requestAuthCode: vi.fn(async () => {}), + requestTrustWithCode: vi.fn(async (code: string) => { + if (code !== '123456') return false; + state.isTrusted = true; + state.status = 'connected'; + state.authToken = 'token-1'; + return true; + }), + ...overrides, + } as unknown as TrustClient; + const emit = (event: string) => listeners.get(event)?.forEach((listener) => listener()); + return { client, state, emit, listeners }; +} + +describe('trustState', () => { + it('asks for a code only once the server refuses trust', () => { + expect(trustState({ isTrusted: false, status: 'connecting' })).toBe('pending'); + expect(trustState({ isTrusted: null, status: 'disconnected' })).toBe('pending'); + expect(trustState({ isTrusted: false, status: 'unauthorized' })).toBe('needs-code'); + expect(trustState({ isTrusted: true, status: 'connected' })).toBe('trusted'); + expect(trustState({ isTrusted: true, status: 'disconnected' })).toBe('trusted'); + }); +}); + +describe('watchTrust', () => { + it('reports the current state, every change, and stops when unsubscribed', () => { + const { client, state, emit, listeners } = mockClient(); + const seen: TrustState[] = []; + const stop = watchTrust(client, (value) => seen.push(value)); + state.status = 'unauthorized'; + emit('connection:status'); + state.isTrusted = true; + emit('rpc:is-trusted:updated'); + expect(seen).toEqual(['pending', 'needs-code', 'trusted']); + stop(); + expect([...listeners.values()].every((set) => set.size === 0)).toBe(true); + }); +}); + +describe('serverOrigin', () => { + it('resolves the server from the base URL, or the page itself', () => { + expect(serverOrigin(`${SERVER}/__devframes/ng-devtools/`, `${PANEL}/ui/index.html`)).toBe( + SERVER, + ); + expect(serverOrigin('/__ng-devtools/', 'http://localhost:4000/app')).toBe( + 'http://localhost:4000', + ); + expect(serverOrigin(undefined, 'http://localhost:4000/__devframes/ng-devtools/')).toBe( + 'http://localhost:4000', + ); + }); +}); + +describe('saved tokens', () => { + it('keeps one token per server origin for a panel on another origin', () => { + const storage = memoryStorage(); + saveToken(SERVER, PANEL, 'a', storage); + saveToken('http://localhost:4200', PANEL, 'b', storage); + expect(savedToken(SERVER, PANEL, storage)).toBe('a'); + expect(savedToken('http://localhost:4200', PANEL, storage)).toBe('b'); + expect(savedToken('http://other.test', PANEL, storage)).toBeUndefined(); + }); + + it('leaves same origin pages to devframe', () => { + const storage = memoryStorage(); + saveToken(SERVER, SERVER, 'a', storage); + expect(storage.getItem('ng-devtools:auth-tokens')).toBeNull(); + const stored = memoryStorage({ 'ng-devtools:auth-tokens': JSON.stringify({ [SERVER]: 'a' }) }); + expect(savedToken(SERVER, SERVER, stored)).toBeUndefined(); + expect(savedToken(SERVER, PANEL, stored)).toBe('a'); + }); + + it('survives missing, broken or blocked storage', () => { + expect(savedToken(SERVER, PANEL, null)).toBeUndefined(); + expect( + savedToken(SERVER, PANEL, memoryStorage({ 'ng-devtools:auth-tokens': 'not json' })), + ).toBeUndefined(); + const blocked = { + getItem: () => null, + setItem: () => { + throw new Error('QuotaExceededError'); + }, + }; + expect(() => saveToken(SERVER, PANEL, 'a', blocked)).not.toThrow(); + }); +}); + +describe('submitCode', () => { + it('needs a code before asking the server', async () => { + const { client } = mockClient(); + expect(await submitCode(client, ' ', SERVER, PANEL, memoryStorage())).toBe('empty'); + expect(client.requestTrustWithCode).not.toHaveBeenCalled(); + }); + + it('reports a wrong code and saves nothing', async () => { + const { client } = mockClient(); + const storage = memoryStorage(); + expect(await submitCode(client, '999999', SERVER, PANEL, storage)).toBe('wrong'); + expect(savedToken(SERVER, PANEL, storage)).toBeUndefined(); + }); + + it('trims spaces, connects and saves the token for the server', async () => { + const { client } = mockClient(); + const storage = memoryStorage(); + expect(await submitCode(client, ' 123 456 ', SERVER, PANEL, storage)).toBe('trusted'); + expect(client.requestTrustWithCode).toHaveBeenCalledWith('123456'); + expect(savedToken(SERVER, PANEL, storage)).toBe('token-1'); + }); + + it('reports an unreachable server when the exchange throws', async () => { + const { client } = mockClient({ + requestTrustWithCode: vi.fn(async () => { + throw new Error('socket closed'); + }), + }); + expect(await submitCode(client, '123456', SERVER, PANEL, memoryStorage())).toBe('unreachable'); + }); +}); + +describe('requestCode', () => { + it('asks the server to print the code, rotating it on request', async () => { + const { client } = mockClient(); + expect(await requestCode(client)).toBe(true); + expect(await requestCode(client, true)).toBe(true); + expect(client.requestAuthCode).toHaveBeenNthCalledWith(1, undefined); + expect(client.requestAuthCode).toHaveBeenNthCalledWith(2, { reissue: true }); + }); + + it('resolves false when the server cannot be reached', async () => { + const { client } = mockClient({ + requestAuthCode: vi.fn(async () => { + throw new Error('down'); + }), + }); + expect(await requestCode(client)).toBe(false); + }); +}); From afee06c9cfe9f14d9855e4e49843436f40b46100 Mon Sep 17 00:00:00 2001 From: Kam Date: Wed, 30 Sep 2026 19:14:06 +0300 Subject: [PATCH 06/10] docs(extension): explain the one-time code in the panel The Chrome extension page said the Vite plugin and the Express hub accept the extension, but not that the panel needs the one-time code when the server asks for it. Describe the code form, wrong codes, printing a fresh code and the saved token, and mention it on the security page. --- .../getting-started/chrome-extension.md | 22 ++++++++++++++++++- apps/docs/src/content/security.md | 4 +++- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/apps/docs/src/content/getting-started/chrome-extension.md b/apps/docs/src/content/getting-started/chrome-extension.md index 680a1d0..9bc766a 100644 --- a/apps/docs/src/content/getting-started/chrome-extension.md +++ b/apps/docs/src/content/getting-started/chrome-extension.md @@ -89,6 +89,23 @@ The panel only connects to pages served over `http` or `https`. On other pages i The extension can reach loopback hosts from the start. For any other host, such as a LAN IP or a tunnel, the panel shows an **Allow access** button instead of looking for the server. Click it and confirm the Chrome prompt. The panel then looks for the server again. See [Host access](#host-access) for what the button grants. +### One-time code + +If the devtools server asks for the [one-time code](/security#one-time-code), the panel shows **Enter the one-time code** in place of the inspector, and the status in the header reads **Code needed**. The Express hub asks for the code by default. The Vite plugin asks when it allows a host or origin other than a loopback one, such as a tunnel or a name in `server.allowedHosts`. + + + + The server prints a 6-digit auth code in the terminal where it runs. + + + Type the code in One-time code and press Connect. The panel then loads the inspector. + + + +A wrong code shows an error and keeps the form open, so you can try again. A code expires after 5 minutes, and the server replaces it after 5 wrong tries. **Print a new code** asks the server to print a fresh one. + +The panel keeps the token it gets in the extension's own storage, one per server origin. Reloading the page or reopening DevTools doesn't ask for the code again while the server still trusts that token. + ### The inspected tab The overlay gives each page an id. The panel passes the id of the page it inspects to the UI. If several tabs run the same app, the panel shows the tab you inspect, not the one that reported last. @@ -119,7 +136,7 @@ Other hosts are optional host permissions. **Allow access** asks Chrome for the Granting the extension a host doesn't change what the devtools server accepts. The server still applies its own checks. The Vite plugin, for example, only answers requests from a loopback address. See [Access and redaction](/security). -The Vite plugin and the Express hub accept the extension's `chrome-extension://` origin by default. If your Express hub passes its own `allowedOrigins` list, add `chrome-extension://` to it. The ID is on the extension card in `chrome://extensions`. +The Vite plugin and the Express hub accept the extension's `chrome-extension://` origin by default. When the server also asks for the one-time code, enter it in the panel (see [One-time code](#one-time-code)). If your Express hub passes its own `allowedOrigins` list, add `chrome-extension://` to it. The ID is on the extension card in `chrome://extensions`. ### Content scripts @@ -134,6 +151,9 @@ The content scripts are wider. Two of them run on every page. They check for an The page is not on a loopback host. Click Allow access to let the extension reach that host. Chrome asks you to confirm. + + The devtools server asks for its one-time code. Enter the 6-digit auth code from the terminal that runs your dev server. See One-time code. + None of them served a connection file. Check that the server of the page mounts the devtools and that the server accepts the request. See Access and redaction. diff --git a/apps/docs/src/content/security.md b/apps/docs/src/content/security.md index 6d529de..4bc9e60 100644 --- a/apps/docs/src/content/security.md +++ b/apps/docs/src/content/security.md @@ -28,7 +28,7 @@ The devtools read your running app and send what they find to a server on your m Binds to localhost and asks for a one-time code by default. - Reaches loopback hosts out of the box. Any other host needs a click on Allow access, for that host only. + Reaches loopback hosts out of the box. Any other host needs a click on Allow access, for that host only. Asks for the one-time code when the server does. @@ -121,6 +121,8 @@ On any other host, the panel doesn't send a request until you click **Allow acce Granting the extension a host doesn't change what the devtools server accepts. The server still applies the checks on this page. Both the Vite plugin and the Express hub accept the extension's `chrome-extension://` origin by default. An Express hub with its own `allowedOrigins` list needs the extension origin in that list. See [Chrome extension](/getting-started/chrome-extension#host-access). +When the server asks for the [one-time code](#one-time-code), the panel shows a form for it and reads no data until you enter the code. The panel keeps the token it gets in the extension's own storage, one per server origin, so it doesn't ask again while the server trusts that token. See [One-time code](/getting-started/chrome-extension#one-time-code) on the Chrome extension page. + ## What is redacted Live values leave the page. They are sent to the devtools server, shown in the panel and returned to agents. Redacted values are replaced with `[redacted]`. From a0fa656d4508f3e2ed34a1de6d2ed5742462826b Mon Sep 17 00:00:00 2001 From: Kam Date: Wed, 30 Sep 2026 19:16:42 +0300 Subject: [PATCH 07/10] docs: add the extension one-time code fix to the 0.0.6 changelog --- packages/ng-devtools/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/ng-devtools/CHANGELOG.md b/packages/ng-devtools/CHANGELOG.md index a3e8599..ecb42fe 100644 --- a/packages/ng-devtools/CHANGELOG.md +++ b/packages/ng-devtools/CHANGELOG.md @@ -22,6 +22,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). ### Bug fixes +- Chrome extension: when the server requires the one-time code, the panel now asks for it and saves a token per server, instead of staying on "Not authorized". This affected Vite apps opened through a local hostname or tunnel, and the Express hub. - Router: quick query or fragment updates on the same path, such as a search box or a filter toggle, are no longer reported as a navigation loop. Redirect loops on one path are still caught. ### Features From 8716a831915c20860b64db59a63f0136700003ec Mon Sep 17 00:00:00 2001 From: Kam Date: Wed, 30 Sep 2026 19:33:11 +0300 Subject: [PATCH 08/10] fix(extension): keep devframe auth tokens scoped to their server On the chrome-extension origin, devframe 1.1.0 keeps one unscoped token in localStorage and relays every exchanged token on a BroadcastChannel with no server id. A panel with no token saved for server B fell back to the token of server A, and a code exchanged with server A in one panel was replayed to server B in another. Across origins the panel now always hands devframe an explicit token: the one saved for this server, or a placeholder the server refuses, so the unscoped fallback is never read. Trust updates from the broadcast are applied only when they carry the token saved for this server. --- app/src/app.ts | 5 +- app/src/auth.ts | 22 +++ .../src/__tests__/panel-auth-servers.test.ts | 161 ++++++++++++++++++ .../src/__tests__/panel-auth.test.ts | 37 ++++ 4 files changed, 223 insertions(+), 2 deletions(-) create mode 100644 packages/ng-devtools/src/__tests__/panel-auth-servers.test.ts diff --git a/app/src/app.ts b/app/src/app.ts index 6478d01..c6cef76 100644 --- a/app/src/app.ts +++ b/app/src/app.ts @@ -30,7 +30,7 @@ import { TabIcon } from './pages/tab-icon'; import { styleHubRail } from './hub-rail-style'; import { followHubDocks, selectHubDock } from './hub-dock-sync'; import { panelConfig, tabEnabled } from './devtools-config'; -import { savedToken, serverOrigin, watchTrust, type TrustState } from './auth'; +import { connectToken, scopeTrustUpdates, serverOrigin, watchTrust, type TrustState } from './auth'; import { CodeEntry } from './ui/code-entry'; const HUB_VIEWS = ['angular', 'ngrx', 'analog', 'nativescript', 'capacitor'] as const; @@ -749,10 +749,11 @@ export class App implements OnInit, OnDestroy { this.server.set(server); connectDevframe({ ...(baseURL ? { baseURL } : {}), - authToken: savedToken(server, this.pageOrigin), + authToken: connectToken(server, this.pageOrigin), simpleAuth: false, }).then( (client) => { + scopeTrustUpdates(client, server, this.pageOrigin); this.client.set(client); this.connected.set(client.status === 'connected'); client.events.on('connection:status', (status) => { diff --git a/app/src/auth.ts b/app/src/auth.ts index 9feec3c..4e69783 100644 --- a/app/src/auth.ts +++ b/app/src/auth.ts @@ -13,6 +13,7 @@ export type CodeResult = 'trusted' | 'empty' | 'wrong' | 'unreachable'; type TokenStorage = Pick; const TOKENS_KEY = 'ng-devtools:auth-tokens'; +export const NO_TOKEN = 'ng-devtools:no-token'; export function trustState(client: Pick): TrustState { if (client.isTrusted) return 'trusted'; @@ -72,6 +73,27 @@ export function savedToken( return typeof token === 'string' && token ? token : undefined; } +export function connectToken( + server: string, + pageOrigin: string, + storage = defaultStorage(), +): string | undefined { + if (server === pageOrigin) return undefined; + return savedToken(server, pageOrigin, storage) ?? NO_TOKEN; +} + +export function scopeTrustUpdates( + client: Pick, + server: string, + pageOrigin: string, + storage = defaultStorage(), +): void { + if (server === pageOrigin) return; + const requestTrustWithToken = client.requestTrustWithToken; + client.requestTrustWithToken = async (token) => + token === savedToken(server, pageOrigin, storage) ? requestTrustWithToken(token) : false; +} + export function saveToken( server: string, pageOrigin: string, diff --git a/packages/ng-devtools/src/__tests__/panel-auth-servers.test.ts b/packages/ng-devtools/src/__tests__/panel-auth-servers.test.ts new file mode 100644 index 0000000..a33cacc --- /dev/null +++ b/packages/ng-devtools/src/__tests__/panel-auth-servers.test.ts @@ -0,0 +1,161 @@ +// @vitest-environment node +import { afterAll, beforeAll, describe, expect, it, vi } from 'vitest'; +import { createServer, type ViteDevServer } from 'vite'; +import { connectDevframe, type DevframeRpcClient } from 'devframe/client'; +import ngDevtoolsVite from '../vite.ts'; +import { makeProject } from './analog-fixture.ts'; +import { + NO_TOKEN, + connectToken, + scopeTrustUpdates, + serverOrigin, + submitCode, + watchTrust, + type TrustState, +} from '../../../../app/src/auth.ts'; + +const PANEL = 'chrome-extension://abcdefghijklmnopabcdefghijklmnop/ui/index.html'; +const PANEL_ORIGIN = new URL(PANEL).origin; + +function memoryStorage() { + const map = new Map(); + return { + getItem: (key: string) => map.get(key) ?? null, + setItem: (key: string, value: string) => void map.set(key, value), + removeItem: (key: string) => void map.delete(key), + clear: () => map.clear(), + }; +} + +const servers: ViteDevServer[] = []; +const clients: DevframeRpcClient[] = []; +const banner: string[] = []; +const sent: { url: string; data: string }[] = []; + +function lastCode(): string | undefined { + const text = banner.join('\n').replace(/\u001b\[[0-9;]*m/g, ''); + return [...text.matchAll(/auth code\s+(\d{6})/g)].at(-1)?.[1]; +} + +function freshWindow() { + const scope = globalThis as Record; + for (const key of Object.keys(scope)) if (key.startsWith('__DEVFRAME_')) delete scope[key]; +} + +async function startServer(host: string): Promise { + const server = await createServer({ + root: makeProject({ 'package.json': '{}' }), + configFile: false, + logLevel: 'silent', + server: { host, port: 0 }, + plugins: [ngDevtoolsVite({ auth: true })], + }); + await server.listen(); + servers.push(server); + const address = server.httpServer?.address(); + if (!address || typeof address === 'string') throw new Error('no port'); + return `http://${host}:${address.port}/__devframes/ng-devtools/`; +} + +async function connect(baseURL: string, storage: ReturnType) { + freshWindow(); + const server = serverOrigin(baseURL, PANEL); + const client = await connectDevframe({ + baseURL, + authToken: connectToken(server, PANEL_ORIGIN, storage), + simpleAuth: false, + }); + scopeTrustUpdates(client, server, PANEL_ORIGIN, storage); + clients.push(client); + return { client, server }; +} + +function settled(client: DevframeRpcClient): Promise { + return new Promise((resolve) => { + const stop = watchTrust(client, (state) => { + if (state === 'pending') return; + queueMicrotask(() => stop()); + resolve(state); + }); + }); +} + +function presentedTo(server: string, token: string): boolean { + return sent.some( + ({ url, data }) => + new URL(url).host === new URL(server).host && `${url} ${data}`.includes(token), + ); +} + +let serverA: string; +let serverB: string; + +beforeAll(async () => { + vi.stubGlobal('location', new URL(PANEL)); + const log = console.log; + vi.spyOn(console, 'log').mockImplementation((...args: unknown[]) => { + const text = args.map(String).join(' '); + if (text.includes('auth code')) banner.push(text); + else log(...args); + }); + const Native = globalThis.WebSocket; + vi.stubGlobal( + 'WebSocket', + class extends Native { + constructor(url: string | URL, protocols?: string | string[]) { + super(url, protocols); + sent.push({ url: String(url), data: '' }); + } + override send(data: Parameters[0]) { + sent.push({ url: this.url, data: typeof data === 'string' ? data : String(data) }); + super.send(data); + } + }, + ); + serverA = await startServer('127.0.0.1'); + serverB = await startServer('localhost'); +}, 30_000); + +afterAll(async () => { + for (const client of clients) client.close?.(); + for (const server of servers) await server.close(); + vi.unstubAllGlobals(); + vi.restoreAllMocks(); +}); + +async function trustWithCode(client: DevframeRpcClient, server: string, storage: Storage) { + await client.requestAuthCode({ reissue: true }); + expect(await submitCode(client, lastCode()!, server, PANEL_ORIGIN, storage)).toBe('trusted'); + return client.connection.authToken!; +} + +describe('extension panel connected to two servers', () => { + it('never presents the token for one server to another', async () => { + const storage = memoryStorage(); + vi.stubGlobal('localStorage', storage); + + const b = await connect(serverB, storage); + expect(await settled(b.client)).toBe('needs-code'); + + const a = await connect(serverA, storage); + expect(await settled(a.client)).toBe('needs-code'); + const tokenA = await trustWithCode(a.client, a.server, storage as unknown as Storage); + expect(tokenA).toBeTruthy(); + + await new Promise((resolve) => setTimeout(resolve, 200)); + expect(b.client.isTrusted).toBe(false); + + const reloadedB = await connect(serverB, storage); + expect(await settled(reloadedB.client)).toBe('needs-code'); + expect(reloadedB.client.connection.authToken).not.toBe(tokenA); + + const reloadedA = await connect(serverA, storage); + expect(await settled(reloadedA.client)).toBe('trusted'); + + expect(sent.some(({ url, data }) => url.includes('localhost') && data.includes(NO_TOKEN))).toBe( + true, + ); + expect(presentedTo(serverA, tokenA)).toBe(true); + expect(presentedTo(serverB, tokenA)).toBe(false); + }, 30_000); +}); diff --git a/packages/ng-devtools/src/__tests__/panel-auth.test.ts b/packages/ng-devtools/src/__tests__/panel-auth.test.ts index 2773daa..b38abd0 100644 --- a/packages/ng-devtools/src/__tests__/panel-auth.test.ts +++ b/packages/ng-devtools/src/__tests__/panel-auth.test.ts @@ -1,7 +1,10 @@ // @vitest-environment node import { describe, expect, it, vi } from 'vitest'; import { + NO_TOKEN, + connectToken, requestCode, + scopeTrustUpdates, saveToken, savedToken, serverOrigin, @@ -135,6 +138,40 @@ describe('saved tokens', () => { }); }); +describe('connectToken', () => { + it('sends only the token saved for this server across origins', () => { + const storage = memoryStorage({ + 'ng-devtools:auth-tokens': JSON.stringify({ [SERVER]: 'a' }), + __DEVFRAME_CONNECTION_AUTH_TOKEN__: 'a', + }); + expect(connectToken(SERVER, PANEL, storage)).toBe('a'); + expect(connectToken('http://localhost:4200', PANEL, storage)).toBe(NO_TOKEN); + expect(connectToken(SERVER, SERVER, storage)).toBeUndefined(); + }); +}); + +describe('scopeTrustUpdates', () => { + it('ignores tokens for other servers across origins', async () => { + const storage = memoryStorage({ + 'ng-devtools:auth-tokens': JSON.stringify({ [SERVER]: 'a', 'http://localhost:4200': 'b' }), + }); + const original = vi.fn(async (token: string) => token.length > 0); + const client = { requestTrustWithToken: original }; + scopeTrustUpdates(client, SERVER, PANEL, storage); + expect(await client.requestTrustWithToken('b')).toBe(false); + expect(original).not.toHaveBeenCalled(); + expect(await client.requestTrustWithToken('a')).toBe(true); + expect(original).toHaveBeenCalledWith('a'); + }); + + it('leaves same origin pages to devframe', () => { + const original = vi.fn(async (token: string) => token.length > 0); + const client = { requestTrustWithToken: original }; + scopeTrustUpdates(client, SERVER, SERVER, memoryStorage()); + expect(client.requestTrustWithToken).toBe(original); + }); +}); + describe('submitCode', () => { it('needs a code before asking the server', async () => { const { client } = mockClient(); From 964fc61b4cf501c132006ead85147ead4386674c Mon Sep 17 00:00:00 2001 From: Kam Date: Wed, 30 Sep 2026 19:33:19 +0300 Subject: [PATCH 09/10] fix(extension): block code submission while a new code is requested Asking for a new code left the form idle, so the code could be submitted, or another rotation started, while the server was still rotating it. The rotation could then invalidate the code being checked. The new code request now sets the busy state until it settles, which disables both buttons and blocks overlapping submits and rotations. Rebuild extension/ui for this and the token scoping fix. --- app/src/ui/code-entry.ts | 9 ++++++++- ...kf4zF1R.js => browser-agent-rpc-BXhoSh1z-BmT-XH5u.js} | 2 +- .../ui/assets/{index-D2sQgzNq.js => index-PpE_e9yD.js} | 8 ++++---- extension/ui/index.html | 2 +- 4 files changed, 14 insertions(+), 7 deletions(-) rename extension/ui/assets/{browser-agent-rpc-BXhoSh1z-Dkf4zF1R.js => browser-agent-rpc-BXhoSh1z-BmT-XH5u.js} (93%) rename extension/ui/assets/{index-D2sQgzNq.js => index-PpE_e9yD.js} (97%) diff --git a/app/src/ui/code-entry.ts b/app/src/ui/code-entry.ts index 8e7fca4..a49de6f 100644 --- a/app/src/ui/code-entry.ts +++ b/app/src/ui/code-entry.ts @@ -228,9 +228,16 @@ export class CodeEntry implements OnInit { } protected async newCode() { + if (this.busy()) return; + this.busy.set(true); this.error.set(''); this.note.set(''); - const printed = await requestCode(this.client(), true); + let printed: boolean; + try { + printed = await requestCode(this.client(), true); + } finally { + this.busy.set(false); + } if (printed) { this.code.set(''); this.note.set('A new code is in the terminal.'); diff --git a/extension/ui/assets/browser-agent-rpc-BXhoSh1z-Dkf4zF1R.js b/extension/ui/assets/browser-agent-rpc-BXhoSh1z-BmT-XH5u.js similarity index 93% rename from extension/ui/assets/browser-agent-rpc-BXhoSh1z-Dkf4zF1R.js rename to extension/ui/assets/browser-agent-rpc-BXhoSh1z-BmT-XH5u.js index d976470..7b7d3c4 100644 --- a/extension/ui/assets/browser-agent-rpc-BXhoSh1z-Dkf4zF1R.js +++ b/extension/ui/assets/browser-agent-rpc-BXhoSh1z-BmT-XH5u.js @@ -1 +1 @@ -import{t as e}from"./index-D2sQgzNq.js";var t=Symbol.for(`devframe:browser-agent-registry`),{tools:n,listeners:r}=globalThis[t]??={tools:new Map,listeners:new Set};function i(){return[...n.values()]}function a(e){return r.add(e),()=>r.delete(e)}var o=`devframe:client-id`,s;function c(t=globalThis.window){try{let n=t?.sessionStorage;if(n){let t=n.getItem(o);return t||(t=e(),n.setItem(o,t)),t}}catch{}return s??=e(),s}function l(e){e.client.register({name:`devframe:agent:invoke-client-tool`,type:`action`,jsonSerializable:!0,handler:async(e,t)=>{let n=i().find(t=>t.id===e);if(!n)throw Error(`[devframe/agent] browser tool "${e}" not found`);return await n.invoke(t)}});let t=!1,n=!1,r=0,o=()=>{t||n||(t=!0,queueMicrotask(async()=>{if(t=!1,n)return;let a=i().map(({invoke:e,...t})=>t);(a.length!==0||r!==0)&&(r=a.length,await e.callOptional(`devframe:agent:sync-client-tools`,c(),a).catch(()=>{}))}))},s=a(o),l=e.events.on(`connection:status`,e=>{e===`connected`&&o()});return o(),()=>{n=!0,s(),l()}}export{l as setupBrowserAgentRpcBridge}; \ No newline at end of file +import{t as e}from"./index-PpE_e9yD.js";var t=Symbol.for(`devframe:browser-agent-registry`),{tools:n,listeners:r}=globalThis[t]??={tools:new Map,listeners:new Set};function i(){return[...n.values()]}function a(e){return r.add(e),()=>r.delete(e)}var o=`devframe:client-id`,s;function c(t=globalThis.window){try{let n=t?.sessionStorage;if(n){let t=n.getItem(o);return t||(t=e(),n.setItem(o,t)),t}}catch{}return s??=e(),s}function l(e){e.client.register({name:`devframe:agent:invoke-client-tool`,type:`action`,jsonSerializable:!0,handler:async(e,t)=>{let n=i().find(t=>t.id===e);if(!n)throw Error(`[devframe/agent] browser tool "${e}" not found`);return await n.invoke(t)}});let t=!1,n=!1,r=0,o=()=>{t||n||(t=!0,queueMicrotask(async()=>{if(t=!1,n)return;let a=i().map(({invoke:e,...t})=>t);(a.length!==0||r!==0)&&(r=a.length,await e.callOptional(`devframe:agent:sync-client-tools`,c(),a).catch(()=>{}))}))},s=a(o),l=e.events.on(`connection:status`,e=>{e===`connected`&&o()});return o(),()=>{n=!0,s(),l()}}export{l as setupBrowserAgentRpcBridge}; \ No newline at end of file diff --git a/extension/ui/assets/index-D2sQgzNq.js b/extension/ui/assets/index-PpE_e9yD.js similarity index 97% rename from extension/ui/assets/index-D2sQgzNq.js rename to extension/ui/assets/index-PpE_e9yD.js index 95587cf..1e4c524 100644 --- a/extension/ui/assets/index-D2sQgzNq.js +++ b/extension/ui/assets/index-PpE_e9yD.js @@ -5,7 +5,7 @@ `):``,this.name=`UnsubscriptionError`,this.errors=t}});function mr(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var hr=function(){function e(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var e,t,n,r,i;if(!this.closed){this.closed=!0;var a=this._parentage;if(a){if(this._parentage=null,Array.isArray(a))try{for(var o=cr(a),s=o.next();!s.done;s=o.next())s.value.remove(this)}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}else a.remove(this)}var c=this.initialTeardown;if(dr(c))try{c()}catch(e){i=e instanceof pr?e.errors:[e]}var l=this._finalizers;if(l){this._finalizers=null;try{for(var u=cr(l),d=u.next();!d.done;d=u.next()){var f=d.value;try{vr(f)}catch(e){i??=[],e instanceof pr?i=ur(ur([],lr(i)),lr(e.errors)):i.push(e)}}}catch(e){n={error:e}}finally{try{d&&!d.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}}if(i)throw new pr(i)}},e.prototype.add=function(t){if(t&&t!==this){if(this.closed)vr(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=this._finalizers??[]).push(t)}}},e.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},e.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},e.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&mr(t,e)},e.prototype.remove=function(t){var n=this._finalizers;n&&mr(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=(function(){var t=new e;return t.closed=!0,t})(),e}(),gr=hr.EMPTY;function _r(e){return e instanceof hr||e&&`closed`in e&&dr(e.remove)&&dr(e.add)&&dr(e.unsubscribe)}function vr(e){dr(e)?e():e.unsubscribe()}var yr={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},br={setTimeout:function(e,t){var n=[...arguments].slice(2),r=br.delegate;return r?.setTimeout?r.setTimeout.apply(r,ur([e,t],lr(n))):setTimeout.apply(void 0,ur([e,t],lr(n)))},clearTimeout:function(e){return(br.delegate?.clearTimeout||clearTimeout)(e)},delegate:void 0};function xr(e){br.setTimeout(function(){var t=yr.onUnhandledError;if(t)t(e);else throw e})}function Sr(){}var Cr=(function(){return Er(`C`,void 0,void 0)})();function wr(e){return Er(`E`,void 0,e)}function Tr(e){return Er(`N`,e,void 0)}function Er(e,t,n){return{kind:e,value:t,error:n}}var Dr=null;function Or(e){if(yr.useDeprecatedSynchronousErrorHandling){var t=!Dr;if(t&&(Dr={errorThrown:!1,error:null}),e(),t){var n=Dr,r=n.errorThrown,i=n.error;if(Dr=null,r)throw i}}else e()}function kr(e){yr.useDeprecatedSynchronousErrorHandling&&Dr&&(Dr.errorThrown=!0,Dr.error=e)}var Ar=function(e){sr(t,e);function t(t){var n=e.call(this)||this;return n.isStopped=!1,t?(n.destination=t,_r(t)&&t.add(n)):n.destination=Rr,n}return t.create=function(e,t,n){return new Pr(e,t,n)},t.prototype.next=function(e){this.isStopped?Lr(Tr(e),this):this._next(e)},t.prototype.error=function(e){this.isStopped?Lr(wr(e),this):(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped?Lr(Cr,this):(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(hr),jr=Function.prototype.bind;function Mr(e,t){return jr.call(e,t)}var Nr=function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){Fr(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){Fr(e)}else Fr(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){Fr(e)}},e}(),Pr=function(e){sr(t,e);function t(t,n,r){var i=e.call(this)||this,a;if(dr(t)||!t)a={next:t??void 0,error:n??void 0,complete:r??void 0};else{var o;i&&yr.useDeprecatedNextContext?(o=Object.create(t),o.unsubscribe=function(){return i.unsubscribe()},a={next:t.next&&Mr(t.next,o),error:t.error&&Mr(t.error,o),complete:t.complete&&Mr(t.complete,o)}):a=t}return i.destination=new Nr(a),i}return t}(Ar);function Fr(e){yr.useDeprecatedSynchronousErrorHandling?kr(e):xr(e)}function Ir(e){throw e}function Lr(e,t){var n=yr.onStoppedNotification;n&&br.setTimeout(function(){return n(e,t)})}var Rr={closed:!0,next:Sr,error:Ir,complete:Sr},zr=(function(){return typeof Symbol==`function`&&Symbol.observable||`@@observable`})();function Br(e){return e}function Vr(e){return e.length===0?Br:e.length===1?e[0]:function(t){return e.reduce(function(e,t){return t(e)},t)}}var Hr=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(e,t,n){var r=this,i=Gr(e)?e:new Pr(e,t,n);return Or(function(){var e=r,t=e.operator,n=e.source;i.add(t?t.call(i,n):n?r._subscribe(i):r._trySubscribe(i))}),i},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var n=this;return t=Ur(t),new t(function(t,r){var i=new Pr({next:function(t){try{e(t)}catch(e){r(e),i.unsubscribe()}},error:r,complete:t});n.subscribe(i)})},e.prototype._subscribe=function(e){return this.source?.subscribe(e)},e.prototype[zr]=function(){return this},e.prototype.pipe=function(){return Vr([...arguments])(this)},e.prototype.toPromise=function(e){var t=this;return e=Ur(e),new e(function(e,n){var r;t.subscribe(function(e){return r=e},function(e){return n(e)},function(){return e(r)})})},e.create=function(t){return new e(t)},e}();function Ur(e){return e??yr.Promise??Promise}function Wr(e){return e&&dr(e.next)&&dr(e.error)&&dr(e.complete)}function Gr(e){return e&&e instanceof Ar||Wr(e)&&_r(e)}function Kr(e){return dr(e?.lift)}function qr(e){return function(t){if(Kr(t))return t.lift(function(t){try{return e(t,this)}catch(e){this.error(e)}});throw TypeError(`Unable to lift unknown Observable type`)}}function Jr(e,t,n,r,i){return new Yr(e,t,n,r,i)}var Yr=function(e){sr(t,e);function t(t,n,r,i,a,o){var s=e.call(this,t)||this;return s.onFinalize=a,s.shouldUnsubscribe=o,s._next=n?function(e){try{n(e)}catch(e){t.error(e)}}:e.prototype._next,s._error=i?function(e){try{i(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,s._complete=r?function(){try{r()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,s}return t.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;e.prototype.unsubscribe.call(this),!n&&((t=this.onFinalize)==null||t.call(this))}},t}(Ar),Xr=fr(function(e){return function(){e(this),this.name=`ObjectUnsubscribedError`,this.message=`object unsubscribed`}}),Zr=function(e){sr(t,e);function t(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return t.prototype.lift=function(e){var t=new Qr(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new Xr},t.prototype.next=function(e){var t=this;Or(function(){var n,r;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||=Array.from(t.observers);try{for(var i=cr(t.currentObservers),a=i.next();!a.done;a=i.next())a.value.next(e)}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}})},t.prototype.error=function(e){var t=this;Or(function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var n=t.observers;n.length;)n.shift().error(e)}})},t.prototype.complete=function(){var e=this;Or(function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){return this.observers?.length>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var t=this,n=this,r=n.hasError,i=n.isStopped,a=n.observers;return r||i?gr:(this.currentObservers=null,a.push(e),new hr(function(){t.currentObservers=null,mr(a,e)}))},t.prototype._checkFinalizedStatuses=function(e){var t=this,n=t.hasError,r=t.thrownError,i=t.isStopped;n?e.error(r):i&&e.complete()},t.prototype.asObservable=function(){var e=new Hr;return e.source=this,e},t.create=function(e,t){return new Qr(e,t)},t}(Hr),Qr=function(e){sr(t,e);function t(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r}return t.prototype.next=function(e){var t,n;(n=(t=this.destination)?.next)==null||n.call(t,e)},t.prototype.error=function(e){var t,n;(n=(t=this.destination)?.error)==null||n.call(t,e)},t.prototype.complete=function(){var e,t;(t=(e=this.destination)?.complete)==null||t.call(e)},t.prototype._subscribe=function(e){return this.source?.subscribe(e)??gr},t}(Zr),$r=function(e){sr(t,e);function t(t){var n=e.call(this)||this;return n._value=t,n}return Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(t){var n=e.prototype._subscribe.call(this,t);return!n.closed&&t.next(this._value),n},t.prototype.getValue=function(){var e=this,t=e.hasError,n=e.thrownError,r=e._value;if(t)throw n;return this._throwIfClosed(),r},t.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},t}(Zr);function ei(e,t){return qr(function(n,r){var i=0;n.subscribe(Jr(r,function(n){r.next(e.call(t,n,i++))}))})}var ti=`https://angular.dev/best-practices/security#preventing-cross-site-scripting-xss`,T=class extends Error{code;constructor(e,t){super(ri(e,t)),this.code=e}};function ni(e){return`NG0${Math.abs(e)}`}function ri(e,t){return`${ni(e)}${t?`: `+t:``}`}function ii(e){for(let t in e)if(e[t]===ii)return t;throw Error(``)}function ai(e){if(typeof e==`string`)return e;if(Array.isArray(e))return`[${e.map(ai).join(`, `)}]`;if(e==null)return``+e;let t=e.overriddenName||e.name;if(t)return`${t}`;let n=e.toString();if(n==null)return``+n;let r=n.indexOf(` `);return r>=0?n.slice(0,r):n}function oi(e,t){return e?t?`${e} ${t}`:e:t||``}var si=ii({__forward_ref__:ii});function ci(e){return e.__forward_ref__=ci,e}function li(e){return ui(e)?e():e}function ui(e){return typeof e==`function`&&Object.hasOwn(e,si)&&e.__forward_ref__===ci}function di(e){return{token:e.token,providedIn:e.providedIn||null,factory:e.factory,value:void 0}}function fi(e){return pi(e,gi)}function pi(e,t){return Object.hasOwn(e,t)&&e[t]||null}function mi(e){return(e?.[gi]??null)||null}function hi(e){return e&&Object.hasOwn(e,_i)?e[_i]:null}var gi=ii({ɵprov:ii}),_i=ii({ɵinj:ii}),vi=class{_desc;ngMetadataName=`InjectionToken`;ɵprov;constructor(e,t){this._desc=e,this.ɵprov=void 0,typeof t==`number`?this.__NG_ELEMENT_ID__=t:t!==void 0&&(this.ɵprov=di({token:this,providedIn:t.providedIn||`root`,factory:t.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}};function yi(e){return e&&!!e.ɵproviders}var bi=ii({ɵcmp:ii}),xi=ii({ɵdir:ii}),Si=ii({ɵpipe:ii}),Ci=ii({ɵfac:ii}),wi=ii({__NG_ELEMENT_ID__:ii}),Ti=ii({__NG_ENV_ID__:ii});function Ei(e){return ki(e,`@Component`),e[bi]||null}function Di(e){return ki(e,`@Directive`),e[xi]||null}function Oi(e){return ki(e,`@Pipe`),e[Si]||null}function ki(e,t){if(e==null)throw new T(-919,!1)}function Ai(e){return typeof e==`string`?e:e==null?``:String(e)}var ji=ii({ngErrorCode:ii}),Mi=ii({ngErrorMessage:ii}),Ni=ii({ngTokenPath:ii});function Pi(e,t){return Ii(``,-200,t)}function Fi(e,t){throw new T(-201,!1)}function Ii(e,t,n){let r=new T(t,e);return r[ji]=t,r[Mi]=e,n&&(r[Ni]=n),r}function Li(e){return e[ji]}var Ri;function zi(){return Ri}function Bi(e){let t=Ri;return Ri=e,t}function Vi(e,t,n){let r=fi(e);if(r&&r.providedIn==`root`)return r.value===void 0?r.value=r.factory():r.value;if(n&8)return null;if(t!==void 0)return t;Fi(e,``)}var Hi=globalThis,Ui={},Wi=`__NG_DI_FLAG__`,Gi=class{injector;constructor(e){this.injector=e}retrieve(e,t){let n=Ji(t)||0;try{return this.injector.get(e,n&8?null:Ui,n)}catch(e){if(er(e))return e;throw e}}};function Ki(e,t=0){let n=Zn();if(n===void 0)throw new T(-203,!1);if(n===null)return Vi(e,void 0,t);{let r=Yi(t),i=n.retrieve(e,r);if(er(i)){if(r.optional)return null;throw i}return i}}function qi(e,t=0){return(zi()||Ki)(li(e),t)}function E(e,t){return qi(e,Ji(t))}function Ji(e){return e===void 0||typeof e==`number`?e:0|(e.optional&&8)|(e.host&&1)|(e.self&&2)|(e.skipSelf&&4)}function Yi(e){return{optional:!!(e&8),host:!!(e&1),self:!!(e&2),skipSelf:!!(e&4)}}function Xi(e){let t=[];for(let n=0;nArray.isArray(e)?ta(e,t):t(e))}function na(e,t,n){t>=e.length?e.push(n):e.splice(t,0,n)}function ra(e,t){return t>=e.length-1?e.pop():e.splice(t,1)[0]}function ia(e,t,n,r){let i=e.length;if(i==t)e.push(n,r);else if(i===1)e.push(r,e[0]),e[0]=n;else{for(i--,e.push(e[i-1],e[i]);i>t;){let t=i-2;e[i]=e[t],i--}e[t]=n,e[t+1]=r}}function aa(e,t,n){let r=sa(e,t);return r>=0?e[r|1]=n:(r=~r,ia(e,r,t,n)),r}function oa(e,t){let n=sa(e,t);if(n>=0)return e[n|1]}function sa(e,t){return ca(e,t,1)}function ca(e,t,n){let r=0,i=e.length>>n;for(;i!==r;){let a=r+(i-r>>1),o=e[a<t?i=a:r=a+1}return~(i<{n.push(e)};return ta(t,e=>{let t=e;va(t,a,[],r)&&(i||=[],i.push(t))}),i!==void 0&&_a(i,a),n}function _a(e,t){for(let n=0;n{t(e,r)})}}function va(e,t,n,r){if(e=li(e),!e)return!1;let i=null,a=hi(e),o=!a&&Ei(e);if(!a&&!o){let t=e.ngModule;if(a=hi(t),a)i=t;else return!1}else if(o&&!o.standalone)return!1;else i=e;let s=r.has(i);if(o){if(s)return!1;if(r.add(i),o.dependencies){let e=typeof o.dependencies==`function`?o.dependencies():o.dependencies;for(let i of e)va(i,t,n,r)}}else if(a){if(a.imports!=null&&!s){r.add(i);let e;try{ta(a.imports,i=>{va(i,t,n,r)&&(e||=[],e.push(i))})}finally{}e!==void 0&&_a(e,t)}if(!s){let e=Qi(i)||(()=>new i);t({provide:i,useFactory:e,deps:ua},i),t({provide:pa,useValue:i,multi:!0},i),t({provide:da,useValue:()=>qi(i),multi:!0},i)}let o=a.providers;if(o!=null&&!s){let n=e;ya(o,e=>{t(e,n)})}}else return!1;return i!==e&&e.providers!==void 0}function ya(e,t){for(let n of e)yi(n)&&(n=n.ɵproviders),Array.isArray(n)?ya(n,t):t(n)}var ba=ii({provide:String,useValue:ii});function xa(e){return typeof e==`object`&&!!e&&ba in e}function Sa(e){return!!(e&&e.useExisting)}function Ca(e){return!!(e&&e.useFactory)}function wa(e){return typeof e==`function`}var Ta=new vi(``),Ea={},Da={},Oa=void 0;function ka(){return Oa===void 0&&(Oa=new ma),Oa}var Aa=class{},ja=class extends Aa{parent;source;scopes;records=new Map;_ngOnDestroyHooks=new Set;_onDestroyHooks=[];get destroyed(){return this._destroyed}_destroyed=!1;injectorDefTypes;constructor(e,t,n,r){super(),this.parent=t,this.source=n,this.scopes=r,Va(e,e=>this.processProvider(e)),this.records.set(fa,La(void 0,this)),r.has(`environment`)&&this.records.set(Aa,La(void 0,this));let i=this.records.get(Ta);i!=null&&typeof i.value==`string`&&this.scopes.add(i.value),this.injectorDefTypes=new Set(this.get(pa,ua,{self:!0}))}retrieve(e,t){let n=Ji(t)||0;try{return this.get(e,Ui,n)}catch(e){if(er(e))return e;throw e}}destroy(){Ia(this),this._destroyed=!0;let e=w(null);try{for(let e of this._ngOnDestroyHooks)e.ngOnDestroy();let e=this._onDestroyHooks;this._onDestroyHooks=[];for(let t of e)t()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),w(e)}}onDestroy(e){return Ia(this),this._onDestroyHooks.push(e),()=>this.removeOnDestroy(e)}runInContext(e){Ia(this);let t=Qn(this),n=Bi(void 0);try{return e()}finally{Qn(t),Bi(n)}}get(e,t=Ui,n){if(Ia(this),Object.hasOwn(e,Ti))return e[Ti](this);let r=Ji(n),i=Qn(this),a=Bi(void 0);try{if(!(r&4)){let t=this.records.get(e);if(t===void 0){let n=Ba(e)&&fi(e);t=n&&this.injectableDefInScope(n)?La(Ma(e),Ea):null,this.records.set(e,t)}if(t!=null)return this.hydrate(e,t,r)}let n=r&2?ka():this.parent;return t=r&8&&t===Ui?null:t,n.get(e,t)}catch(e){let t=Li(e);throw t===-200||t===-201?new T(t,null):e}finally{Bi(a),Qn(i)}}resolveInjectorInitializers(){let e=w(null),t=Qn(this),n=Bi(void 0);try{let e=this.get(da,ua,{self:!0});for(let t of e)t()}finally{Qn(t),Bi(n),w(e)}}toString(){return`R3Injector[...]`}processProvider(e){e=li(e);let t=wa(e)?e:li(e&&e.provide),n=Pa(e);if(!wa(e)&&e.multi===!0){let n=this.records.get(t);n||(n=La(void 0,Ea,!0),n.factory=()=>Xi(n.multi),this.records.set(t,n)),t=e,n.multi.push(e)}this.records.set(t,n)}hydrate(e,t,n){let r=w(null);try{if(t.value===Da)throw Pi(``);return t.value===Ea&&(t.value=Da,t.value=t.factory(void 0,n)),typeof t.value==`object`&&t.value&&za(t.value)&&this._ngOnDestroyHooks.add(t.value),t.value}finally{w(r)}}injectableDefInScope(e){if(!e.providedIn)return!1;let t=li(e.providedIn);return typeof t==`string`?t===`any`||this.scopes.has(t):this.injectorDefTypes.has(t)}removeOnDestroy(e){let t=this._onDestroyHooks.indexOf(e);t!==-1&&this._onDestroyHooks.splice(t,1)}};function Ma(e){let t=fi(e),n=t===null?Qi(e):t.factory;if(n!==null)return n;if(e instanceof vi)throw new T(-204,!1);if(e instanceof Function)return Na(e);throw new T(-204,!1)}function Na(e){if(e.length>0)throw new T(-204,!1);let t=mi(e);return t===null?()=>new e:()=>t.factory(e)}function Pa(e){return xa(e)?La(void 0,e.useValue):La(Fa(e),Ea)}function Fa(e,t,n){let r;if(wa(e)){let t=li(e);return Qi(t)||Ma(t)}if(xa(e))r=()=>li(e.useValue);else if(Ca(e))r=()=>e.useFactory(...Xi(e.deps||[]));else if(Sa(e))r=(t,n)=>qi(li(e.useExisting),n!==void 0&&n&8?8:void 0);else{let t=li(e&&(e.useClass||e.provide));if(Ra(e))r=()=>new t(...Xi(e.deps));else return Qi(t)||Ma(t)}return r}function Ia(e){if(e.destroyed)throw new T(-205,!1)}function La(e,t,n=!1){return{factory:e,value:t,multi:n?[]:void 0}}function Ra(e){return!!e.deps}function za(e){return typeof e==`object`&&!!e&&typeof e.ngOnDestroy==`function`}function Ba(e){return typeof e==`function`||typeof e==`object`&&e.ngMetadataName===`InjectionToken`}function Va(e,t){for(let n of e)Array.isArray(n)?Va(n,t):n&&yi(n)?Va(n.ɵproviders,t):t(n)}function Ha(e,t){let n;e instanceof ja?(Ia(e),n=e):n=new Gi(e);let r=Qn(n),i=Bi(void 0);try{return t()}finally{Qn(r),Bi(i)}}function Ua(){return zi()!==void 0||Zn()!=null}var Wa=1;function Ga(e){return Array.isArray(e)&&typeof e[Wa]==`object`}function Ka(e){return Array.isArray(e)&&e[Wa]===!0}function qa(e){return!!(e.flags&4)}function Ja(e){return e.componentOffset>-1}function Ya(e){return(e.flags&1)==1}function Xa(e){return!!e.template}function Za(e){return!!(e[2]&512)}function Qa(e){return(e[2]&256)==256}var $a=(function(e){return e[e.NONE=0]=`NONE`,e[e.HTML=1]=`HTML`,e[e.STYLE=2]=`STYLE`,e[e.SCRIPT=3]=`SCRIPT`,e[e.URL=4]=`URL`,e[e.RESOURCE_URL=5]=`RESOURCE_URL`,e[e.ATTRIBUTE_NO_BINDING=6]=`ATTRIBUTE_NO_BINDING`,e})($a||{}),eo=`math`;function to(e){for(;Array.isArray(e);)e=e[0];return e}function no(e,t){return to(t[e])}function ro(e,t){return to(t[e.index])}function io(e,t){return e.data[t]}function ao(e,t){return e[t]}function oo(e,t,n,r){n>=e.data.length&&(e.data[n]=null,e.blueprint[n]=null),t[n]=r}function so(e,t){let n=t[e];return Ga(n)?n:n[0]}function co(e){return(e[2]&128)==128}function lo(e){return Ka(e[3])}function uo(e,t){return t==null?null:e[t]}function fo(e){e[17]=0}function po(e){e[2]&1024||(e[2]|=1024,co(e)&&_o(e))}function mo(e,t){for(;e>0;)t=t[14],e--;return t}function ho(e){return!!(e[2]&9216||e[24]?.dirty)}function go(e){e[10].changeDetectionScheduler?.notify(8),e[2]&64&&(e[2]|=1024),ho(e)&&_o(e)}function _o(e){e[10].changeDetectionScheduler?.notify(0);let t=bo(e);for(;t!==null&&!(t[2]&8192||(t[2]|=8192,!co(t)));)t=bo(t)}function vo(e,t){if(Qa(e))throw new T(911,!1);e[21]===null&&(e[21]=[]),e[21].push(t)}function yo(e,t){if(e[21]===null)return;let n=e[21].indexOf(t);n!==-1&&e[21].splice(n,1)}function bo(e){let t=e[3];return Ka(t)?t[3]:t}function xo(e){return e[7]??=[]}function So(e){return e.cleanup??=[]}function Co(e,t,n,r){let i=xo(t);i.push(n),e.firstCreatePass&&So(e).push(r,i.length-1)}var wo={lFrame:as(null),bindingsEnabled:!0,skipHydrationRootTNode:null},To=!1;function Eo(){return wo.lFrame.elementDepthCount}function Do(){wo.lFrame.elementDepthCount++}function Oo(){wo.lFrame.elementDepthCount--}function ko(){return wo.bindingsEnabled}function Ao(){return wo.skipHydrationRootTNode!==null}function jo(e){return wo.skipHydrationRootTNode===e}function Mo(){wo.skipHydrationRootTNode=null}function D(){return wo.lFrame.lView}function No(){return wo.lFrame.tView}function O(e){return wo.lFrame.contextLView=e,e[8]}function k(e){return wo.lFrame.contextLView=null,e}function Po(){let e=Fo();for(;e!==null&&e.type===64;)e=e.parent;return e}function Fo(){return wo.lFrame.currentTNode}function Io(){let e=wo.lFrame,t=e.currentTNode;return e.isParent?t:t.parent}function Lo(e,t){let n=wo.lFrame;n.currentTNode=e,n.isParent=t}function Ro(){return wo.lFrame.isParent}function zo(){wo.lFrame.isParent=!1}function Bo(){return wo.lFrame.contextLView}function Vo(){return To}function Ho(e){let t=To;return To=e,t}function Uo(){let e=wo.lFrame,t=e.bindingRootIndex;return t===-1&&(t=e.bindingRootIndex=e.tView.bindingStartIndex),t}function Wo(){return wo.lFrame.bindingIndex}function Go(e){return wo.lFrame.bindingIndex=e}function Ko(){return wo.lFrame.bindingIndex++}function qo(e){let t=wo.lFrame,n=t.bindingIndex;return t.bindingIndex+=e,n}function Jo(){return wo.lFrame.inI18n}function Yo(e,t){let n=wo.lFrame;n.bindingIndex=n.bindingRootIndex=e,Zo(t)}function Xo(){return wo.lFrame.currentDirectiveIndex}function Zo(e){wo.lFrame.currentDirectiveIndex=e}function Qo(e){let t=wo.lFrame.currentDirectiveIndex;return t===-1?null:e[t]}function $o(){return wo.lFrame.currentQueryIndex}function es(e){wo.lFrame.currentQueryIndex=e}function ts(e){let t=e[1];return t.type===2?t.declTNode:t.type===1?e[5]:null}function ns(e,t,n){if(n&4){let r=t,i=e;for(;r=r.parent,r===null&&!(n&1)&&(r=ts(i),!(r===null||(i=i[14],r.type&10))););if(r===null)return!1;t=r,e=i}let r=wo.lFrame=is();return r.currentTNode=t,r.lView=e,!0}function rs(e){let t=is(),n=e[1];wo.lFrame=t,t.currentTNode=n.firstChild,t.lView=e,t.tView=n,t.contextLView=e,t.bindingIndex=n.bindingStartIndex,t.inI18n=!1}function is(){let e=wo.lFrame,t=e===null?null:e.child;return t===null?as(e):t}function as(e){let t={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:e,child:null,inI18n:!1};return e!==null&&(e.child=t),t}function os(){let e=wo.lFrame;return wo.lFrame=e.parent,e.currentTNode=null,e.lView=null,e}var ss=os;function cs(){let e=os();e.isParent=!0,e.tView=null,e.selectedIndex=-1,e.contextLView=null,e.elementDepthCount=0,e.currentDirectiveIndex=-1,e.currentNamespace=null,e.bindingRootIndex=-1,e.bindingIndex=-1,e.currentQueryIndex=0}function ls(e){return(wo.lFrame.contextLView=mo(e,wo.lFrame.contextLView))[8]}function us(){return wo.lFrame.selectedIndex}function ds(e){wo.lFrame.selectedIndex=e}function fs(){let e=wo.lFrame;return io(e.tView,e.selectedIndex)}function ps(){wo.lFrame.currentNamespace=`svg`}function ms(){hs()}function hs(){wo.lFrame.currentNamespace=null}function gs(){return wo.lFrame.currentNamespace}var _s=!0;function vs(){return _s}function ys(e){_s=e}function bs(e,t=null,n=null,r){let i=xs(e,t,n,r);return i.resolveInjectorInitializers(),i}function xs(e,t=null,n=null,r,i=new Set){return new ja([n||ua,ha(e)],t||ka(),null,i)}var Ss=class e{static THROW_IF_NOT_FOUND=Ui;static NULL=new ma;static create(e,t){if(Array.isArray(e))return bs({name:``},t,e,``);{let t=e.name??``;return bs({name:t},e.parent,e.providers,t)}}static ɵprov=di({token:e,providedIn:`any`,factory:()=>qi(fa)});static __NG_ELEMENT_ID__=-1},Cs=new vi(``),ws=class{static __NG_ELEMENT_ID__=Es;static __NG_ENV_ID__=e=>e},Ts=class extends ws{_lView;constructor(e){super(),this._lView=e}get destroyed(){return Qa(this._lView)}onDestroy(e){let t=this._lView;return vo(t,e),()=>yo(t,e)}};function Es(){return new Ts(D())}var Ds=new vi(``),Os=(()=>{class e{taskId=0;pendingTasks=new Set;destroyed=!1;pendingTask=new $r(!1);debugTaskTracker=E(Ds,{optional:!0});get hasPendingTasks(){return!this.destroyed&&this.pendingTask.value}get hasPendingTasksObservable(){return this.destroyed?new Hr(e=>{e.next(!1),e.complete()}):this.pendingTask}add(){!this.hasPendingTasks&&!this.destroyed&&this.pendingTask.next(!0);let e=this.taskId++;return this.pendingTasks.add(e),this.debugTaskTracker?.add(e),e}has(e){return this.pendingTasks.has(e)}remove(e){this.pendingTasks.delete(e),this.debugTaskTracker?.remove(e),this.pendingTasks.size===0&&this.hasPendingTasks&&this.pendingTask.next(!1)}ngOnDestroy(){this.pendingTasks.clear(),this.hasPendingTasks&&this.pendingTask.next(!1),this.destroyed=!0,this.pendingTask.unsubscribe()}static ɵprov=di({token:e,providedIn:`root`,factory:()=>new e})}return e})(),ks=class extends Zr{__isAsync;destroyRef=void 0;pendingTasks=void 0;constructor(e=!1){super(),this.__isAsync=e,Ua()&&(this.destroyRef=E(ws,{optional:!0})??void 0,this.pendingTasks=E(Os,{optional:!0})??void 0)}emit(e){let t=w(null);try{super.next(e)}finally{w(t)}}subscribe(e,t,n){let r=e,i=t||(()=>null),a=n;if(e&&typeof e==`object`){let t=e;r=t.next?.bind(t),i=t.error?.bind(t),a=t.complete?.bind(t)}this.__isAsync&&(i=this.wrapInTimeout(i),r&&=this.wrapInTimeout(r),a&&=this.wrapInTimeout(a));let o=super.subscribe({next:r,error:i,complete:a});return e instanceof hr&&e.add(o),o}wrapInTimeout(e){return t=>{let n=this.pendingTasks?.add();setTimeout(()=>{try{e(t)}finally{n!==void 0&&this.pendingTasks?.remove(n)}})}}};function As(...e){}function js(e){let t,n;function r(){e=As;try{n!==void 0&&typeof cancelAnimationFrame==`function`&&cancelAnimationFrame(n),t!==void 0&&clearTimeout(t)}catch{}}return t=setTimeout(()=>{e(),r()}),typeof requestAnimationFrame==`function`&&(n=requestAnimationFrame(()=>{e(),r()})),()=>r()}function Ms(e){return queueMicrotask(()=>e()),()=>{e=As}}var Ns=`isAngularZone`,Ps=`isAngularZone_ID`,Fs=0,Is=class e{hasPendingMacrotasks=!1;hasPendingMicrotasks=!1;isStable=!0;onUnstable=new ks(!1);onMicrotaskEmpty=new ks(!1);onStable=new ks(!1);onError=new ks(!1);constructor(e){let{enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:n=!1,shouldCoalesceRunChangeDetection:r=!1,scheduleInRootZone:i=!1}=e;if(typeof Zone>`u`)throw new T(908,!1);Zone.assertZonePatched();let a=this;a._nesting=0,a._outer=a._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(a._inner=a._inner.fork(new Zone.TaskTrackingZoneSpec)),t&&Zone.longStackTraceZoneSpec&&(a._inner=a._inner.fork(Zone.longStackTraceZoneSpec)),a.shouldCoalesceEventChangeDetection=!r&&n,a.shouldCoalesceRunChangeDetection=r,a.callbackScheduled=!1,a.scheduleInRootZone=i,Bs(a)}static isInAngularZone(){return typeof Zone<`u`&&Zone.current.get(Ns)===!0}static assertInAngularZone(){if(!e.isInAngularZone())throw new T(909,!1)}static assertNotInAngularZone(){if(e.isInAngularZone())throw new T(909,!1)}run(e,t,n){return this._inner.run(e,t,n)}runTask(e,t,n,r){let i=this._inner,a=i.scheduleEventTask(`NgZoneEvent: `+r,e,Ls,As,As);try{return i.runTask(a,t,n)}finally{i.cancelTask(a)}}runGuarded(e,t,n){return this._inner.runGuarded(e,t,n)}runOutsideAngular(e){return this._outer.run(e)}},Ls={};function Rs(e){if(e._nesting==0&&!e.hasPendingMicrotasks&&!e.isStable)try{e._nesting++,e.onMicrotaskEmpty.emit(null)}finally{if(e._nesting--,!e.hasPendingMicrotasks)try{e.runOutsideAngular(()=>e.onStable.emit(null))}finally{e.isStable=!0}}}function zs(e){if(e.isCheckStableRunning||e.callbackScheduled)return;e.callbackScheduled=!0;function t(){js(()=>{e.callbackScheduled=!1,Vs(e),e.isCheckStableRunning=!0,Rs(e),e.isCheckStableRunning=!1})}e.scheduleInRootZone?Zone.root.run(()=>{t()}):e._outer.run(()=>{t()}),Vs(e)}function Bs(e){let t=()=>{zs(e)},n=Fs++;e._inner=e._inner.fork({name:`angular`,properties:{[Ns]:!0,[Ps]:n,[Ps+n]:!0},onInvokeTask:(n,r,i,a,o,s)=>{if(Gs(s))return n.invokeTask(i,a,o,s);try{return Hs(e),n.invokeTask(i,a,o,s)}finally{(e.shouldCoalesceEventChangeDetection&&a.type===`eventTask`||e.shouldCoalesceRunChangeDetection)&&t(),Us(e)}},onInvoke:(n,r,i,a,o,s,c)=>{try{return Hs(e),n.invoke(i,a,o,s,c)}finally{e.shouldCoalesceRunChangeDetection&&!e.callbackScheduled&&!Ks(s)&&t(),Us(e)}},onHasTask:(t,n,r,i)=>{t.hasTask(r,i),n===r&&(i.change==`microTask`?(e._hasPendingMicrotasks=i.microTask,Vs(e),Rs(e)):i.change==`macroTask`&&(e.hasPendingMacrotasks=i.macroTask))},onHandleError:(t,n,r,i)=>(t.handleError(r,i),e.runOutsideAngular(()=>e.onError.emit(i)),!1)})}function Vs(e){e.hasPendingMicrotasks=!!(e._hasPendingMicrotasks||(e.shouldCoalesceEventChangeDetection||e.shouldCoalesceRunChangeDetection)&&e.callbackScheduled===!0)}function Hs(e){e._nesting++,e.isStable&&(e.isStable=!1,e.onUnstable.emit(null))}function Us(e){e._nesting--,Rs(e)}var Ws=class{hasPendingMicrotasks=!1;hasPendingMacrotasks=!1;isStable=!0;onUnstable=new ks;onMicrotaskEmpty=new ks;onStable=new ks;onError=new ks;run(e,t,n){return e.apply(t,n)}runGuarded(e,t,n){return e.apply(t,n)}runOutsideAngular(e){return e()}runTask(e,t,n,r){return e.apply(t,n)}};function Gs(e){return qs(e,`__ignore_ng_zone__`)}function Ks(e){return qs(e,`__scheduler_tick__`)}function qs(e,t){return!Array.isArray(e)||e.length!==1?!1:e[0]?.data?.[t]===!0}var Js=class{_console=console;handleError(e){this._console.error(`ERROR`,e)}},Ys=new vi(``,{factory:()=>{let e=E(Is),t=E(Aa),n;return r=>{e.runOutsideAngular(()=>{t.destroyed&&!n?setTimeout(()=>{throw r}):(n??=t.get(Js),n.handleError(r))})}}}),Xs={provide:da,useValue:()=>{E(Js,{optional:!0})},multi:!0};function A(e,t){let[n,r,i]=Hn(e,t?.equal),a=n;return a[dn],a.set=r,a.update=i,a.asReadonly=Zs.bind(a),a}function Zs(){let e=this[dn];if(e.readonlyFn===void 0){let t=()=>this();t[dn]=e,e.readonlyFn=t}return e.readonlyFn}var Qs=new vi(``,{factory:()=>$s}),$s=`ng`,ec=new vi(``),tc=new vi(``,{providedIn:`platform`,factory:()=>`unknown`}),nc=new vi(``,{factory:()=>E(Cs).body?.querySelector(`[ngCspNonce]`)?.getAttribute(`ngCspNonce`)||null}),rc=(()=>{class e{view;node;constructor(e,t){this.view=e,this.node=t}static __NG_ELEMENT_ID__=ic}return e})();function ic(){return new rc(D(),Po())}var ac=class{},oc=new vi(``,{factory:()=>!0}),sc=new vi(``),cc=(()=>{class e{static ɵprov=di({token:e,providedIn:`root`,factory:()=>new lc})}return e})(),lc=class{dirtyEffectCount=0;queues=new Map;add(e){this.enqueue(e),this.schedule(e)}schedule(e){e.dirty&&this.dirtyEffectCount++}remove(e){let t=e.zone,n=this.queues.get(t);n.has(e)&&(n.delete(e),e.dirty&&this.dirtyEffectCount--)}enqueue(e){let t=e.zone;this.queues.has(t)||this.queues.set(t,new Set);let n=this.queues.get(t);n.has(e)||n.add(e)}flush(){for(;this.dirtyEffectCount>0;){let e=!1;for(let[t,n]of this.queues)e||=t===null?this.flushQueue(n):t.run(()=>this.flushQueue(n));e||(this.dirtyEffectCount=0)}}flushQueue(e){let t=!1;for(let n of e)n.dirty&&(this.dirtyEffectCount--,t=!0,n.run());return t}},uc=class{[dn];constructor(e){this[dn]=e}destroy(){this[dn].destroy()}};function dc(e,t){let n=t?.injector??E(Ss),r=t?.manualCleanup===!0?null:n.get(ws),i,a=n.get(rc,null,{optional:!0}),o=n.get(ac);return a===null?i=gc(e,n.get(cc),o):(i=hc(a.view,o,e),r instanceof Ts&&r._lView===a.view&&(r=null)),i.injector=n,r!==null&&(i.onDestroyFns=[r.onDestroy(()=>i.destroy())]),new uc(i)}var fc={...Jn,cleanupFns:void 0,zone:null,onDestroyFns:null,run(){let e=Ho(!1);try{Yn(this)}finally{Ho(e)}},cleanup(){if(!this.cleanupFns?.length)return;let e=w(null);try{for(;this.cleanupFns.length;)this.cleanupFns.pop()()}finally{this.cleanupFns=[],w(e)}}},pc={...fc,consumerMarkedDirty(){this.scheduler.schedule(this),this.notifier.notify(12)},destroy(){if(En(this),this.onDestroyFns!==null)for(let e of this.onDestroyFns)e();this.cleanup(),this.scheduler.remove(this)}},mc={...fc,consumerMarkedDirty(){this.view[2]|=8192,_o(this.view),this.notifier.notify(13)},destroy(){if(En(this),this.onDestroyFns!==null)for(let e of this.onDestroyFns)e();this.cleanup(),this.view[23]?.delete(this)}};function hc(e,t,n){let r=Object.create(mc);return r.view=e,r.zone=typeof Zone<`u`?Zone.current:null,r.notifier=t,r.fn=_c(r,n),e[23]??=new Set,e[23].add(r),r.consumerMarkedDirty(r),r}function gc(e,t,n){let r=Object.create(pc);return r.fn=_c(r,e),r.scheduler=t,r.notifier=n,r.zone=typeof Zone<`u`?Zone.current:null,r.scheduler.add(r),r.notifier.notify(12),r}function _c(e,t){return()=>{t(t=>(e.cleanupFns??=[]).push(t))}}function vc(e){return typeof e==`function`&&e[dn]!==void 0}function yc(e){return vc(e)&&typeof e.set==`function`}var bc=Symbol(`InputSignalNode#UNSET`),xc={...Kn,transformFn:void 0,applyValueToInputSignal(e,t){Wn(e,t)}};function Sc(e){return{toString:e}.toString()}var Cc=(function(e){return e[e.TemplateCreateStart=0]=`TemplateCreateStart`,e[e.TemplateCreateEnd=1]=`TemplateCreateEnd`,e[e.TemplateUpdateStart=2]=`TemplateUpdateStart`,e[e.TemplateUpdateEnd=3]=`TemplateUpdateEnd`,e[e.LifecycleHookStart=4]=`LifecycleHookStart`,e[e.LifecycleHookEnd=5]=`LifecycleHookEnd`,e[e.OutputStart=6]=`OutputStart`,e[e.OutputEnd=7]=`OutputEnd`,e[e.BootstrapApplicationStart=8]=`BootstrapApplicationStart`,e[e.BootstrapApplicationEnd=9]=`BootstrapApplicationEnd`,e[e.BootstrapComponentStart=10]=`BootstrapComponentStart`,e[e.BootstrapComponentEnd=11]=`BootstrapComponentEnd`,e[e.ChangeDetectionStart=12]=`ChangeDetectionStart`,e[e.ChangeDetectionEnd=13]=`ChangeDetectionEnd`,e[e.ChangeDetectionSyncStart=14]=`ChangeDetectionSyncStart`,e[e.ChangeDetectionSyncEnd=15]=`ChangeDetectionSyncEnd`,e[e.AfterRenderHooksStart=16]=`AfterRenderHooksStart`,e[e.AfterRenderHooksEnd=17]=`AfterRenderHooksEnd`,e[e.ComponentStart=18]=`ComponentStart`,e[e.ComponentEnd=19]=`ComponentEnd`,e[e.DeferBlockStateStart=20]=`DeferBlockStateStart`,e[e.DeferBlockStateEnd=21]=`DeferBlockStateEnd`,e[e.DynamicComponentStart=22]=`DynamicComponentStart`,e[e.DynamicComponentEnd=23]=`DynamicComponentEnd`,e[e.HostBindingsUpdateStart=24]=`HostBindingsUpdateStart`,e[e.HostBindingsUpdateEnd=25]=`HostBindingsUpdateEnd`,e})(Cc||{});function wc(e,t,n,r){t===null?e[n]=r:t.applyValueToInputSignal(t,r)}var Tc=null;function Ec(){return Tc}var Dc=[],Oc=function(e,t=null,n){for(let r=0;r=r)break}else t[c]<0&&(e[17]+=65536),(s>14>16&&(e[2]&3)===t&&(e[2]+=16384,Fc(o,a)):Fc(o,a)}var Lc=-1,Rc=class{factory;name;injectImpl;resolving=!1;canSeeViewProviders;multi;componentProviders;index;providerFactory;constructor(e,t,n,r){this.factory=e,this.name=r,this.canSeeViewProviders=t,this.injectImpl=n}};function zc(e){return!!(e.flags&8)}function Bc(e){return!!(e.flags&16)}function Vc(e,t,n){let r=0;for(;rt){o=a-1;break}}}for(;a>16}function Yc(e,t){let n=Jc(e),r=t;for(;n>0;)r=r[14],n--;return r}var Xc=!0;function Zc(e){let t=Xc;return Xc=e,t}var Qc=255,$c=5,el=0,tl={};function nl(e,t,n){let r;typeof n==`string`?r=n.charCodeAt(0)||0:Object.hasOwn(n,wi)&&(r=n[wi]),r??=n[wi]=el++;let i=r&Qc,a=1<>$c)]|=a}function rl(e,t){let n=al(e,t);if(n!==-1)return n;let r=t[1];r.firstCreatePass&&(e.injectorIndex=t.length,il(r.data,e),il(t,null),il(r.blueprint,null));let i=ol(e,t),a=e.injectorIndex;if(Kc(i)){let e=qc(i),n=Yc(i,t),r=n[1].data;for(let i=0;i<8;i++)t[a+i]=n[e+i]|r[e+i]}return t[a+8]=i,a}function il(e,t){e.push(0,0,0,0,0,0,0,0,t)}function al(e,t){return e.injectorIndex===-1||e.parent&&e.parent.injectorIndex===e.injectorIndex||t[e.injectorIndex+8]===null?-1:e.injectorIndex}function ol(e,t){if(e.parent&&e.parent.injectorIndex!==-1)return e.parent.injectorIndex;let n=0,r=null,i=t;for(;i!==null;){if(r=xl(i),r===null)return Lc;if(n++,i=i[14],r.injectorIndex!==-1)return r.injectorIndex|n<<16}return Lc}function sl(e,t,n){nl(e,t,n)}function cl(e,t,n){if(n&8||e!==void 0)return e;Fi(t,`NodeInjector`)}function ll(e,t,n,r){if(n&8&&r===void 0&&(r=null),!(n&3)){let i=e[9],a=Bi(void 0);try{return i?i.get(t,r,n&8):Vi(t,r,n&8)}finally{Bi(a)}}return cl(r,t,n)}function ul(e,t,n,r=0,i){if(e!==null){if(t[2]&2048&&!(r&2)){let i=bl(e,t,n,r,tl);if(i!==tl)return i}let i=dl(e,t,n,r,tl);if(i!==tl)return i}return ll(t,n,r,i)}function dl(e,t,n,r,i){let a=hl(n);if(typeof a==`function`){if(!ns(t,e,r))return r&1?cl(i,n,r):ll(t,n,r,i);try{let e;if(e=a(r),e==null&&!(r&8))Fi(n);else return e}finally{ss()}}else if(typeof a==`number`){let i=null,o=al(e,t),s=Lc,c=r&1?t[15][5]:null;for((o===-1||r&4)&&(s=o===-1?ol(e,t):t[o+8],s===Lc||!_l(r,!1)?o=-1:(i=t[1],o=qc(s),t=Yc(s,t)));o!==-1;){let e=t[1];if(gl(a,o,e.data)){let e=fl(o,t,n,i,r,c);if(e!==tl)return e}s=t[o+8],s!==Lc&&_l(r,t[1].data[o+8]===c)&&gl(a,o,t)?(i=e,o=qc(s),t=Yc(s,t)):o=-1}}return i}function fl(e,t,n,r,i,a){let o=t[1],s=o.data[e+8],c=pl(s,o,n,r==null?Ja(s)&&Xc:r!=o&&!!(s.type&3),i&1&&a===s);return c===null?tl:ml(t,o,c,s,i)}function pl(e,t,n,r,i){let a=e.providerIndexes,o=t.data,s=a&1048575,c=e.directiveStart,l=e.directiveEnd,u=a>>20,d=r?s:s+u,f=i?s+u:l;for(let e=d;e=c&&t.type===n)return e}if(i){let e=o[c];if(e&&Xa(e)&&e.type===n)return c}return null}function ml(e,t,n,r,i){let a=e[n],o=t.data;if(a instanceof Rc){let s=a;if(s.resolving)throw Pi(``);let c=Zc(s.canSeeViewProviders);s.resolving=!0,o[n].type||o[n];let l=s.injectImpl?Bi(s.injectImpl):null;ns(e,r,0);try{a=e[n]=s.factory(void 0,i,o,e,r),t.firstCreatePass&&n>=r.directiveStart&&kc(n,o[n],t)}finally{l!==null&&Bi(l),Zc(c),s.resolving=!1,ss()}}return a}function hl(e){if(typeof e==`string`)return e.charCodeAt(0)||0;let t=Object.hasOwn(e,wi)?e[wi]:void 0;return typeof t==`number`?t>=0?t&Qc:yl:t}function gl(e,t,n){let r=1<>$c)]&r)}function _l(e,t){return!(e&2)&&!(e&1&&t)}var vl=class{_tNode;_lView;constructor(e,t){this._tNode=e,this._lView=t}get(e,t,n){return ul(this._tNode,this._lView,e,Ji(n),t)}};function yl(){return new vl(Po(),D())}function bl(e,t,n,r,i){let a=e,o=t;for(;a!==null&&o!==null&&o[2]&2048&&!Za(o);){let e=dl(a,o,n,r|2,tl);if(e!==tl)return e;r&=-5;let t=a.parent;if(!t){let e=o[20];if(e){let t=e.get(n,tl,r);if(t!==tl)return t}t=xl(o),o=o[14]}a=t}return i}function xl(e){let t=e[1],n=t.type;return n===2?t.declTNode:n===1?e[5]:null}function Sl(e){return{token:e.token,providedIn:e.autoProvided===!1?null:`root`,factory:e.factory,value:void 0}}function Cl(){return wl(Po(),D())}function wl(e,t){return new Tl(ro(e,t))}var Tl=(()=>{class e{nativeElement;constructor(e){this.nativeElement=e}static __NG_ELEMENT_ID__=Cl}return e})();function El(e){return e instanceof Tl?e.nativeElement:e}function Dl(){return this._results[Symbol.iterator]()}var Ol=class{_emitDistinctChangesOnly;dirty=!0;_onDirty=void 0;_results=[];_changesDetected=!1;_changes=void 0;length=0;first=void 0;last=void 0;get changes(){return this._changes??=new Zr}constructor(e=!1){this._emitDistinctChangesOnly=e}get(e){return this._results[e]}map(e){return this._results.map(e)}filter(e){return this._results.filter(e)}find(e){return this._results.find(e)}reduce(e,t){return this._results.reduce(e,t)}forEach(e){this._results.forEach(e)}some(e){return this._results.some(e)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(e,t){this.dirty=!1;let n=ea(e);(this._changesDetected=!$i(this._results,n,t))&&(this._results=n,this.length=n.length,this.last=n[this.length-1],this.first=n[0])}notifyOnChanges(){this._changes!==void 0&&(this._changesDetected||!this._emitDistinctChangesOnly)&&this._changes.next(this)}onDirty(e){this._onDirty=e}setDirty(){this.dirty=!0,this._onDirty?.()}destroy(){this._changes!==void 0&&(this._changes.complete(),this._changes.unsubscribe())}[Symbol.iterator]=Dl};function kl(e){return(e.flags&128)==128}var Al=(function(e){return e[e.OnPush=0]=`OnPush`,e[e.Eager=1]=`Eager`,e[e.Default=1]=`Default`,e})(Al||{}),jl=new Map,Ml=0;function Nl(){return Ml++}function Pl(e){jl.set(e[19],e)}function Fl(e){jl.delete(e[19])}var Il=`__ngContext__`;function Ll(e,t){Ga(t)?(e[Il]=t[19],Pl(t)):e[Il]=t}function Rl(e){return Bl(e[12])}function zl(e){return Bl(e[4])}function Bl(e){for(;e!==null&&!Ka(e);)e=e[4];return e}var Vl=void 0;function Hl(e){Vl=e}function Ul(){if(Vl!==void 0)return Vl;if(typeof document<`u`)return document;throw new T(210,!1)}var Wl=!1,Gl=new vi(``,{factory:()=>Wl}),Kl=new WeakMap;function ql(e,t){if(typeof e!=`object`||!e)return;let n=Kl.get(e);n||(n=new WeakSet,Kl.set(e,n)),n.add(t)}function Jl(e){return(e.flags&32)==32}var Yl=()=>null;function Xl(e,t,n=!1){return Yl(e,t,n)}function Zl(e,t){let n=e.contentQueries;if(n!==null){let r=w(null);try{for(let r=0;r-1){let e;for(;++ia?``:i[u+1].toLowerCase(),r&2&&l!==e){if(Du(r))return!1;o=!0}}}}}return Du(r)||o}function Du(e){return!(e&1)}function Ou(e,t,n,r){if(t===null)return-1;let i=0;if(r||!n){let n=!1;for(;i-1)for(n++;n0?`="`+t+`"`:``)+`]`}else r&8?i+=`.`+o:r&4&&(i+=` `+o)}else i!==``&&!Du(o)&&(t+=Mu(a,i),i=``),r=o,a||=!Du(r);n++}return i!==``&&(t+=Mu(a,i)),t}function Pu(e){return e.map(Nu).join(`,`)}function Fu(e){let t=[],n=[],r=1,i=2;for(;r!1});function Vu(e){if(!e)return 0;let t=e.toLowerCase().indexOf(`ms`)>-1?1:1e3;return parseFloat(e)*t}function Hu(e,t){return e.getPropertyValue(t).split(`,`).map(e=>e.trim())}function Uu(e){let t=Hu(e,`transition-property`),n=Hu(e,`transition-duration`),r=Hu(e,`transition-delay`),i={propertyName:``,duration:0,animationName:void 0};for(let e=0;ei.duration&&(i.propertyName=t[e],i.duration=a)}return i}function Wu(e){let t=Hu(e,`animation-name`),n=Hu(e,`animation-delay`),r=Hu(e,`animation-duration`),i=Hu(e,`animation-iteration-count`),a={animationName:``,propertyName:void 0,duration:0};for(let e=0;ea.duration&&s!==`infinite`&&(a.animationName=t[e],a.duration=o)}return a}function Gu(e,t){return e!==void 0&&e.duration>t.duration}function Ku(e){return(e.animationName!=null||e.propertyName!=null)&&e.duration>0}function qu(e){let t=e.effect?.getTiming();if(t===void 0)return;let n=typeof t.duration==`number`?t.duration:0,r=(t.delay??0)+n,i=e.playbackRate;return i!==void 0&&i!==0&&i!==1&&(r/=Math.abs(i)),r}function Ju(e,t){let n=getComputedStyle(e),r=Wu(n),i=Uu(n),a=r.duration>i.duration?r:i;Gu(t.get(e),a)||Ku(a)&&t.set(e,a)}function Yu(e,t,n){if(!n)return;let r=e.getAnimations();return r.length===0?Ju(e,t):Xu(e,t,r)}function Xu(e,t,n){let r={animationName:void 0,propertyName:void 0,duration:0};for(let e of n){if(e.effect?.getTiming()?.iterations===1/0)continue;let t=qu(e)??0,n,i;e.animationName?i=e.animationName:n=e.transitionProperty,t>=r.duration&&(r={animationName:i,propertyName:n,duration:t})}Gu(t.get(e),r)||Ku(r)&&t.set(e,r)}var Zu=new Set,Qu=!1,$u=1,ed=typeof document<`u`&&typeof document?.documentElement?.getAnimations==`function`;function td(e){return e[9].get(Bu,Qu)}function nd(e,t,n){let r=id.get(e);if(r){for(let e of t)r.classList.push(e);for(let e of n)r.cleanupFns.push(e)}else id.set(e,{classList:t,cleanupFns:n})}function rd(e){let t=id.get(e);if(t){for(let e of t.cleanupFns)e();id.delete(e)}ad.delete(e)}var id=new WeakMap,ad=new WeakMap,od=new WeakMap;function sd(e){return e?e[14]??e:null}var cd=new WeakSet;function ld(e,t,n){let r=od.get(e);if(!r||r.length===0)return;let i=t.parentNode,a=t.previousSibling,o=sd(n);for(let e=r.length-1;e>=0;e--){let{el:n,declarationView:s}=r[e],c=n.parentNode;n===t?(r.splice(e,1),cd.add(n),n.dispatchEvent(new CustomEvent(`animationend`,{detail:{cancel:!0}}))):(a&&n===a||c&&i&&c!==i&&(o===null||s===null||o===s))&&(r.splice(e,1),n.dispatchEvent(new CustomEvent(`animationend`,{detail:{cancel:!0}})),n.parentNode?.removeChild(n))}}function ud(e,t,n){let r=sd(n),i=od.get(e);i?i.some(e=>e.el===t)||i.push({el:t,declarationView:r}):od.set(e,[{el:t,declarationView:r}])}function dd(e){let t=e[26]??={};return t.enter??=new Map}function fd(e){let t=typeof e==`function`?e():e,n=Array.isArray(t)?t:null;return typeof t==`string`&&(n=t.trim().split(/\s+/).filter(e=>e)),n}function pd(e){return e.composedPath?e.composedPath()[0]:e.target}function md(e,t){let n=ad.get(t);if(n===void 0)return!0;if(t!==pd(e))return!1;let r=e.animation;if(r){let e=qu(r);if(e!==void 0&&e+$u{class e{impl=null;execute(){this.impl?.execute()}static ɵprov=di({token:e,providedIn:`root`,factory:()=>new e})}return e})(),xd=[0,1,2,3],Sd=(()=>{class e{ngZone=E(Is);scheduler=E(ac);errorHandler=E(Js,{optional:!0});sequences=new Set;deferredRegistrations=new Set;executing=!1;constructor(){E(_d,{optional:!0})}execute(){let e=this.sequences.size>0;e&&Oc(Cc.AfterRenderHooksStart),this.executing=!0;for(let e of xd)for(let t of this.sequences)if(!t.erroredOrDestroyed&&t.hooks[e])try{t.pipelinedValue=this.ngZone.runOutsideAngular(()=>this.maybeTrace(()=>{let n=t.hooks[e];return n(t.pipelinedValue)},t.snapshot))}catch(e){t.erroredOrDestroyed=!0,this.errorHandler?.handleError(e)}this.executing=!1;for(let e of this.sequences)e.afterRun(),e.once&&(this.sequences.delete(e),e.destroy());for(let e of this.deferredRegistrations)this.sequences.add(e);this.deferredRegistrations.size>0&&this.scheduler.notify(7),this.deferredRegistrations.clear(),e&&Oc(Cc.AfterRenderHooksEnd)}register(e){let{view:t}=e;t===void 0?this.executing?this.deferredRegistrations.add(e):this.addSequence(e):((t[25]??=[]).push(e),_o(t),t[2]|=8192)}addSequence(e){this.sequences.add(e),this.scheduler.notify(7)}unregister(e){this.executing&&this.sequences.has(e)?(e.erroredOrDestroyed=!0,e.pipelinedValue=void 0,e.once=!0):(this.sequences.delete(e),this.deferredRegistrations.delete(e))}maybeTrace(e,t){return t?t.run(gd.AFTER_NEXT_RENDER,e):e()}static ɵprov=di({token:e,providedIn:`root`,factory:()=>new e})}return e})(),Cd=class{impl;hooks;view;once;snapshot;erroredOrDestroyed=!1;pipelinedValue=void 0;unregisterOnDestroy;constructor(e,t,n,r,i,a=null){this.impl=e,this.hooks=t,this.view=n,this.once=r,this.snapshot=a,this.unregisterOnDestroy=i?.onDestroy(()=>this.destroy())}afterRun(){this.erroredOrDestroyed=!1,this.pipelinedValue=void 0,this.snapshot?.dispose(),this.snapshot=null}destroy(){this.impl.unregister(this),this.unregisterOnDestroy?.();let e=this.view?.[25];e&&(this.view[25]=e.filter(e=>e!==this))}};function wd(e,t){let n=t?.injector??E(Ss);return yd(`NgAfterNextRender`),Ed(e,n,t,!0)}function Td(e){return e instanceof Function?[void 0,void 0,e,void 0]:[e.earlyRead,e.write,e.mixedReadWrite,e.read]}function Ed(e,t,n,r){let i=t.get(bd);i.impl??=t.get(Sd);let a=t.get(_d,null,{optional:!0}),o=n?.manualCleanup===!0?null:t.get(ws),s=t.get(rc,null,{optional:!0}),c=new Cd(i.impl,Td(e),s?.view,r,o,a?.snapshot(null));return i.impl.register(c),c}var Dd=new vi(``,{factory:()=>{let e=E(Aa),t=new Set;return e.onDestroy(()=>t.clear()),{queue:t,isScheduled:!1,scheduler:null,injector:e}}});function Od(e,t,n){let r=e.get(Dd);if(Array.isArray(t))for(let e of t)r.queue.add(e),n?.detachedLeaveAnimationFns?.push(e);else r.queue.add(t),n?.detachedLeaveAnimationFns?.push(t);r.scheduler&&r.scheduler(e)}function kd(e,t){let n=e.get(Dd);if(Array.isArray(t))for(let e of t)n.queue.delete(e);else n.queue.delete(t)}function Ad(e,t){let n=e.get(Dd);if(t.detachedLeaveAnimationFns){for(let e of t.detachedLeaveAnimationFns)n.queue.delete(e);t.detachedLeaveAnimationFns=void 0}}function jd(e){let t=e.get(Dd);t.isScheduled||=(wd(()=>{t.isScheduled=!1;for(let e of t.queue)e();t.queue.clear()},{injector:t.injector}),!0)}function Md(e){let t=e.get(Dd);t.scheduler=jd,t.scheduler(e)}function Nd(e,t){for(let[n,r]of t)Od(e,r.animateFns)}function Pd(e,t,n,r){let i=e?.[26]?.enter;t!==null&&i&&i.has(n.index)&&Nd(r,i)}function Fd(e,t,n,r){try{n.get(fa)}catch{return r(!1)}let i=e?.[26];i?.enter?.has(t.index)&&kd(n,i.enter.get(t.index).animateFns);let a=Id(e,t,i);if(a.size===0){let n=!1;if(e){let r=[];Rd(e,t,r),n=r.length>0}if(!n)return r(!1)}e&&Zu.add(e[19]),Od(n,()=>Ld(e,t,i||void 0,a,r),i||void 0)}function Id(e,t,n){let r=new Map,i=n?.leave;if(i&&i.has(t.index)&&r.set(t.index,i.get(t.index)),e&&i)for(let[n,a]of i){if(r.has(n))continue;let i=e[1].data[n].parent;for(;i;){if(i===t){r.set(n,a);break}i=i.parent}}return r}function Ld(e,t,n,r,i){let a=[];if(n&&n.leave)for(let[e]of r){if(!n.leave.has(e))continue;let t=n.leave.get(e);for(let e of t.animateFns){let{promise:t}=e();a.push(t)}n.detachedLeaveAnimationFns=void 0}if(e&&Rd(e,t,a),a.length>0){let t=n||e?.[26];if(t){let n=t.running;n&&a.push(n),t.running=Promise.allSettled(a),Bd(e,t.running,i)}else Promise.allSettled(a).then(()=>{e&&Zu.delete(e[19]),i(!0)})}else e&&Zu.delete(e[19]),i(!1)}function Rd(e,t,n){if(t.type&12){let r=e[t.index];if(Ka(r))for(let e=10;e{e[26]?.running===t&&(e[26].running=void 0,Zu.delete(e[19])),n(!0)})}function Vd(e,t,n,r,i,a,o,s){if(i!=null){let c,l=!1;Ka(i)?c=i:Ga(i)&&(l=!0,i=i[0]);let u=to(i);e===0&&r!==null?(Pd(s,r,a,n),o==null?du(t,r,u):uu(t,r,u,o||null,!0)):e===1&&r!==null?(Pd(s,r,a,n),uu(t,r,u,o||null,!0),ld(a,u,s)):e===2?(s?.[26]?.leave?.has(a.index)&&ud(a,u,s),cd.delete(u),Fd(s,a,n,e=>{if(cd.has(u)){cd.delete(u);return}pu(t,u,l,e)})):e===3&&(cd.delete(u),Fd(s,a,n,()=>{t.destroyNode(u)})),c!=null&&df(t,e,n,c,a,r,o)}}function Hd(e,t){Wd(e,t),t[0]=null,t[5]=null}function Ud(e,t,n,r,i,a){r[0]=i,r[5]=t,cf(e,r,n,1,i,a)}function Wd(e,t){t[10].changeDetectionScheduler?.notify(9),cf(e,t,t[11],2,null,null)}function Gd(e){let t=e[12];if(!t)return Jd(e[1],e);for(;t;){let n=null;if(Ga(t))n=t[12];else{let e=t[10];e&&(n=e)}if(!n){for(;t&&!t[4]&&t!==e;)Ga(t)&&Jd(t[1],t),t=t[3];t===null&&(t=e),Ga(t)&&Jd(t[1],t),n=t&&t[4]}t=n}}function Kd(e,t){let n=e[9],r=n.indexOf(t);n.splice(r,1)}function qd(e,t){if(Qa(t))return;let n=t[11];n.destroyNode&&cf(e,t,n,3,null,null),Gd(t)}function Jd(e,t){if(Qa(t))return;let n=w(null);try{t[2]&=-129,t[2]|=256,t[24]&&En(t[24]),Xd(e,t),Yd(e,t),t[1].type===1&&t[11].destroy();let n=t[16];if(n!==null&&Ka(t[3])){n!==t[3]&&Kd(n,t);let r=t[18];r!==null&&r.detachView(e)}Fl(t)}finally{w(n)}}function Yd(e,t){let n=e.cleanup,r=t[7];if(n!==null)for(let e=0;e=0?r[t]():r[-t].unsubscribe(),e+=2}else{let t=r[n[e+1]];n[e].call(t)}r!==null&&(t[7]=null);let i=t[21];if(i!==null){t[21]=null;for(let e=0;e27&&xf(e,t,27,!1),Oc(o?Cc.TemplateUpdateStart:Cc.TemplateCreateStart,i,n),n(r,i)}finally{ds(a),Oc(o?Cc.TemplateUpdateEnd:Cc.TemplateCreateEnd,i,n)}}function Tf(e,t,n){Mf(e,t,n),(n.flags&64)==64&&Nf(e,t,n)}function Ef(e,t,n=ro){let r=t.localNames;if(r!==null){let i=t.index+1;for(let a=0;a{_o(e.lView)},consumerOnSignalRead(){this.lView[24]=this}};function rp(e){let t=e[24]??Object.create(ip);return t.lView=e,t}var ip={...pn,consumerIsAlwaysLive:!0,kind:`template`,consumerMarkedDirty:e=>{let t=bo(e.lView);for(;t&&!ap(t[1]);)t=bo(t);t&&po(t)},consumerOnSignalRead(){this.lView[24]=this}};function ap(e){return e.type!==2}function op(e){if(e[23]===null)return;let t=!0;for(;t;){let n=!1;for(let t of e[23])if(t.dirty&&(n=!0,t.zone===null||Zone.current===t.zone?t.run():t.zone.run(()=>t.run()),e[23]===null))return;t=n&&!!(e[2]&8192)}}var sp=100;function cp(e,t=0){let n=e[10].rendererFactory;n.begin?.();try{lp(e,t)}finally{n.end?.()}}function lp(e,t){let n=Vo();try{Ho(!0),hp(e,t);let n=0;for(;ho(e);){if(n===sp)throw new T(103,!1);n++,hp(e,1)}}finally{Ho(n)}}function up(e,t,n,r){if(Qa(t))return;let i=t[2];rs(t);let a=!0,o=null,s=null;ap(e)?(s=$f(t),o=xn(s)):fn()===null?(a=!1,s=rp(t),o=xn(s)):t[24]&&=(En(t[24]),null);try{fo(t),Go(e.bindingStartIndex),n!==null&&wf(e,t,n,2,r);let a=(i&3)==3;if(a){let n=e.preOrderCheckHooks;n!==null&&jc(t,n,null)}else{let n=e.preOrderHooks;n!==null&&Mc(t,n,0,null),Nc(t,0)}if(fp(t),op(t),dp(t,0),e.contentQueries!==null&&Zl(e,t),a){let n=e.contentCheckHooks;n!==null&&jc(t,n)}else{let n=e.contentHooks;n!==null&&Mc(t,n,1),Nc(t,1)}_p(e,t);let o=e.components;o!==null&&gp(t,o,0);let s=e.viewQuery;if(s!==null&&Ql(2,s,r),a){let n=e.viewCheckHooks;n!==null&&jc(t,n)}else{let n=e.viewHooks;n!==null&&Mc(t,n,2),Nc(t,2)}if(e.firstUpdatePass===!0&&(e.firstUpdatePass=!1),t[22]){for(let e of t[22])e();t[22]=null}Zf(t),t[2]&=-73}catch(e){throw _o(t),e}finally{s!==null&&(Cn(s,o),a&&tp(s)),cs()}}function dp(e,t){for(let n=Rl(e);n!==null;n=zl(n))for(let e=10;e0&&(e[n-1][4]=r[4]);let a=ra(e,10+t);Hd(r[1],r);let o=a[18];o!==null&&o.detachView(a[1]),r[3]=null,r[4]=null,r[2]&=-129}return r}function wp(e,t,n,r){let i=10+r,a=n.length;r>0&&(n[i-1][4]=t),r-1&&(Cp(e,n),ra(t,n))}this._attachedToViewContainer=!1}qd(this._lView[1],this._lView)}onDestroy(e){vo(this._lView,e)}markForCheck(){vp(this._cdRefInjectingView||this._lView,4)}detach(){this._lView[2]&=-129}reattach(){go(this._lView),this._lView[2]|=128}detectChanges(){this._lView[2]|=1024,cp(this._lView)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new T(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;let e=Za(this._lView),t=this._lView[16];t!==null&&!e&&Kd(t,this._lView),Wd(this._lView[1],this._lView)}attachToAppRef(e){if(this._attachedToViewContainer)throw new T(902,!1);this._appRef=e;let t=Za(this._lView),n=this._lView[16];n!==null&&!t&&Tp(n,this._lView),go(this._lView)}},Dp=(()=>{class e{_declarationLView;_declarationTContainer;elementRef;static __NG_ELEMENT_ID__=Op;constructor(e,t,n){this._declarationLView=e,this._declarationTContainer=t,this.elementRef=n}get ssrId(){return this._declarationTContainer.tView?.ssrId||null}createEmbeddedView(e,t){return this.createEmbeddedViewImpl(e,t)}createEmbeddedViewImpl(e,t,n){return new Ep(qf(this._declarationLView,this._declarationTContainer,e,{embeddedViewInjector:t,dehydratedView:n}))}}return e})();function Op(){return kp(Po(),D())}function kp(e,t){return e.type&4?new Dp(t,e,wl(e,t)):null}function Ap(e,t,n,r,i){let a=e.data[t];if(a===null)a=jp(e,t,n,r,i),Jo()&&(a.flags|=32);else if(a.type&64){a.type=n,a.value=r,a.attrs=i;let e=Io();a.injectorIndex=e===null?-1:e.injectorIndex}return Lo(a,!0),a}function jp(e,t,n,r,i){let a=Fo(),o=Ro(),s=o?a:a&&a.parent,c=e.data[t]=Np(e,s,n,t,r,i);return Mp(e,c,a,o),c}function Mp(e,t,n,r){e.firstChild===null&&(e.firstChild=t),n!==null&&(r?n.child==null&&t.parent!==null&&(n.child=t):n.next===null&&(n.next=t,t.prev=n))}function Np(e,t,n,r,i,a){let o=t?t.injectorIndex:-1,s=0;return Ao()&&(s|=128),{type:n,index:r,insertBeforeIndex:null,injectorIndex:o,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,componentOffset:-1,controlDirectiveIndex:-1,customControlIndex:-1,propertyBindings:null,flags:s,providerIndexes:0,value:i,namespace:gs(),attrs:a,mergedAttrs:null,localNames:null,initialInputs:null,inputs:null,hostDirectiveInputs:null,outputs:null,hostDirectiveOutputs:null,directiveToIndex:null,tView:null,next:null,prev:null,projectionNext:null,child:null,parent:t,projection:null,styles:null,stylesWithoutHost:null,residualStyles:void 0,classes:null,classesWithoutHost:null,residualClasses:void 0,classBindings:0,styleBindings:0}}function Pp(e){let t=e[6]??[],n=e[3][11],r=[];for(let e of t)e.data.di===void 0?Fp(e,n):r.push(e);e[6]=r}function Fp(e,t){let n=0,r=e.firstChild;if(r){let i=e.data.r;for(;nnull,Lp=()=>null;function Rp(e,t){return Ip(e,t)}function zp(e,t,n){return Lp(e,t,n)}var Bp=class{},Vp=class{},Hp=(()=>{class e{static ɵprov=di({token:e,providedIn:`root`,factory:()=>null})}return e})();function Up(e){return e.debugInfo?.className||e.type.name||null}var Wp={},Gp=class{injector;parentInjector;constructor(e,t){this.injector=e,this.parentInjector=t}get(e,t,n){let r=this.injector.get(e,Wp,n);return r!==Wp||t===Wp?r:this.parentInjector.get(e,t,n)}};function Kp(e,t,n){return e[t]=n}function qp(e,t){return e[t]}function Jp(e,t,n){if(n===Iu)return!1;let r=e[t];return!Object.is(r,n)&&(e[t]=n,!0)}function Yp(e,t,n,r){let i=Jp(e,t,n);return Jp(e,t+1,r)||i}function Xp(e,t,n,r,i){let a=Yp(e,t,n,r);return Jp(e,t+2,i)||a}function Zp(e,t,n,r,i,a){let o=Yp(e,t,n,r);return Yp(e,t+2,i,a)||o}function Qp(e,t,n){return function r(i){let a=r.__ngNativeEl__;a!==void 0&&ql(i,a),vp(Ja(e)?so(e.index,t):t,5);let o=t[8],s=$p(t,o,n,i),c=r.__ngNextListenerFn__;for(;c;)s=$p(t,o,c,i)&&s,c=c.__ngNextListenerFn__;return s}}function $p(e,t,n,r){let i=w(null);try{return Oc(Cc.OutputStart,t,n),n(r)!==!1}catch(t){return Vf(e,t),!1}finally{Oc(Cc.OutputEnd,t,n),w(i)}}function em(e,t,n,r,i,a,o,s){let c=Ya(e),l=!1,u=null;if(!r&&c&&(u=nm(t,n,a,e.index)),u!==null){let e=u.__ngLastListenerFn__||u;e.__ngNextListenerFn__=o,u.__ngLastListenerFn__=o,l=!0}else{let o=ro(e,n),c=r?r(o):o;r||(s.__ngNativeEl__=o);let l=i.listen(c,a,s);tm(a)||rm(r?t=>r(to(t[e.index])):e.index,t,n,a,s,l,!1)}return l}function tm(e){return e.startsWith(`animation`)||e.startsWith(`transition`)}function nm(e,t,n,r){let i=e.cleanup;if(i!=null)for(let e=0;er?n[r]:null}typeof a==`string`&&(e+=2)}return null}function rm(e,t,n,r,i,a,o){let s=t.firstCreatePass?So(t):null,c=xo(n),l=c.length;c.push(i,a),s&&s.push(r,e,l,(l+1)*(o?-1:1))}function im(e,t,n,r,i,a){let o=t[n],s=t[1],c=o[s.data[n].outputs[r]].subscribe(a);rm(e.index,s,t,i,a,c,!0)}var am=Symbol(`BINDING`),om=new vi(``);function sm(e,t,n){let r=n?e.styles:null,i=n?e.classes:null,a=0;if(t!==null)for(let e=0;e0&&(n.directiveToIndex=new Map);for(let c=0;c0;){let n=e[--t];if(typeof n==`number`&&n<0)return n}return 0}function xm(e,t,n){if(n){if(t.exportAs)for(let r=0;r{let[n,r,i]=e[t],a={propName:n,templateName:t,isSignal:(r&Sf.SignalBased)!==0};return i&&(a.transform=i),a})}function km(e){return Object.keys(e).map(t=>({propName:e[t],templateName:t}))}function Am(e,t,n){let r=t instanceof Aa?t:t?.injector;return r&&e.getStandaloneInjector!==null&&(r=e.getStandaloneInjector(r)||r),r?new Gp(n,r):n}function jm(e){let t=e.get(Vp,null);if(t===null)throw new T(407,!1);return{rendererFactory:t,sanitizer:e.get(Hp,null),changeDetectionScheduler:e.get(ac,null),ngReflect:!1,tracingService:e.get(_d,null,{optional:!0})}}function Mm(e,t,n){let r=Pm(e);return lu(t,r,r===`svg`?`svg`:r===`math`?eo:n)}function Nm(e){if((e&&`localName`in e&&typeof e.localName==`string`?e.localName:e?.tagName)?.toLowerCase()===`script`)throw new T(905,!1)}function Pm(e){return(e.selectors[0][0]||`div`).toLowerCase()}var Fm=class{componentDef;ngModule;selector;componentType;ngContentSelectors;isBoundToModule;cachedInputs=null;cachedOutputs=null;get inputs(){return this.cachedInputs??=Om(this.componentDef.inputs),this.cachedInputs}get outputs(){return this.cachedOutputs??=km(this.componentDef.outputs),this.cachedOutputs}constructor(e,t){this.componentDef=e,this.ngModule=t,this.componentType=e.type,this.selector=Pu(e.selectors),this.ngContentSelectors=e.ngContentSelectors??[],this.isBoundToModule=!!t}create(e,t,n,r,i,a,o){Oc(Cc.DynamicComponentStart);let s=w(null);try{let s=this.componentDef,c=Am(s,r||this.ngModule,e),l=jm(c),u=l.tracingService;return u&&u.componentCreate?u.componentCreate(Up(s),()=>this.createComponentRef(l,c,t,n,i,a,o)):this.createComponentRef(l,c,t,n,i,a,o)}finally{w(s)}}createComponentRef(e,t,n,r,i,a,o){let s=this.componentDef,c=Im(r,s,a,i),l=e.rendererFactory.createRenderer(null,s),u=r?Df(l,r,s.encapsulation,t):Mm(s,l,o??null);Nm(u);let d=t.get(om,null),f=Lm(u,()=>t.get(Cs,null)??Ul());d&&d.addHost(f);let p=a?.some(zm)||i?.some(e=>typeof e!=`function`&&e.bindings.some(zm)),m=gf(null,c,null,512|vf(s),null,null,e,l,t,null,Xl(u,t,!0));d&&Em&&f instanceof ShadowRoot&&vo(m,()=>{d.removeHost(f)}),m[27]=u,rs(m);let h=null;try{let e=Cm(27,m,2,`#host`,()=>c.directiveRegistry,!0,0);gu(l,u,e),Ll(u,m),Tf(c,m,e),$l(c,e,m),wm(c,e),n!==void 0&&Vm(e,this.ngContentSelectors,n),h=so(e.index,m),m[8]=h[8],Gf(c,m,null)}catch(e){throw h!==null&&Fl(h),Fl(m),e}finally{Oc(Cc.DynamicComponentEnd),cs()}return new Bm(this.componentType,m,!!p)}};function Im(e,t,n,r){let i=e?[`ng-version`,`22.1.7`]:Fu(t.selectors[0]),a=null,o=null,s=0;if(n)for(let e of n)s+=e[am].requiredVars,e.create&&(e.targetIdx=0,(a??=[]).push(e)),e.update&&(e.targetIdx=0,(o??=[]).push(e));if(r)for(let e=0;e{if(n&1&&e)for(let t of e)t.create();if(n&2&&t)for(let e of t)e.update()}}function zm(e){let t=e[am].kind;return t===`input`||t===`twoWay`}var Bm=class extends Bp{_rootLView;_hasInputBindings;instance;hostView;changeDetectorRef;componentType;location;previousInputValues=null;_tNode;constructor(e,t,n){super(),this._rootLView=t,this._hasInputBindings=n,this._tNode=io(t[1],27),this.location=wl(this._tNode,t),this.instance=so(this._tNode.index,t)[8],this.hostView=this.changeDetectorRef=new Ep(t,void 0),this.componentType=e}setInput(e,t){this._hasInputBindings;let n=this._tNode;if(this.previousInputValues??=new Map,this.previousInputValues.has(e)&&Object.is(this.previousInputValues.get(e),t))return;let r=this._rootLView;Hf(n,r[1],r,e,t),this.previousInputValues.set(e,t),vp(so(n.index,r),1)}get injector(){return new vl(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(e){this.hostView.onDestroy(e)}};function Vm(e,t,n){let r=e.projection=[];for(let e=0;e{class e{static __NG_ELEMENT_ID__=Um}return e})();function Um(){return qm(Po(),D())}var Wm=class e extends Hm{_lContainer;_hostTNode;_hostLView;constructor(e,t,n){super(),this._lContainer=e,this._hostTNode=t,this._hostLView=n}get element(){return wl(this._hostTNode,this._hostLView)}get injector(){return new vl(this._hostTNode,this._hostLView)}get parentInjector(){let e=ol(this._hostTNode,this._hostLView);if(Kc(e)){let t=Yc(e,this._hostLView),n=qc(e),r=t[1].data[n+8];return new vl(r,t)}return new vl(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(e){let t=Gm(this._lContainer);return t!==null&&t[e]||null}get length(){return this._lContainer.length-10}createEmbeddedView(e,t,n){let r,i;typeof n==`number`?r=n:n!=null&&(r=n.index,i=n.injector);let a=Rp(this._lContainer,e.ssrId),o=e.createEmbeddedViewImpl(t||{},i,a);return this.insertImpl(o,r,Jf(this._hostTNode,a)),o}createComponent(e,t,n,r,i,a,o){let s,c=t||{};s=c.index,n=c.injector,r=c.projectableNodes,i=c.environmentInjector||c.ngModuleRef,a=c.directives,o=c.bindings;let l=new Fm(Ei(e)),u=n||this.parentInjector;if(!i&&l.ngModule==null){let e=this.parentInjector.get(Aa,null);e&&(i=e)}let d=Ei(l.componentType??{}),f=Rp(this._lContainer,d?.id??null),p=f?.firstChild??null,m=l.create(u,r,p,i,a,o,this._getHostElementNamespace());return this.insertImpl(m.hostView,s,Jf(this._hostTNode,f)),m}_getHostElementNamespace(){if(this._hostTNode.type&2){let e=this._hostTNode.parent??this._hostLView[5];return e!==null&&e.type&2&&typeof e.value==`string`&&e.value.toLowerCase()===`foreignobject`?null:e?.namespace??null}return this._hostTNode.namespace}insert(e,t){return this.insertImpl(e,t,!0)}insertImpl(t,n,r){let i=t._lView;if(lo(i)){let n=this.indexOf(t);if(n!==-1)this.detach(n);else{let n=i[3],r=new e(n,n[5],n[3]);r.detach(r.indexOf(t))}}let a=this._adjustIndex(n),o=this._lContainer;return xp(o,i,a,r),t.attachToViewContainerRef(),na(Km(o),a,t),t}move(e,t){return this.insert(e,t)}indexOf(e){let t=Gm(this._lContainer);return t===null?-1:t.indexOf(e)}remove(e){let t=this._adjustIndex(e,-1),n=Cp(this._lContainer,t);n&&(ra(Km(this._lContainer),t),qd(n[1],n))}detach(e){let t=this._adjustIndex(e,-1),n=Cp(this._lContainer,t);return n&&ra(Km(this._lContainer),t)!=null?new Ep(n):null}_adjustIndex(e,t=0){return e??this.length+t}};function Gm(e){return e[8]}function Km(e){return e[8]||=[]}function qm(e,t){let n,r=t[e.index];return Ka(r)?n=r:(n=yp(r,t,null,e),t[e.index]=n,bf(t,n)),Ym(n,t,e,r),new Wm(n,e,t)}function Jm(e,t){let n=e[11],r=n.createComment(``),i=ro(t,e);return uu(n,n.parentNode(i),r,n.nextSibling(i),!1),r}var Ym=Qm,Xm=()=>!1;function Zm(e,t,n){return Xm(e,t,n)}function Qm(e,t,n,r){if(e[7])return;let i;i=n.type&8?to(r):Jm(t,n),e[7]=i}var $m=class e{queryList;matches=null;constructor(e){this.queryList=e}clone(){return new e(this.queryList)}setDirty(){this.queryList.setDirty()}},eh=class e{queries;constructor(e=[]){this.queries=e}createEmbeddedView(t){let n=t.queries;if(n!==null){let r=t.contentQueries===null?n.length:t.contentQueries[0],i=[];for(let e=0;e0)r.push(o[e/2]);else{let i=a[e+1],o=t[-n];for(let e=10;ee.trim())}function mh(e,t,n){e.queries===null&&(e.queries=new nh),e.queries.track(new rh(t,n))}function hh(e,t){return e.queries.getByIndex(t)}function gh(e,t){let n=e[1],r=hh(n,t);return r.crossesNgTemplate?lh(n,e,t,[]):ch(n,e,r,t)}function _h(e,t,n){let r,i=Mn(()=>{r._dirtyCounter();let n=xh(r,e);if(t&&n===void 0)throw new T(-951,!1);return n});return r=i[dn],r._dirtyCounter=A(0),r._flatValue=void 0,i}function vh(e){return _h(!0,!1,e)}function yh(e){return _h(!0,!0,e)}function bh(e,t){let n=e[dn];n._lView=D(),n._queryIndex=t,n._queryList=uh(n._lView,t),n._queryList.onDirty(()=>n._dirtyCounter.update(e=>e+1))}function xh(e,t){let n=e._lView,r=e._queryIndex;if(n===void 0||r===void 0||n[2]&4)return t?void 0:ua;let i=uh(n,r),a=gh(n,r);return i.reset(a,El),t?i.first:i._changesDetected||e._flatValue===void 0?e._flatValue=i.toArray():e._flatValue}function Sh(e){return!!e&&typeof e.then==`function`}function Ch(e){return!!e&&typeof e.subscribe==`function`}var wh=class{},Th=class extends wh{injector;instance=null;constructor(e){super();let t=new ja([...e.providers,{provide:wh,useValue:this}],e.parent||ka(),e.debugName,new Set([`environment`]));this.injector=t,e.runEnvironmentInitializers&&t.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(e){this.injector.onDestroy(e)}};function Eh(e,t,n=null){return new Th({providers:e,parent:t,debugName:n,runEnvironmentInitializers:!0}).injector}var Dh=(()=>{class e{_injector;cachedInjectors=new Map;constructor(e){this._injector=e}getOrCreateStandaloneInjector(e){if(!e.standalone)return null;if(!this.cachedInjectors.has(e)){let t=ga(!1,e.type),n=t.length>0?Eh([t],this._injector,``):null;this.cachedInjectors.set(e,n)}return this.cachedInjectors.get(e)}ngOnDestroy(){try{for(let e of this.cachedInjectors.values())e!==null&&e.destroy()}finally{this.cachedInjectors.clear()}}static ɵprov=di({token:e,providedIn:`environment`,factory:()=>new e(qi(Aa))})}return e})();function Oh(e){return Sc(()=>{let t=Nh(e),n={...t,decls:e.decls,vars:e.vars,template:e.template,consts:e.consts||null,ngContentSelectors:e.ngContentSelectors,onPush:e.changeDetection!==Al.Eager,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&e.dependencies||null,getStandaloneInjector:t.standalone?e=>e.get(Dh).getOrCreateStandaloneInjector(n):null,getExternalStyles:null,signals:e.signals??!1,data:e.data||{},encapsulation:e.encapsulation||eu.Emulated,styles:e.styles||ua,_:null,schemas:e.schemas||null,tView:null,id:``};t.standalone&&yd(`NgStandalone`),Ph(n);let r=e.dependencies;return n.directiveDefs=Fh(r,kh),n.pipeDefs=Fh(r,Oi),n.id=Ih(n),n})}function kh(e){return Ei(e)||Di(e)}function Ah(e,t){if(e==null)return la;let n={};for(let r in e)if(Object.hasOwn(e,r)){let i=e[r],a,o,s,c;Array.isArray(i)?(s=i[0],a=i[1],o=i[2]??a,c=i[3]||null):(a=i,o=i,s=Sf.None,c=null),n[a]=[r,s,c],t[a]=o}return n}function jh(e){if(e==null)return la;let t={};for(let n in e)Object.hasOwn(e,n)&&(t[e[n]]=n);return t}function Mh(e){return{type:e.type,name:e.name,factory:null,pure:e.pure!==!1,standalone:e.standalone??!0,onDestroy:e.type.prototype.ngOnDestroy||null}}function Nh(e){let t={};return{type:e.type,providersResolver:null,viewProvidersResolver:null,factory:null,hostBindings:e.hostBindings||null,hostVars:e.hostVars||0,hostAttrs:e.hostAttrs||null,contentQueries:e.contentQueries||null,declaredInputs:t,inputConfig:e.inputs||la,exportAs:e.exportAs||null,standalone:e.standalone??!0,signals:e.signals===!0,selectors:e.selectors||ua,viewQuery:e.viewQuery||null,features:e.features||null,setInput:null,resolveHostDirectives:null,hostDirectives:null,controlDef:null,signalFormsInputPresence:null,inputs:Ah(e.inputs,t),outputs:jh(e.outputs),debugInfo:null}}function Ph(e){e.features?.forEach(t=>t(e))}function Fh(e,t){return e?()=>{let n=typeof e==`function`?e():e,r=[];for(let e of n){let n=t(e);n!==null&&r.push(n)}return r}:null}function Ih(e){let t=0,n=typeof e.consts==`function`?``:e.consts,r=[e.selectors,e.ngContentSelectors,e.hostVars,e.hostAttrs,n,e.vars,e.decls,e.encapsulation,e.standalone,e.signals,e.exportAs,JSON.stringify(e.inputs),JSON.stringify(e.outputs),Object.getOwnPropertyNames(e.type.prototype),!!e.contentQueries,!!e.viewQuery];for(let e of r.join(`|`))t=Math.imul(31,t)+e.charCodeAt(0)<<0;return t+=2147483648,`c`+t}var Lh=new vi(``),Rh=(()=>{class e{resolve;reject;initialized=!1;done=!1;donePromise=new Promise((e,t)=>{this.resolve=e,this.reject=t});appInits=E(Lh,{optional:!0})??[];injector=E(Ss);constructor(){}runInitializers(){if(this.initialized)return;let e=[];for(let t of this.appInits){let n=Ha(this.injector,t);if(Sh(n))e.push(n);else if(Ch(n)){let t=new Promise((e,t)=>{n.subscribe({complete:e,error:t})});e.push(t)}}let t=()=>{this.done=!0,this.resolve()};Promise.all(e).then(()=>{t()}).catch(e=>{this.reject(e)}),e.length===0&&t(),this.initialized=!0}static ɵfac=function(t){return new(t||e)};static ɵprov=Sl({token:e,factory:e.ɵfac})}return e})();function zh(e,t,n,r,i,a,o,s){if(n.firstCreatePass){e.mergedAttrs=Wc(e.mergedAttrs,e.attrs);let t=e.tView=pf(2,e,i,a,o,n.directiveRegistry,n.pipeRegistry,null,n.schemas,n.consts,null);n.queries!==null&&(n.queries.template(n,e),t.queries=n.queries.embeddedTView(e))}s&&(e.flags|=s),Lo(e,!1);let c=Vh(n,t,e,r);vs()&&nf(n,t,c,e),Ll(c,t);let l=yp(c,t,c,e);t[r+27]=l,bf(t,l),Zm(l,e,t)}function Bh(e,t,n,r,i,a,o,s,c,l,u){let d=n+27,f;if(t.firstCreatePass){if(f=Ap(t,d,4,o||null,s||null),l!=null){let e=uo(t.consts,l);f.localNames=[];for(let t=0;t{throw new T(600,``)})}var Kh=10,qh=(()=>{class e{_runningTick=!1;_destroyed=!1;_destroyListeners=[];_views=[];internalErrorHandler=E(Ys);afterRenderManager=E(bd);zonelessEnabled=E(oc);rootEffectScheduler=E(cc);dirtyFlags=0;tracingSnapshot=null;allTestViews=new Set;autoDetectTestViews=new Set;includeAllTestViews=!1;afterTick=new Zr;get allViews(){return[...(this.includeAllTestViews?this.allTestViews:this.autoDetectTestViews).keys(),...this._views]}get destroyed(){return this._destroyed}componentTypes=[];components=[];internalPendingTask=E(Os);get isStable(){return this.internalPendingTask.hasPendingTasksObservable.pipe(ei(e=>!e))}constructor(){E(_d,{optional:!0})}whenStable(){let e;return new Promise(t=>{e=this.isStable.subscribe({next:e=>{e&&t()}})}).finally(()=>{e.unsubscribe()})}_injector=E(Aa);_rendererFactory=null;get injector(){return this._injector}bootstrap(e,t){return this.bootstrapImpl(e,t)}bootstrapImpl(e,t,n=Ss.NULL){return this._injector.get(Is).run(()=>{if(Oc(Cc.BootstrapComponentStart),!this._injector.get(Rh).done)throw new T(405,``);let r=Ei(e),i=this._injector.get(wh),a=new Fm(r,i);this.componentTypes.push(e);let{hostElement:o,directives:s,bindings:c}=Jh(t),l=o||a.selector,u=a.create(n,[],l,i.injector,s,c),d=u.location.nativeElement,f=u.injector.get(Uh,null);return f?.registerApplication(d),u.onDestroy(()=>{this.detachView(u.hostView),Yh(this.components,u),f?.unregisterApplication(d)}),this._loadComponent(u),Oc(Cc.BootstrapComponentEnd,u),u})}tick(){this.zonelessEnabled||(this.dirtyFlags|=1),this._tick()}_tick(){Oc(Cc.ChangeDetectionStart),this.tracingSnapshot===null?this.tickImpl():this.tracingSnapshot.run(gd.CHANGE_DETECTION,this.tickImpl)}tickImpl=()=>{if(this._runningTick)throw Oc(Cc.ChangeDetectionEnd),new T(101,!1);let e=w(null);try{this._runningTick=!0,this.synchronize()}finally{this._runningTick=!1,this.tracingSnapshot?.dispose(),this.tracingSnapshot=null,w(e),this.afterTick.next(),Oc(Cc.ChangeDetectionEnd)}};synchronize(){this._rendererFactory===null&&!this._injector.destroyed&&(this._rendererFactory=this._injector.get(Vp,null,{optional:!0}));let e=0;for(;this.dirtyFlags!==0&&e++ho(e))){this.dirtyFlags|=2;return}this.dirtyFlags&=-8}attachView(e){let t=e;this._views.push(t),t.attachToAppRef(this)}detachView(e){let t=e;Yh(this._views,t),t.detachFromAppRef()}_loadComponent(e){this.attachView(e.hostView);try{this.tick()}catch(e){this.internalErrorHandler(e)}this.components.push(e),this._injector.get(Wh,[]).forEach(t=>t(e))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(e=>e()),this._views.slice().forEach(e=>e.destroy())}finally{this._destroyed=!0,this._views=[],this._destroyListeners=[]}}onDestroy(e){return this._destroyListeners.push(e),()=>Yh(this._destroyListeners,e)}destroy(){if(this._destroyed)throw new T(406,!1);let e=this._injector;e.destroy&&!e.destroyed&&e.destroy()}get viewCount(){return this._views.length}static ɵfac=function(t){return new(t||e)};static ɵprov=Sl({token:e,factory:e.ɵfac})}return e})();function Jh(e){return e===void 0||typeof e==`string`||e instanceof Element?{hostElement:e}:e}function Yh(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}function M(e,t,n,r){let i=D();return Jp(i,Ko(),t)&&(No(),If(fs(),i,e,t,n,r)),M}function Xh(e){if(yd(`NgAnimateEnter`),!ed)return Xh;let t=D();if(td(t))return Xh;let n=Po(),r=t[9].get(Is);return hd(dd(t),n,()=>Zh(t,n,e,r)),Md(t[9]),Nd(t[9],dd(t)),Xh}function Zh(e,t,n,r){let i=ro(t,e),a=e[11],o=fd(n),s=[],c=!1,l=e=>{if(pd(e)!==i)return;let t=e instanceof AnimationEvent?`animationend`:`transitionend`;r.runOutsideAngular(()=>{a.listen(i,t,u)})},u=e=>{pd(e)===i&&(md(e,i)&&(c=!0),Qh(e,i,a))};if(o&&o.length>0){r.runOutsideAngular(()=>{s.push(a.listen(i,`animationstart`,l)),s.push(a.listen(i,`transitionstart`,l))}),nd(i,o,s);for(let e of o)a.addClass(i,e);r.runOutsideAngular(()=>{requestAnimationFrame(()=>{if(!c&&(Yu(i,ad,ed),!ad.has(i))){for(let e of o)a.removeClass(i,e);rd(i)}})})}}function Qh(e,t,n){let r=id.get(t);if(pd(e)===t&&r&&md(e,t)){e.stopPropagation();for(let e of r.classList)n.removeClass(t,e);rd(t)}}var $h=class{destroy(e){}updateValue(e,t){}swap(e,t){let n=Math.min(e,t),r=Math.max(e,t),i=this.detach(r);if(r-n>1){let e=this.detach(n);this.attach(n,i),this.attach(r,e)}else this.attach(n,i)}move(e,t){this.attach(t,this.detach(e))}};function eg(e,t,n,r,i){return e===n&&Object.is(t,r)?1:Object.is(i(e,t),i(n,r))?-1:0}function tg(e,t,n,r){let i,a,o=0,s=e.length-1;if(Array.isArray(t)){w(r);let c=t.length-1;for(w(null);o<=s&&o<=c;){let r=e.at(o),l=t[o],u=eg(o,r,o,l,n);if(u!==0){u<0&&e.updateValue(o,l),o++;continue}let d=e.at(s),f=t[c],p=eg(s,d,c,f,n);if(p!==0){p<0&&e.updateValue(s,f),s--,c--;continue}let m=n(o,r),h=n(s,d),g=n(o,l);if(Object.is(g,h)){let t=n(c,f);Object.is(t,m)?(e.swap(o,s),e.updateValue(s,f),c--,s--):e.move(s,o),e.updateValue(o,l),o++;continue}if(i??=new ag,a??=ig(e,o,s,n),ng(e,i,o,g))e.updateValue(o,l),o++,s++;else if(a.has(g))i.set(m,e.detach(o)),s--;else{let n=e.create(o,t[o]);e.attach(o,n),o++,s++}}for(;o<=c;)rg(e,i,n,o,t[o]),o++}else if(t!=null){w(r);let c=t[Symbol.iterator]();w(null);let l=c.next();for(;!l.done&&o<=s;){let t=e.at(o),r=l.value,u=eg(o,t,o,r,n);if(u!==0)u<0&&e.updateValue(o,r),o++,l=c.next();else{i??=new ag,a??=ig(e,o,s,n);let u=n(o,r);if(ng(e,i,o,u))e.updateValue(o,r),o++,s++,l=c.next();else if(!a.has(u))e.attach(o,e.create(o,r)),o++,s++,l=c.next();else{let r=n(o,t);i.set(r,e.detach(o)),s--}}}for(;!l.done;)rg(e,i,n,e.length,l.value),l=c.next()}for(;o<=s;)e.destroy(e.detach(s--));i?.forEach(t=>{e.destroy(t)})}function ng(e,t,n,r){return t!==void 0&&t.has(r)?(e.attach(n,t.get(r)),t.delete(r),!0):!1}function rg(e,t,n,r,i){if(ng(e,t,r,n(r,i)))e.updateValue(r,i);else{let t=e.create(r,i);e.attach(r,t)}}function ig(e,t,n,r){let i=new Set;for(let a=t;a<=n;a++)i.add(r(a,e.at(a)));return i}var ag=class{kvMap=new Map;_vMap=void 0;has(e){return this.kvMap.has(e)}delete(e){if(!this.has(e))return!1;let t=this.kvMap.get(e);return this._vMap!==void 0&&this._vMap.has(t)?(this.kvMap.set(e,this._vMap.get(t)),this._vMap.delete(t)):this.kvMap.delete(e),!0}get(e){return this.kvMap.get(e)}set(e,t){if(this.kvMap.has(e)){let n=this.kvMap.get(e);this._vMap===void 0&&(this._vMap=new Map);let r=this._vMap;for(;r.has(n);)n=r.get(n);r.set(n,t)}else this.kvMap.set(e,t)}forEach(e){for(let[t,n]of this.kvMap)if(e(n,t),this._vMap!==void 0){let r=this._vMap;for(;r.has(n);)n=r.get(n),e(n,t)}}};function N(e,t,n,r,i,a,o,s){yd(`NgControlFlow`);let c=D(),l=No();return Bh(c,l,e,t,n,r,i,uo(l.consts,a),256,o,s),og}function og(e,t,n,r,i,a,o,s){yd(`NgControlFlow`);let c=D(),l=No();return Bh(c,l,e,t,n,r,i,uo(l.consts,a),512,o,s),og}function P(e,t){yd(`NgControlFlow`);let n=D(),r=Ko(),i=n[r]===Iu?-1:n[r],a=i===-1?void 0:fg(n,27+i);if(Jp(n,r,e)){let r=w(null);try{if(a!==void 0&&Sp(a,0),e!==-1){let r=27+e,i=fg(n,r),a=_g(n[1],r),o=zp(i,a,n);xp(i,qf(n,a,t,{dehydratedView:o}),0,Jf(a,o))}}finally{w(r)}}else if(a!==void 0){let e=bp(a,0);e!==void 0&&(e[8]=t)}}var sg=class{lContainer;$implicit;$index;constructor(e,t,n){this.lContainer=e,this.$implicit=t,this.$index=n}get $count(){return this.lContainer.length-10}};function cg(e){return e}function lg(e,t){return t}var ug=class{hasEmptyBlock;trackByFn;liveCollection;constructor(e,t,n){this.hasEmptyBlock=e,this.trackByFn=t,this.liveCollection=n}};function F(e,t,n,r,i,a,o,s,c,l,u,d,f){yd(`NgControlFlow`);let p=D(),m=No(),h=c!==void 0,g=D(),_=new ug(h,s?o.bind(g[15][8]):o);g[27+e]=_,Bh(p,m,e+1,t,n,r,i,uo(m.consts,a),256),h&&Bh(p,m,e+2,c,l,u,d,uo(m.consts,f),512)}var dg=class extends $h{lContainer;hostLView;templateTNode;operationsCounter=void 0;needsIndexUpdate=!1;constructor(e,t,n){super(),this.lContainer=e,this.hostLView=t,this.templateTNode=n}get length(){return this.lContainer.length-10}at(e){return this.getLView(e)[8].$implicit}attach(e,t){let n=t[6];this.needsIndexUpdate||=e!==this.length,xp(this.lContainer,t,e,Jf(this.templateTNode,n)),pg(this.lContainer,e)}detach(e){return this.needsIndexUpdate||=e!==this.length-1,mg(this.lContainer,e),hg(this.lContainer,e)}create(e,t){let n=Rp(this.lContainer,this.templateTNode.tView.ssrId);return qf(this.hostLView,this.templateTNode,new sg(this.lContainer,t,e),{dehydratedView:n})}destroy(e){qd(e[1],e)}updateValue(e,t){this.getLView(e)[8].$implicit=t}reset(){this.needsIndexUpdate=!1}updateIndexes(){if(this.needsIndexUpdate)for(let e=0;e0){let e=n[9];Ad(e,r),Zu.delete(n[19]),r.detachedLeaveAnimationFns=void 0}}function mg(e,t){if(e.length<=10)return;let n=e[10+t],r=n?n[26]:void 0;r&&r.leave&&r.leave.size>0&&(r.detachedLeaveAnimationFns=[])}function hg(e,t){return Cp(e,t)}function gg(e,t){return bp(e,t)}function _g(e,t){return io(e,t)}function L(e,t,n){let r=D();return Jp(r,Ko(),t)&&(No(),kf(fs(),r,e,t,r[11],n)),L}function vg(e,t,n,r,i){Hf(t,e,n,i?`class`:`style`,r)}function R(e,t,n,r){let i=D(),a=i[1],o=e+27,s=a.firstCreatePass?Cm(o,i,2,t,Ff,ko(),n,r):a.data[o];if(Ja(s)){let n=i[10].tracingService;if(n&&n.componentCreate){let o=a.data[s.directiveStart+s.componentOffset];return n.componentCreate(Up(o),()=>(yg(e,t,i,s,r),R))}}return yg(e,t,i,s,r),R}function yg(e,t,n,r,i){if(zf(r,n,e,t,bg),Ya(r)){let e=n[1];Tf(e,n,r),$l(e,r,n)}i!=null&&Ef(n,r)}function z(){let e=No(),t=Bf(Po());return e.firstCreatePass&&wm(e,t),jo(t)&&Mo(),Oo(),t.classesWithoutHost!=null&&zc(t)&&vg(e,t,D(),t.classesWithoutHost,!0),t.stylesWithoutHost!=null&&Bc(t)&&vg(e,t,D(),t.stylesWithoutHost,!1),z}function B(e,t,n,r){return R(e,t,n,r),z(),B}function V(e,t,n,r){let i=D(),a=i[1],o=e+27,s=a.firstCreatePass?Tm(o,a,2,t,n,r):a.data[o];return zf(s,i,e,t,bg),r!=null&&Ef(i,s),V}function H(){return jo(Bf(Po()))&&Mo(),Oo(),H}function U(e,t,n,r){return V(e,t,n,r),H(),U}var bg=(e,t,n,r,i)=>(ys(!0),lu(t[11],r,gs()));function W(){return D()}function xg(e,t,n){let r=D();return Jp(r,Ko(),t)&&(No(),Af(fs(),r,e,t,r[11],n)),xg}var Sg=void 0;function Cg(e){let t=Math.floor(Math.abs(e)),n=e.toString().replace(/^[^.]*\.?/,``).length;return t===1&&n===0?1:5}var wg=[`en`,[[`a`,`p`],[`AM`,`PM`]],[[`AM`,`PM`]],[[`S`,`M`,`T`,`W`,`T`,`F`,`S`],[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],[`Su`,`Mo`,`Tu`,`We`,`Th`,`Fr`,`Sa`]],Sg,[[`J`,`F`,`M`,`A`,`M`,`J`,`J`,`A`,`S`,`O`,`N`,`D`],[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`]],Sg,[[`B`,`A`],[`BC`,`AD`],[`Before Christ`,`Anno Domini`]],0,[6,0],[`M/d/yy`,`MMM d, y`,`MMMM d, y`,`EEEE, MMMM d, y`],[`h:mm a`,`h:mm:ss a`,`h:mm:ss a z`,`h:mm:ss a zzzz`],[`{1}, {0}`,Sg,Sg,Sg],[`.`,`,`,`;`,`%`,`+`,`-`,`E`,`×`,`‰`,`∞`,`NaN`,`:`],[`#,##0.###`,`#,##0%`,`¤#,##0.00`,`#E0`],`USD`,`$`,`US Dollar`,{},`ltr`,Cg],Tg=Object.create(null);function Eg(e){let t=kg(e),n=Dg(t);if(n)return n;let r=t.split(`-`)[0];if(n=Dg(r),n)return n;if(r===`en`)return wg;throw new T(701,!1)}function Dg(e){if(!(e in Tg)){let t=Hi.ng&&Hi.ng.common&&Hi.ng.common.locales&&Hi.ng.common.locales[e];return t!==void 0&&(Tg[e]=t),t}return Tg[e]}var Og={LocaleId:0,DayPeriodsFormat:1,DayPeriodsStandalone:2,DaysFormat:3,DaysStandalone:4,MonthsFormat:5,MonthsStandalone:6,Eras:7,FirstDayOfWeek:8,WeekendRange:9,DateFormat:10,TimeFormat:11,DateTimeFormat:12,NumberSymbols:13,NumberFormats:14,CurrencyCode:15,CurrencySymbol:16,CurrencyName:17,Currencies:18,Directionality:19,PluralCase:20,ExtraData:21};function kg(e){return e.toLowerCase().replace(/_/g,`-`)}var Ag=`en-US`;function jg(e){typeof e==`string`&&e.toLowerCase().replace(/_/g,`-`)}function G(e,t,n){let r=D(),i=No(),a=Po();return Mg(i,r,r[11],a,e,t,n),G}function K(e,t,n){let r=D(),i=No(),a=Po();return(a.type&3||n)&&em(a,i,r,n,r[11],e,t,Qp(a,r,t)),K}function Mg(e,t,n,r,i,a,o){let s=!0,c=null;if((r.type&3||o)&&(c??=Qp(r,t,a),em(r,e,t,o,n,i,a,c)&&(s=!1)),s){let e=r.outputs?.[i],n=r.hostDirectiveOutputs?.[i];if(n&&n.length)for(let e=0;e>17&32767}function Rg(e){return(e&2)==2}function zg(e,t){return e&131071|t<<17}function Bg(e){return e|2}function Vg(e){return(e&131068)>>2}function Hg(e,t){return e&-131069|t<<2}function Ug(e){return(e&1)==1}function Wg(e){return e|1}function Gg(e,t,n,r,i,a){let o=a?t.classBindings:t.styleBindings,s=Lg(o),c=Vg(o);e[r]=n;let l=!1,u;if(Array.isArray(n)){let e=n;u=e[1],(u===null||sa(e,u)>0)&&(l=!0)}else u=n;if(i){if(c!==0){let t=Lg(e[s+1]);e[r+1]=Ig(t,s),t!==0&&(e[t+1]=Hg(e[t+1],r)),e[s+1]=zg(e[s+1],r)}else e[r+1]=Ig(s,0),s!==0&&(e[s+1]=Hg(e[s+1],r)),s=r}else e[r+1]=Ig(c,0),s===0?s=r:e[c+1]=Hg(e[c+1],r),c=r;l&&(e[r+1]=Bg(e[r+1])),qg(e,u,r,!0),qg(e,u,r,!1),Kg(t,u,e,r,a),o=Ig(s,c),a?t.classBindings=o:t.styleBindings=o}function Kg(e,t,n,r,i){let a=i?e.residualClasses:e.residualStyles;a!=null&&typeof t==`string`&&sa(a,t)>=0&&(n[r+1]=Wg(n[r+1]))}function qg(e,t,n,r){let i=e[n+1],a=t===null,o=r?Lg(i):Vg(i),s=!1;for(;o!==0&&(s===!1||a);){let n=e[o],i=e[o+1];Jg(n,t)&&(s=!0,e[o+1]=r?Wg(i):Bg(i)),o=r?Lg(i):Vg(i)}s&&(e[n+1]=r?Bg(i):Wg(i))}function Jg(e,t){return e===null||t==null||(Array.isArray(e)?e[1]:e)===t?!0:Array.isArray(e)&&typeof t==`string`?sa(e,t)>=0:!1}var Yg={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function Xg(e){return e.substring(Yg.key,Yg.keyEnd)}function Zg(e){return $g(e),Qg(e,e_(e,0,Yg.textEnd))}function Qg(e,t){let n=Yg.textEnd;return n===t?-1:(t=Yg.keyEnd=t_(e,Yg.key=t,n),e_(e,t,n))}function $g(e){Yg.key=0,Yg.keyEnd=0,Yg.value=0,Yg.valueEnd=0,Yg.textEnd=e.length}function e_(e,t,n){for(;t32;)t++;return t}function n_(e,t,n){return a_(e,t,n,!1),n_}function J(e,t){return a_(e,t,null,!0),J}function r_(e){o_(g_,i_,e,!0)}function i_(e,t){for(let n=Zg(t);n>=0;n=Qg(t,n))aa(e,Xg(t),!0)}function a_(e,t,n,r){let i=D(),a=No(),o=qo(2);if(a.firstUpdatePass&&c_(a,e,o,r),t!==Iu&&Jp(i,o,t)){let s=a.data[us()];v_(a,s,i,i[11],e,i[o+1]=x_(t,n),r,o)}}function o_(e,t,n,r){let i=No(),a=qo(2);i.firstUpdatePass&&c_(i,null,a,r);let o=D();if(n!==Iu&&Jp(o,a,n)){let s=i.data[us()];if(S_(s,r)&&!s_(i,a)){let e=r?s.classesWithoutHost:s.stylesWithoutHost;e!==null&&(n=oi(e,n||``)),vg(i,s,o,n,r)}else __(i,s,o,o[11],o[a+1],o[a+1]=h_(e,t,n),r,a)}}function s_(e,t){return t>=e.expandoStartIndex}function c_(e,t,n,r){let i=e.data;if(i[n+1]===null){let a=i[us()],o=s_(e,n);S_(a,r)&&t===null&&!o&&(t=!1),t=l_(i,a,t,r),Gg(i,a,t,n,o,r)}}function l_(e,t,n,r){let i=Qo(e),a=r?t.residualClasses:t.residualStyles;if(i===null)(r?t.classBindings:t.styleBindings)===0&&(n=p_(null,e,t,n,r),n=m_(n,t.attrs,r),a=null);else{let o=t.directiveStylingLast;if(o===-1||e[o]!==i){if(n=p_(i,e,t,n,r),a===null){let n=u_(e,t,r);n!==void 0&&Array.isArray(n)&&(n=p_(null,e,t,n[1],r),n=m_(n,t.attrs,r),d_(e,t,r,n))}else a=f_(e,t,r)}}return a!==void 0&&(r?t.residualClasses=a:t.residualStyles=a),n}function u_(e,t,n){let r=n?t.classBindings:t.styleBindings;if(Vg(r)!==0)return e[Lg(r)]}function d_(e,t,n,r){let i=n?t.classBindings:t.styleBindings;e[Lg(i)]=r}function f_(e,t,n){let r,i=t.directiveEnd;for(let a=1+t.directiveStylingLast;a0;){let t=e[i],a=Array.isArray(t),c=a?t[1]:t,l=c===null,u=n[i+1];u===Iu&&(u=l?ua:void 0);let d=l?oa(u,r):c===r?u:void 0;if(a&&!b_(d)&&(d=oa(t,r)),b_(d)&&(s=d,o))return s;let f=e[i+1];i=o?Lg(f):Vg(f)}if(t!==null){let e=a?t.residualClasses:t.residualStyles;e!=null&&(s=oa(e,r))}return s}function b_(e){return e!==void 0}function x_(e,t){return e==null||e===``||(typeof t==`string`?e=nu(e)+t:typeof e==`object`&&(e=ai(nu(e)))),e}function S_(e,t){return!!(e.flags&(t?8:16))}function Y(e,t=``){let n=D(),r=No(),i=e+27,a=r.firstCreatePass?Ap(r,i,1,t,null):r.data[i],o=C_(r,n,a,t);n[i]=o,vs()&&nf(r,n,o,a),Lo(a,!1)}var C_=(e,t,n,r)=>(ys(!0),su(t[11],r));function w_(e,t,n,r=``){return Jp(e,Ko(),n)?t+Ai(n)+r:Iu}function T_(e,t,n,r,i,a=``){let o=Yp(e,Wo(),n,i);return qo(2),o?t+Ai(n)+r+Ai(i)+a:Iu}function E_(e,t,n,r,i,a,o,s=``){let c=Xp(e,Wo(),n,i,o);return qo(3),c?t+Ai(n)+r+Ai(i)+a+Ai(o)+s:Iu}function D_(e,t,n,r,i,a,o,s,c,l=``){let u=Zp(e,Wo(),n,i,o,c);return qo(4),u?t+Ai(n)+r+Ai(i)+a+Ai(o)+s+Ai(c)+l:Iu}function X(e){return Z(``,e),X}function Z(e,t,n){let r=D(),i=w_(r,e,t,n);return i!==Iu&&j_(r,us(),i),Z}function O_(e,t,n,r,i){let a=D(),o=T_(a,e,t,n,r,i);return o!==Iu&&j_(a,us(),o),O_}function k_(e,t,n,r,i,a,o){let s=D(),c=E_(s,e,t,n,r,i,a,o);return c!==Iu&&j_(s,us(),c),k_}function A_(e,t,n,r,i,a,o,s,c){let l=D(),u=D_(l,e,t,n,r,i,a,o,s,c);return u!==Iu&&j_(l,us(),u),A_}function j_(e,t,n){let r=no(t,e);cu(e[11],r,n)}function M_(e,t,n){yc(t)&&(t=t());let r=D();return Jp(r,Ko(),t)&&(No(),kf(fs(),r,e,t,r[11],n)),M_}function N_(e,t){let n=yc(e);return n&&e.set(t),n}function P_(e,t){let n=D(),r=No(),i=Po();return Mg(r,n,n[11],i,e,t),P_}var F_={};function I_(e){yd(`NgLet`);let t=No(),n=D(),r=e+27;return Lo(Ap(t,r,128,null,null),!1),oo(t,n,r,F_),I_}function L_(e){return oo(No(),D(),us(),e),e}function R_(e){let t=ao(Bo(),27+e);if(t===F_)throw new T(314,!1);return t}function z_(e,t){let n=Uo()+e,r=D();return r[n]===Iu?Kp(r,n,t()):qp(r,n)}function B_(e,t){let n=e[t];return n===Iu?void 0:n}function V_(e,t,n,r,i,a){let o=t+n;return Jp(e,o,i)?Kp(e,o+1,a?r.call(a,i):r(i)):B_(e,o+1)}function H_(e,t,n,r,i,a,o){let s=t+n;return Yp(e,s,i,a)?Kp(e,s+2,o?r.call(o,i,a):r(i,a)):B_(e,s+2)}function U_(e,t){let n=No(),r,i=e+27;n.firstCreatePass?(r=W_(t,n.pipeRegistry),n.data[i]=r,r.onDestroy&&(n.destroyHooks??=[]).push(i,r.onDestroy)):r=n.data[i];let a=r.factory||(r.factory=Qi(r.type,!0)),o=Bi(cm);try{let e=Zc(!1),t=a();return Zc(e),oo(n,D(),i,t),t}finally{Bi(o)}}function W_(e,t){if(t)for(let n=t.length-1;n>=0;n--){let r=t[n];if(e===r.name)return r}}function G_(e,t,n){let r=e+27,i=D(),a=ao(i,r);return q_(i,r)?V_(i,Uo(),t,a.transform,n,a):a.transform(n)}function K_(e,t,n,r){let i=e+27,a=D(),o=ao(a,i);return q_(a,i)?H_(a,Uo(),t,o.transform,n,r,o):o.transform(n,r)}function q_(e,t){return e[1].data[t].pure}var J_=(()=>{class e{applicationErrorHandler=E(Ys);appRef=E(qh);taskService=E(Os);ngZone=E(Is);zonelessEnabled=E(oc);tracing=E(_d,{optional:!0});zoneIsDefined=typeof Zone<`u`&&!!Zone.root.run;schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}];subscriptions=new hr;angularZoneId=this.zoneIsDefined?this.ngZone._inner?.get(Ps):null;scheduleInRootZone=!this.zonelessEnabled&&this.zoneIsDefined&&(E(sc,{optional:!0})??!1);cancelScheduledCallback=null;useMicrotaskScheduler=!1;runningTick=!1;pendingRenderTaskId=null;constructor(){this.subscriptions.add(this.appRef.afterTick.subscribe(()=>{let e=this.taskService.add();if(!this.runningTick&&(this.cleanup(),!this.zonelessEnabled||this.appRef.includeAllTestViews)){this.taskService.remove(e);return}this.switchToMicrotaskScheduler(),this.taskService.remove(e)})),this.subscriptions.add(this.ngZone.onUnstable.subscribe(()=>{this.runningTick||this.cleanup()}))}switchToMicrotaskScheduler(){this.ngZone.runOutsideAngular(()=>{let e=this.taskService.add();this.useMicrotaskScheduler=!0,queueMicrotask(()=>{this.useMicrotaskScheduler=!1,this.taskService.remove(e)})})}notify(e){if(!this.zonelessEnabled&&e===5)return;switch(e){case 0:case 2:this.appRef.dirtyFlags|=2;break;case 3:case 4:case 5:case 1:this.appRef.dirtyFlags|=4;break;case 6:this.appRef.dirtyFlags|=2;break;case 12:this.appRef.dirtyFlags|=16;break;case 13:this.appRef.dirtyFlags|=2;break;case 11:break;default:this.appRef.dirtyFlags|=8}if(this.appRef.tracingSnapshot=this.tracing?.snapshot(this.appRef.tracingSnapshot)??null,!this.shouldScheduleTick())return;let t=this.useMicrotaskScheduler?Ms:js;this.pendingRenderTaskId=this.taskService.add(),this.cancelScheduledCallback=this.scheduleInRootZone?Zone.root.run(()=>t(()=>this.tick())):this.ngZone.runOutsideAngular(()=>t(()=>this.tick()))}shouldScheduleTick(){return!(this.appRef.destroyed||this.pendingRenderTaskId!==null||this.runningTick||this.appRef._runningTick||!this.zonelessEnabled&&this.zoneIsDefined&&Zone.current.get(`isAngularZone_ID`+this.angularZoneId))}tick(){if(this.runningTick||this.appRef.destroyed)return;if(this.appRef.dirtyFlags===0){this.cleanup();return}!this.zonelessEnabled&&this.appRef.dirtyFlags&7&&(this.appRef.dirtyFlags|=1);let e=this.taskService.add();try{this.ngZone.run(()=>{this.runningTick=!0,this.appRef._tick()},void 0,this.schedulerTickApplyArgs)}catch(e){this.applicationErrorHandler(e)}finally{this.taskService.remove(e),this.cleanup()}}ngOnDestroy(){this.subscriptions.unsubscribe(),this.cleanup()}cleanup(){if(this.runningTick=!1,this.cancelScheduledCallback?.(),this.cancelScheduledCallback=null,this.pendingRenderTaskId!==null){let e=this.pendingRenderTaskId;this.pendingRenderTaskId=null,this.taskService.remove(e)}}static ɵfac=function(t){return new(t||e)};static ɵprov=Sl({token:e,factory:e.ɵfac})}return e})();function Y_(){return[{provide:ac,useExisting:J_},{provide:Is,useClass:Ws},{provide:oc,useValue:!0}]}function X_(){return typeof $localize<`u`&&$localize.locale||`en-US`}var Z_=new vi(``,{factory:()=>E(Z_,{optional:!0,skipSelf:!0})||X_()}),Q_=class{destroyed=!1;listeners=null;errorHandler=E(Js,{optional:!0});isEmitting=!1;hasNullListeners=!1;destroyRef=E(ws);constructor(){this.destroyRef.onDestroy(()=>{this.destroyed=!0,this.listeners=null})}subscribe(e){if(this.destroyed)throw new T(953,!1);return(this.listeners??=[]).push(e),{unsubscribe:()=>{let t=this.listeners?this.listeners.indexOf(e):-1;t>-1&&(this.isEmitting?(this.hasNullListeners=!0,this.listeners[t]=null):this.listeners.splice(t,1))}}}emit(e){if(this.destroyed){console.warn(ri(953,!1));return}if(this.listeners===null)return;this.isEmitting=!0;let t=w(null);try{for(let t of this.listeners)try{t!==null&&t(e)}catch(e){this.errorHandler?.handleError(e)}}finally{this.hasNullListeners&&(this.hasNullListeners=!1,this.listeners&&$_(this.listeners)),w(t),this.isEmitting=!1}}};function $_(e){let t=e.length-1;for(;t>-1;)e[t]===null&&e.splice(t,1),t--}function Q(e,t){return Mn(e,t?.equal)}function ev(e){return ar(e)}(class e extends Error{_brand;constructor(e){super(e)}static IDLE=new e(`IDLE`);static LOADING=new e(`LOADING`)});var tv=e=>e;function nv(e,t){return typeof e==`function`?rv(tr(e,tv,t?.equal),t?.debugName,t?.set):rv(tr(e.source,e.computation,e.equal),e.debugName,e.set)}function rv(e,t,n){let r=e[dn],i=e;if(n!==void 0){let t=e=>nr(r,e);i.set=e=>n(e,t),i.update=r=>n(r(ev(e)),t)}else i.set=e=>nr(r,e),i.update=e=>rr(r,e);return i.asReadonly=Zs.bind(e),i}function iv(e,t){let n=Object.create(xc);n.value=e,n.transformFn=t?.transform;function r(){if(mn(n),n.value===bc)throw new T(-950,null);return n.value}return r[dn]=n,r}function av(e){return new Q_}function ov(e,t){return iv(e,t)}function sv(e){return iv(bc,e)}var $=(ov.required=sv,ov);function cv(e,t){let n=Object.create(xc),r=new Q_;n.value=e;function i(){return mn(n),lv(n.value),n.value}return i[dn]=n,i.asReadonly=Zs.bind(i),i.set=e=>{n.equal(n.value,e)||(Wn(n,e),r.emit(e))},i.update=e=>{lv(n.value),i.set(e(n.value))},i.subscribe=r.subscribe.bind(r),i.destroyRef=r.destroyRef,i}function lv(e){if(e===bc)throw new T(952,!1)}function uv(e,t){return cv(e,t)}function dv(e){return cv(bc,e)}var fv=(uv.required=dv,uv);function pv(e,t){return vh(t)}function mv(e,t){return yh(t)}var hv=(pv.required=mv,pv),gv=new vi(``),_v=new vi(``);function vv(e){return!e.moduleRef}function yv(e){let t=vv(e)?e.r3Injector:e.moduleRef.injector,n=t.get(Is);return n.run(()=>{vv(e)?e.r3Injector.resolveInjectorInitializers():e.moduleRef.resolveInjectorInitializers();let r=t.get(Ys),i;if(n.runOutsideAngular(()=>{i=n.onError.subscribe({next:r})}),vv(e)){let n=()=>t.destroy(),r=e.platformInjector.get(gv);r.add(n),t.onDestroy(()=>{i.unsubscribe(),r.delete(n)})}else{let t=()=>e.moduleRef.destroy(),n=e.platformInjector.get(gv);n.add(t),e.moduleRef.onDestroy(()=>{Yh(e.allPlatformModules,e.moduleRef),i.unsubscribe(),n.delete(t)})}return xv(r,n,()=>{let n=t.get(Os),r=n.add(),i=t.get(Rh);return i.runInitializers(),i.donePromise.then(()=>{if(jg(t.get(Z_,Ag)||`en-US`),!t.get(_v,!0))return vv(e)?t.get(qh):(e.allPlatformModules.push(e.moduleRef),e.moduleRef);if(vv(e)){let n=t.get(qh);return e.rootComponent!==void 0&&n.bootstrap(e.rootComponent),n}return bv?.(e.moduleRef,e.allPlatformModules),e.moduleRef}).finally(()=>void n.remove(r))})})}var bv;function xv(e,t,n){try{let r=n();return Sh(r)?r.catch(n=>{throw t.runOutsideAngular(()=>e(n)),n}):r}catch(n){throw t.runOutsideAngular(()=>e(n)),n}}var Sv=null;function Cv(e=[],t){return Ss.create({name:t,providers:[{provide:Ta,useValue:`platform`},{provide:gv,useValue:new Set([()=>Sv=null])},...e]})}function wv(e=[]){if(Sv)return Sv;let t=Cv(e);return Sv=t,Gh(),Tv(t),t}function Tv(e){let t=e.get(ec,null);Ha(e,()=>{t?.forEach(e=>e())})}function Ev(e){let{rootComponent:t,appProviders:n,platformProviders:r,platformRef:i}=e;Oc(Cc.BootstrapApplicationStart);try{let e=i?.injector??wv(r);return yv({r3Injector:new Th({providers:[Y_(),Xs,...n||[]],parent:e,debugName:``,runEnvironmentInitializers:!1}).injector,platformInjector:e,rootComponent:t})}catch(e){return Promise.reject(e)}finally{Oc(Cc.BootstrapApplicationEnd)}}var Dv=Symbol(`NOT_SET`),Ov=new Set,kv={...Kn,kind:`afterRenderEffectPhase`,consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!0,value:Dv,cleanup:null,consumerMarkedDirty(){if(this.sequence.impl.executing){if(this.sequence.lastPhase===null||this.sequence.lastPhase(mn(r),r.value),r.signal[dn]=r,r.registerCleanupFn=e=>(r.cleanup??=new Set).add(e),this.nodes[e]=r,this.hooks[e]=e=>r.phaseFn(e)}}afterRun(){super.afterRun(),this.lastPhase=null}destroy(){if(this.onDestroyFns!==null)for(let e of this.onDestroyFns)e();super.destroy();for(let e of this.nodes)if(e)try{for(let t of e.cleanup??Ov)t()}finally{En(e)}}};function jv(e,t){let n=t?.injector??E(Ss),r=n.get(ac),i=n.get(bd),a=n.get(_d,null,{optional:!0});i.impl??=n.get(Sd);let o=e;typeof o==`function`&&(o={mixedReadWrite:e});let s=n.get(rc,null,{optional:!0}),c=new Av(i.impl,[o.earlyRead,o.write,o.mixedReadWrite,o.read],s?.view,r,n,a?.snapshot(null));return i.impl.register(c),c}var Mv=null;function Nv(){return Mv}function Pv(e){Mv??=e}var Fv=class{},Iv=(function(e){return e[e.Format=0]=`Format`,e[e.Standalone=1]=`Standalone`,e})(Iv||{}),Lv=(function(e){return e[e.Narrow=0]=`Narrow`,e[e.Abbreviated=1]=`Abbreviated`,e[e.Wide=2]=`Wide`,e[e.Short=3]=`Short`,e})(Lv||{}),Rv=(function(e){return e[e.Short=0]=`Short`,e[e.Medium=1]=`Medium`,e[e.Long=2]=`Long`,e[e.Full=3]=`Full`,e})(Rv||{}),zv={Decimal:0,Group:1,List:2,PercentSign:3,PlusSign:4,MinusSign:5,Exponential:6,SuperscriptingExponent:7,PerMille:8,Infinity:9,NaN:10,TimeSeparator:11,CurrencyDecimal:12,CurrencyGroup:13};function Bv(e){return Eg(e)[Og.LocaleId]}function Vv(e,t,n){let r=Eg(e);return Qv(Qv([r[Og.DayPeriodsFormat],r[Og.DayPeriodsStandalone]],t),n)}function Hv(e,t,n){let r=Eg(e);return Qv(Qv([r[Og.DaysFormat],r[Og.DaysStandalone]],t),n)}function Uv(e,t,n){let r=Eg(e);return Qv(Qv([r[Og.MonthsFormat],r[Og.MonthsStandalone]],t),n)}function Wv(e,t){let n=Eg(e)[Og.Eras];return Qv(n,t)}function Gv(e,t){return Qv(Eg(e)[Og.DateFormat],t)}function Kv(e,t){return Qv(Eg(e)[Og.TimeFormat],t)}function qv(e,t){let n=Eg(e)[Og.DateTimeFormat];return Qv(n,t)}function Jv(e,t){let n=Eg(e),r=n[Og.NumberSymbols][t];if(r===void 0){if(t===zv.CurrencyDecimal)return n[Og.NumberSymbols][zv.Decimal];if(t===zv.CurrencyGroup)return n[Og.NumberSymbols][zv.Group]}return r}function Yv(e){if(!e[Og.ExtraData])throw new T(2303,!1)}function Xv(e){let t=Eg(e);return Yv(t),(t[Og.ExtraData][2]||[]).map(e=>typeof e==`string`?$v(e):[$v(e[0]),$v(e[1])])}function Zv(e,t,n){let r=Eg(e);return Yv(r),Qv(Qv([r[Og.ExtraData][0],r[Og.ExtraData][1]],t)||[],n)||[]}function Qv(e,t){for(let n=t;n>-1;n--)if(e[n]!==void 0)return e[n];throw new T(2304,!1)}function $v(e){let[t,n]=e.split(`:`);return{hours:+t,minutes:+n}}var ey=/^(\d{4,})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,ty=Object.create(null),ny=/((?:[^BEGHLMOSWYZabcdhmswyz']+)|(?:'(?:[^']|'')*')|(?:G{1,5}|y{1,4}|Y{1,4}|M{1,5}|L{1,5}|w{1,2}|W{1}|d{1,2}|E{1,6}|c{1,6}|a{1,5}|b{1,5}|B{1,5}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|S{1,3}|z{1,4}|Z{1,5}|O{1,4}))([\s\S]*)/,ry=256;function iy(e,t,n,r){let i=Dy(e);ay(t),t=sy(n,t)||t;let a=[],o;for(;t;)if(o=ny.exec(t),o){a=a.concat(o.slice(1));let e=a.pop();if(!e)break;t=e}else{a.push(t);break}let s=i.getTimezoneOffset();r&&(s=wy(r,s),i=Ey(i,r));let c=``;return a.forEach(e=>{let t=Cy(e);c+=t?t(i,n,s):e===`''`?`'`:e.replace(/(^'|'$)/g,``).replace(/''/g,`'`)}),c}function ay(e){if(e.length>ry)throw new T(2300,!1)}function oy(e,t,n){let r=new Date(0);return r.setFullYear(e,t,n),r.setHours(0,0,0),r}function sy(e,t){let n=Bv(e);if(ty[n]??=Object.create(null),ty[n][t])return ty[n][t];let r=``;switch(t){case`shortDate`:r=Gv(e,Rv.Short);break;case`mediumDate`:r=Gv(e,Rv.Medium);break;case`longDate`:r=Gv(e,Rv.Long);break;case`fullDate`:r=Gv(e,Rv.Full);break;case`shortTime`:r=Kv(e,Rv.Short);break;case`mediumTime`:r=Kv(e,Rv.Medium);break;case`longTime`:r=Kv(e,Rv.Long);break;case`fullTime`:r=Kv(e,Rv.Full);break;case`short`:let t=sy(e,`shortTime`),n=sy(e,`shortDate`);r=cy(qv(e,Rv.Short),[t,n]);break;case`medium`:let i=sy(e,`mediumTime`),a=sy(e,`mediumDate`);r=cy(qv(e,Rv.Medium),[i,a]);break;case`long`:let o=sy(e,`longTime`),s=sy(e,`longDate`);r=cy(qv(e,Rv.Long),[o,s]);break;case`full`:let c=sy(e,`fullTime`),l=sy(e,`fullDate`);r=cy(qv(e,Rv.Full),[c,l])}return r&&(ty[n][t]=r),r}function cy(e,t){return t&&(e=e.replace(/\{([^}]+)}/g,function(e,n){return Object.hasOwn(t,n)?t[n]:e})),e}function ly(e,t,n=`-`,r,i){let a=``;(e<0||i&&e<=0)&&(i?e=-e+1:(e=-e,a=n));let o=String(e);for(;o.length0||s>-n)&&(s+=n),e===3)s===0&&n===-12&&(s=12);else if(e===6)return uy(s,t);let c=Jv(o,zv.MinusSign);return ly(s,t,c,r,i)}}function fy(e,t){switch(e){case 0:return t.getFullYear();case 1:return t.getMonth();case 2:return t.getDate();case 3:return t.getHours();case 4:return t.getMinutes();case 5:return t.getSeconds();case 6:return t.getMilliseconds();case 7:return t.getDay();default:throw new T(2301,!1)}}function py(e,t,n=Iv.Format,r=!1){return function(i,a){return my(i,a,e,t,n,r)}}function my(e,t,n,r,i,a){switch(n){case 2:return Uv(t,i,r)[e.getMonth()];case 1:return Hv(t,i,r)[e.getDay()];case 0:let n=e.getHours(),o=e.getMinutes();if(a){let e=Xv(t),a=Zv(t,i,r),s=e.findIndex(e=>{if(Array.isArray(e)){let[t,r]=e,i=n>=t.hours&&o>=t.minutes,a=n0?Math.floor(i/60):Math.ceil(i/60);switch(e){case 0:return(i>=0?`+`:``)+ly(o,2,a)+ly(Math.abs(i%60),2,a);case 1:return`GMT`+(i>=0?`+`:``)+ly(o,1,a);case 2:return`GMT`+(i>=0?`+`:``)+ly(o,2,a)+`:`+ly(Math.abs(i%60),2,a);case 3:return r===0?`Z`:(i>=0?`+`:``)+ly(o,2,a)+`:`+ly(Math.abs(i%60),2,a);default:throw new T(2310,!1)}}}var gy=0,_y=4;function vy(e){let t=oy(e,gy,1).getDay();return oy(e,0,1+(t<=_y?_y:11)-t)}function yy(e){let t=e.getDay(),n=t===0?-3:_y-t;return oy(e.getFullYear(),e.getMonth(),e.getDate()+n)}function by(e,t=!1){return function(n,r){let i;if(t){let e=new Date(n.getFullYear(),n.getMonth(),1).getDay()-1,t=n.getDate();i=1+Math.floor((t+e)/7)}else{let e=yy(n),t=vy(e.getFullYear()),r=e.getTime()-t.getTime();i=1+Math.round(r/6048e5)}return ly(i,e,Jv(r,zv.MinusSign))}}function xy(e,t=!1){return function(n,r){return ly(yy(n).getFullYear(),e,Jv(r,zv.MinusSign),t)}}var Sy=Object.create(null);function Cy(e){if(Sy[e])return Sy[e];let t;switch(e){case`G`:case`GG`:case`GGG`:t=py(3,Lv.Abbreviated);break;case`GGGG`:t=py(3,Lv.Wide);break;case`GGGGG`:t=py(3,Lv.Narrow);break;case`y`:t=dy(0,1,0,!1,!0);break;case`yy`:t=dy(0,2,0,!0,!0);break;case`yyy`:t=dy(0,3,0,!1,!0);break;case`yyyy`:t=dy(0,4,0,!1,!0);break;case`Y`:t=xy(1);break;case`YY`:t=xy(2,!0);break;case`YYY`:t=xy(3);break;case`YYYY`:t=xy(4);break;case`M`:case`L`:t=dy(1,1,1);break;case`MM`:case`LL`:t=dy(1,2,1);break;case`MMM`:t=py(2,Lv.Abbreviated);break;case`MMMM`:t=py(2,Lv.Wide);break;case`MMMMM`:t=py(2,Lv.Narrow);break;case`LLL`:t=py(2,Lv.Abbreviated,Iv.Standalone);break;case`LLLL`:t=py(2,Lv.Wide,Iv.Standalone);break;case`LLLLL`:t=py(2,Lv.Narrow,Iv.Standalone);break;case`w`:t=by(1);break;case`ww`:t=by(2);break;case`W`:t=by(1,!0);break;case`d`:t=dy(2,1);break;case`dd`:t=dy(2,2);break;case`c`:case`cc`:t=dy(7,1);break;case`ccc`:t=py(1,Lv.Abbreviated,Iv.Standalone);break;case`cccc`:t=py(1,Lv.Wide,Iv.Standalone);break;case`ccccc`:t=py(1,Lv.Narrow,Iv.Standalone);break;case`cccccc`:t=py(1,Lv.Short,Iv.Standalone);break;case`E`:case`EE`:case`EEE`:t=py(1,Lv.Abbreviated);break;case`EEEE`:t=py(1,Lv.Wide);break;case`EEEEE`:t=py(1,Lv.Narrow);break;case`EEEEEE`:t=py(1,Lv.Short);break;case`a`:case`aa`:case`aaa`:t=py(0,Lv.Abbreviated);break;case`aaaa`:t=py(0,Lv.Wide);break;case`aaaaa`:t=py(0,Lv.Narrow);break;case`b`:case`bb`:case`bbb`:t=py(0,Lv.Abbreviated,Iv.Standalone,!0);break;case`bbbb`:t=py(0,Lv.Wide,Iv.Standalone,!0);break;case`bbbbb`:t=py(0,Lv.Narrow,Iv.Standalone,!0);break;case`B`:case`BB`:case`BBB`:t=py(0,Lv.Abbreviated,Iv.Format,!0);break;case`BBBB`:t=py(0,Lv.Wide,Iv.Format,!0);break;case`BBBBB`:t=py(0,Lv.Narrow,Iv.Format,!0);break;case`h`:t=dy(3,1,-12);break;case`hh`:t=dy(3,2,-12);break;case`H`:t=dy(3,1);break;case`HH`:t=dy(3,2);break;case`m`:t=dy(4,1);break;case`mm`:t=dy(4,2);break;case`s`:t=dy(5,1);break;case`ss`:t=dy(5,2);break;case`S`:t=dy(6,1);break;case`SS`:t=dy(6,2);break;case`SSS`:t=dy(6,3);break;case`Z`:case`ZZ`:case`ZZZ`:t=hy(0);break;case`ZZZZZ`:t=hy(3);break;case`O`:case`OO`:case`OOO`:case`z`:case`zz`:case`zzz`:t=hy(1);break;case`OOOO`:case`ZZZZ`:case`zzzz`:t=hy(2);break;default:return null}return Sy[e]=t,t}function wy(e,t){e=e.replace(/:/g,``);let n=Date.parse(`Jan 01, 1970 00:00:00 `+e)/6e4;return isNaN(n)?t:n}function Ty(e,t){return e=new Date(e.getTime()),e.setMinutes(e.getMinutes()+t),e}function Ey(e,t,n){let r=e.getTimezoneOffset();return Ty(e,-1*(wy(t,r)-r))}function Dy(e){if(ky(e))return e;if(typeof e==`number`&&!isNaN(e))return new Date(e);if(typeof e==`string`){if(e=e.trim(),/^(\d{4}(-\d{1,2}(-\d{1,2})?)?)$/.test(e)){let[t,n=1,r=1]=e.split(`-`).map(e=>+e);return oy(t,n-1,r)}let t=parseFloat(e);if(!isNaN(e-t))return new Date(t);let n;if(n=e.match(ey))return Oy(n)}let t=new Date(e);if(!ky(t))throw new T(2311,!1);return t}function Oy(e){let t=new Date(0),n=0,r=0,i=e[8]?t.setUTCFullYear:t.setFullYear,a=e[8]?t.setUTCHours:t.setHours;e[9]&&(n=Number(e[9]+e[10]),r=Number(e[9]+e[11])),i.call(t,Number(e[1]),Number(e[2])-1,Number(e[3]));let o=Number(e[4]||0)-n,s=Number(e[5]||0)-r,c=Number(e[6]||0),l=Math.floor(parseFloat(`0.`+(e[7]||0))*1e3);return a.call(t,o,s,c,l),t}function ky(e){return e instanceof Date&&!isNaN(e.valueOf())}function Ay(e,t){return new T(2100,!1)}var jy=`mediumDate`,My=new vi(``),Ny=new vi(``),Py=(()=>{class e{locale;defaultTimezone;defaultOptions;constructor(e,t,n){this.locale=e,this.defaultTimezone=t,this.defaultOptions=n}transform(t,n,r,i){if(t==null||t===``||t!==t)return null;try{let e=n??this.defaultOptions?.dateFormat??jy,a=r??this.defaultOptions?.timezone??this.defaultTimezone??void 0;return iy(t,e,i||this.locale,a)}catch(t){throw Ay(e,t.message)}}static ɵfac=function(t){return new(t||e)(cm(Z_,16),cm(My,24),cm(Ny,24))};static ɵpipe=Mh({name:`date`,type:e,pure:!0})}return e})(),Fy=(()=>{class e{transform(e){return JSON.stringify(e,null,2)}static ɵfac=function(t){return new(t||e)};static ɵpipe=Mh({name:`json`,type:e,pure:!1})}return e})();function Iy(e,t){t=encodeURIComponent(t);for(let n of e.split(`;`)){let e=n.indexOf(`=`),[r,i]=e==-1?[n,``]:[n.slice(0,e),n.slice(e+1)];if(r.trim()!==t)continue;let a=i;try{a=decodeURIComponent(i)}catch{}return a.length>1&&a[0]===`"`&&a[a.length-1]===`"`&&(a=a.slice(1,-1)),a}return null}var Ly=`browser`,Ry=class{_doc;constructor(e){this._doc=e}manager},zy=(()=>{class e extends Ry{constructor(e){super(e)}supports(e){return!0}addEventListener(e,t,n,r){return e.addEventListener(t,n,r),()=>this.removeEventListener(e,t,n,r)}removeEventListener(e,t,n,r){return e.removeEventListener(t,n,r)}static ɵfac=function(t){return new(t||e)(qi(Cs))};static ɵprov=di({token:e,factory:e.ɵfac})}return e})(),By=new vi(``),Vy=(()=>{class e{_zone;_plugins;_eventNameToPlugin=new Map;constructor(e,t){this._zone=t,e.forEach(e=>{e.manager=this});let n=e.filter(e=>!(e instanceof zy));this._plugins=n.slice().reverse();let r=e.find(e=>e instanceof zy);r&&this._plugins.push(r)}addEventListener(e,t,n,r){return this._findPluginFor(t).addEventListener(e,t,n,r)}getZone(){return this._zone}_findPluginFor(e){let t=this._eventNameToPlugin.get(e);if(t)return t;if(t=this._plugins.find(t=>t.supports(e)),!t)throw new T(-5101,!1);return this._eventNameToPlugin.set(e,t),t}static ɵfac=function(t){return new(t||e)(qi(By),qi(Is))};static ɵprov=di({token:e,factory:e.ɵfac})}return e})(),Hy=`ng-app-id`;function Uy(e){for(let t of e)t.remove()}function Wy(e,t){let n=t.createElement(`style`);return n.textContent=e,n}function Gy(e,t,n,r){let i=e.head?.querySelectorAll(`style[${Hy}="${t}"],link[${Hy}="${t}"]`);if(!i||i.length===0)return!1;for(let e of i)e.removeAttribute(Hy),e instanceof HTMLLinkElement?r.set(e.href.slice(e.href.lastIndexOf(`/`)+1),{usage:0,elements:[e]}):e.textContent&&n.set(e.textContent,{usage:0,elements:[e]});return!0}function Ky(e,t){let n=t.createElement(`link`);return n.setAttribute(`rel`,`stylesheet`),n.setAttribute(`href`,e),n}var qy=(()=>{class e{doc;appId;nonce;inline=new Map;external=new Map;hosts=new Set;constructor(e,t,n,r={}){this.doc=e,this.appId=t,this.nonce=n,Gy(e,t,this.inline,this.external)&&this.hosts.add(e.head)}addStyles(e,t){for(let t of e)this.addUsage(t,this.inline,Wy);t?.forEach(e=>this.addUsage(e,this.external,Ky))}removeStyles(e,t){for(let t of e)this.removeUsage(t,this.inline);t?.forEach(e=>this.removeUsage(e,this.external))}addUsage(e,t,n){let r=t.get(e);r?r.usage++:t.set(e,{usage:1,elements:[...this.hosts].map(t=>this.addElement(t,n(e,this.doc)))})}removeUsage(e,t){let n=t.get(e);n&&(n.usage--,n.usage<=0&&(Uy(n.elements),t.delete(e)))}ngOnDestroy(){for(let[,{elements:e}]of[...this.inline,...this.external])Uy(e);this.hosts.clear()}addHost(e){if(!this.hosts.has(e)){this.hosts.add(e);for(let[t,{elements:n}]of this.inline)n.push(this.addElement(e,Wy(t,this.doc)));for(let[t,{elements:n}]of this.external)n.push(this.addElement(e,Ky(t,this.doc)))}}removeHost(e){this.hosts.delete(e);for(let t of[...this.inline.values(),...this.external.values()]){let n=[];for(let r of t.elements)r.parentNode===e?r.remove():n.push(r);t.elements=n}}addElement(e,t){return this.nonce&&t.setAttribute(`nonce`,this.nonce),e.appendChild(t)}static ɵfac=function(t){return new(t||e)(qi(Cs),qi(Qs),qi(nc,8),qi(tc))};static ɵprov=di({token:e,factory:e.ɵfac})}return e})(),Jy={svg:`http://www.w3.org/2000/svg`,xhtml:`http://www.w3.org/1999/xhtml`,xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`,xmlns:`http://www.w3.org/2000/xmlns/`,math:`http://www.w3.org/1998/Math/MathML`},Yy=/%COMP%/g,Xy=`%COMP%`,Zy=`_nghost-${Xy}`,Qy=`_ngcontent-${Xy}`,$y=!0,eb=new vi(``,{factory:()=>$y}),tb=new vi(``);function nb(e){return Qy.replace(Yy,e)}function rb(e){return Zy.replace(Yy,e)}function ib(e,t){return t.map(t=>t.replace(Yy,e))}var ab=(()=>{class e{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;ngZone;nonce;tracingService;rendererByCompId=new Map;defaultRenderer;cssVarNamespace;constructor(e,t,n,r,i,a,o=null,s=null,c=null){this.eventManager=e,this.sharedStylesHost=t,this.appId=n,this.removeStylesOnCompDestroy=r,this.doc=i,this.ngZone=a,this.nonce=o,this.tracingService=s,this.cssVarNamespace=c??``,this.defaultRenderer=new ob(e,i,a,this.tracingService,this.cssVarNamespace)}createRenderer(e,t){if(!e||!t)return this.defaultRenderer;let n=this.getOrCreateRenderer(e,t);return n instanceof ub?n.applyToHost(e):n instanceof lb&&n.applyStyles(),n}getOrCreateRenderer(e,t){let n=this.rendererByCompId,r=n.get(t.id);if(!r){let i=this.doc,a=this.ngZone,o=this.eventManager,s=this.sharedStylesHost,c=this.removeStylesOnCompDestroy,l=this.tracingService;switch(t.encapsulation){case eu.Emulated:r=new ub(o,s,t,this.appId,c,i,a,l,this.cssVarNamespace);break;case eu.ShadowDom:return new cb(o,e,t,i,a,this.nonce,l,this.cssVarNamespace,s);case eu.ExperimentalIsolatedShadowDom:return new cb(o,e,t,i,a,this.nonce,l,this.cssVarNamespace);default:r=new lb(o,s,t,c,i,a,l,this.cssVarNamespace)}n.set(t.id,r)}return r}ngOnDestroy(){this.rendererByCompId.clear()}componentReplaced(e){this.rendererByCompId.delete(e)}static ɵfac=function(t){return new(t||e)(qi(Vy),qi(om),qi(Qs),qi(eb),qi(Cs),qi(Is),qi(nc),qi(_d,8),qi(tb,8))};static ɵprov=di({token:e,factory:e.ɵfac})}return e})(),ob=class{eventManager;doc;ngZone;tracingService;cssVarNamespace;data=Object.create(null);throwOnSyntheticProps=!0;constructor(e,t,n,r,i=``){this.eventManager=e,this.doc=t,this.ngZone=n,this.tracingService=r,this.cssVarNamespace=i}destroy(){}destroyNode=null;createElement(e,t){return t?this.doc.createElementNS(Jy[t]||t,e):this.doc.createElement(e)}createComment(e){return this.doc.createComment(e)}createText(e){return this.doc.createTextNode(e)}appendChild(e,t){(sb(e)?e.content:e).appendChild(t)}insertBefore(e,t,n){if(e){let r=sb(e)?e.content:e;if(n!=null&&n.parentNode!==r)throw new T(-5106,!1);r.insertBefore(t,n)}}removeChild(e,t){t.remove()}selectRootElement(e,t){let n=typeof e==`string`?this.doc.querySelector(e):e;if(!n)throw new T(-5104,!1);return t||(n.textContent=``),n}parentNode(e){return e.parentNode}nextSibling(e){return e.nextSibling}setAttribute(e,t,n,r){if(r){t=r+`:`+t;let i=Jy[r];i?e.setAttributeNS(i,t,n):e.setAttribute(t,n)}else e.setAttribute(t,n)}removeAttribute(e,t,n){if(n){let r=Jy[n];r?e.removeAttributeNS(r,t):e.removeAttribute(`${n}:${t}`)}else e.removeAttribute(t)}addClass(e,t){e.classList.add(t)}removeClass(e,t){e.classList.remove(t)}setStyle(e,t,n,r){let i=t.startsWith(`--`);i&&(t=t.replace(`%NS%`,this.cssVarNamespace)),i||r&(Lu.DashCase|Lu.Important)?e.style.setProperty(t,n,r&Lu.Important?`important`:``):e.style[t]=n}removeStyle(e,t,n){let r=t.startsWith(`--`);r&&(t=t.replace(`%NS%`,this.cssVarNamespace)),r||n&Lu.DashCase?e.style.removeProperty(t):e.style[t]=``}setProperty(e,t,n){e!=null&&(e[t]=n)}setValue(e,t){e.nodeValue=t}listen(e,t,n,r){if(typeof e==`string`&&(e=Nv().getGlobalEventTarget(this.doc,e),!e))throw new T(-5102,!1);let i=this.decoratePreventDefault(n);return this.tracingService?.wrapEventListener&&(i=this.tracingService.wrapEventListener(e,t,i)),this.eventManager.addEventListener(e,t,i,r)}decoratePreventDefault(e){return t=>{if(t===`__ngUnwrap__`)return e;e(t)===!1&&t.preventDefault()}}};function sb(e){return e.tagName===`TEMPLATE`&&e.content!==void 0}var cb=class extends ob{hostEl;sharedStylesHost;shadowRoot;constructor(e,t,n,r,i,a,o,s,c){super(e,r,i,o,s),this.hostEl=t,this.sharedStylesHost=c,this.shadowRoot=t.attachShadow({mode:`open`}),this.sharedStylesHost&&this.sharedStylesHost.addHost(this.shadowRoot);let l=n.styles;l=ib(n.id,l).map(e=>e.replace(/%NS%/g,s));for(let e of l){let t=document.createElement(`style`);a&&t.setAttribute(`nonce`,a),t.textContent=e,this.shadowRoot.appendChild(t)}let u=n.getExternalStyles?.();if(u)for(let e of u){let t=Ky(e,r);a&&t.setAttribute(`nonce`,a),this.shadowRoot.appendChild(t)}}nodeOrShadowRoot(e){return e===this.hostEl?this.shadowRoot:e}appendChild(e,t){return super.appendChild(this.nodeOrShadowRoot(e),t)}insertBefore(e,t,n){return super.insertBefore(this.nodeOrShadowRoot(e),t,n)}removeChild(e,t){return super.removeChild(null,t)}parentNode(e){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(e)))}destroy(){this.sharedStylesHost&&this.sharedStylesHost.removeHost(this.shadowRoot)}},lb=class extends ob{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;constructor(e,t,n,r,i,a,o,s,c){super(e,i,a,o,s),this.sharedStylesHost=t,this.removeStylesOnCompDestroy=r;let l=n.styles,u=c?ib(c,l):l;this.styles=u.map(e=>e.replace(/%NS%/g,s)),this.styleUrls=n.getExternalStyles?.(c)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&Zu.size===0&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},ub=class extends lb{contentAttr;hostAttr;constructor(e,t,n,r,i,a,o,s,c){let l=r+`-`+n.id;super(e,t,n,i,a,o,s,c,l),this.contentAttr=nb(l),this.hostAttr=rb(l)}applyToHost(e){this.applyStyles(),this.setAttribute(e,this.hostAttr,``)}createElement(e,t){let n=super.createElement(e,t);return super.setAttribute(n,this.contentAttr,``),n}},db=class e extends Fv{supportsDOMEvents=!0;static makeCurrent(){Pv(new e)}onAndCancel(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}dispatchEvent(e,t){e.dispatchEvent(t)}remove(e){e.remove()}createElement(e,t){return t||=this.getDefaultDocument(),t.createElement(e)}createHtmlDocument(){return document.implementation.createHTMLDocument(`fakeTitle`)}getDefaultDocument(){return document}isElementNode(e){return e.nodeType===Node.ELEMENT_NODE}isShadowRoot(e){return e instanceof DocumentFragment}getGlobalEventTarget(e,t){return t===`window`?window:t===`document`?e:t===`body`?e.body:null}getBaseHref(e){let t=pb();return t==null?null:mb(t)}resetBaseElement(){fb=null}getUserAgent(){return window.navigator.userAgent}getCookie(e){return Iy(document.cookie,e)}},fb=null;function pb(){return fb||=document.head.querySelector(`base`),fb?fb.getAttribute(`href`):null}function mb(e){return new URL(e,document.baseURI).pathname}var hb=[`alt`,`control`,`meta`,`shift`],gb={"\b":`Backspace`," ":`Tab`,"":`Delete`,"\x1B":`Escape`,Del:`Delete`,Esc:`Escape`,Left:`ArrowLeft`,Right:`ArrowRight`,Up:`ArrowUp`,Down:`ArrowDown`,Menu:`ContextMenu`,Scroll:`ScrollLock`,Win:`OS`},_b={alt:e=>e.altKey,control:e=>e.ctrlKey,meta:e=>e.metaKey,shift:e=>e.shiftKey},vb=(()=>{class e extends Ry{constructor(e){super(e)}supports(t){return e.parseEventName(t)!=null}addEventListener(t,n,r,i){let a=e.parseEventName(n),o=e.eventCallback(a.fullKey,r,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>Nv().onAndCancel(t,a.domEventName,o,i))}static parseEventName(t){let n=t.toLowerCase().split(`.`),r=n.shift();if(n.length===0||r!==`keydown`&&r!==`keyup`)return null;let i=e._normalizeKey(n.pop()),a=``,o=n.indexOf(`code`);if(o>-1&&(n.splice(o,1),a=`code.`),hb.forEach(e=>{let t=n.indexOf(e);t>-1&&(n.splice(t,1),a+=e+`.`)}),a+=i,n.length!=0||i.length===0)return null;let s={};return s.domEventName=r,s.fullKey=a,s}static matchEventFullKeyCode(e,t){let n=gb[e.key]||e.key,r=``;return t.indexOf(`code.`)>-1&&(n=e.code,r=`code.`),n==null||!n?!1:(n=n.toLowerCase(),n===` `?n=`space`:n===`.`&&(n=`dot`),hb.forEach(t=>{if(t!==n){let n=_b[t];n(e)&&(r+=t+`.`)}}),r+=n,r===t)}static eventCallback(t,n,r){return i=>{e.matchEventFullKeyCode(i,t)&&r.runGuarded(()=>n(i))}}static _normalizeKey(e){return e===`esc`?`escape`:e}static ɵfac=function(t){return new(t||e)(qi(Cs))};static ɵprov=di({token:e,factory:e.ɵfac})}return e})();async function yb(e,t,n){return Ev({rootComponent:e,...bb(t,n)})}function bb(e,t){return{platformRef:t?.platformRef,appProviders:[...Tb,...e?.providers??[]],platformProviders:wb}}function xb(){db.makeCurrent()}function Sb(){return new Js}function Cb(){return Hl(document),document}var wb=[{provide:tc,useValue:Ly},{provide:ec,useValue:xb,multi:!0},{provide:Cs,useFactory:Cb}],Tb=[{provide:Ta,useValue:`root`},{provide:Js,useFactory:Sb},{provide:By,useClass:zy,multi:!0},{provide:By,useClass:vb,multi:!0},ab,{provide:om,useClass:qy},{provide:qy,useExisting:om},Vy,{provide:Vp,useExisting:ab},[]];function Eb(e,t){let n=`\x1B[${e}m`,r=`\x1B[${t}m`;return((e,...t)=>{if(Array.isArray(e)&&`raw`in e){let i=e,a=``;for(let e=0;e{let r=new Ab({code:i,why:Ob(a.why,e),fix:Ob(a.fix,e),docs:o,cause:e.cause,sources:e.sources,data:Ob(a.data,e)},s);for(let e of t)e(r,n);return r};n[i]=s}return n}function Nb(e){return t=>{let n=`${e.bold(e.red(`[${t.name}]`))} ${t.message}`,r=[];return t.fix&&r.push(`${e.dim(`fix:`)} ${t.fix}`),t.sources?.length&&r.push(`${e.dim(`sources:`)} ${t.sources.join(`, `)}`),t.docs&&r.push(`${e.dim(`see:`)} ${e.cyan(t.docs)}`),r.length===0?n:[n,...r.map((t,n)=>`${e.dim(n{e=n,t=r}),resolve:e,reject:t}}var zb=Math.random.bind(Math),Bb=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`;function Vb(e=21){let t=``,n=e;for(;n--;)t+=Bb[zb()*64|0];return t}var Hb=6e4,Ub=e=>e,Wb=Ub,{clearTimeout:Gb,setTimeout:Kb}=globalThis;function qb(e,t){let{post:n,on:r,off:i=()=>{},eventNames:a=[],serialize:o=Ub,deserialize:s=Wb,resolver:c,bind:l=`rpc`,timeout:u=Hb,proxify:d=!0}=t,f=!1,p=new Map,m,h;async function g(e,r,i,a){if(f)throw Error(`[birpc] rpc is closed, cannot call "${e}"`);let s={m:e,a:r,t:`q`};a&&(s.o=!0);let c=async e=>n(o(e));if(i){await c(s);return}if(m)try{await m}finally{m=void 0}let{promise:l,resolve:d,reject:g}=Rb(),_=Vb();s.i=_;let ee;async function v(n=s){return u>=0&&(ee=Kb(()=>{try{if(t.onTimeoutError?.call(h,e,r)!==!0)throw Error(`[birpc] timeout on calling "${e}"`)}catch(e){g(e)}p.delete(_)},u),typeof ee==`object`&&(ee=ee.unref?.())),p.set(_,{resolve:d,reject:g,timeoutId:ee,method:e}),await c(n),l}try{t.onRequest?await t.onRequest.call(h,s,v,d):await v()}catch(e){if(t.onGeneralError?.call(h,e)!==!0)throw e;return}finally{Gb(ee),p.delete(_)}return l}let _={$call:(e,...t)=>g(e,t,!1),$callOptional:(e,...t)=>g(e,t,!1,!0),$callEvent:(e,...t)=>g(e,t,!0),$callRaw:e=>g(e.method,e.args,e.event,e.optional),$rejectPendingCalls:v,get $closed(){return f},get $meta(){return t.meta},$close:ee,$functions:e};h=d?new Proxy({},{get(t,n){if(Object.hasOwn(_,n))return _[n];if(n===`then`&&!a.includes(`then`)&&!(`then`in e))return;let r=(...e)=>g(n,e,!0);if(a.includes(n))return r.asEvent=r,r;let i=(...e)=>g(n,e,!1);return i.asEvent=r,i}}):_;function ee(e){f=!0,p.forEach(({reject:t,method:n})=>{let r=Error(`[birpc] rpc is closed, cannot call "${n}"`);if(e)return e.cause??=r,t(e);t(r)}),p.clear(),i(te)}function v(e){let t=Array.from(p.values()).map(({method:t,reject:n})=>e?e({method:t,reject:n}):n(Error(`[birpc]: rejected pending call "${t}".`)));return p.clear(),t}async function te(r,...i){let a;try{a=s(r)}catch(e){if(t.onGeneralError?.call(h,e)!==!0)throw e;return}if(a.t===`q`){let{m:r,a:s,o:u}=a,d,f,p=await(c?c.call(h,r,e[r]):e[r]);if(u&&(p||=()=>void 0),!p)f=Error(`[birpc] function "${r}" not found`);else try{d=await p.apply(l===`rpc`?h:e,s)}catch(e){f=e}if(a.i){if(f&&t.onFunctionError&&t.onFunctionError.call(h,f,r,s)===!0)return;if(!f)try{await n(o({t:`s`,i:a.i,r:d}),...i);return}catch(e){if(f=e,t.onGeneralError?.call(h,e,r,s)!==!0)throw e}try{await n(o({t:`s`,i:a.i,e:f}),...i)}catch(e){if(t.onGeneralError?.call(h,e,r,s)!==!0)throw e}}}else{let{i:e,r:t,e:n}=a,r=p.get(e);r&&(Gb(r.timeoutId),n?r.reject(n):r.resolve(t)),p.delete(e)}}return m=r(te),h}function Jb(e,t){return t.safety?t.safety:e===`static`||e===`query`||e==null?`read`:`action`}var Yb=Object.freeze({type:`object`,additionalProperties:!0});function Xb(e){let t=e[`~standard`];if(t.jsonSchema)try{return t.jsonSchema.input({target:`draft-2020-12`})}catch{return Yb}return Yb}function Zb(e){if(!e||e.length===0)return{type:`object`,properties:{}};let t={},n=[];for(let r=0;rn[`arg${t}`]);if(`arg0`in n){let e=[];for(;`arg${e.length}`in n;)e.push(n[`arg${e.length}`]);return e}return Object.keys(n).length===0?[]:void 0}function $b(e,t){return Qb(e,t)??[e]}function ex(e){return typeof e==`string`?`'${e}'`:new ix().serialize(e)}var tx=` _-,;:!?.'"()[]{}@*/\\&#%\`^+<=>|~$0123456789abcdefghijklmnopqrstuvwxyz`,nx=(function(){let e=new Uint8Array(128);for(let t=0;t<69;t++)e[tx.charCodeAt(t)]=t+1;for(let t=65;t<=90;t++)e[t]=e[t+32];return e})();function rx(e,t){if(e===t)return 0;let n=Math.min(e.length,t.length),r=0;for(let i=0;ia?-1:1)}return e.length===t.length?r:e.lengththis.compare(e[0],t[0])),r=`${e}{`;for(let e=0;ethis.compare(e,t)))}`}$Map(e){return this.serializeObjectEntries(`Map`,e.entries())}}for(let t of[`Error`,`RegExp`,`URL`])e.prototype[`$`+t]=function(e){return`${t}(${e})`};for(let t of[`Int8Array`,`Uint8Array`,`Uint8ClampedArray`,`Int16Array`,`Uint16Array`,`Int32Array`,`Uint32Array`,`Float32Array`,`Float64Array`])e.prototype[`$`+t]=function(e){return`${t}[${e.join(`,`)}]`};for(let t of[`BigInt64Array`,`BigUint64Array`])e.prototype[`$`+t]=function(e){return`${t}[${e.join(`n,`)}${e.length>0?`n`:``}]`};return e})(),ax=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225],ox=[1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998],sx=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_`,cx=[],lx=class{_data=new ux;_hash=new ux([...ax]);_nDataBytes=0;_minBufferSize=0;finalize(e){e&&this._append(e);let t=this._nDataBytes*8,n=this._data.sigBytes*8;return this._data.words[n>>>5]|=128<<24-n%32,this._data.words[(n+64>>>9<<4)+14]=Math.floor(t/4294967296),this._data.words[(n+64>>>9<<4)+15]=t,this._data.sigBytes=this._data.words.length*4,this._process(),this._hash}_doProcessBlock(e,t){let n=this._hash.words,r=n[0],i=n[1],a=n[2],o=n[3],s=n[4],c=n[5],l=n[6],u=n[7];for(let n=0;n<64;n++){if(n<16)cx[n]=e[t+n]|0;else{let e=cx[n-15],t=(e<<25|e>>>7)^(e<<14|e>>>18)^e>>>3,r=cx[n-2],i=(r<<15|r>>>17)^(r<<13|r>>>19)^r>>>10;cx[n]=t+cx[n-7]+i+cx[n-16]}let d=s&c^~s&l,f=r&i^r&a^i&a,p=(r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22),m=(s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25),h=u+m+d+ox[n]+cx[n],g=p+f;u=l,l=c,c=s,s=o+h|0,o=a,a=i,i=r,r=h+g|0}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+a|0,n[3]=n[3]+o|0,n[4]=n[4]+s|0,n[5]=n[5]+c|0,n[6]=n[6]+l|0,n[7]=n[7]+u|0}_append(e){typeof e==`string`&&(e=ux.fromUtf8(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes}_process(e){let t,n=this._data.sigBytes/64;n=e?Math.ceil(n):Math.max((n|0)-this._minBufferSize,0);let r=n*16,i=Math.min(r*4,this._data.sigBytes);if(r){for(let e=0;e>>2]|=(n.charCodeAt(e)&255)<<24-e%4*8;return new e(i,r)}toBase64(){let e=[];for(let t=0;t>>2]>>>24-t%4*8&255,r=this.words[t+1>>>2]>>>24-(t+1)%4*8&255,i=this.words[t+2>>>2]>>>24-(t+2)%4*8&255,a=n<<16|r<<8|i;for(let n=0;n<4&&t*8+n*6>>6*(3-n)&63))}return e.join(``)}concat(e){if(this.words[this.sigBytes>>>2]&=4294967295<<32-this.sigBytes%4*8,this.words.length=Math.ceil(this.sigBytes/4),this.sigBytes%4)for(let t=0;t>>2]>>>24-t%4*8&255;this.words[this.sigBytes+t>>>2]|=n<<24-(this.sigBytes+t)%4*8}else for(let t=0;t>>2]=e.words[t>>>2];this.sigBytes+=e.sigBytes}};function dx(e){return new lx().finalize(e).toBase64()}function fx(e){return dx(ex(e))}function px(e){return fx(e)}function mx(){let e={};function t(t,...n){let r=e[t]||[];for(let e=0,t=r.length;e{e[t]=e[t]?.filter(e=>n!==e)}}function i(e,t){let n=r(e,((...e)=>(n(),t(...e))));return n}return{_listeners:e,emit:t,emitOnce:n,on:r,once:i}}var hx=/^[\w+.-]{2,}:\/\//;function gx(e){return e.endsWith(`/`)?e:`${e}/`}function _x(e){return(e.endsWith(`/`)?e.slice(0,-1):e)||`/`}function vx(e,...t){let n=e;for(let e of t)e&&e!==`/`&&(n=n?gx(n)+e.replace(/^\.?\//,``):e);return n}function yx(e,t){if(!t||t===`/`||hx.test(e))return e;let n=_x(t);return e.startsWith(n)?e:vx(n,e)}function bx(e,t){let n=e.match(hx);return t+(n?e.slice(n[0].length):e)}var xx=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`;function Sx(e=21){let t=``,n=e;for(;n--;)t+=xx[Math.random()*64|0];return t}var Cx=Symbol.for(`immer-nothing`),wx=Symbol.for(`immer-draftable`),Tx=Symbol.for(`immer-state`),Ex=[function(e){return`The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`},function(e){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${e}'`},`This object has been frozen and should not be mutated`,function(e){return`Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? `+e},`An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.`,`Immer forbids circular references`,"The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(e){return`'current' expects a draft, got: ${e}`},`Object.defineProperty() cannot be used on an Immer draft`,`Object.setPrototypeOf() cannot be used on an Immer draft`,`Immer only supports deleting array indices`,`Immer only supports setting array indices and the 'length' property`,function(e){return`'original' expects a draft, got: ${e}`}];function Dx(e,...t){{let n=Ex[e],r=Zx(n)?n.apply(null,t):n;throw Error(`[Immer] ${r}`)}}var Ox=Object,kx=Ox.getPrototypeOf,Ax=`constructor`,jx=`prototype`,Mx=`configurable`,Nx=`enumerable`,Px=`writable`,Fx=`value`,Ix=e=>!!e&&!!e[Tx];function Lx(e){return e?Bx(e)||qx(e)||!!e[wx]||!!e[Ax]?.[wx]||Jx(e)||Yx(e):!1}var Rx=Ox[jx][Ax].toString(),zx=new WeakMap;function Bx(e){if(!e||!Xx(e))return!1;let t=kx(e);if(t===null||t===Ox[jx])return!0;let n=Ox.hasOwnProperty.call(t,Ax)&&t[Ax];if(n===Object)return!0;if(!Zx(n))return!1;let r=zx.get(n);return r===void 0&&(r=Function.toString.call(n),zx.set(n,r)),r===Rx}function Vx(e,t,n=!0){Hx(e)===0?(n?Reflect.ownKeys(e):Ox.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Hx(e){let t=e[Tx];return t?t.type_:qx(e)?1:Jx(e)?2:Yx(e)?3:0}var Ux=(e,t,n=Hx(e))=>n===2?e.has(t):Ox[jx].hasOwnProperty.call(e,t),Wx=(e,t,n=Hx(e))=>n===2?e.get(t):e[t],Gx=(e,t,n,r=Hx(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n};function Kx(e,t){return e===t?e!==0||1/e==1/t:e!==e&&t!==t}var qx=Array.isArray,Jx=e=>e instanceof Map,Yx=e=>e instanceof Set,Xx=e=>typeof e==`object`,Zx=e=>typeof e==`function`,Qx=e=>typeof e==`boolean`;function $x(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var eS=e=>Xx(e)?e?.[Tx]:null,tS=e=>e.copy_||e.base_,nS=e=>e.modified_?e.copy_:e.base_;function rS(e,t){if(Jx(e))return new Map(e);if(Yx(e))return new Set(e);if(qx(e))return Array[jx].slice.call(e);let n=Bx(e);if(t===!0||t===`class_only`&&!n){let t=Ox.getOwnPropertyDescriptors(e);delete t[Tx];let n=Reflect.ownKeys(t);for(let r=0;r1&&Ox.defineProperties(e,{set:oS,add:oS,clear:oS,delete:oS}),Ox.freeze(e),t&&Vx(e,(e,t)=>{iS(t,!0)},!1),e)}function aS(){Dx(2)}var oS={[Fx]:aS};function sS(e){return e===null||!Xx(e)||Ox.isFrozen(e)}var cS=`MapSet`,lS=`Patches`,uS=`ArrayMethods`,dS={};function fS(e){let t=dS[e];return t||Dx(0,e),t}var pS=e=>!!dS[e];function mS(e,t){dS[e]||(dS[e]=t)}var hS,gS=()=>hS,_S=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:pS(cS)?fS(cS):void 0,arrayMethodsPlugin_:pS(uS)?fS(uS):void 0});function vS(e,t){t&&(e.patchPlugin_=fS(lS),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function yS(e){bS(e),e.drafts_.forEach(SS),e.drafts_=null}function bS(e){e===hS&&(hS=e.parent_)}var xS=e=>hS=_S(hS,e);function SS(e){let t=e[Tx];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function CS(e,t){t.unfinalizedDrafts_=t.drafts_.length;let n=t.drafts_[0];if(e!==void 0&&e!==n){n[Tx].modified_&&(yS(t),Dx(4)),Lx(e)&&(e=wS(t,e));let{patchPlugin_:r}=t;r&&r.generateReplacementPatches_(n[Tx].base_,e,t)}else e=wS(t,n);return TS(t,e,!0),yS(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e===Cx?void 0:e}function wS(e,t){if(sS(t))return t;let n=t[Tx];if(!n)return NS(t,e.handledSet_,e);if(!DS(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){let{callbacks_:t}=n;if(t)for(;t.length>0;)t.pop()(e);jS(n,e)}return n.copy_}function TS(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&iS(t,n)}function ES(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var DS=(e,t)=>e.scope_===t,OS=[];function kS(e,t,n,r){let i=tS(e),a=e.type_;if(r!==void 0&&Wx(i,r,a)===t){Gx(i,r,n,a);return}if(!e.draftLocations_){let t=e.draftLocations_=new Map;Vx(i,(e,n)=>{if(Ix(n)){let r=t.get(n)||[];r.push(e),t.set(n,r)}})}let o=e.draftLocations_.get(t)??OS;for(let e of o)Gx(i,e,n,a)}function AS(e,t,n){e.callbacks_.push(function(r){let i=t;if(!i||!DS(i,r))return;r.mapSetPlugin_?.fixSetContents(i);let a=nS(i);kS(e,i.draft_??i,a,n),jS(i,r)})}function jS(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){let{patchPlugin_:n}=t;if(n){let r=n.getPath(e);r&&n.generatePatches_(e,r,t)}ES(e)}}function MS(e,t,n){let{scope_:r}=e;if(Ix(n)){let i=n[Tx];DS(i,r)&&i.callbacks_.push(function(){HS(e),kS(e,n,nS(i),t)})}else Lx(n)&&e.callbacks_.push(function(){let i=tS(e);e.type_===3?i.has(n)&&NS(n,r.handledSet_,r):Wx(i,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&NS(Wx(e.copy_,t,e.type_),r.handledSet_,r)})}function NS(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||Ix(e)||t.has(e)||!Lx(e)||sS(e)?e:(t.add(e),Vx(e,(r,i)=>{if(Ix(i)){let t=i[Tx];DS(t,n)&&(Gx(e,r,nS(t),e.type_),ES(t))}else Lx(i)&&NS(i,t,n)}),e)}function PS(e,t){let n=qx(e),r={type_:+!!n,scope_:t?t.scope_:gS(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},i=r,a=FS;n&&(i=[r],a=IS);let{revoke:o,proxy:s}=Proxy.revocable(i,a);return r.draft_=s,r.revoke_=o,[s,r]}var FS={get(e,t){if(t===Tx)return e;let n=e.scope_.arrayMethodsPlugin_,r=e.type_===1&&typeof t==`string`;if(r&&n?.isArrayOperationMethod(t))return n.createMethodInterceptor(e,t);let i=tS(e);if(!Ux(i,t,e.type_))return zS(e,i,t);let a=i[t];if(e.finalized_||!Lx(a)||r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&$x(t))return a;if(a===LS(e.base_,t)||RS(e,t,a)){HS(e);let n=e.type_===1?+t:t,r=WS(e.scope_,a,e,n);return e.copy_[n]=r}return a},has(e,t){return t in tS(e)},ownKeys(e){return Reflect.ownKeys(tS(e))},set(e,t,n){let r=BS(tS(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){let r=LS(tS(e),t),i=r?.[Tx];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_.set(t,!1),!0;if(Kx(n,r)&&(n!==void 0||Ux(e.base_,t,e.type_)))return!0;HS(e),VS(e)}return e.copy_[t]===n&&(n!==void 0||Ux(e.copy_,t,e.type_))||Number.isNaN(n)&&Number.isNaN(e.copy_[t])?!0:(e.copy_[t]=n,e.assigned_.set(t,!0),MS(e,t,n),!0)},deleteProperty(e,t){return HS(e),LS(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),VS(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let n=tS(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[Px]:!0,[Mx]:e.type_!==1||t!==`length`,[Nx]:r[Nx],[Fx]:n[t]}},defineProperty(){Dx(11)},getPrototypeOf(e){return kx(e.base_)},setPrototypeOf(){Dx(12)}},IS={};for(let e in FS){let t=FS[e];IS[e]=function(){let e=arguments;return e[0]=e[0][0],t.apply(this,e)}}IS.deleteProperty=function(e,t){return isNaN(parseInt(t))&&Dx(13),IS.set.call(this,e,t,void 0)},IS.set=function(e,t,n){return t!==`length`&&isNaN(parseInt(t))&&Dx(14),FS.set.call(this,e[0],t,n,e[0])};function LS(e,t){let n=e[Tx];return(n?tS(n):e)[t]}function RS(e,t,n){return e.type_!==1||!e.allIndicesReassigned_||e.assigned_?.get(t)||!Lx(n)||n[Tx]?!1:e.baseRefs_.has(n)}function zS(e,t,n){let r=BS(t,n);return r?Fx in r?r[Fx]:r.get?.call(e.draft_):void 0}function BS(e,t){if(!(t in e))return;let n=kx(e);for(;n;){let e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=kx(n)}}function VS(e){e.modified_||(e.modified_=!0,e.parent_&&VS(e.parent_))}function HS(e){e.copy_||=(e.assigned_=new Map,rS(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var US=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,n)=>{if(Zx(e)&&!Zx(t)){let n=t;t=e;let r=this;return function(e=n,...i){return r.produce(e,e=>t.call(this,e,...i))}}Zx(t)||Dx(6),n!==void 0&&!Zx(n)&&Dx(7);let r;if(Lx(e)){let i=xS(this),a=WS(i,e,void 0),o=!0;try{r=t(a),o=!1}finally{o?yS(i):bS(i)}return vS(i,n),CS(r,i)}if(!e||!Xx(e)){if(r=t(e),r===void 0&&(r=e),r===Cx&&(r=void 0),this.autoFreeze_&&iS(r,!0),n){let t=[],i=[];fS(lS).generateReplacementPatches_(e,r,{patches_:t,inversePatches_:i}),n(t,i)}return r}Dx(1,e)},this.produceWithPatches=(e,t)=>{if(Zx(e))return(t,...n)=>this.produceWithPatches(t,t=>e(t,...n));let n,r;return[this.produce(e,t,(e,t)=>{n=e,r=t}),n,r]},Qx(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),Qx(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),Qx(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){Lx(e)||Dx(8),Ix(e)&&(e=GS(e));let t=xS(this),n=WS(t,e,void 0);return n[Tx].isManual_=!0,bS(t),n}finishDraft(e,t){let n=e&&e[Tx];(!n||!n.isManual_)&&Dx(9);let{scope_:r}=n;return vS(r,t),CS(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){let r=t[n];if(r.path.length===0&&r.op===`replace`){e=r.value;break}}n>-1&&(t=t.slice(n+1));let r=fS(lS).applyPatches_;return Ix(e)?r(e,t):this.produce(e,e=>r(e,t))}};function WS(e,t,n,r){let[i,a]=Jx(t)?fS(cS).proxyMap_(t,n):Yx(t)?fS(cS).proxySet_(t,n):PS(t,n);return(n?.scope_??gS()).drafts_.push(i),a.callbacks_=n?.callbacks_??[],a.key_=r,n&&r!==void 0?AS(n,a,r):a.callbacks_.push(function(e){e.mapSetPlugin_?.fixSetContents(a);let{patchPlugin_:t}=e;a.modified_&&t&&t.generatePatches_(a,[],e)}),i}function GS(e){return Ix(e)||Dx(10,e),KS(e)}function KS(e){if(!Lx(e)||sS(e))return e;let t=e[Tx],n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=rS(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=rS(e,!0);return Vx(n,(e,t)=>{Gx(n,e,KS(t))},r),t&&(t.finalized_=!1),n}function qS(){Ex.push(`Sets cannot have "replace" patches.`,function(e){return`Unsupported patch operation: `+e},function(e){return`Cannot apply patch, path doesn't resolve: `+e},`Patching reserved attributes like __proto__, prototype and constructor is not allowed`);function e(n,r=[]){if(n.key_!==void 0){let e=n.parent_.copy_??n.parent_.base_,t=eS(Wx(e,n.key_)),i=Wx(e,n.key_);if(i===void 0||i!==n.draft_&&i!==n.base_&&i!==n.copy_||t!=null&&t.base_!==n.base_)return null;let a=n.parent_.type_===3,o;if(a){let e=n.parent_;o=Array.from(e.drafts_.keys()).indexOf(n.key_)}else o=n.key_;if(!(a&&e.size>o||Ux(e,o)))return null;r.push(o)}if(n.parent_)return e(n.parent_,r);r.reverse();try{t(n.copy_,r)}catch{return null}return r}function t(e,t){let n=e;for(let e=0;e{let u=Wx(o,e,c),f=Wx(s,e,c),p=l?Ux(o,e)?n:`add`:r;if(u===f&&p===n)return;let m=t.concat(e);i.push(p===r?{op:p,path:m}:{op:p,path:m,value:d(f)}),a.push(p===`add`?{op:r,path:m}:p===r?{op:`add`,path:m,value:d(u)}:{op:n,path:m,value:d(u)})})}function s(e,t,n,i){let{base_:a,copy_:o}=e,s=0;a.forEach(e=>{if(!o.has(e)){let a=t.concat([s]);n.push({op:r,path:a,value:e}),i.unshift({op:`add`,path:a,value:e})}s++}),s=0,o.forEach(e=>{if(!a.has(e)){let a=t.concat([s]);n.push({op:`add`,path:a,value:e}),i.unshift({op:r,path:a,value:e})}s++})}function c(e,t,r){let{patches_:i,inversePatches_:a}=r;i.push({op:n,path:[],value:t===Cx?void 0:t}),a.push({op:n,path:[],value:e})}function l(e,t){return t.forEach(t=>{let{path:i,op:a}=t,o=e;for(let e=0;e[e,u(t)]));if(Yx(e))return new Set(Array.from(e).map(u));let t=Object.create(kx(e));for(let n in e)t[n]=u(e[n]);return Ux(e,wx)&&(t[wx]=e[wx]),t}function d(e){return Ix(e)?u(e):e}mS(lS,{applyPatches_:l,generatePatches_:i,generateReplacementPatches_:c,getPath:e})}globalThis.Iterator?.from;var JS=new US,YS=JS.produce,XS=JS.produceWithPatches.bind(JS),ZS=JS.applyPatches.bind(JS),QS=1e3;function $S(e,t){if(e.add(t),e.size>QS){let t=e.values().next().value;t!==void 0&&e.delete(t)}}function eC(e){let{enablePatches:t=!1}=e;t&&qS();let n=mx(),r=e.initialValue,i=new Set;return{on:n.on,value:()=>r,patch:(e,t=Sx())=>{i.has(t)||(qS(),r=ZS(r,e),$S(i,t),n.emit(`updated`,r,void 0,t))},mutate:(e,a=Sx())=>{if(!i.has(a)){if($S(i,a),t){let[t,i]=XS(r,e);if(t===r)return;r=t,n.emit(`updated`,r,i,a)}else{let t=YS(r,e);if(t===r)return;r=t,n.emit(`updated`,r,void 0,a)}}},syncIds:i}}var tC=typeof self==`object`?self:globalThis,nC=new Set([`Error`,`EvalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`,`AggregateError`]),rC=new Set([`Boolean`,`Number`,`String`,`Int8Array`,`Uint8Array`,`Uint8ClampedArray`,`Int16Array`,`Uint16Array`,`Int32Array`,`Uint32Array`,`Float16Array`,`Float32Array`,`Float64Array`,`BigInt64Array`,`BigUint64Array`]);function iC(e,t){let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o)e[r(t)]=r(n);return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o,r=nC.has(e)?tC[e]:void 0;return n(new(r??tC.Error)(t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}}if(typeof a==`string`&&rC.has(a))return n(new tC[a](o),i);throw TypeError(`unable to deserialize unsafe or unknown type: ${String(a)}`)};return r}function aC(e){return iC(new Map,e)(0)}var oC=``,{toString:sC}={},{keys:cC}=Object;function lC(e){let t=typeof e;if(t!==`object`||!e)return[0,t];let n=sC.call(e).slice(8,-1);switch(n){case`Array`:return[1,oC];case`Object`:return[2,oC];case`Date`:return[3,oC];case`RegExp`:return[4,oC];case`Map`:return[5,oC];case`Set`:return[6,oC];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:n.includes(`Error`)?[7,n]:[2,n]}function uC([e,t]){return e===0&&(t===`function`||t===`symbol`)}function dC(e,t,n,r){let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=r=>{if(n.has(r))return n.get(r);let[o,s]=lC(r);switch(o){case 0:{let t=r;switch(s){case`bigint`:o=8,t=r.toString();break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize ${s}`);t=null;break;case`undefined`:return i([-1],r)}return i([o,t],r)}case 1:{if(s){let e=r;return s===`DataView`?e=new Uint8Array(r.buffer):s===`ArrayBuffer`&&(e=new Uint8Array(r)),i([s,[...e]],r)}let e=[],t=i([o,e],r);for(let t of r)e.push(a(t));return t}case 2:{if(s)switch(s){case`BigInt`:return i([s,r.toString()],r);case`Boolean`:case`Number`:case`String`:return i([s,r.valueOf()],r)}if(t&&`toJSON`in r)return a(r.toJSON());let n=[],c=i([o,n],r);for(let t of cC(r))(e||!uC(lC(r[t])))&&n.push([a(t),a(r[t])]);return c}case 3:return i([o,r.toISOString()],r);case 4:{let{source:e,flags:t}=r;return i([o,{source:e,flags:t}],r)}case 5:{let t=[],n=i([o,t],r);for(let[n,i]of r)(e||!(uC(lC(n))||uC(lC(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!uC(lC(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a}function fC(e,t={}){let n=[];return dC(!(t.json||t.lossy),!!t.json,new Map,n)(e),n}var{parse:pC,stringify:mC}=JSON,hC={json:!0,lossy:!0};function gC(e){return aC(pC(e))}function _C(e){return mC(fC(e,hC))}function vC(e){return aC(e)}function yC(e){return _C(e)}function bC(e){return gC(e)}var xC=256,SC=class extends Error{name=`StreamClosedError`};function CC(e={}){let t=e.id??Sx(),n=Math.max(0,e.replayWindow??0),r=mx(),i=new AbortController,a=[],o=!1,s=0;function c(e){if(o)throw new SC(`Cannot write to a closed stream "${t}"`);s+=1,n>0&&(a.push({seq:s,chunk:e}),a.length>n&&(a.length-n===1?a.shift():a.splice(0,a.length-n))),r.emit(`chunk`,s,e)}function l(e){if(o)return;o=!0;let t=TC(e);i.abort(e),r.emit(`end`,t)}function u(){o||(o=!0,i.signal.aborted||i.abort(`stream closed`),r.emit(`end`,void 0))}function d(e){o||i.signal.aborted||i.abort(e??`aborted`)}let f=new WritableStream({write(e){c(e)},close(){u()},abort(e){l(e)}});return{id:t,signal:i.signal,get closed(){return o},get lastSeq(){return s},write:c,error:l,close:u,abort:d,writable:f,events:r,buffer:a}}function wC(e={}){let t=e.id??Sx(),n=Math.max(1,e.highWaterMark??xC),r=[],i=0,a=!1,o=!1,s,c,l,u;function d(){if(c){if(r.length>0){let e=r.shift(),t=c;c=void 0,t.resolve({value:e,done:!1});return}if(a){let e=c;if(c=void 0,s){let t=Error(s.message);t.name=s.name,e.reject(t)}else e.resolve({value:void 0,done:!0})}}}function f(){if(l){for(;r.length>0;){let e=r.shift();try{l.enqueue(e)}catch{break}}if(a&&l){try{if(s){let e=Error(s.message);e.name=s.name,l.error(e)}else l.close()}catch{}l=void 0}}}function p(t,s){if(!(a||o)&&!(t<=i)){if(i=t,r.push(s),r.length>n){let t=r.length-n;r.splice(0,t),e.onOverflow?.(t)}d(),u&&f()}}function m(e){a||(a=!0,s=e,d(),u&&f())}function h(){o||a||(o=!0,e.onCancel?.(),m(void 0))}function g(){return u||(u=new ReadableStream({start(e){l=e,f()},cancel(){h()}}),u)}return{id:t,get cancelled(){return o},get done(){return a},get lastSeenSeq(){return i},get readable(){return g()},cancel:h,_push:p,_end:m,[Symbol.asyncIterator](){return{next(){if(r.length>0)return Promise.resolve({value:r.shift(),done:!1});if(a){if(s){let e=Error(s.message);return e.name=s.name,Promise.reject(e)}return Promise.resolve({value:void 0,done:!0})}return new Promise((e,t)=>{c={resolve:e,reject:t}})},return(){return h(),Promise.resolve({value:void 0,done:!0})}}}}}function TC(e){if(e instanceof Error)return{name:e.name||`Error`,message:e.message};if(typeof e==`string`)return{name:`Error`,message:e};try{return{name:`Error`,message:JSON.stringify(e)}}catch{return{name:`Error`,message:String(e)}}}var EC=128;function DC(e){return e.replace(/[^\w-]+/g,`_`).slice(0,EC)}var OC=`modulepreload`,kC=function(e,t){return new URL(e,t).href},AC={},jC=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=kC(t,n),t=s(t),t in AC)return;AC[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:OC,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}).filter(e=>e!==void 0))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},MC=`__connection.json`,NC=`__DEVFRAME_CONNECTION__`,PC=`x-birpc-session`,FC=`__rpc-dump/index.json`,IC=`devframe:services`,LC=`devframe_otp`,RC=`devframe_auth_token`;Pb.postMessage.remoteAssetsError;var zC=class{cacheMap=new Map;options;keySerializer;constructor(e){this.options=e,this.keySerializer=e.keySerializer||(e=>px(e))}updateOptions(e){this.options={...this.options,...e}}cached(e,t){let n=this.cacheMap.get(e);if(n)return n.get(this.keySerializer(t))}has(e,t){return this.cacheMap.get(e)?.has(this.keySerializer(t))??!1}apply(e,t){let n=this.cacheMap.get(e.m)||new Map;n.set(this.keySerializer(e.a),t),this.cacheMap.set(e.m,n)}validate(e){return this.options.functions.includes(e)}clear(e){e?this.cacheMap.delete(e):this.cacheMap.clear()}},BC=Lb({docsBase:`https://devfra.me/errors`,codes:{DF0019:{why:e=>`RPC function "${e.name}" has \`agent\` set but \`jsonSerializable\` is \`false\`; MCP requires JSON-serializable data.`,fix:"Remove `jsonSerializable: false`, or remove `agent` to keep it RPC-only."},DF0020:{why:e=>`RPC function "${e.name}" declares \`jsonSerializable: true\` but the value at "${e.path}" is a ${e.type}.`,fix:"Either drop `jsonSerializable: true` (falls back to structured-clone) or change the value to a JSON-safe shape."},DF0021:{why:e=>`RPC function "${e.name}" is already registered`,fix:"Use the `force` parameter to overwrite an existing registration."},DF0022:{why:e=>`RPC function "${e.name}" is not registered. Use register() to add new functions.`},DF0023:{why:e=>`RPC function "${e.name}" is not registered`},DF0024:{why:e=>`Either handler or setup function must be provided for RPC function "${e.name}"`},DF0025:{why:e=>`Function "${e.name}" not found in dump store`},DF0026:{why:e=>`No dump match for "${e.name}" with args: ${e.args}`},DF0027:{why:e=>`Function "${e.name}" with type "${e.type}" cannot have dump configuration. Only "static" and "query" types support dumps.`},DF0028:{why:e=>`Function "${e.name}" with type "${e.type}" cannot use \`snapshot: true\`. Only "query" functions support this sugar; "static" functions have equivalent default behavior already.`,fix:"Remove `snapshot: true`, or change the function type to `query`."},DF0043:{why:e=>`RPC function "${e.name}" received an invalid argument at position ${e.index}: ${e.issues}`,fix:"Pass a value that satisfies the `args` schema declared for this function."},DF0044:{why:e=>`RPC function "${e.name}" returned a value that failed its \`returns\` schema: ${e.issues}`,fix:"Make the handler return a value that satisfies the `returns` schema, or relax the schema."}}});function VC(e){if(e.agent&&e.jsonSerializable===!1)throw BC.DF0019({name:e.name});e.agent&&!e.jsonSerializable&&(e.jsonSerializable=!0)}async function HC(e,t){let n=e[`~standard`].validate(t);return n instanceof Promise?await n:n}function UC(e){return e.map(e=>{let t=e.path?.map(e=>typeof e==`object`?e.key:e).join(`.`);return t?`${t}: ${e.message}`:e.message}).join(`; `)}async function WC(e,t,n){let r=n.slice();if(!t||t.length===0)return r;for(let r=0;r{n.get(t)===r&&n.delete(t)}),n.set(t,r)),await r}if(!e.__promise){let n=Promise.resolve(e.setup(t));n.catch(()=>{e.__promise===n&&(e.__promise=void 0)}),e.__promise=n}return await e.__promise}async function qC(e,t){let n=e.handler;if(!n){let r=await KC(e,t);if(!r.handler)throw BC.DF0024({name:e.name});n=r.handler}let r=e.args,i=e.returns;if(!r&&!i)return n;let a=n;return async(...t)=>{let n=await WC(e.name,r,t),o=await a(...n);return await GC(e.name,i,o)}}var JC=class{context;definitions=new Map;functions;_onChanged=[];constructor(e){this.context=e;let t=this.definitions,n=this;this.functions=new Proxy({},{get(e,r){let i=t.get(r);if(i)return qC(i,n.context)},has(e,n){return t.has(n)},getOwnPropertyDescriptor(e,n){return{value:t.get(n)?.handler,configurable:!0,enumerable:!0}},ownKeys(){return Array.from(t.keys())}})}register(e,t=!1){if(this.definitions.has(e.name)&&!t)throw BC.DF0021({name:e.name});VC(e),this.definitions.set(e.name,e),this._onChanged.forEach(t=>t(e.name))}update(e,t=!1){if(!this.definitions.has(e.name)&&!t)throw BC.DF0022({name:e.name});VC(e),this.definitions.set(e.name,e),this._onChanged.forEach(t=>t(e.name))}onChanged(e){return this._onChanged.push(e),()=>{let t=this._onChanged.indexOf(e);t!==-1&&this._onChanged.splice(t,1)}}async getHandler(e){return await qC(this.definitions.get(e),this.context)}getSchema(e){let t=this.definitions.get(e);if(!t)throw BC.DF0023({name:String(e)});return{args:t.args,returns:t.returns}}has(e){return this.definitions.has(e)}get(e){return this.definitions.get(e)}list(){return Array.from(this.definitions.keys())}};function YC(e,t=``){return JSON.stringify(e,function(e,n){let r=this,i=r==null?n:r[e];if(i===void 0){if(Array.isArray(r))throw ZC(t,`undefined`,r,e);return n}return i!==null&&XC(i,r,e,t),n})}function XC(e,t,n,r){if(typeof e==`bigint`)throw ZC(r,`BigInt`,t,n);if(typeof e!=`object`)return;if(e instanceof Map)throw ZC(r,`Map`,t,n);if(e instanceof Set)throw ZC(r,`Set`,t,n);if(e instanceof Date)throw ZC(r,`Date`,t,n);if(Array.isArray(e))return;let i=Object.getPrototypeOf(e);if(i!==null&&i!==Object.prototype)throw ZC(r,e.constructor?.name??`class instance`,t,n)}function ZC(e,t,n,r){let i=QC(n,r);return BC.DF0020({name:e||``,type:t,path:i})}function QC(e,t){return Array.isArray(e)?`[${t}]`:t===``?``:t}var $C=`__DEVFRAME_CONNECTION_META__`,ew=`__DEVFRAME_CONNECTION_AUTH_TOKEN__`;function tw(e){let t=[()=>window?.[e],()=>globalThis?.[e],()=>parent.window?.[e]];for(let e of t)try{let t=e();if(t)return t}catch{}}function nw(){return tw(NC)}function rw(){return tw($C)}function iw(e){if(e)return e;try{let e=localStorage.getItem(ew);if(e)return e}catch{}return tw(ew)}function aw(e){globalThis[NC]=e,globalThis[$C]={...e.connectionMeta,baseUrl:e.metaBaseUrl},e.authToken&&ow(e.authToken)}function ow(e){try{localStorage.setItem(ew,e)}catch{}globalThis[ew]=e;let t=nw();t&&(globalThis[NC]={...t,authToken:e})}function sw(e){let t=yx(MC,e);try{return new URL(t,globalThis.location?.href).href}catch{return t}}function cw(e,t){return t&&t!==e.authToken?{...e,authToken:t}:e}function lw(){let e=nw();if(e)return cw(e,iw()??e.authToken??e.connectionMeta.authToken);let t=rw();if(t)return{connectionMeta:t,metaBaseUrl:t.baseUrl??sw(`./`),authToken:iw(t.authToken)}}async function uw(e={}){if(e.connection){let t=cw(e.connection,iw(e.authToken??e.connection.authToken??e.connection.connectionMeta.authToken));return aw(t),t}let t=Array.isArray(e.baseURL)?e.baseURL:[e.baseURL??`./`];if(e.connectionMeta){let n={connectionMeta:e.connectionMeta,metaBaseUrl:sw(t[0]??`./`),authToken:iw(e.authToken??e.connectionMeta.authToken)};return aw(n),n}let n=lw();if(n){let t=cw(n,iw(e.authToken??n.authToken??n.connectionMeta.authToken));return aw(t),t}let r=[];for(let n of t){let t=yx(MC,n),i=sw(n);try{let n=await fetch(t);if(!n.ok)throw Error(`Failed to fetch connection meta from ${i}: ${n.status}`);let r=await n.json(),a=n.url||i,o={connectionMeta:r,metaBaseUrl:r.baseUrl?new URL(r.baseUrl,a).href:a,authToken:iw(e.authToken??r.authToken)};return aw(o),o}catch(e){r.push(e)}}throw Error(`Failed to get connection meta from ${t.join(`, `)}`,{cause:r})}var dw=class extends Error{name=`DevframeConnectionError`;kind;constructor(e,t,n){super(t,n),this.kind=e}};function fw(e=LC){try{let t=globalThis.location?.hash?.replace(/^#/,``)??``;return new URLSearchParams(t).get(e)||void 0}catch{return}}function pw(e){try{let t=new URL(globalThis.location.href),n=new URLSearchParams(t.hash.replace(/^#/,``));if(!n.has(e))return;n.delete(e),t.hash=n.toString(),globalThis.history?.replaceState(globalThis.history.state,``,t.href)}catch{}}function mw(e=LC){let t=fw(e);return t&&pw(e),t}async function hw(e,t={}){let n=mw(t.param??`devframe_otp`);return n?e.isTrusted?!0:e.requestTrustWithCode(n):!1}function gw(e){let t={},n=new WeakMap,r,i=()=>(r??=e.sharedState.get(IC,{initialValue:{}}).then(e=>(t=e.value(),e.on(`updated`,e=>{t=e}),e)),r);return i(),{state:i,has:e=>e in t,keys:()=>Object.keys(t),get:r=>{let i=t[r];if(!i)return;let a=n.get(i);return a||(a={...i,rpc:e.scope(i.scope).rpc},n.set(i,a)),a}}}function _w(e){let t=new Map,n=new Map,r=new Map,i=new Set,a=e.connectionMeta.backend===`static`;function o(e,t){let n=r.get(e);return n&&typeof n==`object`&&!Array.isArray(n)&&typeof t==`object`&&!Array.isArray(t)?{...n,...t}:t}e.client.register({name:Pb.broadcast.clientStateUpdated,type:`event`,handler:(e,n,r)=>{let i=t.get(e);i&&!i.syncIds.has(r)&&i.mutate(()=>o(e,n),r)}}),e.client.register({name:Pb.broadcast.clientStatePatch,type:`event`,handler:(e,n,r)=>{let i=t.get(e);i&&!i.syncIds.has(r)&&i.patch(n,r)}});function s(t,n){let r=[];return r.push(n.on(`updated`,(n,r,i)=>{a||(r?e.callEvent(`devframe:rpc:server-state:patch`,t,r,i):e.callEvent(`devframe:rpc:server-state:set`,t,n,i))})),()=>{for(let e of r)e()}}return{keys:()=>Array.from(t.keys()),onKeyAdded(e){return i.add(e),()=>{i.delete(e)}},delete(e){let i=n.get(e);n.delete(e);let a=t.delete(e);return r.delete(e),i?.(),a},get:async(c,l)=>{if(l?.initialValue!==void 0&&r.set(c,l.initialValue),t.has(c))return t.get(c);let u=eC({initialValue:l?.initialValue,enablePatches:!1});async function d(){if(a||e.callEvent(`devframe:rpc:server-state:subscribe`,c),l?.initialValue!==void 0){t.set(c,u);for(let e of i)e(c);return e.call(`devframe:rpc:server-state:get`,c).then(e=>{e!==void 0&&u.mutate(()=>o(c,e))}).catch(e=>{console.error(`Error getting server state`,e)}),n.set(c,s(c,u)),u}{let r=await e.call(`devframe:rpc:server-state:get`,c);u.mutate(()=>o(c,r)),t.set(c,u);for(let e of i)e(c);return n.set(c,s(c,u)),u}}return new Promise(t=>{if(e.isTrusted)d().then(t);else{t(u);let n=!1;e.events.on(Pb.client.isTrustedUpdated,e=>{e&&!n&&(n=!0,d())})}})}}}var vw=new Map;function yw(e=vw){let t=new Map;return{serialize:n=>{let r;return n.t===`q`?r=n.m:(r=t.get(n.i),t.delete(n.i)),!(n.t===`s`&&`e`in n)&&r&&e.get(r)?.jsonSerializable===!0?YC(n,r??``):`s:${yC(n)}`},deserialize:e=>{let n=e.startsWith(`s:`)?bC(e.slice(2)):JSON.parse(e);return n.t===`q`&&n.i&&n.m&&t.set(n.i,n.m),n}}}function bw(){}function xw(e){let t=e.search(/\n\n|\r\n\r\n/);if(!(t<0))return{frame:e.slice(0,t),rest:e.slice(t+(e[t]===`\r`?4:2))}}function Sw(e){let t=`message`,n=[];for(let r of e.split(/\r?\n/))r.startsWith(`:`)||(r.startsWith(`event:`)?t=r.slice(6).trimStart():r.startsWith(`data:`)&&n.push(r.slice(5).replace(/^ /,``)));return{event:t,data:n}}function Cw(e){let{onConnected:t=bw,onError:n=bw,onDisconnected:r=bw,definitions:i,fetch:a=globalThis.fetch.bind(globalThis)}=e,o=e.url;e.authToken&&(o=`${o}${o.includes(`?`)?`&`:`?`}${RC}=${encodeURIComponent(e.authToken)}`);let s=yw(i),c=new AbortController,l=!1,u,d,f,p,m=new Promise((e,t)=>{f=e,p=t});m.catch(()=>{});function h(e){l||(l=!0,p(e),n(e),r())}function g(){l||(l=!0,p(Error(`Devframe SSE stream closed`)),r())}function _(e,n){if(e===`session`){f(n),t();return}u?.(n)}async function ee(e){let t=e.getReader();d=t;let n=new TextDecoder,r=``;for(;;){let{done:e,value:i}=await t.read();if(e)break;for(r+=n.decode(i,{stream:!0});;){let e=xw(r);if(!e)break;r=e.rest;let{event:t,data:n}=Sw(e.frame);n.length>0&&_(t,n.join(` -`))}}g()}return(async()=>{try{let e=await a(o,{headers:{accept:`text/event-stream`},signal:c.signal});if(!e.ok||!e.body)throw Error(`Devframe SSE stream request failed: ${e.status}`);await ee(e.body)}catch(e){if(c.signal.aborted){g();return}h(e instanceof Error?e:Error(String(e)))}})(),{close:()=>{l=!0,c.abort(),d?.cancel().catch(()=>{})},on:e=>{u=e},post:async e=>{let t;try{t=await m}catch{return}if(l){n(Error(`Devframe SSE channel is closed; message dropped`));return}try{let n=await a(o,{method:`POST`,headers:{"content-type":`text/plain; charset=utf-8`,[PC]:t},body:e});if(n.status===200){let e=await n.text();e&&u?.(e);return}if(!n.ok)throw Error(`Devframe SSE POST failed: ${n.status}`)}catch(e){n(e instanceof Error?e:Error(String(e)))}},serialize:s.serialize,deserialize:s.deserialize}}function ww(e,t){let{channel:n,rpcOptions:r={}}=t;return qb(e,{...n,timeout:-1,...r,proxify:!1})}function Tw(e){let{transport:t,authToken:n,connectionMeta:r,events:i,clientRpc:a,rpcOptions:o={},callTimeout:s=0}=e,c=!1,l=`connecting`,u=null,d=Promise.withResolvers();function f(e,t=null){if(t?u=t:e===`connected`&&(u=null),e===l)return;let n=l;l=e,i.emit(Pb.client.connectionStatus,e,n)}let p=new Set;function m(e){for(let t of[...p])t.reject(e)}function h(){return l===`disconnected`||l===`error`?new dw(`connection`,`[devframe] Not connected to the devframe server`,{cause:u??void 0}):l===`unauthorized`?new dw(`auth`,`[devframe] Not authorized by the devframe server`,{cause:u??void 0}):null}function g(e,t){return new Promise((n,r)=>{let a=!1,o,c={reject(e){a||(l(),i.emit(Pb.client.error,e,t),r(e))}};function l(){a=!0,p.delete(c),o&&clearTimeout(o)}p.add(c),s>0&&(o=setTimeout(()=>{c.reject(new dw(`timeout`,`[devframe] RPC call "${t}" timed out after ${s}ms`))},s)),e.then(e=>{a||(l(),n(e))},e=>{if(a)return;l();let n=e instanceof Error?e:Error(String(e));i.emit(Pb.client.error,n,t),r(n)})})}let _=new Map;for(let e of r.jsonSerializableMethods??[])_.set(e,{jsonSerializable:!0});let ee=e.createChannel({definitions:_,onError(e){f(`error`,e),i.emit(Pb.client.connectionError,e),m(new dw(`connection`,`[devframe] Connection to the devframe server failed`,{cause:e}))},onDisconnected(){l!==`error`&&f(`disconnected`),m(new dw(`connection`,`[devframe] Disconnected from the devframe server`,{cause:u??void 0}))}}),v=ww(a.functions,{channel:ee,rpcOptions:o});a.register({name:Pb.broadcast.authRevoked,type:`event`,handler:()=>{c=!1;let e=new dw(`auth`,`[devframe] The devframe server revoked this client's trust`);f(`unauthorized`,e),i.emit(Pb.client.connectionError,e),m(e),i.emit(Pb.client.isTrustedUpdated,!1)}});let te=n;async function ne(e){te=e;let t=await v.$call(`anonymous:devframe:auth`,{authToken:e,ua:navigator.userAgent,origin:location.origin});if(c=t.isTrusted,c)d.resolve(!0),f(`connected`);else{let e=new dw(`auth`,`[devframe] The devframe server refused this client's credentials`);f(`unauthorized`,e),i.emit(Pb.client.connectionError,e)}return i.emit(Pb.client.isTrustedUpdated,c),t.isTrusted}async function re(e){let t=(await v.$call(`anonymous:devframe:auth:exchange`,{code:e,ua:navigator.userAgent,origin:location.origin}))?.authToken??null;return t&&(te=t,c=!0,d.resolve(!0),f(`connected`),i.emit(Pb.client.isTrustedUpdated,!0)),t}async function ie(e={}){await v.$call(`anonymous:devframe:auth:request-code`,{ua:navigator.userAgent,origin:location.origin,...e.reissue?{reissue:!0}:{}})}async function ae(){return c?!0:ne(te??``)}async function oe(e=6e4){if(c&&d.resolve(!0),e<=0)return d.promise;let t;try{return await Promise.race([d.promise,new Promise((n,r)=>{t=setTimeout(()=>{r(Error(`[devframe] Timeout waiting for rpc to be trusted`))},e)})]),c}finally{clearTimeout(t)}}return{transport:t,get isTrusted(){return c},get status(){return l},get connectionError(){return u},requestTrust:ae,requestTrustWithToken:ne,requestTrustWithCode:re,requestAuthCode:ie,ensureTrusted:oe,call:(...e)=>{let t=String(e[0]),n=h();return n?(i.emit(Pb.client.error,n,t),Promise.reject(n)):g(v.$call(...e),t)},callEvent:(...e)=>{let t=h();if(t){i.emit(Pb.client.error,t,String(e[0]));return}return v.$callEvent(...e)},callOptional:(...e)=>{let t=String(e[0]),n=h();return n?(i.emit(Pb.client.error,n,t),Promise.reject(n)):g(v.$callOptional(...e),t)},close:()=>{ee.close()}}}function Ew(e,t,n){let r=(()=>{try{return new URL(t,n.href)}catch{return new URL(n.href)}})();if(e&&typeof e==`object`){if(e.host!=null||e.port!=null){let t=e.host??`${r.hostname}:${e.port}`;return new URL(e.path??`/`,`${r.protocol}//${t}`).href}return new URL(e.path??``,r).href}let i=e??``;return/^https?:\/\//i.test(i)?i:new URL(i,r).href}function Dw(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},sseOptions:s={},callTimeout:c=0}=e,l=Ew(n.sse,r??`./`,location);return Tw({transport:`sse`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>Cw({url:l,authToken:t,definitions:e.definitions,...s,onConnected(){s.onConnected?.()},onError(t){e.onError(t),s.onError?.(t)},onDisconnected(){e.onDisconnected(),s.onDisconnected?.()}})})}function Ow(e){let{name:t,message:n,cause:r,...i}=e,a=r instanceof Error?r:kw(r)?Ow(r):r,o=a===void 0?Error(n):Error(n,{cause:a});return o.name=t,Object.assign(o,i),o}function kw(e){return typeof e==`object`&&!!e&&typeof e.message==`string`&&typeof e.name==`string`}function Aw(e){return typeof e==`object`&&!!e&&e.type===`static`&&typeof e.path==`string`}function jw(e){return typeof e==`object`&&!!e&&e.type===`query`&&typeof e.records==`object`&&e.records!==null}function Mw(e){return typeof e==`object`&&!!e&&(`output`in e||`error`in e)}function Nw(e){if(e.error)throw Ow(e.error);return e.output}function Pw(e){return e.some(e=>e!=null)}function Fw(e){return typeof e==`object`&&e&&`serialization`in e&&`data`in e?e.data:e}function Iw(e,t){let n=new Map,r=new Map;function i(e,t){return t===`structured-clone`&&Array.isArray(e)?vC(e):e}function a(e,t){return i(Fw(e),t)}async function o(e){n.has(e.path)||n.set(e.path,t(e.path).then(t=>a(t,e.serialization)));let r=await n.get(e.path);return Mw(r)?Nw(r):r}async function s(e,n){return r.has(e)||r.set(e,t(e).then(e=>a(e,n))),await r.get(e)}async function c(t,n){if(!(t in e))throw Error(`[devframe-rpc] Function "${t}" not found in dump store`);let r=e[t];if(Aw(r)){if(Pw(n))throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`);return await o(r)}if(jw(r)){let e=px(n),i=r.records[e];if(i)return Nw(await s(i,r.serialization));if(r.fallback)return Nw(await s(r.fallback,r.serialization));throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`)}if(!Pw(n))return r;throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`)}return{call:async(e,t)=>await c(e,t),callOptional:async(t,n)=>{if(t in e)return await c(t,n)},callEvent:async(e,t)=>{}}}async function Lw(e){let t=Iw(await e.fetchJsonFromBases(FC),e.fetchJsonFromBases);return{transport:`static`,isTrusted:!0,status:`connected`,connectionError:null,requestTrust:async()=>!0,requestTrustWithToken:async()=>!0,requestTrustWithCode:async()=>null,requestAuthCode:async()=>{},ensureTrusted:async()=>!0,call:(...e)=>t.call(e[0],e.slice(1)),callEvent:(...e)=>t.callEvent(e[0],e.slice(1)),callOptional:(...e)=>t.callOptional(e[0],e.slice(1)),close:()=>{}}}var Rw=``;function zw(e,t){return`${e}${Rw}${t}`}function Bw(e){let t=new Map,n=new Map;e.client.register({name:Pb.broadcast.streamingChunk,type:`event`,handler(e,n,r,i){t.get(zw(e,n))?._push(r,i)}}),e.client.register({name:Pb.broadcast.streamingEnd,type:`event`,handler(e,n,r){let i=zw(e,n),a=t.get(i);a&&(a._end(r),t.delete(i))}}),e.client.register({name:Pb.broadcast.streamingUploadCancel,type:`event`,handler(e,t){let r=zw(e,t),i=n.get(r);i&&(i.abort(`server cancelled upload`),n.delete(r))}}),e.events.on(Pb.client.isTrustedUpdated,n=>{if(n)for(let[n,r]of t){if(r.cancelled||r.done)continue;let t=n.indexOf(Rw);if(t<0)continue;let i=n.slice(0,t),a=n.slice(t+1);e.callEvent(`devframe:streaming:subscribe`,i,a,{afterSeq:r.lastSeenSeq})}});function r(n,r,i={}){let a=zw(n,r),o=t.get(a);if(o)return o;let s=wC({id:r,highWaterMark:i.highWaterMark,onOverflow(e){console.warn(`[devframe] DF0029: Stream "${n}#${r}" dropped ${e} chunk(s) after exceeding the client high-water mark.`)},onCancel(){e.callEvent(`devframe:streaming:cancel`,n,r),t.delete(a)}});if(t.set(a,s),e.isTrusted)e.callEvent(`devframe:streaming:subscribe`,n,r,{afterSeq:0});else{let i=e.events.on(Pb.client.isTrustedUpdated,o=>{o&&(i(),t.has(a)&&!s.cancelled&&!s.done&&e.callEvent(`devframe:streaming:subscribe`,n,r,{afterSeq:s.lastSeenSeq}))})}return s}function i(t,r){let i=zw(t,r),a=n.get(i);if(a)return a;let o=CC({id:r});return o.events.on(`chunk`,(n,i)=>{e.callEvent(`devframe:streaming:upload-chunk`,t,r,n,i)}),o.events.on(`end`,a=>{e.callEvent(`devframe:streaming:upload-end`,t,r,a),n.delete(i)}),n.set(i,o),o}return{subscribe:r,upload:i}}function Vw(){}var Hw=new Map;function Uw(e){let t=e.url;e.authToken&&(t=`${t}?${RC}=${encodeURIComponent(e.authToken)}`);let n=new WebSocket(t),{onConnected:r=Vw,onError:i=Vw,onDisconnected:a=Vw,definitions:o=Hw}=e;n.addEventListener(`open`,e=>{r(e)}),n.addEventListener(`error`,e=>{let t=e instanceof Error?e:Error(e.type);i(t)}),n.addEventListener(`close`,e=>{a(e)});let s=yw(o);return{close:()=>{n.close()},on:e=>{n.addEventListener(`message`,t=>{e(t.data)})},post:e=>{if(n.readyState===WebSocket.OPEN){n.send(e);return}if(n.readyState===WebSocket.CONNECTING){let t=()=>{i(),n.readyState===WebSocket.OPEN&&n.send(e)},r=()=>i();function i(){n.removeEventListener(`open`,t),n.removeEventListener(`close`,r)}n.addEventListener(`open`,t),n.addEventListener(`close`,r);return}i(Error(`Devframe WebSocket is not open; message dropped`))},serialize:s.serialize,deserialize:s.deserialize}}function Ww(e,t,n){let r=(()=>{try{return new URL(t,n.href)}catch{return new URL(n.href)}})(),i=r.protocol===`https:`?`wss:`:`ws:`;if(e&&typeof e==`object`){if(e.host!=null||e.port!=null){let t=e.host??`${r.hostname}:${e.port}`,n=new URL(e.path??`/`,`${i}//${t}`);return n.protocol=i,n.href}let t=new URL(e.path??``,r);return t.protocol=i,t.href}if(typeof e==`number`)return`${i}//${r.hostname}:${e}`;let a=e??``;if(/^wss?:\/\//i.test(a))return a;if(/^https?:\/\//i.test(a))return bx(a,/^https/i.test(a)?`wss://`:`ws://`);let o=new URL(a,r);return o.protocol=i,o.href}function Gw(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},wsOptions:s={},callTimeout:c=0}=e,l=Ww(n.websocket,r??`./`,location);return Tw({transport:`websocket`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>Uw({url:l,authToken:t,definitions:e.definitions,...s,onConnected(e){s.onConnected?.(e)},onError(t){e.onError(t),s.onError?.(t)},onDisconnected(t){e.onDisconnected(),s.onDisconnected?.(t)}})})}function Kw(e){return e.includes(`:`)}function qw(e,t){return Kw(t)?t:`${e}:${t}`}function Jw(e){return{async get(t){return(await e()).value()[t]},async set(t,n){(await e()).mutate(e=>{e[t]=n})},async delete(t){(await e()).mutate(e=>{delete e[t]})},async all(){return(await e()).value()},async onChange(t){return(await e()).on(`updated`,e=>t(e))}}}function Yw(e,t,n){let r=`devframe:settings:${n}:${t}`,i;function a(){return i||=e.sharedState.get(r,{initialValue:{}}),i}return Jw(a)}function Xw(e,t){return{global:Yw(e,t,`global`),project:Yw(e,t,`project`)}}function Zw(e,t){return{namespace:t,base:e,rpc:{namespace:t,register(n){if(Kw(n.name))throw Error(`[devframe] Scoped client RPC registration for namespace "${t}" received an already-namespaced function name "${n.name}". Pass a bare name without a ":" separator.`);e.client.register({...n,name:`${t}:${n.name}`})},call:((n,...r)=>e.call(qw(t,n),...r)),callEvent:((n,...r)=>e.callEvent(qw(t,n),...r)),callOptional:((n,...r)=>e.callOptional(qw(t,n),...r)),sharedState:((n,r)=>e.sharedState.get(qw(t,n),r)),streaming:{subscribe:(n,r,i)=>e.streaming.subscribe(qw(t,n),r,i),upload:(n,r)=>e.streaming.upload(qw(t,n),r)}},settings:Xw(e,t),scope:e.scope}}function Qw(){if(typeof document<`u`){let e=document.modelContext;if(e)return e}if(typeof navigator<`u`){let e=navigator.modelContext;if(e)return e}}function $w(e,t={}){let n=t.modelContext??Qw();if(!n)return()=>{};let r=n,i=new Map,a=new Map;function o(t,n){let o=DC(t.name),s=a.get(o);if(s&&s!==t.name){console.warn(`[devframe] WebMCP tool name "${o}" (from "${t.name}") collides with "${s}"; keeping the first registration.`);return}let c=new AbortController,l=Jb(t.type,n),u=r.registerTool({name:o,description:n.description,inputSchema:Zb(t.args),annotations:{title:n.title??t.name,readOnlyHint:l===`read`,destructiveHint:l===`destructive`},execute:n=>eT(t,e.context,n)},{signal:c.signal});u&&`then`in u&&u.then(()=>{},()=>{}),a.set(o,t.name),i.set(t.name,()=>{c.abort(),u&&`unregister`in u&&typeof u.unregister==`function`&&u.unregister(),a.delete(o)})}function s(t){let n=t?[t]:[...e.definitions.keys()];for(let t of n){i.get(t)?.(),i.delete(t);let n=e.definitions.get(t),r=n?.agent;n&&r&&o(n,r)}}s();let c=e.onChanged(e=>s(e));return()=>{c();for(let e of i.values())e();i.clear()}}async function eT(e,t,n){try{let r=$b(n,e.args?.length);return{content:[{type:`text`,text:tT(await(await qC(e,t))(...r))}]}}catch(e){return{isError:!0,content:[{type:`text`,text:nT(e)}]}}}function tT(e){return e===void 0?`undefined`:typeof e==`string`?e:JSON.stringify(e,null,2)}function nT(e){if(!(e instanceof Error))return String(e);let t=e.cause instanceof Error?` (cause: ${e.cause.message})`:``;return`${e.name}: ${e.message}${t}`}function rT(e,t){if(t.backend===`static`)return`static`;let n=t.websocket!==void 0,r=t.sse!==void 0;if(e===`websocket`){if(!n)throw Error(`[devframe] transport: 'websocket' was requested, but this server does not advertise a WebSocket endpoint`);return`websocket`}if(e===`sse`){if(!r)throw Error(`[devframe] transport: 'sse' was requested, but this server does not advertise an SSE endpoint`);return`sse`}if(t.backend===`sse`&&r)return`sse`;if(n)return`websocket`;if(r)return`sse`;throw Error(`[devframe] This server advertises no RPC transport (backend "none"), so there is nothing to connect to. Enable the WebSocket or SSE endpoint on the server, or use its static/MCP surfaces instead.`)}async function iT(e={}){let{baseURL:t=`./`,rpcOptions:n={},cacheOptions:r=!1}=e,i=mx(),a=Array.isArray(t)?t:[t],o=await uw(e),{connectionMeta:s,metaBaseUrl:c,authToken:l}=o,u=a[0]??`./`;try{u=new URL(`.`,c).href}catch{}let d=new zC({functions:[],...typeof e.cacheOptions==`object`?e.cacheOptions:{}}),f={rpc:void 0},p=new JC(f),m=e.webmcp===!1?void 0:$w(p),h,g=!1;async function _(e){let t=[u,...a.filter(e=>e!==u)].filter(e=>e!=null),n=[];for(let r of t)try{return await fetch(yx(e,r)).then(t=>{if(!t.ok)throw Error(`Failed to fetch ${e} from ${r}: ${t.status}`);return t.json()})}catch(e){n.push(e)}throw Error(`Failed to load ${e} from ${t.join(`, `)}`,{cause:n})}let ee={authToken:l,connectionMeta:s,metaBaseUrl:c,events:i,clientRpc:p,callTimeout:e.callTimeout,rpcOptions:{...n,async onRequest(e,t,i){if(await n.onRequest?.call(this,e,t,i),r&&d?.validate(e.m)){if(d.has(e.m,e.a))return i(d.cached(e.m,e.a));let n=await t(e);d.apply(e,n)}else await t(e)}}},v=rT(e.transport??`auto`,s),te=v===`static`?await Lw({fetchJsonFromBases:_}):v===`sse`?Dw({...ee,sseOptions:e.sseOptions}):Gw({...ee,wsOptions:e.wsOptions}),ne;try{ne=new BroadcastChannel(`devframe-auth`)}catch{}let re,ie=!1;function ae(e){return((...t)=>ie||!re?e(...t):re.then(()=>e(...t)))}function oe(){g=!0;try{h?.(),m?.()}finally{try{ne?.close()}finally{te.close?.()}}}let se={events:i,get isTrusted(){return te.isTrusted},get status(){return te.status},get connectionError(){return te.connectionError},get transport(){return te.transport??v},get connection(){return o},connectionMeta:s,ensureTrusted:te.ensureTrusted,requestTrust:te.requestTrust,requestTrustWithToken:async e=>(ow(e),o={...o,authToken:e},te.requestTrustWithToken(e)),requestTrustWithCode:async e=>{let t=await te.requestTrustWithCode(e);if(!t)return!1;ow(t),o={...o,authToken:t};try{ne?.postMessage({type:`auth-update`,authToken:t})}catch{}return!0},requestAuthCode:e=>te.requestAuthCode(e),call:ae(te.call),callEvent:ae(te.callEvent),callOptional:ae(te.callOptional),client:p,sharedState:void 0,services:void 0,streaming:void 0,cacheManager:d,scope:void 0,close:oe};se.sharedState=_w(se),se.streaming=Bw(se),se.services=gw(se);let ce=new Map;se.scope=(e=>{if(!e)return se;let t=ce.get(e);return t||(t=Zw(se,e),ce.set(e,t)),t}),f.rpc=se;function le(){try{return typeof window<`u`&&window.self===window.top}catch{return!1}}async function ue(){if(e.simpleAuth!==!1&&le()&&typeof globalThis.prompt==`function`)for(await se.requestAuthCode().catch(()=>{});!se.isTrusted;){let e=globalThis.prompt(`devframe: enter the authentication code shown in your terminal`);if(e==null)return;let t=e.trim();if(t&&await se.requestTrustWithCode(t))return}}async function de(){let t=await te.requestTrust(),n=e.otpParam??`devframe_otp`,r=n?await hw(se,{param:n}):!1;t||r||se.isTrusted||await ue()}return re=de().then(()=>{ie=!0},()=>{ie=!0}),s.mcp&&jC(async()=>{let{setupBrowserAgentRpcBridge:e}=await import(`./browser-agent-rpc-BXhoSh1z-Dkf4zF1R.js`);return{setupBrowserAgentRpcBridge:e}},[],import.meta.url).then(({setupBrowserAgentRpcBridge:e})=>{g||(h=e(se))}).catch(()=>{}),ne&&(ne.onmessage=e=>{e.data?.type===`auth-update`&&e.data.authToken&&se.requestTrustWithToken(e.data.authToken)}),se}var aT=iT,oT=[`components`,`injectors`,`signals`,`ngrx`,`forms`,`router`,`pipes`,`http`,`analog`],sT=[`forms`,`router`,`ngrx`,`http`,`analog`],cT={refreshMs:{default:3e3,min:500,max:8e3},navigations:{default:50,min:5,max:500},formTimeline:{default:200,min:10,max:2e3},httpCalls:{default:200,min:10,max:2e3},changeLog:{default:200,min:10,max:2e3}},lT=`ng-devtools`;function uT(e){return e&&typeof e==`object`&&!Array.isArray(e)?e:{}}function dT(e,t){return typeof e==`boolean`?e:t}var fT=100,pT=100;function mT(e){if(!Array.isArray(e))return[];let t=e.filter(e=>typeof e==`string`).map(e=>e.trim()).filter(e=>e&&e.length<=pT);return[...new Set(t)].slice(0,fT)}function hT(e,t){let{default:n,min:r,max:i}=cT[t];return typeof e!=`number`||!Number.isFinite(e)?n:Math.min(i,Math.max(r,Math.round(e)))}function gT(e,t){return Object.fromEntries(e.map(e=>[e,t(e)]))}function _T(e){let t=uT(e),n=uT(t.agent),r=uT(t.inspectors),i=uT(n.tools),a=uT(t.actions),o=dT(t.actions,!0),s=uT(t.redaction),c=uT(t.limits),l=gT(oT,e=>dT(r[e],!0));return{inspectors:l,agent:{readOnly:dT(n.readOnly,!1),tools:gT(oT,e=>l[e]&&dT(i[e],!0))},actions:gT(sT,e=>l[e]&&dT(a[e],o)),redaction:{secretNames:mT(s.secretNames),unmask:mT(s.unmask)},limits:Object.fromEntries(Object.keys(cT).map(e=>[e,hT(c[e],e)]))}}function vT(e){let t=e?.configs;return _T(t?.[lT])}function yT(e){return`${{forms:`Writing to forms`,router:`Navigating`,ngrx:`Restoring NgRx state`,http:`Changing HTTP mock rules and clearing HTTP calls`,analog:`Calling API routes`}[e]} is turned off in the devtools config (actions.${e}).`}var bT={components:`Components`,injectors:`Injectors`,signals:`Signals`,ngrx:`NgRx`,forms:`Forms`,router:`Router`,pipes:`Pipes`,http:`HTTP`,analog:`Analog`},xT={forms:`Form writes`,router:`Navigation`,ngrx:`NgRx restore`,http:`HTTP mocking`,analog:`Analog API calls`},ST={refreshMs:e=>`poll every ${e} ms`,navigations:e=>`${e} navigations`,formTimeline:e=>`${e} form events`,httpCalls:e=>`${e} HTTP calls`,changeLog:e=>`${e} NgRx changes`};function CT(e){let t=[],n=(e,n)=>{n.length&&t.push({label:e,value:n.join(`, `)})},r=oT.filter(t=>e.inspectors[t]);return n(`Inspectors off`,oT.filter(t=>!e.inspectors[t]).map(e=>bT[e])),n(`Agent`,e.agent.readOnly?[`Read-only`]:[]),n(`Hidden from the agent`,r.filter(t=>!e.agent.tools[t]).map(e=>bT[e])),n(`Blocked actions`,sT.filter(t=>e.inspectors[t]&&!e.actions[t]).map(e=>xT[e])),n(`Extra secret names`,e.redaction.secretNames),n(`Unmasked names`,e.redaction.unmask),n(`Limits`,Object.keys(cT).filter(t=>e.limits[t]!==cT[t].default).map(t=>ST[t](e.limits[t]))),t}var wT=`ng-devtools-page-id`;function TT(){try{return new URLSearchParams(location.search).get(`pageId`)||(window.top===window?null:sessionStorage.getItem(wT)||null)}catch{return null}}function ET(e){return vT(e?.connectionMeta)}function DT(e,t){return ET(e).actions[t]}var OT={components:`components`,routes:`router`,signals:`signals`,injectors:`injectors`,store:`ngrx`,forms:`forms`,pipes:`pipes`,network:`http`,analog:`analog`};function kT(e,t){let n=OT[e];return!n||t.inspectors[n]}function AT(e,t){e&1&&(ps(),U(0,`rect`,3)(1,`rect`,4)(2,`rect`,5)(3,`rect`,6))}function jT(e,t){e&1&&(ps(),U(0,`path`,7)(1,`path`,8)(2,`path`,9))}function MT(e,t){e&1&&(ps(),U(0,`circle`,10)(1,`path`,11)(2,`circle`,12))}function NT(e,t){e&1&&(ps(),U(0,`path`,1))}function PT(e,t){e&1&&(ps(),U(0,`path`,13)(1,`path`,14)(2,`path`,15)(3,`path`,16))}function FT(e,t){e&1&&(ps(),U(0,`ellipse`,17)(1,`path`,18)(2,`path`,19))}function IT(e,t){e&1&&(ps(),U(0,`rect`,20)(1,`path`,21)(2,`path`,22)(3,`path`,23))}function LT(e,t){e&1&&(ps(),U(0,`circle`,24)(1,`path`,25)(2,`path`,26))}function RT(e,t){e&1&&(ps(),U(0,`path`,27)(1,`path`,28)(2,`path`,29)(3,`path`,30)(4,`circle`,31))}function zT(e,t){e&1&&(ps(),U(0,`path`,2))}var BT=class e{name=$.required();static ɵfac=function(t){return new(t||e)};static ɵcmp=Oh({type:e,selectors:[[`app-tab-icon`]],inputs:{name:[1,`name`]},decls:11,vars:1,consts:[[`viewBox`,`0 0 24 24`,`width`,`16`,`height`,`16`,`fill`,`none`,`stroke`,`currentColor`,`stroke-width`,`1.8`,`stroke-linecap`,`round`,`stroke-linejoin`,`round`,`aria-hidden`,`true`],[`d`,`M22 12h-4l-3 9L9 3l-3 9H2`],[`d`,`m8 3 4 8 5-5 5 15H2L8 3z`],[`x`,`3`,`y`,`3`,`width`,`7`,`height`,`9`,`rx`,`1.5`],[`x`,`14`,`y`,`3`,`width`,`7`,`height`,`5`,`rx`,`1.5`],[`x`,`14`,`y`,`12`,`width`,`7`,`height`,`9`,`rx`,`1.5`],[`x`,`3`,`y`,`16`,`width`,`7`,`height`,`5`,`rx`,`1.5`],[`d`,`M12 2 3 7l9 5 9-5-9-5Z`],[`d`,`m3 12 9 5 9-5`],[`d`,`m3 17 9 5 9-5`],[`cx`,`6`,`cy`,`19`,`r`,`3`],[`d`,`M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15`],[`cx`,`18`,`cy`,`5`,`r`,`3`],[`d`,`M12 22v-5`],[`d`,`M9 8V2`],[`d`,`M15 8V2`],[`d`,`M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z`],[`cx`,`12`,`cy`,`5`,`rx`,`9`,`ry`,`3`],[`d`,`M3 5v14a9 3 0 0 0 18 0V5`],[`d`,`M3 12a9 3 0 0 0 18 0`],[`x`,`3`,`y`,`4`,`width`,`18`,`height`,`16`,`rx`,`2`],[`d`,`M7 9h10`],[`d`,`M7 13h6`],[`d`,`M7 17h8`],[`cx`,`12`,`cy`,`12`,`r`,`9`],[`d`,`M3 12h18`],[`d`,`M12 3a14 14 0 0 1 0 18a14 14 0 0 1 0-18Z`],[`d`,`M4 7h10`],[`d`,`M4 17h6`],[`d`,`m14 13 4 4-4 4`],[`d`,`M10 17h8`],[`cx`,`18`,`cy`,`7`,`r`,`3`]],template:function(e,t){if(e&1&&(ps(),V(0,`svg`,0),N(1,AT,4,0)(2,jT,3,0)(3,MT,3,0)(4,NT,1,0,`:svg:path`,1)(5,PT,4,0)(6,FT,3,0)(7,IT,4,0)(8,LT,3,0)(9,RT,5,0)(10,zT,1,0,`:svg:path`,2),H()),e&2){let e;j(),P((e=t.name())===`dashboard`?1:e===`components`?2:e===`routes`?3:e===`signals`?4:e===`injectors`?5:e===`store`?6:e===`forms`?7:e===`network`?8:e===`pipes`?9:e===`analog`?10:-1)}},styles:[`[_nghost-%COMP%] { +`))}}g()}return(async()=>{try{let e=await a(o,{headers:{accept:`text/event-stream`},signal:c.signal});if(!e.ok||!e.body)throw Error(`Devframe SSE stream request failed: ${e.status}`);await ee(e.body)}catch(e){if(c.signal.aborted){g();return}h(e instanceof Error?e:Error(String(e)))}})(),{close:()=>{l=!0,c.abort(),d?.cancel().catch(()=>{})},on:e=>{u=e},post:async e=>{let t;try{t=await m}catch{return}if(l){n(Error(`Devframe SSE channel is closed; message dropped`));return}try{let n=await a(o,{method:`POST`,headers:{"content-type":`text/plain; charset=utf-8`,[PC]:t},body:e});if(n.status===200){let e=await n.text();e&&u?.(e);return}if(!n.ok)throw Error(`Devframe SSE POST failed: ${n.status}`)}catch(e){n(e instanceof Error?e:Error(String(e)))}},serialize:s.serialize,deserialize:s.deserialize}}function ww(e,t){let{channel:n,rpcOptions:r={}}=t;return qb(e,{...n,timeout:-1,...r,proxify:!1})}function Tw(e){let{transport:t,authToken:n,connectionMeta:r,events:i,clientRpc:a,rpcOptions:o={},callTimeout:s=0}=e,c=!1,l=`connecting`,u=null,d=Promise.withResolvers();function f(e,t=null){if(t?u=t:e===`connected`&&(u=null),e===l)return;let n=l;l=e,i.emit(Pb.client.connectionStatus,e,n)}let p=new Set;function m(e){for(let t of[...p])t.reject(e)}function h(){return l===`disconnected`||l===`error`?new dw(`connection`,`[devframe] Not connected to the devframe server`,{cause:u??void 0}):l===`unauthorized`?new dw(`auth`,`[devframe] Not authorized by the devframe server`,{cause:u??void 0}):null}function g(e,t){return new Promise((n,r)=>{let a=!1,o,c={reject(e){a||(l(),i.emit(Pb.client.error,e,t),r(e))}};function l(){a=!0,p.delete(c),o&&clearTimeout(o)}p.add(c),s>0&&(o=setTimeout(()=>{c.reject(new dw(`timeout`,`[devframe] RPC call "${t}" timed out after ${s}ms`))},s)),e.then(e=>{a||(l(),n(e))},e=>{if(a)return;l();let n=e instanceof Error?e:Error(String(e));i.emit(Pb.client.error,n,t),r(n)})})}let _=new Map;for(let e of r.jsonSerializableMethods??[])_.set(e,{jsonSerializable:!0});let ee=e.createChannel({definitions:_,onError(e){f(`error`,e),i.emit(Pb.client.connectionError,e),m(new dw(`connection`,`[devframe] Connection to the devframe server failed`,{cause:e}))},onDisconnected(){l!==`error`&&f(`disconnected`),m(new dw(`connection`,`[devframe] Disconnected from the devframe server`,{cause:u??void 0}))}}),v=ww(a.functions,{channel:ee,rpcOptions:o});a.register({name:Pb.broadcast.authRevoked,type:`event`,handler:()=>{c=!1;let e=new dw(`auth`,`[devframe] The devframe server revoked this client's trust`);f(`unauthorized`,e),i.emit(Pb.client.connectionError,e),m(e),i.emit(Pb.client.isTrustedUpdated,!1)}});let te=n;async function ne(e){te=e;let t=await v.$call(`anonymous:devframe:auth`,{authToken:e,ua:navigator.userAgent,origin:location.origin});if(c=t.isTrusted,c)d.resolve(!0),f(`connected`);else{let e=new dw(`auth`,`[devframe] The devframe server refused this client's credentials`);f(`unauthorized`,e),i.emit(Pb.client.connectionError,e)}return i.emit(Pb.client.isTrustedUpdated,c),t.isTrusted}async function re(e){let t=(await v.$call(`anonymous:devframe:auth:exchange`,{code:e,ua:navigator.userAgent,origin:location.origin}))?.authToken??null;return t&&(te=t,c=!0,d.resolve(!0),f(`connected`),i.emit(Pb.client.isTrustedUpdated,!0)),t}async function ie(e={}){await v.$call(`anonymous:devframe:auth:request-code`,{ua:navigator.userAgent,origin:location.origin,...e.reissue?{reissue:!0}:{}})}async function ae(){return c?!0:ne(te??``)}async function oe(e=6e4){if(c&&d.resolve(!0),e<=0)return d.promise;let t;try{return await Promise.race([d.promise,new Promise((n,r)=>{t=setTimeout(()=>{r(Error(`[devframe] Timeout waiting for rpc to be trusted`))},e)})]),c}finally{clearTimeout(t)}}return{transport:t,get isTrusted(){return c},get status(){return l},get connectionError(){return u},requestTrust:ae,requestTrustWithToken:ne,requestTrustWithCode:re,requestAuthCode:ie,ensureTrusted:oe,call:(...e)=>{let t=String(e[0]),n=h();return n?(i.emit(Pb.client.error,n,t),Promise.reject(n)):g(v.$call(...e),t)},callEvent:(...e)=>{let t=h();if(t){i.emit(Pb.client.error,t,String(e[0]));return}return v.$callEvent(...e)},callOptional:(...e)=>{let t=String(e[0]),n=h();return n?(i.emit(Pb.client.error,n,t),Promise.reject(n)):g(v.$callOptional(...e),t)},close:()=>{ee.close()}}}function Ew(e,t,n){let r=(()=>{try{return new URL(t,n.href)}catch{return new URL(n.href)}})();if(e&&typeof e==`object`){if(e.host!=null||e.port!=null){let t=e.host??`${r.hostname}:${e.port}`;return new URL(e.path??`/`,`${r.protocol}//${t}`).href}return new URL(e.path??``,r).href}let i=e??``;return/^https?:\/\//i.test(i)?i:new URL(i,r).href}function Dw(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},sseOptions:s={},callTimeout:c=0}=e,l=Ew(n.sse,r??`./`,location);return Tw({transport:`sse`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>Cw({url:l,authToken:t,definitions:e.definitions,...s,onConnected(){s.onConnected?.()},onError(t){e.onError(t),s.onError?.(t)},onDisconnected(){e.onDisconnected(),s.onDisconnected?.()}})})}function Ow(e){let{name:t,message:n,cause:r,...i}=e,a=r instanceof Error?r:kw(r)?Ow(r):r,o=a===void 0?Error(n):Error(n,{cause:a});return o.name=t,Object.assign(o,i),o}function kw(e){return typeof e==`object`&&!!e&&typeof e.message==`string`&&typeof e.name==`string`}function Aw(e){return typeof e==`object`&&!!e&&e.type===`static`&&typeof e.path==`string`}function jw(e){return typeof e==`object`&&!!e&&e.type===`query`&&typeof e.records==`object`&&e.records!==null}function Mw(e){return typeof e==`object`&&!!e&&(`output`in e||`error`in e)}function Nw(e){if(e.error)throw Ow(e.error);return e.output}function Pw(e){return e.some(e=>e!=null)}function Fw(e){return typeof e==`object`&&e&&`serialization`in e&&`data`in e?e.data:e}function Iw(e,t){let n=new Map,r=new Map;function i(e,t){return t===`structured-clone`&&Array.isArray(e)?vC(e):e}function a(e,t){return i(Fw(e),t)}async function o(e){n.has(e.path)||n.set(e.path,t(e.path).then(t=>a(t,e.serialization)));let r=await n.get(e.path);return Mw(r)?Nw(r):r}async function s(e,n){return r.has(e)||r.set(e,t(e).then(e=>a(e,n))),await r.get(e)}async function c(t,n){if(!(t in e))throw Error(`[devframe-rpc] Function "${t}" not found in dump store`);let r=e[t];if(Aw(r)){if(Pw(n))throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`);return await o(r)}if(jw(r)){let e=px(n),i=r.records[e];if(i)return Nw(await s(i,r.serialization));if(r.fallback)return Nw(await s(r.fallback,r.serialization));throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`)}if(!Pw(n))return r;throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`)}return{call:async(e,t)=>await c(e,t),callOptional:async(t,n)=>{if(t in e)return await c(t,n)},callEvent:async(e,t)=>{}}}async function Lw(e){let t=Iw(await e.fetchJsonFromBases(FC),e.fetchJsonFromBases);return{transport:`static`,isTrusted:!0,status:`connected`,connectionError:null,requestTrust:async()=>!0,requestTrustWithToken:async()=>!0,requestTrustWithCode:async()=>null,requestAuthCode:async()=>{},ensureTrusted:async()=>!0,call:(...e)=>t.call(e[0],e.slice(1)),callEvent:(...e)=>t.callEvent(e[0],e.slice(1)),callOptional:(...e)=>t.callOptional(e[0],e.slice(1)),close:()=>{}}}var Rw=``;function zw(e,t){return`${e}${Rw}${t}`}function Bw(e){let t=new Map,n=new Map;e.client.register({name:Pb.broadcast.streamingChunk,type:`event`,handler(e,n,r,i){t.get(zw(e,n))?._push(r,i)}}),e.client.register({name:Pb.broadcast.streamingEnd,type:`event`,handler(e,n,r){let i=zw(e,n),a=t.get(i);a&&(a._end(r),t.delete(i))}}),e.client.register({name:Pb.broadcast.streamingUploadCancel,type:`event`,handler(e,t){let r=zw(e,t),i=n.get(r);i&&(i.abort(`server cancelled upload`),n.delete(r))}}),e.events.on(Pb.client.isTrustedUpdated,n=>{if(n)for(let[n,r]of t){if(r.cancelled||r.done)continue;let t=n.indexOf(Rw);if(t<0)continue;let i=n.slice(0,t),a=n.slice(t+1);e.callEvent(`devframe:streaming:subscribe`,i,a,{afterSeq:r.lastSeenSeq})}});function r(n,r,i={}){let a=zw(n,r),o=t.get(a);if(o)return o;let s=wC({id:r,highWaterMark:i.highWaterMark,onOverflow(e){console.warn(`[devframe] DF0029: Stream "${n}#${r}" dropped ${e} chunk(s) after exceeding the client high-water mark.`)},onCancel(){e.callEvent(`devframe:streaming:cancel`,n,r),t.delete(a)}});if(t.set(a,s),e.isTrusted)e.callEvent(`devframe:streaming:subscribe`,n,r,{afterSeq:0});else{let i=e.events.on(Pb.client.isTrustedUpdated,o=>{o&&(i(),t.has(a)&&!s.cancelled&&!s.done&&e.callEvent(`devframe:streaming:subscribe`,n,r,{afterSeq:s.lastSeenSeq}))})}return s}function i(t,r){let i=zw(t,r),a=n.get(i);if(a)return a;let o=CC({id:r});return o.events.on(`chunk`,(n,i)=>{e.callEvent(`devframe:streaming:upload-chunk`,t,r,n,i)}),o.events.on(`end`,a=>{e.callEvent(`devframe:streaming:upload-end`,t,r,a),n.delete(i)}),n.set(i,o),o}return{subscribe:r,upload:i}}function Vw(){}var Hw=new Map;function Uw(e){let t=e.url;e.authToken&&(t=`${t}?${RC}=${encodeURIComponent(e.authToken)}`);let n=new WebSocket(t),{onConnected:r=Vw,onError:i=Vw,onDisconnected:a=Vw,definitions:o=Hw}=e;n.addEventListener(`open`,e=>{r(e)}),n.addEventListener(`error`,e=>{let t=e instanceof Error?e:Error(e.type);i(t)}),n.addEventListener(`close`,e=>{a(e)});let s=yw(o);return{close:()=>{n.close()},on:e=>{n.addEventListener(`message`,t=>{e(t.data)})},post:e=>{if(n.readyState===WebSocket.OPEN){n.send(e);return}if(n.readyState===WebSocket.CONNECTING){let t=()=>{i(),n.readyState===WebSocket.OPEN&&n.send(e)},r=()=>i();function i(){n.removeEventListener(`open`,t),n.removeEventListener(`close`,r)}n.addEventListener(`open`,t),n.addEventListener(`close`,r);return}i(Error(`Devframe WebSocket is not open; message dropped`))},serialize:s.serialize,deserialize:s.deserialize}}function Ww(e,t,n){let r=(()=>{try{return new URL(t,n.href)}catch{return new URL(n.href)}})(),i=r.protocol===`https:`?`wss:`:`ws:`;if(e&&typeof e==`object`){if(e.host!=null||e.port!=null){let t=e.host??`${r.hostname}:${e.port}`,n=new URL(e.path??`/`,`${i}//${t}`);return n.protocol=i,n.href}let t=new URL(e.path??``,r);return t.protocol=i,t.href}if(typeof e==`number`)return`${i}//${r.hostname}:${e}`;let a=e??``;if(/^wss?:\/\//i.test(a))return a;if(/^https?:\/\//i.test(a))return bx(a,/^https/i.test(a)?`wss://`:`ws://`);let o=new URL(a,r);return o.protocol=i,o.href}function Gw(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},wsOptions:s={},callTimeout:c=0}=e,l=Ww(n.websocket,r??`./`,location);return Tw({transport:`websocket`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>Uw({url:l,authToken:t,definitions:e.definitions,...s,onConnected(e){s.onConnected?.(e)},onError(t){e.onError(t),s.onError?.(t)},onDisconnected(t){e.onDisconnected(),s.onDisconnected?.(t)}})})}function Kw(e){return e.includes(`:`)}function qw(e,t){return Kw(t)?t:`${e}:${t}`}function Jw(e){return{async get(t){return(await e()).value()[t]},async set(t,n){(await e()).mutate(e=>{e[t]=n})},async delete(t){(await e()).mutate(e=>{delete e[t]})},async all(){return(await e()).value()},async onChange(t){return(await e()).on(`updated`,e=>t(e))}}}function Yw(e,t,n){let r=`devframe:settings:${n}:${t}`,i;function a(){return i||=e.sharedState.get(r,{initialValue:{}}),i}return Jw(a)}function Xw(e,t){return{global:Yw(e,t,`global`),project:Yw(e,t,`project`)}}function Zw(e,t){return{namespace:t,base:e,rpc:{namespace:t,register(n){if(Kw(n.name))throw Error(`[devframe] Scoped client RPC registration for namespace "${t}" received an already-namespaced function name "${n.name}". Pass a bare name without a ":" separator.`);e.client.register({...n,name:`${t}:${n.name}`})},call:((n,...r)=>e.call(qw(t,n),...r)),callEvent:((n,...r)=>e.callEvent(qw(t,n),...r)),callOptional:((n,...r)=>e.callOptional(qw(t,n),...r)),sharedState:((n,r)=>e.sharedState.get(qw(t,n),r)),streaming:{subscribe:(n,r,i)=>e.streaming.subscribe(qw(t,n),r,i),upload:(n,r)=>e.streaming.upload(qw(t,n),r)}},settings:Xw(e,t),scope:e.scope}}function Qw(){if(typeof document<`u`){let e=document.modelContext;if(e)return e}if(typeof navigator<`u`){let e=navigator.modelContext;if(e)return e}}function $w(e,t={}){let n=t.modelContext??Qw();if(!n)return()=>{};let r=n,i=new Map,a=new Map;function o(t,n){let o=DC(t.name),s=a.get(o);if(s&&s!==t.name){console.warn(`[devframe] WebMCP tool name "${o}" (from "${t.name}") collides with "${s}"; keeping the first registration.`);return}let c=new AbortController,l=Jb(t.type,n),u=r.registerTool({name:o,description:n.description,inputSchema:Zb(t.args),annotations:{title:n.title??t.name,readOnlyHint:l===`read`,destructiveHint:l===`destructive`},execute:n=>eT(t,e.context,n)},{signal:c.signal});u&&`then`in u&&u.then(()=>{},()=>{}),a.set(o,t.name),i.set(t.name,()=>{c.abort(),u&&`unregister`in u&&typeof u.unregister==`function`&&u.unregister(),a.delete(o)})}function s(t){let n=t?[t]:[...e.definitions.keys()];for(let t of n){i.get(t)?.(),i.delete(t);let n=e.definitions.get(t),r=n?.agent;n&&r&&o(n,r)}}s();let c=e.onChanged(e=>s(e));return()=>{c();for(let e of i.values())e();i.clear()}}async function eT(e,t,n){try{let r=$b(n,e.args?.length);return{content:[{type:`text`,text:tT(await(await qC(e,t))(...r))}]}}catch(e){return{isError:!0,content:[{type:`text`,text:nT(e)}]}}}function tT(e){return e===void 0?`undefined`:typeof e==`string`?e:JSON.stringify(e,null,2)}function nT(e){if(!(e instanceof Error))return String(e);let t=e.cause instanceof Error?` (cause: ${e.cause.message})`:``;return`${e.name}: ${e.message}${t}`}function rT(e,t){if(t.backend===`static`)return`static`;let n=t.websocket!==void 0,r=t.sse!==void 0;if(e===`websocket`){if(!n)throw Error(`[devframe] transport: 'websocket' was requested, but this server does not advertise a WebSocket endpoint`);return`websocket`}if(e===`sse`){if(!r)throw Error(`[devframe] transport: 'sse' was requested, but this server does not advertise an SSE endpoint`);return`sse`}if(t.backend===`sse`&&r)return`sse`;if(n)return`websocket`;if(r)return`sse`;throw Error(`[devframe] This server advertises no RPC transport (backend "none"), so there is nothing to connect to. Enable the WebSocket or SSE endpoint on the server, or use its static/MCP surfaces instead.`)}async function iT(e={}){let{baseURL:t=`./`,rpcOptions:n={},cacheOptions:r=!1}=e,i=mx(),a=Array.isArray(t)?t:[t],o=await uw(e),{connectionMeta:s,metaBaseUrl:c,authToken:l}=o,u=a[0]??`./`;try{u=new URL(`.`,c).href}catch{}let d=new zC({functions:[],...typeof e.cacheOptions==`object`?e.cacheOptions:{}}),f={rpc:void 0},p=new JC(f),m=e.webmcp===!1?void 0:$w(p),h,g=!1;async function _(e){let t=[u,...a.filter(e=>e!==u)].filter(e=>e!=null),n=[];for(let r of t)try{return await fetch(yx(e,r)).then(t=>{if(!t.ok)throw Error(`Failed to fetch ${e} from ${r}: ${t.status}`);return t.json()})}catch(e){n.push(e)}throw Error(`Failed to load ${e} from ${t.join(`, `)}`,{cause:n})}let ee={authToken:l,connectionMeta:s,metaBaseUrl:c,events:i,clientRpc:p,callTimeout:e.callTimeout,rpcOptions:{...n,async onRequest(e,t,i){if(await n.onRequest?.call(this,e,t,i),r&&d?.validate(e.m)){if(d.has(e.m,e.a))return i(d.cached(e.m,e.a));let n=await t(e);d.apply(e,n)}else await t(e)}}},v=rT(e.transport??`auto`,s),te=v===`static`?await Lw({fetchJsonFromBases:_}):v===`sse`?Dw({...ee,sseOptions:e.sseOptions}):Gw({...ee,wsOptions:e.wsOptions}),ne;try{ne=new BroadcastChannel(`devframe-auth`)}catch{}let re,ie=!1;function ae(e){return((...t)=>ie||!re?e(...t):re.then(()=>e(...t)))}function oe(){g=!0;try{h?.(),m?.()}finally{try{ne?.close()}finally{te.close?.()}}}let se={events:i,get isTrusted(){return te.isTrusted},get status(){return te.status},get connectionError(){return te.connectionError},get transport(){return te.transport??v},get connection(){return o},connectionMeta:s,ensureTrusted:te.ensureTrusted,requestTrust:te.requestTrust,requestTrustWithToken:async e=>(ow(e),o={...o,authToken:e},te.requestTrustWithToken(e)),requestTrustWithCode:async e=>{let t=await te.requestTrustWithCode(e);if(!t)return!1;ow(t),o={...o,authToken:t};try{ne?.postMessage({type:`auth-update`,authToken:t})}catch{}return!0},requestAuthCode:e=>te.requestAuthCode(e),call:ae(te.call),callEvent:ae(te.callEvent),callOptional:ae(te.callOptional),client:p,sharedState:void 0,services:void 0,streaming:void 0,cacheManager:d,scope:void 0,close:oe};se.sharedState=_w(se),se.streaming=Bw(se),se.services=gw(se);let ce=new Map;se.scope=(e=>{if(!e)return se;let t=ce.get(e);return t||(t=Zw(se,e),ce.set(e,t)),t}),f.rpc=se;function le(){try{return typeof window<`u`&&window.self===window.top}catch{return!1}}async function ue(){if(e.simpleAuth!==!1&&le()&&typeof globalThis.prompt==`function`)for(await se.requestAuthCode().catch(()=>{});!se.isTrusted;){let e=globalThis.prompt(`devframe: enter the authentication code shown in your terminal`);if(e==null)return;let t=e.trim();if(t&&await se.requestTrustWithCode(t))return}}async function de(){let t=await te.requestTrust(),n=e.otpParam??`devframe_otp`,r=n?await hw(se,{param:n}):!1;t||r||se.isTrusted||await ue()}return re=de().then(()=>{ie=!0},()=>{ie=!0}),s.mcp&&jC(async()=>{let{setupBrowserAgentRpcBridge:e}=await import(`./browser-agent-rpc-BXhoSh1z-BmT-XH5u.js`);return{setupBrowserAgentRpcBridge:e}},[],import.meta.url).then(({setupBrowserAgentRpcBridge:e})=>{g||(h=e(se))}).catch(()=>{}),ne&&(ne.onmessage=e=>{e.data?.type===`auth-update`&&e.data.authToken&&se.requestTrustWithToken(e.data.authToken)}),se}var aT=iT,oT=[`components`,`injectors`,`signals`,`ngrx`,`forms`,`router`,`pipes`,`http`,`analog`],sT=[`forms`,`router`,`ngrx`,`http`,`analog`],cT={refreshMs:{default:3e3,min:500,max:8e3},navigations:{default:50,min:5,max:500},formTimeline:{default:200,min:10,max:2e3},httpCalls:{default:200,min:10,max:2e3},changeLog:{default:200,min:10,max:2e3}},lT=`ng-devtools`;function uT(e){return e&&typeof e==`object`&&!Array.isArray(e)?e:{}}function dT(e,t){return typeof e==`boolean`?e:t}var fT=100,pT=100;function mT(e){if(!Array.isArray(e))return[];let t=e.filter(e=>typeof e==`string`).map(e=>e.trim()).filter(e=>e&&e.length<=pT);return[...new Set(t)].slice(0,fT)}function hT(e,t){let{default:n,min:r,max:i}=cT[t];return typeof e!=`number`||!Number.isFinite(e)?n:Math.min(i,Math.max(r,Math.round(e)))}function gT(e,t){return Object.fromEntries(e.map(e=>[e,t(e)]))}function _T(e){let t=uT(e),n=uT(t.agent),r=uT(t.inspectors),i=uT(n.tools),a=uT(t.actions),o=dT(t.actions,!0),s=uT(t.redaction),c=uT(t.limits),l=gT(oT,e=>dT(r[e],!0));return{inspectors:l,agent:{readOnly:dT(n.readOnly,!1),tools:gT(oT,e=>l[e]&&dT(i[e],!0))},actions:gT(sT,e=>l[e]&&dT(a[e],o)),redaction:{secretNames:mT(s.secretNames),unmask:mT(s.unmask)},limits:Object.fromEntries(Object.keys(cT).map(e=>[e,hT(c[e],e)]))}}function vT(e){let t=e?.configs;return _T(t?.[lT])}function yT(e){return`${{forms:`Writing to forms`,router:`Navigating`,ngrx:`Restoring NgRx state`,http:`Changing HTTP mock rules and clearing HTTP calls`,analog:`Calling API routes`}[e]} is turned off in the devtools config (actions.${e}).`}var bT={components:`Components`,injectors:`Injectors`,signals:`Signals`,ngrx:`NgRx`,forms:`Forms`,router:`Router`,pipes:`Pipes`,http:`HTTP`,analog:`Analog`},xT={forms:`Form writes`,router:`Navigation`,ngrx:`NgRx restore`,http:`HTTP mocking`,analog:`Analog API calls`},ST={refreshMs:e=>`poll every ${e} ms`,navigations:e=>`${e} navigations`,formTimeline:e=>`${e} form events`,httpCalls:e=>`${e} HTTP calls`,changeLog:e=>`${e} NgRx changes`};function CT(e){let t=[],n=(e,n)=>{n.length&&t.push({label:e,value:n.join(`, `)})},r=oT.filter(t=>e.inspectors[t]);return n(`Inspectors off`,oT.filter(t=>!e.inspectors[t]).map(e=>bT[e])),n(`Agent`,e.agent.readOnly?[`Read-only`]:[]),n(`Hidden from the agent`,r.filter(t=>!e.agent.tools[t]).map(e=>bT[e])),n(`Blocked actions`,sT.filter(t=>e.inspectors[t]&&!e.actions[t]).map(e=>xT[e])),n(`Extra secret names`,e.redaction.secretNames),n(`Unmasked names`,e.redaction.unmask),n(`Limits`,Object.keys(cT).filter(t=>e.limits[t]!==cT[t].default).map(t=>ST[t](e.limits[t]))),t}var wT=`ng-devtools-page-id`;function TT(){try{return new URLSearchParams(location.search).get(`pageId`)||(window.top===window?null:sessionStorage.getItem(wT)||null)}catch{return null}}function ET(e){return vT(e?.connectionMeta)}function DT(e,t){return ET(e).actions[t]}var OT={components:`components`,routes:`router`,signals:`signals`,injectors:`injectors`,store:`ngrx`,forms:`forms`,pipes:`pipes`,network:`http`,analog:`analog`};function kT(e,t){let n=OT[e];return!n||t.inspectors[n]}function AT(e,t){e&1&&(ps(),U(0,`rect`,3)(1,`rect`,4)(2,`rect`,5)(3,`rect`,6))}function jT(e,t){e&1&&(ps(),U(0,`path`,7)(1,`path`,8)(2,`path`,9))}function MT(e,t){e&1&&(ps(),U(0,`circle`,10)(1,`path`,11)(2,`circle`,12))}function NT(e,t){e&1&&(ps(),U(0,`path`,1))}function PT(e,t){e&1&&(ps(),U(0,`path`,13)(1,`path`,14)(2,`path`,15)(3,`path`,16))}function FT(e,t){e&1&&(ps(),U(0,`ellipse`,17)(1,`path`,18)(2,`path`,19))}function IT(e,t){e&1&&(ps(),U(0,`rect`,20)(1,`path`,21)(2,`path`,22)(3,`path`,23))}function LT(e,t){e&1&&(ps(),U(0,`circle`,24)(1,`path`,25)(2,`path`,26))}function RT(e,t){e&1&&(ps(),U(0,`path`,27)(1,`path`,28)(2,`path`,29)(3,`path`,30)(4,`circle`,31))}function zT(e,t){e&1&&(ps(),U(0,`path`,2))}var BT=class e{name=$.required();static ɵfac=function(t){return new(t||e)};static ɵcmp=Oh({type:e,selectors:[[`app-tab-icon`]],inputs:{name:[1,`name`]},decls:11,vars:1,consts:[[`viewBox`,`0 0 24 24`,`width`,`16`,`height`,`16`,`fill`,`none`,`stroke`,`currentColor`,`stroke-width`,`1.8`,`stroke-linecap`,`round`,`stroke-linejoin`,`round`,`aria-hidden`,`true`],[`d`,`M22 12h-4l-3 9L9 3l-3 9H2`],[`d`,`m8 3 4 8 5-5 5 15H2L8 3z`],[`x`,`3`,`y`,`3`,`width`,`7`,`height`,`9`,`rx`,`1.5`],[`x`,`14`,`y`,`3`,`width`,`7`,`height`,`5`,`rx`,`1.5`],[`x`,`14`,`y`,`12`,`width`,`7`,`height`,`9`,`rx`,`1.5`],[`x`,`3`,`y`,`16`,`width`,`7`,`height`,`5`,`rx`,`1.5`],[`d`,`M12 2 3 7l9 5 9-5-9-5Z`],[`d`,`m3 12 9 5 9-5`],[`d`,`m3 17 9 5 9-5`],[`cx`,`6`,`cy`,`19`,`r`,`3`],[`d`,`M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15`],[`cx`,`18`,`cy`,`5`,`r`,`3`],[`d`,`M12 22v-5`],[`d`,`M9 8V2`],[`d`,`M15 8V2`],[`d`,`M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z`],[`cx`,`12`,`cy`,`5`,`rx`,`9`,`ry`,`3`],[`d`,`M3 5v14a9 3 0 0 0 18 0V5`],[`d`,`M3 12a9 3 0 0 0 18 0`],[`x`,`3`,`y`,`4`,`width`,`18`,`height`,`16`,`rx`,`2`],[`d`,`M7 9h10`],[`d`,`M7 13h6`],[`d`,`M7 17h8`],[`cx`,`12`,`cy`,`12`,`r`,`9`],[`d`,`M3 12h18`],[`d`,`M12 3a14 14 0 0 1 0 18a14 14 0 0 1 0-18Z`],[`d`,`M4 7h10`],[`d`,`M4 17h6`],[`d`,`m14 13 4 4-4 4`],[`d`,`M10 17h8`],[`cx`,`18`,`cy`,`7`,`r`,`3`]],template:function(e,t){if(e&1&&(ps(),V(0,`svg`,0),N(1,AT,4,0)(2,jT,3,0)(3,MT,3,0)(4,NT,1,0,`:svg:path`,1)(5,PT,4,0)(6,FT,3,0)(7,IT,4,0)(8,LT,3,0)(9,RT,5,0)(10,zT,1,0,`:svg:path`,2),H()),e&2){let e;j(),P((e=t.name())===`dashboard`?1:e===`components`?2:e===`routes`?3:e===`signals`?4:e===`injectors`?5:e===`store`?6:e===`forms`?7:e===`network`?8:e===`pipes`?9:e===`analog`?10:-1)}},styles:[`[_nghost-%COMP%] { display: inline-flex; flex-shrink: 0; }`]})},VT=(e,t)=>t.tab,HT=(e,t)=>t.label;function UT(e,t){e&1&&Y(0),e&2&&Z(` `,q().meta()?.projectName,` `)}function WT(e,t){e&1&&Y(0,` Project details unavailable `)}function GT(e,t){e&1&&Y(0,` Loading… `)}function KT(e,t){e&1&&(R(0,`p`,4),Y(1,`Check that the dev server is running, then reload the panel.`),z())}function qT(e,t){e&1&&(R(0,`li`,6)(1,`span`),Y(2,`Analog`),z(),Y(3),z()),e&2&&(j(3),X(t))}function JT(e,t){if(e&1&&(R(0,`span`,17),Y(1),z(),R(2,`span`,18),Y(3),z()),e&2){let e=q().$implicit,t=q();j(),X(t.cards()[e.tab]?.value),j(2),X(t.cards()[e.tab]?.sub)}}function YT(e,t){e&1&&(R(0,`span`,19),Y(1,`–`),z(),R(2,`span`,18),Y(3,`Count unavailable`),z())}function XT(e,t){e&1&&(B(0,`span`,20),R(1,`span`,18),Y(2,`Counting…`),z())}function ZT(e,t){if(e&1){let e=W();R(0,`button`,11),G(`click`,function(){let t=O(e).$implicit;return k(q().navigate.emit(t.tab))}),R(1,`span`,12)(2,`span`,13),B(3,`app-tab-icon`,14),z(),R(4,`span`,15),Y(5,`→`),z()(),R(6,`span`,16),Y(7),z(),N(8,JT,4,2)(9,YT,4,0)(10,XT,3,0),z()}if(e&2){let e,n=t.$implicit,r=t.$index,i=q().stateOf(n.tab);n_(`animation-delay`,60*r,`ms`),M(`aria-busy`,i===`loading`),j(3),L(`name`,n.tab),j(4),X(n.label),j(),P((e=i)===`ready`?8:e===`error`?9:10)}}function QT(e,t){if(e&1&&(R(0,`div`)(1,`dt`),Y(2),z(),R(3,`dd`),Y(4),z()()),e&2){let e=t.$implicit;j(2),X(e.label),j(2),X(e.value)}}function $T(e,t){if(e&1&&(R(0,`dl`),F(1,QT,5,2,`div`,null,HT),z()),e&2){let e=q();j(),I(e.configItems())}}function eE(e,t){e&1&&(R(0,`p`),Y(1,`Defaults`),z())}var tE=[{tab:`components`,label:`Components`},{tab:`routes`,label:`Routes`},{tab:`signals`,label:`Signals`},{tab:`injectors`,label:`Injectors`},{tab:`store`,label:`NgRx declarations`},{tab:`pipes`,label:`Pipes`}],nE=new Set([`signal`,`computed`,`linkedSignal`,`effect`]),rE={action:[`action`,`actions`],reducer:[`reducer`,`reducers`],effect:[`effect`,`effects`],selector:[`selector`,`selectors`],feature:[`feature`,`features`],"store-setup":[`setup call`,`setup calls`],"signal-store":[`signal store`,`signal stores`],"signal-state":[`signal state`,`signal states`],"signal-method":[`signal method`,`signal methods`]};function iE(e,t,n){return`${e} ${e===1?t:n}`}function aE(e,t){for(let n of e??[])t(n),aE(n.children,t)}function oE(e){if(!e.some(e=>e.kind))return{value:e.length,sub:`discovered in source`};let t=e.filter(e=>e.kind===`directive`).length;return{value:e.length-t,sub:`components · ${iE(t,`directive`,`directives`)}`}}function sE(e){if(!e.some(e=>e.kind))return{value:e.length,sub:`route entries in source`};let t=e.filter(e=>e.kind===`redirect`).length;return{value:new Set(e.filter(e=>e.kind===`page`).map(e=>e.fullPath??e.path??``)).size,sub:`navigable paths · ${iE(t,`redirect`,`redirects`)}`}}function cE(e){let t=new Map;for(let n of e)n.kind&&t.set(n.kind,(t.get(n.kind)??0)+1);if(!t.size)return{value:e.length,sub:`declarations in source`};let n=[...t].sort((e,t)=>t[1]-e[1]).map(([e,t])=>{let[n,r]=rE[e]??[e,e];return iE(t,n,r)});return{value:e.length,sub:n.join(` · `)}}var lE=class e{rpc=$(null);navigate=av();meta=A(null);config=Q(()=>ET(this.rpc()));stats=Q(()=>tE.filter(e=>kT(e.tab,this.config())));configItems=Q(()=>CT(this.config()));metaState=A(`loading`);states=A({});rows=A({});injectorTree=A(null);signalGraph=A(null);pageId=TT();destroyRef=E(ws);stopLive=[];liveInjectors=Q(()=>{let e=this.injectorTree();if(!e?.roots?.length)return null;let t=0,n=0,r=e=>{t++,n+=e.providers?.length??0};return aE(e.roots,r),aE(e.environment,r),{injectors:t,providers:n}});liveSignals=Q(()=>{let e=this.signalGraph(),t=this.pageId&&e?.pages?.[this.pageId]||e?.graph;return t?.nodes?.length?t.nodes.filter(e=>nE.has(e.kind??``)).length:null});cards=Q(()=>{let e=this.rows(),t={};if(e.components&&(t.components=oE(e.components)),e.routes&&(t.routes=sE(e.routes)),e.store&&(t.store=cE(e.store)),e.pipes){let n=e.pipes.filter(e=>e.builtin).length;t.pipes={value:e.pipes.length-n,sub:n?`custom pipes · ${n} built-in in use`:`custom pipes in source`}}let n=this.liveSignals();n===null?e.signals&&(t.signals={value:e.signals.length,sub:`signal declarations in source`}):t.signals={value:n,sub:e.signals?`live on the page · ${e.signals.length} declared in source`:`live on the page`};let r=this.liveInjectors();return r?t.injectors={value:r.injectors,sub:`live injectors · ${iE(r.providers,`provider`,`providers`)}`}:e.injectors&&(t.injectors={value:e.injectors.filter(e=>e.type!==`injection`).length,sub:`provider declarations in source`}),t});constructor(){dc(()=>{let e=this.rpc();if(!e)return;let t=e.scope(`ng-devtools`);this.metaState.set(`loading`),this.states.set({}),this.rows.set({}),t.rpc.call(`build-meta`).then(e=>{this.meta.set(e),this.metaState.set(`ready`)}).catch(()=>this.metaState.set(`error`));let n=ET(e),r=e=>kT(e,n);r(`components`)&&this.load(t.rpc.call(`get-components`),`components`),r(`routes`)&&this.load(t.rpc.call(`get-routes`),`routes`),r(`signals`)&&this.load(t.rpc.call(`get-signals`),`signals`),r(`injectors`)&&this.load(t.rpc.call(`get-providers`),`injectors`),r(`store`)&&this.load(t.rpc.call(`get-ngrx-store`),`store`),r(`pipes`)&&this.load(t.rpc.call(`get-pipes`),`pipes`),this.watchLive(e,n)}),this.destroyRef.onDestroy(()=>this.unwatch())}stateOf(e){return(e===`signals`?this.liveSignals():e===`injectors`?this.liveInjectors():null)===null?this.states()[e]??`loading`:`ready`}load(e,t){let n=e=>this.states.update(n=>({...n,[t]:e}));e.then(e=>{this.rows.update(n=>({...n,[t]:Array.isArray(e)?e:[]})),n(`ready`)}).catch(()=>n(`error`))}async watchLive(e,t){this.unwatch();let n=e.scope(`ng-devtools`).rpc,r=async(t,r)=>{try{let i=await n.sharedState(t);if(this.destroyRef.destroyed||this.rpc()!==e)return;r(i.value()),this.stopLive.push(i.on(`updated`,e=>r(e)))}catch{r(null)}};await Promise.all([t.inspectors.injectors&&r(`injector-tree`,e=>this.injectorTree.set(e)),t.inspectors.signals&&r(`signal-graph`,e=>this.signalGraph.set(e))])}unwatch(){for(let e of this.stopLive.splice(0))e()}static ɵfac=function(t){return new(t||e)};static ɵcmp=Oh({type:e,selectors:[[`app-dashboard`]],inputs:{rpc:[1,`rpc`]},outputs:{navigate:`navigate`},decls:31,vars:12,consts:[[`aria-labelledby`,`project-title`,1,`project`],[1,`project-head`],[1,`eyebrow`],[`id`,`project-title`],[1,`hint`],[1,`chips`],[1,`analog`],[1,`grid`],[`type`,`button`,1,`stat`,3,`animation-delay`],[`aria-labelledby`,`config-title`,1,`config`],[`id`,`config-title`],[`type`,`button`,1,`stat`,3,`click`],[1,`top`],[1,`icon`],[3,`name`],[`aria-hidden`,`true`,1,`go`],[1,`label`],[1,`big`],[1,`sub`],[1,`big`,`muted`],[`aria-hidden`,`true`,1,`big`,`skeleton`]],template:function(e,t){if(e&1&&(R(0,`section`,0)(1,`div`,1)(2,`p`,2),Y(3,`Project`),z(),R(4,`h2`,3),N(5,UT,1,1)(6,WT,1,0)(7,GT,1,0),z(),N(8,KT,2,0,`p`,4),z(),R(9,`ul`,5)(10,`li`)(11,`span`),Y(12,`Angular`),z(),Y(13),z(),R(14,`li`)(15,`span`),Y(16,`TypeScript`),z(),Y(17),z(),R(18,`li`)(19,`span`),Y(20,`SSR`),z(),Y(21),z(),N(22,qT,4,1,`li`,6),z()(),R(23,`div`,7),F(24,ZT,11,6,`button`,8,VT),z(),R(26,`section`,9)(27,`h2`,10),Y(28,`Configuration`),z(),N(29,$T,3,0,`dl`)(30,eE,2,0,`p`),z()),e&2){let e,n;M(`aria-busy`,t.metaState()===`loading`),j(4),J(`muted`,t.metaState()!==`ready`),j(),P((e=t.metaState())===`ready`?5:e===`error`?6:7),j(3),P(t.metaState()===`error`?8:-1),j(),J(`pending`,t.metaState()===`loading`),j(4),X(t.meta()?.angularVersion??`…`),j(4),X(t.meta()?.typescript??`…`),j(4),X(t.meta()?t.meta()?.ssr?`On`:`Off`:`…`),j(),P((n=t.meta()?.analog)?22:-1,n),j(2),I(t.stats()),j(5),P(t.configItems().length?29:30)}},dependencies:[BT],styles:[`[_nghost-%COMP%] { @@ -11508,7 +11508,7 @@ h2[_ngcontent-%COMP%] { transition: none; } } -`;function Ez(e,t=50){let n=e?.querySelector(`devframes-dock-standalone`)?.shadowRoot;if(n){if(n.querySelector(`style[data-ng-devtools]`))return;let t=e.createElement(`style`);t.dataset.ngDevtools=``,t.textContent=Tz,n.append(t);return}t>0&&setTimeout(()=>Ez(e,t-1),100)}var Dz=`__DEVFRAME_HUB_CLIENT_CONTEXT__`,Oz=`ng-devtools:`;function kz(){try{return window.parent===window?void 0:window.parent[Dz]}catch{return}}function Az(e,t,n=50){let r=kz();if(!r){if(n<=0||window.parent===window)return()=>{};let r=()=>{},i=setTimeout(()=>r=Az(e,t,n-1),100);return()=>{clearTimeout(i),r()}}let i=e.map(e=>r.docks.getStateById(Oz+e)?.events.on(`entry:activated`,()=>t(e))??(()=>{})),a=r.docks.selectedId,o=e.find(e=>Oz+e===a);return o&&t(o),()=>i.forEach(e=>e())}async function jz(e){let t=kz();if(!t)return!1;try{return await t.docks.switchEntry(Oz+e)}catch{return!1}}var Mz=`ng-devtools:auth-tokens`;function Nz(e){return e.isTrusted?`trusted`:e.status===`unauthorized`?`needs-code`:`pending`}function Pz(e,t){let n=()=>t(Nz(e)),r=e.events.on(`connection:status`,n),i=e.events.on(`rpc:is-trusted:updated`,n);return n(),()=>{r(),i()}}function Fz(e,t){try{return new URL(e??`./`,t).origin}catch{return new URL(t).origin}}function Iz(){try{return globalThis.localStorage??null}catch{return null}}function Lz(e){try{let t=JSON.parse(e?.getItem(Mz)??`{}`);return t&&typeof t==`object`?t:{}}catch{return{}}}function Rz(e,t,n=Iz()){if(e===t)return;let r=Lz(n)[e];return typeof r==`string`&&r?r:void 0}function zz(e,t,n,r=Iz()){if(e!==t&&n&&r)try{r.setItem(Mz,JSON.stringify({...Lz(r),[e]:n}))}catch{}}async function Bz(e,t,n,r,i=Iz()){let a=t.replace(/\s+/g,``);if(!a)return`empty`;let o;try{o=await e.requestTrustWithCode(a)}catch{return`unreachable`}return o?(zz(n,r,e.connection.authToken,i),`trusted`):`wrong`}async function Vz(e,t=!1){try{return await e.requestAuthCode(t?{reissue:!0}:void 0),!0}catch{return!1}}var Hz=[`field`],Uz={empty:`Enter the code from the terminal.`,wrong:`That code did not work. Check the terminal for the current code and try again.`,unreachable:`Can't reach the devtools server. Check that the dev server is running, then try again.`},Wz=class e{client=$.required();server=$.required();pageOrigin=$.required();code=A(``);busy=A(!1);error=A(``);note=A(``);field=hv.required(`field`);constructor(){wd(()=>this.field().nativeElement.focus())}ngOnInit(){Vz(this.client())}async submit(e){if(e.preventDefault(),this.busy())return;this.busy.set(!0),this.note.set(``);let t=await Bz(this.client(),this.code(),this.server(),this.pageOrigin());if(this.busy.set(!1),t===`trusted`){this.error.set(``);return}this.error.set(Uz[t]);let n=this.field().nativeElement;n.focus(),n.select()}async newCode(){this.error.set(``),this.note.set(``),await Vz(this.client(),!0)?(this.code.set(``),this.note.set(`A new code is in the terminal.`),this.field().nativeElement.focus()):this.error.set(Uz.unreachable)}static ɵfac=function(t){return new(t||e)};static ɵcmp=Oh({type:e,selectors:[[`app-code-entry`]],viewQuery:function(e,t){e&1&&Ng(t.field,Hz,5),e&2&&Pg()},inputs:{client:[1,`client`],server:[1,`server`],pageOrigin:[1,`pageOrigin`]},decls:28,vars:8,consts:[[`field`,``],[`aria-labelledby`,`code-entry-title`],[`id`,`code-entry-title`],[1,`hint`],[`novalidate`,``,3,`submit`],[`for`,`code-entry-input`],[1,`row`],[`id`,`code-entry-input`,`name`,`code`,`type`,`text`,`inputmode`,`numeric`,`autocomplete`,`one-time-code`,`spellcheck`,`false`,`maxlength`,`16`,`aria-describedby`,`code-entry-error`,3,`input`,`value`],[`type`,`submit`,3,`disabled`],[`id`,`code-entry-error`,`role`,`alert`,1,`error`],[1,`more`],[`type`,`button`,1,`ghost`,3,`click`,`disabled`],[`role`,`status`,1,`note`]],template:function(e,t){if(e&1){let e=W();V(0,`section`,1)(1,`h2`,2),Y(2,`Enter the one-time code`),H(),V(3,`p`),Y(4,` The devtools server at `),V(5,`code`),Y(6),H(),Y(7,` asks for a one-time code before it shares data with this panel. `),H(),V(8,`p`,3),Y(9,` Find the 6-digit `),V(10,`strong`),Y(11,`auth code`),H(),Y(12,` in the terminal that runs your dev server. A code lasts 5 minutes and changes after 5 wrong tries. `),H(),V(13,`form`,4),K(`submit`,function(e){return t.submit(e)}),V(14,`label`,5),Y(15,`One-time code`),H(),V(16,`div`,6)(17,`input`,7,0),K(`input`,function(){O(e);let n=Fg(18);return k(t.code.set(n.value))}),H(),V(19,`button`,8),Y(20),H()(),V(21,`p`,9),Y(22),H()(),V(23,`div`,10)(24,`button`,11),K(`click`,function(){return t.newCode()}),Y(25,` Print a new code `),H(),V(26,`p`,12),Y(27),H()()()}e&2&&(j(6),X(t.server()),j(11),xg(`value`,t.code()),M(`aria-invalid`,t.error()?`true`:null),j(2),xg(`disabled`,t.busy()),j(),X(t.busy()?`Checking…`:`Connect`),j(2),X(t.error()),j(2),xg(`disabled`,t.busy()),j(3),X(t.note()))},styles:[`[_nghost-%COMP%] { +`;function Ez(e,t=50){let n=e?.querySelector(`devframes-dock-standalone`)?.shadowRoot;if(n){if(n.querySelector(`style[data-ng-devtools]`))return;let t=e.createElement(`style`);t.dataset.ngDevtools=``,t.textContent=Tz,n.append(t);return}t>0&&setTimeout(()=>Ez(e,t-1),100)}var Dz=`__DEVFRAME_HUB_CLIENT_CONTEXT__`,Oz=`ng-devtools:`;function kz(){try{return window.parent===window?void 0:window.parent[Dz]}catch{return}}function Az(e,t,n=50){let r=kz();if(!r){if(n<=0||window.parent===window)return()=>{};let r=()=>{},i=setTimeout(()=>r=Az(e,t,n-1),100);return()=>{clearTimeout(i),r()}}let i=e.map(e=>r.docks.getStateById(Oz+e)?.events.on(`entry:activated`,()=>t(e))??(()=>{})),a=r.docks.selectedId,o=e.find(e=>Oz+e===a);return o&&t(o),()=>i.forEach(e=>e())}async function jz(e){let t=kz();if(!t)return!1;try{return await t.docks.switchEntry(Oz+e)}catch{return!1}}var Mz=`ng-devtools:auth-tokens`;function Nz(e){return e.isTrusted?`trusted`:e.status===`unauthorized`?`needs-code`:`pending`}function Pz(e,t){let n=()=>t(Nz(e)),r=e.events.on(`connection:status`,n),i=e.events.on(`rpc:is-trusted:updated`,n);return n(),()=>{r(),i()}}function Fz(e,t){try{return new URL(e??`./`,t).origin}catch{return new URL(t).origin}}function Iz(){try{return globalThis.localStorage??null}catch{return null}}function Lz(e){try{let t=JSON.parse(e?.getItem(Mz)??`{}`);return t&&typeof t==`object`?t:{}}catch{return{}}}function Rz(e,t,n=Iz()){if(e===t)return;let r=Lz(n)[e];return typeof r==`string`&&r?r:void 0}function zz(e,t,n=Iz()){if(e!==t)return Rz(e,t,n)??`ng-devtools:no-token`}function Bz(e,t,n,r=Iz()){if(t===n)return;let i=e.requestTrustWithToken;e.requestTrustWithToken=async e=>e===Rz(t,n,r)&&i(e)}function Vz(e,t,n,r=Iz()){if(e!==t&&n&&r)try{r.setItem(Mz,JSON.stringify({...Lz(r),[e]:n}))}catch{}}async function Hz(e,t,n,r,i=Iz()){let a=t.replace(/\s+/g,``);if(!a)return`empty`;let o;try{o=await e.requestTrustWithCode(a)}catch{return`unreachable`}return o?(Vz(n,r,e.connection.authToken,i),`trusted`):`wrong`}async function Uz(e,t=!1){try{return await e.requestAuthCode(t?{reissue:!0}:void 0),!0}catch{return!1}}var Wz=[`field`],Gz={empty:`Enter the code from the terminal.`,wrong:`That code did not work. Check the terminal for the current code and try again.`,unreachable:`Can't reach the devtools server. Check that the dev server is running, then try again.`},Kz=class e{client=$.required();server=$.required();pageOrigin=$.required();code=A(``);busy=A(!1);error=A(``);note=A(``);field=hv.required(`field`);constructor(){wd(()=>this.field().nativeElement.focus())}ngOnInit(){Uz(this.client())}async submit(e){if(e.preventDefault(),this.busy())return;this.busy.set(!0),this.note.set(``);let t=await Hz(this.client(),this.code(),this.server(),this.pageOrigin());if(this.busy.set(!1),t===`trusted`){this.error.set(``);return}this.error.set(Gz[t]);let n=this.field().nativeElement;n.focus(),n.select()}async newCode(){if(this.busy())return;this.busy.set(!0),this.error.set(``),this.note.set(``);let e;try{e=await Uz(this.client(),!0)}finally{this.busy.set(!1)}e?(this.code.set(``),this.note.set(`A new code is in the terminal.`),this.field().nativeElement.focus()):this.error.set(Gz.unreachable)}static ɵfac=function(t){return new(t||e)};static ɵcmp=Oh({type:e,selectors:[[`app-code-entry`]],viewQuery:function(e,t){e&1&&Ng(t.field,Wz,5),e&2&&Pg()},inputs:{client:[1,`client`],server:[1,`server`],pageOrigin:[1,`pageOrigin`]},decls:28,vars:8,consts:[[`field`,``],[`aria-labelledby`,`code-entry-title`],[`id`,`code-entry-title`],[1,`hint`],[`novalidate`,``,3,`submit`],[`for`,`code-entry-input`],[1,`row`],[`id`,`code-entry-input`,`name`,`code`,`type`,`text`,`inputmode`,`numeric`,`autocomplete`,`one-time-code`,`spellcheck`,`false`,`maxlength`,`16`,`aria-describedby`,`code-entry-error`,3,`input`,`value`],[`type`,`submit`,3,`disabled`],[`id`,`code-entry-error`,`role`,`alert`,1,`error`],[1,`more`],[`type`,`button`,1,`ghost`,3,`click`,`disabled`],[`role`,`status`,1,`note`]],template:function(e,t){if(e&1){let e=W();V(0,`section`,1)(1,`h2`,2),Y(2,`Enter the one-time code`),H(),V(3,`p`),Y(4,` The devtools server at `),V(5,`code`),Y(6),H(),Y(7,` asks for a one-time code before it shares data with this panel. `),H(),V(8,`p`,3),Y(9,` Find the 6-digit `),V(10,`strong`),Y(11,`auth code`),H(),Y(12,` in the terminal that runs your dev server. A code lasts 5 minutes and changes after 5 wrong tries. `),H(),V(13,`form`,4),K(`submit`,function(e){return t.submit(e)}),V(14,`label`,5),Y(15,`One-time code`),H(),V(16,`div`,6)(17,`input`,7,0),K(`input`,function(){O(e);let n=Fg(18);return k(t.code.set(n.value))}),H(),V(19,`button`,8),Y(20),H()(),V(21,`p`,9),Y(22),H()(),V(23,`div`,10)(24,`button`,11),K(`click`,function(){return t.newCode()}),Y(25,` Print a new code `),H(),V(26,`p`,12),Y(27),H()()()}e&2&&(j(6),X(t.server()),j(11),xg(`value`,t.code()),M(`aria-invalid`,t.error()?`true`:null),j(2),xg(`disabled`,t.busy()),j(),X(t.busy()?`Checking…`:`Connect`),j(2),X(t.error()),j(2),xg(`disabled`,t.busy()),j(3),X(t.note()))},styles:[`[_nghost-%COMP%] { display: block; } @@ -11658,7 +11658,7 @@ button.ghost[_ngcontent-%COMP%]:hover:not(:disabled) { .note[_ngcontent-%COMP%] { color: var(--%NS%text-2); font-size: 12px; -}`]})},Gz=[`nav`],Kz=[`main`],qz=(e,t)=>t.id;function Jz(e,t){e&1&&(ps(),R(0,`svg`,4),B(1,`path`,18),z())}function Yz(e,t){e&1&&(ps(),R(0,`svg`,4),B(1,`path`,19)(2,`path`,20)(3,`path`,21)(4,`path`,22)(5,`path`,23)(6,`path`,24),z())}function Xz(e,t){e&1&&(ps(),R(0,`svg`,5),B(1,`path`,25)(2,`path`,26)(3,`path`,27)(4,`path`,28),z())}function Zz(e,t){e&1&&(ps(),R(0,`svg`,6),B(1,`path`,29),z())}function Qz(e,t){e&1&&(ps(),R(0,`svg`,7)(1,`defs`)(2,`linearGradient`,30),B(3,`stop`,31)(4,`stop`,32)(5,`stop`,33)(6,`stop`,34)(7,`stop`,35)(8,`stop`,36),z()(),B(9,`path`,37),z())}function $z(e,t){e&1&&(ps(),R(0,`svg`,8),B(1,`path`,38),z())}function eB(e,t){if(e&1){let e=W();R(0,`button`,40),G(`click`,function(){let t=O(e).$implicit;return k(q(2).switchTab(t.id))}),B(1,`app-tab-icon`,41),R(2,`span`),Y(3),z()()}if(e&2){let e=t.$implicit,n=q(2);J(`active`,n.tab()===e.id),M(`aria-current`,n.tab()===e.id?`page`:null),j(),L(`name`,e.id),j(2),X(e.label)}}function tB(e,t){e&1&&F(0,eB,4,5,`button`,39,qz),e&2&&I(q().tabs())}function nB(e,t){e&1&&(R(0,`p`,14),Y(1,` Can't reach the devtools server. Check that the dev server is running, then reload. `),z())}function rB(e,t){if(e&1&&B(0,`app-code-entry`,15),e&2){let e=q();L(`client`,t)(`server`,e.server())(`pageOrigin`,e.pageOrigin)}}function iB(e,t){e&1&&B(0,`app-coming-soon`,16),e&2&&L(`info`,t)}function aB(e,t){e&1&&(R(0,`p`,17),Y(1,` This inspector is turned off in the devtools config (`),R(2,`code`),Y(3,`inspectors`),z(),Y(4,`). `),z())}function oB(e,t){if(e&1){let e=W();R(0,`app-dashboard`,44),G(`navigate`,function(t){return O(e),k(q(2).switchTab(t))}),z()}e&2&&L(`rpc`,q(2).rpc())}function sB(e,t){if(e&1){let e=W();R(0,`app-component-tree`,45),G(`focusHandled`,function(){return O(e),k(q(2).componentFocus.set(null))})(`showForm`,function(t){return O(e),k(q(2).showForm(t))}),z()}if(e&2){let e=q(2);L(`rpc`,e.rpc())(`focus`,e.componentFocus())}}function cB(e,t){e&1&&B(0,`app-route-inspector`,42),e&2&&L(`rpc`,q(2).rpc())}function lB(e,t){e&1&&B(0,`app-signal-inspector`,42),e&2&&L(`rpc`,q(2).rpc())}function uB(e,t){e&1&&B(0,`app-di-inspector`,42),e&2&&L(`rpc`,q(2).rpc())}function dB(e,t){e&1&&B(0,`app-store-inspector`,42),e&2&&L(`rpc`,q(2).rpc())}function fB(e,t){e&1&&B(0,`app-network-inspector`,42),e&2&&L(`rpc`,q(2).rpc())}function pB(e,t){if(e&1){let e=W();R(0,`app-forms-inspector`,46),G(`focusHandled`,function(){return O(e),k(q(2).formFocus.set(null))}),z()}if(e&2){let e=q(2);L(`rpc`,e.rpc())(`focus`,e.formFocus())}}function mB(e,t){e&1&&B(0,`app-pipes-inspector`,42),e&2&&L(`rpc`,q(2).rpc())}function hB(e,t){e&1&&B(0,`app-analog-inspector`,42),e&2&&L(`rpc`,q(2).rpc())}function gB(e,t){if(e&1&&N(0,oB,1,1,`app-dashboard`,42)(1,sB,1,2,`app-component-tree`,43)(2,cB,1,1,`app-route-inspector`,42)(3,lB,1,1,`app-signal-inspector`,42)(4,uB,1,1,`app-di-inspector`,42)(5,dB,1,1,`app-store-inspector`,42)(6,fB,1,1,`app-network-inspector`,42)(7,pB,1,2,`app-forms-inspector`,43)(8,mB,1,1,`app-pipes-inspector`,42)(9,hB,1,1,`app-analog-inspector`,42),e&2){let e;P((e=q().tab())===`dashboard`?0:e===`components`?1:e===`routes`?2:e===`signals`?3:e===`injectors`?4:e===`store`?5:e===`network`?6:e===`forms`?7:e===`pipes`?8:e===`analog`?9:-1)}}var _B=[`angular`,`ngrx`,`analog`,`nativescript`,`capacitor`],vB={angular:`Angular`,ngrx:`NgRx Store`,analog:`Analog`,nativescript:`NativeScript`,capacitor:`Capacitor`},yB={ngrx:`#d770e8`,analog:`#ff5470`,nativescript:`#8196ff`,capacitor:`#53b9ff`},bB={ngrx:`store`,analog:`analog`},xB={store:`ngrx`,analog:`analog`},SB={nativescript:{id:`nativescript`,name:`NativeScript`,badge:`Coming Soon`,heading:`NativeScript Support`,summary:`Inspect NativeScript Angular apps running natively on iOS and Android, with the same tools.`,color:`#3c5afd`,plans:[`Native overlay that reports the component tree from the device`,`Standalone devtools server your phone or simulator connects to`,`Example NativeScript app to try it end to end`],pr:16,author:{name:`Nathan Walker`,login:`NathanWalker`}},capacitor:{id:`capacitor`,name:`Capacitor`,badge:`Coming Soon`,heading:`Capacitor Support`,summary:`Connect Ionic and Capacitor apps running in a device WebView back to these tools.`,color:`#119eff`,plans:[`Manual overlay start for apps that load from capacitor:// or a device`,`Connection settings passed in, no cross-origin probing`,`Setup guides for the Android emulator and iOS simulator`],pr:21,author:{name:`Erkam Yaman`,login:`erkamyaman`}}},CB={id:`analog`,name:`Analog`,badge:`Not in this app`,heading:`This app doesn’t use Analog`,summary:`In an Analog app this dock shows your file routes, server load() and API calls, render modes and route lint.`,color:`#dd0330`,plans:[`Which page, layout and .server.ts files render a URL`,`Every load(), server function and API call with timing`,`SSR, prerendered or client only, per page`],link:{label:`Get started with Analog`,href:`https://analogjs.org/docs/getting-started`}};function wB(){let e=new URLSearchParams(location.search).get(`view`);return _B.find(t=>t===e)??null}var TB=class e{analog=A(!1);allTabs=[{id:`dashboard`,label:`Dashboard`},{id:`analog`,label:`Analog`},{id:`components`,label:`Components`},{id:`routes`,label:`Routes`},{id:`signals`,label:`Signals`},{id:`injectors`,label:`Injectors`},{id:`store`,label:`Store`},{id:`forms`,label:`Forms`},{id:`pipes`,label:`Pipes`},{id:`network`,label:`SSR & HTTP`}];view=A(wB());viewAccent=Q(()=>{let e=this.view();return(e&&yB[e])??null});title=Q(()=>{let e=this.view();return e?vB[e]:`Angular DevTools`});analogKnown=A(!1);comingSoon=Q(()=>{let e=this.view();return e===`analog`?this.analogKnown()&&!this.analog()?CB:void 0:e?SB[e]:void 0});config=Q(()=>ET(this.rpc()));tabEnabled=kT;tabs=Q(()=>{if(this.comingSoon())return[];let e=this.view(),t=e?bB[e]:void 0,n=this.allTabs.filter(e=>kT(e.id,this.config()));return t?n.filter(e=>e.id===t):n.filter(t=>(t.id!==`analog`||this.analog())&&!(e===`angular`&&xB[t.id]))});tab=nv(()=>{let e=this.view();return e&&bB[e]||`dashboard`});rpc=A(null);connected=A(!1);connectionFailed=A(!1);client=A(null);trust=A(`pending`);needsCode=Q(()=>this.trust()===`needs-code`);server=A(``);pageOrigin=location.origin;statusLabel=Q(()=>this.connected()?`Live`:this.connectionFailed()?`Disconnected`:this.needsCode()?`Code needed`:`Connecting…`);stopTrust=()=>{};stopFollowing=()=>{};nav=hv(`nav`);main=hv(`main`);injector=E(Ss);navObserver;navFade=A({start:!1,end:!1});constructor(){wd(()=>{let e=this.nav()?.nativeElement;e&&typeof ResizeObserver<`u`&&(this.navObserver=new ResizeObserver(()=>this.measureNav()),this.navObserver.observe(e))}),jv(()=>{this.tab(),this.tabs(),ev(()=>{this.revealActiveTab(),this.measureNav()})})}measureNav(){let e=this.nav()?.nativeElement;if(!e)return;let t=e.scrollWidth-e.clientWidth,n=e.scrollLeft>1,r=t>1&&e.scrollLeftn?e.scrollLeft=Math.max(0,n):e.scrollLeftthis.showView(e)));try{window.parent!==window&&Ez(window.parent.document)}catch{}let e=new URLSearchParams(location.hash.replace(/^#/,``)).get(`tab`);e&&this.tabs().some(t=>t.id===e)&&this.tab.set(e);let t=OB(),n=Fz(t,location.href);this.server.set(n),aT({...t?{baseURL:t}:{},authToken:Rz(n,this.pageOrigin),simpleAuth:!1}).then(e=>{this.client.set(e),this.connected.set(e.status===`connected`),e.events.on(`connection:status`,e=>{this.connected.set(e===`connected`)}),this.stopTrust=Pz(e,t=>{this.trust.set(t),t===`trusted`&&!this.rpc()&&this.start(e)})},()=>{this.connectionFailed.set(!0),this.analogKnown.set(!0)})}start(e){this.rpc.set(e),e.scope(`ng-devtools`).rpc.call(`analog-project`).then(e=>{let t=!!e?.analog;this.analog.set(t),this.analogKnown.set(!0),!t&&this.tab()===`analog`&&!this.view()&&this.tab.set(`dashboard`)},()=>{this.analogKnown.set(!0),this.tab()===`analog`&&!this.view()&&this.tab.set(`dashboard`)})}ngOnDestroy(){this.stopFollowing(),this.stopTrust(),this.navObserver?.disconnect()}showView(e){if(e===this.view())return;this.view.set(e);let t=new URL(location.href);t.searchParams.set(`view`,e),t.hash=``,history.replaceState(history.state,``,t)}formFocus=A(null);componentFocus=nv({source:this.tab,computation:()=>null});showForm(e){this.formFocus.set({id:e}),this.switchTab(`forms`)}inspectFromPanel({source:e,origin:t,data:n}){if(e!==window.parent||t!==location.origin)return;let r=n;r?.type===`ng-devtools:inspect-component`&&typeof r.id==`string`&&this.tab()===`components`&&this.config().inspectors.components&&this.componentFocus.set({id:r.id})}switchTab(e){let t=xB[e];if(this.view()===`angular`&&t){this.activateDock(t,e);return}this.setTab(e),history.replaceState(history.state,``,`#tab=${e}`)}setTab(e){this.keepFocus(),this.tab.set(e)}keepFocus(){let e=document.activeElement,t=this.main()?.nativeElement;(!e||e===document.body||t?.contains(e))&&wd(()=>{let e=document.activeElement;e&&e!==document.body||(this.nav()?.nativeElement.querySelector(`button.active`)??this.main()?.nativeElement)?.focus()},{injector:this.injector})}async activateDock(e,t){if(await jz(e))return;if(window.parent===window){this.keepFocus(),this.showView(e);return}let n=this.rpc();if(!n?.call){this.setTab(t);return}try{await n.call(`hub:docks:activate`,{dockId:`ng-devtools:${e}`}),this.keepFocus(),this.showView(e)}catch{this.setTab(t)}}static ɵfac=function(t){return new(t||e)};static ɵcmp=Oh({type:e,selectors:[[`app-root`]],viewQuery:function(e,t){e&1&&Ng(t.nav,Gz,5)(t.main,Kz,5),e&2&&Pg(2)},hostVars:2,hostBindings:function(e,t){e&1&&G(`message`,function(e){return t.inspectFromPanel(e)},yu),e&2&&n_(`--%NS%accent`,t.viewAccent())},decls:25,vars:19,consts:[[`nav`,``],[`main`,``],[1,`brand`],[1,`mark`],[`width`,`22`,`height`,`22`,`viewBox`,`0 0 256 256`,`aria-hidden`,`true`],[`width`,`24`,`height`,`17`,`viewBox`,`0 0 256 182`,`aria-hidden`,`true`],[`width`,`22`,`height`,`22`,`viewBox`,`0 0 24 24`,`fill`,`currentColor`,`aria-hidden`,`true`],[`width`,`20`,`height`,`22`,`viewBox`,`0 0 223 236`,`aria-hidden`,`true`],[`width`,`20`,`height`,`22`,`viewBox`,`0 0 223 236`,`fill`,`currentColor`,`aria-hidden`,`true`],[1,`title`],[`aria-label`,`Inspectors`,3,`scroll`],[`role`,`status`,1,`status`],[`aria-hidden`,`true`,1,`dot`],[`tabindex`,`-1`],[`role`,`alert`,1,`connection-error`],[3,`client`,`server`,`pageOrigin`],[3,`info`],[1,`turned-off`],[`fill`,`#3c5afd`,`d`,`M237.248 18.752q18.061 18.06 18.748 45.247V192c-.457 18.12-6.707 33.207-18.748 45.247c-12.04 12.04-27.127 18.291-45.251 18.752H63.999q-27.187-.69-45.247-18.752C6.712 225.208.46 210.121 0 192.001V64q.69-27.187 18.752-45.247Q36.812.692 63.999 0h127.998c18.124.46 33.211 6.711 45.251 18.752m-17.655 103q-6.033-6.003-6.28-15.066V64q-.192-9.063-6.221-15.091c-4.02-4.023-9.054-6.093-15.095-6.22h-21.312v106.626L85.315 42.687H63.999c-6.042.128-11.072 2.198-15.091 6.221c-4.023 4.02-6.093 9.05-6.22 15.09v42.688q-.249 9.063-6.281 15.066q-6.03 5.996-15.091 6.246q9.062.255 15.09 6.25c4.024 4.002 6.115 9.024 6.281 15.066V192c.128 6.037 2.198 11.072 6.221 15.091q6.03 6.03 15.09 6.22h21.317V106.687l85.37 106.627h21.312c6.041-.128 11.076-2.202 15.095-6.221s6.093-9.054 6.22-15.09v-42.688q.249-9.063 6.281-15.066q6.03-5.995 15.091-6.25q-9.062-.25-15.09-6.246`],[`fill`,`#53b9ff`,`d`,`M39.863 54.115L.311 93.716l60.995 61.179L0 216.385l39.428 39.619l61.43-61.507l61.097 61.068l39.552-39.602z`],[`fill`,`#119eff`,`d`,`m140.517 154.896l-39.658 39.601l61.097 61.069l39.552-39.602z`],[`fill-opacity`,`.2`,`d`,`m140.517 154.896l-39.658 39.601l15.267 15.182z`],[`fill`,`#53b9ff`,`d`,`M194.57 100.985L256 39.478L216.431 0l-61.412 61.384L93.917.311L54.365 39.913L216.01 201.761l39.552-39.602z`],[`fill`,`#119eff`,`d`,`m115.36 100.987l39.659-39.602L93.917.313L54.365 39.914z`],[`fill-opacity`,`.2`,`d`,`m115.359 100.985l39.659-39.601l-15.271-15.186z`],[`fill`,`#c30f2e`,`d`,`M152.228.001L48.455 181.046H256L152.228 0z`],[`fill`,`#dd0330`,`d`,`M88.314 26.967L0 181.52h176.628L88.315 26.967z`],[`fill`,`#fff`,`d`,`M18.167 135.294h220.236v-2.419H18.167z`],[`fill`,`#fff`,`d`,`M204.38 170.667c-.861 0-1.67-.358-2.348-1.034c-4.045-4.063-4.221-20.586-4.026-45.33c.11-13.521.257-32.043-1.9-33.504c-2.104.873-2.315 16.172-2.451 26.301c-.162 11.785-.327 23.98-2.242 30.189c-.57 1.84-1.306 3.525-2.786 3.39c-2.086-.185-2.76-3.48-4.317-16.478c-.647-5.4-1.317-10.98-2.101-13.14a11 11 0 0 0-.269-.66c-.835 1.889-1.8 7.079-2.47 10.682c-.927 4.976-1.803 9.676-2.9 11.726c-.847 1.575-2.19 3.63-4.067 3.231c-2.558-.537-3.323-5.693-3.552-8.719c0-25.455-3.33-28.417-3.997-28.753l-.107.081l-.162-.036c-2.377 1.038-2.506 9.294-2.627 17.276c-.096 5.856-.198 12.492-1.053 18.701c-1.108 8.05-2.448 9.603-4.115 9.507c-3.838-.262-3.95-13.482-3.95-14.987c0-.472.012-1.028.027-1.642c.074-3.076.205-8.8-1.687-10.604c-.25-.239-.603-.515-.879-.437c-1.347.339-2.745 4.714-3.209 6.153c-.147.457-.265.833-.364 1.09c-.078.214-.177.515-.294.88c-1.02 3.095-2.18 6.183-4.16 6.944c-.732.284-1.498.222-2.216-.183c-.953-.541-1.73-1.646-2.455-3.482c-.397-1.016-.735-2.046-1.082-3.081c-.419-1.263-.85-2.569-1.384-3.808c-.419-.965-1.464-1.4-2.796-1.164c-2.768.494-3.232 3.29-3.622 7.5c-.07.733-.137 1.452-.228 2.128c-.011.198-.501 6.38-.814 8.344c-.865 5.39-2.002 7.512-3.89 7.358c-4.66-.398-6.798-20.836-6.684-29.47c.088-6.592-1.104-9-1.818-9.382c-.074-.034-.189-.096-.46.095c-.843.571-1.594 2.348-1.363 4.215c2.566 20.32.674 43.592-3.96 48.833c-1.46 1.649-3.448 1.627-4.832.236c-4.049-4.064-4.218-20.586-4.026-45.33c.11-13.521.254-32.043-1.9-33.504c-2.105.873-2.311 16.172-2.45 26.301c-.163 11.785-.329 23.98-2.246 30.189c-.57 1.84-1.307 3.525-2.782 3.39c-2.091-.186-2.761-3.48-4.321-16.478c-.649-5.4-1.319-10.98-2.101-13.14c-.1-.273-.189-.49-.27-.66c-.832 1.889-1.796 7.079-2.466 10.682c-.927 4.976-1.803 9.676-2.904 11.726c-.846 1.575-2.19 3.63-4.063 3.231c-2.558-.537-3.324-5.693-3.552-8.719c-.003-25.455-3.33-28.417-3.997-28.753l-.106.081l-.166-.036c-2.374 1.038-2.503 9.293-2.629 17.276c-.091 5.856-.194 12.492-1.048 18.701c-1.107 8.05-2.437 9.618-4.111 9.507c-3.846-.262-3.958-13.482-3.958-14.987c0-.472.016-1.028.03-1.642c.074-3.076.207-8.8-1.685-10.604c-.25-.239-.603-.515-.88-.438c-1.347.34-2.75 4.715-3.206 6.155a47 47 0 0 1-.364 1.09q-.16.432-.298.875c-1.02 3.096-2.18 6.187-4.155 6.95c-.736.282-1.506.22-2.22-.185c-.953-.541-1.734-1.646-2.454-3.482c-.398-1.016-.74-2.046-1.083-3.081c-.42-1.263-.854-2.569-1.387-3.808c-.416-.965-1.465-1.4-2.797-1.164c-3.188.567-3.943 4.52-4.55 9.238l-.106.839l-2.411-.32l.114-.824c.527-4.137 1.328-10.39 6.53-11.31c2.446-.435 4.585.581 5.446 2.583c.578 1.34 1.031 2.695 1.466 4.008c.324.99.654 1.98 1.037 2.959c.674 1.708 1.197 2.15 1.392 2.257c1.218-.38 2.462-4.167 2.873-5.414c.13-.402.24-.732.328-.968c.085-.233.195-.571.328-.98c1.097-3.43 2.474-7.144 4.918-7.762c.747-.191 1.903-.166 3.157 1.035c2.665 2.544 2.525 8.48 2.433 12.41c-.014.59-.028 1.126-.028 1.583c0 6.272.93 10.655 1.64 12.16c.367-.77.998-2.63 1.598-7.007c.831-6.066.938-12.624 1.027-18.41c.161-10.24.275-17.663 3.982-19.408c.552-.339 1.469-.522 2.436-.033c3.586 1.803 5.326 11.885 5.326 30.817c.225 2.926 1.013 6.006 1.66 6.448c.004-.066.53-.39 1.394-2.01c.925-1.718 1.845-6.665 2.655-11.026c1.792-9.614 2.606-12.989 4.726-13.166c1.615-.158 2.362 1.896 2.676 2.76c.883 2.422 1.537 7.888 2.23 13.678c.54 4.49 1.31 10.902 2.094 13.497c.084-.228.18-.5.283-.836c1.815-5.878 1.98-17.887 2.14-29.507c.22-16.14.503-26.139 3.448-28.226a2.44 2.44 0 0 1 2.233-.316c3.448 1.144 3.714 11.254 3.519 35.8c-.14 17.799-.313 39.952 3.323 43.603c.317.32.542.32.622.32c.17 0 .413-.161.67-.452c3.681-4.162 6.01-26.022 3.372-46.927c-.328-2.602.677-5.337 2.392-6.514c.946-.652 2.036-.736 2.978-.232c2.145 1.14 3.187 5.024 3.102 11.546c-.15 11.387 2.584 24.714 4.37 26.842c.282-.471.842-1.763 1.379-5.145c.301-1.87.799-8.153.806-8.216c.09-.71.155-1.398.217-2.097c.369-3.924.82-8.804 5.613-9.654c2.444-.435 4.583.577 5.448 2.583c.577 1.34 1.027 2.695 1.46 4.008c.332.99.664 1.98 1.046 2.959c.67 1.708 1.197 2.15 1.387 2.257c1.218-.38 2.467-4.167 2.875-5.41c.132-.402.243-.737.328-.973c.088-.228.195-.57.324-.979c1.1-3.43 2.477-7.144 4.924-7.762c.74-.191 1.9-.166 3.154 1.035c2.665 2.543 2.526 8.48 2.437 12.41q-.029.792-.033 1.583c0 6.272.931 10.655 1.641 12.16c.365-.77.994-2.63 1.601-7.007c.832-6.066.931-12.624 1.027-18.41c.159-10.24.273-17.663 3.98-19.408c.55-.339 1.467-.522 2.44-.033c3.58 1.803 5.325 11.884 5.325 30.817c.224 2.926 1.012 6.006 1.656 6.448c.008-.066.526-.39 1.399-2.01c.923-1.718 1.84-6.665 2.653-11.026c1.786-9.614 2.602-12.989 4.722-13.166c1.62-.158 2.367 1.896 2.68 2.76c.88 2.422 1.535 7.888 2.233 13.678c.534 4.49 1.304 10.902 2.092 13.497c.08-.228.176-.5.28-.836c1.813-5.878 1.976-17.887 2.138-29.507c.216-16.14.504-26.139 3.448-28.226a2.45 2.45 0 0 1 2.234-.316c3.452 1.144 3.718 11.254 3.52 35.8c-.141 17.799-.314 39.952 3.319 43.603c.324.32.544.32.63.32c.165 0 .408-.161.662-.452c3.687-4.162 6.014-26.022 3.375-46.927c-.342-2.723.43-5.47 1.84-6.526c.71-.537 1.575-.647 2.37-.313c2.054.877 3.445 4.63 4.255 11.484c.339 2.87.641 5.974.931 9.036c.641 6.683 1.509 15.69 2.684 17.67c.36-.46 1.096-1.704 2.19-5.038l2.307.753c-1.696 5.157-3.026 7.1-4.755 6.902c-2.69-.299-3.468-5.734-4.84-20.055c-.29-3.048-.59-6.132-.928-8.989c-1.03-8.74-2.782-9.532-2.801-9.54c-.342.174-1.137 1.992-.842 4.31c2.558 20.32.673 43.597-3.964 48.834c-.747.842-1.587 1.27-2.485 1.27`],[`d`,`M12.024.017V0L12 .008L11.976 0v.017L.812 3.892l1.605 14.875l9.559 5.207V24l.024-.013l.024.013v-.026l9.559-5.207l1.605-14.875zm6.868 14.244q-1.64 3.948-6.031 4.166c-2.829 0-4.661-1.7-4.66-1.7q-1.745-1.359-2.398-3.417c-.695-.76-.702-.841-.774-1.145c-.072-.303.045-.388.249-.685q.204-.298.098-.85q-.26-.36-.3-1.128q0-.37.496-.783q.495-.413.607-.632q.083-.119.065-1.031q-.006-.897.995-.975c1-.08 1.565-.832 1.879-1.174c.21-.228.52-.339.91-.341c.551-.026 1.052.185 1.484.62c1.075-.055 2.176.235 3.292.863q2.379 1.414 2.596 3.055q-.257 2.158-5.788-.113q-2.895.819-2.846 3.552q0 2.508 2.422 3.643c-.787-.772-1.122-1.422-1.01-1.959q2.456 2.906 5.588 2.173c-.92.032-1.65-.264-2.198-.893q2.116-.05 3.998-1.972c-.724.576-1.482.794-2.284.657q3.26-2.563 2.307-5.98l-.002-.006a3.02 3.02 0 0 1 .788 2.03q.023 1.175-.795 2.477q.613-.478 1.413-2.047c.23 2.117-.625 3.724-2.574 4.825q.934-.085 2.473-1.23m-5.567-6.63a.319.319 0 1 1 .638 0a.319.319 0 0 1-.638 0`],[`id`,`ng-grad`,`x1`,`49`,`x2`,`226`,`y1`,`214`,`y2`,`130`,`gradientUnits`,`userSpaceOnUse`],[`stop-color`,`#E40035`],[`offset`,`.24`,`stop-color`,`#F60A48`],[`offset`,`.352`,`stop-color`,`#F20755`],[`offset`,`.494`,`stop-color`,`#DC087D`],[`offset`,`.745`,`stop-color`,`#9717E7`],[`offset`,`1`,`stop-color`,`#6C00F5`],[`fill`,`url(#ng-grad)`,`d`,`m222.077 39.192-8.019 125.923L137.387 0l84.69 39.192Zm-53.105 162.825-57.933 33.056-57.934-33.056 11.783-28.556h92.301l11.783 28.556ZM111.039 62.675l30.357 73.803H80.681l30.358-73.803ZM7.937 165.115 0 39.192 84.69 0 7.937 165.115Z`],[`d`,`m222.077 39.192-8.019 125.923L137.387 0l84.69 39.192Zm-53.105 162.825-57.933 33.056-57.934-33.056 11.783-28.556h92.301l11.783 28.556ZM111.039 62.675l30.357 73.803H80.681l30.358-73.803ZM7.937 165.115 0 39.192 84.69 0 7.937 165.115Z`],[`type`,`button`,3,`active`],[`type`,`button`,3,`click`],[3,`name`],[3,`rpc`],[3,`rpc`,`focus`],[3,`navigate`,`rpc`],[3,`focusHandled`,`showForm`,`rpc`,`focus`],[3,`focusHandled`,`rpc`,`focus`]],template:function(e,t){if(e&1&&(R(0,`header`)(1,`h1`,2)(2,`span`,3),N(3,Jz,2,0,`:svg:svg`,4)(4,Yz,7,0,`:svg:svg`,4)(5,Xz,5,0,`:svg:svg`,5)(6,Zz,2,0,`:svg:svg`,6)(7,Qz,10,0,`:svg:svg`,7)(8,$z,2,0,`:svg:svg`,8),z(),R(9,`span`,9),Y(10),z()(),R(11,`nav`,10,0),G(`scroll`,function(){return t.measureNav()}),N(13,tB,2,0),z(),R(14,`span`,11)(15,`span`,12),B(16,`span`),z(),Y(17),z()(),R(18,`main`,13,1),N(20,nB,2,0,`p`,14)(21,rB,1,3,`app-code-entry`,15)(22,iB,1,1,`app-coming-soon`,16)(23,aB,5,0,`p`,17)(24,gB,10,1),z()),e&2){let e;j(2),J(`ng-mark`,t.view()===`angular`),j(),P(t.view()===`nativescript`?3:t.view()===`capacitor`?4:t.view()===`analog`?5:t.view()===`ngrx`?6:t.view()===`angular`?7:8),j(6),J(`ng-text`,t.view()===`angular`),j(),X(t.title()),j(),J(`fade-start`,t.navFade().start)(`fade-end`,t.navFade().end),j(2),P(t.tabs().length>1?13:-1),j(),J(`connected`,t.connected())(`failed`,t.connectionFailed())(`locked`,t.needsCode()),j(3),Z(` `,t.statusLabel(),` `),j(3),P(t.connectionFailed()?20:(e=t.needsCode()&&t.client())?21:(e=t.comingSoon())?22:t.tabEnabled(t.tab(),t.config())?24:23,e)}},dependencies:[lE,vD,GA,jj,LM,QN,WF,BI,DR,_z,wz,BT,Wz],styles:[`[_nghost-%COMP%] { +}`]})},qz=[`nav`],Jz=[`main`],Yz=(e,t)=>t.id;function Xz(e,t){e&1&&(ps(),R(0,`svg`,4),B(1,`path`,18),z())}function Zz(e,t){e&1&&(ps(),R(0,`svg`,4),B(1,`path`,19)(2,`path`,20)(3,`path`,21)(4,`path`,22)(5,`path`,23)(6,`path`,24),z())}function Qz(e,t){e&1&&(ps(),R(0,`svg`,5),B(1,`path`,25)(2,`path`,26)(3,`path`,27)(4,`path`,28),z())}function $z(e,t){e&1&&(ps(),R(0,`svg`,6),B(1,`path`,29),z())}function eB(e,t){e&1&&(ps(),R(0,`svg`,7)(1,`defs`)(2,`linearGradient`,30),B(3,`stop`,31)(4,`stop`,32)(5,`stop`,33)(6,`stop`,34)(7,`stop`,35)(8,`stop`,36),z()(),B(9,`path`,37),z())}function tB(e,t){e&1&&(ps(),R(0,`svg`,8),B(1,`path`,38),z())}function nB(e,t){if(e&1){let e=W();R(0,`button`,40),G(`click`,function(){let t=O(e).$implicit;return k(q(2).switchTab(t.id))}),B(1,`app-tab-icon`,41),R(2,`span`),Y(3),z()()}if(e&2){let e=t.$implicit,n=q(2);J(`active`,n.tab()===e.id),M(`aria-current`,n.tab()===e.id?`page`:null),j(),L(`name`,e.id),j(2),X(e.label)}}function rB(e,t){e&1&&F(0,nB,4,5,`button`,39,Yz),e&2&&I(q().tabs())}function iB(e,t){e&1&&(R(0,`p`,14),Y(1,` Can't reach the devtools server. Check that the dev server is running, then reload. `),z())}function aB(e,t){if(e&1&&B(0,`app-code-entry`,15),e&2){let e=q();L(`client`,t)(`server`,e.server())(`pageOrigin`,e.pageOrigin)}}function oB(e,t){e&1&&B(0,`app-coming-soon`,16),e&2&&L(`info`,t)}function sB(e,t){e&1&&(R(0,`p`,17),Y(1,` This inspector is turned off in the devtools config (`),R(2,`code`),Y(3,`inspectors`),z(),Y(4,`). `),z())}function cB(e,t){if(e&1){let e=W();R(0,`app-dashboard`,44),G(`navigate`,function(t){return O(e),k(q(2).switchTab(t))}),z()}e&2&&L(`rpc`,q(2).rpc())}function lB(e,t){if(e&1){let e=W();R(0,`app-component-tree`,45),G(`focusHandled`,function(){return O(e),k(q(2).componentFocus.set(null))})(`showForm`,function(t){return O(e),k(q(2).showForm(t))}),z()}if(e&2){let e=q(2);L(`rpc`,e.rpc())(`focus`,e.componentFocus())}}function uB(e,t){e&1&&B(0,`app-route-inspector`,42),e&2&&L(`rpc`,q(2).rpc())}function dB(e,t){e&1&&B(0,`app-signal-inspector`,42),e&2&&L(`rpc`,q(2).rpc())}function fB(e,t){e&1&&B(0,`app-di-inspector`,42),e&2&&L(`rpc`,q(2).rpc())}function pB(e,t){e&1&&B(0,`app-store-inspector`,42),e&2&&L(`rpc`,q(2).rpc())}function mB(e,t){e&1&&B(0,`app-network-inspector`,42),e&2&&L(`rpc`,q(2).rpc())}function hB(e,t){if(e&1){let e=W();R(0,`app-forms-inspector`,46),G(`focusHandled`,function(){return O(e),k(q(2).formFocus.set(null))}),z()}if(e&2){let e=q(2);L(`rpc`,e.rpc())(`focus`,e.formFocus())}}function gB(e,t){e&1&&B(0,`app-pipes-inspector`,42),e&2&&L(`rpc`,q(2).rpc())}function _B(e,t){e&1&&B(0,`app-analog-inspector`,42),e&2&&L(`rpc`,q(2).rpc())}function vB(e,t){if(e&1&&N(0,cB,1,1,`app-dashboard`,42)(1,lB,1,2,`app-component-tree`,43)(2,uB,1,1,`app-route-inspector`,42)(3,dB,1,1,`app-signal-inspector`,42)(4,fB,1,1,`app-di-inspector`,42)(5,pB,1,1,`app-store-inspector`,42)(6,mB,1,1,`app-network-inspector`,42)(7,hB,1,2,`app-forms-inspector`,43)(8,gB,1,1,`app-pipes-inspector`,42)(9,_B,1,1,`app-analog-inspector`,42),e&2){let e;P((e=q().tab())===`dashboard`?0:e===`components`?1:e===`routes`?2:e===`signals`?3:e===`injectors`?4:e===`store`?5:e===`network`?6:e===`forms`?7:e===`pipes`?8:e===`analog`?9:-1)}}var yB=[`angular`,`ngrx`,`analog`,`nativescript`,`capacitor`],bB={angular:`Angular`,ngrx:`NgRx Store`,analog:`Analog`,nativescript:`NativeScript`,capacitor:`Capacitor`},xB={ngrx:`#d770e8`,analog:`#ff5470`,nativescript:`#8196ff`,capacitor:`#53b9ff`},SB={ngrx:`store`,analog:`analog`},CB={store:`ngrx`,analog:`analog`},wB={nativescript:{id:`nativescript`,name:`NativeScript`,badge:`Coming Soon`,heading:`NativeScript Support`,summary:`Inspect NativeScript Angular apps running natively on iOS and Android, with the same tools.`,color:`#3c5afd`,plans:[`Native overlay that reports the component tree from the device`,`Standalone devtools server your phone or simulator connects to`,`Example NativeScript app to try it end to end`],pr:16,author:{name:`Nathan Walker`,login:`NathanWalker`}},capacitor:{id:`capacitor`,name:`Capacitor`,badge:`Coming Soon`,heading:`Capacitor Support`,summary:`Connect Ionic and Capacitor apps running in a device WebView back to these tools.`,color:`#119eff`,plans:[`Manual overlay start for apps that load from capacitor:// or a device`,`Connection settings passed in, no cross-origin probing`,`Setup guides for the Android emulator and iOS simulator`],pr:21,author:{name:`Erkam Yaman`,login:`erkamyaman`}}},TB={id:`analog`,name:`Analog`,badge:`Not in this app`,heading:`This app doesn’t use Analog`,summary:`In an Analog app this dock shows your file routes, server load() and API calls, render modes and route lint.`,color:`#dd0330`,plans:[`Which page, layout and .server.ts files render a URL`,`Every load(), server function and API call with timing`,`SSR, prerendered or client only, per page`],link:{label:`Get started with Analog`,href:`https://analogjs.org/docs/getting-started`}};function EB(){let e=new URLSearchParams(location.search).get(`view`);return yB.find(t=>t===e)??null}var DB=class e{analog=A(!1);allTabs=[{id:`dashboard`,label:`Dashboard`},{id:`analog`,label:`Analog`},{id:`components`,label:`Components`},{id:`routes`,label:`Routes`},{id:`signals`,label:`Signals`},{id:`injectors`,label:`Injectors`},{id:`store`,label:`Store`},{id:`forms`,label:`Forms`},{id:`pipes`,label:`Pipes`},{id:`network`,label:`SSR & HTTP`}];view=A(EB());viewAccent=Q(()=>{let e=this.view();return(e&&xB[e])??null});title=Q(()=>{let e=this.view();return e?bB[e]:`Angular DevTools`});analogKnown=A(!1);comingSoon=Q(()=>{let e=this.view();return e===`analog`?this.analogKnown()&&!this.analog()?TB:void 0:e?wB[e]:void 0});config=Q(()=>ET(this.rpc()));tabEnabled=kT;tabs=Q(()=>{if(this.comingSoon())return[];let e=this.view(),t=e?SB[e]:void 0,n=this.allTabs.filter(e=>kT(e.id,this.config()));return t?n.filter(e=>e.id===t):n.filter(t=>(t.id!==`analog`||this.analog())&&!(e===`angular`&&CB[t.id]))});tab=nv(()=>{let e=this.view();return e&&SB[e]||`dashboard`});rpc=A(null);connected=A(!1);connectionFailed=A(!1);client=A(null);trust=A(`pending`);needsCode=Q(()=>this.trust()===`needs-code`);server=A(``);pageOrigin=location.origin;statusLabel=Q(()=>this.connected()?`Live`:this.connectionFailed()?`Disconnected`:this.needsCode()?`Code needed`:`Connecting…`);stopTrust=()=>{};stopFollowing=()=>{};nav=hv(`nav`);main=hv(`main`);injector=E(Ss);navObserver;navFade=A({start:!1,end:!1});constructor(){wd(()=>{let e=this.nav()?.nativeElement;e&&typeof ResizeObserver<`u`&&(this.navObserver=new ResizeObserver(()=>this.measureNav()),this.navObserver.observe(e))}),jv(()=>{this.tab(),this.tabs(),ev(()=>{this.revealActiveTab(),this.measureNav()})})}measureNav(){let e=this.nav()?.nativeElement;if(!e)return;let t=e.scrollWidth-e.clientWidth,n=e.scrollLeft>1,r=t>1&&e.scrollLeftn?e.scrollLeft=Math.max(0,n):e.scrollLeftthis.showView(e)));try{window.parent!==window&&Ez(window.parent.document)}catch{}let e=new URLSearchParams(location.hash.replace(/^#/,``)).get(`tab`);e&&this.tabs().some(t=>t.id===e)&&this.tab.set(e);let t=AB(),n=Fz(t,location.href);this.server.set(n),aT({...t?{baseURL:t}:{},authToken:zz(n,this.pageOrigin),simpleAuth:!1}).then(e=>{Bz(e,n,this.pageOrigin),this.client.set(e),this.connected.set(e.status===`connected`),e.events.on(`connection:status`,e=>{this.connected.set(e===`connected`)}),this.stopTrust=Pz(e,t=>{this.trust.set(t),t===`trusted`&&!this.rpc()&&this.start(e)})},()=>{this.connectionFailed.set(!0),this.analogKnown.set(!0)})}start(e){this.rpc.set(e),e.scope(`ng-devtools`).rpc.call(`analog-project`).then(e=>{let t=!!e?.analog;this.analog.set(t),this.analogKnown.set(!0),!t&&this.tab()===`analog`&&!this.view()&&this.tab.set(`dashboard`)},()=>{this.analogKnown.set(!0),this.tab()===`analog`&&!this.view()&&this.tab.set(`dashboard`)})}ngOnDestroy(){this.stopFollowing(),this.stopTrust(),this.navObserver?.disconnect()}showView(e){if(e===this.view())return;this.view.set(e);let t=new URL(location.href);t.searchParams.set(`view`,e),t.hash=``,history.replaceState(history.state,``,t)}formFocus=A(null);componentFocus=nv({source:this.tab,computation:()=>null});showForm(e){this.formFocus.set({id:e}),this.switchTab(`forms`)}inspectFromPanel({source:e,origin:t,data:n}){if(e!==window.parent||t!==location.origin)return;let r=n;r?.type===`ng-devtools:inspect-component`&&typeof r.id==`string`&&this.tab()===`components`&&this.config().inspectors.components&&this.componentFocus.set({id:r.id})}switchTab(e){let t=CB[e];if(this.view()===`angular`&&t){this.activateDock(t,e);return}this.setTab(e),history.replaceState(history.state,``,`#tab=${e}`)}setTab(e){this.keepFocus(),this.tab.set(e)}keepFocus(){let e=document.activeElement,t=this.main()?.nativeElement;(!e||e===document.body||t?.contains(e))&&wd(()=>{let e=document.activeElement;e&&e!==document.body||(this.nav()?.nativeElement.querySelector(`button.active`)??this.main()?.nativeElement)?.focus()},{injector:this.injector})}async activateDock(e,t){if(await jz(e))return;if(window.parent===window){this.keepFocus(),this.showView(e);return}let n=this.rpc();if(!n?.call){this.setTab(t);return}try{await n.call(`hub:docks:activate`,{dockId:`ng-devtools:${e}`}),this.keepFocus(),this.showView(e)}catch{this.setTab(t)}}static ɵfac=function(t){return new(t||e)};static ɵcmp=Oh({type:e,selectors:[[`app-root`]],viewQuery:function(e,t){e&1&&Ng(t.nav,qz,5)(t.main,Jz,5),e&2&&Pg(2)},hostVars:2,hostBindings:function(e,t){e&1&&G(`message`,function(e){return t.inspectFromPanel(e)},yu),e&2&&n_(`--%NS%accent`,t.viewAccent())},decls:25,vars:19,consts:[[`nav`,``],[`main`,``],[1,`brand`],[1,`mark`],[`width`,`22`,`height`,`22`,`viewBox`,`0 0 256 256`,`aria-hidden`,`true`],[`width`,`24`,`height`,`17`,`viewBox`,`0 0 256 182`,`aria-hidden`,`true`],[`width`,`22`,`height`,`22`,`viewBox`,`0 0 24 24`,`fill`,`currentColor`,`aria-hidden`,`true`],[`width`,`20`,`height`,`22`,`viewBox`,`0 0 223 236`,`aria-hidden`,`true`],[`width`,`20`,`height`,`22`,`viewBox`,`0 0 223 236`,`fill`,`currentColor`,`aria-hidden`,`true`],[1,`title`],[`aria-label`,`Inspectors`,3,`scroll`],[`role`,`status`,1,`status`],[`aria-hidden`,`true`,1,`dot`],[`tabindex`,`-1`],[`role`,`alert`,1,`connection-error`],[3,`client`,`server`,`pageOrigin`],[3,`info`],[1,`turned-off`],[`fill`,`#3c5afd`,`d`,`M237.248 18.752q18.061 18.06 18.748 45.247V192c-.457 18.12-6.707 33.207-18.748 45.247c-12.04 12.04-27.127 18.291-45.251 18.752H63.999q-27.187-.69-45.247-18.752C6.712 225.208.46 210.121 0 192.001V64q.69-27.187 18.752-45.247Q36.812.692 63.999 0h127.998c18.124.46 33.211 6.711 45.251 18.752m-17.655 103q-6.033-6.003-6.28-15.066V64q-.192-9.063-6.221-15.091c-4.02-4.023-9.054-6.093-15.095-6.22h-21.312v106.626L85.315 42.687H63.999c-6.042.128-11.072 2.198-15.091 6.221c-4.023 4.02-6.093 9.05-6.22 15.09v42.688q-.249 9.063-6.281 15.066q-6.03 5.996-15.091 6.246q9.062.255 15.09 6.25c4.024 4.002 6.115 9.024 6.281 15.066V192c.128 6.037 2.198 11.072 6.221 15.091q6.03 6.03 15.09 6.22h21.317V106.687l85.37 106.627h21.312c6.041-.128 11.076-2.202 15.095-6.221s6.093-9.054 6.22-15.09v-42.688q.249-9.063 6.281-15.066q6.03-5.995 15.091-6.25q-9.062-.25-15.09-6.246`],[`fill`,`#53b9ff`,`d`,`M39.863 54.115L.311 93.716l60.995 61.179L0 216.385l39.428 39.619l61.43-61.507l61.097 61.068l39.552-39.602z`],[`fill`,`#119eff`,`d`,`m140.517 154.896l-39.658 39.601l61.097 61.069l39.552-39.602z`],[`fill-opacity`,`.2`,`d`,`m140.517 154.896l-39.658 39.601l15.267 15.182z`],[`fill`,`#53b9ff`,`d`,`M194.57 100.985L256 39.478L216.431 0l-61.412 61.384L93.917.311L54.365 39.913L216.01 201.761l39.552-39.602z`],[`fill`,`#119eff`,`d`,`m115.36 100.987l39.659-39.602L93.917.313L54.365 39.914z`],[`fill-opacity`,`.2`,`d`,`m115.359 100.985l39.659-39.601l-15.271-15.186z`],[`fill`,`#c30f2e`,`d`,`M152.228.001L48.455 181.046H256L152.228 0z`],[`fill`,`#dd0330`,`d`,`M88.314 26.967L0 181.52h176.628L88.315 26.967z`],[`fill`,`#fff`,`d`,`M18.167 135.294h220.236v-2.419H18.167z`],[`fill`,`#fff`,`d`,`M204.38 170.667c-.861 0-1.67-.358-2.348-1.034c-4.045-4.063-4.221-20.586-4.026-45.33c.11-13.521.257-32.043-1.9-33.504c-2.104.873-2.315 16.172-2.451 26.301c-.162 11.785-.327 23.98-2.242 30.189c-.57 1.84-1.306 3.525-2.786 3.39c-2.086-.185-2.76-3.48-4.317-16.478c-.647-5.4-1.317-10.98-2.101-13.14a11 11 0 0 0-.269-.66c-.835 1.889-1.8 7.079-2.47 10.682c-.927 4.976-1.803 9.676-2.9 11.726c-.847 1.575-2.19 3.63-4.067 3.231c-2.558-.537-3.323-5.693-3.552-8.719c0-25.455-3.33-28.417-3.997-28.753l-.107.081l-.162-.036c-2.377 1.038-2.506 9.294-2.627 17.276c-.096 5.856-.198 12.492-1.053 18.701c-1.108 8.05-2.448 9.603-4.115 9.507c-3.838-.262-3.95-13.482-3.95-14.987c0-.472.012-1.028.027-1.642c.074-3.076.205-8.8-1.687-10.604c-.25-.239-.603-.515-.879-.437c-1.347.339-2.745 4.714-3.209 6.153c-.147.457-.265.833-.364 1.09c-.078.214-.177.515-.294.88c-1.02 3.095-2.18 6.183-4.16 6.944c-.732.284-1.498.222-2.216-.183c-.953-.541-1.73-1.646-2.455-3.482c-.397-1.016-.735-2.046-1.082-3.081c-.419-1.263-.85-2.569-1.384-3.808c-.419-.965-1.464-1.4-2.796-1.164c-2.768.494-3.232 3.29-3.622 7.5c-.07.733-.137 1.452-.228 2.128c-.011.198-.501 6.38-.814 8.344c-.865 5.39-2.002 7.512-3.89 7.358c-4.66-.398-6.798-20.836-6.684-29.47c.088-6.592-1.104-9-1.818-9.382c-.074-.034-.189-.096-.46.095c-.843.571-1.594 2.348-1.363 4.215c2.566 20.32.674 43.592-3.96 48.833c-1.46 1.649-3.448 1.627-4.832.236c-4.049-4.064-4.218-20.586-4.026-45.33c.11-13.521.254-32.043-1.9-33.504c-2.105.873-2.311 16.172-2.45 26.301c-.163 11.785-.329 23.98-2.246 30.189c-.57 1.84-1.307 3.525-2.782 3.39c-2.091-.186-2.761-3.48-4.321-16.478c-.649-5.4-1.319-10.98-2.101-13.14c-.1-.273-.189-.49-.27-.66c-.832 1.889-1.796 7.079-2.466 10.682c-.927 4.976-1.803 9.676-2.904 11.726c-.846 1.575-2.19 3.63-4.063 3.231c-2.558-.537-3.324-5.693-3.552-8.719c-.003-25.455-3.33-28.417-3.997-28.753l-.106.081l-.166-.036c-2.374 1.038-2.503 9.293-2.629 17.276c-.091 5.856-.194 12.492-1.048 18.701c-1.107 8.05-2.437 9.618-4.111 9.507c-3.846-.262-3.958-13.482-3.958-14.987c0-.472.016-1.028.03-1.642c.074-3.076.207-8.8-1.685-10.604c-.25-.239-.603-.515-.88-.438c-1.347.34-2.75 4.715-3.206 6.155a47 47 0 0 1-.364 1.09q-.16.432-.298.875c-1.02 3.096-2.18 6.187-4.155 6.95c-.736.282-1.506.22-2.22-.185c-.953-.541-1.734-1.646-2.454-3.482c-.398-1.016-.74-2.046-1.083-3.081c-.42-1.263-.854-2.569-1.387-3.808c-.416-.965-1.465-1.4-2.797-1.164c-3.188.567-3.943 4.52-4.55 9.238l-.106.839l-2.411-.32l.114-.824c.527-4.137 1.328-10.39 6.53-11.31c2.446-.435 4.585.581 5.446 2.583c.578 1.34 1.031 2.695 1.466 4.008c.324.99.654 1.98 1.037 2.959c.674 1.708 1.197 2.15 1.392 2.257c1.218-.38 2.462-4.167 2.873-5.414c.13-.402.24-.732.328-.968c.085-.233.195-.571.328-.98c1.097-3.43 2.474-7.144 4.918-7.762c.747-.191 1.903-.166 3.157 1.035c2.665 2.544 2.525 8.48 2.433 12.41c-.014.59-.028 1.126-.028 1.583c0 6.272.93 10.655 1.64 12.16c.367-.77.998-2.63 1.598-7.007c.831-6.066.938-12.624 1.027-18.41c.161-10.24.275-17.663 3.982-19.408c.552-.339 1.469-.522 2.436-.033c3.586 1.803 5.326 11.885 5.326 30.817c.225 2.926 1.013 6.006 1.66 6.448c.004-.066.53-.39 1.394-2.01c.925-1.718 1.845-6.665 2.655-11.026c1.792-9.614 2.606-12.989 4.726-13.166c1.615-.158 2.362 1.896 2.676 2.76c.883 2.422 1.537 7.888 2.23 13.678c.54 4.49 1.31 10.902 2.094 13.497c.084-.228.18-.5.283-.836c1.815-5.878 1.98-17.887 2.14-29.507c.22-16.14.503-26.139 3.448-28.226a2.44 2.44 0 0 1 2.233-.316c3.448 1.144 3.714 11.254 3.519 35.8c-.14 17.799-.313 39.952 3.323 43.603c.317.32.542.32.622.32c.17 0 .413-.161.67-.452c3.681-4.162 6.01-26.022 3.372-46.927c-.328-2.602.677-5.337 2.392-6.514c.946-.652 2.036-.736 2.978-.232c2.145 1.14 3.187 5.024 3.102 11.546c-.15 11.387 2.584 24.714 4.37 26.842c.282-.471.842-1.763 1.379-5.145c.301-1.87.799-8.153.806-8.216c.09-.71.155-1.398.217-2.097c.369-3.924.82-8.804 5.613-9.654c2.444-.435 4.583.577 5.448 2.583c.577 1.34 1.027 2.695 1.46 4.008c.332.99.664 1.98 1.046 2.959c.67 1.708 1.197 2.15 1.387 2.257c1.218-.38 2.467-4.167 2.875-5.41c.132-.402.243-.737.328-.973c.088-.228.195-.57.324-.979c1.1-3.43 2.477-7.144 4.924-7.762c.74-.191 1.9-.166 3.154 1.035c2.665 2.543 2.526 8.48 2.437 12.41q-.029.792-.033 1.583c0 6.272.931 10.655 1.641 12.16c.365-.77.994-2.63 1.601-7.007c.832-6.066.931-12.624 1.027-18.41c.159-10.24.273-17.663 3.98-19.408c.55-.339 1.467-.522 2.44-.033c3.58 1.803 5.325 11.884 5.325 30.817c.224 2.926 1.012 6.006 1.656 6.448c.008-.066.526-.39 1.399-2.01c.923-1.718 1.84-6.665 2.653-11.026c1.786-9.614 2.602-12.989 4.722-13.166c1.62-.158 2.367 1.896 2.68 2.76c.88 2.422 1.535 7.888 2.233 13.678c.534 4.49 1.304 10.902 2.092 13.497c.08-.228.176-.5.28-.836c1.813-5.878 1.976-17.887 2.138-29.507c.216-16.14.504-26.139 3.448-28.226a2.45 2.45 0 0 1 2.234-.316c3.452 1.144 3.718 11.254 3.52 35.8c-.141 17.799-.314 39.952 3.319 43.603c.324.32.544.32.63.32c.165 0 .408-.161.662-.452c3.687-4.162 6.014-26.022 3.375-46.927c-.342-2.723.43-5.47 1.84-6.526c.71-.537 1.575-.647 2.37-.313c2.054.877 3.445 4.63 4.255 11.484c.339 2.87.641 5.974.931 9.036c.641 6.683 1.509 15.69 2.684 17.67c.36-.46 1.096-1.704 2.19-5.038l2.307.753c-1.696 5.157-3.026 7.1-4.755 6.902c-2.69-.299-3.468-5.734-4.84-20.055c-.29-3.048-.59-6.132-.928-8.989c-1.03-8.74-2.782-9.532-2.801-9.54c-.342.174-1.137 1.992-.842 4.31c2.558 20.32.673 43.597-3.964 48.834c-.747.842-1.587 1.27-2.485 1.27`],[`d`,`M12.024.017V0L12 .008L11.976 0v.017L.812 3.892l1.605 14.875l9.559 5.207V24l.024-.013l.024.013v-.026l9.559-5.207l1.605-14.875zm6.868 14.244q-1.64 3.948-6.031 4.166c-2.829 0-4.661-1.7-4.66-1.7q-1.745-1.359-2.398-3.417c-.695-.76-.702-.841-.774-1.145c-.072-.303.045-.388.249-.685q.204-.298.098-.85q-.26-.36-.3-1.128q0-.37.496-.783q.495-.413.607-.632q.083-.119.065-1.031q-.006-.897.995-.975c1-.08 1.565-.832 1.879-1.174c.21-.228.52-.339.91-.341c.551-.026 1.052.185 1.484.62c1.075-.055 2.176.235 3.292.863q2.379 1.414 2.596 3.055q-.257 2.158-5.788-.113q-2.895.819-2.846 3.552q0 2.508 2.422 3.643c-.787-.772-1.122-1.422-1.01-1.959q2.456 2.906 5.588 2.173c-.92.032-1.65-.264-2.198-.893q2.116-.05 3.998-1.972c-.724.576-1.482.794-2.284.657q3.26-2.563 2.307-5.98l-.002-.006a3.02 3.02 0 0 1 .788 2.03q.023 1.175-.795 2.477q.613-.478 1.413-2.047c.23 2.117-.625 3.724-2.574 4.825q.934-.085 2.473-1.23m-5.567-6.63a.319.319 0 1 1 .638 0a.319.319 0 0 1-.638 0`],[`id`,`ng-grad`,`x1`,`49`,`x2`,`226`,`y1`,`214`,`y2`,`130`,`gradientUnits`,`userSpaceOnUse`],[`stop-color`,`#E40035`],[`offset`,`.24`,`stop-color`,`#F60A48`],[`offset`,`.352`,`stop-color`,`#F20755`],[`offset`,`.494`,`stop-color`,`#DC087D`],[`offset`,`.745`,`stop-color`,`#9717E7`],[`offset`,`1`,`stop-color`,`#6C00F5`],[`fill`,`url(#ng-grad)`,`d`,`m222.077 39.192-8.019 125.923L137.387 0l84.69 39.192Zm-53.105 162.825-57.933 33.056-57.934-33.056 11.783-28.556h92.301l11.783 28.556ZM111.039 62.675l30.357 73.803H80.681l30.358-73.803ZM7.937 165.115 0 39.192 84.69 0 7.937 165.115Z`],[`d`,`m222.077 39.192-8.019 125.923L137.387 0l84.69 39.192Zm-53.105 162.825-57.933 33.056-57.934-33.056 11.783-28.556h92.301l11.783 28.556ZM111.039 62.675l30.357 73.803H80.681l30.358-73.803ZM7.937 165.115 0 39.192 84.69 0 7.937 165.115Z`],[`type`,`button`,3,`active`],[`type`,`button`,3,`click`],[3,`name`],[3,`rpc`],[3,`rpc`,`focus`],[3,`navigate`,`rpc`],[3,`focusHandled`,`showForm`,`rpc`,`focus`],[3,`focusHandled`,`rpc`,`focus`]],template:function(e,t){if(e&1&&(R(0,`header`)(1,`h1`,2)(2,`span`,3),N(3,Xz,2,0,`:svg:svg`,4)(4,Zz,7,0,`:svg:svg`,4)(5,Qz,5,0,`:svg:svg`,5)(6,$z,2,0,`:svg:svg`,6)(7,eB,10,0,`:svg:svg`,7)(8,tB,2,0,`:svg:svg`,8),z(),R(9,`span`,9),Y(10),z()(),R(11,`nav`,10,0),G(`scroll`,function(){return t.measureNav()}),N(13,rB,2,0),z(),R(14,`span`,11)(15,`span`,12),B(16,`span`),z(),Y(17),z()(),R(18,`main`,13,1),N(20,iB,2,0,`p`,14)(21,aB,1,3,`app-code-entry`,15)(22,oB,1,1,`app-coming-soon`,16)(23,sB,5,0,`p`,17)(24,vB,10,1),z()),e&2){let e;j(2),J(`ng-mark`,t.view()===`angular`),j(),P(t.view()===`nativescript`?3:t.view()===`capacitor`?4:t.view()===`analog`?5:t.view()===`ngrx`?6:t.view()===`angular`?7:8),j(6),J(`ng-text`,t.view()===`angular`),j(),X(t.title()),j(),J(`fade-start`,t.navFade().start)(`fade-end`,t.navFade().end),j(2),P(t.tabs().length>1?13:-1),j(),J(`connected`,t.connected())(`failed`,t.connectionFailed())(`locked`,t.needsCode()),j(3),Z(` `,t.statusLabel(),` `),j(3),P(t.connectionFailed()?20:(e=t.needsCode()&&t.client())?21:(e=t.comingSoon())?22:t.tabEnabled(t.tab(),t.config())?24:23,e)}},dependencies:[lE,vD,GA,jj,LM,QN,WF,BI,DR,_z,wz,BT,Kz],styles:[`[_nghost-%COMP%] { --%NS%accent-soft: color-mix(in srgb, var(--%NS%accent) 12%, transparent); --%NS%accent-line: color-mix(in srgb, var(--%NS%accent) 45%, transparent); display: flex; @@ -11980,4 +11980,4 @@ main[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] { flex-shrink: 1; gap: 8px; } -}`]})};function EB(e){try{return new URL(e,location.href).origin===location.origin}catch{return!1}}function DB(e){if(location.protocol!==`chrome-extension:`)return!1;try{let{protocol:t}=new URL(e);return t===`http:`||t===`https:`}catch{return!1}}function OB(){let e=new URLSearchParams(location.search).get(`baseURL`);if(e&&(EB(e)||DB(e)))return e;if(!(location.pathname.includes(`__ng-devtools`)||location.pathname.includes(`__devframes/`)))return`/__ng-devtools/`}yb(TB).catch(console.error);export{Sx as t}; \ No newline at end of file +}`]})};function OB(e){try{return new URL(e,location.href).origin===location.origin}catch{return!1}}function kB(e){if(location.protocol!==`chrome-extension:`)return!1;try{let{protocol:t}=new URL(e);return t===`http:`||t===`https:`}catch{return!1}}function AB(){let e=new URLSearchParams(location.search).get(`baseURL`);if(e&&(OB(e)||kB(e)))return e;if(!(location.pathname.includes(`__ng-devtools`)||location.pathname.includes(`__devframes/`)))return`/__ng-devtools/`}yb(DB).catch(console.error);export{Sx as t}; \ No newline at end of file diff --git a/extension/ui/index.html b/extension/ui/index.html index 6e3bff1..8117fde 100644 --- a/extension/ui/index.html +++ b/extension/ui/index.html @@ -7,7 +7,7 @@ Angular DevTools - + From 3d713f0258e3ab8216a313318c646aad365635c2 Mon Sep 17 00:00:00 2001 From: Kam Date: Wed, 30 Sep 2026 19:33:19 +0300 Subject: [PATCH 10/10] docs: limit the one-time code claim on the security page The page said the extension panel reads no data until the code is entered, but it discovers the server first, so requests such as __connection.json happen before the code. Say the code gates inspector data and RPC calls, and that discovery still comes first. --- apps/docs/src/content/security.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/docs/src/content/security.md b/apps/docs/src/content/security.md index 4bc9e60..c9fea09 100644 --- a/apps/docs/src/content/security.md +++ b/apps/docs/src/content/security.md @@ -121,7 +121,7 @@ On any other host, the panel doesn't send a request until you click **Allow acce Granting the extension a host doesn't change what the devtools server accepts. The server still applies the checks on this page. Both the Vite plugin and the Express hub accept the extension's `chrome-extension://` origin by default. An Express hub with its own `allowedOrigins` list needs the extension origin in that list. See [Chrome extension](/getting-started/chrome-extension#host-access). -When the server asks for the [one-time code](#one-time-code), the panel shows a form for it and reads no data until you enter the code. The panel keeps the token it gets in the extension's own storage, one per server origin, so it doesn't ask again while the server trusts that token. See [One-time code](/getting-started/chrome-extension#one-time-code) on the Chrome extension page. +When the server asks for the [one-time code](#one-time-code), the panel shows a form for it. Until you enter the code, the server answers only the calls that request or check the code, so the panel gets no inspector data and can't call the inspector RPC. Discovery comes first, so requests such as `__connection.json` still happen before the code. The panel keeps the token it gets in the extension's own storage, one per server origin, so it doesn't ask again while the server trusts that token. See [One-time code](/getting-started/chrome-extension#one-time-code) on the Chrome extension page. ## What is redacted