diff --git a/app/src/__tests__/component-prop-edit.test.ts b/app/src/__tests__/component-prop-edit.test.ts new file mode 100644 index 00000000..383e4020 --- /dev/null +++ b/app/src/__tests__/component-prop-edit.test.ts @@ -0,0 +1,207 @@ +import { TestBed, type ComponentFixture } from '@angular/core/testing'; +import type { DevframeRpcClient } from 'devframe/client'; +import { afterEach, describe, expect, it, vi } from 'vitest'; +import { ComponentTree } from '../pages/component-tree'; +import { PropValue, parseDraft, type EditableProp } from '../pages/component-prop-value'; + +type Call = (name: string, arg: Record) => Promise; + +function fakeClient( + call: Call, + state: Record = {}, + configs: Record = {}, +): DevframeRpcClient { + const rpc = { + call, + callEvent: () => Promise.resolve(), + sharedState: (name: string) => + Promise.resolve({ value: () => state[name] ?? null, on: () => () => {} }), + }; + return { connectionMeta: { configs }, scope: () => ({ rpc }) } as unknown as DevframeRpcClient; +} + +async function settle(fixture: ComponentFixture) { + for (let i = 0; i < 3; i++) { + await new Promise((resolve) => setTimeout(resolve)); + await fixture.whenStable(); + } +} + +function el(fixture: ComponentFixture): HTMLElement { + return fixture.nativeElement as HTMLElement; +} + +function buttons(fixture: ComponentFixture, name: string): HTMLButtonElement[] { + return Array.from(el(fixture).querySelectorAll('button')).filter( + (b) => (b.getAttribute('aria-label') ?? b.textContent ?? '').trim() === name, + ); +} + +function key(target: Element, name: string) { + target.dispatchEvent(new KeyboardEvent('keydown', { key: name, bubbles: true })); +} + +function type(input: HTMLInputElement, value: string) { + input.value = value; + input.dispatchEvent(new Event('input')); +} + +afterEach(() => { + document.body.innerHTML = ''; +}); + +function mount(prop: EditableProp, call: Call, writes = true) { + const fixture = TestBed.createComponent(PropValue); + fixture.componentRef.setInput('prop', prop); + fixture.componentRef.setInput('componentId', 'c1'); + fixture.componentRef.setInput('pageId', 'p1'); + fixture.componentRef.setInput('rpc', fakeClient(call)); + fixture.componentRef.setInput('writes', writes); + document.body.append(fixture.nativeElement); + return fixture; +} + +describe('parseDraft', () => { + it('reads JSON and explains text without quotes', () => { + expect(parseDraft(' 42 ')).toEqual({ value: 42 }); + expect(parseDraft('"Paris"')).toEqual({ value: 'Paris' }); + expect(parseDraft('Paris')).toEqual({ error: expect.stringMatching(/double quotes/) }); + expect(parseDraft('')).toEqual({ error: expect.stringMatching(/Type a JSON value/) }); + }); +}); + +describe('PropValue', () => { + it('edits a writable signal: Edit focuses a labelled field, Enter sends set-signal', async () => { + const call = vi.fn(async () => ({ ok: true, value: 5 })); + const fixture = mount({ name: 'count', prop: 'count', value: 1, edit: 'signal' }, call); + await settle(fixture); + buttons(fixture, 'Edit count')[0].click(); + await settle(fixture); + const input = el(fixture).querySelector('input')!; + expect(document.activeElement).toBe(input); + expect(input.value).toBe('1'); + const label = el(fixture).querySelector(`label[for="${input.id}"]`); + expect(label?.textContent).toContain('New value of count, as JSON'); + expect(input.getAttribute('aria-describedby')).toContain('-hint'); + type(input, '5'); + key(input, 'Enter'); + await settle(fixture); + expect(call).toHaveBeenCalledWith('request-component-edit', { + pageId: 'p1', + request: { id: 'c1', path: 'count', value: 5, kind: 'signal' }, + }); + expect(el(fixture).querySelector('input')).toBeNull(); + expect(el(fixture).querySelector('[role="status"]')?.textContent).toBe('Set count.'); + expect(document.activeElement).toBe(buttons(fixture, 'Edit count')[0]); + }); + + it('Escape cancels without writing and returns focus to Edit', async () => { + const call = vi.fn(async () => ({ ok: true })); + const fixture = mount({ name: 'price', prop: 'price', value: 120, edit: 'property' }, call); + await settle(fixture); + buttons(fixture, 'Edit price')[0].click(); + await settle(fixture); + key(el(fixture).querySelector('input')!, 'Escape'); + await settle(fixture); + expect(call).not.toHaveBeenCalled(); + expect(el(fixture).querySelector('input')).toBeNull(); + expect(document.activeElement).toBe(buttons(fixture, 'Edit price')[0]); + }); + + it('shows the refusal from the page and bad JSON as an alert tied to the field', async () => { + const call = vi.fn(async () => ({ + error: '`price` is redacted, so it cannot be written.', + })); + const fixture = mount({ name: 'price', prop: 'price', value: 1, edit: 'property' }, call); + await settle(fixture); + buttons(fixture, 'Edit price')[0].click(); + await settle(fixture); + const input = el(fixture).querySelector('input')!; + type(input, 'oops'); + key(input, 'Enter'); + await settle(fixture); + expect(call).not.toHaveBeenCalled(); + const alert = el(fixture).querySelector('[role="alert"]')!; + expect(alert.textContent).toMatch(/Not valid JSON/); + expect(input.getAttribute('aria-invalid')).toBe('true'); + expect(input.getAttribute('aria-describedby')).toContain(alert.id); + type(input, '2'); + buttons(fixture, 'Apply')[0].click(); + await settle(fixture); + expect(el(fixture).querySelector('[role="alert"]')?.textContent).toContain( + 'is redacted, so it cannot be written', + ); + expect(el(fixture).querySelector('input')).not.toBeNull(); + }); + + it('says why a read-only value cannot be edited, and offers no Edit', async () => { + const fixture = mount( + { + name: 'title', + prop: 'title', + value: 'Paris', + locked: 'Signal input. Its parent binding sets it, so it has no set().', + }, + vi.fn(), + ); + await settle(fixture); + expect(buttons(fixture, 'Edit title')).toHaveLength(0); + expect(el(fixture).textContent).toContain('Signal input. Its parent binding sets it'); + }); + + it('stays read-only when writes are off', async () => { + const fixture = mount( + { name: 'count', prop: 'count', value: 1, edit: 'signal' }, + vi.fn(), + false, + ); + await settle(fixture); + expect(buttons(fixture, 'Edit count')).toHaveLength(0); + }); +}); + +describe('ComponentTree editing', () => { + const page = { + pageId: 'p1', + roots: [{ id: 'c1', name: 'Card', tag: 'app-card', children: [] }], + count: 1, + reportedAt: 1, + detail: { + id: 'c1', + name: 'Card', + tag: 'app-card', + path: 'app-card', + inputs: [{ name: 'title', prop: 'title', value: 'Paris', locked: 'Signal input.' }], + outputs: [], + properties: [{ name: 'count', prop: 'count', value: 1, kind: 'signal', edit: 'signal' }], + listeners: [], + directives: [], + dependencies: [], + }, + }; + + async function open(configs: Record = {}) { + const fixture = TestBed.createComponent(ComponentTree); + fixture.componentRef.setInput( + 'rpc', + fakeClient(async () => [], { 'component-tree': { pages: { p1: page } } }, configs), + ); + await settle(fixture); + // The page reports the detail of the instance it has selected, so the panel follows it. + expect(fixture.componentInstance.selectedId()).toBe('c1'); + return fixture; + } + + it('offers Edit for writable values of the selected component', async () => { + const fixture = await open(); + expect(buttons(fixture, 'Edit count')).toHaveLength(1); + expect(buttons(fixture, 'Edit title')).toHaveLength(0); + expect(el(fixture).textContent).toContain('Signal input.'); + }); + + it('offers no Edit when actions.components is off', async () => { + const fixture = await open({ pangular: { actions: { components: false } } }); + expect(buttons(fixture, 'Edit count')).toHaveLength(0); + expect(el(fixture).textContent).not.toContain('Signal input.'); + }); +}); diff --git a/app/src/__tests__/component-tree-for-blocks.test.ts b/app/src/__tests__/component-tree-for-blocks.test.ts new file mode 100644 index 00000000..86215a88 --- /dev/null +++ b/app/src/__tests__/component-tree-for-blocks.test.ts @@ -0,0 +1,155 @@ +import { TestBed } from '@angular/core/testing'; +import type { DevframeRpcClient } from 'devframe/client'; +import { afterEach, describe, expect, it } from 'vitest'; +import { ComponentTree } from '../pages/component-tree'; +import { StoreGlobal } from '../ui/store-global'; + +interface Call { + name: string; + payload: Record; +} + +function client(pages: Record, calls: Call[] = []): DevframeRpcClient { + const rpc = { + call: (name: string, payload: Record) => { + calls.push({ name, payload }); + if (name === 'request-console-global') { + return Promise.resolve({ ok: true, name: 'temp1', message: 'Stored as temp1.' }); + } + return Promise.resolve([]); + }, + callEvent: () => Promise.resolve(), + sharedState: (name: string) => + Promise.resolve({ + value: () => (name === 'component-tree' ? { pages } : null), + on: () => () => {}, + }), + }; + return { connectionMeta: {}, scope: () => ({ rpc }) } as unknown as DevframeRpcClient; +} + +const basePage = { + pageId: 'p1', + roots: [{ id: 'c1', name: 'App', tag: 'app-root', children: [] }], + count: 1, + detail: null, + reportedAt: 1000, +}; + +async function render(page: Record, calls: Call[] = []) { + const fixture = TestBed.createComponent(ComponentTree); + fixture.componentRef.setInput('rpc', client({ p1: page }, calls)); + for (let i = 0; i < 3; i++) { + await new Promise((resolve) => setTimeout(resolve)); + await fixture.whenStable(); + } + return { fixture, el: fixture.nativeElement as HTMLElement }; +} + +describe('@for blocks section', () => { + afterEach(() => { + document.body.innerHTML = ''; + }); + + it('lists each block with its owner, item count, @empty and track kind', async () => { + const { el } = await render({ + ...basePage, + forBlocks: [ + { + id: 'f1', + owner: { id: 'c1', name: 'App', tag: 'app-root' }, + count: 2, + track: '$index', + hasEmptyBlock: false, + showingEmpty: false, + rootIds: [], + }, + { + id: 'f2', + count: 0, + track: 'function', + hasEmptyBlock: true, + showingEmpty: true, + rootIds: [], + }, + ], + forBlocksTruncated: true, + }); + const section = el.querySelector('section[aria-labelledby="ct-for-title"]')!; + expect(section.querySelector('h2')!.textContent).toContain('@for blocks'); + expect(section.querySelector('.pill')!.textContent).toContain('2+'); + expect(section.textContent).toContain('more @for blocks than the 2 listed'); + const rows = Array.from(section.querySelectorAll('.for-row')); + const text = (row: Element) => + Array.from(row.children, (part) => part.textContent?.replace(/\s+/g, ' ').trim()).join(' '); + expect(rows.map(text)).toEqual([ + 'App 2 items track $index', + 'Unknown component 0 items @empty showing track expression', + ]); + expect(rows[1].getAttribute('aria-disabled')).toBe('true'); + }); + + it('says when the page Angular is too old to report @for blocks', async () => { + const { el } = await render({ ...basePage, deferBlocks: [] }); + expect(el.textContent).toContain('@for blocks are listed from Angular 22.0'); + expect(el.querySelector('#ct-for-title')).toBeNull(); + }); + + it('shows nothing when the page has no @for block', async () => { + const { el } = await render({ ...basePage, deferBlocks: [], forBlocks: [] }); + expect(el.textContent).not.toContain('@for blocks'); + }); +}); + +describe('console handles in the component view', () => { + afterEach(() => { + document.body.innerHTML = ''; + }); + + it('asks the page to set $ng0 when a component is selected', async () => { + const calls: Call[] = []; + const { el, fixture } = await render(basePage, calls); + el.querySelector('.row[data-id="c1"]')!.click(); + await fixture.whenStable(); + expect(calls.find((c) => c.name === 'select-component')?.payload).toEqual({ + pageId: 'p1', + id: 'c1', + console: true, + }); + }); +}); + +describe('Store as global button', () => { + it('stores the target on its page and says which name it used', async () => { + const calls: Call[] = []; + const fixture = TestBed.createComponent(StoreGlobal); + fixture.componentRef.setInput('rpc', client({}, calls)); + fixture.componentRef.setInput('pageId', 'p1'); + fixture.componentRef.setInput('target', { kind: 'ngrx', storeId: 'store' }); + fixture.componentRef.setInput('label', 'Store state'); + await fixture.whenStable(); + const el = fixture.nativeElement as HTMLElement; + const button = el.querySelector('button')!; + expect(button.textContent?.replace(/\s+/g, ' ').trim()).toBe('Store as global : Store state'); + button.click(); + await new Promise((resolve) => setTimeout(resolve)); + await fixture.whenStable(); + expect(calls).toEqual([ + { + name: 'request-console-global', + payload: { pageId: 'p1', target: { kind: 'ngrx', storeId: 'store' } }, + }, + ]); + expect(el.querySelector('[role="status"]')!.textContent).toBe('Stored as temp1.'); + }); + + it('is hidden in a saved report, which has no page', async () => { + const fixture = TestBed.createComponent(StoreGlobal); + fixture.componentRef.setInput('rpc', { + connectionMeta: { backend: 'static' }, + } as unknown as DevframeRpcClient); + fixture.componentRef.setInput('target', { kind: 'component', id: 'c1' }); + await fixture.whenStable(); + expect((fixture.nativeElement as HTMLElement).querySelector('button')).toBeNull(); + }); +}); diff --git a/app/src/pages/component-prop-value.ts b/app/src/pages/component-prop-value.ts new file mode 100644 index 00000000..dd0ad666 --- /dev/null +++ b/app/src/pages/component-prop-value.ts @@ -0,0 +1,313 @@ +import { JsonPipe } from '@angular/common'; +import { + Component, + ElementRef, + Injector, + afterNextRender, + afterRenderEffect, + computed, + inject, + input, + signal, + viewChild, +} from '@angular/core'; +import type { DevframeRpcClient } from 'devframe/client'; + +export interface EditableProp { + name: string; + prop: string; + value?: unknown; + edit?: 'property' | 'signal'; + locked?: string; +} + +interface EditResult { + ok?: boolean; + value?: unknown; + error?: string; +} + +let nextId = 0; + +/** Reads the draft as JSON, or says how to fix it. */ +export function parseDraft(text: string): { value: unknown } | { error: string } { + const trimmed = text.trim(); + if (!trimmed) return { error: 'Type a JSON value, such as "text", 42, true, null or [1, 2].' }; + try { + return { value: JSON.parse(trimmed) }; + } catch { + return { error: 'Not valid JSON. Put text in double quotes, such as "Paris".' }; + } +} + +/** + * One input or property value in the component detail. When the page says it + * can be edited and writes are on, Edit turns it into a JSON field: Enter + * applies, Escape cancels. + */ +@Component({ + selector: 'app-prop-value', + imports: [JsonPipe], + template: ` + @if (editing()) { +
+ + + + +
+

+ JSON, such as "text", 42, true or {{ objectSample }}. Enter applies, Escape cancels. +

+ } @else { +
+
{{ prop().value | json }}
+ @if (editable()) { + + } +
+ @if (writes() && prop().locked) { +

{{ prop().locked }}

+ } + } + @if (error()) { + + } +

{{ done() }}

+ `, + styles: ` + @use 'mixins' as m; + :host { + display: block; + min-width: 0; + } + .view { + display: flex; + align-items: flex-start; + gap: 8px; + } + pre { + flex: 1 1 auto; + min-width: 0; + max-height: 200px; + margin: 0; + overflow: auto; + color: var(--text); + font-family: var(--font-mono); + font-size: 12px; + line-height: 1.5; + white-space: pre-wrap; + overflow-wrap: anywhere; + } + .editor { + display: flex; + flex-wrap: wrap; + gap: 6px; + align-items: center; + } + .field { + flex: 1 1 160px; + min-width: 0; + height: var(--control-h); + padding: 0 10px; + background: var(--bg); + border: 1px solid var(--border-strong); + border-radius: var(--radius-sm); + color: var(--text); + font-family: var(--font-mono); + font-size: 12px; + } + .field:focus-visible { + @include m.field-focus; + } + .field[aria-invalid='true'] { + border-color: var(--danger); + } + button { + display: inline-flex; + flex: none; + align-items: center; + height: var(--control-h); + padding: 0 12px; + background: var(--surface-2); + border: 1px solid var(--border-strong); + border-radius: var(--radius-sm); + color: var(--text); + cursor: pointer; + font: inherit; + font-size: 13px; + font-weight: 500; + transition: + background-color 150ms var(--ease), + border-color 150ms var(--ease); + } + button:hover:not(:disabled) { + background: var(--surface-3); + border-color: var(--accent-line); + } + button:focus-visible { + @include m.focus-ring; + } + pre:focus-visible { + @include m.focus-ring(-2px); + } + button:disabled { + opacity: 0.6; + } + button.primary { + background: var(--accent); + border-color: var(--accent); + color: var(--accent-ink); + } + button.primary:hover:not(:disabled) { + background: var(--accent-hover); + border-color: var(--accent-hover); + } + button.edit { + height: 26px; + padding: 0 10px; + font-size: 12px; + } + .hint, + .locked, + .error { + margin: 6px 0 0; + font-size: 12px; + line-height: 1.4; + } + .hint, + .locked { + color: var(--text-2); + } + .error { + color: var(--danger-text); + } + `, +}) +export class PropValue { + readonly prop = input.required(); + readonly componentId = input.required(); + readonly pageId = input(null); + readonly rpc = input(null); + /** Whether this panel may write: live page, server connected, `actions.components` on. */ + readonly writes = input(false); + + protected readonly fieldId = `prop-edit-${++nextId}`; + protected readonly hintId = `${this.fieldId}-hint`; + protected readonly errorId = `${this.fieldId}-error`; + protected readonly objectSample = '{"a": 1}'; + + readonly editing = signal(false); + readonly draft = signal(''); + readonly busy = signal(false); + readonly error = signal(''); + readonly done = signal(''); + readonly editable = computed( + () => this.writes() && !!this.prop().edit && !!this.pageId() && !!this.rpc(), + ); + + private readonly field = viewChild>('field'); + private readonly editButton = viewChild>('editButton'); + private readonly valueBox = viewChild>('valueBox'); + private readonly injector = inject(Injector); + /** A value taller than its box scrolls, so it takes focus for keyboard scrolling. */ + readonly scrollable = signal(false); + + constructor() { + afterRenderEffect(() => { + this.prop(); + const box = this.valueBox()?.nativeElement; + this.scrollable.set(!!box && box.scrollHeight > box.clientHeight + 1); + }); + } + + start() { + const value = this.prop().value; + this.draft.set(value === undefined ? '' : JSON.stringify(value)); + this.error.set(''); + this.done.set(''); + this.editing.set(true); + afterNextRender( + () => { + const field = this.field()?.nativeElement; + field?.focus(); + field?.select(); + }, + { injector: this.injector }, + ); + } + + cancel() { + if (!this.editing()) return; + this.editing.set(false); + this.busy.set(false); + this.error.set(''); + this.focusEdit(); + } + + async apply() { + if (this.busy()) return; + const parsed = parseDraft(this.draft()); + if ('error' in parsed) { + this.error.set(parsed.error); + return; + } + const prop = this.prop(); + const client = this.rpc(); + const pageId = this.pageId(); + if (!client || !pageId || !prop.edit) return; + this.busy.set(true); + this.error.set(''); + let result: EditResult; + try { + result = ((await client.scope('pangular').rpc.call('request-component-edit', { + pageId, + request: { id: this.componentId(), path: prop.prop, value: parsed.value, kind: prop.edit }, + })) ?? {}) as EditResult; + } catch { + result = { error: 'The devtools server did not answer. Try again.' }; + } + this.busy.set(false); + if (!this.editing()) return; + if (result.ok) { + this.editing.set(false); + this.done.set(`Set ${prop.name}.`); + this.focusEdit(); + } else { + this.error.set(result.error ?? 'The page did not write it.'); + this.field()?.nativeElement.focus(); + } + } + + private focusEdit() { + afterNextRender(() => this.editButton()?.nativeElement.focus(), { injector: this.injector }); + } +} diff --git a/app/src/pages/component-tree.ts b/app/src/pages/component-tree.ts index 98eaca29..b67b017e 100644 --- a/app/src/pages/component-tree.ts +++ b/app/src/pages/component-tree.ts @@ -33,6 +33,10 @@ import { import { CdRecording, type CdPage } from './cd-recording'; import type { ComponentFocus } from '../types/component-focus.types'; import { SourceLink } from '../ui/source-link'; +import { actionAllowed } from '../devtools-config'; +import { PropValue } from './component-prop-value'; +import { StoreGlobal } from '../ui/store-global'; +import { ForBlocksSection, type ForBlock } from './for-blocks-section'; interface SourceComponent { selector: string; @@ -59,6 +63,8 @@ interface Prop { value?: unknown; listened?: boolean; kind?: 'signal' | 'resource'; + edit?: 'property' | 'signal'; + locked?: string; } interface Dependency { @@ -103,6 +109,8 @@ interface Page { deferBlocks?: DeferBlock[]; /** The page has more defer blocks than the ones in `deferBlocks`. */ deferTruncated?: boolean; + forBlocks?: ForBlock[]; + forBlocksTruncated?: boolean; roots: LiveNode[]; count: number; truncated?: boolean; @@ -146,7 +154,7 @@ function bare(name: string): string { @Component({ selector: 'app-component-tree', - imports: [JsonPipe, Select, CdRecording, SourceLink], + imports: [JsonPipe, Select, CdRecording, SourceLink, PropValue, StoreGlobal, ForBlocksSection], host: { '(keydown.escape)': 'cancelPick()' }, template: ` @if (live()) { @@ -334,6 +342,15 @@ function bare(name: string): string { } } + @if (!staticReport() && !native()) { + + } @if (detail(); as d) { @@ -364,7 +381,13 @@ function bare(name: string): string { ({{ p.prop }}) } -
{{ p.value | json }}
+ } @@ -405,7 +428,13 @@ function bare(name: string): string { {{ p.kind }} } -
{{ p.value | json }}
+ } @@ -552,6 +581,13 @@ function bare(name: string): string { } + @if (!staticReport() && !native()) { } @@ -1442,6 +1478,14 @@ export class ComponentTree { readonly live = computed(() => (this.page()?.roots.length ?? 0) > 0); readonly native = computed(() => isNativePage(this.page())); + /** Inputs, properties and writable signals are editable on a live browser page. */ + readonly canEdit = computed( + () => + this.live() && + !this.native() && + !this.staticReport() && + actionAllowed(this.rpc(), 'components'), + ); readonly devtoolsActions = computed( () => this.bridge.available && !!this.page() && !this.native() && !this.staticReport(), ); @@ -1835,7 +1879,7 @@ export class ComponentTree { if (!client) return; void client .scope('pangular') - .rpc.call('select-component', { pageId: this.page()?.pageId, id }) + .rpc.call('select-component', { pageId: this.page()?.pageId, id, console: true }) .catch(() => {}); } @@ -1938,6 +1982,10 @@ export class ComponentTree { if (block.owner && this.index().map.has(block.owner.id)) this.reveal(block.owner.id); } + showForOwner(block: ForBlock) { + if (block.owner && this.index().map.has(block.owner.id)) this.reveal(block.owner.id); + } + onTreeKey(event: KeyboardEvent) { const rows = this.rows(); if (!rows.length) return; diff --git a/app/src/pages/di-inspector.ts b/app/src/pages/di-inspector.ts index a04248d6..ddcae140 100644 --- a/app/src/pages/di-inspector.ts +++ b/app/src/pages/di-inspector.ts @@ -19,6 +19,7 @@ import { hostPageId } from '../page-id'; import { Select, type SelectOption } from '../ui/select'; import { zoneLabel } from './dashboard'; import { SourceLink } from '../ui/source-link'; +import { StoreGlobal } from '../ui/store-global'; interface ProviderInfo { token: string; @@ -110,7 +111,7 @@ function isTree(value: unknown): value is InjectorNode[] { @Component({ selector: 'app-di-inspector', - imports: [NgTemplateOutlet, Select, SourceLink], + imports: [NgTemplateOutlet, Select, SourceLink, StoreGlobal], template: `

{{ announcement() }}

@@ -462,7 +463,7 @@ function isTree(value: unknown): value is InjectorNode[] { @if (sel.providers.length) {
    - @for (p of sel.providers; track p.token + $index) { + @for (p of sel.providers; track p.token + $index; let index = $index) {
  • {{ p.token }} @@ -479,6 +480,18 @@ function isTree(value: unknown): value is InjectorNode[] { @if (p.importPath?.length) {
    via {{ p.importPath!.join(' › ') }}
    } +
  • }
@@ -1140,6 +1153,9 @@ function isTree(value: unknown): value is InjectorNode[] { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); } + .provider-global { + margin-top: 6px; + } .dep-main { display: flex; flex-wrap: wrap; diff --git a/app/src/pages/for-blocks-section.ts b/app/src/pages/for-blocks-section.ts new file mode 100644 index 00000000..ddb1c31e --- /dev/null +++ b/app/src/pages/for-blocks-section.ts @@ -0,0 +1,189 @@ +import { Component, input, output } from '@angular/core'; + +export interface ForBlock { + id: string; + owner?: { id: string; name: string; tag: string }; + count: number; + track: '$index' | 'item' | 'function' | null; + hasEmptyBlock: boolean; + showingEmpty: boolean; + rootIds: string[]; +} + +const TRACK_LABEL: Record = { + $index: 'track $index', + item: 'track item', + function: 'track expression', +}; + +/** + * The `@for` blocks list on the Components page, next to the defer blocks. + * `blocks` is `undefined` when the page's Angular has no + * `ɵgetControlFlowBlocks` (before 22.0), which the section says. + */ +@Component({ + selector: 'app-for-blocks', + template: ` + @if (blocks(); as list) { + @if (list.length) { +
+

+ @for blocks + {{ truncated() ? list.length + '+' : list.length }} +

+ @if (truncated()) { +

The page has more @for blocks than the {{ list.length }} listed.

+ } +
    + @for (block of list; track block.id) { +
  • + +
  • + } +
+
+ } + } @else if (supported() === false) { +

+ @for blocks are listed from Angular 22.0 in development builds. This page's Angular does + not report them. +

+ } + `, + styles: ` + @use 'mixins' as m; + + :host { + display: block; + } + .for { + margin-top: 16px; + } + .for-title { + @include m.label; + display: flex; + align-items: center; + gap: 6px; + margin: 0 0 8px; + } + .pill { + display: inline-flex; + align-items: center; + justify-content: center; + min-width: 18px; + height: 16px; + padding: 0 5px; + border-radius: 99px; + background: var(--surface-3); + color: var(--text-2); + font-size: 10px; + font-weight: 600; + letter-spacing: 0; + } + .note { + margin: 0 0 8px; + color: var(--text-2); + font-size: 12px; + line-height: 1.5; + } + .for-list { + display: grid; + gap: 6px; + margin: 0; + padding: 0; + list-style: none; + } + .for-row { + justify-content: flex-start; + flex-wrap: wrap; + width: 100%; + height: auto; + min-height: var(--control-h); + padding: 6px 12px; + background: var(--surface); + border-color: var(--border); + text-align: left; + } + .for-row:focus-visible { + @include m.focus-ring; + } + .for-row[aria-disabled='true'] { + cursor: default; + } + .name { + min-width: 0; + color: var(--text-strong); + font-size: 12px; + font-weight: 600; + @include m.truncate; + } + .mono { + font-family: var(--font-mono); + } + .count { + padding: 0 8px; + border-radius: 99px; + background: var(--surface-3); + color: var(--text-2); + font-size: 11px; + line-height: 18px; + } + .flag { + padding: 0 6px; + border: 1px solid var(--border-strong); + border-radius: 5px; + color: var(--text-2); + font-family: var(--font-mono); + font-size: 10px; + } + .flag.empty { + @include m.tint(warn); + } + .track { + min-width: 0; + color: var(--text-2); + font-size: 12px; + @include m.truncate; + } + `, +}) +export class ForBlocksSection { + /** The page's `@for` blocks, or `undefined` when it reports none at all. */ + readonly blocks = input(undefined); + readonly truncated = input(false); + /** `false` when the page reports defer blocks but no `@for` blocks: its Angular is older than 22.0. */ + readonly supported = input(null); + readonly showOwner = output(); + /** The element to highlight in the app, or `null` to clear it. */ + readonly highlight = output(); + + protected target(block: ForBlock): string | null { + return block.rootIds[0] ?? block.owner?.id ?? null; + } + + protected trackLabel(block: ForBlock): string { + return block.track ? TRACK_LABEL[block.track] : 'track unknown'; + } +} diff --git a/app/src/pages/store-inspector.ts b/app/src/pages/store-inspector.ts index df820116..0e5572e3 100644 --- a/app/src/pages/store-inspector.ts +++ b/app/src/pages/store-inspector.ts @@ -35,6 +35,7 @@ import { type NgrxStoreEntry, } from './store-types'; import { SourceLink } from '../ui/source-link'; +import { StoreGlobal } from '../ui/store-global'; const KIND_COLORS: Record = { action: '#f59e0b', @@ -95,7 +96,7 @@ const CLASSIC_KINDS = new Set([ @Component({ selector: 'app-store-inspector', - imports: [LimitNote, RovingList, Select, NgTemplateOutlet, SourceLink], + imports: [LimitNote, RovingList, Select, NgTemplateOutlet, SourceLink, StoreGlobal], template: `

State

- +
+ + +
{{
                     stateText()
@@ -943,6 +952,14 @@ const CLASSIC_KINDS = new Set([
     .fact-head {
       margin-bottom: 10px;
     }
+    .state-actions {
+      display: flex;
+      flex-wrap: wrap;
+      justify-content: flex-end;
+      align-items: center;
+      gap: 8px;
+      min-width: 0;
+    }
     .fact-head h4 {
       margin: 0;
     }
diff --git a/app/src/ui/store-global.ts b/app/src/ui/store-global.ts
new file mode 100644
index 00000000..c32837ef
--- /dev/null
+++ b/app/src/ui/store-global.ts
@@ -0,0 +1,93 @@
+import { Component, computed, input, signal } from '@angular/core';
+import type { DevframeRpcClient } from 'devframe/client';
+import { isStaticReport } from '../rpc';
+
+/** What the page stores: a component, a provider or NgRx state (see `console-handles.ts`). */
+export type ConsoleTarget =
+  | { kind: 'component'; id: string }
+  | { kind: 'provider'; injectorId: string; token: string; index: number }
+  | { kind: 'ngrx'; storeId: string };
+
+interface StoreResult {
+  ok?: boolean;
+  name?: string;
+  message?: string;
+}
+
+/**
+ * "Store as global": asks the page that owns `pageId` to store the target as
+ * `temp1`, `temp2`… in its console, then says which name it used.
+ */
+@Component({
+  selector: 'app-store-global',
+  template: `
+    @if (!staticReport()) {
+      
+      {{ message() }}
+    }
+  `,
+  styles: `
+    @use 'mixins' as m;
+
+    :host {
+      display: inline-flex;
+      flex-wrap: wrap;
+      align-items: center;
+      gap: 8px;
+      min-width: 0;
+    }
+    .store:focus-visible {
+      @include m.focus-ring;
+    }
+    .status {
+      color: var(--text-2);
+      font-size: 12px;
+    }
+    .status:empty {
+      display: none;
+    }
+  `,
+})
+export class StoreGlobal {
+  readonly rpc = input(null);
+  readonly pageId = input(null);
+  readonly target = input.required();
+  /** Names the target for screen readers when several buttons share a view. */
+  readonly label = input('');
+
+  /** A saved report has no page to store anything in. */
+  protected readonly staticReport = computed(() => isStaticReport(this.rpc()));
+  protected readonly busy = signal(false);
+  protected readonly message = signal('');
+
+  async store() {
+    const client = this.rpc();
+    const pageId = this.pageId();
+    if (!client || !pageId) return;
+    this.busy.set(true);
+    this.message.set('');
+    try {
+      const result = (await client
+        .scope('pangular')
+        .rpc.call('request-console-global', { pageId, target: this.target() })) as StoreResult;
+      this.message.set(
+        result?.message ||
+          (result?.ok && result.name ? `Stored as ${result.name}.` : 'Not stored.'),
+      );
+    } catch {
+      this.message.set('Could not reach the page.');
+    } finally {
+      this.busy.set(false);
+    }
+  }
+}
diff --git a/apps/docs/src/content/agents/tools.md b/apps/docs/src/content/agents/tools.md
index 43a135f1..c9b0b5e0 100644
--- a/apps/docs/src/content/agents/tools.md
+++ b/apps/docs/src/content/agents/tools.md
@@ -4,7 +4,7 @@ description: Every agent tool the devtools expose, grouped by inspector, with wh
 ---
 
 
-  Sixty-two tools, grouped by inspector. Each one answers a question you would otherwise answer by clicking through the panel.
+  Sixty-five tools, grouped by inspector. Each one answers a question you would otherwise answer by clicking through the panel.
 
 
 # Tools
@@ -35,7 +35,7 @@ Each tool reads from one of three places. The stdio server registers only the to
 
 ### The page argument
 
-Most page tools take an optional `page` argument to pick a browser tab. It defaults to the most recent one. `dispatch-ngrx-action` refuses to guess when more than one tab could take the action. `form-action` and `fill-form` take the tab from the form id instead (the part after `@`, as in `Checkout.form@ab12`). `highlight` and `inspect-component` search every tab without it, newest first, and `defer-blocks` lists every tab. `inspect-providers`, `highlight`, `inspect-component` and `defer-blocks` also accept `pageId`. The tables below leave `page` out.
+Most page tools take an optional `page` argument to pick a browser tab. It defaults to the most recent one. `dispatch-ngrx-action`, `set-component-property` and `set-signal` refuse to guess when more than one tab could take the action. `form-action` and `fill-form` take the tab from the form id instead (the part after `@`, as in `Checkout.form@ab12`). `highlight` and `inspect-component` search every tab without it, newest first, and `defer-blocks` and `for-blocks` list every tab. `inspect-providers`, `highlight`, `inspect-component`, `defer-blocks` and `for-blocks` also accept `pageId`. The tables below leave `page` out.
 
 If `page` names a tab that doesn't report that data, the tool answers `No page  is reporting ...` and lists the tabs that do, newest first. It never falls back to another tab. Without `page`, a class name or tag resolves on the most recent tab that has it, and `highlight` names the other tabs where it also matches.
 
@@ -49,14 +49,14 @@ The URL comes from the HTTP or router report. A page that sends neither (no rout
 
 Every tool has one of three safety tiers. The server sends the tier to your client as the tool's read-only and destructive hints.
 
-| Tier          | What the tool can do                                                                                              | Tools                                                                                                                                      |
-| ------------- | ----------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
-| `read`        | Reads your source, the page or the server. `highlight` only shows and selects a component.                        | Every other tool, and every resource                                                                                                       |
-| `action`      | Changes the running page, the server's fault rules or what the page records. A reload or the next call undoes it. | `navigate`, `dispatch-ngrx-action`, `form-action`, `fill-form`, `set-http-rule`, `remove-http-rule`, `record-pipes` and `change-detection` |
-| `destructive` | Can lose data: it erases recordings, or sends writes to your own API routes.                                      | `clear-recordings` and `analog-call-api`                                                                                                   |
+| Tier          | What the tool can do                                                                                              | Tools                                                                                                                                                                              |
+| ------------- | ----------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `read`        | Reads your source, the page or the server. `highlight` only shows and selects a component.                        | Every other tool, and every resource                                                                                                                                               |
+| `action`      | Changes the running page, the server's fault rules or what the page records. A reload or the next call undoes it. | `navigate`, `dispatch-ngrx-action`, `form-action`, `fill-form`, `set-http-rule`, `remove-http-rule`, `set-component-property`, `set-signal`, `record-pipes` and `change-detection` |
+| `destructive` | Can lose data: it erases recordings, or sends writes to your own API routes.                                      | `clear-recordings` and `analog-call-api`                                                                                                                                           |
 
 
-  The ten action and destructive tools act on the app. Your client can ask you before it runs them.
+  The twelve action and destructive tools act on the app. Your client can ask you before it runs them.
 
 
 When the hub is mounted, each finished call of an `action` or `destructive` tool posts an `Agent ran ` message to the hub, so you can see what the agent changed. `change-detection` posts only when it starts, stops or clears a recording. See [Messages and badges](../getting-started/popup-and-hub.md#messages-and-badges).
@@ -136,6 +136,26 @@ Without a development build, the page has no util to read defer blocks, and the
 
 Each page lists at most 50 blocks in the table and 50 under **Needs attention**, with a note on how many more are not shown. The whole answer stops at 20,000 characters. If several tabs report, pass `page` to read one. The **Defer blocks** list on the [Components](../inspectors/components.md#defer-blocks) page has every block the page reported. A page reports its first 500 blocks. When it has more, the answer says so.
 
+### for-blocks
+
+The `@for` blocks of each page: the component that holds each one, its item count, what its `track` expression tracks by and whether it has an `@empty` block and shows it. A block with no items and no `@empty` block gets a note that it renders nothing. Reads: page.
+
+| Argument | Required | Value           |
+| -------- | -------- | --------------- |
+| `pageId` | no       | Same as `page`. |
+
+Angular reports the `track` expression as one of three kinds, not as its source text:
+
+| Tracks by       | Template                                      |
+| --------------- | --------------------------------------------- |
+| `$index`        | `track $index`                                |
+| the item itself | `track item`, where `item` is the loop item   |
+| an expression   | Any other expression, such as `track trip.id` |
+
+The page reads the blocks with `ng.ɵgetControlFlowBlocks`, which Angular 22.0 added for development builds. On an older Angular or a production build, the answer says the page cannot list them. The page sends the item count only, never the items.
+
+Each page lists at most 50 blocks, with a note on how many more are not shown, and says when the page has more than the 500 blocks it reports. The whole answer stops at 20,000 characters. If several tabs report, pass `page` to read one. The **@for blocks** list on the [Components](../inspectors/components.md#for-blocks) page has every block.
+
 ### change-detection Action
 
 Change detection cycles recorded with Angular's profiler: the slowest components by self time, the most often checked components, and the latest cycles with their duration, component checks, sync passes and the output that ran before each one. Reads: page. Needs Angular 20 or later.
@@ -147,6 +167,31 @@ Change detection cycles recorded with Angular's profiler: the slowest components
 
 Without `page`, it reads the page that is recording, and `record` goes to every connected page. A `page` that names no connected tab gets the list of connected tabs. A connected tab that has not recorded yet gets a hint to start a recording there. The answer starts with the change detection mode of the page it reports on: zoneless, zone.js, or zoneless with zone.js still loaded. Recording is off until the panel or this tool starts it. Call it with `record: "start"`, use the app, then call it again without `record`. With `agent.readOnly`, the tool has no `record` argument and is marked read-only, so start the recording from the panel. When older cycles were dropped at [`limits.cdCycles`](../getting-started/configuration.md#limits), the answer says how many. A recording lists at most 100 component classes and counts checks for up to 2000 instances. When it checked more, the answer says how many were left out.
 
+### Edit a component Action
+
+`set-component-property` and `set-signal` write a JSON value to one live component instance, in development only, and answer with the value it now holds, redacted like the component detail. Reads: page.
+
+| Tool                     | Writes                                                                                          | How                                                                   |
+| ------------------------ | ----------------------------------------------------------------------------------------------- | --------------------------------------------------------------------- |
+| `set-component-property` | An input or another property. Signals are refused; use `set-signal`.                            | Assigns the value, then runs change detection with `ng.applyChanges`. |
+| `set-signal`             | A writable signal the component holds as a property: `signal()`, `linkedSignal()` or `model()`. | Calls `.set()`.                                                       |
+
+| Argument    | Tool                     | Value                                                                                                                           |
+| ----------- | ------------------------ | ------------------------------------------------------------------------------------------------------------------------------- |
+| `component` | both                     | An instance id from the `component-tree` resource, or a class name or host tag that matches one instance.                       |
+| `property`  | `set-component-property` | The class property or public input name, or a path inside its value, like `user.name` or `items[0].title`.                      |
+| `signal`    | `set-signal`             | The signal property, or a path inside its value, like `filters.query`. The signal is set to a copy with that one value changed. |
+| `value`     | both                     | The new value as JSON.                                                                                                          |
+
+Both tools refuse, and write nothing, when:
+
+- the target is a signal input (`input()` or `input.required()`), a `computed()` or an `asReadonly()` signal, a getter without a setter, a method or an output
+- the value is not JSON, or the target holds a class instance, `Map`, `Date` or function
+- a name on the path is redacted, or the target holds a redacted value (see [What is redacted](../security.md#what-is-redacted))
+- a class name or tag matches several instances, or more than one tab reports components and `page` is missing
+
+A parent binding sets a bound input again the next time its own value changes. Only signals held as component properties can be set; the signals that `inspect-signals` lists elsewhere cannot. Set [`actions.components`](../getting-started/configuration.md#actions) to `false` to drop both tools.
+
 ### inspect-signals
 
 The signal graph the page reported: nodes (`signal`, `computed`, `linkedSignal`, `effect`), dependency edges, the component or injector they belong to, and recent value history per node. Reads: page.
diff --git a/apps/docs/src/content/getting-started/configuration.md b/apps/docs/src/content/getting-started/configuration.md
index 2f84840f..e7e1c7d0 100644
--- a/apps/docs/src/content/getting-started/configuration.md
+++ b/apps/docs/src/content/getting-started/configuration.md
@@ -101,7 +101,7 @@ type PangularInspector =
   | 'analog'
   | 'capacitor';
 
-type PangularAction = 'forms' | 'router' | 'ngrx' | 'http' | 'analog';
+type PangularAction = 'forms' | 'router' | 'ngrx' | 'http' | 'analog' | 'components';
 
 interface PangularConfig {
   inspectors?: Partial>;
@@ -122,11 +122,11 @@ interface PangularConfig {
 
 ### Inspectors and agent tools
 
-| Option               | Default | What it does                                                                                                                                                                                                                                                                                                                    |
-| -------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `inspectors.`  | `true`  | `false` removes the inspector: no tab or dock, no page collector, no RPC functions, and no agent tools or resources. Its actions are blocked too.                                                                                                                                                                               |
-| `agent.readOnly`     | `false` | `true` keeps only the agent tools in the `read` [safety tier](../agents/tools.md#action-tools). It drops `form-action`, `fill-form`, `navigate`, `dispatch-ngrx-action`, `set-http-rule`, `remove-http-rule`, `record-pipes`, `analog-call-api` and `clear-recordings`. `change-detection` stays without its `record` argument. |
-| `agent.tools.` | `true`  | `false` hides one inspector's agent tools and resources, and its [shared-state keys](../agents/resources.md#shared-state) over HTTP MCP. The tab stays.                                                                                                                                                                         |
+| Option               | Default | What it does                                                                                                                                                                                                                                                                                                                                                            |
+| -------------------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `inspectors.`  | `true`  | `false` removes the inspector: no tab or dock, no page collector, no RPC functions, and no agent tools or resources. Its actions are blocked too.                                                                                                                                                                                                                       |
+| `agent.readOnly`     | `false` | `true` keeps only the agent tools in the `read` [safety tier](../agents/tools.md#action-tools). It drops `form-action`, `fill-form`, `navigate`, `dispatch-ngrx-action`, `set-http-rule`, `remove-http-rule`, `set-component-property`, `set-signal`, `record-pipes`, `analog-call-api` and `clear-recordings`. `change-detection` stays without its `record` argument. |
+| `agent.tools.` | `true`  | `false` hides one inspector's agent tools and resources, and its [shared-state keys](../agents/resources.md#shared-state) over HTTP MCP. The tab stays.                                                                                                                                                                                                                 |
 
 `agent.tools` has the same keys as `inspectors`. An inspector that is off has no agent tools, whatever `agent.tools` says.
 
@@ -136,20 +136,21 @@ If you open a tab that is turned off, the panel says so, shows the option that t
 
 Actions are the writes that the panel and agents make to your app or the server.
 
-| Option           | Default | What `false` blocks                                                                                                                                                                                                |
-| ---------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
-| `actions.forms`  | `true`  | Form writes: set value, fill, mark touched, untouched, dirty or pristine, touch all, revalidate, reset, enable, disable, submit and restore. Drops `form-action` and `fill-form`.                                  |
-| `actions.router` | `true`  | Navigate, abort, replay and probe, and clearing the navigations list. Drops router clearing in `clear-recordings`. The `navigate` agent tool stays for `instrument` and `resolve-lazy` and refuses the other four. |
-| `actions.ngrx`   | `true`  | Restoring NgRx state from the change log and dispatching `@ngrx/store` actions. Drops the `dispatch-ngrx-action` agent tool.                                                                                       |
-| `actions.http`   | `true`  | Editing fault injection rules and SSR overrides, and clearing the HTTP timeline. Drops the `set-http-rule` and `remove-http-rule` agent tools and HTTP clearing in `clear-recordings`.                             |
-| `actions.analog` | `true`  | The Analog request playground and clearing server calls. Drops the `analog-call-api` agent tool and Analog clearing in `clear-recordings`.                                                                         |
-| `actions`        | `true`  | All of the above.                                                                                                                                                                                                  |
+| Option               | Default | What `false` blocks                                                                                                                                                                                                |
+| -------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
+| `actions.forms`      | `true`  | Form writes: set value, fill, mark touched, untouched, dirty or pristine, touch all, revalidate, reset, enable, disable, submit and restore. Drops `form-action` and `fill-form`.                                  |
+| `actions.router`     | `true`  | Navigate, abort, replay and probe, and clearing the navigations list. Drops router clearing in `clear-recordings`. The `navigate` agent tool stays for `instrument` and `resolve-lazy` and refuses the other four. |
+| `actions.ngrx`       | `true`  | Restoring NgRx state from the change log and dispatching `@ngrx/store` actions. Drops the `dispatch-ngrx-action` agent tool.                                                                                       |
+| `actions.http`       | `true`  | Editing fault injection rules and SSR overrides, and clearing the HTTP timeline. Drops the `set-http-rule` and `remove-http-rule` agent tools and HTTP clearing in `clear-recordings`.                             |
+| `actions.analog`     | `true`  | The Analog request playground and clearing server calls. Drops the `analog-call-api` agent tool and Analog clearing in `clear-recordings`.                                                                         |
+| `actions.components` | `true`  | Editing component inputs, properties and writable signals from the **Components** tab. Drops the `set-component-property` and `set-signal` agent tools.                                                            |
+| `actions`            | `true`  | All of the above.                                                                                                                                                                                                  |
 
 Pass `actions: false` to block every action, or an object to block some. Keys you leave out of the object stay on.
 
 `actions.forms` leaves the panel's **Record details** and **Store as global** on. They don't change the form: **Record details** wraps form methods to record who called them, and **Store as global** sets `$form` and `$control` in the page console only when the page has not defined them itself.
 
-The server refuses a blocked action. The panel disables its controls and shows a note that names the option, for example: **Navigating and clearing navigations is turned off in the devtools config (actions.router).**
+The server refuses a blocked action, and with `actions.components` the page refuses it too. The panel disables its controls (the **Components** tab hides **Edit**) and shows a note that names the option, for example: **Navigating and clearing navigations is turned off in the devtools config (actions.router).**
 
 ### Redaction
 
diff --git a/apps/docs/src/content/inspectors/components.md b/apps/docs/src/content/inspectors/components.md
index 235ec66d..ae041664 100644
--- a/apps/docs/src/content/inspectors/components.md
+++ b/apps/docs/src/content/inspectors/components.md
@@ -1,6 +1,6 @@
 ---
 title: Components
-description: Every component instance on the page, with live inputs, properties, outputs, injected services and defer blocks.
+description: Every component instance on the page, with live inputs, properties, outputs, injected services, defer blocks and @for blocks.
 ---
 
 
@@ -53,6 +53,8 @@ The buttons only work for the tab that DevTools inspects. They don't appear in t
 
 When a form exists in the same source file, a **Show … in Forms** button opens it in the [Forms tab](./forms.md).
 
+**Store as global** stores the selected instance in the page console as `temp1`, then `temp2` and so on, and shows the name it used, for example **Stored as temp1.** See [Console handles](#console-handles).
+
 ### Facts
 
 - **Change detection**: `OnPush` or `Eager`.
@@ -73,6 +75,20 @@ A fact shows **Unknown** when Angular does not report it.
 
 **Properties** lists the component's other own fields: plain fields, state objects, signals and resources. It leaves out inputs, outputs, methods and injected services. Signals show their current value and a **signal** flag. A field that holds a `resource()` or `httpResource()` shows its status, value and error, with a **resource** flag.
 
+### Editing values
+
+On a live browser page, each input, property and writable signal of the selected component has an **Edit** button. **Edit** opens a field with the value as JSON. Type a new JSON value, such as `"Paris"`, `42`, `true` or `{"page": 2}`. Press Enter or **Apply** to write it, or Escape or **Cancel** to leave it. If the page refuses the write, the reason shows under the field.
+
+| Value                                                           | How the page writes it                                                           |
+| --------------------------------------------------------------- | -------------------------------------------------------------------------------- |
+| `signal()`, `linkedSignal()` or `model()`                       | Calls `.set()`. A `model()` also emits its change, so a two-way binding follows. |
+| A decorator input or a plain field                              | Assigns the value, then runs change detection with `ng.applyChanges`.            |
+| A signal input, `computed()`, `asReadonly()` signal or resource | No **Edit**. The row says why, for example that a parent binding sets the input. |
+
+A row also has no **Edit** when its value is not JSON (a class instance, `Map` or `Date`), when it is redacted, or when the panel shows it shortened. A parent binding sets a bound input again the next time its own value changes, so the edit lasts until then. Directive inputs are read-only.
+
+Set [`actions.components`](../getting-started/configuration.md#actions) to `false` to turn editing off. Agents write the same values with [`set-component-property` and `set-signal`](../agents/tools.md#edit-a-component).
+
 ### Injected services
 
 **Injected** lists each token the component class injects, with its flags and the injector that provided it. The block marks a token nobody provides as **not provided**. The block leaves out tokens that host directives inject. Use the [Injectors tab](./injectors.md) for those.
@@ -85,6 +101,20 @@ Hover or focus a row to highlight the block in the page. Click it to select the
 
 The list holds the first 500 blocks of a page. When the page has more, the count reads **500+**.
 
+### For blocks
+
+When the page renders `@for` blocks, an **@for blocks** list follows the defer blocks. Each row shows the component whose template holds the block, its item count, whether it has an `@empty` block (**@empty showing** when it shows) and what its `track` expression tracks by:
+
+| Label              | Template                                      |
+| ------------------ | --------------------------------------------- |
+| `track $index`     | `track $index`                                |
+| `track item`       | `track item`, where `item` is the loop item   |
+| `track expression` | Any other expression, such as `track trip.id` |
+
+A block with no items and no `@empty` block is marked **renders nothing**. Hover or focus a row to highlight the block in the page. Click it to select the component that holds it. The page lists up to 500 blocks, and the count reads **500+** past that.
+
+The list needs Angular 22.0 or later in a development build. On an older Angular, the section says that the page does not report `@for` blocks.
+
 ### Change detection
 
 Below the tree and the defer blocks, the **Change detection** section records change detection cycles with Angular's profiler. Click **Record**, use the app, then click **Stop recording**. **Clear** empties the recording. Each new recording starts empty, but a start sent while the page records, such as an agent's `record: "start"`, keeps the cycles recorded so far.
@@ -120,15 +150,16 @@ A notice at the top says why you see the source list: no page is connected, or t
 
 The live tree reads `window.ng`, which only development builds expose. It uses these functions:
 
-| Function                                                                   | Used for                                                            |
-| -------------------------------------------------------------------------- | ------------------------------------------------------------------- |
-| `ng.getComponent`, `ng.getDirectives`                                      | Finding instances and the directives on each host.                  |
-| `ng.getDirectiveMetadata`                                                  | Inputs, outputs, change detection and encapsulation.                |
-| `ɵcmp.debugInfo` on the component class                                    | The source file and line in the detail header.                      |
-| `ng.isSignal`                                                              | Unwrapping signal inputs.                                           |
-| `ng.getListeners`                                                          | Output listeners and DOM listeners.                                 |
-| `ng.getInjector`, `ɵgetDependenciesFromInjectable`, `ɵgetInjectorMetadata` | The **Injected** block, and the services **Properties** leaves out. |
-| `ng.ɵgetControlFlowBlocks`, or `ng.ɵgetDeferBlocks` before Angular 22      | The **Defer blocks** list.                                          |
+| Function                                                                   | Used for                                                                     |
+| -------------------------------------------------------------------------- | ---------------------------------------------------------------------------- |
+| `ng.getComponent`, `ng.getDirectives`                                      | Finding instances and the directives on each host.                           |
+| `ng.getDirectiveMetadata`                                                  | Inputs, outputs, change detection and encapsulation.                         |
+| `ɵcmp.debugInfo` on the component class                                    | The source file and line in the detail header.                               |
+| `ng.isSignal`                                                              | Unwrapping signal inputs.                                                    |
+| `ng.getListeners`                                                          | Output listeners and DOM listeners.                                          |
+| `ng.applyChanges`                                                          | Refreshing the view after an edit to an input or a plain field.              |
+| `ng.getInjector`, `ɵgetDependenciesFromInjectable`, `ɵgetInjectorMetadata` | The **Injected** block, and the services **Properties** leaves out.          |
+| `ng.ɵgetControlFlowBlocks`, or `ng.ɵgetDeferBlocks` before Angular 22      | The **Defer blocks** list, and from Angular 22 the **@for blocks** list. |
 
 ### Refresh rate
 
@@ -217,6 +248,24 @@ To go the other way, select a component and click **Reveal in Elements** in its
   
 
 
+### Console handles
+
+When you select a component in the panel, the page sets `$ng0` in its console to that instance. The previous selections move to `$ng1` through `$ng4`, newest first, so the last five stay at hand. Selecting the same instance again keeps the order, and an earlier one moves back to `$ng0`. **Pick component on page** sets `$ng0` too. Selections made by an agent tool don't.
+
+**Store as global** in the detail header, in the provider rows of the [Injectors tab](./injectors.md#store-a-provider-as-a-global) and next to the state on the [NgRx tab](./ngrx-store.md#store-the-state-as-a-global) stores a value as `temp1`, then the first free `tempN`.
+
+| Rule                    | Detail                                                                                                                                                                                                    |
+| ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| One page                | Only the tab that owns the selection writes the globals. Other tabs of the app don't change.                                                                                                              |
+| Page globals stay       | The overlay never overwrites a `$ngN` or `tempN` the page set itself. It skips that name.                                                                                                                 |
+| Nothing leaves the page | The value stays in the page. Only the variable name comes back to the panel.                                                                                                                              |
+| Cleanup                 | When the overlay stops, it removes the globals it still owns.                                                                                                                                             |
+| Components inspector    | `$ng0` and **Store as global** for a component need the Components inspector on. They don't change the app, so the [`actions`](../getting-started/configuration.md#actions) option doesn't turn them off. |
+
+`$ng0` and a stored component hold the live instance, the same object `ng.getComponent($0)` returns in the console. Read a signal input with `$ng0.title()`.
+
+The console handles need the browser overlay. The Angular Native and NativeScript overlays don't set them.
+
 ### Keyboard
 
 Use the arrow keys, Home and End to move through the tree. The right arrow expands a row or moves to its first child. The left arrow collapses a row or moves to its parent. The `*` key expands the focused row and every row at the same level under the same parent.
@@ -227,15 +276,18 @@ Press Escape in the filter box to clear it. When the filter matches nothing, **C
 
 ## Agent tools
 
-| Tool or resource             | Kind     | What it does                                                                                                                                                                          |
-| ---------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `pangular:get-components`    | tool     | Lists components and directives from source, with selector, kind, inputs, outputs, change detection, file and line.                                                                   |
-| `pangular:highlight`         | tool     | Highlights a component in the page and selects it. Takes an instance id, class name, host tag or CSS selector. Also retargets the Signals graph. Lists every instance a name matches. |
-| `pangular:inspect-component` | tool     | Selects one instance and returns its live detail: inputs, outputs, properties, listeners, directives and injected services.                                                           |
-| `pangular:list-components`   | tool     | Returns the live tree of one page as an indented outline with routed and directive markers. Takes a `filter` and a `depth`.                                                           |
-| `pangular:defer-blocks`      | tool     | Lists the `@defer` blocks of each page, and flags blocks that failed, blocks stuck on their placeholder and blocks still dehydrated.                                                  |
-| `pangular:change-detection`  | tool     | Starts, stops or clears a change detection recording, and returns the slowest and most often checked components and the latest cycles.                                                |
-| `pangular:component-tree`    | resource | The live tree per page, with the detail of the selected instance and the defer blocks.                                                                                                |
+| Tool or resource                  | Kind     | What it does                                                                                                                                                                          |
+| --------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `pangular:get-components`         | tool     | Lists components and directives from source, with selector, kind, inputs, outputs, change detection, file and line.                                                                   |
+| `pangular:highlight`              | tool     | Highlights a component in the page and selects it. Takes an instance id, class name, host tag or CSS selector. Also retargets the Signals graph. Lists every instance a name matches. |
+| `pangular:inspect-component`      | tool     | Selects one instance and returns its live detail: inputs, outputs, properties, listeners, directives and injected services.                                                           |
+| `pangular:list-components`        | tool     | Returns the live tree of one page as an indented outline with routed and directive markers. Takes a `filter` and a `depth`.                                                           |
+| `pangular:defer-blocks`           | tool     | Lists the `@defer` blocks of each page, and flags blocks that failed, blocks stuck on their placeholder and blocks still dehydrated.                                                  |
+| `pangular:for-blocks`             | tool     | Lists the `@for` blocks of each page with their item count, track kind and `@empty` block.                                                                                            |
+| `pangular:change-detection`       | tool     | Starts, stops or clears a change detection recording, and returns the slowest and most often checked components and the latest cycles.                                                |
+| `pangular:set-component-property` | tool     | Writes an input or property of one instance and runs change detection. An action.                                                                                                     |
+| `pangular:set-signal`             | tool     | Sets a writable signal that one instance holds as a property. An action.                                                                                                              |
+| `pangular:component-tree`         | resource | The live tree per page, with the detail of the selected instance and the defer blocks.                                                                                                |
 
 See [Tools](../agents/tools.md) and [Resources](../agents/resources.md).
 
diff --git a/apps/docs/src/content/inspectors/injectors.md b/apps/docs/src/content/inspectors/injectors.md
index bc6feb8b..7413ed64 100644
--- a/apps/docs/src/content/inspectors/injectors.md
+++ b/apps/docs/src/content/inspectors/injectors.md
@@ -53,6 +53,19 @@ For environment injectors, **Injected by its services** lists what the services
 
 **Provides** lists each provider with its kind: `useClass`, `useValue`, `useFactory` or `useExisting`. A bare class shows as `useClass`. Chips mark **viewProviders** and **multi** providers. Providers that come from imported modules show the import path, as `via A › B`.
 
+### Store a provider as a global
+
+Each live provider row has a **Store as global** button. It stores the provider's value in the page console as `temp1`, then the first free `tempN`, and shows the name it used, for example **Stored as temp1.** Only the tab you are looking at gets the global, and the overlay never overwrites a `tempN` the page set itself. See [Console handles](./components.md#console-handles).
+
+Storing never creates a provider:
+
+| Provider in             | Stored when                                                                                       |
+| ----------------------- | ------------------------------------------------------------------------------------------------- |
+| An environment injector | The injector already created the value. Otherwise the button says **… has not been created yet**. |
+| An element injector     | A component or directive on the page injected it from that element, so Angular created it.        |
+
+A class instance is stored as the live object. A `useValue` object or array is stored as a copy, with secret-looking keys, JWTs and `Bearer` values replaced by `[redacted]`. A provider whose token name looks secret, such as `API_KEY`, or whose value is a credential string, is not stored. See [what the devtools redact](../security.md).
+
 ### Source mode
 
 Without a live tree, the tab lists DI found in your source files, in four groups:
diff --git a/apps/docs/src/content/inspectors/ngrx-store.md b/apps/docs/src/content/inspectors/ngrx-store.md
index 1a87bbcd..013bdfb9 100644
--- a/apps/docs/src/content/inspectors/ngrx-store.md
+++ b/apps/docs/src/content/inspectors/ngrx-store.md
@@ -35,6 +35,10 @@ Select a store to see:
 - **State**, **Computed** and **Methods**, with a call count per method. **Copy** next to **State** copies the state as shown in the panel, with secrets already redacted. The copy is the panel's formatted text, not strict JSON. The tab tags `signalMethod` and `rxMethod` members. Once a method has been called, its chip also shows the average and last call duration, in milliseconds.
 - **Entities**, for a `signalStore` that calls `withEntities()`. One group per collection, with the entity count and the ids as chips. A group past 30 ids shows the first 30 and a count of the rest.
 
+### Store the state as a global
+
+**Store as global** next to **State** stores a copy of the selected store's state in the page console as `temp1`, then the first free `tempN`, and shows the name it used. For the classic Store, the copy is the whole state. For a signal store, it holds the state fields. Secret-looking keys, JWTs and `Bearer` values are replaced by `[redacted]` in the copy, and the button then says **Stored a copy as temp1, with secret fields masked.** Changing the copy doesn't change the store. Only the tab you are looking at gets the global. See [Console handles](./components.md#console-handles).
+
 ### Change log
 
 Signal stores get a **Change log**. The classic Store gets an **Action log**. Each entry shows its number, its type, the number of changes and the time. A method-call entry also shows how long the call itself took, and an entry whose change came from a dispatched event carries a tag with the event's type. An action also shows a badge for where it came from:
diff --git a/apps/docs/src/content/security.md b/apps/docs/src/content/security.md
index 8e12930d..7b65a37d 100644
--- a/apps/docs/src/content/security.md
+++ b/apps/docs/src/content/security.md
@@ -267,6 +267,8 @@ A secret route param is known from the route config before a navigation is recog
 
 Component inputs, signal values, NgRx state, and pipe inputs, outputs and async values use the same secret names and the same `mask` and `unmask` lists as forms. A value whose name looks secret is replaced with `[redacted]`. JWTs, bearer tokens and `key=value` pairs under secret keys (such as `token=abc123` or `password=…&user=a`) inside strings and error messages are replaced too, NgRx strings and errors included, and so are tokens used as object keys. The URL and title of the NgRx page, and the request URL of an `httpResource`, are redacted like router URLs.
 
+The **Components** tab and the `set-component-property` and `set-signal` tools never write a value you could not see: a name on the path that looks secret, or a value that shows `[redacted]` anywhere, is refused. Write a field next to a secret instead of the object that holds it. See [Editing values](./inspectors/components.md#editing-values).
+
 These values are read without running code on the page. A getter shows as `[Getter]` instead of its value, and a value that throws when it is read shows as `[Unreadable]`. An object seen again inside itself shows as `[Circular]`. An error shows as `Name: message`, and an error with a `cause` shows one level of the cause next to its message.
 
 ### Analog
diff --git a/extension/ui/assets/browser-agent-rpc-BXhoSh1z-BhKkMIUU.js b/extension/ui/assets/browser-agent-rpc-BXhoSh1z-ByKLZCxu.js
similarity index 93%
rename from extension/ui/assets/browser-agent-rpc-BXhoSh1z-BhKkMIUU.js
rename to extension/ui/assets/browser-agent-rpc-BXhoSh1z-ByKLZCxu.js
index dd38c540..1375f6cf 100644
--- a/extension/ui/assets/browser-agent-rpc-BXhoSh1z-BhKkMIUU.js
+++ b/extension/ui/assets/browser-agent-rpc-BXhoSh1z-ByKLZCxu.js
@@ -1 +1 @@
-import{t as e}from"./index-BbeEnYOw.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-B8i27GzX.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-BbeEnYOw.js b/extension/ui/assets/index-B8i27GzX.js
similarity index 74%
rename from extension/ui/assets/index-BbeEnYOw.js
rename to extension/ui/assets/index-B8i27GzX.js
index 7c919d03..dd22d287 100644
--- a/extension/ui/assets/index-BbeEnYOw.js
+++ b/extension/ui/assets/index-B8i27GzX.js
@@ -3,12 +3,12 @@
 \r	\v ᠎ - \u2028\u2029   `;`${tn}`,`${tn}`;var nn=(function(e){return e[e.Character=0]=`Character`,e[e.Identifier=1]=`Identifier`,e[e.PrivateIdentifier=2]=`PrivateIdentifier`,e[e.Keyword=3]=`Keyword`,e[e.String=4]=`String`,e[e.Operator=5]=`Operator`,e[e.Number=6]=`Number`,e[e.RegExpBody=7]=`RegExpBody`,e[e.RegExpFlags=8]=`RegExpFlags`,e[e.Error=9]=`Error`,e})(nn||{}),rn=(function(e){return e[e.Plain=0]=`Plain`,e[e.TemplateLiteralPart=1]=`TemplateLiteralPart`,e[e.TemplateLiteralEnd=2]=`TemplateLiteralEnd`,e})(rn||{});nn.Character,S.StyleMap,S.ClassMap,S.StyleProp,S.ClassProp,S.Attribute,S.Property,S.Attribute,S.Control,S.DomProperty,S.DomProperty,S.Attribute,S.StyleMap,S.ClassMap,S.StyleProp,S.ClassProp,S.Listener,S.TwoWayListener,S.AnimationListener,S.StyleMap,S.ClassMap,S.StyleProp,S.ClassProp,S.Property,S.TwoWayProperty,S.DomProperty,S.Attribute,S.Animation,S.Control,Xt.Idle,x.deferOnIdle,x.deferPrefetchOnIdle,x.deferHydrateOnIdle,Xt.Immediate,x.deferOnImmediate,x.deferPrefetchOnImmediate,x.deferHydrateOnImmediate,Xt.Timer,x.deferOnTimer,x.deferPrefetchOnTimer,x.deferHydrateOnTimer,Xt.Hover,x.deferOnHover,x.deferPrefetchOnHover,x.deferHydrateOnHover,Xt.Interaction,x.deferOnInteraction,x.deferPrefetchOnInteraction,x.deferHydrateOnInteraction,Xt.Viewport,x.deferOnViewport,x.deferPrefetchOnViewport,x.deferHydrateOnViewport,Xt.Never,x.deferHydrateNever,x.deferHydrateNever,x.deferHydrateNever,x.pipeBind1,x.pipeBind2,x.pipeBind3,x.pipeBind4,x.textInterpolate,x.textInterpolate1,x.textInterpolate2,x.textInterpolate3,x.textInterpolate4,x.textInterpolate5,x.textInterpolate6,x.textInterpolate7,x.textInterpolate8,x.textInterpolateV,x.interpolate,x.interpolate1,x.interpolate2,x.interpolate3,x.interpolate4,x.interpolate5,x.interpolate6,x.interpolate7,x.interpolate8,x.interpolateV,x.pureFunction0,x.pureFunction1,x.pureFunction2,x.pureFunction3,x.pureFunction4,x.pureFunction5,x.pureFunction6,x.pureFunction7,x.pureFunction8,x.pureFunctionV,x.resolveWindow,x.resolveDocument,x.resolveBody,rt.HTML,x.sanitizeHtml,rt.RESOURCE_URL,x.sanitizeResourceUrl,rt.SCRIPT,x.sanitizeScript,rt.STYLE,x.sanitizeStyle,rt.URL,x.sanitizeUrl,rt.ATTRIBUTE_NO_BINDING,x.validateAttribute,rt.HTML,x.trustConstantHtml,rt.RESOURCE_URL,x.trustConstantResourceUrl;var an=(function(e){return e[e.None=0]=`None`,e[e.ViewContextRead=1]=`ViewContextRead`,e[e.ViewContextWrite=2]=`ViewContextWrite`,e[e.SideEffectful=4]=`SideEffectful`,e})(an||{});C.Tmpl,C.Tmpl,C.Both,C.Host,C.Tmpl,C.Tmpl,C.Tmpl,C.Both,C.Both,C.Both,C.Tmpl,C.Both,C.Both,C.Tmpl,C.Both,C.Tmpl,C.Both,C.Both,C.Tmpl,C.Tmpl,C.Tmpl,C.Tmpl,C.Tmpl,C.Both,C.Both,C.Tmpl,C.Tmpl,C.Tmpl,C.Tmpl,C.Both,C.Both,C.Both,C.Tmpl,C.Tmpl,C.Both,C.Tmpl,C.Tmpl,C.Tmpl,C.Both,C.Both,C.Tmpl,C.Both,C.Both,C.Both,C.Both,C.Both,C.Tmpl,C.Tmpl,C.Tmpl,C.Tmpl,C.Tmpl,C.Tmpl,C.Tmpl,C.Tmpl,C.Tmpl,C.Tmpl,C.Tmpl,C.Tmpl,C.Both,C.Tmpl,C.Both,C.Tmpl,C.Both,C.Tmpl,C.Tmpl,C.Tmpl,C.Tmpl,C.Tmpl,C.Tmpl,C.Both,C.Both,C.Both,Pt.Property,Gt.Property,Pt.TwoWay,Gt.TwoWayProperty,Pt.Attribute,Gt.Attribute,Pt.Class,Gt.ClassName,Pt.Style,Gt.StyleProperty,Pt.LegacyAnimation,Gt.LegacyAnimation,Pt.Animation,Gt.Animation;var on=`%COMP%`;`${on}`,`${on}`,class e{static SINGLETON=new e;static veWillInferAnyFor(t){let n=e.SINGLETON;return t instanceof Nt?t.visit(n):t.receiver.visit(n)}visitUnary(e){return e.expr.visit(this)}visitBinary(e){return e.left.visit(this)||e.right.visit(this)}visitChain(){return!1}visitConditional(e){return e.condition.visit(this)||e.trueExp.visit(this)||e.falseExp.visit(this)}visitCall(){return!0}visitSafeCall(){return!1}visitImplicitReceiver(){return!1}visitThisReceiver(){return!1}visitInterpolation(e){return e.expressions.some(e=>e.visit(this))}visitKeyedRead(){return!1}visitLiteralArray(){return!0}visitLiteralMap(){return!0}visitLiteralPrimitive(){return!1}visitPipe(){return!0}visitPrefixNot(e){return e.expression.visit(this)}visitTypeofExpression(e){return e.expression.visit(this)}visitVoidExpression(e){return e.expression.visit(this)}visitNonNullAssert(e){return e.expression.visit(this)}visitPropertyRead(){return!1}visitSafePropertyRead(){return!1}visitSafeKeyedRead(){return!1}visitTemplateLiteral(){return!1}visitTemplateLiteralElement(){return!1}visitTaggedTemplateLiteral(){return!1}visitParenthesizedExpression(e){return e.expression.visit(this)}visitRegularExpressionLiteral(){return!1}visitSpreadElement(e){return e.expression.visit(this)}visitArrowFunction(e,t){return!1}};var sn=null,cn=!1,ln=1,un=null,dn=Symbol(`SIGNAL`);function w(e){let t=sn;return sn=e,t}function fn(){return sn}var pn={version:0,lastCleanEpoch:0,dirty:!1,producers:void 0,producersTail:void 0,consumers:void 0,consumersTail:void 0,recomputing:!1,consumerAllowSignalWrites:!1,consumerIsAlwaysLive:!1,kind:`unknown`,producerMustRecompute:()=>!1,producerRecomputeValue:()=>{},consumerMarkedDirty:()=>{},consumerOnSignalRead:()=>{}};function mn(e){if(cn)throw Error(``);if(sn===null)return;sn.consumerOnSignalRead(e);let t=sn.producersTail;if(t!==void 0&&t.producer===e)return;let n,r=sn.recomputing;if(r&&(n=t===void 0?sn.producers:t.nextProducer,n!==void 0&&n.producer===e)){sn.producersTail=n,n.lastReadVersion=e.version,n.knownValidAtEpoch=ln;return}let i=e.consumersTail;if(i!==void 0&&i.consumer===sn&&(!r||i.knownValidAtEpoch===ln))return;let a=kn(sn),o={producer:e,consumer:sn,nextProducer:n,prevConsumer:void 0,knownValidAtEpoch:ln,lastReadVersion:e.version,nextConsumer:void 0};sn.producersTail=o,t===void 0?sn.producers=o:t.nextProducer=o,a&&Dn(e,o)}function hn(){ln++}function gn(e){if((!kn(e)||e.dirty)&&(e.dirty||e.lastCleanEpoch!==ln)){if(!e.producerMustRecompute(e)&&!Tn(e)){bn(e);return}e.producerRecomputeValue(e),bn(e)}}function _n(e){if(e.consumers===void 0)return;let t=cn;cn=!0;try{for(let t=e.consumers;t!==void 0;t=t.nextConsumer){let e=t.consumer;e.dirty||yn(e)}}finally{cn=t}}function vn(){return sn?.consumerAllowSignalWrites!==!1}function yn(e){e.dirty=!0,_n(e),e.consumerMarkedDirty?.(e)}function bn(e){e.dirty=!1,e.lastCleanEpoch=ln}function xn(e){return e&&Sn(e),w(e)}function Sn(e){if(e.producersTail?.knownValidAtEpoch===ln){let t=e.producers;for(;t!==void 0;)t.knownValidAtEpoch=null,t=t.nextProducer}e.producersTail=void 0,e.recomputing=!0}function Cn(e,t){w(t),e&&wn(e)}function wn(e){e.recomputing=!1;let t=e.producersTail,n=t===void 0?e.producers:t.nextProducer;if(n!==void 0){if(kn(e))do n=On(n);while(n!==void 0);t===void 0?e.producers=void 0:t.nextProducer=void 0}}function Tn(e){for(let t=e.producers;t!==void 0;t=t.nextProducer){let e=t.producer,n=t.lastReadVersion;if(n!==e.version||(gn(e),n!==e.version))return!0}return!1}function En(e){if(kn(e)){let t=e.producers;for(;t!==void 0;)t=On(t)}e.producers=void 0,e.producersTail=void 0,e.consumers=void 0,e.consumersTail=void 0}function Dn(e,t){let n=e.consumersTail,r=kn(e);if(n===void 0?(t.nextConsumer=void 0,e.consumers=t):(t.nextConsumer=n.nextConsumer,n.nextConsumer=t),t.prevConsumer=n,e.consumersTail=t,!r)for(let t=e.producers;t!==void 0;t=t.nextProducer)Dn(t.producer,t)}function On(e){let t=e.producer,n=e.nextProducer,r=e.nextConsumer,i=e.prevConsumer;if(e.nextConsumer=void 0,e.prevConsumer=void 0,r===void 0?t.consumersTail=i:r.prevConsumer=i,i!==void 0)i.nextConsumer=r;else if(t.consumers=r,!kn(t)){let e=t.producers;for(;e!==void 0;)e=On(e)}return n}function kn(e){return e.consumerIsAlwaysLive||e.consumers!==void 0}function An(e){un?.(e)}function jn(e,t){return Object.is(e,t)}function Mn(e,t){let n=Object.create(In);n.computation=e,t!==void 0&&(n.equal=t);let r=()=>{if(gn(n),mn(n),n.value===Fn)throw n.error;return n.value};return r[dn]=n,An(n),r}var Nn=Symbol(`UNSET`),Pn=Symbol(`COMPUTING`),Fn=Symbol(`ERRORED`),In={...pn,value:Nn,dirty:!0,error:null,equal:jn,kind:`computed`,producerMustRecompute(e){return e.value===Nn||e.value===Pn},producerRecomputeValue(e){if(e.value===Pn)throw Error(``);let t=e.value;e.value=Pn;let n=xn(e),r,i=!1;try{r=e.computation(),w(null),i=t!==Nn&&t!==Fn&&r!==Fn&&e.equal(t,r)}catch(t){r=Fn,e.error=t}finally{Cn(e,n)}if(i){e.value=t;return}e.value=r,e.version++}};function Ln(){throw Error()}var Rn=Ln;function zn(e){Rn(e)}function Bn(e){Rn=e}var Vn=null;function Hn(e,t){let n=Object.create(Kn);n.value=e,t!==void 0&&(n.equal=t);let r=()=>Un(n);return r[dn]=n,An(n),[r,e=>Wn(n,e),e=>Gn(n,e)]}function Un(e){return mn(e),e.value}function Wn(e,t){vn()||zn(e),e.equal(e.value,t)||(e.value=t,qn(e))}function Gn(e,t){vn()||zn(e),Wn(e,t(e.value))}var Kn={...pn,equal:jn,value:void 0,kind:`signal`};function qn(e){e.version++,hn(),_n(e),Vn?.(e)}var Jn={...pn,consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!0,dirty:!0,kind:`effect`};function Yn(e){if(e.dirty=!1,e.version>0&&!Tn(e))return;e.version++;let t=xn(e);try{e.cleanup(),e.fn()}finally{Cn(e,t)}}var Xn=void 0;function Zn(){return Xn}function Qn(e){let t=Xn;return Xn=e,t}var $n=Symbol(`NotFound`);function er(e){return e===$n||e?.name===`ɵNotFound`}function tr(e,t,n){let r=Object.create(ir);r.source=e,r.computation=t,n!=null&&(r.equal=n);let i=()=>{if(gn(r),mn(r),r.value===Fn)throw r.error;return r.value};return i[dn]=r,An(r),i}function nr(e,t){gn(e),Wn(e,t),bn(e)}function rr(e,t){if(gn(e),e.value===Fn)throw e.error;Gn(e,t),bn(e)}var ir={...pn,value:Nn,dirty:!0,error:null,equal:jn,kind:`linkedSignal`,producerMustRecompute(e){return e.value===Nn||e.value===Pn},producerRecomputeValue(e){if(e.value===Pn)throw Error(``);let t=e.value;e.value=Pn;let n=xn(e),r,i=!1;try{let n=e.source(),a=t!==Nn&&t!==Fn,o=a?{source:e.sourceValue,value:t}:void 0;r=e.computation(n,o),e.sourceValue=n,w(null),i=a&&r!==Fn&&e.equal(t,r)}catch(t){r=Fn,e.error=t}finally{Cn(e,n)}if(i){e.value=t;return}e.value=r,e.version++}};function ar(e){let t=w(null);try{return e()}finally{w(t)}}var or=function(e,t){return or=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},or(e,t)};function sr(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Class extends value `+String(t)+` is not a constructor or null`);or(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function cr(e){var t=typeof Symbol==`function`&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length==`number`)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)}function lr(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-->0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function ur(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r0},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){let n=[];for(let r=0;rt;){let t=i-2;e[i]=e[t],i--}e[t]=n,e[t+1]=r}}function oa(e,t,n){let r=ca(e,t);return r>=0?e[r|1]=n:(r=~r,aa(e,r,t,n)),r}function sa(e,t){let n=ca(e,t);if(n>=0)return e[n|1]}function ca(e,t){return la(e,t,1)}function la(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;ya(t,a,[],r)&&(i||=[],i.push(t))}),i!==void 0&&va(i,a),n}function va(e,t){for(let n=0;n{t(e,r)})}}function ya(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)ya(i,t,n,r)}}else if(a){if(a.imports!=null&&!s){r.add(i);let e;try{ta(a.imports,i=>{ya(i,t,n,r)&&(e||=[],e.push(i))})}finally{}e!==void 0&&va(e,t)}if(!s){let e=Qi(i)||(()=>new i);t({provide:i,useFactory:e,deps:da},i),t({provide:ma,useValue:i,multi:!0},i),t({provide:fa,useValue:()=>qi(i),multi:!0},i)}let o=a.providers;if(o!=null&&!s){let n=e;ba(o,e=>{t(e,n)})}}else return!1;return i!==e&&e.providers!==void 0}function ba(e,t){for(let n of e)yi(n)&&(n=n.ɵproviders),Array.isArray(n)?ba(n,t):t(n)}var xa=ii({provide:String,useValue:ii});function Sa(e){return typeof e==`object`&&!!e&&xa in e}function Ca(e){return!!(e&&e.useExisting)}function wa(e){return!!(e&&e.useFactory)}function Ta(e){return typeof e==`function`}var Ea=new vi(``),Da={},Oa={},ka=void 0;function Aa(){return ka===void 0&&(ka=new ha),ka}var ja=class{},Ma=class extends ja{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,Ha(e,e=>this.processProvider(e)),this.records.set(pa,Ra(void 0,this)),r.has(`environment`)&&this.records.set(ja,Ra(void 0,this));let i=this.records.get(Ea);i!=null&&typeof i.value==`string`&&this.scopes.add(i.value),this.injectorDefTypes=new Set(this.get(ma,da,{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(){La(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 La(this),this._onDestroyHooks.push(e),()=>this.removeOnDestroy(e)}runInContext(e){La(this);let t=Qn(this),n=Bi(void 0);try{return e()}finally{Qn(t),Bi(n)}}get(e,t=Ui,n){if(La(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=Va(e)&&fi(e);t=n&&this.injectableDefInScope(n)?Ra(Na(e),Da):null,this.records.set(e,t)}if(t!=null)return this.hydrate(e,t,r)}let n=r&2?Aa():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(fa,da,{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=Ta(e)?e:li(e&&e.provide),n=Fa(e);if(!Ta(e)&&e.multi===!0){let n=this.records.get(t);n||(n=Ra(void 0,Da,!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===Oa)throw Pi(``);return t.value===Da&&(t.value=Oa,t.value=t.factory(void 0,n)),typeof t.value==`object`&&t.value&&Ba(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 Na(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 Pa(e);throw new T(-204,!1)}function Pa(e){if(e.length>0)throw new T(-204,!1);let t=mi(e);return t===null?()=>new e:()=>t.factory(e)}function Fa(e){return Sa(e)?Ra(void 0,e.useValue):Ra(Ia(e),Da)}function Ia(e,t,n){let r;if(Ta(e)){let t=li(e);return Qi(t)||Na(t)}if(Sa(e))r=()=>li(e.useValue);else if(wa(e))r=()=>e.useFactory(...Xi(e.deps||[]));else if(Ca(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(za(e))r=()=>new t(...Xi(e.deps));else return Qi(t)||Na(t)}return r}function La(e){if(e.destroyed)throw new T(-205,!1)}function Ra(e,t,n=!1){return{factory:e,value:t,multi:n?[]:void 0}}function za(e){return!!e.deps}function Ba(e){return typeof e==`object`&&!!e&&typeof e.ngOnDestroy==`function`}function Va(e){return typeof e==`function`||typeof e==`object`&&e.ngMetadataName===`InjectionToken`}function Ha(e,t){for(let n of e)Array.isArray(n)?Ha(n,t):n&&yi(n)?Ha(n.ɵproviders,t):t(n)}function Ua(e,t){let n;e instanceof Ma?(La(e),n=e):n=new Gi(e);let r=Qn(n),i=Bi(void 0);try{return t()}finally{Qn(r),Bi(i)}}function Wa(){return zi()!==void 0||Zn()!=null}var Ga=1;function Ka(e){return Array.isArray(e)&&typeof e[Ga]==`object`}function qa(e){return Array.isArray(e)&&e[Ga]===!0}function Ja(e){return!!(e.flags&4)}function Ya(e){return e.componentOffset>-1}function Xa(e){return(e.flags&1)==1}function Za(e){return!!e.template}function Qa(e){return!!(e[2]&512)}function $a(e){return(e[2]&256)==256}var eo=(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})(eo||{}),to=`math`;function no(e){for(;Array.isArray(e);)e=e[0];return e}function ro(e,t){return no(t[e])}function io(e,t){return no(t[e.index])}function ao(e,t){return e.data[t]}function oo(e,t){return e[t]}function so(e,t,n,r){n>=e.data.length&&(e.data[n]=null,e.blueprint[n]=null),t[n]=r}function co(e,t){let n=t[e];return Ka(n)?n:n[0]}function lo(e){return(e[2]&128)==128}function uo(e){return qa(e[3])}function fo(e,t){return t==null?null:e[t]}function po(e){e[17]=0}function mo(e){e[2]&1024||(e[2]|=1024,lo(e)&&vo(e))}function ho(e,t){for(;e>0;)t=t[14],e--;return t}function go(e){return!!(e[2]&9216||e[24]?.dirty)}function _o(e){e[10].changeDetectionScheduler?.notify(8),e[2]&64&&(e[2]|=1024),go(e)&&vo(e)}function vo(e){e[10].changeDetectionScheduler?.notify(0);let t=xo(e);for(;t!==null&&!(t[2]&8192||(t[2]|=8192,!lo(t)));)t=xo(t)}function yo(e,t){if($a(e))throw new T(911,!1);e[21]===null&&(e[21]=[]),e[21].push(t)}function bo(e,t){if(e[21]===null)return;let n=e[21].indexOf(t);n!==-1&&e[21].splice(n,1)}function xo(e){let t=e[3];return qa(t)?t[3]:t}function So(e){return e[7]??=[]}function Co(e){return e.cleanup??=[]}function wo(e,t,n,r){let i=So(t);i.push(n),e.firstCreatePass&&Co(e).push(r,i.length-1)}var To={lFrame:os(null),bindingsEnabled:!0,skipHydrationRootTNode:null},Eo=!1;function Do(){return To.lFrame.elementDepthCount}function Oo(){To.lFrame.elementDepthCount++}function ko(){To.lFrame.elementDepthCount--}function Ao(){return To.bindingsEnabled}function jo(){return To.skipHydrationRootTNode!==null}function Mo(e){return To.skipHydrationRootTNode===e}function No(){To.skipHydrationRootTNode=null}function D(){return To.lFrame.lView}function Po(){return To.lFrame.tView}function O(e){return To.lFrame.contextLView=e,e[8]}function k(e){return To.lFrame.contextLView=null,e}function Fo(){let e=Io();for(;e!==null&&e.type===64;)e=e.parent;return e}function Io(){return To.lFrame.currentTNode}function Lo(){let e=To.lFrame,t=e.currentTNode;return e.isParent?t:t.parent}function Ro(e,t){let n=To.lFrame;n.currentTNode=e,n.isParent=t}function zo(){return To.lFrame.isParent}function Bo(){To.lFrame.isParent=!1}function Vo(){return To.lFrame.contextLView}function Ho(){return Eo}function Uo(e){let t=Eo;return Eo=e,t}function Wo(){let e=To.lFrame,t=e.bindingRootIndex;return t===-1&&(t=e.bindingRootIndex=e.tView.bindingStartIndex),t}function Go(){return To.lFrame.bindingIndex}function Ko(e){return To.lFrame.bindingIndex=e}function qo(){return To.lFrame.bindingIndex++}function Jo(e){let t=To.lFrame,n=t.bindingIndex;return t.bindingIndex+=e,n}function Yo(){return To.lFrame.inI18n}function Xo(e,t){let n=To.lFrame;n.bindingIndex=n.bindingRootIndex=e,Qo(t)}function Zo(){return To.lFrame.currentDirectiveIndex}function Qo(e){To.lFrame.currentDirectiveIndex=e}function $o(e){let t=To.lFrame.currentDirectiveIndex;return t===-1?null:e[t]}function es(){return To.lFrame.currentQueryIndex}function ts(e){To.lFrame.currentQueryIndex=e}function ns(e){let t=e[1];return t.type===2?t.declTNode:t.type===1?e[5]:null}function rs(e,t,n){if(n&4){let r=t,i=e;for(;r=r.parent,r===null&&!(n&1)&&(r=ns(i),!(r===null||(i=i[14],r.type&10))););if(r===null)return!1;t=r,e=i}let r=To.lFrame=as();return r.currentTNode=t,r.lView=e,!0}function is(e){let t=as(),n=e[1];To.lFrame=t,t.currentTNode=n.firstChild,t.lView=e,t.tView=n,t.contextLView=e,t.bindingIndex=n.bindingStartIndex,t.inI18n=!1}function as(){let e=To.lFrame,t=e===null?null:e.child;return t===null?os(e):t}function os(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 ss(){let e=To.lFrame;return To.lFrame=e.parent,e.currentTNode=null,e.lView=null,e}var cs=ss;function ls(){let e=ss();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 us(e){return(To.lFrame.contextLView=ho(e,To.lFrame.contextLView))[8]}function ds(){return To.lFrame.selectedIndex}function fs(e){To.lFrame.selectedIndex=e}function ps(){let e=To.lFrame;return ao(e.tView,e.selectedIndex)}function A(){To.lFrame.currentNamespace=`svg`}function ms(){hs()}function hs(){To.lFrame.currentNamespace=null}function gs(){return To.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 Ma([n||da,ga(e)],t||Aa(),null,i)}var Ss=class e{static THROW_IF_NOT_FOUND=Ui;static NULL=new ha;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(pa)});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 $a(this._lView)}onDestroy(e){let t=this._lView;return yo(t,e),()=>bo(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,Wa()&&(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(ja),n;return r=>{e.runOutsideAngular(()=>{t.destroyed&&!n?setTimeout(()=>{throw r}):(n??=t.get(Js),n.handleError(r))})}}}),Xs={provide:fa,useValue:()=>{E(Js,{optional:!0})},multi:!0};function j(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(),Fo())}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=Uo(!1);try{Yn(this)}finally{Uo(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,vo(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||{}),wc=class{previousValue;currentValue;firstChange;constructor(e,t,n){this.previousValue=e,this.currentValue=t,this.firstChange=n}isFirstChange(){return this.firstChange}};function Tc(e,t,n,r){t===null?e[n]=r:t.applyValueToInputSignal(t,r)}var Ec=null,Dc=(()=>{Ec=kc;let e=()=>kc;return e.ngInherit=!0,e})();function Oc(){return Ec}function kc(e){return e.type.prototype.ngOnChanges&&(e.setInput=jc),Ac}function Ac(){let e=Nc(this),t=e?.current;if(t){let n=e.previous;if(n===ua)e.previous=t;else for(let e in t)n[e]=t[e];e.current=null,this.ngOnChanges(t)}}function jc(e,t,n,r,i){let a=this.declaredInputs[r],o=Nc(e)||Pc(e,{previous:ua,current:null}),s=o.current||={},c=o.previous,l=c[a];s[a]=new wc(l&&l.currentValue,n,c===ua),Tc(e,t,i,n)}var Mc=`__ngSimpleChanges__`;function Nc(e){return Object.hasOwn(e,Mc)&&e[Mc]||null}function Pc(e,t){return e[Mc]=t}var Fc=[],Ic=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,Uc(o,a)):Uc(o,a)}var Gc=-1,Kc=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 qc(e){return!!(e.flags&8)}function Jc(e){return!!(e.flags&16)}function Yc(e,t,n){let r=0;for(;rt){o=a-1;break}}}for(;a>16}function rl(e,t){let n=nl(e),r=t;for(;n>0;)r=r[14],n--;return r}var il=!0;function al(e){let t=il;return il=e,t}var ol=255,sl=5,cl=0,ll={};function ul(e,t,n){let r;typeof n==`string`?r=n.charCodeAt(0)||0:Object.hasOwn(n,wi)&&(r=n[wi]),r??=n[wi]=cl++;let i=r&ol,a=1<>sl)]|=a}function dl(e,t){let n=pl(e,t);if(n!==-1)return n;let r=t[1];r.firstCreatePass&&(e.injectorIndex=t.length,fl(r.data,e),fl(t,null),fl(r.blueprint,null));let i=ml(e,t),a=e.injectorIndex;if(el(i)){let e=tl(i),n=rl(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 fl(e,t){e.push(0,0,0,0,0,0,0,0,t)}function pl(e,t){return e.injectorIndex===-1||e.parent&&e.parent.injectorIndex===e.injectorIndex||t[e.injectorIndex+8]===null?-1:e.injectorIndex}function ml(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=kl(i),r===null)return Gc;if(n++,i=i[14],r.injectorIndex!==-1)return r.injectorIndex|n<<16}return Gc}function hl(e,t,n){ul(e,t,n)}function gl(e,t,n){if(n&8||e!==void 0)return e;Fi(t,`NodeInjector`)}function _l(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 gl(r,t,n)}function vl(e,t,n,r=0,i){if(e!==null){if(t[2]&2048&&!(r&2)){let i=Ol(e,t,n,r,ll);if(i!==ll)return i}let i=yl(e,t,n,r,ll);if(i!==ll)return i}return _l(t,n,r,i)}function yl(e,t,n,r,i){let a=Cl(n);if(typeof a==`function`){if(!rs(t,e,r))return r&1?gl(i,n,r):_l(t,n,r,i);try{let e;if(e=a(r),e==null&&!(r&8))Fi(n);else return e}finally{cs()}}else if(typeof a==`number`){let i=null,o=pl(e,t),s=Gc,c=r&1?t[15][5]:null;for((o===-1||r&4)&&(s=o===-1?ml(e,t):t[o+8],s===Gc||!Tl(r,!1)?o=-1:(i=t[1],o=tl(s),t=rl(s,t)));o!==-1;){let e=t[1];if(wl(a,o,e.data)){let e=bl(o,t,n,i,r,c);if(e!==ll)return e}s=t[o+8],s!==Gc&&Tl(r,t[1].data[o+8]===c)&&wl(a,o,t)?(i=e,o=tl(s),t=rl(s,t)):o=-1}}return i}function bl(e,t,n,r,i,a){let o=t[1],s=o.data[e+8],c=xl(s,o,n,r==null?Ya(s)&&il:r!=o&&!!(s.type&3),i&1&&a===s);return c===null?ll:Sl(t,o,c,s,i)}function xl(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&&Za(e)&&e.type===n)return c}return null}function Sl(e,t,n,r,i){let a=e[n],o=t.data;if(a instanceof Kc){let s=a;if(s.resolving)throw Pi(``);let c=al(s.canSeeViewProviders);s.resolving=!0,o[n].type||o[n];let l=s.injectImpl?Bi(s.injectImpl):null;rs(e,r,0);try{a=e[n]=s.factory(void 0,i,o,e,r),t.firstCreatePass&&n>=r.directiveStart&&Lc(n,o[n],t)}finally{l!==null&&Bi(l),al(c),s.resolving=!1,cs()}}return a}function Cl(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&ol:Dl:t}function wl(e,t,n){let r=1<>sl)]&r)}function Tl(e,t){return!(e&2)&&!(e&1&&t)}var El=class{_tNode;_lView;constructor(e,t){this._tNode=e,this._lView=t}get(e,t,n){return vl(this._tNode,this._lView,e,Ji(n),t)}};function Dl(){return new El(Fo(),D())}function Ol(e,t,n,r,i){let a=e,o=t;for(;a!==null&&o!==null&&o[2]&2048&&!Qa(o);){let e=yl(a,o,n,r|2,ll);if(e!==ll)return e;r&=-5;let t=a.parent;if(!t){let e=o[20];if(e){let t=e.get(n,ll,r);if(t!==ll)return t}t=kl(o),o=o[14]}a=t}return i}function kl(e){let t=e[1],n=t.type;return n===2?t.declTNode:n===1?e[5]:null}function Al(e){return{token:e.token,providedIn:e.autoProvided===!1?null:`root`,factory:e.factory,value:void 0}}function jl(){return Ml(Fo(),D())}function Ml(e,t){return new Nl(io(e,t))}var Nl=(()=>{class e{nativeElement;constructor(e){this.nativeElement=e}static __NG_ELEMENT_ID__=jl}return e})();function Pl(e){return e instanceof Nl?e.nativeElement:e}function Fl(){return this._results[Symbol.iterator]()}var Il=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]=Fl};function Ll(e){return(e.flags&128)==128}var Rl=(function(e){return e[e.OnPush=0]=`OnPush`,e[e.Eager=1]=`Eager`,e[e.Default=1]=`Default`,e})(Rl||{}),zl=new Map,Bl=0;function Vl(){return Bl++}function Hl(e){zl.set(e[19],e)}function Ul(e){zl.delete(e[19])}var Wl=`__ngContext__`;function Gl(e,t){Ka(t)?(e[Wl]=t[19],Hl(t)):e[Wl]=t}function Kl(e){return Jl(e[12])}function ql(e){return Jl(e[4])}function Jl(e){for(;e!==null&&!qa(e);)e=e[4];return e}var Yl=void 0;function Xl(e){Yl=e}function Zl(){if(Yl!==void 0)return Yl;if(typeof document<`u`)return document;throw new T(210,!1)}var Ql=!1,$l=new vi(``,{factory:()=>Ql}),eu=new WeakMap;function tu(e,t){if(typeof e!=`object`||!e)return;let n=eu.get(e);n||(n=new WeakSet,eu.set(e,n)),n.add(t)}function nu(e){return(e.flags&32)==32}var ru=()=>null;function iu(e,t,n=!1){return ru(e,t,n)}function au(e,t){let n=e.contentQueries;if(n!==null){let r=w(null);try{for(let r=0;r|^->||--!>|)/g,_u=`​$1​`;function vu(e){return e.replace(hu,e=>e.replace(gu,_u))}function yu(e,t){return e.createText(t)}function bu(e,t,n){e.setValue(t,n)}function xu(e,t){return e.createComment(vu(t))}function Su(e,t,n){return e.createElement(t,n)}function Cu(e,t,n,r,i){e.insertBefore(t,n,r,i)}function wu(e,t,n){e.appendChild(t,n)}function Tu(e,t,n,r,i){r===null?wu(e,t,n):Cu(e,t,n,r,i)}function Eu(e,t,n,r){e.removeChild(null,t,n,r)}function Du(e,t,n){e.setAttribute(t,`style`,n)}function Ou(e,t,n){n===``?e.removeAttribute(t,`class`):e.setAttribute(t,`class`,n)}function ku(e,t,n){let{mergedAttrs:r,classes:i,styles:a}=n;r!==null&&Yc(e,t,r),i!==null&&Ou(e,t,i),a!==null&&Du(e,t,a)}function Au(e){let t=ju();return t?t.sanitize(eo.URL,e)||``:du(e,`URL`)?uu(e):mu(Ai(e))}function ju(){let e=D();return e&&e[10].sanitizer}function Mu(e){return e.ownerDocument.defaultView}function Nu(e){return e.ownerDocument}function Pu(e,t,n){let r=e.length;for(;;){let i=e.indexOf(t,n);if(i===-1)return i;if(i===0||e.charCodeAt(i-1)<=32){let n=t.length;if(i+n===r||e.charCodeAt(i+n)<=32)return i}n=i+1}}var Fu=`ng-template`;function Iu(e,t,n,r){let i=0;if(r){for(;i-1){let e;for(;++ia?``:i[u+1].toLowerCase(),r&2&&l!==e){if(Bu(r))return!1;o=!0}}}}}return Bu(r)||o}function Bu(e){return!(e&1)}function Vu(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!==``&&!Bu(o)&&(t+=qu(a,i),i=``),r=o,a||=!Bu(r);n++}return i!==``&&(t+=qu(a,i)),t}function Yu(e){return e.map(Ju).join(`,`)}function Xu(e){let t=[],n=[],r=1,i=2;for(;r!1});function nd(e){if(!e)return 0;let t=e.toLowerCase().indexOf(`ms`)>-1?1:1e3;return parseFloat(e)*t}function rd(e,t){return e.getPropertyValue(t).split(`,`).map(e=>e.trim())}function id(e){let t=rd(e,`transition-property`),n=rd(e,`transition-duration`),r=rd(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 ad(e){let t=rd(e,`animation-name`),n=rd(e,`animation-delay`),r=rd(e,`animation-duration`),i=rd(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 od(e,t){return e!==void 0&&e.duration>t.duration}function sd(e){return(e.animationName!=null||e.propertyName!=null)&&e.duration>0}function cd(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 ld(e,t){let n=getComputedStyle(e),r=ad(n),i=id(n),a=r.duration>i.duration?r:i;od(t.get(e),a)||sd(a)&&t.set(e,a)}function ud(e,t,n){if(!n)return;let r=e.getAnimations();return r.length===0?ld(e,t):dd(e,t,r)}function dd(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=cd(e)??0,n,i;e.animationName?i=e.animationName:n=e.transitionProperty,t>=r.duration&&(r={animationName:i,propertyName:n,duration:t})}od(t.get(e),r)||sd(r)&&t.set(e,r)}var fd=new Set,pd=!1,md=1,hd=typeof document<`u`&&typeof document?.documentElement?.getAnimations==`function`;function gd(e){return e[9].get(td,pd)}function _d(e,t,n){let r=yd.get(e);if(r){for(let e of t)r.classList.push(e);for(let e of n)r.cleanupFns.push(e)}else yd.set(e,{classList:t,cleanupFns:n})}function vd(e){let t=yd.get(e);if(t){for(let e of t.cleanupFns)e();yd.delete(e)}bd.delete(e)}var yd=new WeakMap,bd=new WeakMap,xd=new WeakMap;function Sd(e){return e?e[14]??e:null}var Cd=new WeakSet;function wd(e,t,n){let r=xd.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 Td(e,t,n){let r=Sd(n),i=xd.get(e);i?i.some(e=>e.el===t)||i.push({el:t,declarationView:r}):xd.set(e,[{el:t,declarationView:r}])}function Ed(e){let t=e[26]??={};return t.enter??=new Map}function Dd(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 Od(e){return e.composedPath?e.composedPath()[0]:e.target}function kd(e,t){let n=bd.get(t);if(n===void 0)return!0;if(t!==Od(e))return!1;let r=e.animation;if(r){let e=cd(r);if(e!==void 0&&e+md{class e{impl=null;execute(){this.impl?.execute()}static ɵprov=di({token:e,providedIn:`root`,factory:()=>new e})}return e})(),Id=[0,1,2,3],Ld=(()=>{class e{ngZone=E(Is);scheduler=E(ac);errorHandler=E(Js,{optional:!0});sequences=new Set;deferredRegistrations=new Set;executing=!1;constructor(){E(Md,{optional:!0})}execute(){let e=this.sequences.size>0;e&&Ic(Cc.AfterRenderHooksStart),this.executing=!0;for(let e of Id)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&&Ic(Cc.AfterRenderHooksEnd)}register(e){let{view:t}=e;t===void 0?this.executing?this.deferredRegistrations.add(e):this.addSequence(e):((t[25]??=[]).push(e),vo(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(jd.AFTER_NEXT_RENDER,e):e()}static ɵprov=di({token:e,providedIn:`root`,factory:()=>new e})}return e})(),Rd=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 zd(e,t){let n=t?.injector??E(Ss);return Pd(`NgAfterNextRender`),Vd(e,n,t,!0)}function Bd(e){return e instanceof Function?[void 0,void 0,e,void 0]:[e.earlyRead,e.write,e.mixedReadWrite,e.read]}function Vd(e,t,n,r){let i=t.get(Fd);i.impl??=t.get(Ld);let a=t.get(Md,null,{optional:!0}),o=n?.manualCleanup===!0?null:t.get(ws),s=t.get(rc,null,{optional:!0}),c=new Rd(i.impl,Bd(e),s?.view,r,o,a?.snapshot(null));return i.impl.register(c),c}var Hd=new vi(``,{factory:()=>{let e=E(ja),t=new Set;return e.onDestroy(()=>t.clear()),{queue:t,isScheduled:!1,scheduler:null,injector:e}}});function Ud(e,t,n){let r=e.get(Hd);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 Wd(e,t){let n=e.get(Hd);if(Array.isArray(t))for(let e of t)n.queue.delete(e);else n.queue.delete(t)}function Gd(e,t){let n=e.get(Hd);if(t.detachedLeaveAnimationFns){for(let e of t.detachedLeaveAnimationFns)n.queue.delete(e);t.detachedLeaveAnimationFns=void 0}}function Kd(e){let t=e.get(Hd);t.isScheduled||=(zd(()=>{t.isScheduled=!1;for(let e of t.queue)e();t.queue.clear()},{injector:t.injector}),!0)}function qd(e){let t=e.get(Hd);t.scheduler=Kd,t.scheduler(e)}function Jd(e,t){for(let[n,r]of t)Ud(e,r.animateFns)}function Yd(e,t,n,r){let i=e?.[26]?.enter;t!==null&&i&&i.has(n.index)&&Jd(r,i)}function Xd(e,t,n,r){try{n.get(pa)}catch{return r(!1)}let i=e?.[26];i?.enter?.has(t.index)&&Wd(n,i.enter.get(t.index).animateFns);let a=Zd(e,t,i);if(a.size===0){let n=!1;if(e){let r=[];$d(e,t,r),n=r.length>0}if(!n)return r(!1)}e&&fd.add(e[19]),Ud(n,()=>Qd(e,t,i||void 0,a,r),i||void 0)}function Zd(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 Qd(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&&$d(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),tf(e,t.running,i)}else Promise.allSettled(a).then(()=>{e&&fd.delete(e[19]),i(!0)})}else e&&fd.delete(e[19]),i(!1)}function $d(e,t,n){if(t.type&12){let r=e[t.index];if(qa(r))for(let e=10;e{e[26]?.running===t&&(e[26].running=void 0,fd.delete(e[19])),n(!0)})}function nf(e,t,n,r,i,a,o,s){if(i!=null){let c,l=!1;qa(i)?c=i:Ka(i)&&(l=!0,i=i[0]);let u=no(i);e===0&&r!==null?(Yd(s,r,a,n),o==null?wu(t,r,u):Cu(t,r,u,o||null,!0)):e===1&&r!==null?(Yd(s,r,a,n),Cu(t,r,u,o||null,!0),wd(a,u,s)):e===2?(s?.[26]?.leave?.has(a.index)&&Td(a,u,s),Cd.delete(u),Xd(s,a,n,e=>{if(Cd.has(u)){Cd.delete(u);return}Eu(t,u,l,e)})):e===3&&(Cd.delete(u),Xd(s,a,n,()=>{t.destroyNode(u)})),c!=null&&Df(t,e,n,c,a,r,o)}}function rf(e,t){of(e,t),t[0]=null,t[5]=null}function af(e,t,n,r,i,a){r[0]=i,r[5]=t,Cf(e,r,n,1,i,a)}function of(e,t){t[10].changeDetectionScheduler?.notify(9),Cf(e,t,t[11],2,null,null)}function sf(e){let t=e[12];if(!t)return uf(e[1],e);for(;t;){let n=null;if(Ka(t))n=t[12];else{let e=t[10];e&&(n=e)}if(!n){for(;t&&!t[4]&&t!==e;)Ka(t)&&uf(t[1],t),t=t[3];t===null&&(t=e),Ka(t)&&uf(t[1],t),n=t&&t[4]}t=n}}function cf(e,t){let n=e[9],r=n.indexOf(t);n.splice(r,1)}function lf(e,t){if($a(t))return;let n=t[11];n.destroyNode&&Cf(e,t,n,3,null,null),sf(t)}function uf(e,t){if($a(t))return;let n=w(null);try{t[2]&=-129,t[2]|=256,t[24]&&En(t[24]),ff(e,t),df(e,t),t[1].type===1&&t[11].destroy();let n=t[16];if(n!==null&&qa(t[3])){n!==t[3]&&cf(n,t);let r=t[18];r!==null&&r.detachView(e)}Ul(t)}finally{w(n)}}function df(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&&Lf(e,t,27,!1),Ic(o?Cc.TemplateUpdateStart:Cc.TemplateCreateStart,i,n),n(r,i)}finally{fs(a),Ic(o?Cc.TemplateUpdateEnd:Cc.TemplateCreateEnd,i,n)}}function Vf(e,t,n){Jf(e,t,n),(n.flags&64)==64&&Yf(e,t,n)}function Hf(e,t,n=io){let r=t.localNames;if(r!==null){let i=t.index+1;for(let a=0;a{vo(e.lView)},consumerOnSignalRead(){this.lView[24]=this}};function yp(e){let t=e[24]??Object.create(bp);return t.lView=e,t}var bp={...pn,consumerIsAlwaysLive:!0,kind:`template`,consumerMarkedDirty:e=>{let t=xo(e.lView);for(;t&&!xp(t[1]);)t=xo(t);t&&mo(t)},consumerOnSignalRead(){this.lView[24]=this}};function xp(e){return e.type!==2}function Sp(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 Cp=100;function wp(e,t=0){let n=e[10].rendererFactory;n.begin?.();try{Tp(e,t)}finally{n.end?.()}}function Tp(e,t){let n=Ho();try{Uo(!0),jp(e,t);let n=0;for(;go(e);){if(n===Cp)throw new T(103,!1);n++,jp(e,1)}}finally{Uo(n)}}function Ep(e,t,n,r){if($a(t))return;let i=t[2];is(t);let a=!0,o=null,s=null;xp(e)?(s=hp(t),o=xn(s)):fn()===null?(a=!1,s=yp(t),o=xn(s)):t[24]&&=(En(t[24]),null);try{po(t),Ko(e.bindingStartIndex),n!==null&&Bf(e,t,n,2,r);let a=(i&3)==3;if(a){let n=e.preOrderCheckHooks;n!==null&&zc(t,n,null)}else{let n=e.preOrderHooks;n!==null&&Bc(t,n,0,null),Vc(t,0)}if(Op(t),Sp(t),Dp(t,0),e.contentQueries!==null&&au(e,t),a){let n=e.contentCheckHooks;n!==null&&zc(t,n)}else{let n=e.contentHooks;n!==null&&Bc(t,n,1),Vc(t,1)}Np(e,t);let o=e.components;o!==null&&Mp(t,o,0);let s=e.viewQuery;if(s!==null&&ou(2,s,r),a){let n=e.viewCheckHooks;n!==null&&zc(t,n)}else{let n=e.viewHooks;n!==null&&Bc(t,n,2),Vc(t,2)}if(e.firstUpdatePass===!0&&(e.firstUpdatePass=!1),t[22]){for(let e of t[22])e();t[22]=null}pp(t),t[2]&=-73}catch(e){throw vo(t),e}finally{s!==null&&(Cn(s,o),a&&_p(s)),ls()}}function Dp(e,t){for(let n=Kl(e);n!==null;n=ql(n))for(let e=10;e0&&(e[n-1][4]=r[4]);let a=ra(e,10+t);rf(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 Bp(e,t,n,r){let i=10+r,a=n.length;r>0&&(n[i-1][4]=t),r-1&&(zp(e,n),ra(t,n))}this._attachedToViewContainer=!1}lf(this._lView[1],this._lView)}onDestroy(e){yo(this._lView,e)}markForCheck(){Pp(this._cdRefInjectingView||this._lView,4)}detach(){this._lView[2]&=-129}reattach(){_o(this._lView),this._lView[2]|=128}detectChanges(){this._lView[2]|=1024,wp(this._lView)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new T(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;let e=Qa(this._lView),t=this._lView[16];t!==null&&!e&&cf(t,this._lView),of(this._lView[1],this._lView)}attachToAppRef(e){if(this._attachedToViewContainer)throw new T(902,!1);this._appRef=e;let t=Qa(this._lView),n=this._lView[16];n!==null&&!t&&Vp(n,this._lView),_o(this._lView)}},Up=(()=>{class e{_declarationLView;_declarationTContainer;elementRef;static __NG_ELEMENT_ID__=Wp;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 Hp(lp(this._declarationLView,this._declarationTContainer,e,{embeddedViewInjector:t,dehydratedView:n}))}}return e})();function Wp(){return Gp(Fo(),D())}function Gp(e,t){return e.type&4?new Up(t,e,Ml(e,t)):null}function Kp(e,t,n,r,i){let a=e.data[t];if(a===null)a=qp(e,t,n,r,i),Yo()&&(a.flags|=32);else if(a.type&64){a.type=n,a.value=r,a.attrs=i;let e=Lo();a.injectorIndex=e===null?-1:e.injectorIndex}return Ro(a,!0),a}function qp(e,t,n,r,i){let a=Io(),o=zo(),s=o?a:a&&a.parent,c=e.data[t]=Yp(e,s,n,t,r,i);return Jp(e,c,a,o),c}function Jp(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 Yp(e,t,n,r,i,a){let o=t?t.injectorIndex:-1,s=0;return jo()&&(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 Xp(e){let t=e[6]??[],n=e[3][11],r=[];for(let e of t)e.data.di===void 0?Zp(e,n):r.push(e);e[6]=r}function Zp(e,t){let n=0,r=e.firstChild;if(r){let i=e.data.r;for(;nnull,$p=()=>null;function em(e,t){return Qp(e,t)}function tm(e,t,n){return $p(e,t,n)}var nm=class{},rm=class{},im=(()=>{class e{static ɵprov=di({token:e,providedIn:`root`,factory:()=>null})}return e})();function am(e){return e.debugInfo?.className||e.type.name||null}var om={},sm=class{injector;parentInjector;constructor(e,t){this.injector=e,this.parentInjector=t}get(e,t,n){let r=this.injector.get(e,om,n);return r!==om||t===om?r:this.parentInjector.get(e,t,n)}};function cm(e,t,n){return e[t]=n}function lm(e,t){return e[t]}function um(e,t,n){if(n===Zu)return!1;let r=e[t];return!Object.is(r,n)&&(e[t]=n,!0)}function dm(e,t,n,r){let i=um(e,t,n);return um(e,t+1,r)||i}function fm(e,t,n,r,i){let a=dm(e,t,n,r);return um(e,t+2,i)||a}function pm(e,t,n,r,i,a){let o=dm(e,t,n,r);return dm(e,t+2,i,a)||o}function mm(e,t,n){return function r(i){let a=r.__ngNativeEl__;a!==void 0&&tu(i,a),Pp(Ya(e)?co(e.index,t):t,5);let o=t[8],s=hm(t,o,n,i),c=r.__ngNextListenerFn__;for(;c;)s=hm(t,o,c,i)&&s,c=c.__ngNextListenerFn__;return s}}function hm(e,t,n,r){let i=w(null);try{return Ic(Cc.OutputStart,t,n),n(r)!==!1}catch(t){return rp(e,t),!1}finally{Ic(Cc.OutputEnd,t,n),w(i)}}function gm(e,t,n,r,i,a,o,s){let c=Xa(e),l=!1,u=null;if(!r&&c&&(u=vm(t,n,a,e.index)),u!==null){let e=u.__ngLastListenerFn__||u;e.__ngNextListenerFn__=o,u.__ngLastListenerFn__=o,l=!0}else{let o=io(e,n),c=r?r(o):o;r||(s.__ngNativeEl__=o);let l=i.listen(c,a,s);_m(a)||ym(r?t=>r(no(t[e.index])):e.index,t,n,a,s,l,!1)}return l}function _m(e){return e.startsWith(`animation`)||e.startsWith(`transition`)}function vm(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 ym(e,t,n,r,i,a,o){let s=t.firstCreatePass?Co(t):null,c=So(n),l=c.length;c.push(i,a),s&&s.push(r,e,l,(l+1)*(o?-1:1))}function bm(e,t,n,r,i,a){let o=t[n],s=t[1],c=o[s.data[n].outputs[r]].subscribe(a);ym(e.index,s,t,i,a,c,!0)}var xm=Symbol(`BINDING`),Sm=new vi(``);function Cm(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 Lm(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&Rf.SignalBased)!==0};return i&&(a.transform=i),a})}function Gm(e){return Object.keys(e).map(t=>({propName:e[t],templateName:t}))}function Km(e,t,n){let r=t instanceof ja?t:t?.injector;return r&&e.getStandaloneInjector!==null&&(r=e.getStandaloneInjector(r)||r),r?new sm(n,r):n}function qm(e){let t=e.get(rm,null);if(t===null)throw new T(407,!1);return{rendererFactory:t,sanitizer:e.get(im,null),changeDetectionScheduler:e.get(ac,null),ngReflect:!1,tracingService:e.get(Md,null,{optional:!0})}}function Jm(e,t,n){let r=Xm(e);return Su(t,r,r===`svg`?`svg`:r===`math`?to:n)}function Ym(e){if((e&&`localName`in e&&typeof e.localName==`string`?e.localName:e?.tagName)?.toLowerCase()===`script`)throw new T(905,!1)}function Xm(e){return(e.selectors[0][0]||`div`).toLowerCase()}var Zm=class{componentDef;ngModule;selector;componentType;ngContentSelectors;isBoundToModule;cachedInputs=null;cachedOutputs=null;get inputs(){return this.cachedInputs??=Wm(this.componentDef.inputs),this.cachedInputs}get outputs(){return this.cachedOutputs??=Gm(this.componentDef.outputs),this.cachedOutputs}constructor(e,t){this.componentDef=e,this.ngModule=t,this.componentType=e.type,this.selector=Yu(e.selectors),this.ngContentSelectors=e.ngContentSelectors??[],this.isBoundToModule=!!t}create(e,t,n,r,i,a,o){Ic(Cc.DynamicComponentStart);let s=w(null);try{let s=this.componentDef,c=Km(s,r||this.ngModule,e),l=qm(c),u=l.tracingService;return u&&u.componentCreate?u.componentCreate(am(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=Qm(r,s,a,i),l=e.rendererFactory.createRenderer(null,s),u=r?Uf(l,r,s.encapsulation,t):Jm(s,l,o??null);Ym(u);let d=t.get(Sm,null),f=$m(u,()=>t.get(Cs,null)??Zl());d&&d.addHost(f);let p=a?.some(th)||i?.some(e=>typeof e!=`function`&&e.bindings.some(th)),m=Mf(null,c,null,512|Pf(s),null,null,e,l,t,null,iu(u,t,!0));d&&Hm&&f instanceof ShadowRoot&&yo(m,()=>{d.removeHost(f)}),m[27]=u,is(m);let h=null;try{let e=zm(27,m,2,`#host`,()=>c.directiveRegistry,!0,0);ku(l,u,e),Gl(u,m),Vf(c,m,e),su(c,e,m),Bm(c,e),n!==void 0&&rh(e,this.ngContentSelectors,n),h=co(e.index,m),m[8]=h[8],sp(c,m,null)}catch(e){throw h!==null&&Ul(h),Ul(m),e}finally{Ic(Cc.DynamicComponentEnd),ls()}return new nh(this.componentType,m,!!p)}};function Qm(e,t,n,r){let i=e?[`ng-version`,`22.1.7`]:Xu(t.selectors[0]),a=null,o=null,s=0;if(n)for(let e of n)s+=e[xm].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 th(e){let t=e[xm].kind;return t===`input`||t===`twoWay`}var nh=class extends nm{_rootLView;_hasInputBindings;instance;hostView;changeDetectorRef;componentType;location;previousInputValues=null;_tNode;constructor(e,t,n){super(),this._rootLView=t,this._hasInputBindings=n,this._tNode=ao(t[1],27),this.location=Ml(this._tNode,t),this.instance=co(this._tNode.index,t)[8],this.hostView=this.changeDetectorRef=new Hp(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;ip(n,r[1],r,e,t),this.previousInputValues.set(e,t),Pp(co(n.index,r),1)}get injector(){return new El(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(e){this.hostView.onDestroy(e)}};function rh(e,t,n){let r=e.projection=[];for(let e=0;e{class e{static __NG_ELEMENT_ID__=ah}return e})();function ah(){return lh(Fo(),D())}var oh=class e extends ih{_lContainer;_hostTNode;_hostLView;constructor(e,t,n){super(),this._lContainer=e,this._hostTNode=t,this._hostLView=n}get element(){return Ml(this._hostTNode,this._hostLView)}get injector(){return new El(this._hostTNode,this._hostLView)}get parentInjector(){let e=ml(this._hostTNode,this._hostLView);if(el(e)){let t=rl(e,this._hostLView),n=tl(e),r=t[1].data[n+8];return new El(r,t)}return new El(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(e){let t=sh(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=em(this._lContainer,e.ssrId),o=e.createEmbeddedViewImpl(t||{},i,a);return this.insertImpl(o,r,up(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 Zm(Ei(e)),u=n||this.parentInjector;if(!i&&l.ngModule==null){let e=this.parentInjector.get(ja,null);e&&(i=e)}let d=Ei(l.componentType??{}),f=em(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,up(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(uo(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 Lp(o,i,a,r),t.attachToViewContainerRef(),na(ch(o),a,t),t}move(e,t){return this.insert(e,t)}indexOf(e){let t=sh(this._lContainer);return t===null?-1:t.indexOf(e)}remove(e){let t=this._adjustIndex(e,-1),n=zp(this._lContainer,t);n&&(ra(ch(this._lContainer),t),lf(n[1],n))}detach(e){let t=this._adjustIndex(e,-1),n=zp(this._lContainer,t);return n&&ra(ch(this._lContainer),t)!=null?new Hp(n):null}_adjustIndex(e,t=0){return e??this.length+t}};function sh(e){return e[8]}function ch(e){return e[8]||=[]}function lh(e,t){let n,r=t[e.index];return qa(r)?n=r:(n=Fp(r,t,null,e),t[e.index]=n,If(t,n)),dh(n,t,e,r),new oh(n,e,t)}function uh(e,t){let n=e[11],r=n.createComment(``),i=io(t,e);return Cu(n,n.parentNode(i),r,n.nextSibling(i),!1),r}var dh=mh,fh=()=>!1;function ph(e,t,n){return fh(e,t,n)}function mh(e,t,n,r){if(e[7])return;let i;i=n.type&8?no(r):uh(t,n),e[7]=i}var hh=class e{queryList;matches=null;constructor(e){this.queryList=e}clone(){return new e(this.queryList)}setDirty(){this.queryList.setDirty()}},gh=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 Ah(e,t,n){e.queries===null&&(e.queries=new vh),e.queries.track(new yh(t,n))}function jh(e,t){return e.queries.getByIndex(t)}function Mh(e,t){let n=e[1],r=jh(n,t);return r.crossesNgTemplate?Th(n,e,t,[]):wh(n,e,r,t)}function Nh(e,t,n){let r,i=Mn(()=>{r._dirtyCounter();let n=Lh(r,e);if(t&&n===void 0)throw new T(-951,!1);return n});return r=i[dn],r._dirtyCounter=j(0),r._flatValue=void 0,i}function Ph(e){return Nh(!0,!1,e)}function Fh(e){return Nh(!0,!0,e)}function Ih(e,t){let n=e[dn];n._lView=D(),n._queryIndex=t,n._queryList=Eh(n._lView,t),n._queryList.onDirty(()=>n._dirtyCounter.update(e=>e+1))}function Lh(e,t){let n=e._lView,r=e._queryIndex;if(n===void 0||r===void 0||n[2]&4)return t?void 0:da;let i=Eh(n,r),a=Mh(n,r);return i.reset(a,Pl),t?i.first:i._changesDetected||e._flatValue===void 0?e._flatValue=i.toArray():e._flatValue}function Rh(e){return!!e&&typeof e.then==`function`}function zh(e){return!!e&&typeof e.subscribe==`function`}var Bh=class{},Vh=class extends Bh{injector;instance=null;constructor(e){super();let t=new Ma([...e.providers,{provide:Bh,useValue:this}],e.parent||Aa(),e.debugName,new Set([`environment`]));this.injector=t,e.runEnvironmentInitializers&&t.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(e){this.injector.onDestroy(e)}};function Hh(e,t,n=null){return new Vh({providers:e,parent:t,debugName:n,runEnvironmentInitializers:!0}).injector}var Uh=(()=>{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=_a(!1,e.type),n=t.length>0?Hh([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(ja))})}return e})();function Wh(e){return Sc(()=>{let t=Xh(e),n={...t,decls:e.decls,vars:e.vars,template:e.template,consts:e.consts||null,ngContentSelectors:e.ngContentSelectors,onPush:e.changeDetection!==Rl.Eager,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&e.dependencies||null,getStandaloneInjector:t.standalone?e=>e.get(Uh).getOrCreateStandaloneInjector(n):null,getExternalStyles:null,signals:e.signals??!1,data:e.data||{},encapsulation:e.encapsulation||cu.Emulated,styles:e.styles||da,_:null,schemas:e.schemas||null,tView:null,id:``};t.standalone&&Pd(`NgStandalone`),Zh(n);let r=e.dependencies;return n.directiveDefs=Qh(r,Gh),n.pipeDefs=Qh(r,Oi),n.id=$h(n),n})}function Gh(e){return Ei(e)||Di(e)}function Kh(e,t){if(e==null)return ua;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=Rf.None,c=null),n[a]=[r,s,c],t[a]=o}return n}function qh(e){if(e==null)return ua;let t={};for(let n in e)Object.hasOwn(e,n)&&(t[e[n]]=n);return t}function Jh(e){return Sc(()=>{let t=Xh(e);return Zh(t),t})}function Yh(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 Xh(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||ua,exportAs:e.exportAs||null,standalone:e.standalone??!0,signals:e.signals===!0,selectors:e.selectors||da,viewQuery:e.viewQuery||null,features:e.features||null,setInput:null,resolveHostDirectives:null,hostDirectives:null,controlDef:null,signalFormsInputPresence:null,inputs:Kh(e.inputs,t),outputs:qh(e.outputs),debugInfo:null}}function Zh(e){e.features?.forEach(t=>t(e))}function Qh(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 $h(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 eg=new vi(``),tg=(()=>{class e{resolve;reject;initialized=!1;done=!1;donePromise=new Promise((e,t)=>{this.resolve=e,this.reject=t});appInits=E(eg,{optional:!0})??[];injector=E(Ss);constructor(){}runInitializers(){if(this.initialized)return;let e=[];for(let t of this.appInits){let n=Ua(this.injector,t);if(Rh(n))e.push(n);else if(zh(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=Al({token:e,factory:e.ɵfac})}return e})();function ng(e,t,n,r,i,a,o,s){if(n.firstCreatePass){e.mergedAttrs=Qc(e.mergedAttrs,e.attrs);let t=e.tView=kf(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),Ro(e,!1);let c=og(n,t,e,r);vs()&&vf(n,t,c,e),Gl(c,t);let l=Fp(c,t,c,e);t[r+27]=l,If(t,l),ph(l,e,t)}function rg(e,t,n,r,i,a,o,s,c,l,u){let d=n+27,f;return t.firstCreatePass?(f=Kp(t,d,4,o||null,s||null),Ao()&&Tm(t,e,f,fo(t.consts,l),Zf),Rc(t,f)):f=t.data[d],ng(f,e,t,n,r,i,a,c),Xa(f)&&Vf(t,e,f),l!=null&&Hf(e,f,u),f}function ig(e,t,n,r,i,a,o,s,c,l,u){let d=n+27,f;if(t.firstCreatePass){if(f=Kp(t,d,4,o||null,s||null),l!=null){let e=fo(t.consts,l);f.localNames=[];for(let t=0;t{throw new T(600,``)})}var dg=10,fg=(()=>{class e{_runningTick=!1;_destroyed=!1;_destroyListeners=[];_views=[];internalErrorHandler=E(Ys);afterRenderManager=E(Fd);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(Md,{optional:!0})}whenStable(){let e;return new Promise(t=>{e=this.isStable.subscribe({next:e=>{e&&t()}})}).finally(()=>{e.unsubscribe()})}_injector=E(ja);_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(Ic(Cc.BootstrapComponentStart),!this._injector.get(tg).done)throw new T(405,``);let r=Ei(e),i=this._injector.get(Bh),a=new Zm(r,i);this.componentTypes.push(e);let{hostElement:o,directives:s,bindings:c}=pg(t),l=o||a.selector,u=a.create(n,[],l,i.injector,s,c),d=u.location.nativeElement,f=u.injector.get(cg,null);return f?.registerApplication(d),u.onDestroy(()=>{this.detachView(u.hostView),mg(this.components,u),f?.unregisterApplication(d)}),this._loadComponent(u),Ic(Cc.BootstrapComponentEnd,u),u})}tick(){this.zonelessEnabled||(this.dirtyFlags|=1),this._tick()}_tick(){Ic(Cc.ChangeDetectionStart),this.tracingSnapshot===null?this.tickImpl():this.tracingSnapshot.run(jd.CHANGE_DETECTION,this.tickImpl)}tickImpl=()=>{if(this._runningTick)throw Ic(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(),Ic(Cc.ChangeDetectionEnd)}};synchronize(){this._rendererFactory===null&&!this._injector.destroyed&&(this._rendererFactory=this._injector.get(rm,null,{optional:!0}));let e=0;for(;this.dirtyFlags!==0&&e++go(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;mg(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(lg,[]).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),()=>mg(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=Al({token:e,factory:e.ɵfac})}return e})();function pg(e){return e===void 0||typeof e==`string`||e instanceof Element?{hostElement:e}:e}function mg(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}function N(e,t,n,r){let i=D();return um(i,qo(),t)&&(Po(),Qf(ps(),i,e,t,n,r)),N}function hg(e){if(Pd(`NgAnimateEnter`),!hd)return hg;let t=D();if(gd(t))return hg;let n=Fo(),r=t[9].get(Is);return Ad(Ed(t),n,()=>gg(t,n,e,r)),qd(t[9]),Jd(t[9],Ed(t)),hg}function gg(e,t,n,r){let i=io(t,e),a=e[11],o=Dd(n),s=[],c=!1,l=e=>{if(Od(e)!==i)return;let t=e instanceof AnimationEvent?`animationend`:`transitionend`;r.runOutsideAngular(()=>{a.listen(i,t,u)})},u=e=>{Od(e)===i&&(kd(e,i)&&(c=!0),_g(e,i,a))};if(o&&o.length>0){r.runOutsideAngular(()=>{s.push(a.listen(i,`animationstart`,l)),s.push(a.listen(i,`transitionstart`,l))}),_d(i,o,s);for(let e of o)a.addClass(i,e);r.runOutsideAngular(()=>{requestAnimationFrame(()=>{if(!c&&(ud(i,bd,hd),!bd.has(i))){for(let e of o)a.removeClass(i,e);vd(i)}})})}}function _g(e,t,n){let r=yd.get(t);if(Od(e)===t&&r&&kd(e,t)){e.stopPropagation();for(let e of r.classList)n.removeClass(t,e);vd(t)}}var vg=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 yg(e,t,n,r,i){return e===n&&Object.is(t,r)?1:Object.is(i(e,t),i(n,r))?-1:0}function bg(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=yg(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=yg(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 wg,a??=Cg(e,o,s,n),xg(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;)Sg(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=yg(o,t,o,r,n);if(u!==0)u<0&&e.updateValue(o,r),o++,l=c.next();else{i??=new wg,a??=Cg(e,o,s,n);let u=n(o,r);if(xg(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;)Sg(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 xg(e,t,n,r){return t!==void 0&&t.has(r)?(e.attach(n,t.get(r)),t.delete(r),!0):!1}function Sg(e,t,n,r,i){if(xg(e,t,r,n(r,i)))e.updateValue(r,i);else{let t=e.create(r,i);e.attach(r,t)}}function Cg(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 wg=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 P(e,t,n,r,i,a,o,s){Pd(`NgControlFlow`);let c=D(),l=Po();return ig(c,l,e,t,n,r,i,fo(l.consts,a),256,o,s),Tg}function Tg(e,t,n,r,i,a,o,s){Pd(`NgControlFlow`);let c=D(),l=Po();return ig(c,l,e,t,n,r,i,fo(l.consts,a),512,o,s),Tg}function F(e,t){Pd(`NgControlFlow`);let n=D(),r=qo(),i=n[r]===Zu?-1:n[r],a=i===-1?void 0:jg(n,27+i);if(um(n,r,e)){let r=w(null);try{if(a!==void 0&&Rp(a,0),e!==-1){let r=27+e,i=jg(n,r),a=Ig(n[1],r),o=tm(i,a,n);Lp(i,lp(n,a,t,{dehydratedView:o}),0,up(a,o))}}finally{w(r)}}else if(a!==void 0){let e=Ip(a,0);e!==void 0&&(e[8]=t)}}var Eg=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 Dg(e){return e}function Og(e,t){return t}var kg=class{hasEmptyBlock;trackByFn;liveCollection;constructor(e,t,n){this.hasEmptyBlock=e,this.trackByFn=t,this.liveCollection=n}};function I(e,t,n,r,i,a,o,s,c,l,u,d,f){Pd(`NgControlFlow`);let p=D(),m=Po(),h=c!==void 0,g=D(),_=new kg(h,s?o.bind(g[15][8]):o);g[27+e]=_,ig(p,m,e+1,t,n,r,i,fo(m.consts,a),256),h&&ig(p,m,e+2,c,l,u,d,fo(m.consts,f),512)}var Ag=class extends vg{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,Lp(this.lContainer,t,e,up(this.templateTNode,n)),Mg(this.lContainer,e)}detach(e){return this.needsIndexUpdate||=e!==this.length-1,Ng(this.lContainer,e),Pg(this.lContainer,e)}create(e,t){let n=em(this.lContainer,this.templateTNode.tView.ssrId);return lp(this.hostLView,this.templateTNode,new Eg(this.lContainer,t,e),{dehydratedView:n})}destroy(e){lf(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];Gd(e,r),fd.delete(n[19]),r.detachedLeaveAnimationFns=void 0}}function Ng(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 Pg(e,t){return zp(e,t)}function Fg(e,t){return Ip(e,t)}function Ig(e,t){return ao(e,t)}function R(e,t,n){let r=D();return um(r,qo(),t)&&(Po(),Gf(ps(),r,e,t,r[11],n)),R}function Lg(e,t,n,r,i){ip(t,e,n,i?`class`:`style`,r)}function z(e,t,n,r){let i=D(),a=i[1],o=e+27,s=a.firstCreatePass?zm(o,i,2,t,Zf,Ao(),n,r):a.data[o];if(Ya(s)){let n=i[10].tracingService;if(n&&n.componentCreate){let o=a.data[s.directiveStart+s.componentOffset];return n.componentCreate(am(o),()=>(Rg(e,t,i,s,r),z))}}return Rg(e,t,i,s,r),z}function Rg(e,t,n,r,i){if(tp(r,n,e,t,Bg),Xa(r)){let e=n[1];Vf(e,n,r),su(e,r,n)}i!=null&&Hf(n,r)}function B(){let e=Po(),t=np(Fo());return e.firstCreatePass&&Bm(e,t),Mo(t)&&No(),ko(),t.classesWithoutHost!=null&&qc(t)&&Lg(e,t,D(),t.classesWithoutHost,!0),t.stylesWithoutHost!=null&&Jc(t)&&Lg(e,t,D(),t.stylesWithoutHost,!1),B}function V(e,t,n,r){return z(e,t,n,r),B(),V}function H(e,t,n,r){let i=D(),a=i[1],o=e+27,s=a.firstCreatePass?Vm(o,a,2,t,n,r):a.data[o];return tp(s,i,e,t,Bg),r!=null&&Hf(i,s),H}function U(){return Mo(np(Fo()))&&No(),ko(),U}function zg(e,t,n,r){return H(e,t,n,r),U(),zg}var Bg=(e,t,n,r,i)=>(ys(!0),Su(t[11],r,gs()));function Vg(e,t,n){let r=D(),i=r[1],a=e+27,o=i.firstCreatePass?zm(a,r,8,`ng-container`,Zf,Ao(),t,n):i.data[a];if(tp(o,r,e,`ng-container`,Wg),Xa(o)){let e=r[1];Vf(e,r,o),su(e,o,r)}return n!=null&&Hf(r,o),Vg}function Hg(){let e=Po(),t=np(Fo());return e.firstCreatePass&&Bm(e,t),Hg}function Ug(e,t,n){return Vg(e,t,n),Hg(),Ug}var Wg=(e,t,n,r,i)=>(ys(!0),xu(t[11],``));function W(){return D()}function Gg(e,t,n){let r=D();return um(r,qo(),t)&&(Po(),Kf(ps(),r,e,t,r[11],n)),Gg}var Kg=void 0;function qg(e){let t=Math.floor(Math.abs(e)),n=e.toString().replace(/^[^.]*\.?/,``).length;return t===1&&n===0?1:5}var Jg=[`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`]],Kg,[[`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`]],Kg,[[`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}`,Kg,Kg,Kg],[`.`,`,`,`;`,`%`,`+`,`-`,`E`,`×`,`‰`,`∞`,`NaN`,`:`],[`#,##0.###`,`#,##0%`,`¤#,##0.00`,`#E0`],`USD`,`$`,`US Dollar`,{},`ltr`,qg],Yg=Object.create(null);function Xg(e){let t=$g(e),n=Zg(t);if(n)return n;let r=t.split(`-`)[0];if(n=Zg(r),n)return n;if(r===`en`)return Jg;throw new T(701,!1)}function Zg(e){if(!(e in Yg)){let t=Hi.ng&&Hi.ng.common&&Hi.ng.common.locales&&Hi.ng.common.locales[e];return t!==void 0&&(Yg[e]=t),t}return Yg[e]}var Qg={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 $g(e){return e.toLowerCase().replace(/_/g,`-`)}var e_=`en-US`;function t_(e){typeof e==`string`&&e.toLowerCase().replace(/_/g,`-`)}function G(e,t,n){let r=D(),i=Po(),a=Fo();return r_(i,r,r[11],a,e,t,n),G}function n_(e,t,n){let r=D(),i=Po(),a=Fo();return(a.type&3||n)&&gm(a,i,r,n,r[11],e,t,mm(a,r,t)),n_}function r_(e,t,n,r,i,a,o){let s=!0,c=null;if((r.type&3||o)&&(c??=mm(r,t,a),gm(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 p_(e){return(e&2)==2}function m_(e,t){return e&131071|t<<17}function h_(e){return e|2}function g_(e){return(e&131068)>>2}function __(e,t){return e&-131069|t<<2}function v_(e){return(e&1)==1}function y_(e){return e|1}function b_(e,t,n,r,i,a){let o=a?t.classBindings:t.styleBindings,s=f_(o),c=g_(o);e[r]=n;let l=!1,u;if(Array.isArray(n)){let e=n;u=e[1],(u===null||ca(e,u)>0)&&(l=!0)}else u=n;if(i){if(c!==0){let t=f_(e[s+1]);e[r+1]=d_(t,s),t!==0&&(e[t+1]=__(e[t+1],r)),e[s+1]=m_(e[s+1],r)}else e[r+1]=d_(s,0),s!==0&&(e[s+1]=__(e[s+1],r)),s=r}else e[r+1]=d_(c,0),s===0?s=r:e[c+1]=__(e[c+1],r),c=r;l&&(e[r+1]=h_(e[r+1])),S_(e,u,r,!0),S_(e,u,r,!1),x_(t,u,e,r,a),o=d_(s,c),a?t.classBindings=o:t.styleBindings=o}function x_(e,t,n,r,i){let a=i?e.residualClasses:e.residualStyles;a!=null&&typeof t==`string`&&ca(a,t)>=0&&(n[r+1]=y_(n[r+1]))}function S_(e,t,n,r){let i=e[n+1],a=t===null,o=r?f_(i):g_(i),s=!1;for(;o!==0&&(s===!1||a);){let n=e[o],i=e[o+1];C_(n,t)&&(s=!0,e[o+1]=r?y_(i):h_(i)),o=r?f_(i):g_(i)}s&&(e[n+1]=r?h_(i):y_(i))}function C_(e,t){return e===null||t==null||(Array.isArray(e)?e[1]:e)===t?!0:Array.isArray(e)&&typeof t==`string`?ca(e,t)>=0:!1}var w_={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function T_(e){return e.substring(w_.key,w_.keyEnd)}function E_(e){return O_(e),D_(e,k_(e,0,w_.textEnd))}function D_(e,t){let n=w_.textEnd;return n===t?-1:(t=w_.keyEnd=A_(e,w_.key=t,n),k_(e,t,n))}function O_(e){w_.key=0,w_.keyEnd=0,w_.value=0,w_.valueEnd=0,w_.textEnd=e.length}function k_(e,t,n){for(;t32;)t++;return t}function j_(e,t,n){return P_(e,t,n,!1),j_}function q(e,t){return P_(e,t,null,!0),q}function M_(e){F_(G_,N_,e,!0)}function N_(e,t){for(let n=E_(t);n>=0;n=D_(t,n))oa(e,T_(t),!0)}function P_(e,t,n,r){let i=D(),a=Po(),o=Jo(2);if(a.firstUpdatePass&&L_(a,e,o,r),t!==Zu&&um(i,o,t)){let s=a.data[ds()];q_(a,s,i,i[11],e,i[o+1]=X_(t,n),r,o)}}function F_(e,t,n,r){let i=Po(),a=Jo(2);i.firstUpdatePass&&L_(i,null,a,r);let o=D();if(n!==Zu&&um(o,a,n)){let s=i.data[ds()];if(Z_(s,r)&&!I_(i,a)){let e=r?s.classesWithoutHost:s.stylesWithoutHost;e!==null&&(n=oi(e,n||``)),Lg(i,s,o,n,r)}else K_(i,s,o,o[11],o[a+1],o[a+1]=W_(e,t,n),r,a)}}function I_(e,t){return t>=e.expandoStartIndex}function L_(e,t,n,r){let i=e.data;if(i[n+1]===null){let a=i[ds()],o=I_(e,n);Z_(a,r)&&t===null&&!o&&(t=!1),t=R_(i,a,t,r),b_(i,a,t,n,o,r)}}function R_(e,t,n,r){let i=$o(e),a=r?t.residualClasses:t.residualStyles;if(i===null)(r?t.classBindings:t.styleBindings)===0&&(n=H_(null,e,t,n,r),n=U_(n,t.attrs,r),a=null);else{let o=t.directiveStylingLast;if(o===-1||e[o]!==i){if(n=H_(i,e,t,n,r),a===null){let n=z_(e,t,r);n!==void 0&&Array.isArray(n)&&(n=H_(null,e,t,n[1],r),n=U_(n,t.attrs,r),B_(e,t,r,n))}else a=V_(e,t,r)}}return a!==void 0&&(r?t.residualClasses=a:t.residualStyles=a),n}function z_(e,t,n){let r=n?t.classBindings:t.styleBindings;if(g_(r)!==0)return e[f_(r)]}function B_(e,t,n,r){let i=n?t.classBindings:t.styleBindings;e[f_(i)]=r}function V_(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===Zu&&(u=l?da:void 0);let d=l?sa(u,r):c===r?u:void 0;if(a&&!Y_(d)&&(d=sa(t,r)),Y_(d)&&(s=d,o))return s;let f=e[i+1];i=o?f_(f):g_(f)}if(t!==null){let e=a?t.residualClasses:t.residualStyles;e!=null&&(s=sa(e,r))}return s}function Y_(e){return e!==void 0}function X_(e,t){return e==null||e===``||(typeof t==`string`?e=uu(e)+t:typeof e==`object`&&(e=ai(uu(e)))),e}function Z_(e,t){return!!(e.flags&(t?8:16))}function J(e,t=``){let n=D(),r=Po(),i=e+27,a=r.firstCreatePass?Kp(r,i,1,t,null):r.data[i],o=Q_(r,n,a,t);n[i]=o,vs()&&vf(r,n,o,a),Ro(a,!1)}var Q_=(e,t,n,r)=>(ys(!0),yu(t[11],r));function $_(e,t,n,r=``){return um(e,qo(),n)?t+Ai(n)+r:Zu}function ev(e,t,n,r,i,a=``){let o=dm(e,Go(),n,i);return Jo(2),o?t+Ai(n)+r+Ai(i)+a:Zu}function tv(e,t,n,r,i,a,o,s=``){let c=fm(e,Go(),n,i,o);return Jo(3),c?t+Ai(n)+r+Ai(i)+a+Ai(o)+s:Zu}function nv(e,t,n,r,i,a,o,s,c,l=``){let u=pm(e,Go(),n,i,o,c);return Jo(4),u?t+Ai(n)+r+Ai(i)+a+Ai(o)+s+Ai(c)+l:Zu}function Y(e){return X(``,e),Y}function X(e,t,n){let r=D(),i=$_(r,e,t,n);return i!==Zu&&av(r,ds(),i),X}function Z(e,t,n,r,i){let a=D(),o=ev(a,e,t,n,r,i);return o!==Zu&&av(a,ds(),o),Z}function rv(e,t,n,r,i,a,o){let s=D(),c=tv(s,e,t,n,r,i,a,o);return c!==Zu&&av(s,ds(),c),rv}function iv(e,t,n,r,i,a,o,s,c){let l=D(),u=nv(l,e,t,n,r,i,a,o,s,c);return u!==Zu&&av(l,ds(),u),iv}function av(e,t,n){let r=ro(t,e);bu(e[11],r,n)}function ov(e,t,n){yc(t)&&(t=t());let r=D();return um(r,qo(),t)&&(Po(),Gf(ps(),r,e,t,r[11],n)),ov}function sv(e,t){let n=yc(e);return n&&e.set(t),n}function cv(e,t){let n=D(),r=Po(),i=Fo();return r_(r,n,n[11],i,e,t),cv}var lv={};function uv(e){Pd(`NgLet`);let t=Po(),n=D(),r=e+27;return Ro(Kp(t,r,128,null,null),!1),so(t,n,r,lv),uv}function dv(e){return so(Po(),D(),ds(),e),e}function fv(e){let t=oo(Vo(),27+e);if(t===lv)throw new T(314,!1);return t}function pv(e,t,n=``){return $_(D(),e,t,n)}function mv(e,t){let n=Wo()+e,r=D();return r[n]===Zu?cm(r,n,t()):lm(r,n)}function hv(e,t,n){return _v(D(),Wo(),e,t,n)}function gv(e,t){let n=e[t];return n===Zu?void 0:n}function _v(e,t,n,r,i,a){let o=t+n;return um(e,o,i)?cm(e,o+1,a?r.call(a,i):r(i)):gv(e,o+1)}function vv(e,t,n,r,i,a,o){let s=t+n;return dm(e,s,i,a)?cm(e,s+2,o?r.call(o,i,a):r(i,a)):gv(e,s+2)}function yv(e,t){let n=Po(),r,i=e+27;n.firstCreatePass?(r=bv(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(wm);try{let e=al(!1),t=a();return al(e),so(n,D(),i,t),t}finally{Bi(o)}}function bv(e,t){if(t)for(let n=t.length-1;n>=0;n--){let r=t[n];if(e===r.name)return r}}function xv(e,t,n){let r=e+27,i=D(),a=oo(i,r);return Cv(i,r)?_v(i,Wo(),t,a.transform,n,a):a.transform(n)}function Sv(e,t,n,r){let i=e+27,a=D(),o=oo(a,i);return Cv(a,i)?vv(a,Wo(),t,o.transform,n,r,o):o.transform(n,r)}function Cv(e,t){return e[1].data[t].pure}function wv(e,t){return Gp(e,t)}var Tv=(()=>{class e{applicationErrorHandler=E(Ys);appRef=E(fg);taskService=E(Os);ngZone=E(Is);zonelessEnabled=E(oc);tracing=E(Md,{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=Al({token:e,factory:e.ɵfac})}return e})();function Ev(){return[{provide:ac,useExisting:Tv},{provide:Is,useClass:Ws},{provide:oc,useValue:!0}]}function Dv(){return typeof $localize<`u`&&$localize.locale||`en-US`}var Ov=new vi(``,{factory:()=>E(Ov,{optional:!0,skipSelf:!0})||Dv()}),kv=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&&Av(this.listeners)),w(t),this.isEmitting=!1}}};function Av(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 jv(e){return ar(e)}(class e extends Error{_brand;constructor(e){super(e)}static IDLE=new e(`IDLE`);static LOADING=new e(`LOADING`)});var Mv=e=>e;function Nv(e,t){return typeof e==`function`?Pv(tr(e,Mv,t?.equal),t?.debugName,t?.set):Pv(tr(e.source,e.computation,e.equal),e.debugName,e.set)}function Pv(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(jv(e)),t)}else i.set=e=>nr(r,e),i.update=e=>rr(r,e);return i.asReadonly=Zs.bind(e),i}function Fv(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 Iv(e){return new kv}function Lv(e,t){return Fv(e,t)}function Rv(e){return Fv(bc,e)}var $=(Lv.required=Rv,Lv);function zv(e,t){let n=Object.create(xc),r=new kv;n.value=e;function i(){return mn(n),Bv(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=>{Bv(n.value),i.set(e(n.value))},i.subscribe=r.subscribe.bind(r),i.destroyRef=r.destroyRef,i}function Bv(e){if(e===bc)throw new T(952,!1)}function Vv(e,t){return zv(e,t)}function Hv(e){return zv(bc,e)}var Uv=(Vv.required=Hv,Vv);function Wv(e,t){return Ph(t)}function Gv(e,t){return Fh(t)}var Kv=(Wv.required=Gv,Wv),qv=new vi(``),Jv=new vi(``);function Yv(e){return!e.moduleRef}function Xv(e){let t=Yv(e)?e.r3Injector:e.moduleRef.injector,n=t.get(Is);return n.run(()=>{Yv(e)?e.r3Injector.resolveInjectorInitializers():e.moduleRef.resolveInjectorInitializers();let r=t.get(Ys),i;if(n.runOutsideAngular(()=>{i=n.onError.subscribe({next:r})}),Yv(e)){let n=()=>t.destroy(),r=e.platformInjector.get(qv);r.add(n),t.onDestroy(()=>{i.unsubscribe(),r.delete(n)})}else{let t=()=>e.moduleRef.destroy(),n=e.platformInjector.get(qv);n.add(t),e.moduleRef.onDestroy(()=>{mg(e.allPlatformModules,e.moduleRef),i.unsubscribe(),n.delete(t)})}return Qv(r,n,()=>{let n=t.get(Os),r=n.add(),i=t.get(tg);return i.runInitializers(),i.donePromise.then(()=>{if(t_(t.get(Ov,e_)||`en-US`),!t.get(Jv,!0))return Yv(e)?t.get(fg):(e.allPlatformModules.push(e.moduleRef),e.moduleRef);if(Yv(e)){let n=t.get(fg);return e.rootComponent!==void 0&&n.bootstrap(e.rootComponent),n}return Zv?.(e.moduleRef,e.allPlatformModules),e.moduleRef}).finally(()=>void n.remove(r))})})}var Zv;function Qv(e,t,n){try{let r=n();return Rh(r)?r.catch(n=>{throw t.runOutsideAngular(()=>e(n)),n}):r}catch(n){throw t.runOutsideAngular(()=>e(n)),n}}var $v=null;function ey(e=[],t){return Ss.create({name:t,providers:[{provide:Ea,useValue:`platform`},{provide:qv,useValue:new Set([()=>$v=null])},...e]})}function ty(e=[]){if($v)return $v;let t=ey(e);return $v=t,ug(),ny(t),t}function ny(e){let t=e.get(ec,null);Ua(e,()=>{t?.forEach(e=>e())})}function ry(e){let{rootComponent:t,appProviders:n,platformProviders:r,platformRef:i}=e;Ic(Cc.BootstrapApplicationStart);try{let e=i?.injector??ty(r);return Xv({r3Injector:new Vh({providers:[Ev(),Xs,...n||[]],parent:e,debugName:``,runEnvironmentInitializers:!1}).injector,platformInjector:e,rootComponent:t})}catch(e){return Promise.reject(e)}finally{Ic(Cc.BootstrapApplicationEnd)}}var iy=Symbol(`NOT_SET`),ay=new Set,oy={...Kn,kind:`afterRenderEffectPhase`,consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!0,value:iy,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??ay)t()}finally{En(e)}}};function cy(e,t){let n=t?.injector??E(Ss),r=n.get(ac),i=n.get(Fd),a=n.get(Md,null,{optional:!0});i.impl??=n.get(Ld);let o=e;typeof o==`function`&&(o={mixedReadWrite:e});let s=n.get(rc,null,{optional:!0}),c=new sy(i.impl,[o.earlyRead,o.write,o.mixedReadWrite,o.read],s?.view,r,n,a?.snapshot(null));return i.impl.register(c),c}var ly=null;function uy(){return ly}function dy(e){ly??=e}var fy=class{},py=(function(e){return e[e.Format=0]=`Format`,e[e.Standalone=1]=`Standalone`,e})(py||{}),my=(function(e){return e[e.Narrow=0]=`Narrow`,e[e.Abbreviated=1]=`Abbreviated`,e[e.Wide=2]=`Wide`,e[e.Short=3]=`Short`,e})(my||{}),hy=(function(e){return e[e.Short=0]=`Short`,e[e.Medium=1]=`Medium`,e[e.Long=2]=`Long`,e[e.Full=3]=`Full`,e})(hy||{}),gy={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 _y(e){return Xg(e)[Qg.LocaleId]}function vy(e,t,n){let r=Xg(e);return ky(ky([r[Qg.DayPeriodsFormat],r[Qg.DayPeriodsStandalone]],t),n)}function yy(e,t,n){let r=Xg(e);return ky(ky([r[Qg.DaysFormat],r[Qg.DaysStandalone]],t),n)}function by(e,t,n){let r=Xg(e);return ky(ky([r[Qg.MonthsFormat],r[Qg.MonthsStandalone]],t),n)}function xy(e,t){let n=Xg(e)[Qg.Eras];return ky(n,t)}function Sy(e,t){return ky(Xg(e)[Qg.DateFormat],t)}function Cy(e,t){return ky(Xg(e)[Qg.TimeFormat],t)}function wy(e,t){let n=Xg(e)[Qg.DateTimeFormat];return ky(n,t)}function Ty(e,t){let n=Xg(e),r=n[Qg.NumberSymbols][t];if(r===void 0){if(t===gy.CurrencyDecimal)return n[Qg.NumberSymbols][gy.Decimal];if(t===gy.CurrencyGroup)return n[Qg.NumberSymbols][gy.Group]}return r}function Ey(e){if(!e[Qg.ExtraData])throw new T(2303,!1)}function Dy(e){let t=Xg(e);return Ey(t),(t[Qg.ExtraData][2]||[]).map(e=>typeof e==`string`?Ay(e):[Ay(e[0]),Ay(e[1])])}function Oy(e,t,n){let r=Xg(e);return Ey(r),ky(ky([r[Qg.ExtraData][0],r[Qg.ExtraData][1]],t)||[],n)||[]}function ky(e,t){for(let n=t;n>-1;n--)if(e[n]!==void 0)return e[n];throw new T(2304,!1)}function Ay(e){let[t,n]=e.split(`:`);return{hours:+t,minutes:+n}}var jy=/^(\d{4,})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,My=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]*)/,Py=256;function Fy(e,t,n,r){let i=ib(e);Iy(t),t=Ry(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=tb(r,s),i=rb(i,r));let c=``;return a.forEach(e=>{let t=eb(e);c+=t?t(i,n,s):e===`''`?`'`:e.replace(/(^'|'$)/g,``).replace(/''/g,`'`)}),c}function Iy(e){if(e.length>Py)throw new T(2300,!1)}function Ly(e,t,n){let r=new Date(0);return r.setFullYear(e,t,n),r.setHours(0,0,0),r}function Ry(e,t){let n=_y(e);if(My[n]??=Object.create(null),My[n][t])return My[n][t];let r=``;switch(t){case`shortDate`:r=Sy(e,hy.Short);break;case`mediumDate`:r=Sy(e,hy.Medium);break;case`longDate`:r=Sy(e,hy.Long);break;case`fullDate`:r=Sy(e,hy.Full);break;case`shortTime`:r=Cy(e,hy.Short);break;case`mediumTime`:r=Cy(e,hy.Medium);break;case`longTime`:r=Cy(e,hy.Long);break;case`fullTime`:r=Cy(e,hy.Full);break;case`short`:let t=Ry(e,`shortTime`),n=Ry(e,`shortDate`);r=zy(wy(e,hy.Short),[t,n]);break;case`medium`:let i=Ry(e,`mediumTime`),a=Ry(e,`mediumDate`);r=zy(wy(e,hy.Medium),[i,a]);break;case`long`:let o=Ry(e,`longTime`),s=Ry(e,`longDate`);r=zy(wy(e,hy.Long),[o,s]);break;case`full`:let c=Ry(e,`fullTime`),l=Ry(e,`fullDate`);r=zy(wy(e,hy.Full),[c,l])}return r&&(My[n][t]=r),r}function zy(e,t){return t&&(e=e.replace(/\{([^}]+)}/g,function(e,n){return Object.hasOwn(t,n)?t[n]:e})),e}function By(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 Vy(s,t);let c=Ty(o,gy.MinusSign);return By(s,t,c,r,i)}}function Uy(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 Wy(e,t,n=py.Format,r=!1){return function(i,a){return Gy(i,a,e,t,n,r)}}function Gy(e,t,n,r,i,a){switch(n){case 2:return by(t,i,r)[e.getMonth()];case 1:return yy(t,i,r)[e.getDay()];case 0:let n=e.getHours(),o=e.getMinutes();if(a){let e=Dy(t),a=Oy(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?`+`:``)+By(o,2,a)+By(Math.abs(i%60),2,a);case 1:return`GMT`+(i>=0?`+`:``)+By(o,1,a);case 2:return`GMT`+(i>=0?`+`:``)+By(o,2,a)+`:`+By(Math.abs(i%60),2,a);case 3:return r===0?`Z`:(i>=0?`+`:``)+By(o,2,a)+`:`+By(Math.abs(i%60),2,a);default:throw new T(2310,!1)}}}var qy=0,Jy=4;function Yy(e){let t=Ly(e,qy,1).getDay();return Ly(e,0,1+(t<=Jy?Jy:11)-t)}function Xy(e){let t=e.getDay(),n=t===0?-3:Jy-t;return Ly(e.getFullYear(),e.getMonth(),e.getDate()+n)}function Zy(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=Xy(n),t=Yy(e.getFullYear()),r=e.getTime()-t.getTime();i=1+Math.round(r/6048e5)}return By(i,e,Ty(r,gy.MinusSign))}}function Qy(e,t=!1){return function(n,r){return By(Xy(n).getFullYear(),e,Ty(r,gy.MinusSign),t)}}var $y=Object.create(null);function eb(e){if($y[e])return $y[e];let t;switch(e){case`G`:case`GG`:case`GGG`:t=Wy(3,my.Abbreviated);break;case`GGGG`:t=Wy(3,my.Wide);break;case`GGGGG`:t=Wy(3,my.Narrow);break;case`y`:t=Hy(0,1,0,!1,!0);break;case`yy`:t=Hy(0,2,0,!0,!0);break;case`yyy`:t=Hy(0,3,0,!1,!0);break;case`yyyy`:t=Hy(0,4,0,!1,!0);break;case`Y`:t=Qy(1);break;case`YY`:t=Qy(2,!0);break;case`YYY`:t=Qy(3);break;case`YYYY`:t=Qy(4);break;case`M`:case`L`:t=Hy(1,1,1);break;case`MM`:case`LL`:t=Hy(1,2,1);break;case`MMM`:t=Wy(2,my.Abbreviated);break;case`MMMM`:t=Wy(2,my.Wide);break;case`MMMMM`:t=Wy(2,my.Narrow);break;case`LLL`:t=Wy(2,my.Abbreviated,py.Standalone);break;case`LLLL`:t=Wy(2,my.Wide,py.Standalone);break;case`LLLLL`:t=Wy(2,my.Narrow,py.Standalone);break;case`w`:t=Zy(1);break;case`ww`:t=Zy(2);break;case`W`:t=Zy(1,!0);break;case`d`:t=Hy(2,1);break;case`dd`:t=Hy(2,2);break;case`c`:case`cc`:t=Hy(7,1);break;case`ccc`:t=Wy(1,my.Abbreviated,py.Standalone);break;case`cccc`:t=Wy(1,my.Wide,py.Standalone);break;case`ccccc`:t=Wy(1,my.Narrow,py.Standalone);break;case`cccccc`:t=Wy(1,my.Short,py.Standalone);break;case`E`:case`EE`:case`EEE`:t=Wy(1,my.Abbreviated);break;case`EEEE`:t=Wy(1,my.Wide);break;case`EEEEE`:t=Wy(1,my.Narrow);break;case`EEEEEE`:t=Wy(1,my.Short);break;case`a`:case`aa`:case`aaa`:t=Wy(0,my.Abbreviated);break;case`aaaa`:t=Wy(0,my.Wide);break;case`aaaaa`:t=Wy(0,my.Narrow);break;case`b`:case`bb`:case`bbb`:t=Wy(0,my.Abbreviated,py.Standalone,!0);break;case`bbbb`:t=Wy(0,my.Wide,py.Standalone,!0);break;case`bbbbb`:t=Wy(0,my.Narrow,py.Standalone,!0);break;case`B`:case`BB`:case`BBB`:t=Wy(0,my.Abbreviated,py.Format,!0);break;case`BBBB`:t=Wy(0,my.Wide,py.Format,!0);break;case`BBBBB`:t=Wy(0,my.Narrow,py.Format,!0);break;case`h`:t=Hy(3,1,-12);break;case`hh`:t=Hy(3,2,-12);break;case`H`:t=Hy(3,1);break;case`HH`:t=Hy(3,2);break;case`m`:t=Hy(4,1);break;case`mm`:t=Hy(4,2);break;case`s`:t=Hy(5,1);break;case`ss`:t=Hy(5,2);break;case`S`:t=Hy(6,1);break;case`SS`:t=Hy(6,2);break;case`SSS`:t=Hy(6,3);break;case`Z`:case`ZZ`:case`ZZZ`:t=Ky(0);break;case`ZZZZZ`:t=Ky(3);break;case`O`:case`OO`:case`OOO`:case`z`:case`zz`:case`zzz`:t=Ky(1);break;case`OOOO`:case`ZZZZ`:case`zzzz`:t=Ky(2);break;default:return null}return $y[e]=t,t}function tb(e,t){e=e.replace(/:/g,``);let n=Date.parse(`Jan 01, 1970 00:00:00 `+e)/6e4;return isNaN(n)?t:n}function nb(e,t){return e=new Date(e.getTime()),e.setMinutes(e.getMinutes()+t),e}function rb(e,t,n){let r=e.getTimezoneOffset();return nb(e,-1*(tb(t,r)-r))}function ib(e){if(ob(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 Ly(t,n-1,r)}let t=parseFloat(e);if(!isNaN(e-t))return new Date(t);let n;if(n=e.match(jy))return ab(n)}let t=new Date(e);if(!ob(t))throw new T(2311,!1);return t}function ab(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 ob(e){return e instanceof Date&&!isNaN(e.valueOf())}var sb=(()=>{class e{_viewContainerRef;_viewRef=null;ngTemplateOutletContext=null;ngTemplateOutlet=null;ngTemplateOutletInjector=null;injector=E(Ss);constructor(e){this._viewContainerRef=e}ngOnChanges(e){if(this._shouldRecreateView(e)){let e=this._viewContainerRef;if(this._viewRef&&e.remove(e.indexOf(this._viewRef)),!this.ngTemplateOutlet){this._viewRef=null;return}let t=this._createContextForwardProxy();this._viewRef=e.createEmbeddedView(this.ngTemplateOutlet,t,{injector:this._getInjector()})}}_getInjector(){return this.ngTemplateOutletInjector===`outlet`?this.injector:this.ngTemplateOutletInjector??void 0}_shouldRecreateView(e){return!!e.ngTemplateOutlet||!!e.ngTemplateOutletInjector}_createContextForwardProxy(){return new Proxy({},{set:(e,t,n)=>this.ngTemplateOutletContext?Reflect.set(this.ngTemplateOutletContext,t,n):!1,get:(e,t,n)=>{if(this.ngTemplateOutletContext)return Reflect.get(this.ngTemplateOutletContext,t,n)}})}static ɵfac=function(t){return new(t||e)(wm(ih))};static ɵdir=Jh({type:e,selectors:[[``,`ngTemplateOutlet`,``]],inputs:{ngTemplateOutletContext:`ngTemplateOutletContext`,ngTemplateOutlet:`ngTemplateOutlet`,ngTemplateOutletInjector:`ngTemplateOutletInjector`},features:[Dc]})}return e})();function cb(e,t){return new T(2100,!1)}var lb=`mediumDate`,ub=new vi(``),db=new vi(``),fb=(()=>{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??lb,a=r??this.defaultOptions?.timezone??this.defaultTimezone??void 0;return Fy(t,e,i||this.locale,a)}catch(t){throw cb(e,t.message)}}static ɵfac=function(t){return new(t||e)(wm(Ov,16),wm(ub,24),wm(db,24))};static ɵpipe=Yh({name:`date`,type:e,pure:!0})}return e})(),pb=(()=>{class e{transform(e){return JSON.stringify(e,null,2)}static ɵfac=function(t){return new(t||e)};static ɵpipe=Yh({name:`json`,type:e,pure:!1})}return e})();function mb(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 hb=`browser`,gb=class{_doc;constructor(e){this._doc=e}manager},_b=(()=>{class e extends gb{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})(),vb=new vi(``),yb=(()=>{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 _b));this._plugins=n.slice().reverse();let r=e.find(e=>e instanceof _b);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(vb),qi(Is))};static ɵprov=di({token:e,factory:e.ɵfac})}return e})(),bb=`ng-app-id`;function xb(e){for(let t of e)t.remove()}function Sb(e,t){let n=t.createElement(`style`);return n.textContent=e,n}function Cb(e,t,n,r){let i=e.head?.querySelectorAll(`style[${bb}="${t}"],link[${bb}="${t}"]`);if(!i||i.length===0)return!1;for(let e of i)e.removeAttribute(bb),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 wb(e,t){let n=t.createElement(`link`);return n.setAttribute(`rel`,`stylesheet`),n.setAttribute(`href`,e),n}var Tb=(()=>{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,Cb(e,t,this.inline,this.external)&&this.hosts.add(e.head)}addStyles(e,t){for(let t of e)this.addUsage(t,this.inline,Sb);t?.forEach(e=>this.addUsage(e,this.external,wb))}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&&(xb(n.elements),t.delete(e)))}ngOnDestroy(){for(let[,{elements:e}]of[...this.inline,...this.external])xb(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,Sb(t,this.doc)));for(let[t,{elements:n}]of this.external)n.push(this.addElement(e,wb(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})(),Eb={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`},Db=/%COMP%/g,Ob=`%COMP%`,kb=`_nghost-${Ob}`,Ab=`_ngcontent-${Ob}`,jb=!0,Mb=new vi(``,{factory:()=>jb}),Nb=new vi(``);function Pb(e){return Ab.replace(Db,e)}function Fb(e){return kb.replace(Db,e)}function Ib(e,t){return t.map(t=>t.replace(Db,e))}var Lb=(()=>{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 Rb(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 Hb?n.applyToHost(e):n instanceof Vb&&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 cu.Emulated:r=new Hb(o,s,t,this.appId,c,i,a,l,this.cssVarNamespace);break;case cu.ShadowDom:return new Bb(o,e,t,i,a,this.nonce,l,this.cssVarNamespace,s);case cu.ExperimentalIsolatedShadowDom:return new Bb(o,e,t,i,a,this.nonce,l,this.cssVarNamespace);default:r=new Vb(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(yb),qi(Sm),qi(Qs),qi(Mb),qi(Cs),qi(Is),qi(nc),qi(Md,8),qi(Nb,8))};static ɵprov=di({token:e,factory:e.ɵfac})}return e})(),Rb=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(Eb[t]||t,e):this.doc.createElement(e)}createComment(e){return this.doc.createComment(e)}createText(e){return this.doc.createTextNode(e)}appendChild(e,t){(zb(e)?e.content:e).appendChild(t)}insertBefore(e,t,n){if(e){let r=zb(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=Eb[r];i?e.setAttributeNS(i,t,n):e.setAttribute(t,n)}else e.setAttribute(t,n)}removeAttribute(e,t,n){if(n){let r=Eb[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&(Qu.DashCase|Qu.Important)?e.style.setProperty(t,n,r&Qu.Important?`important`:``):e.style[t]=n}removeStyle(e,t,n){let r=t.startsWith(`--`);r&&(t=t.replace(`%NS%`,this.cssVarNamespace)),r||n&Qu.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=uy().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 zb(e){return e.tagName===`TEMPLATE`&&e.content!==void 0}var Bb=class extends Rb{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=wb(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)}},Vb=class extends Rb{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&&fd.size===0&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},Hb=class extends Vb{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=Pb(l),this.hostAttr=Fb(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}},Ub=class e extends fy{supportsDOMEvents=!0;static makeCurrent(){dy(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=Gb();return t==null?null:Kb(t)}resetBaseElement(){Wb=null}getUserAgent(){return window.navigator.userAgent}getCookie(e){return mb(document.cookie,e)}},Wb=null;function Gb(){return Wb||=document.head.querySelector(`base`),Wb?Wb.getAttribute(`href`):null}function Kb(e){return new URL(e,document.baseURI).pathname}var qb=[`alt`,`control`,`meta`,`shift`],Jb={"\b":`Backspace`,"	":`Tab`,"":`Delete`,"\x1B":`Escape`,Del:`Delete`,Esc:`Escape`,Left:`ArrowLeft`,Right:`ArrowRight`,Up:`ArrowUp`,Down:`ArrowDown`,Menu:`ContextMenu`,Scroll:`ScrollLock`,Win:`OS`},Yb={alt:e=>e.altKey,control:e=>e.ctrlKey,meta:e=>e.metaKey,shift:e=>e.shiftKey},Xb=(()=>{class e extends gb{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(()=>uy().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.`),qb.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=Jb[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`),qb.forEach(t=>{if(t!==n){let n=Yb[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 Zb(e,t,n){return ry({rootComponent:e,...Qb(t,n)})}function Qb(e,t){return{platformRef:t?.platformRef,appProviders:[...rx,...e?.providers??[]],platformProviders:nx}}function $b(){Ub.makeCurrent()}function ex(){return new Js}function tx(){return Xl(document),document}var nx=[{provide:tc,useValue:hb},{provide:ec,useValue:$b,multi:!0},{provide:Cs,useFactory:tx}],rx=[{provide:Ea,useValue:`root`},{provide:Js,useFactory:ex},{provide:vb,useClass:_b,multi:!0},{provide:vb,useClass:Xb,multi:!0},Lb,{provide:Sm,useClass:Tb},{provide:Tb,useExisting:Sm},yb,{provide:rm,useExisting:Lb},[]];function ix(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 cx({code:i,why:ox(a.why,e),fix:ox(a.fix,e),docs:o,cause:e.cause,sources:e.sources,data:ox(a.data,e)},s);for(let e of t)e(r,n);return r};n[i]=s}return n}function dx(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 _x=Math.random.bind(Math),vx=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`;function yx(e=21){let t=``,n=e;for(;n--;)t+=vx[_x()*64|0];return t}var bx=6e4,xx=e=>e,Sx=xx,{clearTimeout:Cx,setTimeout:wx}=globalThis;function Tx(e,t){let{post:n,on:r,off:i=()=>{},eventNames:a=[],serialize:o=xx,deserialize:s=Sx,resolver:c,bind:l=`rpc`,timeout:u=bx,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}=gx(),_=yx();s.i=_;let ee;async function v(n=s){return u>=0&&(ee=wx(()=>{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{Cx(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&&(Cx(r.timeoutId),n?r.reject(n):r.resolve(t)),p.delete(e)}}return m=r(te),h}function Ex(e,t){return t.safety?t.safety:e===`static`||e===`query`||e==null?`read`:`action`}var Dx=Object.freeze({type:`object`,additionalProperties:!0});function Ox(e){let t=e[`~standard`];if(t.jsonSchema)try{return t.jsonSchema.input({target:`draft-2020-12`})}catch{return Dx}return Dx}function kx(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 jx(e,t){return Ax(e,t)??[e]}function Mx(e){return typeof e==`string`?`'${e}'`:new Ix().serialize(e)}var Nx=` _-,;:!?.'"()[]{}@*/\\&#%\`^+<=>|~$0123456789abcdefghijklmnopqrstuvwxyz`,Px=(function(){let e=new Uint8Array(128);for(let t=0;t<69;t++)e[Nx.charCodeAt(t)]=t+1;for(let t=65;t<=90;t++)e[t]=e[t+32];return e})();function Fx(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})(),Lx=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225],Rx=[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],zx=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_`,Bx=[],Vx=class{_data=new Hx;_hash=new Hx([...Lx]);_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)Bx[n]=e[t+n]|0;else{let e=Bx[n-15],t=(e<<25|e>>>7)^(e<<14|e>>>18)^e>>>3,r=Bx[n-2],i=(r<<15|r>>>17)^(r<<13|r>>>19)^r>>>10;Bx[n]=t+Bx[n-7]+i+Bx[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+Rx[n]+Bx[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=Hx.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 Ux(e){return new Vx().finalize(e).toBase64()}function Wx(e){return Ux(Mx(e))}function Gx(e){return Wx(e)}function Kx(){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 qx=/^[\w+.-]{2,}:\/\//;function Jx(e){return e.endsWith(`/`)?e:`${e}/`}function Yx(e){return(e.endsWith(`/`)?e.slice(0,-1):e)||`/`}function Xx(e,...t){let n=e;for(let e of t)e&&e!==`/`&&(n=n?Jx(n)+e.replace(/^\.?\//,``):e);return n}function Zx(e,t){if(!t||t===`/`||qx.test(e))return e;let n=Yx(t);return e.startsWith(n)?e:Xx(n,e)}function Qx(e,t){let n=e.match(qx);return t+(n?e.slice(n[0].length):e)}var $x=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`;function eS(e=21){let t=``,n=e;for(;n--;)t+=$x[Math.random()*64|0];return t}var tS=Symbol.for(`immer-nothing`),nS=Symbol.for(`immer-draftable`),rS=Symbol.for(`immer-state`),iS=[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 aS(e,...t){{let n=iS[e],r=kS(n)?n.apply(null,t):n;throw Error(`[Immer] ${r}`)}}var oS=Object,sS=oS.getPrototypeOf,cS=`constructor`,lS=`prototype`,uS=`configurable`,dS=`enumerable`,fS=`writable`,pS=`value`,mS=e=>!!e&&!!e[rS];function hS(e){return e?vS(e)||TS(e)||!!e[nS]||!!e[cS]?.[nS]||ES(e)||DS(e):!1}var gS=oS[lS][cS].toString(),_S=new WeakMap;function vS(e){if(!e||!OS(e))return!1;let t=sS(e);if(t===null||t===oS[lS])return!0;let n=oS.hasOwnProperty.call(t,cS)&&t[cS];if(n===Object)return!0;if(!kS(n))return!1;let r=_S.get(n);return r===void 0&&(r=Function.toString.call(n),_S.set(n,r)),r===gS}function yS(e,t,n=!0){bS(e)===0?(n?Reflect.ownKeys(e):oS.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function bS(e){let t=e[rS];return t?t.type_:TS(e)?1:ES(e)?2:DS(e)?3:0}var xS=(e,t,n=bS(e))=>n===2?e.has(t):oS[lS].hasOwnProperty.call(e,t),SS=(e,t,n=bS(e))=>n===2?e.get(t):e[t],CS=(e,t,n,r=bS(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n};function wS(e,t){return e===t?e!==0||1/e==1/t:e!==e&&t!==t}var TS=Array.isArray,ES=e=>e instanceof Map,DS=e=>e instanceof Set,OS=e=>typeof e==`object`,kS=e=>typeof e==`function`,AS=e=>typeof e==`boolean`;function jS(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var MS=e=>OS(e)?e?.[rS]:null,NS=e=>e.copy_||e.base_,PS=e=>e.modified_?e.copy_:e.base_;function FS(e,t){if(ES(e))return new Map(e);if(DS(e))return new Set(e);if(TS(e))return Array[lS].slice.call(e);let n=vS(e);if(t===!0||t===`class_only`&&!n){let t=oS.getOwnPropertyDescriptors(e);delete t[rS];let n=Reflect.ownKeys(t);for(let r=0;r1&&oS.defineProperties(e,{set:RS,add:RS,clear:RS,delete:RS}),oS.freeze(e),t&&yS(e,(e,t)=>{IS(t,!0)},!1),e)}function LS(){aS(2)}var RS={[pS]:LS};function zS(e){return e===null||!OS(e)||oS.isFrozen(e)}var BS=`MapSet`,VS=`Patches`,HS=`ArrayMethods`,US={};function WS(e){let t=US[e];return t||aS(0,e),t}var GS=e=>!!US[e];function KS(e,t){US[e]||(US[e]=t)}var qS,JS=()=>qS,YS=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:GS(BS)?WS(BS):void 0,arrayMethodsPlugin_:GS(HS)?WS(HS):void 0});function XS(e,t){t&&(e.patchPlugin_=WS(VS),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function ZS(e){QS(e),e.drafts_.forEach(eC),e.drafts_=null}function QS(e){e===qS&&(qS=e.parent_)}var $S=e=>qS=YS(qS,e);function eC(e){let t=e[rS];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function tC(e,t){t.unfinalizedDrafts_=t.drafts_.length;let n=t.drafts_[0];if(e!==void 0&&e!==n){n[rS].modified_&&(ZS(t),aS(4)),hS(e)&&(e=nC(t,e));let{patchPlugin_:r}=t;r&&r.generateReplacementPatches_(n[rS].base_,e,t)}else e=nC(t,n);return rC(t,e,!0),ZS(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e===tS?void 0:e}function nC(e,t){if(zS(t))return t;let n=t[rS];if(!n)return dC(t,e.handledSet_,e);if(!aC(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);lC(n,e)}return n.copy_}function rC(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&IS(t,n)}function iC(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var aC=(e,t)=>e.scope_===t,oC=[];function sC(e,t,n,r){let i=NS(e),a=e.type_;if(r!==void 0&&SS(i,r,a)===t){CS(i,r,n,a);return}if(!e.draftLocations_){let t=e.draftLocations_=new Map;yS(i,(e,n)=>{if(mS(n)){let r=t.get(n)||[];r.push(e),t.set(n,r)}})}let o=e.draftLocations_.get(t)??oC;for(let e of o)CS(i,e,n,a)}function cC(e,t,n){e.callbacks_.push(function(r){let i=t;if(!i||!aC(i,r))return;r.mapSetPlugin_?.fixSetContents(i);let a=PS(i);sC(e,i.draft_??i,a,n),lC(i,r)})}function lC(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)}iC(e)}}function uC(e,t,n){let{scope_:r}=e;if(mS(n)){let i=n[rS];aC(i,r)&&i.callbacks_.push(function(){bC(e),sC(e,n,PS(i),t)})}else hS(n)&&e.callbacks_.push(function(){let i=NS(e);e.type_===3?i.has(n)&&dC(n,r.handledSet_,r):SS(i,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&dC(SS(e.copy_,t,e.type_),r.handledSet_,r)})}function dC(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||mS(e)||t.has(e)||!hS(e)||zS(e)?e:(t.add(e),yS(e,(r,i)=>{if(mS(i)){let t=i[rS];aC(t,n)&&(CS(e,r,PS(t),e.type_),iC(t))}else hS(i)&&dC(i,t,n)}),e)}function fC(e,t){let n=TS(e),r={type_:+!!n,scope_:t?t.scope_:JS(),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=pC;n&&(i=[r],a=mC);let{revoke:o,proxy:s}=Proxy.revocable(i,a);return r.draft_=s,r.revoke_=o,[s,r]}var pC={get(e,t){if(t===rS)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=NS(e);if(!xS(i,t,e.type_))return _C(e,i,t);let a=i[t];if(e.finalized_||!hS(a)||r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&jS(t))return a;if(a===hC(e.base_,t)||gC(e,t,a)){bC(e);let n=e.type_===1?+t:t,r=SC(e.scope_,a,e,n);return e.copy_[n]=r}return a},has(e,t){return t in NS(e)},ownKeys(e){return Reflect.ownKeys(NS(e))},set(e,t,n){let r=vC(NS(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){let r=hC(NS(e),t),i=r?.[rS];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_.delete(t),!0;if(wS(n,r)&&(n!==void 0||xS(e.base_,t,e.type_)))return!0;bC(e),yC(e)}return e.copy_[t]===n&&(n!==void 0||xS(e.copy_,t,e.type_))||Number.isNaN(n)&&Number.isNaN(e.copy_[t])?!0:(e.copy_[t]=n,e.assigned_.set(t,!0),uC(e,t,n),!0)},deleteProperty(e,t){return bC(e),hC(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),yC(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let n=NS(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[fS]:!0,[uS]:e.type_!==1||t!==`length`,[dS]:r[dS],[pS]:n[t]}},defineProperty(){aS(11)},getPrototypeOf(e){return sS(e.base_)},setPrototypeOf(){aS(12)}},mC={};for(let e in pC){let t=pC[e];mC[e]=function(){let e=arguments;return e[0]=e[0][0],t.apply(this,e)}}mC.deleteProperty=function(e,t){return isNaN(parseInt(t))&&aS(13),mC.set.call(this,e,t,void 0)},mC.set=function(e,t,n){return t!==`length`&&isNaN(parseInt(t))&&aS(14),pC.set.call(this,e[0],t,n,e[0])};function hC(e,t){let n=e[rS];return(n?NS(n):e)[t]}function gC(e,t,n){return e.type_!==1||!e.allIndicesReassigned_||e.assigned_?.get(t)||!hS(n)||n[rS]?!1:e.baseRefs_.has(n)}function _C(e,t,n){let r=vC(t,n);return r?pS in r?r[pS]:r.get?.call(e.draft_):void 0}function vC(e,t){if(!(t in e))return;let n=sS(e);for(;n;){let e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=sS(n)}}function yC(e){e.modified_||(e.modified_=!0,e.parent_&&yC(e.parent_))}function bC(e){e.copy_||=(e.assigned_=new Map,FS(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var xC=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,n)=>{if(kS(e)&&!kS(t)){let n=t;t=e;let r=this;return function(e=n,...i){return r.produce(e,e=>t.call(this,e,...i))}}kS(t)||aS(6),n!==void 0&&!kS(n)&&aS(7);let r;if(hS(e)){let i=$S(this),a=SC(i,e,void 0),o=!0;try{r=t(a),o=!1}finally{o?ZS(i):QS(i)}return XS(i,n),tC(r,i)}if(!e||!OS(e)){if(r=t(e),r===void 0&&(r=e),r===tS&&(r=void 0),this.autoFreeze_&&IS(r,!0),n){let t=[],i=[];WS(VS).generateReplacementPatches_(e,r,{patches_:t,inversePatches_:i}),n(t,i)}return r}aS(1,e)},this.produceWithPatches=(e,t)=>{if(kS(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]},AS(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),AS(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),AS(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){hS(e)||aS(8),mS(e)&&(e=CC(e));let t=$S(this),n=SC(t,e,void 0);return n[rS].isManual_=!0,QS(t),n}finishDraft(e,t){let n=e&&e[rS];(!n||!n.isManual_)&&aS(9);let{scope_:r}=n;return XS(r,t),tC(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=WS(VS).applyPatches_;return mS(e)?r(e,t):this.produce(e,e=>r(e,t))}};function SC(e,t,n,r){let[i,a]=ES(t)?WS(BS).proxyMap_(t,n):DS(t)?WS(BS).proxySet_(t,n):fC(t,n);return(n?.scope_??JS()).drafts_.push(i),a.callbacks_=n?.callbacks_??[],a.key_=r,n&&r!==void 0?cC(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 CC(e){return mS(e)||aS(10,e),wC(e)}function wC(e){if(!hS(e)||zS(e))return e;let t=e[rS],n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=FS(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=FS(e,!0);return yS(n,(e,t)=>{CS(n,e,wC(t))},r),t&&(t.finalized_=!1),n}function TC(){iS.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=MS(SS(e,n.key_)),i=SS(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||xS(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=SS(o,e,c),f=SS(s,e,c),p=l?xS(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===tS?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(DS(e))return new Set(Array.from(e).map(u));let t=Object.create(sS(e));for(let n in e)t[n]=u(e[n]);return xS(e,nS)&&(t[nS]=e[nS]),t}function d(e){return mS(e)?u(e):e}KS(VS,{applyPatches_:l,generatePatches_:i,generateReplacementPatches_:c,getPath:e})}globalThis.Iterator?.from;var EC=new xC,DC=EC.produce,OC=EC.produceWithPatches.bind(EC),kC=EC.applyPatches.bind(EC),AC=1e3;function jC(e,t){if(e.add(t),e.size>AC){let t=e.values().next().value;t!==void 0&&e.delete(t)}}function MC(e){let{enablePatches:t=!1}=e;t&&TC();let n=Kx(),r=e.initialValue,i=new Set;return{on:n.on,value:()=>r,patch:(e,t=eS())=>{i.has(t)||(TC(),r=kC(r,e),jC(i,t),n.emit(`updated`,r,void 0,t))},mutate:(e,a=eS())=>{if(!i.has(a)){if(jC(i,a),t){let[t,i]=OC(r,e);if(t===r)return;r=t,n.emit(`updated`,r,i,a)}else{let t=DC(r,e);if(t===r)return;r=t,n.emit(`updated`,r,void 0,a)}}},syncIds:i}}var NC=typeof self==`object`?self:globalThis,PC=new Set([`Error`,`EvalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`,`AggregateError`]),FC=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=PC.has(e)?NC[e]:void 0;return n(new(r??NC.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`&&FC.has(a))return n(new NC[a](o),i);throw TypeError(`unable to deserialize unsafe or unknown type: ${String(a)}`)};return r}function LC(e){return IC(new Map,e)(0)}var RC=``,{toString:zC}={},{keys:BC}=Object;function VC(e){let t=typeof e;if(t!==`object`||!e)return[0,t];let n=zC.call(e).slice(8,-1);switch(n){case`Array`:return[1,RC];case`Object`:return[2,RC];case`Date`:return[3,RC];case`RegExp`:return[4,RC];case`Map`:return[5,RC];case`Set`:return[6,RC];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:n.includes(`Error`)?[7,n]:[2,n]}function HC([e,t]){return e===0&&(t===`function`||t===`symbol`)}function UC(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]=VC(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 BC(r))(e||!HC(VC(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||!(HC(VC(n))||HC(VC(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!HC(VC(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a}function WC(e,t={}){let n=[];return UC(!(t.json||t.lossy),!!t.json,new Map,n)(e),n}var{parse:GC,stringify:KC}=JSON,qC={json:!0,lossy:!0};function JC(e){return LC(GC(e))}function YC(e){return KC(WC(e,qC))}function XC(e){return LC(e)}function ZC(e){return YC(e)}function QC(e){return JC(e)}var $C=256,ew=class extends Error{name=`StreamClosedError`};function tw(e={}){let t=e.id??eS(),n=Math.max(0,e.replayWindow??0),r=Kx(),i=new AbortController,a=[],o=!1,s=0;function c(e){if(o)throw new ew(`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=rw(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 nw(e={}){let t=e.id??eS(),n=Math.max(1,e.highWaterMark??$C),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 rw(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 iw=128;function aw(e){return e.replace(/[^\w-]+/g,`_`).slice(0,iw)}var ow=`modulepreload`,sw=function(e,t){return new URL(e,t).href},cw={},lw=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=sw(t,n),t=s(t),t in cw)return;cw[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`:ow,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)})},uw=`__connection.json`,dw=`__DEVFRAME_CONNECTION__`,fw=`x-birpc-session`,pw=`__rpc-dump/index.json`,mw=`devframe:services`,hw=`devframe_otp`,gw=`devframe_auth_token`;fx.postMessage.remoteAssetsError;var _w=class{cacheMap=new Map;options;keySerializer;constructor(e){this.options=e,this.keySerializer=e.keySerializer||(e=>Gx(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()}},vw=hx({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 yw(e){if(e.agent&&e.jsonSerializable===!1)throw vw.DF0019({name:e.name});e.agent&&!e.jsonSerializable&&(e.jsonSerializable=!0)}async function bw(e,t){let n=e[`~standard`].validate(t);return n instanceof Promise?await n:n}function xw(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 Sw(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 Tw(e,t){let n=e.handler;if(!n){let r=await ww(e,t);if(!r.handler)throw vw.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 Sw(e.name,r,t),o=await a(...n);return await Cw(e.name,i,o)}}var Ew=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 Tw(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 vw.DF0021({name:e.name});yw(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 vw.DF0022({name:e.name});yw(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 Tw(this.definitions.get(e),this.context)}getSchema(e){let t=this.definitions.get(e);if(!t)throw vw.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 Dw(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 kw(t,`undefined`,r,e);return n}return i!==null&&Ow(i,r,e,t),n})}function Ow(e,t,n,r){if(typeof e==`bigint`)throw kw(r,`BigInt`,t,n);if(typeof e!=`object`)return;if(e instanceof Map)throw kw(r,`Map`,t,n);if(e instanceof Set)throw kw(r,`Set`,t,n);if(e instanceof Date)throw kw(r,`Date`,t,n);if(Array.isArray(e))return;let i=Object.getPrototypeOf(e);if(i!==null&&i!==Object.prototype)throw kw(r,e.constructor?.name??`class instance`,t,n)}function kw(e,t,n,r){let i=Aw(n,r);return vw.DF0020({name:e||``,type:t,path:i})}function Aw(e,t){return Array.isArray(e)?`[${t}]`:t===``?``:t}var jw=`__DEVFRAME_CONNECTION_META__`,Mw=`__DEVFRAME_CONNECTION_AUTH_TOKEN__`;function Nw(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 Pw(){return Nw(dw)}function Fw(){return Nw(jw)}function Iw(e){if(e)return e;try{let e=localStorage.getItem(Mw);if(e)return e}catch{}return Nw(Mw)}function Lw(e){globalThis[dw]=e,globalThis[jw]={...e.connectionMeta,baseUrl:e.metaBaseUrl},e.authToken&&Rw(e.authToken)}function Rw(e){try{localStorage.setItem(Mw,e)}catch{}globalThis[Mw]=e;let t=Pw();t&&(globalThis[dw]={...t,authToken:e})}function zw(e){let t=Zx(uw,e);try{return new URL(t,globalThis.location?.href).href}catch{return t}}function Bw(e,t){return t&&t!==e.authToken?{...e,authToken:t}:e}function Vw(){let e=Pw();if(e)return Bw(e,Iw()??e.authToken??e.connectionMeta.authToken);let t=Fw();if(t)return{connectionMeta:t,metaBaseUrl:t.baseUrl??zw(`./`),authToken:Iw(t.authToken)}}async function Hw(e={}){if(e.connection){let t=Bw(e.connection,Iw(e.authToken??e.connection.authToken??e.connection.connectionMeta.authToken));return Lw(t),t}let t=Array.isArray(e.baseURL)?e.baseURL:[e.baseURL??`./`];if(e.connectionMeta){let n={connectionMeta:e.connectionMeta,metaBaseUrl:zw(t[0]??`./`),authToken:Iw(e.authToken??e.connectionMeta.authToken)};return Lw(n),n}let n=Vw();if(n){let t=Bw(n,Iw(e.authToken??n.authToken??n.connectionMeta.authToken));return Lw(t),t}let r=[];for(let n of t){let t=Zx(uw,n),i=zw(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 Lw(o),o}catch(e){r.push(e)}}throw Error(`Failed to get connection meta from ${t.join(`, `)}`,{cause:r})}var Uw=class extends Error{name=`DevframeConnectionError`;kind;constructor(e,t,n){super(t,n),this.kind=e}};function Ww(e=hw){try{let t=globalThis.location?.hash?.replace(/^#/,``)??``;return new URLSearchParams(t).get(e)||void 0}catch{return}}function Gw(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 Kw(e=hw){let t=Ww(e);return t&&Gw(e),t}async function qw(e,t={}){let n=Kw(t.param??`devframe_otp`);return n?e.isTrusted?!0:e.requestTrustWithCode(n):!1}function Jw(e){let t={},n=new WeakMap,r,i=()=>(r??=e.sharedState.get(mw,{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 Yw(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:fx.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:fx.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=MC({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(fx.client.isTrustedUpdated,e=>{e&&!n&&(n=!0,d())})}})}}}var Xw=new Map;function Zw(e=Xw){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?Dw(n,r??``):`s:${ZC(n)}`},deserialize:e=>{let n=e.startsWith(`s:`)?QC(e.slice(2)):JSON.parse(e);return n.t===`q`&&n.i&&n.m&&t.set(n.i,n.m),n}}}function Qw(){}function $w(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 eT(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 tT(e){let{onConnected:t=Qw,onError:n=Qw,onDisconnected:r=Qw,definitions:i,fetch:a=globalThis.fetch.bind(globalThis)}=e,o=e.url;e.authToken&&(o=`${o}${o.includes(`?`)?`&`:`?`}${gw}=${encodeURIComponent(e.authToken)}`);let s=Zw(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=$w(r);if(!e)break;r=e.rest;let{event:t,data:n}=eT(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`,[fw]: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 nT(e,t){let{channel:n,rpcOptions:r={}}=t;return Tx(e,{...n,timeout:-1,...r,proxify:!1})}function rT(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(fx.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 Uw(`connection`,`[devframe] Not connected to the devframe server`,{cause:u??void 0}):l===`unauthorized`?new Uw(`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(fx.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 Uw(`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(fx.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(fx.client.connectionError,e),m(new Uw(`connection`,`[devframe] Connection to the devframe server failed`,{cause:e}))},onDisconnected(){l!==`error`&&f(`disconnected`),m(new Uw(`connection`,`[devframe] Disconnected from the devframe server`,{cause:u??void 0}))}}),v=nT(a.functions,{channel:ee,rpcOptions:o});a.register({name:fx.broadcast.authRevoked,type:`event`,handler:()=>{c=!1;let e=new Uw(`auth`,`[devframe] The devframe server revoked this client's trust`);f(`unauthorized`,e),i.emit(fx.client.connectionError,e),m(e),i.emit(fx.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 Uw(`auth`,`[devframe] The devframe server refused this client's credentials`);f(`unauthorized`,e),i.emit(fx.client.connectionError,e)}return i.emit(fx.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(fx.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(fx.client.error,n,t),Promise.reject(n)):g(v.$call(...e),t)},callEvent:(...e)=>{let t=h();if(t){i.emit(fx.client.error,t,String(e[0]));return}return v.$callEvent(...e)},callOptional:(...e)=>{let t=String(e[0]),n=h();return n?(i.emit(fx.client.error,n,t),Promise.reject(n)):g(v.$callOptional(...e),t)},close:()=>{ee.close()}}}function iT(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 aT(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},sseOptions:s={},callTimeout:c=0}=e,l=iT(n.sse,r??`./`,location);return rT({transport:`sse`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>tT({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 oT(e){let{name:t,message:n,cause:r,...i}=e,a=r instanceof Error?r:sT(r)?oT(r):r,o=a===void 0?Error(n):Error(n,{cause:a});return o.name=t,Object.assign(o,i),o}function sT(e){return typeof e==`object`&&!!e&&typeof e.message==`string`&&typeof e.name==`string`}function cT(e){return typeof e==`object`&&!!e&&e.type===`static`&&typeof e.path==`string`}function lT(e){return typeof e==`object`&&!!e&&e.type===`query`&&typeof e.records==`object`&&e.records!==null}function uT(e){return typeof e==`object`&&!!e&&(`output`in e||`error`in e)}function dT(e){if(e.error)throw oT(e.error);return e.output}function fT(e){return e.some(e=>e!=null)}function pT(e){return typeof e==`object`&&e&&`serialization`in e&&`data`in e?e.data:e}function mT(e,t){let n=new Map,r=new Map;function i(e,t){return t===`structured-clone`&&Array.isArray(e)?XC(e):e}function a(e,t){return i(pT(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 uT(r)?dT(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(cT(r)){if(fT(n))throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`);return await o(r)}if(lT(r)){let e=Gx(n),i=r.records[e];if(i)return dT(await s(i,r.serialization));if(r.fallback)return dT(await s(r.fallback,r.serialization));throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`)}if(!fT(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 hT(e){let t=mT(await e.fetchJsonFromBases(pw),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 gT=``;function _T(e,t){return`${e}${gT}${t}`}function vT(e){let t=new Map,n=new Map;e.client.register({name:fx.broadcast.streamingChunk,type:`event`,handler(e,n,r,i){t.get(_T(e,n))?._push(r,i)}}),e.client.register({name:fx.broadcast.streamingEnd,type:`event`,handler(e,n,r){let i=_T(e,n),a=t.get(i);a&&(a._end(r),t.delete(i))}}),e.client.register({name:fx.broadcast.streamingUploadCancel,type:`event`,handler(e,t){let r=_T(e,t),i=n.get(r);i&&(i.abort(`server cancelled upload`),n.delete(r))}}),e.events.on(fx.client.isTrustedUpdated,n=>{if(n)for(let[n,r]of t){if(r.cancelled||r.done)continue;let t=n.indexOf(gT);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=_T(n,r),o=t.get(a);if(o)return o;let s=nw({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(fx.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=_T(t,r),a=n.get(i);if(a)return a;let o=tw({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 yT(){}var bT=new Map;function xT(e){let t=e.url;e.authToken&&(t=`${t}?${gw}=${encodeURIComponent(e.authToken)}`);let n=new WebSocket(t),{onConnected:r=yT,onError:i=yT,onDisconnected:a=yT,definitions:o=bT}=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=Zw(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 ST(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 Qx(a,/^https/i.test(a)?`wss://`:`ws://`);let o=new URL(a,r);return o.protocol=i,o.href}function CT(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},wsOptions:s={},callTimeout:c=0}=e,l=ST(n.websocket,r??`./`,location);return rT({transport:`websocket`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>xT({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 wT(e){return e.includes(`:`)}function TT(e,t){return wT(t)?t:`${e}:${t}`}function ET(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 DT(e,t,n){let r=`devframe:settings:${n}:${t}`,i;function a(){return i||=e.sharedState.get(r,{initialValue:{}}),i}return ET(a)}function OT(e,t){return{global:DT(e,t,`global`),project:DT(e,t,`project`)}}function kT(e,t){return{namespace:t,base:e,rpc:{namespace:t,register(n){if(wT(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(TT(t,n),...r)),callEvent:((n,...r)=>e.callEvent(TT(t,n),...r)),callOptional:((n,...r)=>e.callOptional(TT(t,n),...r)),sharedState:((n,r)=>e.sharedState.get(TT(t,n),r)),streaming:{subscribe:(n,r,i)=>e.streaming.subscribe(TT(t,n),r,i),upload:(n,r)=>e.streaming.upload(TT(t,n),r)}},settings:OT(e,t),scope:e.scope}}function AT(){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 jT(e,t={}){let n=t.modelContext??AT();if(!n)return()=>{};let r=n,i=new Map,a=new Map;function o(t,n){let o=aw(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=Ex(t.type,n),u=r.registerTool({name:o,description:n.description,inputSchema:kx(t.args),annotations:{title:n.title??t.name,readOnlyHint:l===`read`,destructiveHint:l===`destructive`},execute:n=>MT(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 MT(e,t,n){try{let r=jx(n,e.args?.length);return{content:[{type:`text`,text:NT(await(await Tw(e,t))(...r))}]}}catch(e){return{isError:!0,content:[{type:`text`,text:PT(e)}]}}}function NT(e){return e===void 0?`undefined`:typeof e==`string`?e:JSON.stringify(e,null,2)}function PT(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 FT(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=Kx(),a=Array.isArray(t)?t:[t],o=await Hw(e),{connectionMeta:s,metaBaseUrl:c,authToken:l}=o,u=a[0]??`./`;try{u=new URL(`.`,c).href}catch{}let d=new _w({functions:[],...typeof e.cacheOptions==`object`?e.cacheOptions:{}}),f={rpc:void 0},p=new Ew(f),m=e.webmcp===!1?void 0:jT(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(Zx(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=FT(e.transport??`auto`,s),te=v===`static`?await hT({fetchJsonFromBases:_}):v===`sse`?aT({...ee,sseOptions:e.sseOptions}):CT({...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=>(Rw(e),o={...o,authToken:e},te.requestTrustWithToken(e)),requestTrustWithCode:async e=>{let t=await te.requestTrustWithCode(e);if(!t)return!1;Rw(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=Yw(se),se.streaming=vT(se),se.services=Jw(se);let ce=new Map;se.scope=(e=>{if(!e)return se;let t=ce.get(e);return t||(t=kT(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 qw(se,{param:n}):!1;t||r||se.isTrusted||await ue()}return re=de().then(()=>{ie=!0},()=>{ie=!0}),s.mcp&&lw(async()=>{let{setupBrowserAgentRpcBridge:e}=await import(`./browser-agent-rpc-BXhoSh1z-BhKkMIUU.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 LT=IT,RT=[`components`,`injectors`,`signals`,`ngrx`,`forms`,`router`,`pipes`,`http`,`analog`,`capacitor`],zT=[`angular`,`ngrx`,`analog`,`angular-native`,`nativescript`,`capacitor`];function BT(e){return`pangular:${e}`}var VT=[`forms`,`router`,`ngrx`,`http`,`analog`],HT={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},cdCycles:{default:200,min:10,max:2e3},capacitorCalls:{default:200,min:10,max:2e3}},UT={"opted-out":`the request sets transferCache: false`,post:`POST requests are left out unless includePostRequests is set`,method:`only GET, HEAD and POST requests are cached`,"auth-headers":`it sends an Authorization, Proxy-Authorization or Cookie header`,credentials:`it sends credentials (withCredentials or credentials: include/same-origin)`,"no-cache-request":`the request asks for no-store, no-cache or private`,"no-cache-response":`the response has Cache-Control no-store, no-cache or private`,"set-cookie":`the response sets a cookie`,error:`failed responses are not stored`,mocked:`a fault rule answered before the transfer cache ran`,"cache-off-or-filter":`the transfer cache is off, or its filter (or another withHttpTransferCacheOptions setting) left it out`},WT=[[200,`OK`],[201,`Created`],[202,`Accepted`],[203,`Non-Authoritative Information`],[204,`No Content`],[205,`Reset Content`],[206,`Partial Content`],[207,`Multi-Status`],[208,`Already Reported`],[226,`IM Used`],[300,`Multiple Choices`],[301,`Moved Permanently`],[302,`Found`],[303,`See Other`],[304,`Not Modified`],[307,`Temporary Redirect`],[308,`Permanent Redirect`],[400,`Bad Request`],[401,`Unauthorized`],[402,`Payment Required`],[403,`Forbidden`],[404,`Not Found`],[405,`Method Not Allowed`],[406,`Not Acceptable`],[407,`Proxy Authentication Required`],[408,`Request Timeout`],[409,`Conflict`],[410,`Gone`],[411,`Length Required`],[412,`Precondition Failed`],[413,`Content Too Large`],[414,`URI Too Long`],[415,`Unsupported Media Type`],[416,`Range Not Satisfiable`],[417,`Expectation Failed`],[418,`I'm a Teapot`],[421,`Misdirected Request`],[422,`Unprocessable Content`],[423,`Locked`],[424,`Failed Dependency`],[425,`Too Early`],[426,`Upgrade Required`],[428,`Precondition Required`],[429,`Too Many Requests`],[431,`Request Header Fields Too Large`],[451,`Unavailable For Legal Reasons`],[499,`Client Closed Request`],[500,`Internal Server Error`],[501,`Not Implemented`],[502,`Bad Gateway`],[503,`Service Unavailable`],[504,`Gateway Timeout`],[505,`HTTP Version Not Supported`],[506,`Variant Also Negotiates`],[507,`Insufficient Storage`],[508,`Loop Detected`],[510,`Not Extended`],[511,`Network Authentication Required`],[520,`Web Server Returned an Unknown Error`],[521,`Web Server Is Down`],[522,`Connection Timed Out`],[523,`Origin Is Unreachable`],[524,`A Timeout Occurred`]];function GT(e){return WT.some(([t])=>t===e)}var KT=`pangular`;function qT(e){return e&&typeof e==`object`&&!Array.isArray(e)?e:{}}function JT(e,t){return typeof e==`boolean`?e:t}var YT=100,XT=100;function ZT(e){if(!Array.isArray(e))return[];let t=e.filter(e=>typeof e==`string`).map(e=>e.trim()).filter(e=>e&&e.length<=XT);return[...new Set(t)].slice(0,YT)}function QT(e,t){let{default:n,min:r,max:i}=HT[t];return typeof e!=`number`||!Number.isFinite(e)?n:Math.min(i,Math.max(r,Math.round(e)))}function $T(e,t){return Object.fromEntries(e.map(e=>[e,t(e)]))}function eE(e){let t=qT(e),n=qT(t.agent),r=qT(t.inspectors),i=qT(n.tools),a=qT(t.actions),o=JT(t.actions,!0),s=qT(t.redaction),c=qT(t.limits),l=$T(RT,e=>JT(r[e],!0));return{inspectors:l,agent:{readOnly:JT(n.readOnly,!1),tools:$T(RT,e=>l[e]&&JT(i[e],!0))},actions:$T(VT,e=>l[e]&&JT(a[e],o)),redaction:{secretNames:ZT(s.secretNames),unmask:ZT(s.unmask)},limits:Object.fromEntries(Object.keys(HT).map(e=>[e,QT(c[e],e)]))}}function tE(e){let t=e?.configs;return eE(t?.[KT])}function nE(e){return`${{forms:`Writing to forms`,router:`Navigating and clearing navigations`,ngrx:`Restoring NgRx state and dispatching actions`,http:`Changing HTTP mock rules and clearing HTTP calls`,analog:`Calling API routes and clearing server calls`}[e]} is turned off in the devtools config (actions.${e}).`}var rE={components:`Components`,injectors:`Injectors`,signals:`Signals`,ngrx:`NgRx`,forms:`Forms`,router:`Router`,pipes:`Pipes`,http:`HTTP`,analog:`Analog`,capacitor:`Capacitor`},iE={forms:`Form writes`,router:`Navigation`,ngrx:`NgRx restore and dispatch`,http:`HTTP mocking`,analog:`Analog API calls`},aE={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`,cdCycles:e=>`${e} change detection cycles`,capacitorCalls:e=>`${e} Capacitor plugin calls`};function oE(e){let t=[],n=(e,n)=>{n.length&&t.push({label:e,value:n.join(`, `)})},r=RT.filter(t=>e.inspectors[t]);return n(`Inspectors off`,RT.filter(t=>!e.inspectors[t]).map(e=>rE[e])),n(`Agent`,e.agent.readOnly?[`Read-only`]:[]),n(`Hidden from the agent`,r.filter(t=>!e.agent.tools[t]).map(e=>rE[e])),n(`Blocked actions`,VT.filter(t=>e.inspectors[t]&&!e.actions[t]).map(e=>iE[e])),n(`Extra secret names`,e.redaction.secretNames),n(`Unmasked names`,e.redaction.unmask),n(`Limits`,Object.keys(HT).filter(t=>e.limits[t]!==HT[t].default).map(t=>aE[t](e.limits[t]))),t}var sE=`pangular-page-id`,cE=null;function lE(e){cE=e}function uE(){if(cE)return cE;try{return new URLSearchParams(location.search).get(`pageId`)||(window.top===window?null:sessionStorage.getItem(sE)||null)}catch{return null}}function dE(e,t){if(t.chosen&&e[t.chosen])return t.chosen;if(t.host)return t.host;if(t.previous&&e[t.previous])return t.previous;let n=null;for(let t of Object.values(e))(!n||t.reportedAt>n.reportedAt)&&(n=t);return n?.pageId??null}function fE(e,t){return e?t?e.pages?.[t]??null:e:null}function pE(e,t){return e?t?e.pages?.[t]??null:e.graph??null:null}function mE(e,t,n){return e?e.scope(`pangular`).rpc.call(t,...n===void 0?[]:[n]):Promise.resolve(null)}function hE(e,t,n){return mE(e,t,n).then(e=>e,()=>null)}function gE(e){return e?.connectionMeta.backend===`static`}function _E(e){let t=()=>{let t=e()?.scope(`pangular`).rpc;t&&(t.callEvent(`request-page-highlight`,null),t.callEvent(`request-form-highlight`,null))};return addEventListener(`pagehide`,t),()=>{removeEventListener(`pagehide`,t),t()}}function vE(e){return e.split(`@`)[1]??``}var yE={signal:`Signal Forms`,reactive:`Reactive`,template:`Template-driven`},bE={own:`validator`,directive:`template attribute`,tree:`cross-field rule`,async:`async`,parse:`parse`,submission:`server`,schema:`schema`,manual:`setErrors`},xE=hE,SE={key:`name looks secret`,"input-type":`password input`,autocomplete:`autocomplete is a secret kind`,marker:`marked as mask`,parent:`inside a secret group`,config:`listed in mask`};function CE(e){return SE[e]??e}var wE=`https://pangular-inspector.dev/security/#opt-fields-in-or-out`;async function TE(e,t){return await xE(e,`request-form-action`,t)??{ok:!1,error:`The devtools server did not answer.`}}function EE(e){return`${e.ok?e.message??`Done.`:e.error??`Failed.`}${e.skipped?.length?` Skipped: ${e.skipped.map(e=>`${e.path} (${e.reason})`).join(`, `)}.`:``}${e.status?` Status: ${e.status}.`:``}`}var DE=/"(?:[^"\\\n]|\\.)*"|`([^`\n]*)`|\*\*/g;function OE(e){return(e??``).replace(/^_Labels, paths.*_\n\n/,``).replace(DE,(e,t)=>t??(e===`**`?``:e))}function kE(e){return tE(e?.connectionMeta)}function AE(e,t){return kE(e).actions[t]}var jE={components:`components`,routes:`router`,signals:`signals`,injectors:`injectors`,store:`ngrx`,forms:`forms`,pipes:`pipes`,network:`http`,analog:`analog`,capacitor:`capacitor`};function ME(e){return jE[e]}var NE=`https://pangular-inspector.dev/getting-started/configuration/#inspectors-and-agent-tools`;function PE(e,t){let n=jE[e];return!n||t.inspectors[n]}function FE(e,t){e&1&&(A(),zg(0,`rect`,4)(1,`rect`,5)(2,`rect`,6)(3,`rect`,7))}function IE(e,t){e&1&&(A(),zg(0,`path`,8)(1,`path`,9)(2,`path`,10))}function LE(e,t){e&1&&(A(),zg(0,`circle`,11)(1,`path`,12)(2,`circle`,13))}function RE(e,t){e&1&&(A(),zg(0,`path`,1))}function zE(e,t){e&1&&(A(),zg(0,`path`,14)(1,`path`,15)(2,`path`,16)(3,`path`,17))}function BE(e,t){e&1&&(A(),zg(0,`ellipse`,18)(1,`path`,19)(2,`path`,20))}function VE(e,t){e&1&&(A(),zg(0,`rect`,21)(1,`path`,22)(2,`path`,23)(3,`path`,24))}function HE(e,t){e&1&&(A(),zg(0,`circle`,25)(1,`path`,26)(2,`path`,27))}function UE(e,t){e&1&&(A(),zg(0,`path`,28)(1,`path`,29)(2,`path`,30)(3,`path`,31)(4,`circle`,32))}function WE(e,t){e&1&&(A(),zg(0,`path`,2))}function GE(e,t){e&1&&(A(),zg(0,`path`,3))}var KE=class e{name=$.required();static ɵfac=function(t){return new(t||e)};static ɵcmp=Wh({type:e,selectors:[[`app-tab-icon`]],inputs:{name:[1,`name`]},decls:12,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`],[`fill`,`currentColor`,`stroke`,`none`,`transform`,`translate(1.8 1.8) scale(0.85)`,`d`,`M24 3.7l-5.766 5.766 5.725 5.736-3.713 3.712L5.073 3.742 8.786.03l5.736 5.726L20.284 0 24 3.7zM.029 8.785l3.713-3.713 15.173 15.173-3.713 3.714-5.732-5.726L3.7 24 0 20.285l5.754-5.764L.029 8.785z`],[`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&&(A(),H(0,`svg`,0),P(1,FE,4,0)(2,IE,3,0)(3,LE,3,0)(4,RE,1,0,`:svg:path`,1)(5,zE,4,0)(6,BE,3,0)(7,VE,4,0)(8,HE,3,0)(9,UE,5,0)(10,WE,1,0,`:svg:path`,2)(11,GE,1,0,`:svg:path`,3),U()),e&2){let e;M(),F((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:e===`capacitor`?11:-1)}},styles:[`[_nghost-%COMP%] {
+`);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){let n=[];for(let r=0;rt;){let t=i-2;e[i]=e[t],i--}e[t]=n,e[t+1]=r}}function oa(e,t,n){let r=ca(e,t);return r>=0?e[r|1]=n:(r=~r,aa(e,r,t,n)),r}function sa(e,t){let n=ca(e,t);if(n>=0)return e[n|1]}function ca(e,t){return la(e,t,1)}function la(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;ya(t,a,[],r)&&(i||=[],i.push(t))}),i!==void 0&&va(i,a),n}function va(e,t){for(let n=0;n{t(e,r)})}}function ya(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)ya(i,t,n,r)}}else if(a){if(a.imports!=null&&!s){r.add(i);let e;try{ta(a.imports,i=>{ya(i,t,n,r)&&(e||=[],e.push(i))})}finally{}e!==void 0&&va(e,t)}if(!s){let e=Qi(i)||(()=>new i);t({provide:i,useFactory:e,deps:da},i),t({provide:ma,useValue:i,multi:!0},i),t({provide:fa,useValue:()=>qi(i),multi:!0},i)}let o=a.providers;if(o!=null&&!s){let n=e;ba(o,e=>{t(e,n)})}}else return!1;return i!==e&&e.providers!==void 0}function ba(e,t){for(let n of e)yi(n)&&(n=n.ɵproviders),Array.isArray(n)?ba(n,t):t(n)}var xa=ii({provide:String,useValue:ii});function Sa(e){return typeof e==`object`&&!!e&&xa in e}function Ca(e){return!!(e&&e.useExisting)}function wa(e){return!!(e&&e.useFactory)}function Ta(e){return typeof e==`function`}var Ea=new vi(``),Da={},Oa={},ka=void 0;function Aa(){return ka===void 0&&(ka=new ha),ka}var ja=class{},Ma=class extends ja{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,Ha(e,e=>this.processProvider(e)),this.records.set(pa,Ra(void 0,this)),r.has(`environment`)&&this.records.set(ja,Ra(void 0,this));let i=this.records.get(Ea);i!=null&&typeof i.value==`string`&&this.scopes.add(i.value),this.injectorDefTypes=new Set(this.get(ma,da,{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(){La(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 La(this),this._onDestroyHooks.push(e),()=>this.removeOnDestroy(e)}runInContext(e){La(this);let t=Qn(this),n=Bi(void 0);try{return e()}finally{Qn(t),Bi(n)}}get(e,t=Ui,n){if(La(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=Va(e)&&fi(e);t=n&&this.injectableDefInScope(n)?Ra(Na(e),Da):null,this.records.set(e,t)}if(t!=null)return this.hydrate(e,t,r)}let n=r&2?Aa():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(fa,da,{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=Ta(e)?e:li(e&&e.provide),n=Fa(e);if(!Ta(e)&&e.multi===!0){let n=this.records.get(t);n||(n=Ra(void 0,Da,!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===Oa)throw Pi(``);return t.value===Da&&(t.value=Oa,t.value=t.factory(void 0,n)),typeof t.value==`object`&&t.value&&Ba(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 Na(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 Pa(e);throw new T(-204,!1)}function Pa(e){if(e.length>0)throw new T(-204,!1);let t=mi(e);return t===null?()=>new e:()=>t.factory(e)}function Fa(e){return Sa(e)?Ra(void 0,e.useValue):Ra(Ia(e),Da)}function Ia(e,t,n){let r;if(Ta(e)){let t=li(e);return Qi(t)||Na(t)}if(Sa(e))r=()=>li(e.useValue);else if(wa(e))r=()=>e.useFactory(...Xi(e.deps||[]));else if(Ca(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(za(e))r=()=>new t(...Xi(e.deps));else return Qi(t)||Na(t)}return r}function La(e){if(e.destroyed)throw new T(-205,!1)}function Ra(e,t,n=!1){return{factory:e,value:t,multi:n?[]:void 0}}function za(e){return!!e.deps}function Ba(e){return typeof e==`object`&&!!e&&typeof e.ngOnDestroy==`function`}function Va(e){return typeof e==`function`||typeof e==`object`&&e.ngMetadataName===`InjectionToken`}function Ha(e,t){for(let n of e)Array.isArray(n)?Ha(n,t):n&&yi(n)?Ha(n.ɵproviders,t):t(n)}function Ua(e,t){let n;e instanceof Ma?(La(e),n=e):n=new Gi(e);let r=Qn(n),i=Bi(void 0);try{return t()}finally{Qn(r),Bi(i)}}function Wa(){return zi()!==void 0||Zn()!=null}var Ga=1;function Ka(e){return Array.isArray(e)&&typeof e[Ga]==`object`}function qa(e){return Array.isArray(e)&&e[Ga]===!0}function Ja(e){return!!(e.flags&4)}function Ya(e){return e.componentOffset>-1}function Xa(e){return(e.flags&1)==1}function Za(e){return!!e.template}function Qa(e){return!!(e[2]&512)}function $a(e){return(e[2]&256)==256}var eo=(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})(eo||{}),to=`math`;function no(e){for(;Array.isArray(e);)e=e[0];return e}function ro(e,t){return no(t[e])}function io(e,t){return no(t[e.index])}function ao(e,t){return e.data[t]}function oo(e,t){return e[t]}function so(e,t,n,r){n>=e.data.length&&(e.data[n]=null,e.blueprint[n]=null),t[n]=r}function co(e,t){let n=t[e];return Ka(n)?n:n[0]}function lo(e){return(e[2]&128)==128}function uo(e){return qa(e[3])}function fo(e,t){return t==null?null:e[t]}function po(e){e[17]=0}function mo(e){e[2]&1024||(e[2]|=1024,lo(e)&&vo(e))}function ho(e,t){for(;e>0;)t=t[14],e--;return t}function go(e){return!!(e[2]&9216||e[24]?.dirty)}function _o(e){e[10].changeDetectionScheduler?.notify(8),e[2]&64&&(e[2]|=1024),go(e)&&vo(e)}function vo(e){e[10].changeDetectionScheduler?.notify(0);let t=xo(e);for(;t!==null&&!(t[2]&8192||(t[2]|=8192,!lo(t)));)t=xo(t)}function yo(e,t){if($a(e))throw new T(911,!1);e[21]===null&&(e[21]=[]),e[21].push(t)}function bo(e,t){if(e[21]===null)return;let n=e[21].indexOf(t);n!==-1&&e[21].splice(n,1)}function xo(e){let t=e[3];return qa(t)?t[3]:t}function So(e){return e[7]??=[]}function Co(e){return e.cleanup??=[]}function wo(e,t,n,r){let i=So(t);i.push(n),e.firstCreatePass&&Co(e).push(r,i.length-1)}var To={lFrame:os(null),bindingsEnabled:!0,skipHydrationRootTNode:null},Eo=!1;function Do(){return To.lFrame.elementDepthCount}function Oo(){To.lFrame.elementDepthCount++}function ko(){To.lFrame.elementDepthCount--}function Ao(){return To.bindingsEnabled}function jo(){return To.skipHydrationRootTNode!==null}function Mo(e){return To.skipHydrationRootTNode===e}function No(){To.skipHydrationRootTNode=null}function D(){return To.lFrame.lView}function Po(){return To.lFrame.tView}function O(e){return To.lFrame.contextLView=e,e[8]}function k(e){return To.lFrame.contextLView=null,e}function Fo(){let e=Io();for(;e!==null&&e.type===64;)e=e.parent;return e}function Io(){return To.lFrame.currentTNode}function Lo(){let e=To.lFrame,t=e.currentTNode;return e.isParent?t:t.parent}function Ro(e,t){let n=To.lFrame;n.currentTNode=e,n.isParent=t}function zo(){return To.lFrame.isParent}function Bo(){To.lFrame.isParent=!1}function Vo(){return To.lFrame.contextLView}function Ho(){return Eo}function Uo(e){let t=Eo;return Eo=e,t}function Wo(){let e=To.lFrame,t=e.bindingRootIndex;return t===-1&&(t=e.bindingRootIndex=e.tView.bindingStartIndex),t}function Go(){return To.lFrame.bindingIndex}function Ko(e){return To.lFrame.bindingIndex=e}function qo(){return To.lFrame.bindingIndex++}function Jo(e){let t=To.lFrame,n=t.bindingIndex;return t.bindingIndex+=e,n}function Yo(){return To.lFrame.inI18n}function Xo(e,t){let n=To.lFrame;n.bindingIndex=n.bindingRootIndex=e,Qo(t)}function Zo(){return To.lFrame.currentDirectiveIndex}function Qo(e){To.lFrame.currentDirectiveIndex=e}function $o(e){let t=To.lFrame.currentDirectiveIndex;return t===-1?null:e[t]}function es(){return To.lFrame.currentQueryIndex}function ts(e){To.lFrame.currentQueryIndex=e}function ns(e){let t=e[1];return t.type===2?t.declTNode:t.type===1?e[5]:null}function rs(e,t,n){if(n&4){let r=t,i=e;for(;r=r.parent,r===null&&!(n&1)&&(r=ns(i),!(r===null||(i=i[14],r.type&10))););if(r===null)return!1;t=r,e=i}let r=To.lFrame=as();return r.currentTNode=t,r.lView=e,!0}function is(e){let t=as(),n=e[1];To.lFrame=t,t.currentTNode=n.firstChild,t.lView=e,t.tView=n,t.contextLView=e,t.bindingIndex=n.bindingStartIndex,t.inI18n=!1}function as(){let e=To.lFrame,t=e===null?null:e.child;return t===null?os(e):t}function os(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 ss(){let e=To.lFrame;return To.lFrame=e.parent,e.currentTNode=null,e.lView=null,e}var cs=ss;function ls(){let e=ss();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 us(e){return(To.lFrame.contextLView=ho(e,To.lFrame.contextLView))[8]}function ds(){return To.lFrame.selectedIndex}function fs(e){To.lFrame.selectedIndex=e}function ps(){let e=To.lFrame;return ao(e.tView,e.selectedIndex)}function A(){To.lFrame.currentNamespace=`svg`}function ms(){hs()}function hs(){To.lFrame.currentNamespace=null}function gs(){return To.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 Ma([n||da,ga(e)],t||Aa(),null,i)}var Ss=class e{static THROW_IF_NOT_FOUND=Ui;static NULL=new ha;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(pa)});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 $a(this._lView)}onDestroy(e){let t=this._lView;return yo(t,e),()=>bo(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,Wa()&&(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(ja),n;return r=>{e.runOutsideAngular(()=>{t.destroyed&&!n?setTimeout(()=>{throw r}):(n??=t.get(Js),n.handleError(r))})}}}),Xs={provide:fa,useValue:()=>{E(Js,{optional:!0})},multi:!0};function j(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(),Fo())}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=Uo(!1);try{Yn(this)}finally{Uo(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,vo(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||{}),wc=class{previousValue;currentValue;firstChange;constructor(e,t,n){this.previousValue=e,this.currentValue=t,this.firstChange=n}isFirstChange(){return this.firstChange}};function Tc(e,t,n,r){t===null?e[n]=r:t.applyValueToInputSignal(t,r)}var Ec=null,Dc=(()=>{Ec=kc;let e=()=>kc;return e.ngInherit=!0,e})();function Oc(){return Ec}function kc(e){return e.type.prototype.ngOnChanges&&(e.setInput=jc),Ac}function Ac(){let e=Nc(this),t=e?.current;if(t){let n=e.previous;if(n===ua)e.previous=t;else for(let e in t)n[e]=t[e];e.current=null,this.ngOnChanges(t)}}function jc(e,t,n,r,i){let a=this.declaredInputs[r],o=Nc(e)||Pc(e,{previous:ua,current:null}),s=o.current||={},c=o.previous,l=c[a];s[a]=new wc(l&&l.currentValue,n,c===ua),Tc(e,t,i,n)}var Mc=`__ngSimpleChanges__`;function Nc(e){return Object.hasOwn(e,Mc)&&e[Mc]||null}function Pc(e,t){return e[Mc]=t}var Fc=[],Ic=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,Uc(o,a)):Uc(o,a)}var Gc=-1,Kc=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 qc(e){return!!(e.flags&8)}function Jc(e){return!!(e.flags&16)}function Yc(e,t,n){let r=0;for(;rt){o=a-1;break}}}for(;a>16}function rl(e,t){let n=nl(e),r=t;for(;n>0;)r=r[14],n--;return r}var il=!0;function al(e){let t=il;return il=e,t}var ol=255,sl=5,cl=0,ll={};function ul(e,t,n){let r;typeof n==`string`?r=n.charCodeAt(0)||0:Object.hasOwn(n,wi)&&(r=n[wi]),r??=n[wi]=cl++;let i=r&ol,a=1<>sl)]|=a}function dl(e,t){let n=pl(e,t);if(n!==-1)return n;let r=t[1];r.firstCreatePass&&(e.injectorIndex=t.length,fl(r.data,e),fl(t,null),fl(r.blueprint,null));let i=ml(e,t),a=e.injectorIndex;if(el(i)){let e=tl(i),n=rl(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 fl(e,t){e.push(0,0,0,0,0,0,0,0,t)}function pl(e,t){return e.injectorIndex===-1||e.parent&&e.parent.injectorIndex===e.injectorIndex||t[e.injectorIndex+8]===null?-1:e.injectorIndex}function ml(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=kl(i),r===null)return Gc;if(n++,i=i[14],r.injectorIndex!==-1)return r.injectorIndex|n<<16}return Gc}function hl(e,t,n){ul(e,t,n)}function gl(e,t,n){if(n&8||e!==void 0)return e;Fi(t,`NodeInjector`)}function _l(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 gl(r,t,n)}function vl(e,t,n,r=0,i){if(e!==null){if(t[2]&2048&&!(r&2)){let i=Ol(e,t,n,r,ll);if(i!==ll)return i}let i=yl(e,t,n,r,ll);if(i!==ll)return i}return _l(t,n,r,i)}function yl(e,t,n,r,i){let a=Cl(n);if(typeof a==`function`){if(!rs(t,e,r))return r&1?gl(i,n,r):_l(t,n,r,i);try{let e;if(e=a(r),e==null&&!(r&8))Fi(n);else return e}finally{cs()}}else if(typeof a==`number`){let i=null,o=pl(e,t),s=Gc,c=r&1?t[15][5]:null;for((o===-1||r&4)&&(s=o===-1?ml(e,t):t[o+8],s===Gc||!Tl(r,!1)?o=-1:(i=t[1],o=tl(s),t=rl(s,t)));o!==-1;){let e=t[1];if(wl(a,o,e.data)){let e=bl(o,t,n,i,r,c);if(e!==ll)return e}s=t[o+8],s!==Gc&&Tl(r,t[1].data[o+8]===c)&&wl(a,o,t)?(i=e,o=tl(s),t=rl(s,t)):o=-1}}return i}function bl(e,t,n,r,i,a){let o=t[1],s=o.data[e+8],c=xl(s,o,n,r==null?Ya(s)&&il:r!=o&&!!(s.type&3),i&1&&a===s);return c===null?ll:Sl(t,o,c,s,i)}function xl(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&&Za(e)&&e.type===n)return c}return null}function Sl(e,t,n,r,i){let a=e[n],o=t.data;if(a instanceof Kc){let s=a;if(s.resolving)throw Pi(``);let c=al(s.canSeeViewProviders);s.resolving=!0,o[n].type||o[n];let l=s.injectImpl?Bi(s.injectImpl):null;rs(e,r,0);try{a=e[n]=s.factory(void 0,i,o,e,r),t.firstCreatePass&&n>=r.directiveStart&&Lc(n,o[n],t)}finally{l!==null&&Bi(l),al(c),s.resolving=!1,cs()}}return a}function Cl(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&ol:Dl:t}function wl(e,t,n){let r=1<>sl)]&r)}function Tl(e,t){return!(e&2)&&!(e&1&&t)}var El=class{_tNode;_lView;constructor(e,t){this._tNode=e,this._lView=t}get(e,t,n){return vl(this._tNode,this._lView,e,Ji(n),t)}};function Dl(){return new El(Fo(),D())}function Ol(e,t,n,r,i){let a=e,o=t;for(;a!==null&&o!==null&&o[2]&2048&&!Qa(o);){let e=yl(a,o,n,r|2,ll);if(e!==ll)return e;r&=-5;let t=a.parent;if(!t){let e=o[20];if(e){let t=e.get(n,ll,r);if(t!==ll)return t}t=kl(o),o=o[14]}a=t}return i}function kl(e){let t=e[1],n=t.type;return n===2?t.declTNode:n===1?e[5]:null}function Al(e){return{token:e.token,providedIn:e.autoProvided===!1?null:`root`,factory:e.factory,value:void 0}}function jl(){return Ml(Fo(),D())}function Ml(e,t){return new Nl(io(e,t))}var Nl=(()=>{class e{nativeElement;constructor(e){this.nativeElement=e}static __NG_ELEMENT_ID__=jl}return e})();function Pl(e){return e instanceof Nl?e.nativeElement:e}function Fl(){return this._results[Symbol.iterator]()}var Il=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]=Fl};function Ll(e){return(e.flags&128)==128}var Rl=(function(e){return e[e.OnPush=0]=`OnPush`,e[e.Eager=1]=`Eager`,e[e.Default=1]=`Default`,e})(Rl||{}),zl=new Map,Bl=0;function Vl(){return Bl++}function Hl(e){zl.set(e[19],e)}function Ul(e){zl.delete(e[19])}var Wl=`__ngContext__`;function Gl(e,t){Ka(t)?(e[Wl]=t[19],Hl(t)):e[Wl]=t}function Kl(e){return Jl(e[12])}function ql(e){return Jl(e[4])}function Jl(e){for(;e!==null&&!qa(e);)e=e[4];return e}var Yl=void 0;function Xl(e){Yl=e}function Zl(){if(Yl!==void 0)return Yl;if(typeof document<`u`)return document;throw new T(210,!1)}var Ql=!1,$l=new vi(``,{factory:()=>Ql}),eu=new WeakMap;function tu(e,t){if(typeof e!=`object`||!e)return;let n=eu.get(e);n||(n=new WeakSet,eu.set(e,n)),n.add(t)}function nu(e){return(e.flags&32)==32}var ru=()=>null;function iu(e,t,n=!1){return ru(e,t,n)}function au(e,t){let n=e.contentQueries;if(n!==null){let r=w(null);try{for(let r=0;r|^->||--!>|)/g,_u=`​$1​`;function vu(e){return e.replace(hu,e=>e.replace(gu,_u))}function yu(e,t){return e.createText(t)}function bu(e,t,n){e.setValue(t,n)}function xu(e,t){return e.createComment(vu(t))}function Su(e,t,n){return e.createElement(t,n)}function Cu(e,t,n,r,i){e.insertBefore(t,n,r,i)}function wu(e,t,n){e.appendChild(t,n)}function Tu(e,t,n,r,i){r===null?wu(e,t,n):Cu(e,t,n,r,i)}function Eu(e,t,n,r){e.removeChild(null,t,n,r)}function Du(e,t,n){e.setAttribute(t,`style`,n)}function Ou(e,t,n){n===``?e.removeAttribute(t,`class`):e.setAttribute(t,`class`,n)}function ku(e,t,n){let{mergedAttrs:r,classes:i,styles:a}=n;r!==null&&Yc(e,t,r),i!==null&&Ou(e,t,i),a!==null&&Du(e,t,a)}function Au(e){let t=ju();return t?t.sanitize(eo.URL,e)||``:du(e,`URL`)?uu(e):mu(Ai(e))}function ju(){let e=D();return e&&e[10].sanitizer}function Mu(e){return e.ownerDocument.defaultView}function Nu(e){return e.ownerDocument}function Pu(e,t,n){let r=e.length;for(;;){let i=e.indexOf(t,n);if(i===-1)return i;if(i===0||e.charCodeAt(i-1)<=32){let n=t.length;if(i+n===r||e.charCodeAt(i+n)<=32)return i}n=i+1}}var Fu=`ng-template`;function Iu(e,t,n,r){let i=0;if(r){for(;i-1){let e;for(;++ia?``:i[u+1].toLowerCase(),r&2&&l!==e){if(Bu(r))return!1;o=!0}}}}}return Bu(r)||o}function Bu(e){return!(e&1)}function Vu(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!==``&&!Bu(o)&&(t+=qu(a,i),i=``),r=o,a||=!Bu(r);n++}return i!==``&&(t+=qu(a,i)),t}function Yu(e){return e.map(Ju).join(`,`)}function Xu(e){let t=[],n=[],r=1,i=2;for(;r!1});function nd(e){if(!e)return 0;let t=e.toLowerCase().indexOf(`ms`)>-1?1:1e3;return parseFloat(e)*t}function rd(e,t){return e.getPropertyValue(t).split(`,`).map(e=>e.trim())}function id(e){let t=rd(e,`transition-property`),n=rd(e,`transition-duration`),r=rd(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 ad(e){let t=rd(e,`animation-name`),n=rd(e,`animation-delay`),r=rd(e,`animation-duration`),i=rd(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 od(e,t){return e!==void 0&&e.duration>t.duration}function sd(e){return(e.animationName!=null||e.propertyName!=null)&&e.duration>0}function cd(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 ld(e,t){let n=getComputedStyle(e),r=ad(n),i=id(n),a=r.duration>i.duration?r:i;od(t.get(e),a)||sd(a)&&t.set(e,a)}function ud(e,t,n){if(!n)return;let r=e.getAnimations();return r.length===0?ld(e,t):dd(e,t,r)}function dd(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=cd(e)??0,n,i;e.animationName?i=e.animationName:n=e.transitionProperty,t>=r.duration&&(r={animationName:i,propertyName:n,duration:t})}od(t.get(e),r)||sd(r)&&t.set(e,r)}var fd=new Set,pd=!1,md=1,hd=typeof document<`u`&&typeof document?.documentElement?.getAnimations==`function`;function gd(e){return e[9].get(td,pd)}function _d(e,t,n){let r=yd.get(e);if(r){for(let e of t)r.classList.push(e);for(let e of n)r.cleanupFns.push(e)}else yd.set(e,{classList:t,cleanupFns:n})}function vd(e){let t=yd.get(e);if(t){for(let e of t.cleanupFns)e();yd.delete(e)}bd.delete(e)}var yd=new WeakMap,bd=new WeakMap,xd=new WeakMap;function Sd(e){return e?e[14]??e:null}var Cd=new WeakSet;function wd(e,t,n){let r=xd.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 Td(e,t,n){let r=Sd(n),i=xd.get(e);i?i.some(e=>e.el===t)||i.push({el:t,declarationView:r}):xd.set(e,[{el:t,declarationView:r}])}function Ed(e){let t=e[26]??={};return t.enter??=new Map}function Dd(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 Od(e){return e.composedPath?e.composedPath()[0]:e.target}function kd(e,t){let n=bd.get(t);if(n===void 0)return!0;if(t!==Od(e))return!1;let r=e.animation;if(r){let e=cd(r);if(e!==void 0&&e+md{class e{impl=null;execute(){this.impl?.execute()}static ɵprov=di({token:e,providedIn:`root`,factory:()=>new e})}return e})(),Id=[0,1,2,3],Ld=(()=>{class e{ngZone=E(Is);scheduler=E(ac);errorHandler=E(Js,{optional:!0});sequences=new Set;deferredRegistrations=new Set;executing=!1;constructor(){E(Md,{optional:!0})}execute(){let e=this.sequences.size>0;e&&Ic(Cc.AfterRenderHooksStart),this.executing=!0;for(let e of Id)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&&Ic(Cc.AfterRenderHooksEnd)}register(e){let{view:t}=e;t===void 0?this.executing?this.deferredRegistrations.add(e):this.addSequence(e):((t[25]??=[]).push(e),vo(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(jd.AFTER_NEXT_RENDER,e):e()}static ɵprov=di({token:e,providedIn:`root`,factory:()=>new e})}return e})(),Rd=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 zd(e,t){let n=t?.injector??E(Ss);return Pd(`NgAfterNextRender`),Vd(e,n,t,!0)}function Bd(e){return e instanceof Function?[void 0,void 0,e,void 0]:[e.earlyRead,e.write,e.mixedReadWrite,e.read]}function Vd(e,t,n,r){let i=t.get(Fd);i.impl??=t.get(Ld);let a=t.get(Md,null,{optional:!0}),o=n?.manualCleanup===!0?null:t.get(ws),s=t.get(rc,null,{optional:!0}),c=new Rd(i.impl,Bd(e),s?.view,r,o,a?.snapshot(null));return i.impl.register(c),c}var Hd=new vi(``,{factory:()=>{let e=E(ja),t=new Set;return e.onDestroy(()=>t.clear()),{queue:t,isScheduled:!1,scheduler:null,injector:e}}});function Ud(e,t,n){let r=e.get(Hd);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 Wd(e,t){let n=e.get(Hd);if(Array.isArray(t))for(let e of t)n.queue.delete(e);else n.queue.delete(t)}function Gd(e,t){let n=e.get(Hd);if(t.detachedLeaveAnimationFns){for(let e of t.detachedLeaveAnimationFns)n.queue.delete(e);t.detachedLeaveAnimationFns=void 0}}function Kd(e){let t=e.get(Hd);t.isScheduled||=(zd(()=>{t.isScheduled=!1;for(let e of t.queue)e();t.queue.clear()},{injector:t.injector}),!0)}function qd(e){let t=e.get(Hd);t.scheduler=Kd,t.scheduler(e)}function Jd(e,t){for(let[n,r]of t)Ud(e,r.animateFns)}function Yd(e,t,n,r){let i=e?.[26]?.enter;t!==null&&i&&i.has(n.index)&&Jd(r,i)}function Xd(e,t,n,r){try{n.get(pa)}catch{return r(!1)}let i=e?.[26];i?.enter?.has(t.index)&&Wd(n,i.enter.get(t.index).animateFns);let a=Zd(e,t,i);if(a.size===0){let n=!1;if(e){let r=[];$d(e,t,r),n=r.length>0}if(!n)return r(!1)}e&&fd.add(e[19]),Ud(n,()=>Qd(e,t,i||void 0,a,r),i||void 0)}function Zd(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 Qd(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&&$d(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),tf(e,t.running,i)}else Promise.allSettled(a).then(()=>{e&&fd.delete(e[19]),i(!0)})}else e&&fd.delete(e[19]),i(!1)}function $d(e,t,n){if(t.type&12){let r=e[t.index];if(qa(r))for(let e=10;e{e[26]?.running===t&&(e[26].running=void 0,fd.delete(e[19])),n(!0)})}function nf(e,t,n,r,i,a,o,s){if(i!=null){let c,l=!1;qa(i)?c=i:Ka(i)&&(l=!0,i=i[0]);let u=no(i);e===0&&r!==null?(Yd(s,r,a,n),o==null?wu(t,r,u):Cu(t,r,u,o||null,!0)):e===1&&r!==null?(Yd(s,r,a,n),Cu(t,r,u,o||null,!0),wd(a,u,s)):e===2?(s?.[26]?.leave?.has(a.index)&&Td(a,u,s),Cd.delete(u),Xd(s,a,n,e=>{if(Cd.has(u)){Cd.delete(u);return}Eu(t,u,l,e)})):e===3&&(Cd.delete(u),Xd(s,a,n,()=>{t.destroyNode(u)})),c!=null&&Df(t,e,n,c,a,r,o)}}function rf(e,t){of(e,t),t[0]=null,t[5]=null}function af(e,t,n,r,i,a){r[0]=i,r[5]=t,Cf(e,r,n,1,i,a)}function of(e,t){t[10].changeDetectionScheduler?.notify(9),Cf(e,t,t[11],2,null,null)}function sf(e){let t=e[12];if(!t)return uf(e[1],e);for(;t;){let n=null;if(Ka(t))n=t[12];else{let e=t[10];e&&(n=e)}if(!n){for(;t&&!t[4]&&t!==e;)Ka(t)&&uf(t[1],t),t=t[3];t===null&&(t=e),Ka(t)&&uf(t[1],t),n=t&&t[4]}t=n}}function cf(e,t){let n=e[9],r=n.indexOf(t);n.splice(r,1)}function lf(e,t){if($a(t))return;let n=t[11];n.destroyNode&&Cf(e,t,n,3,null,null),sf(t)}function uf(e,t){if($a(t))return;let n=w(null);try{t[2]&=-129,t[2]|=256,t[24]&&En(t[24]),ff(e,t),df(e,t),t[1].type===1&&t[11].destroy();let n=t[16];if(n!==null&&qa(t[3])){n!==t[3]&&cf(n,t);let r=t[18];r!==null&&r.detachView(e)}Ul(t)}finally{w(n)}}function df(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&&Lf(e,t,27,!1),Ic(o?Cc.TemplateUpdateStart:Cc.TemplateCreateStart,i,n),n(r,i)}finally{fs(a),Ic(o?Cc.TemplateUpdateEnd:Cc.TemplateCreateEnd,i,n)}}function Vf(e,t,n){Jf(e,t,n),(n.flags&64)==64&&Yf(e,t,n)}function Hf(e,t,n=io){let r=t.localNames;if(r!==null){let i=t.index+1;for(let a=0;a{vo(e.lView)},consumerOnSignalRead(){this.lView[24]=this}};function yp(e){let t=e[24]??Object.create(bp);return t.lView=e,t}var bp={...pn,consumerIsAlwaysLive:!0,kind:`template`,consumerMarkedDirty:e=>{let t=xo(e.lView);for(;t&&!xp(t[1]);)t=xo(t);t&&mo(t)},consumerOnSignalRead(){this.lView[24]=this}};function xp(e){return e.type!==2}function Sp(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 Cp=100;function wp(e,t=0){let n=e[10].rendererFactory;n.begin?.();try{Tp(e,t)}finally{n.end?.()}}function Tp(e,t){let n=Ho();try{Uo(!0),jp(e,t);let n=0;for(;go(e);){if(n===Cp)throw new T(103,!1);n++,jp(e,1)}}finally{Uo(n)}}function Ep(e,t,n,r){if($a(t))return;let i=t[2];is(t);let a=!0,o=null,s=null;xp(e)?(s=hp(t),o=xn(s)):fn()===null?(a=!1,s=yp(t),o=xn(s)):t[24]&&=(En(t[24]),null);try{po(t),Ko(e.bindingStartIndex),n!==null&&Bf(e,t,n,2,r);let a=(i&3)==3;if(a){let n=e.preOrderCheckHooks;n!==null&&zc(t,n,null)}else{let n=e.preOrderHooks;n!==null&&Bc(t,n,0,null),Vc(t,0)}if(Op(t),Sp(t),Dp(t,0),e.contentQueries!==null&&au(e,t),a){let n=e.contentCheckHooks;n!==null&&zc(t,n)}else{let n=e.contentHooks;n!==null&&Bc(t,n,1),Vc(t,1)}Np(e,t);let o=e.components;o!==null&&Mp(t,o,0);let s=e.viewQuery;if(s!==null&&ou(2,s,r),a){let n=e.viewCheckHooks;n!==null&&zc(t,n)}else{let n=e.viewHooks;n!==null&&Bc(t,n,2),Vc(t,2)}if(e.firstUpdatePass===!0&&(e.firstUpdatePass=!1),t[22]){for(let e of t[22])e();t[22]=null}pp(t),t[2]&=-73}catch(e){throw vo(t),e}finally{s!==null&&(Cn(s,o),a&&_p(s)),ls()}}function Dp(e,t){for(let n=Kl(e);n!==null;n=ql(n))for(let e=10;e0&&(e[n-1][4]=r[4]);let a=ra(e,10+t);rf(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 Bp(e,t,n,r){let i=10+r,a=n.length;r>0&&(n[i-1][4]=t),r-1&&(zp(e,n),ra(t,n))}this._attachedToViewContainer=!1}lf(this._lView[1],this._lView)}onDestroy(e){yo(this._lView,e)}markForCheck(){Pp(this._cdRefInjectingView||this._lView,4)}detach(){this._lView[2]&=-129}reattach(){_o(this._lView),this._lView[2]|=128}detectChanges(){this._lView[2]|=1024,wp(this._lView)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new T(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;let e=Qa(this._lView),t=this._lView[16];t!==null&&!e&&cf(t,this._lView),of(this._lView[1],this._lView)}attachToAppRef(e){if(this._attachedToViewContainer)throw new T(902,!1);this._appRef=e;let t=Qa(this._lView),n=this._lView[16];n!==null&&!t&&Vp(n,this._lView),_o(this._lView)}},Up=(()=>{class e{_declarationLView;_declarationTContainer;elementRef;static __NG_ELEMENT_ID__=Wp;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 Hp(lp(this._declarationLView,this._declarationTContainer,e,{embeddedViewInjector:t,dehydratedView:n}))}}return e})();function Wp(){return Gp(Fo(),D())}function Gp(e,t){return e.type&4?new Up(t,e,Ml(e,t)):null}function Kp(e,t,n,r,i){let a=e.data[t];if(a===null)a=qp(e,t,n,r,i),Yo()&&(a.flags|=32);else if(a.type&64){a.type=n,a.value=r,a.attrs=i;let e=Lo();a.injectorIndex=e===null?-1:e.injectorIndex}return Ro(a,!0),a}function qp(e,t,n,r,i){let a=Io(),o=zo(),s=o?a:a&&a.parent,c=e.data[t]=Yp(e,s,n,t,r,i);return Jp(e,c,a,o),c}function Jp(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 Yp(e,t,n,r,i,a){let o=t?t.injectorIndex:-1,s=0;return jo()&&(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 Xp(e){let t=e[6]??[],n=e[3][11],r=[];for(let e of t)e.data.di===void 0?Zp(e,n):r.push(e);e[6]=r}function Zp(e,t){let n=0,r=e.firstChild;if(r){let i=e.data.r;for(;nnull,$p=()=>null;function em(e,t){return Qp(e,t)}function tm(e,t,n){return $p(e,t,n)}var nm=class{},rm=class{},im=(()=>{class e{static ɵprov=di({token:e,providedIn:`root`,factory:()=>null})}return e})();function am(e){return e.debugInfo?.className||e.type.name||null}var om={},sm=class{injector;parentInjector;constructor(e,t){this.injector=e,this.parentInjector=t}get(e,t,n){let r=this.injector.get(e,om,n);return r!==om||t===om?r:this.parentInjector.get(e,t,n)}};function cm(e,t,n){return e[t]=n}function lm(e,t){return e[t]}function um(e,t,n){if(n===Zu)return!1;let r=e[t];return!Object.is(r,n)&&(e[t]=n,!0)}function dm(e,t,n,r){let i=um(e,t,n);return um(e,t+1,r)||i}function fm(e,t,n,r,i){let a=dm(e,t,n,r);return um(e,t+2,i)||a}function pm(e,t,n,r,i,a){let o=dm(e,t,n,r);return dm(e,t+2,i,a)||o}function mm(e,t,n){return function r(i){let a=r.__ngNativeEl__;a!==void 0&&tu(i,a),Pp(Ya(e)?co(e.index,t):t,5);let o=t[8],s=hm(t,o,n,i),c=r.__ngNextListenerFn__;for(;c;)s=hm(t,o,c,i)&&s,c=c.__ngNextListenerFn__;return s}}function hm(e,t,n,r){let i=w(null);try{return Ic(Cc.OutputStart,t,n),n(r)!==!1}catch(t){return rp(e,t),!1}finally{Ic(Cc.OutputEnd,t,n),w(i)}}function gm(e,t,n,r,i,a,o,s){let c=Xa(e),l=!1,u=null;if(!r&&c&&(u=vm(t,n,a,e.index)),u!==null){let e=u.__ngLastListenerFn__||u;e.__ngNextListenerFn__=o,u.__ngLastListenerFn__=o,l=!0}else{let o=io(e,n),c=r?r(o):o;r||(s.__ngNativeEl__=o);let l=i.listen(c,a,s);_m(a)||ym(r?t=>r(no(t[e.index])):e.index,t,n,a,s,l,!1)}return l}function _m(e){return e.startsWith(`animation`)||e.startsWith(`transition`)}function vm(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 ym(e,t,n,r,i,a,o){let s=t.firstCreatePass?Co(t):null,c=So(n),l=c.length;c.push(i,a),s&&s.push(r,e,l,(l+1)*(o?-1:1))}function bm(e,t,n,r,i,a){let o=t[n],s=t[1],c=o[s.data[n].outputs[r]].subscribe(a);ym(e.index,s,t,i,a,c,!0)}var xm=Symbol(`BINDING`),Sm=new vi(``);function Cm(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 Lm(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&Rf.SignalBased)!==0};return i&&(a.transform=i),a})}function Gm(e){return Object.keys(e).map(t=>({propName:e[t],templateName:t}))}function Km(e,t,n){let r=t instanceof ja?t:t?.injector;return r&&e.getStandaloneInjector!==null&&(r=e.getStandaloneInjector(r)||r),r?new sm(n,r):n}function qm(e){let t=e.get(rm,null);if(t===null)throw new T(407,!1);return{rendererFactory:t,sanitizer:e.get(im,null),changeDetectionScheduler:e.get(ac,null),ngReflect:!1,tracingService:e.get(Md,null,{optional:!0})}}function Jm(e,t,n){let r=Xm(e);return Su(t,r,r===`svg`?`svg`:r===`math`?to:n)}function Ym(e){if((e&&`localName`in e&&typeof e.localName==`string`?e.localName:e?.tagName)?.toLowerCase()===`script`)throw new T(905,!1)}function Xm(e){return(e.selectors[0][0]||`div`).toLowerCase()}var Zm=class{componentDef;ngModule;selector;componentType;ngContentSelectors;isBoundToModule;cachedInputs=null;cachedOutputs=null;get inputs(){return this.cachedInputs??=Wm(this.componentDef.inputs),this.cachedInputs}get outputs(){return this.cachedOutputs??=Gm(this.componentDef.outputs),this.cachedOutputs}constructor(e,t){this.componentDef=e,this.ngModule=t,this.componentType=e.type,this.selector=Yu(e.selectors),this.ngContentSelectors=e.ngContentSelectors??[],this.isBoundToModule=!!t}create(e,t,n,r,i,a,o){Ic(Cc.DynamicComponentStart);let s=w(null);try{let s=this.componentDef,c=Km(s,r||this.ngModule,e),l=qm(c),u=l.tracingService;return u&&u.componentCreate?u.componentCreate(am(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=Qm(r,s,a,i),l=e.rendererFactory.createRenderer(null,s),u=r?Uf(l,r,s.encapsulation,t):Jm(s,l,o??null);Ym(u);let d=t.get(Sm,null),f=$m(u,()=>t.get(Cs,null)??Zl());d&&d.addHost(f);let p=a?.some(th)||i?.some(e=>typeof e!=`function`&&e.bindings.some(th)),m=Mf(null,c,null,512|Pf(s),null,null,e,l,t,null,iu(u,t,!0));d&&Hm&&f instanceof ShadowRoot&&yo(m,()=>{d.removeHost(f)}),m[27]=u,is(m);let h=null;try{let e=zm(27,m,2,`#host`,()=>c.directiveRegistry,!0,0);ku(l,u,e),Gl(u,m),Vf(c,m,e),su(c,e,m),Bm(c,e),n!==void 0&&rh(e,this.ngContentSelectors,n),h=co(e.index,m),m[8]=h[8],sp(c,m,null)}catch(e){throw h!==null&&Ul(h),Ul(m),e}finally{Ic(Cc.DynamicComponentEnd),ls()}return new nh(this.componentType,m,!!p)}};function Qm(e,t,n,r){let i=e?[`ng-version`,`22.1.7`]:Xu(t.selectors[0]),a=null,o=null,s=0;if(n)for(let e of n)s+=e[xm].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 th(e){let t=e[xm].kind;return t===`input`||t===`twoWay`}var nh=class extends nm{_rootLView;_hasInputBindings;instance;hostView;changeDetectorRef;componentType;location;previousInputValues=null;_tNode;constructor(e,t,n){super(),this._rootLView=t,this._hasInputBindings=n,this._tNode=ao(t[1],27),this.location=Ml(this._tNode,t),this.instance=co(this._tNode.index,t)[8],this.hostView=this.changeDetectorRef=new Hp(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;ip(n,r[1],r,e,t),this.previousInputValues.set(e,t),Pp(co(n.index,r),1)}get injector(){return new El(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(e){this.hostView.onDestroy(e)}};function rh(e,t,n){let r=e.projection=[];for(let e=0;e{class e{static __NG_ELEMENT_ID__=ah}return e})();function ah(){return lh(Fo(),D())}var oh=class e extends ih{_lContainer;_hostTNode;_hostLView;constructor(e,t,n){super(),this._lContainer=e,this._hostTNode=t,this._hostLView=n}get element(){return Ml(this._hostTNode,this._hostLView)}get injector(){return new El(this._hostTNode,this._hostLView)}get parentInjector(){let e=ml(this._hostTNode,this._hostLView);if(el(e)){let t=rl(e,this._hostLView),n=tl(e),r=t[1].data[n+8];return new El(r,t)}return new El(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(e){let t=sh(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=em(this._lContainer,e.ssrId),o=e.createEmbeddedViewImpl(t||{},i,a);return this.insertImpl(o,r,up(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 Zm(Ei(e)),u=n||this.parentInjector;if(!i&&l.ngModule==null){let e=this.parentInjector.get(ja,null);e&&(i=e)}let d=Ei(l.componentType??{}),f=em(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,up(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(uo(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 Lp(o,i,a,r),t.attachToViewContainerRef(),na(ch(o),a,t),t}move(e,t){return this.insert(e,t)}indexOf(e){let t=sh(this._lContainer);return t===null?-1:t.indexOf(e)}remove(e){let t=this._adjustIndex(e,-1),n=zp(this._lContainer,t);n&&(ra(ch(this._lContainer),t),lf(n[1],n))}detach(e){let t=this._adjustIndex(e,-1),n=zp(this._lContainer,t);return n&&ra(ch(this._lContainer),t)!=null?new Hp(n):null}_adjustIndex(e,t=0){return e??this.length+t}};function sh(e){return e[8]}function ch(e){return e[8]||=[]}function lh(e,t){let n,r=t[e.index];return qa(r)?n=r:(n=Fp(r,t,null,e),t[e.index]=n,If(t,n)),dh(n,t,e,r),new oh(n,e,t)}function uh(e,t){let n=e[11],r=n.createComment(``),i=io(t,e);return Cu(n,n.parentNode(i),r,n.nextSibling(i),!1),r}var dh=mh,fh=()=>!1;function ph(e,t,n){return fh(e,t,n)}function mh(e,t,n,r){if(e[7])return;let i;i=n.type&8?no(r):uh(t,n),e[7]=i}var hh=class e{queryList;matches=null;constructor(e){this.queryList=e}clone(){return new e(this.queryList)}setDirty(){this.queryList.setDirty()}},gh=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 Ah(e,t,n){e.queries===null&&(e.queries=new vh),e.queries.track(new yh(t,n))}function jh(e,t){return e.queries.getByIndex(t)}function Mh(e,t){let n=e[1],r=jh(n,t);return r.crossesNgTemplate?Th(n,e,t,[]):wh(n,e,r,t)}function Nh(e,t,n){let r,i=Mn(()=>{r._dirtyCounter();let n=Lh(r,e);if(t&&n===void 0)throw new T(-951,!1);return n});return r=i[dn],r._dirtyCounter=j(0),r._flatValue=void 0,i}function Ph(e){return Nh(!0,!1,e)}function Fh(e){return Nh(!0,!0,e)}function Ih(e,t){let n=e[dn];n._lView=D(),n._queryIndex=t,n._queryList=Eh(n._lView,t),n._queryList.onDirty(()=>n._dirtyCounter.update(e=>e+1))}function Lh(e,t){let n=e._lView,r=e._queryIndex;if(n===void 0||r===void 0||n[2]&4)return t?void 0:da;let i=Eh(n,r),a=Mh(n,r);return i.reset(a,Pl),t?i.first:i._changesDetected||e._flatValue===void 0?e._flatValue=i.toArray():e._flatValue}function Rh(e){return!!e&&typeof e.then==`function`}function zh(e){return!!e&&typeof e.subscribe==`function`}var Bh=class{},Vh=class extends Bh{injector;instance=null;constructor(e){super();let t=new Ma([...e.providers,{provide:Bh,useValue:this}],e.parent||Aa(),e.debugName,new Set([`environment`]));this.injector=t,e.runEnvironmentInitializers&&t.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(e){this.injector.onDestroy(e)}};function Hh(e,t,n=null){return new Vh({providers:e,parent:t,debugName:n,runEnvironmentInitializers:!0}).injector}var Uh=(()=>{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=_a(!1,e.type),n=t.length>0?Hh([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(ja))})}return e})();function Wh(e){return Sc(()=>{let t=Xh(e),n={...t,decls:e.decls,vars:e.vars,template:e.template,consts:e.consts||null,ngContentSelectors:e.ngContentSelectors,onPush:e.changeDetection!==Rl.Eager,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&e.dependencies||null,getStandaloneInjector:t.standalone?e=>e.get(Uh).getOrCreateStandaloneInjector(n):null,getExternalStyles:null,signals:e.signals??!1,data:e.data||{},encapsulation:e.encapsulation||cu.Emulated,styles:e.styles||da,_:null,schemas:e.schemas||null,tView:null,id:``};t.standalone&&Pd(`NgStandalone`),Zh(n);let r=e.dependencies;return n.directiveDefs=Qh(r,Gh),n.pipeDefs=Qh(r,Oi),n.id=$h(n),n})}function Gh(e){return Ei(e)||Di(e)}function Kh(e,t){if(e==null)return ua;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=Rf.None,c=null),n[a]=[r,s,c],t[a]=o}return n}function qh(e){if(e==null)return ua;let t={};for(let n in e)Object.hasOwn(e,n)&&(t[e[n]]=n);return t}function Jh(e){return Sc(()=>{let t=Xh(e);return Zh(t),t})}function Yh(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 Xh(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||ua,exportAs:e.exportAs||null,standalone:e.standalone??!0,signals:e.signals===!0,selectors:e.selectors||da,viewQuery:e.viewQuery||null,features:e.features||null,setInput:null,resolveHostDirectives:null,hostDirectives:null,controlDef:null,signalFormsInputPresence:null,inputs:Kh(e.inputs,t),outputs:qh(e.outputs),debugInfo:null}}function Zh(e){e.features?.forEach(t=>t(e))}function Qh(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 $h(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 eg=new vi(``),tg=(()=>{class e{resolve;reject;initialized=!1;done=!1;donePromise=new Promise((e,t)=>{this.resolve=e,this.reject=t});appInits=E(eg,{optional:!0})??[];injector=E(Ss);constructor(){}runInitializers(){if(this.initialized)return;let e=[];for(let t of this.appInits){let n=Ua(this.injector,t);if(Rh(n))e.push(n);else if(zh(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=Al({token:e,factory:e.ɵfac})}return e})();function ng(e,t,n,r,i,a,o,s){if(n.firstCreatePass){e.mergedAttrs=Qc(e.mergedAttrs,e.attrs);let t=e.tView=kf(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),Ro(e,!1);let c=og(n,t,e,r);vs()&&vf(n,t,c,e),Gl(c,t);let l=Fp(c,t,c,e);t[r+27]=l,If(t,l),ph(l,e,t)}function rg(e,t,n,r,i,a,o,s,c,l,u){let d=n+27,f;return t.firstCreatePass?(f=Kp(t,d,4,o||null,s||null),Ao()&&Tm(t,e,f,fo(t.consts,l),Zf),Rc(t,f)):f=t.data[d],ng(f,e,t,n,r,i,a,c),Xa(f)&&Vf(t,e,f),l!=null&&Hf(e,f,u),f}function ig(e,t,n,r,i,a,o,s,c,l,u){let d=n+27,f;if(t.firstCreatePass){if(f=Kp(t,d,4,o||null,s||null),l!=null){let e=fo(t.consts,l);f.localNames=[];for(let t=0;t{throw new T(600,``)})}var dg=10,fg=(()=>{class e{_runningTick=!1;_destroyed=!1;_destroyListeners=[];_views=[];internalErrorHandler=E(Ys);afterRenderManager=E(Fd);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(Md,{optional:!0})}whenStable(){let e;return new Promise(t=>{e=this.isStable.subscribe({next:e=>{e&&t()}})}).finally(()=>{e.unsubscribe()})}_injector=E(ja);_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(Ic(Cc.BootstrapComponentStart),!this._injector.get(tg).done)throw new T(405,``);let r=Ei(e),i=this._injector.get(Bh),a=new Zm(r,i);this.componentTypes.push(e);let{hostElement:o,directives:s,bindings:c}=pg(t),l=o||a.selector,u=a.create(n,[],l,i.injector,s,c),d=u.location.nativeElement,f=u.injector.get(cg,null);return f?.registerApplication(d),u.onDestroy(()=>{this.detachView(u.hostView),mg(this.components,u),f?.unregisterApplication(d)}),this._loadComponent(u),Ic(Cc.BootstrapComponentEnd,u),u})}tick(){this.zonelessEnabled||(this.dirtyFlags|=1),this._tick()}_tick(){Ic(Cc.ChangeDetectionStart),this.tracingSnapshot===null?this.tickImpl():this.tracingSnapshot.run(jd.CHANGE_DETECTION,this.tickImpl)}tickImpl=()=>{if(this._runningTick)throw Ic(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(),Ic(Cc.ChangeDetectionEnd)}};synchronize(){this._rendererFactory===null&&!this._injector.destroyed&&(this._rendererFactory=this._injector.get(rm,null,{optional:!0}));let e=0;for(;this.dirtyFlags!==0&&e++go(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;mg(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(lg,[]).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),()=>mg(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=Al({token:e,factory:e.ɵfac})}return e})();function pg(e){return e===void 0||typeof e==`string`||e instanceof Element?{hostElement:e}:e}function mg(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}function N(e,t,n,r){let i=D();return um(i,qo(),t)&&(Po(),Qf(ps(),i,e,t,n,r)),N}function hg(e){if(Pd(`NgAnimateEnter`),!hd)return hg;let t=D();if(gd(t))return hg;let n=Fo(),r=t[9].get(Is);return Ad(Ed(t),n,()=>gg(t,n,e,r)),qd(t[9]),Jd(t[9],Ed(t)),hg}function gg(e,t,n,r){let i=io(t,e),a=e[11],o=Dd(n),s=[],c=!1,l=e=>{if(Od(e)!==i)return;let t=e instanceof AnimationEvent?`animationend`:`transitionend`;r.runOutsideAngular(()=>{a.listen(i,t,u)})},u=e=>{Od(e)===i&&(kd(e,i)&&(c=!0),_g(e,i,a))};if(o&&o.length>0){r.runOutsideAngular(()=>{s.push(a.listen(i,`animationstart`,l)),s.push(a.listen(i,`transitionstart`,l))}),_d(i,o,s);for(let e of o)a.addClass(i,e);r.runOutsideAngular(()=>{requestAnimationFrame(()=>{if(!c&&(ud(i,bd,hd),!bd.has(i))){for(let e of o)a.removeClass(i,e);vd(i)}})})}}function _g(e,t,n){let r=yd.get(t);if(Od(e)===t&&r&&kd(e,t)){e.stopPropagation();for(let e of r.classList)n.removeClass(t,e);vd(t)}}var vg=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 yg(e,t,n,r,i){return e===n&&Object.is(t,r)?1:Object.is(i(e,t),i(n,r))?-1:0}function bg(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=yg(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=yg(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 wg,a??=Cg(e,o,s,n),xg(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;)Sg(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=yg(o,t,o,r,n);if(u!==0)u<0&&e.updateValue(o,r),o++,l=c.next();else{i??=new wg,a??=Cg(e,o,s,n);let u=n(o,r);if(xg(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;)Sg(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 xg(e,t,n,r){return t!==void 0&&t.has(r)?(e.attach(n,t.get(r)),t.delete(r),!0):!1}function Sg(e,t,n,r,i){if(xg(e,t,r,n(r,i)))e.updateValue(r,i);else{let t=e.create(r,i);e.attach(r,t)}}function Cg(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 wg=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 P(e,t,n,r,i,a,o,s){Pd(`NgControlFlow`);let c=D(),l=Po();return ig(c,l,e,t,n,r,i,fo(l.consts,a),256,o,s),Tg}function Tg(e,t,n,r,i,a,o,s){Pd(`NgControlFlow`);let c=D(),l=Po();return ig(c,l,e,t,n,r,i,fo(l.consts,a),512,o,s),Tg}function F(e,t){Pd(`NgControlFlow`);let n=D(),r=qo(),i=n[r]===Zu?-1:n[r],a=i===-1?void 0:jg(n,27+i);if(um(n,r,e)){let r=w(null);try{if(a!==void 0&&Rp(a,0),e!==-1){let r=27+e,i=jg(n,r),a=Ig(n[1],r),o=tm(i,a,n);Lp(i,lp(n,a,t,{dehydratedView:o}),0,up(a,o))}}finally{w(r)}}else if(a!==void 0){let e=Ip(a,0);e!==void 0&&(e[8]=t)}}var Eg=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 Dg(e){return e}function Og(e,t){return t}var kg=class{hasEmptyBlock;trackByFn;liveCollection;constructor(e,t,n){this.hasEmptyBlock=e,this.trackByFn=t,this.liveCollection=n}};function I(e,t,n,r,i,a,o,s,c,l,u,d,f){Pd(`NgControlFlow`);let p=D(),m=Po(),h=c!==void 0,g=D(),_=new kg(h,s?o.bind(g[15][8]):o);g[27+e]=_,ig(p,m,e+1,t,n,r,i,fo(m.consts,a),256),h&&ig(p,m,e+2,c,l,u,d,fo(m.consts,f),512)}var Ag=class extends vg{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,Lp(this.lContainer,t,e,up(this.templateTNode,n)),Mg(this.lContainer,e)}detach(e){return this.needsIndexUpdate||=e!==this.length-1,Ng(this.lContainer,e),Pg(this.lContainer,e)}create(e,t){let n=em(this.lContainer,this.templateTNode.tView.ssrId);return lp(this.hostLView,this.templateTNode,new Eg(this.lContainer,t,e),{dehydratedView:n})}destroy(e){lf(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];Gd(e,r),fd.delete(n[19]),r.detachedLeaveAnimationFns=void 0}}function Ng(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 Pg(e,t){return zp(e,t)}function Fg(e,t){return Ip(e,t)}function Ig(e,t){return ao(e,t)}function R(e,t,n){let r=D();return um(r,qo(),t)&&(Po(),Gf(ps(),r,e,t,r[11],n)),R}function Lg(e,t,n,r,i){ip(t,e,n,i?`class`:`style`,r)}function z(e,t,n,r){let i=D(),a=i[1],o=e+27,s=a.firstCreatePass?zm(o,i,2,t,Zf,Ao(),n,r):a.data[o];if(Ya(s)){let n=i[10].tracingService;if(n&&n.componentCreate){let o=a.data[s.directiveStart+s.componentOffset];return n.componentCreate(am(o),()=>(Rg(e,t,i,s,r),z))}}return Rg(e,t,i,s,r),z}function Rg(e,t,n,r,i){if(tp(r,n,e,t,Bg),Xa(r)){let e=n[1];Vf(e,n,r),su(e,r,n)}i!=null&&Hf(n,r)}function B(){let e=Po(),t=np(Fo());return e.firstCreatePass&&Bm(e,t),Mo(t)&&No(),ko(),t.classesWithoutHost!=null&&qc(t)&&Lg(e,t,D(),t.classesWithoutHost,!0),t.stylesWithoutHost!=null&&Jc(t)&&Lg(e,t,D(),t.stylesWithoutHost,!1),B}function V(e,t,n,r){return z(e,t,n,r),B(),V}function H(e,t,n,r){let i=D(),a=i[1],o=e+27,s=a.firstCreatePass?Vm(o,a,2,t,n,r):a.data[o];return tp(s,i,e,t,Bg),r!=null&&Hf(i,s),H}function U(){return Mo(np(Fo()))&&No(),ko(),U}function zg(e,t,n,r){return H(e,t,n,r),U(),zg}var Bg=(e,t,n,r,i)=>(ys(!0),Su(t[11],r,gs()));function Vg(e,t,n){let r=D(),i=r[1],a=e+27,o=i.firstCreatePass?zm(a,r,8,`ng-container`,Zf,Ao(),t,n):i.data[a];if(tp(o,r,e,`ng-container`,Wg),Xa(o)){let e=r[1];Vf(e,r,o),su(e,o,r)}return n!=null&&Hf(r,o),Vg}function Hg(){let e=Po(),t=np(Fo());return e.firstCreatePass&&Bm(e,t),Hg}function Ug(e,t,n){return Vg(e,t,n),Hg(),Ug}var Wg=(e,t,n,r,i)=>(ys(!0),xu(t[11],``));function W(){return D()}function Gg(e,t,n){let r=D();return um(r,qo(),t)&&(Po(),Kf(ps(),r,e,t,r[11],n)),Gg}var Kg=void 0;function qg(e){let t=Math.floor(Math.abs(e)),n=e.toString().replace(/^[^.]*\.?/,``).length;return t===1&&n===0?1:5}var Jg=[`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`]],Kg,[[`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`]],Kg,[[`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}`,Kg,Kg,Kg],[`.`,`,`,`;`,`%`,`+`,`-`,`E`,`×`,`‰`,`∞`,`NaN`,`:`],[`#,##0.###`,`#,##0%`,`¤#,##0.00`,`#E0`],`USD`,`$`,`US Dollar`,{},`ltr`,qg],Yg=Object.create(null);function Xg(e){let t=$g(e),n=Zg(t);if(n)return n;let r=t.split(`-`)[0];if(n=Zg(r),n)return n;if(r===`en`)return Jg;throw new T(701,!1)}function Zg(e){if(!(e in Yg)){let t=Hi.ng&&Hi.ng.common&&Hi.ng.common.locales&&Hi.ng.common.locales[e];return t!==void 0&&(Yg[e]=t),t}return Yg[e]}var Qg={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 $g(e){return e.toLowerCase().replace(/_/g,`-`)}var e_=`en-US`;function t_(e){typeof e==`string`&&e.toLowerCase().replace(/_/g,`-`)}function G(e,t,n){let r=D(),i=Po(),a=Fo();return r_(i,r,r[11],a,e,t,n),G}function n_(e,t,n){let r=D(),i=Po(),a=Fo();return(a.type&3||n)&&gm(a,i,r,n,r[11],e,t,mm(a,r,t)),n_}function r_(e,t,n,r,i,a,o){let s=!0,c=null;if((r.type&3||o)&&(c??=mm(r,t,a),gm(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 p_(e){return(e&2)==2}function m_(e,t){return e&131071|t<<17}function h_(e){return e|2}function g_(e){return(e&131068)>>2}function __(e,t){return e&-131069|t<<2}function v_(e){return(e&1)==1}function y_(e){return e|1}function b_(e,t,n,r,i,a){let o=a?t.classBindings:t.styleBindings,s=f_(o),c=g_(o);e[r]=n;let l=!1,u;if(Array.isArray(n)){let e=n;u=e[1],(u===null||ca(e,u)>0)&&(l=!0)}else u=n;if(i){if(c!==0){let t=f_(e[s+1]);e[r+1]=d_(t,s),t!==0&&(e[t+1]=__(e[t+1],r)),e[s+1]=m_(e[s+1],r)}else e[r+1]=d_(s,0),s!==0&&(e[s+1]=__(e[s+1],r)),s=r}else e[r+1]=d_(c,0),s===0?s=r:e[c+1]=__(e[c+1],r),c=r;l&&(e[r+1]=h_(e[r+1])),S_(e,u,r,!0),S_(e,u,r,!1),x_(t,u,e,r,a),o=d_(s,c),a?t.classBindings=o:t.styleBindings=o}function x_(e,t,n,r,i){let a=i?e.residualClasses:e.residualStyles;a!=null&&typeof t==`string`&&ca(a,t)>=0&&(n[r+1]=y_(n[r+1]))}function S_(e,t,n,r){let i=e[n+1],a=t===null,o=r?f_(i):g_(i),s=!1;for(;o!==0&&(s===!1||a);){let n=e[o],i=e[o+1];C_(n,t)&&(s=!0,e[o+1]=r?y_(i):h_(i)),o=r?f_(i):g_(i)}s&&(e[n+1]=r?h_(i):y_(i))}function C_(e,t){return e===null||t==null||(Array.isArray(e)?e[1]:e)===t?!0:Array.isArray(e)&&typeof t==`string`?ca(e,t)>=0:!1}var w_={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function T_(e){return e.substring(w_.key,w_.keyEnd)}function E_(e){return O_(e),D_(e,k_(e,0,w_.textEnd))}function D_(e,t){let n=w_.textEnd;return n===t?-1:(t=w_.keyEnd=A_(e,w_.key=t,n),k_(e,t,n))}function O_(e){w_.key=0,w_.keyEnd=0,w_.value=0,w_.valueEnd=0,w_.textEnd=e.length}function k_(e,t,n){for(;t32;)t++;return t}function j_(e,t,n){return P_(e,t,n,!1),j_}function q(e,t){return P_(e,t,null,!0),q}function M_(e){F_(G_,N_,e,!0)}function N_(e,t){for(let n=E_(t);n>=0;n=D_(t,n))oa(e,T_(t),!0)}function P_(e,t,n,r){let i=D(),a=Po(),o=Jo(2);if(a.firstUpdatePass&&L_(a,e,o,r),t!==Zu&&um(i,o,t)){let s=a.data[ds()];q_(a,s,i,i[11],e,i[o+1]=X_(t,n),r,o)}}function F_(e,t,n,r){let i=Po(),a=Jo(2);i.firstUpdatePass&&L_(i,null,a,r);let o=D();if(n!==Zu&&um(o,a,n)){let s=i.data[ds()];if(Z_(s,r)&&!I_(i,a)){let e=r?s.classesWithoutHost:s.stylesWithoutHost;e!==null&&(n=oi(e,n||``)),Lg(i,s,o,n,r)}else K_(i,s,o,o[11],o[a+1],o[a+1]=W_(e,t,n),r,a)}}function I_(e,t){return t>=e.expandoStartIndex}function L_(e,t,n,r){let i=e.data;if(i[n+1]===null){let a=i[ds()],o=I_(e,n);Z_(a,r)&&t===null&&!o&&(t=!1),t=R_(i,a,t,r),b_(i,a,t,n,o,r)}}function R_(e,t,n,r){let i=$o(e),a=r?t.residualClasses:t.residualStyles;if(i===null)(r?t.classBindings:t.styleBindings)===0&&(n=H_(null,e,t,n,r),n=U_(n,t.attrs,r),a=null);else{let o=t.directiveStylingLast;if(o===-1||e[o]!==i){if(n=H_(i,e,t,n,r),a===null){let n=z_(e,t,r);n!==void 0&&Array.isArray(n)&&(n=H_(null,e,t,n[1],r),n=U_(n,t.attrs,r),B_(e,t,r,n))}else a=V_(e,t,r)}}return a!==void 0&&(r?t.residualClasses=a:t.residualStyles=a),n}function z_(e,t,n){let r=n?t.classBindings:t.styleBindings;if(g_(r)!==0)return e[f_(r)]}function B_(e,t,n,r){let i=n?t.classBindings:t.styleBindings;e[f_(i)]=r}function V_(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===Zu&&(u=l?da:void 0);let d=l?sa(u,r):c===r?u:void 0;if(a&&!Y_(d)&&(d=sa(t,r)),Y_(d)&&(s=d,o))return s;let f=e[i+1];i=o?f_(f):g_(f)}if(t!==null){let e=a?t.residualClasses:t.residualStyles;e!=null&&(s=sa(e,r))}return s}function Y_(e){return e!==void 0}function X_(e,t){return e==null||e===``||(typeof t==`string`?e=uu(e)+t:typeof e==`object`&&(e=ai(uu(e)))),e}function Z_(e,t){return!!(e.flags&(t?8:16))}function J(e,t=``){let n=D(),r=Po(),i=e+27,a=r.firstCreatePass?Kp(r,i,1,t,null):r.data[i],o=Q_(r,n,a,t);n[i]=o,vs()&&vf(r,n,o,a),Ro(a,!1)}var Q_=(e,t,n,r)=>(ys(!0),yu(t[11],r));function $_(e,t,n,r=``){return um(e,qo(),n)?t+Ai(n)+r:Zu}function ev(e,t,n,r,i,a=``){let o=dm(e,Go(),n,i);return Jo(2),o?t+Ai(n)+r+Ai(i)+a:Zu}function tv(e,t,n,r,i,a,o,s=``){let c=fm(e,Go(),n,i,o);return Jo(3),c?t+Ai(n)+r+Ai(i)+a+Ai(o)+s:Zu}function nv(e,t,n,r,i,a,o,s,c,l=``){let u=pm(e,Go(),n,i,o,c);return Jo(4),u?t+Ai(n)+r+Ai(i)+a+Ai(o)+s+Ai(c)+l:Zu}function Y(e){return X(``,e),Y}function X(e,t,n){let r=D(),i=$_(r,e,t,n);return i!==Zu&&av(r,ds(),i),X}function Z(e,t,n,r,i){let a=D(),o=ev(a,e,t,n,r,i);return o!==Zu&&av(a,ds(),o),Z}function rv(e,t,n,r,i,a,o){let s=D(),c=tv(s,e,t,n,r,i,a,o);return c!==Zu&&av(s,ds(),c),rv}function iv(e,t,n,r,i,a,o,s,c){let l=D(),u=nv(l,e,t,n,r,i,a,o,s,c);return u!==Zu&&av(l,ds(),u),iv}function av(e,t,n){let r=ro(t,e);bu(e[11],r,n)}function ov(e,t,n){yc(t)&&(t=t());let r=D();return um(r,qo(),t)&&(Po(),Gf(ps(),r,e,t,r[11],n)),ov}function sv(e,t){let n=yc(e);return n&&e.set(t),n}function cv(e,t){let n=D(),r=Po(),i=Fo();return r_(r,n,n[11],i,e,t),cv}var lv={};function uv(e){Pd(`NgLet`);let t=Po(),n=D(),r=e+27;return Ro(Kp(t,r,128,null,null),!1),so(t,n,r,lv),uv}function dv(e){return so(Po(),D(),ds(),e),e}function fv(e){let t=oo(Vo(),27+e);if(t===lv)throw new T(314,!1);return t}function pv(e,t,n=``){return $_(D(),e,t,n)}function mv(e,t){let n=Wo()+e,r=D();return r[n]===Zu?cm(r,n,t()):lm(r,n)}function hv(e,t,n){return vv(D(),Wo(),e,t,n)}function gv(e,t,n,r,i){return bv(D(),Wo(),e,t,n,r,i)}function _v(e,t){let n=e[t];return n===Zu?void 0:n}function vv(e,t,n,r,i,a){let o=t+n;return um(e,o,i)?cm(e,o+1,a?r.call(a,i):r(i)):_v(e,o+1)}function yv(e,t,n,r,i,a,o){let s=t+n;return dm(e,s,i,a)?cm(e,s+2,o?r.call(o,i,a):r(i,a)):_v(e,s+2)}function bv(e,t,n,r,i,a,o,s){let c=t+n;return fm(e,c,i,a,o)?cm(e,c+3,s?r.call(s,i,a,o):r(i,a,o)):_v(e,c+3)}function xv(e,t){let n=Po(),r,i=e+27;n.firstCreatePass?(r=Sv(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(wm);try{let e=al(!1),t=a();return al(e),so(n,D(),i,t),t}finally{Bi(o)}}function Sv(e,t){if(t)for(let n=t.length-1;n>=0;n--){let r=t[n];if(e===r.name)return r}}function Cv(e,t,n){let r=e+27,i=D(),a=oo(i,r);return Tv(i,r)?vv(i,Wo(),t,a.transform,n,a):a.transform(n)}function wv(e,t,n,r){let i=e+27,a=D(),o=oo(a,i);return Tv(a,i)?yv(a,Wo(),t,o.transform,n,r,o):o.transform(n,r)}function Tv(e,t){return e[1].data[t].pure}function Ev(e,t){return Gp(e,t)}var Dv=(()=>{class e{applicationErrorHandler=E(Ys);appRef=E(fg);taskService=E(Os);ngZone=E(Is);zonelessEnabled=E(oc);tracing=E(Md,{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=Al({token:e,factory:e.ɵfac})}return e})();function Ov(){return[{provide:ac,useExisting:Dv},{provide:Is,useClass:Ws},{provide:oc,useValue:!0}]}function kv(){return typeof $localize<`u`&&$localize.locale||`en-US`}var Av=new vi(``,{factory:()=>E(Av,{optional:!0,skipSelf:!0})||kv()}),jv=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&&Mv(this.listeners)),w(t),this.isEmitting=!1}}};function Mv(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 Nv(e){return ar(e)}(class e extends Error{_brand;constructor(e){super(e)}static IDLE=new e(`IDLE`);static LOADING=new e(`LOADING`)});var Pv=e=>e;function Fv(e,t){return typeof e==`function`?Iv(tr(e,Pv,t?.equal),t?.debugName,t?.set):Iv(tr(e.source,e.computation,e.equal),e.debugName,e.set)}function Iv(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(Nv(e)),t)}else i.set=e=>nr(r,e),i.update=e=>rr(r,e);return i.asReadonly=Zs.bind(e),i}function Lv(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 Rv(e){return new jv}function zv(e,t){return Lv(e,t)}function Bv(e){return Lv(bc,e)}var $=(zv.required=Bv,zv);function Vv(e,t){let n=Object.create(xc),r=new jv;n.value=e;function i(){return mn(n),Hv(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=>{Hv(n.value),i.set(e(n.value))},i.subscribe=r.subscribe.bind(r),i.destroyRef=r.destroyRef,i}function Hv(e){if(e===bc)throw new T(952,!1)}function Uv(e,t){return Vv(e,t)}function Wv(e){return Vv(bc,e)}var Gv=(Uv.required=Wv,Uv);function Kv(e,t){return Ph(t)}function qv(e,t){return Fh(t)}var Jv=(Kv.required=qv,Kv),Yv=new vi(``),Xv=new vi(``);function Zv(e){return!e.moduleRef}function Qv(e){let t=Zv(e)?e.r3Injector:e.moduleRef.injector,n=t.get(Is);return n.run(()=>{Zv(e)?e.r3Injector.resolveInjectorInitializers():e.moduleRef.resolveInjectorInitializers();let r=t.get(Ys),i;if(n.runOutsideAngular(()=>{i=n.onError.subscribe({next:r})}),Zv(e)){let n=()=>t.destroy(),r=e.platformInjector.get(Yv);r.add(n),t.onDestroy(()=>{i.unsubscribe(),r.delete(n)})}else{let t=()=>e.moduleRef.destroy(),n=e.platformInjector.get(Yv);n.add(t),e.moduleRef.onDestroy(()=>{mg(e.allPlatformModules,e.moduleRef),i.unsubscribe(),n.delete(t)})}return ey(r,n,()=>{let n=t.get(Os),r=n.add(),i=t.get(tg);return i.runInitializers(),i.donePromise.then(()=>{if(t_(t.get(Av,e_)||`en-US`),!t.get(Xv,!0))return Zv(e)?t.get(fg):(e.allPlatformModules.push(e.moduleRef),e.moduleRef);if(Zv(e)){let n=t.get(fg);return e.rootComponent!==void 0&&n.bootstrap(e.rootComponent),n}return $v?.(e.moduleRef,e.allPlatformModules),e.moduleRef}).finally(()=>void n.remove(r))})})}var $v;function ey(e,t,n){try{let r=n();return Rh(r)?r.catch(n=>{throw t.runOutsideAngular(()=>e(n)),n}):r}catch(n){throw t.runOutsideAngular(()=>e(n)),n}}var ty=null;function ny(e=[],t){return Ss.create({name:t,providers:[{provide:Ea,useValue:`platform`},{provide:Yv,useValue:new Set([()=>ty=null])},...e]})}function ry(e=[]){if(ty)return ty;let t=ny(e);return ty=t,ug(),iy(t),t}function iy(e){let t=e.get(ec,null);Ua(e,()=>{t?.forEach(e=>e())})}function ay(e){let{rootComponent:t,appProviders:n,platformProviders:r,platformRef:i}=e;Ic(Cc.BootstrapApplicationStart);try{let e=i?.injector??ry(r);return Qv({r3Injector:new Vh({providers:[Ov(),Xs,...n||[]],parent:e,debugName:``,runEnvironmentInitializers:!1}).injector,platformInjector:e,rootComponent:t})}catch(e){return Promise.reject(e)}finally{Ic(Cc.BootstrapApplicationEnd)}}var oy=Symbol(`NOT_SET`),sy=new Set,cy={...Kn,kind:`afterRenderEffectPhase`,consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!0,value:oy,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??sy)t()}finally{En(e)}}};function uy(e,t){let n=t?.injector??E(Ss),r=n.get(ac),i=n.get(Fd),a=n.get(Md,null,{optional:!0});i.impl??=n.get(Ld);let o=e;typeof o==`function`&&(o={mixedReadWrite:e});let s=n.get(rc,null,{optional:!0}),c=new ly(i.impl,[o.earlyRead,o.write,o.mixedReadWrite,o.read],s?.view,r,n,a?.snapshot(null));return i.impl.register(c),c}var dy=null;function fy(){return dy}function py(e){dy??=e}var my=class{},hy=(function(e){return e[e.Format=0]=`Format`,e[e.Standalone=1]=`Standalone`,e})(hy||{}),gy=(function(e){return e[e.Narrow=0]=`Narrow`,e[e.Abbreviated=1]=`Abbreviated`,e[e.Wide=2]=`Wide`,e[e.Short=3]=`Short`,e})(gy||{}),_y=(function(e){return e[e.Short=0]=`Short`,e[e.Medium=1]=`Medium`,e[e.Long=2]=`Long`,e[e.Full=3]=`Full`,e})(_y||{}),vy={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 yy(e){return Xg(e)[Qg.LocaleId]}function by(e,t,n){let r=Xg(e);return jy(jy([r[Qg.DayPeriodsFormat],r[Qg.DayPeriodsStandalone]],t),n)}function xy(e,t,n){let r=Xg(e);return jy(jy([r[Qg.DaysFormat],r[Qg.DaysStandalone]],t),n)}function Sy(e,t,n){let r=Xg(e);return jy(jy([r[Qg.MonthsFormat],r[Qg.MonthsStandalone]],t),n)}function Cy(e,t){let n=Xg(e)[Qg.Eras];return jy(n,t)}function wy(e,t){return jy(Xg(e)[Qg.DateFormat],t)}function Ty(e,t){return jy(Xg(e)[Qg.TimeFormat],t)}function Ey(e,t){let n=Xg(e)[Qg.DateTimeFormat];return jy(n,t)}function Dy(e,t){let n=Xg(e),r=n[Qg.NumberSymbols][t];if(r===void 0){if(t===vy.CurrencyDecimal)return n[Qg.NumberSymbols][vy.Decimal];if(t===vy.CurrencyGroup)return n[Qg.NumberSymbols][vy.Group]}return r}function Oy(e){if(!e[Qg.ExtraData])throw new T(2303,!1)}function ky(e){let t=Xg(e);return Oy(t),(t[Qg.ExtraData][2]||[]).map(e=>typeof e==`string`?My(e):[My(e[0]),My(e[1])])}function Ay(e,t,n){let r=Xg(e);return Oy(r),jy(jy([r[Qg.ExtraData][0],r[Qg.ExtraData][1]],t)||[],n)||[]}function jy(e,t){for(let n=t;n>-1;n--)if(e[n]!==void 0)return e[n];throw new T(2304,!1)}function My(e){let[t,n]=e.split(`:`);return{hours:+t,minutes:+n}}var Ny=/^(\d{4,})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,Py=Object.create(null),Fy=/((?:[^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]*)/,Iy=256;function Ly(e,t,n,r){let i=ob(e);Ry(t),t=By(n,t)||t;let a=[],o;for(;t;)if(o=Fy.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=rb(r,s),i=ab(i,r));let c=``;return a.forEach(e=>{let t=nb(e);c+=t?t(i,n,s):e===`''`?`'`:e.replace(/(^'|'$)/g,``).replace(/''/g,`'`)}),c}function Ry(e){if(e.length>Iy)throw new T(2300,!1)}function zy(e,t,n){let r=new Date(0);return r.setFullYear(e,t,n),r.setHours(0,0,0),r}function By(e,t){let n=yy(e);if(Py[n]??=Object.create(null),Py[n][t])return Py[n][t];let r=``;switch(t){case`shortDate`:r=wy(e,_y.Short);break;case`mediumDate`:r=wy(e,_y.Medium);break;case`longDate`:r=wy(e,_y.Long);break;case`fullDate`:r=wy(e,_y.Full);break;case`shortTime`:r=Ty(e,_y.Short);break;case`mediumTime`:r=Ty(e,_y.Medium);break;case`longTime`:r=Ty(e,_y.Long);break;case`fullTime`:r=Ty(e,_y.Full);break;case`short`:let t=By(e,`shortTime`),n=By(e,`shortDate`);r=Vy(Ey(e,_y.Short),[t,n]);break;case`medium`:let i=By(e,`mediumTime`),a=By(e,`mediumDate`);r=Vy(Ey(e,_y.Medium),[i,a]);break;case`long`:let o=By(e,`longTime`),s=By(e,`longDate`);r=Vy(Ey(e,_y.Long),[o,s]);break;case`full`:let c=By(e,`fullTime`),l=By(e,`fullDate`);r=Vy(Ey(e,_y.Full),[c,l])}return r&&(Py[n][t]=r),r}function Vy(e,t){return t&&(e=e.replace(/\{([^}]+)}/g,function(e,n){return Object.hasOwn(t,n)?t[n]:e})),e}function Hy(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=Dy(o,vy.MinusSign);return Hy(s,t,c,r,i)}}function Gy(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 Ky(e,t,n=hy.Format,r=!1){return function(i,a){return qy(i,a,e,t,n,r)}}function qy(e,t,n,r,i,a){switch(n){case 2:return Sy(t,i,r)[e.getMonth()];case 1:return xy(t,i,r)[e.getDay()];case 0:let n=e.getHours(),o=e.getMinutes();if(a){let e=ky(t),a=Ay(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?`+`:``)+Hy(o,2,a)+Hy(Math.abs(i%60),2,a);case 1:return`GMT`+(i>=0?`+`:``)+Hy(o,1,a);case 2:return`GMT`+(i>=0?`+`:``)+Hy(o,2,a)+`:`+Hy(Math.abs(i%60),2,a);case 3:return r===0?`Z`:(i>=0?`+`:``)+Hy(o,2,a)+`:`+Hy(Math.abs(i%60),2,a);default:throw new T(2310,!1)}}}var Yy=0,Xy=4;function Zy(e){let t=zy(e,Yy,1).getDay();return zy(e,0,1+(t<=Xy?Xy:11)-t)}function Qy(e){let t=e.getDay(),n=t===0?-3:Xy-t;return zy(e.getFullYear(),e.getMonth(),e.getDate()+n)}function $y(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=Qy(n),t=Zy(e.getFullYear()),r=e.getTime()-t.getTime();i=1+Math.round(r/6048e5)}return Hy(i,e,Dy(r,vy.MinusSign))}}function eb(e,t=!1){return function(n,r){return Hy(Qy(n).getFullYear(),e,Dy(r,vy.MinusSign),t)}}var tb=Object.create(null);function nb(e){if(tb[e])return tb[e];let t;switch(e){case`G`:case`GG`:case`GGG`:t=Ky(3,gy.Abbreviated);break;case`GGGG`:t=Ky(3,gy.Wide);break;case`GGGGG`:t=Ky(3,gy.Narrow);break;case`y`:t=Wy(0,1,0,!1,!0);break;case`yy`:t=Wy(0,2,0,!0,!0);break;case`yyy`:t=Wy(0,3,0,!1,!0);break;case`yyyy`:t=Wy(0,4,0,!1,!0);break;case`Y`:t=eb(1);break;case`YY`:t=eb(2,!0);break;case`YYY`:t=eb(3);break;case`YYYY`:t=eb(4);break;case`M`:case`L`:t=Wy(1,1,1);break;case`MM`:case`LL`:t=Wy(1,2,1);break;case`MMM`:t=Ky(2,gy.Abbreviated);break;case`MMMM`:t=Ky(2,gy.Wide);break;case`MMMMM`:t=Ky(2,gy.Narrow);break;case`LLL`:t=Ky(2,gy.Abbreviated,hy.Standalone);break;case`LLLL`:t=Ky(2,gy.Wide,hy.Standalone);break;case`LLLLL`:t=Ky(2,gy.Narrow,hy.Standalone);break;case`w`:t=$y(1);break;case`ww`:t=$y(2);break;case`W`:t=$y(1,!0);break;case`d`:t=Wy(2,1);break;case`dd`:t=Wy(2,2);break;case`c`:case`cc`:t=Wy(7,1);break;case`ccc`:t=Ky(1,gy.Abbreviated,hy.Standalone);break;case`cccc`:t=Ky(1,gy.Wide,hy.Standalone);break;case`ccccc`:t=Ky(1,gy.Narrow,hy.Standalone);break;case`cccccc`:t=Ky(1,gy.Short,hy.Standalone);break;case`E`:case`EE`:case`EEE`:t=Ky(1,gy.Abbreviated);break;case`EEEE`:t=Ky(1,gy.Wide);break;case`EEEEE`:t=Ky(1,gy.Narrow);break;case`EEEEEE`:t=Ky(1,gy.Short);break;case`a`:case`aa`:case`aaa`:t=Ky(0,gy.Abbreviated);break;case`aaaa`:t=Ky(0,gy.Wide);break;case`aaaaa`:t=Ky(0,gy.Narrow);break;case`b`:case`bb`:case`bbb`:t=Ky(0,gy.Abbreviated,hy.Standalone,!0);break;case`bbbb`:t=Ky(0,gy.Wide,hy.Standalone,!0);break;case`bbbbb`:t=Ky(0,gy.Narrow,hy.Standalone,!0);break;case`B`:case`BB`:case`BBB`:t=Ky(0,gy.Abbreviated,hy.Format,!0);break;case`BBBB`:t=Ky(0,gy.Wide,hy.Format,!0);break;case`BBBBB`:t=Ky(0,gy.Narrow,hy.Format,!0);break;case`h`:t=Wy(3,1,-12);break;case`hh`:t=Wy(3,2,-12);break;case`H`:t=Wy(3,1);break;case`HH`:t=Wy(3,2);break;case`m`:t=Wy(4,1);break;case`mm`:t=Wy(4,2);break;case`s`:t=Wy(5,1);break;case`ss`:t=Wy(5,2);break;case`S`:t=Wy(6,1);break;case`SS`:t=Wy(6,2);break;case`SSS`:t=Wy(6,3);break;case`Z`:case`ZZ`:case`ZZZ`:t=Jy(0);break;case`ZZZZZ`:t=Jy(3);break;case`O`:case`OO`:case`OOO`:case`z`:case`zz`:case`zzz`:t=Jy(1);break;case`OOOO`:case`ZZZZ`:case`zzzz`:t=Jy(2);break;default:return null}return tb[e]=t,t}function rb(e,t){e=e.replace(/:/g,``);let n=Date.parse(`Jan 01, 1970 00:00:00 `+e)/6e4;return isNaN(n)?t:n}function ib(e,t){return e=new Date(e.getTime()),e.setMinutes(e.getMinutes()+t),e}function ab(e,t,n){let r=e.getTimezoneOffset();return ib(e,-1*(rb(t,r)-r))}function ob(e){if(cb(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 zy(t,n-1,r)}let t=parseFloat(e);if(!isNaN(e-t))return new Date(t);let n;if(n=e.match(Ny))return sb(n)}let t=new Date(e);if(!cb(t))throw new T(2311,!1);return t}function sb(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 cb(e){return e instanceof Date&&!isNaN(e.valueOf())}var lb=(()=>{class e{_viewContainerRef;_viewRef=null;ngTemplateOutletContext=null;ngTemplateOutlet=null;ngTemplateOutletInjector=null;injector=E(Ss);constructor(e){this._viewContainerRef=e}ngOnChanges(e){if(this._shouldRecreateView(e)){let e=this._viewContainerRef;if(this._viewRef&&e.remove(e.indexOf(this._viewRef)),!this.ngTemplateOutlet){this._viewRef=null;return}let t=this._createContextForwardProxy();this._viewRef=e.createEmbeddedView(this.ngTemplateOutlet,t,{injector:this._getInjector()})}}_getInjector(){return this.ngTemplateOutletInjector===`outlet`?this.injector:this.ngTemplateOutletInjector??void 0}_shouldRecreateView(e){return!!e.ngTemplateOutlet||!!e.ngTemplateOutletInjector}_createContextForwardProxy(){return new Proxy({},{set:(e,t,n)=>this.ngTemplateOutletContext?Reflect.set(this.ngTemplateOutletContext,t,n):!1,get:(e,t,n)=>{if(this.ngTemplateOutletContext)return Reflect.get(this.ngTemplateOutletContext,t,n)}})}static ɵfac=function(t){return new(t||e)(wm(ih))};static ɵdir=Jh({type:e,selectors:[[``,`ngTemplateOutlet`,``]],inputs:{ngTemplateOutletContext:`ngTemplateOutletContext`,ngTemplateOutlet:`ngTemplateOutlet`,ngTemplateOutletInjector:`ngTemplateOutletInjector`},features:[Dc]})}return e})();function ub(e,t){return new T(2100,!1)}var db=`mediumDate`,fb=new vi(``),pb=new vi(``),mb=(()=>{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??db,a=r??this.defaultOptions?.timezone??this.defaultTimezone??void 0;return Ly(t,e,i||this.locale,a)}catch(t){throw ub(e,t.message)}}static ɵfac=function(t){return new(t||e)(wm(Av,16),wm(fb,24),wm(pb,24))};static ɵpipe=Yh({name:`date`,type:e,pure:!0})}return e})(),hb=(()=>{class e{transform(e){return JSON.stringify(e,null,2)}static ɵfac=function(t){return new(t||e)};static ɵpipe=Yh({name:`json`,type:e,pure:!1})}return e})();function gb(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 _b=`browser`,vb=class{_doc;constructor(e){this._doc=e}manager},yb=(()=>{class e extends vb{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})(),bb=new vi(``),xb=(()=>{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 yb));this._plugins=n.slice().reverse();let r=e.find(e=>e instanceof yb);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(bb),qi(Is))};static ɵprov=di({token:e,factory:e.ɵfac})}return e})(),Sb=`ng-app-id`;function Cb(e){for(let t of e)t.remove()}function wb(e,t){let n=t.createElement(`style`);return n.textContent=e,n}function Tb(e,t,n,r){let i=e.head?.querySelectorAll(`style[${Sb}="${t}"],link[${Sb}="${t}"]`);if(!i||i.length===0)return!1;for(let e of i)e.removeAttribute(Sb),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 Eb(e,t){let n=t.createElement(`link`);return n.setAttribute(`rel`,`stylesheet`),n.setAttribute(`href`,e),n}var Db=(()=>{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,Tb(e,t,this.inline,this.external)&&this.hosts.add(e.head)}addStyles(e,t){for(let t of e)this.addUsage(t,this.inline,wb);t?.forEach(e=>this.addUsage(e,this.external,Eb))}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&&(Cb(n.elements),t.delete(e)))}ngOnDestroy(){for(let[,{elements:e}]of[...this.inline,...this.external])Cb(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,wb(t,this.doc)));for(let[t,{elements:n}]of this.external)n.push(this.addElement(e,Eb(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})(),Ob={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`},kb=/%COMP%/g,Ab=`%COMP%`,jb=`_nghost-${Ab}`,Mb=`_ngcontent-${Ab}`,Nb=!0,Pb=new vi(``,{factory:()=>Nb}),Fb=new vi(``);function Ib(e){return Mb.replace(kb,e)}function Lb(e){return jb.replace(kb,e)}function Rb(e,t){return t.map(t=>t.replace(kb,e))}var zb=(()=>{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 Bb(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 Wb?n.applyToHost(e):n instanceof Ub&&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 cu.Emulated:r=new Wb(o,s,t,this.appId,c,i,a,l,this.cssVarNamespace);break;case cu.ShadowDom:return new Hb(o,e,t,i,a,this.nonce,l,this.cssVarNamespace,s);case cu.ExperimentalIsolatedShadowDom:return new Hb(o,e,t,i,a,this.nonce,l,this.cssVarNamespace);default:r=new Ub(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(xb),qi(Sm),qi(Qs),qi(Pb),qi(Cs),qi(Is),qi(nc),qi(Md,8),qi(Fb,8))};static ɵprov=di({token:e,factory:e.ɵfac})}return e})(),Bb=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(Ob[t]||t,e):this.doc.createElement(e)}createComment(e){return this.doc.createComment(e)}createText(e){return this.doc.createTextNode(e)}appendChild(e,t){(Vb(e)?e.content:e).appendChild(t)}insertBefore(e,t,n){if(e){let r=Vb(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=Ob[r];i?e.setAttributeNS(i,t,n):e.setAttribute(t,n)}else e.setAttribute(t,n)}removeAttribute(e,t,n){if(n){let r=Ob[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&(Qu.DashCase|Qu.Important)?e.style.setProperty(t,n,r&Qu.Important?`important`:``):e.style[t]=n}removeStyle(e,t,n){let r=t.startsWith(`--`);r&&(t=t.replace(`%NS%`,this.cssVarNamespace)),r||n&Qu.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=fy().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 Vb(e){return e.tagName===`TEMPLATE`&&e.content!==void 0}var Hb=class extends Bb{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=Rb(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=Eb(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)}},Ub=class extends Bb{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?Rb(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&&fd.size===0&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},Wb=class extends Ub{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=Ib(l),this.hostAttr=Lb(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}},Gb=class e extends my{supportsDOMEvents=!0;static makeCurrent(){py(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=qb();return t==null?null:Jb(t)}resetBaseElement(){Kb=null}getUserAgent(){return window.navigator.userAgent}getCookie(e){return gb(document.cookie,e)}},Kb=null;function qb(){return Kb||=document.head.querySelector(`base`),Kb?Kb.getAttribute(`href`):null}function Jb(e){return new URL(e,document.baseURI).pathname}var Yb=[`alt`,`control`,`meta`,`shift`],Xb={"\b":`Backspace`,"	":`Tab`,"":`Delete`,"\x1B":`Escape`,Del:`Delete`,Esc:`Escape`,Left:`ArrowLeft`,Right:`ArrowRight`,Up:`ArrowUp`,Down:`ArrowDown`,Menu:`ContextMenu`,Scroll:`ScrollLock`,Win:`OS`},Zb={alt:e=>e.altKey,control:e=>e.ctrlKey,meta:e=>e.metaKey,shift:e=>e.shiftKey},Qb=(()=>{class e extends vb{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(()=>fy().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.`),Yb.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=Xb[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`),Yb.forEach(t=>{if(t!==n){let n=Zb[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 $b(e,t,n){return ay({rootComponent:e,...ex(t,n)})}function ex(e,t){return{platformRef:t?.platformRef,appProviders:[...ax,...e?.providers??[]],platformProviders:ix}}function tx(){Gb.makeCurrent()}function nx(){return new Js}function rx(){return Xl(document),document}var ix=[{provide:tc,useValue:_b},{provide:ec,useValue:tx,multi:!0},{provide:Cs,useFactory:rx}],ax=[{provide:Ea,useValue:`root`},{provide:Js,useFactory:nx},{provide:bb,useClass:yb,multi:!0},{provide:bb,useClass:Qb,multi:!0},zb,{provide:Sm,useClass:Db},{provide:Db,useExisting:Sm},xb,{provide:rm,useExisting:zb},[]];function ox(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 ux({code:i,why:cx(a.why,e),fix:cx(a.fix,e),docs:o,cause:e.cause,sources:e.sources,data:cx(a.data,e)},s);for(let e of t)e(r,n);return r};n[i]=s}return n}function px(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 yx=Math.random.bind(Math),bx=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`;function xx(e=21){let t=``,n=e;for(;n--;)t+=bx[yx()*64|0];return t}var Sx=6e4,Cx=e=>e,wx=Cx,{clearTimeout:Tx,setTimeout:Ex}=globalThis;function Dx(e,t){let{post:n,on:r,off:i=()=>{},eventNames:a=[],serialize:o=Cx,deserialize:s=wx,resolver:c,bind:l=`rpc`,timeout:u=Sx,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}=vx(),_=xx();s.i=_;let ee;async function v(n=s){return u>=0&&(ee=Ex(()=>{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{Tx(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&&(Tx(r.timeoutId),n?r.reject(n):r.resolve(t)),p.delete(e)}}return m=r(te),h}function Ox(e,t){return t.safety?t.safety:e===`static`||e===`query`||e==null?`read`:`action`}var kx=Object.freeze({type:`object`,additionalProperties:!0});function Ax(e){let t=e[`~standard`];if(t.jsonSchema)try{return t.jsonSchema.input({target:`draft-2020-12`})}catch{return kx}return kx}function jx(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 Nx(e,t){return Mx(e,t)??[e]}function Px(e){return typeof e==`string`?`'${e}'`:new Rx().serialize(e)}var Fx=` _-,;:!?.'"()[]{}@*/\\&#%\`^+<=>|~$0123456789abcdefghijklmnopqrstuvwxyz`,Ix=(function(){let e=new Uint8Array(128);for(let t=0;t<69;t++)e[Fx.charCodeAt(t)]=t+1;for(let t=65;t<=90;t++)e[t]=e[t+32];return e})();function Lx(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})(),zx=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225],Bx=[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],Vx=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_`,Hx=[],Ux=class{_data=new Wx;_hash=new Wx([...zx]);_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)Hx[n]=e[t+n]|0;else{let e=Hx[n-15],t=(e<<25|e>>>7)^(e<<14|e>>>18)^e>>>3,r=Hx[n-2],i=(r<<15|r>>>17)^(r<<13|r>>>19)^r>>>10;Hx[n]=t+Hx[n-7]+i+Hx[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+Bx[n]+Hx[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=Wx.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 Gx(e){return new Ux().finalize(e).toBase64()}function Kx(e){return Gx(Px(e))}function qx(e){return Kx(e)}function Jx(){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 Yx=/^[\w+.-]{2,}:\/\//;function Xx(e){return e.endsWith(`/`)?e:`${e}/`}function Zx(e){return(e.endsWith(`/`)?e.slice(0,-1):e)||`/`}function Qx(e,...t){let n=e;for(let e of t)e&&e!==`/`&&(n=n?Xx(n)+e.replace(/^\.?\//,``):e);return n}function $x(e,t){if(!t||t===`/`||Yx.test(e))return e;let n=Zx(t);return e.startsWith(n)?e:Qx(n,e)}function eS(e,t){let n=e.match(Yx);return t+(n?e.slice(n[0].length):e)}var tS=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`;function nS(e=21){let t=``,n=e;for(;n--;)t+=tS[Math.random()*64|0];return t}var rS=Symbol.for(`immer-nothing`),iS=Symbol.for(`immer-draftable`),aS=Symbol.for(`immer-state`),oS=[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 sS(e,...t){{let n=oS[e],r=jS(n)?n.apply(null,t):n;throw Error(`[Immer] ${r}`)}}var cS=Object,lS=cS.getPrototypeOf,uS=`constructor`,dS=`prototype`,fS=`configurable`,pS=`enumerable`,mS=`writable`,hS=`value`,gS=e=>!!e&&!!e[aS];function _S(e){return e?bS(e)||DS(e)||!!e[iS]||!!e[uS]?.[iS]||OS(e)||kS(e):!1}var vS=cS[dS][uS].toString(),yS=new WeakMap;function bS(e){if(!e||!AS(e))return!1;let t=lS(e);if(t===null||t===cS[dS])return!0;let n=cS.hasOwnProperty.call(t,uS)&&t[uS];if(n===Object)return!0;if(!jS(n))return!1;let r=yS.get(n);return r===void 0&&(r=Function.toString.call(n),yS.set(n,r)),r===vS}function xS(e,t,n=!0){SS(e)===0?(n?Reflect.ownKeys(e):cS.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function SS(e){let t=e[aS];return t?t.type_:DS(e)?1:OS(e)?2:kS(e)?3:0}var CS=(e,t,n=SS(e))=>n===2?e.has(t):cS[dS].hasOwnProperty.call(e,t),wS=(e,t,n=SS(e))=>n===2?e.get(t):e[t],TS=(e,t,n,r=SS(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n};function ES(e,t){return e===t?e!==0||1/e==1/t:e!==e&&t!==t}var DS=Array.isArray,OS=e=>e instanceof Map,kS=e=>e instanceof Set,AS=e=>typeof e==`object`,jS=e=>typeof e==`function`,MS=e=>typeof e==`boolean`;function NS(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var PS=e=>AS(e)?e?.[aS]:null,FS=e=>e.copy_||e.base_,IS=e=>e.modified_?e.copy_:e.base_;function LS(e,t){if(OS(e))return new Map(e);if(kS(e))return new Set(e);if(DS(e))return Array[dS].slice.call(e);let n=bS(e);if(t===!0||t===`class_only`&&!n){let t=cS.getOwnPropertyDescriptors(e);delete t[aS];let n=Reflect.ownKeys(t);for(let r=0;r1&&cS.defineProperties(e,{set:BS,add:BS,clear:BS,delete:BS}),cS.freeze(e),t&&xS(e,(e,t)=>{RS(t,!0)},!1),e)}function zS(){sS(2)}var BS={[hS]:zS};function VS(e){return e===null||!AS(e)||cS.isFrozen(e)}var HS=`MapSet`,US=`Patches`,WS=`ArrayMethods`,GS={};function KS(e){let t=GS[e];return t||sS(0,e),t}var qS=e=>!!GS[e];function JS(e,t){GS[e]||(GS[e]=t)}var YS,XS=()=>YS,ZS=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:qS(HS)?KS(HS):void 0,arrayMethodsPlugin_:qS(WS)?KS(WS):void 0});function QS(e,t){t&&(e.patchPlugin_=KS(US),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function $S(e){eC(e),e.drafts_.forEach(nC),e.drafts_=null}function eC(e){e===YS&&(YS=e.parent_)}var tC=e=>YS=ZS(YS,e);function nC(e){let t=e[aS];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function rC(e,t){t.unfinalizedDrafts_=t.drafts_.length;let n=t.drafts_[0];if(e!==void 0&&e!==n){n[aS].modified_&&($S(t),sS(4)),_S(e)&&(e=iC(t,e));let{patchPlugin_:r}=t;r&&r.generateReplacementPatches_(n[aS].base_,e,t)}else e=iC(t,n);return aC(t,e,!0),$S(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e===rS?void 0:e}function iC(e,t){if(VS(t))return t;let n=t[aS];if(!n)return pC(t,e.handledSet_,e);if(!sC(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);dC(n,e)}return n.copy_}function aC(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&RS(t,n)}function oC(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var sC=(e,t)=>e.scope_===t,cC=[];function lC(e,t,n,r){let i=FS(e),a=e.type_;if(r!==void 0&&wS(i,r,a)===t){TS(i,r,n,a);return}if(!e.draftLocations_){let t=e.draftLocations_=new Map;xS(i,(e,n)=>{if(gS(n)){let r=t.get(n)||[];r.push(e),t.set(n,r)}})}let o=e.draftLocations_.get(t)??cC;for(let e of o)TS(i,e,n,a)}function uC(e,t,n){e.callbacks_.push(function(r){let i=t;if(!i||!sC(i,r))return;r.mapSetPlugin_?.fixSetContents(i);let a=IS(i);lC(e,i.draft_??i,a,n),dC(i,r)})}function dC(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)}oC(e)}}function fC(e,t,n){let{scope_:r}=e;if(gS(n)){let i=n[aS];sC(i,r)&&i.callbacks_.push(function(){SC(e),lC(e,n,IS(i),t)})}else _S(n)&&e.callbacks_.push(function(){let i=FS(e);e.type_===3?i.has(n)&&pC(n,r.handledSet_,r):wS(i,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&pC(wS(e.copy_,t,e.type_),r.handledSet_,r)})}function pC(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||gS(e)||t.has(e)||!_S(e)||VS(e)?e:(t.add(e),xS(e,(r,i)=>{if(gS(i)){let t=i[aS];sC(t,n)&&(TS(e,r,IS(t),e.type_),oC(t))}else _S(i)&&pC(i,t,n)}),e)}function mC(e,t){let n=DS(e),r={type_:+!!n,scope_:t?t.scope_:XS(),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=hC;n&&(i=[r],a=gC);let{revoke:o,proxy:s}=Proxy.revocable(i,a);return r.draft_=s,r.revoke_=o,[s,r]}var hC={get(e,t){if(t===aS)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=FS(e);if(!CS(i,t,e.type_))return yC(e,i,t);let a=i[t];if(e.finalized_||!_S(a)||r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&NS(t))return a;if(a===_C(e.base_,t)||vC(e,t,a)){SC(e);let n=e.type_===1?+t:t,r=wC(e.scope_,a,e,n);return e.copy_[n]=r}return a},has(e,t){return t in FS(e)},ownKeys(e){return Reflect.ownKeys(FS(e))},set(e,t,n){let r=bC(FS(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){let r=_C(FS(e),t),i=r?.[aS];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_.delete(t),!0;if(ES(n,r)&&(n!==void 0||CS(e.base_,t,e.type_)))return!0;SC(e),xC(e)}return e.copy_[t]===n&&(n!==void 0||CS(e.copy_,t,e.type_))||Number.isNaN(n)&&Number.isNaN(e.copy_[t])?!0:(e.copy_[t]=n,e.assigned_.set(t,!0),fC(e,t,n),!0)},deleteProperty(e,t){return SC(e),_C(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),xC(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let n=FS(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[mS]:!0,[fS]:e.type_!==1||t!==`length`,[pS]:r[pS],[hS]:n[t]}},defineProperty(){sS(11)},getPrototypeOf(e){return lS(e.base_)},setPrototypeOf(){sS(12)}},gC={};for(let e in hC){let t=hC[e];gC[e]=function(){let e=arguments;return e[0]=e[0][0],t.apply(this,e)}}gC.deleteProperty=function(e,t){return isNaN(parseInt(t))&&sS(13),gC.set.call(this,e,t,void 0)},gC.set=function(e,t,n){return t!==`length`&&isNaN(parseInt(t))&&sS(14),hC.set.call(this,e[0],t,n,e[0])};function _C(e,t){let n=e[aS];return(n?FS(n):e)[t]}function vC(e,t,n){return e.type_!==1||!e.allIndicesReassigned_||e.assigned_?.get(t)||!_S(n)||n[aS]?!1:e.baseRefs_.has(n)}function yC(e,t,n){let r=bC(t,n);return r?hS in r?r[hS]:r.get?.call(e.draft_):void 0}function bC(e,t){if(!(t in e))return;let n=lS(e);for(;n;){let e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=lS(n)}}function xC(e){e.modified_||(e.modified_=!0,e.parent_&&xC(e.parent_))}function SC(e){e.copy_||=(e.assigned_=new Map,LS(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var CC=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,n)=>{if(jS(e)&&!jS(t)){let n=t;t=e;let r=this;return function(e=n,...i){return r.produce(e,e=>t.call(this,e,...i))}}jS(t)||sS(6),n!==void 0&&!jS(n)&&sS(7);let r;if(_S(e)){let i=tC(this),a=wC(i,e,void 0),o=!0;try{r=t(a),o=!1}finally{o?$S(i):eC(i)}return QS(i,n),rC(r,i)}if(!e||!AS(e)){if(r=t(e),r===void 0&&(r=e),r===rS&&(r=void 0),this.autoFreeze_&&RS(r,!0),n){let t=[],i=[];KS(US).generateReplacementPatches_(e,r,{patches_:t,inversePatches_:i}),n(t,i)}return r}sS(1,e)},this.produceWithPatches=(e,t)=>{if(jS(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]},MS(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),MS(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),MS(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){_S(e)||sS(8),gS(e)&&(e=TC(e));let t=tC(this),n=wC(t,e,void 0);return n[aS].isManual_=!0,eC(t),n}finishDraft(e,t){let n=e&&e[aS];(!n||!n.isManual_)&&sS(9);let{scope_:r}=n;return QS(r,t),rC(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=KS(US).applyPatches_;return gS(e)?r(e,t):this.produce(e,e=>r(e,t))}};function wC(e,t,n,r){let[i,a]=OS(t)?KS(HS).proxyMap_(t,n):kS(t)?KS(HS).proxySet_(t,n):mC(t,n);return(n?.scope_??XS()).drafts_.push(i),a.callbacks_=n?.callbacks_??[],a.key_=r,n&&r!==void 0?uC(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 TC(e){return gS(e)||sS(10,e),EC(e)}function EC(e){if(!_S(e)||VS(e))return e;let t=e[aS],n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=LS(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=LS(e,!0);return xS(n,(e,t)=>{TS(n,e,EC(t))},r),t&&(t.finalized_=!1),n}function DC(){oS.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=PS(wS(e,n.key_)),i=wS(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||CS(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=wS(o,e,c),f=wS(s,e,c),p=l?CS(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===rS?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(kS(e))return new Set(Array.from(e).map(u));let t=Object.create(lS(e));for(let n in e)t[n]=u(e[n]);return CS(e,iS)&&(t[iS]=e[iS]),t}function d(e){return gS(e)?u(e):e}JS(US,{applyPatches_:l,generatePatches_:i,generateReplacementPatches_:c,getPath:e})}globalThis.Iterator?.from;var OC=new CC,kC=OC.produce,AC=OC.produceWithPatches.bind(OC),jC=OC.applyPatches.bind(OC),MC=1e3;function NC(e,t){if(e.add(t),e.size>MC){let t=e.values().next().value;t!==void 0&&e.delete(t)}}function PC(e){let{enablePatches:t=!1}=e;t&&DC();let n=Jx(),r=e.initialValue,i=new Set;return{on:n.on,value:()=>r,patch:(e,t=nS())=>{i.has(t)||(DC(),r=jC(r,e),NC(i,t),n.emit(`updated`,r,void 0,t))},mutate:(e,a=nS())=>{if(!i.has(a)){if(NC(i,a),t){let[t,i]=AC(r,e);if(t===r)return;r=t,n.emit(`updated`,r,i,a)}else{let t=kC(r,e);if(t===r)return;r=t,n.emit(`updated`,r,void 0,a)}}},syncIds:i}}var FC=typeof self==`object`?self:globalThis,IC=new Set([`Error`,`EvalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`,`AggregateError`]),LC=new Set([`Boolean`,`Number`,`String`,`Int8Array`,`Uint8Array`,`Uint8ClampedArray`,`Int16Array`,`Uint16Array`,`Int32Array`,`Uint32Array`,`Float16Array`,`Float32Array`,`Float64Array`,`BigInt64Array`,`BigUint64Array`]);function RC(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=IC.has(e)?FC[e]:void 0;return n(new(r??FC.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`&&LC.has(a))return n(new FC[a](o),i);throw TypeError(`unable to deserialize unsafe or unknown type: ${String(a)}`)};return r}function zC(e){return RC(new Map,e)(0)}var BC=``,{toString:VC}={},{keys:HC}=Object;function UC(e){let t=typeof e;if(t!==`object`||!e)return[0,t];let n=VC.call(e).slice(8,-1);switch(n){case`Array`:return[1,BC];case`Object`:return[2,BC];case`Date`:return[3,BC];case`RegExp`:return[4,BC];case`Map`:return[5,BC];case`Set`:return[6,BC];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:n.includes(`Error`)?[7,n]:[2,n]}function WC([e,t]){return e===0&&(t===`function`||t===`symbol`)}function GC(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]=UC(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 HC(r))(e||!WC(UC(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||!(WC(UC(n))||WC(UC(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!WC(UC(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a}function KC(e,t={}){let n=[];return GC(!(t.json||t.lossy),!!t.json,new Map,n)(e),n}var{parse:qC,stringify:JC}=JSON,YC={json:!0,lossy:!0};function XC(e){return zC(qC(e))}function ZC(e){return JC(KC(e,YC))}function QC(e){return zC(e)}function $C(e){return ZC(e)}function ew(e){return XC(e)}var tw=256,nw=class extends Error{name=`StreamClosedError`};function rw(e={}){let t=e.id??nS(),n=Math.max(0,e.replayWindow??0),r=Jx(),i=new AbortController,a=[],o=!1,s=0;function c(e){if(o)throw new nw(`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=aw(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 iw(e={}){let t=e.id??nS(),n=Math.max(1,e.highWaterMark??tw),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 aw(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 ow=128;function sw(e){return e.replace(/[^\w-]+/g,`_`).slice(0,ow)}var cw=`modulepreload`,lw=function(e,t){return new URL(e,t).href},uw={},dw=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=lw(t,n),t=s(t),t in uw)return;uw[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`:cw,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)})},fw=`__connection.json`,pw=`__DEVFRAME_CONNECTION__`,mw=`x-birpc-session`,hw=`__rpc-dump/index.json`,gw=`devframe:services`,_w=`devframe_otp`,vw=`devframe_auth_token`;mx.postMessage.remoteAssetsError;var yw=class{cacheMap=new Map;options;keySerializer;constructor(e){this.options=e,this.keySerializer=e.keySerializer||(e=>qx(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()}},bw=_x({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 xw(e){if(e.agent&&e.jsonSerializable===!1)throw bw.DF0019({name:e.name});e.agent&&!e.jsonSerializable&&(e.jsonSerializable=!0)}async function Sw(e,t){let n=e[`~standard`].validate(t);return n instanceof Promise?await n:n}function Cw(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 ww(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 Dw(e,t){let n=e.handler;if(!n){let r=await Ew(e,t);if(!r.handler)throw bw.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 ww(e.name,r,t),o=await a(...n);return await Tw(e.name,i,o)}}var Ow=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 Dw(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 bw.DF0021({name:e.name});xw(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 bw.DF0022({name:e.name});xw(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 Dw(this.definitions.get(e),this.context)}getSchema(e){let t=this.definitions.get(e);if(!t)throw bw.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 kw(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 jw(t,`undefined`,r,e);return n}return i!==null&&Aw(i,r,e,t),n})}function Aw(e,t,n,r){if(typeof e==`bigint`)throw jw(r,`BigInt`,t,n);if(typeof e!=`object`)return;if(e instanceof Map)throw jw(r,`Map`,t,n);if(e instanceof Set)throw jw(r,`Set`,t,n);if(e instanceof Date)throw jw(r,`Date`,t,n);if(Array.isArray(e))return;let i=Object.getPrototypeOf(e);if(i!==null&&i!==Object.prototype)throw jw(r,e.constructor?.name??`class instance`,t,n)}function jw(e,t,n,r){let i=Mw(n,r);return bw.DF0020({name:e||``,type:t,path:i})}function Mw(e,t){return Array.isArray(e)?`[${t}]`:t===``?``:t}var Nw=`__DEVFRAME_CONNECTION_META__`,Pw=`__DEVFRAME_CONNECTION_AUTH_TOKEN__`;function Fw(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 Iw(){return Fw(pw)}function Lw(){return Fw(Nw)}function Rw(e){if(e)return e;try{let e=localStorage.getItem(Pw);if(e)return e}catch{}return Fw(Pw)}function zw(e){globalThis[pw]=e,globalThis[Nw]={...e.connectionMeta,baseUrl:e.metaBaseUrl},e.authToken&&Bw(e.authToken)}function Bw(e){try{localStorage.setItem(Pw,e)}catch{}globalThis[Pw]=e;let t=Iw();t&&(globalThis[pw]={...t,authToken:e})}function Vw(e){let t=$x(fw,e);try{return new URL(t,globalThis.location?.href).href}catch{return t}}function Hw(e,t){return t&&t!==e.authToken?{...e,authToken:t}:e}function Uw(){let e=Iw();if(e)return Hw(e,Rw()??e.authToken??e.connectionMeta.authToken);let t=Lw();if(t)return{connectionMeta:t,metaBaseUrl:t.baseUrl??Vw(`./`),authToken:Rw(t.authToken)}}async function Ww(e={}){if(e.connection){let t=Hw(e.connection,Rw(e.authToken??e.connection.authToken??e.connection.connectionMeta.authToken));return zw(t),t}let t=Array.isArray(e.baseURL)?e.baseURL:[e.baseURL??`./`];if(e.connectionMeta){let n={connectionMeta:e.connectionMeta,metaBaseUrl:Vw(t[0]??`./`),authToken:Rw(e.authToken??e.connectionMeta.authToken)};return zw(n),n}let n=Uw();if(n){let t=Hw(n,Rw(e.authToken??n.authToken??n.connectionMeta.authToken));return zw(t),t}let r=[];for(let n of t){let t=$x(fw,n),i=Vw(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:Rw(e.authToken??r.authToken)};return zw(o),o}catch(e){r.push(e)}}throw Error(`Failed to get connection meta from ${t.join(`, `)}`,{cause:r})}var Gw=class extends Error{name=`DevframeConnectionError`;kind;constructor(e,t,n){super(t,n),this.kind=e}};function Kw(e=_w){try{let t=globalThis.location?.hash?.replace(/^#/,``)??``;return new URLSearchParams(t).get(e)||void 0}catch{return}}function qw(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 Jw(e=_w){let t=Kw(e);return t&&qw(e),t}async function Yw(e,t={}){let n=Jw(t.param??`devframe_otp`);return n?e.isTrusted?!0:e.requestTrustWithCode(n):!1}function Xw(e){let t={},n=new WeakMap,r,i=()=>(r??=e.sharedState.get(gw,{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 Zw(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:mx.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:mx.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=PC({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(mx.client.isTrustedUpdated,e=>{e&&!n&&(n=!0,d())})}})}}}var Qw=new Map;function $w(e=Qw){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?kw(n,r??``):`s:${$C(n)}`},deserialize:e=>{let n=e.startsWith(`s:`)?ew(e.slice(2)):JSON.parse(e);return n.t===`q`&&n.i&&n.m&&t.set(n.i,n.m),n}}}function eT(){}function tT(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 nT(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 rT(e){let{onConnected:t=eT,onError:n=eT,onDisconnected:r=eT,definitions:i,fetch:a=globalThis.fetch.bind(globalThis)}=e,o=e.url;e.authToken&&(o=`${o}${o.includes(`?`)?`&`:`?`}${vw}=${encodeURIComponent(e.authToken)}`);let s=$w(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=tT(r);if(!e)break;r=e.rest;let{event:t,data:n}=nT(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`,[mw]: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 iT(e,t){let{channel:n,rpcOptions:r={}}=t;return Dx(e,{...n,timeout:-1,...r,proxify:!1})}function aT(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(mx.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 Gw(`connection`,`[devframe] Not connected to the devframe server`,{cause:u??void 0}):l===`unauthorized`?new Gw(`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(mx.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 Gw(`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(mx.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(mx.client.connectionError,e),m(new Gw(`connection`,`[devframe] Connection to the devframe server failed`,{cause:e}))},onDisconnected(){l!==`error`&&f(`disconnected`),m(new Gw(`connection`,`[devframe] Disconnected from the devframe server`,{cause:u??void 0}))}}),v=iT(a.functions,{channel:ee,rpcOptions:o});a.register({name:mx.broadcast.authRevoked,type:`event`,handler:()=>{c=!1;let e=new Gw(`auth`,`[devframe] The devframe server revoked this client's trust`);f(`unauthorized`,e),i.emit(mx.client.connectionError,e),m(e),i.emit(mx.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 Gw(`auth`,`[devframe] The devframe server refused this client's credentials`);f(`unauthorized`,e),i.emit(mx.client.connectionError,e)}return i.emit(mx.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(mx.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(mx.client.error,n,t),Promise.reject(n)):g(v.$call(...e),t)},callEvent:(...e)=>{let t=h();if(t){i.emit(mx.client.error,t,String(e[0]));return}return v.$callEvent(...e)},callOptional:(...e)=>{let t=String(e[0]),n=h();return n?(i.emit(mx.client.error,n,t),Promise.reject(n)):g(v.$callOptional(...e),t)},close:()=>{ee.close()}}}function oT(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 sT(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},sseOptions:s={},callTimeout:c=0}=e,l=oT(n.sse,r??`./`,location);return aT({transport:`sse`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>rT({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 cT(e){let{name:t,message:n,cause:r,...i}=e,a=r instanceof Error?r:lT(r)?cT(r):r,o=a===void 0?Error(n):Error(n,{cause:a});return o.name=t,Object.assign(o,i),o}function lT(e){return typeof e==`object`&&!!e&&typeof e.message==`string`&&typeof e.name==`string`}function uT(e){return typeof e==`object`&&!!e&&e.type===`static`&&typeof e.path==`string`}function dT(e){return typeof e==`object`&&!!e&&e.type===`query`&&typeof e.records==`object`&&e.records!==null}function fT(e){return typeof e==`object`&&!!e&&(`output`in e||`error`in e)}function pT(e){if(e.error)throw cT(e.error);return e.output}function mT(e){return e.some(e=>e!=null)}function hT(e){return typeof e==`object`&&e&&`serialization`in e&&`data`in e?e.data:e}function gT(e,t){let n=new Map,r=new Map;function i(e,t){return t===`structured-clone`&&Array.isArray(e)?QC(e):e}function a(e,t){return i(hT(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 fT(r)?pT(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(uT(r)){if(mT(n))throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`);return await o(r)}if(dT(r)){let e=qx(n),i=r.records[e];if(i)return pT(await s(i,r.serialization));if(r.fallback)return pT(await s(r.fallback,r.serialization));throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`)}if(!mT(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 _T(e){let t=gT(await e.fetchJsonFromBases(hw),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 vT=``;function yT(e,t){return`${e}${vT}${t}`}function bT(e){let t=new Map,n=new Map;e.client.register({name:mx.broadcast.streamingChunk,type:`event`,handler(e,n,r,i){t.get(yT(e,n))?._push(r,i)}}),e.client.register({name:mx.broadcast.streamingEnd,type:`event`,handler(e,n,r){let i=yT(e,n),a=t.get(i);a&&(a._end(r),t.delete(i))}}),e.client.register({name:mx.broadcast.streamingUploadCancel,type:`event`,handler(e,t){let r=yT(e,t),i=n.get(r);i&&(i.abort(`server cancelled upload`),n.delete(r))}}),e.events.on(mx.client.isTrustedUpdated,n=>{if(n)for(let[n,r]of t){if(r.cancelled||r.done)continue;let t=n.indexOf(vT);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=yT(n,r),o=t.get(a);if(o)return o;let s=iw({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(mx.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=yT(t,r),a=n.get(i);if(a)return a;let o=rw({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 xT(){}var ST=new Map;function CT(e){let t=e.url;e.authToken&&(t=`${t}?${vw}=${encodeURIComponent(e.authToken)}`);let n=new WebSocket(t),{onConnected:r=xT,onError:i=xT,onDisconnected:a=xT,definitions:o=ST}=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=$w(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 wT(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 eS(a,/^https/i.test(a)?`wss://`:`ws://`);let o=new URL(a,r);return o.protocol=i,o.href}function TT(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},wsOptions:s={},callTimeout:c=0}=e,l=wT(n.websocket,r??`./`,location);return aT({transport:`websocket`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>CT({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 ET(e){return e.includes(`:`)}function DT(e,t){return ET(t)?t:`${e}:${t}`}function OT(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 kT(e,t,n){let r=`devframe:settings:${n}:${t}`,i;function a(){return i||=e.sharedState.get(r,{initialValue:{}}),i}return OT(a)}function AT(e,t){return{global:kT(e,t,`global`),project:kT(e,t,`project`)}}function jT(e,t){return{namespace:t,base:e,rpc:{namespace:t,register(n){if(ET(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(DT(t,n),...r)),callEvent:((n,...r)=>e.callEvent(DT(t,n),...r)),callOptional:((n,...r)=>e.callOptional(DT(t,n),...r)),sharedState:((n,r)=>e.sharedState.get(DT(t,n),r)),streaming:{subscribe:(n,r,i)=>e.streaming.subscribe(DT(t,n),r,i),upload:(n,r)=>e.streaming.upload(DT(t,n),r)}},settings:AT(e,t),scope:e.scope}}function MT(){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 NT(e,t={}){let n=t.modelContext??MT();if(!n)return()=>{};let r=n,i=new Map,a=new Map;function o(t,n){let o=sw(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=Ox(t.type,n),u=r.registerTool({name:o,description:n.description,inputSchema:jx(t.args),annotations:{title:n.title??t.name,readOnlyHint:l===`read`,destructiveHint:l===`destructive`},execute:n=>PT(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 PT(e,t,n){try{let r=Nx(n,e.args?.length);return{content:[{type:`text`,text:FT(await(await Dw(e,t))(...r))}]}}catch(e){return{isError:!0,content:[{type:`text`,text:IT(e)}]}}}function FT(e){return e===void 0?`undefined`:typeof e==`string`?e:JSON.stringify(e,null,2)}function IT(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 LT(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 RT(e={}){let{baseURL:t=`./`,rpcOptions:n={},cacheOptions:r=!1}=e,i=Jx(),a=Array.isArray(t)?t:[t],o=await Ww(e),{connectionMeta:s,metaBaseUrl:c,authToken:l}=o,u=a[0]??`./`;try{u=new URL(`.`,c).href}catch{}let d=new yw({functions:[],...typeof e.cacheOptions==`object`?e.cacheOptions:{}}),f={rpc:void 0},p=new Ow(f),m=e.webmcp===!1?void 0:NT(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($x(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=LT(e.transport??`auto`,s),te=v===`static`?await _T({fetchJsonFromBases:_}):v===`sse`?sT({...ee,sseOptions:e.sseOptions}):TT({...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=>(Bw(e),o={...o,authToken:e},te.requestTrustWithToken(e)),requestTrustWithCode:async e=>{let t=await te.requestTrustWithCode(e);if(!t)return!1;Bw(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=Zw(se),se.streaming=bT(se),se.services=Xw(se);let ce=new Map;se.scope=(e=>{if(!e)return se;let t=ce.get(e);return t||(t=jT(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 Yw(se,{param:n}):!1;t||r||se.isTrusted||await ue()}return re=de().then(()=>{ie=!0},()=>{ie=!0}),s.mcp&&dw(async()=>{let{setupBrowserAgentRpcBridge:e}=await import(`./browser-agent-rpc-BXhoSh1z-ByKLZCxu.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 zT=RT,BT=[`components`,`injectors`,`signals`,`ngrx`,`forms`,`router`,`pipes`,`http`,`analog`,`capacitor`],VT=[`angular`,`ngrx`,`analog`,`angular-native`,`nativescript`,`capacitor`];function HT(e){return`pangular:${e}`}var UT=[`forms`,`router`,`ngrx`,`http`,`analog`,`components`],WT={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},cdCycles:{default:200,min:10,max:2e3},capacitorCalls:{default:200,min:10,max:2e3}},GT={"opted-out":`the request sets transferCache: false`,post:`POST requests are left out unless includePostRequests is set`,method:`only GET, HEAD and POST requests are cached`,"auth-headers":`it sends an Authorization, Proxy-Authorization or Cookie header`,credentials:`it sends credentials (withCredentials or credentials: include/same-origin)`,"no-cache-request":`the request asks for no-store, no-cache or private`,"no-cache-response":`the response has Cache-Control no-store, no-cache or private`,"set-cookie":`the response sets a cookie`,error:`failed responses are not stored`,mocked:`a fault rule answered before the transfer cache ran`,"cache-off-or-filter":`the transfer cache is off, or its filter (or another withHttpTransferCacheOptions setting) left it out`},KT=[[200,`OK`],[201,`Created`],[202,`Accepted`],[203,`Non-Authoritative Information`],[204,`No Content`],[205,`Reset Content`],[206,`Partial Content`],[207,`Multi-Status`],[208,`Already Reported`],[226,`IM Used`],[300,`Multiple Choices`],[301,`Moved Permanently`],[302,`Found`],[303,`See Other`],[304,`Not Modified`],[307,`Temporary Redirect`],[308,`Permanent Redirect`],[400,`Bad Request`],[401,`Unauthorized`],[402,`Payment Required`],[403,`Forbidden`],[404,`Not Found`],[405,`Method Not Allowed`],[406,`Not Acceptable`],[407,`Proxy Authentication Required`],[408,`Request Timeout`],[409,`Conflict`],[410,`Gone`],[411,`Length Required`],[412,`Precondition Failed`],[413,`Content Too Large`],[414,`URI Too Long`],[415,`Unsupported Media Type`],[416,`Range Not Satisfiable`],[417,`Expectation Failed`],[418,`I'm a Teapot`],[421,`Misdirected Request`],[422,`Unprocessable Content`],[423,`Locked`],[424,`Failed Dependency`],[425,`Too Early`],[426,`Upgrade Required`],[428,`Precondition Required`],[429,`Too Many Requests`],[431,`Request Header Fields Too Large`],[451,`Unavailable For Legal Reasons`],[499,`Client Closed Request`],[500,`Internal Server Error`],[501,`Not Implemented`],[502,`Bad Gateway`],[503,`Service Unavailable`],[504,`Gateway Timeout`],[505,`HTTP Version Not Supported`],[506,`Variant Also Negotiates`],[507,`Insufficient Storage`],[508,`Loop Detected`],[510,`Not Extended`],[511,`Network Authentication Required`],[520,`Web Server Returned an Unknown Error`],[521,`Web Server Is Down`],[522,`Connection Timed Out`],[523,`Origin Is Unreachable`],[524,`A Timeout Occurred`]];function qT(e){return KT.some(([t])=>t===e)}var JT=`pangular`;function YT(e){return e&&typeof e==`object`&&!Array.isArray(e)?e:{}}function XT(e,t){return typeof e==`boolean`?e:t}var ZT=100,QT=100;function $T(e){if(!Array.isArray(e))return[];let t=e.filter(e=>typeof e==`string`).map(e=>e.trim()).filter(e=>e&&e.length<=QT);return[...new Set(t)].slice(0,ZT)}function eE(e,t){let{default:n,min:r,max:i}=WT[t];return typeof e!=`number`||!Number.isFinite(e)?n:Math.min(i,Math.max(r,Math.round(e)))}function tE(e,t){return Object.fromEntries(e.map(e=>[e,t(e)]))}function nE(e){let t=YT(e),n=YT(t.agent),r=YT(t.inspectors),i=YT(n.tools),a=YT(t.actions),o=XT(t.actions,!0),s=YT(t.redaction),c=YT(t.limits),l=tE(BT,e=>XT(r[e],!0));return{inspectors:l,agent:{readOnly:XT(n.readOnly,!1),tools:tE(BT,e=>l[e]&&XT(i[e],!0))},actions:tE(UT,e=>l[e]&&XT(a[e],o)),redaction:{secretNames:$T(s.secretNames),unmask:$T(s.unmask)},limits:Object.fromEntries(Object.keys(WT).map(e=>[e,eE(c[e],e)]))}}function rE(e){let t=e?.configs;return nE(t?.[JT])}function iE(e){return`${{forms:`Writing to forms`,router:`Navigating and clearing navigations`,ngrx:`Restoring NgRx state and dispatching actions`,http:`Changing HTTP mock rules and clearing HTTP calls`,analog:`Calling API routes and clearing server calls`,components:`Editing component properties and signals`}[e]} is turned off in the devtools config (actions.${e}).`}var aE={components:`Components`,injectors:`Injectors`,signals:`Signals`,ngrx:`NgRx`,forms:`Forms`,router:`Router`,pipes:`Pipes`,http:`HTTP`,analog:`Analog`,capacitor:`Capacitor`},oE={forms:`Form writes`,router:`Navigation`,ngrx:`NgRx restore and dispatch`,http:`HTTP mocking`,analog:`Analog API calls`,components:`Component edits`},sE={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`,cdCycles:e=>`${e} change detection cycles`,capacitorCalls:e=>`${e} Capacitor plugin calls`};function cE(e){let t=[],n=(e,n)=>{n.length&&t.push({label:e,value:n.join(`, `)})},r=BT.filter(t=>e.inspectors[t]);return n(`Inspectors off`,BT.filter(t=>!e.inspectors[t]).map(e=>aE[e])),n(`Agent`,e.agent.readOnly?[`Read-only`]:[]),n(`Hidden from the agent`,r.filter(t=>!e.agent.tools[t]).map(e=>aE[e])),n(`Blocked actions`,UT.filter(t=>e.inspectors[t]&&!e.actions[t]).map(e=>oE[e])),n(`Extra secret names`,e.redaction.secretNames),n(`Unmasked names`,e.redaction.unmask),n(`Limits`,Object.keys(WT).filter(t=>e.limits[t]!==WT[t].default).map(t=>sE[t](e.limits[t]))),t}var lE=`pangular-page-id`,uE=null;function dE(e){uE=e}function fE(){if(uE)return uE;try{return new URLSearchParams(location.search).get(`pageId`)||(window.top===window?null:sessionStorage.getItem(lE)||null)}catch{return null}}function pE(e,t){if(t.chosen&&e[t.chosen])return t.chosen;if(t.host)return t.host;if(t.previous&&e[t.previous])return t.previous;let n=null;for(let t of Object.values(e))(!n||t.reportedAt>n.reportedAt)&&(n=t);return n?.pageId??null}function mE(e,t){return e?t?e.pages?.[t]??null:e:null}function hE(e,t){return e?t?e.pages?.[t]??null:e.graph??null:null}function gE(e,t,n){return e?e.scope(`pangular`).rpc.call(t,...n===void 0?[]:[n]):Promise.resolve(null)}function _E(e,t,n){return gE(e,t,n).then(e=>e,()=>null)}function vE(e){return e?.connectionMeta.backend===`static`}function yE(e){let t=()=>{let t=e()?.scope(`pangular`).rpc;t&&(t.callEvent(`request-page-highlight`,null),t.callEvent(`request-form-highlight`,null))};return addEventListener(`pagehide`,t),()=>{removeEventListener(`pagehide`,t),t()}}function bE(e){return e.split(`@`)[1]??``}var xE={signal:`Signal Forms`,reactive:`Reactive`,template:`Template-driven`},SE={own:`validator`,directive:`template attribute`,tree:`cross-field rule`,async:`async`,parse:`parse`,submission:`server`,schema:`schema`,manual:`setErrors`},CE=_E,wE={key:`name looks secret`,"input-type":`password input`,autocomplete:`autocomplete is a secret kind`,marker:`marked as mask`,parent:`inside a secret group`,config:`listed in mask`};function TE(e){return wE[e]??e}var EE=`https://pangular-inspector.dev/security/#opt-fields-in-or-out`;async function DE(e,t){return await CE(e,`request-form-action`,t)??{ok:!1,error:`The devtools server did not answer.`}}function OE(e){return`${e.ok?e.message??`Done.`:e.error??`Failed.`}${e.skipped?.length?` Skipped: ${e.skipped.map(e=>`${e.path} (${e.reason})`).join(`, `)}.`:``}${e.status?` Status: ${e.status}.`:``}`}var kE=/"(?:[^"\\\n]|\\.)*"|`([^`\n]*)`|\*\*/g;function AE(e){return(e??``).replace(/^_Labels, paths.*_\n\n/,``).replace(kE,(e,t)=>t??(e===`**`?``:e))}function jE(e){return rE(e?.connectionMeta)}function ME(e,t){return jE(e).actions[t]}var NE={components:`components`,routes:`router`,signals:`signals`,injectors:`injectors`,store:`ngrx`,forms:`forms`,pipes:`pipes`,network:`http`,analog:`analog`,capacitor:`capacitor`};function PE(e){return NE[e]}var FE=`https://pangular-inspector.dev/getting-started/configuration/#inspectors-and-agent-tools`;function IE(e,t){let n=NE[e];return!n||t.inspectors[n]}function LE(e,t){e&1&&(A(),zg(0,`rect`,4)(1,`rect`,5)(2,`rect`,6)(3,`rect`,7))}function RE(e,t){e&1&&(A(),zg(0,`path`,8)(1,`path`,9)(2,`path`,10))}function zE(e,t){e&1&&(A(),zg(0,`circle`,11)(1,`path`,12)(2,`circle`,13))}function BE(e,t){e&1&&(A(),zg(0,`path`,1))}function VE(e,t){e&1&&(A(),zg(0,`path`,14)(1,`path`,15)(2,`path`,16)(3,`path`,17))}function HE(e,t){e&1&&(A(),zg(0,`ellipse`,18)(1,`path`,19)(2,`path`,20))}function UE(e,t){e&1&&(A(),zg(0,`rect`,21)(1,`path`,22)(2,`path`,23)(3,`path`,24))}function WE(e,t){e&1&&(A(),zg(0,`circle`,25)(1,`path`,26)(2,`path`,27))}function GE(e,t){e&1&&(A(),zg(0,`path`,28)(1,`path`,29)(2,`path`,30)(3,`path`,31)(4,`circle`,32))}function KE(e,t){e&1&&(A(),zg(0,`path`,2))}function qE(e,t){e&1&&(A(),zg(0,`path`,3))}var JE=class e{name=$.required();static ɵfac=function(t){return new(t||e)};static ɵcmp=Wh({type:e,selectors:[[`app-tab-icon`]],inputs:{name:[1,`name`]},decls:12,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`],[`fill`,`currentColor`,`stroke`,`none`,`transform`,`translate(1.8 1.8) scale(0.85)`,`d`,`M24 3.7l-5.766 5.766 5.725 5.736-3.713 3.712L5.073 3.742 8.786.03l5.736 5.726L20.284 0 24 3.7zM.029 8.785l3.713-3.713 15.173 15.173-3.713 3.714-5.732-5.726L3.7 24 0 20.285l5.754-5.764L.029 8.785z`],[`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&&(A(),H(0,`svg`,0),P(1,LE,4,0)(2,RE,3,0)(3,zE,3,0)(4,BE,1,0,`:svg:path`,1)(5,VE,4,0)(6,HE,3,0)(7,UE,4,0)(8,WE,3,0)(9,GE,5,0)(10,KE,1,0,`:svg:path`,2)(11,qE,1,0,`:svg:path`,3),U()),e&2){let e;M(),F((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:e===`capacitor`?11:-1)}},styles:[`[_nghost-%COMP%] {
   display: inline-flex;
   flex-shrink: 0;
-}`]})},qE=(e,t)=>t.tab,JE=(e,t)=>t.label;function YE(e,t){e&1&&J(0),e&2&&X(` `,K().meta()?.projectName,` `)}function XE(e,t){e&1&&J(0,` Project details unavailable `)}function ZE(e,t){e&1&&J(0,` Loading… `)}function QE(e,t){e&1&&(J(0,` Run `),z(1,`code`),J(2,`pangular build`),B(),J(3,` again to rebuild the report. `))}function $E(e,t){e&1&&J(0,` Check that the dev server is running. `)}function eD(e,t){if(e&1){let e=W();z(0,`button`,12),G(`click`,function(){return O(e),k(K(2).loadMeta())}),J(1,`Try again`),B()}}function tD(e,t){if(e&1&&(z(0,`p`,10),P(1,QE,4,0)(2,$E,1,0),B(),P(3,eD,2,0,`button`,11)),e&2){let e=K();M(),F(e.staticReport()?1:2),M(2),F(e.staticReport()?-1:3)}}function nD(e,t){e&1&&(z(0,`li`,5)(1,`span`),J(2,`Analog`),B(),J(3),B()),e&2&&(M(3),Y(t))}function rD(e,t){e&1&&(z(0,`li`)(1,`span`),J(2,`Change detection`),B(),J(3),B()),e&2&&(M(3),Y(t))}function iD(e,t){if(e&1&&(z(0,`span`,19),J(1),B(),z(2,`span`,20),J(3),B()),e&2){let e=K().$implicit,t=K();M(),Y(t.cards()[e.tab]?.value),M(2),Y(t.cards()[e.tab]?.sub)}}function aD(e,t){e&1&&(z(0,`span`,21),J(1,`–`),B(),z(2,`span`,20),J(3,`Count unavailable`),B())}function oD(e,t){e&1&&(V(0,`span`,22),z(1,`span`,20),J(2,`Counting…`),B())}function sD(e,t){if(e&1){let e=W();z(0,`button`,13),G(`click`,function(){let t=O(e).$implicit;return k(K().navigate.emit(t.tab))}),z(1,`span`,14)(2,`span`,15),V(3,`app-tab-icon`,16),B(),z(4,`span`,17),J(5,`→`),B()(),z(6,`span`,18),J(7),B(),P(8,iD,4,2)(9,aD,4,0)(10,oD,3,0),B()}if(e&2){let e,n=t.$implicit,r=t.$index,i=K().stateOf(n.tab);j_(`animation-delay`,60*r,`ms`),N(`aria-busy`,i===`loading`),M(3),R(`name`,n.tab),M(4),Y(n.label),M(),F((e=i)===`ready`?8:e===`error`?9:10)}}function cD(e,t){e&1&&(z(0,`p`),J(1,`Loading…`),B())}function lD(e,t){if(e&1&&(z(0,`div`)(1,`dt`),J(2),B(),z(3,`dd`),J(4),B()()),e&2){let e=t.$implicit;M(2),Y(e.label),M(2),Y(e.value)}}function uD(e,t){if(e&1&&(z(0,`dl`),I(1,lD,5,2,`div`,null,JE),B()),e&2){let e=K();M(),L(e.configItems())}}function dD(e,t){e&1&&(z(0,`p`),J(1,`Defaults`),B())}var fD=[{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`},{tab:`forms`,label:`Forms`},{tab:`network`,label:`SSR & HTTP`}];function pD(e){return fD.filter(t=>PE(t.tab,e))}var mD={zoneless:`Zoneless`,zone:`zone.js`,"zone-unused":`Zoneless, zone.js loaded`};function hD(e){return e&&Object.hasOwn(mD,e)?mD[e]:null}var gD=new Set([`signal`,`computed`,`linkedSignal`,`effect`]),_D={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 vD(e,t,n){return`${e} ${e===1?t:n}`}function yD(e,t){for(let n of e??[])t(n),yD(n.children,t)}function bD(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 · ${vD(t,`directive`,`directives`)}`}}function xD(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 · ${vD(t,`redirect`,`redirects`)}`}}function SD(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]=_D[e]??[e,e];return vD(t,n,r)});return{value:e.length,sub:n.join(` · `)}}function CD(e,t){let n=e?.forms??[],r=t?n.filter(e=>vE(e.id)===t):n;if(!r.length)return{value:0,sub:`no forms on the page yet`};let i=r.filter(e=>e.root?.status===`INVALID`).length;return{value:r.length,sub:`${r.length===1?`form`:`forms`} · ${i} invalid`}}function wD(e){return e.cancelled||e.status===void 0?!1:e.status===0||e.status>=400}function TD(e,t){let n=e?.pages??[],r=t?n.find(e=>e.pageId===t)??null:n.reduce((e,t)=>!e||t.reportedAt>e.reportedAt?t:e,null),i=t&&!r?[]:e?.serverCalls??[],a=r?.initialUrl,o=[...a?i.filter(e=>!e.pageUrl||e.pageUrl===a):i,...r?.calls??[]];if(!o.length)return{value:0,sub:`no calls recorded yet`};let s=o.filter(wD).length;return{value:o.length,sub:`${o.length===1?`call`:`calls`} · ${s} failed`}}var ED=class e{rpc=$(null);navigate=Iv();staticReport=Q(()=>gE(this.rpc()));meta=j(null);config=Q(()=>kE(this.rpc()));stats=Q(()=>this.rpc()?pD(this.config()):[]);configItems=Q(()=>oE(this.config()));metaState=j(`loading`);states=j({});rows=j({});injectorTree=j(null);signalGraph=j(null);formsState=j(null);httpState=j(null);pageId=uE();destroyRef=E(ws);stopLive=[];zone=Q(()=>hD(fE(this.injectorTree(),this.pageId)?.zone));liveInjectors=Q(()=>{let e=fE(this.injectorTree(),this.pageId);if(!e?.roots?.length)return null;let t=0,n=0,r=e=>{t++,n+=e.providers?.length??0};return yD(e.roots,r),yD(e.environment,r),{injectors:t,providers:n}});liveSignals=Q(()=>{let e=pE(this.signalGraph(),this.pageId);return e?.nodes?.length?e.nodes.filter(e=>gD.has(e.kind??``)).length:null});cards=Q(()=>{let e=this.rows(),t={};if(e.components&&(t.components=bD(e.components)),e.routes&&(t.routes=xD(e.routes)),e.store&&(t.store=SD(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();r?t.injectors={value:r.injectors,sub:`live injectors · ${vD(r.providers,`provider`,`providers`)}`}:e.injectors&&(t.injectors={value:e.injectors.filter(e=>e.type!==`injection`).length,sub:`provider declarations in source`});let i=this.formsState();i&&(t.forms=CD(i,this.pageId));let a=this.httpState();return a&&(t.network=TD(a,this.pageId)),t});loadMeta(e=this.rpc()){e&&(this.metaState.set(`loading`),e.scope(`pangular`).rpc.call(`build-meta`).then(t=>{this.rpc()===e&&(this.meta.set(t),this.metaState.set(`ready`))}).catch(()=>{this.rpc()===e&&this.metaState.set(`error`)}))}constructor(){dc(()=>{let e=this.rpc();if(!e)return;let t=e.scope(`pangular`);this.states.set({}),this.rows.set({}),this.formsState.set(null),this.httpState.set(null),this.loadMeta(e);let n=kE(e),r=e=>PE(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(`pangular`).rpc,r=async(t,r,i)=>{let a=e=>i&&this.states.update(t=>({...t,[i]:e}));try{let i=await n.sharedState(t);if(this.destroyRef.destroyed||this.rpc()!==e)return;r(i.value()),a(`ready`),this.stopLive.push(i.on(`updated`,e=>r(e)))}catch{if(this.destroyRef.destroyed||this.rpc()!==e)return;r(null),a(`error`)}};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)),PE(`forms`,t)&&r(`forms`,e=>this.formsState.set(e??{}),`forms`),PE(`network`,t)&&r(`http`,e=>this.httpState.set(e??{}),`network`)])}unwatch(){for(let e of this.stopLive.splice(0))e()}static ɵfac=function(t){return new(t||e)};static ɵcmp=Wh({type:e,selectors:[[`app-dashboard`]],inputs:{rpc:[1,`rpc`]},outputs:{navigate:`navigate`},decls:33,vars:14,consts:[[`aria-labelledby`,`project-title`,1,`project`],[1,`project-head`],[1,`eyebrow`],[`id`,`project-title`],[1,`chips`],[1,`analog`],[1,`grid`],[`type`,`button`,1,`stat`,3,`animation-delay`],[`aria-labelledby`,`config-title`,1,`config`],[`id`,`config-title`],[1,`hint`],[`type`,`button`,1,`retry`],[`type`,`button`,1,`retry`,3,`click`],[`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&&(z(0,`section`,0)(1,`div`,1)(2,`p`,2),J(3,`Project`),B(),z(4,`h2`,3),P(5,YE,1,1)(6,XE,1,0)(7,ZE,1,0),B(),P(8,tD,4,2),B(),z(9,`ul`,4)(10,`li`)(11,`span`),J(12,`Angular`),B(),J(13),B(),z(14,`li`)(15,`span`),J(16,`TypeScript`),B(),J(17),B(),z(18,`li`)(19,`span`),J(20,`SSR`),B(),J(21),B(),P(22,nD,4,1,`li`,5),P(23,rD,4,1,`li`),B()(),z(24,`div`,6),I(25,sD,11,6,`button`,7,qE),B(),z(27,`section`,8)(28,`h2`,9),J(29,`Configuration`),B(),P(30,cD,2,0,`p`)(31,uD,3,0,`dl`)(32,dD,2,0,`p`),B()),e&2){let e,n,r;N(`aria-busy`,t.metaState()===`loading`),M(4),q(`muted`,t.metaState()!==`ready`),M(),F((e=t.metaState())===`ready`?5:e===`error`?6:7),M(3),F(t.metaState()===`error`?8:-1),M(),q(`pending`,t.metaState()===`loading`),M(4),Y(t.meta()?.angularVersion??`…`),M(4),Y(t.meta()?.typescript??`…`),M(4),Y(t.meta()?t.meta()?.ssr?`On`:`Off`:`…`),M(),F((n=t.meta()?.analog)?22:-1,n),M(),F((r=t.zone())?23:-1,r),M(2),L(t.stats()),M(2),N(`aria-busy`,!t.rpc()),M(3),F(t.rpc()?t.configItems().length?31:32:30)}},dependencies:[KE],styles:[`[_nghost-%COMP%] {
+}`]})},YE=(e,t)=>t.tab,XE=(e,t)=>t.label;function ZE(e,t){e&1&&J(0),e&2&&X(` `,K().meta()?.projectName,` `)}function QE(e,t){e&1&&J(0,` Project details unavailable `)}function $E(e,t){e&1&&J(0,` Loading… `)}function eD(e,t){e&1&&(J(0,` Run `),z(1,`code`),J(2,`pangular build`),B(),J(3,` again to rebuild the report. `))}function tD(e,t){e&1&&J(0,` Check that the dev server is running. `)}function nD(e,t){if(e&1){let e=W();z(0,`button`,12),G(`click`,function(){return O(e),k(K(2).loadMeta())}),J(1,`Try again`),B()}}function rD(e,t){if(e&1&&(z(0,`p`,10),P(1,eD,4,0)(2,tD,1,0),B(),P(3,nD,2,0,`button`,11)),e&2){let e=K();M(),F(e.staticReport()?1:2),M(2),F(e.staticReport()?-1:3)}}function iD(e,t){e&1&&(z(0,`li`,5)(1,`span`),J(2,`Analog`),B(),J(3),B()),e&2&&(M(3),Y(t))}function aD(e,t){e&1&&(z(0,`li`)(1,`span`),J(2,`Change detection`),B(),J(3),B()),e&2&&(M(3),Y(t))}function oD(e,t){if(e&1&&(z(0,`span`,19),J(1),B(),z(2,`span`,20),J(3),B()),e&2){let e=K().$implicit,t=K();M(),Y(t.cards()[e.tab]?.value),M(2),Y(t.cards()[e.tab]?.sub)}}function sD(e,t){e&1&&(z(0,`span`,21),J(1,`–`),B(),z(2,`span`,20),J(3,`Count unavailable`),B())}function cD(e,t){e&1&&(V(0,`span`,22),z(1,`span`,20),J(2,`Counting…`),B())}function lD(e,t){if(e&1){let e=W();z(0,`button`,13),G(`click`,function(){let t=O(e).$implicit;return k(K().navigate.emit(t.tab))}),z(1,`span`,14)(2,`span`,15),V(3,`app-tab-icon`,16),B(),z(4,`span`,17),J(5,`→`),B()(),z(6,`span`,18),J(7),B(),P(8,oD,4,2)(9,sD,4,0)(10,cD,3,0),B()}if(e&2){let e,n=t.$implicit,r=t.$index,i=K().stateOf(n.tab);j_(`animation-delay`,60*r,`ms`),N(`aria-busy`,i===`loading`),M(3),R(`name`,n.tab),M(4),Y(n.label),M(),F((e=i)===`ready`?8:e===`error`?9:10)}}function uD(e,t){e&1&&(z(0,`p`),J(1,`Loading…`),B())}function dD(e,t){if(e&1&&(z(0,`div`)(1,`dt`),J(2),B(),z(3,`dd`),J(4),B()()),e&2){let e=t.$implicit;M(2),Y(e.label),M(2),Y(e.value)}}function fD(e,t){if(e&1&&(z(0,`dl`),I(1,dD,5,2,`div`,null,XE),B()),e&2){let e=K();M(),L(e.configItems())}}function pD(e,t){e&1&&(z(0,`p`),J(1,`Defaults`),B())}var mD=[{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`},{tab:`forms`,label:`Forms`},{tab:`network`,label:`SSR & HTTP`}];function hD(e){return mD.filter(t=>IE(t.tab,e))}var gD={zoneless:`Zoneless`,zone:`zone.js`,"zone-unused":`Zoneless, zone.js loaded`};function _D(e){return e&&Object.hasOwn(gD,e)?gD[e]:null}var vD=new Set([`signal`,`computed`,`linkedSignal`,`effect`]),yD={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 bD(e,t,n){return`${e} ${e===1?t:n}`}function xD(e,t){for(let n of e??[])t(n),xD(n.children,t)}function SD(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 · ${bD(t,`directive`,`directives`)}`}}function CD(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 · ${bD(t,`redirect`,`redirects`)}`}}function wD(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]=yD[e]??[e,e];return bD(t,n,r)});return{value:e.length,sub:n.join(` · `)}}function TD(e,t){let n=e?.forms??[],r=t?n.filter(e=>bE(e.id)===t):n;if(!r.length)return{value:0,sub:`no forms on the page yet`};let i=r.filter(e=>e.root?.status===`INVALID`).length;return{value:r.length,sub:`${r.length===1?`form`:`forms`} · ${i} invalid`}}function ED(e){return e.cancelled||e.status===void 0?!1:e.status===0||e.status>=400}function DD(e,t){let n=e?.pages??[],r=t?n.find(e=>e.pageId===t)??null:n.reduce((e,t)=>!e||t.reportedAt>e.reportedAt?t:e,null),i=t&&!r?[]:e?.serverCalls??[],a=r?.initialUrl,o=[...a?i.filter(e=>!e.pageUrl||e.pageUrl===a):i,...r?.calls??[]];if(!o.length)return{value:0,sub:`no calls recorded yet`};let s=o.filter(ED).length;return{value:o.length,sub:`${o.length===1?`call`:`calls`} · ${s} failed`}}var OD=class e{rpc=$(null);navigate=Rv();staticReport=Q(()=>vE(this.rpc()));meta=j(null);config=Q(()=>jE(this.rpc()));stats=Q(()=>this.rpc()?hD(this.config()):[]);configItems=Q(()=>cE(this.config()));metaState=j(`loading`);states=j({});rows=j({});injectorTree=j(null);signalGraph=j(null);formsState=j(null);httpState=j(null);pageId=fE();destroyRef=E(ws);stopLive=[];zone=Q(()=>_D(mE(this.injectorTree(),this.pageId)?.zone));liveInjectors=Q(()=>{let e=mE(this.injectorTree(),this.pageId);if(!e?.roots?.length)return null;let t=0,n=0,r=e=>{t++,n+=e.providers?.length??0};return xD(e.roots,r),xD(e.environment,r),{injectors:t,providers:n}});liveSignals=Q(()=>{let e=hE(this.signalGraph(),this.pageId);return e?.nodes?.length?e.nodes.filter(e=>vD.has(e.kind??``)).length:null});cards=Q(()=>{let e=this.rows(),t={};if(e.components&&(t.components=SD(e.components)),e.routes&&(t.routes=CD(e.routes)),e.store&&(t.store=wD(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();r?t.injectors={value:r.injectors,sub:`live injectors · ${bD(r.providers,`provider`,`providers`)}`}:e.injectors&&(t.injectors={value:e.injectors.filter(e=>e.type!==`injection`).length,sub:`provider declarations in source`});let i=this.formsState();i&&(t.forms=TD(i,this.pageId));let a=this.httpState();return a&&(t.network=DD(a,this.pageId)),t});loadMeta(e=this.rpc()){e&&(this.metaState.set(`loading`),e.scope(`pangular`).rpc.call(`build-meta`).then(t=>{this.rpc()===e&&(this.meta.set(t),this.metaState.set(`ready`))}).catch(()=>{this.rpc()===e&&this.metaState.set(`error`)}))}constructor(){dc(()=>{let e=this.rpc();if(!e)return;let t=e.scope(`pangular`);this.states.set({}),this.rows.set({}),this.formsState.set(null),this.httpState.set(null),this.loadMeta(e);let n=jE(e),r=e=>IE(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(`pangular`).rpc,r=async(t,r,i)=>{let a=e=>i&&this.states.update(t=>({...t,[i]:e}));try{let i=await n.sharedState(t);if(this.destroyRef.destroyed||this.rpc()!==e)return;r(i.value()),a(`ready`),this.stopLive.push(i.on(`updated`,e=>r(e)))}catch{if(this.destroyRef.destroyed||this.rpc()!==e)return;r(null),a(`error`)}};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)),IE(`forms`,t)&&r(`forms`,e=>this.formsState.set(e??{}),`forms`),IE(`network`,t)&&r(`http`,e=>this.httpState.set(e??{}),`network`)])}unwatch(){for(let e of this.stopLive.splice(0))e()}static ɵfac=function(t){return new(t||e)};static ɵcmp=Wh({type:e,selectors:[[`app-dashboard`]],inputs:{rpc:[1,`rpc`]},outputs:{navigate:`navigate`},decls:33,vars:14,consts:[[`aria-labelledby`,`project-title`,1,`project`],[1,`project-head`],[1,`eyebrow`],[`id`,`project-title`],[1,`chips`],[1,`analog`],[1,`grid`],[`type`,`button`,1,`stat`,3,`animation-delay`],[`aria-labelledby`,`config-title`,1,`config`],[`id`,`config-title`],[1,`hint`],[`type`,`button`,1,`retry`],[`type`,`button`,1,`retry`,3,`click`],[`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&&(z(0,`section`,0)(1,`div`,1)(2,`p`,2),J(3,`Project`),B(),z(4,`h2`,3),P(5,ZE,1,1)(6,QE,1,0)(7,$E,1,0),B(),P(8,rD,4,2),B(),z(9,`ul`,4)(10,`li`)(11,`span`),J(12,`Angular`),B(),J(13),B(),z(14,`li`)(15,`span`),J(16,`TypeScript`),B(),J(17),B(),z(18,`li`)(19,`span`),J(20,`SSR`),B(),J(21),B(),P(22,iD,4,1,`li`,5),P(23,aD,4,1,`li`),B()(),z(24,`div`,6),I(25,lD,11,6,`button`,7,YE),B(),z(27,`section`,8)(28,`h2`,9),J(29,`Configuration`),B(),P(30,uD,2,0,`p`)(31,fD,3,0,`dl`)(32,pD,2,0,`p`),B()),e&2){let e,n,r;N(`aria-busy`,t.metaState()===`loading`),M(4),q(`muted`,t.metaState()!==`ready`),M(),F((e=t.metaState())===`ready`?5:e===`error`?6:7),M(3),F(t.metaState()===`error`?8:-1),M(),q(`pending`,t.metaState()===`loading`),M(4),Y(t.meta()?.angularVersion??`…`),M(4),Y(t.meta()?.typescript??`…`),M(4),Y(t.meta()?t.meta()?.ssr?`On`:`Off`:`…`),M(),F((n=t.meta()?.analog)?22:-1,n),M(),F((r=t.zone())?23:-1,r),M(2),L(t.stats()),M(2),N(`aria-busy`,!t.rpc()),M(3),F(t.rpc()?t.configItems().length?31:32:30)}},dependencies:[JE],styles:[`[_nghost-%COMP%] {
   display: block;
   max-width: 1200px;
 }
@@ -325,7 +325,7 @@ h2.muted[_ngcontent-%COMP%] {
   .skeleton[_ngcontent-%COMP%] {
     animation: none;
   }
-}`]})},DD=`pangular:panel-action-result`,OD=6e3,kD=0;function AD(e=window){return e.location.protocol===`chrome-extension:`&&e.parent!==e}function jD(e,t=window){let n=`pa-${Date.now().toString(36)}-${++kD}`;return new Promise(r=>{let i=e=>{t.clearTimeout(o),t.removeEventListener(`message`,a),r(e)},a=({source:e,origin:r,data:a})=>{if(e!==t.parent||r!==t.location.origin)return;let o=a;if(o?.type!==DD||o.requestId!==n)return;let{opened:s,error:c}=a;i({ok:o.ok===!0,...s===`file`||s===`class`?{opened:s}:{},...typeof c==`string`?{error:c}:{}})},o=t.setTimeout(()=>i({ok:!1,error:`timeout`}),OD);t.addEventListener(`message`,a),t.parent.postMessage({...e,requestId:n},t.location.origin)})}var MD=class e{available=AD();reveal(e,t){return jD({type:`pangular:reveal-element`,pageId:e,id:t})}openSource(e,t,n){return jD({type:`pangular:open-source`,pageId:e,id:t,...n?{file:n.file,line:n.line}:{}})}static ɵfac=function(t){return new(t||e)};static ɵprov=Al({token:e,factory:e.ɵfac})};function ND(e){return e?.platform===`angular-native`}function PD(e){return ND(e)||e?.platform===`nativescript`}function FD(e,t){let n=Object.values(e??{}).filter(ND);if(t&&n.some(e=>e.pageId===t))return t;let r=null;for(let e of n)(!r||e.reportedAt>r.reportedAt)&&(r=e);return r?.pageId??null}var ID=[`trigger`],LD=[`list`],RD=(e,t)=>t.value;function zD(e,t){if(e&1&&(H(0,`span`,4),J(1),U()),e&2){let e=K();M(),Y(e.current().hint)}}function BD(e,t){if(e&1&&(H(0,`span`,15),J(1),U()),e&2){let e=K().$implicit;M(),Y(e.hint)}}function VD(e,t){if(e&1){let e=W();H(0,`li`,11),n_(`pointerenter`,function(){let t=O(e).$index;return k(K(2).active.set(t))})(`pointerdown`,function(e){return e.preventDefault()})(`click`,function(){let t=O(e).$index;return k(K(2).choose(t))}),A(),H(1,`svg`,12),zg(2,`path`,13),U(),ms(),H(3,`span`,14),J(4),U(),P(5,BD,2,1,`span`,15),U()}if(e&2){let e=t.$implicit,n=t.$index,r=K(2);q(`active`,n===r.active())(`selected`,e.value===r.value()),N(`id`,r.uid+`-opt-`+n)(`aria-selected`,e.value===r.value())(`aria-disabled`,e.disabled||null),M(4),Y(e.label),M(),F(e.hint?5:-1)}}function HD(e,t){if(e&1&&(H(0,`li`,10),J(1),U()),e&2){let e=K(2);M(),Y(e.emptyText())}}function UD(e,t){if(e&1&&(H(0,`ul`,8,1),hg(`list-in`),n_(`pointerdown`,function(e){return e.preventDefault()}),I(2,VD,6,9,`li`,9,RD,!1,HD,2,1,`li`,10),U()),e&2){let e=K();q(`up`,e.dropUp()),N(`id`,e.uid+`-list`)(`aria-labelledby`,e.labelledBy()||e.uid+`-trigger`),M(2),L(e.options())}}var WD=0,GD=class e{options=$.required();value=Uv(null);placeholder=$(`Select…`);ariaLabel=$(``);labelledBy=$(``);describedBy=$(``);disabled=$(!1);emptyText=$(`Nothing to choose`);uid=`app-select-${++WD}`;open=j(!1);active=j(-1);dropUp=j(!1);current=Q(()=>this.options().find(e=>e.value===this.value())??null);host=E(Nl);injector=E(Ss);trigger=Kv.required(`trigger`);list=Kv(`list`);typed=``;typedAt=0;toggle(){this.open()?this.close():this.show()}choose(e){let t=this.options()[e];t&&!t.disabled&&(this.value.set(t.value),this.close(),this.trigger().nativeElement.focus())}onKey(e){let t=this.options(),n=this.open();switch(e.key){case`ArrowDown`:case`ArrowUp`:if(e.preventDefault(),!n){this.show();return}this.move(e.key===`ArrowDown`?1:-1);return;case`Home`:case`End`:if(!n)return;e.preventDefault(),this.setActive(e.key===`Home`?this.firstEnabled(0,1):this.firstEnabled(t.length-1,-1));return;case`Enter`:case` `:e.preventDefault(),n&&this.active()>=0?this.choose(this.active()):this.show();return;case`Escape`:if(!n)return;e.preventDefault(),e.stopPropagation(),this.close();return;case`Tab`:n&&this.close();return;default:e.key.length===1&&!e.metaKey&&!e.ctrlKey&&!e.altKey&&this.typeAhead(e.key)}}onBlur(e){let t=e.relatedTarget;t&&this.host.nativeElement.contains(t)||this.close()}onOutside(e){this.open()&&!this.host.nativeElement.contains(e.target)&&this.close()}show(){if(this.disabled())return;let e=this.host.nativeElement.getBoundingClientRect(),t=window.innerHeight-e.bottom;this.dropUp.set(t<220&&e.top>t);let n=this.options().findIndex(e=>e.value===this.value());this.open.set(!0),this.setActive(n>=0?n:this.firstEnabled(0,1))}close(){this.open.set(!1),this.active.set(-1)}move(e){let t=this.firstEnabled(this.active()+e,e);t>=0&&this.setActive(t)}firstEnabled(e,t){let n=this.options();for(let r=e;r>=0&&r{(this.list()?.nativeElement.querySelector(`#${this.uid}-opt-${e}`))?.scrollIntoView({block:`nearest`})},{injector:this.injector})}typeAhead(e){let t=performance.now();this.typed=t-this.typedAt>600?e.toLowerCase():this.typed+e.toLowerCase(),this.typedAt=t;let n=this.options().findIndex(e=>!e.disabled&&e.label.toLowerCase().startsWith(this.typed));n<0||(this.open()?this.setActive(n):this.value.set(this.options()[n].value))}static ɵfac=function(t){return new(t||e)};static ɵcmp=Wh({type:e,selectors:[[`app-select`]],viewQuery:function(e,t){e&1&&c_(t.trigger,ID,5)(t.list,LD,5),e&2&&l_(2)},hostAttrs:[1,`app-select`],hostVars:2,hostBindings:function(e,t){e&1&&G(`pointerdown`,function(e){return t.onOutside(e)},Nu),e&2&&q(`open`,t.open())},inputs:{options:[1,`options`],value:[1,`value`],placeholder:[1,`placeholder`],ariaLabel:[1,`ariaLabel`],labelledBy:[1,`labelledBy`],describedBy:[1,`describedBy`],disabled:[1,`disabled`],emptyText:[1,`emptyText`]},outputs:{value:`valueChange`},decls:8,vars:13,consts:[[`trigger`,``],[`list`,``],[`type`,`button`,`role`,`combobox`,`aria-haspopup`,`listbox`,1,`trigger`,3,`click`,`keydown`,`blur`,`disabled`],[1,`value`],[1,`value-hint`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`,1,`chevron`],[`d`,`m6 9 6 6 6-6`],[`role`,`listbox`,`tabindex`,`-1`,1,`list`,3,`up`],[`role`,`listbox`,`tabindex`,`-1`,1,`list`,3,`pointerdown`],[`role`,`option`,3,`active`,`selected`],[`role`,`option`,`aria-disabled`,`true`,1,`empty`],[`role`,`option`,3,`pointerenter`,`pointerdown`,`click`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`,1,`check`],[`d`,`m5 12 5 5 9-10`],[1,`label`],[1,`hint`]],template:function(e,t){e&1&&(H(0,`button`,2,0),n_(`click`,function(){return t.toggle()})(`keydown`,function(e){return t.onKey(e)})(`blur`,function(e){return t.onBlur(e)}),H(2,`span`,3),J(3),U(),P(4,zD,2,1,`span`,4),A(),H(5,`svg`,5),zg(6,`path`,6),U()(),P(7,UD,5,5,`ul`,7)),e&2&&(Gg(`disabled`,t.disabled()),N(`id`,t.uid+`-trigger`)(`aria-controls`,t.uid+`-list`)(`aria-expanded`,t.open())(`aria-label`,t.ariaLabel()||null)(`aria-labelledby`,t.labelledBy()||null)(`aria-describedby`,t.describedBy()||null)(`aria-activedescendant`,t.open()&&t.active()>=0?t.uid+`-opt-`+t.active():null),M(2),q(`placeholder`,!t.current()),M(),X(` `,t.current()?.label??t.placeholder(),` `),M(),F(t.current()?.hint?4:-1),M(3),F(t.open()?7:-1))},styles:[`[_nghost-%COMP%] {
+}`]})},kD=`pangular:panel-action-result`,AD=6e3,jD=0;function MD(e=window){return e.location.protocol===`chrome-extension:`&&e.parent!==e}function ND(e,t=window){let n=`pa-${Date.now().toString(36)}-${++jD}`;return new Promise(r=>{let i=e=>{t.clearTimeout(o),t.removeEventListener(`message`,a),r(e)},a=({source:e,origin:r,data:a})=>{if(e!==t.parent||r!==t.location.origin)return;let o=a;if(o?.type!==kD||o.requestId!==n)return;let{opened:s,error:c}=a;i({ok:o.ok===!0,...s===`file`||s===`class`?{opened:s}:{},...typeof c==`string`?{error:c}:{}})},o=t.setTimeout(()=>i({ok:!1,error:`timeout`}),AD);t.addEventListener(`message`,a),t.parent.postMessage({...e,requestId:n},t.location.origin)})}var PD=class e{available=MD();reveal(e,t){return ND({type:`pangular:reveal-element`,pageId:e,id:t})}openSource(e,t,n){return ND({type:`pangular:open-source`,pageId:e,id:t,...n?{file:n.file,line:n.line}:{}})}static ɵfac=function(t){return new(t||e)};static ɵprov=Al({token:e,factory:e.ɵfac})};function FD(e){return e?.platform===`angular-native`}function ID(e){return FD(e)||e?.platform===`nativescript`}function LD(e,t){let n=Object.values(e??{}).filter(FD);if(t&&n.some(e=>e.pageId===t))return t;let r=null;for(let e of n)(!r||e.reportedAt>r.reportedAt)&&(r=e);return r?.pageId??null}var RD=[`trigger`],zD=[`list`],BD=(e,t)=>t.value;function VD(e,t){if(e&1&&(H(0,`span`,4),J(1),U()),e&2){let e=K();M(),Y(e.current().hint)}}function HD(e,t){if(e&1&&(H(0,`span`,15),J(1),U()),e&2){let e=K().$implicit;M(),Y(e.hint)}}function UD(e,t){if(e&1){let e=W();H(0,`li`,11),n_(`pointerenter`,function(){let t=O(e).$index;return k(K(2).active.set(t))})(`pointerdown`,function(e){return e.preventDefault()})(`click`,function(){let t=O(e).$index;return k(K(2).choose(t))}),A(),H(1,`svg`,12),zg(2,`path`,13),U(),ms(),H(3,`span`,14),J(4),U(),P(5,HD,2,1,`span`,15),U()}if(e&2){let e=t.$implicit,n=t.$index,r=K(2);q(`active`,n===r.active())(`selected`,e.value===r.value()),N(`id`,r.uid+`-opt-`+n)(`aria-selected`,e.value===r.value())(`aria-disabled`,e.disabled||null),M(4),Y(e.label),M(),F(e.hint?5:-1)}}function WD(e,t){if(e&1&&(H(0,`li`,10),J(1),U()),e&2){let e=K(2);M(),Y(e.emptyText())}}function GD(e,t){if(e&1&&(H(0,`ul`,8,1),hg(`list-in`),n_(`pointerdown`,function(e){return e.preventDefault()}),I(2,UD,6,9,`li`,9,BD,!1,WD,2,1,`li`,10),U()),e&2){let e=K();q(`up`,e.dropUp()),N(`id`,e.uid+`-list`)(`aria-labelledby`,e.labelledBy()||e.uid+`-trigger`),M(2),L(e.options())}}var KD=0,qD=class e{options=$.required();value=Gv(null);placeholder=$(`Select…`);ariaLabel=$(``);labelledBy=$(``);describedBy=$(``);disabled=$(!1);emptyText=$(`Nothing to choose`);uid=`app-select-${++KD}`;open=j(!1);active=j(-1);dropUp=j(!1);current=Q(()=>this.options().find(e=>e.value===this.value())??null);host=E(Nl);injector=E(Ss);trigger=Jv.required(`trigger`);list=Jv(`list`);typed=``;typedAt=0;toggle(){this.open()?this.close():this.show()}choose(e){let t=this.options()[e];t&&!t.disabled&&(this.value.set(t.value),this.close(),this.trigger().nativeElement.focus())}onKey(e){let t=this.options(),n=this.open();switch(e.key){case`ArrowDown`:case`ArrowUp`:if(e.preventDefault(),!n){this.show();return}this.move(e.key===`ArrowDown`?1:-1);return;case`Home`:case`End`:if(!n)return;e.preventDefault(),this.setActive(e.key===`Home`?this.firstEnabled(0,1):this.firstEnabled(t.length-1,-1));return;case`Enter`:case` `:e.preventDefault(),n&&this.active()>=0?this.choose(this.active()):this.show();return;case`Escape`:if(!n)return;e.preventDefault(),e.stopPropagation(),this.close();return;case`Tab`:n&&this.close();return;default:e.key.length===1&&!e.metaKey&&!e.ctrlKey&&!e.altKey&&this.typeAhead(e.key)}}onBlur(e){let t=e.relatedTarget;t&&this.host.nativeElement.contains(t)||this.close()}onOutside(e){this.open()&&!this.host.nativeElement.contains(e.target)&&this.close()}show(){if(this.disabled())return;let e=this.host.nativeElement.getBoundingClientRect(),t=window.innerHeight-e.bottom;this.dropUp.set(t<220&&e.top>t);let n=this.options().findIndex(e=>e.value===this.value());this.open.set(!0),this.setActive(n>=0?n:this.firstEnabled(0,1))}close(){this.open.set(!1),this.active.set(-1)}move(e){let t=this.firstEnabled(this.active()+e,e);t>=0&&this.setActive(t)}firstEnabled(e,t){let n=this.options();for(let r=e;r>=0&&r{(this.list()?.nativeElement.querySelector(`#${this.uid}-opt-${e}`))?.scrollIntoView({block:`nearest`})},{injector:this.injector})}typeAhead(e){let t=performance.now();this.typed=t-this.typedAt>600?e.toLowerCase():this.typed+e.toLowerCase(),this.typedAt=t;let n=this.options().findIndex(e=>!e.disabled&&e.label.toLowerCase().startsWith(this.typed));n<0||(this.open()?this.setActive(n):this.value.set(this.options()[n].value))}static ɵfac=function(t){return new(t||e)};static ɵcmp=Wh({type:e,selectors:[[`app-select`]],viewQuery:function(e,t){e&1&&c_(t.trigger,RD,5)(t.list,zD,5),e&2&&l_(2)},hostAttrs:[1,`app-select`],hostVars:2,hostBindings:function(e,t){e&1&&G(`pointerdown`,function(e){return t.onOutside(e)},Nu),e&2&&q(`open`,t.open())},inputs:{options:[1,`options`],value:[1,`value`],placeholder:[1,`placeholder`],ariaLabel:[1,`ariaLabel`],labelledBy:[1,`labelledBy`],describedBy:[1,`describedBy`],disabled:[1,`disabled`],emptyText:[1,`emptyText`]},outputs:{value:`valueChange`},decls:8,vars:13,consts:[[`trigger`,``],[`list`,``],[`type`,`button`,`role`,`combobox`,`aria-haspopup`,`listbox`,1,`trigger`,3,`click`,`keydown`,`blur`,`disabled`],[1,`value`],[1,`value-hint`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`,1,`chevron`],[`d`,`m6 9 6 6 6-6`],[`role`,`listbox`,`tabindex`,`-1`,1,`list`,3,`up`],[`role`,`listbox`,`tabindex`,`-1`,1,`list`,3,`pointerdown`],[`role`,`option`,3,`active`,`selected`],[`role`,`option`,`aria-disabled`,`true`,1,`empty`],[`role`,`option`,3,`pointerenter`,`pointerdown`,`click`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`,1,`check`],[`d`,`m5 12 5 5 9-10`],[1,`label`],[1,`hint`]],template:function(e,t){e&1&&(H(0,`button`,2,0),n_(`click`,function(){return t.toggle()})(`keydown`,function(e){return t.onKey(e)})(`blur`,function(e){return t.onBlur(e)}),H(2,`span`,3),J(3),U(),P(4,VD,2,1,`span`,4),A(),H(5,`svg`,5),zg(6,`path`,6),U()(),P(7,GD,5,5,`ul`,7)),e&2&&(Gg(`disabled`,t.disabled()),N(`id`,t.uid+`-trigger`)(`aria-controls`,t.uid+`-list`)(`aria-expanded`,t.open())(`aria-label`,t.ariaLabel()||null)(`aria-labelledby`,t.labelledBy()||null)(`aria-describedby`,t.describedBy()||null)(`aria-activedescendant`,t.open()&&t.active()>=0?t.uid+`-opt-`+t.active():null),M(2),q(`placeholder`,!t.current()),M(),X(` `,t.current()?.label??t.placeholder(),` `),M(),F(t.current()?.hint?4:-1),M(3),F(t.open()?7:-1))},styles:[`[_nghost-%COMP%] {
   position: relative;
   display: inline-flex;
   min-width: 0;
@@ -520,7 +520,7 @@ li.selected[_ngcontent-%COMP%]   .check[_ngcontent-%COMP%] {
   .chevron[_ngcontent-%COMP%] {
     transition: none;
   }
-}`]})};function KD(e,t){let n=t.trim().toLowerCase();if(!n)return{nodes:e,matches:0};let r=0,i=e=>e.name.toLowerCase().includes(n)||e.tag.toLowerCase().includes(n)||!!e.directives?.some(e=>e.toLowerCase().includes(n)),a=e=>e.flatMap(e=>{let t=i(e);t&&r++;let n=a(e.children);return t||n.length?[{...e,children:n}]:[]});return{nodes:a(e),matches:r}}function qD(e,t,n,r=!1){let i=r?`${e}+`:`${e}`;return n?`${t} of ${i}`:`${i} ${e===1&&!r?`instance`:`instances`}`}function JD(e,t,n,r=!1){return n.trim()?t?`${t} of ${r?`${e}+`:`${e}`} ${e===1&&!r?`instance`:`instances`} match.`:`No components match.`:``}function YD(e){let t=e?.components,n=e?.depth;return t&&n?`Showing the first ${t} component instances, and none nested more than ${n} elements deep. Others are not listed or searchable.`:t?`Showing the first ${t} component instances. Others are not listed or searchable.`:n?`Components nested more than ${n} elements deep are not listed or searchable.`:`The page has more components than the tree shows.`}function XD(e,t){let n=t?.detail?.id??null,r=t?.pageId??null;if(r!==e.pageId)return{pageId:r,selectedId:n,detailId:n,destroyed:null};let i=e.selectedId;return n&&n!==e.detailId&&n!==i&&(i=n),i&&t&&!t.truncated&&!ZD(t.roots,i)?{pageId:r,selectedId:null,detailId:n,destroyed:i}:{pageId:r,selectedId:i,detailId:n,destroyed:null}}function ZD(e,t){return e.some(e=>e.id===t||ZD(e.children,t))}function QD(e,t,n){let r=e.indexOf(n);if(r<0)return null;for(let n=r+1;n=0;n--)if(t.has(e[n]))return e[n];return null}function $D(e){return new Date(e).toLocaleTimeString()}var eO=/[ \t\n\r]/;function tO(e){let t=e.trim(),n;try{n=JSON.parse(t)}catch{return null}if(typeof n!=`object`||!n)return null;let r=``,i=0,a=()=>`\n${`  `.repeat(i)}`;for(let e=0;e0?0:-1)},styles:[`[_nghost-%COMP%] {
+}`]})};function JD(e,t){let n=t.trim().toLowerCase();if(!n)return{nodes:e,matches:0};let r=0,i=e=>e.name.toLowerCase().includes(n)||e.tag.toLowerCase().includes(n)||!!e.directives?.some(e=>e.toLowerCase().includes(n)),a=e=>e.flatMap(e=>{let t=i(e);t&&r++;let n=a(e.children);return t||n.length?[{...e,children:n}]:[]});return{nodes:a(e),matches:r}}function YD(e,t,n,r=!1){let i=r?`${e}+`:`${e}`;return n?`${t} of ${i}`:`${i} ${e===1&&!r?`instance`:`instances`}`}function XD(e,t,n,r=!1){return n.trim()?t?`${t} of ${r?`${e}+`:`${e}`} ${e===1&&!r?`instance`:`instances`} match.`:`No components match.`:``}function ZD(e){let t=e?.components,n=e?.depth;return t&&n?`Showing the first ${t} component instances, and none nested more than ${n} elements deep. Others are not listed or searchable.`:t?`Showing the first ${t} component instances. Others are not listed or searchable.`:n?`Components nested more than ${n} elements deep are not listed or searchable.`:`The page has more components than the tree shows.`}function QD(e,t){let n=t?.detail?.id??null,r=t?.pageId??null;if(r!==e.pageId)return{pageId:r,selectedId:n,detailId:n,destroyed:null};let i=e.selectedId;return n&&n!==e.detailId&&n!==i&&(i=n),i&&t&&!t.truncated&&!$D(t.roots,i)?{pageId:r,selectedId:null,detailId:n,destroyed:i}:{pageId:r,selectedId:i,detailId:n,destroyed:null}}function $D(e,t){return e.some(e=>e.id===t||$D(e.children,t))}function eO(e,t,n){let r=e.indexOf(n);if(r<0)return null;for(let n=r+1;n=0;n--)if(t.has(e[n]))return e[n];return null}function tO(e){return new Date(e).toLocaleTimeString()}var nO=/[ \t\n\r]/;function rO(e){let t=e.trim(),n;try{n=JSON.parse(t)}catch{return null}if(typeof n!=`object`||!n)return null;let r=``,i=0,a=()=>`\n${`  `.repeat(i)}`;for(let e=0;e0?0:-1)},styles:[`[_nghost-%COMP%] {
   display: block;
 }
 
@@ -547,7 +547,7 @@ a[_ngcontent-%COMP%] {
 a[_ngcontent-%COMP%]:focus-visible {
   outline: 2px solid var(--%NS%accent);
   outline-offset: 2px;
-}`]})},aO=(e,t)=>t.id;function oO(e,t){if(e&1){let e=W();z(0,`button`,13),G(`click`,function(){return O(e),k(K().clear())}),J(1,`Clear`),B()}}function sO(e,t){e&1&&(z(0,`p`,9),J(1,`This page can't record change detection. It needs Angular 20 or later.`),B())}function cO(e,t){if(e&1&&(z(0,`p`,9),J(1),B()),e&2){let e=t.$implicit;M(),Y(e)}}function lO(e,t){if(e&1&&(z(0,`tr`)(1,`td`,17),J(2),B(),z(3,`td`,18),J(4),B(),z(5,`td`,18),J(6),B(),z(7,`td`,18),J(8),B()()),e&2){let e=t.$implicit,n=K(2);M(2),Y(e.name),M(2),Y(e.checks),M(2),Y(n.ms(e.ms)),M(2),Y(n.ms(e.maxMs))}}function uO(e,t){if(e&1&&(z(0,`span`,20),J(1,`after `),z(2,`span`,17),J(3),B()()),e&2){let e=K().$implicit;M(3),Y(e.trigger)}}function dO(e,t){if(e&1&&(z(0,`span`,21),J(1,` slowest `),z(2,`span`,17),J(3),B(),J(4),B()),e&2){let e=t,n=K(3);M(3),Y(e.name),M(),X(` `,n.ms(e.ms),` `)}}function fO(e,t){if(e&1&&(z(0,`li`)(1,`span`,19),J(2),B(),z(3,`span`,17),J(4),B(),z(5,`span`),J(6),B(),P(7,uO,4,1,`span`,20),P(8,dO,5,2,`span`,21),B()),e&2){let e,n=t.$implicit,r=K(2);M(2),Y(r.clock(n.at)),M(2),Y(r.ms(n.ms)),M(2),iv(` `,n.checks,` `,n.checks===1?`check`:`checks`,`, `,n.passes,` `,n.passes===1?`pass`:`passes`,` `),M(),F(n.trigger?7:-1),M(),F((e=n.components[0])?8:-1,e)}}function pO(e,t){if(e&1&&(z(0,`div`,11)(1,`div`)(2,`h3`),J(3,`Slowest components`),B(),z(4,`table`)(5,`thead`)(6,`tr`)(7,`th`,14),J(8,`Component`),B(),z(9,`th`,15),J(10,`Checks`),B(),z(11,`th`,15),J(12,`Self time`),B(),z(13,`th`,15),J(14,`Slowest`),B()()(),z(15,`tbody`),I(16,lO,9,4,`tr`,null,Dg),B()()(),z(18,`div`)(19,`h3`),J(20,`Latest cycles`),B(),z(21,`ol`,16),I(22,fO,9,8,`li`,null,aO),B()()()),e&2){let e=K();M(16),L(e.slowest()),M(6),L(e.latest())}}function mO(e,t){e&1&&(z(0,`p`,12),J(1,`Use the app. Cycles show up here as Angular runs change detection.`),B())}var hO=10,gO=class e{page=$(null);pageId=$(null);rpc=$(null);message=j(``);announcement=j(``);recording=Q(()=>this.page()?.recording===!0);cycles=Q(()=>this.page()?.cycles??[]);maxCycles=Q(()=>kE(this.rpc()).limits.cdCycles);slowest=Q(()=>[...this.page()?.components??[]].sort((e,t)=>t.ms-e.ms).slice(0,hO));latest=Q(()=>this.cycles().slice(-30).reverse());capNotes=Q(()=>{let e=this.page()?.droppedClasses??0,t=this.page()?.droppedHosts??0,n=[];return e>0&&n.push(`${e} more component ${e===1?`class was`:`classes were`} checked than a recording keeps, so ${e===1?`it is`:`they are`} left out of these totals.`),t>0&&n.push(`${t} component ${t===1?`instance was`:`instances were`} checked past the 2000 a recording counts, so ${t===1?`its tree row shows`:`their tree rows show`} no check count.`),n});status=Q(()=>{if(this.message())return this.message();let e=this.cycles().length;return this.recording()?`Recording. ${e} ${e===1?`cycle`:`cycles`} so far.`:e?`${e} ${e===1?`cycle`:`cycles`} recorded.`:``});ms(e){return`${e<10?e.toFixed(2):Math.round(e)} ms`}clock(e){return $D(e)}async toggle(){this.recording()?await this.send({on:!1},``,()=>{let e=this.cycles().length;return`Recording stopped. ${e} ${e===1?`cycle`:`cycles`} recorded.`}):await this.send({on:!0},`Starting…`,()=>`Recording started.`)}async clear(){await this.send({clear:!0},``,()=>`Cleared the recorded cycles.`)}async send(e,t,n){this.message.set(t);try{if(!this.rpc())throw Error(`no client`);await mE(this.rpc(),`request-change-detection-record`,{pageId:this.pageId(),...e}),this.message.set(``),this.announce(n())}catch{let e=`Could not reach the page.`;this.message.set(e),this.announce(e)}}announce(e){this.announcement.update(t=>t===e?`${e} `:e)}static ɵfac=function(t){return new(t||e)};static ɵcmp=Wh({type:e,selectors:[[`app-cd-recording`]],inputs:{page:[1,`page`],pageId:[1,`pageId`],rpc:[1,`rpc`]},decls:20,vars:11,consts:[[`aria-labelledby`,`cd-heading`,1,`cd`],[1,`cd-head`],[`id`,`cd-heading`],[`type`,`button`,3,`click`,`disabled`],[`aria-hidden`,`true`,1,`dot`],[`type`,`button`],[1,`status`],[`role`,`status`,1,`sr-only`],[1,`hint`],[1,`note`],[`what`,`cycles`,`limit`,`cdCycles`,3,`dropped`,`max`],[1,`cd-grid`],[1,`empty`],[`type`,`button`,3,`click`],[`scope`,`col`],[`scope`,`col`,1,`num`],[`aria-label`,`Latest change detection cycles, newest first`,1,`cycles`],[1,`mono`],[1,`num`],[1,`when`],[1,`trigger`],[1,`top`]],template:function(e,t){e&1&&(z(0,`section`,0)(1,`div`,1)(2,`h2`,2),J(3,`Change detection`),B(),z(4,`button`,3),G(`click`,function(){return t.toggle()}),V(5,`span`,4),J(6),B(),P(7,oO,2,0,`button`,5),z(8,`p`,6),J(9),B(),z(10,`p`,7),J(11),B()(),z(12,`p`,8),J(13,` Records each change detection cycle with Angular's profiler: how long it took, how many components it checked and the output that ran before it. Tree rows show how often each instance was checked. Times come from a development build. `),B(),P(14,sO,2,0,`p`,9),V(15,`app-limit-note`,10),I(16,cO,2,1,`p`,9,Og),P(18,pO,24,0,`div`,11)(19,mO,2,0,`p`,12),B()),e&2&&(M(4),q(`on`,t.recording()),R(`disabled`,!t.pageId()),M(2),X(` `,t.recording()?`Stop recording`:`Record`,` `),M(),F(t.cycles().length?7:-1),M(2),Y(t.status()),M(2),Y(t.announcement()),M(3),F(t.page()?.supported===!1?14:-1),M(),R(`dropped`,t.page()?.dropped??0)(`max`,t.maxCycles()),M(),L(t.capNotes()),M(2),F(t.slowest().length?18:t.recording()?19:-1))},dependencies:[iO],styles:[`[_nghost-%COMP%] {
+}`]})},sO=(e,t)=>t.id;function cO(e,t){if(e&1){let e=W();z(0,`button`,13),G(`click`,function(){return O(e),k(K().clear())}),J(1,`Clear`),B()}}function lO(e,t){e&1&&(z(0,`p`,9),J(1,`This page can't record change detection. It needs Angular 20 or later.`),B())}function uO(e,t){if(e&1&&(z(0,`p`,9),J(1),B()),e&2){let e=t.$implicit;M(),Y(e)}}function dO(e,t){if(e&1&&(z(0,`tr`)(1,`td`,17),J(2),B(),z(3,`td`,18),J(4),B(),z(5,`td`,18),J(6),B(),z(7,`td`,18),J(8),B()()),e&2){let e=t.$implicit,n=K(2);M(2),Y(e.name),M(2),Y(e.checks),M(2),Y(n.ms(e.ms)),M(2),Y(n.ms(e.maxMs))}}function fO(e,t){if(e&1&&(z(0,`span`,20),J(1,`after `),z(2,`span`,17),J(3),B()()),e&2){let e=K().$implicit;M(3),Y(e.trigger)}}function pO(e,t){if(e&1&&(z(0,`span`,21),J(1,` slowest `),z(2,`span`,17),J(3),B(),J(4),B()),e&2){let e=t,n=K(3);M(3),Y(e.name),M(),X(` `,n.ms(e.ms),` `)}}function mO(e,t){if(e&1&&(z(0,`li`)(1,`span`,19),J(2),B(),z(3,`span`,17),J(4),B(),z(5,`span`),J(6),B(),P(7,fO,4,1,`span`,20),P(8,pO,5,2,`span`,21),B()),e&2){let e,n=t.$implicit,r=K(2);M(2),Y(r.clock(n.at)),M(2),Y(r.ms(n.ms)),M(2),iv(` `,n.checks,` `,n.checks===1?`check`:`checks`,`, `,n.passes,` `,n.passes===1?`pass`:`passes`,` `),M(),F(n.trigger?7:-1),M(),F((e=n.components[0])?8:-1,e)}}function hO(e,t){if(e&1&&(z(0,`div`,11)(1,`div`)(2,`h3`),J(3,`Slowest components`),B(),z(4,`table`)(5,`thead`)(6,`tr`)(7,`th`,14),J(8,`Component`),B(),z(9,`th`,15),J(10,`Checks`),B(),z(11,`th`,15),J(12,`Self time`),B(),z(13,`th`,15),J(14,`Slowest`),B()()(),z(15,`tbody`),I(16,dO,9,4,`tr`,null,Dg),B()()(),z(18,`div`)(19,`h3`),J(20,`Latest cycles`),B(),z(21,`ol`,16),I(22,mO,9,8,`li`,null,sO),B()()()),e&2){let e=K();M(16),L(e.slowest()),M(6),L(e.latest())}}function gO(e,t){e&1&&(z(0,`p`,12),J(1,`Use the app. Cycles show up here as Angular runs change detection.`),B())}var _O=10,vO=class e{page=$(null);pageId=$(null);rpc=$(null);message=j(``);announcement=j(``);recording=Q(()=>this.page()?.recording===!0);cycles=Q(()=>this.page()?.cycles??[]);maxCycles=Q(()=>jE(this.rpc()).limits.cdCycles);slowest=Q(()=>[...this.page()?.components??[]].sort((e,t)=>t.ms-e.ms).slice(0,_O));latest=Q(()=>this.cycles().slice(-30).reverse());capNotes=Q(()=>{let e=this.page()?.droppedClasses??0,t=this.page()?.droppedHosts??0,n=[];return e>0&&n.push(`${e} more component ${e===1?`class was`:`classes were`} checked than a recording keeps, so ${e===1?`it is`:`they are`} left out of these totals.`),t>0&&n.push(`${t} component ${t===1?`instance was`:`instances were`} checked past the 2000 a recording counts, so ${t===1?`its tree row shows`:`their tree rows show`} no check count.`),n});status=Q(()=>{if(this.message())return this.message();let e=this.cycles().length;return this.recording()?`Recording. ${e} ${e===1?`cycle`:`cycles`} so far.`:e?`${e} ${e===1?`cycle`:`cycles`} recorded.`:``});ms(e){return`${e<10?e.toFixed(2):Math.round(e)} ms`}clock(e){return tO(e)}async toggle(){this.recording()?await this.send({on:!1},``,()=>{let e=this.cycles().length;return`Recording stopped. ${e} ${e===1?`cycle`:`cycles`} recorded.`}):await this.send({on:!0},`Starting…`,()=>`Recording started.`)}async clear(){await this.send({clear:!0},``,()=>`Cleared the recorded cycles.`)}async send(e,t,n){this.message.set(t);try{if(!this.rpc())throw Error(`no client`);await gE(this.rpc(),`request-change-detection-record`,{pageId:this.pageId(),...e}),this.message.set(``),this.announce(n())}catch{let e=`Could not reach the page.`;this.message.set(e),this.announce(e)}}announce(e){this.announcement.update(t=>t===e?`${e} `:e)}static ɵfac=function(t){return new(t||e)};static ɵcmp=Wh({type:e,selectors:[[`app-cd-recording`]],inputs:{page:[1,`page`],pageId:[1,`pageId`],rpc:[1,`rpc`]},decls:20,vars:11,consts:[[`aria-labelledby`,`cd-heading`,1,`cd`],[1,`cd-head`],[`id`,`cd-heading`],[`type`,`button`,3,`click`,`disabled`],[`aria-hidden`,`true`,1,`dot`],[`type`,`button`],[1,`status`],[`role`,`status`,1,`sr-only`],[1,`hint`],[1,`note`],[`what`,`cycles`,`limit`,`cdCycles`,3,`dropped`,`max`],[1,`cd-grid`],[1,`empty`],[`type`,`button`,3,`click`],[`scope`,`col`],[`scope`,`col`,1,`num`],[`aria-label`,`Latest change detection cycles, newest first`,1,`cycles`],[1,`mono`],[1,`num`],[1,`when`],[1,`trigger`],[1,`top`]],template:function(e,t){e&1&&(z(0,`section`,0)(1,`div`,1)(2,`h2`,2),J(3,`Change detection`),B(),z(4,`button`,3),G(`click`,function(){return t.toggle()}),V(5,`span`,4),J(6),B(),P(7,cO,2,0,`button`,5),z(8,`p`,6),J(9),B(),z(10,`p`,7),J(11),B()(),z(12,`p`,8),J(13,` Records each change detection cycle with Angular's profiler: how long it took, how many components it checked and the output that ran before it. Tree rows show how often each instance was checked. Times come from a development build. `),B(),P(14,lO,2,0,`p`,9),V(15,`app-limit-note`,10),I(16,uO,2,1,`p`,9,Og),P(18,hO,24,0,`div`,11)(19,gO,2,0,`p`,12),B()),e&2&&(M(4),q(`on`,t.recording()),R(`disabled`,!t.pageId()),M(2),X(` `,t.recording()?`Stop recording`:`Record`,` `),M(),F(t.cycles().length?7:-1),M(2),Y(t.status()),M(2),Y(t.announcement()),M(3),F(t.page()?.supported===!1?14:-1),M(),R(`dropped`,t.page()?.dropped??0)(`max`,t.maxCycles()),M(),L(t.capNotes()),M(2),F(t.slowest().length?18:t.recording()?19:-1))},dependencies:[oO],styles:[`[_nghost-%COMP%] {
   display: block;
   margin-top: 16px;
 }
@@ -703,7 +703,7 @@ td.mono[_ngcontent-%COMP%] {
 .trigger[_ngcontent-%COMP%]   .mono[_ngcontent-%COMP%], 
 .top[_ngcontent-%COMP%]   .mono[_ngcontent-%COMP%] {
   overflow-wrap: anywhere;
-}`]})},_O=[`*`];function vO(e,t){e&1&&J(0),e&2&&Y(K(2).label())}function yO(e,t){e&1&&o_(0,0,null,vO,1,1)}function bO(e,t){if(e&1&&(z(0,`span`,4),J(1),B()),e&2){let e=K(2);M(),Y(e.message())}}function xO(e,t){if(e&1){let e=W();z(0,`button`,2),G(`click`,function(){return O(e),k(K().open())}),Ug(1,3),B(),P(2,bO,2,1,`span`,4)}if(e&2){let e=K(),t=u_(1);R(`title`,`Open `+e.label()+` in your editor`),N(`aria-label`,`Open `+e.label()+` in your editor`),M(),R(`ngTemplateOutlet`,t),M(),F(e.message()?2:-1)}}function SO(e,t){if(e&1&&(z(0,`span`,1),Ug(1,3),B()),e&2){let e=K(),t=u_(1);R(`title`,e.label()),M(),R(`ngTemplateOutlet`,t)}}var CO=class e{source=j(j(null));client=Q(()=>this.source()());available=Q(()=>{let e=this.client();return!!e&&!gE(e)});use(e){this.source.set(e)}async open(e,t){if(!this.available())return{ok:!1,error:`No server is connected.`};try{let n=await mE(this.client(),`open-in-editor`,{file:e,...t?{line:t}:{}});return n?.ok?{ok:!0}:{ok:!1,error:n?.error??`The server did not open it.`}}catch{return{ok:!1,error:`The server did not open it.`}}}static ɵfac=function(t){return new(t||e)};static ɵprov=Al({token:e,factory:e.ɵfac})};function wO(e,t){return t?`${e}:${t}`:e}var TO=class e{editor=E(CO);file=$.required();line=$(void 0);label=Q(()=>wO(this.file(),this.line()));message=j(``);async open(){this.message.set(``);let e=await this.editor.open(this.file(),this.line()??void 0);e.ok||this.message.set(`Not opened: ${e.error}`)}static ɵfac=function(t){return new(t||e)};static ɵcmp=Wh({type:e,selectors:[[`app-source-link`]],inputs:{file:[1,`file`],line:[1,`line`]},ngContentSelectors:_O,decls:4,vars:1,consts:[[`text`,``],[1,`source-text`,3,`title`],[`type`,`button`,1,`source-link`,3,`click`,`title`],[3,`ngTemplateOutlet`],[`role`,`alert`,1,`message`]],template:function(e,t){e&1&&(a_(),ag(0,yO,2,0,`ng-template`,null,0,wv),P(2,xO,3,4)(3,SO,2,2,`span`,1)),e&2&&(M(2),F(t.editor.available()?2:3))},dependencies:[sb],styles:[`[_nghost-%COMP%] {
+}`]})},yO=[`*`];function bO(e,t){e&1&&J(0),e&2&&Y(K(2).label())}function xO(e,t){e&1&&o_(0,0,null,bO,1,1)}function SO(e,t){if(e&1&&(z(0,`span`,4),J(1),B()),e&2){let e=K(2);M(),Y(e.message())}}function CO(e,t){if(e&1){let e=W();z(0,`button`,2),G(`click`,function(){return O(e),k(K().open())}),Ug(1,3),B(),P(2,SO,2,1,`span`,4)}if(e&2){let e=K(),t=u_(1);R(`title`,`Open `+e.label()+` in your editor`),N(`aria-label`,`Open `+e.label()+` in your editor`),M(),R(`ngTemplateOutlet`,t),M(),F(e.message()?2:-1)}}function wO(e,t){if(e&1&&(z(0,`span`,1),Ug(1,3),B()),e&2){let e=K(),t=u_(1);R(`title`,e.label()),M(),R(`ngTemplateOutlet`,t)}}var TO=class e{source=j(j(null));client=Q(()=>this.source()());available=Q(()=>{let e=this.client();return!!e&&!vE(e)});use(e){this.source.set(e)}async open(e,t){if(!this.available())return{ok:!1,error:`No server is connected.`};try{let n=await gE(this.client(),`open-in-editor`,{file:e,...t?{line:t}:{}});return n?.ok?{ok:!0}:{ok:!1,error:n?.error??`The server did not open it.`}}catch{return{ok:!1,error:`The server did not open it.`}}}static ɵfac=function(t){return new(t||e)};static ɵprov=Al({token:e,factory:e.ɵfac})};function EO(e,t){return t?`${e}:${t}`:e}var DO=class e{editor=E(TO);file=$.required();line=$(void 0);label=Q(()=>EO(this.file(),this.line()));message=j(``);async open(){this.message.set(``);let e=await this.editor.open(this.file(),this.line()??void 0);e.ok||this.message.set(`Not opened: ${e.error}`)}static ɵfac=function(t){return new(t||e)};static ɵcmp=Wh({type:e,selectors:[[`app-source-link`]],inputs:{file:[1,`file`],line:[1,`line`]},ngContentSelectors:yO,decls:4,vars:1,consts:[[`text`,``],[1,`source-text`,3,`title`],[`type`,`button`,1,`source-link`,3,`click`,`title`],[3,`ngTemplateOutlet`],[`role`,`alert`,1,`message`]],template:function(e,t){e&1&&(a_(),ag(0,xO,2,0,`ng-template`,null,0,Ev),P(2,CO,3,4)(3,wO,2,2,`span`,1)),e&2&&(M(2),F(t.editor.available()?2:3))},dependencies:[lb],styles:[`[_nghost-%COMP%] {
   display: inline;
   min-width: 0;
 }
@@ -738,7 +738,268 @@ td.mono[_ngcontent-%COMP%] {
   color: var(--%NS%danger-text);
   font-family: var(--%NS%font-sans);
   font-size: 0.92em;
-}`]})},EO=[`filterInput`],DO=()=>[],OO=(e,t)=>t.node.id,kO=(e,t)=>t.outlet+t.route,AO=(e,t)=>t.formId,jO=(e,t)=>t.name+e,MO=(e,t)=>t.name,NO=(e,t)=>t.token+e,PO=(e,t)=>t.id;function FO(e,t){return this.sourceKey(t)}function IO(e,t){if(e&1){let e=W();z(0,`span`,28),J(1,`Page`),B(),z(2,`app-select`,29),G(`valueChange`,function(t){return O(e),k(K(2).selectPage(t))}),B()}if(e&2){let e=K(2);M(2),R(`options`,e.pageOptions())(`value`,e.page()?.pageId??null)}}function LO(e,t){if(e&1){let e=W();z(0,`button`,30),G(`click`,function(){O(e);let t=K(2);return k(t.picking()?t.cancelPick():t.pick())}),A(),z(1,`svg`,10),V(2,`path`,31),B(),J(3),B()}if(e&2){let e=K(2);q(`on`,e.picking()),M(3),X(` `,e.picking()?`Cancel pick`:`Pick component on page`,` `)}}function RO(e,t){if(e&1&&(z(0,`p`,17),J(1),B()),e&2){let e=K(2);M(),Y(e.pickMessage())}}function zO(e,t){if(e&1&&(z(0,`p`,18),J(1),B()),e&2){let e=K(2);M(),Y(e.truncationText())}}function BO(e,t){e&1&&(z(0,`p`,33),J(1,`The filter only searches the components the tree lists.`),B())}function VO(e,t){if(e&1){let e=W();z(0,`div`,21)(1,`p`,32),J(2),B(),P(3,BO,2,0,`p`,33),z(4,`button`,34),G(`click`,function(){return O(e),k(K(2).clearFilter())}),J(5,`Clear filter`),B()()}if(e&2){let e=K(2);M(2),X(`No components match “`,e.filter().trim(),`”`),M(),F(e.page().truncated?3:-1)}}function HO(e,t){if(e&1){let e=W();z(0,`span`,43),G(`click`,function(t){O(e);let n=K().$implicit;return k(K(2).toggle(n.node.id,t))}),A(),z(1,`svg`,44),V(2,`path`,45),B()()}if(e&2){let e=K().$implicit;q(`open`,e.expanded)}}function UO(e,t){e&1&&V(0,`span`,37)}function WO(e,t){if(e&1&&(z(0,`span`,40),J(1),B()),e&2){let e=t.$implicit;M(),Y(e.route||`/`)}}function GO(e,t){if(e&1&&(z(0,`span`,41),J(1),z(2,`span`,20),J(3),B()()),e&2){let e=t;M(),X(` `,e),M(2),X(` `,e===1?`check`:`checks`,` while recording`)}}function KO(e,t){if(e&1&&(z(0,`span`,42),J(1),z(2,`span`,20),J(3),B()()),e&2){let e=K().$implicit;N(`title`,e.node.directives.join(`, `)),M(),X(` +`,e.node.directives.length,` `),M(2),X(` `,e.node.directives.length===1?`directive`:`directives`,` `)}}function qO(e,t){if(e&1){let e=W();z(0,`div`,35),G(`click`,function(){let t=O(e).$implicit;return k(K(2).select(t.node.id))})(`focus`,function(){let t=O(e).$implicit,n=K(2);return n.focusId.set(t.node.id),k(n.highlight(t.node.id))})(`blur`,function(){return O(e),k(K(2).highlight(null))})(`mouseenter`,function(){let t=O(e).$implicit;return k(K(2).highlight(t.node.id))})(`mouseleave`,function(){return O(e),k(K(2).highlight(null))}),P(1,HO,3,2,`span`,36)(2,UO,1,0,`span`,37),z(3,`span`,38),J(4),B(),z(5,`span`,39),J(6),B(),I(7,WO,2,1,`span`,40,kO),P(9,GO,4,2,`span`,41),P(10,KO,4,3,`span`,42),B()}if(e&2){let e,n=t.$implicit,r=K(2);j_(`--%NS%depth`,n.depth),q(`selected`,r.selectedId()===n.node.id),N(`aria-level`,n.depth+1)(`aria-expanded`,n.hasChildren?n.expanded:null)(`aria-selected`,r.selectedId()===n.node.id)(`tabindex`,r.rovingId()===n.node.id?0:-1)(`data-id`,n.node.id),M(),F(n.hasChildren?1:2),M(3),Y(n.node.name),M(2),X(`<`,n.node.tag,`>`),M(),L(r.routedById().get(n.node.id)??mv(14,DO)),M(2),F((e=r.cdHosts()[n.node.id])?9:-1,e),M(),F(n.node.directives?.length?10:-1)}}function JO(e,t){if(e&1&&(z(0,`p`,50),V(1,`app-source-link`,52),B()),e&2){let e=t;M(),R(`file`,e.file)(`line`,e.line)}}function YO(e,t){if(e&1){let e=W();z(0,`div`,53)(1,`button`,34),G(`click`,function(){O(e);let t=K();return k(K(2).revealInElements(t))}),J(2,`Reveal in Elements`),B(),z(3,`button`,34),G(`click`,function(){O(e);let t=K();return k(K(2).openSource(t))}),J(4,`Open source`),B()(),z(5,`p`,54),J(6),B()}if(e&2){let e=K(3);M(6),Y(e.actionMessage())}}function XO(e,t){if(e&1){let e=W();z(0,`button`,57),G(`click`,function(){let t=O(e).$implicit;return k(K(5).showForm.emit(t.formId))}),J(1),B()}if(e&2){let e=t.$implicit;M(),X(` Show `,e.label,` in Forms `)}}function ZO(e,t){if(e&1&&(z(0,`div`,55),I(1,XO,2,1,`button`,56,AO),B()),e&2){let e=K(),t=K(3);M(),L(t.formsIn(e.file))}}function QO(e,t){e&1&&P(0,ZO,3,0,`div`,55),e&2&&F(K(3).formsIn(t.file).length?0:-1)}function $O(e,t){if(e&1&&(z(0,`dt`),J(1,`Routed`),B(),z(2,`dd`,59),J(3),B()),e&2){let e=t.$implicit;M(3),Z(``,e.route||`/`,` in outlet `,e.outlet)}}function ek(e,t){if(e&1&&(z(0,`span`,68),J(1),B()),e&2){let e=K().$implicit;M(),X(`(`,e.prop,`)`)}}function tk(e,t){if(e&1&&(z(0,`li`,66)(1,`span`,67),J(2),P(3,ek,2,1,`span`,68),B(),z(4,`pre`),J(5),yv(6,`json`),B()()),e&2){let e=t.$implicit;M(2),X(` `,e.name,` `),M(),F(e.prop===e.name?-1:3),M(2),Y(xv(6,3,e.value))}}function nk(e,t){if(e&1&&(z(0,`ul`,62),I(1,tk,7,5,`li`,66,MO),B()),e&2){let e=K();M(),L(e.inputs)}}function rk(e,t){e&1&&(z(0,`p`,63),J(1,`No inputs.`),B())}function ik(e,t){if(e&1&&(z(0,`li`,70)(1,`span`,59),J(2),B(),z(3,`span`,71),J(4),B()()),e&2){let e=t.$implicit;q(`on`,e.listened),M(2),Y(e.name),M(2),Y(e.listened?`listened`:`no listener`)}}function ak(e,t){if(e&1&&(z(0,`ul`,64),I(1,ik,5,4,`li`,69,MO),B()),e&2){let e=K();M(),L(e.outputs)}}function ok(e,t){e&1&&(z(0,`p`,63),J(1,`No outputs.`),B())}function sk(e,t){if(e&1&&(z(0,`span`,72),J(1),B()),e&2){let e=K().$implicit;M(),Y(e.kind)}}function ck(e,t){if(e&1&&(z(0,`li`,66)(1,`span`,67),J(2),P(3,sk,2,1,`span`,72),B(),z(4,`pre`),J(5),yv(6,`json`),B()()),e&2){let e=t.$implicit;M(2),X(` `,e.name,` `),M(),F(e.kind?3:-1),M(2),Y(xv(6,3,e.value))}}function lk(e,t){if(e&1&&(z(0,`ul`,62),I(1,ck,7,5,`li`,66,MO),B()),e&2){let e=K();M(),L(e.properties)}}function uk(e,t){e&1&&(z(0,`p`,63),J(1,`No other properties.`),B())}function dk(e,t){if(e&1&&(z(0,`li`,73),J(1),B()),e&2){let e=t.$implicit;M(),Y(e)}}function fk(e,t){if(e&1&&(z(0,`div`,60)(1,`h3`),J(2,` DOM listeners `),z(3,`span`,61),J(4),B()(),z(5,`ul`,64),I(6,dk,2,1,`li`,73,Og),B()()),e&2){let e=K();M(4),Y(e.listeners.length),M(2),L(e.listeners)}}function pk(e,t){if(e&1&&(z(0,`li`,66)(1,`span`,67),J(2),B(),z(3,`pre`),J(4),yv(5,`json`),B()()),e&2){let e=t.$implicit;M(2),Y(e.name),M(2),Y(xv(5,2,e.value))}}function mk(e,t){if(e&1&&(z(0,`ul`,62),I(1,pk,6,4,`li`,66,MO),B()),e&2){let e=K().$implicit;M(),L(e.inputs)}}function hk(e,t){if(e&1&&(z(0,`li`,70)(1,`span`,59),J(2),B(),z(3,`span`,71),J(4),B()()),e&2){let e=t.$implicit;q(`on`,e.listened),M(2),Y(e.name),M(2),Y(e.listened?`listened`:`no listener`)}}function gk(e,t){if(e&1&&(z(0,`ul`,64),I(1,hk,5,4,`li`,69,MO),B()),e&2){let e=K().$implicit;M(),L(e.outputs)}}function _k(e,t){e&1&&(z(0,`p`,63),J(1,`No inputs or outputs.`),B())}function vk(e,t){if(e&1&&(z(0,`div`,60)(1,`h3`)(2,`span`,59),J(3),B(),z(4,`span`,72),J(5,`directive on host`),B()(),P(6,mk,3,0,`ul`,62),P(7,gk,3,0,`ul`,64),P(8,_k,2,0,`p`,63),B()),e&2){let e=t.$implicit;M(3),Y(e.name),M(3),F(e.inputs.length?6:-1),M(),F(e.outputs.length?7:-1),M(),F(!e.inputs.length&&!e.outputs.length?8:-1)}}function yk(e,t){if(e&1&&(z(0,`span`,72),J(1),B()),e&2){let e=t.$implicit;M(),Y(e)}}function bk(e,t){if(e&1&&(z(0,`span`,76),J(1,`from `),z(2,`span`,59),J(3),B()()),e&2){let e=K().$implicit;M(3),Y(e.providedByName??`an injector`)}}function xk(e,t){e&1&&(z(0,`span`,77),J(1,`not provided`),B())}function Sk(e,t){if(e&1&&(z(0,`li`,74)(1,`span`,75),J(2),B(),I(3,yk,2,1,`span`,72,Og),P(5,bk,4,1,`span`,76)(6,xk,2,0,`span`,77),B()),e&2){let e=t.$implicit;M(2),Y(e.token),M(),L(e.flags),M(2),F(e.providedBy?5:6)}}function Ck(e,t){if(e&1&&(z(0,`ul`,65),I(1,Sk,7,2,`li`,74,NO),B()),e&2){let e=K();M(),L(e.dependencies)}}function wk(e,t){e&1&&(z(0,`p`,63),J(1,`Nothing is injected through the constructor or inject().`),B())}function Tk(e,t){if(e&1&&(z(0,`dl`,58)(1,`dt`),J(2,`Change detection`),B(),z(3,`dd`),J(4),B(),z(5,`dt`),J(6,`Encapsulation`),B(),z(7,`dd`),J(8),B(),z(9,`dt`),J(10,`Host path`),B(),z(11,`dd`,59),J(12),B(),I(13,$O,4,2,null,null,kO),B(),z(15,`div`,60)(16,`h3`),J(17,` Inputs `),z(18,`span`,61),J(19),B()(),P(20,nk,3,0,`ul`,62)(21,rk,2,0,`p`,63),B(),z(22,`div`,60)(23,`h3`),J(24,` Outputs `),z(25,`span`,61),J(26),B()(),P(27,ak,3,0,`ul`,64)(28,ok,2,0,`p`,63),B(),z(29,`div`,60)(30,`h3`),J(31,` Properties `),z(32,`span`,61),J(33),B()(),P(34,lk,3,0,`ul`,62)(35,uk,2,0,`p`,63),B(),P(36,fk,8,1,`div`,60),I(37,vk,9,4,`div`,60,jO),z(39,`div`,60)(40,`h3`),J(41,` Injected `),z(42,`span`,61),J(43),B()(),P(44,Ck,3,0,`ul`,65)(45,wk,2,0,`p`,63),B()),e&2){let e=t,n=K(),r=K(2);M(4),Y(e.changeDetection??`Unknown`),M(4),Y(e.encapsulation??`Unknown`),M(4),Y(e.path),M(),L(r.routedById().get(n.id)??mv(12,DO)),M(6),Y(e.inputs.length),M(),F(e.inputs.length?20:21),M(6),Y(e.outputs.length),M(),F(e.outputs.length?27:28),M(6),Y(e.properties?.length??0),M(),F(e.properties?.length?34:35),M(2),F(e.listeners.length?36:-1),M(),L(e.directives),M(6),Y(e.dependencies.length),M(),F(e.dependencies.length?44:45)}}function Ek(e,t){e&1&&(z(0,`div`,51),V(1,`span`,78),z(2,`p`,33),J(3,`Reading live values from the page…`),B()())}function Dk(e,t){if(e&1&&(z(0,`section`,24)(1,`header`,46)(2,`span`,47),J(3,`component`),B(),z(4,`h2`,48),J(5),B(),z(6,`span`,49),J(7),B(),P(8,JO,2,2,`p`,50),P(9,YO,7,1),P(10,QO,1,1),B(),P(11,Tk,46,13)(12,Ek,4,0,`div`,51),B()),e&2){let e,n,r,i=t,a=K(2);M(5),Y(i.name),M(2),X(`<`,i.tag,`>`),M(),F((e=a.whereOf(i))?8:-1,e),M(),F(a.devtoolsActions()?9:-1),M(),F((n=a.sourceFor(i))?10:-1,n),M(),F((r=a.detail())?11:12,r)}}function Ok(e,t){e&1&&(z(0,`p`,32),J(1,`The selected component was destroyed`),B(),z(2,`p`,33)(3,`span`,59),J(4),B(),J(5,` is no longer on the page. Select another component to see its live values. `),B()),e&2&&(M(4),Y(t))}function kk(e,t){e&1&&(z(0,`p`,33),J(1,` Select a component to see its live inputs, properties, outputs, change detection and injected services. `),B())}function Ak(e,t){if(e&1&&(z(0,`div`,25),P(1,Ok,6,1)(2,kk,2,0,`p`,33),B()),e&2){let e,t=K(2);M(),F((e=t.destroyed())?1:2,e)}}function jk(e,t){e&1&&(z(0,`span`,72),J(1,`hydrate never`),B())}function Mk(e,t){if(e&1&&(z(0,`span`,72),J(1),B()),e&2){let e=K().$implicit;M(),Y(e.hydration)}}function Nk(e,t){if(e&1){let e=W();z(0,`li`)(1,`button`,81),G(`click`,function(){let t=O(e).$implicit;return k(K(3).showOwner(t))})(`focus`,function(){let t=O(e).$implicit;return k(K(3).highlightBlock(t))})(`blur`,function(){return O(e),k(K(3).highlight(null))})(`mouseenter`,function(){let t=O(e).$implicit;return k(K(3).highlightBlock(t))})(`mouseleave`,function(){return O(e),k(K(3).highlight(null))}),z(2,`span`,38),J(3),B(),z(4,`span`,82),J(5),B(),P(6,jk,2,0,`span`,72)(7,Mk,2,1,`span`,72),z(8,`span`,83),J(9),B()()()}if(e&2){let e=t.$implicit;M(),N(`aria-disabled`,e.owner?null:`true`),M(2),Y(e.owner?.name??`Unknown component`),M(),M_(`defer-state-`+e.state),M(),Y(e.state),M(),F(e.hydrateNever?6:e.hydration===`not-configured`?-1:7),M(3),Y(e.triggers.join(`, `)||`no triggers`)}}function Pk(e,t){if(e&1&&(z(0,`section`,26)(1,`h2`,79),J(2,` Defer blocks `),z(3,`span`,61),J(4),B()(),z(5,`ul`,80),I(6,Nk,10,7,`li`,null,PO),B()()),e&2){let e=K(2);M(4),Y(e.deferCount()),M(2),L(e.deferBlocks())}}function Fk(e,t){if(e&1&&V(0,`app-cd-recording`,27),e&2){let e=K(2);R(`page`,e.cdPage())(`pageId`,e.page().pageId)(`rpc`,e.rpc())}}function Ik(e,t){if(e&1){let e=W();z(0,`p`,1),J(1,` Every component instance on the page, in the order Angular rendered them. Hover a row to highlight its host in the page, and select it to read its live inputs, properties, outputs and injected services. `),B(),z(2,`div`,2)(3,`div`,3),A(),z(4,`svg`,4),V(5,`circle`,5)(6,`path`,6),B(),ms(),z(7,`input`,7,0),G(`input`,function(t){return O(e),k(K().setFilter(t.target.value))})(`keydown.escape`,function(){return O(e),k(K().setFilter(``))}),B()(),P(9,IO,3,2),z(10,`span`,8),J(11),B(),z(12,`button`,9),G(`click`,function(){return O(e),k(K().expandAll())}),A(),z(13,`svg`,10),V(14,`path`,11)(15,`path`,12),B(),J(16,` Expand all `),B(),ms(),z(17,`button`,9),G(`click`,function(){return O(e),k(K().collapseAll())}),A(),z(18,`svg`,10),V(19,`path`,13)(20,`path`,14),B(),J(21,` Collapse all `),B(),P(22,LO,4,3,`button`,15),B(),ms(),z(23,`p`,16),J(24),B(),P(25,RO,2,1,`p`,17),P(26,zO,2,1,`p`,18),z(27,`div`,19)(28,`div`)(29,`h2`,20),J(30,`Component tree`),B(),P(31,VO,6,2,`div`,21),z(32,`div`,22),G(`keydown`,function(t){return O(e),k(K().onTreeKey(t))}),I(33,qO,11,15,`div`,23,OO),B()(),P(35,Dk,13,6,`section`,24)(36,Ak,3,1,`div`,25),B(),P(37,Pk,8,1,`section`,26),P(38,Fk,1,3,`app-cd-recording`,27)}if(e&2){let e,t=K();M(7),R(`value`,t.filter()),M(2),F(t.pageOptions().length>1?9:-1),M(2),Y(t.countLabel()),M(),R(`disabled`,!!t.filter().trim()),M(5),R(`disabled`,!!t.filter().trim()),M(5),F(t.native()?-1:22),M(2),Y(t.announcement()),M(),F(t.pickMessage()?25:-1),M(),F(t.page().truncated?26:-1),M(5),F(t.rows().length?-1:31),M(),R(`hidden`,!t.rows().length),M(),L(t.rows()),M(2),F((e=t.selectedNode())?35:36,e),M(2),F(t.deferBlocks().length?37:-1),M(),F(!t.staticReport()&&!t.native()?38:-1)}}function Lk(e,t){e&1&&(z(0,`p`,18),J(1,` The page reported no component instances. The live tree needs a development build with Angular's debug API. Showing what the source declares instead. `),B())}function Rk(e,t){e&1&&(z(0,`p`,84),J(1,` No page is connected, so this lists what the source declares. Open the app in a browser with the devtools connected to see each rendered instance. `),B())}function zk(e,t){if(e&1&&J(0),e&2){let e=K(3);Z(` `,e.filteredSource().length,` of `,e.source().length,` `)}}function Bk(e,t){if(e&1&&J(0),e&2){let e=K(3);iv(` `,e.sourceCounts().components,` `,e.sourceCounts().components===1?`component`:`components`,` · `,e.sourceCounts().directives,` `,e.sourceCounts().directives===1?`directive`:`directives`,` `)}}function Vk(e,t){if(e&1&&(z(0,`span`,86),P(1,zk,1,2)(2,Bk,1,4),B()),e&2){let e=K(2);M(),F(e.filter().trim()?1:2)}}function Hk(e,t){e&1&&(z(0,`div`,90),V(1,`span`,78),z(2,`p`,32),J(3,`Scanning components…`),B()())}function Uk(e,t){e&1&&(J(0,` Run `),z(1,`code`),J(2,`pangular build`),B(),J(3,` again to rebuild the report. `))}function Wk(e,t){e&1&&J(0,` Check that the dev server is running, then try again. `)}function Gk(e,t){if(e&1){let e=W();z(0,`div`,91)(1,`p`,32),J(2,`Could not load components`),B(),z(3,`p`,33),P(4,Uk,4,0)(5,Wk,1,0),B(),z(6,`button`,34),G(`click`,function(){return O(e),k(K(2).refresh())}),J(7,`Retry`),B()()}if(e&2){let e=K(2);M(4),F(e.staticReport()?4:5)}}function Kk(e,t){e&1&&(z(0,`div`,92)(1,`p`,32),J(2,`No components found`),B(),z(3,`p`,33),J(4,`No @Component or @Directive was found in the source.`),B()())}function qk(e,t){if(e&1){let e=W();z(0,`div`,92)(1,`p`,32),J(2),B(),z(3,`button`,34),G(`click`,function(){return O(e),k(K(2).clearFilter())}),J(4,`Clear filter`),B()()}if(e&2){let e=K(2);M(2),X(`No components match “`,e.filter().trim(),`”`)}}function Jk(e,t){if(e&1&&J(0),e&2){let e=K().$implicit;X(` `,K(3).bareName(e.className),` · `)}}function Yk(e,t){if(e&1&&(z(0,`dt`),J(1,`Change detection`),B(),z(2,`dd`),J(3),B()),e&2){let e=K(2).$implicit;M(3),Y(e.changeDetection??`Unknown`)}}function Xk(e,t){if(e&1){let e=W();z(0,`button`,57),G(`click`,function(){let t=O(e).$implicit;return k(K(5).showForm.emit(t.formId))}),J(1),B()}if(e&2){let e=t.$implicit;M(),X(` Show `,e.label,` in Forms `)}}function Zk(e,t){if(e&1&&(z(0,`div`,102)(1,`dl`,58)(2,`dt`),J(3,`Class`),B(),z(4,`dd`,59),J(5),B(),z(6,`dt`),J(7,`File`),B(),z(8,`dd`,59),V(9,`app-source-link`,52),B(),z(10,`dt`),J(11,`Standalone`),B(),z(12,`dd`),J(13),B(),P(14,Yk,4,1),z(15,`dt`),J(16,`Inputs`),B(),z(17,`dd`,59),J(18),B(),z(19,`dt`),J(20,`Outputs`),B(),z(21,`dd`,59),J(22),B()(),I(23,Xk,2,1,`button`,56,AO),B()),e&2){let e=K(),t=e.$implicit,n=e.$index,r=K(3);R(`id`,`ct-source-`+n),M(5),Y(r.bareName(t.className)),M(4),R(`file`,t.file)(`line`,t.line),M(4),Y(t.isStandalone?`Yes`:`No`),M(),F(t.kind===`component`?14:-1),M(4),Y(t.inputs.join(`, `)||`None`),M(4),Y(t.outputs.join(`, `)||`None`),M(),L(r.formsIn(t.file))}}function Qk(e,t){if(e&1){let e=W();z(0,`li`,95)(1,`button`,96),G(`click`,function(){let t=O(e).$implicit,n=K(3);return k(n.openKey.set(n.openKey()===n.sourceKey(t)?null:n.sourceKey(t)))}),z(2,`span`,97),J(3),B(),z(4,`span`,98)(5,`span`,99),J(6),B(),z(7,`span`,100),P(8,Jk,1,1),J(9),B()(),A(),z(10,`svg`,101),V(11,`path`,45),B()(),P(12,Zk,25,8,`div`,102),B()}if(e&2){let e=t.$implicit,n=t.$index,r=K(3);q(`expanded`,r.openKey()===r.sourceKey(e)),M(),N(`aria-expanded`,r.openKey()===r.sourceKey(e))(`aria-controls`,r.openKey()===r.sourceKey(e)?`ct-source-`+n:null),M(),q(`directive`,e.kind===`directive`),M(),Y(e.kind),M(3),Y(r.sourceLabel(e)),M(2),F(e.selector?8:-1),M(),Z(` `,e.file,`:`,e.line,` `),M(3),F(r.openKey()===r.sourceKey(e)?12:-1)}}function $k(e,t){if(e&1&&(z(0,`ul`,93),I(1,Qk,13,12,`li`,94,FO,!0),B()),e&2){let e=K(2);M(),L(e.filteredSource())}}function eA(e,t){if(e&1){let e=W();P(0,Lk,2,0,`p`,18)(1,Rk,2,0,`p`,84),z(2,`div`,2)(3,`div`,3),A(),z(4,`svg`,4),V(5,`circle`,5)(6,`path`,6),B(),ms(),z(7,`input`,85,0),G(`input`,function(t){return O(e),k(K().filter.set(t.target.value))})(`keydown.escape`,function(){return O(e),k(K().filter.set(``))}),B()(),P(9,Vk,3,1,`span`,86),z(10,`button`,87),G(`click`,function(){return O(e),k(K().refresh())}),A(),z(11,`svg`,10),V(12,`path`,88)(13,`path`,89),B(),J(14,` Refresh `),B()(),P(15,Hk,4,0,`div`,90)(16,Gk,8,1,`div`,91)(17,Kk,5,0,`div`,92)(18,qk,5,1,`div`,92)(19,$k,3,0,`ul`,93)}if(e&2){let e=K();F(+!e.page()),M(7),R(`value`,e.filter()),M(2),F(e.source().length?9:-1),M(),q(`spinning`,e.loading()),N(`aria-busy`,e.loading()),M(5),F(e.loading()&&!e.source().length?15:e.error()&&!e.source().length?16:e.source().length?e.filteredSource().length?19:18:17)}}function tA(e){return e.replace(/^_(?=[A-Z])/,``)}var nA=class e{rpc=$(null);staticReport=Q(()=>gE(this.rpc()));focus=$(null);showForm=Iv();focusHandled=Iv();filter=j(``);loading=j(!1);error=j(!1);source=j([]);formOwners=j([]);pages=j({});chosenPageId=j(null);selectedId=j(null);destroyed=j(null);announcement=j(``);picking=j(!1);pickMessage=j(``);pickPageId=null;pickSeq=0;focusId=j(null);bridge=E(MD);actionMessage=Nv({source:this.selectedId,computation:()=>``});collapsed=j(new Set);openKey=j(null);routerPages=j([]);pageId=uE();destroyRef=E(ws);injector=E(Ss);host=E(Nl);filterInput=Kv(`filterInput`);cleanups=[];selection={pageId:null,detailId:null};shownPageId=Nv({source:()=>({pages:this.pages(),chosen:this.chosenPageId()}),computation:({pages:e,chosen:t},n)=>dE(e,{chosen:t,host:this.pageId,previous:n?.value??null})});page=Q(()=>{let e=this.shownPageId();return e?this.pages()[e]??null:null});pageOptions=Q(()=>Object.values(this.pages()).map(e=>({value:e.pageId,label:e.title||e.url||`Page ${e.pageId}`,hint:e.url})));live=Q(()=>(this.page()?.roots.length??0)>0);native=Q(()=>PD(this.page()));devtoolsActions=Q(()=>this.bridge.available&&!!this.page()&&!this.native()&&!this.staticReport());cdPages=j({});cdPage=Q(()=>{let e=this.page()?.pageId;return e?this.cdPages()[e]??null:null});cdHosts=Q(()=>this.cdPage()?.hosts??{});index=Q(()=>{let e=new Map,t=new Map,n=(r,i)=>{for(let a of r)e.set(a.id,a),i&&t.set(a.id,i),n(a.children,a.id)};return n(this.page()?.roots??[],null),{map:e,parents:t}});query=Q(()=>this.filter().trim().toLowerCase());filtered=Q(()=>KD(this.page()?.roots??[],this.query()));deferBlocks=Q(()=>this.page()?.deferBlocks??[]);deferCount=Q(()=>`${this.deferBlocks().length}${this.page()?.deferTruncated?`+`:``}`);countLabel=Q(()=>qD(this.page()?.count??0,this.filtered().matches,!!this.query(),!!this.page()?.truncated));truncationText=Q(()=>YD(this.page()?.truncatedBy));rows=Q(()=>{let e=[],t=this.collapsed(),n=!!this.query(),r=(i,a)=>{for(let o of i){let i=n||!t.has(o.id);e.push({node:o,depth:a,hasChildren:o.children.length>0,expanded:i}),i&&r(o.children,a+1)}};return r(this.filtered().nodes,0),e});selectedNode=Q(()=>{let e=this.selectedId();return e?this.index().map.get(e)??null:null});detail=Q(()=>{let e=this.page()?.detail;return e&&e.id===this.selectedId()?e:null});rovingId=Q(()=>{let e=this.rows(),t=new Set(e.map(e=>e.node.id)),n=this.focusId();if(n&&t.has(n))return n;let r=this.selectedId();return r&&t.has(r)?r:e[0]?.node.id??null});outlets=Q(()=>{let e=this.page()?.pageId;return this.routerPages().find(t=>t.pageId===e)?.outlets??[]});routedById=Q(()=>{let e=new Map,t=n=>{for(let r of n){if(r.activated&&r.devtoolsId){let t=e.get(r.devtoolsId)??[];t.push({route:r.route??``,outlet:r.outlet}),e.set(r.devtoolsId,t)}r.children&&t(r.children)}};return t(this.outlets()),e});sourceByClass=Q(()=>{let e=new Map;for(let t of this.source()){let n=tA(t.className);e.set(n,[...e.get(n)??[],t])}return e});filteredSource=Q(()=>{let e=this.query(),t=this.source();return e?t.filter(t=>t.selector.toLowerCase().includes(e)||t.className.toLowerCase().includes(e)||t.file.toLowerCase().includes(e)):t});sourceCounts=Q(()=>{let e=this.source().filter(e=>e.kind===`component`).length;return{components:e,directives:this.source().length-e}});constructor(){dc(()=>{let e=this.page()?.pageId??null;jv(()=>{this.picking()&&e!==this.pickPageId&&this.dropPick()})}),dc(()=>{let e=this.rpc();e&&(this.refresh(),this.watch(e))}),dc(()=>{let e=this.focus();if(!e)return;let t=this.page()?.pageId??null;if(e.pageId&&t!==e.pageId&&this.pages()[e.pageId]){jv(()=>this.selectPage(e.pageId));return}this.live()&&jv(()=>{(!e.pageId||t===e.pageId)&&this.index().map.has(e.id)?this.reveal(e.id):this.announcement.set(`That component is no longer on the page.`),this.focusHandled.emit()})}),this.destroyRef.onDestroy(()=>{this.highlight(null);for(let e of this.cleanups.splice(0))e()})}async watch(e){for(let e of this.cleanups.splice(0))e();let t=e.scope(`pangular`);try{let e=await t.rpc.sharedState(`component-tree`);if(this.destroyRef.destroyed)return;let n=e=>{let t=e?.pages;this.applyPages(t&&typeof t==`object`?t:{})};n(e.value()),this.cleanups.push(e.on(`updated`,n))}catch{this.applyPages({})}try{let e=await t.rpc.sharedState(`change-detection`);if(this.destroyRef.destroyed)return;let n=e=>{let t=e?.pages;this.cdPages.set(t&&typeof t==`object`?t:{})};n(e.value()),this.cleanups.push(e.on(`updated`,n))}catch{this.cdPages.set({})}try{let e=await t.rpc.sharedState(`router`);if(this.destroyRef.destroyed)return;let n=e=>{let t=e?.pages;this.routerPages.set(Array.isArray(t)?t:[])};n(e.value()),this.cleanups.push(e.on(`updated`,n))}catch{this.routerPages.set([])}}async refresh(){let e=this.rpc();if(!e)return;this.loading.set(!0);let t=e.scope(`pangular`);try{this.source.set(await t.rpc.call(`get-components`)),this.error.set(!1)}catch{this.error.set(!0)}finally{this.loading.set(!1)}let n=await t.rpc.call(`forms-owners`).catch(()=>[]);this.formOwners.set(n??[])}formsIn(e){return this.formOwners().filter(t=>t.file===e)}whereOf(e){return this.detail()?.source??this.sourceFor(e)}async revealInElements(e){let t=this.page()?.pageId;if(!t)return;this.actionMessage.set(``);let n=await this.bridge.reveal(t,e.id);this.selectedId()===e.id&&this.actionMessage.set(n.ok?``:`Could not reveal it. The component must be rendered in the tab these DevTools inspect.`)}async openSource(e){let t=this.page()?.pageId;if(!t)return;let n=this.whereOf(e);this.actionMessage.set(``);let r=await this.bridge.openSource(t,e.id,n);this.selectedId()===e.id&&(r.ok||this.actionMessage.set(n?`Not found in Sources. Open ${n.file}:${n.line} in your editor.`:`Could not open the source. The component must be rendered in the tab these DevTools inspect.`))}sourceFor(e){let t=(this.sourceByClass().get(tA(e.name))??[]).filter(e=>e.kind===`component`);return t.find(t=>t.selector===e.tag)??t[0]??null}sourceKey(e){return`${e.file}#${e.className}`}sourceLabel(e){return e.selector?e.kind===`component`&&/^[a-z][\w-]*$/i.test(e.selector)?`<${e.selector}>`:e.selector:tA(e.className)}bareName(e){return tA(e)}applyPages(e){let t=document.activeElement,n=t instanceof HTMLElement&&this.host.nativeElement.contains(t)?t.closest(`.row`)?.dataset.id??null:null,r=n?this.rows().map(e=>e.node.id):[],i=this.index().map;if(this.pages.set(e),this.syncSelection(i),!n)return;let a=new Set(this.rows().map(e=>e.node.id));if(a.has(n))return;let o=QD(r,a,n);o&&(this.focusId.set(o),zd(()=>this.rowElement(o)?.focus(),{injector:this.injector}))}syncSelection(e=this.index().map){let t=this.page(),n=XD({...this.selection,selectedId:this.selectedId()},t?{pageId:t.pageId,roots:t.roots,detail:t.detail,truncated:t.truncated}:null),r=n.destroyed?e.get(n.destroyed)?.name:void 0;this.selection={pageId:n.pageId,detailId:n.detailId},n.selectedId!==this.selectedId()&&this.selectedId.set(n.selectedId),n.selectedId&&this.destroyed.set(null),n.destroyed&&(this.destroyed.set(r??`The component`),this.announcement.set(`The selected component was destroyed.`),this.sendSelection(null))}selectPage(e){e&&(this.chosenPageId.set(e),this.destroyed.set(null),this.syncSelection())}setFilter(e){this.filter.set(e);let{matches:t}=this.filtered();this.announcement.set(JD(this.page()?.count??0,t,e,!!this.page()?.truncated))}clearFilter(){this.live()?this.setFilter(``):this.filter.set(``),this.filterInput()?.nativeElement.focus()}async pick(){let e=this.rpc();if(!e||this.picking())return;let t=++this.pickSeq;this.pickPageId=this.page()?.pageId??null,this.picking.set(!0),this.say(`Click a component in the app. Press Escape to cancel.`);let n=await e.scope(`pangular`).rpc.call(`request-component-pick`,{pageId:this.pickPageId??void 0}).catch(()=>({ok:!1,error:`Could not reach the devtools server.`}));if(t===this.pickSeq){if(this.picking.set(!1),!n?.ok||!n.id){this.say(n?.error??`No component was picked.`);return}n.pageId&&n.pageId!==this.page()?.pageId&&this.selectPage(n.pageId),this.say(`Picked ${n.name??`a component`}.`),this.destroyed.set(null),this.index().map.has(n.id)?this.reveal(n.id):this.selectedId.set(n.id)}}cancelPick(){let e=this.rpc();e&&this.picking()&&e.scope(`pangular`).rpc.call(`cancel-component-pick`,{pageId:this.pickPageId??void 0}).catch(()=>{})}dropPick(){this.cancelPick(),this.pickSeq++,this.picking.set(!1),this.say(`Picking stopped because the page changed.`)}say(e){this.pickMessage.set(e),this.announcement.set(e)}sendSelection(e){let t=this.rpc();t&&t.scope(`pangular`).rpc.call(`select-component`,{pageId:this.page()?.pageId,id:e}).catch(()=>{})}rowElement(e){return this.host.nativeElement.querySelector(`.row[data-id="${CSS.escape(e)}"]`)}select(e){let t=this.selectedId()===e?null:e;this.selectedId.set(t),this.destroyed.set(null),this.focusId.set(e),this.sendSelection(t)}reveal(e){let{parents:t}=this.index();this.collapsed.update(n=>{let r=new Set(n);for(let n=t.get(e);n;n=t.get(n))r.delete(n);return r}),this.rows().some(t=>t.node.id===e)||this.setFilter(``),this.selectedId()!==e&&this.select(e),zd(()=>document.querySelector(`.row[data-id="${CSS.escape(e)}"]`)?.scrollIntoView({block:`nearest`}),{injector:this.injector})}toggle(e,t){t?.stopPropagation(),!this.query()&&this.collapsed.update(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})}expandAll(){this.query()||(this.collapsed.set(new Set),this.announce(`Expanded every component.`))}collapseAll(){if(this.query())return;let{map:e,parents:t}=this.index(),n=this.rovingId(),r=new Set;for(let t of e.values())t.children.length&&r.add(t.id);if(this.collapsed.set(r),n){let e=new Set(this.rows().map(e=>e.node.id)),r=n;for(;r&&!e.has(r);)r=t.get(r);r&&this.focusId.set(r)}this.announce(`Collapsed every component. Only the top level is shown.`)}announce(e){this.announcement.update(t=>t===e?`${e}\u00a0`:e)}expandSiblings(e){if(this.query())return;let t=this.index().parents.get(e),n=t?this.index().map.get(t)?.children??[]:this.page()?.roots??[];this.collapsed.update(e=>{let t=new Set(e);for(let e of n)t.delete(e.id);return t})}highlight(e){let t=this.rpc();if(!t)return;let n=e?{pageId:this.page()?.pageId,id:e}:null;t.scope(`pangular`).rpc.call(`request-page-highlight`,n).catch(()=>{})}highlightBlock(e){this.highlight(e.rootIds[0]??e.owner?.id??null)}showOwner(e){e.owner&&this.index().map.has(e.owner.id)&&this.reveal(e.owner.id)}onTreeKey(e){let t=this.rows();if(!t.length)return;let n=t.findIndex(e=>e.node.id===this.rovingId()),r=Math.max(n,0),i=t[r],a=-1;switch(e.key){case`ArrowDown`:a=Math.min(r+1,t.length-1);break;case`ArrowUp`:a=Math.max(r-1,0);break;case`Home`:a=0;break;case`End`:a=t.length-1;break;case`ArrowRight`:i.hasChildren&&!i.expanded?this.toggle(i.node.id):i.hasChildren&&(a=r+1);break;case`ArrowLeft`:if(i.hasChildren&&i.expanded&&!this.query())this.toggle(i.node.id);else{let e=this.index().parents.get(i.node.id);a=t.findIndex(t=>t.node.id===e)}break;case`Enter`:case` `:this.select(i.node.id);break;case`*`:this.expandSiblings(i.node.id);break;default:return}if(e.preventDefault(),a>=0){let e=t[a].node.id;this.focusId.set(e),queueMicrotask(()=>{let t=document.querySelector(`.row[data-id="${CSS.escape(e)}"]`);t?.focus(),t?.scrollIntoView({block:`nearest`})})}}static ɵfac=function(t){return new(t||e)};static ɵcmp=Wh({type:e,selectors:[[`app-component-tree`]],viewQuery:function(e,t){e&1&&c_(t.filterInput,EO,5),e&2&&l_()},hostBindings:function(e,t){e&1&&G(`keydown.escape`,function(){return t.cancelPick()})},inputs:{rpc:[1,`rpc`],focus:[1,`focus`]},outputs:{showForm:`showForm`,focusHandled:`focusHandled`},decls:2,vars:1,consts:[[`filterInput`,``],[1,`intro`],[1,`toolbar`],[1,`search`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`,1,`search-icon`],[`cx`,`11`,`cy`,`11`,`r`,`7`],[`d`,`m20 20-3.5-3.5`],[`type`,`search`,`placeholder`,`Filter by class, tag or directive…`,`aria-label`,`Filter components by class, tag or directive`,`autocomplete`,`off`,`spellcheck`,`false`,3,`input`,`keydown.escape`,`value`],[1,`count`],[`type`,`button`,1,`tree-action`,3,`click`,`disabled`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`],[`d`,`m7 15 5 5 5-5`],[`d`,`m7 9 5-5 5 5`],[`d`,`m7 20 5-5 5 5`],[`d`,`m7 4 5 5 5-5`],[`type`,`button`,1,`pick`,3,`on`],[`role`,`status`,1,`sr-only`],[1,`pick-message`],[`role`,`status`,1,`notice`],[1,`layout`],[1,`sr-only`],[1,`state`,`compact`,`tree`],[`role`,`tree`,`aria-label`,`Component instances`,1,`tree`,3,`keydown`,`hidden`],[`role`,`treeitem`,1,`row`,3,`selected`,`--%NS%depth`],[`aria-labelledby`,`ct-detail-title`,1,`detail`],[1,`detail`,`placeholder`],[`aria-labelledby`,`ct-defer-title`,1,`defer`],[3,`page`,`pageId`,`rpc`],[`id`,`ct-page-label`,1,`sr-only`],[`labelledBy`,`ct-page-label`,1,`page-select`,3,`valueChange`,`options`,`value`],[`type`,`button`,1,`pick`,3,`click`],[`d`,`M4 4l6.5 16 2.3-6.7L19.5 11z`],[1,`state-title`],[1,`state-hint`],[`type`,`button`,3,`click`],[`role`,`treeitem`,1,`row`,3,`click`,`focus`,`blur`,`mouseenter`,`mouseleave`],[`aria-hidden`,`true`,1,`twisty`,3,`open`],[`aria-hidden`,`true`,1,`twisty-space`],[1,`name`,`mono`],[1,`tag`,`mono`],[1,`routed`],[1,`checks`],[1,`dirs`],[`aria-hidden`,`true`,1,`twisty`,3,`click`],[`viewBox`,`0 0 24 24`],[`d`,`m9 6 6 6-6 6`],[1,`detail-head`],[1,`badge`],[`id`,`ct-detail-title`,1,`mono`],[1,`mono`,`muted`],[1,`where`,`mono`],[`role`,`status`,1,`state`,`compact`],[3,`file`,`line`],[`role`,`group`,`aria-label`,`Chrome DevTools`,1,`actions`],[`role`,`status`,1,`where`,`action-message`],[1,`actions`],[`type`,`button`,1,`show-form`],[`type`,`button`,1,`show-form`,3,`click`],[1,`facts`],[1,`mono`],[1,`block`],[1,`pill`],[1,`props`],[1,`empty-line`],[1,`chips`],[1,`deps`],[1,`prop`],[1,`prop-name`,`mono`],[1,`muted`],[1,`chip`,3,`on`],[1,`chip`],[1,`chip-note`],[1,`flag`],[1,`chip`,`mono`],[1,`dep`],[1,`token`,`mono`],[1,`from`],[1,`from`,`missing`],[`aria-hidden`,`true`,1,`spinner`],[`id`,`ct-defer-title`,1,`defer-title`],[1,`defer-list`],[`type`,`button`,1,`defer-row`,3,`click`,`focus`,`blur`,`mouseenter`,`mouseleave`],[1,`defer-state`],[1,`triggers`,`mono`],[1,`notice`],[`type`,`search`,`placeholder`,`Filter by selector, class or file…`,`aria-label`,`Filter components by selector, class or file`,`autocomplete`,`off`,`spellcheck`,`false`,3,`input`,`keydown.escape`,`value`],[`aria-live`,`polite`,1,`count`],[`type`,`button`,1,`refresh`,3,`click`],[`d`,`M20 12a8 8 0 1 1-2.34-5.66`],[`d`,`M20 4v5h-5`],[`role`,`status`,1,`state`],[`role`,`alert`,1,`state`],[1,`state`],[`role`,`list`,1,`source-list`],[1,`source-item`,3,`expanded`],[1,`source-item`],[`type`,`button`,1,`source-toggle`,3,`click`],[1,`kind-flag`],[1,`row-main`],[1,`selector`,`mono`],[1,`file`,`mono`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`,1,`chevron`],[1,`inline-detail`,3,`id`]],template:function(e,t){e&1&&P(0,Ik,39,14)(1,eA,20,7),e&2&&F(+!t.live())},dependencies:[GD,gO,TO,pb],styles:[`[_nghost-%COMP%] {
+}`]})},OO=[`field`],kO=[`editButton`],AO=[`valueBox`];function jO(e,t){if(e&1){let e=W();H(0,`div`,5)(1,`label`,6),J(2),U(),H(3,`input`,7,0),n_(`input`,function(t){return O(e),k(K().draft.set(t.target.value))})(`keydown.enter`,function(t){O(e);let n=K();return t.preventDefault(),k(n.apply())})(`keydown.escape`,function(t){O(e);let n=K();return t.preventDefault(),t.stopPropagation(),k(n.cancel())}),U(),H(5,`button`,8),n_(`click`,function(){return O(e),k(K().apply())}),J(6,`Apply`),U(),H(7,`button`,9),n_(`click`,function(){return O(e),k(K().cancel())}),J(8,`Cancel`),U()(),H(9,`p`,10),J(10),U()}if(e&2){let e=K();M(),Gg(`htmlFor`,e.fieldId),M(),X(`New value of `,e.prop().name,`, as JSON`),M(),Gg(`id`,e.fieldId)(`value`,e.draft())(`readOnly`,e.busy()),N(`aria-busy`,e.busy()?`true`:null)(`aria-invalid`,e.error()?`true`:null)(`aria-describedby`,e.hintId+(e.error()?` `+e.errorId:``)),M(2),Gg(`disabled`,e.busy()),M(4),Gg(`id`,e.hintId),M(),X(` JSON, such as "text", 42, true or `,e.objectSample,`. Enter applies, Escape cancels. `)}}function MO(e,t){if(e&1){let e=W();H(0,`button`,14,2),n_(`click`,function(){return O(e),k(K(2).start())}),J(2,` Edit `),U()}e&2&&N(`aria-label`,`Edit `+K(2).prop().name)}function NO(e,t){if(e&1&&(H(0,`p`,13),J(1),U()),e&2){let e=K(2);M(),Y(e.prop().locked)}}function PO(e,t){if(e&1&&(H(0,`div`,11)(1,`pre`,null,1),J(3),xv(4,`json`),U(),P(5,MO,3,1,`button`,12),U(),P(6,NO,2,1,`p`,13)),e&2){let e=K();M(),N(`tabindex`,e.scrollable()?0:null)(`role`,e.scrollable()?`region`:null)(`aria-label`,e.scrollable()?`Value of `+e.prop().name:null),M(2),Y(Cv(4,6,e.prop().value)),M(2),F(e.editable()?5:-1),M(),F(e.writes()&&e.prop().locked?6:-1)}}function FO(e,t){if(e&1&&(H(0,`p`,3),J(1),U()),e&2){let e=K();Gg(`id`,e.errorId),M(),Y(e.error())}}var IO=0;function LO(e){let t=e.trim();if(!t)return{error:`Type a JSON value, such as "text", 42, true, null or [1, 2].`};try{return{value:JSON.parse(t)}}catch{return{error:`Not valid JSON. Put text in double quotes, such as "Paris".`}}}var RO=class e{prop=$.required();componentId=$.required();pageId=$(null);rpc=$(null);writes=$(!1);fieldId=`prop-edit-${++IO}`;hintId=`${this.fieldId}-hint`;errorId=`${this.fieldId}-error`;objectSample=`{"a": 1}`;editing=j(!1);draft=j(``);busy=j(!1);error=j(``);done=j(``);editable=Q(()=>this.writes()&&!!this.prop().edit&&!!this.pageId()&&!!this.rpc());field=Jv(`field`);editButton=Jv(`editButton`);valueBox=Jv(`valueBox`);injector=E(Ss);scrollable=j(!1);constructor(){uy(()=>{this.prop();let e=this.valueBox()?.nativeElement;this.scrollable.set(!!e&&e.scrollHeight>e.clientHeight+1)})}start(){let e=this.prop().value;this.draft.set(e===void 0?``:JSON.stringify(e)),this.error.set(``),this.done.set(``),this.editing.set(!0),zd(()=>{let e=this.field()?.nativeElement;e?.focus(),e?.select()},{injector:this.injector})}cancel(){this.editing()&&(this.editing.set(!1),this.busy.set(!1),this.error.set(``),this.focusEdit())}async apply(){if(this.busy())return;let e=LO(this.draft());if(`error`in e){this.error.set(e.error);return}let t=this.prop(),n=this.rpc(),r=this.pageId();if(!n||!r||!t.edit)return;this.busy.set(!0),this.error.set(``);let i;try{i=await n.scope(`pangular`).rpc.call(`request-component-edit`,{pageId:r,request:{id:this.componentId(),path:t.prop,value:e.value,kind:t.edit}})??{}}catch{i={error:`The devtools server did not answer. Try again.`}}this.busy.set(!1),this.editing()&&(i.ok?(this.editing.set(!1),this.done.set(`Set ${t.name}.`),this.focusEdit()):(this.error.set(i.error??`The page did not write it.`),this.field()?.nativeElement.focus()))}focusEdit(){zd(()=>this.editButton()?.nativeElement.focus(),{injector:this.injector})}static ɵfac=function(t){return new(t||e)};static ɵcmp=Wh({type:e,selectors:[[`app-prop-value`]],viewQuery:function(e,t){e&1&&c_(t.field,OO,5)(t.editButton,kO,5)(t.valueBox,AO,5),e&2&&l_(3)},inputs:{prop:[1,`prop`],componentId:[1,`componentId`],pageId:[1,`pageId`],rpc:[1,`rpc`],writes:[1,`writes`]},decls:5,vars:3,consts:[[`field`,``],[`valueBox`,``],[`editButton`,``],[`role`,`alert`,1,`error`,3,`id`],[`role`,`status`,1,`sr-only`],[1,`editor`],[1,`sr-only`,3,`for`],[`type`,`text`,`autocomplete`,`off`,`spellcheck`,`false`,1,`field`,`mono`,3,`input`,`keydown.enter`,`keydown.escape`,`id`,`value`,`readOnly`],[`type`,`button`,1,`primary`,3,`click`,`disabled`],[`type`,`button`,3,`click`],[1,`hint`,3,`id`],[1,`view`],[`type`,`button`,1,`edit`],[1,`locked`],[`type`,`button`,1,`edit`,3,`click`]],template:function(e,t){e&1&&(P(0,jO,11,11)(1,PO,7,8),P(2,FO,2,2,`p`,3),H(3,`p`,4),J(4),U()),e&2&&(F(+!t.editing()),M(2),F(t.error()?2:-1),M(2),Y(t.done()))},dependencies:[hb],styles:[`[_nghost-%COMP%] {
+  display: block;
+  min-width: 0;
+}
+
+.view[_ngcontent-%COMP%] {
+  display: flex;
+  align-items: flex-start;
+  gap: 8px;
+}
+
+pre[_ngcontent-%COMP%] {
+  flex: 1 1 auto;
+  min-width: 0;
+  max-height: 200px;
+  margin: 0;
+  overflow: auto;
+  color: var(--%NS%text);
+  font-family: var(--%NS%font-mono);
+  font-size: 12px;
+  line-height: 1.5;
+  white-space: pre-wrap;
+  overflow-wrap: anywhere;
+}
+
+.editor[_ngcontent-%COMP%] {
+  display: flex;
+  flex-wrap: wrap;
+  gap: 6px;
+  align-items: center;
+}
+
+.field[_ngcontent-%COMP%] {
+  flex: 1 1 160px;
+  min-width: 0;
+  height: var(--%NS%control-h);
+  padding: 0 10px;
+  background: var(--%NS%bg);
+  border: 1px solid var(--%NS%border-strong);
+  border-radius: var(--%NS%radius-sm);
+  color: var(--%NS%text);
+  font-family: var(--%NS%font-mono);
+  font-size: 12px;
+}
+
+.field[_ngcontent-%COMP%]:focus-visible {
+  outline: none;
+  border-color: var(--%NS%accent);
+  box-shadow: 0 0 0 3px var(--%NS%accent-soft);
+}
+
+.field[aria-invalid=true][_ngcontent-%COMP%] {
+  border-color: var(--%NS%danger);
+}
+
+button[_ngcontent-%COMP%] {
+  display: inline-flex;
+  flex: none;
+  align-items: center;
+  height: var(--%NS%control-h);
+  padding: 0 12px;
+  background: var(--%NS%surface-2);
+  border: 1px solid var(--%NS%border-strong);
+  border-radius: var(--%NS%radius-sm);
+  color: var(--%NS%text);
+  cursor: pointer;
+  font: inherit;
+  font-size: 13px;
+  font-weight: 500;
+  transition: background-color 150ms var(--%NS%ease), border-color 150ms var(--%NS%ease);
+}
+
+button[_ngcontent-%COMP%]:hover:not(:disabled) {
+  background: var(--%NS%surface-3);
+  border-color: var(--%NS%accent-line);
+}
+
+button[_ngcontent-%COMP%]:focus-visible {
+  outline: 2px solid var(--%NS%accent);
+  outline-offset: 2px;
+}
+
+pre[_ngcontent-%COMP%]:focus-visible {
+  outline: 2px solid var(--%NS%accent);
+  outline-offset: -2px;
+}
+
+button[_ngcontent-%COMP%]:disabled {
+  opacity: 0.6;
+}
+
+button.primary[_ngcontent-%COMP%] {
+  background: var(--%NS%accent);
+  border-color: var(--%NS%accent);
+  color: var(--%NS%accent-ink);
+}
+
+button.primary[_ngcontent-%COMP%]:hover:not(:disabled) {
+  background: var(--%NS%accent-hover);
+  border-color: var(--%NS%accent-hover);
+}
+
+button.edit[_ngcontent-%COMP%] {
+  height: 26px;
+  padding: 0 10px;
+  font-size: 12px;
+}
+
+.hint[_ngcontent-%COMP%], 
+.locked[_ngcontent-%COMP%], 
+.error[_ngcontent-%COMP%] {
+  margin: 6px 0 0;
+  font-size: 12px;
+  line-height: 1.4;
+}
+
+.hint[_ngcontent-%COMP%], 
+.locked[_ngcontent-%COMP%] {
+  color: var(--%NS%text-2);
+}
+
+.error[_ngcontent-%COMP%] {
+  color: var(--%NS%danger-text);
+}`]})};function zO(e,t){if(e&1&&(H(0,`span`,1),J(1),U()),e&2){let e=K(2);M(),X(`: `,e.label())}}function BO(e,t){if(e&1){let e=W();H(0,`button`,0),n_(`click`,function(){return O(e),k(K().store())}),J(1,` Store as global `),P(2,zO,2,1,`span`,1),U(),H(3,`span`,2),J(4),U()}if(e&2){let e=K();Gg(`disabled`,e.busy()||!e.rpc()||!e.pageId()),M(2),F(e.label()?2:-1),M(2),Y(e.message())}}var VO=class e{rpc=$(null);pageId=$(null);target=$.required();label=$(``);staticReport=Q(()=>vE(this.rpc()));busy=j(!1);message=j(``);async store(){let e=this.rpc(),t=this.pageId();if(e&&t){this.busy.set(!0),this.message.set(``);try{let n=await e.scope(`pangular`).rpc.call(`request-console-global`,{pageId:t,target:this.target()});this.message.set(n?.message||(n?.ok&&n.name?`Stored as ${n.name}.`:`Not stored.`))}catch{this.message.set(`Could not reach the page.`)}finally{this.busy.set(!1)}}}static ɵfac=function(t){return new(t||e)};static ɵcmp=Wh({type:e,selectors:[[`app-store-global`]],inputs:{rpc:[1,`rpc`],pageId:[1,`pageId`],target:[1,`target`],label:[1,`label`]},decls:1,vars:1,consts:[[`type`,`button`,1,`store`,3,`click`,`disabled`],[1,`sr-only`],[`role`,`status`,1,`status`]],template:function(e,t){e&1&&P(0,BO,5,3),e&2&&F(t.staticReport()?-1:0)},styles:[`[_nghost-%COMP%] {
+  display: inline-flex;
+  flex-wrap: wrap;
+  align-items: center;
+  gap: 8px;
+  min-width: 0;
+}
+
+.store[_ngcontent-%COMP%]:focus-visible {
+  outline: 2px solid var(--%NS%accent);
+  outline-offset: 2px;
+}
+
+.status[_ngcontent-%COMP%] {
+  color: var(--%NS%text-2);
+  font-size: 12px;
+}
+
+.status[_ngcontent-%COMP%]:empty {
+  display: none;
+}`]})},HO=(e,t)=>t.id;function UO(e,t){if(e&1&&(H(0,`p`,4),J(1),U()),e&2){let e=K(2);M(),X(`The page has more @for blocks than the `,e.length,` listed.`)}}function WO(e,t){e&1&&(H(0,`span`,9),J(1,`@empty showing`),U())}function GO(e,t){e&1&&(H(0,`span`,10),J(1,`@empty`),U())}function KO(e,t){e&1&&(H(0,`span`,10),J(1,`renders nothing`),U())}function qO(e,t){if(e&1){let e=W();H(0,`li`)(1,`button`,6),n_(`click`,function(){let t=O(e).$implicit;return k(K(3).showOwner.emit(t))})(`focus`,function(){let t=O(e).$implicit,n=K(3);return k(n.highlight.emit(n.target(t)))})(`blur`,function(){return O(e),k(K(3).highlight.emit(null))})(`mouseenter`,function(){let t=O(e).$implicit,n=K(3);return k(n.highlight.emit(n.target(t)))})(`mouseleave`,function(){return O(e),k(K(3).highlight.emit(null))}),H(2,`span`,7),J(3),U(),H(4,`span`,8),J(5),U(),P(6,WO,2,0,`span`,9)(7,GO,2,0,`span`,10)(8,KO,2,0,`span`,10),H(9,`span`,11),J(10),U()()()}if(e&2){let e=t.$implicit,n=K(3);M(),N(`aria-disabled`,e.owner?null:`true`),M(2),Y(e.owner?.name??`Unknown component`),M(2),Z(` `,e.count,` `,e.count===1?`item`:`items`,` `),M(),F(e.showingEmpty?6:e.hasEmptyBlock?7:e.count===0?8:-1),M(4),Y(n.trackLabel(e))}}function JO(e,t){if(e&1&&(H(0,`section`,1)(1,`h2`,2),J(2,` @for blocks `),H(3,`span`,3),J(4),U()(),P(5,UO,2,1,`p`,4),H(6,`ul`,5),I(7,qO,11,6,`li`,null,HO),U()()),e&2){let e=K(),t=K();M(4),Y(t.truncated()?e.length+`+`:e.length),M(),F(t.truncated()?5:-1),M(2),L(e)}}function YO(e,t){e&1&&P(0,JO,9,2,`section`,1),e&2&&F(t.length?0:-1)}function XO(e,t){e&1&&(H(0,`p`,0),J(1,` @for blocks are listed from Angular 22.0 in development builds. This page's Angular does not report them. `),U())}var ZO={$index:`track $index`,item:`track item`,function:`track expression`},QO=class e{blocks=$(void 0);truncated=$(!1);supported=$(null);showOwner=Rv();highlight=Rv();target(e){return e.rootIds[0]??e.owner?.id??null}trackLabel(e){return e.track?ZO[e.track]:`track unknown`}static ɵfac=function(t){return new(t||e)};static ɵcmp=Wh({type:e,selectors:[[`app-for-blocks`]],inputs:{blocks:[1,`blocks`],truncated:[1,`truncated`],supported:[1,`supported`]},outputs:{showOwner:`showOwner`,highlight:`highlight`},decls:2,vars:1,consts:[[1,`note`,`for`],[`aria-labelledby`,`ct-for-title`,1,`for`],[`id`,`ct-for-title`,1,`for-title`],[1,`pill`],[1,`note`],[1,`for-list`],[`type`,`button`,1,`for-row`,3,`click`,`focus`,`blur`,`mouseenter`,`mouseleave`],[1,`name`,`mono`],[1,`count`],[1,`flag`,`empty`],[1,`flag`],[1,`track`,`mono`]],template:function(e,t){if(e&1&&P(0,YO,1,1)(1,XO,2,0,`p`,0),e&2){let e;F((e=t.blocks())?0:t.supported()===!1?1:-1,e)}},styles:[`[_nghost-%COMP%] {
+  display: block;
+}
+
+.for[_ngcontent-%COMP%] {
+  margin-top: 16px;
+}
+
+.for-title[_ngcontent-%COMP%] {
+  color: var(--%NS%text-3);
+  font-size: 11px;
+  font-weight: 600;
+  letter-spacing: 0.08em;
+  text-transform: uppercase;
+  display: flex;
+  align-items: center;
+  gap: 6px;
+  margin: 0 0 8px;
+}
+
+.pill[_ngcontent-%COMP%] {
+  display: inline-flex;
+  align-items: center;
+  justify-content: center;
+  min-width: 18px;
+  height: 16px;
+  padding: 0 5px;
+  border-radius: 99px;
+  background: var(--%NS%surface-3);
+  color: var(--%NS%text-2);
+  font-size: 10px;
+  font-weight: 600;
+  letter-spacing: 0;
+}
+
+.note[_ngcontent-%COMP%] {
+  margin: 0 0 8px;
+  color: var(--%NS%text-2);
+  font-size: 12px;
+  line-height: 1.5;
+}
+
+.for-list[_ngcontent-%COMP%] {
+  display: grid;
+  gap: 6px;
+  margin: 0;
+  padding: 0;
+  list-style: none;
+}
+
+.for-row[_ngcontent-%COMP%] {
+  justify-content: flex-start;
+  flex-wrap: wrap;
+  width: 100%;
+  height: auto;
+  min-height: var(--%NS%control-h);
+  padding: 6px 12px;
+  background: var(--%NS%surface);
+  border-color: var(--%NS%border);
+  text-align: left;
+}
+
+.for-row[_ngcontent-%COMP%]:focus-visible {
+  outline: 2px solid var(--%NS%accent);
+  outline-offset: 2px;
+}
+
+.for-row[aria-disabled=true][_ngcontent-%COMP%] {
+  cursor: default;
+}
+
+.name[_ngcontent-%COMP%] {
+  min-width: 0;
+  color: var(--%NS%text-strong);
+  font-size: 12px;
+  font-weight: 600;
+  overflow: hidden;
+  min-width: 0;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+}
+
+.mono[_ngcontent-%COMP%] {
+  font-family: var(--%NS%font-mono);
+}
+
+.count[_ngcontent-%COMP%] {
+  padding: 0 8px;
+  border-radius: 99px;
+  background: var(--%NS%surface-3);
+  color: var(--%NS%text-2);
+  font-size: 11px;
+  line-height: 18px;
+}
+
+.flag[_ngcontent-%COMP%] {
+  padding: 0 6px;
+  border: 1px solid var(--%NS%border-strong);
+  border-radius: 5px;
+  color: var(--%NS%text-2);
+  font-family: var(--%NS%font-mono);
+  font-size: 10px;
+}
+
+.flag.empty[_ngcontent-%COMP%] {
+  border-color: color-mix(in srgb, var(--%NS%warn) 30%, transparent);
+  background: color-mix(in srgb, var(--%NS%warn) 12%, transparent);
+  color: var(--%NS%warn-text);
+}
+
+.track[_ngcontent-%COMP%] {
+  min-width: 0;
+  color: var(--%NS%text-2);
+  font-size: 12px;
+  overflow: hidden;
+  min-width: 0;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+}`]})},$O=[`filterInput`],ek=()=>[],tk=e=>({kind:`component`,id:e}),nk=(e,t)=>t.node.id,rk=(e,t)=>t.outlet+t.route,ik=(e,t)=>t.formId,ak=(e,t)=>t.name+e,ok=(e,t)=>t.name,sk=(e,t)=>t.token+e,ck=(e,t)=>t.id;function lk(e,t){return this.sourceKey(t)}function uk(e,t){if(e&1){let e=W();z(0,`span`,29),J(1,`Page`),B(),z(2,`app-select`,30),G(`valueChange`,function(t){return O(e),k(K(2).selectPage(t))}),B()}if(e&2){let e=K(2);M(2),R(`options`,e.pageOptions())(`value`,e.page()?.pageId??null)}}function dk(e,t){if(e&1){let e=W();z(0,`button`,31),G(`click`,function(){O(e);let t=K(2);return k(t.picking()?t.cancelPick():t.pick())}),A(),z(1,`svg`,10),V(2,`path`,32),B(),J(3),B()}if(e&2){let e=K(2);q(`on`,e.picking()),M(3),X(` `,e.picking()?`Cancel pick`:`Pick component on page`,` `)}}function fk(e,t){if(e&1&&(z(0,`p`,17),J(1),B()),e&2){let e=K(2);M(),Y(e.pickMessage())}}function pk(e,t){if(e&1&&(z(0,`p`,18),J(1),B()),e&2){let e=K(2);M(),Y(e.truncationText())}}function mk(e,t){e&1&&(z(0,`p`,34),J(1,`The filter only searches the components the tree lists.`),B())}function hk(e,t){if(e&1){let e=W();z(0,`div`,21)(1,`p`,33),J(2),B(),P(3,mk,2,0,`p`,34),z(4,`button`,35),G(`click`,function(){return O(e),k(K(2).clearFilter())}),J(5,`Clear filter`),B()()}if(e&2){let e=K(2);M(2),X(`No components match “`,e.filter().trim(),`”`),M(),F(e.page().truncated?3:-1)}}function gk(e,t){if(e&1){let e=W();z(0,`span`,44),G(`click`,function(t){O(e);let n=K().$implicit;return k(K(2).toggle(n.node.id,t))}),A(),z(1,`svg`,45),V(2,`path`,46),B()()}if(e&2){let e=K().$implicit;q(`open`,e.expanded)}}function _k(e,t){e&1&&V(0,`span`,38)}function vk(e,t){if(e&1&&(z(0,`span`,41),J(1),B()),e&2){let e=t.$implicit;M(),Y(e.route||`/`)}}function yk(e,t){if(e&1&&(z(0,`span`,42),J(1),z(2,`span`,20),J(3),B()()),e&2){let e=t;M(),X(` `,e),M(2),X(` `,e===1?`check`:`checks`,` while recording`)}}function bk(e,t){if(e&1&&(z(0,`span`,43),J(1),z(2,`span`,20),J(3),B()()),e&2){let e=K().$implicit;N(`title`,e.node.directives.join(`, `)),M(),X(` +`,e.node.directives.length,` `),M(2),X(` `,e.node.directives.length===1?`directive`:`directives`,` `)}}function xk(e,t){if(e&1){let e=W();z(0,`div`,36),G(`click`,function(){let t=O(e).$implicit;return k(K(2).select(t.node.id))})(`focus`,function(){let t=O(e).$implicit,n=K(2);return n.focusId.set(t.node.id),k(n.highlight(t.node.id))})(`blur`,function(){return O(e),k(K(2).highlight(null))})(`mouseenter`,function(){let t=O(e).$implicit;return k(K(2).highlight(t.node.id))})(`mouseleave`,function(){return O(e),k(K(2).highlight(null))}),P(1,gk,3,2,`span`,37)(2,_k,1,0,`span`,38),z(3,`span`,39),J(4),B(),z(5,`span`,40),J(6),B(),I(7,vk,2,1,`span`,41,rk),P(9,yk,4,2,`span`,42),P(10,bk,4,3,`span`,43),B()}if(e&2){let e,n=t.$implicit,r=K(2);j_(`--%NS%depth`,n.depth),q(`selected`,r.selectedId()===n.node.id),N(`aria-level`,n.depth+1)(`aria-expanded`,n.hasChildren?n.expanded:null)(`aria-selected`,r.selectedId()===n.node.id)(`tabindex`,r.rovingId()===n.node.id?0:-1)(`data-id`,n.node.id),M(),F(n.hasChildren?1:2),M(3),Y(n.node.name),M(2),X(`<`,n.node.tag,`>`),M(),L(r.routedById().get(n.node.id)??mv(14,ek)),M(2),F((e=r.cdHosts()[n.node.id])?9:-1,e),M(),F(n.node.directives?.length?10:-1)}}function Sk(e,t){if(e&1&&(z(0,`p`,51),V(1,`app-source-link`,54),B()),e&2){let e=t;M(),R(`file`,e.file)(`line`,e.line)}}function Ck(e,t){if(e&1){let e=W();z(0,`div`,55)(1,`button`,35),G(`click`,function(){O(e);let t=K();return k(K(2).revealInElements(t))}),J(2,`Reveal in Elements`),B(),z(3,`button`,35),G(`click`,function(){O(e);let t=K();return k(K(2).openSource(t))}),J(4,`Open source`),B()(),z(5,`p`,56),J(6),B()}if(e&2){let e=K(3);M(6),Y(e.actionMessage())}}function wk(e,t){if(e&1){let e=W();z(0,`button`,59),G(`click`,function(){let t=O(e).$implicit;return k(K(5).showForm.emit(t.formId))}),J(1),B()}if(e&2){let e=t.$implicit;M(),X(` Show `,e.label,` in Forms `)}}function Tk(e,t){if(e&1&&(z(0,`div`,57),I(1,wk,2,1,`button`,58,ik),B()),e&2){let e=K(),t=K(3);M(),L(t.formsIn(e.file))}}function Ek(e,t){e&1&&P(0,Tk,3,0,`div`,57),e&2&&F(K(3).formsIn(t.file).length?0:-1)}function Dk(e,t){if(e&1&&V(0,`app-store-global`,52),e&2){let e=K(),t=K(2);R(`rpc`,t.rpc())(`pageId`,t.page()?.pageId)(`target`,hv(4,tk,e.id))(`label`,e.name)}}function Ok(e,t){if(e&1&&(z(0,`dt`),J(1,`Routed`),B(),z(2,`dd`,61),J(3),B()),e&2){let e=t.$implicit;M(3),Z(``,e.route||`/`,` in outlet `,e.outlet)}}function kk(e,t){if(e&1&&(z(0,`span`,70),J(1),B()),e&2){let e=K().$implicit;M(),X(`(`,e.prop,`)`)}}function Ak(e,t){if(e&1&&(z(0,`li`,68)(1,`span`,69),J(2),P(3,kk,2,1,`span`,70),B(),V(4,`app-prop-value`,71),B()),e&2){let e=t.$implicit,n=K(2),r=K(3);M(2),X(` `,e.name,` `),M(),F(e.prop===e.name?-1:3),M(),R(`prop`,e)(`componentId`,n.id)(`pageId`,r.page()?.pageId??null)(`rpc`,r.rpc())(`writes`,r.canEdit())}}function jk(e,t){if(e&1&&(z(0,`ul`,64),I(1,Ak,5,7,`li`,68,ok),B()),e&2){let e=K();M(),L(e.inputs)}}function Mk(e,t){e&1&&(z(0,`p`,65),J(1,`No inputs.`),B())}function Nk(e,t){if(e&1&&(z(0,`li`,73)(1,`span`,61),J(2),B(),z(3,`span`,74),J(4),B()()),e&2){let e=t.$implicit;q(`on`,e.listened),M(2),Y(e.name),M(2),Y(e.listened?`listened`:`no listener`)}}function Pk(e,t){if(e&1&&(z(0,`ul`,66),I(1,Nk,5,4,`li`,72,ok),B()),e&2){let e=K();M(),L(e.outputs)}}function Fk(e,t){e&1&&(z(0,`p`,65),J(1,`No outputs.`),B())}function Ik(e,t){if(e&1&&(z(0,`span`,75),J(1),B()),e&2){let e=K().$implicit;M(),Y(e.kind)}}function Lk(e,t){if(e&1&&(z(0,`li`,68)(1,`span`,69),J(2),P(3,Ik,2,1,`span`,75),B(),V(4,`app-prop-value`,71),B()),e&2){let e=t.$implicit,n=K(2),r=K(3);M(2),X(` `,e.name,` `),M(),F(e.kind?3:-1),M(),R(`prop`,e)(`componentId`,n.id)(`pageId`,r.page()?.pageId??null)(`rpc`,r.rpc())(`writes`,r.canEdit())}}function Rk(e,t){if(e&1&&(z(0,`ul`,64),I(1,Lk,5,7,`li`,68,ok),B()),e&2){let e=K();M(),L(e.properties)}}function zk(e,t){e&1&&(z(0,`p`,65),J(1,`No other properties.`),B())}function Bk(e,t){if(e&1&&(z(0,`li`,76),J(1),B()),e&2){let e=t.$implicit;M(),Y(e)}}function Vk(e,t){if(e&1&&(z(0,`div`,62)(1,`h3`),J(2,` DOM listeners `),z(3,`span`,63),J(4),B()(),z(5,`ul`,66),I(6,Bk,2,1,`li`,76,Og),B()()),e&2){let e=K();M(4),Y(e.listeners.length),M(2),L(e.listeners)}}function Hk(e,t){if(e&1&&(z(0,`li`,68)(1,`span`,69),J(2),B(),z(3,`pre`),J(4),xv(5,`json`),B()()),e&2){let e=t.$implicit;M(2),Y(e.name),M(2),Y(Cv(5,2,e.value))}}function Uk(e,t){if(e&1&&(z(0,`ul`,64),I(1,Hk,6,4,`li`,68,ok),B()),e&2){let e=K().$implicit;M(),L(e.inputs)}}function Wk(e,t){if(e&1&&(z(0,`li`,73)(1,`span`,61),J(2),B(),z(3,`span`,74),J(4),B()()),e&2){let e=t.$implicit;q(`on`,e.listened),M(2),Y(e.name),M(2),Y(e.listened?`listened`:`no listener`)}}function Gk(e,t){if(e&1&&(z(0,`ul`,66),I(1,Wk,5,4,`li`,72,ok),B()),e&2){let e=K().$implicit;M(),L(e.outputs)}}function Kk(e,t){e&1&&(z(0,`p`,65),J(1,`No inputs or outputs.`),B())}function qk(e,t){if(e&1&&(z(0,`div`,62)(1,`h3`)(2,`span`,61),J(3),B(),z(4,`span`,75),J(5,`directive on host`),B()(),P(6,Uk,3,0,`ul`,64),P(7,Gk,3,0,`ul`,66),P(8,Kk,2,0,`p`,65),B()),e&2){let e=t.$implicit;M(3),Y(e.name),M(3),F(e.inputs.length?6:-1),M(),F(e.outputs.length?7:-1),M(),F(!e.inputs.length&&!e.outputs.length?8:-1)}}function Jk(e,t){if(e&1&&(z(0,`span`,75),J(1),B()),e&2){let e=t.$implicit;M(),Y(e)}}function Yk(e,t){if(e&1&&(z(0,`span`,79),J(1,`from `),z(2,`span`,61),J(3),B()()),e&2){let e=K().$implicit;M(3),Y(e.providedByName??`an injector`)}}function Xk(e,t){e&1&&(z(0,`span`,80),J(1,`not provided`),B())}function Zk(e,t){if(e&1&&(z(0,`li`,77)(1,`span`,78),J(2),B(),I(3,Jk,2,1,`span`,75,Og),P(5,Yk,4,1,`span`,79)(6,Xk,2,0,`span`,80),B()),e&2){let e=t.$implicit;M(2),Y(e.token),M(),L(e.flags),M(2),F(e.providedBy?5:6)}}function Qk(e,t){if(e&1&&(z(0,`ul`,67),I(1,Zk,7,2,`li`,77,sk),B()),e&2){let e=K();M(),L(e.dependencies)}}function $k(e,t){e&1&&(z(0,`p`,65),J(1,`Nothing is injected through the constructor or inject().`),B())}function eA(e,t){if(e&1&&(z(0,`dl`,60)(1,`dt`),J(2,`Change detection`),B(),z(3,`dd`),J(4),B(),z(5,`dt`),J(6,`Encapsulation`),B(),z(7,`dd`),J(8),B(),z(9,`dt`),J(10,`Host path`),B(),z(11,`dd`,61),J(12),B(),I(13,Ok,4,2,null,null,rk),B(),z(15,`div`,62)(16,`h3`),J(17,` Inputs `),z(18,`span`,63),J(19),B()(),P(20,jk,3,0,`ul`,64)(21,Mk,2,0,`p`,65),B(),z(22,`div`,62)(23,`h3`),J(24,` Outputs `),z(25,`span`,63),J(26),B()(),P(27,Pk,3,0,`ul`,66)(28,Fk,2,0,`p`,65),B(),z(29,`div`,62)(30,`h3`),J(31,` Properties `),z(32,`span`,63),J(33),B()(),P(34,Rk,3,0,`ul`,64)(35,zk,2,0,`p`,65),B(),P(36,Vk,8,1,`div`,62),I(37,qk,9,4,`div`,62,ak),z(39,`div`,62)(40,`h3`),J(41,` Injected `),z(42,`span`,63),J(43),B()(),P(44,Qk,3,0,`ul`,67)(45,$k,2,0,`p`,65),B()),e&2){let e=t,n=K(),r=K(2);M(4),Y(e.changeDetection??`Unknown`),M(4),Y(e.encapsulation??`Unknown`),M(4),Y(e.path),M(),L(r.routedById().get(n.id)??mv(12,ek)),M(6),Y(e.inputs.length),M(),F(e.inputs.length?20:21),M(6),Y(e.outputs.length),M(),F(e.outputs.length?27:28),M(6),Y(e.properties?.length??0),M(),F(e.properties?.length?34:35),M(2),F(e.listeners.length?36:-1),M(),L(e.directives),M(6),Y(e.dependencies.length),M(),F(e.dependencies.length?44:45)}}function tA(e,t){e&1&&(z(0,`div`,53),V(1,`span`,81),z(2,`p`,34),J(3,`Reading live values from the page…`),B()())}function nA(e,t){if(e&1&&(z(0,`section`,24)(1,`header`,47)(2,`span`,48),J(3,`component`),B(),z(4,`h2`,49),J(5),B(),z(6,`span`,50),J(7),B(),P(8,Sk,2,2,`p`,51),P(9,Ck,7,1),P(10,Ek,1,1),P(11,Dk,1,6,`app-store-global`,52),B(),P(12,eA,46,13)(13,tA,4,0,`div`,53),B()),e&2){let e,n,r,i=t,a=K(2);M(5),Y(i.name),M(2),X(`<`,i.tag,`>`),M(),F((e=a.whereOf(i))?8:-1,e),M(),F(a.devtoolsActions()?9:-1),M(),F((n=a.sourceFor(i))?10:-1,n),M(),F(!a.staticReport()&&!a.native()?11:-1),M(),F((r=a.detail())?12:13,r)}}function rA(e,t){e&1&&(z(0,`p`,33),J(1,`The selected component was destroyed`),B(),z(2,`p`,34)(3,`span`,61),J(4),B(),J(5,` is no longer on the page. Select another component to see its live values. `),B()),e&2&&(M(4),Y(t))}function iA(e,t){e&1&&(z(0,`p`,34),J(1,` Select a component to see its live inputs, properties, outputs, change detection and injected services. `),B())}function aA(e,t){if(e&1&&(z(0,`div`,25),P(1,rA,6,1)(2,iA,2,0,`p`,34),B()),e&2){let e,t=K(2);M(),F((e=t.destroyed())?1:2,e)}}function oA(e,t){e&1&&(z(0,`span`,75),J(1,`hydrate never`),B())}function sA(e,t){if(e&1&&(z(0,`span`,75),J(1),B()),e&2){let e=K().$implicit;M(),Y(e.hydration)}}function cA(e,t){if(e&1){let e=W();z(0,`li`)(1,`button`,84),G(`click`,function(){let t=O(e).$implicit;return k(K(3).showOwner(t))})(`focus`,function(){let t=O(e).$implicit;return k(K(3).highlightBlock(t))})(`blur`,function(){return O(e),k(K(3).highlight(null))})(`mouseenter`,function(){let t=O(e).$implicit;return k(K(3).highlightBlock(t))})(`mouseleave`,function(){return O(e),k(K(3).highlight(null))}),z(2,`span`,39),J(3),B(),z(4,`span`,85),J(5),B(),P(6,oA,2,0,`span`,75)(7,sA,2,1,`span`,75),z(8,`span`,86),J(9),B()()()}if(e&2){let e=t.$implicit;M(),N(`aria-disabled`,e.owner?null:`true`),M(2),Y(e.owner?.name??`Unknown component`),M(),M_(`defer-state-`+e.state),M(),Y(e.state),M(),F(e.hydrateNever?6:e.hydration===`not-configured`?-1:7),M(3),Y(e.triggers.join(`, `)||`no triggers`)}}function lA(e,t){if(e&1&&(z(0,`section`,26)(1,`h2`,82),J(2,` Defer blocks `),z(3,`span`,63),J(4),B()(),z(5,`ul`,83),I(6,cA,10,7,`li`,null,ck),B()()),e&2){let e=K(2);M(4),Y(e.deferCount()),M(2),L(e.deferBlocks())}}function uA(e,t){if(e&1&&V(0,`app-cd-recording`,28),e&2){let e=K(2);R(`page`,e.cdPage())(`pageId`,e.page().pageId)(`rpc`,e.rpc())}}function dA(e,t){if(e&1){let e=W();z(0,`p`,1),J(1,` Every component instance on the page, in the order Angular rendered them. Hover a row to highlight its host in the page, and select it to read its live inputs, properties, outputs and injected services. `),B(),z(2,`div`,2)(3,`div`,3),A(),z(4,`svg`,4),V(5,`circle`,5)(6,`path`,6),B(),ms(),z(7,`input`,7,0),G(`input`,function(t){return O(e),k(K().setFilter(t.target.value))})(`keydown.escape`,function(){return O(e),k(K().setFilter(``))}),B()(),P(9,uk,3,2),z(10,`span`,8),J(11),B(),z(12,`button`,9),G(`click`,function(){return O(e),k(K().expandAll())}),A(),z(13,`svg`,10),V(14,`path`,11)(15,`path`,12),B(),J(16,` Expand all `),B(),ms(),z(17,`button`,9),G(`click`,function(){return O(e),k(K().collapseAll())}),A(),z(18,`svg`,10),V(19,`path`,13)(20,`path`,14),B(),J(21,` Collapse all `),B(),P(22,dk,4,3,`button`,15),B(),ms(),z(23,`p`,16),J(24),B(),P(25,fk,2,1,`p`,17),P(26,pk,2,1,`p`,18),z(27,`div`,19)(28,`div`)(29,`h2`,20),J(30,`Component tree`),B(),P(31,hk,6,2,`div`,21),z(32,`div`,22),G(`keydown`,function(t){return O(e),k(K().onTreeKey(t))}),I(33,xk,11,15,`div`,23,nk),B()(),P(35,nA,14,7,`section`,24)(36,aA,3,1,`div`,25),B(),P(37,lA,8,1,`section`,26),z(38,`app-for-blocks`,27),G(`showOwner`,function(t){return O(e),k(K().showForOwner(t))})(`highlight`,function(t){return O(e),k(K().highlight(t))}),B(),P(39,uA,1,3,`app-cd-recording`,28)}if(e&2){let e,t=K();M(7),R(`value`,t.filter()),M(2),F(t.pageOptions().length>1?9:-1),M(2),Y(t.countLabel()),M(),R(`disabled`,!!t.filter().trim()),M(5),R(`disabled`,!!t.filter().trim()),M(5),F(t.native()?-1:22),M(2),Y(t.announcement()),M(),F(t.pickMessage()?25:-1),M(),F(t.page().truncated?26:-1),M(5),F(t.rows().length?-1:31),M(),R(`hidden`,!t.rows().length),M(),L(t.rows()),M(2),F((e=t.selectedNode())?35:36,e),M(2),F(t.deferBlocks().length?37:-1),M(),R(`blocks`,t.page()?.forBlocks)(`truncated`,t.page()?.forBlocksTruncated===!0)(`supported`,t.page()?.deferBlocks&&!t.page()?.forBlocks?!1:null),M(),F(!t.staticReport()&&!t.native()?39:-1)}}function fA(e,t){e&1&&(z(0,`p`,18),J(1,` The page reported no component instances. The live tree needs a development build with Angular's debug API. Showing what the source declares instead. `),B())}function pA(e,t){e&1&&(z(0,`p`,87),J(1,` No page is connected, so this lists what the source declares. Open the app in a browser with the devtools connected to see each rendered instance. `),B())}function mA(e,t){if(e&1&&J(0),e&2){let e=K(3);Z(` `,e.filteredSource().length,` of `,e.source().length,` `)}}function hA(e,t){if(e&1&&J(0),e&2){let e=K(3);iv(` `,e.sourceCounts().components,` `,e.sourceCounts().components===1?`component`:`components`,` · `,e.sourceCounts().directives,` `,e.sourceCounts().directives===1?`directive`:`directives`,` `)}}function gA(e,t){if(e&1&&(z(0,`span`,89),P(1,mA,1,2)(2,hA,1,4),B()),e&2){let e=K(2);M(),F(e.filter().trim()?1:2)}}function _A(e,t){e&1&&(z(0,`div`,93),V(1,`span`,81),z(2,`p`,33),J(3,`Scanning components…`),B()())}function vA(e,t){e&1&&(J(0,` Run `),z(1,`code`),J(2,`pangular build`),B(),J(3,` again to rebuild the report. `))}function yA(e,t){e&1&&J(0,` Check that the dev server is running, then try again. `)}function bA(e,t){if(e&1){let e=W();z(0,`div`,94)(1,`p`,33),J(2,`Could not load components`),B(),z(3,`p`,34),P(4,vA,4,0)(5,yA,1,0),B(),z(6,`button`,35),G(`click`,function(){return O(e),k(K(2).refresh())}),J(7,`Retry`),B()()}if(e&2){let e=K(2);M(4),F(e.staticReport()?4:5)}}function xA(e,t){e&1&&(z(0,`div`,95)(1,`p`,33),J(2,`No components found`),B(),z(3,`p`,34),J(4,`No @Component or @Directive was found in the source.`),B()())}function SA(e,t){if(e&1){let e=W();z(0,`div`,95)(1,`p`,33),J(2),B(),z(3,`button`,35),G(`click`,function(){return O(e),k(K(2).clearFilter())}),J(4,`Clear filter`),B()()}if(e&2){let e=K(2);M(2),X(`No components match “`,e.filter().trim(),`”`)}}function CA(e,t){if(e&1&&J(0),e&2){let e=K().$implicit;X(` `,K(3).bareName(e.className),` · `)}}function wA(e,t){if(e&1&&(z(0,`dt`),J(1,`Change detection`),B(),z(2,`dd`),J(3),B()),e&2){let e=K(2).$implicit;M(3),Y(e.changeDetection??`Unknown`)}}function TA(e,t){if(e&1){let e=W();z(0,`button`,59),G(`click`,function(){let t=O(e).$implicit;return k(K(5).showForm.emit(t.formId))}),J(1),B()}if(e&2){let e=t.$implicit;M(),X(` Show `,e.label,` in Forms `)}}function EA(e,t){if(e&1&&(z(0,`div`,105)(1,`dl`,60)(2,`dt`),J(3,`Class`),B(),z(4,`dd`,61),J(5),B(),z(6,`dt`),J(7,`File`),B(),z(8,`dd`,61),V(9,`app-source-link`,54),B(),z(10,`dt`),J(11,`Standalone`),B(),z(12,`dd`),J(13),B(),P(14,wA,4,1),z(15,`dt`),J(16,`Inputs`),B(),z(17,`dd`,61),J(18),B(),z(19,`dt`),J(20,`Outputs`),B(),z(21,`dd`,61),J(22),B()(),I(23,TA,2,1,`button`,58,ik),B()),e&2){let e=K(),t=e.$implicit,n=e.$index,r=K(3);R(`id`,`ct-source-`+n),M(5),Y(r.bareName(t.className)),M(4),R(`file`,t.file)(`line`,t.line),M(4),Y(t.isStandalone?`Yes`:`No`),M(),F(t.kind===`component`?14:-1),M(4),Y(t.inputs.join(`, `)||`None`),M(4),Y(t.outputs.join(`, `)||`None`),M(),L(r.formsIn(t.file))}}function DA(e,t){if(e&1){let e=W();z(0,`li`,98)(1,`button`,99),G(`click`,function(){let t=O(e).$implicit,n=K(3);return k(n.openKey.set(n.openKey()===n.sourceKey(t)?null:n.sourceKey(t)))}),z(2,`span`,100),J(3),B(),z(4,`span`,101)(5,`span`,102),J(6),B(),z(7,`span`,103),P(8,CA,1,1),J(9),B()(),A(),z(10,`svg`,104),V(11,`path`,46),B()(),P(12,EA,25,8,`div`,105),B()}if(e&2){let e=t.$implicit,n=t.$index,r=K(3);q(`expanded`,r.openKey()===r.sourceKey(e)),M(),N(`aria-expanded`,r.openKey()===r.sourceKey(e))(`aria-controls`,r.openKey()===r.sourceKey(e)?`ct-source-`+n:null),M(),q(`directive`,e.kind===`directive`),M(),Y(e.kind),M(3),Y(r.sourceLabel(e)),M(2),F(e.selector?8:-1),M(),Z(` `,e.file,`:`,e.line,` `),M(3),F(r.openKey()===r.sourceKey(e)?12:-1)}}function OA(e,t){if(e&1&&(z(0,`ul`,96),I(1,DA,13,12,`li`,97,lk,!0),B()),e&2){let e=K(2);M(),L(e.filteredSource())}}function kA(e,t){if(e&1){let e=W();P(0,fA,2,0,`p`,18)(1,pA,2,0,`p`,87),z(2,`div`,2)(3,`div`,3),A(),z(4,`svg`,4),V(5,`circle`,5)(6,`path`,6),B(),ms(),z(7,`input`,88,0),G(`input`,function(t){return O(e),k(K().filter.set(t.target.value))})(`keydown.escape`,function(){return O(e),k(K().filter.set(``))}),B()(),P(9,gA,3,1,`span`,89),z(10,`button`,90),G(`click`,function(){return O(e),k(K().refresh())}),A(),z(11,`svg`,10),V(12,`path`,91)(13,`path`,92),B(),J(14,` Refresh `),B()(),P(15,_A,4,0,`div`,93)(16,bA,8,1,`div`,94)(17,xA,5,0,`div`,95)(18,SA,5,1,`div`,95)(19,OA,3,0,`ul`,96)}if(e&2){let e=K();F(+!e.page()),M(7),R(`value`,e.filter()),M(2),F(e.source().length?9:-1),M(),q(`spinning`,e.loading()),N(`aria-busy`,e.loading()),M(5),F(e.loading()&&!e.source().length?15:e.error()&&!e.source().length?16:e.source().length?e.filteredSource().length?19:18:17)}}function AA(e){return e.replace(/^_(?=[A-Z])/,``)}var jA=class e{rpc=$(null);staticReport=Q(()=>vE(this.rpc()));focus=$(null);showForm=Rv();focusHandled=Rv();filter=j(``);loading=j(!1);error=j(!1);source=j([]);formOwners=j([]);pages=j({});chosenPageId=j(null);selectedId=j(null);destroyed=j(null);announcement=j(``);picking=j(!1);pickMessage=j(``);pickPageId=null;pickSeq=0;focusId=j(null);bridge=E(PD);actionMessage=Fv({source:this.selectedId,computation:()=>``});collapsed=j(new Set);openKey=j(null);routerPages=j([]);pageId=fE();destroyRef=E(ws);injector=E(Ss);host=E(Nl);filterInput=Jv(`filterInput`);cleanups=[];selection={pageId:null,detailId:null};shownPageId=Fv({source:()=>({pages:this.pages(),chosen:this.chosenPageId()}),computation:({pages:e,chosen:t},n)=>pE(e,{chosen:t,host:this.pageId,previous:n?.value??null})});page=Q(()=>{let e=this.shownPageId();return e?this.pages()[e]??null:null});pageOptions=Q(()=>Object.values(this.pages()).map(e=>({value:e.pageId,label:e.title||e.url||`Page ${e.pageId}`,hint:e.url})));live=Q(()=>(this.page()?.roots.length??0)>0);native=Q(()=>ID(this.page()));canEdit=Q(()=>this.live()&&!this.native()&&!this.staticReport()&&ME(this.rpc(),`components`));devtoolsActions=Q(()=>this.bridge.available&&!!this.page()&&!this.native()&&!this.staticReport());cdPages=j({});cdPage=Q(()=>{let e=this.page()?.pageId;return e?this.cdPages()[e]??null:null});cdHosts=Q(()=>this.cdPage()?.hosts??{});index=Q(()=>{let e=new Map,t=new Map,n=(r,i)=>{for(let a of r)e.set(a.id,a),i&&t.set(a.id,i),n(a.children,a.id)};return n(this.page()?.roots??[],null),{map:e,parents:t}});query=Q(()=>this.filter().trim().toLowerCase());filtered=Q(()=>JD(this.page()?.roots??[],this.query()));deferBlocks=Q(()=>this.page()?.deferBlocks??[]);deferCount=Q(()=>`${this.deferBlocks().length}${this.page()?.deferTruncated?`+`:``}`);countLabel=Q(()=>YD(this.page()?.count??0,this.filtered().matches,!!this.query(),!!this.page()?.truncated));truncationText=Q(()=>ZD(this.page()?.truncatedBy));rows=Q(()=>{let e=[],t=this.collapsed(),n=!!this.query(),r=(i,a)=>{for(let o of i){let i=n||!t.has(o.id);e.push({node:o,depth:a,hasChildren:o.children.length>0,expanded:i}),i&&r(o.children,a+1)}};return r(this.filtered().nodes,0),e});selectedNode=Q(()=>{let e=this.selectedId();return e?this.index().map.get(e)??null:null});detail=Q(()=>{let e=this.page()?.detail;return e&&e.id===this.selectedId()?e:null});rovingId=Q(()=>{let e=this.rows(),t=new Set(e.map(e=>e.node.id)),n=this.focusId();if(n&&t.has(n))return n;let r=this.selectedId();return r&&t.has(r)?r:e[0]?.node.id??null});outlets=Q(()=>{let e=this.page()?.pageId;return this.routerPages().find(t=>t.pageId===e)?.outlets??[]});routedById=Q(()=>{let e=new Map,t=n=>{for(let r of n){if(r.activated&&r.devtoolsId){let t=e.get(r.devtoolsId)??[];t.push({route:r.route??``,outlet:r.outlet}),e.set(r.devtoolsId,t)}r.children&&t(r.children)}};return t(this.outlets()),e});sourceByClass=Q(()=>{let e=new Map;for(let t of this.source()){let n=AA(t.className);e.set(n,[...e.get(n)??[],t])}return e});filteredSource=Q(()=>{let e=this.query(),t=this.source();return e?t.filter(t=>t.selector.toLowerCase().includes(e)||t.className.toLowerCase().includes(e)||t.file.toLowerCase().includes(e)):t});sourceCounts=Q(()=>{let e=this.source().filter(e=>e.kind===`component`).length;return{components:e,directives:this.source().length-e}});constructor(){dc(()=>{let e=this.page()?.pageId??null;Nv(()=>{this.picking()&&e!==this.pickPageId&&this.dropPick()})}),dc(()=>{let e=this.rpc();e&&(this.refresh(),this.watch(e))}),dc(()=>{let e=this.focus();if(!e)return;let t=this.page()?.pageId??null;if(e.pageId&&t!==e.pageId&&this.pages()[e.pageId]){Nv(()=>this.selectPage(e.pageId));return}this.live()&&Nv(()=>{(!e.pageId||t===e.pageId)&&this.index().map.has(e.id)?this.reveal(e.id):this.announcement.set(`That component is no longer on the page.`),this.focusHandled.emit()})}),this.destroyRef.onDestroy(()=>{this.highlight(null);for(let e of this.cleanups.splice(0))e()})}async watch(e){for(let e of this.cleanups.splice(0))e();let t=e.scope(`pangular`);try{let e=await t.rpc.sharedState(`component-tree`);if(this.destroyRef.destroyed)return;let n=e=>{let t=e?.pages;this.applyPages(t&&typeof t==`object`?t:{})};n(e.value()),this.cleanups.push(e.on(`updated`,n))}catch{this.applyPages({})}try{let e=await t.rpc.sharedState(`change-detection`);if(this.destroyRef.destroyed)return;let n=e=>{let t=e?.pages;this.cdPages.set(t&&typeof t==`object`?t:{})};n(e.value()),this.cleanups.push(e.on(`updated`,n))}catch{this.cdPages.set({})}try{let e=await t.rpc.sharedState(`router`);if(this.destroyRef.destroyed)return;let n=e=>{let t=e?.pages;this.routerPages.set(Array.isArray(t)?t:[])};n(e.value()),this.cleanups.push(e.on(`updated`,n))}catch{this.routerPages.set([])}}async refresh(){let e=this.rpc();if(!e)return;this.loading.set(!0);let t=e.scope(`pangular`);try{this.source.set(await t.rpc.call(`get-components`)),this.error.set(!1)}catch{this.error.set(!0)}finally{this.loading.set(!1)}let n=await t.rpc.call(`forms-owners`).catch(()=>[]);this.formOwners.set(n??[])}formsIn(e){return this.formOwners().filter(t=>t.file===e)}whereOf(e){return this.detail()?.source??this.sourceFor(e)}async revealInElements(e){let t=this.page()?.pageId;if(!t)return;this.actionMessage.set(``);let n=await this.bridge.reveal(t,e.id);this.selectedId()===e.id&&this.actionMessage.set(n.ok?``:`Could not reveal it. The component must be rendered in the tab these DevTools inspect.`)}async openSource(e){let t=this.page()?.pageId;if(!t)return;let n=this.whereOf(e);this.actionMessage.set(``);let r=await this.bridge.openSource(t,e.id,n);this.selectedId()===e.id&&(r.ok||this.actionMessage.set(n?`Not found in Sources. Open ${n.file}:${n.line} in your editor.`:`Could not open the source. The component must be rendered in the tab these DevTools inspect.`))}sourceFor(e){let t=(this.sourceByClass().get(AA(e.name))??[]).filter(e=>e.kind===`component`);return t.find(t=>t.selector===e.tag)??t[0]??null}sourceKey(e){return`${e.file}#${e.className}`}sourceLabel(e){return e.selector?e.kind===`component`&&/^[a-z][\w-]*$/i.test(e.selector)?`<${e.selector}>`:e.selector:AA(e.className)}bareName(e){return AA(e)}applyPages(e){let t=document.activeElement,n=t instanceof HTMLElement&&this.host.nativeElement.contains(t)?t.closest(`.row`)?.dataset.id??null:null,r=n?this.rows().map(e=>e.node.id):[],i=this.index().map;if(this.pages.set(e),this.syncSelection(i),!n)return;let a=new Set(this.rows().map(e=>e.node.id));if(a.has(n))return;let o=eO(r,a,n);o&&(this.focusId.set(o),zd(()=>this.rowElement(o)?.focus(),{injector:this.injector}))}syncSelection(e=this.index().map){let t=this.page(),n=QD({...this.selection,selectedId:this.selectedId()},t?{pageId:t.pageId,roots:t.roots,detail:t.detail,truncated:t.truncated}:null),r=n.destroyed?e.get(n.destroyed)?.name:void 0;this.selection={pageId:n.pageId,detailId:n.detailId},n.selectedId!==this.selectedId()&&this.selectedId.set(n.selectedId),n.selectedId&&this.destroyed.set(null),n.destroyed&&(this.destroyed.set(r??`The component`),this.announcement.set(`The selected component was destroyed.`),this.sendSelection(null))}selectPage(e){e&&(this.chosenPageId.set(e),this.destroyed.set(null),this.syncSelection())}setFilter(e){this.filter.set(e);let{matches:t}=this.filtered();this.announcement.set(XD(this.page()?.count??0,t,e,!!this.page()?.truncated))}clearFilter(){this.live()?this.setFilter(``):this.filter.set(``),this.filterInput()?.nativeElement.focus()}async pick(){let e=this.rpc();if(!e||this.picking())return;let t=++this.pickSeq;this.pickPageId=this.page()?.pageId??null,this.picking.set(!0),this.say(`Click a component in the app. Press Escape to cancel.`);let n=await e.scope(`pangular`).rpc.call(`request-component-pick`,{pageId:this.pickPageId??void 0}).catch(()=>({ok:!1,error:`Could not reach the devtools server.`}));if(t===this.pickSeq){if(this.picking.set(!1),!n?.ok||!n.id){this.say(n?.error??`No component was picked.`);return}n.pageId&&n.pageId!==this.page()?.pageId&&this.selectPage(n.pageId),this.say(`Picked ${n.name??`a component`}.`),this.destroyed.set(null),this.index().map.has(n.id)?this.reveal(n.id):this.selectedId.set(n.id)}}cancelPick(){let e=this.rpc();e&&this.picking()&&e.scope(`pangular`).rpc.call(`cancel-component-pick`,{pageId:this.pickPageId??void 0}).catch(()=>{})}dropPick(){this.cancelPick(),this.pickSeq++,this.picking.set(!1),this.say(`Picking stopped because the page changed.`)}say(e){this.pickMessage.set(e),this.announcement.set(e)}sendSelection(e){let t=this.rpc();t&&t.scope(`pangular`).rpc.call(`select-component`,{pageId:this.page()?.pageId,id:e,console:!0}).catch(()=>{})}rowElement(e){return this.host.nativeElement.querySelector(`.row[data-id="${CSS.escape(e)}"]`)}select(e){let t=this.selectedId()===e?null:e;this.selectedId.set(t),this.destroyed.set(null),this.focusId.set(e),this.sendSelection(t)}reveal(e){let{parents:t}=this.index();this.collapsed.update(n=>{let r=new Set(n);for(let n=t.get(e);n;n=t.get(n))r.delete(n);return r}),this.rows().some(t=>t.node.id===e)||this.setFilter(``),this.selectedId()!==e&&this.select(e),zd(()=>document.querySelector(`.row[data-id="${CSS.escape(e)}"]`)?.scrollIntoView({block:`nearest`}),{injector:this.injector})}toggle(e,t){t?.stopPropagation(),!this.query()&&this.collapsed.update(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})}expandAll(){this.query()||(this.collapsed.set(new Set),this.announce(`Expanded every component.`))}collapseAll(){if(this.query())return;let{map:e,parents:t}=this.index(),n=this.rovingId(),r=new Set;for(let t of e.values())t.children.length&&r.add(t.id);if(this.collapsed.set(r),n){let e=new Set(this.rows().map(e=>e.node.id)),r=n;for(;r&&!e.has(r);)r=t.get(r);r&&this.focusId.set(r)}this.announce(`Collapsed every component. Only the top level is shown.`)}announce(e){this.announcement.update(t=>t===e?`${e}\u00a0`:e)}expandSiblings(e){if(this.query())return;let t=this.index().parents.get(e),n=t?this.index().map.get(t)?.children??[]:this.page()?.roots??[];this.collapsed.update(e=>{let t=new Set(e);for(let e of n)t.delete(e.id);return t})}highlight(e){let t=this.rpc();if(!t)return;let n=e?{pageId:this.page()?.pageId,id:e}:null;t.scope(`pangular`).rpc.call(`request-page-highlight`,n).catch(()=>{})}highlightBlock(e){this.highlight(e.rootIds[0]??e.owner?.id??null)}showOwner(e){e.owner&&this.index().map.has(e.owner.id)&&this.reveal(e.owner.id)}showForOwner(e){e.owner&&this.index().map.has(e.owner.id)&&this.reveal(e.owner.id)}onTreeKey(e){let t=this.rows();if(!t.length)return;let n=t.findIndex(e=>e.node.id===this.rovingId()),r=Math.max(n,0),i=t[r],a=-1;switch(e.key){case`ArrowDown`:a=Math.min(r+1,t.length-1);break;case`ArrowUp`:a=Math.max(r-1,0);break;case`Home`:a=0;break;case`End`:a=t.length-1;break;case`ArrowRight`:i.hasChildren&&!i.expanded?this.toggle(i.node.id):i.hasChildren&&(a=r+1);break;case`ArrowLeft`:if(i.hasChildren&&i.expanded&&!this.query())this.toggle(i.node.id);else{let e=this.index().parents.get(i.node.id);a=t.findIndex(t=>t.node.id===e)}break;case`Enter`:case` `:this.select(i.node.id);break;case`*`:this.expandSiblings(i.node.id);break;default:return}if(e.preventDefault(),a>=0){let e=t[a].node.id;this.focusId.set(e),queueMicrotask(()=>{let t=document.querySelector(`.row[data-id="${CSS.escape(e)}"]`);t?.focus(),t?.scrollIntoView({block:`nearest`})})}}static ɵfac=function(t){return new(t||e)};static ɵcmp=Wh({type:e,selectors:[[`app-component-tree`]],viewQuery:function(e,t){e&1&&c_(t.filterInput,$O,5),e&2&&l_()},hostBindings:function(e,t){e&1&&G(`keydown.escape`,function(){return t.cancelPick()})},inputs:{rpc:[1,`rpc`],focus:[1,`focus`]},outputs:{showForm:`showForm`,focusHandled:`focusHandled`},decls:2,vars:1,consts:[[`filterInput`,``],[1,`intro`],[1,`toolbar`],[1,`search`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`,1,`search-icon`],[`cx`,`11`,`cy`,`11`,`r`,`7`],[`d`,`m20 20-3.5-3.5`],[`type`,`search`,`placeholder`,`Filter by class, tag or directive…`,`aria-label`,`Filter components by class, tag or directive`,`autocomplete`,`off`,`spellcheck`,`false`,3,`input`,`keydown.escape`,`value`],[1,`count`],[`type`,`button`,1,`tree-action`,3,`click`,`disabled`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`],[`d`,`m7 15 5 5 5-5`],[`d`,`m7 9 5-5 5 5`],[`d`,`m7 20 5-5 5 5`],[`d`,`m7 4 5 5 5-5`],[`type`,`button`,1,`pick`,3,`on`],[`role`,`status`,1,`sr-only`],[1,`pick-message`],[`role`,`status`,1,`notice`],[1,`layout`],[1,`sr-only`],[1,`state`,`compact`,`tree`],[`role`,`tree`,`aria-label`,`Component instances`,1,`tree`,3,`keydown`,`hidden`],[`role`,`treeitem`,1,`row`,3,`selected`,`--%NS%depth`],[`aria-labelledby`,`ct-detail-title`,1,`detail`],[1,`detail`,`placeholder`],[`aria-labelledby`,`ct-defer-title`,1,`defer`],[3,`showOwner`,`highlight`,`blocks`,`truncated`,`supported`],[3,`page`,`pageId`,`rpc`],[`id`,`ct-page-label`,1,`sr-only`],[`labelledBy`,`ct-page-label`,1,`page-select`,3,`valueChange`,`options`,`value`],[`type`,`button`,1,`pick`,3,`click`],[`d`,`M4 4l6.5 16 2.3-6.7L19.5 11z`],[1,`state-title`],[1,`state-hint`],[`type`,`button`,3,`click`],[`role`,`treeitem`,1,`row`,3,`click`,`focus`,`blur`,`mouseenter`,`mouseleave`],[`aria-hidden`,`true`,1,`twisty`,3,`open`],[`aria-hidden`,`true`,1,`twisty-space`],[1,`name`,`mono`],[1,`tag`,`mono`],[1,`routed`],[1,`checks`],[1,`dirs`],[`aria-hidden`,`true`,1,`twisty`,3,`click`],[`viewBox`,`0 0 24 24`],[`d`,`m9 6 6 6-6 6`],[1,`detail-head`],[1,`badge`],[`id`,`ct-detail-title`,1,`mono`],[1,`mono`,`muted`],[1,`where`,`mono`],[1,`console-global`,3,`rpc`,`pageId`,`target`,`label`],[`role`,`status`,1,`state`,`compact`],[3,`file`,`line`],[`role`,`group`,`aria-label`,`Chrome DevTools`,1,`actions`],[`role`,`status`,1,`where`,`action-message`],[1,`actions`],[`type`,`button`,1,`show-form`],[`type`,`button`,1,`show-form`,3,`click`],[1,`facts`],[1,`mono`],[1,`block`],[1,`pill`],[1,`props`],[1,`empty-line`],[1,`chips`],[1,`deps`],[1,`prop`],[1,`prop-name`,`mono`],[1,`muted`],[3,`prop`,`componentId`,`pageId`,`rpc`,`writes`],[1,`chip`,3,`on`],[1,`chip`],[1,`chip-note`],[1,`flag`],[1,`chip`,`mono`],[1,`dep`],[1,`token`,`mono`],[1,`from`],[1,`from`,`missing`],[`aria-hidden`,`true`,1,`spinner`],[`id`,`ct-defer-title`,1,`defer-title`],[1,`defer-list`],[`type`,`button`,1,`defer-row`,3,`click`,`focus`,`blur`,`mouseenter`,`mouseleave`],[1,`defer-state`],[1,`triggers`,`mono`],[1,`notice`],[`type`,`search`,`placeholder`,`Filter by selector, class or file…`,`aria-label`,`Filter components by selector, class or file`,`autocomplete`,`off`,`spellcheck`,`false`,3,`input`,`keydown.escape`,`value`],[`aria-live`,`polite`,1,`count`],[`type`,`button`,1,`refresh`,3,`click`],[`d`,`M20 12a8 8 0 1 1-2.34-5.66`],[`d`,`M20 4v5h-5`],[`role`,`status`,1,`state`],[`role`,`alert`,1,`state`],[1,`state`],[`role`,`list`,1,`source-list`],[1,`source-item`,3,`expanded`],[1,`source-item`],[`type`,`button`,1,`source-toggle`,3,`click`],[1,`kind-flag`],[1,`row-main`],[1,`selector`,`mono`],[1,`file`,`mono`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`,1,`chevron`],[1,`inline-detail`,3,`id`]],template:function(e,t){e&1&&P(0,dA,40,17)(1,kA,20,7),e&2&&F(+!t.live())},dependencies:[qD,vO,DO,RO,VO,QO,hb],styles:[`[_nghost-%COMP%] {
   display: block;
   color: var(--%NS%text);
   font-size: 13px;
@@ -1558,7 +1819,7 @@ pre[_ngcontent-%COMP%] {
 
 .inline-detail[_ngcontent-%COMP%]   .show-form[_ngcontent-%COMP%] {
   margin: 0 16px;
-}`]})};function rA(e){return e.line?`${e.file}:${e.line}`:e.file}function iA(e,t){let n=t.filter(t=>t.fullPath===e.fullPath&&t.redirectTo!==void 0==(e.redirectTo!==void 0));return n.find(t=>!!e.component&&t.component===e.component)??n.find(t=>!t.component||!e.component)}var aA=hE;function oA(e){return e.startsWith(`/`)&&!e.startsWith(`//`)&&!/^\/*[a-z][a-z0-9+.-]*:/i.test(e)&&!e.includes(`[redacted]`)&&e.length<=2e3}var sA=`Could not reach the page.`;async function cA(e,t,n){return await aA(e,`request-router-action`,{pageId:t,request:n})??{error:`Could not reach the page.`}}function lA(e){return e===`succeeded`?`good`:e===`redirected`||e===`pending`||e===`skipped`?`warn`:e===`cancelled`||e===`failed`?`bad`:``}var uA=()=>[],dA=(e,t)=>t[0],fA=(e,t)=>t.input;function pA(e,t){if(e&1&&(H(0,`p`,3),J(1,` The browser shows `),H(2,`code`),J(3),U(),J(4,`, not the router URL (skipLocationChange, browserUrl, a failed navigation or code that changed history). `),U()),e&2){let e=K();M(3),Y(e.browserUrl)}}function mA(e,t){if(e&1&&(H(0,`p`,12),J(1),U()),e&2){let e=K(3);M(),Y(e.navigationOff)}}function hA(e,t){if(e&1){let e=W();H(0,`div`,8),zg(1,`span`,9),H(2,`span`,10),J(3,`Navigating to `),H(4,`code`),J(5),U(),J(6),U(),H(7,`button`,11),n_(`click`,function(){return O(e),k(K(2).abort())}),J(8,` Abort `),U()(),P(9,mA,2,1,`p`,12)}if(e&2){let e=t,n=K(2);M(5),Y(e.url),M(),X(` (#`,e.id,`)`),M(),Gg(`disabled`,!n.navigationAllowed()),N(`aria-describedby`,n.navigationAllowed()?null:`route-current-writes-off`),M(2),F(n.navigationAllowed()?-1:9)}}function gA(e,t){if(e&1&&(H(0,`p`,4),J(1),U()),e&2){let e=K(2);M(),Y(e.message())}}function _A(e,t){if(e&1&&(H(0,`dt`),J(1,`Document title`),U(),H(2,`dd`),J(3),U()),e&2){let e=K();M(3),Y(e.title)}}function vA(e,t){if(e&1&&(H(0,`dt`),J(1,`Query params`),U(),H(2,`dd`)(3,`code`),J(4),yv(5,`json`),U()()),e&2){let e=K();M(4),Y(xv(5,1,e.queryParams))}}function yA(e,t){if(e&1&&(H(0,`dt`),J(1,`Fragment`),U(),H(2,`dd`)(3,`code`),J(4),U()()),e&2){let e=K();M(4),Y(e.fragment)}}function bA(e,t){if(e&1&&(H(0,`span`,14),J(1),U()),e&2){let e=K().$implicit;M(),X(`, `,e.nesting)}}function xA(e,t){if(e&1&&(H(0,`span`,15),J(1),U()),e&2){let e=K().$implicit;M(),Y(e.route.outlet)}}function SA(e,t){e&1&&(H(0,`span`,15),J(1,`lazy`),U())}function CA(e,t){if(e&1&&(H(0,`div`,16),J(1),U()),e&2){let e=K().$implicit;M(),Z(` title `,e.route.title,``,e.route.ownTitle===!1?` (inherited)`:``,` `)}}function wA(e,t){if(e&1&&(H(0,`code`,17),J(1),U()),e&2){let e=K().$implicit;M(),Y(e.route.component)}}function TA(e,t){e&1&&(H(0,`span`,20),J(1,`–`),U(),H(2,`span`,14),J(3,`none`),U())}function EA(e,t){e&1&&(H(0,`span`,15),J(1,`inherited`),U())}function DA(e,t){if(e&1&&(H(0,`div`,18)(1,`code`),J(2),yv(3,`json`),U(),P(4,EA,2,0,`span`,15),U()),e&2){let e=t.$implicit,n=K().$implicit;M(2),Z(``,e[0],`: `,xv(3,3,e[1])),M(2),F(n.route.paramSources?.[e[0]]===`inherited`?4:-1)}}function OA(e,t){e&1&&(H(0,`span`,20),J(1,`–`),U(),H(2,`span`,14),J(3,`none`),U())}function kA(e,t){e&1&&(H(0,`span`,15),J(1),U()),e&2&&(M(),Y(t))}function AA(e,t){if(e&1&&(H(0,`div`,19)(1,`code`),J(2),yv(3,`json`),U(),P(4,kA,2,1,`span`,15),U()),e&2){let e,n=t.$implicit,r=K().$implicit;M(2),Z(``,n[0],`: `,xv(3,3,n[1])),M(2),F((e=r.route.dataSources?.[n[0]])?4:-1,e)}}function jA(e,t){e&1&&(H(0,`span`,20),J(1,`–`),U(),H(2,`span`,14),J(3,`none`),U())}function MA(e,t){if(e&1&&(H(0,`span`,15),J(1),U()),e&2){let e=t.$implicit;M(),Y(e)}}function NA(e,t){if(e&1&&(H(0,`span`,15),J(1),U()),e&2){let e=t.$implicit;M(),X(`resolve `,e)}}function PA(e,t){e&1&&(H(0,`span`,20),J(1,`–`),U(),H(2,`span`,14),J(3,`none`),U())}function FA(e,t){if(e&1&&(H(0,`tr`)(1,`td`,13),J(2),P(3,bA,2,1,`span`,14),P(4,xA,2,1,`span`,15),P(5,SA,2,0,`span`,15),P(6,CA,2,2,`div`,16),U(),H(7,`td`),P(8,wA,2,1,`code`,17)(9,TA,4,0),U(),H(10,`td`),I(11,DA,5,5,`div`,18,dA,!1,OA,4,0),U(),H(14,`td`),I(15,AA,5,5,`div`,19,dA,!1,jA,4,0),U(),H(18,`td`),I(19,MA,2,1,`span`,15,Og),I(21,NA,2,1,`span`,15,Og),P(23,PA,4,0),U()()),e&2){let e=t.$implicit,n=K(2);M(),j_(`padding-left`,14+e.depth*16,`px`),M(),X(` `,e.label,` `),M(),F(e.nesting?3:-1),M(),F(e.route.outlet===`primary`?-1:4),M(),F(e.route.lazy?5:-1),M(),F(e.route.title?6:-1),M(2),F(e.route.component?8:9),M(3),L(n.entries(e.route.params)),M(4),L(n.entries(e.route.data)),M(4),L(n.guardList(e.route)),M(2),L(e.route.resolvers??mv(11,uA)),M(2),F(!n.guardList(e.route).length&&!e.route.resolvers?.length?23:-1)}}function IA(e,t){if(e&1){let e=W();H(0,`button`,26),n_(`click`,function(){O(e);let t=K(2).$implicit,n=K(3);return k(n.showComponent.emit({pageId:n.page().pageId,id:t.outlet.devtoolsId}))}),J(1,` Show in Components`),H(2,`span`,14),J(3),U()()}if(e&2){let e=K(2).$implicit;M(3),X(`: `,e.outlet.component??e.outlet.element??`routed component`)}}function LA(e,t){if(e&1&&(H(0,`code`),J(1),U(),J(2,` for `),H(3,`code`),J(4),U(),P(5,IA,4,1,`button`,25)),e&2){let e=K().$implicit,t=K(3);M(),Y(e.outlet.component??`?`),M(3),Y(e.outlet.route??`?`),M(),F(e.outlet.devtoolsId&&t.componentsOn()?5:-1)}}function RA(e,t){e&1&&(H(0,`span`,23),J(1,`not activated`),U())}function zA(e,t){e&1&&(H(0,`span`,15),J(1,`detached by reuse strategy`),U())}function BA(e,t){if(e&1&&(H(0,`span`,15),J(1),U()),e&2){let e=t.$implicit;M(),Z(`input `,e.input,` ← `,e.source)}}function VA(e,t){if(e&1&&(H(0,`span`,24),J(1,`routerOutletData `),H(2,`code`),J(3),U()()),e&2){let e=K().$implicit;M(3),Y(e.outlet.data)}}function HA(e,t){if(e&1&&(H(0,`li`)(1,`span`,15),J(2),U(),P(3,LA,6,3)(4,RA,2,0,`span`,23),P(5,zA,2,0,`span`,15),I(6,BA,2,2,`span`,15,fA),P(8,VA,4,1,`span`,24),U()),e&2){let e=t.$implicit,n=K(3);j_(`padding-left`,10+e.depth*16,`px`),M(2),Y(e.outlet.outlet),M(),F(e.outlet.activated?3:4),M(2),F(e.outlet.detached?5:-1),M(),L(n.boundInputs(e.outlet)),M(2),F(e.outlet.data===void 0?-1:8)}}function UA(e,t){if(e&1&&(H(0,`h3`),J(1,`Outlets`),U(),H(2,`ul`,21),I(3,HA,9,6,`li`,22,Dg),U()),e&2){let e=K(2);M(3),L(e.outletRows())}}function WA(e,t){if(e&1&&(H(0,`p`,1)(1,`span`,2),J(2,`URL`),U(),H(3,`code`),J(4),U()(),P(5,pA,5,1,`p`,3),P(6,hA,10,5),P(7,gA,2,1,`p`,4),H(8,`dl`,5),P(9,_A,4,1),P(10,vA,6,3),P(11,yA,5,1),U(),H(12,`h3`),J(13,`Active routes`),U(),H(14,`div`,6)(15,`table`)(16,`thead`)(17,`tr`)(18,`th`,7),J(19,`Route`),U(),H(20,`th`,7),J(21,`Component`),U(),H(22,`th`,7),J(23,`Params`),U(),H(24,`th`,7),J(25,`Data`),U(),H(26,`th`,7),J(27,`Guards and resolvers`),U()()(),H(28,`tbody`),I(29,FA,24,12,`tr`,null,Dg),U()()(),P(31,UA,5,0)),e&2){let e,n=t,r=K();M(4),Y(n.url),M(),F(n.urlDrift&&n.browserUrl?5:-1),M(),F((e=n.pending)?6:-1,e),M(),F(r.message()?7:-1),M(2),F(n.title?9:-1),M(),F(r.hasKeys(n.queryParams)?10:-1),M(),F(n.fragment?11:-1),M(18),L(r.rows()),M(2),F(r.outletRows().length?31:-1)}}function GA(e,t){e&1&&(H(0,`div`,0)(1,`p`,27),J(2,`This page reports no Router.`),U(),H(3,`p`,23),J(4,` Add `),H(5,`code`),J(6,`provideRouter()`),U(),J(7,` to the app config and navigate once to see the active routes here. `),U()())}var KA=class e{page=$.required();rpc=$(null);navigationAllowed=Q(()=>AE(this.rpc(),`router`));navigationOff=nE(`router`);componentsOn=Q(()=>kE(this.rpc()).inspectors.components);showComponent=Iv();pageId=Q(()=>this.page().pageId);message=Nv({source:this.pageId,computation:()=>``});rows=Q(()=>{let e=[],t=(n,r,i)=>{let a=r===0&&!n.path?`(root)`:`/`+n.path,o=i===void 0?void 0:`level ${r+1}, child of ${i}`;e.push({route:n,depth:r,label:a,nesting:o});for(let e of n.children)t(e,r+1,a)},n=this.page().snapshot?.root;return n&&t(n,0),e});outletRows=Q(()=>{let e=[],t=(n,r)=>{for(let i of n)e.push({outlet:i,depth:r}),i.children&&t(i.children,r+1)};return t(this.page().outlets??[],0),e});hasKeys(e){return Object.keys(e).length>0}entries(e){return Object.entries(e)}guardList(e){return Object.entries(e.guards??{}).flatMap(([e,t])=>t.map(t=>`${e} ${t}`))}boundInputs(e){return(e.inputs??[]).filter(e=>e.source!==`unset`)}async abort(){let e=this.pageId(),t=await cA(this.rpc(),e,{action:`abort`});e===this.pageId()&&this.message.set(t.error?String(t.error):`Aborted navigation #${t.aborted}.`)}static ɵfac=function(t){return new(t||e)};static ɵcmp=Wh({type:e,selectors:[[`app-route-current`]],inputs:{page:[1,`page`],rpc:[1,`rpc`]},outputs:{showComponent:`showComponent`},decls:2,vars:1,consts:[[1,`empty`],[1,`url`],[1,`url-label`],[`role`,`note`,1,`note`],[`role`,`status`,1,`muted`],[1,`facts`],[`role`,`region`,`aria-label`,`Active routes`,`tabindex`,`0`,1,`table-scroll`],[`scope`,`col`],[`role`,`status`,1,`pending`],[`aria-hidden`,`true`,1,`pulse`],[1,`pending-text`],[`type`,`button`,1,`small`,3,`click`,`disabled`],[`id`,`route-current-writes-off`,1,`muted`],[1,`path`],[1,`visually-hidden`],[1,`tag`],[1,`sub`],[1,`component`],[1,`entry`],[1,`entry`,`data`],[`aria-hidden`,`true`,1,`nil`],[1,`outlets`],[3,`padding-left`],[1,`muted`],[1,`outlet-data`],[`type`,`button`,1,`small`,`show-component`],[`type`,`button`,1,`small`,`show-component`,3,`click`],[1,`empty-title`]],template:function(e,t){if(e&1&&P(0,WA,32,8)(1,GA,8,0,`div`,0),e&2){let e;F((e=t.page().snapshot)?0:1,e)}},dependencies:[pb],styles:[`.muted[_ngcontent-%COMP%] {
+}`]})};function MA(e){return e.line?`${e.file}:${e.line}`:e.file}function NA(e,t){let n=t.filter(t=>t.fullPath===e.fullPath&&t.redirectTo!==void 0==(e.redirectTo!==void 0));return n.find(t=>!!e.component&&t.component===e.component)??n.find(t=>!t.component||!e.component)}var PA=_E;function FA(e){return e.startsWith(`/`)&&!e.startsWith(`//`)&&!/^\/*[a-z][a-z0-9+.-]*:/i.test(e)&&!e.includes(`[redacted]`)&&e.length<=2e3}var IA=`Could not reach the page.`;async function LA(e,t,n){return await PA(e,`request-router-action`,{pageId:t,request:n})??{error:`Could not reach the page.`}}function RA(e){return e===`succeeded`?`good`:e===`redirected`||e===`pending`||e===`skipped`?`warn`:e===`cancelled`||e===`failed`?`bad`:``}var zA=()=>[],BA=(e,t)=>t[0],VA=(e,t)=>t.input;function HA(e,t){if(e&1&&(H(0,`p`,3),J(1,` The browser shows `),H(2,`code`),J(3),U(),J(4,`, not the router URL (skipLocationChange, browserUrl, a failed navigation or code that changed history). `),U()),e&2){let e=K();M(3),Y(e.browserUrl)}}function UA(e,t){if(e&1&&(H(0,`p`,12),J(1),U()),e&2){let e=K(3);M(),Y(e.navigationOff)}}function WA(e,t){if(e&1){let e=W();H(0,`div`,8),zg(1,`span`,9),H(2,`span`,10),J(3,`Navigating to `),H(4,`code`),J(5),U(),J(6),U(),H(7,`button`,11),n_(`click`,function(){return O(e),k(K(2).abort())}),J(8,` Abort `),U()(),P(9,UA,2,1,`p`,12)}if(e&2){let e=t,n=K(2);M(5),Y(e.url),M(),X(` (#`,e.id,`)`),M(),Gg(`disabled`,!n.navigationAllowed()),N(`aria-describedby`,n.navigationAllowed()?null:`route-current-writes-off`),M(2),F(n.navigationAllowed()?-1:9)}}function GA(e,t){if(e&1&&(H(0,`p`,4),J(1),U()),e&2){let e=K(2);M(),Y(e.message())}}function KA(e,t){if(e&1&&(H(0,`dt`),J(1,`Document title`),U(),H(2,`dd`),J(3),U()),e&2){let e=K();M(3),Y(e.title)}}function qA(e,t){if(e&1&&(H(0,`dt`),J(1,`Query params`),U(),H(2,`dd`)(3,`code`),J(4),xv(5,`json`),U()()),e&2){let e=K();M(4),Y(Cv(5,1,e.queryParams))}}function JA(e,t){if(e&1&&(H(0,`dt`),J(1,`Fragment`),U(),H(2,`dd`)(3,`code`),J(4),U()()),e&2){let e=K();M(4),Y(e.fragment)}}function YA(e,t){if(e&1&&(H(0,`span`,14),J(1),U()),e&2){let e=K().$implicit;M(),X(`, `,e.nesting)}}function XA(e,t){if(e&1&&(H(0,`span`,15),J(1),U()),e&2){let e=K().$implicit;M(),Y(e.route.outlet)}}function ZA(e,t){e&1&&(H(0,`span`,15),J(1,`lazy`),U())}function QA(e,t){if(e&1&&(H(0,`div`,16),J(1),U()),e&2){let e=K().$implicit;M(),Z(` title `,e.route.title,``,e.route.ownTitle===!1?` (inherited)`:``,` `)}}function $A(e,t){if(e&1&&(H(0,`code`,17),J(1),U()),e&2){let e=K().$implicit;M(),Y(e.route.component)}}function ej(e,t){e&1&&(H(0,`span`,20),J(1,`–`),U(),H(2,`span`,14),J(3,`none`),U())}function tj(e,t){e&1&&(H(0,`span`,15),J(1,`inherited`),U())}function nj(e,t){if(e&1&&(H(0,`div`,18)(1,`code`),J(2),xv(3,`json`),U(),P(4,tj,2,0,`span`,15),U()),e&2){let e=t.$implicit,n=K().$implicit;M(2),Z(``,e[0],`: `,Cv(3,3,e[1])),M(2),F(n.route.paramSources?.[e[0]]===`inherited`?4:-1)}}function rj(e,t){e&1&&(H(0,`span`,20),J(1,`–`),U(),H(2,`span`,14),J(3,`none`),U())}function ij(e,t){e&1&&(H(0,`span`,15),J(1),U()),e&2&&(M(),Y(t))}function aj(e,t){if(e&1&&(H(0,`div`,19)(1,`code`),J(2),xv(3,`json`),U(),P(4,ij,2,1,`span`,15),U()),e&2){let e,n=t.$implicit,r=K().$implicit;M(2),Z(``,n[0],`: `,Cv(3,3,n[1])),M(2),F((e=r.route.dataSources?.[n[0]])?4:-1,e)}}function oj(e,t){e&1&&(H(0,`span`,20),J(1,`–`),U(),H(2,`span`,14),J(3,`none`),U())}function sj(e,t){if(e&1&&(H(0,`span`,15),J(1),U()),e&2){let e=t.$implicit;M(),Y(e)}}function cj(e,t){if(e&1&&(H(0,`span`,15),J(1),U()),e&2){let e=t.$implicit;M(),X(`resolve `,e)}}function lj(e,t){e&1&&(H(0,`span`,20),J(1,`–`),U(),H(2,`span`,14),J(3,`none`),U())}function uj(e,t){if(e&1&&(H(0,`tr`)(1,`td`,13),J(2),P(3,YA,2,1,`span`,14),P(4,XA,2,1,`span`,15),P(5,ZA,2,0,`span`,15),P(6,QA,2,2,`div`,16),U(),H(7,`td`),P(8,$A,2,1,`code`,17)(9,ej,4,0),U(),H(10,`td`),I(11,nj,5,5,`div`,18,BA,!1,rj,4,0),U(),H(14,`td`),I(15,aj,5,5,`div`,19,BA,!1,oj,4,0),U(),H(18,`td`),I(19,sj,2,1,`span`,15,Og),I(21,cj,2,1,`span`,15,Og),P(23,lj,4,0),U()()),e&2){let e=t.$implicit,n=K(2);M(),j_(`padding-left`,14+e.depth*16,`px`),M(),X(` `,e.label,` `),M(),F(e.nesting?3:-1),M(),F(e.route.outlet===`primary`?-1:4),M(),F(e.route.lazy?5:-1),M(),F(e.route.title?6:-1),M(2),F(e.route.component?8:9),M(3),L(n.entries(e.route.params)),M(4),L(n.entries(e.route.data)),M(4),L(n.guardList(e.route)),M(2),L(e.route.resolvers??mv(11,zA)),M(2),F(!n.guardList(e.route).length&&!e.route.resolvers?.length?23:-1)}}function dj(e,t){if(e&1){let e=W();H(0,`button`,26),n_(`click`,function(){O(e);let t=K(2).$implicit,n=K(3);return k(n.showComponent.emit({pageId:n.page().pageId,id:t.outlet.devtoolsId}))}),J(1,` Show in Components`),H(2,`span`,14),J(3),U()()}if(e&2){let e=K(2).$implicit;M(3),X(`: `,e.outlet.component??e.outlet.element??`routed component`)}}function fj(e,t){if(e&1&&(H(0,`code`),J(1),U(),J(2,` for `),H(3,`code`),J(4),U(),P(5,dj,4,1,`button`,25)),e&2){let e=K().$implicit,t=K(3);M(),Y(e.outlet.component??`?`),M(3),Y(e.outlet.route??`?`),M(),F(e.outlet.devtoolsId&&t.componentsOn()?5:-1)}}function pj(e,t){e&1&&(H(0,`span`,23),J(1,`not activated`),U())}function mj(e,t){e&1&&(H(0,`span`,15),J(1,`detached by reuse strategy`),U())}function hj(e,t){if(e&1&&(H(0,`span`,15),J(1),U()),e&2){let e=t.$implicit;M(),Z(`input `,e.input,` ← `,e.source)}}function gj(e,t){if(e&1&&(H(0,`span`,24),J(1,`routerOutletData `),H(2,`code`),J(3),U()()),e&2){let e=K().$implicit;M(3),Y(e.outlet.data)}}function _j(e,t){if(e&1&&(H(0,`li`)(1,`span`,15),J(2),U(),P(3,fj,6,3)(4,pj,2,0,`span`,23),P(5,mj,2,0,`span`,15),I(6,hj,2,2,`span`,15,VA),P(8,gj,4,1,`span`,24),U()),e&2){let e=t.$implicit,n=K(3);j_(`padding-left`,10+e.depth*16,`px`),M(2),Y(e.outlet.outlet),M(),F(e.outlet.activated?3:4),M(2),F(e.outlet.detached?5:-1),M(),L(n.boundInputs(e.outlet)),M(2),F(e.outlet.data===void 0?-1:8)}}function vj(e,t){if(e&1&&(H(0,`h3`),J(1,`Outlets`),U(),H(2,`ul`,21),I(3,_j,9,6,`li`,22,Dg),U()),e&2){let e=K(2);M(3),L(e.outletRows())}}function yj(e,t){if(e&1&&(H(0,`p`,1)(1,`span`,2),J(2,`URL`),U(),H(3,`code`),J(4),U()(),P(5,HA,5,1,`p`,3),P(6,WA,10,5),P(7,GA,2,1,`p`,4),H(8,`dl`,5),P(9,KA,4,1),P(10,qA,6,3),P(11,JA,5,1),U(),H(12,`h3`),J(13,`Active routes`),U(),H(14,`div`,6)(15,`table`)(16,`thead`)(17,`tr`)(18,`th`,7),J(19,`Route`),U(),H(20,`th`,7),J(21,`Component`),U(),H(22,`th`,7),J(23,`Params`),U(),H(24,`th`,7),J(25,`Data`),U(),H(26,`th`,7),J(27,`Guards and resolvers`),U()()(),H(28,`tbody`),I(29,uj,24,12,`tr`,null,Dg),U()()(),P(31,vj,5,0)),e&2){let e,n=t,r=K();M(4),Y(n.url),M(),F(n.urlDrift&&n.browserUrl?5:-1),M(),F((e=n.pending)?6:-1,e),M(),F(r.message()?7:-1),M(2),F(n.title?9:-1),M(),F(r.hasKeys(n.queryParams)?10:-1),M(),F(n.fragment?11:-1),M(18),L(r.rows()),M(2),F(r.outletRows().length?31:-1)}}function bj(e,t){e&1&&(H(0,`div`,0)(1,`p`,27),J(2,`This page reports no Router.`),U(),H(3,`p`,23),J(4,` Add `),H(5,`code`),J(6,`provideRouter()`),U(),J(7,` to the app config and navigate once to see the active routes here. `),U()())}var xj=class e{page=$.required();rpc=$(null);navigationAllowed=Q(()=>ME(this.rpc(),`router`));navigationOff=iE(`router`);componentsOn=Q(()=>jE(this.rpc()).inspectors.components);showComponent=Rv();pageId=Q(()=>this.page().pageId);message=Fv({source:this.pageId,computation:()=>``});rows=Q(()=>{let e=[],t=(n,r,i)=>{let a=r===0&&!n.path?`(root)`:`/`+n.path,o=i===void 0?void 0:`level ${r+1}, child of ${i}`;e.push({route:n,depth:r,label:a,nesting:o});for(let e of n.children)t(e,r+1,a)},n=this.page().snapshot?.root;return n&&t(n,0),e});outletRows=Q(()=>{let e=[],t=(n,r)=>{for(let i of n)e.push({outlet:i,depth:r}),i.children&&t(i.children,r+1)};return t(this.page().outlets??[],0),e});hasKeys(e){return Object.keys(e).length>0}entries(e){return Object.entries(e)}guardList(e){return Object.entries(e.guards??{}).flatMap(([e,t])=>t.map(t=>`${e} ${t}`))}boundInputs(e){return(e.inputs??[]).filter(e=>e.source!==`unset`)}async abort(){let e=this.pageId(),t=await LA(this.rpc(),e,{action:`abort`});e===this.pageId()&&this.message.set(t.error?String(t.error):`Aborted navigation #${t.aborted}.`)}static ɵfac=function(t){return new(t||e)};static ɵcmp=Wh({type:e,selectors:[[`app-route-current`]],inputs:{page:[1,`page`],rpc:[1,`rpc`]},outputs:{showComponent:`showComponent`},decls:2,vars:1,consts:[[1,`empty`],[1,`url`],[1,`url-label`],[`role`,`note`,1,`note`],[`role`,`status`,1,`muted`],[1,`facts`],[`role`,`region`,`aria-label`,`Active routes`,`tabindex`,`0`,1,`table-scroll`],[`scope`,`col`],[`role`,`status`,1,`pending`],[`aria-hidden`,`true`,1,`pulse`],[1,`pending-text`],[`type`,`button`,1,`small`,3,`click`,`disabled`],[`id`,`route-current-writes-off`,1,`muted`],[1,`path`],[1,`visually-hidden`],[1,`tag`],[1,`sub`],[1,`component`],[1,`entry`],[1,`entry`,`data`],[`aria-hidden`,`true`,1,`nil`],[1,`outlets`],[3,`padding-left`],[1,`muted`],[1,`outlet-data`],[`type`,`button`,1,`small`,`show-component`],[`type`,`button`,1,`small`,`show-component`,3,`click`],[1,`empty-title`]],template:function(e,t){if(e&1&&P(0,yj,32,8)(1,bj,8,0,`div`,0),e&2){let e;F((e=t.page().snapshot)?0:1,e)}},dependencies:[hb],styles:[`.muted[_ngcontent-%COMP%] {
   color: var(--%NS%text-2);
   font-size: 13px;
   line-height: 1.5;
@@ -1991,7 +2252,7 @@ h3[_ngcontent-%COMP%] {
   display: block;
   color: var(--%NS%text-2);
   font-size: 12px;
-}`]})};function qA(e,t){if(e&1&&(H(0,`span`,8),J(1),U()),e&2){let e=K(2);M(),X(``,e.counts().error,` error(s)`)}}function JA(e,t){if(e&1&&(H(0,`span`,9),J(1),U()),e&2){let e=K(2);M(),X(``,e.counts().warning,` warning(s)`)}}function YA(e,t){if(e&1&&(H(0,`span`,10),J(1),U()),e&2){let e=K(2);M(),X(``,e.counts().info,` info`)}}function XA(e,t){if(e&1&&(H(0,`span`,3),P(1,qA,2,1,`span`,8),P(2,JA,2,1,`span`,9),P(3,YA,2,1,`span`,10),U()),e&2){let e=K();M(),F(e.counts().error?1:-1),M(),F(e.counts().warning?2:-1),M(),F(e.counts().info?3:-1)}}function ZA(e,t){if(e&1){let e=W();H(0,`div`,4)(1,`p`,11),J(2,`The route checks could not run.`),U(),H(3,`p`,2),J(4,`The devtools server did not answer. Check that it is still running.`),U(),H(5,`button`,1),n_(`click`,function(){return O(e),k(K().run())}),J(6,`Retry`),U()()}}function QA(e,t){e&1&&(H(0,`p`,5),J(1,`Checking…`),U())}function $A(e,t){e&1&&J(0,` This page runs in events-only mode: it has no debug utils (a production build or an unusual setup), so it cannot report its route config. `)}function ej(e,t){e&1&&J(0,` The page has not reported its route config yet. It appears after the app finishes bootstrapping. `)}function tj(e,t){e&1&&J(0,` No page with a router is connected. `)}function nj(e,t){if(e&1&&(H(0,`div`,6)(1,`p`,11),J(2,`No checks ran.`),U(),H(3,`p`,2),P(4,$A,1,0)(5,ej,1,0)(6,tj,1,0),U()()),e&2){let e;M(4),F((e=t)===`events-only`?4:e===`no-config`?5:6)}}function rj(e,t){if(e&1&&(H(0,`li`)(1,`div`,12)(2,`span`,10),J(3),U(),H(4,`code`,13),J(5),U(),H(6,`code`,14),J(7),U()(),H(8,`p`,15),J(9),U(),H(10,`p`,16)(11,`span`,17),J(12,`Fix`),U(),H(13,`span`,18),J(14),H(15,`span`,2),J(16),U()()()()),e&2){let e=t.$implicit,n=K(2);N(`data-severity`,e.severity),M(2),N(`data-tone`,n.severityTone(e.severity)),M(),Y(e.severity),M(2),Y(e.rule),M(2),Y(e.route),M(2),Y(e.message),M(5),X(``,e.fix,` `),M(2),X(`(Angular `,e.angular===`throws`?`throws`:e.angular===`warns`?`warns`:`does not warn`,`)`)}}function ij(e,t){if(e&1&&(H(0,`ul`,7),I(1,rj,17,8,`li`,null,Dg),U()),e&2){let e=K();N(`aria-busy`,e.checking()),M(),L(e.findings())}}function aj(e,t){e&1&&(H(0,`div`,6)(1,`span`,19),A(),H(2,`svg`,20),zg(3,`path`,21),U()(),ms(),H(4,`p`,11),J(5,`No route config problems found.`),U(),H(6,`p`,2),J(7,`The check runs again after each navigation or config change.`),U()())}var oj=class e{page=$.required();rpc=$(null);result=j(null);failed=j(!1);checking=j(!1);findings=Q(()=>{let e=this.result();return e?.checked?e.findings:[]});notChecked=Q(()=>{let e=this.result();return e&&!e.checked?e.reason:null});counts=Q(()=>{let e={error:0,warning:0,info:0};for(let t of this.findings())e[t.severity]++;return e});key=Q(()=>{let e=this.page(),t=e.navigations[e.navigations.length-1],n=JSON.stringify((e.links??[]).map(e=>[e.text,e.href,e.linkActive!==void 0,e.ariaCurrent===void 0])),r=`${e.setup?.mode}/${e.setup?.features?.componentInputBinding}`;return`${e.pageId}:${e.generation}:${t?.id}:${t?.outcome}:${n}:${r}`});seq=0;checkedPage=null;constructor(){dc(()=>{this.key(),jv(()=>void this.run())})}severityTone(e){return e===`error`?`bad`:e===`warning`?`warn`:``}async run(){let e=++this.seq,t=this.page().pageId;t!==this.checkedPage&&this.result.set(null),this.checking.set(!0);let n=await aA(this.rpc(),`router-lint`,t);e===this.seq&&(this.checking.set(!1),this.failed.set(!n),n&&(this.result.set(n),this.checkedPage=t))}static ɵfac=function(t){return new(t||e)};static ɵcmp=Wh({type:e,selectors:[[`app-route-lint`]],inputs:{page:[1,`page`],rpc:[1,`rpc`]},decls:11,vars:4,consts:[[1,`toolbar`],[`type`,`button`,1,`small`,3,`click`],[1,`muted`],[1,`summary`],[`role`,`alert`,1,`empty`],[`role`,`status`,1,`muted`,`empty`],[1,`empty`],[1,`findings`],[`data-tone`,`bad`,1,`badge`],[`data-tone`,`warn`,1,`badge`],[1,`badge`],[1,`empty-title`],[1,`head`],[1,`rule`],[1,`route`],[1,`message`],[1,`fix`],[1,`fix-label`],[1,`fix-text`],[`aria-hidden`,`true`,1,`ok-mark`],[`width`,`16`,`height`,`16`,`viewBox`,`0 0 24 24`,`fill`,`none`,`stroke`,`currentColor`,`stroke-width`,`2.5`,`stroke-linecap`,`round`,`stroke-linejoin`,`round`],[`d`,`M20 6 9 17l-5-5`]],template:function(e,t){if(e&1&&(H(0,`div`,0)(1,`button`,1),n_(`click`,function(){return t.run()}),J(2),U(),H(3,`span`,2),J(4,`Checks the live config, links and recent navigations. Lazy routes that have not loaded are skipped.`),U(),P(5,XA,4,3,`span`,3),U(),P(6,ZA,7,0,`div`,4)(7,QA,2,0,`p`,5)(8,nj,7,1,`div`,6)(9,ij,3,1,`ul`,7)(10,aj,8,0,`div`,6)),e&2){let e;M(),N(`aria-busy`,t.checking()),M(),X(` `,t.checking()?`Checking…`:`Check again`,` `),M(3),F(t.result()?.checked&&t.findings().length?5:-1),M(),F(t.failed()?6:t.result()?(e=t.notChecked())?8:t.findings().length?9:10:7,e)}},styles:[`.muted[_ngcontent-%COMP%] {
+}`]})};function Sj(e,t){if(e&1&&(H(0,`span`,8),J(1),U()),e&2){let e=K(2);M(),X(``,e.counts().error,` error(s)`)}}function Cj(e,t){if(e&1&&(H(0,`span`,9),J(1),U()),e&2){let e=K(2);M(),X(``,e.counts().warning,` warning(s)`)}}function wj(e,t){if(e&1&&(H(0,`span`,10),J(1),U()),e&2){let e=K(2);M(),X(``,e.counts().info,` info`)}}function Tj(e,t){if(e&1&&(H(0,`span`,3),P(1,Sj,2,1,`span`,8),P(2,Cj,2,1,`span`,9),P(3,wj,2,1,`span`,10),U()),e&2){let e=K();M(),F(e.counts().error?1:-1),M(),F(e.counts().warning?2:-1),M(),F(e.counts().info?3:-1)}}function Ej(e,t){if(e&1){let e=W();H(0,`div`,4)(1,`p`,11),J(2,`The route checks could not run.`),U(),H(3,`p`,2),J(4,`The devtools server did not answer. Check that it is still running.`),U(),H(5,`button`,1),n_(`click`,function(){return O(e),k(K().run())}),J(6,`Retry`),U()()}}function Dj(e,t){e&1&&(H(0,`p`,5),J(1,`Checking…`),U())}function Oj(e,t){e&1&&J(0,` This page runs in events-only mode: it has no debug utils (a production build or an unusual setup), so it cannot report its route config. `)}function kj(e,t){e&1&&J(0,` The page has not reported its route config yet. It appears after the app finishes bootstrapping. `)}function Aj(e,t){e&1&&J(0,` No page with a router is connected. `)}function jj(e,t){if(e&1&&(H(0,`div`,6)(1,`p`,11),J(2,`No checks ran.`),U(),H(3,`p`,2),P(4,Oj,1,0)(5,kj,1,0)(6,Aj,1,0),U()()),e&2){let e;M(4),F((e=t)===`events-only`?4:e===`no-config`?5:6)}}function Mj(e,t){if(e&1&&(H(0,`li`)(1,`div`,12)(2,`span`,10),J(3),U(),H(4,`code`,13),J(5),U(),H(6,`code`,14),J(7),U()(),H(8,`p`,15),J(9),U(),H(10,`p`,16)(11,`span`,17),J(12,`Fix`),U(),H(13,`span`,18),J(14),H(15,`span`,2),J(16),U()()()()),e&2){let e=t.$implicit,n=K(2);N(`data-severity`,e.severity),M(2),N(`data-tone`,n.severityTone(e.severity)),M(),Y(e.severity),M(2),Y(e.rule),M(2),Y(e.route),M(2),Y(e.message),M(5),X(``,e.fix,` `),M(2),X(`(Angular `,e.angular===`throws`?`throws`:e.angular===`warns`?`warns`:`does not warn`,`)`)}}function Nj(e,t){if(e&1&&(H(0,`ul`,7),I(1,Mj,17,8,`li`,null,Dg),U()),e&2){let e=K();N(`aria-busy`,e.checking()),M(),L(e.findings())}}function Pj(e,t){e&1&&(H(0,`div`,6)(1,`span`,19),A(),H(2,`svg`,20),zg(3,`path`,21),U()(),ms(),H(4,`p`,11),J(5,`No route config problems found.`),U(),H(6,`p`,2),J(7,`The check runs again after each navigation or config change.`),U()())}var Fj=class e{page=$.required();rpc=$(null);result=j(null);failed=j(!1);checking=j(!1);findings=Q(()=>{let e=this.result();return e?.checked?e.findings:[]});notChecked=Q(()=>{let e=this.result();return e&&!e.checked?e.reason:null});counts=Q(()=>{let e={error:0,warning:0,info:0};for(let t of this.findings())e[t.severity]++;return e});key=Q(()=>{let e=this.page(),t=e.navigations[e.navigations.length-1],n=JSON.stringify((e.links??[]).map(e=>[e.text,e.href,e.linkActive!==void 0,e.ariaCurrent===void 0])),r=`${e.setup?.mode}/${e.setup?.features?.componentInputBinding}`;return`${e.pageId}:${e.generation}:${t?.id}:${t?.outcome}:${n}:${r}`});seq=0;checkedPage=null;constructor(){dc(()=>{this.key(),Nv(()=>void this.run())})}severityTone(e){return e===`error`?`bad`:e===`warning`?`warn`:``}async run(){let e=++this.seq,t=this.page().pageId;t!==this.checkedPage&&this.result.set(null),this.checking.set(!0);let n=await PA(this.rpc(),`router-lint`,t);e===this.seq&&(this.checking.set(!1),this.failed.set(!n),n&&(this.result.set(n),this.checkedPage=t))}static ɵfac=function(t){return new(t||e)};static ɵcmp=Wh({type:e,selectors:[[`app-route-lint`]],inputs:{page:[1,`page`],rpc:[1,`rpc`]},decls:11,vars:4,consts:[[1,`toolbar`],[`type`,`button`,1,`small`,3,`click`],[1,`muted`],[1,`summary`],[`role`,`alert`,1,`empty`],[`role`,`status`,1,`muted`,`empty`],[1,`empty`],[1,`findings`],[`data-tone`,`bad`,1,`badge`],[`data-tone`,`warn`,1,`badge`],[1,`badge`],[1,`empty-title`],[1,`head`],[1,`rule`],[1,`route`],[1,`message`],[1,`fix`],[1,`fix-label`],[1,`fix-text`],[`aria-hidden`,`true`,1,`ok-mark`],[`width`,`16`,`height`,`16`,`viewBox`,`0 0 24 24`,`fill`,`none`,`stroke`,`currentColor`,`stroke-width`,`2.5`,`stroke-linecap`,`round`,`stroke-linejoin`,`round`],[`d`,`M20 6 9 17l-5-5`]],template:function(e,t){if(e&1&&(H(0,`div`,0)(1,`button`,1),n_(`click`,function(){return t.run()}),J(2),U(),H(3,`span`,2),J(4,`Checks the live config, links and recent navigations. Lazy routes that have not loaded are skipped.`),U(),P(5,Tj,4,3,`span`,3),U(),P(6,Ej,7,0,`div`,4)(7,Dj,2,0,`p`,5)(8,jj,7,1,`div`,6)(9,Nj,3,1,`ul`,7)(10,Pj,8,0,`div`,6)),e&2){let e;M(),N(`aria-busy`,t.checking()),M(),X(` `,t.checking()?`Checking…`:`Check again`,` `),M(3),F(t.result()?.checked&&t.findings().length?5:-1),M(),F(t.failed()?6:t.result()?(e=t.notChecked())?8:t.findings().length?9:10:7,e)}},styles:[`.muted[_ngcontent-%COMP%] {
   color: var(--%NS%text-2);
   font-size: 13px;
   line-height: 1.5;
@@ -2413,7 +2674,7 @@ h3[_ngcontent-%COMP%] {
 
 .fix[_ngcontent-%COMP%]   .muted[_ngcontent-%COMP%] {
   font-size: 12px;
-}`]})},sj=(e,t)=>t.name,cj=(e,t)=>t[0];function lj(e,t){e&1&&(H(0,`p`,1),J(1,` Events-only mode: this build lacks the injector provider debug helper, so setup detection is limited. The preloader, the scroller and the router providers can't be found, and the features and options below can show defaults. `),U())}function uj(e,t){if(e&1&&(H(0,`dt`),J(1,`Angular`),U(),H(2,`dd`),J(3),U()),e&2){let e=K();M(3),Y(e.angularVersion)}}function dj(e,t){if(e&1&&(H(0,`dt`),J(1,`Base href`),U(),H(2,`dd`)(3,`code`),J(4),U()()),e&2){let e=K();M(4),Y(e.baseHref)}}function fj(e,t){if(e&1&&(H(0,`dt`),J(1,`Hydration`),U(),H(2,`dd`),J(3),U()),e&2){let e=K();M(3),X(``,e.hydrated,` component(s) hydrated from server HTML`)}}function pj(e,t){if(e&1&&(H(0,`tr`)(1,`td`,5)(2,`code`),J(3),U()(),H(4,`td`)(5,`code`),J(6),U()(),H(7,`td`,6)(8,`span`,7),J(9),U()()()),e&2){let e=t.$implicit;M(3),Y(e.name),M(3),Y(e.value),M(2),N(`data-tone`,e.set?`warn`:``),M(),Y(e.set?`set`:`default`)}}function mj(e,t){if(e&1&&(H(0,`li`)(1,`span`,7),J(2),U()()),e&2){let e=t.$implicit;M(),N(`data-tone`,e[1]===`off`?``:`good`),M(),Z(``,e[0],`: `,e[1])}}function hj(e,t){if(e&1&&(H(0,`h3`),J(1,`Features`),U(),H(2,`ul`,8),I(3,mj,3,3,`li`,null,cj),U()),e&2){let e=K(),t=K();M(3),L(t.entries(e.features))}}function gj(e,t){if(e&1&&(H(0,`dt`),J(1),U(),H(2,`dd`)(3,`code`),J(4),U()()),e&2){let e=t.$implicit;M(),Y(e[0]),M(3),Y(e[1])}}function _j(e,t){if(e&1&&(H(0,`h3`),J(1,`Strategies`),U(),H(2,`dl`,2),I(3,gj,5,2,null,null,cj),U()),e&2){let e=K(),t=K();M(3),L(t.entries(e.strategies))}}function vj(e,t){if(e&1&&(P(0,lj,2,0,`p`,1),H(1,`dl`,2)(2,`dt`),J(3,`Set up with`),U(),H(4,`dd`),J(5),U(),P(6,uj,4,1),P(7,dj,5,1),P(8,fj,4,1),U(),H(9,`h3`),J(10,`Options`),U(),H(11,`div`,3)(12,`table`)(13,`thead`)(14,`tr`)(15,`th`,4),J(16,`Option`),U(),H(17,`th`,4),J(18,`Value`),U(),H(19,`th`,4),J(20,`Source`),U()()(),H(21,`tbody`),I(22,pj,10,4,`tr`,null,sj),U()()(),P(24,hj,5,0),P(25,_j,5,0)),e&2){let e=t,n=K();F(e.mode===`events-only`?0:-1),M(5),Z(` `,e.setupKind,``,e.routers>1?`, `+e.routers+` routers on the page`:``,` `),M(),F(e.angularVersion?6:-1),M(),F(e.baseHref?7:-1),M(),F(e.hydrated?8:-1),M(14),L(e.options),M(2),F(n.entries(e.features).length?24:-1),M(),F(n.entries(e.strategies).length?25:-1)}}function yj(e,t){e&1&&(H(0,`div`,0)(1,`p`,9),J(2,`The page has not reported its router setup yet.`),U(),H(3,`p`,10),J(4,` It appears after the app finishes bootstrapping. Reload the app if it stays empty. `),U()())}var bj=class e{page=$.required();entries(e){return Object.entries(e)}static ɵfac=function(t){return new(t||e)};static ɵcmp=Wh({type:e,selectors:[[`app-route-setup`]],inputs:{page:[1,`page`]},decls:2,vars:1,consts:[[1,`empty`],[`role`,`note`,1,`note`],[1,`facts`],[`role`,`region`,`aria-label`,`Router options`,`tabindex`,`0`,1,`table-scroll`],[`scope`,`col`],[1,`name`],[1,`source`],[1,`badge`],[1,`chips`],[1,`empty-title`],[1,`muted`]],template:function(e,t){if(e&1&&P(0,vj,26,8)(1,yj,5,0,`div`,0),e&2){let e;F((e=t.page().setup)?0:1,e)}},styles:[`.muted[_ngcontent-%COMP%] {
+}`]})},Ij=(e,t)=>t.name,Lj=(e,t)=>t[0];function Rj(e,t){e&1&&(H(0,`p`,1),J(1,` Events-only mode: this build lacks the injector provider debug helper, so setup detection is limited. The preloader, the scroller and the router providers can't be found, and the features and options below can show defaults. `),U())}function zj(e,t){if(e&1&&(H(0,`dt`),J(1,`Angular`),U(),H(2,`dd`),J(3),U()),e&2){let e=K();M(3),Y(e.angularVersion)}}function Bj(e,t){if(e&1&&(H(0,`dt`),J(1,`Base href`),U(),H(2,`dd`)(3,`code`),J(4),U()()),e&2){let e=K();M(4),Y(e.baseHref)}}function Vj(e,t){if(e&1&&(H(0,`dt`),J(1,`Hydration`),U(),H(2,`dd`),J(3),U()),e&2){let e=K();M(3),X(``,e.hydrated,` component(s) hydrated from server HTML`)}}function Hj(e,t){if(e&1&&(H(0,`tr`)(1,`td`,5)(2,`code`),J(3),U()(),H(4,`td`)(5,`code`),J(6),U()(),H(7,`td`,6)(8,`span`,7),J(9),U()()()),e&2){let e=t.$implicit;M(3),Y(e.name),M(3),Y(e.value),M(2),N(`data-tone`,e.set?`warn`:``),M(),Y(e.set?`set`:`default`)}}function Uj(e,t){if(e&1&&(H(0,`li`)(1,`span`,7),J(2),U()()),e&2){let e=t.$implicit;M(),N(`data-tone`,e[1]===`off`?``:`good`),M(),Z(``,e[0],`: `,e[1])}}function Wj(e,t){if(e&1&&(H(0,`h3`),J(1,`Features`),U(),H(2,`ul`,8),I(3,Uj,3,3,`li`,null,Lj),U()),e&2){let e=K(),t=K();M(3),L(t.entries(e.features))}}function Gj(e,t){if(e&1&&(H(0,`dt`),J(1),U(),H(2,`dd`)(3,`code`),J(4),U()()),e&2){let e=t.$implicit;M(),Y(e[0]),M(3),Y(e[1])}}function Kj(e,t){if(e&1&&(H(0,`h3`),J(1,`Strategies`),U(),H(2,`dl`,2),I(3,Gj,5,2,null,null,Lj),U()),e&2){let e=K(),t=K();M(3),L(t.entries(e.strategies))}}function qj(e,t){if(e&1&&(P(0,Rj,2,0,`p`,1),H(1,`dl`,2)(2,`dt`),J(3,`Set up with`),U(),H(4,`dd`),J(5),U(),P(6,zj,4,1),P(7,Bj,5,1),P(8,Vj,4,1),U(),H(9,`h3`),J(10,`Options`),U(),H(11,`div`,3)(12,`table`)(13,`thead`)(14,`tr`)(15,`th`,4),J(16,`Option`),U(),H(17,`th`,4),J(18,`Value`),U(),H(19,`th`,4),J(20,`Source`),U()()(),H(21,`tbody`),I(22,Hj,10,4,`tr`,null,Ij),U()()(),P(24,Wj,5,0),P(25,Kj,5,0)),e&2){let e=t,n=K();F(e.mode===`events-only`?0:-1),M(5),Z(` `,e.setupKind,``,e.routers>1?`, `+e.routers+` routers on the page`:``,` `),M(),F(e.angularVersion?6:-1),M(),F(e.baseHref?7:-1),M(),F(e.hydrated?8:-1),M(14),L(e.options),M(2),F(n.entries(e.features).length?24:-1),M(),F(n.entries(e.strategies).length?25:-1)}}function Jj(e,t){e&1&&(H(0,`div`,0)(1,`p`,9),J(2,`The page has not reported its router setup yet.`),U(),H(3,`p`,10),J(4,` It appears after the app finishes bootstrapping. Reload the app if it stays empty. `),U()())}var Yj=class e{page=$.required();entries(e){return Object.entries(e)}static ɵfac=function(t){return new(t||e)};static ɵcmp=Wh({type:e,selectors:[[`app-route-setup`]],inputs:{page:[1,`page`]},decls:2,vars:1,consts:[[1,`empty`],[`role`,`note`,1,`note`],[1,`facts`],[`role`,`region`,`aria-label`,`Router options`,`tabindex`,`0`,1,`table-scroll`],[`scope`,`col`],[1,`name`],[1,`source`],[1,`badge`],[1,`chips`],[1,`empty-title`],[1,`muted`]],template:function(e,t){if(e&1&&P(0,qj,26,8)(1,Jj,5,0,`div`,0),e&2){let e;F((e=t.page().setup)?0:1,e)}},styles:[`.muted[_ngcontent-%COMP%] {
   color: var(--%NS%text-2);
   font-size: 13px;
   line-height: 1.5;
@@ -2744,7 +3005,7 @@ h3[_ngcontent-%COMP%] {
 
 .facts[_ngcontent-%COMP%]   code[_ngcontent-%COMP%] {
   color: var(--%NS%text-strong);
-}`]})},xj=(e,t)=>t.id,Sj=(e,t)=>t.phase;function Cj(e,t){if(e&1&&(z(0,`p`,8),J(1),B()),e&2){let e=K();M(),Y(e.message())}}function wj(e,t){if(e&1&&(z(0,`p`,9),J(1),B()),e&2){let e=K();M(),Y(e.navigationOff)}}function Tj(e,t){e&1&&(z(0,`span`,18),J(1,`→`),B(),z(2,`span`,19),J(3,`then`),B())}function Ej(e,t){if(e&1&&(P(0,Tj,4,0),z(1,`code`),J(2),B()),e&2){let e=t.$implicit,n=t.$index;F(n===0?-1:0),M(2),Y(e)}}function Dj(e,t){if(e&1&&(z(0,`li`)(1,`code`),J(2),B(),z(3,`span`,18),J(4,` → `),B(),z(5,`span`,19),J(6,` to `),B(),z(7,`code`),J(8),B(),J(9),B()),e&2){let e=t.$implicit,n=K(3);M(2),Y(e.from),M(6),Y(e.to),M(),X(`: `,n.hopCause(e),` `)}}function Oj(e,t){if(e&1&&(z(0,`div`,13)(1,`p`,14)(2,`span`,15),J(3),B(),I(4,Ej,3,2,null,null,Dg),B(),z(6,`ol`,16),I(7,Dj,10,3,`li`,null,Dg),B(),z(9,`p`,17),J(10),B()()),e&2){let e=t.$implicit,n=K(2);M(3),Y(n.loopTitle(e)),M(),L(e.cycle),M(3),L(e.hops),M(3),Y(n.loopMeta(e))}}function kj(e,t){if(e&1&&(z(0,`section`,11)(1,`h3`,12),J(2),B(),I(3,Oj,11,2,`div`,13,Dg),B()),e&2){let e=K();M(2),X(` `,e.loops().length===1?`Loop detected`:e.loops().length+` loops detected`,` `),M(),L(e.loops())}}function Aj(e,t){if(e&1&&(z(0,`span`),V(1,`i`),J(2),B()),e&2){let e=t.$implicit,n=K(2);M(),j_(`background`,n.color(e)),M(),Y(e)}}function jj(e,t){if(e&1&&(z(0,`time`),J(1),B()),e&2){let e=K().$implicit,t=K(2);M(),Y(t.time(e.startedAt))}}function Mj(e,t){if(e&1&&(z(0,`span`,18),J(1,`→`),B(),z(2,`span`,19),J(3,`redirected to`),B(),z(4,`code`,27),J(5),B()),e&2){let e=K().$implicit;M(5),Y(e.finalUrl)}}function Nj(e,t){if(e&1&&(z(0,`span`,30),J(1),B()),e&2){let e=K().$implicit;M(),Y(e.endedAt===void 0&&e.outcome!==`pending`?`before Pangular Inspector connected`:`started before Pangular Inspector connected`)}}function Pj(e,t){if(e&1&&(z(0,`span`,31),J(1),B()),e&2){let e=K().$implicit;M(),X(``,e.phases?.total,`ms`)}}function Fj(e,t){if(e&1&&(z(0,`span`,31),J(1),B()),e&2){let e=K().$implicit;M(),X(``,e.endedAt-e.startedAt,`ms`)}}function Ij(e,t){e&1&&(z(0,`span`,32),J(1,`probe`),B())}function Lj(e,t){if(e&1&&(z(0,`span`,15),J(1,`loop`),z(2,`span`,19),J(3),B()()),e&2){let e=t,n=K(3);M(3),Z(`: part of `,n.loopTitle(e),` `,e.cycle.join(` then `))}}function Rj(e,t){if(e&1&&V(0,`span`),e&2){let e=t.$implicit,n=K(4);j_(`width`,e.width,`%`)(`background`,n.color(e.phase)),N(`title`,e.phase+` `+e.ms+`ms`)}}function zj(e,t){if(e&1&&(z(0,`div`,33),I(1,Rj,1,5,`span`,39,Sj),B()),e&2){let e=K().$implicit,t=K(2);N(`aria-label`,t.barLabel(e)),M(),L(t.bars(e))}}function Bj(e,t){if(e&1&&(z(0,`dt`),J(1,`From`),B(),z(2,`dd`)(3,`code`),J(4),B()()),e&2){let e=K().$implicit;M(4),Y(e.from)}}function Vj(e,t){if(e&1&&(z(0,`dt`),J(1,`Started by`),B(),z(2,`dd`),J(3),B()),e&2){let e=K().$implicit;M(3),Z(``,e.caller,` (`,e.trigger,`)`)}}function Hj(e,t){if(e&1&&(z(0,`dt`),J(1,`Extras`),B(),z(2,`dd`),J(3),B()),e&2){let e=K().$implicit;M(3),Y(e.extras?.join(`, `))}}function Uj(e,t){if(e&1&&(z(0,`dt`),J(1,`Redirect of`),B(),z(2,`dd`),J(3),B()),e&2){let e=K().$implicit;M(3),X(`#`,e.redirectedFrom)}}function Wj(e,t){if(e&1&&(z(0,`div`),J(1,` This navigation: `),z(2,`code`),J(3),B(),J(4,` to `),z(5,`code`),J(6),B(),J(7),B()),e&2){let e=t.$implicit,n=K(4);M(3),Y(e.from),M(3),Y(e.to),M(),X(`, `,n.hopCause(e),` `)}}function Gj(e,t){if(e&1&&(z(0,`dt`),J(1,`Loop`),B(),z(2,`dd`,40),J(3),I(4,Wj,8,3,`div`,null,Dg),B()),e&2){let e=t,n=K().$implicit,r=K(2);M(3),X(` `,e.cycle.join(` → `),` `),M(),L(r.hopsOf(e,n))}}function Kj(e,t){if(e&1&&(z(0,`dt`),J(1,`Redirects to`),B(),z(2,`dd`)(3,`code`),J(4),B(),J(5),B()),e&2){let e=K().$implicit;M(4),Y(e.redirectTo),M(),X(` (`,e.redirectKind,`) `)}}function qj(e,t){if(e&1&&(z(0,`dt`),J(1,`Guards`),B(),z(2,`dd`),J(3),B()),e&2){let e=K().$implicit,t=K(2);M(3),Z(``,e.guards.names.join(`, `)||`none`,`: `,t.guardResult(e))}}function Jj(e,t){if(e&1&&(z(0,`div`)(1,`code`),J(2),B(),J(3),z(4,`code`),J(5),B(),J(6,`: `),z(7,`strong`),J(8),B(),J(9),B()),e&2){let e=t.$implicit,n=K(4);M(2),Y(e.guard),M(),X(` `,e.kind,` on `),M(2),Y(e.route),M(2),q(`bad`,n.isBad(e.result)),M(),Y(e.result),M(),X(` (`,e.ms,`ms) `)}}function Yj(e,t){if(e&1&&(z(0,`dt`),J(1,`Runs`),B(),z(2,`dd`),I(3,Jj,10,7,`div`,null,Dg),B()),e&2){let e=K().$implicit;M(3),L(e.runs)}}function Xj(e,t){if(e&1&&J(0),e&2){let e=K(2).$implicit;X(` leaving `,e.checked.deactivate.join(`, `),`; `)}}function Zj(e,t){if(e&1&&(z(0,`dt`),J(1,`Checked`),B(),z(2,`dd`),P(3,Xj,1,1),J(4),B()),e&2){let e=K().$implicit;M(3),F(e.checked.deactivate.length?3:-1),M(),X(` entering `,e.checked.activate.join(`, `)||`nothing new`,` `)}}function Qj(e,t){if(e&1&&(z(0,`dt`),J(1,`Resolvers`),B(),z(2,`dd`),J(3),B()),e&2){let e=K().$implicit;M(3),Y(e.resolvers?.names?.join(`, `))}}function $j(e,t){if(e&1&&(z(0,`dt`),J(1,`Lazy loaded`),B(),z(2,`dd`),J(3),B()),e&2){let e=K().$implicit;M(3),Y(e.lazyLoaded?.join(`, `))}}function eM(e,t){if(e&1&&(z(0,`dt`),J(1,`Reused`),B(),z(2,`dd`),J(3),B()),e&2){let e=K().$implicit;M(3),X(` `,e.reused?.join(`, `),` (component kept, only inputs and params change) `)}}function tM(e,t){if(e&1&&(z(0,`dt`),J(1,`HTTP`),B(),z(2,`dd`),J(3),B()),e&2){let e=K().$implicit;M(3),Z(``,e.requests.count,` request(s): `,e.requests.urls.join(`, `))}}function nM(e,t){if(e&1&&(z(0,`dt`),J(1,`Scroll`),B(),z(2,`dd`),J(3),B()),e&2){let e=K().$implicit;M(3),Y(e.scroll)}}function rM(e,t){if(e&1&&(z(0,`dt`),J(1,`Title after`),B(),z(2,`dd`),J(3),B()),e&2){let e=K().$implicit;M(3),Y(e.title)}}function iM(e,t){if(e&1&&(z(0,`dt`),J(1,`Warnings`),B(),z(2,`dd`),J(3),B()),e&2){let e=K().$implicit;M(3),Y(e.warnings?.join(` · `))}}function aM(e,t){if(e&1&&(z(0,`dt`),J(1,`Reason`),B(),z(2,`dd`,40),J(3),B()),e&2){let e=K().$implicit,t=K(2);M(3),Y(t.reasonText(e))}}function oM(e,t){if(e&1&&(z(0,`dt`),J(1,`Error`),B(),z(2,`dd`,40),J(3),B()),e&2){let e=K().$implicit;M(3),Y(e.errorCode)}}function sM(e,t){if(e&1&&(z(0,`dt`),J(1,`Error handler`),B(),z(2,`dd`),J(3),B()),e&2){let e=K().$implicit;M(3),Y(e.errorHandler)}}function cM(e,t){if(e&1&&(z(0,`dt`),J(1,`Earlier`),B(),z(2,`dd`),J(3),B()),e&2){let e=K().$implicit;M(3),X(``,e.earlier,` navigation(s) before Pangular Inspector connected`)}}function lM(e,t){if(e&1&&(z(0,`p`,38),J(1,` Replay is off: the URL is redacted or not relative. `),B()),e&2){let e=K().$implicit;R(`id`,pv(`replay-note-`,e.id))}}function uM(e,t){if(e&1){let e=W();z(0,`li`)(1,`div`,25),P(2,jj,2,1,`time`),z(3,`span`,26),J(4),B(),z(5,`code`,27),J(6),B(),P(7,Mj,6,1),z(8,`span`,28)(9,`span`,29),J(10),B(),P(11,Nj,2,1,`span`,30)(12,Pj,2,1,`span`,31)(13,Fj,2,1,`span`,31),P(14,Ij,2,0,`span`,32),P(15,Lj,4,2,`span`,15),B()(),P(16,zj,3,1,`div`,33),z(17,`dl`,34),P(18,Bj,5,1),P(19,Vj,4,2),P(20,Hj,4,1),P(21,Uj,4,1),P(22,Gj,6,1),P(23,Kj,6,2),P(24,qj,4,2),P(25,Yj,5,0),P(26,Zj,5,2),P(27,Qj,4,1),P(28,$j,4,1),P(29,eM,4,1),P(30,tM,4,2),P(31,nM,4,1),P(32,rM,4,1),P(33,iM,4,1),P(34,aM,4,1),P(35,oM,4,1),P(36,sM,4,1),P(37,cM,4,1),B(),z(38,`div`,35)(39,`button`,36),G(`click`,function(){let t=O(e).$implicit;return k(K(2).replay(t))}),J(40,` Replay `),B(),z(41,`button`,37),G(`click`,function(){let t=O(e).$implicit;return k(K(2).copy(t))}),J(42,` Copy repro `),B(),P(43,lM,2,2,`p`,38),B()()}if(e&2){let e,n,r=t.$implicit,i=K(2);q(`in-loop`,!!i.loopOf(r)),M(2),F(r.beforeConnect?-1:2),M(2),X(`#`,r.id),M(2),Y(r.url),M(),F(r.finalUrl&&r.finalUrl!==r.url?7:-1),M(2),N(`data-tone`,i.tone(r.outcome)),M(),Y(r.outcome),M(),F(r.beforeConnect?11:r.phases?.total===void 0?r.endedAt===void 0?-1:13:12),M(3),F(r.probe?14:-1),M(),F((e=i.loopOf(r))?15:-1,e),M(),F(i.bars(r).length?16:-1),M(2),F(r.from?18:-1),M(),F(r.caller?19:-1),M(),F(r.extras?.length?20:-1),M(),F(r.redirectedFrom===void 0?-1:21),M(),F((n=i.loopOf(r))?22:-1,n),M(),F(r.redirectTo?23:-1),M(),F(r.guards&&(r.guards.names.length||r.guards.passed===!1)?24:-1),M(),F(r.runs?.length?25:-1),M(),F(r.checked&&(r.checked.activate.length||r.checked.deactivate.length)?26:-1),M(),F(r.resolvers?.names?.length?27:-1),M(),F(r.lazyLoaded?.length?28:-1),M(),F(r.reused?.length?29:-1),M(),F(r.requests?30:-1),M(),F(r.scroll?31:-1),M(),F(r.title?32:-1),M(),F(r.warnings?.length?33:-1),M(),F(r.reason||r.code?34:-1),M(),F(r.errorCode?35:-1),M(),F(r.errorHandler?36:-1),M(),F(r.earlier?37:-1),M(2),R(`disabled`,!i.navigationAllowed()||!i.replayable(r)),N(`aria-describedby`,i.replayNote(r))(`aria-label`,`Replay navigation `+r.id),M(2),N(`aria-label`,`Copy repro for navigation `+r.id),M(2),F(i.replayable(r)?-1:43)}}function dM(e,t){if(e&1&&(z(0,`div`,20)(1,`span`,21),J(2),B(),z(3,`div`,22),I(4,Aj,3,3,`span`,null,Og),B()(),z(6,`ol`,23),I(7,uM,44,37,`li`,24,xj),B()),e&2){let e=K();M(2),Z(``,e.items().length,` of `,e.page().navigations.length,` navigation(s)`),M(2),L(e.phases),M(3),L(e.items())}}function fM(e,t){if(e&1){let e=W();z(0,`div`,41)(1,`p`,42),J(2,`No navigations match the current filters.`),B(),z(3,`p`,30),J(4),B(),z(5,`button`,37),G(`click`,function(){O(e);let t=K(2),n=u_(2);return t.clearFilters(),k(n.focus())}),J(6,` Clear filters `),B()()}if(e&2){let e=K(2);M(4),X(` `,e.page().navigations.length,` navigation(s) are hidden. Clear the filters to see them. `)}}function pM(e,t){e&1&&(z(0,`div`,41)(1,`p`,42),J(2,`No navigations since Pangular Inspector connected.`),B(),z(3,`p`,30),J(4,`Earlier ones are not visible. Click a link in the app to record one.`),B()())}function mM(e,t){e&1&&P(0,fM,7,1,`div`,41)(1,pM,5,0,`div`,41),e&2&&F(+!K().page().navigations.length)}var hM=[`recognize`,`guards`,`resolve`,`activate`],gM={recognize:`#60a5fa`,guards:`#f59e0b`,resolve:`#2dd4bf`,activate:`#34d399`},_M=class e{page=$.required();rpc=$(null);maxNavigations=Q(()=>kE(this.rpc()).limits.navigations);navigationAllowed=Q(()=>AE(this.rpc(),`router`));navigationOff=nE(`router`);phases=hM;pageId=Q(()=>this.page().pageId);filter=Nv({source:this.pageId,computation:()=>``});onlyProblems=Nv({source:this.pageId,computation:()=>!1});message=Nv({source:this.pageId,computation:()=>``});loops=Q(()=>this.page().loops??[]);loopById=Q(()=>{let e=new Map;for(let t of this.loops())for(let n of t.ids)e.set(n,t);return e});items=Q(()=>{let e=this.filter().toLowerCase();return[...this.page().navigations].reverse().filter(t=>(!e||t.url.toLowerCase().includes(e)||!!t.finalUrl?.toLowerCase().includes(e))&&(!this.onlyProblems()||this.isProblem(t)))});isProblem(e){return e.probe?!1:![`succeeded`,`pending`].includes(e.outcome)||this.loopById().has(e.id)}loopOf(e){return this.loopById().get(e.id)}loopTitle(e){return e.kind===`burst`?`navigation loop`:`redirect loop`}hopsOf(e,t){return e.hops.filter(e=>e.id===t.id)}hopCause(e){return e.via===`navigate`?`#${e.id} started by ${e.by??`code`}`:`${e.via===`redirectTo`?`config`:`${e.via} redirect`}${e.by?` ${e.by}`:e.via===`redirectTo`?` redirectTo`:``} in #${e.id}`}loopMeta(e){let t=e.ids.length>1?`Navigations #${e.ids[0]} to #${e.ids[e.ids.length-1]}`:`Navigation #${e.ids[0]}`,n=e.bounces>1?`, came back ${e.bounces} times`:``,r=e.guards.length?` Guards involved: ${e.guards.join(`, `)}.`:``;return`${t}${n}; ${e.end}.${r}`}reasonText(e){return[e.code,e.reason].filter(Boolean).join(`: `)}clearFilters(){this.filter.set(``),this.onlyProblems.set(!1)}tone(e){return lA(e)}color(e){return gM[e]}bars(e){let t=e.phases?.total;return t?hM.filter(t=>(e.phases?.[t]??0)>0).map(n=>({phase:n,ms:e.phases[n],width:Math.max(1,e.phases[n]/t*100)})):[]}barLabel(e){return`Phases: ${this.bars(e).map(e=>`${e.phase} ${e.ms}ms`).join(`, `)}`}guardResult(e){let t=e.guards?.passed;return t===!0?`passed`:t===!1?e.outcome===`redirected`?`redirected`:`blocked`:e.outcome===`pending`?`running`:`did not finish, navigation ${e.outcome}`}isBad(e){return e===`false`||/^(UrlTree|RedirectCommand|threw)/.test(e)}time=$D;instrumentSeq=0;async toggleInstrument(e){let t=e.target,n=t.checked,r=this.pageId(),i=++this.instrumentSeq,a=await cA(this.rpc(),r,{action:`instrument`,on:n});if(i===this.instrumentSeq){if(r!==this.pageId()){t.checked=!!this.page().instrumented;return}if(a.error){t.checked=!!this.page().instrumented,this.message.set(String(a.error));return}this.message.set(n?`Recording each guard and resolver.`:`Stopped recording guards and resolvers.`)}}replayable(e){return oA(e.url)}replayNote(e){return this.navigationAllowed()?this.replayable(e)?null:`replay-note-${e.id}`:`route-timeline-writes-off`}async replay(e){this.message.set(`Replaying #${e.id}…`);let t=this.pageId(),n=await cA(this.rpc(),t,{action:`replay`,id:e.id});if(t!==this.pageId())return;if(n.error){this.message.set(String(n.error));return}let r=n.replay;this.message.set(`Replay of #${e.id}: ${r?.outcome??`unknown`}${n.same?` (same as before)`:` (different from before)`}.`)}async copy(e){let t=this.pageId(),n=await aA(this.rpc(),`router-export`,{pageId:t,id:e.id});if(t===this.pageId()){if(!n){this.message.set(`Could not build the repro.`);return}try{await navigator.clipboard.writeText(n),t===this.pageId()&&this.message.set(`Copied a markdown repro of #${e.id}.`)}catch{t===this.pageId()&&this.message.set(`The clipboard is not available here.`)}}}async clearNavigations(){let e=this.rpc(),t=this.pageId(),n=`Clearing navigations…`;this.message.set(n);let r;try{if(!e)throw Error(`No connection`);await mE(e,`clear-router-navigations`,t),r=`Navigations cleared.`}catch{r=`Could not clear the navigations.`}t===this.pageId()?this.message.set(r):this.message()===n&&this.message.set(``)}exportJson(){let e=new Blob([JSON.stringify(this.page().navigations,null,2)],{type:`application/json`}),t=URL.createObjectURL(e),n=document.createElement(`a`);n.href=t,n.download=`navigations-${this.page().pageId}.json`,n.click(),URL.revokeObjectURL(t)}static ɵfac=function(t){return new(t||e)};static ɵcmp=Wh({type:e,selectors:[[`app-route-timeline`]],inputs:{page:[1,`page`],rpc:[1,`rpc`]},decls:21,vars:12,consts:[[`filterInput`,``],[1,`toolbar`],[`type`,`search`,`aria-label`,`Filter navigations by URL`,`placeholder`,`Filter by URL`,1,`field`,3,`input`,`keydown.escape`,`value`],[1,`check`],[`type`,`checkbox`,3,`change`,`checked`],[`type`,`button`,1,`small`,`export`,3,`click`],[`type`,`button`,`aria-label`,`Clear navigations`,1,`small`,3,`click`,`disabled`],[`role`,`status`,1,`visually-hidden`],[`aria-hidden`,`true`,1,`message`],[`id`,`route-timeline-writes-off`,1,`message`],[`what`,`navigations`,`limit`,`navigations`,3,`dropped`,`max`],[`aria-labelledby`,`loops-heading`,1,`loops`],[`id`,`loops-heading`],[1,`loop`],[1,`chain`],[`data-tone`,`bad`,1,`badge`],[1,`hops`],[1,`muted`,`loop-meta`],[`aria-hidden`,`true`,1,`arrow`],[1,`visually-hidden`],[1,`meta-row`],[1,`muted`,`count`],[`aria-hidden`,`true`,1,`legend`],[1,`navs`],[3,`in-loop`],[1,`head`],[1,`id`],[1,`url`],[1,`meta`],[1,`badge`],[1,`muted`],[1,`muted`,`ms`],[1,`tag`],[`role`,`img`,1,`bar`],[1,`details`],[1,`actions`],[`type`,`button`,1,`small`,3,`click`,`disabled`],[`type`,`button`,1,`small`,3,`click`],[1,`muted`,`replay-note`,3,`id`],[3,`width`,`background`],[1,`reason`],[1,`empty`],[1,`empty-title`]],template:function(e,t){e&1&&(z(0,`div`,1)(1,`input`,2,0),G(`input`,function(e){return t.filter.set(e.target.value)})(`keydown.escape`,function(){return t.filter.set(``)}),B(),z(3,`label`,3)(4,`input`,4),G(`change`,function(e){return t.onlyProblems.set(e.target.checked)}),B(),J(5,` Only problems `),B(),z(6,`label`,3)(7,`input`,4),G(`change`,function(e){return t.toggleInstrument(e)}),B(),J(8,` Record each guard and resolver `),B(),z(9,`button`,5),G(`click`,function(){return t.exportJson()}),J(10,`Export JSON`),B(),z(11,`button`,6),G(`click`,function(){return t.clearNavigations()}),J(12,` Clear `),B()(),z(13,`p`,7),J(14),B(),P(15,Cj,2,1,`p`,8),P(16,wj,2,1,`p`,9),V(17,`app-limit-note`,10),P(18,kj,5,1,`section`,11),P(19,dM,9,2)(20,mM,2,1)),e&2&&(M(),R(`value`,t.filter()),M(3),R(`checked`,t.onlyProblems()),M(3),R(`checked`,t.page().instrumented),M(4),R(`disabled`,!t.navigationAllowed()),N(`aria-describedby`,t.navigationAllowed()?null:`route-timeline-writes-off`),M(3),Y(t.message()),M(),F(t.message()?15:-1),M(),F(t.navigationAllowed()?-1:16),M(),R(`dropped`,t.page().dropped??0)(`max`,t.maxNavigations()),M(),F(t.loops().length?18:-1),M(),F(t.items().length?19:20))},dependencies:[iO],styles:[`.muted[_ngcontent-%COMP%] {
+}`]})},Xj=(e,t)=>t.id,Zj=(e,t)=>t.phase;function Qj(e,t){if(e&1&&(z(0,`p`,8),J(1),B()),e&2){let e=K();M(),Y(e.message())}}function $j(e,t){if(e&1&&(z(0,`p`,9),J(1),B()),e&2){let e=K();M(),Y(e.navigationOff)}}function eM(e,t){e&1&&(z(0,`span`,18),J(1,`→`),B(),z(2,`span`,19),J(3,`then`),B())}function tM(e,t){if(e&1&&(P(0,eM,4,0),z(1,`code`),J(2),B()),e&2){let e=t.$implicit,n=t.$index;F(n===0?-1:0),M(2),Y(e)}}function nM(e,t){if(e&1&&(z(0,`li`)(1,`code`),J(2),B(),z(3,`span`,18),J(4,` → `),B(),z(5,`span`,19),J(6,` to `),B(),z(7,`code`),J(8),B(),J(9),B()),e&2){let e=t.$implicit,n=K(3);M(2),Y(e.from),M(6),Y(e.to),M(),X(`: `,n.hopCause(e),` `)}}function rM(e,t){if(e&1&&(z(0,`div`,13)(1,`p`,14)(2,`span`,15),J(3),B(),I(4,tM,3,2,null,null,Dg),B(),z(6,`ol`,16),I(7,nM,10,3,`li`,null,Dg),B(),z(9,`p`,17),J(10),B()()),e&2){let e=t.$implicit,n=K(2);M(3),Y(n.loopTitle(e)),M(),L(e.cycle),M(3),L(e.hops),M(3),Y(n.loopMeta(e))}}function iM(e,t){if(e&1&&(z(0,`section`,11)(1,`h3`,12),J(2),B(),I(3,rM,11,2,`div`,13,Dg),B()),e&2){let e=K();M(2),X(` `,e.loops().length===1?`Loop detected`:e.loops().length+` loops detected`,` `),M(),L(e.loops())}}function aM(e,t){if(e&1&&(z(0,`span`),V(1,`i`),J(2),B()),e&2){let e=t.$implicit,n=K(2);M(),j_(`background`,n.color(e)),M(),Y(e)}}function oM(e,t){if(e&1&&(z(0,`time`),J(1),B()),e&2){let e=K().$implicit,t=K(2);M(),Y(t.time(e.startedAt))}}function sM(e,t){if(e&1&&(z(0,`span`,18),J(1,`→`),B(),z(2,`span`,19),J(3,`redirected to`),B(),z(4,`code`,27),J(5),B()),e&2){let e=K().$implicit;M(5),Y(e.finalUrl)}}function cM(e,t){if(e&1&&(z(0,`span`,30),J(1),B()),e&2){let e=K().$implicit;M(),Y(e.endedAt===void 0&&e.outcome!==`pending`?`before Pangular Inspector connected`:`started before Pangular Inspector connected`)}}function lM(e,t){if(e&1&&(z(0,`span`,31),J(1),B()),e&2){let e=K().$implicit;M(),X(``,e.phases?.total,`ms`)}}function uM(e,t){if(e&1&&(z(0,`span`,31),J(1),B()),e&2){let e=K().$implicit;M(),X(``,e.endedAt-e.startedAt,`ms`)}}function dM(e,t){e&1&&(z(0,`span`,32),J(1,`probe`),B())}function fM(e,t){if(e&1&&(z(0,`span`,15),J(1,`loop`),z(2,`span`,19),J(3),B()()),e&2){let e=t,n=K(3);M(3),Z(`: part of `,n.loopTitle(e),` `,e.cycle.join(` then `))}}function pM(e,t){if(e&1&&V(0,`span`),e&2){let e=t.$implicit,n=K(4);j_(`width`,e.width,`%`)(`background`,n.color(e.phase)),N(`title`,e.phase+` `+e.ms+`ms`)}}function mM(e,t){if(e&1&&(z(0,`div`,33),I(1,pM,1,5,`span`,39,Zj),B()),e&2){let e=K().$implicit,t=K(2);N(`aria-label`,t.barLabel(e)),M(),L(t.bars(e))}}function hM(e,t){if(e&1&&(z(0,`dt`),J(1,`From`),B(),z(2,`dd`)(3,`code`),J(4),B()()),e&2){let e=K().$implicit;M(4),Y(e.from)}}function gM(e,t){if(e&1&&(z(0,`dt`),J(1,`Started by`),B(),z(2,`dd`),J(3),B()),e&2){let e=K().$implicit;M(3),Z(``,e.caller,` (`,e.trigger,`)`)}}function _M(e,t){if(e&1&&(z(0,`dt`),J(1,`Extras`),B(),z(2,`dd`),J(3),B()),e&2){let e=K().$implicit;M(3),Y(e.extras?.join(`, `))}}function vM(e,t){if(e&1&&(z(0,`dt`),J(1,`Redirect of`),B(),z(2,`dd`),J(3),B()),e&2){let e=K().$implicit;M(3),X(`#`,e.redirectedFrom)}}function yM(e,t){if(e&1&&(z(0,`div`),J(1,` This navigation: `),z(2,`code`),J(3),B(),J(4,` to `),z(5,`code`),J(6),B(),J(7),B()),e&2){let e=t.$implicit,n=K(4);M(3),Y(e.from),M(3),Y(e.to),M(),X(`, `,n.hopCause(e),` `)}}function bM(e,t){if(e&1&&(z(0,`dt`),J(1,`Loop`),B(),z(2,`dd`,40),J(3),I(4,yM,8,3,`div`,null,Dg),B()),e&2){let e=t,n=K().$implicit,r=K(2);M(3),X(` `,e.cycle.join(` → `),` `),M(),L(r.hopsOf(e,n))}}function xM(e,t){if(e&1&&(z(0,`dt`),J(1,`Redirects to`),B(),z(2,`dd`)(3,`code`),J(4),B(),J(5),B()),e&2){let e=K().$implicit;M(4),Y(e.redirectTo),M(),X(` (`,e.redirectKind,`) `)}}function SM(e,t){if(e&1&&(z(0,`dt`),J(1,`Guards`),B(),z(2,`dd`),J(3),B()),e&2){let e=K().$implicit,t=K(2);M(3),Z(``,e.guards.names.join(`, `)||`none`,`: `,t.guardResult(e))}}function CM(e,t){if(e&1&&(z(0,`div`)(1,`code`),J(2),B(),J(3),z(4,`code`),J(5),B(),J(6,`: `),z(7,`strong`),J(8),B(),J(9),B()),e&2){let e=t.$implicit,n=K(4);M(2),Y(e.guard),M(),X(` `,e.kind,` on `),M(2),Y(e.route),M(2),q(`bad`,n.isBad(e.result)),M(),Y(e.result),M(),X(` (`,e.ms,`ms) `)}}function wM(e,t){if(e&1&&(z(0,`dt`),J(1,`Runs`),B(),z(2,`dd`),I(3,CM,10,7,`div`,null,Dg),B()),e&2){let e=K().$implicit;M(3),L(e.runs)}}function TM(e,t){if(e&1&&J(0),e&2){let e=K(2).$implicit;X(` leaving `,e.checked.deactivate.join(`, `),`; `)}}function EM(e,t){if(e&1&&(z(0,`dt`),J(1,`Checked`),B(),z(2,`dd`),P(3,TM,1,1),J(4),B()),e&2){let e=K().$implicit;M(3),F(e.checked.deactivate.length?3:-1),M(),X(` entering `,e.checked.activate.join(`, `)||`nothing new`,` `)}}function DM(e,t){if(e&1&&(z(0,`dt`),J(1,`Resolvers`),B(),z(2,`dd`),J(3),B()),e&2){let e=K().$implicit;M(3),Y(e.resolvers?.names?.join(`, `))}}function OM(e,t){if(e&1&&(z(0,`dt`),J(1,`Lazy loaded`),B(),z(2,`dd`),J(3),B()),e&2){let e=K().$implicit;M(3),Y(e.lazyLoaded?.join(`, `))}}function kM(e,t){if(e&1&&(z(0,`dt`),J(1,`Reused`),B(),z(2,`dd`),J(3),B()),e&2){let e=K().$implicit;M(3),X(` `,e.reused?.join(`, `),` (component kept, only inputs and params change) `)}}function AM(e,t){if(e&1&&(z(0,`dt`),J(1,`HTTP`),B(),z(2,`dd`),J(3),B()),e&2){let e=K().$implicit;M(3),Z(``,e.requests.count,` request(s): `,e.requests.urls.join(`, `))}}function jM(e,t){if(e&1&&(z(0,`dt`),J(1,`Scroll`),B(),z(2,`dd`),J(3),B()),e&2){let e=K().$implicit;M(3),Y(e.scroll)}}function MM(e,t){if(e&1&&(z(0,`dt`),J(1,`Title after`),B(),z(2,`dd`),J(3),B()),e&2){let e=K().$implicit;M(3),Y(e.title)}}function NM(e,t){if(e&1&&(z(0,`dt`),J(1,`Warnings`),B(),z(2,`dd`),J(3),B()),e&2){let e=K().$implicit;M(3),Y(e.warnings?.join(` · `))}}function PM(e,t){if(e&1&&(z(0,`dt`),J(1,`Reason`),B(),z(2,`dd`,40),J(3),B()),e&2){let e=K().$implicit,t=K(2);M(3),Y(t.reasonText(e))}}function FM(e,t){if(e&1&&(z(0,`dt`),J(1,`Error`),B(),z(2,`dd`,40),J(3),B()),e&2){let e=K().$implicit;M(3),Y(e.errorCode)}}function IM(e,t){if(e&1&&(z(0,`dt`),J(1,`Error handler`),B(),z(2,`dd`),J(3),B()),e&2){let e=K().$implicit;M(3),Y(e.errorHandler)}}function LM(e,t){if(e&1&&(z(0,`dt`),J(1,`Earlier`),B(),z(2,`dd`),J(3),B()),e&2){let e=K().$implicit;M(3),X(``,e.earlier,` navigation(s) before Pangular Inspector connected`)}}function RM(e,t){if(e&1&&(z(0,`p`,38),J(1,` Replay is off: the URL is redacted or not relative. `),B()),e&2){let e=K().$implicit;R(`id`,pv(`replay-note-`,e.id))}}function zM(e,t){if(e&1){let e=W();z(0,`li`)(1,`div`,25),P(2,oM,2,1,`time`),z(3,`span`,26),J(4),B(),z(5,`code`,27),J(6),B(),P(7,sM,6,1),z(8,`span`,28)(9,`span`,29),J(10),B(),P(11,cM,2,1,`span`,30)(12,lM,2,1,`span`,31)(13,uM,2,1,`span`,31),P(14,dM,2,0,`span`,32),P(15,fM,4,2,`span`,15),B()(),P(16,mM,3,1,`div`,33),z(17,`dl`,34),P(18,hM,5,1),P(19,gM,4,2),P(20,_M,4,1),P(21,vM,4,1),P(22,bM,6,1),P(23,xM,6,2),P(24,SM,4,2),P(25,wM,5,0),P(26,EM,5,2),P(27,DM,4,1),P(28,OM,4,1),P(29,kM,4,1),P(30,AM,4,2),P(31,jM,4,1),P(32,MM,4,1),P(33,NM,4,1),P(34,PM,4,1),P(35,FM,4,1),P(36,IM,4,1),P(37,LM,4,1),B(),z(38,`div`,35)(39,`button`,36),G(`click`,function(){let t=O(e).$implicit;return k(K(2).replay(t))}),J(40,` Replay `),B(),z(41,`button`,37),G(`click`,function(){let t=O(e).$implicit;return k(K(2).copy(t))}),J(42,` Copy repro `),B(),P(43,RM,2,2,`p`,38),B()()}if(e&2){let e,n,r=t.$implicit,i=K(2);q(`in-loop`,!!i.loopOf(r)),M(2),F(r.beforeConnect?-1:2),M(2),X(`#`,r.id),M(2),Y(r.url),M(),F(r.finalUrl&&r.finalUrl!==r.url?7:-1),M(2),N(`data-tone`,i.tone(r.outcome)),M(),Y(r.outcome),M(),F(r.beforeConnect?11:r.phases?.total===void 0?r.endedAt===void 0?-1:13:12),M(3),F(r.probe?14:-1),M(),F((e=i.loopOf(r))?15:-1,e),M(),F(i.bars(r).length?16:-1),M(2),F(r.from?18:-1),M(),F(r.caller?19:-1),M(),F(r.extras?.length?20:-1),M(),F(r.redirectedFrom===void 0?-1:21),M(),F((n=i.loopOf(r))?22:-1,n),M(),F(r.redirectTo?23:-1),M(),F(r.guards&&(r.guards.names.length||r.guards.passed===!1)?24:-1),M(),F(r.runs?.length?25:-1),M(),F(r.checked&&(r.checked.activate.length||r.checked.deactivate.length)?26:-1),M(),F(r.resolvers?.names?.length?27:-1),M(),F(r.lazyLoaded?.length?28:-1),M(),F(r.reused?.length?29:-1),M(),F(r.requests?30:-1),M(),F(r.scroll?31:-1),M(),F(r.title?32:-1),M(),F(r.warnings?.length?33:-1),M(),F(r.reason||r.code?34:-1),M(),F(r.errorCode?35:-1),M(),F(r.errorHandler?36:-1),M(),F(r.earlier?37:-1),M(2),R(`disabled`,!i.navigationAllowed()||!i.replayable(r)),N(`aria-describedby`,i.replayNote(r))(`aria-label`,`Replay navigation `+r.id),M(2),N(`aria-label`,`Copy repro for navigation `+r.id),M(2),F(i.replayable(r)?-1:43)}}function BM(e,t){if(e&1&&(z(0,`div`,20)(1,`span`,21),J(2),B(),z(3,`div`,22),I(4,aM,3,3,`span`,null,Og),B()(),z(6,`ol`,23),I(7,zM,44,37,`li`,24,Xj),B()),e&2){let e=K();M(2),Z(``,e.items().length,` of `,e.page().navigations.length,` navigation(s)`),M(2),L(e.phases),M(3),L(e.items())}}function VM(e,t){if(e&1){let e=W();z(0,`div`,41)(1,`p`,42),J(2,`No navigations match the current filters.`),B(),z(3,`p`,30),J(4),B(),z(5,`button`,37),G(`click`,function(){O(e);let t=K(2),n=u_(2);return t.clearFilters(),k(n.focus())}),J(6,` Clear filters `),B()()}if(e&2){let e=K(2);M(4),X(` `,e.page().navigations.length,` navigation(s) are hidden. Clear the filters to see them. `)}}function HM(e,t){e&1&&(z(0,`div`,41)(1,`p`,42),J(2,`No navigations since Pangular Inspector connected.`),B(),z(3,`p`,30),J(4,`Earlier ones are not visible. Click a link in the app to record one.`),B()())}function UM(e,t){e&1&&P(0,VM,7,1,`div`,41)(1,HM,5,0,`div`,41),e&2&&F(+!K().page().navigations.length)}var WM=[`recognize`,`guards`,`resolve`,`activate`],GM={recognize:`#60a5fa`,guards:`#f59e0b`,resolve:`#2dd4bf`,activate:`#34d399`},KM=class e{page=$.required();rpc=$(null);maxNavigations=Q(()=>jE(this.rpc()).limits.navigations);navigationAllowed=Q(()=>ME(this.rpc(),`router`));navigationOff=iE(`router`);phases=WM;pageId=Q(()=>this.page().pageId);filter=Fv({source:this.pageId,computation:()=>``});onlyProblems=Fv({source:this.pageId,computation:()=>!1});message=Fv({source:this.pageId,computation:()=>``});loops=Q(()=>this.page().loops??[]);loopById=Q(()=>{let e=new Map;for(let t of this.loops())for(let n of t.ids)e.set(n,t);return e});items=Q(()=>{let e=this.filter().toLowerCase();return[...this.page().navigations].reverse().filter(t=>(!e||t.url.toLowerCase().includes(e)||!!t.finalUrl?.toLowerCase().includes(e))&&(!this.onlyProblems()||this.isProblem(t)))});isProblem(e){return e.probe?!1:![`succeeded`,`pending`].includes(e.outcome)||this.loopById().has(e.id)}loopOf(e){return this.loopById().get(e.id)}loopTitle(e){return e.kind===`burst`?`navigation loop`:`redirect loop`}hopsOf(e,t){return e.hops.filter(e=>e.id===t.id)}hopCause(e){return e.via===`navigate`?`#${e.id} started by ${e.by??`code`}`:`${e.via===`redirectTo`?`config`:`${e.via} redirect`}${e.by?` ${e.by}`:e.via===`redirectTo`?` redirectTo`:``} in #${e.id}`}loopMeta(e){let t=e.ids.length>1?`Navigations #${e.ids[0]} to #${e.ids[e.ids.length-1]}`:`Navigation #${e.ids[0]}`,n=e.bounces>1?`, came back ${e.bounces} times`:``,r=e.guards.length?` Guards involved: ${e.guards.join(`, `)}.`:``;return`${t}${n}; ${e.end}.${r}`}reasonText(e){return[e.code,e.reason].filter(Boolean).join(`: `)}clearFilters(){this.filter.set(``),this.onlyProblems.set(!1)}tone(e){return RA(e)}color(e){return GM[e]}bars(e){let t=e.phases?.total;return t?WM.filter(t=>(e.phases?.[t]??0)>0).map(n=>({phase:n,ms:e.phases[n],width:Math.max(1,e.phases[n]/t*100)})):[]}barLabel(e){return`Phases: ${this.bars(e).map(e=>`${e.phase} ${e.ms}ms`).join(`, `)}`}guardResult(e){let t=e.guards?.passed;return t===!0?`passed`:t===!1?e.outcome===`redirected`?`redirected`:`blocked`:e.outcome===`pending`?`running`:`did not finish, navigation ${e.outcome}`}isBad(e){return e===`false`||/^(UrlTree|RedirectCommand|threw)/.test(e)}time=tO;instrumentSeq=0;async toggleInstrument(e){let t=e.target,n=t.checked,r=this.pageId(),i=++this.instrumentSeq,a=await LA(this.rpc(),r,{action:`instrument`,on:n});if(i===this.instrumentSeq){if(r!==this.pageId()){t.checked=!!this.page().instrumented;return}if(a.error){t.checked=!!this.page().instrumented,this.message.set(String(a.error));return}this.message.set(n?`Recording each guard and resolver.`:`Stopped recording guards and resolvers.`)}}replayable(e){return FA(e.url)}replayNote(e){return this.navigationAllowed()?this.replayable(e)?null:`replay-note-${e.id}`:`route-timeline-writes-off`}async replay(e){this.message.set(`Replaying #${e.id}…`);let t=this.pageId(),n=await LA(this.rpc(),t,{action:`replay`,id:e.id});if(t!==this.pageId())return;if(n.error){this.message.set(String(n.error));return}let r=n.replay;this.message.set(`Replay of #${e.id}: ${r?.outcome??`unknown`}${n.same?` (same as before)`:` (different from before)`}.`)}async copy(e){let t=this.pageId(),n=await PA(this.rpc(),`router-export`,{pageId:t,id:e.id});if(t===this.pageId()){if(!n){this.message.set(`Could not build the repro.`);return}try{await navigator.clipboard.writeText(n),t===this.pageId()&&this.message.set(`Copied a markdown repro of #${e.id}.`)}catch{t===this.pageId()&&this.message.set(`The clipboard is not available here.`)}}}async clearNavigations(){let e=this.rpc(),t=this.pageId(),n=`Clearing navigations…`;this.message.set(n);let r;try{if(!e)throw Error(`No connection`);await gE(e,`clear-router-navigations`,t),r=`Navigations cleared.`}catch{r=`Could not clear the navigations.`}t===this.pageId()?this.message.set(r):this.message()===n&&this.message.set(``)}exportJson(){let e=new Blob([JSON.stringify(this.page().navigations,null,2)],{type:`application/json`}),t=URL.createObjectURL(e),n=document.createElement(`a`);n.href=t,n.download=`navigations-${this.page().pageId}.json`,n.click(),URL.revokeObjectURL(t)}static ɵfac=function(t){return new(t||e)};static ɵcmp=Wh({type:e,selectors:[[`app-route-timeline`]],inputs:{page:[1,`page`],rpc:[1,`rpc`]},decls:21,vars:12,consts:[[`filterInput`,``],[1,`toolbar`],[`type`,`search`,`aria-label`,`Filter navigations by URL`,`placeholder`,`Filter by URL`,1,`field`,3,`input`,`keydown.escape`,`value`],[1,`check`],[`type`,`checkbox`,3,`change`,`checked`],[`type`,`button`,1,`small`,`export`,3,`click`],[`type`,`button`,`aria-label`,`Clear navigations`,1,`small`,3,`click`,`disabled`],[`role`,`status`,1,`visually-hidden`],[`aria-hidden`,`true`,1,`message`],[`id`,`route-timeline-writes-off`,1,`message`],[`what`,`navigations`,`limit`,`navigations`,3,`dropped`,`max`],[`aria-labelledby`,`loops-heading`,1,`loops`],[`id`,`loops-heading`],[1,`loop`],[1,`chain`],[`data-tone`,`bad`,1,`badge`],[1,`hops`],[1,`muted`,`loop-meta`],[`aria-hidden`,`true`,1,`arrow`],[1,`visually-hidden`],[1,`meta-row`],[1,`muted`,`count`],[`aria-hidden`,`true`,1,`legend`],[1,`navs`],[3,`in-loop`],[1,`head`],[1,`id`],[1,`url`],[1,`meta`],[1,`badge`],[1,`muted`],[1,`muted`,`ms`],[1,`tag`],[`role`,`img`,1,`bar`],[1,`details`],[1,`actions`],[`type`,`button`,1,`small`,3,`click`,`disabled`],[`type`,`button`,1,`small`,3,`click`],[1,`muted`,`replay-note`,3,`id`],[3,`width`,`background`],[1,`reason`],[1,`empty`],[1,`empty-title`]],template:function(e,t){e&1&&(z(0,`div`,1)(1,`input`,2,0),G(`input`,function(e){return t.filter.set(e.target.value)})(`keydown.escape`,function(){return t.filter.set(``)}),B(),z(3,`label`,3)(4,`input`,4),G(`change`,function(e){return t.onlyProblems.set(e.target.checked)}),B(),J(5,` Only problems `),B(),z(6,`label`,3)(7,`input`,4),G(`change`,function(e){return t.toggleInstrument(e)}),B(),J(8,` Record each guard and resolver `),B(),z(9,`button`,5),G(`click`,function(){return t.exportJson()}),J(10,`Export JSON`),B(),z(11,`button`,6),G(`click`,function(){return t.clearNavigations()}),J(12,` Clear `),B()(),z(13,`p`,7),J(14),B(),P(15,Qj,2,1,`p`,8),P(16,$j,2,1,`p`,9),V(17,`app-limit-note`,10),P(18,iM,5,1,`section`,11),P(19,BM,9,2)(20,UM,2,1)),e&2&&(M(),R(`value`,t.filter()),M(3),R(`checked`,t.onlyProblems()),M(3),R(`checked`,t.page().instrumented),M(4),R(`disabled`,!t.navigationAllowed()),N(`aria-describedby`,t.navigationAllowed()?null:`route-timeline-writes-off`),M(3),Y(t.message()),M(),F(t.message()?15:-1),M(),F(t.navigationAllowed()?-1:16),M(),R(`dropped`,t.page().dropped??0)(`max`,t.maxNavigations()),M(),F(t.loops().length?18:-1),M(),F(t.items().length?19:20))},dependencies:[oO],styles:[`.muted[_ngcontent-%COMP%] {
   color: var(--%NS%text-2);
   font-size: 13px;
   line-height: 1.5;
@@ -3328,7 +3589,7 @@ time[_ngcontent-%COMP%] {
   .export[_ngcontent-%COMP%] {
     margin-left: 0;
   }
-}`]})},vM=[`urlInput`],yM=()=>[],bM=(e,t)=>t.node.id;function xM(e,t){if(e&1&&(J(0,` with `),z(1,`code`),J(2),yv(3,`json`),B()),e&2){K(2);let e=fv(0);M(2),Y(xv(3,1,e.params))}}function SM(e,t){if(e&1&&(z(0,`span`,19),J(1,`match`),B(),J(2,` Matches `),z(3,`code`,20),J(4),B(),P(5,xM,4,3)),e&2){K();let e=fv(0),t=K();M(4),Y(t.chainText(e)),M(),F(t.hasKeys(e.params)?5:-1)}}function CM(e,t){if(e&1&&(J(0,` Nearest: `),z(1,`code`),J(2),B()),e&2){K(2);let e=fv(0);M(2),Y(e.nearest.join(`, `))}}function wM(e,t){if(e&1&&(z(0,`span`,21),J(1,`no match`),B(),J(2,` Matches no route (NG04002). `),P(3,CM,3,1)),e&2){K();let e=fv(0);M(3),F(e.nearest.length?3:-1)}}function TM(e,t){if(e&1&&(z(0,`div`,18),J(1),B()),e&2){let e=t.$implicit;M(),Y(e)}}function EM(e,t){if(e&1&&(uv(0),z(1,`div`,8)(2,`span`,17),J(3,`Result for `),z(4,`code`),J(5),B(),J(6,`:`),B(),P(7,SM,6,2)(8,wM,4,1),I(9,TM,2,1,`div`,18,Og),B()),e&2){let e=t,n=dv(e.result);M(),N(`data-matched`,n.matched),M(4),Y(e.url),M(2),F(n.matched?7:8),M(2),L(n.notes)}}function DM(e,t){if(e&1&&(z(0,`p`,9),J(1),B()),e&2){let e=K();M(),Y(e.message())}}function OM(e,t){if(e&1&&(z(0,`p`,11),J(1),B()),e&2){let e=K();M(),Y(e.navigationOff)}}function kM(e,t){if(e&1&&(z(0,`span`,22),J(1),B(),J(2,`. `)),e&2){let e=K(2);M(),Y(e.countText())}}function AM(e,t){e&1&&J(0),e&2&&X(` `,K(2).rows().length,` route(s). `)}function jM(e,t){e&1&&J(0),e&2&&X(` `,t,` route(s) left out: the page lists at most 200 routes per level and 1000 in total. `)}function MM(e,t){if(e&1&&(z(0,`p`,14),J(1),P(2,kM,3,1)(3,AM,1,1),J(4,` Lazy routes show their children once loaded. `),P(5,jM,1,1),B()),e&2){let e,t=K();M(),X(` Generation `,t.page().generation,` · `),M(),F(t.filter()?2:3),M(3),F((e=t.page().configTruncated)?5:-1,e)}}function NM(e,t){if(e&1&&(z(0,`div`,15)(1,`p`,23),J(2),B(),z(3,`p`,18),J(4),B()()),e&2){let e=K();M(2),X(` `,e.page().setup?.mode===`events-only`?`This build has no debug utils, so the live config cannot be read.`:`The page has not reported its route config yet.`,` `),M(2),X(` `,e.page().setup?.mode===`events-only`?`Run the app with the development build to inspect the live config.`:`It appears once the router initializes. Navigate in the app if it stays empty.`,` `)}}function PM(e,t){if(e&1){let e=W();z(0,`div`,15)(1,`p`,23),J(2,`No routes match the filter.`),B(),z(3,`p`,18),J(4,`Try a shorter path or a component name.`),B(),z(5,`button`,24),G(`click`,function(){O(e);let t=K(),n=u_(16);return t.setFilter(``),k(n.focus())}),J(6,` Clear filter `),B()()}}function FM(e,t){e&1&&(z(0,`span`,28),J(1,`active`),B())}function IM(e,t){if(e&1&&(z(0,`span`,28),J(1),B()),e&2){let e=K().$implicit;M(),X(`lazy `,e.node.lazy)}}function LM(e,t){if(e&1&&(z(0,`span`,28),J(1),B()),e&2){let e=K().$implicit;M(),X(`outlet `,e.node.outlet)}}function RM(e,t){if(e&1&&(z(0,`span`,29)(1,`span`,26),J(2,`declared in `),B(),V(3,`app-source-link`,35),B()),e&2){let e=K().$implicit;M(3),R(`file`,e.at.file)(`line`,e.at.line)}}function zM(e,t){if(e&1&&(z(0,`span`,30),J(1,`redirect `),z(2,`span`,36),J(3,`→`),B(),z(4,`code`),J(5),B()()),e&2){let e=K().$implicit;M(5),Y(e.node.redirectTo)}}function BM(e,t){if(e&1&&J(0),e&2){let e=K().$implicit;X(` `,e.node.component??(e.node.lazy===`unloaded`?`lazy, not loaded yet`:e.node.kind),` `)}}function VM(e,t){if(e&1&&(z(0,`span`,28),J(1),B()),e&2){let e=t.$implicit;M(),Y(e)}}function HM(e,t){if(e&1&&(z(0,`span`,28),J(1),B()),e&2){let e=t.$implicit;M(),X(`resolve `,e)}}function UM(e,t){e&1&&(z(0,`span`,37),J(1,`–`),B(),z(2,`span`,26),J(3,`none`),B())}function WM(e,t){if(e&1&&J(0),e&2){let e=K().$implicit;X(` `,e.node.title,` `)}}function GM(e,t){e&1&&(z(0,`span`,37),J(1,`–`),B(),z(2,`span`,26),J(3,`none`),B())}function KM(e,t){if(e&1){let e=W();z(0,`input`,39),G(`input`,function(t){let n=O(e).$implicit,r=K(2).$implicit;return k(K(2).setParam(r.node.id,n,t.target.value))}),B()}if(e&2){let e=t.$implicit,n=K(2).$implicit,r=K(2);R(`placeholder`,e)(`value`,r.paramValues()[n.node.id]?.[e]??``),N(`aria-label`,e+` for `+n.node.fullPath)(`aria-invalid`,r.isInvalid(n.node,e)?`true`:null)(`aria-describedby`,r.isInvalid(n.node,e)?`route-tree-row-result`:null)}}function qM(e,t){if(e&1){let e=W();I(0,KM,1,5,`input`,38,Og),z(2,`button`,7),G(`click`,function(){O(e);let t=K().$implicit,n=u_(1);return k(K(2).navigate(t.node,n))}),J(3,` Go `),B()}if(e&2){let e=K().$implicit,t=K(2);L(t.params(e.node)),M(2),R(`disabled`,!t.navigationAllowed()),N(`aria-describedby`,t.navigationAllowed()?null:`route-tree-writes-off`)(`aria-label`,`Navigate to `+e.node.fullPath)}}function JM(e,t){if(e&1){let e=W();z(0,`button`,24),G(`click`,function(){O(e);let t=K().$implicit;return k(K(2).resolveLazy(t.node))}),J(1,` Read lazy `),B()}if(e&2){let e=K().$implicit;N(`aria-label`,`Read lazy routes of `+e.node.fullPath)}}function YM(e,t){if(e&1&&(z(0,`tr`,34)(1,`td`,40)(2,`p`,41),J(3),B()()()),e&2){let e=K(3);M(3),Y(e.rowResult()?.text)}}function XM(e,t){if(e&1&&(z(0,`tr`,null,2)(2,`td`,27),J(3),P(4,FM,2,0,`span`,28),P(5,IM,2,1,`span`,28),P(6,LM,2,1,`span`,28),P(7,RM,4,2,`span`,29),B(),z(8,`td`),P(9,zM,6,1,`span`,30)(10,BM,1,1),B(),z(11,`td`),I(12,VM,2,1,`span`,28,Dg),I(14,HM,2,1,`span`,28,Og),P(16,UM,4,0),B(),z(17,`td`),P(18,WM,1,1)(19,GM,4,0),B(),z(20,`td`,31)(21,`div`,32),P(22,qM,4,3),P(23,JM,2,1,`button`,33),B()()(),P(24,YM,4,1,`tr`,34)),e&2){let e=t.$implicit,n=K(2);q(`active`,n.isActive(e.node)),M(2),j_(`padding-left`,14+e.depth*16,`px`),M(),X(` `,e.node.fullPath,` `),M(),F(n.isActive(e.node)?4:-1),M(),F(e.node.lazy?5:-1),M(),F(e.node.outlet?6:-1),M(),F(e.at?7:-1),M(2),F(e.node.redirectTo===void 0?10:9),M(3),L(n.guardList(e.node)),M(2),L(e.node.resolvers??mv(15,yM)),M(2),F(!n.guardList(e.node).length&&!e.node.resolvers?.length?16:-1),M(2),F(e.node.title?18:19),M(4),F(n.canNavigate(e.node)?22:-1),M(),F(e.node.kind===`lazy`&&e.node.lazy===`unloaded`?23:-1),M(),F(n.rowResult()?.id===e.node.id?24:-1)}}function ZM(e,t){if(e&1&&(z(0,`div`,16)(1,`table`)(2,`thead`)(3,`tr`)(4,`th`,25),J(5,`Path`),B(),z(6,`th`,25),J(7,`Target`),B(),z(8,`th`,25),J(9,`Guards and resolvers`),B(),z(10,`th`,25),J(11,`Title`),B(),z(12,`th`,25)(13,`span`,26),J(14,`Actions`),B()()()(),z(15,`tbody`),I(16,XM,25,16,null,null,bM),B()()()),e&2){let e=K();M(16),L(e.rows())}}function QM(e,t){return`${e} of ${t} ${t===1?`route`:`routes`}`}var $M=class e{page=$.required();rpc=$(null);navigationAllowed=Q(()=>AE(this.rpc(),`router`));navigationOff=nE(`router`);sources=$([]);filter=j(``);testUrl=j(``);pageId=Q(()=>this.page().pageId);match=Nv({source:this.pageId,computation:()=>null});message=Nv({source:this.pageId,computation:()=>``});rowResult=Nv({source:this.pageId,computation:()=>null});paramValues=Nv({source:this.pageId,computation:()=>({})});checkedRow=Nv({source:this.pageId,computation:()=>null});filterAnnouncement=Nv({source:this.pageId,computation:()=>``});predictSeq=0;announceFlip=!1;probeSeq=0;urlInput=Kv(`urlInput`);active=Q(()=>new Set(this.page().activeIds??[]));rows=Q(()=>{let e=this.filter().toLowerCase(),t=this.sources(),n=[],r=(i,a)=>{for(let o of i){let i=iA(o,t),s=i&&rA(i);(!e||o.fullPath.toLowerCase().includes(e)||o.component?.toLowerCase().includes(e)||s?.toLowerCase().includes(e))&&n.push({node:o,depth:a,source:s,at:i}),o.children&&r(o.children,a+1)}};return r(this.page().config??[],0),n});total=Q(()=>{let e=t=>t.reduce((t,n)=>t+1+e(n.children??[]),0);return e(this.page().config??[])});countText=Q(()=>QM(this.rows().length,this.total()));setFilter(e){this.filter.set(e);let t=this.rows().length,n=e?t?`${QM(t,this.total())} match.`:`No routes match.`:``;this.announceFlip=!this.announceFlip,this.filterAnnouncement.set(n&&(this.announceFlip?`${n}\u00a0`:n))}hasKeys(e){return Object.keys(e).length>0}isActive(e){return this.active().has(e.id)}guardList(e){return Object.entries(e.guards??{}).flatMap(([e,t])=>t.map(t=>`${e} ${t}`))}params(e){return(e.fullPath.match(/:([A-Za-z0-9_]+)/g)??[]).map(e=>e.slice(1))}canNavigate(e){return e.redirectTo===void 0&&!e.matcher&&!e.outlet&&!e.fullPath.includes(`**`)&&(!!e.component||e.kind===`component`||e.kind===`lazy`)}setParam(e,t,n){this.paramValues.update(r=>({...r,[e]:{...r[e],[t]:n}}))}missingParams(e){let t=this.paramValues()[e.id]??{};return this.params(e).filter(e=>!t[e])}isInvalid(e,t){return this.checkedRow()===e.id&&!this.paramValues()[e.id]?.[t]}chainText(e){return e.chain.map(e=>e.fullPath).join(` → `)}editUrl(e){this.testUrl.set(e),this.predictSeq++,this.probeSeq++,this.match.set(null),this.message.set(``)}askForUrl(e){this.match.set(null),this.message.set(`Type a URL to ${e}, for example /users/42.`),this.urlInput()?.nativeElement.focus()}async predict(){let e=this.testUrl().trim(),t=++this.predictSeq;if(!e){this.askForUrl(`predict`);return}let n=this.pageId(),r=await aA(this.rpc(),`router-match`,{pageId:n,url:e});t===this.predictSeq&&n===this.pageId()&&(this.match.set(r&&{url:e,result:r}),r?this.message()===`Could not reach the page.`&&this.message.set(``):this.message.set(sA))}async probe(){let e=this.testUrl().trim(),t=++this.probeSeq;if(!e){this.askForUrl(`probe`);return}this.message.set(`Running the real matcher in the app…`);let n=this.pageId(),r=await cA(this.rpc(),n,{action:`probe`,url:e});if(t===this.probeSeq&&n===this.pageId()){if(r.error){this.message.set(String(r.error));return}this.message.set(r.matched?`The app recognized ${e} and its canMatch guards passed. The probe stopped before canActivate guards and resolvers, so those did not run. See the probe entry in Navigations.`:typeof r.redirectedTo==`string`?`A canMatch guard or the navigation error handler redirected ${e} to ${r.redirectedTo}. The probe stopped that navigation before it rendered anything.`:`The app could not recognize ${e}: ${String(r.reason??``)}`)}}async navigate(e,t){let n=this.missingParams(e);if(n.length){this.checkedRow.set(e.id),this.rowResult.set({id:e.id,text:`Fill in ${n.map(e=>`:${e}`).join(`, `)} to navigate.`}),Array.from(t?.querySelectorAll(`input.param`)??[]).find(e=>!e.value)?.focus();return}this.checkedRow.set(null),this.rowResult.set({id:e.id,text:`Navigating to ${e.fullPath}…`});let r=this.pageId(),i=await cA(this.rpc(),r,{action:`navigate`,pattern:e.fullPath,params:this.paramValues()[e.id]??{}});r===this.pageId()&&this.rowResult.set({id:e.id,text:i.error?String(i.error):`Navigation #${i.id}: ${i.outcome}${i.finalUrl?` at ${i.finalUrl}`:``}.`})}async resolveLazy(e){let t=this.pageId(),n=await cA(this.rpc(),t,{action:`resolve-lazy`,id:e.id});if(t!==this.pageId())return;if(n.error){this.rowResult.set({id:e.id,text:String(n.error)});return}let r=n.routes??[];this.rowResult.set({id:e.id,text:`${e.fullPath} declares ${r.length} route(s): ${r.map(e=>`/${e.path}`).join(`, `)}. The router loads them for real on the first navigation that needs them.`})}static ɵfac=function(t){return new(t||e)};static ɵcmp=Wh({type:e,selectors:[[`app-route-tree`]],viewQuery:function(e,t){e&1&&c_(t.urlInput,vM,5),e&2&&l_()},inputs:{page:[1,`page`],rpc:[1,`rpc`],sources:[1,`sources`]},decls:23,vars:11,consts:[[`urlInput`,``],[`filterInput`,``],[`rowEl`,``],[1,`test`,3,`submit`],[`for`,`test-url`],[`id`,`test-url`,`type`,`text`,`placeholder`,`/users/42`,1,`field`,3,`input`,`value`],[`type`,`submit`,1,`small`,`primary`],[`type`,`button`,1,`small`,3,`click`,`disabled`],[`role`,`status`,1,`result`],[`role`,`status`,1,`message`],[`role`,`status`,1,`visually-hidden`],[`id`,`route-tree-writes-off`,1,`message`],[1,`filter-row`],[`type`,`search`,`aria-label`,`Filter routes`,`placeholder`,`Filter by path, component or file`,1,`field`,`filter`,3,`input`,`keydown.escape`,`value`],[1,`muted`,`summary`],[1,`empty`],[`role`,`region`,`aria-label`,`Live route config`,`tabindex`,`0`,1,`table-scroll`],[1,`for`],[1,`muted`],[`data-tone`,`good`,1,`badge`],[1,`chain`],[`data-tone`,`bad`,1,`badge`],[1,`count`],[1,`empty-title`],[`type`,`button`,1,`small`,3,`click`],[`scope`,`col`],[1,`visually-hidden`],[1,`path`],[1,`tag`],[1,`src`],[1,`redirect`],[1,`actions`],[1,`actions-inner`],[`type`,`button`,1,`small`],[1,`row-result`],[3,`file`,`line`],[`aria-hidden`,`true`],[`aria-hidden`,`true`,1,`nil`],[`type`,`text`,1,`field`,`param`,3,`placeholder`,`value`],[`type`,`text`,1,`field`,`param`,3,`input`,`placeholder`,`value`],[`colspan`,`5`],[`id`,`route-tree-row-result`]],template:function(e,t){if(e&1){let e=W();z(0,`form`,3),G(`submit`,function(n){return O(e),n.preventDefault(),k(t.predict())}),z(1,`label`,4),J(2,`Test a URL`),B(),z(3,`input`,5,0),G(`input`,function(e){return t.editUrl(e.target.value)}),B(),z(5,`button`,6),J(6,`Predict`),B(),z(7,`button`,7),G(`click`,function(){return t.probe()}),J(8,` Probe in app `),B()(),P(9,EM,11,4,`div`,8),P(10,DM,2,1,`p`,9),z(11,`p`,10),J(12),B(),P(13,OM,2,1,`p`,11),z(14,`div`,12)(15,`input`,13,1),G(`input`,function(e){return t.setFilter(e.target.value)})(`keydown.escape`,function(){return t.setFilter(``)}),B(),P(17,MM,6,3,`p`,14),B(),z(18,`p`,10),J(19),B(),P(20,NM,5,2,`div`,15)(21,PM,7,0,`div`,15)(22,ZM,18,0,`div`,16)}if(e&2){let e;M(3),R(`value`,t.testUrl()),M(4),R(`disabled`,!t.navigationAllowed()),N(`aria-describedby`,t.navigationAllowed()?null:`route-tree-writes-off`),M(2),F((e=t.match())?9:-1,e),M(),F(t.message()?10:-1),M(2),Y(t.rowResult()?.text),M(),F(t.navigationAllowed()?-1:13),M(2),R(`value`,t.filter()),M(2),F(t.page().config?17:-1),M(2),Y(t.filterAnnouncement()),M(),F(t.page().config?t.rows().length?22:21:20)}},dependencies:[TO,pb],styles:[`.muted[_ngcontent-%COMP%] {
+}`]})},qM=[`urlInput`],JM=()=>[],YM=(e,t)=>t.node.id;function XM(e,t){if(e&1&&(J(0,` with `),z(1,`code`),J(2),xv(3,`json`),B()),e&2){K(2);let e=fv(0);M(2),Y(Cv(3,1,e.params))}}function ZM(e,t){if(e&1&&(z(0,`span`,19),J(1,`match`),B(),J(2,` Matches `),z(3,`code`,20),J(4),B(),P(5,XM,4,3)),e&2){K();let e=fv(0),t=K();M(4),Y(t.chainText(e)),M(),F(t.hasKeys(e.params)?5:-1)}}function QM(e,t){if(e&1&&(J(0,` Nearest: `),z(1,`code`),J(2),B()),e&2){K(2);let e=fv(0);M(2),Y(e.nearest.join(`, `))}}function $M(e,t){if(e&1&&(z(0,`span`,21),J(1,`no match`),B(),J(2,` Matches no route (NG04002). `),P(3,QM,3,1)),e&2){K();let e=fv(0);M(3),F(e.nearest.length?3:-1)}}function eN(e,t){if(e&1&&(z(0,`div`,18),J(1),B()),e&2){let e=t.$implicit;M(),Y(e)}}function tN(e,t){if(e&1&&(uv(0),z(1,`div`,8)(2,`span`,17),J(3,`Result for `),z(4,`code`),J(5),B(),J(6,`:`),B(),P(7,ZM,6,2)(8,$M,4,1),I(9,eN,2,1,`div`,18,Og),B()),e&2){let e=t,n=dv(e.result);M(),N(`data-matched`,n.matched),M(4),Y(e.url),M(2),F(n.matched?7:8),M(2),L(n.notes)}}function nN(e,t){if(e&1&&(z(0,`p`,9),J(1),B()),e&2){let e=K();M(),Y(e.message())}}function rN(e,t){if(e&1&&(z(0,`p`,11),J(1),B()),e&2){let e=K();M(),Y(e.navigationOff)}}function iN(e,t){if(e&1&&(z(0,`span`,22),J(1),B(),J(2,`. `)),e&2){let e=K(2);M(),Y(e.countText())}}function aN(e,t){e&1&&J(0),e&2&&X(` `,K(2).rows().length,` route(s). `)}function oN(e,t){e&1&&J(0),e&2&&X(` `,t,` route(s) left out: the page lists at most 200 routes per level and 1000 in total. `)}function sN(e,t){if(e&1&&(z(0,`p`,14),J(1),P(2,iN,3,1)(3,aN,1,1),J(4,` Lazy routes show their children once loaded. `),P(5,oN,1,1),B()),e&2){let e,t=K();M(),X(` Generation `,t.page().generation,` · `),M(),F(t.filter()?2:3),M(3),F((e=t.page().configTruncated)?5:-1,e)}}function cN(e,t){if(e&1&&(z(0,`div`,15)(1,`p`,23),J(2),B(),z(3,`p`,18),J(4),B()()),e&2){let e=K();M(2),X(` `,e.page().setup?.mode===`events-only`?`This build has no debug utils, so the live config cannot be read.`:`The page has not reported its route config yet.`,` `),M(2),X(` `,e.page().setup?.mode===`events-only`?`Run the app with the development build to inspect the live config.`:`It appears once the router initializes. Navigate in the app if it stays empty.`,` `)}}function lN(e,t){if(e&1){let e=W();z(0,`div`,15)(1,`p`,23),J(2,`No routes match the filter.`),B(),z(3,`p`,18),J(4,`Try a shorter path or a component name.`),B(),z(5,`button`,24),G(`click`,function(){O(e);let t=K(),n=u_(16);return t.setFilter(``),k(n.focus())}),J(6,` Clear filter `),B()()}}function uN(e,t){e&1&&(z(0,`span`,28),J(1,`active`),B())}function dN(e,t){if(e&1&&(z(0,`span`,28),J(1),B()),e&2){let e=K().$implicit;M(),X(`lazy `,e.node.lazy)}}function fN(e,t){if(e&1&&(z(0,`span`,28),J(1),B()),e&2){let e=K().$implicit;M(),X(`outlet `,e.node.outlet)}}function pN(e,t){if(e&1&&(z(0,`span`,29)(1,`span`,26),J(2,`declared in `),B(),V(3,`app-source-link`,35),B()),e&2){let e=K().$implicit;M(3),R(`file`,e.at.file)(`line`,e.at.line)}}function mN(e,t){if(e&1&&(z(0,`span`,30),J(1,`redirect `),z(2,`span`,36),J(3,`→`),B(),z(4,`code`),J(5),B()()),e&2){let e=K().$implicit;M(5),Y(e.node.redirectTo)}}function hN(e,t){if(e&1&&J(0),e&2){let e=K().$implicit;X(` `,e.node.component??(e.node.lazy===`unloaded`?`lazy, not loaded yet`:e.node.kind),` `)}}function gN(e,t){if(e&1&&(z(0,`span`,28),J(1),B()),e&2){let e=t.$implicit;M(),Y(e)}}function _N(e,t){if(e&1&&(z(0,`span`,28),J(1),B()),e&2){let e=t.$implicit;M(),X(`resolve `,e)}}function vN(e,t){e&1&&(z(0,`span`,37),J(1,`–`),B(),z(2,`span`,26),J(3,`none`),B())}function yN(e,t){if(e&1&&J(0),e&2){let e=K().$implicit;X(` `,e.node.title,` `)}}function bN(e,t){e&1&&(z(0,`span`,37),J(1,`–`),B(),z(2,`span`,26),J(3,`none`),B())}function xN(e,t){if(e&1){let e=W();z(0,`input`,39),G(`input`,function(t){let n=O(e).$implicit,r=K(2).$implicit;return k(K(2).setParam(r.node.id,n,t.target.value))}),B()}if(e&2){let e=t.$implicit,n=K(2).$implicit,r=K(2);R(`placeholder`,e)(`value`,r.paramValues()[n.node.id]?.[e]??``),N(`aria-label`,e+` for `+n.node.fullPath)(`aria-invalid`,r.isInvalid(n.node,e)?`true`:null)(`aria-describedby`,r.isInvalid(n.node,e)?`route-tree-row-result`:null)}}function SN(e,t){if(e&1){let e=W();I(0,xN,1,5,`input`,38,Og),z(2,`button`,7),G(`click`,function(){O(e);let t=K().$implicit,n=u_(1);return k(K(2).navigate(t.node,n))}),J(3,` Go `),B()}if(e&2){let e=K().$implicit,t=K(2);L(t.params(e.node)),M(2),R(`disabled`,!t.navigationAllowed()),N(`aria-describedby`,t.navigationAllowed()?null:`route-tree-writes-off`)(`aria-label`,`Navigate to `+e.node.fullPath)}}function CN(e,t){if(e&1){let e=W();z(0,`button`,24),G(`click`,function(){O(e);let t=K().$implicit;return k(K(2).resolveLazy(t.node))}),J(1,` Read lazy `),B()}if(e&2){let e=K().$implicit;N(`aria-label`,`Read lazy routes of `+e.node.fullPath)}}function wN(e,t){if(e&1&&(z(0,`tr`,34)(1,`td`,40)(2,`p`,41),J(3),B()()()),e&2){let e=K(3);M(3),Y(e.rowResult()?.text)}}function TN(e,t){if(e&1&&(z(0,`tr`,null,2)(2,`td`,27),J(3),P(4,uN,2,0,`span`,28),P(5,dN,2,1,`span`,28),P(6,fN,2,1,`span`,28),P(7,pN,4,2,`span`,29),B(),z(8,`td`),P(9,mN,6,1,`span`,30)(10,hN,1,1),B(),z(11,`td`),I(12,gN,2,1,`span`,28,Dg),I(14,_N,2,1,`span`,28,Og),P(16,vN,4,0),B(),z(17,`td`),P(18,yN,1,1)(19,bN,4,0),B(),z(20,`td`,31)(21,`div`,32),P(22,SN,4,3),P(23,CN,2,1,`button`,33),B()()(),P(24,wN,4,1,`tr`,34)),e&2){let e=t.$implicit,n=K(2);q(`active`,n.isActive(e.node)),M(2),j_(`padding-left`,14+e.depth*16,`px`),M(),X(` `,e.node.fullPath,` `),M(),F(n.isActive(e.node)?4:-1),M(),F(e.node.lazy?5:-1),M(),F(e.node.outlet?6:-1),M(),F(e.at?7:-1),M(2),F(e.node.redirectTo===void 0?10:9),M(3),L(n.guardList(e.node)),M(2),L(e.node.resolvers??mv(15,JM)),M(2),F(!n.guardList(e.node).length&&!e.node.resolvers?.length?16:-1),M(2),F(e.node.title?18:19),M(4),F(n.canNavigate(e.node)?22:-1),M(),F(e.node.kind===`lazy`&&e.node.lazy===`unloaded`?23:-1),M(),F(n.rowResult()?.id===e.node.id?24:-1)}}function EN(e,t){if(e&1&&(z(0,`div`,16)(1,`table`)(2,`thead`)(3,`tr`)(4,`th`,25),J(5,`Path`),B(),z(6,`th`,25),J(7,`Target`),B(),z(8,`th`,25),J(9,`Guards and resolvers`),B(),z(10,`th`,25),J(11,`Title`),B(),z(12,`th`,25)(13,`span`,26),J(14,`Actions`),B()()()(),z(15,`tbody`),I(16,TN,25,16,null,null,YM),B()()()),e&2){let e=K();M(16),L(e.rows())}}function DN(e,t){return`${e} of ${t} ${t===1?`route`:`routes`}`}var ON=class e{page=$.required();rpc=$(null);navigationAllowed=Q(()=>ME(this.rpc(),`router`));navigationOff=iE(`router`);sources=$([]);filter=j(``);testUrl=j(``);pageId=Q(()=>this.page().pageId);match=Fv({source:this.pageId,computation:()=>null});message=Fv({source:this.pageId,computation:()=>``});rowResult=Fv({source:this.pageId,computation:()=>null});paramValues=Fv({source:this.pageId,computation:()=>({})});checkedRow=Fv({source:this.pageId,computation:()=>null});filterAnnouncement=Fv({source:this.pageId,computation:()=>``});predictSeq=0;announceFlip=!1;probeSeq=0;urlInput=Jv(`urlInput`);active=Q(()=>new Set(this.page().activeIds??[]));rows=Q(()=>{let e=this.filter().toLowerCase(),t=this.sources(),n=[],r=(i,a)=>{for(let o of i){let i=NA(o,t),s=i&&MA(i);(!e||o.fullPath.toLowerCase().includes(e)||o.component?.toLowerCase().includes(e)||s?.toLowerCase().includes(e))&&n.push({node:o,depth:a,source:s,at:i}),o.children&&r(o.children,a+1)}};return r(this.page().config??[],0),n});total=Q(()=>{let e=t=>t.reduce((t,n)=>t+1+e(n.children??[]),0);return e(this.page().config??[])});countText=Q(()=>DN(this.rows().length,this.total()));setFilter(e){this.filter.set(e);let t=this.rows().length,n=e?t?`${DN(t,this.total())} match.`:`No routes match.`:``;this.announceFlip=!this.announceFlip,this.filterAnnouncement.set(n&&(this.announceFlip?`${n}\u00a0`:n))}hasKeys(e){return Object.keys(e).length>0}isActive(e){return this.active().has(e.id)}guardList(e){return Object.entries(e.guards??{}).flatMap(([e,t])=>t.map(t=>`${e} ${t}`))}params(e){return(e.fullPath.match(/:([A-Za-z0-9_]+)/g)??[]).map(e=>e.slice(1))}canNavigate(e){return e.redirectTo===void 0&&!e.matcher&&!e.outlet&&!e.fullPath.includes(`**`)&&(!!e.component||e.kind===`component`||e.kind===`lazy`)}setParam(e,t,n){this.paramValues.update(r=>({...r,[e]:{...r[e],[t]:n}}))}missingParams(e){let t=this.paramValues()[e.id]??{};return this.params(e).filter(e=>!t[e])}isInvalid(e,t){return this.checkedRow()===e.id&&!this.paramValues()[e.id]?.[t]}chainText(e){return e.chain.map(e=>e.fullPath).join(` → `)}editUrl(e){this.testUrl.set(e),this.predictSeq++,this.probeSeq++,this.match.set(null),this.message.set(``)}askForUrl(e){this.match.set(null),this.message.set(`Type a URL to ${e}, for example /users/42.`),this.urlInput()?.nativeElement.focus()}async predict(){let e=this.testUrl().trim(),t=++this.predictSeq;if(!e){this.askForUrl(`predict`);return}let n=this.pageId(),r=await PA(this.rpc(),`router-match`,{pageId:n,url:e});t===this.predictSeq&&n===this.pageId()&&(this.match.set(r&&{url:e,result:r}),r?this.message()===`Could not reach the page.`&&this.message.set(``):this.message.set(IA))}async probe(){let e=this.testUrl().trim(),t=++this.probeSeq;if(!e){this.askForUrl(`probe`);return}this.message.set(`Running the real matcher in the app…`);let n=this.pageId(),r=await LA(this.rpc(),n,{action:`probe`,url:e});if(t===this.probeSeq&&n===this.pageId()){if(r.error){this.message.set(String(r.error));return}this.message.set(r.matched?`The app recognized ${e} and its canMatch guards passed. The probe stopped before canActivate guards and resolvers, so those did not run. See the probe entry in Navigations.`:typeof r.redirectedTo==`string`?`A canMatch guard or the navigation error handler redirected ${e} to ${r.redirectedTo}. The probe stopped that navigation before it rendered anything.`:`The app could not recognize ${e}: ${String(r.reason??``)}`)}}async navigate(e,t){let n=this.missingParams(e);if(n.length){this.checkedRow.set(e.id),this.rowResult.set({id:e.id,text:`Fill in ${n.map(e=>`:${e}`).join(`, `)} to navigate.`}),Array.from(t?.querySelectorAll(`input.param`)??[]).find(e=>!e.value)?.focus();return}this.checkedRow.set(null),this.rowResult.set({id:e.id,text:`Navigating to ${e.fullPath}…`});let r=this.pageId(),i=await LA(this.rpc(),r,{action:`navigate`,pattern:e.fullPath,params:this.paramValues()[e.id]??{}});r===this.pageId()&&this.rowResult.set({id:e.id,text:i.error?String(i.error):`Navigation #${i.id}: ${i.outcome}${i.finalUrl?` at ${i.finalUrl}`:``}.`})}async resolveLazy(e){let t=this.pageId(),n=await LA(this.rpc(),t,{action:`resolve-lazy`,id:e.id});if(t!==this.pageId())return;if(n.error){this.rowResult.set({id:e.id,text:String(n.error)});return}let r=n.routes??[];this.rowResult.set({id:e.id,text:`${e.fullPath} declares ${r.length} route(s): ${r.map(e=>`/${e.path}`).join(`, `)}. The router loads them for real on the first navigation that needs them.`})}static ɵfac=function(t){return new(t||e)};static ɵcmp=Wh({type:e,selectors:[[`app-route-tree`]],viewQuery:function(e,t){e&1&&c_(t.urlInput,qM,5),e&2&&l_()},inputs:{page:[1,`page`],rpc:[1,`rpc`],sources:[1,`sources`]},decls:23,vars:11,consts:[[`urlInput`,``],[`filterInput`,``],[`rowEl`,``],[1,`test`,3,`submit`],[`for`,`test-url`],[`id`,`test-url`,`type`,`text`,`placeholder`,`/users/42`,1,`field`,3,`input`,`value`],[`type`,`submit`,1,`small`,`primary`],[`type`,`button`,1,`small`,3,`click`,`disabled`],[`role`,`status`,1,`result`],[`role`,`status`,1,`message`],[`role`,`status`,1,`visually-hidden`],[`id`,`route-tree-writes-off`,1,`message`],[1,`filter-row`],[`type`,`search`,`aria-label`,`Filter routes`,`placeholder`,`Filter by path, component or file`,1,`field`,`filter`,3,`input`,`keydown.escape`,`value`],[1,`muted`,`summary`],[1,`empty`],[`role`,`region`,`aria-label`,`Live route config`,`tabindex`,`0`,1,`table-scroll`],[1,`for`],[1,`muted`],[`data-tone`,`good`,1,`badge`],[1,`chain`],[`data-tone`,`bad`,1,`badge`],[1,`count`],[1,`empty-title`],[`type`,`button`,1,`small`,3,`click`],[`scope`,`col`],[1,`visually-hidden`],[1,`path`],[1,`tag`],[1,`src`],[1,`redirect`],[1,`actions`],[1,`actions-inner`],[`type`,`button`,1,`small`],[1,`row-result`],[3,`file`,`line`],[`aria-hidden`,`true`],[`aria-hidden`,`true`,1,`nil`],[`type`,`text`,1,`field`,`param`,3,`placeholder`,`value`],[`type`,`text`,1,`field`,`param`,3,`input`,`placeholder`,`value`],[`colspan`,`5`],[`id`,`route-tree-row-result`]],template:function(e,t){if(e&1){let e=W();z(0,`form`,3),G(`submit`,function(n){return O(e),n.preventDefault(),k(t.predict())}),z(1,`label`,4),J(2,`Test a URL`),B(),z(3,`input`,5,0),G(`input`,function(e){return t.editUrl(e.target.value)}),B(),z(5,`button`,6),J(6,`Predict`),B(),z(7,`button`,7),G(`click`,function(){return t.probe()}),J(8,` Probe in app `),B()(),P(9,tN,11,4,`div`,8),P(10,nN,2,1,`p`,9),z(11,`p`,10),J(12),B(),P(13,rN,2,1,`p`,11),z(14,`div`,12)(15,`input`,13,1),G(`input`,function(e){return t.setFilter(e.target.value)})(`keydown.escape`,function(){return t.setFilter(``)}),B(),P(17,sN,6,3,`p`,14),B(),z(18,`p`,10),J(19),B(),P(20,cN,5,2,`div`,15)(21,lN,7,0,`div`,15)(22,EN,18,0,`div`,16)}if(e&2){let e;M(3),R(`value`,t.testUrl()),M(4),R(`disabled`,!t.navigationAllowed()),N(`aria-describedby`,t.navigationAllowed()?null:`route-tree-writes-off`),M(2),F((e=t.match())?9:-1,e),M(),F(t.message()?10:-1),M(2),Y(t.rowResult()?.text),M(),F(t.navigationAllowed()?-1:13),M(2),R(`value`,t.filter()),M(2),F(t.page().config?17:-1),M(2),Y(t.filterAnnouncement()),M(),F(t.page().config?t.rows().length?22:21:20)}},dependencies:[DO,hb],styles:[`.muted[_ngcontent-%COMP%] {
   color: var(--%NS%text-2);
   font-size: 13px;
   line-height: 1.5;
@@ -3811,7 +4072,7 @@ tr.active[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]:first-child {
   .filter[_ngcontent-%COMP%] {
     flex-basis: 100%;
   }
-}`]})},eN=(e,t)=>t.id;function tN(e,t){if(e&1){let e=W();z(0,`div`,4)(1,`span`,5),J(2,`Page`),B(),z(3,`app-select`,6),G(`valueChange`,function(t){return O(e),k(K(2).pageId.set(t))}),B()()}if(e&2){let e=K(),t=K();M(3),R(`options`,t.pageOptions())(`value`,e.pageId)}}function nN(e,t){e&1&&P(0,tN,4,2,`div`,4),e&2&&F(K().pages().length>1?0:-1)}function rN(e,t){if(e&1){let e=W();z(0,`div`,1)(1,`p`,7),J(2,`Could not load the live router state.`),B(),z(3,`p`,8),J(4,` Check that the dev server with Pangular Inspector is still running, then retry. `),B(),z(5,`button`,9),G(`click`,function(){return O(e),k(K().retry())}),J(6,`Retry`),B()()}}function iN(e,t){e&1&&(z(0,`p`,2),J(1,`Loading the live router state…`),B())}function aN(e,t){if(e&1&&(z(0,`span`,17),J(1),B(),z(2,`span`,18),J(3),B()),e&2){let e=K(3);M(),Y(e.problems()),M(2),X(`, `,e.problems(),` problem navigations`)}}function oN(e,t){if(e&1){let e=W();z(0,`button`,16),G(`click`,function(){let t=O(e).$implicit;return k(K(2).selected.set(t.id))}),J(1),P(2,aN,4,2),B()}if(e&2){let e=t.$implicit,n=K(2);R(`id`,`router-tab-`+e.id),N(`aria-selected`,e.id===n.selected())(`aria-controls`,`router-panel-`+e.id)(`tabindex`,e.id===n.selected()?0:-1),M(),X(` `,e.label,` `),M(),F(e.id===`navigations`&&n.problems()>0?2:-1)}}function sN(e,t){if(e&1){let e=W();z(0,`app-route-current`,19),G(`showComponent`,function(t){return O(e),k(K(2).showComponent.emit(t))}),B()}if(e&2){let e=K(),t=K();R(`page`,e)(`rpc`,t.rpc())}}function cN(e,t){if(e&1&&V(0,`app-route-timeline`,13),e&2){let e=K(),t=K();R(`page`,e)(`rpc`,t.rpc())}}function lN(e,t){if(e&1&&V(0,`app-route-tree`,14),e&2){let e=K(),t=K();R(`page`,e)(`rpc`,t.rpc())(`sources`,t.sources())}}function uN(e,t){e&1&&V(0,`app-route-setup`,15),e&2&&R(`page`,K())}function dN(e,t){if(e&1&&V(0,`app-route-lint`,13),e&2){let e=K(),t=K();R(`page`,e)(`rpc`,t.rpc())}}function fN(e,t){if(e&1){let e=W();z(0,`div`,10),G(`keydown`,function(t){return O(e),k(K().onKey(t))}),I(1,oN,3,6,`button`,11,eN),B(),z(3,`div`,12),P(4,sN,1,2,`app-route-current`,13)(5,cN,1,2,`app-route-timeline`,13)(6,lN,1,3,`app-route-tree`,14)(7,uN,1,1,`app-route-setup`,15)(8,dN,1,2,`app-route-lint`,13),B()}if(e&2){let e,t=K();M(),L(t.tabs),M(2),R(`id`,`router-panel-`+t.selected()),N(`aria-labelledby`,`router-tab-`+t.selected()),M(),F((e=t.selected())===`current`?4:e===`navigations`?5:e===`routes`?6:e===`setup`?7:e===`lint`?8:-1)}}function pN(e,t){e&1&&(z(0,`div`,3)(1,`p`,7),J(2,`No page is reporting router state yet.`),B(),z(3,`p`,8),J(4,` Open the app in a browser. This view updates as soon as a page connects. `),B()())}var mN=[{id:`current`,label:`Current`},{id:`navigations`,label:`Navigations`},{id:`routes`,label:`Routes`},{id:`setup`,label:`Setup`},{id:`lint`,label:`Lint`}],hN=class e{rpc=$(null);sources=$([]);showComponent=Iv();tabs=mN;selected=j(`current`);pages=j([]);hostPageId=uE();loading=j(!0);failed=j(!1);pageId=Nv({source:this.pages,computation:(e,t)=>t?.value&&e.some(e=>e.pageId===t.value)?t.value:this.hostPageId?e.find(e=>e.pageId===this.hostPageId)?.pageId??null:e.find(e=>e.snapshot)?.pageId??e[0]?.pageId??null});unsubscribe=null;destroyRef=E(ws);page=Q(()=>{let e=this.pages();return e.find(e=>e.pageId===this.pageId())??(this.hostPageId?null:e[0])??null});problems=Q(()=>(this.page()?.navigations??[]).filter(e=>!e.probe&&[`failed`,`cancelled`,`redirected`].includes(e.outcome)).length);constructor(){dc(()=>{let e=this.rpc();e&&this.load(e)}),this.destroyRef.onDestroy(()=>this.unsubscribe?.())}async load(e){this.loading.set(!0),this.failed.set(!1);try{let t=await e.scope(`pangular`).rpc.sharedState(`router`);if(this.destroyRef.destroyed)return;let n=e=>{this.pages.set(e?.pages??[])};n(t.value()),this.unsubscribe?.(),this.unsubscribe=t.on(`updated`,n)}catch{this.failed.set(!0)}finally{this.loading.set(!1)}}retry(){let e=this.rpc();e&&this.load(e)}pageOptions=Q(()=>this.pages().map(e=>({value:e.pageId,label:e.snapshot?.url??e.pageId,hint:e.pageId})));onKey(e){let t=this.tabs.map(e=>e.id),n=t.indexOf(this.selected()),r=n;if(e.key===`ArrowRight`)r=(n+1)%t.length;else if(e.key===`ArrowLeft`)r=(n-1+t.length)%t.length;else if(e.key===`Home`)r=0;else if(e.key===`End`)r=t.length-1;else return;e.preventDefault(),this.selected.set(t[r]);let i=e.currentTarget;queueMicrotask(()=>i.querySelector(`#router-tab-${t[r]}`)?.focus())}static ɵfac=function(t){return new(t||e)};static ɵcmp=Wh({type:e,selectors:[[`app-live-route`]],inputs:{rpc:[1,`rpc`],sources:[1,`sources`]},outputs:{showComponent:`showComponent`},decls:8,vars:2,consts:[[1,`section-head`],[`role`,`alert`,1,`empty`],[`role`,`status`,1,`muted`,`empty`],[1,`empty`],[1,`page-pick`],[`id`,`live-route-page-label`,1,`page-label`],[`labelledBy`,`live-route-page-label`,3,`valueChange`,`options`,`value`],[1,`empty-title`],[1,`muted`],[`type`,`button`,1,`retry`,3,`click`],[`role`,`tablist`,`aria-label`,`Router views`,1,`tabs`,3,`keydown`],[`type`,`button`,`role`,`tab`,3,`id`],[`role`,`tabpanel`,1,`panel`,3,`id`],[3,`page`,`rpc`],[3,`page`,`rpc`,`sources`],[3,`page`],[`type`,`button`,`role`,`tab`,3,`click`,`id`],[`aria-hidden`,`true`,1,`count`],[1,`visually-hidden`],[3,`showComponent`,`page`,`rpc`]],template:function(e,t){if(e&1&&(z(0,`div`,0)(1,`h2`),J(2,`Live router`),B(),P(3,nN,1,1),B(),P(4,rN,7,0,`div`,1)(5,iN,2,0,`p`,2)(6,fN,9,3)(7,pN,5,0,`div`,3)),e&2){let e,n;M(3),F((e=t.page())?3:-1,e),M(),F(t.failed()?4:t.loading()?5:(n=t.page())?6:7,n)}},dependencies:[KA,oj,bj,_M,$M,GD],styles:[`[_nghost-%COMP%] {
+}`]})},kN=(e,t)=>t.id;function AN(e,t){if(e&1){let e=W();z(0,`div`,4)(1,`span`,5),J(2,`Page`),B(),z(3,`app-select`,6),G(`valueChange`,function(t){return O(e),k(K(2).pageId.set(t))}),B()()}if(e&2){let e=K(),t=K();M(3),R(`options`,t.pageOptions())(`value`,e.pageId)}}function jN(e,t){e&1&&P(0,AN,4,2,`div`,4),e&2&&F(K().pages().length>1?0:-1)}function MN(e,t){if(e&1){let e=W();z(0,`div`,1)(1,`p`,7),J(2,`Could not load the live router state.`),B(),z(3,`p`,8),J(4,` Check that the dev server with Pangular Inspector is still running, then retry. `),B(),z(5,`button`,9),G(`click`,function(){return O(e),k(K().retry())}),J(6,`Retry`),B()()}}function NN(e,t){e&1&&(z(0,`p`,2),J(1,`Loading the live router state…`),B())}function PN(e,t){if(e&1&&(z(0,`span`,17),J(1),B(),z(2,`span`,18),J(3),B()),e&2){let e=K(3);M(),Y(e.problems()),M(2),X(`, `,e.problems(),` problem navigations`)}}function FN(e,t){if(e&1){let e=W();z(0,`button`,16),G(`click`,function(){let t=O(e).$implicit;return k(K(2).selected.set(t.id))}),J(1),P(2,PN,4,2),B()}if(e&2){let e=t.$implicit,n=K(2);R(`id`,`router-tab-`+e.id),N(`aria-selected`,e.id===n.selected())(`aria-controls`,`router-panel-`+e.id)(`tabindex`,e.id===n.selected()?0:-1),M(),X(` `,e.label,` `),M(),F(e.id===`navigations`&&n.problems()>0?2:-1)}}function IN(e,t){if(e&1){let e=W();z(0,`app-route-current`,19),G(`showComponent`,function(t){return O(e),k(K(2).showComponent.emit(t))}),B()}if(e&2){let e=K(),t=K();R(`page`,e)(`rpc`,t.rpc())}}function LN(e,t){if(e&1&&V(0,`app-route-timeline`,13),e&2){let e=K(),t=K();R(`page`,e)(`rpc`,t.rpc())}}function RN(e,t){if(e&1&&V(0,`app-route-tree`,14),e&2){let e=K(),t=K();R(`page`,e)(`rpc`,t.rpc())(`sources`,t.sources())}}function zN(e,t){e&1&&V(0,`app-route-setup`,15),e&2&&R(`page`,K())}function BN(e,t){if(e&1&&V(0,`app-route-lint`,13),e&2){let e=K(),t=K();R(`page`,e)(`rpc`,t.rpc())}}function VN(e,t){if(e&1){let e=W();z(0,`div`,10),G(`keydown`,function(t){return O(e),k(K().onKey(t))}),I(1,FN,3,6,`button`,11,kN),B(),z(3,`div`,12),P(4,IN,1,2,`app-route-current`,13)(5,LN,1,2,`app-route-timeline`,13)(6,RN,1,3,`app-route-tree`,14)(7,zN,1,1,`app-route-setup`,15)(8,BN,1,2,`app-route-lint`,13),B()}if(e&2){let e,t=K();M(),L(t.tabs),M(2),R(`id`,`router-panel-`+t.selected()),N(`aria-labelledby`,`router-tab-`+t.selected()),M(),F((e=t.selected())===`current`?4:e===`navigations`?5:e===`routes`?6:e===`setup`?7:e===`lint`?8:-1)}}function HN(e,t){e&1&&(z(0,`div`,3)(1,`p`,7),J(2,`No page is reporting router state yet.`),B(),z(3,`p`,8),J(4,` Open the app in a browser. This view updates as soon as a page connects. `),B()())}var UN=[{id:`current`,label:`Current`},{id:`navigations`,label:`Navigations`},{id:`routes`,label:`Routes`},{id:`setup`,label:`Setup`},{id:`lint`,label:`Lint`}],WN=class e{rpc=$(null);sources=$([]);showComponent=Rv();tabs=UN;selected=j(`current`);pages=j([]);hostPageId=fE();loading=j(!0);failed=j(!1);pageId=Fv({source:this.pages,computation:(e,t)=>t?.value&&e.some(e=>e.pageId===t.value)?t.value:this.hostPageId?e.find(e=>e.pageId===this.hostPageId)?.pageId??null:e.find(e=>e.snapshot)?.pageId??e[0]?.pageId??null});unsubscribe=null;destroyRef=E(ws);page=Q(()=>{let e=this.pages();return e.find(e=>e.pageId===this.pageId())??(this.hostPageId?null:e[0])??null});problems=Q(()=>(this.page()?.navigations??[]).filter(e=>!e.probe&&[`failed`,`cancelled`,`redirected`].includes(e.outcome)).length);constructor(){dc(()=>{let e=this.rpc();e&&this.load(e)}),this.destroyRef.onDestroy(()=>this.unsubscribe?.())}async load(e){this.loading.set(!0),this.failed.set(!1);try{let t=await e.scope(`pangular`).rpc.sharedState(`router`);if(this.destroyRef.destroyed)return;let n=e=>{this.pages.set(e?.pages??[])};n(t.value()),this.unsubscribe?.(),this.unsubscribe=t.on(`updated`,n)}catch{this.failed.set(!0)}finally{this.loading.set(!1)}}retry(){let e=this.rpc();e&&this.load(e)}pageOptions=Q(()=>this.pages().map(e=>({value:e.pageId,label:e.snapshot?.url??e.pageId,hint:e.pageId})));onKey(e){let t=this.tabs.map(e=>e.id),n=t.indexOf(this.selected()),r=n;if(e.key===`ArrowRight`)r=(n+1)%t.length;else if(e.key===`ArrowLeft`)r=(n-1+t.length)%t.length;else if(e.key===`Home`)r=0;else if(e.key===`End`)r=t.length-1;else return;e.preventDefault(),this.selected.set(t[r]);let i=e.currentTarget;queueMicrotask(()=>i.querySelector(`#router-tab-${t[r]}`)?.focus())}static ɵfac=function(t){return new(t||e)};static ɵcmp=Wh({type:e,selectors:[[`app-live-route`]],inputs:{rpc:[1,`rpc`],sources:[1,`sources`]},outputs:{showComponent:`showComponent`},decls:8,vars:2,consts:[[1,`section-head`],[`role`,`alert`,1,`empty`],[`role`,`status`,1,`muted`,`empty`],[1,`empty`],[1,`page-pick`],[`id`,`live-route-page-label`,1,`page-label`],[`labelledBy`,`live-route-page-label`,3,`valueChange`,`options`,`value`],[1,`empty-title`],[1,`muted`],[`type`,`button`,1,`retry`,3,`click`],[`role`,`tablist`,`aria-label`,`Router views`,1,`tabs`,3,`keydown`],[`type`,`button`,`role`,`tab`,3,`id`],[`role`,`tabpanel`,1,`panel`,3,`id`],[3,`page`,`rpc`],[3,`page`,`rpc`,`sources`],[3,`page`],[`type`,`button`,`role`,`tab`,3,`click`,`id`],[`aria-hidden`,`true`,1,`count`],[1,`visually-hidden`],[3,`showComponent`,`page`,`rpc`]],template:function(e,t){if(e&1&&(z(0,`div`,0)(1,`h2`),J(2,`Live router`),B(),P(3,jN,1,1),B(),P(4,MN,7,0,`div`,1)(5,NN,2,0,`p`,2)(6,VN,9,3)(7,HN,5,0,`div`,3)),e&2){let e,n;M(3),F((e=t.page())?3:-1,e),M(),F(t.failed()?4:t.loading()?5:(n=t.page())?6:7,n)}},dependencies:[xj,Fj,Yj,KM,ON,qD],styles:[`[_nghost-%COMP%] {
   display: grid;
   gap: 16px;
   min-width: 0;
@@ -3976,7 +4237,7 @@ h2[_ngcontent-%COMP%] {
   line-height: 16px;
   text-align: center;
   font-variant-numeric: tabular-nums;
-}`]})};function gN(e,t){e&1&&J(0,` The Routes tab above shows what the router uses. `)}function _N(e,t){if(e&1){let e=W();z(0,`button`,13),G(`click`,function(){O(e);let t=K();return k(t.expanded.set(!t.expanded()))}),J(1),B()}if(e&2){let e=K();N(`aria-expanded`,e.expanded()),M(),X(` `,e.expanded()?`Hide table`:`Show table`,` `)}}function vN(e,t){e&1&&(J(0,` Run `),z(1,`code`),J(2,`pangular build`),B(),J(3,` again to rebuild the report. `))}function yN(e,t){e&1&&J(0,` Check that the dev server is running, then refresh. `)}function bN(e,t){if(e&1&&(z(0,`div`,11)(1,`p`,14),J(2,`Could not scan the route files.`),B(),z(3,`p`,15),P(4,vN,4,0)(5,yN,1,0),B()()),e&2){let e=K();M(4),F(e.staticReport()?4:5)}}function xN(e,t){e&1&&(z(0,`p`,12),J(1,`Scanning routes…`),B())}function SN(e,t){if(e&1){let e=W();z(0,`div`,16)(1,`p`,14),J(2,`No routes match the filter.`),B(),z(3,`p`,15),J(4,`Search by path, component, guard, title or file name.`),B(),z(5,`button`,10),G(`click`,function(){O(e);let t=K(2),n=u_(12);return t.filter.set(``),k(n.focus())}),J(6,` Clear filter `),B()()}}function CN(e,t){e&1&&(z(0,`div`,16)(1,`p`,14),J(2,`No routes found.`),B(),z(3,`p`,15),J(4,` Routes are read from `),z(5,`code`),J(6,`*.routes.ts`),B(),J(7,` and `),z(8,`code`),J(9,`*routing.module.ts`),B(),J(10,` files, the files they lazy load, plus Analog pages. Add one and refresh. `),B()())}function wN(e,t){e&1&&P(0,SN,7,0,`div`,16)(1,CN,11,0,`div`,16),e&2&&F(+!K().routes().length)}function TN(e,t){if(e&1&&(z(0,`span`,21),J(1),B()),e&2){let e=K().$implicit;M(),Y(e.kind)}}function EN(e,t){if(e&1&&(z(0,`span`,22)(1,`span`,26),J(2,`→`),B(),z(3,`span`,27),J(4,`redirects to`),B(),J(5),B()),e&2){let e=K().$implicit;M(5),X(` `,e.redirectTo)}}function DN(e,t){if(e&1&&(z(0,`code`,23),J(1),B()),e&2){let e=K().$implicit;M(),Y(e.component)}}function ON(e,t){e&1&&(z(0,`span`,28),J(1,`–`),B(),z(2,`span`,27),J(3,`none`),B())}function kN(e,t){if(e&1&&(z(0,`span`,21),J(1),B()),e&2){let e=t.$implicit;M(),Y(e)}}function AN(e,t){e&1&&(z(0,`span`,28),J(1,`–`),B(),z(2,`span`,27),J(3,`none`),B())}function jN(e,t){if(e&1&&J(0),e&2){let e=K().$implicit;X(` `,e.title,` `)}}function MN(e,t){e&1&&(z(0,`span`,28),J(1,`–`),B(),z(2,`span`,27),J(3,`none`),B())}function NN(e,t){if(e&1&&(z(0,`tr`)(1,`td`,20),J(2),P(3,TN,2,1,`span`,21),B(),z(4,`td`),P(5,EN,6,1,`span`,22)(6,DN,2,1,`code`,23)(7,ON,4,0),B(),z(8,`td`),I(9,kN,2,1,`span`,21,Dg,!1,AN,4,0),B(),z(12,`td`),P(13,jN,1,1)(14,MN,4,0),B(),z(15,`td`,24),V(16,`app-source-link`,25),B()()),e&2){let e=t.$implicit,n=K(2);M(2),X(` `,e.fullPath,` `),M(),F(e.kind===`page`?-1:3),M(2),F(e.redirectTo===void 0?e.component?6:7:5),M(4),L(n.checks(e)),M(4),F(e.title?13:14),M(3),R(`file`,e.file)(`line`,e.line)}}function PN(e,t){if(e&1&&(z(0,`p`,17),J(1),B(),z(2,`div`,18)(3,`table`)(4,`thead`)(5,`tr`)(6,`th`,19),J(7,`Path`),B(),z(8,`th`,19),J(9,`Component / Target`),B(),z(10,`th`,19),J(11,`Guards and resolvers`),B(),z(12,`th`,19),J(13,`Title`),B(),z(14,`th`,19),J(15,`Declared in`),B()()(),z(16,`tbody`),I(17,NN,17,7,`tr`,null,Dg),B()()()),e&2){let e=K();M(),rv(` `,e.filtered().length,` of `,e.routes().length,` route entries, `,e.navigable(),` navigable `),M(16),L(e.filtered())}}var FN=class e{rpc=$(null);showComponent=Iv();staticReport=Q(()=>gE(this.rpc()));routes=j([]);filter=j(``);loading=j(!1);error=j(!1);live=Kv(hN);liveHasConfig=Q(()=>!!this.live()?.page()?.config);expanded=Nv(()=>!this.liveHasConfig());navigable=Q(()=>this.filtered().filter(e=>e.kind===`page`).length);filtered=Q(()=>{let e=this.filter().toLowerCase().trim(),t=this.routes();return e?t.filter(t=>t.fullPath.toLowerCase().includes(e)||t.component&&t.component.toLowerCase().includes(e)||t.redirectTo&&t.redirectTo.toLowerCase().includes(e)||t.title&&t.title.toLowerCase().includes(e)||this.checks(t).some(t=>t.toLowerCase().includes(e))||t.file.toLowerCase().includes(e)):t});constructor(){dc(()=>{this.rpc()&&this.refresh()})}checks(e){return[...Object.entries(e.guards??{}).flatMap(([e,t])=>t.map(t=>`${e} ${t}`)),...(e.resolvers??[]).map(e=>`resolve ${e}`)]}onFilterInput(e){let t=e.target;this.filter.set(t?.value??``)}async refresh(){let e=this.rpc();if(e){this.loading.set(!0),this.error.set(!1);try{let t=await e.scope(`pangular`).rpc.call(`get-routes`);this.routes.set(t)}catch{this.error.set(!0)}finally{this.loading.set(!1)}}}static ɵfac=function(t){return new(t||e)};static ɵcmp=Wh({type:e,selectors:[[`app-route-inspector`]],viewQuery:function(e,t){e&1&&c_(t.live,hN,5),e&2&&l_()},inputs:{rpc:[1,`rpc`]},outputs:{showComponent:`showComponent`},decls:19,vars:9,consts:[[`filterInput`,``],[3,`showComponent`,`rpc`,`sources`],[`aria-labelledby`,`config-heading`,1,`config`],[1,`section-head`],[`id`,`config-heading`],[1,`muted`,`hint`],[`type`,`button`,`aria-controls`,`config-body`,1,`small`,`toggle`],[`id`,`config-body`,1,`config-body`,3,`hidden`],[1,`toolbar`],[`type`,`search`,`aria-label`,`Filter source routes`,`placeholder`,`Filter routes…`,1,`field`,3,`input`,`keydown.escape`,`value`],[`type`,`button`,1,`small`,3,`click`],[`role`,`alert`,1,`empty`],[`role`,`status`,1,`muted`,`empty`],[`type`,`button`,`aria-controls`,`config-body`,1,`small`,`toggle`,3,`click`],[1,`empty-title`],[1,`muted`],[1,`empty`],[1,`muted`,`count`],[`role`,`region`,`aria-label`,`Source route config table`,`tabindex`,`0`,1,`table-scroll`],[`scope`,`col`],[1,`path`],[1,`tag`],[1,`redirect`],[1,`component`],[1,`file`],[3,`file`,`line`],[`aria-hidden`,`true`],[1,`visually-hidden`],[`aria-hidden`,`true`,1,`nil`]],template:function(e,t){e&1&&(z(0,`app-live-route`,1),G(`showComponent`,function(e){return t.showComponent.emit(e)}),B(),z(1,`section`,2)(2,`div`,3)(3,`h2`,4),J(4,`Source route config`),B(),z(5,`span`,5),J(6,` Read from your source files. `),P(7,gN,1,0),B(),P(8,_N,2,2,`button`,6),B(),z(9,`div`,7)(10,`div`,8)(11,`input`,9,0),G(`input`,function(e){return t.onFilterInput(e)})(`keydown.escape`,function(){return t.filter.set(``)}),B(),z(13,`button`,10),G(`click`,function(){return t.refresh()}),J(14),B()(),P(15,bN,6,1,`div`,11)(16,xN,2,0,`p`,12)(17,wN,2,1)(18,PN,19,3),B()()),e&2&&(R(`rpc`,t.rpc())(`sources`,t.routes()),M(7),F(t.liveHasConfig()?7:-1),M(),F(t.liveHasConfig()?8:-1),M(),R(`hidden`,!t.expanded()),M(2),R(`value`,t.filter()),M(2),N(`aria-busy`,t.loading()),M(),X(` `,t.loading()?`Scanning…`:`Refresh`,` `),M(),F(t.error()?15:t.loading()&&t.routes().length===0?16:t.filtered().length===0?17:18))},dependencies:[hN,TO],styles:[`.muted[_ngcontent-%COMP%] {
+}`]})};function GN(e,t){e&1&&J(0,` The Routes tab above shows what the router uses. `)}function KN(e,t){if(e&1){let e=W();z(0,`button`,13),G(`click`,function(){O(e);let t=K();return k(t.expanded.set(!t.expanded()))}),J(1),B()}if(e&2){let e=K();N(`aria-expanded`,e.expanded()),M(),X(` `,e.expanded()?`Hide table`:`Show table`,` `)}}function qN(e,t){e&1&&(J(0,` Run `),z(1,`code`),J(2,`pangular build`),B(),J(3,` again to rebuild the report. `))}function JN(e,t){e&1&&J(0,` Check that the dev server is running, then refresh. `)}function YN(e,t){if(e&1&&(z(0,`div`,11)(1,`p`,14),J(2,`Could not scan the route files.`),B(),z(3,`p`,15),P(4,qN,4,0)(5,JN,1,0),B()()),e&2){let e=K();M(4),F(e.staticReport()?4:5)}}function XN(e,t){e&1&&(z(0,`p`,12),J(1,`Scanning routes…`),B())}function ZN(e,t){if(e&1){let e=W();z(0,`div`,16)(1,`p`,14),J(2,`No routes match the filter.`),B(),z(3,`p`,15),J(4,`Search by path, component, guard, title or file name.`),B(),z(5,`button`,10),G(`click`,function(){O(e);let t=K(2),n=u_(12);return t.filter.set(``),k(n.focus())}),J(6,` Clear filter `),B()()}}function QN(e,t){e&1&&(z(0,`div`,16)(1,`p`,14),J(2,`No routes found.`),B(),z(3,`p`,15),J(4,` Routes are read from `),z(5,`code`),J(6,`*.routes.ts`),B(),J(7,` and `),z(8,`code`),J(9,`*routing.module.ts`),B(),J(10,` files, the files they lazy load, plus Analog pages. Add one and refresh. `),B()())}function $N(e,t){e&1&&P(0,ZN,7,0,`div`,16)(1,QN,11,0,`div`,16),e&2&&F(+!K().routes().length)}function eP(e,t){if(e&1&&(z(0,`span`,21),J(1),B()),e&2){let e=K().$implicit;M(),Y(e.kind)}}function tP(e,t){if(e&1&&(z(0,`span`,22)(1,`span`,26),J(2,`→`),B(),z(3,`span`,27),J(4,`redirects to`),B(),J(5),B()),e&2){let e=K().$implicit;M(5),X(` `,e.redirectTo)}}function nP(e,t){if(e&1&&(z(0,`code`,23),J(1),B()),e&2){let e=K().$implicit;M(),Y(e.component)}}function rP(e,t){e&1&&(z(0,`span`,28),J(1,`–`),B(),z(2,`span`,27),J(3,`none`),B())}function iP(e,t){if(e&1&&(z(0,`span`,21),J(1),B()),e&2){let e=t.$implicit;M(),Y(e)}}function aP(e,t){e&1&&(z(0,`span`,28),J(1,`–`),B(),z(2,`span`,27),J(3,`none`),B())}function oP(e,t){if(e&1&&J(0),e&2){let e=K().$implicit;X(` `,e.title,` `)}}function sP(e,t){e&1&&(z(0,`span`,28),J(1,`–`),B(),z(2,`span`,27),J(3,`none`),B())}function cP(e,t){if(e&1&&(z(0,`tr`)(1,`td`,20),J(2),P(3,eP,2,1,`span`,21),B(),z(4,`td`),P(5,tP,6,1,`span`,22)(6,nP,2,1,`code`,23)(7,rP,4,0),B(),z(8,`td`),I(9,iP,2,1,`span`,21,Dg,!1,aP,4,0),B(),z(12,`td`),P(13,oP,1,1)(14,sP,4,0),B(),z(15,`td`,24),V(16,`app-source-link`,25),B()()),e&2){let e=t.$implicit,n=K(2);M(2),X(` `,e.fullPath,` `),M(),F(e.kind===`page`?-1:3),M(2),F(e.redirectTo===void 0?e.component?6:7:5),M(4),L(n.checks(e)),M(4),F(e.title?13:14),M(3),R(`file`,e.file)(`line`,e.line)}}function lP(e,t){if(e&1&&(z(0,`p`,17),J(1),B(),z(2,`div`,18)(3,`table`)(4,`thead`)(5,`tr`)(6,`th`,19),J(7,`Path`),B(),z(8,`th`,19),J(9,`Component / Target`),B(),z(10,`th`,19),J(11,`Guards and resolvers`),B(),z(12,`th`,19),J(13,`Title`),B(),z(14,`th`,19),J(15,`Declared in`),B()()(),z(16,`tbody`),I(17,cP,17,7,`tr`,null,Dg),B()()()),e&2){let e=K();M(),rv(` `,e.filtered().length,` of `,e.routes().length,` route entries, `,e.navigable(),` navigable `),M(16),L(e.filtered())}}var uP=class e{rpc=$(null);showComponent=Rv();staticReport=Q(()=>vE(this.rpc()));routes=j([]);filter=j(``);loading=j(!1);error=j(!1);live=Jv(WN);liveHasConfig=Q(()=>!!this.live()?.page()?.config);expanded=Fv(()=>!this.liveHasConfig());navigable=Q(()=>this.filtered().filter(e=>e.kind===`page`).length);filtered=Q(()=>{let e=this.filter().toLowerCase().trim(),t=this.routes();return e?t.filter(t=>t.fullPath.toLowerCase().includes(e)||t.component&&t.component.toLowerCase().includes(e)||t.redirectTo&&t.redirectTo.toLowerCase().includes(e)||t.title&&t.title.toLowerCase().includes(e)||this.checks(t).some(t=>t.toLowerCase().includes(e))||t.file.toLowerCase().includes(e)):t});constructor(){dc(()=>{this.rpc()&&this.refresh()})}checks(e){return[...Object.entries(e.guards??{}).flatMap(([e,t])=>t.map(t=>`${e} ${t}`)),...(e.resolvers??[]).map(e=>`resolve ${e}`)]}onFilterInput(e){let t=e.target;this.filter.set(t?.value??``)}async refresh(){let e=this.rpc();if(e){this.loading.set(!0),this.error.set(!1);try{let t=await e.scope(`pangular`).rpc.call(`get-routes`);this.routes.set(t)}catch{this.error.set(!0)}finally{this.loading.set(!1)}}}static ɵfac=function(t){return new(t||e)};static ɵcmp=Wh({type:e,selectors:[[`app-route-inspector`]],viewQuery:function(e,t){e&1&&c_(t.live,WN,5),e&2&&l_()},inputs:{rpc:[1,`rpc`]},outputs:{showComponent:`showComponent`},decls:19,vars:9,consts:[[`filterInput`,``],[3,`showComponent`,`rpc`,`sources`],[`aria-labelledby`,`config-heading`,1,`config`],[1,`section-head`],[`id`,`config-heading`],[1,`muted`,`hint`],[`type`,`button`,`aria-controls`,`config-body`,1,`small`,`toggle`],[`id`,`config-body`,1,`config-body`,3,`hidden`],[1,`toolbar`],[`type`,`search`,`aria-label`,`Filter source routes`,`placeholder`,`Filter routes…`,1,`field`,3,`input`,`keydown.escape`,`value`],[`type`,`button`,1,`small`,3,`click`],[`role`,`alert`,1,`empty`],[`role`,`status`,1,`muted`,`empty`],[`type`,`button`,`aria-controls`,`config-body`,1,`small`,`toggle`,3,`click`],[1,`empty-title`],[1,`muted`],[1,`empty`],[1,`muted`,`count`],[`role`,`region`,`aria-label`,`Source route config table`,`tabindex`,`0`,1,`table-scroll`],[`scope`,`col`],[1,`path`],[1,`tag`],[1,`redirect`],[1,`component`],[1,`file`],[3,`file`,`line`],[`aria-hidden`,`true`],[1,`visually-hidden`],[`aria-hidden`,`true`,1,`nil`]],template:function(e,t){e&1&&(z(0,`app-live-route`,1),G(`showComponent`,function(e){return t.showComponent.emit(e)}),B(),z(1,`section`,2)(2,`div`,3)(3,`h2`,4),J(4,`Source route config`),B(),z(5,`span`,5),J(6,` Read from your source files. `),P(7,GN,1,0),B(),P(8,KN,2,2,`button`,6),B(),z(9,`div`,7)(10,`div`,8)(11,`input`,9,0),G(`input`,function(e){return t.onFilterInput(e)})(`keydown.escape`,function(){return t.filter.set(``)}),B(),z(13,`button`,10),G(`click`,function(){return t.refresh()}),J(14),B()(),P(15,YN,6,1,`div`,11)(16,XN,2,0,`p`,12)(17,$N,2,1)(18,lP,19,3),B()()),e&2&&(R(`rpc`,t.rpc())(`sources`,t.routes()),M(7),F(t.liveHasConfig()?7:-1),M(),F(t.liveHasConfig()?8:-1),M(),R(`hidden`,!t.expanded()),M(2),R(`value`,t.filter()),M(2),N(`aria-busy`,t.loading()),M(),X(` `,t.loading()?`Scanning…`:`Refresh`,` `),M(),F(t.error()?15:t.loading()&&t.routes().length===0?16:t.filtered().length===0?17:18))},dependencies:[WN,DO],styles:[`.muted[_ngcontent-%COMP%] {
   color: var(--%NS%text-2);
   font-size: 13px;
   line-height: 1.5;
@@ -4357,7 +4618,7 @@ h2[_ngcontent-%COMP%] {
   font-family: var(--%NS%font-mono);
   font-size: 12px;
   overflow-wrap: anywhere;
-}`]})},IN=[`ArrowDown`,`ArrowUp`,`Home`,`End`],LN=`[aria-pressed="true"], [aria-expanded="true"], [aria-current]:not([aria-current="false"]), .selected`,RN=class e{appRovingList=$(``);host=E(Nl).nativeElement;current=null;focusInside=!1;constructor(){let e=E(ws);zd(()=>{if(this.sync(),typeof MutationObserver>`u`)return;let t=new MutationObserver(()=>this.sync());t.observe(this.host,{childList:!0,subtree:!0}),e.onDestroy(()=>t.disconnect())})}isItem(e){let t=this.appRovingList();return!!t&&!!e?.matches(t)}items(){let e=this.appRovingList();return e?[...this.host.querySelectorAll(e)]:[]}sync(){let e=this.items(),t=!1;if(!this.current||!this.host.contains(this.current)){let n=document.activeElement;t=this.focusInside&&(!n||n===document.body),this.current=e.find(e=>e.matches(LN))??e[0]??null}for(let t of e){let e=t===this.current?`0`:`-1`;t.getAttribute(`tabindex`)!==e&&t.setAttribute(`tabindex`,e)}t&&this.current?.focus()}onFocusIn(e){this.focusInside=!0;let t=e.target;this.isItem(t)&&t!==this.current&&(this.current?.setAttribute(`tabindex`,`-1`),this.current=t,t.setAttribute(`tabindex`,`0`))}onFocusOut(e){let t=e.relatedTarget;if(t&&this.host.contains(t))return;let n=e.target;setTimeout(()=>{n?.isConnected!==!1&&!this.host.contains(document.activeElement)&&(this.focusInside=!1)})}onKey(e){if(!IN.includes(e.key)||e.altKey||e.ctrlKey||e.metaKey)return;let t=e.target;if(!this.isItem(t))return;let n=this.items(),r=n.indexOf(t);if(r<0)return;let i={ArrowDown:Math.min(r+1,n.length-1),ArrowUp:Math.max(r-1,0),Home:0,End:n.length-1}[e.key];e.preventDefault(),n[i].focus()}static ɵfac=function(t){return new(t||e)};static ɵdir=Jh({type:e,selectors:[[``,`appRovingList`,``]],hostBindings:function(e,t){e&1&&G(`keydown`,function(e){return t.onKey(e)})(`focusin`,function(e){return t.onFocusIn(e)})(`focusout`,function(e){return t.onFocusOut(e)})},inputs:{appRovingList:[1,`appRovingList`]}})},zN=[`filterInput`],BN=e=>({id:e,label:`Status history`}),VN=e=>({id:e,label:`Value history`}),HN=(e,t)=>t.kind,UN=(e,t)=>t.name+t.file+t.line,WN=(e,t)=>t.epoch,GN=(e,t)=>t.id;function KN(e,t){if(e&1){let e=W();z(0,`div`,4)(1,`span`,15),J(2,`Page`),B(),z(3,`app-select`,16),G(`valueChange`,function(t){return O(e),k(K().selectPage(t))}),B()()}if(e&2){let e=K();M(3),R(`options`,e.pageOptions())(`value`,e.shownPageId())}}function qN(e,t){if(e&1){let e=W();z(0,`div`,5)(1,`span`,17),J(2,`Graph of`),B(),z(3,`app-select`,18),G(`valueChange`,function(t){return O(e),k(K().pickComponent(t))}),B()()}if(e&2){let e=K();M(3),R(`options`,e.componentOptions())(`value`,e.pickerValue())}}function JN(e,t){if(e&1&&(z(0,`span`,21),J(1),B()),e&2){let e=K(2);M(),Y(e.sourceNote(e.graph().source))}}function YN(e,t){if(e&1&&(z(0,`p`,7)(1,`span`,19),J(2),B(),z(3,`span`,20),J(4),B(),P(5,JN,2,1,`span`,21),B()),e&2){let e=t,n=K();M(2),Y(e.name),M(2),Y(e.path),M(),F(n.graph().source?5:-1)}}function XN(e,t){if(e&1&&(z(0,`p`,7)(1,`span`,19),J(2),B(),z(3,`span`,21),J(4,`environment injector`),B()()),e&2){let e=K();M(2),Y(e.injectorLabel(t))}}function ZN(e,t){e&1&&(z(0,`p`,8),J(1,` The picked component or injector is gone or has no signal graph, so this shows another one. `),B())}function QN(e,t){e&1&&J(0,` The effects registered on this injector and the signals they read. A signal that no effect reads is not part of the graph. Pick a kind to filter. `)}function $N(e,t){e&1&&J(0,` The live signal graph of one component. Only signals that its template or an effect has read appear here; a signal nothing has read yet is not part of the graph. Pick a kind to filter. `)}function eP(e,t){e&1&&J(0,` Every signal, computed and effect found in your source. Pick a kind to filter. `)}function tP(e,t){e&1&&(z(0,`p`,8),J(1,` The live signal graph needs Angular 20.1 or later. This list comes from a source scan. `),B())}function nP(e,t){e&1&&(z(0,`p`,8),J(1,` The signal write hook did not load. Value history shows sampled values only, with no exact set entries. `),B())}function rP(e,t){if(e&1&&(z(0,`p`,8),J(1),B()),e&2){let e=K();M(),Z(` Showing `,e.graph().nodes.length,` of `,t,` signals. The rest and their edges are left out. `)}}function iP(e,t){if(e&1){let e=W();z(0,`button`,22),G(`click`,function(){let t=O(e).$implicit,n=K(2);return k(n.kind.set(n.kind()===t.kind?null:t.kind))}),V(1,`span`,25),z(2,`span`,26),J(3),B(),z(4,`span`,23),J(5),B()()}if(e&2){let e=t.$implicit,n=K(2);q(`active`,n.kind()===e.kind),N(`aria-pressed`,n.kind()===e.kind),M(),j_(`background`,n.kindColor(e.kind)),M(2),Y(e.kind),M(2),Y(e.count)}}function aP(e,t){if(e&1){let e=W();z(0,`div`,10)(1,`button`,22),G(`click`,function(){return O(e),k(K().kind.set(null))}),J(2,` All `),z(3,`span`,23),J(4),B()(),I(5,iP,6,7,`button`,24,HN),B()}if(e&2){let e=K();M(),q(`active`,!e.kind()),N(`aria-pressed`,!e.kind()),M(3),Y(e.kindTotal()),M(),L(e.kindChips())}}function oP(e,t){e&1&&(z(0,`div`,11),V(1,`span`,27),z(2,`p`,28),J(3,`Scanning source for signals…`),B()())}function sP(e,t){if(e&1){let e=W();z(0,`div`,29)(1,`p`,28),J(2,`Couldn't load signals`),B(),z(3,`p`,30),J(4,` The devtools server did not answer. Check that it is still running, then retry. `),B(),z(5,`button`,31),G(`click`,function(){return O(e),k(K().retry())}),J(6),B()()}if(e&2){let e=K();q(`compact`,e.sourceSignals().length>0),M(5),N(`aria-disabled`,e.retrying()||null),M(),X(` `,e.retrying()?`Retrying…`:`Retry`,` `)}}function cP(e,t){e&1&&(z(0,`div`,13)(1,`p`,28),J(2,`No signals found.`),B(),z(3,`p`,30),J(4,` No `),z(5,`code`),J(6,`signal()`),B(),J(7,`, `),z(8,`code`),J(9,`computed()`),B(),J(10,` or `),z(11,`code`),J(12,`effect()`),B(),J(13,` calls were found in your source. To see the live graph, run Angular 20.1 or later with the overlay connected and select a component. `),B()())}function lP(e,t){if(e&1&&(z(0,`span`,41),J(1,`·`),B(),z(2,`span`),J(3),B()),e&2){let e=K().$implicit;M(3),X(`in <`,e.component,`>`)}}function uP(e,t){if(e&1&&(z(0,`div`,34)(1,`div`,36)(2,`span`,37),J(3),B(),z(4,`span`,38),J(5),B()(),z(6,`div`,39),V(7,`app-source-link`,40),P(8,lP,4,1),B()()),e&2){let e=t.$implicit,n=K(2);M(2),j_(`background`,n.kindColor(e.kind)),M(),Y(e.kind),M(2),Y(e.name),M(2),R(`file`,e.file)(`line`,e.line),M(),F(e.component?8:-1)}}function dP(e,t){if(e&1){let e=W();z(0,`div`,35)(1,`p`,28),J(2,`No signals match.`),B(),z(3,`p`,30),J(4,`Try a different name or kind.`),B(),z(5,`button`,31),G(`click`,function(){return O(e),k(K(2).clearFilters())}),J(6,`Clear filters`),B()()}}function fP(e,t){if(e&1&&(z(0,`p`,32),J(1,`Signals from source scan (static analysis):`),B(),z(2,`div`,33),I(3,uP,9,7,`div`,34,UN,!1,dP,7,0,`div`,35),B()),e&2){let e=K();M(3),L(e.filteredSourceSignals())}}function pP(e,t){if(e&1&&(z(0,`span`,47),J(1),B()),e&2){let e=K().$implicit;M(),X(``,e.missed,` earlier not captured`)}}function mP(e,t){if(e&1&&(z(0,`li`)(1,`span`,45)(2,`time`),J(3),yv(4,`date`),B(),z(5,`span`,46),J(6),B(),z(7,`span`),J(8),B(),P(9,pP,2,1,`span`,47),B(),z(10,`pre`),J(11),yv(12,`json`),B()()),e&2){let e=t.$implicit,n=K(3);M(3),Y(Sv(4,7,e.at,`HH:mm:ss.SSS`)),M(2),M_(`source-`+e.source),M(),Y(n.sourceLabel(e.source)),M(2),X(`epoch `,e.epoch),M(),F(e.missed?9:-1),M(2),Y(xv(12,10,e.value))}}function hP(e,t){if(e&1&&(z(0,`h4`,42),J(1),B(),z(2,`p`,43),J(3),B(),z(4,`ol`,44),I(5,mP,13,12,`li`,null,WN),B()),e&2){let e=K(),t=e.id,n=e.label,r=K();R(`id`,`history-heading-`+t),M(),Y(n),M(2),Y(r.historySummary(t)),M(),N(`aria-labelledby`,`history-heading-`+t),M(),L(r.selectedHistory())}}function gP(e,t){e&1&&P(0,hP,7,4),e&2&&F(K().selectedHistory().length?0:-1)}function _P(e,t){if(e&1&&(z(0,`span`,56),J(1),B()),e&2){let e=K().$implicit;M_(`tone-`+K(2).statusTone(e.status)),M(),Y(e.status)}}function vP(e,t){if(e&1&&(z(0,`span`,52),J(1),B()),e&2){let e=t;M(),Z(``,e,` `,e===1?`change`:`changes`)}}function yP(e,t){if(e&1&&(z(0,`span`,54),J(1),yv(2,`json`),B()),e&2){let e=K().$implicit;M(),Y(xv(2,1,e.error))}}function bP(e,t){if(e&1&&(z(0,`span`,54),J(1),yv(2,`json`),B()),e&2){let e=K().$implicit;M(),Y(xv(2,1,e.value))}}function xP(e,t){e&1&&(z(0,`p`,30),J(1,` This resource has no name. Pass `),z(2,`code`),J(3,`debugName`),B(),J(4,` to `),z(5,`code`),J(6,`resource()`),B(),J(7,` or `),z(8,`code`),J(9,`httpResource()`),B(),J(10,` to name it here. `),B())}function SP(e,t){if(e&1&&(z(0,`dt`),J(1,`Loading`),B(),z(2,`dd`),J(3),B()),e&2){let e=K(2).$implicit;M(3),Y(e.isLoading?`yes`:`no`)}}function CP(e,t){if(e&1&&(z(0,`dt`),J(1,`HTTP status`),B(),z(2,`dd`),J(3),B()),e&2){let e=K(2).$implicit;M(3),Y(e.statusCode)}}function wP(e,t){if(e&1&&(z(0,`dt`),J(1,`Params`),B(),z(2,`dd`)(3,`pre`,60),J(4),yv(5,`json`),B()()),e&2){let e=K(2).$implicit;M(3),N(`aria-label`,`Params of `+e.name),M(),Y(xv(5,2,e.params))}}function TP(e,t){if(e&1&&(z(0,`dt`),J(1,`Value`),B(),z(2,`dd`)(3,`pre`,60),J(4),yv(5,`json`),B()()),e&2){let e=K(2).$implicit;M(3),N(`aria-label`,`Value of `+e.name),M(),Y(xv(5,2,e.value))}}function EP(e,t){if(e&1&&(z(0,`dt`),J(1,`Error`),B(),z(2,`dd`)(3,`pre`,60),J(4),yv(5,`json`),B()()),e&2){let e=K(2).$implicit;M(3),N(`aria-label`,`Error of `+e.name),M(),Y(xv(5,2,e.error))}}function DP(e,t){if(e&1&&(z(0,`li`)(1,`span`,61),J(2),B(),z(3,`span`,62),J(4),B()()),e&2){let e=t.$implicit,n=K(5);M(),j_(`background`,n.kindColor(e.kind)),M(),Y(e.kind),M(2),Y(e.label??e.id)}}function OP(e,t){if(e&1&&(z(0,`ul`,42),I(1,DP,5,4,`li`,null,GN),B()),e&2){let e=K(2).$implicit,t=K(2);R(`id`,`resource-internals-`+e.id),M(),L(t.internalsOf(e))}}function kP(e,t){if(e&1){let e=W();z(0,`div`,55)(1,`h3`,57),J(2),B(),P(3,xP,11,0,`p`,30),z(4,`dl`)(5,`dt`),J(6,`Status`),B(),z(7,`dd`),J(8),B(),P(9,SP,4,1),P(10,CP,4,1),P(11,wP,6,4),P(12,TP,6,4),P(13,EP,6,4),B(),Ug(14,58),z(15,`button`,59),G(`click`,function(){O(e);let t=K(3);return k(t.showInternals.set(!t.showInternals()))}),J(16),B(),P(17,OP,3,1,`ul`,42),B()}if(e&2){let e=K().$implicit,t=K(2),n=u_(23);R(`id`,`signal-detail-`+e.id),M(2),Y(e.name),M(),F(e.named?-1:3),M(5),Y(e.status??`unknown`),M(),F(e.isLoading===void 0?-1:9),M(),F(e.statusCode===void 0?-1:10),M(),F(e.params===void 0?-1:11),M(),F(e.value===void 0?-1:12),M(),F(e.error===void 0?-1:13),M(),R(`ngTemplateOutlet`,n)(`ngTemplateOutletContext`,hv(16,BN,e.id)),M(),N(`aria-expanded`,t.showInternals())(`aria-controls`,`resource-internals-`+e.id),M(),Z(` `,t.showInternals()?`Hide`:`Show`,` internal signals (`,e.nodeIds.length,`) `),M(),F(t.showInternals()?17:-1)}}function AP(e,t){if(e&1){let e=W();z(0,`li`)(1,`button`,50),G(`click`,function(){let t=O(e).$implicit;return k(K(2).select(t.id))}),z(2,`span`,36)(3,`span`,37),J(4,`resource`),B(),z(5,`span`,38),J(6),B(),P(7,_P,2,3,`span`,51),P(8,vP,2,2,`span`,52),V(9,`span`,53),B(),P(10,yP,3,3,`span`,54)(11,bP,3,3,`span`,54),B(),P(12,kP,18,18,`div`,55),B()}if(e&2){let e,n=t.$implicit,r=K(2);M(),q(`selected`,r.selectedId()===n.id),N(`aria-expanded`,r.selectedId()===n.id)(`aria-controls`,`signal-detail-`+n.id)(`data-card`,n.id),M(2),j_(`background`,r.kindColor(`resource`)),M(3),Y(n.name),M(),F(n.status?7:-1),M(),F((e=n.changes)?8:-1,e),M(2),F(n.error===void 0?n.value===void 0?-1:11:10),M(2),F(r.selectedId()===n.id?12:-1)}}function jP(e,t){if(e&1&&(z(0,`h2`,48),J(1,`Resources`),B(),z(2,`ul`,49),I(3,AP,13,12,`li`,null,GN),B()),e&2){let e=K();M(3),L(e.filteredResources())}}function MP(e,t){if(e&1&&(z(0,`span`,52),J(1),B()),e&2){let e=t;M(),Z(``,e,` `,e===1?`change`:`changes`)}}function NP(e,t){if(e&1&&(z(0,`span`,54),J(1),yv(2,`json`),B()),e&2){let e=K().$implicit;M(),Y(xv(2,1,e.value))}}function PP(e,t){if(e&1&&(z(0,`span`,41),J(1,`·`),B(),z(2,`span`),J(3),B()),e&2){let e=K().$implicit,t=K(2);M(3),X(`Deps: `,t.getDependencies(e).length)}}function FP(e,t){if(e&1&&(z(0,`span`,41),J(1,`·`),B(),z(2,`span`),J(3),B()),e&2){let e=K().$implicit,t=K(2);M(3),X(`Consumers: `,t.getConsumers(e).length)}}function IP(e,t){if(e&1&&(z(0,`dt`),J(1,`Value`),B(),z(2,`dd`)(3,`pre`,60),J(4),yv(5,`json`),B()()),e&2){let e=K(4);M(3),N(`aria-label`,`Value of `+(e.selectedNode().label??`signal`)),M(),Y(xv(5,2,e.selectedNode().value))}}function LP(e,t){if(e&1){let e=W();z(0,`li`)(1,`button`,65),G(`click`,function(){let t=O(e).$implicit;return k(K(5).jumpTo(t))}),z(2,`span`,61),J(3),B(),z(4,`span`,62),J(5),B()()()}if(e&2){let e=t.$implicit,n=K(5);M(),N(`aria-label`,`Go to `+e.kind+` `+(e.label??e.id)),M(),j_(`background`,n.kindColor(e.kind)),M(),Y(e.kind),M(2),Y(e.label??e.id)}}function RP(e,t){if(e&1&&(z(0,`h4`),J(1,`Dependencies (producers)`),B(),z(2,`ul`),I(3,LP,6,5,`li`,null,GN),B()),e&2){let e=K(4);M(3),L(e.getDependencies(e.selectedNode()))}}function zP(e,t){if(e&1){let e=W();z(0,`li`)(1,`button`,65),G(`click`,function(){let t=O(e).$implicit;return k(K(5).jumpTo(t))}),z(2,`span`,61),J(3),B(),z(4,`span`,62),J(5),B()()()}if(e&2){let e=t.$implicit,n=K(5);M(),N(`aria-label`,`Go to `+e.kind+` `+(e.label??e.id)),M(),j_(`background`,n.kindColor(e.kind)),M(),Y(e.kind),M(2),Y(e.label??e.id)}}function BP(e,t){if(e&1&&(z(0,`h4`),J(1,`Consumers`),B(),z(2,`ul`),I(3,zP,6,5,`li`,null,GN),B()),e&2){let e=K(4);M(3),L(e.getConsumers(e.selectedNode()))}}function VP(e,t){e&1&&(z(0,`p`,30),J(1),B()),e&2&&(M(),Y(t))}function HP(e,t){if(e&1&&(z(0,`div`,55)(1,`h3`,57),J(2),B(),z(3,`dl`)(4,`dt`),J(5,`Kind`),B(),z(6,`dd`),J(7),B(),z(8,`dt`),J(9,`Epoch`),B(),z(10,`dd`),J(11),B(),P(12,IP,6,4),B(),P(13,RP,5,0),P(14,BP,5,0),P(15,VP,2,1,`p`,30),Ug(16,58),B()),e&2){let e,t=K().$implicit,n=K(2),r=u_(23);R(`id`,`signal-detail-`+t.id),M(2),Y(n.selectedNode().label??n.selectedNode().id),M(5),Y(n.selectedNode().kind),M(4),Y(n.selectedNode().epoch),M(),F(n.selectedNode().value===void 0?-1:12),M(),F(n.getDependencies(n.selectedNode()).length?13:-1),M(),F(n.getConsumers(n.selectedNode()).length?14:-1),M(),F((e=n.writeHint())?15:-1,e),M(),R(`ngTemplateOutlet`,r)(`ngTemplateOutletContext`,hv(10,VN,t.id))}}function UP(e,t){if(e&1){let e=W();z(0,`li`)(1,`button`,50),G(`click`,function(){let t=O(e).$implicit;return k(K(2).select(t.id))}),z(2,`span`,36)(3,`span`,37),J(4),B(),z(5,`span`,38),J(6),B(),P(7,MP,2,2,`span`,52),V(8,`span`,53),B(),P(9,NP,3,3,`span`,54),z(10,`span`,39)(11,`span`),J(12),B(),P(13,PP,4,1),P(14,FP,4,1),B()(),P(15,HP,17,12,`div`,55),B()}if(e&2){let e,n=t.$implicit,r=K(2);M(),q(`selected`,r.selectedId()===n.id),N(`aria-expanded`,r.selectedId()===n.id)(`aria-controls`,`signal-detail-`+n.id)(`data-card`,n.id),M(2),j_(`background`,r.kindColor(n.kind)),M(),Y(n.kind),M(2),Y(n.label??`(unnamed)`),M(),F((e=r.changeCount(n.id))?7:-1,e),M(2),F(n.value===void 0?-1:9),M(3),X(`Epoch: `,n.epoch),M(),F(r.getDependencies(n).length?13:-1),M(),F(r.getConsumers(n).length?14:-1),M(),F(r.selectedId()===n.id&&r.selectedNode()?15:-1)}}function WP(e,t){if(e&1){let e=W();z(0,`button`,31),G(`click`,function(){return O(e),k(K(3).clearFilters())}),J(1,`Clear filters`),B()}}function GP(e,t){if(e&1&&(z(0,`li`,64)(1,`p`,28),J(2),B(),z(3,`p`,30),J(4),B(),P(5,WP,2,0,`button`,66),B()),e&2){let e=K(2);M(2),X(` `,e.hasAnySignals()?`No signals match.`:`No signals in this graph.`,` `),M(2),X(` `,e.hasAnySignals()?`Try a different name or kind.`:`Select a component that reads signals, or interact with the page to create some.`,` `),M(),F(e.hasAnySignals()?5:-1)}}function KP(e,t){if(e&1&&(z(0,`h2`,48),J(1,`Signals`),B(),z(2,`ul`,63),I(3,UP,16,15,`li`,null,GN,!1,GP,6,3,`li`,64),B()),e&2){let e=K();M(3),L(e.filteredNodes())}}var qP=`follow`;function JP(e){return Object.keys(e.pages).length?e.pages:e.graph?{[e.graph.pageId??``]:e.graph}:{}}var YP=`env:`,XP=50,ZP={selected:`picked`,routed:`rendered by the router`,root:`first component with signals`},QP={write:`set`,sample:`sampled`,initial:`initial`},$P={resolved:`ok`,local:`ok`,loading:`warn`,reloading:`warn`,error:`danger`},eF={signal:`#facc15`,computed:`#60a5fa`,linkedSignal:`#34d399`,effect:`#fb923c`,template:`#94a3b8`,afterRenderEffectPhase:`#f472b6`,childSignalProp:`#fef08a`,"input (signal)":`#f59e0b`,"input.required (signal)":`#f59e0b`,"output (signal)":`#ec4899`,"model (signal)":`#14b8a6`,"model.required (signal)":`#14b8a6`,"viewChild (signal)":`#a3e635`,"viewChild.required (signal)":`#a3e635`,"viewChildren (signal)":`#a3e635`,"contentChild (signal)":`#fda4af`,"contentChild.required (signal)":`#fda4af`,"contentChildren (signal)":`#fda4af`,resource:`#06b6d4`,unknown:`#a1a1aa`},tF=class e{rpc=$(null);destroyRef=E(ws);host=E(Nl);filterInput=Kv(`filterInput`);injector=E(Ss);pageId=uE();cleanups=[];graphLoad=0;treePages=j({});graphState=j({graph:null,pages:{}});chosenPageId=j(null);announcement=j(``);graphPages=Q(()=>JP(this.graphState()));shownPageId=Nv({source:()=>({pages:this.graphPages(),newest:this.graphState().graph?.pageId??null,chosen:this.chosenPageId()}),computation:({pages:e,newest:t,chosen:n},r)=>{let i={};for(let n of Object.keys(e))i[n]={pageId:n,reportedAt:+(n===t)};return dE(i,{chosen:n,host:this.pageId,previous:r?.value??null})}});reported=Q(()=>{let e=this.shownPageId();return e===null?null:this.graphPages()[e]??null});unsupported=Q(()=>!!this.reported()?.unsupported);graph=Q(()=>{let e=this.reported();return e?.unsupported?null:e});graphOwner=Q(()=>{let e=this.graph();return e?`${e.pageId??``}|${e.component?.id??e.injector?.id??``}`:null});pickedByPage=j({});picked=Q(()=>this.pickedByPage()[this.targetPageId()??``]??null);pageOptions=Q(()=>{if(this.pageId)return[];let e=this.treePages();return Object.keys(this.graphPages()).map(t=>{let n=e[t];return{value:t,label:n?.title||n?.url||`Page ${t}`,hint:n?.url}})});showInternals=j(!1);sourceSignals=j([]);sourceLoaded=j(!1);sourceFailed=j(!1);graphFailed=j(!1);loadFailed=Q(()=>this.sourceFailed()||this.graphFailed());retrying=j(!1);filter=j(``);resources=Q(()=>this.graph()?.resources??[]);internalIds=Q(()=>new Set(this.resources().flatMap(e=>e.nodeIds)));visibleNodes=Q(()=>{let e=this.internalIds();return(this.graph()?.nodes??[]).filter(t=>!e.has(t.id))});hasAnySignals=Q(()=>this.visibleNodes().length+this.resources().length>0);kindCounts=Q(()=>{let e=this.graph()?[...this.visibleNodes().map(e=>e.kind),...this.resources().map(()=>`resource`)]:this.sourceSignals().map(e=>e.kind),t=new Map;for(let n of e)t.set(n,(t.get(n)??0)+1);return[...t].map(([e,t])=>({kind:e,count:t}))});kind=Nv({source:this.graphOwner,computation:(e,t)=>{let n=t?.value??null;return n&&jv(this.kindCounts).some(e=>e.kind===n)?n:null}});kindChips=Q(()=>{let e=this.kindCounts(),t=this.kind();return t&&!e.some(e=>e.kind===t)?[...e,{kind:t,count:0}]:e});kindTotal=Q(()=>this.kindCounts().reduce((e,t)=>e+t.count,0));selectedId=Nv({source:this.graphOwner,computation:()=>null});selectedNode=Q(()=>this.graph()?.nodes.find(e=>e.id===this.selectedId())??null);jumpedPast=j(null);jumpNote=Q(()=>{let e=this.jumpedPast();return!e||this.filter()||this.kind()||this.selectedId()!==e.id?``:`Cleared the filters to show ${e.label}.`});selectedHistory=Q(()=>{let e=this.selectedId();return e?[...this.graph()?.history?.[e]??[]].reverse():[]});writeHint=Q(()=>{let e=this.selectedNode(),t=this.graph();if(!e||!t||t.writeHook===!1||e.kind!==`signal`&&e.kind!==`linkedSignal`)return``;if(!e.label)return`This signal has no name, so its history holds sampled values only. Pass a debugName in its options, for example signal(0, { debugName: 'count' }).`;let n=t.history?.[e.id]??[];return n.some(e=>e.source===`write`)||!n.some(e=>e.source===`sample`)?``:`Every change here was sampled. Writes are matched by name, kind, version and value, so another live signal with the same name and value can hide them.`});kindLegend=Object.entries(eF).map(([e,t])=>({kind:e,color:t}));filteredResources=Q(()=>{let e=this.filter().toLowerCase(),t=this.kind();return t&&t!==`resource`?[]:this.resources().filter(t=>!e||t.name.toLowerCase().includes(e)||e.length>=3&&`resource`.startsWith(e))});filteredNodes=Q(()=>{let e=this.filter().toLowerCase(),t=this.kind();return this.visibleNodes().filter(n=>(!t||n.kind===t)&&(!e||(n.label??``).toLowerCase().includes(e)||n.kind.toLowerCase().includes(e))).sort((e,t)=>e.id.localeCompare(t.id,void 0,{numeric:!0}))});filteredSourceSignals=Q(()=>{let e=this.filter().toLowerCase(),t=this.kind();return this.sourceSignals().filter(n=>(!t||n.kind===t)&&(!e||n.name.toLowerCase().includes(e)||n.kind.toLowerCase().includes(e)||n.file.toLowerCase().includes(e)))});targetPageId=Q(()=>this.pageId??(this.shownPageId()||null)??this.graph()?.pageId??this.latestTreePage()?.pageId??null);latestTreePage=Q(()=>{let e=null;for(let[t,n]of Object.entries(this.treePages())){let r=n.reportedAt??0;(!e||r>e.reportedAt)&&(e={pageId:t,reportedAt:r})}return e});componentOptions=Q(()=>{let e=this.targetPageId(),t=(e?this.treePages()[e]?.roots:void 0)??[],n=[],r=e=>{for(let t of e)n.push(t),r(t.children)};r(t);let i=this.graph()?.environments??[];if(!n.length&&!i.length)return[];let a=new Map;for(let e of n)a.set(e.name,(a.get(e.name)??0)+1);let o=new Map,s=[{value:qP,label:`Follow the routed component`,hint:`automatic`},...i.map(e=>({value:YP+e.id,label:this.injectorLabel(e),hint:`injector`}))];for(let e of n){let t=(o.get(e.name)??0)+1;o.set(e.name,t),s.push({value:e.id,label:(a.get(e.name)??0)>1?`${e.name} #${t}`:e.name,hint:`<${e.tag}>`})}return s});pickerValue=Q(()=>{let e=this.picked();return e&&this.componentOptions().some(t=>t.value===e)?e:qP});constructor(){dc(()=>{let e=this.rpc();e&&(this.loadSignalGraph(e),this.loadSourceSignals(e))}),this.destroyRef.onDestroy(()=>{for(let e of this.cleanups.splice(0))e()})}async loadSignalGraph(e){for(let e of this.cleanups.splice(0))e();let t=++this.graphLoad,n=()=>this.destroyRef.destroyed||t!==this.graphLoad,r=e.scope(`pangular`);try{let e=await r.rpc.sharedState(`signal-graph`);if(n())return;this.graphFailed.set(!1);let t=e=>{let t=e,n=t?.pages&&typeof t.pages==`object`?t.pages:{},r={graph:t?.graph??null,pages:n};this.notePageGone(JP(r)),this.graphState.set(r)};t(e.value()),this.cleanups.push(e.on(`updated`,t))}catch{if(n())return;this.graphState.set({graph:null,pages:{}}),this.graphFailed.set(!0)}try{let e=await r.rpc.sharedState(`component-tree`);if(n())return;let t=e=>{let t=e?.pages;this.treePages.set(t&&typeof t==`object`?t:{})};t(e.value()),this.cleanups.push(e.on(`updated`,t))}catch{n()||this.treePages.set({})}}notePageGone(e){let t=Object.keys(this.graphPages()).filter(t=>!e[t]);t.length&&this.pickedByPage.update(e=>{let n={...e};for(let e of t)delete n[e];return n});let n=this.chosenPageId();if(!n||e[n])return;let r=this.pageOptions().find(e=>e.value===n)?.label??`The chosen page`;this.chosenPageId.set(null),this.announcement.set(`${r} closed, so this shows another page.`)}selectPage(e){if(!e||e===this.shownPageId())return;this.chosenPageId.set(e);let t=this.pageOptions().find(t=>t.value===e)?.label??e;this.announcement.set(`Showing the signal graph of ${t}.`)}pickComponent(e){let t=e&&e!==qP?e:null,n=this.targetPageId()??void 0;this.pickedByPage.update(e=>{let r={...e};return t?r[n??``]=t:delete r[n??``],r});let r=this.rpc();if(!r)return;let i=t?.startsWith(YP)?{pageId:n,env:t.slice(4)}:{pageId:n,id:t};r.scope(`pangular`).rpc.call(`select-signal-target`,i).catch(()=>{})}injectorLabel(e){return e.name===`Root`?`Root services`:e.name}sourceNote(e){return ZP[e]}async loadSourceSignals(e){let t=e.scope(`pangular`);try{let e=await t.rpc.call(`get-signals`);this.sourceSignals.set(e),this.sourceFailed.set(!1)}catch{this.sourceFailed.set(!0)}finally{this.sourceLoaded.set(!0)}}async retry(){let e=this.rpc();if(!e||this.retrying())return;let t=document.activeElement;this.retrying.set(!0);try{await Promise.all([this.loadSignalGraph(e),this.loadSourceSignals(e)])}finally{this.retrying.set(!1)}this.destroyRef.destroyed||zd(()=>{(!t?.isConnected||document.activeElement===document.body)&&this.filterInput()?.nativeElement.focus()},{injector:this.injector})}clearFilters(){this.resetFilters(),this.filterInput()?.nativeElement.focus()}resetFilters(){this.filter.set(``),this.kind.set(null)}select(e){this.selectedId.set(this.selectedId()===e?null:e),this.showInternals.set(!1)}jumpTo(e){let t=this.resources().find(t=>t.nodeIds.includes(e.id)),n=t?.id??e.id,r=t?!this.filteredResources().some(e=>e.id===n):!this.filteredNodes().some(e=>e.id===n);r&&this.resetFilters(),this.jumpedPast.set(r?{id:n,label:t?.name??e.label??e.id}:null),this.selectedId.set(n),this.showInternals.set(!!t),zd(()=>{let e=[...this.host.nativeElement.querySelectorAll(`.node-card[data-card]`)].find(e=>e.dataset.card===n);e?.scrollIntoView?.({block:`nearest`}),e?.focus({preventScroll:!0})},{injector:this.injector})}changeCount(e){let t=this.graph(),n=t?.nodes.find(t=>t.id===e)?.changes??t?.resources?.find(t=>t.id===e)?.changes;return n===void 0?(t?.history?.[e]??[]).reduce((e,t)=>e+(t.source===`initial`?0:1+(t.missed??0)),0):n}historySummary(e){let t=this.changeCount(e),n=this.graph()?.history?.[e]?.length??0;return t?`${`${t} ${t===1?`change`:`changes`} recorded`}${n>=XP&&t>=n?`, showing the last ${n}`:``}, newest first.`:`No changes recorded yet. The entry below is the value seen first.`}statusTone(e){return $P[e]??`neutral`}internalsOf(e){let t=new Set(e.nodeIds);return(this.graph()?.nodes??[]).filter(e=>t.has(e.id))}sourceLabel(e){return QP[e]}kindColor(e){return eF[e]??eF.unknown}relations=Q(()=>{let e=new Map,t=this.graph();if(!t)return e;for(let n of t.nodes)e.set(n.id,{deps:[],consumers:[]});for(let n of t.edges){let r=t.nodes[n.producer],i=t.nodes[n.consumer];r&&i&&(e.get(i.id)?.deps.push(r),e.get(r.id)?.consumers.push(i))}return e});getDependencies(e){return this.relations().get(e.id)?.deps??[]}getConsumers(e){return this.relations().get(e.id)?.consumers??[]}static ɵfac=function(t){return new(t||e)};static ɵcmp=Wh({type:e,selectors:[[`app-signal-inspector`]],viewQuery:function(e,t){e&1&&c_(t.filterInput,zN,5),e&2&&l_()},inputs:{rpc:[1,`rpc`]},decls:28,vars:17,consts:[[`filterInput`,``],[`historyTpl`,``],[1,`toolbar`],[`type`,`search`,`placeholder`,`Filter by name or kind…`,`aria-label`,`Filter signals by name or kind`,3,`input`,`keydown.escape`,`value`],[1,`picker`,`page-picker`],[1,`picker`],[`role`,`status`,1,`sr-only`],[1,`showing`],[`role`,`status`,1,`fallback`],[1,`intro`],[`role`,`group`,`aria-label`,`Filter by kind`,1,`kinds`],[`role`,`status`,1,`empty`],[`role`,`alert`,1,`empty`,3,`compact`],[1,`empty`],[`role`,`status`,1,`jump-note`],[`id`,`signals-page-label`,1,`label-key`],[`labelledBy`,`signals-page-label`,3,`valueChange`,`options`,`value`],[`id`,`signals-component-label`,1,`label-key`],[`labelledBy`,`signals-component-label`,3,`valueChange`,`options`,`value`],[1,`showing-name`],[1,`mono`],[1,`source-note`],[`type`,`button`,1,`kind-chip`,3,`click`],[1,`count`],[`type`,`button`,1,`kind-chip`,3,`active`],[`aria-hidden`,`true`,1,`dot`],[1,`chip-text`],[`aria-hidden`,`true`,1,`spinner`],[1,`empty-title`],[`role`,`alert`,1,`empty`],[1,`hint`],[`type`,`button`,1,`reset`,3,`click`],[1,`source-label`],[1,`nodes`],[1,`node-card`],[`role`,`status`,1,`empty`,`compact`],[1,`node-header`],[1,`kind-badge`],[1,`node-label`],[1,`node-meta`],[1,`file`,3,`file`,`line`],[`aria-hidden`,`true`,1,`sep`],[3,`id`],[1,`history-summary`],[`tabindex`,`0`,1,`history`,`scroll-box`],[1,`history-meta`],[1,`source-tag`],[1,`missed`],[1,`list-heading`],[`role`,`list`,1,`nodes`,`resources`],[`type`,`button`,1,`node-card`,3,`click`],[1,`status-tag`,3,`class`],[1,`changed-badge`],[`aria-hidden`,`true`,1,`chevron`],[1,`node-value`],[1,`detail-panel`,3,`id`],[1,`status-tag`],[1,`detail-title`],[3,`ngTemplateOutlet`,`ngTemplateOutletContext`],[`type`,`button`,1,`reset`,`internals-toggle`,3,`click`],[`role`,`region`,`tabindex`,`0`,1,`scroll-box`],[1,`kind-badge`,`sm`],[1,`rel-label`],[`role`,`list`,`appRovingList`,`button.node-card`,1,`nodes`],[1,`empty`,`compact`],[`type`,`button`,1,`rel-link`,3,`click`],[`type`,`button`,1,`reset`]],template:function(e,t){if(e&1&&(z(0,`div`,2)(1,`input`,3,0),G(`input`,function(e){return t.filter.set(e.target.value)})(`keydown.escape`,function(){return t.filter.set(``)}),B(),P(3,KN,4,2,`div`,4),P(4,qN,4,2,`div`,5),B(),z(5,`p`,6),J(6),B(),P(7,YN,6,3,`p`,7)(8,XN,5,1,`p`,7),P(9,ZN,2,0,`p`,8),z(10,`p`,9),P(11,QN,1,0)(12,$N,1,0)(13,eP,1,0),B(),P(14,tP,2,0,`p`,8),P(15,nP,2,0,`p`,8),P(16,rP,2,2,`p`,8),P(17,aP,7,4,`div`,10),P(18,oP,4,0,`div`,11),P(19,sP,7,4,`div`,12)(20,cP,14,0,`div`,13),P(21,fP,6,1),ag(22,gP,1,1,`ng-template`,null,1,wv),z(24,`p`,14),J(25),B(),P(26,jP,5,0),P(27,KP,6,1)),e&2){let e,n;M(),R(`value`,t.filter()),M(2),F(t.pageOptions().length>1?3:-1),M(),F(t.componentOptions().length?4:-1),M(2),Y(t.announcement()),M(),F((e=t.graph()?.component)?7:(e=t.graph()?.injector)?8:-1,e),M(2),F(t.graph()&&t.picked()&&t.graph().source!==`selected`?9:-1),M(2),F(t.graph()?.injector?11:t.graph()?12:13),M(3),F(t.unsupported()?14:-1),M(),F(t.graph()?.writeHook===!1?15:-1),M(),F((n=t.graph()?.nodeCount)?16:-1,n),M(),F(t.kindChips().length?17:-1),M(),F(!t.graph()&&!t.sourceLoaded()?18:-1),M(),F(!t.graph()&&t.sourceLoaded()&&t.loadFailed()?19:!t.graph()&&t.sourceLoaded()&&t.sourceSignals().length===0?20:-1),M(2),F(!t.graph()&&t.sourceSignals().length>0?21:-1),M(4),Y(t.jumpNote()),M(),F(t.graph()&&t.filteredResources().length?26:-1),M(),F(t.graph()&&(t.visibleNodes().length||!t.filteredResources().length)?27:-1)}},dependencies:[sb,RN,GD,TO,fb,pb],styles:[`[_nghost-%COMP%] {
+}`]})},dP=[`ArrowDown`,`ArrowUp`,`Home`,`End`],fP=`[aria-pressed="true"], [aria-expanded="true"], [aria-current]:not([aria-current="false"]), .selected`,pP=class e{appRovingList=$(``);host=E(Nl).nativeElement;current=null;focusInside=!1;constructor(){let e=E(ws);zd(()=>{if(this.sync(),typeof MutationObserver>`u`)return;let t=new MutationObserver(()=>this.sync());t.observe(this.host,{childList:!0,subtree:!0}),e.onDestroy(()=>t.disconnect())})}isItem(e){let t=this.appRovingList();return!!t&&!!e?.matches(t)}items(){let e=this.appRovingList();return e?[...this.host.querySelectorAll(e)]:[]}sync(){let e=this.items(),t=!1;if(!this.current||!this.host.contains(this.current)){let n=document.activeElement;t=this.focusInside&&(!n||n===document.body),this.current=e.find(e=>e.matches(fP))??e[0]??null}for(let t of e){let e=t===this.current?`0`:`-1`;t.getAttribute(`tabindex`)!==e&&t.setAttribute(`tabindex`,e)}t&&this.current?.focus()}onFocusIn(e){this.focusInside=!0;let t=e.target;this.isItem(t)&&t!==this.current&&(this.current?.setAttribute(`tabindex`,`-1`),this.current=t,t.setAttribute(`tabindex`,`0`))}onFocusOut(e){let t=e.relatedTarget;if(t&&this.host.contains(t))return;let n=e.target;setTimeout(()=>{n?.isConnected!==!1&&!this.host.contains(document.activeElement)&&(this.focusInside=!1)})}onKey(e){if(!dP.includes(e.key)||e.altKey||e.ctrlKey||e.metaKey)return;let t=e.target;if(!this.isItem(t))return;let n=this.items(),r=n.indexOf(t);if(r<0)return;let i={ArrowDown:Math.min(r+1,n.length-1),ArrowUp:Math.max(r-1,0),Home:0,End:n.length-1}[e.key];e.preventDefault(),n[i].focus()}static ɵfac=function(t){return new(t||e)};static ɵdir=Jh({type:e,selectors:[[``,`appRovingList`,``]],hostBindings:function(e,t){e&1&&G(`keydown`,function(e){return t.onKey(e)})(`focusin`,function(e){return t.onFocusIn(e)})(`focusout`,function(e){return t.onFocusOut(e)})},inputs:{appRovingList:[1,`appRovingList`]}})},mP=[`filterInput`],hP=e=>({id:e,label:`Status history`}),gP=e=>({id:e,label:`Value history`}),_P=(e,t)=>t.kind,vP=(e,t)=>t.name+t.file+t.line,yP=(e,t)=>t.epoch,bP=(e,t)=>t.id;function xP(e,t){if(e&1){let e=W();z(0,`div`,4)(1,`span`,15),J(2,`Page`),B(),z(3,`app-select`,16),G(`valueChange`,function(t){return O(e),k(K().selectPage(t))}),B()()}if(e&2){let e=K();M(3),R(`options`,e.pageOptions())(`value`,e.shownPageId())}}function SP(e,t){if(e&1){let e=W();z(0,`div`,5)(1,`span`,17),J(2,`Graph of`),B(),z(3,`app-select`,18),G(`valueChange`,function(t){return O(e),k(K().pickComponent(t))}),B()()}if(e&2){let e=K();M(3),R(`options`,e.componentOptions())(`value`,e.pickerValue())}}function CP(e,t){if(e&1&&(z(0,`span`,21),J(1),B()),e&2){let e=K(2);M(),Y(e.sourceNote(e.graph().source))}}function wP(e,t){if(e&1&&(z(0,`p`,7)(1,`span`,19),J(2),B(),z(3,`span`,20),J(4),B(),P(5,CP,2,1,`span`,21),B()),e&2){let e=t,n=K();M(2),Y(e.name),M(2),Y(e.path),M(),F(n.graph().source?5:-1)}}function TP(e,t){if(e&1&&(z(0,`p`,7)(1,`span`,19),J(2),B(),z(3,`span`,21),J(4,`environment injector`),B()()),e&2){let e=K();M(2),Y(e.injectorLabel(t))}}function EP(e,t){e&1&&(z(0,`p`,8),J(1,` The picked component or injector is gone or has no signal graph, so this shows another one. `),B())}function DP(e,t){e&1&&J(0,` The effects registered on this injector and the signals they read. A signal that no effect reads is not part of the graph. Pick a kind to filter. `)}function OP(e,t){e&1&&J(0,` The live signal graph of one component. Only signals that its template or an effect has read appear here; a signal nothing has read yet is not part of the graph. Pick a kind to filter. `)}function kP(e,t){e&1&&J(0,` Every signal, computed and effect found in your source. Pick a kind to filter. `)}function AP(e,t){e&1&&(z(0,`p`,8),J(1,` The live signal graph needs Angular 20.1 or later. This list comes from a source scan. `),B())}function jP(e,t){e&1&&(z(0,`p`,8),J(1,` The signal write hook did not load. Value history shows sampled values only, with no exact set entries. `),B())}function MP(e,t){if(e&1&&(z(0,`p`,8),J(1),B()),e&2){let e=K();M(),Z(` Showing `,e.graph().nodes.length,` of `,t,` signals. The rest and their edges are left out. `)}}function NP(e,t){if(e&1){let e=W();z(0,`button`,22),G(`click`,function(){let t=O(e).$implicit,n=K(2);return k(n.kind.set(n.kind()===t.kind?null:t.kind))}),V(1,`span`,25),z(2,`span`,26),J(3),B(),z(4,`span`,23),J(5),B()()}if(e&2){let e=t.$implicit,n=K(2);q(`active`,n.kind()===e.kind),N(`aria-pressed`,n.kind()===e.kind),M(),j_(`background`,n.kindColor(e.kind)),M(2),Y(e.kind),M(2),Y(e.count)}}function PP(e,t){if(e&1){let e=W();z(0,`div`,10)(1,`button`,22),G(`click`,function(){return O(e),k(K().kind.set(null))}),J(2,` All `),z(3,`span`,23),J(4),B()(),I(5,NP,6,7,`button`,24,_P),B()}if(e&2){let e=K();M(),q(`active`,!e.kind()),N(`aria-pressed`,!e.kind()),M(3),Y(e.kindTotal()),M(),L(e.kindChips())}}function FP(e,t){e&1&&(z(0,`div`,11),V(1,`span`,27),z(2,`p`,28),J(3,`Scanning source for signals…`),B()())}function IP(e,t){if(e&1){let e=W();z(0,`div`,29)(1,`p`,28),J(2,`Couldn't load signals`),B(),z(3,`p`,30),J(4,` The devtools server did not answer. Check that it is still running, then retry. `),B(),z(5,`button`,31),G(`click`,function(){return O(e),k(K().retry())}),J(6),B()()}if(e&2){let e=K();q(`compact`,e.sourceSignals().length>0),M(5),N(`aria-disabled`,e.retrying()||null),M(),X(` `,e.retrying()?`Retrying…`:`Retry`,` `)}}function LP(e,t){e&1&&(z(0,`div`,13)(1,`p`,28),J(2,`No signals found.`),B(),z(3,`p`,30),J(4,` No `),z(5,`code`),J(6,`signal()`),B(),J(7,`, `),z(8,`code`),J(9,`computed()`),B(),J(10,` or `),z(11,`code`),J(12,`effect()`),B(),J(13,` calls were found in your source. To see the live graph, run Angular 20.1 or later with the overlay connected and select a component. `),B()())}function RP(e,t){if(e&1&&(z(0,`span`,41),J(1,`·`),B(),z(2,`span`),J(3),B()),e&2){let e=K().$implicit;M(3),X(`in <`,e.component,`>`)}}function zP(e,t){if(e&1&&(z(0,`div`,34)(1,`div`,36)(2,`span`,37),J(3),B(),z(4,`span`,38),J(5),B()(),z(6,`div`,39),V(7,`app-source-link`,40),P(8,RP,4,1),B()()),e&2){let e=t.$implicit,n=K(2);M(2),j_(`background`,n.kindColor(e.kind)),M(),Y(e.kind),M(2),Y(e.name),M(2),R(`file`,e.file)(`line`,e.line),M(),F(e.component?8:-1)}}function BP(e,t){if(e&1){let e=W();z(0,`div`,35)(1,`p`,28),J(2,`No signals match.`),B(),z(3,`p`,30),J(4,`Try a different name or kind.`),B(),z(5,`button`,31),G(`click`,function(){return O(e),k(K(2).clearFilters())}),J(6,`Clear filters`),B()()}}function VP(e,t){if(e&1&&(z(0,`p`,32),J(1,`Signals from source scan (static analysis):`),B(),z(2,`div`,33),I(3,zP,9,7,`div`,34,vP,!1,BP,7,0,`div`,35),B()),e&2){let e=K();M(3),L(e.filteredSourceSignals())}}function HP(e,t){if(e&1&&(z(0,`span`,47),J(1),B()),e&2){let e=K().$implicit;M(),X(``,e.missed,` earlier not captured`)}}function UP(e,t){if(e&1&&(z(0,`li`)(1,`span`,45)(2,`time`),J(3),xv(4,`date`),B(),z(5,`span`,46),J(6),B(),z(7,`span`),J(8),B(),P(9,HP,2,1,`span`,47),B(),z(10,`pre`),J(11),xv(12,`json`),B()()),e&2){let e=t.$implicit,n=K(3);M(3),Y(wv(4,7,e.at,`HH:mm:ss.SSS`)),M(2),M_(`source-`+e.source),M(),Y(n.sourceLabel(e.source)),M(2),X(`epoch `,e.epoch),M(),F(e.missed?9:-1),M(2),Y(Cv(12,10,e.value))}}function WP(e,t){if(e&1&&(z(0,`h4`,42),J(1),B(),z(2,`p`,43),J(3),B(),z(4,`ol`,44),I(5,UP,13,12,`li`,null,yP),B()),e&2){let e=K(),t=e.id,n=e.label,r=K();R(`id`,`history-heading-`+t),M(),Y(n),M(2),Y(r.historySummary(t)),M(),N(`aria-labelledby`,`history-heading-`+t),M(),L(r.selectedHistory())}}function GP(e,t){e&1&&P(0,WP,7,4),e&2&&F(K().selectedHistory().length?0:-1)}function KP(e,t){if(e&1&&(z(0,`span`,56),J(1),B()),e&2){let e=K().$implicit;M_(`tone-`+K(2).statusTone(e.status)),M(),Y(e.status)}}function qP(e,t){if(e&1&&(z(0,`span`,52),J(1),B()),e&2){let e=t;M(),Z(``,e,` `,e===1?`change`:`changes`)}}function JP(e,t){if(e&1&&(z(0,`span`,54),J(1),xv(2,`json`),B()),e&2){let e=K().$implicit;M(),Y(Cv(2,1,e.error))}}function YP(e,t){if(e&1&&(z(0,`span`,54),J(1),xv(2,`json`),B()),e&2){let e=K().$implicit;M(),Y(Cv(2,1,e.value))}}function XP(e,t){e&1&&(z(0,`p`,30),J(1,` This resource has no name. Pass `),z(2,`code`),J(3,`debugName`),B(),J(4,` to `),z(5,`code`),J(6,`resource()`),B(),J(7,` or `),z(8,`code`),J(9,`httpResource()`),B(),J(10,` to name it here. `),B())}function ZP(e,t){if(e&1&&(z(0,`dt`),J(1,`Loading`),B(),z(2,`dd`),J(3),B()),e&2){let e=K(2).$implicit;M(3),Y(e.isLoading?`yes`:`no`)}}function QP(e,t){if(e&1&&(z(0,`dt`),J(1,`HTTP status`),B(),z(2,`dd`),J(3),B()),e&2){let e=K(2).$implicit;M(3),Y(e.statusCode)}}function $P(e,t){if(e&1&&(z(0,`dt`),J(1,`Params`),B(),z(2,`dd`)(3,`pre`,60),J(4),xv(5,`json`),B()()),e&2){let e=K(2).$implicit;M(3),N(`aria-label`,`Params of `+e.name),M(),Y(Cv(5,2,e.params))}}function eF(e,t){if(e&1&&(z(0,`dt`),J(1,`Value`),B(),z(2,`dd`)(3,`pre`,60),J(4),xv(5,`json`),B()()),e&2){let e=K(2).$implicit;M(3),N(`aria-label`,`Value of `+e.name),M(),Y(Cv(5,2,e.value))}}function tF(e,t){if(e&1&&(z(0,`dt`),J(1,`Error`),B(),z(2,`dd`)(3,`pre`,60),J(4),xv(5,`json`),B()()),e&2){let e=K(2).$implicit;M(3),N(`aria-label`,`Error of `+e.name),M(),Y(Cv(5,2,e.error))}}function nF(e,t){if(e&1&&(z(0,`li`)(1,`span`,61),J(2),B(),z(3,`span`,62),J(4),B()()),e&2){let e=t.$implicit,n=K(5);M(),j_(`background`,n.kindColor(e.kind)),M(),Y(e.kind),M(2),Y(e.label??e.id)}}function rF(e,t){if(e&1&&(z(0,`ul`,42),I(1,nF,5,4,`li`,null,bP),B()),e&2){let e=K(2).$implicit,t=K(2);R(`id`,`resource-internals-`+e.id),M(),L(t.internalsOf(e))}}function iF(e,t){if(e&1){let e=W();z(0,`div`,55)(1,`h3`,57),J(2),B(),P(3,XP,11,0,`p`,30),z(4,`dl`)(5,`dt`),J(6,`Status`),B(),z(7,`dd`),J(8),B(),P(9,ZP,4,1),P(10,QP,4,1),P(11,$P,6,4),P(12,eF,6,4),P(13,tF,6,4),B(),Ug(14,58),z(15,`button`,59),G(`click`,function(){O(e);let t=K(3);return k(t.showInternals.set(!t.showInternals()))}),J(16),B(),P(17,rF,3,1,`ul`,42),B()}if(e&2){let e=K().$implicit,t=K(2),n=u_(23);R(`id`,`signal-detail-`+e.id),M(2),Y(e.name),M(),F(e.named?-1:3),M(5),Y(e.status??`unknown`),M(),F(e.isLoading===void 0?-1:9),M(),F(e.statusCode===void 0?-1:10),M(),F(e.params===void 0?-1:11),M(),F(e.value===void 0?-1:12),M(),F(e.error===void 0?-1:13),M(),R(`ngTemplateOutlet`,n)(`ngTemplateOutletContext`,hv(16,hP,e.id)),M(),N(`aria-expanded`,t.showInternals())(`aria-controls`,`resource-internals-`+e.id),M(),Z(` `,t.showInternals()?`Hide`:`Show`,` internal signals (`,e.nodeIds.length,`) `),M(),F(t.showInternals()?17:-1)}}function aF(e,t){if(e&1){let e=W();z(0,`li`)(1,`button`,50),G(`click`,function(){let t=O(e).$implicit;return k(K(2).select(t.id))}),z(2,`span`,36)(3,`span`,37),J(4,`resource`),B(),z(5,`span`,38),J(6),B(),P(7,KP,2,3,`span`,51),P(8,qP,2,2,`span`,52),V(9,`span`,53),B(),P(10,JP,3,3,`span`,54)(11,YP,3,3,`span`,54),B(),P(12,iF,18,18,`div`,55),B()}if(e&2){let e,n=t.$implicit,r=K(2);M(),q(`selected`,r.selectedId()===n.id),N(`aria-expanded`,r.selectedId()===n.id)(`aria-controls`,`signal-detail-`+n.id)(`data-card`,n.id),M(2),j_(`background`,r.kindColor(`resource`)),M(3),Y(n.name),M(),F(n.status?7:-1),M(),F((e=n.changes)?8:-1,e),M(2),F(n.error===void 0?n.value===void 0?-1:11:10),M(2),F(r.selectedId()===n.id?12:-1)}}function oF(e,t){if(e&1&&(z(0,`h2`,48),J(1,`Resources`),B(),z(2,`ul`,49),I(3,aF,13,12,`li`,null,bP),B()),e&2){let e=K();M(3),L(e.filteredResources())}}function sF(e,t){if(e&1&&(z(0,`span`,52),J(1),B()),e&2){let e=t;M(),Z(``,e,` `,e===1?`change`:`changes`)}}function cF(e,t){if(e&1&&(z(0,`span`,54),J(1),xv(2,`json`),B()),e&2){let e=K().$implicit;M(),Y(Cv(2,1,e.value))}}function lF(e,t){if(e&1&&(z(0,`span`,41),J(1,`·`),B(),z(2,`span`),J(3),B()),e&2){let e=K().$implicit,t=K(2);M(3),X(`Deps: `,t.getDependencies(e).length)}}function uF(e,t){if(e&1&&(z(0,`span`,41),J(1,`·`),B(),z(2,`span`),J(3),B()),e&2){let e=K().$implicit,t=K(2);M(3),X(`Consumers: `,t.getConsumers(e).length)}}function dF(e,t){if(e&1&&(z(0,`dt`),J(1,`Value`),B(),z(2,`dd`)(3,`pre`,60),J(4),xv(5,`json`),B()()),e&2){let e=K(4);M(3),N(`aria-label`,`Value of `+(e.selectedNode().label??`signal`)),M(),Y(Cv(5,2,e.selectedNode().value))}}function fF(e,t){if(e&1){let e=W();z(0,`li`)(1,`button`,65),G(`click`,function(){let t=O(e).$implicit;return k(K(5).jumpTo(t))}),z(2,`span`,61),J(3),B(),z(4,`span`,62),J(5),B()()()}if(e&2){let e=t.$implicit,n=K(5);M(),N(`aria-label`,`Go to `+e.kind+` `+(e.label??e.id)),M(),j_(`background`,n.kindColor(e.kind)),M(),Y(e.kind),M(2),Y(e.label??e.id)}}function pF(e,t){if(e&1&&(z(0,`h4`),J(1,`Dependencies (producers)`),B(),z(2,`ul`),I(3,fF,6,5,`li`,null,bP),B()),e&2){let e=K(4);M(3),L(e.getDependencies(e.selectedNode()))}}function mF(e,t){if(e&1){let e=W();z(0,`li`)(1,`button`,65),G(`click`,function(){let t=O(e).$implicit;return k(K(5).jumpTo(t))}),z(2,`span`,61),J(3),B(),z(4,`span`,62),J(5),B()()()}if(e&2){let e=t.$implicit,n=K(5);M(),N(`aria-label`,`Go to `+e.kind+` `+(e.label??e.id)),M(),j_(`background`,n.kindColor(e.kind)),M(),Y(e.kind),M(2),Y(e.label??e.id)}}function hF(e,t){if(e&1&&(z(0,`h4`),J(1,`Consumers`),B(),z(2,`ul`),I(3,mF,6,5,`li`,null,bP),B()),e&2){let e=K(4);M(3),L(e.getConsumers(e.selectedNode()))}}function gF(e,t){e&1&&(z(0,`p`,30),J(1),B()),e&2&&(M(),Y(t))}function _F(e,t){if(e&1&&(z(0,`div`,55)(1,`h3`,57),J(2),B(),z(3,`dl`)(4,`dt`),J(5,`Kind`),B(),z(6,`dd`),J(7),B(),z(8,`dt`),J(9,`Epoch`),B(),z(10,`dd`),J(11),B(),P(12,dF,6,4),B(),P(13,pF,5,0),P(14,hF,5,0),P(15,gF,2,1,`p`,30),Ug(16,58),B()),e&2){let e,t=K().$implicit,n=K(2),r=u_(23);R(`id`,`signal-detail-`+t.id),M(2),Y(n.selectedNode().label??n.selectedNode().id),M(5),Y(n.selectedNode().kind),M(4),Y(n.selectedNode().epoch),M(),F(n.selectedNode().value===void 0?-1:12),M(),F(n.getDependencies(n.selectedNode()).length?13:-1),M(),F(n.getConsumers(n.selectedNode()).length?14:-1),M(),F((e=n.writeHint())?15:-1,e),M(),R(`ngTemplateOutlet`,r)(`ngTemplateOutletContext`,hv(10,gP,t.id))}}function vF(e,t){if(e&1){let e=W();z(0,`li`)(1,`button`,50),G(`click`,function(){let t=O(e).$implicit;return k(K(2).select(t.id))}),z(2,`span`,36)(3,`span`,37),J(4),B(),z(5,`span`,38),J(6),B(),P(7,sF,2,2,`span`,52),V(8,`span`,53),B(),P(9,cF,3,3,`span`,54),z(10,`span`,39)(11,`span`),J(12),B(),P(13,lF,4,1),P(14,uF,4,1),B()(),P(15,_F,17,12,`div`,55),B()}if(e&2){let e,n=t.$implicit,r=K(2);M(),q(`selected`,r.selectedId()===n.id),N(`aria-expanded`,r.selectedId()===n.id)(`aria-controls`,`signal-detail-`+n.id)(`data-card`,n.id),M(2),j_(`background`,r.kindColor(n.kind)),M(),Y(n.kind),M(2),Y(n.label??`(unnamed)`),M(),F((e=r.changeCount(n.id))?7:-1,e),M(2),F(n.value===void 0?-1:9),M(3),X(`Epoch: `,n.epoch),M(),F(r.getDependencies(n).length?13:-1),M(),F(r.getConsumers(n).length?14:-1),M(),F(r.selectedId()===n.id&&r.selectedNode()?15:-1)}}function yF(e,t){if(e&1){let e=W();z(0,`button`,31),G(`click`,function(){return O(e),k(K(3).clearFilters())}),J(1,`Clear filters`),B()}}function bF(e,t){if(e&1&&(z(0,`li`,64)(1,`p`,28),J(2),B(),z(3,`p`,30),J(4),B(),P(5,yF,2,0,`button`,66),B()),e&2){let e=K(2);M(2),X(` `,e.hasAnySignals()?`No signals match.`:`No signals in this graph.`,` `),M(2),X(` `,e.hasAnySignals()?`Try a different name or kind.`:`Select a component that reads signals, or interact with the page to create some.`,` `),M(),F(e.hasAnySignals()?5:-1)}}function xF(e,t){if(e&1&&(z(0,`h2`,48),J(1,`Signals`),B(),z(2,`ul`,63),I(3,vF,16,15,`li`,null,bP,!1,bF,6,3,`li`,64),B()),e&2){let e=K();M(3),L(e.filteredNodes())}}var SF=`follow`;function CF(e){return Object.keys(e.pages).length?e.pages:e.graph?{[e.graph.pageId??``]:e.graph}:{}}var wF=`env:`,TF=50,EF={selected:`picked`,routed:`rendered by the router`,root:`first component with signals`},DF={write:`set`,sample:`sampled`,initial:`initial`},OF={resolved:`ok`,local:`ok`,loading:`warn`,reloading:`warn`,error:`danger`},kF={signal:`#facc15`,computed:`#60a5fa`,linkedSignal:`#34d399`,effect:`#fb923c`,template:`#94a3b8`,afterRenderEffectPhase:`#f472b6`,childSignalProp:`#fef08a`,"input (signal)":`#f59e0b`,"input.required (signal)":`#f59e0b`,"output (signal)":`#ec4899`,"model (signal)":`#14b8a6`,"model.required (signal)":`#14b8a6`,"viewChild (signal)":`#a3e635`,"viewChild.required (signal)":`#a3e635`,"viewChildren (signal)":`#a3e635`,"contentChild (signal)":`#fda4af`,"contentChild.required (signal)":`#fda4af`,"contentChildren (signal)":`#fda4af`,resource:`#06b6d4`,unknown:`#a1a1aa`},AF=class e{rpc=$(null);destroyRef=E(ws);host=E(Nl);filterInput=Jv(`filterInput`);injector=E(Ss);pageId=fE();cleanups=[];graphLoad=0;treePages=j({});graphState=j({graph:null,pages:{}});chosenPageId=j(null);announcement=j(``);graphPages=Q(()=>CF(this.graphState()));shownPageId=Fv({source:()=>({pages:this.graphPages(),newest:this.graphState().graph?.pageId??null,chosen:this.chosenPageId()}),computation:({pages:e,newest:t,chosen:n},r)=>{let i={};for(let n of Object.keys(e))i[n]={pageId:n,reportedAt:+(n===t)};return pE(i,{chosen:n,host:this.pageId,previous:r?.value??null})}});reported=Q(()=>{let e=this.shownPageId();return e===null?null:this.graphPages()[e]??null});unsupported=Q(()=>!!this.reported()?.unsupported);graph=Q(()=>{let e=this.reported();return e?.unsupported?null:e});graphOwner=Q(()=>{let e=this.graph();return e?`${e.pageId??``}|${e.component?.id??e.injector?.id??``}`:null});pickedByPage=j({});picked=Q(()=>this.pickedByPage()[this.targetPageId()??``]??null);pageOptions=Q(()=>{if(this.pageId)return[];let e=this.treePages();return Object.keys(this.graphPages()).map(t=>{let n=e[t];return{value:t,label:n?.title||n?.url||`Page ${t}`,hint:n?.url}})});showInternals=j(!1);sourceSignals=j([]);sourceLoaded=j(!1);sourceFailed=j(!1);graphFailed=j(!1);loadFailed=Q(()=>this.sourceFailed()||this.graphFailed());retrying=j(!1);filter=j(``);resources=Q(()=>this.graph()?.resources??[]);internalIds=Q(()=>new Set(this.resources().flatMap(e=>e.nodeIds)));visibleNodes=Q(()=>{let e=this.internalIds();return(this.graph()?.nodes??[]).filter(t=>!e.has(t.id))});hasAnySignals=Q(()=>this.visibleNodes().length+this.resources().length>0);kindCounts=Q(()=>{let e=this.graph()?[...this.visibleNodes().map(e=>e.kind),...this.resources().map(()=>`resource`)]:this.sourceSignals().map(e=>e.kind),t=new Map;for(let n of e)t.set(n,(t.get(n)??0)+1);return[...t].map(([e,t])=>({kind:e,count:t}))});kind=Fv({source:this.graphOwner,computation:(e,t)=>{let n=t?.value??null;return n&&Nv(this.kindCounts).some(e=>e.kind===n)?n:null}});kindChips=Q(()=>{let e=this.kindCounts(),t=this.kind();return t&&!e.some(e=>e.kind===t)?[...e,{kind:t,count:0}]:e});kindTotal=Q(()=>this.kindCounts().reduce((e,t)=>e+t.count,0));selectedId=Fv({source:this.graphOwner,computation:()=>null});selectedNode=Q(()=>this.graph()?.nodes.find(e=>e.id===this.selectedId())??null);jumpedPast=j(null);jumpNote=Q(()=>{let e=this.jumpedPast();return!e||this.filter()||this.kind()||this.selectedId()!==e.id?``:`Cleared the filters to show ${e.label}.`});selectedHistory=Q(()=>{let e=this.selectedId();return e?[...this.graph()?.history?.[e]??[]].reverse():[]});writeHint=Q(()=>{let e=this.selectedNode(),t=this.graph();if(!e||!t||t.writeHook===!1||e.kind!==`signal`&&e.kind!==`linkedSignal`)return``;if(!e.label)return`This signal has no name, so its history holds sampled values only. Pass a debugName in its options, for example signal(0, { debugName: 'count' }).`;let n=t.history?.[e.id]??[];return n.some(e=>e.source===`write`)||!n.some(e=>e.source===`sample`)?``:`Every change here was sampled. Writes are matched by name, kind, version and value, so another live signal with the same name and value can hide them.`});kindLegend=Object.entries(kF).map(([e,t])=>({kind:e,color:t}));filteredResources=Q(()=>{let e=this.filter().toLowerCase(),t=this.kind();return t&&t!==`resource`?[]:this.resources().filter(t=>!e||t.name.toLowerCase().includes(e)||e.length>=3&&`resource`.startsWith(e))});filteredNodes=Q(()=>{let e=this.filter().toLowerCase(),t=this.kind();return this.visibleNodes().filter(n=>(!t||n.kind===t)&&(!e||(n.label??``).toLowerCase().includes(e)||n.kind.toLowerCase().includes(e))).sort((e,t)=>e.id.localeCompare(t.id,void 0,{numeric:!0}))});filteredSourceSignals=Q(()=>{let e=this.filter().toLowerCase(),t=this.kind();return this.sourceSignals().filter(n=>(!t||n.kind===t)&&(!e||n.name.toLowerCase().includes(e)||n.kind.toLowerCase().includes(e)||n.file.toLowerCase().includes(e)))});targetPageId=Q(()=>this.pageId??(this.shownPageId()||null)??this.graph()?.pageId??this.latestTreePage()?.pageId??null);latestTreePage=Q(()=>{let e=null;for(let[t,n]of Object.entries(this.treePages())){let r=n.reportedAt??0;(!e||r>e.reportedAt)&&(e={pageId:t,reportedAt:r})}return e});componentOptions=Q(()=>{let e=this.targetPageId(),t=(e?this.treePages()[e]?.roots:void 0)??[],n=[],r=e=>{for(let t of e)n.push(t),r(t.children)};r(t);let i=this.graph()?.environments??[];if(!n.length&&!i.length)return[];let a=new Map;for(let e of n)a.set(e.name,(a.get(e.name)??0)+1);let o=new Map,s=[{value:SF,label:`Follow the routed component`,hint:`automatic`},...i.map(e=>({value:wF+e.id,label:this.injectorLabel(e),hint:`injector`}))];for(let e of n){let t=(o.get(e.name)??0)+1;o.set(e.name,t),s.push({value:e.id,label:(a.get(e.name)??0)>1?`${e.name} #${t}`:e.name,hint:`<${e.tag}>`})}return s});pickerValue=Q(()=>{let e=this.picked();return e&&this.componentOptions().some(t=>t.value===e)?e:SF});constructor(){dc(()=>{let e=this.rpc();e&&(this.loadSignalGraph(e),this.loadSourceSignals(e))}),this.destroyRef.onDestroy(()=>{for(let e of this.cleanups.splice(0))e()})}async loadSignalGraph(e){for(let e of this.cleanups.splice(0))e();let t=++this.graphLoad,n=()=>this.destroyRef.destroyed||t!==this.graphLoad,r=e.scope(`pangular`);try{let e=await r.rpc.sharedState(`signal-graph`);if(n())return;this.graphFailed.set(!1);let t=e=>{let t=e,n=t?.pages&&typeof t.pages==`object`?t.pages:{},r={graph:t?.graph??null,pages:n};this.notePageGone(CF(r)),this.graphState.set(r)};t(e.value()),this.cleanups.push(e.on(`updated`,t))}catch{if(n())return;this.graphState.set({graph:null,pages:{}}),this.graphFailed.set(!0)}try{let e=await r.rpc.sharedState(`component-tree`);if(n())return;let t=e=>{let t=e?.pages;this.treePages.set(t&&typeof t==`object`?t:{})};t(e.value()),this.cleanups.push(e.on(`updated`,t))}catch{n()||this.treePages.set({})}}notePageGone(e){let t=Object.keys(this.graphPages()).filter(t=>!e[t]);t.length&&this.pickedByPage.update(e=>{let n={...e};for(let e of t)delete n[e];return n});let n=this.chosenPageId();if(!n||e[n])return;let r=this.pageOptions().find(e=>e.value===n)?.label??`The chosen page`;this.chosenPageId.set(null),this.announcement.set(`${r} closed, so this shows another page.`)}selectPage(e){if(!e||e===this.shownPageId())return;this.chosenPageId.set(e);let t=this.pageOptions().find(t=>t.value===e)?.label??e;this.announcement.set(`Showing the signal graph of ${t}.`)}pickComponent(e){let t=e&&e!==SF?e:null,n=this.targetPageId()??void 0;this.pickedByPage.update(e=>{let r={...e};return t?r[n??``]=t:delete r[n??``],r});let r=this.rpc();if(!r)return;let i=t?.startsWith(wF)?{pageId:n,env:t.slice(4)}:{pageId:n,id:t};r.scope(`pangular`).rpc.call(`select-signal-target`,i).catch(()=>{})}injectorLabel(e){return e.name===`Root`?`Root services`:e.name}sourceNote(e){return EF[e]}async loadSourceSignals(e){let t=e.scope(`pangular`);try{let e=await t.rpc.call(`get-signals`);this.sourceSignals.set(e),this.sourceFailed.set(!1)}catch{this.sourceFailed.set(!0)}finally{this.sourceLoaded.set(!0)}}async retry(){let e=this.rpc();if(!e||this.retrying())return;let t=document.activeElement;this.retrying.set(!0);try{await Promise.all([this.loadSignalGraph(e),this.loadSourceSignals(e)])}finally{this.retrying.set(!1)}this.destroyRef.destroyed||zd(()=>{(!t?.isConnected||document.activeElement===document.body)&&this.filterInput()?.nativeElement.focus()},{injector:this.injector})}clearFilters(){this.resetFilters(),this.filterInput()?.nativeElement.focus()}resetFilters(){this.filter.set(``),this.kind.set(null)}select(e){this.selectedId.set(this.selectedId()===e?null:e),this.showInternals.set(!1)}jumpTo(e){let t=this.resources().find(t=>t.nodeIds.includes(e.id)),n=t?.id??e.id,r=t?!this.filteredResources().some(e=>e.id===n):!this.filteredNodes().some(e=>e.id===n);r&&this.resetFilters(),this.jumpedPast.set(r?{id:n,label:t?.name??e.label??e.id}:null),this.selectedId.set(n),this.showInternals.set(!!t),zd(()=>{let e=[...this.host.nativeElement.querySelectorAll(`.node-card[data-card]`)].find(e=>e.dataset.card===n);e?.scrollIntoView?.({block:`nearest`}),e?.focus({preventScroll:!0})},{injector:this.injector})}changeCount(e){let t=this.graph(),n=t?.nodes.find(t=>t.id===e)?.changes??t?.resources?.find(t=>t.id===e)?.changes;return n===void 0?(t?.history?.[e]??[]).reduce((e,t)=>e+(t.source===`initial`?0:1+(t.missed??0)),0):n}historySummary(e){let t=this.changeCount(e),n=this.graph()?.history?.[e]?.length??0;return t?`${`${t} ${t===1?`change`:`changes`} recorded`}${n>=TF&&t>=n?`, showing the last ${n}`:``}, newest first.`:`No changes recorded yet. The entry below is the value seen first.`}statusTone(e){return OF[e]??`neutral`}internalsOf(e){let t=new Set(e.nodeIds);return(this.graph()?.nodes??[]).filter(e=>t.has(e.id))}sourceLabel(e){return DF[e]}kindColor(e){return kF[e]??kF.unknown}relations=Q(()=>{let e=new Map,t=this.graph();if(!t)return e;for(let n of t.nodes)e.set(n.id,{deps:[],consumers:[]});for(let n of t.edges){let r=t.nodes[n.producer],i=t.nodes[n.consumer];r&&i&&(e.get(i.id)?.deps.push(r),e.get(r.id)?.consumers.push(i))}return e});getDependencies(e){return this.relations().get(e.id)?.deps??[]}getConsumers(e){return this.relations().get(e.id)?.consumers??[]}static ɵfac=function(t){return new(t||e)};static ɵcmp=Wh({type:e,selectors:[[`app-signal-inspector`]],viewQuery:function(e,t){e&1&&c_(t.filterInput,mP,5),e&2&&l_()},inputs:{rpc:[1,`rpc`]},decls:28,vars:17,consts:[[`filterInput`,``],[`historyTpl`,``],[1,`toolbar`],[`type`,`search`,`placeholder`,`Filter by name or kind…`,`aria-label`,`Filter signals by name or kind`,3,`input`,`keydown.escape`,`value`],[1,`picker`,`page-picker`],[1,`picker`],[`role`,`status`,1,`sr-only`],[1,`showing`],[`role`,`status`,1,`fallback`],[1,`intro`],[`role`,`group`,`aria-label`,`Filter by kind`,1,`kinds`],[`role`,`status`,1,`empty`],[`role`,`alert`,1,`empty`,3,`compact`],[1,`empty`],[`role`,`status`,1,`jump-note`],[`id`,`signals-page-label`,1,`label-key`],[`labelledBy`,`signals-page-label`,3,`valueChange`,`options`,`value`],[`id`,`signals-component-label`,1,`label-key`],[`labelledBy`,`signals-component-label`,3,`valueChange`,`options`,`value`],[1,`showing-name`],[1,`mono`],[1,`source-note`],[`type`,`button`,1,`kind-chip`,3,`click`],[1,`count`],[`type`,`button`,1,`kind-chip`,3,`active`],[`aria-hidden`,`true`,1,`dot`],[1,`chip-text`],[`aria-hidden`,`true`,1,`spinner`],[1,`empty-title`],[`role`,`alert`,1,`empty`],[1,`hint`],[`type`,`button`,1,`reset`,3,`click`],[1,`source-label`],[1,`nodes`],[1,`node-card`],[`role`,`status`,1,`empty`,`compact`],[1,`node-header`],[1,`kind-badge`],[1,`node-label`],[1,`node-meta`],[1,`file`,3,`file`,`line`],[`aria-hidden`,`true`,1,`sep`],[3,`id`],[1,`history-summary`],[`tabindex`,`0`,1,`history`,`scroll-box`],[1,`history-meta`],[1,`source-tag`],[1,`missed`],[1,`list-heading`],[`role`,`list`,1,`nodes`,`resources`],[`type`,`button`,1,`node-card`,3,`click`],[1,`status-tag`,3,`class`],[1,`changed-badge`],[`aria-hidden`,`true`,1,`chevron`],[1,`node-value`],[1,`detail-panel`,3,`id`],[1,`status-tag`],[1,`detail-title`],[3,`ngTemplateOutlet`,`ngTemplateOutletContext`],[`type`,`button`,1,`reset`,`internals-toggle`,3,`click`],[`role`,`region`,`tabindex`,`0`,1,`scroll-box`],[1,`kind-badge`,`sm`],[1,`rel-label`],[`role`,`list`,`appRovingList`,`button.node-card`,1,`nodes`],[1,`empty`,`compact`],[`type`,`button`,1,`rel-link`,3,`click`],[`type`,`button`,1,`reset`]],template:function(e,t){if(e&1&&(z(0,`div`,2)(1,`input`,3,0),G(`input`,function(e){return t.filter.set(e.target.value)})(`keydown.escape`,function(){return t.filter.set(``)}),B(),P(3,xP,4,2,`div`,4),P(4,SP,4,2,`div`,5),B(),z(5,`p`,6),J(6),B(),P(7,wP,6,3,`p`,7)(8,TP,5,1,`p`,7),P(9,EP,2,0,`p`,8),z(10,`p`,9),P(11,DP,1,0)(12,OP,1,0)(13,kP,1,0),B(),P(14,AP,2,0,`p`,8),P(15,jP,2,0,`p`,8),P(16,MP,2,2,`p`,8),P(17,PP,7,4,`div`,10),P(18,FP,4,0,`div`,11),P(19,IP,7,4,`div`,12)(20,LP,14,0,`div`,13),P(21,VP,6,1),ag(22,GP,1,1,`ng-template`,null,1,Ev),z(24,`p`,14),J(25),B(),P(26,oF,5,0),P(27,xF,6,1)),e&2){let e,n;M(),R(`value`,t.filter()),M(2),F(t.pageOptions().length>1?3:-1),M(),F(t.componentOptions().length?4:-1),M(2),Y(t.announcement()),M(),F((e=t.graph()?.component)?7:(e=t.graph()?.injector)?8:-1,e),M(2),F(t.graph()&&t.picked()&&t.graph().source!==`selected`?9:-1),M(2),F(t.graph()?.injector?11:t.graph()?12:13),M(3),F(t.unsupported()?14:-1),M(),F(t.graph()?.writeHook===!1?15:-1),M(),F((n=t.graph()?.nodeCount)?16:-1,n),M(),F(t.kindChips().length?17:-1),M(),F(!t.graph()&&!t.sourceLoaded()?18:-1),M(),F(!t.graph()&&t.sourceLoaded()&&t.loadFailed()?19:!t.graph()&&t.sourceLoaded()&&t.sourceSignals().length===0?20:-1),M(2),F(!t.graph()&&t.sourceSignals().length>0?21:-1),M(4),Y(t.jumpNote()),M(),F(t.graph()&&t.filteredResources().length?26:-1),M(),F(t.graph()&&(t.visibleNodes().length||!t.filteredResources().length)?27:-1)}},dependencies:[lb,pP,qD,DO,mb,hb],styles:[`[_nghost-%COMP%] {
   display: block;
   min-width: 0;
   color: var(--%NS%text);
@@ -5111,7 +5372,7 @@ button.node-card[_ngcontent-%COMP%] {
   dd[_ngcontent-%COMP%]    + dt[_ngcontent-%COMP%] {
     margin-top: 8px;
   }
-}`]})},nF=[`queryInput`],rF=()=>({compact:!1}),iF=()=>({compact:!0}),aF=(e,t)=>t.node.injector.id,oF=(e,t)=>t.id,sF=(e,t)=>t.from+t.token+e,cF=(e,t)=>t.token+e,lF=(e,t)=>t.type,uF=(e,t)=>t.token+t.file+t.line;function dF(e,t){if(e&1){let e=W();z(0,`div`,6)(1,`p`,7),J(2),B(),z(3,`p`,8),J(4,` The devtools server did not answer. Check that it is still running, then retry. `),B(),z(5,`button`,9),G(`click`,function(){return O(e),k(K().retry())}),J(6),B()()}if(e&2){let e=t.compact,n=K();q(`compact`,e),M(2),X(` `,e?`Couldn't load the live injector tree`:`Couldn't load DI data`,` `),M(3),N(`aria-disabled`,n.retrying()||null),M(),X(` `,n.retrying()?`Retrying…`:`Retry`,` `)}}function fF(e,t){if(e&1){let e=W();z(0,`div`,10)(1,`span`,11),J(2,`Page`),B(),z(3,`app-select`,12),G(`valueChange`,function(t){return O(e),k(K(2).selectPage(t))}),B()()}if(e&2){let e=K(2);M(3),R(`options`,e.pageOptions())(`value`,e.shownPageId())}}function pF(e,t){e&1&&P(0,fF,4,2,`div`,10),e&2&&F(K().pageOptions().length>1?0:-1)}function mF(e,t){if(e&1){let e=W();z(0,`label`,23)(1,`input`,24),G(`change`,function(){O(e);let t=K(2);return k(t.componentsOnly.set(!t.componentsOnly()))}),B(),J(2,` Components only `),B()}if(e&2){let e=K(2);M(),R(`checked`,e.componentsOnly())}}function hF(e,t){e&1&&(z(0,`span`,25),J(1),B()),e&2&&(M(),X(`Change detection: `,t))}function gF(e,t){e&1&&(z(0,`p`,26),A(),z(1,`svg`,35),V(2,`circle`,36)(3,`path`,37),B(),ms(),z(4,`span`)(5,`strong`),J(6,`The page reported only part of its injector tree.`),B(),J(7,` It keeps at most 2000 element injectors and 2500 in all, and leaves out injectors nested more than 1000 levels deep, so a lookup path or a provider can point to one that is not listed. `),B()())}function _F(e,t){if(e&1){let e=W();z(0,`button`,41),G(`click`,function(){let t=O(e).$implicit;return k(K(3).reveal(t.id))}),V(1,`span`,42),z(2,`span`,43),J(3),B(),z(4,`span`,44),J(5),B()()}if(e&2){let e=t.$implicit,n=K(3);M(),j_(`background`,n.tone(e.kind)),M(2),Y(e.label),M(2),Y(e.tokens)}}function vF(e,t){e&1&&(z(0,`span`,40),J(1),B()),e&2&&(M(),X(`+`,t,` more`))}function yF(e,t){if(e&1&&(z(0,`div`,27)(1,`span`,38),J(2,`Provided by`),B(),I(3,_F,6,4,`button`,39,oF),P(5,vF,2,1,`span`,40),B()),e&2){let e,t=K(2);M(3),L(t.providedBy()),M(2),F((e=t.providedByMore())?5:-1,e)}}function bF(e,t){if(e&1){let e=W();z(0,`div`,28),J(1),z(2,`button`,45),G(`click`,function(){return O(e),k(K(2).clearQuery())}),J(3,`Clear search`),B()()}if(e&2){let e=K(2);M(),X(` Nothing here matches “`,e.query().trim(),`”. `)}}function xF(e,t){e&1&&J(0,` None of them provide anything themselves. `)}function SF(e,t){e&1&&J(0,` Turn off “Components only” to see directives. `)}function CF(e,t){e&1&&J(0,` Try a different search. `)}function wF(e,t){if(e&1&&(z(0,`div`,30)(1,`p`,7),J(2,`No injectors to show`),B(),z(3,`p`,8),P(4,xF,1,0)(5,SF,1,0)(6,CF,1,0),B()()),e&2){let e=K(2);M(4),F(e.onlyProviding()?4:e.componentsOnly()&&e.view()===`element`?5:6)}}function TF(e,t){if(e&1){let e=W();z(0,`span`,56),G(`click`,function(t){O(e);let n=K().$implicit;return k(K(2).toggle(n.node.injector.id,t))}),A(),z(1,`svg`,57),V(2,`path`,58),B()()}if(e&2){let e=K().$implicit;q(`open`,e.expanded)}}function EF(e,t){e&1&&V(0,`span`,48)}function DF(e,t){if(e&1&&(z(0,`span`,52),J(1),B()),e&2){let e=K().$implicit;M(),Y(e.node.injector.component)}}function OF(e,t){if(e&1&&(z(0,`span`,52),J(1),B()),e&2){let e=K().$implicit;M(),Y(e.node.injector.directives.join(`, `))}}function kF(e,t){if(e&1&&(z(0,`span`,54),A(),z(1,`svg`,35),V(2,`path`,59),B(),ms(),z(3,`span`,50),J(4,`injects`),B(),J(5),B()),e&2){let e=K().$implicit;N(`title`,e.node.dependencies.length+` injected`),M(5),X(` `,e.node.dependencies.length,` `)}}function AF(e,t){if(e&1&&(z(0,`span`,55),A(),z(1,`svg`,35),V(2,`path`,60),B(),ms(),z(3,`span`,50),J(4,`provides`),B(),J(5),B()),e&2){let e=K().$implicit;N(`title`,e.node.injector.providerCount+` provided`),M(5),X(` `,e.node.injector.providerCount,` `)}}function jF(e,t){if(e&1){let e=W();z(0,`div`,46),G(`click`,function(){let t=O(e).$implicit;return k(K(2).select(t.node.injector.id))})(`focus`,function(){let t=O(e).$implicit,n=K(2);return n.focusId.set(t.node.injector.id),k(n.highlight(t.node))})(`blur`,function(){return O(e),k(K(2).highlight(null))})(`mouseenter`,function(){let t=O(e).$implicit;return k(K(2).highlight(t.node))})(`mouseleave`,function(){return O(e),k(K(2).highlight(null))}),P(1,TF,3,2,`span`,47)(2,EF,1,0,`span`,48),z(3,`span`,49),J(4),B(),z(5,`span`,50),J(6),B(),z(7,`span`,51),J(8),B(),P(9,DF,2,1,`span`,52)(10,OF,2,1,`span`,52),z(11,`span`,53),P(12,kF,6,2,`span`,54),P(13,AF,6,2,`span`,55),B()()}if(e&2){let e=t.$implicit,n=K(2);j_(`--%NS%depth`,e.depth),q(`selected`,n.selected()?.injector?.id===e.node.injector.id),N(`aria-level`,e.depth+1)(`aria-expanded`,e.hasChildren?e.expanded:null)(`aria-selected`,n.selected()?.injector?.id===e.node.injector.id)(`tabindex`,n.rovingId()===e.node.injector.id?0:-1)(`data-id`,e.node.injector.id),M(),F(e.hasChildren?1:2),M(2),j_(`--%NS%tone`,n.tone(n.kind(e.node))),N(`title`,n.kind(e.node)),M(),Y(n.kind(e.node)[0].toUpperCase()),M(2),Y(n.kind(e.node)),M(2),Y(n.label(e.node)),M(),F(e.node.injector.component?9:e.node.injector.directives?.length?10:-1),M(3),F((e.node.dependencies?.length??0)>0?12:-1),M(),F(e.node.injector.providerCount>0?13:-1)}}function MF(e,t){if(e&1){let e=W();z(0,`button`,9),G(`click`,function(){let t=O(e);return k(K(3).reveal(t.node.injector.id))}),J(1),B()}if(e&2){let e=K(3);M(),X(` Show `,e.label(t.node),` `)}}function NF(e,t){if(e&1&&(z(0,`section`,33)(1,`header`,61)(2,`h2`,62),J(3),B()(),z(4,`div`,63)(5,`p`,8),J(6,` This injector is no longer on the page. Its component or directive was destroyed. `),B(),P(7,MF,2,1,`button`,64),B()()),e&2){let e,n=K(2);M(3),Y(t),M(4),F((e=n.rows()[0])?7:-1,e)}}function PF(e,t){if(e&1&&(z(0,`li`),J(1),B()),e&2){let e=t.$implicit;q(`is-component`,e===K(2).injector.component),M(),Y(e)}}function FF(e,t){if(e&1&&(z(0,`ul`,66),I(1,PF,2,3,`li`,73,Og),B()),e&2){let e=K();M(),L(e.injector.directives)}}function IF(e,t){if(e&1&&(z(0,`span`,74),V(1,`span`,42),J(2,` Null injector `),z(3,`span`,76),J(4,`throws NullInjectorError`),B()()),e&2){let e=K(4);M(),j_(`background`,e.tone(`null`))}}function LF(e,t){if(e&1&&(z(0,`span`,78),J(1),z(2,`span`,50),J(3),B()()),e&2){let e=K(2).$implicit;M(),X(` `,e.providers,` `),M(2),Y(e.providers===1?`provider`:`providers`)}}function RF(e,t){if(e&1){let e=W();z(0,`button`,77),G(`click`,function(){O(e);let t=K().$implicit;return k(K(3).reveal(t.id))}),V(1,`span`,42),z(2,`span`,43),J(3),B(),P(4,LF,4,2,`span`,78),B()}if(e&2){let e=K().$implicit,t=K(3);M(),j_(`background`,t.tone(e.kind)),M(2),Y(e.label),M(),F(e.providers?4:-1)}}function zF(e,t){if(e&1&&(z(0,`li`),P(1,IF,5,2,`span`,74)(2,RF,5,4,`button`,75),B()),e&2){let e=t.$implicit,n=t.$index,r=K(3);q(`current`,n===0),M(),F(e.id===r.nullId?1:2)}}function BF(e,t){e&1&&(z(0,`p`,68),J(1,`Only services this injector has already created are listed.`),B())}function VF(e,t){if(e&1&&(z(0,`span`,84),J(1),B()),e&2){let e=t.$implicit;M(),Y(e)}}function HF(e,t){if(e&1&&(z(0,`span`),J(1),B()),e&2){let e=K().$implicit;M(),X(`for `,e.from)}}function UF(e,t){if(e&1){let e=W();z(0,`button`,89),G(`click`,function(){let t=O(e);return k(K(6).reveal(t))}),V(1,`span`,42),J(2,` from `),z(3,`span`,43),J(4),B()()}if(e&2){let e=t,n=K(6);M(),j_(`background`,n.tone(n.kindById(e))),M(3),Y(n.labelById(e))}}function WF(e,t){e&1&&(z(0,`span`,87),J(1,`optional, not provided`),B())}function GF(e,t){e&1&&(z(0,`span`,88),J(1,`not provided anywhere`),B())}function KF(e,t){if(e&1&&(z(0,`li`,81)(1,`div`,82)(2,`span`,83),J(3),B(),I(4,VF,2,1,`span`,84,Og),B(),z(6,`div`,85),P(7,HF,2,1,`span`),P(8,UF,5,3,`button`,86)(9,WF,2,0,`span`,87)(10,GF,2,0,`span`,88),B()()),e&2){let e,n=t.$implicit,r=K(3);q(`hit`,K(2).matches(n.token)),M(3),Y(n.token),M(),L(n.flags),M(3),F(r.injector.type!==`element`||r.injector.directives&&r.injector.directives.length>1?7:-1),M(),F((e=n.providedBy)?8:n.flags.includes(`optional`)?9:10,e)}}function qF(e,t){if(e&1&&(z(0,`ul`,79),I(1,KF,11,5,`li`,80,sF),B()),e&2){let e=K(2);M(),L(e.dependencies)}}function JF(e,t){e&1&&(z(0,`p`,72),J(1,`Nothing is injected through the constructor or inject().`),B())}function YF(e,t){e&1&&(z(0,`p`,72),J(1,`No service created here has injected anything yet.`),B())}function XF(e,t){if(e&1&&(z(0,`div`,67)(1,`h3`),J(2),z(3,`span`,16),J(4),B()(),P(5,BF,2,0,`p`,68),P(6,qF,3,0,`ul`,79)(7,JF,2,0,`p`,72)(8,YF,2,0,`p`,72),B()),e&2){let e=K();M(2),X(` `,e.injector.type===`element`?`Injected here`:`Injected by its services`,` `),M(2),Y(e.dependencies?.length??0),M(),F(e.injector.type===`element`?-1:5),M(),F(e.dependencies?.length?6:e.injector.type===`element`?7:8)}}function ZF(e,t){e&1&&(z(0,`span`,84),J(1,`viewProviders`),B())}function QF(e,t){e&1&&(z(0,`span`,84),J(1,`multi`),B())}function $F(e,t){if(e&1&&(z(0,`div`,85),J(1),B()),e&2){let e=K().$implicit;M(),X(`via `,e.importPath.join(` › `))}}function eI(e,t){if(e&1&&(z(0,`li`,91)(1,`div`,82)(2,`span`,83),J(3),B(),z(4,`span`,92),J(5),B(),P(6,ZF,2,0,`span`,84),P(7,QF,2,0,`span`,84),B(),P(8,$F,2,1,`div`,85),B()),e&2){let e=t.$implicit,n=K(4);q(`hit`,n.matches(e.token)),M(3),Y(e.token),M(2),Y(e.type===`unknown`?`provider`:`use`+n.capital(e.type)),M(),F(e.isViewProvider?6:-1),M(),F(e.multi?7:-1),M(),F(e.importPath?.length?8:-1)}}function tI(e,t){if(e&1&&(z(0,`ul`,71),I(1,eI,9,7,`li`,90,cF),B()),e&2){let e=K();M(),L(e.providers)}}function nI(e,t){e&1&&J(0,` No providers or viewProviders on this element. `)}function rI(e,t){e&1&&J(0,` This injector has no providers of its own. `)}function iI(e,t){if(e&1&&(z(0,`p`,72),P(1,nI,1,0)(2,rI,1,0),B()),e&2){let e=K();M(),F(e.injector.type===`element`?1:2)}}function aI(e,t){if(e&1&&(z(0,`section`,34)(1,`header`,61)(2,`span`,65),J(3),B(),z(4,`h2`,62),J(5),B(),P(6,FF,3,0,`ul`,66),B(),z(7,`div`,67)(8,`h3`),J(9,`Lookup path`),B(),z(10,`p`,68),J(11,`Angular asks these injectors in order until one has the token.`),B(),z(12,`ol`,69),I(13,zF,3,3,`li`,70,oF),B()(),P(15,XF,9,4,`div`,67),z(16,`div`,67)(17,`h3`),J(18,` Provides `),z(19,`span`,16),J(20),B()(),P(21,tI,3,0,`ul`,71)(22,iI,3,1,`p`,72),B()()),e&2){let e=t,n=K(2);M(2),j_(`--%NS%tone`,n.tone(n.kind(e))),M(),Y(n.kind(e)),M(2),Y(n.label(e)),M(),F(e.injector.directives?.length?6:-1),M(7),L(n.path()),M(2),F(e.injector.type===`element`||e.dependencies?15:-1),M(5),Y(e.providers.length),M(),F(e.providers.length?21:22)}}function oI(e,t){if(e&1){let e=W();z(0,`p`,13),J(1,` Every component and directive gets an injector. When it asks for a token, Angular walks up this tree, then through the environment injectors, until something provides it. `),B(),z(2,`div`,14)(3,`div`,15)(4,`button`,9),G(`click`,function(){return O(e),k(K().setView(`element`))}),J(5,` Elements `),z(6,`span`,16),J(7),B()(),z(8,`button`,9),G(`click`,function(){return O(e),k(K().setView(`environment`))}),J(9,` Environment `),z(10,`span`,16),J(11),B()()(),z(12,`div`,17),A(),z(13,`svg`,18),V(14,`circle`,19)(15,`path`,20),B(),ms(),z(16,`input`,21,2),G(`input`,function(t){return O(e),k(K().query.set(t.target.value))})(`keydown.escape`,function(){return O(e),k(K().query.set(``))}),B()(),Ug(18,22),P(19,mF,3,1,`label`,23),z(20,`label`,23)(21,`input`,24),G(`change`,function(){O(e);let t=K();return k(t.onlyProviding.set(!t.onlyProviding()))}),B(),J(22,` With providers `),B(),P(23,hF,2,1,`span`,25),B(),P(24,gF,8,0,`p`,26),P(25,yF,6,1,`div`,27)(26,bF,4,1,`div`,28),z(27,`div`,29),P(28,wF,7,1,`div`,30),z(29,`div`,31),G(`keydown`,function(t){return O(e),k(K().onTreeKey(t))}),I(30,jF,14,19,`div`,32,aF),B(),P(32,NF,8,2,`section`,33)(33,aI,23,8,`section`,34),B()}if(e&2){let e,t,n=K(),r=u_(5);M(4),q(`active`,n.view()===`element`),N(`aria-pressed`,n.view()===`element`),M(3),Y(n.elementCount()),M(),q(`active`,n.view()===`environment`),N(`aria-pressed`,n.view()===`environment`),M(3),Y(n.environmentCount()),M(5),R(`value`,n.query()),M(2),R(`ngTemplateOutlet`,r),M(),F(n.view()===`element`?19:-1),M(2),R(`checked`,n.onlyProviding()),M(2),F((e=n.zone())?23:-1,e),M(),F(n.truncated()?24:-1),M(),F(n.providedBy().length?25:n.query().trim()&&!n.rows().length?26:-1),M(3),F(n.rows().length?-1:28),M(),R(`hidden`,!n.rows().length),N(`aria-label`,n.view()===`element`?`Element injectors`:`Environment injectors`),M(),L(n.rows()),M(2),F((t=n.gone())?32:(t=n.selected())?33:-1,t)}}function sI(e,t){e&1&&(z(0,`div`,4),V(1,`span`,93),z(2,`p`,7),J(3,`Loading dependency injection data…`),B()())}function cI(e,t){e&1&&Ug(0,5),e&2&&(K(),R(`ngTemplateOutlet`,u_(3))(`ngTemplateOutletContext`,mv(2,rF)))}function lI(e,t){if(e&1&&(z(0,`div`,14),Ug(1,22),B()),e&2){K(2);let e=u_(5);M(),R(`ngTemplateOutlet`,e)}}function uI(e,t){e&1&&(P(0,lI,2,1,`div`,14),z(1,`div`,30)(2,`p`,7),J(3,`No DI data found`),B(),z(4,`p`,8),J(5,` Open the app in a browser with the devtools connected to see its live injectors. No providers, injectables or inject() calls were found in the source either. `),B()()),e&2&&F(K().pageOptions().length>1?0:-1)}function dI(e,t){e&1&&Ug(0,5),e&2&&(K(2),R(`ngTemplateOutlet`,u_(3))(`ngTemplateOutletContext`,mv(2,iF)))}function fI(e,t){if(e&1){let e=W();z(0,`div`,30)(1,`p`,7),J(2),B(),z(3,`p`,8),J(4,`Try part of a token name or a file path.`),B(),z(5,`button`,9),G(`click`,function(){return O(e),k(K(2).clearQuery())}),J(6,`Clear filter`),B()()}if(e&2){let e=K(2);M(2),X(`No providers match “`,e.query(),`”`)}}function pI(e,t){if(e&1&&(z(0,`span`,103),J(1),B()),e&2){let e=K().$implicit;M(),X(`providedIn: `,e.providedIn)}}function mI(e,t){if(e&1&&(z(0,`span`,106),J(1),B()),e&2){let e=K().$implicit;M(),X(`as `,e.source)}}function hI(e,t){if(e&1&&(z(0,`li`,100)(1,`div`,101)(2,`span`,102),J(3),B(),P(4,pI,2,1,`span`,103),B(),z(5,`div`,104),V(6,`app-source-link`,105),P(7,mI,2,1,`span`,106),B()()),e&2){let e=t.$implicit;M(3),Y(e.token),M(),F(e.providedIn?4:-1),M(2),R(`file`,e.file)(`line`,e.line),M(),F(e.source!==`class`&&e.source!==`providers array`?7:-1)}}function gI(e,t){if(e&1&&(z(0,`section`,97)(1,`h2`),J(2),z(3,`span`,98),J(4),B()(),z(5,`ul`,99),I(6,hI,8,5,`li`,100,uF),B()()),e&2){let e=t.$implicit;M(2),X(` `,e.label,` `),M(2),Y(e.items.length),M(2),L(e.items)}}function _I(e,t){if(e&1&&(z(0,`div`,96),I(1,gI,8,2,`section`,97,lF),B()),e&2){let e=K(2);M(),L(e.groupedProviders())}}function vI(e,t){if(e&1){let e=W();z(0,`div`,14)(1,`div`,17),A(),z(2,`svg`,18),V(3,`circle`,19)(4,`path`,20),B(),ms(),z(5,`input`,94,2),G(`input`,function(t){return O(e),k(K().query.set(t.target.value))})(`keydown.escape`,function(){return O(e),k(K().query.set(``))}),B()(),Ug(7,22),z(8,`span`,95),J(9),B()(),P(10,dI,1,3,`ng-container`,5),z(11,`p`,26),A(),z(12,`svg`,35),V(13,`circle`,36)(14,`path`,37),B(),ms(),z(15,`span`)(16,`strong`),J(17,`DI from source scan (static analysis).`),B(),J(18,` Connect the overlay on Angular 20 or later to see the live injector tree. `),B()(),P(19,fI,7,1,`div`,30)(20,_I,3,0,`div`,96)}if(e&2){let e=K(),t=u_(5);M(5),R(`value`,e.query()),M(2),R(`ngTemplateOutlet`,t),M(2),Z(` `,e.sourceMatchCount(),` of `,e.sourceProviders().length,` `),M(),F(e.loadFailed()?10:-1),M(9),F(e.groupedProviders().length===0?19:20)}}var yI=`inj-null`,bI=12,xI=600,SI={component:`var(--accent-text)`,directive:`var(--directive)`,environment:`var(--ok-text)`,null:`var(--text-3)`};function CI(e){return e.injector.type===`element`?e.injector.component?`component`:`directive`:`environment`}function wI(e){return e.injector.type===`element`?`<${e.injector.name}>`:e.injector.name}function TI(e){return Array.isArray(e)}var EI=class e{rpc=$(null);injector=E(Ss);nullId=yI;hostPage=uE();treeState=j(null);pageTitles=j({});chosenPageId=j(null);treePages=Q(()=>{let e=this.treeState();if(!e)return{};let t=e.pages&&typeof e.pages==`object`?e.pages:{};return Object.keys(t).length||this.hostPage?t:{"":e}});shownPageId=Nv({source:()=>({pages:this.treePages(),chosen:this.chosenPageId()}),computation:({pages:e,chosen:t},n)=>{let r={};for(let[t,n]of Object.entries(e))r[t]={pageId:t,reportedAt:typeof n?.reportedAt==`number`?n.reportedAt:0};return dE(r,{chosen:t,host:this.hostPage,previous:n?.value??null})}});shownPage=Q(()=>{let e=this.shownPageId();return e===null?null:this.treePages()[e]??null});roots=Q(()=>{let e=this.shownPage()?.roots;return TI(e)?e:[]});environment=Q(()=>{let e=this.shownPage()?.environment;return TI(e)?e:[]});truncated=Q(()=>this.shownPage()?.truncated===!0);zone=Q(()=>{let e=this.shownPage()?.zone;return typeof e==`string`?hD(e):null});multiPage=Q(()=>!this.hostPage&&Object.keys(this.treePages()).length>1);pageOptions=Q(()=>{if(!this.multiPage())return[];let e=this.pageTitles();return Object.keys(this.treePages()).map(t=>{let n=e[t];return{value:t,label:n?.title||n?.url||`Page ${t}`,hint:n?.url}})});pageKey=Q(()=>this.shownPageId()??``);perPage(e){let t=new Map;return Nv({source:this.pageKey,computation:(n,r)=>(r&&t.set(r.source,r.value),t.has(n)?t.get(n):e())})}sourceProviders=j([]);loaded=j(!1);treeFailed=j(!1);sourceFailed=j(!1);loadFailed=Q(()=>this.treeFailed()||this.sourceFailed());retrying=j(!1);host=E(Nl);view=j(`element`);query=j(``);queryInput=Kv(`queryInput`);onlyProviding=j(!1);componentsOnly=j(!0);collapsed=this.perPage(()=>new Set);selectedId=this.perPage(()=>null);focusId=this.perPage(()=>null);announcement=j(``);selectedLabel=this.perPage(()=>null);wasGone=!1;index=Q(()=>{let e=new Map,t=new Map,n=(r,i)=>{for(let a of r)e.set(a.injector.id,a),i&&t.set(a.injector.id,i),n(a.children,a.injector.id)};return n(this.roots(),null),n(this.environment(),null),{map:e,parents:t}});elementCount=Q(()=>this.count(this.roots()));environmentCount=Q(()=>this.count(this.environment()));visible=Q(()=>{let e=this.view()===`element`?this.roots():this.environment();this.view()===`element`&&this.componentsOnly()&&(e=this.prune(e,e=>!!e.injector.component)),this.onlyProviding()&&(e=this.prune(e,e=>e.providers.length>0));let t=this.normalizedQuery();return t&&(e=this.prune(e,e=>this.nodeMatches(e,t))),e});rows=Q(()=>{let e=[],t=this.collapsed(),n=!!this.normalizedQuery(),r=(i,a)=>{for(let o of i){let i=n||!t.has(o.injector.id);e.push({node:o,depth:a,hasChildren:o.children.length>0,expanded:i}),i&&r(o.children,a+1)}};return r(this.visible(),0),e});selected=Q(()=>{let e=this.selectedId();return e?this.index().map.get(e)??null:this.rows()[0]?.node??null});gone=Q(()=>{let e=this.selectedId();return e&&!this.index().map.has(e)?this.selectedLabel()??`The injector`:null});rovingId=Q(()=>{let e=this.rows(),t=this.focusId()??this.selected()?.injector.id;return t&&e.some(e=>e.node.injector.id===t)?t:e[0]?.node.injector.id??null});path=Q(()=>{let e=this.selected();if(!e)return[];let{map:t,parents:n}=this.index(),r=e.injector.path??[];if(!r.length){r=[e.injector.id];let t=n.get(e.injector.id);for(;t;)r.push(t),t=n.get(t);r.push(yI)}return r.map(e=>{let n=t.get(e);return{id:e,label:n?wI(n):e===yI?`Null injector`:`Not listed`,kind:n?CI(n):`null`,providers:n?.providers.length??0}})});providerHits=Q(()=>{let e=this.normalizedQuery();if(!e)return[];let t=[];for(let n of this.index().map.values()){let r=n.providers.filter(t=>t.token.toLowerCase().includes(e));r.length&&t.push({id:n.injector.id,label:wI(n),kind:CI(n),tokens:r.map(e=>e.token).join(`, `)})}return t});providedBy=Q(()=>this.providerHits().slice(0,bI));providedByMore=Q(()=>Math.max(0,this.providerHits().length-bI));groupedProviders=Q(()=>{let e=this.normalizedQuery(),t=e?this.sourceProviders().filter(t=>t.token.toLowerCase().includes(e)||t.file.toLowerCase().includes(e)):this.sourceProviders(),n=[{type:`root-provider`,label:`Root Providers (provide*)`,items:[]},{type:`injectable`,label:`Injectable Services`,items:[]},{type:`injection`,label:`inject() Calls`,items:[]},{type:`provider`,label:`Component Providers`,items:[]}];for(let e of t)n.find(t=>t.type===e.type)?.items.push(e);return n.filter(e=>e.items.length>0)});sourceMatchCount=Q(()=>this.groupedProviders().reduce((e,t)=>e+t.items.length,0));searchSummary=Q(()=>{let e=this.query().trim();if(!e)return``;let t=this.providerHits().length;return t===1?`1 injector provides “${e}”.`:t>1?`${t} injectors provide “${e}”.`:this.rows().length?`No injector provides “${e}”.`:`Nothing here matches “${e}”.`});normalizedQuery=Q(()=>this.query().trim().toLowerCase());destroyRef=E(ws);stopTree=null;treeLoad=0;lastSearchMessage=``;constructor(){dc(e=>{let t=this.searchSummary();if(!t){this.lastSearchMessage=``;return}if(t===this.lastSearchMessage)return;let n=setTimeout(()=>{this.lastSearchMessage=t,this.announcement.set(t)},xI);e(()=>clearTimeout(n))}),dc(()=>{let e=this.rpc();e&&(this.loadInjectorTree(e),this.loadSourceProviders(e))}),dc(e=>{let t=this.rpc();if(!t||!this.multiPage())return;let n=!0,r=null;e(()=>{n=!1,r?.()}),t.scope(`pangular`).rpc.sharedState(`component-tree`).then(e=>{if(!n)return;let t=e=>{let t=e?.pages;this.pageTitles.set(t&&typeof t==`object`?t:{})};t(e.value()),r=e.on(`updated`,t)}).catch(()=>{})}),this.destroyRef.onDestroy(()=>{this.stopTree?.(),this.highlight(null)})}async retry(){let e=this.rpc();if(!e||this.retrying())return;let t=document.activeElement;this.retrying.set(!0);try{await Promise.all([this.loadInjectorTree(e),this.loadSourceProviders(e)])}finally{this.retrying.set(!1)}this.destroyRef.destroyed||zd(()=>{t?.isConnected&&document.activeElement!==document.body||this.host.nativeElement.querySelector(`.toolbar input, .toolbar button`)?.focus()},{injector:this.injector})}clearQuery(){this.query.set(``),this.queryInput()?.nativeElement.focus()}label(e){return wI(e)}kind(e){return CI(e)}tone(e){return SI[e]??SI.null}kindById(e){let t=this.index().map.get(e);return t?CI(t):`null`}labelById(e){let t=this.index().map.get(e);return t?wI(t):e===yI?`Null injector`:`not listed`}capital(e){return e.charAt(0).toUpperCase()+e.slice(1)}matches(e){let t=this.normalizedQuery();return!!t&&e.toLowerCase().includes(t)}setView(e){this.view()!==e&&(this.view.set(e),this.choose(null),this.focusId.set(null))}select(e){this.choose(e),this.focusId.set(e)}choose(e){let t=e?this.index().map.get(e):void 0;this.selectedId.set(e),this.selectedLabel.set(t?wI(t):null),this.wasGone=!1}syncGone(){let e=this.gone()!==null;if(e&&!this.wasGone){let e=`The selected injector is no longer on the page.`;this.announcement.update(t=>t===e?`${e}\u00a0`:e)}this.wasGone=e}selectPage(e){if(!e||e===this.shownPageId())return;this.chosenPageId.set(e),this.wasGone=this.gone()!==null;let t=this.pageOptions().find(t=>t.value===e)?.label??e;this.announcement.set(`Showing the injectors of ${t}.`)}notePageGone(e){let t=this.chosenPageId();if(!t||e?.[t])return;let n=this.pageOptions().find(e=>e.value===t)?.label??`The chosen page`;this.chosenPageId.set(null),this.announcement.set(`${n} closed, so this shows another page.`),this.wasGone=!0}toggle(e,t){t?.stopPropagation(),!this.normalizedQuery()&&this.collapsed.update(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})}reveal(e){let t=this.index().map.get(e);if(!t)return;this.setView(t.injector.type===`element`?`element`:`environment`);let{parents:n}=this.index();this.collapsed.update(t=>{let r=new Set(t),i=n.get(e);for(;i;)r.delete(i),i=n.get(i);return r}),this.onlyProviding()&&t.providers.length===0&&this.onlyProviding.set(!1),t.injector.type===`element`&&!t.injector.component&&this.componentsOnly.set(!1),this.select(e),zd(()=>this.focusRow(e,!1),{injector:this.injector})}highlight(e){let t=this.rpc();if(!t)return;let n=e?.injector.type===`element`?e.injector.selector??null:null,r=n?{pageId:this.shownPageId()||null,selector:n}:null;t.scope(`pangular`).rpc.call(`request-page-highlight`,r).catch(()=>{})}onTreeKey(e){let t=this.rows();if(!t.length)return;let n=this.rovingId(),r=t.findIndex(e=>e.node.injector.id===n),i=Math.max(r,0),a=t[i],o=-1;switch(e.key){case`ArrowDown`:o=Math.min(i+1,t.length-1);break;case`ArrowUp`:o=Math.max(i-1,0);break;case`Home`:o=0;break;case`End`:o=t.length-1;break;case`ArrowRight`:a.hasChildren&&!a.expanded?this.toggle(a.node.injector.id):a.hasChildren&&(o=i+1);break;case`ArrowLeft`:if(a.hasChildren&&a.expanded&&!this.normalizedQuery())this.toggle(a.node.injector.id);else{let e=this.index().parents.get(a.node.injector.id);o=t.findIndex(t=>t.node.injector.id===e)}break;case`Enter`:case` `:this.select(a.node.injector.id);break;default:return}if(e.preventDefault(),o>=0){let e=t[o].node.injector.id;this.focusId.set(e),this.choose(e),queueMicrotask(()=>this.focusRow(e,!0))}}focusRow(e,t){let n=document.querySelector(`.row[data-id="${CSS.escape(e)}"]`);n&&(t&&n.focus(),n.scrollIntoView({block:`nearest`}))}clearTree(){this.stopTree?.(),this.stopTree=null}async loadInjectorTree(e){let t=++this.treeLoad;this.clearTree();let n=e.scope(`pangular`),r;try{r=await n.rpc.sharedState(`injector-tree`)}catch{t===this.treeLoad&&this.treeFailed.set(!0);return}if(this.destroyRef.destroyed||this.rpc()!==e||t!==this.treeLoad)return;this.treeFailed.set(!1);let i=e=>{let t=e&&typeof e==`object`?e:null;this.notePageGone(t?.pages),this.treeState.set(t),this.syncGone()};i(r.value()),this.clearTree(),this.stopTree=r.on(`updated`,i)}async loadSourceProviders(e){let t=e.scope(`pangular`);try{this.sourceProviders.set(await t.rpc.call(`get-providers`)),this.sourceFailed.set(!1)}catch{this.sourceProviders.set([]),this.sourceFailed.set(!0)}finally{this.loaded.set(!0)}}count(e){return e.reduce((e,t)=>e+1+this.count(t.children),0)}nodeMatches(e,t){let n=e.injector;return n.name.toLowerCase().includes(t)||!!n.component?.toLowerCase().includes(t)||!!n.directives?.some(e=>e.toLowerCase().includes(t))||e.providers.some(e=>e.token.toLowerCase().includes(t))||!!e.dependencies?.some(e=>e.token.toLowerCase().includes(t))}prune(e,t){let n=[];for(let r of e){let e=this.prune(r.children,t);(t(r)||e.length)&&n.push({...r,children:e})}return n}static ɵfac=function(t){return new(t||e)};static ɵcmp=Wh({type:e,selectors:[[`app-di-inspector`]],viewQuery:function(e,t){e&1&&c_(t.queryInput,nF,5),e&2&&l_()},inputs:{rpc:[1,`rpc`]},decls:11,vars:2,consts:[[`loadError`,``],[`pagePicker`,``],[`queryInput`,``],[`role`,`status`,1,`sr-only`],[`role`,`status`,1,`state`],[3,`ngTemplateOutlet`,`ngTemplateOutletContext`],[`role`,`alert`,1,`state`,`load-error`],[1,`state-title`],[1,`state-hint`],[`type`,`button`,3,`click`],[1,`page-picker`],[`id`,`di-page-label`,1,`label-key`],[`labelledBy`,`di-page-label`,3,`valueChange`,`options`,`value`],[1,`intro`],[1,`toolbar`],[`role`,`group`,`aria-label`,`Injector tree`,1,`segmented`],[1,`pill`],[1,`search`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`,1,`search-icon`],[`cx`,`11`,`cy`,`11`,`r`,`7`],[`d`,`m20 20-3.5-3.5`],[`type`,`search`,`placeholder`,`Find a token, component or injector…`,`aria-label`,`Find a token, component or injector`,`autocomplete`,`off`,`spellcheck`,`false`,3,`input`,`keydown.escape`,`value`],[3,`ngTemplateOutlet`],[1,`checkbox`],[`type`,`checkbox`,3,`change`,`checked`],[1,`total`],[1,`notice`],[1,`where`],[1,`where`,`muted`],[1,`layout`],[1,`state`],[`role`,`tree`,1,`tree`,3,`keydown`,`hidden`],[`role`,`treeitem`,1,`row`,3,`selected`,`--%NS%depth`],[`aria-labelledby`,`di-detail-title`,1,`detail`,`gone`],[`aria-labelledby`,`di-detail-title`,1,`detail`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`],[`cx`,`12`,`cy`,`12`,`r`,`9`],[`d`,`M12 11v5M12 8h.01`],[1,`where-label`],[`type`,`button`,1,`chip`],[1,`more`],[`type`,`button`,1,`chip`,3,`click`],[`aria-hidden`,`true`,1,`dot`],[1,`mono`],[1,`chip-tokens`],[`type`,`button`,1,`link`,3,`click`],[`role`,`treeitem`,1,`row`,3,`click`,`focus`,`blur`,`mouseenter`,`mouseleave`],[`aria-hidden`,`true`,1,`twisty`,3,`open`],[`aria-hidden`,`true`,1,`twisty-space`],[`aria-hidden`,`true`,1,`kind`],[1,`sr-only`],[1,`name`,`mono`],[1,`sub`],[1,`meta`],[1,`count`],[1,`count`,`provides`],[`aria-hidden`,`true`,1,`twisty`,3,`click`],[`viewBox`,`0 0 24 24`],[`d`,`m9 6 6 6-6 6`],[`d`,`M12 5v14M5 12l7 7 7-7`],[`d`,`M21 8 12 3 3 8v8l9 5 9-5z`],[1,`detail-head`],[`id`,`di-detail-title`,1,`mono`],[1,`state`,`compact`],[`type`,`button`],[1,`badge`],[`aria-label`,`Classes on this element`,1,`classes`],[1,`block`],[1,`hint`],[1,`path`],[3,`current`],[1,`providers`],[1,`empty-line`],[3,`is-component`],[1,`step`,`null`],[`type`,`button`,1,`step`],[1,`hint-inline`],[`type`,`button`,1,`step`,3,`click`],[1,`step-count`],[1,`deps`],[1,`dep`,3,`hit`],[1,`dep`],[1,`dep-main`],[1,`token`,`mono`],[1,`flag`],[1,`dep-meta`],[`type`,`button`,1,`from`],[1,`from`,`absent`],[1,`from`,`missing`],[`type`,`button`,1,`from`,3,`click`],[1,`provider`,3,`hit`],[1,`provider`],[1,`flag`,`kind-flag`],[`aria-hidden`,`true`,1,`spinner`],[`type`,`search`,`placeholder`,`Filter by token or file…`,`aria-label`,`Filter by token or file`,`autocomplete`,`off`,`spellcheck`,`false`,3,`input`,`keydown.escape`,`value`],[`aria-live`,`polite`,1,`total`],[1,`source-providers`],[1,`provider-group`],[1,`section-count`],[`role`,`list`,1,`provider-list`],[1,`provider-card`],[1,`provider-header`],[1,`token`],[1,`provided-in`],[1,`provider-meta`],[1,`path`,3,`file`,`line`],[1,`as`]],template:function(e,t){e&1&&(z(0,`p`,3),J(1),B(),ag(2,dF,7,5,`ng-template`,null,0,wv)(4,pF,1,1,`ng-template`,null,1,wv),P(6,oI,34,19)(7,sI,4,0,`div`,4)(8,cI,1,3,`ng-container`,5)(9,uI,6,1)(10,vI,21,6)),e&2&&(M(),Y(t.announcement()),M(5),F(t.roots().length>0?6:t.loaded()?t.loadFailed()&&t.sourceProviders().length===0?8:t.sourceProviders().length===0?9:10:7))},dependencies:[sb,GD,TO],styles:[`[_nghost-%COMP%] {
+}`]})},jF=[`queryInput`],MF=(e,t,n)=>({kind:`provider`,injectorId:e,token:t,index:n}),NF=()=>({compact:!1}),PF=()=>({compact:!0}),FF=(e,t)=>t.node.injector.id,IF=(e,t)=>t.id,LF=(e,t)=>t.from+t.token+e,RF=(e,t)=>t.token+e,zF=(e,t)=>t.type,BF=(e,t)=>t.token+t.file+t.line;function VF(e,t){if(e&1){let e=W();z(0,`div`,6)(1,`p`,7),J(2),B(),z(3,`p`,8),J(4,` The devtools server did not answer. Check that it is still running, then retry. `),B(),z(5,`button`,9),G(`click`,function(){return O(e),k(K().retry())}),J(6),B()()}if(e&2){let e=t.compact,n=K();q(`compact`,e),M(2),X(` `,e?`Couldn't load the live injector tree`:`Couldn't load DI data`,` `),M(3),N(`aria-disabled`,n.retrying()||null),M(),X(` `,n.retrying()?`Retrying…`:`Retry`,` `)}}function HF(e,t){if(e&1){let e=W();z(0,`div`,10)(1,`span`,11),J(2,`Page`),B(),z(3,`app-select`,12),G(`valueChange`,function(t){return O(e),k(K(2).selectPage(t))}),B()()}if(e&2){let e=K(2);M(3),R(`options`,e.pageOptions())(`value`,e.shownPageId())}}function UF(e,t){e&1&&P(0,HF,4,2,`div`,10),e&2&&F(K().pageOptions().length>1?0:-1)}function WF(e,t){if(e&1){let e=W();z(0,`label`,23)(1,`input`,24),G(`change`,function(){O(e);let t=K(2);return k(t.componentsOnly.set(!t.componentsOnly()))}),B(),J(2,` Components only `),B()}if(e&2){let e=K(2);M(),R(`checked`,e.componentsOnly())}}function GF(e,t){e&1&&(z(0,`span`,25),J(1),B()),e&2&&(M(),X(`Change detection: `,t))}function KF(e,t){e&1&&(z(0,`p`,26),A(),z(1,`svg`,35),V(2,`circle`,36)(3,`path`,37),B(),ms(),z(4,`span`)(5,`strong`),J(6,`The page reported only part of its injector tree.`),B(),J(7,` It keeps at most 2000 element injectors and 2500 in all, and leaves out injectors nested more than 1000 levels deep, so a lookup path or a provider can point to one that is not listed. `),B()())}function qF(e,t){if(e&1){let e=W();z(0,`button`,41),G(`click`,function(){let t=O(e).$implicit;return k(K(3).reveal(t.id))}),V(1,`span`,42),z(2,`span`,43),J(3),B(),z(4,`span`,44),J(5),B()()}if(e&2){let e=t.$implicit,n=K(3);M(),j_(`background`,n.tone(e.kind)),M(2),Y(e.label),M(2),Y(e.tokens)}}function JF(e,t){e&1&&(z(0,`span`,40),J(1),B()),e&2&&(M(),X(`+`,t,` more`))}function YF(e,t){if(e&1&&(z(0,`div`,27)(1,`span`,38),J(2,`Provided by`),B(),I(3,qF,6,4,`button`,39,IF),P(5,JF,2,1,`span`,40),B()),e&2){let e,t=K(2);M(3),L(t.providedBy()),M(2),F((e=t.providedByMore())?5:-1,e)}}function XF(e,t){if(e&1){let e=W();z(0,`div`,28),J(1),z(2,`button`,45),G(`click`,function(){return O(e),k(K(2).clearQuery())}),J(3,`Clear search`),B()()}if(e&2){let e=K(2);M(),X(` Nothing here matches “`,e.query().trim(),`”. `)}}function ZF(e,t){e&1&&J(0,` None of them provide anything themselves. `)}function QF(e,t){e&1&&J(0,` Turn off “Components only” to see directives. `)}function $F(e,t){e&1&&J(0,` Try a different search. `)}function eI(e,t){if(e&1&&(z(0,`div`,30)(1,`p`,7),J(2,`No injectors to show`),B(),z(3,`p`,8),P(4,ZF,1,0)(5,QF,1,0)(6,$F,1,0),B()()),e&2){let e=K(2);M(4),F(e.onlyProviding()?4:e.componentsOnly()&&e.view()===`element`?5:6)}}function tI(e,t){if(e&1){let e=W();z(0,`span`,56),G(`click`,function(t){O(e);let n=K().$implicit;return k(K(2).toggle(n.node.injector.id,t))}),A(),z(1,`svg`,57),V(2,`path`,58),B()()}if(e&2){let e=K().$implicit;q(`open`,e.expanded)}}function nI(e,t){e&1&&V(0,`span`,48)}function rI(e,t){if(e&1&&(z(0,`span`,52),J(1),B()),e&2){let e=K().$implicit;M(),Y(e.node.injector.component)}}function iI(e,t){if(e&1&&(z(0,`span`,52),J(1),B()),e&2){let e=K().$implicit;M(),Y(e.node.injector.directives.join(`, `))}}function aI(e,t){if(e&1&&(z(0,`span`,54),A(),z(1,`svg`,35),V(2,`path`,59),B(),ms(),z(3,`span`,50),J(4,`injects`),B(),J(5),B()),e&2){let e=K().$implicit;N(`title`,e.node.dependencies.length+` injected`),M(5),X(` `,e.node.dependencies.length,` `)}}function oI(e,t){if(e&1&&(z(0,`span`,55),A(),z(1,`svg`,35),V(2,`path`,60),B(),ms(),z(3,`span`,50),J(4,`provides`),B(),J(5),B()),e&2){let e=K().$implicit;N(`title`,e.node.injector.providerCount+` provided`),M(5),X(` `,e.node.injector.providerCount,` `)}}function sI(e,t){if(e&1){let e=W();z(0,`div`,46),G(`click`,function(){let t=O(e).$implicit;return k(K(2).select(t.node.injector.id))})(`focus`,function(){let t=O(e).$implicit,n=K(2);return n.focusId.set(t.node.injector.id),k(n.highlight(t.node))})(`blur`,function(){return O(e),k(K(2).highlight(null))})(`mouseenter`,function(){let t=O(e).$implicit;return k(K(2).highlight(t.node))})(`mouseleave`,function(){return O(e),k(K(2).highlight(null))}),P(1,tI,3,2,`span`,47)(2,nI,1,0,`span`,48),z(3,`span`,49),J(4),B(),z(5,`span`,50),J(6),B(),z(7,`span`,51),J(8),B(),P(9,rI,2,1,`span`,52)(10,iI,2,1,`span`,52),z(11,`span`,53),P(12,aI,6,2,`span`,54),P(13,oI,6,2,`span`,55),B()()}if(e&2){let e=t.$implicit,n=K(2);j_(`--%NS%depth`,e.depth),q(`selected`,n.selected()?.injector?.id===e.node.injector.id),N(`aria-level`,e.depth+1)(`aria-expanded`,e.hasChildren?e.expanded:null)(`aria-selected`,n.selected()?.injector?.id===e.node.injector.id)(`tabindex`,n.rovingId()===e.node.injector.id?0:-1)(`data-id`,e.node.injector.id),M(),F(e.hasChildren?1:2),M(2),j_(`--%NS%tone`,n.tone(n.kind(e.node))),N(`title`,n.kind(e.node)),M(),Y(n.kind(e.node)[0].toUpperCase()),M(2),Y(n.kind(e.node)),M(2),Y(n.label(e.node)),M(),F(e.node.injector.component?9:e.node.injector.directives?.length?10:-1),M(3),F((e.node.dependencies?.length??0)>0?12:-1),M(),F(e.node.injector.providerCount>0?13:-1)}}function cI(e,t){if(e&1){let e=W();z(0,`button`,9),G(`click`,function(){let t=O(e);return k(K(3).reveal(t.node.injector.id))}),J(1),B()}if(e&2){let e=K(3);M(),X(` Show `,e.label(t.node),` `)}}function lI(e,t){if(e&1&&(z(0,`section`,33)(1,`header`,61)(2,`h2`,62),J(3),B()(),z(4,`div`,63)(5,`p`,8),J(6,` This injector is no longer on the page. Its component or directive was destroyed. `),B(),P(7,cI,2,1,`button`,64),B()()),e&2){let e,n=K(2);M(3),Y(t),M(4),F((e=n.rows()[0])?7:-1,e)}}function uI(e,t){if(e&1&&(z(0,`li`),J(1),B()),e&2){let e=t.$implicit;q(`is-component`,e===K(2).injector.component),M(),Y(e)}}function dI(e,t){if(e&1&&(z(0,`ul`,66),I(1,uI,2,3,`li`,73,Og),B()),e&2){let e=K();M(),L(e.injector.directives)}}function fI(e,t){if(e&1&&(z(0,`span`,74),V(1,`span`,42),J(2,` Null injector `),z(3,`span`,76),J(4,`throws NullInjectorError`),B()()),e&2){let e=K(4);M(),j_(`background`,e.tone(`null`))}}function pI(e,t){if(e&1&&(z(0,`span`,78),J(1),z(2,`span`,50),J(3),B()()),e&2){let e=K(2).$implicit;M(),X(` `,e.providers,` `),M(2),Y(e.providers===1?`provider`:`providers`)}}function mI(e,t){if(e&1){let e=W();z(0,`button`,77),G(`click`,function(){O(e);let t=K().$implicit;return k(K(3).reveal(t.id))}),V(1,`span`,42),z(2,`span`,43),J(3),B(),P(4,pI,4,2,`span`,78),B()}if(e&2){let e=K().$implicit,t=K(3);M(),j_(`background`,t.tone(e.kind)),M(2),Y(e.label),M(),F(e.providers?4:-1)}}function hI(e,t){if(e&1&&(z(0,`li`),P(1,fI,5,2,`span`,74)(2,mI,5,4,`button`,75),B()),e&2){let e=t.$implicit,n=t.$index,r=K(3);q(`current`,n===0),M(),F(e.id===r.nullId?1:2)}}function gI(e,t){e&1&&(z(0,`p`,68),J(1,`Only services this injector has already created are listed.`),B())}function _I(e,t){if(e&1&&(z(0,`span`,84),J(1),B()),e&2){let e=t.$implicit;M(),Y(e)}}function vI(e,t){if(e&1&&(z(0,`span`),J(1),B()),e&2){let e=K().$implicit;M(),X(`for `,e.from)}}function yI(e,t){if(e&1){let e=W();z(0,`button`,89),G(`click`,function(){let t=O(e);return k(K(6).reveal(t))}),V(1,`span`,42),J(2,` from `),z(3,`span`,43),J(4),B()()}if(e&2){let e=t,n=K(6);M(),j_(`background`,n.tone(n.kindById(e))),M(3),Y(n.labelById(e))}}function bI(e,t){e&1&&(z(0,`span`,87),J(1,`optional, not provided`),B())}function xI(e,t){e&1&&(z(0,`span`,88),J(1,`not provided anywhere`),B())}function SI(e,t){if(e&1&&(z(0,`li`,81)(1,`div`,82)(2,`span`,83),J(3),B(),I(4,_I,2,1,`span`,84,Og),B(),z(6,`div`,85),P(7,vI,2,1,`span`),P(8,yI,5,3,`button`,86)(9,bI,2,0,`span`,87)(10,xI,2,0,`span`,88),B()()),e&2){let e,n=t.$implicit,r=K(3);q(`hit`,K(2).matches(n.token)),M(3),Y(n.token),M(),L(n.flags),M(3),F(r.injector.type!==`element`||r.injector.directives&&r.injector.directives.length>1?7:-1),M(),F((e=n.providedBy)?8:n.flags.includes(`optional`)?9:10,e)}}function CI(e,t){if(e&1&&(z(0,`ul`,79),I(1,SI,11,5,`li`,80,LF),B()),e&2){let e=K(2);M(),L(e.dependencies)}}function wI(e,t){e&1&&(z(0,`p`,72),J(1,`Nothing is injected through the constructor or inject().`),B())}function TI(e,t){e&1&&(z(0,`p`,72),J(1,`No service created here has injected anything yet.`),B())}function EI(e,t){if(e&1&&(z(0,`div`,67)(1,`h3`),J(2),z(3,`span`,16),J(4),B()(),P(5,gI,2,0,`p`,68),P(6,CI,3,0,`ul`,79)(7,wI,2,0,`p`,72)(8,TI,2,0,`p`,72),B()),e&2){let e=K();M(2),X(` `,e.injector.type===`element`?`Injected here`:`Injected by its services`,` `),M(2),Y(e.dependencies?.length??0),M(),F(e.injector.type===`element`?-1:5),M(),F(e.dependencies?.length?6:e.injector.type===`element`?7:8)}}function DI(e,t){e&1&&(z(0,`span`,84),J(1,`viewProviders`),B())}function OI(e,t){e&1&&(z(0,`span`,84),J(1,`multi`),B())}function kI(e,t){if(e&1&&(z(0,`div`,85),J(1),B()),e&2){let e=K().$implicit;M(),X(`via `,e.importPath.join(` › `))}}function AI(e,t){if(e&1&&(z(0,`li`,91)(1,`div`,82)(2,`span`,83),J(3),B(),z(4,`span`,92),J(5),B(),P(6,DI,2,0,`span`,84),P(7,OI,2,0,`span`,84),B(),P(8,kI,2,1,`div`,85),V(9,`app-store-global`,93),B()),e&2){let e=t.$implicit,n=t.$index,r=K(2),i=K(2);q(`hit`,i.matches(e.token)),M(3),Y(e.token),M(2),Y(e.type===`unknown`?`provider`:`use`+i.capital(e.type)),M(),F(e.isViewProvider?6:-1),M(),F(e.multi?7:-1),M(),F(e.importPath?.length?8:-1),M(),R(`rpc`,i.rpc())(`pageId`,i.shownPageId())(`target`,gv(11,MF,r.injector.id,e.token,n))(`label`,e.token)}}function jI(e,t){if(e&1&&(z(0,`ul`,71),I(1,AI,10,15,`li`,90,RF),B()),e&2){let e=K();M(),L(e.providers)}}function MI(e,t){e&1&&J(0,` No providers or viewProviders on this element. `)}function NI(e,t){e&1&&J(0,` This injector has no providers of its own. `)}function PI(e,t){if(e&1&&(z(0,`p`,72),P(1,MI,1,0)(2,NI,1,0),B()),e&2){let e=K();M(),F(e.injector.type===`element`?1:2)}}function FI(e,t){if(e&1&&(z(0,`section`,34)(1,`header`,61)(2,`span`,65),J(3),B(),z(4,`h2`,62),J(5),B(),P(6,dI,3,0,`ul`,66),B(),z(7,`div`,67)(8,`h3`),J(9,`Lookup path`),B(),z(10,`p`,68),J(11,`Angular asks these injectors in order until one has the token.`),B(),z(12,`ol`,69),I(13,hI,3,3,`li`,70,IF),B()(),P(15,EI,9,4,`div`,67),z(16,`div`,67)(17,`h3`),J(18,` Provides `),z(19,`span`,16),J(20),B()(),P(21,jI,3,0,`ul`,71)(22,PI,3,1,`p`,72),B()()),e&2){let e=t,n=K(2);M(2),j_(`--%NS%tone`,n.tone(n.kind(e))),M(),Y(n.kind(e)),M(2),Y(n.label(e)),M(),F(e.injector.directives?.length?6:-1),M(7),L(n.path()),M(2),F(e.injector.type===`element`||e.dependencies?15:-1),M(5),Y(e.providers.length),M(),F(e.providers.length?21:22)}}function II(e,t){if(e&1){let e=W();z(0,`p`,13),J(1,` Every component and directive gets an injector. When it asks for a token, Angular walks up this tree, then through the environment injectors, until something provides it. `),B(),z(2,`div`,14)(3,`div`,15)(4,`button`,9),G(`click`,function(){return O(e),k(K().setView(`element`))}),J(5,` Elements `),z(6,`span`,16),J(7),B()(),z(8,`button`,9),G(`click`,function(){return O(e),k(K().setView(`environment`))}),J(9,` Environment `),z(10,`span`,16),J(11),B()()(),z(12,`div`,17),A(),z(13,`svg`,18),V(14,`circle`,19)(15,`path`,20),B(),ms(),z(16,`input`,21,2),G(`input`,function(t){return O(e),k(K().query.set(t.target.value))})(`keydown.escape`,function(){return O(e),k(K().query.set(``))}),B()(),Ug(18,22),P(19,WF,3,1,`label`,23),z(20,`label`,23)(21,`input`,24),G(`change`,function(){O(e);let t=K();return k(t.onlyProviding.set(!t.onlyProviding()))}),B(),J(22,` With providers `),B(),P(23,GF,2,1,`span`,25),B(),P(24,KF,8,0,`p`,26),P(25,YF,6,1,`div`,27)(26,XF,4,1,`div`,28),z(27,`div`,29),P(28,eI,7,1,`div`,30),z(29,`div`,31),G(`keydown`,function(t){return O(e),k(K().onTreeKey(t))}),I(30,sI,14,19,`div`,32,FF),B(),P(32,lI,8,2,`section`,33)(33,FI,23,8,`section`,34),B()}if(e&2){let e,t,n=K(),r=u_(5);M(4),q(`active`,n.view()===`element`),N(`aria-pressed`,n.view()===`element`),M(3),Y(n.elementCount()),M(),q(`active`,n.view()===`environment`),N(`aria-pressed`,n.view()===`environment`),M(3),Y(n.environmentCount()),M(5),R(`value`,n.query()),M(2),R(`ngTemplateOutlet`,r),M(),F(n.view()===`element`?19:-1),M(2),R(`checked`,n.onlyProviding()),M(2),F((e=n.zone())?23:-1,e),M(),F(n.truncated()?24:-1),M(),F(n.providedBy().length?25:n.query().trim()&&!n.rows().length?26:-1),M(3),F(n.rows().length?-1:28),M(),R(`hidden`,!n.rows().length),N(`aria-label`,n.view()===`element`?`Element injectors`:`Environment injectors`),M(),L(n.rows()),M(2),F((t=n.gone())?32:(t=n.selected())?33:-1,t)}}function LI(e,t){e&1&&(z(0,`div`,4),V(1,`span`,94),z(2,`p`,7),J(3,`Loading dependency injection data…`),B()())}function RI(e,t){e&1&&Ug(0,5),e&2&&(K(),R(`ngTemplateOutlet`,u_(3))(`ngTemplateOutletContext`,mv(2,NF)))}function zI(e,t){if(e&1&&(z(0,`div`,14),Ug(1,22),B()),e&2){K(2);let e=u_(5);M(),R(`ngTemplateOutlet`,e)}}function BI(e,t){e&1&&(P(0,zI,2,1,`div`,14),z(1,`div`,30)(2,`p`,7),J(3,`No DI data found`),B(),z(4,`p`,8),J(5,` Open the app in a browser with the devtools connected to see its live injectors. No providers, injectables or inject() calls were found in the source either. `),B()()),e&2&&F(K().pageOptions().length>1?0:-1)}function VI(e,t){e&1&&Ug(0,5),e&2&&(K(2),R(`ngTemplateOutlet`,u_(3))(`ngTemplateOutletContext`,mv(2,PF)))}function HI(e,t){if(e&1){let e=W();z(0,`div`,30)(1,`p`,7),J(2),B(),z(3,`p`,8),J(4,`Try part of a token name or a file path.`),B(),z(5,`button`,9),G(`click`,function(){return O(e),k(K(2).clearQuery())}),J(6,`Clear filter`),B()()}if(e&2){let e=K(2);M(2),X(`No providers match “`,e.query(),`”`)}}function UI(e,t){if(e&1&&(z(0,`span`,104),J(1),B()),e&2){let e=K().$implicit;M(),X(`providedIn: `,e.providedIn)}}function WI(e,t){if(e&1&&(z(0,`span`,107),J(1),B()),e&2){let e=K().$implicit;M(),X(`as `,e.source)}}function GI(e,t){if(e&1&&(z(0,`li`,101)(1,`div`,102)(2,`span`,103),J(3),B(),P(4,UI,2,1,`span`,104),B(),z(5,`div`,105),V(6,`app-source-link`,106),P(7,WI,2,1,`span`,107),B()()),e&2){let e=t.$implicit;M(3),Y(e.token),M(),F(e.providedIn?4:-1),M(2),R(`file`,e.file)(`line`,e.line),M(),F(e.source!==`class`&&e.source!==`providers array`?7:-1)}}function KI(e,t){if(e&1&&(z(0,`section`,98)(1,`h2`),J(2),z(3,`span`,99),J(4),B()(),z(5,`ul`,100),I(6,GI,8,5,`li`,101,BF),B()()),e&2){let e=t.$implicit;M(2),X(` `,e.label,` `),M(2),Y(e.items.length),M(2),L(e.items)}}function qI(e,t){if(e&1&&(z(0,`div`,97),I(1,KI,8,2,`section`,98,zF),B()),e&2){let e=K(2);M(),L(e.groupedProviders())}}function JI(e,t){if(e&1){let e=W();z(0,`div`,14)(1,`div`,17),A(),z(2,`svg`,18),V(3,`circle`,19)(4,`path`,20),B(),ms(),z(5,`input`,95,2),G(`input`,function(t){return O(e),k(K().query.set(t.target.value))})(`keydown.escape`,function(){return O(e),k(K().query.set(``))}),B()(),Ug(7,22),z(8,`span`,96),J(9),B()(),P(10,VI,1,3,`ng-container`,5),z(11,`p`,26),A(),z(12,`svg`,35),V(13,`circle`,36)(14,`path`,37),B(),ms(),z(15,`span`)(16,`strong`),J(17,`DI from source scan (static analysis).`),B(),J(18,` Connect the overlay on Angular 20 or later to see the live injector tree. `),B()(),P(19,HI,7,1,`div`,30)(20,qI,3,0,`div`,97)}if(e&2){let e=K(),t=u_(5);M(5),R(`value`,e.query()),M(2),R(`ngTemplateOutlet`,t),M(2),Z(` `,e.sourceMatchCount(),` of `,e.sourceProviders().length,` `),M(),F(e.loadFailed()?10:-1),M(9),F(e.groupedProviders().length===0?19:20)}}var YI=`inj-null`,XI=12,ZI=600,QI={component:`var(--accent-text)`,directive:`var(--directive)`,environment:`var(--ok-text)`,null:`var(--text-3)`};function $I(e){return e.injector.type===`element`?e.injector.component?`component`:`directive`:`environment`}function eL(e){return e.injector.type===`element`?`<${e.injector.name}>`:e.injector.name}function tL(e){return Array.isArray(e)}var nL=class e{rpc=$(null);injector=E(Ss);nullId=YI;hostPage=fE();treeState=j(null);pageTitles=j({});chosenPageId=j(null);treePages=Q(()=>{let e=this.treeState();if(!e)return{};let t=e.pages&&typeof e.pages==`object`?e.pages:{};return Object.keys(t).length||this.hostPage?t:{"":e}});shownPageId=Fv({source:()=>({pages:this.treePages(),chosen:this.chosenPageId()}),computation:({pages:e,chosen:t},n)=>{let r={};for(let[t,n]of Object.entries(e))r[t]={pageId:t,reportedAt:typeof n?.reportedAt==`number`?n.reportedAt:0};return pE(r,{chosen:t,host:this.hostPage,previous:n?.value??null})}});shownPage=Q(()=>{let e=this.shownPageId();return e===null?null:this.treePages()[e]??null});roots=Q(()=>{let e=this.shownPage()?.roots;return tL(e)?e:[]});environment=Q(()=>{let e=this.shownPage()?.environment;return tL(e)?e:[]});truncated=Q(()=>this.shownPage()?.truncated===!0);zone=Q(()=>{let e=this.shownPage()?.zone;return typeof e==`string`?_D(e):null});multiPage=Q(()=>!this.hostPage&&Object.keys(this.treePages()).length>1);pageOptions=Q(()=>{if(!this.multiPage())return[];let e=this.pageTitles();return Object.keys(this.treePages()).map(t=>{let n=e[t];return{value:t,label:n?.title||n?.url||`Page ${t}`,hint:n?.url}})});pageKey=Q(()=>this.shownPageId()??``);perPage(e){let t=new Map;return Fv({source:this.pageKey,computation:(n,r)=>(r&&t.set(r.source,r.value),t.has(n)?t.get(n):e())})}sourceProviders=j([]);loaded=j(!1);treeFailed=j(!1);sourceFailed=j(!1);loadFailed=Q(()=>this.treeFailed()||this.sourceFailed());retrying=j(!1);host=E(Nl);view=j(`element`);query=j(``);queryInput=Jv(`queryInput`);onlyProviding=j(!1);componentsOnly=j(!0);collapsed=this.perPage(()=>new Set);selectedId=this.perPage(()=>null);focusId=this.perPage(()=>null);announcement=j(``);selectedLabel=this.perPage(()=>null);wasGone=!1;index=Q(()=>{let e=new Map,t=new Map,n=(r,i)=>{for(let a of r)e.set(a.injector.id,a),i&&t.set(a.injector.id,i),n(a.children,a.injector.id)};return n(this.roots(),null),n(this.environment(),null),{map:e,parents:t}});elementCount=Q(()=>this.count(this.roots()));environmentCount=Q(()=>this.count(this.environment()));visible=Q(()=>{let e=this.view()===`element`?this.roots():this.environment();this.view()===`element`&&this.componentsOnly()&&(e=this.prune(e,e=>!!e.injector.component)),this.onlyProviding()&&(e=this.prune(e,e=>e.providers.length>0));let t=this.normalizedQuery();return t&&(e=this.prune(e,e=>this.nodeMatches(e,t))),e});rows=Q(()=>{let e=[],t=this.collapsed(),n=!!this.normalizedQuery(),r=(i,a)=>{for(let o of i){let i=n||!t.has(o.injector.id);e.push({node:o,depth:a,hasChildren:o.children.length>0,expanded:i}),i&&r(o.children,a+1)}};return r(this.visible(),0),e});selected=Q(()=>{let e=this.selectedId();return e?this.index().map.get(e)??null:this.rows()[0]?.node??null});gone=Q(()=>{let e=this.selectedId();return e&&!this.index().map.has(e)?this.selectedLabel()??`The injector`:null});rovingId=Q(()=>{let e=this.rows(),t=this.focusId()??this.selected()?.injector.id;return t&&e.some(e=>e.node.injector.id===t)?t:e[0]?.node.injector.id??null});path=Q(()=>{let e=this.selected();if(!e)return[];let{map:t,parents:n}=this.index(),r=e.injector.path??[];if(!r.length){r=[e.injector.id];let t=n.get(e.injector.id);for(;t;)r.push(t),t=n.get(t);r.push(YI)}return r.map(e=>{let n=t.get(e);return{id:e,label:n?eL(n):e===YI?`Null injector`:`Not listed`,kind:n?$I(n):`null`,providers:n?.providers.length??0}})});providerHits=Q(()=>{let e=this.normalizedQuery();if(!e)return[];let t=[];for(let n of this.index().map.values()){let r=n.providers.filter(t=>t.token.toLowerCase().includes(e));r.length&&t.push({id:n.injector.id,label:eL(n),kind:$I(n),tokens:r.map(e=>e.token).join(`, `)})}return t});providedBy=Q(()=>this.providerHits().slice(0,XI));providedByMore=Q(()=>Math.max(0,this.providerHits().length-XI));groupedProviders=Q(()=>{let e=this.normalizedQuery(),t=e?this.sourceProviders().filter(t=>t.token.toLowerCase().includes(e)||t.file.toLowerCase().includes(e)):this.sourceProviders(),n=[{type:`root-provider`,label:`Root Providers (provide*)`,items:[]},{type:`injectable`,label:`Injectable Services`,items:[]},{type:`injection`,label:`inject() Calls`,items:[]},{type:`provider`,label:`Component Providers`,items:[]}];for(let e of t)n.find(t=>t.type===e.type)?.items.push(e);return n.filter(e=>e.items.length>0)});sourceMatchCount=Q(()=>this.groupedProviders().reduce((e,t)=>e+t.items.length,0));searchSummary=Q(()=>{let e=this.query().trim();if(!e)return``;let t=this.providerHits().length;return t===1?`1 injector provides “${e}”.`:t>1?`${t} injectors provide “${e}”.`:this.rows().length?`No injector provides “${e}”.`:`Nothing here matches “${e}”.`});normalizedQuery=Q(()=>this.query().trim().toLowerCase());destroyRef=E(ws);stopTree=null;treeLoad=0;lastSearchMessage=``;constructor(){dc(e=>{let t=this.searchSummary();if(!t){this.lastSearchMessage=``;return}if(t===this.lastSearchMessage)return;let n=setTimeout(()=>{this.lastSearchMessage=t,this.announcement.set(t)},ZI);e(()=>clearTimeout(n))}),dc(()=>{let e=this.rpc();e&&(this.loadInjectorTree(e),this.loadSourceProviders(e))}),dc(e=>{let t=this.rpc();if(!t||!this.multiPage())return;let n=!0,r=null;e(()=>{n=!1,r?.()}),t.scope(`pangular`).rpc.sharedState(`component-tree`).then(e=>{if(!n)return;let t=e=>{let t=e?.pages;this.pageTitles.set(t&&typeof t==`object`?t:{})};t(e.value()),r=e.on(`updated`,t)}).catch(()=>{})}),this.destroyRef.onDestroy(()=>{this.stopTree?.(),this.highlight(null)})}async retry(){let e=this.rpc();if(!e||this.retrying())return;let t=document.activeElement;this.retrying.set(!0);try{await Promise.all([this.loadInjectorTree(e),this.loadSourceProviders(e)])}finally{this.retrying.set(!1)}this.destroyRef.destroyed||zd(()=>{t?.isConnected&&document.activeElement!==document.body||this.host.nativeElement.querySelector(`.toolbar input, .toolbar button`)?.focus()},{injector:this.injector})}clearQuery(){this.query.set(``),this.queryInput()?.nativeElement.focus()}label(e){return eL(e)}kind(e){return $I(e)}tone(e){return QI[e]??QI.null}kindById(e){let t=this.index().map.get(e);return t?$I(t):`null`}labelById(e){let t=this.index().map.get(e);return t?eL(t):e===YI?`Null injector`:`not listed`}capital(e){return e.charAt(0).toUpperCase()+e.slice(1)}matches(e){let t=this.normalizedQuery();return!!t&&e.toLowerCase().includes(t)}setView(e){this.view()!==e&&(this.view.set(e),this.choose(null),this.focusId.set(null))}select(e){this.choose(e),this.focusId.set(e)}choose(e){let t=e?this.index().map.get(e):void 0;this.selectedId.set(e),this.selectedLabel.set(t?eL(t):null),this.wasGone=!1}syncGone(){let e=this.gone()!==null;if(e&&!this.wasGone){let e=`The selected injector is no longer on the page.`;this.announcement.update(t=>t===e?`${e}\u00a0`:e)}this.wasGone=e}selectPage(e){if(!e||e===this.shownPageId())return;this.chosenPageId.set(e),this.wasGone=this.gone()!==null;let t=this.pageOptions().find(t=>t.value===e)?.label??e;this.announcement.set(`Showing the injectors of ${t}.`)}notePageGone(e){let t=this.chosenPageId();if(!t||e?.[t])return;let n=this.pageOptions().find(e=>e.value===t)?.label??`The chosen page`;this.chosenPageId.set(null),this.announcement.set(`${n} closed, so this shows another page.`),this.wasGone=!0}toggle(e,t){t?.stopPropagation(),!this.normalizedQuery()&&this.collapsed.update(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})}reveal(e){let t=this.index().map.get(e);if(!t)return;this.setView(t.injector.type===`element`?`element`:`environment`);let{parents:n}=this.index();this.collapsed.update(t=>{let r=new Set(t),i=n.get(e);for(;i;)r.delete(i),i=n.get(i);return r}),this.onlyProviding()&&t.providers.length===0&&this.onlyProviding.set(!1),t.injector.type===`element`&&!t.injector.component&&this.componentsOnly.set(!1),this.select(e),zd(()=>this.focusRow(e,!1),{injector:this.injector})}highlight(e){let t=this.rpc();if(!t)return;let n=e?.injector.type===`element`?e.injector.selector??null:null,r=n?{pageId:this.shownPageId()||null,selector:n}:null;t.scope(`pangular`).rpc.call(`request-page-highlight`,r).catch(()=>{})}onTreeKey(e){let t=this.rows();if(!t.length)return;let n=this.rovingId(),r=t.findIndex(e=>e.node.injector.id===n),i=Math.max(r,0),a=t[i],o=-1;switch(e.key){case`ArrowDown`:o=Math.min(i+1,t.length-1);break;case`ArrowUp`:o=Math.max(i-1,0);break;case`Home`:o=0;break;case`End`:o=t.length-1;break;case`ArrowRight`:a.hasChildren&&!a.expanded?this.toggle(a.node.injector.id):a.hasChildren&&(o=i+1);break;case`ArrowLeft`:if(a.hasChildren&&a.expanded&&!this.normalizedQuery())this.toggle(a.node.injector.id);else{let e=this.index().parents.get(a.node.injector.id);o=t.findIndex(t=>t.node.injector.id===e)}break;case`Enter`:case` `:this.select(a.node.injector.id);break;default:return}if(e.preventDefault(),o>=0){let e=t[o].node.injector.id;this.focusId.set(e),this.choose(e),queueMicrotask(()=>this.focusRow(e,!0))}}focusRow(e,t){let n=document.querySelector(`.row[data-id="${CSS.escape(e)}"]`);n&&(t&&n.focus(),n.scrollIntoView({block:`nearest`}))}clearTree(){this.stopTree?.(),this.stopTree=null}async loadInjectorTree(e){let t=++this.treeLoad;this.clearTree();let n=e.scope(`pangular`),r;try{r=await n.rpc.sharedState(`injector-tree`)}catch{t===this.treeLoad&&this.treeFailed.set(!0);return}if(this.destroyRef.destroyed||this.rpc()!==e||t!==this.treeLoad)return;this.treeFailed.set(!1);let i=e=>{let t=e&&typeof e==`object`?e:null;this.notePageGone(t?.pages),this.treeState.set(t),this.syncGone()};i(r.value()),this.clearTree(),this.stopTree=r.on(`updated`,i)}async loadSourceProviders(e){let t=e.scope(`pangular`);try{this.sourceProviders.set(await t.rpc.call(`get-providers`)),this.sourceFailed.set(!1)}catch{this.sourceProviders.set([]),this.sourceFailed.set(!0)}finally{this.loaded.set(!0)}}count(e){return e.reduce((e,t)=>e+1+this.count(t.children),0)}nodeMatches(e,t){let n=e.injector;return n.name.toLowerCase().includes(t)||!!n.component?.toLowerCase().includes(t)||!!n.directives?.some(e=>e.toLowerCase().includes(t))||e.providers.some(e=>e.token.toLowerCase().includes(t))||!!e.dependencies?.some(e=>e.token.toLowerCase().includes(t))}prune(e,t){let n=[];for(let r of e){let e=this.prune(r.children,t);(t(r)||e.length)&&n.push({...r,children:e})}return n}static ɵfac=function(t){return new(t||e)};static ɵcmp=Wh({type:e,selectors:[[`app-di-inspector`]],viewQuery:function(e,t){e&1&&c_(t.queryInput,jF,5),e&2&&l_()},inputs:{rpc:[1,`rpc`]},decls:11,vars:2,consts:[[`loadError`,``],[`pagePicker`,``],[`queryInput`,``],[`role`,`status`,1,`sr-only`],[`role`,`status`,1,`state`],[3,`ngTemplateOutlet`,`ngTemplateOutletContext`],[`role`,`alert`,1,`state`,`load-error`],[1,`state-title`],[1,`state-hint`],[`type`,`button`,3,`click`],[1,`page-picker`],[`id`,`di-page-label`,1,`label-key`],[`labelledBy`,`di-page-label`,3,`valueChange`,`options`,`value`],[1,`intro`],[1,`toolbar`],[`role`,`group`,`aria-label`,`Injector tree`,1,`segmented`],[1,`pill`],[1,`search`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`,1,`search-icon`],[`cx`,`11`,`cy`,`11`,`r`,`7`],[`d`,`m20 20-3.5-3.5`],[`type`,`search`,`placeholder`,`Find a token, component or injector…`,`aria-label`,`Find a token, component or injector`,`autocomplete`,`off`,`spellcheck`,`false`,3,`input`,`keydown.escape`,`value`],[3,`ngTemplateOutlet`],[1,`checkbox`],[`type`,`checkbox`,3,`change`,`checked`],[1,`total`],[1,`notice`],[1,`where`],[1,`where`,`muted`],[1,`layout`],[1,`state`],[`role`,`tree`,1,`tree`,3,`keydown`,`hidden`],[`role`,`treeitem`,1,`row`,3,`selected`,`--%NS%depth`],[`aria-labelledby`,`di-detail-title`,1,`detail`,`gone`],[`aria-labelledby`,`di-detail-title`,1,`detail`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`],[`cx`,`12`,`cy`,`12`,`r`,`9`],[`d`,`M12 11v5M12 8h.01`],[1,`where-label`],[`type`,`button`,1,`chip`],[1,`more`],[`type`,`button`,1,`chip`,3,`click`],[`aria-hidden`,`true`,1,`dot`],[1,`mono`],[1,`chip-tokens`],[`type`,`button`,1,`link`,3,`click`],[`role`,`treeitem`,1,`row`,3,`click`,`focus`,`blur`,`mouseenter`,`mouseleave`],[`aria-hidden`,`true`,1,`twisty`,3,`open`],[`aria-hidden`,`true`,1,`twisty-space`],[`aria-hidden`,`true`,1,`kind`],[1,`sr-only`],[1,`name`,`mono`],[1,`sub`],[1,`meta`],[1,`count`],[1,`count`,`provides`],[`aria-hidden`,`true`,1,`twisty`,3,`click`],[`viewBox`,`0 0 24 24`],[`d`,`m9 6 6 6-6 6`],[`d`,`M12 5v14M5 12l7 7 7-7`],[`d`,`M21 8 12 3 3 8v8l9 5 9-5z`],[1,`detail-head`],[`id`,`di-detail-title`,1,`mono`],[1,`state`,`compact`],[`type`,`button`],[1,`badge`],[`aria-label`,`Classes on this element`,1,`classes`],[1,`block`],[1,`hint`],[1,`path`],[3,`current`],[1,`providers`],[1,`empty-line`],[3,`is-component`],[1,`step`,`null`],[`type`,`button`,1,`step`],[1,`hint-inline`],[`type`,`button`,1,`step`,3,`click`],[1,`step-count`],[1,`deps`],[1,`dep`,3,`hit`],[1,`dep`],[1,`dep-main`],[1,`token`,`mono`],[1,`flag`],[1,`dep-meta`],[`type`,`button`,1,`from`],[1,`from`,`absent`],[1,`from`,`missing`],[`type`,`button`,1,`from`,3,`click`],[1,`provider`,3,`hit`],[1,`provider`],[1,`flag`,`kind-flag`],[1,`provider-global`,3,`rpc`,`pageId`,`target`,`label`],[`aria-hidden`,`true`,1,`spinner`],[`type`,`search`,`placeholder`,`Filter by token or file…`,`aria-label`,`Filter by token or file`,`autocomplete`,`off`,`spellcheck`,`false`,3,`input`,`keydown.escape`,`value`],[`aria-live`,`polite`,1,`total`],[1,`source-providers`],[1,`provider-group`],[1,`section-count`],[`role`,`list`,1,`provider-list`],[1,`provider-card`],[1,`provider-header`],[1,`token`],[1,`provided-in`],[1,`provider-meta`],[1,`path`,3,`file`,`line`],[1,`as`]],template:function(e,t){e&1&&(z(0,`p`,3),J(1),B(),ag(2,VF,7,5,`ng-template`,null,0,Ev)(4,UF,1,1,`ng-template`,null,1,Ev),P(6,II,34,19)(7,LI,4,0,`div`,4)(8,RI,1,3,`ng-container`,5)(9,BI,6,1)(10,JI,21,6)),e&2&&(M(),Y(t.announcement()),M(5),F(t.roots().length>0?6:t.loaded()?t.loadFailed()&&t.sourceProviders().length===0?8:t.sourceProviders().length===0?9:10:7))},dependencies:[lb,qD,DO,VO],styles:[`[_nghost-%COMP%] {
   --%NS%directive: #7cb4ff;
   display: block;
   color: var(--%NS%text);
@@ -5756,6 +6017,10 @@ h3[_ngcontent-%COMP%] {
   box-shadow: 0 0 0 3px var(--%NS%accent-soft);
 }
 
+.provider-global[_ngcontent-%COMP%] {
+  margin-top: 6px;
+}
+
 .dep-main[_ngcontent-%COMP%] {
   display: flex;
   flex-wrap: wrap;
@@ -6029,11 +6294,11 @@ button[_ngcontent-%COMP%] {
 
 .provider-meta[_ngcontent-%COMP%]   .as[_ngcontent-%COMP%] {
   color: var(--%NS%text-2);
-}`]})},DI=1e3;function OI(e){return`${e>=1e3?`${DI}+`:String(e)} more ${e===1?`change`:`changes`} not shown`}function kI(e){let t=e.diffTruncated??0,n=e.diff.length+t;return n===0?`no change`:`${t>=1e3?`${n}+`:String(n)} ${n===1?`change`:`changes`}`}function AI(e,t){if(e.pageId!==t.pageId)return!1;let n=e.log.at(-1);if(!n)return!0;let r=t.log.at(-1);if(!r||r.seqe.seq===n.seq);return!i||i.timestamp===n.timestamp}var jI=`@type`,MI=new Set([`undefined`,`number`,`bigint`,`symbol`,`function`,`Date`,`RegExp`,`Error`,`Element`,`Map`,`Set`]);function NI(e){return!!e&&typeof e==`object`&&!Array.isArray(e)&&jI in e&&MI.has(e[jI])}function PI(e){return/^[A-Za-z_$][\w$]*$/.test(e)?e:JSON.stringify(e)}function FI(e,t=``){if(e===null)return`null`;if(typeof e==`string`)return JSON.stringify(e);if(typeof e!=`object`)return String(e);let n=t+`  `;if(Array.isArray(e))return e.length?`[\n${e.map(e=>n+FI(e,n)).join(`,
-`)}\n${t}]`:`[]`;if(NI(e)){let r=e;switch(r[jI]){case`undefined`:return`undefined`;case`Date`:return`Date(${r.value})`;case`bigint`:return`${r.value}n`;case`symbol`:return`Symbol(${r.value})`;case`function`:return`ƒ ${r.name}()`;case`Error`:return`${r.name??`Error`}: ${r.message}`;case`Element`:return`<${r.value}>`;case`Map`:{let e=r.entries??[];if(!e.length)return`Map(${r.size}) {}`;let i=e.map(([e,t])=>`${n}${FI(e,n)} => ${FI(t,n)}`);return`Map(${r.size}) {\n${i.join(`,
-`)}\n${t}}`}case`Set`:{let e=r.values??[];return e.length?`Set(${r.size}) {\n${e.map(e=>n+FI(e,n)).join(`,
-`)}\n${t}}`:`Set(${r.size}) {}`}default:return String(r.value??r[jI])}}let r=Object.entries(e);return r.length?`{\n${r.map(([e,t])=>`${n}${PI(e)}: ${FI(t,n)}`).join(`,
-`)}\n${t}}`:`{}`}function II(e,t=120){let n=FI(e).replace(/\s*\n\s*/g,` `);return n.length>t?`${n.slice(0,t-1)}…`:n}var LI=[`eventDetailHeading`],RI=[`cancelButton`],zI=[`restoreButton`],BI=[`stateTree`],VI=[`filterInput`],HI=[`latestButton`],UI=e=>({selected:e,headingLevel:5,idPrefix:`ngrx-change`}),WI=e=>({selected:e,headingLevel:3,idPrefix:`ngrx-event`}),GI=(e,t)=>t.id,KI=(e,t)=>t.seq,qI=(e,t)=>t.key,JI=(e,t)=>t.name,YI=(e,t)=>t.idsKey,XI=(e,t)=>t.path,ZI=(e,t)=>t.kind,QI=(e,t)=>t.name+t.file+t.line;function $I(e,t){if(e&1){let e=W();z(0,`span`,25),J(1,`Page`),B(),z(2,`app-select`,26),G(`valueChange`,function(t){return O(e),k(K().selectPage(t))}),B()}if(e&2){let e=K();M(2),R(`options`,e.pageOptions())(`value`,e.page()?.pageId??null)}}function eL(e,t){if(e&1&&(z(0,`span`,14),J(1),B()),e&2){let e=K();M(),Y(e.liveStores().length)}}function tL(e,t){if(e&1){let e=W();z(0,`div`,15)(1,`p`,27),J(2,`Could not load the live store state.`),B(),z(3,`p`,28),J(4,`Check that the dev server with Pangular Inspector is still running.`),B(),z(5,`button`,29),G(`click`,function(){return O(e),k(K().retry())}),J(6,`Retry`),B()()}}function nL(e,t){e&1&&(z(0,`div`,16)(1,`p`,27),J(2,`Loading…`),B()())}function rL(e,t){e&1&&(z(0,`div`,17)(1,`p`,27),J(2,`No page is reporting NgRx state yet.`),B(),z(3,`p`,28),J(4,` Open the app in a browser. Stores show up here as soon as the page creates them. `),B()())}function iL(e,t){e&1&&(z(0,`p`,27),J(1,`No signal store instance on this page yet.`),B(),z(2,`p`,28),J(3,` A `),z(4,`code`),J(5,`signalStore`),B(),J(6,` is created the first time something injects it. Navigate to a page that uses the store and it appears here. `),B())}function aL(e,t){e&1&&(z(0,`p`,27),J(1,`The @ngrx/store Store was not found on this page.`),B(),z(2,`p`,28),J(3,` Check that `),z(4,`code`),J(5,`provideStore()`),B(),J(6,` or `),z(7,`code`),J(8,`StoreModule.forRoot()`),B(),J(9,` is part of the providers of the running app. `),B())}function oL(e,t){e&1&&(z(0,`p`,27),J(1,`This page has no NgRx store.`),B(),z(2,`p`,28),J(3,` Stores from `),z(4,`code`),J(5,`@ngrx/signals`),B(),J(6,` (`),z(7,`code`),J(8,`signalStore`),B(),J(9,`, `),z(10,`code`),J(11,`signalState`),B(),J(12,`) and `),z(13,`code`),J(14,`@ngrx/store`),B(),J(15,` are listed here once the app creates them. `),B())}function sL(e,t){if(e&1&&(z(0,`div`,17),P(1,iL,7,0)(2,aL,10,0)(3,oL,16,0),B()),e&2){let e=K();M(),F(e.usesSignals()?1:e.usesClassic()?2:3)}}function cL(e,t){if(e&1){let e=W();z(0,`li`)(1,`button`,33),G(`click`,function(){let t=O(e).$implicit;return k(K(2).selectStore(t.id))}),z(2,`span`,34),V(3,`span`,35),z(4,`span`,36),J(5),B()(),z(6,`span`,37),J(7),B()()()}if(e&2){let e=t.$implicit,n=K(2);M(),q(`selected`,e.id===n.store()?.id),N(`aria-pressed`,e.id===n.store()?.id),M(2),j_(`background`,n.kindColor(e.kind)),M(2),Y(e.label),M(2),iv(` `,n.kindLabel(e.kind),` · `,e.scope,` · `,n.changeCount(e.id),` `,n.changeCount(e.id)===1?`change`:`changes`,` `)}}function lL(e,t){e&1&&(z(0,`li`,31),J(1,`No stores match this filter.`),B())}function uL(e,t){e&1&&V(0,`app-source-link`,41),e&2&&R(`file`,t)}function dL(e,t){if(e&1&&(z(0,`span`,40),J(1),B()),e&2){let e=K();M(),Y(e.classic.devtools?`Store DevTools on`:`Store DevTools off`)}}function fL(e,t){if(e&1&&(z(0,`code`),J(1),B(),J(2)),e&2){let e=t.$implicit,n=t.$index,r=t.$count;M(),Y(e),M(),X(``,n===r-1?``:`, `,` `)}}function pL(e,t){if(e&1&&(z(0,`p`,42),J(1,` Referenced by `),I(2,fL,3,2,null,null,Og),B()),e&2){let e=K();M(2),L(e.signal.references)}}function mL(e,t){if(e&1&&(z(0,`p`,58),J(1),B()),e&2){let e=K(4);M(),Y(e.restoreOff)}}function hL(e,t){if(e&1){let e=W();z(0,`div`,43)(1,`p`)(2,`strong`),J(3,`Viewing a past state.`),B(),J(4,` New actions are logged but do not change the state until you go back to the latest state. `),B(),z(5,`button`,57,3),G(`click`,function(){return O(e),k(K(3).backToLatest())}),J(7,` Back to latest `),B(),P(8,mL,2,1,`p`,58),B()}if(e&2){let e=K(3);M(5),R(`disabled`,e.busy()||!e.canRestore()),N(`aria-describedby`,e.canRestore()?null:`store-latest-off`),M(3),F(e.canRestore()?-1:8)}}function gL(e,t){if(e&1&&(z(0,`dt`),J(1),B(),z(2,`dd`)(3,`code`,66),J(4),B()()),e&2){let e=t.$implicit;M(),Y(e.key),M(2),R(`title`,e.full),M(),Y(e.value)}}function _L(e,t){if(e&1&&(z(0,`dl`,61),I(1,gL,5,3,null,null,qI),B()),e&2){let e=K(4);M(),L(e.computedEntries())}}function vL(e,t){e&1&&(z(0,`p`,62),J(1,`No computed signals.`),B())}function yL(e,t){e&1&&(z(0,`span`,68),J(1,`signalMethod`),B())}function bL(e,t){e&1&&(z(0,`span`,68),J(1,`rxMethod`),B())}function xL(e,t){if(e&1&&(z(0,`li`,67),J(1),P(2,yL,2,0,`span`,68)(3,bL,2,0,`span`,68),z(4,`span`,69),J(5),B()()),e&2){let e=t.$implicit,n=K(5);M(),X(` `,e.name,` `),M(),F(e.signalMethod?2:e.rx?3:-1),M(3),rv(``,e.calls,` `,e.calls===1?`call`:`calls`,``,n.methodDuration(e))}}function SL(e,t){if(e&1&&(z(0,`ul`,64),I(1,xL,6,5,`li`,67,JI),B()),e&2){let e=K();M(),L(e.methods)}}function CL(e,t){e&1&&(z(0,`p`,62),J(1,`No methods.`),B())}function wL(e,t){if(e&1&&(z(0,`li`,67),J(1),B()),e&2){let e=t.$implicit;M(),Y(e)}}function TL(e,t){if(e&1&&(z(0,`li`,76),J(1),B()),e&2){let e=K().$implicit;R(`title`,K(5).entityOverflowTitle(e.ids,e.count)),M(),X(` +`,e.count-30,` more `)}}function EL(e,t){if(e&1&&(z(0,`code`,66),J(1),B()),e&2){let e=K(2).$implicit,t=K(5);R(`title`,t.prettyText(e.selected)),M(),Y(t.shortText(e.selected))}}function DL(e,t){e&1&&(z(0,`span`,62),J(1,`None selected`),B())}function OL(e,t){if(e&1&&(z(0,`dl`,61)(1,`dt`),J(2,`Selected`),B(),z(3,`dd`),P(4,EL,2,2,`code`,66)(5,DL,2,0,`span`,62),B()()),e&2){let e=K().$implicit;M(4),F(e.selected===void 0?5:4)}}function kL(e,t){if(e&1&&(z(0,`div`,72)(1,`div`,73)(2,`span`,67),J(3),B(),z(4,`span`,74),J(5),B()(),z(6,`ul`,75),I(7,wL,2,1,`li`,67,Og),P(9,TL,2,2,`li`,76),B(),P(10,OL,6,1,`dl`,61),B()),e&2){let e=t.$implicit,n=K(5);M(3),Y(e.collection??`entities`),M(2),Z(``,e.count,` `,e.count===1?`entity`:`entities`),M(),N(`aria-label`,(e.collection??`entities`)+` ids`),M(),L(n.entityIds(e.ids)),M(2),F(e.count>30?9:-1),M(),F(e.selectedId===void 0?-1:10)}}function AL(e,t){if(e&1&&(z(0,`section`,65)(1,`h4`,70),J(2,`Entities`),B(),z(3,`div`,71),I(4,kL,11,6,`div`,72,YI),B()()),e&2){let e=K();M(4),L(e.entities)}}function jL(e,t){if(e&1&&(z(0,`section`,59)(1,`h4`,60),J(2,`Computed`),B(),P(3,_L,3,0,`dl`,61)(4,vL,2,0,`p`,62),z(5,`h4`,63),J(6,`Methods`),B(),P(7,SL,3,0,`ul`,64)(8,CL,2,0,`p`,62),B(),P(9,AL,6,0,`section`,65)),e&2){let e=t,n=K(3);M(3),F(n.computedEntries().length?3:4),M(4),F(e.methods.length?7:8),M(2),F(e.entities?.length?9:-1)}}function ML(e,t){if(e&1&&(z(0,`span`,81),J(1),B()),e&2){let e=t;R(`title`,`Caused by `+K(4).kindLabel(`event`)+`: `+e.type),M(),Y(e.type)}}function NL(e,t){if(e&1&&(z(0,`span`,68),J(1),B()),e&2){let e=K().$implicit;M(),Y(e.origin)}}function PL(e,t){if(e&1&&J(0),e&2){let e=K().$implicit;X(` · `,K(3).formatDuration(e.durationMs),` `)}}function FL(e,t){if(e&1){let e=W();z(0,`li`)(1,`button`,77),G(`click`,function(){let t=O(e).$implicit;return k(K(3).selectChange(t.seq))}),z(2,`span`,78),J(3),B(),z(4,`span`,79)(5,`span`,80),J(6),B(),P(7,ML,2,2,`span`,81),B(),z(8,`span`,82),P(9,NL,2,1,`span`,68),J(10),P(11,PL,1,1),B()()()}if(e&2){let e,n=t.$implicit,r=K(3);M(),q(`selected`,n.seq===r.selectedChangeSeq()),N(`aria-pressed`,n.seq===r.selectedChangeSeq())(`aria-controls`,n.seq===r.selectedChangeSeq()?`ngrx-change-detail`:null),M(2),X(`#`,n.seq),M(2),R(`title`,n.type),M(),Y(n.type),M(),F((e=n.causedByEvent)?7:-1,e),M(2),F(n.origin?9:-1),M(),Z(` `,r.changesLabel(n),` · `,r.formatTime(n.timestamp),` `),M(),F(n.durationMs===void 0?-1:11)}}function IL(e,t){e&1&&J(0,` No entries match this filter. `)}function LL(e,t){e&1&&J(0,` No actions dispatched since the page connected. `)}function RL(e,t){e&1&&J(0,` No state changes yet. Method calls and patchState writes that change the state are recorded here. `)}function zL(e,t){if(e&1&&(z(0,`li`,31),P(1,IL,1,0)(2,LL,1,0)(3,RL,1,0),B()),e&2){let e=K(),t=K(2);M(),F(t.filter()?1:e.classic?2:3)}}function BL(e,t){if(e&1&&(z(0,`div`,55),Ug(1,83),B()),e&2){K(3);let e=u_(21);M(),R(`ngTemplateOutlet`,e)(`ngTemplateOutletContext`,hv(2,UI,t))}}function VL(e,t){if(e&1&&V(0,`option`,88),e&2){let e=t.$implicit;R(`value`,e)}}function HL(e,t){if(e&1&&(z(0,`p`,94),J(1),B()),e&2){let e=K(4);M(),Y(e.restoreOff)}}function UL(e,t){if(e&1){let e=W();z(0,`section`,56)(1,`h4`,84),J(2,`Dispatch an action`),B(),z(3,`form`,85),G(`submit`,function(t){return O(e),k(K(3).dispatchAction(t))}),z(4,`label`)(5,`span`),J(6,`Type`),B(),z(7,`input`,86),G(`input`,function(t){return O(e),k(K(3).dispatchType.set(t.target.value))}),B()(),z(8,`datalist`,87),I(9,VL,1,1,`option`,88,Og),B(),z(11,`label`)(12,`span`),J(13,`Payload `),z(14,`span`,89),J(15,`(JSON object, optional)`),B()(),z(16,`textarea`,90),G(`input`,function(t){return O(e),k(K(3).dispatchPayload.set(t.target.value))}),B()(),z(17,`p`,91),J(18),B(),z(19,`div`,92)(20,`button`,93),J(21,` Dispatch `),B()(),P(22,HL,2,1,`p`,94),B()()}if(e&2){let e=K(3);M(7),R(`value`,e.dispatchType()),M(2),L(e.actionTypes()),M(7),R(`value`,e.dispatchPayload()),N(`aria-invalid`,e.payloadError()?`true`:null),M(2),Y(e.payloadError()),M(2),R(`disabled`,e.busy()||!e.canRestore()||!e.dispatchRequest()),N(`aria-describedby`,e.canRestore()?null:`store-dispatch-off`),M(2),F(e.canRestore()?-1:22)}}function WL(e,t){if(e&1){let e=W();z(0,`div`,32)(1,`div`,38)(2,`h3`),J(3),B(),z(4,`div`,39)(5,`span`,40),J(6),B(),z(7,`span`,40),J(8),B(),P(9,uL,1,1,`app-source-link`,41),P(10,dL,2,1,`span`,40),B(),P(11,pL,4,0,`p`,42),B(),P(12,hL,9,3,`div`,43),z(13,`div`,44)(14,`section`,45)(15,`div`,46)(16,`h4`,47),J(17,`State`),B(),z(18,`button`,48),G(`click`,function(){return O(e),k(K(2).copyState())}),J(19,` Copy `),B()(),z(20,`pre`,49,2),J(22),B()(),P(23,jL,10,3),B(),z(24,`section`,50)(25,`h4`,51),J(26),z(27,`span`,14),J(28),B()(),V(29,`app-limit-note`,52),z(30,`div`,53)(31,`ul`,54),I(32,FL,12,12,`li`,null,KI,!1,zL,4,1,`li`,31),B(),P(35,BL,2,4,`div`,55),B()(),P(36,UL,23,7,`section`,56),B()}if(e&2){let e,n,r,i=t,a=K(2);M(3),Y(i.label),M(3),Y(a.kindLabel(i.kind)),M(2),X(`scope: `,i.scope),M(),F((e=i.signal?.declaredIn)?9:-1,e),M(),F(i.classic?10:-1),M(),F(i.signal?.references?.length?11:-1),M(),F(i.classic?.paused?12:-1),M(10),Y(a.stateText()),M(),F((n=i.signal)?23:-1,n),M(3),X(` `,i.classic?`Action log`:`Change log`,` `),M(2),Y(a.storeLog().length),M(),R(`dropped`,a.page()?.dropped??0)(`max`,a.maxLog()),M(2),N(`aria-label`,i.classic?`Actions`:`Changes`),M(),L(a.storeLog()),M(3),F((r=a.changeEntry())?35:-1,r),M(),F(i.classic?36:-1)}}function GL(e,t){if(e&1&&(z(0,`div`,18)(1,`ul`,30),I(2,cL,8,10,`li`,null,GI,!1,lL,2,0,`li`,31),B(),P(5,WL,37,17,`div`,32),B()),e&2){let e,t=K();M(2),L(t.filteredStores()),M(3),F((e=t.store())?5:-1,e)}}function KL(e,t){if(e&1&&(z(0,`code`,101),J(1),B()),e&2){let e=K().$implicit,t=K(2);R(`title`,t.prettyText(e.payload)),M(),Y(t.shortText(e.payload))}}function qL(e,t){if(e&1){let e=W();z(0,`li`)(1,`button`,99),G(`click`,function(){let t=O(e).$implicit;return k(K(2).selectEvent(t.seq))}),V(2,`span`,35),z(3,`span`,100),J(4),B(),P(5,KL,2,2,`code`,101),z(6,`span`,102),J(7),B()()()}if(e&2){let e=t.$implicit,n=K(2);M(),q(`selected`,e.seq===n.selectedEventSeq()),N(`aria-pressed`,e.seq===n.selectedEventSeq())(`aria-controls`,e.seq===n.selectedEventSeq()?`ngrx-event-detail`:null),M(),j_(`background`,n.kindColor(`event`)),M(),R(`title`,e.eventType??e.type),M(),Y(e.eventType??e.type),M(),F(e.payload===void 0?-1:5),M(2),Y(n.formatTime(e.timestamp))}}function JL(e,t){e&1&&(z(0,`li`,31),J(1,`No events match this filter.`),B())}function YL(e,t){if(e&1&&(z(0,`div`,98,4),Ug(2,83),B()),e&2){K(2);let e=u_(21);M(2),R(`ngTemplateOutlet`,e)(`ngTemplateOutletContext`,hv(2,WI,t))}}function XL(e,t){if(e&1&&(z(0,`section`,20)(1,`div`,12)(2,`h2`,95),J(3,`Events`),B(),z(4,`span`,14),J(5),B()(),z(6,`p`,96),J(7,` Events dispatched through @ngrx/signals/events, across every store on this page. `),B(),z(8,`ul`,97),I(9,qL,8,10,`li`,null,KI,!1,JL,2,0,`li`,31),B(),P(12,YL,3,4,`div`,98),B()),e&2){let e,t=K();M(5),Y(t.pageEvents().length),M(4),L(t.pageEvents()),M(3),F((e=t.eventEntry())?12:-1,e)}}function ZL(e,t){if(e&1&&(z(0,`dt`),J(1,`Origin`),B(),z(2,`dd`),J(3),B()),e&2){let e=K().selected,t=K();M(3),Y(t.originText(e.origin))}}function QL(e,t){if(e&1&&(z(0,`dt`),J(1,`Duration`),B(),z(2,`dd`),J(3),B()),e&2){let e=K().selected,t=K();M(3),Y(t.formatDuration(e.durationMs))}}function $L(e,t){if(e&1&&(z(0,`dt`),J(1,`Action`),B(),z(2,`dd`)(3,`pre`,107),J(4),B()()),e&2){let e=K().selected,t=K();M(4),Y(t.prettyText(e.action))}}function eR(e,t){if(e&1&&(z(0,`dt`),J(1,`Arguments`),B(),z(2,`dd`)(3,`pre`,107),J(4),B()()),e&2){let e=K().selected,t=K();M(4),Y(t.prettyText(e.args))}}function tR(e,t){if(e&1&&(z(0,`dt`),J(1,`Payload`),B(),z(2,`dd`)(3,`pre`,107),J(4),B()()),e&2){let e=K().selected,t=K();M(4),Y(t.prettyText(e.payload))}}function nR(e,t){if(e&1&&(z(0,`pre`,107),J(1),B()),e&2){let e=K(),t=K(2);M(),Y(t.prettyText(e.payload))}}function rR(e,t){if(e&1&&(z(0,`dt`),J(1,`Caused by event`),B(),z(2,`dd`)(3,`code`,108),J(4),B(),P(5,nR,2,1,`pre`,107),B()),e&2){let e=t;M(4),Y(e.type),M(),F(e.payload===void 0?-1:5)}}function iR(e,t){if(e&1){let e=W();z(0,`button`,112),G(`click`,function(){O(e);let t=K(2).selected;return k(K().copyDiff(t))}),J(1,` Copy `),B()}if(e&2){let e=K(2).selected;N(`aria-label`,`Copy the state diff of #`+e.seq)}}function aR(e,t){if(e&1&&(z(0,`code`,118),J(1),B()),e&2){let e=K().$implicit,t=K(4);M(),Y(t.shortText(e.before))}}function oR(e,t){e&1&&(z(0,`span`,120),J(1,`→`),B(),z(2,`span`,121),J(3,`became`),B())}function sR(e,t){if(e&1&&(z(0,`code`,119),J(1),B()),e&2){let e=K().$implicit,t=K(4);M(),Y(t.shortText(e.after))}}function cR(e,t){if(e&1&&(z(0,`li`)(1,`span`,115),J(2),B(),z(3,`code`,116),J(4),B(),z(5,`span`,117),P(6,aR,2,1,`code`,118),P(7,oR,4,0),P(8,sR,2,1,`code`,119),B()()),e&2){let e=t.$implicit,n=K(4);M_(`diff-row `+e.op),M(2),Y(n.opLabel(e.op)),M(2),Y(e.path),M(2),F(e.op===`add`?-1:6),M(),F(e.op===`change`?7:-1),M(),F(e.op===`remove`?-1:8)}}function lR(e,t){if(e&1&&(z(0,`p`,62),J(1),B()),e&2){let e=K(3).selected,t=K();M(),Y(t.moreChanges(e.diffTruncated))}}function uR(e,t){if(e&1&&(z(0,`ul`,113),I(1,cR,9,7,`li`,114,XI),B(),P(3,lR,2,1,`p`,62)),e&2){let e=K(2).selected;M(),L(e.diff),M(2),F(e.diffTruncated?3:-1)}}function dR(e,t){e&1&&(z(0,`p`,62),J(1,`The state did not change.`),B())}function fR(e,t){if(e&1&&(z(0,`div`,109)(1,`div`,110),J(2,`State diff`),B(),P(3,iR,2,1,`button`,111),B(),P(4,uR,4,1)(5,dR,2,0,`p`,62)),e&2){let e=K(),t=e.selected,n=e.headingLevel;M(),N(`aria-level`,n+1),M(2),F(t.diff.length?3:-1),M(),F(t.diff.length?4:5)}}function pR(e,t){if(e&1&&J(0),e&2){let e=K(2).selected;X(` Store DevTools jumps the app state to the state right after action #`,e.seq,`. Until you go back to the latest state, new actions are logged but do not change the state. `)}}function mR(e,t){if(e&1&&J(0),e&2){let e=K(3).selected;Z(` This sets every state key of `,t.label,` back to its value right after change #`,e.seq,`. Components that read the store update at once, and a new "Restore" entry is added to the log. `)}}function hR(e,t){if(e&1&&J(0),e&2){let e=K(3).selected;X(` This sets every state key of the store back to its value right after change #`,e.seq,`. Components that read the store update at once, and a new "Restore" entry is added to the log. `)}}function gR(e,t){if(e&1&&P(0,mR,1,2)(1,hR,1,1),e&2){let e;F((e=K(3).store())?0:1,e)}}function _R(e,t){if(e&1){let e=W();z(0,`div`,122),G(`keydown.escape`,function(t){return O(e),k(K(2).cancelRestore(t))}),z(1,`p`,123),P(2,pR,1,1)(3,gR,2,1),B(),z(4,`div`,92)(5,`button`,57),G(`click`,function(){O(e);let t=K().selected;return k(K().restore(t.seq,t.source===`store`))}),J(6,` Restore `),B(),z(7,`button`,29,5),G(`click`,function(){return O(e),k(K(2).cancelRestore())}),J(9,` Cancel `),B()()()}if(e&2){let e=K(),t=e.selected,n=e.idPrefix,r=K();N(`aria-labelledby`,n+`-confirm-text`),M(),R(`id`,n+`-confirm-text`),M(),F(t.source===`store`?2:3),M(3),R(`disabled`,r.busy())}}function vR(e,t){if(e&1){let e=W();z(0,`button`,128,6),G(`click`,function(){O(e);let t=K(2).selected;return k(K().askRestore(t.seq))}),J(2,` Restore this state `),B()}if(e&2){let e=K(2).idPrefix,t=K();R(`disabled`,!t.canRestore()),N(`aria-describedby`,t.canRestore()?null:e+`-writes-off`)}}function yR(e,t){if(e&1){let e=W();z(0,`button`,129),G(`click`,function(){O(e);let t=K(2).selected;return k(K().dispatchAgain(t.seq))}),J(1,` Dispatch again `),B()}if(e&2){let e=K(2).idPrefix,t=K();R(`disabled`,t.busy()||!t.canRestore()),N(`aria-describedby`,t.canRestore()?null:e+`-writes-off`)}}function bR(e,t){if(e&1&&(z(0,`p`,127),J(1),B()),e&2){let e=K(2).idPrefix,t=K();R(`id`,e+`-writes-off`),M(),Y(t.restoreOff)}}function xR(e,t){if(e&1&&(z(0,`div`,124),P(1,vR,3,2,`button`,125),P(2,yR,2,2,`button`,126),B(),P(3,bR,2,2,`p`,127)),e&2){let e=K().selected,t=K();M(),F(e.restorable?1:-1),M(),F(t.canAgain(e)?2:-1),M(),F(t.canRestore()?-1:3)}}function SR(e,t){e&1&&(J(0,` Store DevTools no longer holds this action, so this state cannot be restored. It was dropped past `),z(1,`code`),J(2,`maxAge`),B(),J(3,`, or the Store DevTools history was committed, reset or imported. `))}function CR(e,t){e&1&&(J(0,` Store DevTools never recorded this action, so this state cannot be restored. An `),z(1,`code`),J(2,`actionsBlocklist`),B(),J(3,`, `),z(4,`code`),J(5,`actionsSafelist`),B(),J(6,` or `),z(7,`code`),J(8,`predicate`),B(),J(9,` option filtered it out, or recording was paused. `))}function wR(e,t){e&1&&(J(0,` Time travel for @ngrx/store needs `),z(1,`code`),J(2,`provideStoreDevtools()`),B(),J(3,`. Without it, entries cannot be restored. `))}function TR(e,t){if(e&1&&(z(0,`p`,106),P(1,SR,4,0)(2,CR,10,0)(3,wR,4,0),B()),e&2){let e=K().selected;M(),F(e.unrestorable===`dropped`?1:e.unrestorable===`not-recorded`?2:3)}}function ER(e,t){if(e&1&&(z(0,`section`,103)(1,`div`,104),J(2),B(),z(3,`dl`,61)(4,`dt`),J(5,`Time`),B(),z(6,`dd`),J(7),B(),P(8,ZL,4,1),P(9,QL,4,1),P(10,$L,5,1),P(11,eR,5,1),P(12,tR,5,1),P(13,rR,6,2),B(),P(14,fR,6,3),P(15,_R,10,4,`div`,105),P(16,xR,4,3),P(17,TR,4,1,`p`,106),B()),e&2){let e,n=t.selected,r=t.headingLevel,i=t.idPrefix,a=K();N(`aria-labelledby`,i+`-entry-heading`),M(),R(`id`,i+`-entry-heading`),N(`aria-level`,r),M(),Z(` #`,n.seq,` `,n.type,` `),M(5),Y(a.formatTime(n.timestamp)),M(),F(n.origin?8:-1),M(),F(n.durationMs===void 0?-1:9),M(),F(n.action===void 0?-1:10),M(),F(n.args?.length?11:-1),M(),F(n.source===`event`&&n.payload!==void 0?12:-1),M(),F((e=n.causedByEvent)?13:-1,e),M(),F(n.source===`event`?-1:14),M(),F(n.restorable&&a.confirmSeq()===n.seq?15:-1),M(),F(a.confirmSeq()!==n.seq&&(n.restorable||a.canAgain(n))?16:-1),M(),F(!n.restorable&&n.source===`store`?17:-1)}}function DR(e,t){if(e&1&&(z(0,`span`,14),J(1),B()),e&2){let e=K();M(),Y(e.sourceEntries().length)}}function OR(e,t){e&1&&(z(0,`div`,23),V(1,`span`,130),z(2,`p`,27),J(3,`Scanning source for NgRx declarations…`),B()())}function kR(e,t){e&1&&(z(0,`div`,24)(1,`p`,27),J(2,`No NgRx declarations found in source.`),B(),z(3,`p`,28),J(4,` The scan looks for `),z(5,`code`),J(6,`signalStore`),B(),J(7,`, `),z(8,`code`),J(9,`signalState`),B(),J(10,`, `),z(11,`code`),J(12,`signalMethod`),B(),J(13,`, `),z(14,`code`),J(15,`createAction`),B(),J(16,`, `),z(17,`code`),J(18,`createReducer`),B(),J(19,`, `),z(20,`code`),J(21,`createEffect`),B(),J(22,`, `),z(23,`code`),J(24,`createSelector`),B(),J(25,` and `),z(26,`code`),J(27,`createFeature`),B(),J(28,`. `),B()())}function AR(e,t){if(e&1){let e=W();z(0,`button`,132),G(`click`,function(){let t=O(e).$implicit,n=K(2);return k(n.kind.set(n.kind()===t.kind?null:t.kind))}),V(1,`span`,35),z(2,`span`,137),J(3),B(),z(4,`span`,133),J(5),B()()}if(e&2){let e=t.$implicit,n=K(2);q(`active`,n.kind()===e.kind),N(`aria-pressed`,n.kind()===e.kind),M(),j_(`background`,n.kindColor(e.kind)),M(2),Y(n.kindLabel(e.kind)),M(2),Y(e.count)}}function jR(e,t){if(e&1&&(z(0,`p`,142),J(1),B()),e&2){let e=K().$implicit;M(),Y(e.detail)}}function MR(e,t){if(e&1&&(z(0,`li`,136)(1,`div`,138),V(2,`span`,35),z(3,`span`,139),J(4),B(),z(5,`span`,40),J(6),B()(),z(7,`div`,140),V(8,`app-source-link`,141),B(),P(9,jR,2,1,`p`,142),B()),e&2){let e=t.$implicit,n=K(2);M(2),j_(`background`,n.kindColor(e.kind)),M(2),Y(e.name),M(2),Y(n.kindLabel(e.kind)),M(2),R(`file`,e.file)(`line`,e.line),M(),F(e.detail?9:-1)}}function NR(e,t){if(e&1){let e=W();z(0,`li`)(1,`div`,23)(2,`p`,27),J(3,`No declarations match.`),B(),z(4,`button`,29),G(`click`,function(){return O(e),k(K(2).clearFilters())}),J(5,`Clear filters`),B()()()}}function PR(e,t){if(e&1){let e=W();z(0,`div`,131)(1,`button`,132),G(`click`,function(){return O(e),k(K().kind.set(null))}),J(2,` All `),z(3,`span`,133),J(4),B()(),I(5,AR,6,7,`button`,134,ZI),B(),z(7,`ul`,135),I(8,MR,10,7,`li`,136,QI,!1,NR,6,0,`li`),B()}if(e&2){let e=K();M(),q(`active`,!e.kind()),N(`aria-pressed`,!e.kind()),M(3),Y(e.sourceEntries().length),M(),L(e.groupedEntries()),M(3),L(e.filteredEntries())}}var FR={action:`#f59e0b`,reducer:`#a78bfa`,effect:`#fb923c`,selector:`#60a5fa`,feature:`#34d399`,"store-setup":`#94a3b8`,"signal-store":`#e879f9`,"signal-state":`#22d3ee`,"signal-method":`#fb7185`,store:`#a78bfa`,event:`var(--warn)`},IR={"signal-store":`signalStore`,"signal-state":`signalState`,"signal-method":`signalMethod`,"store-setup":`store setup`,store:`@ngrx/store`,event:`event`},LR={dispatch:`store.dispatch(action)`,effect:`NgRx effect (Store.next)`,reactive:`store.dispatch(() => action)`};function RR(e){if(!e.trim())return{};let t;try{t=JSON.parse(e)}catch{return{error:`The payload is not valid JSON.`}}return!t||typeof t!=`object`||Array.isArray(t)?{error:`The payload must be a JSON object, like {"id": 7}.`}:Object.prototype.hasOwnProperty.call(t,`type`)?{error:`The payload cannot have a "type" key. Put the action type in the Type field.`}:{payload:t}}var zR=new Set([`action`,`reducer`,`effect`,`selector`,`feature`,`store-setup`]),BR=class e{rpc=$(null);canRestore=Q(()=>AE(this.rpc(),`ngrx`));restoreOff=nE(`ngrx`);filter=j(``);kind=j(null);sourceEntries=j([]);sourceLoaded=j(!1);pages=j([]);failed=j(!1);stateLoaded=j(!1);selectedPageId=j(null);hostPageId=uE();maxLog=Q(()=>kE(this.rpc()).limits.changeLog);selectedStoreId=j(null);focusEventSeq=j(null);eventDetailHeading=Kv(`eventDetailHeading`);busy=j(!1);focusLatest=j(!1);focusConfirm=j(null);cancelButton=Kv(`cancelButton`);restoreButton=Kv(`restoreButton`);stateTree=Kv(`stateTree`);filterInput=Kv(`filterInput`);latestButton=Kv(`latestButton`);message=j(``);destroyRef=E(ws);unsubscribe=null;page=Q(()=>{let e=this.pages();return e.find(e=>e.pageId===this.selectedPageId())??e.find(e=>e.pageId===this.hostPageId)??e[0]??null});logKey=Q(()=>{let e=this.page();return{pageId:e?.pageId??null,log:e?.log??[]}});logSession=Nv({source:this.logKey,computation:(e,t)=>t?AI(t.source,e)?t.value:t.value+1:0});selectedChangeSeq=Nv({source:this.logSession,computation:()=>null});selectedEventSeq=Nv({source:this.logSession,computation:()=>null});confirmSeq=Nv({source:this.logSession,computation:()=>null});pageOptions=Q(()=>this.pages().map(e=>({value:e.pageId,label:e.title||e.url,hint:e.url})));liveStores=Q(()=>{let e=this.page();if(!e)return[];let t=e.stores.map(e=>({id:e.id,label:e.name??e.references[0]??e.className,kind:e.kind,scope:e.scope,signal:e}));return e.classic&&t.push({id:`store`,label:`Store`,kind:`store`,scope:e.classic.scope,classic:e.classic}),t});filteredStores=Q(()=>{let e=this.filter().trim().toLowerCase();return e?this.liveStores().filter(t=>t.label.toLowerCase().includes(e)||t.kind.includes(e)||(t.signal?.stateKeys??[]).some(t=>t.toLowerCase().includes(e))||(this.page()?.log??[]).some(n=>n.storeId===t.id&&n.type.toLowerCase().includes(e))):this.liveStores()});store=Q(()=>{let e=this.liveStores();return e.find(e=>e.id===this.selectedStoreId())??e[0]??null});stateText=Q(()=>{let e=this.store();return e?FI(e.signal?e.signal.state:e.classic?.state):``});computedEntries=Q(()=>Object.entries(this.store()?.signal?.computed??{}).map(([e,t])=>({key:e,value:II(t,160),full:FI(t)})));storeLog=Q(()=>{let e=this.store()?.id,t=this.filter().trim().toLowerCase();return(this.page()?.log??[]).filter(n=>n.storeId===e&&(!t||n.type.toLowerCase().includes(t)||this.storeMatches(t))).reverse()});hasEvents=Q(()=>(this.page()?.log??[]).some(e=>e.source===`event`));pageEvents=Q(()=>{let e=this.filter().trim().toLowerCase();return(this.page()?.log??[]).filter(t=>t.source===`event`&&(!e||t.type.toLowerCase().includes(e))).slice().reverse()});changeEntry=Q(()=>{let e=this.selectedChangeSeq();return e===null?null:this.storeLog().find(t=>t.seq===e)??null});eventEntry=Q(()=>{let e=this.selectedEventSeq();return e===null?null:this.pageEvents().find(t=>t.seq===e)??null});dispatchType=j(``);dispatchPayload=j(``);actionTypes=Q(()=>{let e=new Set;for(let t of this.sourceEntries())for(let n of t.types??[])e.add(n);for(let t of this.page()?.log??[])t.source===`store`&&t.action!==void 0&&e.add(t.type);return[...e].sort().slice(0,200)});payloadError=Q(()=>RR(this.dispatchPayload()).error??``);dispatchRequest=Q(()=>{let e=this.dispatchType().trim(),{payload:t,error:n}=RR(this.dispatchPayload());return!e||n?null:{type:`dispatch`,action:e,...t?{payload:t}:{}}});usesSignals=Q(()=>this.sourceEntries().some(e=>e.kind===`signal-store`||e.kind===`signal-state`));usesClassic=Q(()=>this.sourceEntries().some(e=>zR.has(e.kind)));filteredEntries=Q(()=>{let e=this.filter().trim().toLowerCase(),t=this.kind();return this.sourceEntries().filter(n=>(!t||n.kind===t)&&(!e||n.name.toLowerCase().includes(e)||n.kind.includes(e)||(n.detail??``).toLowerCase().includes(e)))});groupedEntries=Q(()=>{let e=new Map;for(let t of this.sourceEntries())e.set(t.kind,(e.get(t.kind)??0)+1);return[...e.entries()].map(([e,t])=>({kind:e,count:t}))});constructor(){dc(()=>{let e=this.rpc();e&&this.load(e)}),cy(()=>{let e=this.latestButton();e&&this.focusLatest()&&!this.busy()&&(this.focusLatest.set(!1),e.nativeElement.focus())}),dc(()=>{let e=this.focusConfirm(),t=e===`cancel`?this.cancelButton():this.restoreButton();e&&t&&(this.focusConfirm.set(null),t.nativeElement.focus())}),cy(()=>{let e=this.focusEventSeq(),t=this.eventDetailHeading();e!==null&&t&&(this.focusEventSeq.set(null),t.nativeElement.focus())}),this.destroyRef.onDestroy(()=>this.unsubscribe?.())}storeMatches(e){let t=this.store();return!!t&&t.label.toLowerCase().includes(e)}async load(e){this.failed.set(!1),mE(e,`get-ngrx-store`).then(e=>this.sourceEntries.set(Array.isArray(e)?e:[])).catch(()=>this.sourceEntries.set([])).finally(()=>this.sourceLoaded.set(!0));try{let t=await e.scope(`pangular`).rpc.sharedState(`ngrx-store`);if(this.destroyRef.destroyed)return;let n=e=>{let t=e;this.pages.set(Array.isArray(t?.pages)?t.pages:[]),e!==void 0&&this.stateLoaded.set(!0)};n(t.value()),this.unsubscribe?.(),this.unsubscribe=t.on(`updated`,n)}catch{this.failed.set(!0)}}retry(){let e=this.rpc();e&&this.load(e)}selectPage(e){this.selectedPageId.set(e),this.selectedStoreId.set(null),this.selectedChangeSeq.set(null),this.selectedEventSeq.set(null),this.confirmSeq.set(null),this.message.set(``)}selectStore(e){this.selectedStoreId.set(e),this.selectedChangeSeq.set(null),this.confirmSeq.set(null),this.message.set(``)}selectChange(e){this.selectedChangeSeq.set(this.selectedChangeSeq()===e?null:e),this.confirmSeq.set(null),this.message.set(``)}copyState(){return this.copyText(this.stateText())}copyDiff(e){return this.copyText(FI(e.diff))}async copyText(e){try{await navigator.clipboard.writeText(e),this.message.set(`Copied.`)}catch{this.message.set(`The clipboard is not available here.`)}}askRestore(e){this.confirmSeq.set(e),this.focusConfirm.set(`cancel`)}cancelRestore(e){e?.preventDefault(),this.confirmSeq.set(null),this.focusConfirm.set(`restore`)}async restore(e,t){let n=this.page();if(!n)return;this.busy.set(!0),this.focusLatest.set(!1);let r=!1;try{let i=await mE(this.rpc(),`request-ngrx-action`,{pageId:n.pageId,request:{type:`restore`,seq:e}});this.message.set(i?.error??i?.message??`Restored.`),r=t&&!i?.error&&!!i?.paused}catch{this.message.set(`Could not reach the page to restore the state.`)}finally{this.busy.set(!1),this.confirmSeq.set(null),this.focusLatest.set(r),r||this.stateTree()?.nativeElement.focus()}}selectEvent(e){let t=this.selectedEventSeq()===e?null:e;this.selectedEventSeq.set(t),t!==null&&this.focusEventSeq.set(t)}async backToLatest(){let e=this.page();if(e){this.busy.set(!0);try{let t=await mE(this.rpc(),`request-ngrx-action`,{pageId:e.pageId,request:{type:`latest`}});this.focusLatest.set(!1),this.stateTree()?.nativeElement.focus(),this.message.set(t?.error??t?.message??`Back on the latest state.`)}catch{this.message.set(`Could not reach the page to go back to the latest state.`)}finally{this.busy.set(!1)}}}canAgain(e){return e.source===`store`&&e.action!==void 0}async dispatchAction(e){e.preventDefault();let t=this.dispatchRequest();t&&await this.send(t,`Could not reach the page to dispatch the action.`)}dispatchAgain(e){return this.send({type:`dispatch-again`,seq:e},`Could not reach the page to dispatch the action again.`)}async send(e,t){let n=this.page();if(!n||this.busy())return;let r=this.logSession();this.busy.set(!0);try{let t=await mE(this.rpc(),`request-ngrx-action`,{pageId:n.pageId,request:e});this.message.set(t?.error??t?.message??`Dispatched.`),t?.entry&&this.logSession()===r&&(this.selectedStoreId.set(`store`),this.selectedChangeSeq.set(t.entry.seq))}catch{this.message.set(t)}finally{this.busy.set(!1)}}clearFilters(){this.filter.set(``),this.kind.set(null),this.filterInput()?.nativeElement.focus()}changeCount(e){return(this.page()?.log??[]).filter(t=>t.storeId===e).length}entityIds(e){return e.slice(0,30)}entityOverflowTitle(e,t){let n=e.slice(30).join(`, `);return t>e.length?`${n} (first ${e.length} of ${t} shown)`:n}kindColor(e){return FR[e]??`var(--text-3)`}kindLabel(e){return IR[e]??e}originText(e){return LR[e]??e}changesLabel=kI;moreChanges=OI;opLabel(e){return e===`add`?`added`:e===`remove`?`removed`:`changed`}prettyText(e){return FI(e)}shortText(e){return II(e)}formatTime=$D;formatDuration(e){return e<=0?`<1ms`:`${Math.round(e)}ms`}methodDuration(e){let t=[];return e.avgDurationMs!==void 0&&t.push(`avg ${this.formatDuration(e.avgDurationMs)}`),e.lastDurationMs!==void 0&&t.push(`last ${this.formatDuration(e.lastDurationMs)}`),t.length?` · ${t.join(` · `)}`:``}static ɵfac=function(t){return new(t||e)};static ɵcmp=Wh({type:e,selectors:[[`app-store-inspector`]],viewQuery:function(e,t){e&1&&c_(t.eventDetailHeading,LI,5)(t.cancelButton,RI,5)(t.restoreButton,zI,5)(t.stateTree,BI,5)(t.filterInput,VI,5)(t.latestButton,HI,5),e&2&&l_(6)},inputs:{rpc:[1,`rpc`]},decls:30,vars:11,consts:[[`filterInput`,``],[`entryDetailTpl`,``],[`stateTree`,``],[`latestButton`,``],[`eventDetailHeading`,``],[`cancelButton`,``],[`restoreButton`,``],[1,`toolbar`],[`type`,`search`,`placeholder`,`Filter stores, changes and declarations…`,`aria-label`,`Filter stores, changes and source declarations`,3,`input`,`keydown.escape`,`value`],[1,`status`],[`aria-hidden`,`true`,1,`live-dot`],[`aria-labelledby`,`ngrx-live-heading`,1,`block`],[1,`section-head`],[`id`,`ngrx-live-heading`],[1,`pill`],[`role`,`alert`,1,`empty`],[`role`,`status`,1,`empty`],[1,`empty`],[1,`live-layout`],[`role`,`status`,1,`message`],[`aria-labelledby`,`ngrx-events-heading`,1,`block`],[`aria-labelledby`,`ngrx-source-heading`,1,`block`],[`id`,`ngrx-source-heading`],[`role`,`status`,1,`empty`,`compact`],[1,`empty`,`compact`],[`id`,`ngrx-page-label`,1,`visually-hidden`],[`labelledBy`,`ngrx-page-label`,1,`page-select`,3,`valueChange`,`options`,`value`],[1,`empty-title`],[1,`hint`],[`type`,`button`,1,`btn`,3,`click`],[`aria-label`,`Stores on this page`,1,`store-list`],[1,`muted`,`pad`],[1,`store-detail`],[`type`,`button`,1,`store-item`,3,`click`],[1,`store-top`],[`aria-hidden`,`true`,1,`dot`],[1,`store-name`],[1,`store-meta`],[1,`detail-head`],[1,`chips`],[1,`chip`],[1,`chip`,`mono`,3,`file`],[1,`refs`],[1,`paused`],[1,`facts`],[`aria-labelledby`,`ngrx-state-heading`,1,`fact`],[1,`fact-head`],[`id`,`ngrx-state-heading`],[`type`,`button`,`aria-label`,`Copy state`,1,`btn`,`copy`,3,`click`],[`tabindex`,`0`,`aria-labelledby`,`ngrx-state-heading`,1,`tree`],[`aria-labelledby`,`ngrx-log-heading`,1,`log`],[`id`,`ngrx-log-heading`],[`what`,`changes on this page`,`limit`,`changeLog`,3,`dropped`,`max`],[1,`log-layout`],[`appRovingList`,`button.log-item`,1,`log-list`],[`id`,`ngrx-change-detail`],[`aria-labelledby`,`ngrx-dispatch-heading`,1,`dispatch`],[`type`,`button`,1,`btn`,`primary`,3,`click`,`disabled`],[`id`,`store-latest-off`,1,`hint`,`small`],[`aria-labelledby`,`ngrx-computed-heading`,1,`fact`],[`id`,`ngrx-computed-heading`],[1,`kv`],[1,`muted`],[`id`,`ngrx-methods-heading`,1,`spaced`],[`aria-labelledby`,`ngrx-methods-heading`,1,`methods`],[`aria-labelledby`,`ngrx-entities-heading`,1,`fact`],[3,`title`],[1,`chip`,`mono`],[1,`tag`],[1,`calls`],[`id`,`ngrx-entities-heading`],[1,`entities`],[1,`entity-group`],[1,`entity-head`],[1,`entity-count`],[1,`chips`,`entity-ids`],[1,`chip`,`more`,3,`title`],[`type`,`button`,1,`log-item`,3,`click`],[1,`seq`],[1,`log-type-row`],[1,`log-type`,3,`title`],[1,`tag`,3,`title`],[1,`log-meta`],[3,`ngTemplateOutlet`,`ngTemplateOutletContext`],[`id`,`ngrx-dispatch-heading`],[1,`dispatch-form`,3,`submit`],[`required`,``,`spellcheck`,`false`,`autocomplete`,`off`,`list`,`ngrx-action-types`,`placeholder`,`e.g. [Cart] Add Item`,3,`input`,`value`],[`id`,`ngrx-action-types`],[3,`value`],[1,`optional`],[`rows`,`3`,`spellcheck`,`false`,`placeholder`,`e.g. {"id": 7}`,`aria-describedby`,`ngrx-payload-error`,3,`input`,`value`],[`id`,`ngrx-payload-error`,1,`field-error`],[1,`actions`],[`type`,`submit`,1,`btn`,`primary`,3,`disabled`],[`id`,`store-dispatch-off`,1,`hint`,`small`],[`id`,`ngrx-events-heading`],[1,`intro`],[`appRovingList`,`button.event-item`,`aria-label`,`Dispatched events`,1,`events-list`],[`id`,`ngrx-event-detail`,`tabindex`,`-1`,1,`event-detail-focus`],[`type`,`button`,1,`event-item`,3,`click`],[1,`event-type`,`mono`,3,`title`],[1,`event-payload`,3,`title`],[1,`event-time`],[1,`entry`],[`role`,`heading`,1,`entry-heading`,3,`id`],[`role`,`group`,1,`confirm`],[1,`hint`,`small`],[1,`code`],[1,`mono`],[1,`sub-head`],[`role`,`heading`,1,`sub`],[`type`,`button`,1,`btn`,`copy`],[`type`,`button`,1,`btn`,`copy`,3,`click`],[1,`diff`],[3,`class`],[1,`op`],[1,`path`],[1,`values`],[1,`before`],[1,`after`],[`aria-hidden`,`true`,1,`arrow`],[1,`visually-hidden`],[`role`,`group`,1,`confirm`,3,`keydown.escape`],[3,`id`],[1,`entry-actions`],[`type`,`button`,1,`btn`,`restore`,3,`disabled`],[`type`,`button`,1,`btn`,3,`disabled`],[1,`hint`,`small`,3,`id`],[`type`,`button`,1,`btn`,`restore`,3,`click`,`disabled`],[`type`,`button`,1,`btn`,3,`click`,`disabled`],[`aria-hidden`,`true`,1,`spinner`],[`role`,`group`,`aria-label`,`Filter declarations by kind`,1,`kinds`],[`type`,`button`,1,`kind-chip`,3,`click`],[1,`count`],[`type`,`button`,1,`kind-chip`,3,`active`],[1,`nodes`],[1,`node-card`],[1,`chip-text`],[1,`node-header`],[1,`node-label`],[1,`node-meta`],[1,`file`,3,`file`,`line`],[1,`detail`]],template:function(e,t){e&1&&(z(0,`div`,7)(1,`input`,8,0),G(`input`,function(e){return t.filter.set(e.target.value)})(`keydown.escape`,function(){return t.filter.set(``)}),B(),P(3,$I,3,2),z(4,`span`,9),V(5,`span`,10),J(6),B()(),z(7,`section`,11)(8,`div`,12)(9,`h2`,13),J(10,`Live stores`),B(),P(11,eL,2,1,`span`,14),B(),P(12,tL,7,0,`div`,15)(13,nL,3,0,`div`,16)(14,rL,5,0,`div`,17)(15,sL,4,1,`div`,17)(16,GL,6,2,`div`,18),z(17,`p`,19),J(18),B()(),P(19,XL,13,3,`section`,20),ag(20,ER,18,16,`ng-template`,null,1,wv),z(22,`section`,21)(23,`div`,12)(24,`h2`,22),J(25,`Source declarations`),B(),P(26,DR,2,1,`span`,14),B(),P(27,OR,4,0,`div`,23)(28,kR,29,0,`div`,24)(29,PR,11,5),B()),e&2&&(M(),R(`value`,t.filter()),M(2),F(t.pages().length>1?3:-1),M(),q(`on`,!!t.page()),M(2),X(` `,t.page()?`Live`:`No page connected`,` `),M(5),F(t.liveStores().length?11:-1),M(),F(t.failed()?12:t.stateLoaded()?t.page()?t.liveStores().length?16:15:14:13),M(6),Y(t.message()),M(),F(t.hasEvents()?19:-1),M(7),F(t.sourceEntries().length?26:-1),M(),F(t.sourceLoaded()?t.sourceEntries().length===0?28:29:27))},dependencies:[iO,RN,GD,sb,TO],styles:[`[_nghost-%COMP%] {
+}`]})},rL=1e3;function iL(e){return`${e>=1e3?`${rL}+`:String(e)} more ${e===1?`change`:`changes`} not shown`}function aL(e){let t=e.diffTruncated??0,n=e.diff.length+t;return n===0?`no change`:`${t>=1e3?`${n}+`:String(n)} ${n===1?`change`:`changes`}`}function oL(e,t){if(e.pageId!==t.pageId)return!1;let n=e.log.at(-1);if(!n)return!0;let r=t.log.at(-1);if(!r||r.seqe.seq===n.seq);return!i||i.timestamp===n.timestamp}var sL=`@type`,cL=new Set([`undefined`,`number`,`bigint`,`symbol`,`function`,`Date`,`RegExp`,`Error`,`Element`,`Map`,`Set`]);function lL(e){return!!e&&typeof e==`object`&&!Array.isArray(e)&&sL in e&&cL.has(e[sL])}function uL(e){return/^[A-Za-z_$][\w$]*$/.test(e)?e:JSON.stringify(e)}function dL(e,t=``){if(e===null)return`null`;if(typeof e==`string`)return JSON.stringify(e);if(typeof e!=`object`)return String(e);let n=t+`  `;if(Array.isArray(e))return e.length?`[\n${e.map(e=>n+dL(e,n)).join(`,
+`)}\n${t}]`:`[]`;if(lL(e)){let r=e;switch(r[sL]){case`undefined`:return`undefined`;case`Date`:return`Date(${r.value})`;case`bigint`:return`${r.value}n`;case`symbol`:return`Symbol(${r.value})`;case`function`:return`ƒ ${r.name}()`;case`Error`:return`${r.name??`Error`}: ${r.message}`;case`Element`:return`<${r.value}>`;case`Map`:{let e=r.entries??[];if(!e.length)return`Map(${r.size}) {}`;let i=e.map(([e,t])=>`${n}${dL(e,n)} => ${dL(t,n)}`);return`Map(${r.size}) {\n${i.join(`,
+`)}\n${t}}`}case`Set`:{let e=r.values??[];return e.length?`Set(${r.size}) {\n${e.map(e=>n+dL(e,n)).join(`,
+`)}\n${t}}`:`Set(${r.size}) {}`}default:return String(r.value??r[sL])}}let r=Object.entries(e);return r.length?`{\n${r.map(([e,t])=>`${n}${uL(e)}: ${dL(t,n)}`).join(`,
+`)}\n${t}}`:`{}`}function fL(e,t=120){let n=dL(e).replace(/\s*\n\s*/g,` `);return n.length>t?`${n.slice(0,t-1)}…`:n}var pL=[`eventDetailHeading`],mL=[`cancelButton`],hL=[`restoreButton`],gL=[`stateTree`],_L=[`filterInput`],vL=[`latestButton`],yL=e=>({kind:`ngrx`,storeId:e}),bL=e=>({selected:e,headingLevel:5,idPrefix:`ngrx-change`}),xL=e=>({selected:e,headingLevel:3,idPrefix:`ngrx-event`}),SL=(e,t)=>t.id,CL=(e,t)=>t.seq,wL=(e,t)=>t.key,TL=(e,t)=>t.name,EL=(e,t)=>t.idsKey,DL=(e,t)=>t.path,OL=(e,t)=>t.kind,kL=(e,t)=>t.name+t.file+t.line;function AL(e,t){if(e&1){let e=W();z(0,`span`,25),J(1,`Page`),B(),z(2,`app-select`,26),G(`valueChange`,function(t){return O(e),k(K().selectPage(t))}),B()}if(e&2){let e=K();M(2),R(`options`,e.pageOptions())(`value`,e.page()?.pageId??null)}}function jL(e,t){if(e&1&&(z(0,`span`,14),J(1),B()),e&2){let e=K();M(),Y(e.liveStores().length)}}function ML(e,t){if(e&1){let e=W();z(0,`div`,15)(1,`p`,27),J(2,`Could not load the live store state.`),B(),z(3,`p`,28),J(4,`Check that the dev server with Pangular Inspector is still running.`),B(),z(5,`button`,29),G(`click`,function(){return O(e),k(K().retry())}),J(6,`Retry`),B()()}}function NL(e,t){e&1&&(z(0,`div`,16)(1,`p`,27),J(2,`Loading…`),B()())}function PL(e,t){e&1&&(z(0,`div`,17)(1,`p`,27),J(2,`No page is reporting NgRx state yet.`),B(),z(3,`p`,28),J(4,` Open the app in a browser. Stores show up here as soon as the page creates them. `),B()())}function FL(e,t){e&1&&(z(0,`p`,27),J(1,`No signal store instance on this page yet.`),B(),z(2,`p`,28),J(3,` A `),z(4,`code`),J(5,`signalStore`),B(),J(6,` is created the first time something injects it. Navigate to a page that uses the store and it appears here. `),B())}function IL(e,t){e&1&&(z(0,`p`,27),J(1,`The @ngrx/store Store was not found on this page.`),B(),z(2,`p`,28),J(3,` Check that `),z(4,`code`),J(5,`provideStore()`),B(),J(6,` or `),z(7,`code`),J(8,`StoreModule.forRoot()`),B(),J(9,` is part of the providers of the running app. `),B())}function LL(e,t){e&1&&(z(0,`p`,27),J(1,`This page has no NgRx store.`),B(),z(2,`p`,28),J(3,` Stores from `),z(4,`code`),J(5,`@ngrx/signals`),B(),J(6,` (`),z(7,`code`),J(8,`signalStore`),B(),J(9,`, `),z(10,`code`),J(11,`signalState`),B(),J(12,`) and `),z(13,`code`),J(14,`@ngrx/store`),B(),J(15,` are listed here once the app creates them. `),B())}function RL(e,t){if(e&1&&(z(0,`div`,17),P(1,FL,7,0)(2,IL,10,0)(3,LL,16,0),B()),e&2){let e=K();M(),F(e.usesSignals()?1:e.usesClassic()?2:3)}}function zL(e,t){if(e&1){let e=W();z(0,`li`)(1,`button`,33),G(`click`,function(){let t=O(e).$implicit;return k(K(2).selectStore(t.id))}),z(2,`span`,34),V(3,`span`,35),z(4,`span`,36),J(5),B()(),z(6,`span`,37),J(7),B()()()}if(e&2){let e=t.$implicit,n=K(2);M(),q(`selected`,e.id===n.store()?.id),N(`aria-pressed`,e.id===n.store()?.id),M(2),j_(`background`,n.kindColor(e.kind)),M(2),Y(e.label),M(2),iv(` `,n.kindLabel(e.kind),` · `,e.scope,` · `,n.changeCount(e.id),` `,n.changeCount(e.id)===1?`change`:`changes`,` `)}}function BL(e,t){e&1&&(z(0,`li`,31),J(1,`No stores match this filter.`),B())}function VL(e,t){e&1&&V(0,`app-source-link`,41),e&2&&R(`file`,t)}function HL(e,t){if(e&1&&(z(0,`span`,40),J(1),B()),e&2){let e=K();M(),Y(e.classic.devtools?`Store DevTools on`:`Store DevTools off`)}}function UL(e,t){if(e&1&&(z(0,`code`),J(1),B(),J(2)),e&2){let e=t.$implicit,n=t.$index,r=t.$count;M(),Y(e),M(),X(``,n===r-1?``:`, `,` `)}}function WL(e,t){if(e&1&&(z(0,`p`,42),J(1,` Referenced by `),I(2,UL,3,2,null,null,Og),B()),e&2){let e=K();M(2),L(e.signal.references)}}function GL(e,t){if(e&1&&(z(0,`p`,60),J(1),B()),e&2){let e=K(4);M(),Y(e.restoreOff)}}function KL(e,t){if(e&1){let e=W();z(0,`div`,43)(1,`p`)(2,`strong`),J(3,`Viewing a past state.`),B(),J(4,` New actions are logged but do not change the state until you go back to the latest state. `),B(),z(5,`button`,59,3),G(`click`,function(){return O(e),k(K(3).backToLatest())}),J(7,` Back to latest `),B(),P(8,GL,2,1,`p`,60),B()}if(e&2){let e=K(3);M(5),R(`disabled`,e.busy()||!e.canRestore()),N(`aria-describedby`,e.canRestore()?null:`store-latest-off`),M(3),F(e.canRestore()?-1:8)}}function qL(e,t){if(e&1&&(z(0,`dt`),J(1),B(),z(2,`dd`)(3,`code`,68),J(4),B()()),e&2){let e=t.$implicit;M(),Y(e.key),M(2),R(`title`,e.full),M(),Y(e.value)}}function JL(e,t){if(e&1&&(z(0,`dl`,63),I(1,qL,5,3,null,null,wL),B()),e&2){let e=K(4);M(),L(e.computedEntries())}}function YL(e,t){e&1&&(z(0,`p`,64),J(1,`No computed signals.`),B())}function XL(e,t){e&1&&(z(0,`span`,70),J(1,`signalMethod`),B())}function ZL(e,t){e&1&&(z(0,`span`,70),J(1,`rxMethod`),B())}function QL(e,t){if(e&1&&(z(0,`li`,69),J(1),P(2,XL,2,0,`span`,70)(3,ZL,2,0,`span`,70),z(4,`span`,71),J(5),B()()),e&2){let e=t.$implicit,n=K(5);M(),X(` `,e.name,` `),M(),F(e.signalMethod?2:e.rx?3:-1),M(3),rv(``,e.calls,` `,e.calls===1?`call`:`calls`,``,n.methodDuration(e))}}function $L(e,t){if(e&1&&(z(0,`ul`,66),I(1,QL,6,5,`li`,69,TL),B()),e&2){let e=K();M(),L(e.methods)}}function eR(e,t){e&1&&(z(0,`p`,64),J(1,`No methods.`),B())}function tR(e,t){if(e&1&&(z(0,`li`,69),J(1),B()),e&2){let e=t.$implicit;M(),Y(e)}}function nR(e,t){if(e&1&&(z(0,`li`,78),J(1),B()),e&2){let e=K().$implicit;R(`title`,K(5).entityOverflowTitle(e.ids,e.count)),M(),X(` +`,e.count-30,` more `)}}function rR(e,t){if(e&1&&(z(0,`code`,68),J(1),B()),e&2){let e=K(2).$implicit,t=K(5);R(`title`,t.prettyText(e.selected)),M(),Y(t.shortText(e.selected))}}function iR(e,t){e&1&&(z(0,`span`,64),J(1,`None selected`),B())}function aR(e,t){if(e&1&&(z(0,`dl`,63)(1,`dt`),J(2,`Selected`),B(),z(3,`dd`),P(4,rR,2,2,`code`,68)(5,iR,2,0,`span`,64),B()()),e&2){let e=K().$implicit;M(4),F(e.selected===void 0?5:4)}}function oR(e,t){if(e&1&&(z(0,`div`,74)(1,`div`,75)(2,`span`,69),J(3),B(),z(4,`span`,76),J(5),B()(),z(6,`ul`,77),I(7,tR,2,1,`li`,69,Og),P(9,nR,2,2,`li`,78),B(),P(10,aR,6,1,`dl`,63),B()),e&2){let e=t.$implicit,n=K(5);M(3),Y(e.collection??`entities`),M(2),Z(``,e.count,` `,e.count===1?`entity`:`entities`),M(),N(`aria-label`,(e.collection??`entities`)+` ids`),M(),L(n.entityIds(e.ids)),M(2),F(e.count>30?9:-1),M(),F(e.selectedId===void 0?-1:10)}}function sR(e,t){if(e&1&&(z(0,`section`,67)(1,`h4`,72),J(2,`Entities`),B(),z(3,`div`,73),I(4,oR,11,6,`div`,74,EL),B()()),e&2){let e=K();M(4),L(e.entities)}}function cR(e,t){if(e&1&&(z(0,`section`,61)(1,`h4`,62),J(2,`Computed`),B(),P(3,JL,3,0,`dl`,63)(4,YL,2,0,`p`,64),z(5,`h4`,65),J(6,`Methods`),B(),P(7,$L,3,0,`ul`,66)(8,eR,2,0,`p`,64),B(),P(9,sR,6,0,`section`,67)),e&2){let e=t,n=K(3);M(3),F(n.computedEntries().length?3:4),M(4),F(e.methods.length?7:8),M(2),F(e.entities?.length?9:-1)}}function lR(e,t){if(e&1&&(z(0,`span`,83),J(1),B()),e&2){let e=t;R(`title`,`Caused by `+K(4).kindLabel(`event`)+`: `+e.type),M(),Y(e.type)}}function uR(e,t){if(e&1&&(z(0,`span`,70),J(1),B()),e&2){let e=K().$implicit;M(),Y(e.origin)}}function dR(e,t){if(e&1&&J(0),e&2){let e=K().$implicit;X(` · `,K(3).formatDuration(e.durationMs),` `)}}function fR(e,t){if(e&1){let e=W();z(0,`li`)(1,`button`,79),G(`click`,function(){let t=O(e).$implicit;return k(K(3).selectChange(t.seq))}),z(2,`span`,80),J(3),B(),z(4,`span`,81)(5,`span`,82),J(6),B(),P(7,lR,2,2,`span`,83),B(),z(8,`span`,84),P(9,uR,2,1,`span`,70),J(10),P(11,dR,1,1),B()()()}if(e&2){let e,n=t.$implicit,r=K(3);M(),q(`selected`,n.seq===r.selectedChangeSeq()),N(`aria-pressed`,n.seq===r.selectedChangeSeq())(`aria-controls`,n.seq===r.selectedChangeSeq()?`ngrx-change-detail`:null),M(2),X(`#`,n.seq),M(2),R(`title`,n.type),M(),Y(n.type),M(),F((e=n.causedByEvent)?7:-1,e),M(2),F(n.origin?9:-1),M(),Z(` `,r.changesLabel(n),` · `,r.formatTime(n.timestamp),` `),M(),F(n.durationMs===void 0?-1:11)}}function pR(e,t){e&1&&J(0,` No entries match this filter. `)}function mR(e,t){e&1&&J(0,` No actions dispatched since the page connected. `)}function hR(e,t){e&1&&J(0,` No state changes yet. Method calls and patchState writes that change the state are recorded here. `)}function gR(e,t){if(e&1&&(z(0,`li`,31),P(1,pR,1,0)(2,mR,1,0)(3,hR,1,0),B()),e&2){let e=K(),t=K(2);M(),F(t.filter()?1:e.classic?2:3)}}function _R(e,t){if(e&1&&(z(0,`div`,57),Ug(1,85),B()),e&2){K(3);let e=u_(21);M(),R(`ngTemplateOutlet`,e)(`ngTemplateOutletContext`,hv(2,bL,t))}}function vR(e,t){if(e&1&&V(0,`option`,90),e&2){let e=t.$implicit;R(`value`,e)}}function yR(e,t){if(e&1&&(z(0,`p`,96),J(1),B()),e&2){let e=K(4);M(),Y(e.restoreOff)}}function bR(e,t){if(e&1){let e=W();z(0,`section`,58)(1,`h4`,86),J(2,`Dispatch an action`),B(),z(3,`form`,87),G(`submit`,function(t){return O(e),k(K(3).dispatchAction(t))}),z(4,`label`)(5,`span`),J(6,`Type`),B(),z(7,`input`,88),G(`input`,function(t){return O(e),k(K(3).dispatchType.set(t.target.value))}),B()(),z(8,`datalist`,89),I(9,vR,1,1,`option`,90,Og),B(),z(11,`label`)(12,`span`),J(13,`Payload `),z(14,`span`,91),J(15,`(JSON object, optional)`),B()(),z(16,`textarea`,92),G(`input`,function(t){return O(e),k(K(3).dispatchPayload.set(t.target.value))}),B()(),z(17,`p`,93),J(18),B(),z(19,`div`,94)(20,`button`,95),J(21,` Dispatch `),B()(),P(22,yR,2,1,`p`,96),B()()}if(e&2){let e=K(3);M(7),R(`value`,e.dispatchType()),M(2),L(e.actionTypes()),M(7),R(`value`,e.dispatchPayload()),N(`aria-invalid`,e.payloadError()?`true`:null),M(2),Y(e.payloadError()),M(2),R(`disabled`,e.busy()||!e.canRestore()||!e.dispatchRequest()),N(`aria-describedby`,e.canRestore()?null:`store-dispatch-off`),M(2),F(e.canRestore()?-1:22)}}function xR(e,t){if(e&1){let e=W();z(0,`div`,32)(1,`div`,38)(2,`h3`),J(3),B(),z(4,`div`,39)(5,`span`,40),J(6),B(),z(7,`span`,40),J(8),B(),P(9,VL,1,1,`app-source-link`,41),P(10,HL,2,1,`span`,40),B(),P(11,WL,4,0,`p`,42),B(),P(12,KL,9,3,`div`,43),z(13,`div`,44)(14,`section`,45)(15,`div`,46)(16,`h4`,47),J(17,`State`),B(),z(18,`div`,48),V(19,`app-store-global`,49),z(20,`button`,50),G(`click`,function(){return O(e),k(K(2).copyState())}),J(21,` Copy `),B()()(),z(22,`pre`,51,2),J(24),B()(),P(25,cR,10,3),B(),z(26,`section`,52)(27,`h4`,53),J(28),z(29,`span`,14),J(30),B()(),V(31,`app-limit-note`,54),z(32,`div`,55)(33,`ul`,56),I(34,fR,12,12,`li`,null,CL,!1,gR,4,1,`li`,31),B(),P(37,_R,2,4,`div`,57),B()(),P(38,bR,23,7,`section`,58),B()}if(e&2){let e,n,r,i=t,a=K(2);M(3),Y(i.label),M(3),Y(a.kindLabel(i.kind)),M(2),X(`scope: `,i.scope),M(),F((e=i.signal?.declaredIn)?9:-1,e),M(),F(i.classic?10:-1),M(),F(i.signal?.references?.length?11:-1),M(),F(i.classic?.paused?12:-1),M(7),R(`rpc`,a.rpc())(`pageId`,a.page()?.pageId)(`target`,hv(21,yL,i.id))(`label`,i.label+` state`),M(5),Y(a.stateText()),M(),F((n=i.signal)?25:-1,n),M(3),X(` `,i.classic?`Action log`:`Change log`,` `),M(2),Y(a.storeLog().length),M(),R(`dropped`,a.page()?.dropped??0)(`max`,a.maxLog()),M(2),N(`aria-label`,i.classic?`Actions`:`Changes`),M(),L(a.storeLog()),M(3),F((r=a.changeEntry())?37:-1,r),M(),F(i.classic?38:-1)}}function SR(e,t){if(e&1&&(z(0,`div`,18)(1,`ul`,30),I(2,zL,8,10,`li`,null,SL,!1,BL,2,0,`li`,31),B(),P(5,xR,39,23,`div`,32),B()),e&2){let e,t=K();M(2),L(t.filteredStores()),M(3),F((e=t.store())?5:-1,e)}}function CR(e,t){if(e&1&&(z(0,`code`,103),J(1),B()),e&2){let e=K().$implicit,t=K(2);R(`title`,t.prettyText(e.payload)),M(),Y(t.shortText(e.payload))}}function wR(e,t){if(e&1){let e=W();z(0,`li`)(1,`button`,101),G(`click`,function(){let t=O(e).$implicit;return k(K(2).selectEvent(t.seq))}),V(2,`span`,35),z(3,`span`,102),J(4),B(),P(5,CR,2,2,`code`,103),z(6,`span`,104),J(7),B()()()}if(e&2){let e=t.$implicit,n=K(2);M(),q(`selected`,e.seq===n.selectedEventSeq()),N(`aria-pressed`,e.seq===n.selectedEventSeq())(`aria-controls`,e.seq===n.selectedEventSeq()?`ngrx-event-detail`:null),M(),j_(`background`,n.kindColor(`event`)),M(),R(`title`,e.eventType??e.type),M(),Y(e.eventType??e.type),M(),F(e.payload===void 0?-1:5),M(2),Y(n.formatTime(e.timestamp))}}function TR(e,t){e&1&&(z(0,`li`,31),J(1,`No events match this filter.`),B())}function ER(e,t){if(e&1&&(z(0,`div`,100,4),Ug(2,85),B()),e&2){K(2);let e=u_(21);M(2),R(`ngTemplateOutlet`,e)(`ngTemplateOutletContext`,hv(2,xL,t))}}function DR(e,t){if(e&1&&(z(0,`section`,20)(1,`div`,12)(2,`h2`,97),J(3,`Events`),B(),z(4,`span`,14),J(5),B()(),z(6,`p`,98),J(7,` Events dispatched through @ngrx/signals/events, across every store on this page. `),B(),z(8,`ul`,99),I(9,wR,8,10,`li`,null,CL,!1,TR,2,0,`li`,31),B(),P(12,ER,3,4,`div`,100),B()),e&2){let e,t=K();M(5),Y(t.pageEvents().length),M(4),L(t.pageEvents()),M(3),F((e=t.eventEntry())?12:-1,e)}}function OR(e,t){if(e&1&&(z(0,`dt`),J(1,`Origin`),B(),z(2,`dd`),J(3),B()),e&2){let e=K().selected,t=K();M(3),Y(t.originText(e.origin))}}function kR(e,t){if(e&1&&(z(0,`dt`),J(1,`Duration`),B(),z(2,`dd`),J(3),B()),e&2){let e=K().selected,t=K();M(3),Y(t.formatDuration(e.durationMs))}}function AR(e,t){if(e&1&&(z(0,`dt`),J(1,`Action`),B(),z(2,`dd`)(3,`pre`,109),J(4),B()()),e&2){let e=K().selected,t=K();M(4),Y(t.prettyText(e.action))}}function jR(e,t){if(e&1&&(z(0,`dt`),J(1,`Arguments`),B(),z(2,`dd`)(3,`pre`,109),J(4),B()()),e&2){let e=K().selected,t=K();M(4),Y(t.prettyText(e.args))}}function MR(e,t){if(e&1&&(z(0,`dt`),J(1,`Payload`),B(),z(2,`dd`)(3,`pre`,109),J(4),B()()),e&2){let e=K().selected,t=K();M(4),Y(t.prettyText(e.payload))}}function NR(e,t){if(e&1&&(z(0,`pre`,109),J(1),B()),e&2){let e=K(),t=K(2);M(),Y(t.prettyText(e.payload))}}function PR(e,t){if(e&1&&(z(0,`dt`),J(1,`Caused by event`),B(),z(2,`dd`)(3,`code`,110),J(4),B(),P(5,NR,2,1,`pre`,109),B()),e&2){let e=t;M(4),Y(e.type),M(),F(e.payload===void 0?-1:5)}}function FR(e,t){if(e&1){let e=W();z(0,`button`,114),G(`click`,function(){O(e);let t=K(2).selected;return k(K().copyDiff(t))}),J(1,` Copy `),B()}if(e&2){let e=K(2).selected;N(`aria-label`,`Copy the state diff of #`+e.seq)}}function IR(e,t){if(e&1&&(z(0,`code`,120),J(1),B()),e&2){let e=K().$implicit,t=K(4);M(),Y(t.shortText(e.before))}}function LR(e,t){e&1&&(z(0,`span`,122),J(1,`→`),B(),z(2,`span`,123),J(3,`became`),B())}function RR(e,t){if(e&1&&(z(0,`code`,121),J(1),B()),e&2){let e=K().$implicit,t=K(4);M(),Y(t.shortText(e.after))}}function zR(e,t){if(e&1&&(z(0,`li`)(1,`span`,117),J(2),B(),z(3,`code`,118),J(4),B(),z(5,`span`,119),P(6,IR,2,1,`code`,120),P(7,LR,4,0),P(8,RR,2,1,`code`,121),B()()),e&2){let e=t.$implicit,n=K(4);M_(`diff-row `+e.op),M(2),Y(n.opLabel(e.op)),M(2),Y(e.path),M(2),F(e.op===`add`?-1:6),M(),F(e.op===`change`?7:-1),M(),F(e.op===`remove`?-1:8)}}function BR(e,t){if(e&1&&(z(0,`p`,64),J(1),B()),e&2){let e=K(3).selected,t=K();M(),Y(t.moreChanges(e.diffTruncated))}}function VR(e,t){if(e&1&&(z(0,`ul`,115),I(1,zR,9,7,`li`,116,DL),B(),P(3,BR,2,1,`p`,64)),e&2){let e=K(2).selected;M(),L(e.diff),M(2),F(e.diffTruncated?3:-1)}}function HR(e,t){e&1&&(z(0,`p`,64),J(1,`The state did not change.`),B())}function UR(e,t){if(e&1&&(z(0,`div`,111)(1,`div`,112),J(2,`State diff`),B(),P(3,FR,2,1,`button`,113),B(),P(4,VR,4,1)(5,HR,2,0,`p`,64)),e&2){let e=K(),t=e.selected,n=e.headingLevel;M(),N(`aria-level`,n+1),M(2),F(t.diff.length?3:-1),M(),F(t.diff.length?4:5)}}function WR(e,t){if(e&1&&J(0),e&2){let e=K(2).selected;X(` Store DevTools jumps the app state to the state right after action #`,e.seq,`. Until you go back to the latest state, new actions are logged but do not change the state. `)}}function GR(e,t){if(e&1&&J(0),e&2){let e=K(3).selected;Z(` This sets every state key of `,t.label,` back to its value right after change #`,e.seq,`. Components that read the store update at once, and a new "Restore" entry is added to the log. `)}}function KR(e,t){if(e&1&&J(0),e&2){let e=K(3).selected;X(` This sets every state key of the store back to its value right after change #`,e.seq,`. Components that read the store update at once, and a new "Restore" entry is added to the log. `)}}function qR(e,t){if(e&1&&P(0,GR,1,2)(1,KR,1,1),e&2){let e;F((e=K(3).store())?0:1,e)}}function JR(e,t){if(e&1){let e=W();z(0,`div`,124),G(`keydown.escape`,function(t){return O(e),k(K(2).cancelRestore(t))}),z(1,`p`,125),P(2,WR,1,1)(3,qR,2,1),B(),z(4,`div`,94)(5,`button`,59),G(`click`,function(){O(e);let t=K().selected;return k(K().restore(t.seq,t.source===`store`))}),J(6,` Restore `),B(),z(7,`button`,29,5),G(`click`,function(){return O(e),k(K(2).cancelRestore())}),J(9,` Cancel `),B()()()}if(e&2){let e=K(),t=e.selected,n=e.idPrefix,r=K();N(`aria-labelledby`,n+`-confirm-text`),M(),R(`id`,n+`-confirm-text`),M(),F(t.source===`store`?2:3),M(3),R(`disabled`,r.busy())}}function YR(e,t){if(e&1){let e=W();z(0,`button`,130,6),G(`click`,function(){O(e);let t=K(2).selected;return k(K().askRestore(t.seq))}),J(2,` Restore this state `),B()}if(e&2){let e=K(2).idPrefix,t=K();R(`disabled`,!t.canRestore()),N(`aria-describedby`,t.canRestore()?null:e+`-writes-off`)}}function XR(e,t){if(e&1){let e=W();z(0,`button`,131),G(`click`,function(){O(e);let t=K(2).selected;return k(K().dispatchAgain(t.seq))}),J(1,` Dispatch again `),B()}if(e&2){let e=K(2).idPrefix,t=K();R(`disabled`,t.busy()||!t.canRestore()),N(`aria-describedby`,t.canRestore()?null:e+`-writes-off`)}}function ZR(e,t){if(e&1&&(z(0,`p`,129),J(1),B()),e&2){let e=K(2).idPrefix,t=K();R(`id`,e+`-writes-off`),M(),Y(t.restoreOff)}}function QR(e,t){if(e&1&&(z(0,`div`,126),P(1,YR,3,2,`button`,127),P(2,XR,2,2,`button`,128),B(),P(3,ZR,2,2,`p`,129)),e&2){let e=K().selected,t=K();M(),F(e.restorable?1:-1),M(),F(t.canAgain(e)?2:-1),M(),F(t.canRestore()?-1:3)}}function $R(e,t){e&1&&(J(0,` Store DevTools no longer holds this action, so this state cannot be restored. It was dropped past `),z(1,`code`),J(2,`maxAge`),B(),J(3,`, or the Store DevTools history was committed, reset or imported. `))}function ez(e,t){e&1&&(J(0,` Store DevTools never recorded this action, so this state cannot be restored. An `),z(1,`code`),J(2,`actionsBlocklist`),B(),J(3,`, `),z(4,`code`),J(5,`actionsSafelist`),B(),J(6,` or `),z(7,`code`),J(8,`predicate`),B(),J(9,` option filtered it out, or recording was paused. `))}function tz(e,t){e&1&&(J(0,` Time travel for @ngrx/store needs `),z(1,`code`),J(2,`provideStoreDevtools()`),B(),J(3,`. Without it, entries cannot be restored. `))}function nz(e,t){if(e&1&&(z(0,`p`,108),P(1,$R,4,0)(2,ez,10,0)(3,tz,4,0),B()),e&2){let e=K().selected;M(),F(e.unrestorable===`dropped`?1:e.unrestorable===`not-recorded`?2:3)}}function rz(e,t){if(e&1&&(z(0,`section`,105)(1,`div`,106),J(2),B(),z(3,`dl`,63)(4,`dt`),J(5,`Time`),B(),z(6,`dd`),J(7),B(),P(8,OR,4,1),P(9,kR,4,1),P(10,AR,5,1),P(11,jR,5,1),P(12,MR,5,1),P(13,PR,6,2),B(),P(14,UR,6,3),P(15,JR,10,4,`div`,107),P(16,QR,4,3),P(17,nz,4,1,`p`,108),B()),e&2){let e,n=t.selected,r=t.headingLevel,i=t.idPrefix,a=K();N(`aria-labelledby`,i+`-entry-heading`),M(),R(`id`,i+`-entry-heading`),N(`aria-level`,r),M(),Z(` #`,n.seq,` `,n.type,` `),M(5),Y(a.formatTime(n.timestamp)),M(),F(n.origin?8:-1),M(),F(n.durationMs===void 0?-1:9),M(),F(n.action===void 0?-1:10),M(),F(n.args?.length?11:-1),M(),F(n.source===`event`&&n.payload!==void 0?12:-1),M(),F((e=n.causedByEvent)?13:-1,e),M(),F(n.source===`event`?-1:14),M(),F(n.restorable&&a.confirmSeq()===n.seq?15:-1),M(),F(a.confirmSeq()!==n.seq&&(n.restorable||a.canAgain(n))?16:-1),M(),F(!n.restorable&&n.source===`store`?17:-1)}}function iz(e,t){if(e&1&&(z(0,`span`,14),J(1),B()),e&2){let e=K();M(),Y(e.sourceEntries().length)}}function az(e,t){e&1&&(z(0,`div`,23),V(1,`span`,132),z(2,`p`,27),J(3,`Scanning source for NgRx declarations…`),B()())}function oz(e,t){e&1&&(z(0,`div`,24)(1,`p`,27),J(2,`No NgRx declarations found in source.`),B(),z(3,`p`,28),J(4,` The scan looks for `),z(5,`code`),J(6,`signalStore`),B(),J(7,`, `),z(8,`code`),J(9,`signalState`),B(),J(10,`, `),z(11,`code`),J(12,`signalMethod`),B(),J(13,`, `),z(14,`code`),J(15,`createAction`),B(),J(16,`, `),z(17,`code`),J(18,`createReducer`),B(),J(19,`, `),z(20,`code`),J(21,`createEffect`),B(),J(22,`, `),z(23,`code`),J(24,`createSelector`),B(),J(25,` and `),z(26,`code`),J(27,`createFeature`),B(),J(28,`. `),B()())}function sz(e,t){if(e&1){let e=W();z(0,`button`,134),G(`click`,function(){let t=O(e).$implicit,n=K(2);return k(n.kind.set(n.kind()===t.kind?null:t.kind))}),V(1,`span`,35),z(2,`span`,139),J(3),B(),z(4,`span`,135),J(5),B()()}if(e&2){let e=t.$implicit,n=K(2);q(`active`,n.kind()===e.kind),N(`aria-pressed`,n.kind()===e.kind),M(),j_(`background`,n.kindColor(e.kind)),M(2),Y(n.kindLabel(e.kind)),M(2),Y(e.count)}}function cz(e,t){if(e&1&&(z(0,`p`,144),J(1),B()),e&2){let e=K().$implicit;M(),Y(e.detail)}}function lz(e,t){if(e&1&&(z(0,`li`,138)(1,`div`,140),V(2,`span`,35),z(3,`span`,141),J(4),B(),z(5,`span`,40),J(6),B()(),z(7,`div`,142),V(8,`app-source-link`,143),B(),P(9,cz,2,1,`p`,144),B()),e&2){let e=t.$implicit,n=K(2);M(2),j_(`background`,n.kindColor(e.kind)),M(2),Y(e.name),M(2),Y(n.kindLabel(e.kind)),M(2),R(`file`,e.file)(`line`,e.line),M(),F(e.detail?9:-1)}}function uz(e,t){if(e&1){let e=W();z(0,`li`)(1,`div`,23)(2,`p`,27),J(3,`No declarations match.`),B(),z(4,`button`,29),G(`click`,function(){return O(e),k(K(2).clearFilters())}),J(5,`Clear filters`),B()()()}}function dz(e,t){if(e&1){let e=W();z(0,`div`,133)(1,`button`,134),G(`click`,function(){return O(e),k(K().kind.set(null))}),J(2,` All `),z(3,`span`,135),J(4),B()(),I(5,sz,6,7,`button`,136,OL),B(),z(7,`ul`,137),I(8,lz,10,7,`li`,138,kL,!1,uz,6,0,`li`),B()}if(e&2){let e=K();M(),q(`active`,!e.kind()),N(`aria-pressed`,!e.kind()),M(3),Y(e.sourceEntries().length),M(),L(e.groupedEntries()),M(3),L(e.filteredEntries())}}var fz={action:`#f59e0b`,reducer:`#a78bfa`,effect:`#fb923c`,selector:`#60a5fa`,feature:`#34d399`,"store-setup":`#94a3b8`,"signal-store":`#e879f9`,"signal-state":`#22d3ee`,"signal-method":`#fb7185`,store:`#a78bfa`,event:`var(--warn)`},pz={"signal-store":`signalStore`,"signal-state":`signalState`,"signal-method":`signalMethod`,"store-setup":`store setup`,store:`@ngrx/store`,event:`event`},mz={dispatch:`store.dispatch(action)`,effect:`NgRx effect (Store.next)`,reactive:`store.dispatch(() => action)`};function hz(e){if(!e.trim())return{};let t;try{t=JSON.parse(e)}catch{return{error:`The payload is not valid JSON.`}}return!t||typeof t!=`object`||Array.isArray(t)?{error:`The payload must be a JSON object, like {"id": 7}.`}:Object.prototype.hasOwnProperty.call(t,`type`)?{error:`The payload cannot have a "type" key. Put the action type in the Type field.`}:{payload:t}}var gz=new Set([`action`,`reducer`,`effect`,`selector`,`feature`,`store-setup`]),_z=class e{rpc=$(null);canRestore=Q(()=>ME(this.rpc(),`ngrx`));restoreOff=iE(`ngrx`);filter=j(``);kind=j(null);sourceEntries=j([]);sourceLoaded=j(!1);pages=j([]);failed=j(!1);stateLoaded=j(!1);selectedPageId=j(null);hostPageId=fE();maxLog=Q(()=>jE(this.rpc()).limits.changeLog);selectedStoreId=j(null);focusEventSeq=j(null);eventDetailHeading=Jv(`eventDetailHeading`);busy=j(!1);focusLatest=j(!1);focusConfirm=j(null);cancelButton=Jv(`cancelButton`);restoreButton=Jv(`restoreButton`);stateTree=Jv(`stateTree`);filterInput=Jv(`filterInput`);latestButton=Jv(`latestButton`);message=j(``);destroyRef=E(ws);unsubscribe=null;page=Q(()=>{let e=this.pages();return e.find(e=>e.pageId===this.selectedPageId())??e.find(e=>e.pageId===this.hostPageId)??e[0]??null});logKey=Q(()=>{let e=this.page();return{pageId:e?.pageId??null,log:e?.log??[]}});logSession=Fv({source:this.logKey,computation:(e,t)=>t?oL(t.source,e)?t.value:t.value+1:0});selectedChangeSeq=Fv({source:this.logSession,computation:()=>null});selectedEventSeq=Fv({source:this.logSession,computation:()=>null});confirmSeq=Fv({source:this.logSession,computation:()=>null});pageOptions=Q(()=>this.pages().map(e=>({value:e.pageId,label:e.title||e.url,hint:e.url})));liveStores=Q(()=>{let e=this.page();if(!e)return[];let t=e.stores.map(e=>({id:e.id,label:e.name??e.references[0]??e.className,kind:e.kind,scope:e.scope,signal:e}));return e.classic&&t.push({id:`store`,label:`Store`,kind:`store`,scope:e.classic.scope,classic:e.classic}),t});filteredStores=Q(()=>{let e=this.filter().trim().toLowerCase();return e?this.liveStores().filter(t=>t.label.toLowerCase().includes(e)||t.kind.includes(e)||(t.signal?.stateKeys??[]).some(t=>t.toLowerCase().includes(e))||(this.page()?.log??[]).some(n=>n.storeId===t.id&&n.type.toLowerCase().includes(e))):this.liveStores()});store=Q(()=>{let e=this.liveStores();return e.find(e=>e.id===this.selectedStoreId())??e[0]??null});stateText=Q(()=>{let e=this.store();return e?dL(e.signal?e.signal.state:e.classic?.state):``});computedEntries=Q(()=>Object.entries(this.store()?.signal?.computed??{}).map(([e,t])=>({key:e,value:fL(t,160),full:dL(t)})));storeLog=Q(()=>{let e=this.store()?.id,t=this.filter().trim().toLowerCase();return(this.page()?.log??[]).filter(n=>n.storeId===e&&(!t||n.type.toLowerCase().includes(t)||this.storeMatches(t))).reverse()});hasEvents=Q(()=>(this.page()?.log??[]).some(e=>e.source===`event`));pageEvents=Q(()=>{let e=this.filter().trim().toLowerCase();return(this.page()?.log??[]).filter(t=>t.source===`event`&&(!e||t.type.toLowerCase().includes(e))).slice().reverse()});changeEntry=Q(()=>{let e=this.selectedChangeSeq();return e===null?null:this.storeLog().find(t=>t.seq===e)??null});eventEntry=Q(()=>{let e=this.selectedEventSeq();return e===null?null:this.pageEvents().find(t=>t.seq===e)??null});dispatchType=j(``);dispatchPayload=j(``);actionTypes=Q(()=>{let e=new Set;for(let t of this.sourceEntries())for(let n of t.types??[])e.add(n);for(let t of this.page()?.log??[])t.source===`store`&&t.action!==void 0&&e.add(t.type);return[...e].sort().slice(0,200)});payloadError=Q(()=>hz(this.dispatchPayload()).error??``);dispatchRequest=Q(()=>{let e=this.dispatchType().trim(),{payload:t,error:n}=hz(this.dispatchPayload());return!e||n?null:{type:`dispatch`,action:e,...t?{payload:t}:{}}});usesSignals=Q(()=>this.sourceEntries().some(e=>e.kind===`signal-store`||e.kind===`signal-state`));usesClassic=Q(()=>this.sourceEntries().some(e=>gz.has(e.kind)));filteredEntries=Q(()=>{let e=this.filter().trim().toLowerCase(),t=this.kind();return this.sourceEntries().filter(n=>(!t||n.kind===t)&&(!e||n.name.toLowerCase().includes(e)||n.kind.includes(e)||(n.detail??``).toLowerCase().includes(e)))});groupedEntries=Q(()=>{let e=new Map;for(let t of this.sourceEntries())e.set(t.kind,(e.get(t.kind)??0)+1);return[...e.entries()].map(([e,t])=>({kind:e,count:t}))});constructor(){dc(()=>{let e=this.rpc();e&&this.load(e)}),uy(()=>{let e=this.latestButton();e&&this.focusLatest()&&!this.busy()&&(this.focusLatest.set(!1),e.nativeElement.focus())}),dc(()=>{let e=this.focusConfirm(),t=e===`cancel`?this.cancelButton():this.restoreButton();e&&t&&(this.focusConfirm.set(null),t.nativeElement.focus())}),uy(()=>{let e=this.focusEventSeq(),t=this.eventDetailHeading();e!==null&&t&&(this.focusEventSeq.set(null),t.nativeElement.focus())}),this.destroyRef.onDestroy(()=>this.unsubscribe?.())}storeMatches(e){let t=this.store();return!!t&&t.label.toLowerCase().includes(e)}async load(e){this.failed.set(!1),gE(e,`get-ngrx-store`).then(e=>this.sourceEntries.set(Array.isArray(e)?e:[])).catch(()=>this.sourceEntries.set([])).finally(()=>this.sourceLoaded.set(!0));try{let t=await e.scope(`pangular`).rpc.sharedState(`ngrx-store`);if(this.destroyRef.destroyed)return;let n=e=>{let t=e;this.pages.set(Array.isArray(t?.pages)?t.pages:[]),e!==void 0&&this.stateLoaded.set(!0)};n(t.value()),this.unsubscribe?.(),this.unsubscribe=t.on(`updated`,n)}catch{this.failed.set(!0)}}retry(){let e=this.rpc();e&&this.load(e)}selectPage(e){this.selectedPageId.set(e),this.selectedStoreId.set(null),this.selectedChangeSeq.set(null),this.selectedEventSeq.set(null),this.confirmSeq.set(null),this.message.set(``)}selectStore(e){this.selectedStoreId.set(e),this.selectedChangeSeq.set(null),this.confirmSeq.set(null),this.message.set(``)}selectChange(e){this.selectedChangeSeq.set(this.selectedChangeSeq()===e?null:e),this.confirmSeq.set(null),this.message.set(``)}copyState(){return this.copyText(this.stateText())}copyDiff(e){return this.copyText(dL(e.diff))}async copyText(e){try{await navigator.clipboard.writeText(e),this.message.set(`Copied.`)}catch{this.message.set(`The clipboard is not available here.`)}}askRestore(e){this.confirmSeq.set(e),this.focusConfirm.set(`cancel`)}cancelRestore(e){e?.preventDefault(),this.confirmSeq.set(null),this.focusConfirm.set(`restore`)}async restore(e,t){let n=this.page();if(!n)return;this.busy.set(!0),this.focusLatest.set(!1);let r=!1;try{let i=await gE(this.rpc(),`request-ngrx-action`,{pageId:n.pageId,request:{type:`restore`,seq:e}});this.message.set(i?.error??i?.message??`Restored.`),r=t&&!i?.error&&!!i?.paused}catch{this.message.set(`Could not reach the page to restore the state.`)}finally{this.busy.set(!1),this.confirmSeq.set(null),this.focusLatest.set(r),r||this.stateTree()?.nativeElement.focus()}}selectEvent(e){let t=this.selectedEventSeq()===e?null:e;this.selectedEventSeq.set(t),t!==null&&this.focusEventSeq.set(t)}async backToLatest(){let e=this.page();if(e){this.busy.set(!0);try{let t=await gE(this.rpc(),`request-ngrx-action`,{pageId:e.pageId,request:{type:`latest`}});this.focusLatest.set(!1),this.stateTree()?.nativeElement.focus(),this.message.set(t?.error??t?.message??`Back on the latest state.`)}catch{this.message.set(`Could not reach the page to go back to the latest state.`)}finally{this.busy.set(!1)}}}canAgain(e){return e.source===`store`&&e.action!==void 0}async dispatchAction(e){e.preventDefault();let t=this.dispatchRequest();t&&await this.send(t,`Could not reach the page to dispatch the action.`)}dispatchAgain(e){return this.send({type:`dispatch-again`,seq:e},`Could not reach the page to dispatch the action again.`)}async send(e,t){let n=this.page();if(!n||this.busy())return;let r=this.logSession();this.busy.set(!0);try{let t=await gE(this.rpc(),`request-ngrx-action`,{pageId:n.pageId,request:e});this.message.set(t?.error??t?.message??`Dispatched.`),t?.entry&&this.logSession()===r&&(this.selectedStoreId.set(`store`),this.selectedChangeSeq.set(t.entry.seq))}catch{this.message.set(t)}finally{this.busy.set(!1)}}clearFilters(){this.filter.set(``),this.kind.set(null),this.filterInput()?.nativeElement.focus()}changeCount(e){return(this.page()?.log??[]).filter(t=>t.storeId===e).length}entityIds(e){return e.slice(0,30)}entityOverflowTitle(e,t){let n=e.slice(30).join(`, `);return t>e.length?`${n} (first ${e.length} of ${t} shown)`:n}kindColor(e){return fz[e]??`var(--text-3)`}kindLabel(e){return pz[e]??e}originText(e){return mz[e]??e}changesLabel=aL;moreChanges=iL;opLabel(e){return e===`add`?`added`:e===`remove`?`removed`:`changed`}prettyText(e){return dL(e)}shortText(e){return fL(e)}formatTime=tO;formatDuration(e){return e<=0?`<1ms`:`${Math.round(e)}ms`}methodDuration(e){let t=[];return e.avgDurationMs!==void 0&&t.push(`avg ${this.formatDuration(e.avgDurationMs)}`),e.lastDurationMs!==void 0&&t.push(`last ${this.formatDuration(e.lastDurationMs)}`),t.length?` · ${t.join(` · `)}`:``}static ɵfac=function(t){return new(t||e)};static ɵcmp=Wh({type:e,selectors:[[`app-store-inspector`]],viewQuery:function(e,t){e&1&&c_(t.eventDetailHeading,pL,5)(t.cancelButton,mL,5)(t.restoreButton,hL,5)(t.stateTree,gL,5)(t.filterInput,_L,5)(t.latestButton,vL,5),e&2&&l_(6)},inputs:{rpc:[1,`rpc`]},decls:30,vars:11,consts:[[`filterInput`,``],[`entryDetailTpl`,``],[`stateTree`,``],[`latestButton`,``],[`eventDetailHeading`,``],[`cancelButton`,``],[`restoreButton`,``],[1,`toolbar`],[`type`,`search`,`placeholder`,`Filter stores, changes and declarations…`,`aria-label`,`Filter stores, changes and source declarations`,3,`input`,`keydown.escape`,`value`],[1,`status`],[`aria-hidden`,`true`,1,`live-dot`],[`aria-labelledby`,`ngrx-live-heading`,1,`block`],[1,`section-head`],[`id`,`ngrx-live-heading`],[1,`pill`],[`role`,`alert`,1,`empty`],[`role`,`status`,1,`empty`],[1,`empty`],[1,`live-layout`],[`role`,`status`,1,`message`],[`aria-labelledby`,`ngrx-events-heading`,1,`block`],[`aria-labelledby`,`ngrx-source-heading`,1,`block`],[`id`,`ngrx-source-heading`],[`role`,`status`,1,`empty`,`compact`],[1,`empty`,`compact`],[`id`,`ngrx-page-label`,1,`visually-hidden`],[`labelledBy`,`ngrx-page-label`,1,`page-select`,3,`valueChange`,`options`,`value`],[1,`empty-title`],[1,`hint`],[`type`,`button`,1,`btn`,3,`click`],[`aria-label`,`Stores on this page`,1,`store-list`],[1,`muted`,`pad`],[1,`store-detail`],[`type`,`button`,1,`store-item`,3,`click`],[1,`store-top`],[`aria-hidden`,`true`,1,`dot`],[1,`store-name`],[1,`store-meta`],[1,`detail-head`],[1,`chips`],[1,`chip`],[1,`chip`,`mono`,3,`file`],[1,`refs`],[1,`paused`],[1,`facts`],[`aria-labelledby`,`ngrx-state-heading`,1,`fact`],[1,`fact-head`],[`id`,`ngrx-state-heading`],[1,`state-actions`],[3,`rpc`,`pageId`,`target`,`label`],[`type`,`button`,`aria-label`,`Copy state`,1,`btn`,`copy`,3,`click`],[`tabindex`,`0`,`aria-labelledby`,`ngrx-state-heading`,1,`tree`],[`aria-labelledby`,`ngrx-log-heading`,1,`log`],[`id`,`ngrx-log-heading`],[`what`,`changes on this page`,`limit`,`changeLog`,3,`dropped`,`max`],[1,`log-layout`],[`appRovingList`,`button.log-item`,1,`log-list`],[`id`,`ngrx-change-detail`],[`aria-labelledby`,`ngrx-dispatch-heading`,1,`dispatch`],[`type`,`button`,1,`btn`,`primary`,3,`click`,`disabled`],[`id`,`store-latest-off`,1,`hint`,`small`],[`aria-labelledby`,`ngrx-computed-heading`,1,`fact`],[`id`,`ngrx-computed-heading`],[1,`kv`],[1,`muted`],[`id`,`ngrx-methods-heading`,1,`spaced`],[`aria-labelledby`,`ngrx-methods-heading`,1,`methods`],[`aria-labelledby`,`ngrx-entities-heading`,1,`fact`],[3,`title`],[1,`chip`,`mono`],[1,`tag`],[1,`calls`],[`id`,`ngrx-entities-heading`],[1,`entities`],[1,`entity-group`],[1,`entity-head`],[1,`entity-count`],[1,`chips`,`entity-ids`],[1,`chip`,`more`,3,`title`],[`type`,`button`,1,`log-item`,3,`click`],[1,`seq`],[1,`log-type-row`],[1,`log-type`,3,`title`],[1,`tag`,3,`title`],[1,`log-meta`],[3,`ngTemplateOutlet`,`ngTemplateOutletContext`],[`id`,`ngrx-dispatch-heading`],[1,`dispatch-form`,3,`submit`],[`required`,``,`spellcheck`,`false`,`autocomplete`,`off`,`list`,`ngrx-action-types`,`placeholder`,`e.g. [Cart] Add Item`,3,`input`,`value`],[`id`,`ngrx-action-types`],[3,`value`],[1,`optional`],[`rows`,`3`,`spellcheck`,`false`,`placeholder`,`e.g. {"id": 7}`,`aria-describedby`,`ngrx-payload-error`,3,`input`,`value`],[`id`,`ngrx-payload-error`,1,`field-error`],[1,`actions`],[`type`,`submit`,1,`btn`,`primary`,3,`disabled`],[`id`,`store-dispatch-off`,1,`hint`,`small`],[`id`,`ngrx-events-heading`],[1,`intro`],[`appRovingList`,`button.event-item`,`aria-label`,`Dispatched events`,1,`events-list`],[`id`,`ngrx-event-detail`,`tabindex`,`-1`,1,`event-detail-focus`],[`type`,`button`,1,`event-item`,3,`click`],[1,`event-type`,`mono`,3,`title`],[1,`event-payload`,3,`title`],[1,`event-time`],[1,`entry`],[`role`,`heading`,1,`entry-heading`,3,`id`],[`role`,`group`,1,`confirm`],[1,`hint`,`small`],[1,`code`],[1,`mono`],[1,`sub-head`],[`role`,`heading`,1,`sub`],[`type`,`button`,1,`btn`,`copy`],[`type`,`button`,1,`btn`,`copy`,3,`click`],[1,`diff`],[3,`class`],[1,`op`],[1,`path`],[1,`values`],[1,`before`],[1,`after`],[`aria-hidden`,`true`,1,`arrow`],[1,`visually-hidden`],[`role`,`group`,1,`confirm`,3,`keydown.escape`],[3,`id`],[1,`entry-actions`],[`type`,`button`,1,`btn`,`restore`,3,`disabled`],[`type`,`button`,1,`btn`,3,`disabled`],[1,`hint`,`small`,3,`id`],[`type`,`button`,1,`btn`,`restore`,3,`click`,`disabled`],[`type`,`button`,1,`btn`,3,`click`,`disabled`],[`aria-hidden`,`true`,1,`spinner`],[`role`,`group`,`aria-label`,`Filter declarations by kind`,1,`kinds`],[`type`,`button`,1,`kind-chip`,3,`click`],[1,`count`],[`type`,`button`,1,`kind-chip`,3,`active`],[1,`nodes`],[1,`node-card`],[1,`chip-text`],[1,`node-header`],[1,`node-label`],[1,`node-meta`],[1,`file`,3,`file`,`line`],[1,`detail`]],template:function(e,t){e&1&&(z(0,`div`,7)(1,`input`,8,0),G(`input`,function(e){return t.filter.set(e.target.value)})(`keydown.escape`,function(){return t.filter.set(``)}),B(),P(3,AL,3,2),z(4,`span`,9),V(5,`span`,10),J(6),B()(),z(7,`section`,11)(8,`div`,12)(9,`h2`,13),J(10,`Live stores`),B(),P(11,jL,2,1,`span`,14),B(),P(12,ML,7,0,`div`,15)(13,NL,3,0,`div`,16)(14,PL,5,0,`div`,17)(15,RL,4,1,`div`,17)(16,SR,6,2,`div`,18),z(17,`p`,19),J(18),B()(),P(19,DR,13,3,`section`,20),ag(20,rz,18,16,`ng-template`,null,1,Ev),z(22,`section`,21)(23,`div`,12)(24,`h2`,22),J(25,`Source declarations`),B(),P(26,iz,2,1,`span`,14),B(),P(27,az,4,0,`div`,23)(28,oz,29,0,`div`,24)(29,dz,11,5),B()),e&2&&(M(),R(`value`,t.filter()),M(2),F(t.pages().length>1?3:-1),M(),q(`on`,!!t.page()),M(2),X(` `,t.page()?`Live`:`No page connected`,` `),M(5),F(t.liveStores().length?11:-1),M(),F(t.failed()?12:t.stateLoaded()?t.page()?t.liveStores().length?16:15:14:13),M(6),Y(t.message()),M(),F(t.hasEvents()?19:-1),M(7),F(t.sourceEntries().length?26:-1),M(),F(t.sourceLoaded()?t.sourceEntries().length===0?28:29:27))},dependencies:[oO,pP,qD,lb,DO,VO],styles:[`[_nghost-%COMP%] {
   display: grid;
   gap: 24px;
   min-width: 0;
@@ -6174,6 +6439,15 @@ h4[_ngcontent-%COMP%] {
   margin-bottom: 10px;
 }
 
+.state-actions[_ngcontent-%COMP%] {
+  display: flex;
+  flex-wrap: wrap;
+  justify-content: flex-end;
+  align-items: center;
+  gap: 8px;
+  min-width: 0;
+}
+
 .fact-head[_ngcontent-%COMP%]   h4[_ngcontent-%COMP%] {
   margin: 0;
 }
@@ -7039,7 +7313,7 @@ textarea[aria-invalid=true][_ngcontent-%COMP%] {
   .kv[_ngcontent-%COMP%] {
     grid-template-columns: minmax(0, 1fr);
   }
-}`]})},VR=[`heading`];function HR(e,t){if(e&1){let e=W();H(0,`div`,6)(1,`p`,9),J(2,`Could not explain this field. The devtools server did not answer.`),U(),H(3,`button`,11),n_(`click`,function(){return O(e),k(K().retry())}),J(4,`Try again`),U()()}}function UR(e,t){if(e&1&&(H(0,`pre`,7),J(1),U()),e&2){let e=K();N(`aria-busy`,e.text()===null?`true`:null),M(),Y(e.text()??`Loading…`)}}function WR(e,t){if(e&1){let e=W();H(0,`div`,8)(1,`label`,15),J(2),U(),H(3,`input`,16),n_(`input`,function(t){return O(e),k(K().draft.set(t.target.value))})(`keydown.enter`,function(){return O(e),k(K().setValue())}),U(),H(4,`button`,17),n_(`click`,function(){return O(e),k(K().setValue())}),J(5,` Set `),U()()}if(e&2){let e=K();M(2),X(`New value for `,e.node().path),M(),Gg(`value`,e.draft()),M(),Gg(`disabled`,!e.canWrite()),N(`aria-describedby`,e.canWrite()?null:`field-writes-off`)}}function GR(e,t){if(e&1&&(H(0,`p`,9),J(1),H(2,`a`,18),J(3,`How to unmask it`),U()()),e&2){let e=K();M(),X(` No Set editor: this field is redacted (`,e.redactLabel(e.node().redacted),`). `),M(),Gg(`href`,e.unmaskDocsUrl,Au)}}function KR(e,t){if(e&1&&(H(0,`p`,13),J(1),U()),e&2){let e=K();M(),Y(e.writesOff)}}var qR=class e{form=$.required();node=$.required();version=$(0);rpc=$(null);closed=Iv();canWrite=Q(()=>AE(this.rpc(),`forms`));writesOff=nE(`forms`);redactLabel=CE;unmaskDocsUrl=wE;target=Q(()=>`${this.form().id}|${this.node().path}`);text=Nv({source:this.target,computation:()=>null});failed=Nv({source:this.target,computation:()=>!1});attempt=j(0);heading=Kv.required(`heading`);host=E(Nl);draft=Nv({source:this.target,computation:()=>``});message=Nv({source:this.target,computation:()=>``});constructor(){dc(()=>{let e=this.form().id,t=this.node().path;this.version(),this.attempt();let n=this.rpc();jv(()=>this.load(n,e,t))}),cy(()=>{this.target();let e=jv(this.heading).nativeElement;this.host.nativeElement.scrollIntoView?.({block:`nearest`}),e.focus({preventScroll:!0})})}async load(e,t,n){if(!e)return;let r=await xE(e,`forms-explain`,{kind:`field`,form:t,path:n});if(this.form().id===t&&this.node().path===n){if(r===null){this.failed.set(!0);return}this.failed.set(!1),this.text.set(OE(r))}}retry(){this.failed.set(!1),this.attempt.update(e=>e+1)}async act(e){let t=this.form().id,n=this.node().path,r=await TE(this.rpc(),{action:e,formId:t,path:n});this.form().id===t&&this.node().path===n&&this.message.set(r.expression?`${EE(r)} ${r.expression}`:EE(r))}async setValue(){let e=this.form().id,t=this.node().path,n=await TE(this.rpc(),{action:`set-value`,formId:e,path:t,value:this.draft(),coerce:!0,mode:`user`});this.form().id===e&&this.node().path===t&&this.message.set(EE(n))}static ɵfac=function(t){return new(t||e)};static ɵcmp=Wh({type:e,selectors:[[`app-forms-field-detail`]],viewQuery:function(e,t){e&1&&c_(t.heading,VR,5),e&2&&l_()},hostAttrs:[`role`,`region`,`aria-labelledby`,`forms-field-heading`],inputs:{form:[1,`form`],node:[1,`node`],version:[1,`version`],rpc:[1,`rpc`]},outputs:{closed:`closed`},decls:26,vars:11,consts:[[`heading`,``],[1,`head`],[1,`section-label`],[`id`,`forms-field-heading`,`tabindex`,`-1`],[1,`tag`],[`type`,`button`,1,`small`,`close`,3,`click`],[`role`,`alert`,1,`failed`],[1,`explain`],[1,`editor`],[1,`muted`],[`role`,`group`,`aria-label`,`Field actions`,1,`row`],[`type`,`button`,1,`small`,3,`click`],[`type`,`button`,1,`small`,3,`click`,`disabled`],[`id`,`field-writes-off`,1,`muted`],[`role`,`status`,1,`status`],[`for`,`field-value`,1,`sr-only`],[`id`,`field-value`,`type`,`text`,`placeholder`,`New value, read as the current value's type`,`autocomplete`,`off`,`spellcheck`,`false`,1,`field-input`,3,`input`,`keydown.enter`,`value`],[`type`,`button`,1,`small`,`primary`,3,`click`,`disabled`],[`target`,`_blank`,`rel`,`noopener noreferrer`,3,`href`]],template:function(e,t){e&1&&(H(0,`div`,1)(1,`span`,2),J(2,`Field`),U(),H(3,`h3`,3,0),J(5),U(),H(6,`span`,4),J(7),U(),H(8,`button`,5),n_(`click`,function(){return t.closed.emit()}),J(9,` Close `),U()(),P(10,HR,5,0,`div`,6)(11,UR,2,2,`pre`,7),P(12,WR,6,4,`div`,8)(13,GR,4,2,`p`,9),H(14,`div`,10)(15,`button`,11),n_(`click`,function(){return t.act(`focus`)}),J(16,`Focus`),U(),H(17,`button`,12),n_(`click`,function(){return t.act(`mark-touched`)}),J(18,` Touch `),U(),H(19,`button`,12),n_(`click`,function(){return t.act(`revalidate`)}),J(20,` Revalidate `),U(),H(21,`button`,11),n_(`click`,function(){return t.act(`store-as-global`)}),J(22,`Store as global`),U()(),P(23,KR,2,1,`p`,13),H(24,`p`,14),J(25),U()),e&2&&(M(5),Y(t.node().path||`(form)`),M(2),Y(t.node().type),M(),N(`aria-label`,`Close details for `+(t.node().path||`the form`)),M(2),F(t.failed()?10:11),M(2),F(t.node().type===`control`&&!t.node().redacted?12:t.node().type===`control`?13:-1),M(5),Gg(`disabled`,!t.canWrite()),N(`aria-describedby`,t.canWrite()?null:`field-writes-off`),M(2),Gg(`disabled`,!t.canWrite()),N(`aria-describedby`,t.canWrite()?null:`field-writes-off`),M(4),F(t.canWrite()?-1:23),M(2),Y(t.message()))},styles:[`.muted[_ngcontent-%COMP%] {
+}`]})},vz=[`heading`];function yz(e,t){if(e&1){let e=W();H(0,`div`,6)(1,`p`,9),J(2,`Could not explain this field. The devtools server did not answer.`),U(),H(3,`button`,11),n_(`click`,function(){return O(e),k(K().retry())}),J(4,`Try again`),U()()}}function bz(e,t){if(e&1&&(H(0,`pre`,7),J(1),U()),e&2){let e=K();N(`aria-busy`,e.text()===null?`true`:null),M(),Y(e.text()??`Loading…`)}}function xz(e,t){if(e&1){let e=W();H(0,`div`,8)(1,`label`,15),J(2),U(),H(3,`input`,16),n_(`input`,function(t){return O(e),k(K().draft.set(t.target.value))})(`keydown.enter`,function(){return O(e),k(K().setValue())}),U(),H(4,`button`,17),n_(`click`,function(){return O(e),k(K().setValue())}),J(5,` Set `),U()()}if(e&2){let e=K();M(2),X(`New value for `,e.node().path),M(),Gg(`value`,e.draft()),M(),Gg(`disabled`,!e.canWrite()),N(`aria-describedby`,e.canWrite()?null:`field-writes-off`)}}function Sz(e,t){if(e&1&&(H(0,`p`,9),J(1),H(2,`a`,18),J(3,`How to unmask it`),U()()),e&2){let e=K();M(),X(` No Set editor: this field is redacted (`,e.redactLabel(e.node().redacted),`). `),M(),Gg(`href`,e.unmaskDocsUrl,Au)}}function Cz(e,t){if(e&1&&(H(0,`p`,13),J(1),U()),e&2){let e=K();M(),Y(e.writesOff)}}var wz=class e{form=$.required();node=$.required();version=$(0);rpc=$(null);closed=Rv();canWrite=Q(()=>ME(this.rpc(),`forms`));writesOff=iE(`forms`);redactLabel=TE;unmaskDocsUrl=EE;target=Q(()=>`${this.form().id}|${this.node().path}`);text=Fv({source:this.target,computation:()=>null});failed=Fv({source:this.target,computation:()=>!1});attempt=j(0);heading=Jv.required(`heading`);host=E(Nl);draft=Fv({source:this.target,computation:()=>``});message=Fv({source:this.target,computation:()=>``});constructor(){dc(()=>{let e=this.form().id,t=this.node().path;this.version(),this.attempt();let n=this.rpc();Nv(()=>this.load(n,e,t))}),uy(()=>{this.target();let e=Nv(this.heading).nativeElement;this.host.nativeElement.scrollIntoView?.({block:`nearest`}),e.focus({preventScroll:!0})})}async load(e,t,n){if(!e)return;let r=await CE(e,`forms-explain`,{kind:`field`,form:t,path:n});if(this.form().id===t&&this.node().path===n){if(r===null){this.failed.set(!0);return}this.failed.set(!1),this.text.set(AE(r))}}retry(){this.failed.set(!1),this.attempt.update(e=>e+1)}async act(e){let t=this.form().id,n=this.node().path,r=await DE(this.rpc(),{action:e,formId:t,path:n});this.form().id===t&&this.node().path===n&&this.message.set(r.expression?`${OE(r)} ${r.expression}`:OE(r))}async setValue(){let e=this.form().id,t=this.node().path,n=await DE(this.rpc(),{action:`set-value`,formId:e,path:t,value:this.draft(),coerce:!0,mode:`user`});this.form().id===e&&this.node().path===t&&this.message.set(OE(n))}static ɵfac=function(t){return new(t||e)};static ɵcmp=Wh({type:e,selectors:[[`app-forms-field-detail`]],viewQuery:function(e,t){e&1&&c_(t.heading,vz,5),e&2&&l_()},hostAttrs:[`role`,`region`,`aria-labelledby`,`forms-field-heading`],inputs:{form:[1,`form`],node:[1,`node`],version:[1,`version`],rpc:[1,`rpc`]},outputs:{closed:`closed`},decls:26,vars:11,consts:[[`heading`,``],[1,`head`],[1,`section-label`],[`id`,`forms-field-heading`,`tabindex`,`-1`],[1,`tag`],[`type`,`button`,1,`small`,`close`,3,`click`],[`role`,`alert`,1,`failed`],[1,`explain`],[1,`editor`],[1,`muted`],[`role`,`group`,`aria-label`,`Field actions`,1,`row`],[`type`,`button`,1,`small`,3,`click`],[`type`,`button`,1,`small`,3,`click`,`disabled`],[`id`,`field-writes-off`,1,`muted`],[`role`,`status`,1,`status`],[`for`,`field-value`,1,`sr-only`],[`id`,`field-value`,`type`,`text`,`placeholder`,`New value, read as the current value's type`,`autocomplete`,`off`,`spellcheck`,`false`,1,`field-input`,3,`input`,`keydown.enter`,`value`],[`type`,`button`,1,`small`,`primary`,3,`click`,`disabled`],[`target`,`_blank`,`rel`,`noopener noreferrer`,3,`href`]],template:function(e,t){e&1&&(H(0,`div`,1)(1,`span`,2),J(2,`Field`),U(),H(3,`h3`,3,0),J(5),U(),H(6,`span`,4),J(7),U(),H(8,`button`,5),n_(`click`,function(){return t.closed.emit()}),J(9,` Close `),U()(),P(10,yz,5,0,`div`,6)(11,bz,2,2,`pre`,7),P(12,xz,6,4,`div`,8)(13,Sz,4,2,`p`,9),H(14,`div`,10)(15,`button`,11),n_(`click`,function(){return t.act(`focus`)}),J(16,`Focus`),U(),H(17,`button`,12),n_(`click`,function(){return t.act(`mark-touched`)}),J(18,` Touch `),U(),H(19,`button`,12),n_(`click`,function(){return t.act(`revalidate`)}),J(20,` Revalidate `),U(),H(21,`button`,11),n_(`click`,function(){return t.act(`store-as-global`)}),J(22,`Store as global`),U()(),P(23,Cz,2,1,`p`,13),H(24,`p`,14),J(25),U()),e&2&&(M(5),Y(t.node().path||`(form)`),M(2),Y(t.node().type),M(),N(`aria-label`,`Close details for `+(t.node().path||`the form`)),M(2),F(t.failed()?10:11),M(2),F(t.node().type===`control`&&!t.node().redacted?12:t.node().type===`control`?13:-1),M(5),Gg(`disabled`,!t.canWrite()),N(`aria-describedby`,t.canWrite()?null:`field-writes-off`),M(2),Gg(`disabled`,!t.canWrite()),N(`aria-describedby`,t.canWrite()?null:`field-writes-off`),M(4),F(t.canWrite()?-1:23),M(2),Y(t.message()))},styles:[`.muted[_ngcontent-%COMP%] {
   color: var(--%NS%text-2);
 }
 
@@ -7380,7 +7654,7 @@ h3[_ngcontent-%COMP%]:focus-visible {
 .status[_ngcontent-%COMP%]:empty {
   height: 0;
   margin: -12px 0 0;
-}`]})};function JR(e,t){if(e&1){let e=W();H(0,`div`,0)(1,`p`,4),J(2,`Could not explain this form`),U(),H(3,`p`),J(4,`The devtools server did not answer. Check that the app is running, then try again.`),U(),H(5,`button`,2),n_(`click`,function(){return O(e),k(K().retry())}),J(6,`Try again`),U()()}}function YR(e,t){if(e&1&&(H(0,`section`,5)(1,`h3`,6),J(2,`Submit`),U(),H(3,`pre`,7),J(4),U()(),H(5,`section`,8)(6,`h3`,9),J(7,`Payload`),U(),H(8,`pre`,7),J(9),U()()),e&2){let e=K();M(3),N(`aria-busy`,e.submit()===null?`true`:null),M(),Y(e.submit()??`Loading…`),M(4),N(`aria-busy`,e.payload()===null?`true`:null),M(),Y(e.payload()??`Loading…`)}}function XR(e,t){if(e&1){let e=W();H(0,`div`,0)(1,`p`,3),J(2,`Could not check this form`),U(),H(3,`p`),J(4,`The devtools server did not answer. Check that the app is running, then try again.`),U(),H(5,`button`,4),n_(`click`,function(){return O(e),k(K().retry())}),J(6,`Try again`),U()()}}function ZR(e,t){e&1&&(H(0,`div`,1),zg(1,`span`,5),H(2,`p`),J(3,`Checking the form for problems…`),U()())}function QR(e,t){e&1&&(H(0,`div`,2)(1,`span`,6),A(),H(2,`svg`,7),zg(3,`path`,8),U()(),ms(),H(4,`p`,3),J(5,`No problems found`),U(),H(6,`p`),J(7,`For generic accessibility checks, run axe on the page.`),U()())}function $R(e,t){if(e&1){let e=W();H(0,`span`,15),J(1,`at `),H(2,`button`,19),n_(`click`,function(){let t=O(e);return k(K(3).showField.emit(t))}),H(3,`span`,20),J(4,`Show field `),U(),H(5,`code`),J(6),U()()()}e&2&&(M(6),Y(t))}function ez(e,t){if(e&1&&(H(0,`li`)(1,`div`,12)(2,`span`,13),J(3),U(),H(4,`code`,14),J(5),U(),P(6,$R,7,1,`span`,15),U(),H(7,`p`,16),J(8),U(),H(9,`p`,17)(10,`span`,18),J(11,`Fix`),U(),J(12),U()()),e&2){let e,n=t.$implicit;N(`data-severity`,n.severity),M(2),N(`data-tone`,n.severity===`info`?``:n.severity===`error`?`bad`:`warn`),M(),Y(n.severity),M(2),Y(n.rule),M(),F((e=n.path)?6:-1,e),M(2),Y(n.message),M(4),X(` `,n.fix)}}function tz(e,t){if(e&1&&(H(0,`p`,9)(1,`span`,10),J(2),U(),J(3),U(),H(4,`ul`,11),I(5,ez,13,7,`li`,null,Dg),U()),e&2){let e=K();M(2),Y(e.findings().length),M(),X(` `,e.findings().length===1?`finding`:`findings`,` `),M(2),L(e.findings())}}var nz=class e{formId=$.required();version=$(0);rpc=$(null);submit=Nv({source:this.formId,computation:()=>null});payload=Nv({source:this.formId,computation:()=>null});failed=Nv({source:this.formId,computation:()=>!1});message=j(``);attempt=j(0);constructor(){dc(()=>{let e=this.formId();this.version(),this.attempt();let t=this.rpc();t&&jv(async()=>{let[n,r]=await Promise.all([xE(t,`forms-explain`,{kind:`submit`,form:e}),xE(t,`forms-explain`,{kind:`payload`,form:e})]);if(this.formId()===e){if(n===null||r===null){this.failed.set(!0);return}this.failed.set(!1),this.submit.set(OE(n)),this.payload.set(OE(r))}})})}retry(){this.failed.set(!1),this.attempt.update(e=>e+1)}async copyFixture(){let e=(await xE(this.rpc(),`forms-explain`,{kind:`fixture`,form:this.formId()})??``).match(/```ts\n([\s\S]*)```\s*$/)?.[1];if(!e){this.message.set(`No test fixture is available for this form.`);return}try{await navigator.clipboard.writeText(e),this.message.set(`Copied.`)}catch{this.message.set(`Clipboard is not available here.`)}}static ɵfac=function(t){return new(t||e)};static ɵcmp=Wh({type:e,selectors:[[`app-forms-submit`]],inputs:{formId:[1,`formId`],version:[1,`version`],rpc:[1,`rpc`]},decls:7,vars:2,consts:[[`role`,`alert`,1,`empty-state`],[1,`fixture`],[`type`,`button`,1,`small`,3,`click`],[`role`,`status`,1,`status`],[1,`empty-title`],[`aria-labelledby`,`forms-submit-title`,1,`block`],[`id`,`forms-submit-title`,1,`section-label`],[1,`explain`],[`aria-labelledby`,`forms-payload-title`,1,`block`],[`id`,`forms-payload-title`,1,`section-label`]],template:function(e,t){e&1&&(P(0,JR,7,0,`div`,0)(1,YR,10,4),H(2,`div`,1)(3,`button`,2),n_(`click`,function(){return t.copyFixture()}),J(4,`Copy test fixture`),U(),H(5,`span`,3),J(6),U()()),e&2&&(F(+!t.failed()),M(6),Y(t.message()))},styles:[`.muted[_ngcontent-%COMP%] {
+}`]})};function Tz(e,t){if(e&1){let e=W();H(0,`div`,0)(1,`p`,4),J(2,`Could not explain this form`),U(),H(3,`p`),J(4,`The devtools server did not answer. Check that the app is running, then try again.`),U(),H(5,`button`,2),n_(`click`,function(){return O(e),k(K().retry())}),J(6,`Try again`),U()()}}function Ez(e,t){if(e&1&&(H(0,`section`,5)(1,`h3`,6),J(2,`Submit`),U(),H(3,`pre`,7),J(4),U()(),H(5,`section`,8)(6,`h3`,9),J(7,`Payload`),U(),H(8,`pre`,7),J(9),U()()),e&2){let e=K();M(3),N(`aria-busy`,e.submit()===null?`true`:null),M(),Y(e.submit()??`Loading…`),M(4),N(`aria-busy`,e.payload()===null?`true`:null),M(),Y(e.payload()??`Loading…`)}}function Dz(e,t){if(e&1){let e=W();H(0,`div`,0)(1,`p`,3),J(2,`Could not check this form`),U(),H(3,`p`),J(4,`The devtools server did not answer. Check that the app is running, then try again.`),U(),H(5,`button`,4),n_(`click`,function(){return O(e),k(K().retry())}),J(6,`Try again`),U()()}}function Oz(e,t){e&1&&(H(0,`div`,1),zg(1,`span`,5),H(2,`p`),J(3,`Checking the form for problems…`),U()())}function kz(e,t){e&1&&(H(0,`div`,2)(1,`span`,6),A(),H(2,`svg`,7),zg(3,`path`,8),U()(),ms(),H(4,`p`,3),J(5,`No problems found`),U(),H(6,`p`),J(7,`For generic accessibility checks, run axe on the page.`),U()())}function Az(e,t){if(e&1){let e=W();H(0,`span`,15),J(1,`at `),H(2,`button`,19),n_(`click`,function(){let t=O(e);return k(K(3).showField.emit(t))}),H(3,`span`,20),J(4,`Show field `),U(),H(5,`code`),J(6),U()()()}e&2&&(M(6),Y(t))}function jz(e,t){if(e&1&&(H(0,`li`)(1,`div`,12)(2,`span`,13),J(3),U(),H(4,`code`,14),J(5),U(),P(6,Az,7,1,`span`,15),U(),H(7,`p`,16),J(8),U(),H(9,`p`,17)(10,`span`,18),J(11,`Fix`),U(),J(12),U()()),e&2){let e,n=t.$implicit;N(`data-severity`,n.severity),M(2),N(`data-tone`,n.severity===`info`?``:n.severity===`error`?`bad`:`warn`),M(),Y(n.severity),M(2),Y(n.rule),M(),F((e=n.path)?6:-1,e),M(2),Y(n.message),M(4),X(` `,n.fix)}}function Mz(e,t){if(e&1&&(H(0,`p`,9)(1,`span`,10),J(2),U(),J(3),U(),H(4,`ul`,11),I(5,jz,13,7,`li`,null,Dg),U()),e&2){let e=K();M(2),Y(e.findings().length),M(),X(` `,e.findings().length===1?`finding`:`findings`,` `),M(2),L(e.findings())}}var Nz=class e{formId=$.required();version=$(0);rpc=$(null);submit=Fv({source:this.formId,computation:()=>null});payload=Fv({source:this.formId,computation:()=>null});failed=Fv({source:this.formId,computation:()=>!1});message=j(``);attempt=j(0);constructor(){dc(()=>{let e=this.formId();this.version(),this.attempt();let t=this.rpc();t&&Nv(async()=>{let[n,r]=await Promise.all([CE(t,`forms-explain`,{kind:`submit`,form:e}),CE(t,`forms-explain`,{kind:`payload`,form:e})]);if(this.formId()===e){if(n===null||r===null){this.failed.set(!0);return}this.failed.set(!1),this.submit.set(AE(n)),this.payload.set(AE(r))}})})}retry(){this.failed.set(!1),this.attempt.update(e=>e+1)}async copyFixture(){let e=(await CE(this.rpc(),`forms-explain`,{kind:`fixture`,form:this.formId()})??``).match(/```ts\n([\s\S]*)```\s*$/)?.[1];if(!e){this.message.set(`No test fixture is available for this form.`);return}try{await navigator.clipboard.writeText(e),this.message.set(`Copied.`)}catch{this.message.set(`Clipboard is not available here.`)}}static ɵfac=function(t){return new(t||e)};static ɵcmp=Wh({type:e,selectors:[[`app-forms-submit`]],inputs:{formId:[1,`formId`],version:[1,`version`],rpc:[1,`rpc`]},decls:7,vars:2,consts:[[`role`,`alert`,1,`empty-state`],[1,`fixture`],[`type`,`button`,1,`small`,3,`click`],[`role`,`status`,1,`status`],[1,`empty-title`],[`aria-labelledby`,`forms-submit-title`,1,`block`],[`id`,`forms-submit-title`,1,`section-label`],[1,`explain`],[`aria-labelledby`,`forms-payload-title`,1,`block`],[`id`,`forms-payload-title`,1,`section-label`]],template:function(e,t){e&1&&(P(0,Tz,7,0,`div`,0)(1,Ez,10,4),H(2,`div`,1)(3,`button`,2),n_(`click`,function(){return t.copyFixture()}),J(4,`Copy test fixture`),U(),H(5,`span`,3),J(6),U()()),e&2&&(F(+!t.failed()),M(6),Y(t.message()))},styles:[`.muted[_ngcontent-%COMP%] {
   color: var(--%NS%text-2);
 }
 
@@ -7652,7 +7926,7 @@ code[_ngcontent-%COMP%] {
   flex-wrap: wrap;
   gap: 8px 12px;
   align-items: center;
-}`]})},rz=class e{formId=$.required();version=$(0);rpc=$(null);showField=Iv();findings=Nv({source:this.formId,computation:()=>null});failed=Nv({source:this.formId,computation:()=>!1});attempt=j(0);constructor(){dc(()=>{let e=this.formId();this.version(),this.attempt();let t=this.rpc();t&&jv(async()=>{let n=await xE(t,`forms-lint`,{form:e});this.formId()===e&&(this.failed.set(n===null),n&&this.findings.set(n))})})}retry(){this.failed.set(!1),this.attempt.update(e=>e+1)}static ɵfac=function(t){return new(t||e)};static ɵcmp=Wh({type:e,selectors:[[`app-forms-lint`]],inputs:{formId:[1,`formId`],version:[1,`version`],rpc:[1,`rpc`]},outputs:{showField:`showField`},decls:4,vars:1,consts:[[`role`,`alert`,1,`empty-state`],[`role`,`status`,1,`empty-state`],[1,`empty-state`],[1,`empty-title`],[`type`,`button`,1,`small`,3,`click`],[`aria-hidden`,`true`,1,`spinner`],[`aria-hidden`,`true`,1,`ok-icon`],[`width`,`16`,`height`,`16`,`viewBox`,`0 0 24 24`,`fill`,`none`,`stroke`,`currentColor`,`stroke-width`,`2.5`,`stroke-linecap`,`round`,`stroke-linejoin`,`round`],[`d`,`M20 6 9 17l-5-5`],[1,`summary`],[1,`tabular`],[1,`findings`],[1,`meta`],[1,`tag`,`severity`],[1,`rule`],[1,`muted`,`path`],[1,`message`],[1,`fix`],[1,`fix-label`],[`type`,`button`,1,`summary-link`,3,`click`],[1,`sr-only`]],template:function(e,t){e&1&&P(0,XR,7,0,`div`,0)(1,ZR,4,0,`div`,1)(2,QR,8,0,`div`,2)(3,tz,7,2),e&2&&F(t.failed()?0:t.findings()===null?1:t.findings().length?3:2)},styles:[`.muted[_ngcontent-%COMP%] {
+}`]})},Pz=class e{formId=$.required();version=$(0);rpc=$(null);showField=Rv();findings=Fv({source:this.formId,computation:()=>null});failed=Fv({source:this.formId,computation:()=>!1});attempt=j(0);constructor(){dc(()=>{let e=this.formId();this.version(),this.attempt();let t=this.rpc();t&&Nv(async()=>{let n=await CE(t,`forms-lint`,{form:e});this.formId()===e&&(this.failed.set(n===null),n&&this.findings.set(n))})})}retry(){this.failed.set(!1),this.attempt.update(e=>e+1)}static ɵfac=function(t){return new(t||e)};static ɵcmp=Wh({type:e,selectors:[[`app-forms-lint`]],inputs:{formId:[1,`formId`],version:[1,`version`],rpc:[1,`rpc`]},outputs:{showField:`showField`},decls:4,vars:1,consts:[[`role`,`alert`,1,`empty-state`],[`role`,`status`,1,`empty-state`],[1,`empty-state`],[1,`empty-title`],[`type`,`button`,1,`small`,3,`click`],[`aria-hidden`,`true`,1,`spinner`],[`aria-hidden`,`true`,1,`ok-icon`],[`width`,`16`,`height`,`16`,`viewBox`,`0 0 24 24`,`fill`,`none`,`stroke`,`currentColor`,`stroke-width`,`2.5`,`stroke-linecap`,`round`,`stroke-linejoin`,`round`],[`d`,`M20 6 9 17l-5-5`],[1,`summary`],[1,`tabular`],[1,`findings`],[1,`meta`],[1,`tag`,`severity`],[1,`rule`],[1,`muted`,`path`],[1,`message`],[1,`fix`],[1,`fix-label`],[`type`,`button`,1,`summary-link`,3,`click`],[1,`sr-only`]],template:function(e,t){e&1&&P(0,Dz,7,0,`div`,0)(1,Oz,4,0,`div`,1)(2,kz,8,0,`div`,2)(3,Mz,7,2),e&2&&F(t.failed()?0:t.findings()===null?1:t.findings().length?3:2)},styles:[`.muted[_ngcontent-%COMP%] {
   color: var(--%NS%text-2);
 }
 
@@ -8008,7 +8282,7 @@ code[_ngcontent-%COMP%] {
   font-weight: 600;
   letter-spacing: 0.06em;
   text-transform: uppercase;
-}`]})},iz=[`pathInput`],az=()=>[],oz=(e,t)=>t.formId+`#`+t.seq;function sz(e,t){e&1&&V(0,`span`,6)}function cz(e,t){if(e&1){let e=W();z(0,`label`)(1,`input`,21),G(`change`,function(){let t=O(e).$implicit;return k(K().filter.set(t))}),B(),J(2),B()}if(e&2){let e=t.$implicit,n=K();M(),R(`value`,e)(`checked`,e===n.filter()),M(),X(` `,e,` `)}}function lz(e,t){if(e&1&&(z(0,`span`,26),J(1),B()),e&2){let e=K().$implicit;N(`data-tone`,e.outcome===`ran`?``:`bad`),M(),Y(e.outcome)}}function uz(e,t){if(e&1&&(z(0,`span`,26),J(1),B()),e&2){let e=K().$implicit;M(),X(`×`,e.count)}}function dz(e,t){if(e&1&&(z(0,`span`,26),J(1),B()),e&2){let e=K().$implicit;M(),Y(e.origin)}}function fz(e,t){if(e&1&&(z(0,`span`,26),J(1),B()),e&2){let e=K().$implicit;N(`data-tone`,e.ms>1e3?`warn`:``),M(),X(`pending `,e.ms,`ms`)}}function pz(e,t){if(e&1&&(z(0,`span`,26),J(1),B()),e&2){let e=K().$implicit;N(`data-tone`,e.renders>20?`warn`:``),M(),Z(``,e.renders,` renders: `,(e.rendered??mv(3,az)).join(`, `))}}function mz(e,t){if(e&1&&(z(0,`span`,29),J(1),B(),z(2,`span`,30),J(3,`→`),B(),z(4,`span`,9),J(5,`changed to`),B()),e&2){let e=K(2).$implicit;M(),Y(e.prev)}}function hz(e,t){if(e&1&&(z(0,`div`,27),P(1,mz,6,1),J(2),B()),e&2){let e=K().$implicit;M(),F(e.prev===void 0?-1:1),M(),X(` `,e.detail,` `)}}function gz(e,t){if(e&1&&(z(0,`span`,28),J(1),B()),e&2){let e=K().$implicit;M(),X(`from `,e.caller)}}function _z(e,t){if(e&1&&(z(0,`li`)(1,`time`),J(2),B(),z(3,`div`,22)(4,`div`,23)(5,`code`,24),J(6),B(),z(7,`span`,25),J(8),B(),P(9,lz,2,2,`span`,26),P(10,uz,2,1,`span`,26),P(11,dz,2,1,`span`,26),P(12,fz,2,2,`span`,26),P(13,pz,2,4,`span`,26),B(),P(14,hz,3,2,`div`,27),P(15,gz,2,1,`span`,28),B()()),e&2){let e=t.$implicit,n=K(2);N(`data-type`,e.type),M(),N(`datetime`,n.iso(e.timestamp)),M(),Y(n.time(e.timestamp)),M(4),Y(e.path||`(form)`),M(2),Y(e.type),M(),F(e.outcome?9:-1),M(),F(e.count&&e.count>1?10:-1),M(),F(e.origin?11:-1),M(),F(e.ms===void 0?-1:12),M(),F(e.renders?13:-1),M(),F(e.prev!==void 0||e.detail?14:-1),M(),F(e.caller?15:-1)}}function vz(e,t){if(e&1&&(z(0,`ol`,19),I(1,_z,16,12,`li`,null,oz),B()),e&2){let e=K();M(),L(e.shown())}}function yz(e,t){if(e&1){let e=W();z(0,`div`,20)(1,`p`,31),J(2,`No events match these filters`),B(),z(3,`p`),J(4,`Change the path, type or origin, or interact with the form to record more.`),B(),z(5,`button`,32),G(`click`,function(){return O(e),k(K().clearFilters())}),J(6,`Clear filters`),B()()}}function bz(e,t){e&1&&(z(0,`div`,20)(1,`p`,31),J(2,`No changes yet`),B(),z(3,`p`),J(4,`Type into the form to see them here.`),B()())}var xz=[`all`,`user`,`code`,`agent`,`devtools`],Sz=[`value`,`status`,`touched`,`dirty`,`submit`,`reset`,`added`,`removed`,`moved`,`validators`],Cz=class e{events=$.required();recording=$(!1);record=Iv();toggle(e){let t=e.target;t.checked=this.recording(),this.record.emit(!this.recording())}origins=xz;filter=j(`all`);pathFilter=j(``);typeFilter=j(`all`);pathInput=Kv(`pathInput`);typeOptions=Q(()=>{let e=new Set(this.events().map(e=>e.type)),t=this.typeFilter();t&&t!==`all`&&e.add(t);let n=Sz.filter(t=>e.has(t)),r=[...e].filter(e=>!Sz.includes(e)).sort();return[{value:`all`,label:`All types`},...[...n,...r].map(e=>({value:e,label:e}))]});matching=Q(()=>{let e=this.filter(),t=this.typeFilter()??`all`,n=this.pathFilter().trim().toLowerCase();return this.events().filter(r=>(e===`all`||r.origin===e)&&(t===`all`||r.type===t)&&(!n||r.path.toLowerCase().includes(n)))});shown=Q(()=>this.matching().slice(-100).reverse());filtered=Q(()=>this.filter()!==`all`||(this.typeFilter()??`all`)!==`all`||!!this.pathFilter().trim());summary=Q(()=>{let e=this.events().length,t=this.matching().length,n=e=>e===1?`event`:`events`,r=this.filtered()?` matching ${n(t)}`:` ${n(t)}`;return t>100?`Showing the latest 100 of ${t}${r}`:this.filtered()?`${t} of ${e} ${n(e)}`:`${e} ${n(e)}`});filterStatus=Q(()=>(this.filter(),this.typeFilter(),this.pathFilter(),jv(()=>this.summary())));clearFilters(){this.pathFilter.set(``),this.typeFilter.set(`all`),this.filter.set(`all`),this.pathInput()?.nativeElement.focus()}iso(e){return new Date(e).toISOString()}time=$D;static ɵfac=function(t){return new(t||e)};static ɵcmp=Wh({type:e,selectors:[[`app-forms-timeline`]],viewQuery:function(e,t){e&1&&c_(t.pathInput,iz,5),e&2&&l_()},inputs:{events:[1,`events`],recording:[1,`recording`]},outputs:{record:`record`},decls:29,vars:10,consts:[[`pathInput`,``],[1,`toolbar`],[1,`record`],[`type`,`checkbox`,3,`change`,`checked`],[1,`record-text`],[1,`record-title`],[`aria-hidden`,`true`,1,`rec-dot`],[1,`record-hint`],[1,`chips`],[1,`sr-only`],[1,`filters`],[1,`search`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`,1,`search-icon`],[`cx`,`11`,`cy`,`11`,`r`,`7`],[`d`,`m20 20-3.5-3.5`],[`type`,`search`,`placeholder`,`Filter by field path…`,`aria-label`,`Filter by field path`,`autocomplete`,`off`,`spellcheck`,`false`,3,`input`,`keydown.escape`,`value`],[`ariaLabel`,`Event type`,3,`valueChange`,`options`,`value`],[1,`total`],[`role`,`status`,1,`sr-only`],[1,`events`],[1,`empty-state`],[`type`,`radio`,`name`,`timeline-origin`,3,`change`,`value`,`checked`],[1,`body`],[1,`line`],[1,`path`],[1,`event-type`],[1,`tag`],[1,`detail`],[1,`caller`],[1,`prev`],[`aria-hidden`,`true`,1,`arrow`],[1,`empty-title`],[`type`,`button`,1,`small`,3,`click`]],template:function(e,t){if(e&1){let e=W();z(0,`div`,1)(1,`label`,2)(2,`input`,3),G(`change`,function(e){return t.toggle(e)}),B(),z(3,`span`,4)(4,`span`,5),P(5,sz,1,0,`span`,6),J(6,` Record details `),B(),z(7,`span`,7),J(8,`Record calling code, validator changes and renders per keystroke`),B()()(),z(9,`fieldset`,8)(10,`legend`,9),J(11,`Show changes from`),B(),I(12,cz,3,3,`label`,null,Og),B()(),z(14,`div`,10)(15,`div`,11),A(),z(16,`svg`,12),V(17,`circle`,13)(18,`path`,14),B(),ms(),z(19,`input`,15,0),G(`input`,function(e){return t.pathFilter.set(e.target.value)})(`keydown.escape`,function(){return t.pathFilter.set(``)}),B()(),z(21,`app-select`,16),cv(`valueChange`,function(n){return O(e),sv(t.typeFilter,n)||(t.typeFilter=n),k(n)}),B(),z(22,`span`,17),J(23),B(),z(24,`span`,18),J(25),B()(),P(26,vz,3,0,`ol`,19)(27,yz,7,0,`div`,20)(28,bz,5,0,`div`,20)}e&2&&(M(),q(`on`,t.recording()),M(),R(`checked`,t.recording()),M(3),F(t.recording()?5:-1),M(7),L(t.origins),M(7),R(`value`,t.pathFilter()),M(2),R(`options`,t.typeOptions()),ov(`value`,t.typeFilter),M(2),Y(t.summary()),M(2),Y(t.filterStatus()),M(),F(t.shown().length?26:t.events().length?27:28))},dependencies:[GD],styles:[`.muted[_ngcontent-%COMP%] {
+}`]})},Fz=[`pathInput`],Iz=()=>[],Lz=(e,t)=>t.formId+`#`+t.seq;function Rz(e,t){e&1&&V(0,`span`,6)}function zz(e,t){if(e&1){let e=W();z(0,`label`)(1,`input`,21),G(`change`,function(){let t=O(e).$implicit;return k(K().filter.set(t))}),B(),J(2),B()}if(e&2){let e=t.$implicit,n=K();M(),R(`value`,e)(`checked`,e===n.filter()),M(),X(` `,e,` `)}}function Bz(e,t){if(e&1&&(z(0,`span`,26),J(1),B()),e&2){let e=K().$implicit;N(`data-tone`,e.outcome===`ran`?``:`bad`),M(),Y(e.outcome)}}function Vz(e,t){if(e&1&&(z(0,`span`,26),J(1),B()),e&2){let e=K().$implicit;M(),X(`×`,e.count)}}function Hz(e,t){if(e&1&&(z(0,`span`,26),J(1),B()),e&2){let e=K().$implicit;M(),Y(e.origin)}}function Uz(e,t){if(e&1&&(z(0,`span`,26),J(1),B()),e&2){let e=K().$implicit;N(`data-tone`,e.ms>1e3?`warn`:``),M(),X(`pending `,e.ms,`ms`)}}function Wz(e,t){if(e&1&&(z(0,`span`,26),J(1),B()),e&2){let e=K().$implicit;N(`data-tone`,e.renders>20?`warn`:``),M(),Z(``,e.renders,` renders: `,(e.rendered??mv(3,Iz)).join(`, `))}}function Gz(e,t){if(e&1&&(z(0,`span`,29),J(1),B(),z(2,`span`,30),J(3,`→`),B(),z(4,`span`,9),J(5,`changed to`),B()),e&2){let e=K(2).$implicit;M(),Y(e.prev)}}function Kz(e,t){if(e&1&&(z(0,`div`,27),P(1,Gz,6,1),J(2),B()),e&2){let e=K().$implicit;M(),F(e.prev===void 0?-1:1),M(),X(` `,e.detail,` `)}}function qz(e,t){if(e&1&&(z(0,`span`,28),J(1),B()),e&2){let e=K().$implicit;M(),X(`from `,e.caller)}}function Jz(e,t){if(e&1&&(z(0,`li`)(1,`time`),J(2),B(),z(3,`div`,22)(4,`div`,23)(5,`code`,24),J(6),B(),z(7,`span`,25),J(8),B(),P(9,Bz,2,2,`span`,26),P(10,Vz,2,1,`span`,26),P(11,Hz,2,1,`span`,26),P(12,Uz,2,2,`span`,26),P(13,Wz,2,4,`span`,26),B(),P(14,Kz,3,2,`div`,27),P(15,qz,2,1,`span`,28),B()()),e&2){let e=t.$implicit,n=K(2);N(`data-type`,e.type),M(),N(`datetime`,n.iso(e.timestamp)),M(),Y(n.time(e.timestamp)),M(4),Y(e.path||`(form)`),M(2),Y(e.type),M(),F(e.outcome?9:-1),M(),F(e.count&&e.count>1?10:-1),M(),F(e.origin?11:-1),M(),F(e.ms===void 0?-1:12),M(),F(e.renders?13:-1),M(),F(e.prev!==void 0||e.detail?14:-1),M(),F(e.caller?15:-1)}}function Yz(e,t){if(e&1&&(z(0,`ol`,19),I(1,Jz,16,12,`li`,null,Lz),B()),e&2){let e=K();M(),L(e.shown())}}function Xz(e,t){if(e&1){let e=W();z(0,`div`,20)(1,`p`,31),J(2,`No events match these filters`),B(),z(3,`p`),J(4,`Change the path, type or origin, or interact with the form to record more.`),B(),z(5,`button`,32),G(`click`,function(){return O(e),k(K().clearFilters())}),J(6,`Clear filters`),B()()}}function Zz(e,t){e&1&&(z(0,`div`,20)(1,`p`,31),J(2,`No changes yet`),B(),z(3,`p`),J(4,`Type into the form to see them here.`),B()())}var Qz=[`all`,`user`,`code`,`agent`,`devtools`],$z=[`value`,`status`,`touched`,`dirty`,`submit`,`reset`,`added`,`removed`,`moved`,`validators`],eB=class e{events=$.required();recording=$(!1);record=Rv();toggle(e){let t=e.target;t.checked=this.recording(),this.record.emit(!this.recording())}origins=Qz;filter=j(`all`);pathFilter=j(``);typeFilter=j(`all`);pathInput=Jv(`pathInput`);typeOptions=Q(()=>{let e=new Set(this.events().map(e=>e.type)),t=this.typeFilter();t&&t!==`all`&&e.add(t);let n=$z.filter(t=>e.has(t)),r=[...e].filter(e=>!$z.includes(e)).sort();return[{value:`all`,label:`All types`},...[...n,...r].map(e=>({value:e,label:e}))]});matching=Q(()=>{let e=this.filter(),t=this.typeFilter()??`all`,n=this.pathFilter().trim().toLowerCase();return this.events().filter(r=>(e===`all`||r.origin===e)&&(t===`all`||r.type===t)&&(!n||r.path.toLowerCase().includes(n)))});shown=Q(()=>this.matching().slice(-100).reverse());filtered=Q(()=>this.filter()!==`all`||(this.typeFilter()??`all`)!==`all`||!!this.pathFilter().trim());summary=Q(()=>{let e=this.events().length,t=this.matching().length,n=e=>e===1?`event`:`events`,r=this.filtered()?` matching ${n(t)}`:` ${n(t)}`;return t>100?`Showing the latest 100 of ${t}${r}`:this.filtered()?`${t} of ${e} ${n(e)}`:`${e} ${n(e)}`});filterStatus=Q(()=>(this.filter(),this.typeFilter(),this.pathFilter(),Nv(()=>this.summary())));clearFilters(){this.pathFilter.set(``),this.typeFilter.set(`all`),this.filter.set(`all`),this.pathInput()?.nativeElement.focus()}iso(e){return new Date(e).toISOString()}time=tO;static ɵfac=function(t){return new(t||e)};static ɵcmp=Wh({type:e,selectors:[[`app-forms-timeline`]],viewQuery:function(e,t){e&1&&c_(t.pathInput,Fz,5),e&2&&l_()},inputs:{events:[1,`events`],recording:[1,`recording`]},outputs:{record:`record`},decls:29,vars:10,consts:[[`pathInput`,``],[1,`toolbar`],[1,`record`],[`type`,`checkbox`,3,`change`,`checked`],[1,`record-text`],[1,`record-title`],[`aria-hidden`,`true`,1,`rec-dot`],[1,`record-hint`],[1,`chips`],[1,`sr-only`],[1,`filters`],[1,`search`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`,1,`search-icon`],[`cx`,`11`,`cy`,`11`,`r`,`7`],[`d`,`m20 20-3.5-3.5`],[`type`,`search`,`placeholder`,`Filter by field path…`,`aria-label`,`Filter by field path`,`autocomplete`,`off`,`spellcheck`,`false`,3,`input`,`keydown.escape`,`value`],[`ariaLabel`,`Event type`,3,`valueChange`,`options`,`value`],[1,`total`],[`role`,`status`,1,`sr-only`],[1,`events`],[1,`empty-state`],[`type`,`radio`,`name`,`timeline-origin`,3,`change`,`value`,`checked`],[1,`body`],[1,`line`],[1,`path`],[1,`event-type`],[1,`tag`],[1,`detail`],[1,`caller`],[1,`prev`],[`aria-hidden`,`true`,1,`arrow`],[1,`empty-title`],[`type`,`button`,1,`small`,3,`click`]],template:function(e,t){if(e&1){let e=W();z(0,`div`,1)(1,`label`,2)(2,`input`,3),G(`change`,function(e){return t.toggle(e)}),B(),z(3,`span`,4)(4,`span`,5),P(5,Rz,1,0,`span`,6),J(6,` Record details `),B(),z(7,`span`,7),J(8,`Record calling code, validator changes and renders per keystroke`),B()()(),z(9,`fieldset`,8)(10,`legend`,9),J(11,`Show changes from`),B(),I(12,zz,3,3,`label`,null,Og),B()(),z(14,`div`,10)(15,`div`,11),A(),z(16,`svg`,12),V(17,`circle`,13)(18,`path`,14),B(),ms(),z(19,`input`,15,0),G(`input`,function(e){return t.pathFilter.set(e.target.value)})(`keydown.escape`,function(){return t.pathFilter.set(``)}),B()(),z(21,`app-select`,16),cv(`valueChange`,function(n){return O(e),sv(t.typeFilter,n)||(t.typeFilter=n),k(n)}),B(),z(22,`span`,17),J(23),B(),z(24,`span`,18),J(25),B()(),P(26,Yz,3,0,`ol`,19)(27,Xz,7,0,`div`,20)(28,Zz,5,0,`div`,20)}e&2&&(M(),q(`on`,t.recording()),M(),R(`checked`,t.recording()),M(3),F(t.recording()?5:-1),M(7),L(t.origins),M(7),R(`value`,t.pathFilter()),M(2),R(`options`,t.typeOptions()),ov(`value`,t.typeFilter),M(2),Y(t.summary()),M(2),Y(t.filterStatus()),M(),F(t.shown().length?26:t.events().length?27:28))},dependencies:[qD],styles:[`.muted[_ngcontent-%COMP%] {
   color: var(--%NS%text-2);
 }
 
@@ -8601,7 +8875,7 @@ time[_ngcontent-%COMP%] {
     justify-content: center;
     padding: 0 8px;
   }
-}`]})},wz=(e,t)=>t.path;function Tz(e,t){e&1&&(H(0,`span`,6),J(1,`duplicate name`),U())}function Ez(e,t){if(e&1&&(H(0,`p`,7),J(1),U()),e&2){let e=K();M(),Y(e.description)}}function Dz(e,t){if(e&1&&(H(0,`p`,8),J(1),U()),e&2){let e=K();M(),Y(e.error)}}function Oz(e,t){if(e&1&&(H(0,`li`)(1,`code`),J(2),U(),J(3),U()),e&2){let e=t.$implicit;M(2),Y(e.path),M(),X(` is `,e.reason,` `)}}function kz(e,t){if(e&1&&(H(0,`div`,9)(1,`p`,10),J(2,`Angular could not infer an input schema. These fields block it:`),U(),H(3,`ul`),I(4,Oz,4,2,`li`,null,wz),U()()),e&2){let e=K();M(4),L(e.blocking)}}function Az(e,t){e&1&&(H(0,`span`,12),J(1,`required`),U())}function jz(e,t){if(e&1&&(H(0,`li`)(1,`code`),J(2),U(),P(3,Az,2,0,`span`,12),U()),e&2){let e=t.$implicit,n=K(3);M(2),Y(e),M(),F(n.isRequired(e)?3:-1)}}function Mz(e,t){if(e&1&&(H(0,`div`,9)(1,`p`,10),J(2,`Inputs`),U(),H(3,`ul`,11),I(4,jz,4,2,`li`,null,Og),U()()),e&2){let e=K();M(4),L(e.inputs)}}function Nz(e,t){if(e&1&&(H(0,`li`)(1,`code`),J(2),U(),J(3),U()),e&2){let e=t.$implicit;M(2),Y(e.path),M(),X(` is now `,e.now?`required`:`optional`,` `)}}function Pz(e,t){if(e&1&&(H(0,`div`,9)(1,`p`,10),J(2,` Required changed since registration. Angular reads it once, so agents still see the old schema: `),U(),H(3,`ul`),I(4,Nz,4,2,`li`,null,wz),U()()),e&2){let e=K();M(4),L(e.requiredChanged)}}function Fz(e,t){if(e&1&&(H(0,`span`,10),J(1),U()),e&2){let e=K().$implicit;M(),X(``,e.ms,` ms`)}}function Iz(e,t){if(e&1&&(H(0,`span`,10),J(1),U()),e&2){let e=K().$implicit;M(),X(`fields `,e.fields.join(`, `))}}function Lz(e,t){if(e&1&&(H(0,`pre`,13),J(1),U()),e&2){let e=K().$implicit;M(),Y(e.detail)}}function Rz(e,t){if(e&1&&(H(0,`li`)(1,`time`),J(2),yv(3,`date`),U(),H(4,`span`,5),J(5),U(),P(6,Fz,2,1,`span`,10),P(7,Iz,2,1,`span`,10),P(8,Lz,2,1,`pre`,13),U()),e&2){let e=t.$implicit,n=K(3);M(),N(`datetime`,n.iso(e.at)),M(),Y(Sv(3,7,e.at,`HH:mm:ss`)),M(2),N(`data-state`,e.outcome),M(),Y(n.outcome(e.outcome)),M(),F(e.ms===void 0?-1:6),M(),F(e.fields?.length?7:-1),M(),F(e.detail?8:-1)}}function zz(e,t){if(e&1&&(H(0,`ul`),I(1,Rz,9,10,`li`,null,Dg),U()),e&2){let e=K();M(),L(e.calls)}}function Bz(e,t){e&1&&(H(0,`p`,10),J(1,` Calls are not recorded for a tool registered before the inspector attached. `),U())}function Vz(e,t){e&1&&(H(0,`p`,10),J(1,`No agent has called this tool since the inspector attached.`),U())}function Hz(e,t){if(e&1&&(H(0,`section`,0)(1,`div`,2)(2,`h3`,3),J(3,`WebMCP tool`),U(),H(4,`code`,4),J(5),U(),H(6,`span`,5),J(7),U(),P(8,Tz,2,0,`span`,6),U(),P(9,Ez,2,1,`p`,7),P(10,Dz,2,1,`p`,8),P(11,kz,6,0,`div`,9),P(12,Mz,6,0,`div`,9),P(13,Pz,6,0,`div`,9),H(14,`div`,9)(15,`p`,10),J(16,`Recent calls`),U(),P(17,zz,3,0,`ul`)(18,Bz,2,0,`p`,10)(19,Vz,2,0,`p`,10),U()()),e&2){let e=t,n=K();M(5),Y(e.name),M(),N(`data-state`,e.status),M(),Y(n.statusText()),M(),F(e.duplicate?8:-1),M(),F(e.description?9:-1),M(),F(e.status===`failed`&&e.error&&e.error!==`schema`?10:-1),M(),F(e.blocking?.length?11:-1),M(),F(e.inputs?.length?12:-1),M(),F(e.requiredChanged?.length?13:-1),M(4),F(e.calls?.length?17:e.seen===`list`?18:19)}}function Uz(e,t){e&1&&(H(0,`p`,1),J(1,` This app uses `),H(2,`code`),J(3,`provideExperimentalWebMcpForms()`),U(),J(4,`, but the browser has no `),H(5,`code`),J(6,`modelContext`),U(),J(7,`, so Angular registers no WebMCP tool for this form. `),U())}var Wz={running:`running`,submitted:`submitted`,failed:`submit failed`,done:`done`,threw:`threw`},Gz=class e{tool=$();page=$();signalForm=$(!1);statusText=Q(()=>{let e=this.tool();return e?e.status===`failed`?`not registered`:e.status===`registering`?`registering`:e.seen===`list`?`registered before the inspector attached`:`registered`:``});noModelContext=Q(()=>{let e=this.page();return this.signalForm()&&!!e&&!e.modelContext&&!!e.provided});isRequired(e){let t=e.slice(0,e.lastIndexOf(`:`));return this.tool()?.required?.includes(t)??!1}outcome(e){return Wz[e]??e}iso(e){return new Date(e).toISOString()}static ɵfac=function(t){return new(t||e)};static ɵcmp=Wh({type:e,selectors:[[`app-forms-webmcp`]],inputs:{tool:[1,`tool`],page:[1,`page`],signalForm:[1,`signalForm`]},decls:2,vars:1,consts:[[`aria-labelledby`,`forms-webmcp-title`,1,`webmcp`],[1,`note`],[1,`head`],[`id`,`forms-webmcp-title`,1,`section-label`],[1,`name`],[1,`state`],[`data-state`,`failed`,1,`state`],[1,`description`],[1,`problem`],[1,`group`],[1,`muted`],[1,`inputs`],[1,`tag`],[1,`detail`]],template:function(e,t){if(e&1&&P(0,Hz,20,10,`section`,0)(1,Uz,8,0,`p`,1),e&2){let e;F((e=t.tool())?0:t.noModelContext()?1:-1,e)}},dependencies:[fb],styles:[`[_nghost-%COMP%] {
+}`]})},tB=(e,t)=>t.path;function nB(e,t){e&1&&(H(0,`span`,6),J(1,`duplicate name`),U())}function rB(e,t){if(e&1&&(H(0,`p`,7),J(1),U()),e&2){let e=K();M(),Y(e.description)}}function iB(e,t){if(e&1&&(H(0,`p`,8),J(1),U()),e&2){let e=K();M(),Y(e.error)}}function aB(e,t){if(e&1&&(H(0,`li`)(1,`code`),J(2),U(),J(3),U()),e&2){let e=t.$implicit;M(2),Y(e.path),M(),X(` is `,e.reason,` `)}}function oB(e,t){if(e&1&&(H(0,`div`,9)(1,`p`,10),J(2,`Angular could not infer an input schema. These fields block it:`),U(),H(3,`ul`),I(4,aB,4,2,`li`,null,tB),U()()),e&2){let e=K();M(4),L(e.blocking)}}function sB(e,t){e&1&&(H(0,`span`,12),J(1,`required`),U())}function cB(e,t){if(e&1&&(H(0,`li`)(1,`code`),J(2),U(),P(3,sB,2,0,`span`,12),U()),e&2){let e=t.$implicit,n=K(3);M(2),Y(e),M(),F(n.isRequired(e)?3:-1)}}function lB(e,t){if(e&1&&(H(0,`div`,9)(1,`p`,10),J(2,`Inputs`),U(),H(3,`ul`,11),I(4,cB,4,2,`li`,null,Og),U()()),e&2){let e=K();M(4),L(e.inputs)}}function uB(e,t){if(e&1&&(H(0,`li`)(1,`code`),J(2),U(),J(3),U()),e&2){let e=t.$implicit;M(2),Y(e.path),M(),X(` is now `,e.now?`required`:`optional`,` `)}}function dB(e,t){if(e&1&&(H(0,`div`,9)(1,`p`,10),J(2,` Required changed since registration. Angular reads it once, so agents still see the old schema: `),U(),H(3,`ul`),I(4,uB,4,2,`li`,null,tB),U()()),e&2){let e=K();M(4),L(e.requiredChanged)}}function fB(e,t){if(e&1&&(H(0,`span`,10),J(1),U()),e&2){let e=K().$implicit;M(),X(``,e.ms,` ms`)}}function pB(e,t){if(e&1&&(H(0,`span`,10),J(1),U()),e&2){let e=K().$implicit;M(),X(`fields `,e.fields.join(`, `))}}function mB(e,t){if(e&1&&(H(0,`pre`,13),J(1),U()),e&2){let e=K().$implicit;M(),Y(e.detail)}}function hB(e,t){if(e&1&&(H(0,`li`)(1,`time`),J(2),xv(3,`date`),U(),H(4,`span`,5),J(5),U(),P(6,fB,2,1,`span`,10),P(7,pB,2,1,`span`,10),P(8,mB,2,1,`pre`,13),U()),e&2){let e=t.$implicit,n=K(3);M(),N(`datetime`,n.iso(e.at)),M(),Y(wv(3,7,e.at,`HH:mm:ss`)),M(2),N(`data-state`,e.outcome),M(),Y(n.outcome(e.outcome)),M(),F(e.ms===void 0?-1:6),M(),F(e.fields?.length?7:-1),M(),F(e.detail?8:-1)}}function gB(e,t){if(e&1&&(H(0,`ul`),I(1,hB,9,10,`li`,null,Dg),U()),e&2){let e=K();M(),L(e.calls)}}function _B(e,t){e&1&&(H(0,`p`,10),J(1,` Calls are not recorded for a tool registered before the inspector attached. `),U())}function vB(e,t){e&1&&(H(0,`p`,10),J(1,`No agent has called this tool since the inspector attached.`),U())}function yB(e,t){if(e&1&&(H(0,`section`,0)(1,`div`,2)(2,`h3`,3),J(3,`WebMCP tool`),U(),H(4,`code`,4),J(5),U(),H(6,`span`,5),J(7),U(),P(8,nB,2,0,`span`,6),U(),P(9,rB,2,1,`p`,7),P(10,iB,2,1,`p`,8),P(11,oB,6,0,`div`,9),P(12,lB,6,0,`div`,9),P(13,dB,6,0,`div`,9),H(14,`div`,9)(15,`p`,10),J(16,`Recent calls`),U(),P(17,gB,3,0,`ul`)(18,_B,2,0,`p`,10)(19,vB,2,0,`p`,10),U()()),e&2){let e=t,n=K();M(5),Y(e.name),M(),N(`data-state`,e.status),M(),Y(n.statusText()),M(),F(e.duplicate?8:-1),M(),F(e.description?9:-1),M(),F(e.status===`failed`&&e.error&&e.error!==`schema`?10:-1),M(),F(e.blocking?.length?11:-1),M(),F(e.inputs?.length?12:-1),M(),F(e.requiredChanged?.length?13:-1),M(4),F(e.calls?.length?17:e.seen===`list`?18:19)}}function bB(e,t){e&1&&(H(0,`p`,1),J(1,` This app uses `),H(2,`code`),J(3,`provideExperimentalWebMcpForms()`),U(),J(4,`, but the browser has no `),H(5,`code`),J(6,`modelContext`),U(),J(7,`, so Angular registers no WebMCP tool for this form. `),U())}var xB={running:`running`,submitted:`submitted`,failed:`submit failed`,done:`done`,threw:`threw`},SB=class e{tool=$();page=$();signalForm=$(!1);statusText=Q(()=>{let e=this.tool();return e?e.status===`failed`?`not registered`:e.status===`registering`?`registering`:e.seen===`list`?`registered before the inspector attached`:`registered`:``});noModelContext=Q(()=>{let e=this.page();return this.signalForm()&&!!e&&!e.modelContext&&!!e.provided});isRequired(e){let t=e.slice(0,e.lastIndexOf(`:`));return this.tool()?.required?.includes(t)??!1}outcome(e){return xB[e]??e}iso(e){return new Date(e).toISOString()}static ɵfac=function(t){return new(t||e)};static ɵcmp=Wh({type:e,selectors:[[`app-forms-webmcp`]],inputs:{tool:[1,`tool`],page:[1,`page`],signalForm:[1,`signalForm`]},decls:2,vars:1,consts:[[`aria-labelledby`,`forms-webmcp-title`,1,`webmcp`],[1,`note`],[1,`head`],[`id`,`forms-webmcp-title`,1,`section-label`],[1,`name`],[1,`state`],[`data-state`,`failed`,1,`state`],[1,`description`],[1,`problem`],[1,`group`],[1,`muted`],[1,`inputs`],[1,`tag`],[1,`detail`]],template:function(e,t){if(e&1&&P(0,yB,20,10,`section`,0)(1,bB,8,0,`p`,1),e&2){let e;F((e=t.tool())?0:t.noModelContext()?1:-1,e)}},dependencies:[mb],styles:[`[_nghost-%COMP%] {
   display: contents;
 }
 
@@ -8721,7 +8995,7 @@ li[_ngcontent-%COMP%]    > *[_ngcontent-%COMP%]    + *[_ngcontent-%COMP%] {
   font-size: 12px;
   white-space: pre-wrap;
   overflow-wrap: anywhere;
-}`]})},Kz=()=>[],qz=(e,t)=>t.id,Jz=(e,t)=>t.node.path;function Yz(e,t){e&1&&(z(0,`div`,1),V(1,`span`,5),z(2,`p`),J(3,`Connecting to the devtools server…`),B()())}function Xz(e,t){if(e&1){let e=W();z(0,`div`,2)(1,`p`,6),J(2,`Could not load forms`),B(),z(3,`p`,7),J(4,` The devtools server did not answer. Check that the app is running, then try again. `),B(),z(5,`button`,8),G(`click`,function(){return O(e),k(K().retry())}),J(6,`Try again`),B()()}}function Zz(e,t){e&1&&(z(0,`div`,1),V(1,`span`,5),z(2,`p`),J(3,`Loading forms…`),B()())}function Qz(e,t){e&1&&(z(0,`div`,3)(1,`p`,6),J(2,`No forms on the page yet`),B(),z(3,`p`,7),J(4,` Open a page that renders a form. Signal Forms, reactive and template-driven forms all show up here, in development builds. `),B()())}function $z(e,t){if(e&1){let e=W();z(0,`div`,3)(1,`p`,6),J(2,`No forms on this page`),B(),z(3,`p`,7),J(4),B(),z(5,`button`,8),G(`click`,function(){return O(e),k(K().allPages.set(!0))}),J(6,` Show forms from all pages `),B()()}if(e&2){let e=K();M(4),Z(` Other connected tabs report `,e.forms().length,` `,e.forms().length===1?`form`:`forms`,`. `)}}function eB(e,t){if(e&1){let e=W();z(0,`label`,12)(1,`input`,16),G(`change`,function(t){return O(e),k(K(2).allPages.set(t.target.checked))}),B(),J(2,` All pages `),B()}if(e&2){let e=K(2);M(),R(`checked`,e.allPages())}}function tB(e,t){e&1&&(z(0,`span`,23),J(1),z(2,`span`,22),J(3,` errors`),B()()),e&2&&(M(),Y(t))}function nB(e,t){if(e&1){let e=W();z(0,`li`)(1,`button`,17),G(`click`,function(){let t=O(e).$implicit;return k(K(2).selectForm(t.id))}),V(2,`span`,18),z(3,`span`,19),J(4),B(),z(5,`span`,20),J(6),z(7,`span`,21),J(8),B(),z(9,`span`,22),J(10),B()(),P(11,tB,4,1,`span`,23),B()()}if(e&2){let e,n=t.$implicit,r=K(2);M(),q(`active`,n.id===r.selected()?.id),N(`aria-current`,n.id===r.selected()?.id?`true`:null),M(),N(`data-status`,n.root.status),M(),N(`title`,n.label),M(),Y(n.label),M(2),X(``,r.kindLabel(n.kind),` · `),M(2),Y(n.id),M(2),X(`, `,n.root.status),M(),F((e=r.counts().get(n.id)?.errors)?11:-1,e)}}function rB(e,t){if(e&1){let e=W();z(0,`section`,14)(1,`h2`,24),J(2),B(),z(3,`p`,25),J(4,` This form is no longer on the page. It comes back here if the page renders it again. `),B(),z(5,`button`,8),G(`click`,function(){O(e);let t=K(2);return k(t.selectForm(t.visible()[0].id))}),J(6),B()()}if(e&2){let e=K(2);M(2),Y(t),M(4),X(` Show `,e.visible()[0].label,` `)}}function iB(e,t){if(e&1){let e=W();z(0,`section`,14)(1,`h2`,24),J(2),B(),z(3,`p`,7),J(4,`This form is on another page. Tick "All pages" to see it again.`),B(),z(5,`button`,8),G(`click`,function(){return O(e),k(K(2).allPages.set(!0))}),J(6,` Show forms from all pages `),B()()}e&2&&(M(2),Y(t))}function aB(e,t){if(e&1&&(z(0,`span`),J(1),B()),e&2){let e=K();M(),Y(e.submitted?`submitted`:`not submitted`)}}function oB(e,t){e&1&&(z(0,`span`),J(1,`submitting`),B())}function sB(e,t){if(e&1){let e=W();z(0,`li`)(1,`button`,47),G(`click`,function(){let t=O(e).$implicit;return k(K(4).showField(t.path))}),z(2,`span`,22),J(3,`Show field `),B(),z(4,`code`),J(5),B(),z(6,`span`,22),J(7,`:`),B(),J(8),z(9,`code`,48),J(10),B()()()}if(e&2){let e=t.$implicit;M(5),Y(e.path||`(form)`),M(3),X(` `,e.message,` `),M(2),Y(e.kind)}}function cB(e,t){if(e&1&&(z(0,`details`,31)(1,`summary`),J(2),B(),z(3,`ul`),I(4,sB,11,3,`li`,null,Dg),B()()),e&2){let e=K();M(2),X(`Error summary (`,e.errorSummary.length,`)`),M(2),L(e.errorSummary)}}function lB(e,t){if(e&1){let e=W();z(0,`button`,35),G(`click`,function(){return O(e),k(K(3).confirmAct(`restore`))}),J(1),B()}if(e&2){let e=K(3);q(`armed`,e.armed()===`restore`),R(`disabled`,!e.canWrite()),N(`aria-describedby`,e.canWrite()?null:`forms-writes-off`)(`title`,`Restore `+e.snapshot()),M(),X(` `,e.armed()===`restore`?`Confirm restore`:`Restore `+e.snapshot(),` `)}}function uB(e,t){if(e&1&&(z(0,`p`,41),J(1),B()),e&2){let e=K(3);M(),Y(e.writesOff)}}function dB(e,t){if(e&1){let e=W();z(0,`button`,49),G(`click`,function(){let t=O(e).$implicit;return k(K(3).tab_.set(t.id))}),J(1),B()}if(e&2){let e=t.$implicit,n=K(3);R(`id`,`forms-tab-`+e.id),N(`aria-selected`,e.id===n.tab_())(`aria-controls`,`forms-panel-`+e.id)(`tabindex`,e.id===n.tab_()?0:-1),M(),X(` `,e.label,` `)}}function fB(e,t){if(e&1){let e=W();z(0,`label`)(1,`input`,16),G(`change`,function(){let t=O(e).$implicit;return k(K(4).toggleChip(t.id))}),B(),J(2),B()}if(e&2){let e=t.$implicit,n=K(4);M(),R(`checked`,n.active().has(e.id)),M(),X(` `,e.label,` `)}}function pB(e,t){if(e&1&&(z(0,`div`,7),J(1,` typed `),z(2,`code`),J(3),yv(4,`json`),B(),J(5,`, not in the model yet `),B()),e&2){let e=K(2).$implicit;M(3),Y(xv(4,1,e.node.uncommitted))}}function mB(e,t){if(e&1&&(z(0,`div`,7),J(1,` resets to `),z(2,`code`),J(3),yv(4,`json`),B()()),e&2){let e=K(2).$implicit;M(3),Y(xv(4,1,e.node.defaultValue))}}function hB(e,t){if(e&1&&(z(0,`code`),J(1),yv(2,`json`),B(),P(3,pB,6,3,`div`,7),P(4,mB,5,3,`div`,7)),e&2){let e=K().$implicit;M(),Y(xv(2,3,e.node.value)),M(2),F(e.node.uncommitted===void 0?-1:3),M(),F(e.node.defaultValue===void 0?-1:4)}}function gB(e,t){e&1&&(z(0,`span`,7),J(1,`not created yet`),B())}function _B(e,t){if(e&1&&(z(0,`span`,29),J(1),B()),e&2){let e=K().$implicit;N(`data-status`,e.node.status),M(),Y(e.node.status)}}function vB(e,t){e&1&&(z(0,`span`),J(1,`touched`),B())}function yB(e,t){if(e&1&&(z(0,`span`),J(1),B()),e&2){let e=K().$implicit;M(),Y(e.node.changed===!1?`dirty, unchanged`:`dirty`)}}function bB(e,t){if(e&1&&(z(0,`span`),J(1),B()),e&2){let e=K().$implicit;M(),X(`not validated (`,e.node.skipped,`)`)}}function xB(e,t){if(e&1&&(z(0,`span`,65),J(1),B()),e&2){let e=K().$implicit;M(),X(`stale: `,e.node.stale.join(`, `))}}function SB(e,t){e&1&&(z(0,`span`,65),J(1,`view out of sync`),B())}function CB(e,t){if(e&1&&(z(0,`span`),J(1),B()),e&2){let e=K().$implicit,t=K(4);M(),X(`redacted: `,t.redactLabel(e.node.redacted))}}function wB(e,t){e&1&&(z(0,`span`),J(1,`required`),B())}function TB(e,t){e&1&&(z(0,`span`),J(1,`readonly`),B())}function EB(e,t){e&1&&(z(0,`span`),J(1,`hidden`),B())}function DB(e,t){if(e&1&&(z(0,`span`),J(1),B()),e&2){let e=K().$implicit;M(),X(`updates on `,e.node.updateOn)}}function OB(e,t){e&1&&(z(0,`span`),J(1,`debouncing`),B())}function kB(e,t){e&1&&(z(0,`span`),J(1,`validators`),B())}function AB(e,t){e&1&&(z(0,`span`),J(1,`async validator`),B())}function jB(e,t){if(e&1&&(z(0,`span`),J(1),B()),e&2){let e=t.$implicit;M(),Y(e)}}function MB(e,t){if(e&1&&(z(0,`span`),J(1),B()),e&2){let e=K().$implicit;M(),Y(e.node.accessor)}}function NB(e,t){if(e&1&&(z(0,`span`),J(1),B()),e&2){let e=K().$implicit;M(),X(`name `,e.node.name)}}function PB(e,t){if(e&1&&(z(0,`span`),J(1),yv(2,`json`),B()),e&2){let e=t.$implicit;M(),X(`metadata `,xv(2,1,e))}}function FB(e,t){if(e&1&&(z(0,`span`),J(1),B()),e&2){let e=t.$implicit;M(),X(`disabled: `,e)}}function IB(e,t){if(e&1&&(z(0,`span`,68),J(1),B()),e&2){let e=K().$implicit;M(),X(`at `,e.params.path)}}function LB(e,t){if(e&1&&(z(0,`span`,68),J(1),B()),e&2){let e=K().$implicit,t=K(5);M(),Y(t.sourceText(e))}}function RB(e,t){if(e&1&&(z(0,`div`),J(1),z(2,`code`,48),J(3),B(),P(4,IB,2,1,`span`,68),P(5,LB,2,1,`span`,68),B()),e&2){let e=t.$implicit,n=K().$implicit,r=K(4);M(),X(` `,r.errorText(n.node,e),` `),M(2),Y(e.kind),M(),F(e.kind===`standardSchema`&&e.params?.path?4:-1),M(),F(e.source?5:-1)}}function zB(e,t){e&1&&(z(0,`div`,67),J(1,`not shown to the user`),B())}function BB(e,t){if(e&1&&(z(0,`tr`)(1,`td`,69),J(2),B()()),e&2){let e=K().$implicit;M(),j_(`padding-left`,28+e.depth*16,`px`),M(),Z(` `,e.node.truncated,` more fields under `,e.node.path||`the form`,` not shown `)}}function VB(e,t){if(e&1){let e=W();z(0,`tr`,58),G(`mouseenter`,function(){let t=O(e).$implicit,n=K(2);return k(K(2).highlight(n.id,t.node.path))})(`mouseleave`,function(){return O(e),k(K(4).highlight(null,``))}),z(1,`th`,59)(2,`button`,60),G(`focus`,function(){let t=O(e).$implicit,n=K(2);return k(K(2).highlight(n.id,t.node.path))})(`blur`,function(){return O(e),k(K(4).highlight(null,``))})(`click`,function(){let t=O(e).$implicit;return k(K(4).toggleField(t.node.path))}),J(3),B(),z(4,`span`,61),J(5),B()(),z(6,`td`,62),P(7,hB,5,5),B(),z(8,`td`,63),P(9,gB,2,0,`span`,7)(10,_B,2,2,`span`,29),B(),z(11,`td`,64),P(12,vB,2,0,`span`),P(13,yB,2,1,`span`),P(14,bB,2,1,`span`),P(15,xB,2,1,`span`,65),P(16,SB,2,0,`span`,65),P(17,CB,2,1,`span`),P(18,wB,2,0,`span`),P(19,TB,2,0,`span`),P(20,EB,2,0,`span`),P(21,DB,2,1,`span`),P(22,OB,2,0,`span`),P(23,kB,2,0,`span`),P(24,AB,2,0,`span`),I(25,jB,2,1,`span`,null,Og),P(27,MB,2,1,`span`),P(28,NB,2,1,`span`),I(29,PB,3,3,`span`,null,Dg),I(31,FB,2,1,`span`,null,Dg),B(),z(33,`td`,66),I(34,RB,6,4,`div`,null,Dg),P(36,zB,2,0,`div`,67),B()(),P(37,BB,3,4,`tr`)}if(e&2){let e=t.$implicit,n=K(4);q(`invalid`,e.node.errors.length),M(),j_(`padding-left`,12+e.depth*16,`px`),M(),N(`aria-label`,`Show details for `+(e.node.path||`the form`))(`aria-pressed`,e.node.path===n.fieldPath())(`title`,e.node.path||`(form)`),M(),X(` `,e.node.key||`(form)`,` `),M(2),Y(e.node.type),M(2),F(e.node.type===`control`?7:-1),M(2),F(e.node.materialized===!1?9:10),M(3),F(e.node.touched?12:-1),M(),F(e.node.dirty?13:-1),M(),F(e.node.skipped?14:-1),M(),F(e.node.stale?.length?15:-1),M(),F(e.node.dom?.drift===void 0?-1:16),M(),F(e.node.redacted?17:-1),M(),F(e.node.required?18:-1),M(),F(e.node.readonly?19:-1),M(),F(e.node.hidden?20:-1),M(),F(e.node.updateOn?21:-1),M(),F(e.node.debouncing?22:-1),M(),F(e.node.validators?.sync?23:-1),M(),F(e.node.validators?.async?24:-1),M(),L(n.constraintList(e.node)),M(2),F(e.node.accessor?27:-1),M(),F(e.node.name?28:-1),M(),L(e.node.metadata??mv(28,Kz)),M(2),L(e.node.disabledReasons??mv(29,Kz)),M(3),L(e.node.errors),M(2),F(e.node.errors.length&&e.node.dom?.errorShown===!1?36:-1),M(),F(e.node.truncated?37:-1)}}function HB(e,t){e&1&&J(0),e&2&&X(` No field path matches "`,K(5).filter(),`". `)}function UB(e,t){e&1&&J(0,` No field matches the selected filters. `)}function WB(e,t){if(e&1){let e=W();z(0,`button`,8),G(`click`,function(){O(e),K(2);let t=u_(2);return k(K(3).clearFilters(t))}),J(1,` Clear filters `),B()}}function GB(e,t){if(e&1&&(z(0,`tr`)(1,`td`,70)(2,`p`),P(3,HB,1,1)(4,UB,1,0),B(),P(5,WB,2,0,`button`,71),B()()),e&2){let e=K(4);M(3),F(e.filter()?3:4),M(2),F(e.filtering()?5:-1)}}function KB(e,t){if(e&1){let e=W();z(0,`app-forms-field-detail`,72),G(`closed`,function(){return O(e),k(K(4).closeField())}),B()}if(e&2){let e=K(2),n=K(2);R(`form`,e)(`node`,t)(`version`,n.version())(`rpc`,n.rpc())}}function qB(e,t){if(e&1){let e=W();z(0,`div`,50)(1,`input`,51,0),G(`input`,function(t){return O(e),k(K(3).onFilter(t))})(`keydown.escape`,function(){return O(e),k(K(3).filter.set(``))}),B(),z(3,`fieldset`,52)(4,`legend`,22),J(5,`Show only fields that are`),B(),I(6,fB,3,2,`label`,null,qz),B()(),z(8,`p`,53),J(9),B(),z(10,`div`,54)(11,`table`,55)(12,`thead`)(13,`tr`)(14,`th`,56),J(15,`Field`),B(),z(16,`th`,56),J(17,`Value`),B(),z(18,`th`,56),J(19,`Status`),B(),z(20,`th`,56),J(21,`State`),B(),z(22,`th`,56),J(23,`Errors`),B()()(),z(24,`tbody`),I(25,VB,38,30,null,null,Jz,!1,GB,6,2,`tr`),B()()(),P(28,KB,1,4,`app-forms-field-detail`,57)}if(e&2){let e,t=K(3);M(),R(`value`,t.filter()),M(5),L(t.chips),M(3),Y(t.filterStatus()),M(16),L(t.rows()),M(3),F((e=t.selectedNode())?28:-1,e)}}function JB(e,t){if(e&1){let e=W();V(0,`app-limit-note`,73),z(1,`app-forms-timeline`,74),G(`record`,function(t){return O(e),k(K(3).setRecording(t))}),B()}if(e&2){let e=K(3);R(`dropped`,e.droppedEvents())(`max`,e.maxEvents()),M(),R(`events`,e.selectedEvents())(`recording`,e.recording())}}function YB(e,t){if(e&1&&V(0,`app-forms-submit`,46),e&2){let e=K(),t=K(2);R(`formId`,e.id)(`version`,t.version())(`rpc`,t.rpc())}}function XB(e,t){if(e&1){let e=W();z(0,`app-forms-lint`,75),G(`showField`,function(t){return O(e),k(K(3).showField(t))}),B()}if(e&2){let e=K(),t=K(2);R(`formId`,e.id)(`version`,t.version())(`rpc`,t.rpc())}}function ZB(e,t){if(e&1){let e=W();z(0,`section`,15)(1,`div`,26)(2,`h2`,24),J(3),B(),z(4,`p`,27),J(5),z(6,`code`),J(7),B()()(),z(8,`div`,28)(9,`span`,29),J(10),B(),z(11,`span`),J(12),B(),z(13,`span`),J(14),B(),P(15,aB,2,1,`span`),P(16,oB,2,0,`span`),z(17,`span`,30)(18,`b`),J(19),B(),J(20,` fields · `),z(21,`b`),J(22),B(),J(23,` errors`),B()(),P(24,cB,6,1,`details`,31),V(25,`app-forms-webmcp`,32),z(26,`div`,33)(27,`div`,34)(28,`button`,35),G(`click`,function(){return O(e),k(K(2).act(`touch-all`))}),J(29,` Touch all `),B(),z(30,`button`,35),G(`click`,function(){return O(e),k(K(2).act(`revalidate`))}),J(31,` Revalidate `),B(),z(32,`button`,8),G(`click`,function(){return O(e),k(K(2).act(`focus-first-invalid`))}),J(33,` Focus first invalid `),B(),z(34,`button`,8),G(`click`,function(){O(e);let t=K(2);return k(t.picking()?t.cancelPick():t.pick())}),J(35),B(),V(36,`span`,36),z(37,`button`,8),G(`click`,function(){return O(e),k(K(2).act(`snapshot`))}),J(38,`Snapshot`),B(),P(39,lB,2,6,`button`,37),V(40,`span`,38),z(41,`button`,39),G(`click`,function(){return O(e),k(K(2).confirmAct(`reset`))}),J(42),B(),z(43,`button`,40),G(`click`,function(){return O(e),k(K(2).confirmAct(`submit`))}),J(44),B()(),P(45,uB,2,1,`p`,41),z(46,`p`,42),J(47),B()(),z(48,`div`,43),G(`keydown`,function(t){return O(e),k(K(2).onKey(t))}),I(49,dB,2,5,`button`,44,qz),B(),z(51,`div`,45),P(52,qB,29,4)(53,JB,2,4)(54,YB,1,3,`app-forms-submit`,46)(55,XB,1,3,`app-forms-lint`,46),B()()}if(e&2){let e,n=t,r=K(2);M(3),Y(n.label),M(2),X(` `,r.kindLabel(n.kind),` · `),M(2),Y(n.id),M(2),N(`data-status`,n.root.status),M(),Y(n.root.status),M(2),Y(n.root.dirty?`dirty`:`pristine`),M(2),Y(n.root.touched?`touched`:`untouched`),M(),F(n.submitted===void 0?-1:15),M(),F(n.root.submitting?16:-1),M(3),Y(r.counts().get(n.id)?.fields),M(2),q(`has-errors`,r.counts().get(n.id)?.errors),M(),Y(r.counts().get(n.id)?.errors),M(2),F(n.errorSummary?.length?24:-1),M(),R(`tool`,n.webMcp)(`page`,r.webMcpPage(n.id))(`signalForm`,n.kind===`signal`),M(3),R(`disabled`,!r.canWrite()),N(`aria-describedby`,r.canWrite()?null:`forms-writes-off`),M(2),R(`disabled`,!r.canWrite()),N(`aria-describedby`,r.canWrite()?null:`forms-writes-off`),M(4),q(`on`,r.picking()),N(`aria-pressed`,!!r.picking()),M(),X(` `,r.picking()?`Cancel picking`:`Pick field on page`,` `),M(4),F(r.snapshot()?39:-1),M(2),q(`armed`,r.armed()===`reset`),R(`disabled`,!r.canWrite()),N(`aria-describedby`,r.canWrite()?null:`forms-writes-off`),M(),X(` `,r.armed()===`reset`?`Confirm reset`:`Reset`,` `),M(),q(`armed`,r.armed()===`submit`),R(`disabled`,!r.canWrite()),N(`aria-describedby`,r.canWrite()?null:`forms-writes-off`),M(),X(` `,r.armed()===`submit`?`Confirm submit`:`Submit`,` `),M(),F(r.canWrite()?-1:45),M(2),Y(r.message()),M(2),L(r.tabs),M(2),R(`id`,`forms-panel-`+r.tab_()),N(`aria-labelledby`,`forms-tab-`+r.tab_()),M(),F((e=r.tab_())===`fields`?52:e===`timeline`?53:e===`submit`?54:e===`lint`?55:-1)}}function QB(e,t){if(e&1&&(z(0,`div`,4)(1,`div`,9)(2,`h2`,10),J(3,` Forms `),z(4,`span`,11),J(5),B()(),P(6,eB,3,1,`label`,12),z(7,`ul`,13),I(8,nB,12,10,`li`,null,qz),B()(),P(10,rB,7,2,`section`,14)(11,iB,7,1,`section`,14)(12,ZB,56,41,`section`,15),B()),e&2){let e,t=K();M(5),Y(t.visible().length),M(),F(t.hostPageId&&(t.allPages()||t.otherPages())?6:-1),M(2),L(t.visible()),M(2),F((e=t.missing())?10:(e=t.hidden())?11:(e=t.selected())?12:-1,e)}}var $B=[{id:`fields`,label:`Fields`},{id:`timeline`,label:`Timeline`},{id:`submit`,label:`Submit`},{id:`lint`,label:`Lint`}],eV=[{id:`invalid`,label:`Invalid`},{id:`dirty`,label:`Dirty`},{id:`touched`,label:`Touched`},{id:`disabled`,label:`Disabled`},{id:`hidden-error`,label:`Error not shown`}];function tV(e,t){switch(t){case`invalid`:return e.errors.length>0;case`dirty`:return e.dirty&&e.type===`control`;case`touched`:return e.touched&&e.type===`control`;case`disabled`:return e.status===`DISABLED`;case`hidden-error`:return e.dom?.errorShown===!1}}function nV(e){return e.errors.length+(e.children??[]).reduce((e,t)=>e+nV(t),0)}function rV(e){return e.children?e.children.reduce((e,t)=>e+rV(t),0):+(e.type===`control`&&e.materialized!==!1)}var iV=class e{rpc=$(null);focus=$(null);canWrite=Q(()=>AE(this.rpc(),`forms`));redactLabel=CE;writesOff=nE(`forms`);focusHandled=Iv();forms=j([]);webMcp=j([]);events=j([]);loading=j(!0);failed=j(!1);selectedId=j(null);selectedLabel=j(null);hostPageId=uE();allPages=j(!1);visible=Q(()=>{let e=this.forms(),t=this.hostPageId;return t&&!this.allPages()?e.filter(e=>vE(e.id)===t):e});otherPages=Q(()=>this.forms().some(e=>vE(e.id)!==this.hostPageId));instrumented=j([]);recording=Q(()=>{let e=this.selected()?.id??``;return this.instrumented().some(t=>e.endsWith(`@${t}`))});filter=j(``);tabs=$B;chips=eV;tab_=j(`fields`);active=j(new Set);filtering=Q(()=>!!this.filter()||this.active().size>0);filterStatus=j(``);version=j(0);message=j(``);webMcpPage(e){let t=vE(e);return this.webMcp().find(e=>e.pageId===t)}picking=j(null);pickSeq=0;unsubscribe=null;destroyRef=E(ws);host=E(Nl);injector=E(Ss);counts=Q(()=>new Map(this.visible().map(e=>[e.id,{fields:rV(e.root),errors:nV(e.root)}])));chosen=Q(()=>{let e=this.selectedId();if(e===null)return null;let t=this.forms(),n=this.selectedLabel(),r=vE(e);return t.find(t=>t.id===e)??t.find(e=>e.label===n&&vE(e.id)===r)??null});selected=Q(()=>{let e=this.visible();if(this.selectedId()===null)return e[0]??null;let t=this.chosen();return t&&e.includes(t)?t:null});missing=Q(()=>this.selectedId()!==null&&!this.chosen()&&this.visible().length?this.selectedLabel()??this.selectedId():null);hidden=Q(()=>{let e=this.chosen();return e&&!this.selected()&&this.visible().length?e.label:null});selectedFormId=Q(()=>this.selected()?.id??null);fieldPath=Nv({source:this.selectedFormId,computation:()=>null});armed=Nv({source:this.selectedFormId,computation:()=>null});snapshot=Nv({source:this.selectedFormId,computation:()=>null});rows=Q(()=>{let e=this.selected();if(!e)return[];let t=this.filter().toLowerCase(),n=Array.from(this.active()),r=[],i=(e,a)=>{let o=r.length,s=(!t||e.path.toLowerCase().includes(t))&&n.every(t=>tV(e,t));for(let t of e.children??[])s=i(t,a+1)||s;return s&&r.splice(o,0,{node:e,depth:a}),s};return i(e.root,0),r});selectedNode=Q(()=>{let e=this.fieldPath(),t=this.selected();if(e===null||!t)return null;let n=t=>t.path===e?t:(t.children??[]).map(n).find(Boolean)??null;return n(t.root)});dropped=j({});droppedEvents=Q(()=>{let e=this.selected()?.id;return e?this.dropped()[vE(e)]??0:0});maxEvents=Q(()=>kE(this.rpc()).limits.formTimeline);selectedEvents=Q(()=>{let e=this.selected()?.id;return this.events().filter(t=>t.formId===e)});constructor(){dc(()=>{let e=this.rpc();e&&this.load(e)}),dc(()=>{let e=this.focus();e&&jv(()=>{this.selectForm(e.id),this.focusHandled.emit()})}),this.destroyRef.onDestroy(()=>{this.unsubscribe?.(),this.highlight(null,``)})}async load(e){this.loading.set(!0),this.failed.set(!1);try{let t=await e.scope(`pangular`).rpc.sharedState(`forms`);if(this.destroyRef.destroyed)return;let n=e=>{let t=e;this.forms.set(t?.forms??[]),this.events.set(t?.events??[]),this.instrumented.set(t?.instrumented??[]),this.dropped.set(t?.dropped??{}),this.webMcp.set(t?.webMcp??[]),this.version.update(e=>e+1)};n(t.value()),this.unsubscribe?.(),this.unsubscribe=t.on(`updated`,n)}catch{this.failed.set(!0)}finally{this.loading.set(!1)}}retry(){let e=this.rpc();e&&this.load(e)}async pick(){let e=this.selected();if(!e)return;let t=++this.pickSeq;this.picking.set(e.id),this.message.set(`Click a field in the app. Press Escape or Cancel picking to stop.`);let n=await TE(this.rpc(),{action:`pick`,formId:e.id});if(t!==this.pickSeq)return;this.picking.set(null);let r=n;if(!n.ok||!r.formId){this.message.set(EE(n));return}this.selectForm(r.formId),this.tab_.set(`fields`),this.fieldPath.set(r.path??``),this.message.set(`Picked ${r.path||`(form)`}.`)}cancelPick(){let e=this.picking();e&&TE(this.rpc(),{action:`cancel-pick`,formId:e})}async setRecording(e){let t=this.selected();if(!t)return;let n=await TE(this.rpc(),{action:`instrument`,formId:t.id,value:e});this.message.set(EE(n))}selectForm(e){this.hostPageId&&vE(e)&&vE(e)!==this.hostPageId&&this.allPages.set(!0),this.selectedId.set(e),this.selectedLabel.set(this.forms().find(t=>t.id===e)?.label??null),this.filter.set(``),this.fieldPath.set(null),this.snapshot.set(null),this.armed.set(null)}toggleField(e){this.fieldPath.update(t=>t===e?null:e)}closeField(){let e=this.host.nativeElement,t=e.querySelector(`button.field[aria-pressed="true"]`)??e.querySelector(`.table-scroll`);this.fieldPath.set(null),t?.focus()}showField(e){this.tab_.set(`fields`);let t=()=>this.rows().some(t=>t.node.path===e);t()||this.filter.set(``),t()||this.active.set(new Set),this.fieldPath.set(e),zd(()=>{let e=this.host.nativeElement;e.querySelector(`button.field[aria-pressed="true"]`)?.scrollIntoView?.({block:`nearest`}),(e.querySelector(`#forms-field-heading`)??e.querySelector(`.table-scroll`))?.focus()},{injector:this.injector})}toggleChip(e){this.active.update(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})}async act(e,t={}){let n=this.selected();if(!n)return;this.armed.set(null);let r=await TE(this.rpc(),{action:e,formId:n.id,...t});r.snapshot&&this.selected()?.id===n.id&&this.snapshot.set(r.snapshot),this.message.set(EE(r))}confirmAct(e){if(this.armed()!==e){this.armed.set(e),this.message.set(`Press "Confirm ${e}" to ${e} the form in the app.`);return}this.act(e,{confirm:!0,snapshot:this.snapshot()??void 0})}onKey(e){let t=this.tabs.map(e=>e.id),n=t.indexOf(this.tab_()),r=n;if(e.key===`ArrowRight`)r=(n+1)%t.length;else if(e.key===`ArrowLeft`)r=(n-1+t.length)%t.length;else if(e.key===`Home`)r=0;else if(e.key===`End`)r=t.length-1;else return;e.preventDefault(),this.tab_.set(t[r]);let i=e.currentTarget;queueMicrotask(()=>i.querySelector(`#forms-tab-${t[r]}`)?.focus())}sourceText(e){let t=bE[e.source??``]??e.source??``;return e.from===void 0?t:`${t} on ${e.from||`the form`}`}clearFilters(e){this.filter.set(``),this.active.set(new Set);let t=this.rows().length,n=`Filters cleared. Showing ${t} ${t===1?`field`:`fields`}.`;this.filterStatus.update(e=>e===n?`${n}\u00a0`:n),e.focus()}onFilter(e){this.filter.set(e.target.value)}highlight(e,t){let n=this.rpc();n&&n.scope(`pangular`).rpc.callEvent(`request-form-highlight`,e?{formId:e,path:t}:null)}kindLabel(e){return yE[e]}constraintList(e){return Object.entries(e.constraints??{}).map(([e,t])=>`${e} ${t}`)}errorText(e,t){return/^[a-z]/.test(t.message)?`${e.key||`The form`} ${t.message}`:t.message}static ɵfac=function(t){return new(t||e)};static ɵcmp=Wh({type:e,selectors:[[`app-forms-inspector`]],hostBindings:function(e,t){e&1&&G(`keydown.escape`,function(){return t.cancelPick()})},inputs:{rpc:[1,`rpc`],focus:[1,`focus`]},outputs:{focusHandled:`focusHandled`},decls:6,vars:1,consts:[[`fieldFilter`,``],[`role`,`status`,1,`empty`],[`role`,`alert`,1,`empty`],[1,`empty`],[1,`layout`],[`aria-hidden`,`true`,1,`spinner`],[1,`empty-title`],[1,`muted`],[`type`,`button`,1,`small`,3,`click`],[1,`sidebar`],[`id`,`forms-list-heading`,1,`list-heading`],[1,`list-count`],[1,`page-toggle`],[`aria-labelledby`,`forms-list-heading`,1,`form-list`],[`aria-labelledby`,`forms-detail-title`,1,`detail`,`gone`],[`aria-labelledby`,`forms-detail-title`,1,`detail`],[`type`,`checkbox`,3,`change`,`checked`],[`type`,`button`,1,`form-item`,3,`click`],[`aria-hidden`,`true`,1,`dot`],[1,`label`],[1,`kind`],[1,`id`],[1,`sr-only`],[1,`count`],[`id`,`forms-detail-title`],[`role`,`status`,1,`muted`],[1,`detail-head`],[1,`detail-meta`],[1,`summary`],[1,`badge`],[1,`totals`],[1,`error-summary`],[3,`tool`,`page`,`signalForm`],[1,`action-bar`],[`role`,`group`,`aria-label`,`Form actions`,1,`actions`],[`type`,`button`,1,`small`,3,`click`,`disabled`],[`aria-hidden`,`true`,1,`divider`],[`type`,`button`,1,`small`,3,`armed`,`disabled`],[`aria-hidden`,`true`,1,`spacer`],[`type`,`button`,1,`small`,`danger`,3,`click`,`disabled`],[`type`,`button`,1,`small`,`primary`,3,`click`,`disabled`],[`id`,`forms-writes-off`,1,`muted`],[`role`,`status`,1,`status`],[`role`,`tablist`,`aria-label`,`Form views`,1,`tabs`,3,`keydown`],[`type`,`button`,`role`,`tab`,3,`id`],[`role`,`tabpanel`,1,`panel`,3,`id`],[3,`formId`,`version`,`rpc`],[`type`,`button`,1,`summary-link`,3,`click`],[1,`kind-tag`],[`type`,`button`,`role`,`tab`,3,`click`,`id`],[1,`filters`],[`type`,`search`,`placeholder`,`Filter fields by path`,`aria-label`,`Filter fields by path`,`autocomplete`,`off`,`spellcheck`,`false`,1,`filter`,3,`input`,`keydown.escape`,`value`],[1,`chips`],[`role`,`status`,1,`sr-only`],[`role`,`region`,`aria-label`,`Fields`,`tabindex`,`0`,1,`table-scroll`],[1,`fields`],[`scope`,`col`],[3,`form`,`node`,`version`,`rpc`],[3,`mouseenter`,`mouseleave`],[`scope`,`row`,1,`name`],[`type`,`button`,1,`field`,3,`focus`,`blur`,`click`],[1,`type`],[1,`value`],[1,`status-cell`],[1,`flags`],[1,`warn`],[1,`errors`],[1,`unseen`],[1,`source`],[`colspan`,`5`,1,`muted`,`truncated`],[`colspan`,`5`,1,`no-match`],[`type`,`button`,1,`small`],[3,`closed`,`form`,`node`,`version`,`rpc`],[`what`,`form events on this page`,`limit`,`formTimeline`,3,`dropped`,`max`],[3,`record`,`events`,`recording`],[3,`showField`,`formId`,`version`,`rpc`]],template:function(e,t){e&1&&P(0,Yz,4,0,`div`,1)(1,Xz,7,0,`div`,2)(2,Zz,4,0,`div`,1)(3,Qz,5,0,`div`,3)(4,$z,7,2,`div`,3)(5,QB,13,3,`div`,4),e&2&&F(t.rpc()?t.failed()?1:t.loading()?2:t.forms().length?t.visible().length?5:4:3:0)},dependencies:[qR,Cz,nz,rz,Gz,iO,pb],styles:[`.muted[_ngcontent-%COMP%] {
+}`]})},CB=()=>[],wB=(e,t)=>t.id,TB=(e,t)=>t.node.path;function EB(e,t){e&1&&(z(0,`div`,1),V(1,`span`,5),z(2,`p`),J(3,`Connecting to the devtools server…`),B()())}function DB(e,t){if(e&1){let e=W();z(0,`div`,2)(1,`p`,6),J(2,`Could not load forms`),B(),z(3,`p`,7),J(4,` The devtools server did not answer. Check that the app is running, then try again. `),B(),z(5,`button`,8),G(`click`,function(){return O(e),k(K().retry())}),J(6,`Try again`),B()()}}function OB(e,t){e&1&&(z(0,`div`,1),V(1,`span`,5),z(2,`p`),J(3,`Loading forms…`),B()())}function kB(e,t){e&1&&(z(0,`div`,3)(1,`p`,6),J(2,`No forms on the page yet`),B(),z(3,`p`,7),J(4,` Open a page that renders a form. Signal Forms, reactive and template-driven forms all show up here, in development builds. `),B()())}function AB(e,t){if(e&1){let e=W();z(0,`div`,3)(1,`p`,6),J(2,`No forms on this page`),B(),z(3,`p`,7),J(4),B(),z(5,`button`,8),G(`click`,function(){return O(e),k(K().allPages.set(!0))}),J(6,` Show forms from all pages `),B()()}if(e&2){let e=K();M(4),Z(` Other connected tabs report `,e.forms().length,` `,e.forms().length===1?`form`:`forms`,`. `)}}function jB(e,t){if(e&1){let e=W();z(0,`label`,12)(1,`input`,16),G(`change`,function(t){return O(e),k(K(2).allPages.set(t.target.checked))}),B(),J(2,` All pages `),B()}if(e&2){let e=K(2);M(),R(`checked`,e.allPages())}}function MB(e,t){e&1&&(z(0,`span`,23),J(1),z(2,`span`,22),J(3,` errors`),B()()),e&2&&(M(),Y(t))}function NB(e,t){if(e&1){let e=W();z(0,`li`)(1,`button`,17),G(`click`,function(){let t=O(e).$implicit;return k(K(2).selectForm(t.id))}),V(2,`span`,18),z(3,`span`,19),J(4),B(),z(5,`span`,20),J(6),z(7,`span`,21),J(8),B(),z(9,`span`,22),J(10),B()(),P(11,MB,4,1,`span`,23),B()()}if(e&2){let e,n=t.$implicit,r=K(2);M(),q(`active`,n.id===r.selected()?.id),N(`aria-current`,n.id===r.selected()?.id?`true`:null),M(),N(`data-status`,n.root.status),M(),N(`title`,n.label),M(),Y(n.label),M(2),X(``,r.kindLabel(n.kind),` · `),M(2),Y(n.id),M(2),X(`, `,n.root.status),M(),F((e=r.counts().get(n.id)?.errors)?11:-1,e)}}function PB(e,t){if(e&1){let e=W();z(0,`section`,14)(1,`h2`,24),J(2),B(),z(3,`p`,25),J(4,` This form is no longer on the page. It comes back here if the page renders it again. `),B(),z(5,`button`,8),G(`click`,function(){O(e);let t=K(2);return k(t.selectForm(t.visible()[0].id))}),J(6),B()()}if(e&2){let e=K(2);M(2),Y(t),M(4),X(` Show `,e.visible()[0].label,` `)}}function FB(e,t){if(e&1){let e=W();z(0,`section`,14)(1,`h2`,24),J(2),B(),z(3,`p`,7),J(4,`This form is on another page. Tick "All pages" to see it again.`),B(),z(5,`button`,8),G(`click`,function(){return O(e),k(K(2).allPages.set(!0))}),J(6,` Show forms from all pages `),B()()}e&2&&(M(2),Y(t))}function IB(e,t){if(e&1&&(z(0,`span`),J(1),B()),e&2){let e=K();M(),Y(e.submitted?`submitted`:`not submitted`)}}function LB(e,t){e&1&&(z(0,`span`),J(1,`submitting`),B())}function RB(e,t){if(e&1){let e=W();z(0,`li`)(1,`button`,47),G(`click`,function(){let t=O(e).$implicit;return k(K(4).showField(t.path))}),z(2,`span`,22),J(3,`Show field `),B(),z(4,`code`),J(5),B(),z(6,`span`,22),J(7,`:`),B(),J(8),z(9,`code`,48),J(10),B()()()}if(e&2){let e=t.$implicit;M(5),Y(e.path||`(form)`),M(3),X(` `,e.message,` `),M(2),Y(e.kind)}}function zB(e,t){if(e&1&&(z(0,`details`,31)(1,`summary`),J(2),B(),z(3,`ul`),I(4,RB,11,3,`li`,null,Dg),B()()),e&2){let e=K();M(2),X(`Error summary (`,e.errorSummary.length,`)`),M(2),L(e.errorSummary)}}function BB(e,t){if(e&1){let e=W();z(0,`button`,35),G(`click`,function(){return O(e),k(K(3).confirmAct(`restore`))}),J(1),B()}if(e&2){let e=K(3);q(`armed`,e.armed()===`restore`),R(`disabled`,!e.canWrite()),N(`aria-describedby`,e.canWrite()?null:`forms-writes-off`)(`title`,`Restore `+e.snapshot()),M(),X(` `,e.armed()===`restore`?`Confirm restore`:`Restore `+e.snapshot(),` `)}}function VB(e,t){if(e&1&&(z(0,`p`,41),J(1),B()),e&2){let e=K(3);M(),Y(e.writesOff)}}function HB(e,t){if(e&1){let e=W();z(0,`button`,49),G(`click`,function(){let t=O(e).$implicit;return k(K(3).tab_.set(t.id))}),J(1),B()}if(e&2){let e=t.$implicit,n=K(3);R(`id`,`forms-tab-`+e.id),N(`aria-selected`,e.id===n.tab_())(`aria-controls`,`forms-panel-`+e.id)(`tabindex`,e.id===n.tab_()?0:-1),M(),X(` `,e.label,` `)}}function UB(e,t){if(e&1){let e=W();z(0,`label`)(1,`input`,16),G(`change`,function(){let t=O(e).$implicit;return k(K(4).toggleChip(t.id))}),B(),J(2),B()}if(e&2){let e=t.$implicit,n=K(4);M(),R(`checked`,n.active().has(e.id)),M(),X(` `,e.label,` `)}}function WB(e,t){if(e&1&&(z(0,`div`,7),J(1,` typed `),z(2,`code`),J(3),xv(4,`json`),B(),J(5,`, not in the model yet `),B()),e&2){let e=K(2).$implicit;M(3),Y(Cv(4,1,e.node.uncommitted))}}function GB(e,t){if(e&1&&(z(0,`div`,7),J(1,` resets to `),z(2,`code`),J(3),xv(4,`json`),B()()),e&2){let e=K(2).$implicit;M(3),Y(Cv(4,1,e.node.defaultValue))}}function KB(e,t){if(e&1&&(z(0,`code`),J(1),xv(2,`json`),B(),P(3,WB,6,3,`div`,7),P(4,GB,5,3,`div`,7)),e&2){let e=K().$implicit;M(),Y(Cv(2,3,e.node.value)),M(2),F(e.node.uncommitted===void 0?-1:3),M(),F(e.node.defaultValue===void 0?-1:4)}}function qB(e,t){e&1&&(z(0,`span`,7),J(1,`not created yet`),B())}function JB(e,t){if(e&1&&(z(0,`span`,29),J(1),B()),e&2){let e=K().$implicit;N(`data-status`,e.node.status),M(),Y(e.node.status)}}function YB(e,t){e&1&&(z(0,`span`),J(1,`touched`),B())}function XB(e,t){if(e&1&&(z(0,`span`),J(1),B()),e&2){let e=K().$implicit;M(),Y(e.node.changed===!1?`dirty, unchanged`:`dirty`)}}function ZB(e,t){if(e&1&&(z(0,`span`),J(1),B()),e&2){let e=K().$implicit;M(),X(`not validated (`,e.node.skipped,`)`)}}function QB(e,t){if(e&1&&(z(0,`span`,65),J(1),B()),e&2){let e=K().$implicit;M(),X(`stale: `,e.node.stale.join(`, `))}}function $B(e,t){e&1&&(z(0,`span`,65),J(1,`view out of sync`),B())}function eV(e,t){if(e&1&&(z(0,`span`),J(1),B()),e&2){let e=K().$implicit,t=K(4);M(),X(`redacted: `,t.redactLabel(e.node.redacted))}}function tV(e,t){e&1&&(z(0,`span`),J(1,`required`),B())}function nV(e,t){e&1&&(z(0,`span`),J(1,`readonly`),B())}function rV(e,t){e&1&&(z(0,`span`),J(1,`hidden`),B())}function iV(e,t){if(e&1&&(z(0,`span`),J(1),B()),e&2){let e=K().$implicit;M(),X(`updates on `,e.node.updateOn)}}function aV(e,t){e&1&&(z(0,`span`),J(1,`debouncing`),B())}function oV(e,t){e&1&&(z(0,`span`),J(1,`validators`),B())}function sV(e,t){e&1&&(z(0,`span`),J(1,`async validator`),B())}function cV(e,t){if(e&1&&(z(0,`span`),J(1),B()),e&2){let e=t.$implicit;M(),Y(e)}}function lV(e,t){if(e&1&&(z(0,`span`),J(1),B()),e&2){let e=K().$implicit;M(),Y(e.node.accessor)}}function uV(e,t){if(e&1&&(z(0,`span`),J(1),B()),e&2){let e=K().$implicit;M(),X(`name `,e.node.name)}}function dV(e,t){if(e&1&&(z(0,`span`),J(1),xv(2,`json`),B()),e&2){let e=t.$implicit;M(),X(`metadata `,Cv(2,1,e))}}function fV(e,t){if(e&1&&(z(0,`span`),J(1),B()),e&2){let e=t.$implicit;M(),X(`disabled: `,e)}}function pV(e,t){if(e&1&&(z(0,`span`,68),J(1),B()),e&2){let e=K().$implicit;M(),X(`at `,e.params.path)}}function mV(e,t){if(e&1&&(z(0,`span`,68),J(1),B()),e&2){let e=K().$implicit,t=K(5);M(),Y(t.sourceText(e))}}function hV(e,t){if(e&1&&(z(0,`div`),J(1),z(2,`code`,48),J(3),B(),P(4,pV,2,1,`span`,68),P(5,mV,2,1,`span`,68),B()),e&2){let e=t.$implicit,n=K().$implicit,r=K(4);M(),X(` `,r.errorText(n.node,e),` `),M(2),Y(e.kind),M(),F(e.kind===`standardSchema`&&e.params?.path?4:-1),M(),F(e.source?5:-1)}}function gV(e,t){e&1&&(z(0,`div`,67),J(1,`not shown to the user`),B())}function _V(e,t){if(e&1&&(z(0,`tr`)(1,`td`,69),J(2),B()()),e&2){let e=K().$implicit;M(),j_(`padding-left`,28+e.depth*16,`px`),M(),Z(` `,e.node.truncated,` more fields under `,e.node.path||`the form`,` not shown `)}}function vV(e,t){if(e&1){let e=W();z(0,`tr`,58),G(`mouseenter`,function(){let t=O(e).$implicit,n=K(2);return k(K(2).highlight(n.id,t.node.path))})(`mouseleave`,function(){return O(e),k(K(4).highlight(null,``))}),z(1,`th`,59)(2,`button`,60),G(`focus`,function(){let t=O(e).$implicit,n=K(2);return k(K(2).highlight(n.id,t.node.path))})(`blur`,function(){return O(e),k(K(4).highlight(null,``))})(`click`,function(){let t=O(e).$implicit;return k(K(4).toggleField(t.node.path))}),J(3),B(),z(4,`span`,61),J(5),B()(),z(6,`td`,62),P(7,KB,5,5),B(),z(8,`td`,63),P(9,qB,2,0,`span`,7)(10,JB,2,2,`span`,29),B(),z(11,`td`,64),P(12,YB,2,0,`span`),P(13,XB,2,1,`span`),P(14,ZB,2,1,`span`),P(15,QB,2,1,`span`,65),P(16,$B,2,0,`span`,65),P(17,eV,2,1,`span`),P(18,tV,2,0,`span`),P(19,nV,2,0,`span`),P(20,rV,2,0,`span`),P(21,iV,2,1,`span`),P(22,aV,2,0,`span`),P(23,oV,2,0,`span`),P(24,sV,2,0,`span`),I(25,cV,2,1,`span`,null,Og),P(27,lV,2,1,`span`),P(28,uV,2,1,`span`),I(29,dV,3,3,`span`,null,Dg),I(31,fV,2,1,`span`,null,Dg),B(),z(33,`td`,66),I(34,hV,6,4,`div`,null,Dg),P(36,gV,2,0,`div`,67),B()(),P(37,_V,3,4,`tr`)}if(e&2){let e=t.$implicit,n=K(4);q(`invalid`,e.node.errors.length),M(),j_(`padding-left`,12+e.depth*16,`px`),M(),N(`aria-label`,`Show details for `+(e.node.path||`the form`))(`aria-pressed`,e.node.path===n.fieldPath())(`title`,e.node.path||`(form)`),M(),X(` `,e.node.key||`(form)`,` `),M(2),Y(e.node.type),M(2),F(e.node.type===`control`?7:-1),M(2),F(e.node.materialized===!1?9:10),M(3),F(e.node.touched?12:-1),M(),F(e.node.dirty?13:-1),M(),F(e.node.skipped?14:-1),M(),F(e.node.stale?.length?15:-1),M(),F(e.node.dom?.drift===void 0?-1:16),M(),F(e.node.redacted?17:-1),M(),F(e.node.required?18:-1),M(),F(e.node.readonly?19:-1),M(),F(e.node.hidden?20:-1),M(),F(e.node.updateOn?21:-1),M(),F(e.node.debouncing?22:-1),M(),F(e.node.validators?.sync?23:-1),M(),F(e.node.validators?.async?24:-1),M(),L(n.constraintList(e.node)),M(2),F(e.node.accessor?27:-1),M(),F(e.node.name?28:-1),M(),L(e.node.metadata??mv(28,CB)),M(2),L(e.node.disabledReasons??mv(29,CB)),M(3),L(e.node.errors),M(2),F(e.node.errors.length&&e.node.dom?.errorShown===!1?36:-1),M(),F(e.node.truncated?37:-1)}}function yV(e,t){e&1&&J(0),e&2&&X(` No field path matches "`,K(5).filter(),`". `)}function bV(e,t){e&1&&J(0,` No field matches the selected filters. `)}function xV(e,t){if(e&1){let e=W();z(0,`button`,8),G(`click`,function(){O(e),K(2);let t=u_(2);return k(K(3).clearFilters(t))}),J(1,` Clear filters `),B()}}function SV(e,t){if(e&1&&(z(0,`tr`)(1,`td`,70)(2,`p`),P(3,yV,1,1)(4,bV,1,0),B(),P(5,xV,2,0,`button`,71),B()()),e&2){let e=K(4);M(3),F(e.filter()?3:4),M(2),F(e.filtering()?5:-1)}}function CV(e,t){if(e&1){let e=W();z(0,`app-forms-field-detail`,72),G(`closed`,function(){return O(e),k(K(4).closeField())}),B()}if(e&2){let e=K(2),n=K(2);R(`form`,e)(`node`,t)(`version`,n.version())(`rpc`,n.rpc())}}function wV(e,t){if(e&1){let e=W();z(0,`div`,50)(1,`input`,51,0),G(`input`,function(t){return O(e),k(K(3).onFilter(t))})(`keydown.escape`,function(){return O(e),k(K(3).filter.set(``))}),B(),z(3,`fieldset`,52)(4,`legend`,22),J(5,`Show only fields that are`),B(),I(6,UB,3,2,`label`,null,wB),B()(),z(8,`p`,53),J(9),B(),z(10,`div`,54)(11,`table`,55)(12,`thead`)(13,`tr`)(14,`th`,56),J(15,`Field`),B(),z(16,`th`,56),J(17,`Value`),B(),z(18,`th`,56),J(19,`Status`),B(),z(20,`th`,56),J(21,`State`),B(),z(22,`th`,56),J(23,`Errors`),B()()(),z(24,`tbody`),I(25,vV,38,30,null,null,TB,!1,SV,6,2,`tr`),B()()(),P(28,CV,1,4,`app-forms-field-detail`,57)}if(e&2){let e,t=K(3);M(),R(`value`,t.filter()),M(5),L(t.chips),M(3),Y(t.filterStatus()),M(16),L(t.rows()),M(3),F((e=t.selectedNode())?28:-1,e)}}function TV(e,t){if(e&1){let e=W();V(0,`app-limit-note`,73),z(1,`app-forms-timeline`,74),G(`record`,function(t){return O(e),k(K(3).setRecording(t))}),B()}if(e&2){let e=K(3);R(`dropped`,e.droppedEvents())(`max`,e.maxEvents()),M(),R(`events`,e.selectedEvents())(`recording`,e.recording())}}function EV(e,t){if(e&1&&V(0,`app-forms-submit`,46),e&2){let e=K(),t=K(2);R(`formId`,e.id)(`version`,t.version())(`rpc`,t.rpc())}}function DV(e,t){if(e&1){let e=W();z(0,`app-forms-lint`,75),G(`showField`,function(t){return O(e),k(K(3).showField(t))}),B()}if(e&2){let e=K(),t=K(2);R(`formId`,e.id)(`version`,t.version())(`rpc`,t.rpc())}}function OV(e,t){if(e&1){let e=W();z(0,`section`,15)(1,`div`,26)(2,`h2`,24),J(3),B(),z(4,`p`,27),J(5),z(6,`code`),J(7),B()()(),z(8,`div`,28)(9,`span`,29),J(10),B(),z(11,`span`),J(12),B(),z(13,`span`),J(14),B(),P(15,IB,2,1,`span`),P(16,LB,2,0,`span`),z(17,`span`,30)(18,`b`),J(19),B(),J(20,` fields · `),z(21,`b`),J(22),B(),J(23,` errors`),B()(),P(24,zB,6,1,`details`,31),V(25,`app-forms-webmcp`,32),z(26,`div`,33)(27,`div`,34)(28,`button`,35),G(`click`,function(){return O(e),k(K(2).act(`touch-all`))}),J(29,` Touch all `),B(),z(30,`button`,35),G(`click`,function(){return O(e),k(K(2).act(`revalidate`))}),J(31,` Revalidate `),B(),z(32,`button`,8),G(`click`,function(){return O(e),k(K(2).act(`focus-first-invalid`))}),J(33,` Focus first invalid `),B(),z(34,`button`,8),G(`click`,function(){O(e);let t=K(2);return k(t.picking()?t.cancelPick():t.pick())}),J(35),B(),V(36,`span`,36),z(37,`button`,8),G(`click`,function(){return O(e),k(K(2).act(`snapshot`))}),J(38,`Snapshot`),B(),P(39,BB,2,6,`button`,37),V(40,`span`,38),z(41,`button`,39),G(`click`,function(){return O(e),k(K(2).confirmAct(`reset`))}),J(42),B(),z(43,`button`,40),G(`click`,function(){return O(e),k(K(2).confirmAct(`submit`))}),J(44),B()(),P(45,VB,2,1,`p`,41),z(46,`p`,42),J(47),B()(),z(48,`div`,43),G(`keydown`,function(t){return O(e),k(K(2).onKey(t))}),I(49,HB,2,5,`button`,44,wB),B(),z(51,`div`,45),P(52,wV,29,4)(53,TV,2,4)(54,EV,1,3,`app-forms-submit`,46)(55,DV,1,3,`app-forms-lint`,46),B()()}if(e&2){let e,n=t,r=K(2);M(3),Y(n.label),M(2),X(` `,r.kindLabel(n.kind),` · `),M(2),Y(n.id),M(2),N(`data-status`,n.root.status),M(),Y(n.root.status),M(2),Y(n.root.dirty?`dirty`:`pristine`),M(2),Y(n.root.touched?`touched`:`untouched`),M(),F(n.submitted===void 0?-1:15),M(),F(n.root.submitting?16:-1),M(3),Y(r.counts().get(n.id)?.fields),M(2),q(`has-errors`,r.counts().get(n.id)?.errors),M(),Y(r.counts().get(n.id)?.errors),M(2),F(n.errorSummary?.length?24:-1),M(),R(`tool`,n.webMcp)(`page`,r.webMcpPage(n.id))(`signalForm`,n.kind===`signal`),M(3),R(`disabled`,!r.canWrite()),N(`aria-describedby`,r.canWrite()?null:`forms-writes-off`),M(2),R(`disabled`,!r.canWrite()),N(`aria-describedby`,r.canWrite()?null:`forms-writes-off`),M(4),q(`on`,r.picking()),N(`aria-pressed`,!!r.picking()),M(),X(` `,r.picking()?`Cancel picking`:`Pick field on page`,` `),M(4),F(r.snapshot()?39:-1),M(2),q(`armed`,r.armed()===`reset`),R(`disabled`,!r.canWrite()),N(`aria-describedby`,r.canWrite()?null:`forms-writes-off`),M(),X(` `,r.armed()===`reset`?`Confirm reset`:`Reset`,` `),M(),q(`armed`,r.armed()===`submit`),R(`disabled`,!r.canWrite()),N(`aria-describedby`,r.canWrite()?null:`forms-writes-off`),M(),X(` `,r.armed()===`submit`?`Confirm submit`:`Submit`,` `),M(),F(r.canWrite()?-1:45),M(2),Y(r.message()),M(2),L(r.tabs),M(2),R(`id`,`forms-panel-`+r.tab_()),N(`aria-labelledby`,`forms-tab-`+r.tab_()),M(),F((e=r.tab_())===`fields`?52:e===`timeline`?53:e===`submit`?54:e===`lint`?55:-1)}}function kV(e,t){if(e&1&&(z(0,`div`,4)(1,`div`,9)(2,`h2`,10),J(3,` Forms `),z(4,`span`,11),J(5),B()(),P(6,jB,3,1,`label`,12),z(7,`ul`,13),I(8,NB,12,10,`li`,null,wB),B()(),P(10,PB,7,2,`section`,14)(11,FB,7,1,`section`,14)(12,OV,56,41,`section`,15),B()),e&2){let e,t=K();M(5),Y(t.visible().length),M(),F(t.hostPageId&&(t.allPages()||t.otherPages())?6:-1),M(2),L(t.visible()),M(2),F((e=t.missing())?10:(e=t.hidden())?11:(e=t.selected())?12:-1,e)}}var AV=[{id:`fields`,label:`Fields`},{id:`timeline`,label:`Timeline`},{id:`submit`,label:`Submit`},{id:`lint`,label:`Lint`}],jV=[{id:`invalid`,label:`Invalid`},{id:`dirty`,label:`Dirty`},{id:`touched`,label:`Touched`},{id:`disabled`,label:`Disabled`},{id:`hidden-error`,label:`Error not shown`}];function MV(e,t){switch(t){case`invalid`:return e.errors.length>0;case`dirty`:return e.dirty&&e.type===`control`;case`touched`:return e.touched&&e.type===`control`;case`disabled`:return e.status===`DISABLED`;case`hidden-error`:return e.dom?.errorShown===!1}}function NV(e){return e.errors.length+(e.children??[]).reduce((e,t)=>e+NV(t),0)}function PV(e){return e.children?e.children.reduce((e,t)=>e+PV(t),0):+(e.type===`control`&&e.materialized!==!1)}var FV=class e{rpc=$(null);focus=$(null);canWrite=Q(()=>ME(this.rpc(),`forms`));redactLabel=TE;writesOff=iE(`forms`);focusHandled=Rv();forms=j([]);webMcp=j([]);events=j([]);loading=j(!0);failed=j(!1);selectedId=j(null);selectedLabel=j(null);hostPageId=fE();allPages=j(!1);visible=Q(()=>{let e=this.forms(),t=this.hostPageId;return t&&!this.allPages()?e.filter(e=>bE(e.id)===t):e});otherPages=Q(()=>this.forms().some(e=>bE(e.id)!==this.hostPageId));instrumented=j([]);recording=Q(()=>{let e=this.selected()?.id??``;return this.instrumented().some(t=>e.endsWith(`@${t}`))});filter=j(``);tabs=AV;chips=jV;tab_=j(`fields`);active=j(new Set);filtering=Q(()=>!!this.filter()||this.active().size>0);filterStatus=j(``);version=j(0);message=j(``);webMcpPage(e){let t=bE(e);return this.webMcp().find(e=>e.pageId===t)}picking=j(null);pickSeq=0;unsubscribe=null;destroyRef=E(ws);host=E(Nl);injector=E(Ss);counts=Q(()=>new Map(this.visible().map(e=>[e.id,{fields:PV(e.root),errors:NV(e.root)}])));chosen=Q(()=>{let e=this.selectedId();if(e===null)return null;let t=this.forms(),n=this.selectedLabel(),r=bE(e);return t.find(t=>t.id===e)??t.find(e=>e.label===n&&bE(e.id)===r)??null});selected=Q(()=>{let e=this.visible();if(this.selectedId()===null)return e[0]??null;let t=this.chosen();return t&&e.includes(t)?t:null});missing=Q(()=>this.selectedId()!==null&&!this.chosen()&&this.visible().length?this.selectedLabel()??this.selectedId():null);hidden=Q(()=>{let e=this.chosen();return e&&!this.selected()&&this.visible().length?e.label:null});selectedFormId=Q(()=>this.selected()?.id??null);fieldPath=Fv({source:this.selectedFormId,computation:()=>null});armed=Fv({source:this.selectedFormId,computation:()=>null});snapshot=Fv({source:this.selectedFormId,computation:()=>null});rows=Q(()=>{let e=this.selected();if(!e)return[];let t=this.filter().toLowerCase(),n=Array.from(this.active()),r=[],i=(e,a)=>{let o=r.length,s=(!t||e.path.toLowerCase().includes(t))&&n.every(t=>MV(e,t));for(let t of e.children??[])s=i(t,a+1)||s;return s&&r.splice(o,0,{node:e,depth:a}),s};return i(e.root,0),r});selectedNode=Q(()=>{let e=this.fieldPath(),t=this.selected();if(e===null||!t)return null;let n=t=>t.path===e?t:(t.children??[]).map(n).find(Boolean)??null;return n(t.root)});dropped=j({});droppedEvents=Q(()=>{let e=this.selected()?.id;return e?this.dropped()[bE(e)]??0:0});maxEvents=Q(()=>jE(this.rpc()).limits.formTimeline);selectedEvents=Q(()=>{let e=this.selected()?.id;return this.events().filter(t=>t.formId===e)});constructor(){dc(()=>{let e=this.rpc();e&&this.load(e)}),dc(()=>{let e=this.focus();e&&Nv(()=>{this.selectForm(e.id),this.focusHandled.emit()})}),this.destroyRef.onDestroy(()=>{this.unsubscribe?.(),this.highlight(null,``)})}async load(e){this.loading.set(!0),this.failed.set(!1);try{let t=await e.scope(`pangular`).rpc.sharedState(`forms`);if(this.destroyRef.destroyed)return;let n=e=>{let t=e;this.forms.set(t?.forms??[]),this.events.set(t?.events??[]),this.instrumented.set(t?.instrumented??[]),this.dropped.set(t?.dropped??{}),this.webMcp.set(t?.webMcp??[]),this.version.update(e=>e+1)};n(t.value()),this.unsubscribe?.(),this.unsubscribe=t.on(`updated`,n)}catch{this.failed.set(!0)}finally{this.loading.set(!1)}}retry(){let e=this.rpc();e&&this.load(e)}async pick(){let e=this.selected();if(!e)return;let t=++this.pickSeq;this.picking.set(e.id),this.message.set(`Click a field in the app. Press Escape or Cancel picking to stop.`);let n=await DE(this.rpc(),{action:`pick`,formId:e.id});if(t!==this.pickSeq)return;this.picking.set(null);let r=n;if(!n.ok||!r.formId){this.message.set(OE(n));return}this.selectForm(r.formId),this.tab_.set(`fields`),this.fieldPath.set(r.path??``),this.message.set(`Picked ${r.path||`(form)`}.`)}cancelPick(){let e=this.picking();e&&DE(this.rpc(),{action:`cancel-pick`,formId:e})}async setRecording(e){let t=this.selected();if(!t)return;let n=await DE(this.rpc(),{action:`instrument`,formId:t.id,value:e});this.message.set(OE(n))}selectForm(e){this.hostPageId&&bE(e)&&bE(e)!==this.hostPageId&&this.allPages.set(!0),this.selectedId.set(e),this.selectedLabel.set(this.forms().find(t=>t.id===e)?.label??null),this.filter.set(``),this.fieldPath.set(null),this.snapshot.set(null),this.armed.set(null)}toggleField(e){this.fieldPath.update(t=>t===e?null:e)}closeField(){let e=this.host.nativeElement,t=e.querySelector(`button.field[aria-pressed="true"]`)??e.querySelector(`.table-scroll`);this.fieldPath.set(null),t?.focus()}showField(e){this.tab_.set(`fields`);let t=()=>this.rows().some(t=>t.node.path===e);t()||this.filter.set(``),t()||this.active.set(new Set),this.fieldPath.set(e),zd(()=>{let e=this.host.nativeElement;e.querySelector(`button.field[aria-pressed="true"]`)?.scrollIntoView?.({block:`nearest`}),(e.querySelector(`#forms-field-heading`)??e.querySelector(`.table-scroll`))?.focus()},{injector:this.injector})}toggleChip(e){this.active.update(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})}async act(e,t={}){let n=this.selected();if(!n)return;this.armed.set(null);let r=await DE(this.rpc(),{action:e,formId:n.id,...t});r.snapshot&&this.selected()?.id===n.id&&this.snapshot.set(r.snapshot),this.message.set(OE(r))}confirmAct(e){if(this.armed()!==e){this.armed.set(e),this.message.set(`Press "Confirm ${e}" to ${e} the form in the app.`);return}this.act(e,{confirm:!0,snapshot:this.snapshot()??void 0})}onKey(e){let t=this.tabs.map(e=>e.id),n=t.indexOf(this.tab_()),r=n;if(e.key===`ArrowRight`)r=(n+1)%t.length;else if(e.key===`ArrowLeft`)r=(n-1+t.length)%t.length;else if(e.key===`Home`)r=0;else if(e.key===`End`)r=t.length-1;else return;e.preventDefault(),this.tab_.set(t[r]);let i=e.currentTarget;queueMicrotask(()=>i.querySelector(`#forms-tab-${t[r]}`)?.focus())}sourceText(e){let t=SE[e.source??``]??e.source??``;return e.from===void 0?t:`${t} on ${e.from||`the form`}`}clearFilters(e){this.filter.set(``),this.active.set(new Set);let t=this.rows().length,n=`Filters cleared. Showing ${t} ${t===1?`field`:`fields`}.`;this.filterStatus.update(e=>e===n?`${n}\u00a0`:n),e.focus()}onFilter(e){this.filter.set(e.target.value)}highlight(e,t){let n=this.rpc();n&&n.scope(`pangular`).rpc.callEvent(`request-form-highlight`,e?{formId:e,path:t}:null)}kindLabel(e){return xE[e]}constraintList(e){return Object.entries(e.constraints??{}).map(([e,t])=>`${e} ${t}`)}errorText(e,t){return/^[a-z]/.test(t.message)?`${e.key||`The form`} ${t.message}`:t.message}static ɵfac=function(t){return new(t||e)};static ɵcmp=Wh({type:e,selectors:[[`app-forms-inspector`]],hostBindings:function(e,t){e&1&&G(`keydown.escape`,function(){return t.cancelPick()})},inputs:{rpc:[1,`rpc`],focus:[1,`focus`]},outputs:{focusHandled:`focusHandled`},decls:6,vars:1,consts:[[`fieldFilter`,``],[`role`,`status`,1,`empty`],[`role`,`alert`,1,`empty`],[1,`empty`],[1,`layout`],[`aria-hidden`,`true`,1,`spinner`],[1,`empty-title`],[1,`muted`],[`type`,`button`,1,`small`,3,`click`],[1,`sidebar`],[`id`,`forms-list-heading`,1,`list-heading`],[1,`list-count`],[1,`page-toggle`],[`aria-labelledby`,`forms-list-heading`,1,`form-list`],[`aria-labelledby`,`forms-detail-title`,1,`detail`,`gone`],[`aria-labelledby`,`forms-detail-title`,1,`detail`],[`type`,`checkbox`,3,`change`,`checked`],[`type`,`button`,1,`form-item`,3,`click`],[`aria-hidden`,`true`,1,`dot`],[1,`label`],[1,`kind`],[1,`id`],[1,`sr-only`],[1,`count`],[`id`,`forms-detail-title`],[`role`,`status`,1,`muted`],[1,`detail-head`],[1,`detail-meta`],[1,`summary`],[1,`badge`],[1,`totals`],[1,`error-summary`],[3,`tool`,`page`,`signalForm`],[1,`action-bar`],[`role`,`group`,`aria-label`,`Form actions`,1,`actions`],[`type`,`button`,1,`small`,3,`click`,`disabled`],[`aria-hidden`,`true`,1,`divider`],[`type`,`button`,1,`small`,3,`armed`,`disabled`],[`aria-hidden`,`true`,1,`spacer`],[`type`,`button`,1,`small`,`danger`,3,`click`,`disabled`],[`type`,`button`,1,`small`,`primary`,3,`click`,`disabled`],[`id`,`forms-writes-off`,1,`muted`],[`role`,`status`,1,`status`],[`role`,`tablist`,`aria-label`,`Form views`,1,`tabs`,3,`keydown`],[`type`,`button`,`role`,`tab`,3,`id`],[`role`,`tabpanel`,1,`panel`,3,`id`],[3,`formId`,`version`,`rpc`],[`type`,`button`,1,`summary-link`,3,`click`],[1,`kind-tag`],[`type`,`button`,`role`,`tab`,3,`click`,`id`],[1,`filters`],[`type`,`search`,`placeholder`,`Filter fields by path`,`aria-label`,`Filter fields by path`,`autocomplete`,`off`,`spellcheck`,`false`,1,`filter`,3,`input`,`keydown.escape`,`value`],[1,`chips`],[`role`,`status`,1,`sr-only`],[`role`,`region`,`aria-label`,`Fields`,`tabindex`,`0`,1,`table-scroll`],[1,`fields`],[`scope`,`col`],[3,`form`,`node`,`version`,`rpc`],[3,`mouseenter`,`mouseleave`],[`scope`,`row`,1,`name`],[`type`,`button`,1,`field`,3,`focus`,`blur`,`click`],[1,`type`],[1,`value`],[1,`status-cell`],[1,`flags`],[1,`warn`],[1,`errors`],[1,`unseen`],[1,`source`],[`colspan`,`5`,1,`muted`,`truncated`],[`colspan`,`5`,1,`no-match`],[`type`,`button`,1,`small`],[3,`closed`,`form`,`node`,`version`,`rpc`],[`what`,`form events on this page`,`limit`,`formTimeline`,3,`dropped`,`max`],[3,`record`,`events`,`recording`],[3,`showField`,`formId`,`version`,`rpc`]],template:function(e,t){e&1&&P(0,EB,4,0,`div`,1)(1,DB,7,0,`div`,2)(2,OB,4,0,`div`,1)(3,kB,5,0,`div`,3)(4,AB,7,2,`div`,3)(5,kV,13,3,`div`,4),e&2&&F(t.rpc()?t.failed()?1:t.loading()?2:t.forms().length?t.visible().length?5:4:3:0)},dependencies:[wz,eB,Nz,Pz,SB,oO,hb],styles:[`.muted[_ngcontent-%COMP%] {
   color: var(--%NS%text-2);
 }
 
@@ -9770,7 +10044,7 @@ code[_ngcontent-%COMP%] {
    .divider[_ngcontent-%COMP%] {
     display: none;
   }
-}`]})},aV=[`filterInput`],oV=(e,t)=>t.file+t.name,sV=(e,t)=>t.file+`:`+t.line,cV=(e,t)=>t.name;function lV(e,t){e&1&&(z(0,`p`,14),A(),z(1,`svg`,26),V(2,`circle`,27)(3,`path`,28),B(),ms(),z(4,`span`),J(5),B()()),e&2&&(M(5),Y(t))}function uV(e,t){if(e&1&&(z(0,`p`,14),A(),z(1,`svg`,26),V(2,`circle`,27)(3,`path`,28),B(),ms(),z(4,`span`)(5,`strong`),J(6),B(),J(7,` Pipe prototypes are patched in the inspected page to count calls and keep the last input and output. Stop recording when you are done. `),B()()),e&2){let e=K();M(6),X(`Recording on `,e.instrumentedPages().length,` page(s).`)}}function dV(e,t){e&1&&(z(0,`div`,15),V(1,`span`,29),z(2,`p`,30),J(3,`Scanning pipes…`),B()())}function fV(e,t){if(e&1){let e=W();z(0,`div`,16)(1,`p`,30),J(2,`Couldn't load pipes`),B(),z(3,`p`,31),J(4,`The devtools server did not answer. Check that it is running.`),B(),z(5,`button`,32),G(`click`,function(){return O(e),k(K().refresh())}),J(6,`Try again`),B()()}}function pV(e,t){e&1&&(z(0,`div`,17)(1,`p`,30),J(2,`No pipes found`),B(),z(3,`p`,31),J(4,` No @Pipe classes were found in the source, and no template uses a built-in pipe yet. `),B()())}function mV(e,t){e&1&&J(0,` Couldn't scan the source again. The list keeps the last scan. `)}function hV(e,t){e&1&&J(0,` Couldn't scan the source. Only pipes seen on the page are listed. `)}function gV(e,t){if(e&1){let e=W();z(0,`div`,33),A(),z(1,`svg`,26),V(2,`circle`,27)(3,`path`,39),B(),ms(),z(4,`span`),P(5,mV,1,0)(6,hV,1,0),B(),z(7,`button`,11),G(`click`,function(){return O(e),k(K(2).refresh())}),J(8,`Try again`),B()()}if(e&2){let e=K(2);M(5),F(e.pipes().length?5:6),M(2),R(`disabled`,e.loading())}}function _V(e,t){e&1&&(z(0,`span`,46),J(1,`stale?`),B())}function vV(e,t){if(e&1&&(z(0,`span`,47),J(1),B()),e&2){K();let e=fv(0);M(),X(``,e.instanceCount,` live`)}}function yV(e,t){e&1&&(z(0,`span`,48),J(1,`built-in`),B())}function bV(e,t){e&1&&(z(0,`span`,48),J(1,`runtime only`),B())}function xV(e,t){e&1&&(z(0,`span`,48),J(1,`NgModule`),B())}function SV(e,t){e&1&&(z(0,`span`,50),J(1,`No source location`),B())}function CV(e,t){if(e&1&&J(0),e&2){let e=K().$implicit;Z(` `,e.file,`:`,e.line,` `)}}function wV(e,t){if(e&1&&(z(0,`span`,51),J(1),B()),e&2){let e=K().$implicit;M(),X(`+`,(e.usageCount??1)-1,` more`)}}function TV(e,t){if(e&1&&(z(0,`span`,51),J(1),B()),e&2){let e=K().$implicit;M(),Z(``,e.usageCount,` `,e.usageCount===1?`use`:`uses`)}}function EV(e,t){if(e&1){let e=W();uv(0),z(1,`li`)(2,`button`,41),G(`click`,function(){let t=O(e).$implicit;return k(K(3).select(t))})(`mouseenter`,function(){O(e);let t=fv(0);return k(K(3).highlightPipe(t))})(`mouseleave`,function(){return O(e),k(K(3).highlight(null))})(`focus`,function(){O(e);let t=fv(0);return k(K(3).highlightPipe(t))})(`blur`,function(){return O(e),k(K(3).highlight(null))}),z(3,`span`,42)(4,`span`,43),J(5),B(),z(6,`span`,44),J(7),B()(),z(8,`span`,45),P(9,_V,2,0,`span`,46),P(10,vV,2,1,`span`,47),P(11,yV,2,0,`span`,48),P(12,bV,2,0,`span`,48),P(13,xV,2,0,`span`,48),z(14,`span`,48),J(15),B()(),z(16,`span`,49),P(17,SV,2,0,`span`,50)(18,CV,1,2),P(19,wV,2,1,`span`,51)(20,TV,2,2,`span`,51),B()()()}if(e&2){let e=t.$implicit,n=K(3),r=dv(n.liveFor(e.name));M(2),q(`selected`,n.isSelected(e)),N(`aria-current`,n.isSelected(e)||null),M(3),Y(e.name),M(2),Y(e.className),M(2),F(r?.stale?9:-1),M(),F(r?10:-1),M(),F(e.builtin?11:-1),M(),F(e.runtime?12:-1),M(),F(e.isStandalone?-1:13),M(),q(`impure`,!e.isPure),M(),Y(e.isPure?`pure`:`impure`),M(2),F(e.runtime?17:18),M(2),F(e.builtin&&(e.usageCount??0)>1?19:!e.builtin&&e.usageCount?20:-1)}}function DV(e,t){if(e&1){let e=W();z(0,`ul`,40),G(`keydown`,function(t){return O(e),k(K(2).onListKey(t))}),I(1,EV,21,16,`li`,null,oV),B()}if(e&2){let e=K(2);M(),L(e.filtered())}}function OV(e,t){e&1&&J(0),e&2&&X(` Nothing matches “`,K(3).filter().trim(),`” in this view. `)}function kV(e,t){e&1&&J(0,` None of the pipes fit this filter. `)}function AV(e,t){if(e&1){let e=W();z(0,`div`,37)(1,`p`,30),J(2,`No pipes match`),B(),z(3,`p`,31),P(4,OV,1,1)(5,kV,1,0),B(),z(6,`button`,32),G(`click`,function(){return O(e),k(K(2).clearFilters())}),J(7,`Clear filters`),B()()}if(e&2){let e=K(2);M(4),F(e.filter().trim()?4:5)}}function jV(e,t){e&1&&(z(0,`span`,48),J(1,`built-in`),B())}function MV(e,t){e&1&&(z(0,`span`,48),J(1,`runtime only`),B())}function NV(e,t){if(e&1&&(z(0,`dt`),J(1,`File`),B(),z(2,`dd`,55),V(3,`app-source-link`,57),B()),e&2){let e=K();M(3),R(`file`,e.file)(`line`,e.line)}}function PV(e,t){if(e&1&&(z(0,`dt`),J(1,`Standalone`),B(),z(2,`dd`),J(3),B()),e&2){let e=K();M(3),Y(e.isStandalone?`Yes`:`No, declared in an NgModule`)}}function FV(e,t){if(e&1&&(z(0,`li`,55),V(1,`app-source-link`,57),B()),e&2){let e=t.$implicit;M(),R(`file`,e.file)(`line`,e.line)}}function IV(e,t){if(e&1&&(z(0,`div`,54)(1,`h3`),J(2,` Used in templates `),z(3,`span`,21),J(4),B()(),z(5,`ul`,58),I(6,FV,2,2,`li`,55,sV),B()()),e&2){let e=K();M(4),Y(e.usageCount),M(2),L(e.usages)}}function LV(e,t){e&1&&(z(0,`p`,59)(1,`span`,46),J(2,`experimental`),B(),J(3,` This pure pipe got an argument whose contents changed while its reference stayed the same, so it may be showing a stale value. `),B())}function RV(e,t){if(e&1){let e=W();z(0,`button`,64),G(`click`,function(){let t=O(e);return k(K(5).highlight(t,!0))})(`mouseenter`,function(){let t=O(e);return k(K(5).highlight(t))})(`mouseleave`,function(){return O(e),k(K(5).highlight(null))})(`focus`,function(){let t=O(e);return k(K(5).highlight(t))})(`blur`,function(){return O(e),k(K(5).highlight(null))}),z(1,`span`,55),J(2),B(),z(3,`span`,65),J(4),B()()}if(e&2){let e=K().$implicit;N(`aria-label`,`Highlight `+e.name+` on the page`),M(2),Y(e.name),M(2),Y(e.count)}}function zV(e,t){if(e&1&&(z(0,`span`,63)(1,`span`,55),J(2),B(),z(3,`span`,65),J(4),B()()),e&2){let e=K().$implicit;M(2),Y(e.name),M(2),Y(e.count)}}function BV(e,t){if(e&1&&(z(0,`li`),P(1,RV,5,3,`button`,62)(2,zV,5,2,`span`,63),B()),e&2){let e,n=t.$implicit;M(),F((e=n.targets?.[0])?1:2,e)}}function VV(e,t){if(e&1&&(z(0,`dt`),J(1,`Time`),B(),z(2,`dd`),J(3),B()),e&2){let e=K(),t=K(4);M(3),rv(` `,t.ms(e.totalMs),` total, `,t.ms(e.totalMs/e.callCount),` average, `,t.ms(e.maxMs??0),` slowest `)}}function HV(e,t){if(e&1&&(z(0,`span`,66),J(1),B()),e&2){let e=K(2);M(),Y(e.lastError)}}function UV(e,t){if(e&1&&(z(0,`dt`),J(1,`Errors`),B(),z(2,`dd`),J(3),P(4,HV,2,1,`span`,66),B()),e&2){let e=K();M(3),X(` `,e.errorCount,` `),M(),F(e.lastError?4:-1)}}function WV(e,t){if(e&1){let e=W();z(0,`button`,64),G(`click`,function(){let t=O(e);return k(K(7).highlight(t,!0))})(`mouseenter`,function(){let t=O(e);return k(K(7).highlight(t))})(`mouseleave`,function(){return O(e),k(K(7).highlight(null))})(`focus`,function(){let t=O(e);return k(K(7).highlight(t))})(`blur`,function(){return O(e),k(K(7).highlight(null))}),z(1,`span`,55),J(2),B()()}if(e&2){let e=K().$implicit;N(`aria-label`,`Highlight `+e.component+` on the page`),M(2),Y(e.component)}}function GV(e,t){if(e&1&&(z(0,`span`,63)(1,`span`,55),J(2),B()()),e&2){let e=K().$implicit;M(2),Y(e.component)}}function KV(e,t){if(e&1&&(z(0,`span`,68),J(1),B()),e&2){let e=K().$implicit,t=K(6);M(),Y(t.ms(e.totalMs))}}function qV(e,t){if(e&1&&(z(0,`span`,69),J(1),B()),e&2){let e=K().$implicit;M(),Y(e.lastCaller)}}function JV(e,t){if(e&1&&(z(0,`li`,67),P(1,WV,3,2,`button`,62)(2,GV,3,1,`span`,63),z(3,`span`,66),J(4),z(5,`span`,68),J(6),B(),P(7,KV,2,1,`span`,68),B(),P(8,qV,2,1,`span`,69),B()),e&2){let e,n=t.$implicit,r=K(6);M(),F((e=n.target)?1:2,e),M(3),Z(` `,r.describe(n.lastArgs),` → `,r.describe(n.lastResult),` `),M(2),X(``,n.callCount,`×`),M(),F(n.totalMs===void 0?-1:7),M(),F(n.lastCaller?8:-1)}}function YV(e,t){if(e&1&&(z(0,`p`,61),J(1),B()),e&2){let e=K(2);M(),Z(` Showing `,e.instances.length,` of `,e.instanceTotal,` instances. `)}}function XV(e,t){if(e&1&&(z(0,`dt`),J(1,`Per instance`),B(),z(2,`dd`)(3,`ul`,58),I(4,JV,9,6,`li`,67,Dg),B(),P(6,YV,2,2,`p`,61),B()),e&2){let e=K();M(4),L(e.instances),M(2),F(e.instanceTotal?6:-1)}}function ZV(e,t){if(e&1&&(z(0,`dt`),J(1,`Last caller`),B(),z(2,`dd`,66),J(3),B()),e&2){let e=K();M(3),Y(e.lastCaller)}}function QV(e,t){if(e&1&&(z(0,`dt`),J(1,`Calls`),B(),z(2,`dd`),J(3),B(),P(4,VV,4,3),P(5,UV,5,2),z(6,`dt`),J(7,`Last input`),B(),z(8,`dd`,66),J(9),B(),z(10,`dt`),J(11,`Last output`),B(),z(12,`dd`,66),J(13),B(),P(14,XV,7,1),P(15,ZV,4,1)),e&2){let e=t,n=K(4);M(3),Y(e.callCount),M(),F(e.totalMs===void 0?-1:4),M(),F(e.errorCount?5:-1),M(4),Y(n.describe(e.lastArgs)),M(4),Y(n.describe(e.lastResult)),M(),F(e.instances?.length?14:-1),M(),F(e.lastCaller?15:-1)}}function $V(e,t){e&1&&(z(0,`dt`),J(1,`Calls`),B(),z(2,`dd`,70),J(3,`None recorded yet.`),B())}function eH(e,t){e&1&&(z(0,`p`,61),J(1,` The stale check is off for this pipe: it couldn't read the compiled template, which happens in minified builds. `),B())}function tH(e,t){e&1&&(z(0,`p`,61),J(1,`Turn on “Record calls” to see call counts and values.`),B())}function nH(e,t){if(e&1&&(P(0,LV,4,0,`p`,59),z(1,`dl`)(2,`dt`),J(3,`Instances`),B(),z(4,`dd`),J(5),B(),z(6,`dt`),J(7,`Used by`),B(),z(8,`dd`)(9,`ul`,60),I(10,BV,3,1,`li`,null,cV),B()(),P(12,QV,16,7)(13,$V,4,0),B(),P(14,eH,2,0,`p`,61),P(15,tH,2,0,`p`,61)),e&2){let e,n=t,r=K(3);F(n.stale?0:-1),M(5),Y(n.instanceCount),M(5),L(n.components),M(2),F((e=n.call)?12:r.instrumenting()?13:-1,e),M(2),F(n.staleCheck===`unavailable`?14:-1),M(),F(!n.call&&!r.instrumenting()?15:-1)}}function rH(e,t){e&1&&(z(0,`p`,56),J(1,` Not in use on the connected page. Open a view that uses it, or connect the app. `),B())}function iH(e,t){if(e&1&&(z(0,`header`,52)(1,`h2`,53),J(2),B(),z(3,`span`,48),J(4),B(),P(5,jV,2,0,`span`,48),P(6,MV,2,0,`span`,48),B(),z(7,`div`,54)(8,`h3`),J(9,`Declaration`),B(),z(10,`dl`)(11,`dt`),J(12,`Class`),B(),z(13,`dd`,55),J(14),B(),z(15,`dt`),J(16,`Source`),B(),z(17,`dd`),J(18),B(),P(19,NV,4,2),P(20,PV,4,1),z(21,`dt`),J(22,`Pure`),B(),z(23,`dd`),J(24),B()()(),P(25,IV,8,1,`div`,54),z(26,`div`,54)(27,`h3`),J(28,`Live on the page`),B(),P(29,nH,16,5)(30,rH,2,0,`p`,56),B()),e&2){let e,n=t,r=K(2);M(2),Y(n.name),M(),q(`impure`,!n.isPure),M(),Y(n.isPure?`pure`:`impure`),M(),F(n.builtin?5:-1),M(),F(n.runtime?6:-1),M(8),Y(n.className),M(4),Y(r.sourceLabel(n)),M(),F(!n.builtin&&!n.runtime?19:-1),M(),F(n.runtime?-1:20),M(4),X(` `,n.isPure?`Yes, reruns only when an input changes`:`No, reruns on every check`,` `),M(),F(n.usages?.length?25:-1),M(4),F((e=r.liveFor(n.name))?29:30,e)}}function aH(e,t){e&1&&(z(0,`h2`,71),J(1,`Pipe details`),B(),z(2,`div`,72)(3,`p`,30),J(4,`Pick a pipe`),B(),z(5,`p`,31),J(6,` See where it is declared, which components use it and what it last returned. `),B()())}function oH(e,t){if(e&1&&(P(0,gV,9,2,`div`,33),z(1,`div`,34)(2,`div`,35),P(3,DV,3,0,`ul`,36)(4,AV,8,1,`div`,37),B(),z(5,`section`,38),P(6,iH,31,13)(7,aH,7,0),B()()),e&2){let e,t=K();F(t.loadFailed()?0:-1),M(3),F(t.filtered().length?3:4),M(3),F((e=t.selected())?6:7,e)}}function sH(e,t){if(e&1&&(z(0,`p`,61),J(1),B()),e&2){let e=K(2);M(),Z(`Showing `,e.async().length,` of `,t,` subscriptions.`)}}function cH(e,t){if(e&1){let e=W();z(0,`button`,80),G(`click`,function(){let t=O(e);return k(K(3).highlight(t))})(`focus`,function(){let t=O(e);return k(K(3).highlight(t))})(`blur`,function(){return O(e),k(K(3).highlight(null))}),J(1),B()}if(e&2){let e=K().$implicit;N(`aria-label`,`Highlight `+e.component+` on the page`),M(),X(` `,e.component,` `)}}function lH(e,t){if(e&1&&(z(0,`span`,78),J(1),B()),e&2){let e=K().$implicit;M(),Y(e.component)}}function uH(e,t){e&1&&(z(0,`span`,48),J(1,`no source`),B())}function dH(e,t){e&1&&(z(0,`span`,46),J(1,`duplicate subscription`),B())}function fH(e,t){e&1&&(z(0,`span`,46),J(1,`resubscribing`),B())}function pH(e,t){if(e&1){let e=W();z(0,`li`,76),G(`mouseenter`,function(){let t=O(e).$implicit;return k(K(2).highlight(t.target))})(`mouseleave`,function(){return O(e),k(K(2).highlight(null))}),P(1,cH,2,2,`button`,77)(2,lH,2,1,`span`,78),P(3,uH,2,0,`span`,48),P(4,dH,2,0,`span`,46),P(5,fH,2,0,`span`,46),z(6,`span`,79),J(7),B()()}if(e&2){let e,n=t.$implicit;M(),F((e=n.target)?1:2,e),M(2),F(n.hasSource?-1:3),M(),F(n.duplicate?4:-1),M(),F(n.resubscribing?5:-1),M(2),Y(n.latestValue??`no value yet`)}}function mH(e,t){if(e&1&&(z(0,`section`,18)(1,`h2`,73),J(2,` Async subscriptions `),z(3,`span`,21),J(4),B()(),z(5,`p`,61),J(6,` Each `),z(7,`span`,55),J(8,`| async`),B(),J(9,` subscribes on its own. Two on the same source mean the work runs twice. A source that changes on every check, like `),z(10,`span`,55),J(11,`getData() | async`),B(),J(12,`, resubscribes each time. `),B(),P(13,sH,2,2,`p`,61),z(14,`ul`,74),I(15,pH,8,5,`li`,75,Dg),B()()),e&2){let e,t=K();M(4),Y(t.async().length),M(9),F((e=t.asyncTotal())?13:-1,e),M(2),L(t.async())}}function hH(e,t){e&1&&(z(0,`span`,21),J(1),B()),e&2&&(M(),Y(t.length))}function gH(e,t){e&1&&(z(0,`p`,22),J(1,`Couldn't run the lint check. Try Refresh.`),B())}function _H(e,t){e&1&&(z(0,`p`,23),J(1,`Checking…`),B())}function vH(e,t){e&1&&(z(0,`p`,24),J(1,`No problems found.`),B())}function yH(e,t){if(e&1){let e=W();z(0,`button`,90),G(`click`,function(){O(e),K();let t=fv(6);return k(K(2).showPipe(t))}),z(1,`span`,91),J(2,`Show pipe `),B(),J(3),B()}if(e&2){let e=K().$implicit;M(3),X(``,e.pipe,` `)}}function bH(e,t){if(e&1&&J(0),e&2){let e=K().$implicit;X(` `,e.pipe,` `)}}function xH(e,t){if(e&1&&(z(0,`li`,81)(1,`div`,82)(2,`span`,83),J(3),B(),z(4,`code`,84),J(5),B(),uv(6),z(7,`span`,85),P(8,yH,4,1,`button`,86)(9,bH,1,1),J(10,` · `),V(11,`app-source-link`,57),B()(),z(12,`p`,87),J(13),B(),z(14,`p`,88)(15,`span`,89),J(16,`Fix`),B(),J(17),B()()),e&2){let e=t.$implicit;M(2),N(`data-tone`,e.severity),M(),Y(e.severity),M(2),Y(e.rule),M();let n=dv(K(2).pipeFor(e));M(2),F(n?8:9),M(3),R(`file`,e.file)(`line`,e.line),M(2),Y(e.message),M(4),X(` `,e.fix)}}function SH(e,t){if(e&1&&(z(0,`ul`,25),I(1,xH,18,9,`li`,81,Dg),B()),e&2){let e=K();M(),L(e.lint())}}var CH=5e3,wH=[{value:`all`,label:`All pipes`},{value:`custom`,label:`Custom`},{value:`builtin`,label:`Built-in`},{value:`runtime`,label:`Runtime only`},{value:`impure`,label:`Impure`},{value:`live`,label:`On the page`}],TH=class e{destroyRef=E(ws);host=E(Nl);injector=E(Ss);filterInput=Kv(`filterInput`);rpc=$(null);kindOptions=wH;pipes=j([]);filter=j(``);kind=j(`all`);loading=j(!1);loadFailed=j(!1);selected=j(null);live=j([]);async=j([]);asyncTotal=j(void 0);lint=j(null);lintFailed=j(!1);instrumentedPages=j([]);instrumenting=Q(()=>this.instrumentedPages().length>0);pendingRecord=j(null);recordMessage=j(null);recordLabel=Q(()=>{let e=this.pendingRecord();return e===null?this.instrumenting()?`Stop recording`:`Record calls`:e?`Starting…`:`Stopping…`});pendingTimer;liveByName=Q(()=>new Map(this.live().map(e=>[e.name,e])));allPipes=Q(()=>{let e=this.pipes(),t=new Set(e.map(e=>e.name)),n=this.live().filter(e=>!t.has(e.name)).map(e=>({name:e.name,className:e.className,file:``,line:0,isStandalone:!0,isPure:e.isPure,runtime:!0}));return n.length?[...e,...n]:e});filtered=Q(()=>{let e=this.filter(),t=this.kind()??`all`;return this.allPipes().filter(n=>this.fitsKind(n,t)&&this.fitsQuery(n,e))});pipesByName=Q(()=>{let e=new Map;for(let t of this.allPipes())e.set(t.name,[...e.get(t.name)??[],t]);return e});unsubscribe;constructor(){dc(()=>{let e=this.rpc();e&&(this.refresh(),this.loadLive(e))}),this.destroyRef.onDestroy(()=>{this.unsubscribe?.(),clearTimeout(this.pendingTimer),this.highlight(null)})}async refresh(){let e=this.rpc();if(e){this.loading.set(!0),this.loadFailed.set(!1);try{let t=await e.scope(`pangular`).rpc.call(`get-pipes`);this.pipes.set(t);let n=this.selected();if(n){let e=this.allPipes().find(e=>e.name===n.name&&e.file===n.file);this.selected.set(e??null)}}catch{this.loadFailed.set(!0)}finally{this.loading.set(!1)}this.loadLint(e)}}async loadLint(e){this.lintFailed.set(!1);try{let t=await e.scope(`pangular`).rpc.call(`pipe-lint`);this.lint.set(t)}catch{this.lintFailed.set(!0)}}async loadLive(e){try{let t=await e.scope(`pangular`).rpc.sharedState(`pipe-usage`);if(this.destroyRef.destroyed)return;let n=e=>{let t=e,n=uE(),r=(n?t?.pages?.find(e=>e.pageId===n):void 0)??t;this.live.set(r?.pipes??[]);let i=this.selected();i?.runtime&&!this.liveByName().has(i.name)&&this.selected.set(null),this.async.set(r?.async??[]),this.asyncTotal.set(r?.asyncTotal);let a=t?.instrumented??[];this.instrumentedPages.set(a),this.pendingRecord()===a.length>0&&this.settleRecord(null)};n(t.value()),this.unsubscribe?.(),this.unsubscribe=t.on(`updated`,n)}catch{}}async toggleInstrument(){let e=this.rpc();if(!e||this.pendingRecord()!==null)return;let t=!this.instrumenting();this.recordMessage.set(null),this.pendingRecord.set(t);let n;try{let r=t?{pageId:uE()??void 0,on:t}:{on:t};n=await e.scope(`pangular`).rpc.call(`request-instrument-pipes`,r)}catch{this.settleRecord(`Couldn't reach the devtools server. Try again.`);return}if(this.pendingRecord()===t){if(n?.pages===0){this.settleRecord(`No page is connected. Open your app in the browser with the devtools running, then record again.`);return}clearTimeout(this.pendingTimer),this.pendingTimer=setTimeout(()=>{this.pendingRecord()===t&&this.settleRecord(t?`No page confirmed recording. Reload the app and try again.`:`No page confirmed it stopped recording. Reload the app to stop it.`)},CH)}}settleRecord(e){clearTimeout(this.pendingTimer),this.pendingRecord.set(null),e!==null&&this.recordMessage.set(e)}sourceLabel(e){return e.builtin?`@angular/common`:e.runtime?`Seen on the page only`:`This project`}liveFor(e){return this.liveByName().get(e)}ms(e){return`${e<10?e.toFixed(2):Math.round(e)} ms`}describe(e){if(Array.isArray(e))return e.map(e=>this.describe(e)).join(`, `);if(typeof e==`string`)return e.length>80?`${e.slice(0,80)}…`:e;try{let t=JSON.stringify(e);return t&&t.length>120?`${t.slice(0,120)}…`:t??String(e)}catch{return String(e)}}isSelected(e){let t=this.selected();return t!==null&&t.name===e.name&&t.file===e.file}select(e){this.selected.set(this.isSelected(e)?null:e)}pipeFor(e){let t=this.pipesByName().get(e.pipe);return t?.length?t.find(t=>t.file===e.file)??t[0]:null}showPipe(e){this.fitsQuery(e,this.filter())||this.filter.set(``),this.fitsKind(e,this.kind()??`all`)||this.kind.set(`all`),this.selected.set(e),zd(()=>{let e=this.host.nativeElement;e.querySelector(`.row.selected`)?.scrollIntoView?.({block:`nearest`}),e.querySelector(`#pipe-detail-title`)?.focus()},{injector:this.injector})}fitsKind(e,t){return t===`custom`?!e.builtin&&!e.runtime:t===`builtin`?!!e.builtin:t===`runtime`?!!e.runtime:t===`impure`?!e.isPure:t!==`live`||this.liveByName().has(e.name)}fitsQuery(e,t){let n=t.trim().toLowerCase();return!n||e.name.toLowerCase().includes(n)||e.className.toLowerCase().includes(n)||e.file.toLowerCase().includes(n)}clearFilters(){this.filter.set(``),this.kind.set(`all`),this.filterInput()?.nativeElement.focus()}highlightPipe(e){this.highlight(e?.components.find(e=>e.targets?.length)?.targets?.[0])}highlight(e,t=!1){let n=this.rpc();n&&n.scope(`pangular`).rpc.call(`request-page-highlight`,e?{...e,...t?{reveal:t}:{}}:null).catch(()=>{})}onListKey(e){if(![`ArrowDown`,`ArrowUp`,`Home`,`End`].includes(e.key))return;let t=Array.from(this.host.nativeElement.querySelectorAll(`[data-pipe-row]`));if(!t.length)return;let n=t.indexOf(document.activeElement),r=n;r=e.key===`ArrowDown`?Math.min(n+1,t.length-1):e.key===`ArrowUp`?Math.max(n-1,0):e.key===`Home`?0:t.length-1,e.preventDefault(),t[r]?.focus()}static ɵfac=function(t){return new(t||e)};static ɵcmp=Wh({type:e,selectors:[[`app-pipes-inspector`]],viewQuery:function(e,t){e&1&&c_(t.filterInput,aV,5),e&2&&l_()},inputs:{rpc:[1,`rpc`]},decls:33,vars:18,consts:[[`filterInput`,``],[1,`intro`],[1,`toolbar`],[1,`search`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`,1,`search-icon`],[`cx`,`11`,`cy`,`11`,`r`,`7`],[`d`,`m20 20-3.5-3.5`],[`type`,`search`,`placeholder`,`Find a pipe, class or file…`,`aria-label`,`Find a pipe, class or file`,`autocomplete`,`off`,`spellcheck`,`false`,3,`input`,`keydown.escape`,`value`],[`ariaLabel`,`Show pipes`,3,`valueChange`,`options`,`value`],[`aria-live`,`polite`,1,`total`],[1,`actions`],[`type`,`button`,3,`click`,`disabled`],[`type`,`button`,1,`record`,3,`click`],[`aria-hidden`,`true`,1,`rec-dot`],[`role`,`status`,1,`notice`],[`role`,`status`,1,`state`],[`role`,`alert`,1,`state`],[1,`state`],[`aria-labelledby`,`async-title`,1,`section`],[`aria-labelledby`,`lint-title`,1,`section`],[`id`,`lint-title`],[1,`pill`],[`role`,`alert`,1,`empty-line`],[`role`,`status`,1,`empty-line`],[1,`empty-line`,`ok`],[1,`findings`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`],[`cx`,`12`,`cy`,`12`,`r`,`9`],[`d`,`M12 11v5M12 8h.01`],[`aria-hidden`,`true`,1,`spinner`],[1,`state-title`],[1,`state-hint`],[`type`,`button`,3,`click`],[`role`,`alert`,1,`notice`,`error`],[1,`layout`],[1,`list-wrap`],[`aria-label`,`Pipes`,1,`pipe-list`],[`role`,`status`,1,`state`,`compact`],[`id`,`pipe-detail`,`aria-labelledby`,`pipe-detail-title`,1,`detail`],[`d`,`M12 8v5M12 16h.01`],[`aria-label`,`Pipes`,1,`pipe-list`,3,`keydown`],[`type`,`button`,`data-pipe-row`,``,`aria-controls`,`pipe-detail`,1,`row`,3,`click`,`mouseenter`,`mouseleave`,`focus`,`blur`],[1,`row-main`],[1,`name`,`mono`],[1,`sub`,`mono`],[1,`row-meta`],[1,`chip`,`warn`],[1,`chip`,`live`],[1,`chip`],[1,`row-file`,`mono`],[1,`no-source`],[1,`more`],[1,`detail-head`],[`id`,`pipe-detail-title`,`tabindex`,`-1`,1,`mono`],[1,`block`],[1,`mono`],[1,`empty-line`],[3,`file`,`line`],[1,`sites`],[`role`,`note`,1,`warning`],[1,`chips`],[1,`hint`],[`type`,`button`,1,`component`],[1,`component`],[`type`,`button`,1,`component`,3,`click`,`mouseenter`,`mouseleave`,`focus`,`blur`],[1,`count`],[1,`mono`,`value`],[1,`instance`],[1,`calls`],[1,`mono`,`value`,`caller`],[1,`muted`],[`id`,`pipe-detail-title`,1,`visually-hidden`],[1,`state`,`compact`],[`id`,`async-title`],[1,`async-list`],[1,`async-row`],[1,`async-row`,3,`mouseenter`,`mouseleave`],[`type`,`button`,1,`component-name`,`mono`],[1,`mono`,`component-name`],[1,`mono`,`value`,`latest`],[`type`,`button`,1,`component-name`,`mono`,3,`click`,`focus`,`blur`],[1,`finding`],[1,`finding-head`],[1,`severity`],[1,`mono`,`rule`],[1,`where`,`mono`],[`type`,`button`,1,`pipe-link`],[1,`finding-message`],[1,`finding-fix`],[1,`fix-label`],[`type`,`button`,1,`pipe-link`,3,`click`],[1,`sr-only`]],template:function(e,t){if(e&1){let e=W();z(0,`p`,1),J(1,` Pipes declared in your source, the built-in pipes your templates use and library pipes seen on the page. Live data shows which components use each pipe on the page; turn on recording to capture calls and the last input and output. `),B(),z(2,`div`,2)(3,`div`,3),A(),z(4,`svg`,4),V(5,`circle`,5)(6,`path`,6),B(),ms(),z(7,`input`,7,0),G(`input`,function(e){return t.filter.set(e.target.value)})(`keydown.escape`,function(){return t.filter.set(``)}),B()(),z(9,`app-select`,8),cv(`valueChange`,function(n){return O(e),sv(t.kind,n)||(t.kind=n),k(n)}),B(),z(10,`span`,9),J(11),B(),z(12,`div`,10)(13,`button`,11),G(`click`,function(){return t.refresh()}),J(14,`Refresh`),B(),z(15,`button`,12),G(`click`,function(){return t.toggleInstrument()}),V(16,`span`,13),J(17),B()()(),P(18,lV,6,1,`p`,14),P(19,uV,8,1,`p`,14),P(20,dV,4,0,`div`,15)(21,fV,7,0,`div`,16)(22,pV,5,0,`div`,17)(23,oH,8,3),P(24,mH,17,2,`section`,18),z(25,`section`,19)(26,`h2`,20),J(27,` Lint `),P(28,hH,2,1,`span`,21),B(),P(29,gH,2,0,`p`,22)(30,_H,2,0,`p`,23)(31,vH,2,0,`p`,24)(32,SH,3,0,`ul`,25),B()}if(e&2){let e,n;M(7),R(`value`,t.filter()),M(2),R(`options`,t.kindOptions),ov(`value`,t.kind),M(2),Z(``,t.filtered().length,` of `,t.allPipes().length),M(2),R(`disabled`,t.loading()),M(2),q(`on`,t.instrumenting()),N(`aria-pressed`,t.instrumenting())(`aria-busy`,t.pendingRecord()!==null)(`aria-disabled`,t.pendingRecord()!==null),M(2),X(` `,t.recordLabel(),` `),M(),F((e=t.recordMessage())?18:-1,e),M(),F(t.instrumenting()?19:-1),M(),F(t.loading()&&t.allPipes().length===0?20:t.loadFailed()&&t.allPipes().length===0?21:t.allPipes().length===0?22:23),M(4),F(t.async().length>0?24:-1),M(4),F((n=t.lint())?28:-1,n),M(),F(t.lintFailed()?29:t.lint()===null?30:t.lint().length?32:31)}},dependencies:[GD,TO],styles:[`[_nghost-%COMP%] {
+}`]})},IV=[`filterInput`],LV=(e,t)=>t.file+t.name,RV=(e,t)=>t.file+`:`+t.line,zV=(e,t)=>t.name;function BV(e,t){e&1&&(z(0,`p`,14),A(),z(1,`svg`,26),V(2,`circle`,27)(3,`path`,28),B(),ms(),z(4,`span`),J(5),B()()),e&2&&(M(5),Y(t))}function VV(e,t){if(e&1&&(z(0,`p`,14),A(),z(1,`svg`,26),V(2,`circle`,27)(3,`path`,28),B(),ms(),z(4,`span`)(5,`strong`),J(6),B(),J(7,` Pipe prototypes are patched in the inspected page to count calls and keep the last input and output. Stop recording when you are done. `),B()()),e&2){let e=K();M(6),X(`Recording on `,e.instrumentedPages().length,` page(s).`)}}function HV(e,t){e&1&&(z(0,`div`,15),V(1,`span`,29),z(2,`p`,30),J(3,`Scanning pipes…`),B()())}function UV(e,t){if(e&1){let e=W();z(0,`div`,16)(1,`p`,30),J(2,`Couldn't load pipes`),B(),z(3,`p`,31),J(4,`The devtools server did not answer. Check that it is running.`),B(),z(5,`button`,32),G(`click`,function(){return O(e),k(K().refresh())}),J(6,`Try again`),B()()}}function WV(e,t){e&1&&(z(0,`div`,17)(1,`p`,30),J(2,`No pipes found`),B(),z(3,`p`,31),J(4,` No @Pipe classes were found in the source, and no template uses a built-in pipe yet. `),B()())}function GV(e,t){e&1&&J(0,` Couldn't scan the source again. The list keeps the last scan. `)}function KV(e,t){e&1&&J(0,` Couldn't scan the source. Only pipes seen on the page are listed. `)}function qV(e,t){if(e&1){let e=W();z(0,`div`,33),A(),z(1,`svg`,26),V(2,`circle`,27)(3,`path`,39),B(),ms(),z(4,`span`),P(5,GV,1,0)(6,KV,1,0),B(),z(7,`button`,11),G(`click`,function(){return O(e),k(K(2).refresh())}),J(8,`Try again`),B()()}if(e&2){let e=K(2);M(5),F(e.pipes().length?5:6),M(2),R(`disabled`,e.loading())}}function JV(e,t){e&1&&(z(0,`span`,46),J(1,`stale?`),B())}function YV(e,t){if(e&1&&(z(0,`span`,47),J(1),B()),e&2){K();let e=fv(0);M(),X(``,e.instanceCount,` live`)}}function XV(e,t){e&1&&(z(0,`span`,48),J(1,`built-in`),B())}function ZV(e,t){e&1&&(z(0,`span`,48),J(1,`runtime only`),B())}function QV(e,t){e&1&&(z(0,`span`,48),J(1,`NgModule`),B())}function $V(e,t){e&1&&(z(0,`span`,50),J(1,`No source location`),B())}function eH(e,t){if(e&1&&J(0),e&2){let e=K().$implicit;Z(` `,e.file,`:`,e.line,` `)}}function tH(e,t){if(e&1&&(z(0,`span`,51),J(1),B()),e&2){let e=K().$implicit;M(),X(`+`,(e.usageCount??1)-1,` more`)}}function nH(e,t){if(e&1&&(z(0,`span`,51),J(1),B()),e&2){let e=K().$implicit;M(),Z(``,e.usageCount,` `,e.usageCount===1?`use`:`uses`)}}function rH(e,t){if(e&1){let e=W();uv(0),z(1,`li`)(2,`button`,41),G(`click`,function(){let t=O(e).$implicit;return k(K(3).select(t))})(`mouseenter`,function(){O(e);let t=fv(0);return k(K(3).highlightPipe(t))})(`mouseleave`,function(){return O(e),k(K(3).highlight(null))})(`focus`,function(){O(e);let t=fv(0);return k(K(3).highlightPipe(t))})(`blur`,function(){return O(e),k(K(3).highlight(null))}),z(3,`span`,42)(4,`span`,43),J(5),B(),z(6,`span`,44),J(7),B()(),z(8,`span`,45),P(9,JV,2,0,`span`,46),P(10,YV,2,1,`span`,47),P(11,XV,2,0,`span`,48),P(12,ZV,2,0,`span`,48),P(13,QV,2,0,`span`,48),z(14,`span`,48),J(15),B()(),z(16,`span`,49),P(17,$V,2,0,`span`,50)(18,eH,1,2),P(19,tH,2,1,`span`,51)(20,nH,2,2,`span`,51),B()()()}if(e&2){let e=t.$implicit,n=K(3),r=dv(n.liveFor(e.name));M(2),q(`selected`,n.isSelected(e)),N(`aria-current`,n.isSelected(e)||null),M(3),Y(e.name),M(2),Y(e.className),M(2),F(r?.stale?9:-1),M(),F(r?10:-1),M(),F(e.builtin?11:-1),M(),F(e.runtime?12:-1),M(),F(e.isStandalone?-1:13),M(),q(`impure`,!e.isPure),M(),Y(e.isPure?`pure`:`impure`),M(2),F(e.runtime?17:18),M(2),F(e.builtin&&(e.usageCount??0)>1?19:!e.builtin&&e.usageCount?20:-1)}}function iH(e,t){if(e&1){let e=W();z(0,`ul`,40),G(`keydown`,function(t){return O(e),k(K(2).onListKey(t))}),I(1,rH,21,16,`li`,null,LV),B()}if(e&2){let e=K(2);M(),L(e.filtered())}}function aH(e,t){e&1&&J(0),e&2&&X(` Nothing matches “`,K(3).filter().trim(),`” in this view. `)}function oH(e,t){e&1&&J(0,` None of the pipes fit this filter. `)}function sH(e,t){if(e&1){let e=W();z(0,`div`,37)(1,`p`,30),J(2,`No pipes match`),B(),z(3,`p`,31),P(4,aH,1,1)(5,oH,1,0),B(),z(6,`button`,32),G(`click`,function(){return O(e),k(K(2).clearFilters())}),J(7,`Clear filters`),B()()}if(e&2){let e=K(2);M(4),F(e.filter().trim()?4:5)}}function cH(e,t){e&1&&(z(0,`span`,48),J(1,`built-in`),B())}function lH(e,t){e&1&&(z(0,`span`,48),J(1,`runtime only`),B())}function uH(e,t){if(e&1&&(z(0,`dt`),J(1,`File`),B(),z(2,`dd`,55),V(3,`app-source-link`,57),B()),e&2){let e=K();M(3),R(`file`,e.file)(`line`,e.line)}}function dH(e,t){if(e&1&&(z(0,`dt`),J(1,`Standalone`),B(),z(2,`dd`),J(3),B()),e&2){let e=K();M(3),Y(e.isStandalone?`Yes`:`No, declared in an NgModule`)}}function fH(e,t){if(e&1&&(z(0,`li`,55),V(1,`app-source-link`,57),B()),e&2){let e=t.$implicit;M(),R(`file`,e.file)(`line`,e.line)}}function pH(e,t){if(e&1&&(z(0,`div`,54)(1,`h3`),J(2,` Used in templates `),z(3,`span`,21),J(4),B()(),z(5,`ul`,58),I(6,fH,2,2,`li`,55,RV),B()()),e&2){let e=K();M(4),Y(e.usageCount),M(2),L(e.usages)}}function mH(e,t){e&1&&(z(0,`p`,59)(1,`span`,46),J(2,`experimental`),B(),J(3,` This pure pipe got an argument whose contents changed while its reference stayed the same, so it may be showing a stale value. `),B())}function hH(e,t){if(e&1){let e=W();z(0,`button`,64),G(`click`,function(){let t=O(e);return k(K(5).highlight(t,!0))})(`mouseenter`,function(){let t=O(e);return k(K(5).highlight(t))})(`mouseleave`,function(){return O(e),k(K(5).highlight(null))})(`focus`,function(){let t=O(e);return k(K(5).highlight(t))})(`blur`,function(){return O(e),k(K(5).highlight(null))}),z(1,`span`,55),J(2),B(),z(3,`span`,65),J(4),B()()}if(e&2){let e=K().$implicit;N(`aria-label`,`Highlight `+e.name+` on the page`),M(2),Y(e.name),M(2),Y(e.count)}}function gH(e,t){if(e&1&&(z(0,`span`,63)(1,`span`,55),J(2),B(),z(3,`span`,65),J(4),B()()),e&2){let e=K().$implicit;M(2),Y(e.name),M(2),Y(e.count)}}function _H(e,t){if(e&1&&(z(0,`li`),P(1,hH,5,3,`button`,62)(2,gH,5,2,`span`,63),B()),e&2){let e,n=t.$implicit;M(),F((e=n.targets?.[0])?1:2,e)}}function vH(e,t){if(e&1&&(z(0,`dt`),J(1,`Time`),B(),z(2,`dd`),J(3),B()),e&2){let e=K(),t=K(4);M(3),rv(` `,t.ms(e.totalMs),` total, `,t.ms(e.totalMs/e.callCount),` average, `,t.ms(e.maxMs??0),` slowest `)}}function yH(e,t){if(e&1&&(z(0,`span`,66),J(1),B()),e&2){let e=K(2);M(),Y(e.lastError)}}function bH(e,t){if(e&1&&(z(0,`dt`),J(1,`Errors`),B(),z(2,`dd`),J(3),P(4,yH,2,1,`span`,66),B()),e&2){let e=K();M(3),X(` `,e.errorCount,` `),M(),F(e.lastError?4:-1)}}function xH(e,t){if(e&1){let e=W();z(0,`button`,64),G(`click`,function(){let t=O(e);return k(K(7).highlight(t,!0))})(`mouseenter`,function(){let t=O(e);return k(K(7).highlight(t))})(`mouseleave`,function(){return O(e),k(K(7).highlight(null))})(`focus`,function(){let t=O(e);return k(K(7).highlight(t))})(`blur`,function(){return O(e),k(K(7).highlight(null))}),z(1,`span`,55),J(2),B()()}if(e&2){let e=K().$implicit;N(`aria-label`,`Highlight `+e.component+` on the page`),M(2),Y(e.component)}}function SH(e,t){if(e&1&&(z(0,`span`,63)(1,`span`,55),J(2),B()()),e&2){let e=K().$implicit;M(2),Y(e.component)}}function CH(e,t){if(e&1&&(z(0,`span`,68),J(1),B()),e&2){let e=K().$implicit,t=K(6);M(),Y(t.ms(e.totalMs))}}function wH(e,t){if(e&1&&(z(0,`span`,69),J(1),B()),e&2){let e=K().$implicit;M(),Y(e.lastCaller)}}function TH(e,t){if(e&1&&(z(0,`li`,67),P(1,xH,3,2,`button`,62)(2,SH,3,1,`span`,63),z(3,`span`,66),J(4),z(5,`span`,68),J(6),B(),P(7,CH,2,1,`span`,68),B(),P(8,wH,2,1,`span`,69),B()),e&2){let e,n=t.$implicit,r=K(6);M(),F((e=n.target)?1:2,e),M(3),Z(` `,r.describe(n.lastArgs),` → `,r.describe(n.lastResult),` `),M(2),X(``,n.callCount,`×`),M(),F(n.totalMs===void 0?-1:7),M(),F(n.lastCaller?8:-1)}}function EH(e,t){if(e&1&&(z(0,`p`,61),J(1),B()),e&2){let e=K(2);M(),Z(` Showing `,e.instances.length,` of `,e.instanceTotal,` instances. `)}}function DH(e,t){if(e&1&&(z(0,`dt`),J(1,`Per instance`),B(),z(2,`dd`)(3,`ul`,58),I(4,TH,9,6,`li`,67,Dg),B(),P(6,EH,2,2,`p`,61),B()),e&2){let e=K();M(4),L(e.instances),M(2),F(e.instanceTotal?6:-1)}}function OH(e,t){if(e&1&&(z(0,`dt`),J(1,`Last caller`),B(),z(2,`dd`,66),J(3),B()),e&2){let e=K();M(3),Y(e.lastCaller)}}function kH(e,t){if(e&1&&(z(0,`dt`),J(1,`Calls`),B(),z(2,`dd`),J(3),B(),P(4,vH,4,3),P(5,bH,5,2),z(6,`dt`),J(7,`Last input`),B(),z(8,`dd`,66),J(9),B(),z(10,`dt`),J(11,`Last output`),B(),z(12,`dd`,66),J(13),B(),P(14,DH,7,1),P(15,OH,4,1)),e&2){let e=t,n=K(4);M(3),Y(e.callCount),M(),F(e.totalMs===void 0?-1:4),M(),F(e.errorCount?5:-1),M(4),Y(n.describe(e.lastArgs)),M(4),Y(n.describe(e.lastResult)),M(),F(e.instances?.length?14:-1),M(),F(e.lastCaller?15:-1)}}function AH(e,t){e&1&&(z(0,`dt`),J(1,`Calls`),B(),z(2,`dd`,70),J(3,`None recorded yet.`),B())}function jH(e,t){e&1&&(z(0,`p`,61),J(1,` The stale check is off for this pipe: it couldn't read the compiled template, which happens in minified builds. `),B())}function MH(e,t){e&1&&(z(0,`p`,61),J(1,`Turn on “Record calls” to see call counts and values.`),B())}function NH(e,t){if(e&1&&(P(0,mH,4,0,`p`,59),z(1,`dl`)(2,`dt`),J(3,`Instances`),B(),z(4,`dd`),J(5),B(),z(6,`dt`),J(7,`Used by`),B(),z(8,`dd`)(9,`ul`,60),I(10,_H,3,1,`li`,null,zV),B()(),P(12,kH,16,7)(13,AH,4,0),B(),P(14,jH,2,0,`p`,61),P(15,MH,2,0,`p`,61)),e&2){let e,n=t,r=K(3);F(n.stale?0:-1),M(5),Y(n.instanceCount),M(5),L(n.components),M(2),F((e=n.call)?12:r.instrumenting()?13:-1,e),M(2),F(n.staleCheck===`unavailable`?14:-1),M(),F(!n.call&&!r.instrumenting()?15:-1)}}function PH(e,t){e&1&&(z(0,`p`,56),J(1,` Not in use on the connected page. Open a view that uses it, or connect the app. `),B())}function FH(e,t){if(e&1&&(z(0,`header`,52)(1,`h2`,53),J(2),B(),z(3,`span`,48),J(4),B(),P(5,cH,2,0,`span`,48),P(6,lH,2,0,`span`,48),B(),z(7,`div`,54)(8,`h3`),J(9,`Declaration`),B(),z(10,`dl`)(11,`dt`),J(12,`Class`),B(),z(13,`dd`,55),J(14),B(),z(15,`dt`),J(16,`Source`),B(),z(17,`dd`),J(18),B(),P(19,uH,4,2),P(20,dH,4,1),z(21,`dt`),J(22,`Pure`),B(),z(23,`dd`),J(24),B()()(),P(25,pH,8,1,`div`,54),z(26,`div`,54)(27,`h3`),J(28,`Live on the page`),B(),P(29,NH,16,5)(30,PH,2,0,`p`,56),B()),e&2){let e,n=t,r=K(2);M(2),Y(n.name),M(),q(`impure`,!n.isPure),M(),Y(n.isPure?`pure`:`impure`),M(),F(n.builtin?5:-1),M(),F(n.runtime?6:-1),M(8),Y(n.className),M(4),Y(r.sourceLabel(n)),M(),F(!n.builtin&&!n.runtime?19:-1),M(),F(n.runtime?-1:20),M(4),X(` `,n.isPure?`Yes, reruns only when an input changes`:`No, reruns on every check`,` `),M(),F(n.usages?.length?25:-1),M(4),F((e=r.liveFor(n.name))?29:30,e)}}function IH(e,t){e&1&&(z(0,`h2`,71),J(1,`Pipe details`),B(),z(2,`div`,72)(3,`p`,30),J(4,`Pick a pipe`),B(),z(5,`p`,31),J(6,` See where it is declared, which components use it and what it last returned. `),B()())}function LH(e,t){if(e&1&&(P(0,qV,9,2,`div`,33),z(1,`div`,34)(2,`div`,35),P(3,iH,3,0,`ul`,36)(4,sH,8,1,`div`,37),B(),z(5,`section`,38),P(6,FH,31,13)(7,IH,7,0),B()()),e&2){let e,t=K();F(t.loadFailed()?0:-1),M(3),F(t.filtered().length?3:4),M(3),F((e=t.selected())?6:7,e)}}function RH(e,t){if(e&1&&(z(0,`p`,61),J(1),B()),e&2){let e=K(2);M(),Z(`Showing `,e.async().length,` of `,t,` subscriptions.`)}}function zH(e,t){if(e&1){let e=W();z(0,`button`,80),G(`click`,function(){let t=O(e);return k(K(3).highlight(t))})(`focus`,function(){let t=O(e);return k(K(3).highlight(t))})(`blur`,function(){return O(e),k(K(3).highlight(null))}),J(1),B()}if(e&2){let e=K().$implicit;N(`aria-label`,`Highlight `+e.component+` on the page`),M(),X(` `,e.component,` `)}}function BH(e,t){if(e&1&&(z(0,`span`,78),J(1),B()),e&2){let e=K().$implicit;M(),Y(e.component)}}function VH(e,t){e&1&&(z(0,`span`,48),J(1,`no source`),B())}function HH(e,t){e&1&&(z(0,`span`,46),J(1,`duplicate subscription`),B())}function UH(e,t){e&1&&(z(0,`span`,46),J(1,`resubscribing`),B())}function WH(e,t){if(e&1){let e=W();z(0,`li`,76),G(`mouseenter`,function(){let t=O(e).$implicit;return k(K(2).highlight(t.target))})(`mouseleave`,function(){return O(e),k(K(2).highlight(null))}),P(1,zH,2,2,`button`,77)(2,BH,2,1,`span`,78),P(3,VH,2,0,`span`,48),P(4,HH,2,0,`span`,46),P(5,UH,2,0,`span`,46),z(6,`span`,79),J(7),B()()}if(e&2){let e,n=t.$implicit;M(),F((e=n.target)?1:2,e),M(2),F(n.hasSource?-1:3),M(),F(n.duplicate?4:-1),M(),F(n.resubscribing?5:-1),M(2),Y(n.latestValue??`no value yet`)}}function GH(e,t){if(e&1&&(z(0,`section`,18)(1,`h2`,73),J(2,` Async subscriptions `),z(3,`span`,21),J(4),B()(),z(5,`p`,61),J(6,` Each `),z(7,`span`,55),J(8,`| async`),B(),J(9,` subscribes on its own. Two on the same source mean the work runs twice. A source that changes on every check, like `),z(10,`span`,55),J(11,`getData() | async`),B(),J(12,`, resubscribes each time. `),B(),P(13,RH,2,2,`p`,61),z(14,`ul`,74),I(15,WH,8,5,`li`,75,Dg),B()()),e&2){let e,t=K();M(4),Y(t.async().length),M(9),F((e=t.asyncTotal())?13:-1,e),M(2),L(t.async())}}function KH(e,t){e&1&&(z(0,`span`,21),J(1),B()),e&2&&(M(),Y(t.length))}function qH(e,t){e&1&&(z(0,`p`,22),J(1,`Couldn't run the lint check. Try Refresh.`),B())}function JH(e,t){e&1&&(z(0,`p`,23),J(1,`Checking…`),B())}function YH(e,t){e&1&&(z(0,`p`,24),J(1,`No problems found.`),B())}function XH(e,t){if(e&1){let e=W();z(0,`button`,90),G(`click`,function(){O(e),K();let t=fv(6);return k(K(2).showPipe(t))}),z(1,`span`,91),J(2,`Show pipe `),B(),J(3),B()}if(e&2){let e=K().$implicit;M(3),X(``,e.pipe,` `)}}function ZH(e,t){if(e&1&&J(0),e&2){let e=K().$implicit;X(` `,e.pipe,` `)}}function QH(e,t){if(e&1&&(z(0,`li`,81)(1,`div`,82)(2,`span`,83),J(3),B(),z(4,`code`,84),J(5),B(),uv(6),z(7,`span`,85),P(8,XH,4,1,`button`,86)(9,ZH,1,1),J(10,` · `),V(11,`app-source-link`,57),B()(),z(12,`p`,87),J(13),B(),z(14,`p`,88)(15,`span`,89),J(16,`Fix`),B(),J(17),B()()),e&2){let e=t.$implicit;M(2),N(`data-tone`,e.severity),M(),Y(e.severity),M(2),Y(e.rule),M();let n=dv(K(2).pipeFor(e));M(2),F(n?8:9),M(3),R(`file`,e.file)(`line`,e.line),M(2),Y(e.message),M(4),X(` `,e.fix)}}function $H(e,t){if(e&1&&(z(0,`ul`,25),I(1,QH,18,9,`li`,81,Dg),B()),e&2){let e=K();M(),L(e.lint())}}var eU=5e3,tU=[{value:`all`,label:`All pipes`},{value:`custom`,label:`Custom`},{value:`builtin`,label:`Built-in`},{value:`runtime`,label:`Runtime only`},{value:`impure`,label:`Impure`},{value:`live`,label:`On the page`}],nU=class e{destroyRef=E(ws);host=E(Nl);injector=E(Ss);filterInput=Jv(`filterInput`);rpc=$(null);kindOptions=tU;pipes=j([]);filter=j(``);kind=j(`all`);loading=j(!1);loadFailed=j(!1);selected=j(null);live=j([]);async=j([]);asyncTotal=j(void 0);lint=j(null);lintFailed=j(!1);instrumentedPages=j([]);instrumenting=Q(()=>this.instrumentedPages().length>0);pendingRecord=j(null);recordMessage=j(null);recordLabel=Q(()=>{let e=this.pendingRecord();return e===null?this.instrumenting()?`Stop recording`:`Record calls`:e?`Starting…`:`Stopping…`});pendingTimer;liveByName=Q(()=>new Map(this.live().map(e=>[e.name,e])));allPipes=Q(()=>{let e=this.pipes(),t=new Set(e.map(e=>e.name)),n=this.live().filter(e=>!t.has(e.name)).map(e=>({name:e.name,className:e.className,file:``,line:0,isStandalone:!0,isPure:e.isPure,runtime:!0}));return n.length?[...e,...n]:e});filtered=Q(()=>{let e=this.filter(),t=this.kind()??`all`;return this.allPipes().filter(n=>this.fitsKind(n,t)&&this.fitsQuery(n,e))});pipesByName=Q(()=>{let e=new Map;for(let t of this.allPipes())e.set(t.name,[...e.get(t.name)??[],t]);return e});unsubscribe;constructor(){dc(()=>{let e=this.rpc();e&&(this.refresh(),this.loadLive(e))}),this.destroyRef.onDestroy(()=>{this.unsubscribe?.(),clearTimeout(this.pendingTimer),this.highlight(null)})}async refresh(){let e=this.rpc();if(e){this.loading.set(!0),this.loadFailed.set(!1);try{let t=await e.scope(`pangular`).rpc.call(`get-pipes`);this.pipes.set(t);let n=this.selected();if(n){let e=this.allPipes().find(e=>e.name===n.name&&e.file===n.file);this.selected.set(e??null)}}catch{this.loadFailed.set(!0)}finally{this.loading.set(!1)}this.loadLint(e)}}async loadLint(e){this.lintFailed.set(!1);try{let t=await e.scope(`pangular`).rpc.call(`pipe-lint`);this.lint.set(t)}catch{this.lintFailed.set(!0)}}async loadLive(e){try{let t=await e.scope(`pangular`).rpc.sharedState(`pipe-usage`);if(this.destroyRef.destroyed)return;let n=e=>{let t=e,n=fE(),r=(n?t?.pages?.find(e=>e.pageId===n):void 0)??t;this.live.set(r?.pipes??[]);let i=this.selected();i?.runtime&&!this.liveByName().has(i.name)&&this.selected.set(null),this.async.set(r?.async??[]),this.asyncTotal.set(r?.asyncTotal);let a=t?.instrumented??[];this.instrumentedPages.set(a),this.pendingRecord()===a.length>0&&this.settleRecord(null)};n(t.value()),this.unsubscribe?.(),this.unsubscribe=t.on(`updated`,n)}catch{}}async toggleInstrument(){let e=this.rpc();if(!e||this.pendingRecord()!==null)return;let t=!this.instrumenting();this.recordMessage.set(null),this.pendingRecord.set(t);let n;try{let r=t?{pageId:fE()??void 0,on:t}:{on:t};n=await e.scope(`pangular`).rpc.call(`request-instrument-pipes`,r)}catch{this.settleRecord(`Couldn't reach the devtools server. Try again.`);return}if(this.pendingRecord()===t){if(n?.pages===0){this.settleRecord(`No page is connected. Open your app in the browser with the devtools running, then record again.`);return}clearTimeout(this.pendingTimer),this.pendingTimer=setTimeout(()=>{this.pendingRecord()===t&&this.settleRecord(t?`No page confirmed recording. Reload the app and try again.`:`No page confirmed it stopped recording. Reload the app to stop it.`)},eU)}}settleRecord(e){clearTimeout(this.pendingTimer),this.pendingRecord.set(null),e!==null&&this.recordMessage.set(e)}sourceLabel(e){return e.builtin?`@angular/common`:e.runtime?`Seen on the page only`:`This project`}liveFor(e){return this.liveByName().get(e)}ms(e){return`${e<10?e.toFixed(2):Math.round(e)} ms`}describe(e){if(Array.isArray(e))return e.map(e=>this.describe(e)).join(`, `);if(typeof e==`string`)return e.length>80?`${e.slice(0,80)}…`:e;try{let t=JSON.stringify(e);return t&&t.length>120?`${t.slice(0,120)}…`:t??String(e)}catch{return String(e)}}isSelected(e){let t=this.selected();return t!==null&&t.name===e.name&&t.file===e.file}select(e){this.selected.set(this.isSelected(e)?null:e)}pipeFor(e){let t=this.pipesByName().get(e.pipe);return t?.length?t.find(t=>t.file===e.file)??t[0]:null}showPipe(e){this.fitsQuery(e,this.filter())||this.filter.set(``),this.fitsKind(e,this.kind()??`all`)||this.kind.set(`all`),this.selected.set(e),zd(()=>{let e=this.host.nativeElement;e.querySelector(`.row.selected`)?.scrollIntoView?.({block:`nearest`}),e.querySelector(`#pipe-detail-title`)?.focus()},{injector:this.injector})}fitsKind(e,t){return t===`custom`?!e.builtin&&!e.runtime:t===`builtin`?!!e.builtin:t===`runtime`?!!e.runtime:t===`impure`?!e.isPure:t!==`live`||this.liveByName().has(e.name)}fitsQuery(e,t){let n=t.trim().toLowerCase();return!n||e.name.toLowerCase().includes(n)||e.className.toLowerCase().includes(n)||e.file.toLowerCase().includes(n)}clearFilters(){this.filter.set(``),this.kind.set(`all`),this.filterInput()?.nativeElement.focus()}highlightPipe(e){this.highlight(e?.components.find(e=>e.targets?.length)?.targets?.[0])}highlight(e,t=!1){let n=this.rpc();n&&n.scope(`pangular`).rpc.call(`request-page-highlight`,e?{...e,...t?{reveal:t}:{}}:null).catch(()=>{})}onListKey(e){if(![`ArrowDown`,`ArrowUp`,`Home`,`End`].includes(e.key))return;let t=Array.from(this.host.nativeElement.querySelectorAll(`[data-pipe-row]`));if(!t.length)return;let n=t.indexOf(document.activeElement),r=n;r=e.key===`ArrowDown`?Math.min(n+1,t.length-1):e.key===`ArrowUp`?Math.max(n-1,0):e.key===`Home`?0:t.length-1,e.preventDefault(),t[r]?.focus()}static ɵfac=function(t){return new(t||e)};static ɵcmp=Wh({type:e,selectors:[[`app-pipes-inspector`]],viewQuery:function(e,t){e&1&&c_(t.filterInput,IV,5),e&2&&l_()},inputs:{rpc:[1,`rpc`]},decls:33,vars:18,consts:[[`filterInput`,``],[1,`intro`],[1,`toolbar`],[1,`search`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`,1,`search-icon`],[`cx`,`11`,`cy`,`11`,`r`,`7`],[`d`,`m20 20-3.5-3.5`],[`type`,`search`,`placeholder`,`Find a pipe, class or file…`,`aria-label`,`Find a pipe, class or file`,`autocomplete`,`off`,`spellcheck`,`false`,3,`input`,`keydown.escape`,`value`],[`ariaLabel`,`Show pipes`,3,`valueChange`,`options`,`value`],[`aria-live`,`polite`,1,`total`],[1,`actions`],[`type`,`button`,3,`click`,`disabled`],[`type`,`button`,1,`record`,3,`click`],[`aria-hidden`,`true`,1,`rec-dot`],[`role`,`status`,1,`notice`],[`role`,`status`,1,`state`],[`role`,`alert`,1,`state`],[1,`state`],[`aria-labelledby`,`async-title`,1,`section`],[`aria-labelledby`,`lint-title`,1,`section`],[`id`,`lint-title`],[1,`pill`],[`role`,`alert`,1,`empty-line`],[`role`,`status`,1,`empty-line`],[1,`empty-line`,`ok`],[1,`findings`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`],[`cx`,`12`,`cy`,`12`,`r`,`9`],[`d`,`M12 11v5M12 8h.01`],[`aria-hidden`,`true`,1,`spinner`],[1,`state-title`],[1,`state-hint`],[`type`,`button`,3,`click`],[`role`,`alert`,1,`notice`,`error`],[1,`layout`],[1,`list-wrap`],[`aria-label`,`Pipes`,1,`pipe-list`],[`role`,`status`,1,`state`,`compact`],[`id`,`pipe-detail`,`aria-labelledby`,`pipe-detail-title`,1,`detail`],[`d`,`M12 8v5M12 16h.01`],[`aria-label`,`Pipes`,1,`pipe-list`,3,`keydown`],[`type`,`button`,`data-pipe-row`,``,`aria-controls`,`pipe-detail`,1,`row`,3,`click`,`mouseenter`,`mouseleave`,`focus`,`blur`],[1,`row-main`],[1,`name`,`mono`],[1,`sub`,`mono`],[1,`row-meta`],[1,`chip`,`warn`],[1,`chip`,`live`],[1,`chip`],[1,`row-file`,`mono`],[1,`no-source`],[1,`more`],[1,`detail-head`],[`id`,`pipe-detail-title`,`tabindex`,`-1`,1,`mono`],[1,`block`],[1,`mono`],[1,`empty-line`],[3,`file`,`line`],[1,`sites`],[`role`,`note`,1,`warning`],[1,`chips`],[1,`hint`],[`type`,`button`,1,`component`],[1,`component`],[`type`,`button`,1,`component`,3,`click`,`mouseenter`,`mouseleave`,`focus`,`blur`],[1,`count`],[1,`mono`,`value`],[1,`instance`],[1,`calls`],[1,`mono`,`value`,`caller`],[1,`muted`],[`id`,`pipe-detail-title`,1,`visually-hidden`],[1,`state`,`compact`],[`id`,`async-title`],[1,`async-list`],[1,`async-row`],[1,`async-row`,3,`mouseenter`,`mouseleave`],[`type`,`button`,1,`component-name`,`mono`],[1,`mono`,`component-name`],[1,`mono`,`value`,`latest`],[`type`,`button`,1,`component-name`,`mono`,3,`click`,`focus`,`blur`],[1,`finding`],[1,`finding-head`],[1,`severity`],[1,`mono`,`rule`],[1,`where`,`mono`],[`type`,`button`,1,`pipe-link`],[1,`finding-message`],[1,`finding-fix`],[1,`fix-label`],[`type`,`button`,1,`pipe-link`,3,`click`],[1,`sr-only`]],template:function(e,t){if(e&1){let e=W();z(0,`p`,1),J(1,` Pipes declared in your source, the built-in pipes your templates use and library pipes seen on the page. Live data shows which components use each pipe on the page; turn on recording to capture calls and the last input and output. `),B(),z(2,`div`,2)(3,`div`,3),A(),z(4,`svg`,4),V(5,`circle`,5)(6,`path`,6),B(),ms(),z(7,`input`,7,0),G(`input`,function(e){return t.filter.set(e.target.value)})(`keydown.escape`,function(){return t.filter.set(``)}),B()(),z(9,`app-select`,8),cv(`valueChange`,function(n){return O(e),sv(t.kind,n)||(t.kind=n),k(n)}),B(),z(10,`span`,9),J(11),B(),z(12,`div`,10)(13,`button`,11),G(`click`,function(){return t.refresh()}),J(14,`Refresh`),B(),z(15,`button`,12),G(`click`,function(){return t.toggleInstrument()}),V(16,`span`,13),J(17),B()()(),P(18,BV,6,1,`p`,14),P(19,VV,8,1,`p`,14),P(20,HV,4,0,`div`,15)(21,UV,7,0,`div`,16)(22,WV,5,0,`div`,17)(23,LH,8,3),P(24,GH,17,2,`section`,18),z(25,`section`,19)(26,`h2`,20),J(27,` Lint `),P(28,KH,2,1,`span`,21),B(),P(29,qH,2,0,`p`,22)(30,JH,2,0,`p`,23)(31,YH,2,0,`p`,24)(32,$H,3,0,`ul`,25),B()}if(e&2){let e,n;M(7),R(`value`,t.filter()),M(2),R(`options`,t.kindOptions),ov(`value`,t.kind),M(2),Z(``,t.filtered().length,` of `,t.allPipes().length),M(2),R(`disabled`,t.loading()),M(2),q(`on`,t.instrumenting()),N(`aria-pressed`,t.instrumenting())(`aria-busy`,t.pendingRecord()!==null)(`aria-disabled`,t.pendingRecord()!==null),M(2),X(` `,t.recordLabel(),` `),M(),F((e=t.recordMessage())?18:-1,e),M(),F(t.instrumenting()?19:-1),M(),F(t.loading()&&t.allPipes().length===0?20:t.loadFailed()&&t.allPipes().length===0?21:t.allPipes().length===0?22:23),M(4),F(t.async().length>0?24:-1),M(4),F((n=t.lint())?28:-1,n),M(),F(t.lintFailed()?29:t.lint()===null?30:t.lint().length?32:31)}},dependencies:[qD,DO],styles:[`[_nghost-%COMP%] {
   display: block;
   color: var(--%NS%text);
   font-size: 13px;
@@ -10531,7 +10805,7 @@ button.pipe-link[_ngcontent-%COMP%]:focus-visible {
   .spinner[_ngcontent-%COMP%] {
     animation: none;
   }
-}`]})},EH=()=>[],DH=()=>[`/`],OH=(e,t)=>t.id,kH=(e,t)=>t.route.id,AH=(e,t)=>t[0],jH=(e,t)=>t.file+t.method,MH=(e,t)=>t.path,NH=(e,t)=>t.mode,PH=(e,t)=>t.file,FH=(e,t)=>t.rule;function IH(e,t){if(e&1){let e=W();z(0,`div`,0)(1,`h2`,3),J(2,`Could not read the project.`),B(),z(3,`p`,4),J(4,` Check that the dev server with Pangular Inspector is still running, then retry. `),B(),z(5,`button`,5),G(`click`,function(){return O(e),k(K().retry())}),J(6,`Retry`),B()()}}function LH(e,t){e&1&&(z(0,`div`,1),V(1,`span`,6),z(2,`span`),J(3,`Reading the project…`),B()())}function RH(e,t){e&1&&(z(0,`div`,2)(1,`h2`,3),J(2,`This app is not an Analog app.`),B(),z(3,`p`,4),J(4,` Add `),z(5,`code`),J(6,`pangular()`),B(),J(7,` from `),z(8,`code`),J(9,`@pangular-inspector/devtools/vite`),B(),J(10,` next to `),z(11,`code`),J(12,`analog()`),B(),J(13,` in vite.config.ts and run the Analog dev server. `),B()())}function zH(e,t){if(e&1&&(z(0,`div`,11)(1,`span`,9),J(2,`Open in the browser`),B(),z(3,`span`,15),J(4),B()()),e&2){let e=t;M(3),R(`title`,e.url),M(),Y(e.url)}}function BH(e,t){if(e&1){let e=W();z(0,`button`,16),G(`click`,function(){let t=O(e).$implicit;return k(K(2).view.set(t.id))}),J(1),z(2,`span`,17),J(3),B()()}if(e&2){let e=t.$implicit,n=K(2);R(`id`,`analog-tab-`+e.id),N(`aria-selected`,e.id===n.view())(`aria-controls`,`analog-panel-`+e.id)(`tabindex`,e.id===n.view()?0:-1),M(),X(` `,e.label,` `),M(),N(`data-tone`,e.tone),M(),Y(e.count)}}function VH(e,t){e&1&&(z(0,`div`,26),J(1),B()),e&2&&(M(),Y(t))}function HH(e,t){if(e&1&&(z(0,`app-source-link`,34),J(1),B()),e&2){let e=K().$implicit,t=K(5);R(`file`,e.file),M(),Y(t.short(e.file))}}function UH(e,t){if(e&1&&(z(0,`span`,31),J(1),B()),e&2){let e=K().$implicit;M(),Y(e.fullPath)}}function WH(e,t){if(e&1&&(z(0,`li`),P(1,HH,2,2,`app-source-link`,34)(2,UH,2,1,`span`,31),z(3,`span`,35),J(4),B()()),e&2){let e=t.$implicit;M(),F(e.file?1:2),M(2),N(`data-kind`,e.kind),M(),Y(e.kind)}}function GH(e,t){if(e&1&&(z(0,`span`,36),J(1),B()),e&2){let e=t.$implicit;M(),Z(``,e[0],` = `,e[1])}}function KH(e,t){if(e&1&&(z(0,`div`,33),I(1,GH,2,2,`span`,36,AH),B()),e&2){let e=K(2),t=K(3);M(),L(t.paramList(e.match.params))}}function qH(e,t){if(e&1&&(z(0,`strong`,31),J(1),B(),J(2,` renders `),z(3,`ol`,32),I(4,WH,5,3,`li`,null,OH),B(),P(6,KH,3,0,`div`,33)),e&2){let e=K(),t=K(3);M(),Y(e.url),M(3),L(e.match.chain),M(2),F(t.paramList(e.match.params).length?6:-1)}}function JH(e,t){if(e&1&&(z(0,`app-source-link`,34),J(1),B()),e&2){let e=K().$implicit,t=K(6);R(`file`,e.file),M(),Y(t.short(e.file))}}function YH(e,t){if(e&1&&(z(0,`span`,31),J(1),B()),e&2){let e=K().$implicit;M(),Y(e.path)}}function XH(e,t){if(e&1&&(z(0,`li`),P(1,JH,2,2,`app-source-link`,34)(2,YH,2,1,`span`,31),z(3,`span`,4),J(4),B()()),e&2){let e=t.$implicit;M(),F(e.file?1:2),M(3),Y(e.reason)}}function ZH(e,t){if(e&1&&(z(0,`ul`,37),I(1,XH,5,2,`li`,null,Dg),B()),e&2){let e=K(2);M(),L(e.match.rejected.slice(0,5))}}function QH(e,t){if(e&1&&(z(0,`strong`,31),J(1),B(),J(2,` matches no file route. Angular throws NG04002 "Cannot match any routes". `),P(3,ZH,3,0,`ul`,37)),e&2){let e=K();M(),Y(e.url),M(2),F(e.match.rejected.length?3:-1)}}function $H(e,t){if(e&1&&(z(0,`div`,27),P(1,qH,7,2)(2,QH,4,2),B()),e&2){let e=t;N(`data-tone`,e.match.matched?`good`:`bad`),M(),F(e.match.matched?1:2)}}function eU(e,t){e&1&&(z(0,`span`,39),J(1,`└`),B())}function tU(e,t){e&1&&(z(0,`span`,41),J(1,`open`),B())}function nU(e,t){if(e&1&&(z(0,`app-source-link`,42)(1,`span`,46),J(2),B(),J(3),B()),e&2){let e=K().$implicit,t=K(3);R(`file`,e.route.file),M(2),Y(t.dir(e.route.file)),M(),Y(t.base(e.route.file))}}function rU(e,t){e&1&&(z(0,`span`,4),J(1,`folder only`),B())}function iU(e,t){if(e&1&&(z(0,`span`,44),J(1),B()),e&2){let e=t.$implicit;M(),X(``,e,`()`)}}function aU(e,t){if(e&1&&(z(0,`span`,45),J(1),B()),e&2){let e=K().$implicit;M(),X(`"`,e.route.title,`"`)}}function oU(e,t){if(e&1&&(z(0,`span`,36),J(1),B()),e&2){let e=K().$implicit;M(),Y(e)}}function sU(e,t){if(e&1&&P(0,oU,2,1,`span`,36),e&2){let e=t.$implicit;F(e===`title`?-1:0)}}function cU(e,t){if(e&1&&(z(0,`tr`)(1,`td`)(2,`div`,38),P(3,eU,2,0,`span`,39),z(4,`span`,40),J(5),B(),z(6,`span`,35),J(7),B(),P(8,tU,2,0,`span`,41),B()(),z(9,`td`),P(10,nU,4,3,`app-source-link`,42)(11,rU,2,0,`span`,4),B(),z(12,`td`)(13,`div`,43),I(14,iU,2,1,`span`,44,Og),B()(),z(16,`td`),P(17,aU,2,1,`span`,45),I(18,sU,1,1,null,null,Og),B()()),e&2){let e=t.$implicit,n=K(3);q(`open`,n.isOpen(e.route))(`dim`,e.route.kind===`group`||e.route.kind===`implicit`),M(2),j_(`padding-left`,e.depth*16,`px`),M(),F(e.depth?3:-1),M(2),Y(e.route.fullPath),M(),N(`data-kind`,e.route.kind),M(),Y(n.kindText(e.route)),M(),F(n.isOpen(e.route)?8:-1),M(2),F(e.route.file?10:11),M(4),L(n.serverExports(e.route)),M(3),F(e.route.title?17:-1),M(),L(e.route.routeMeta??mv(13,EH))}}function lU(e,t){e&1&&J(0,` No route matches the filter. Try part of a path or a file name. `)}function uU(e,t){e&1&&J(0,` No file routes yet. Add a .page.ts file under src/app/pages. `)}function dU(e,t){if(e&1&&(z(0,`tr`)(1,`td`,47),P(2,lU,1,0)(3,uU,1,0),B()()),e&2){let e=K(3);M(2),F(e.filter().trim()?2:3)}}function fU(e,t){if(e&1){let e=W();z(0,`div`,18)(1,`form`,19),G(`submit`,function(t){O(e);let n=K(2);return t.preventDefault(),k(n.explain())}),z(2,`label`,20),J(3,`Test a URL`),B(),z(4,`input`,21),G(`input`,function(t){return O(e),k(K(2).testUrl.set(t.target.value))}),B(),z(5,`button`,22),J(6),B()(),z(7,`label`,23),J(8,`Filter routes`),B(),z(9,`input`,24),G(`input`,function(t){return O(e),k(K(2).filter.set(t.target.value))})(`keydown.escape`,function(){return O(e),k(K(2).filter.set(``))}),B()(),z(10,`div`,25),P(11,VH,2,1,`div`,26)(12,$H,3,2,`div`,27),B(),z(13,`div`,28)(14,`table`)(15,`thead`)(16,`tr`)(17,`th`,29),J(18,`Route`),B(),z(19,`th`,29),J(20,`File`),B(),z(21,`th`,29),J(22,`Data`),B(),z(23,`th`,29),J(24,`Route meta`),B()()(),z(25,`tbody`),I(26,cU,20,14,`tr`,30,kH,!1,dU,4,1,`tr`),B()()()}if(e&2){let e,t=K(2);M(4),R(`value`,t.testUrl()),M(),R(`disabled`,t.explaining()),M(),X(` `,t.explaining()?`Explaining…`:`Explain`,` `),M(3),R(`value`,t.filter()),M(2),F((e=t.explainError())?11:(e=t.explained())?12:-1,e),M(15),L(t.routeRows())}}function pU(e,t){if(e&1&&(z(0,`span`,31),J(1),B(),J(2)),e&2){let e=t.$implicit,n=t.$index,r=t.$count;M(),Y(e),M(),X(``,n===r-1?``:`, `,` `)}}function mU(e,t){if(e&1&&(z(0,`div`,48)(1,`strong`),J(2,`load() ran twice`),B(),J(3,` for `),I(4,pU,3,2,null,null,Og),J(6,` : once while server rendering, again in the browser. TransferState did not serve the server result. `),B()),e&2){let e=K(3);M(4),L(e.duplicates())}}function hU(e,t){if(e&1&&(z(0,`span`,31),J(1),B(),J(2)),e&2){let e=t.$implicit,n=t.$index,r=t.$count;M(),Y(e),M(),X(``,n===r-1?``:`, `,` `)}}function gU(e,t){if(e&1&&(z(0,`div`,48)(1,`strong`),J(2,`Server function read ran twice`),B(),J(3,`: `),I(4,hU,3,2,null,null,Og),J(6,` ran while server rendering, then again in the browser. The browser did not use the TransferState seed. `),B()),e&2){let e=K(3);M(4),L(e.refetchedFns())}}function _U(e,t){if(e&1){let e=W();z(0,`label`)(1,`input`,80),G(`change`,function(){let t=O(e).$implicit;return k(K(3).kind.set(t))}),B(),J(2),z(3,`span`,4),J(4),B()()}if(e&2){let e=t.$implicit,n=K(3);q(`on`,n.kind()===e),M(),R(`checked`,n.kind()===e),N(`data-kind`,e),M(),X(` `,n.kindLabel(e),` `),M(2),Y(n.kindCount(e))}}function vU(e,t){if(e&1&&J(0),e&2){let e=K(4);Z(` Showing the newest `,e.shownCount(),` of `,e.matchingCalls().length,`. `)}}function yU(e,t){e&1&&J(0),e&2&&X(` The dev server keeps only the newest `,K(4).maxServerCalls,` calls and drops older ones. `)}function bU(e,t){if(e&1&&(z(0,`p`,66),P(1,vU,1,2),P(2,yU,1,1),B()),e&2){let e=K(3);M(),F(e.shownCount()1?6:-1),M(2),Y(e.summary),M(2),L(e.items),M(5),X(` `,e.fix),M(2),Y(e.rule)}}function NW(e,t){if(e&1&&(z(0,`p`,4),J(1),B(),z(2,`ul`,113),I(3,MW,18,8,`li`,null,FH),B()),e&2){let e=K(3);M(),Z(` `,e.findings().length,` issue(s) in `,e.lintCards().length,` group(s). Each card says what is wrong, where, and how to fix it. `),M(2),L(e.lintCards())}}function PW(e,t){e&1&&(z(0,`div`,112)(1,`strong`),J(2,`No Analog problems found.`),B(),J(3,` Routes, server files, prerender config and content all check out. `),B())}function FW(e,t){e&1&&P(0,NW,5,2)(1,PW,4,0,`div`,112),e&2&&F(+!K(2).findings().length)}function IW(e,t){if(e&1){let e=W();z(0,`section`,7)(1,`div`,8)(2,`span`,9),J(3,`Analog`),B(),z(4,`span`,10),J(5),B()(),z(6,`div`,8)(7,`span`,9),J(8,`Pages`),B(),z(9,`span`,10),J(10),B()(),z(11,`div`,8)(12,`span`,9),J(13,`API routes`),B(),z(14,`span`,10),J(15),B()(),z(16,`div`,8)(17,`span`,9),J(18,`Server calls`),B(),z(19,`span`,10),J(20),B()(),z(21,`div`,8)(22,`span`,9),J(23,`Issues`),B(),z(24,`span`,10),J(25),B()(),P(26,zH,5,2,`div`,11),B(),z(27,`div`,12),G(`keydown`,function(t){return O(e),k(K().onKey(t))}),I(28,BH,4,7,`button`,13,OH),B(),z(30,`div`,14),P(31,fU,29,6)(32,XU,65,21)(33,bW,18,3)(34,EW,2,1)(35,FW,2,1),B()}if(e&2){let e,t,n=K();M(5),Y(n.project().version||`unknown`),M(5),Y(n.pageCount()),M(5),Y(n.project().api.length),M(5),Y(n.allCalls().length),M(),N(`data-tone`,n.lintTone()||`good`),M(4),Y(n.lintCount().errors+n.lintCount().warnings),M(),F((e=n.page())?26:-1,e),M(2),L(n.views()),M(2),R(`id`,`analog-panel-`+n.view()),N(`aria-labelledby`,`analog-tab-`+n.view()),M(),F((t=n.view())===`routes`?31:t===`server`?32:t===`render`?33:t===`content`?34:t===`lint`?35:-1)}}var LW={"scan-error":{title:`A folder could not be read`,summary:`Its files are missing from routes, API routes and lint results.`},"duplicate-url":{title:`Two files serve the same URL`,summary:`Only one of them is reachable; the other never renders.`},"sibling-params":{title:`Two dynamic pages in one folder`,summary:`Both are [param] pages at the same level, so the first one always wins.`},"missing-default-export":{title:`Page has no default export`,summary:`Analog needs the component as the default export, so the page renders nothing.`},"redirect-with-component":{title:`Redirect page also exports a component`,summary:`The redirect runs first, so the component never shows.`},"redirect-path-match":{title:`Redirect matches too much`,summary:`An empty-path redirect without pathMatch "full" catches every URL below it.`},"layout-without-outlet":{title:`Layout has no router-outlet`,summary:`The layout has child pages, but without  they never render.`},"server-without-load":{title:`.server.ts without load or action`,summary:`The server file exports no load, action or server function, so Analog calls nothing.`},"orphan-server-file":{title:`.server.ts without a page`,summary:`No page file sits next to it, so its load never runs.`},"api-method-suffix":{title:`Unknown method suffix on an API file`,summary:`The suffix is not an HTTP method, so it becomes part of the URL.`},"duplicate-api-route":{title:`Two handlers for one API route`,summary:`Two files answer the same method and path.`},"api-outside-prefix":{title:`Server route outside the API prefix`,summary:`During vite dev only routes under the prefix reach Nitro.`},"prerender-unknown-route":{title:`Prerender entry matches no page`,summary:`prerender.routes lists a path that no page file serves.`},"prerender-missing-root":{title:`Home page is not prerendered`,summary:`static is on, but prerender.routes leaves out /.`},"content-frontmatter":{title:`Broken frontmatter`,summary:`The markdown frontmatter cannot be read.`},"duplicate-slug":{title:`Two posts share a slug`,summary:`injectContent picks one of them at random.`},"content-shadows-page":{title:`Markdown file takes over a page`,summary:`Files under src/content are routes too, so these URLs render the markdown file instead of the [param] page.`},"load-fetched-twice":{title:`load() runs twice`,summary:`These pages fetched their data while rendering on the server and again in the browser.`},"fn-fetched-twice":{title:`Server function read runs twice`,summary:`These reads ran while rendering on the server and again in the browser right after hydration.`},"restart-needed":{title:`New pages need a restart`,summary:`These page files exist, but the running router does not know them yet.`},"hydration-error":{title:`Hydration error`,summary:`The browser DOM did not match the server HTML.`},"api-not-found":{title:`API call failed with 404 or 405`,summary:`A request hit a path or method that no server route handles.`}},RW=200,zW=new Set([`missing-default-export`,`redirect-with-component`,`redirect-path-match`,`layout-without-outlet`,`server-without-load`,`orphan-server-file`,`load-fetched-twice`,`restart-needed`,`prerender-missing-root`]),BW={ssr:`SSR`,ssg:`Prerendered`,client:`Client only`,cached:`Cached`,redirect:`Redirect`},VW={all:`All`,page:`Pages`,load:`load()`,action:`Actions`,fn:`Server fn`,api:`API`},HW={success:`succeeded`,redirect:`redirected`,invalid:`validation errors`,error:`failed`},UW={success:`good`,redirect:`info`,invalid:`warn`,error:`bad`};function WW(e,t=0,n=[]){for(let r of e)n.push({route:r,depth:t}),WW(r.children,t+1,n);return n}var GW=class e{rpc=$(null);canCall=Q(()=>AE(this.rpc(),`analog`));callsOff=nE(`analog`);kinds=[`all`,`page`,`load`,`action`,`fn`,`api`];methods=[`GET`,`POST`,`PUT`,`PATCH`,`DELETE`];methodOptions=this.methods.map(e=>({value:e,label:e}));view=j(`routes`);project=j(null);loadFailed=j(!1);state=j({});findings=j([]);renderRows=j([]);plan=j(null);filter=j(``);testUrl=j(``);explained=j(null);explainError=j(``);explaining=j(!1);kind=j(`all`);method=j(`GET`);apiPath=j(``);apiBody=j(``);confirmSend=j(!1);response=j(null);sending=j(!1);needsConfirm=Q(()=>this.method()!==`GET`&&!this.confirmSend());canSend=Q(()=>this.canCall()&&!this.sending()&&!this.needsConfirm());sendHintId=Q(()=>this.canCall()?this.needsConfirm()?`analog-confirm-hint`:null:`analog-calls-off`);unsubscribe=null;refreshTimer;refreshRun=0;destroyRef=E(ws);host=E(Nl);hostPageId=uE();page=Q(()=>{let e=this.state().pages??[];return(this.hostPageId?e.find(e=>e.pageId===this.hostPageId):e[0])??null});openFiles=Q(()=>new Set((this.page()?.chain??[]).map(e=>e.file)));allCalls=Q(()=>this.state().calls??[]);maxServerCalls=RW;callQuery=j(``);failedOnly=j(!1);callsMessage=j(``);callFiltered=Q(()=>!!this.callQuery().trim()||this.failedOnly());matchingCalls=Q(()=>{let e=this.kind(),t=this.callQuery().trim().toLowerCase(),n=this.failedOnly();return this.allCalls().filter(r=>(e===`all`||r.kind===e)&&(!n||this.isFailed(r))&&(!t||this.callText(r).includes(t)))});calls=Q(()=>this.matchingCalls().slice(-150).reverse());shownCount=Q(()=>this.calls().length);serverFull=Q(()=>this.allCalls().length>=RW);allRoutes=Q(()=>WW(this.project()?.routes??[]));pageCount=Q(()=>this.allRoutes().filter(e=>e.route.file&&e.route.kind!==`layout`).length);routeRows=Q(()=>{let e=this.filter().trim().toLowerCase();return e?this.allRoutes().filter(t=>t.route.fullPath.toLowerCase().includes(e)||!!t.route.file?.toLowerCase().includes(e)):this.allRoutes()});serverFns=Q(()=>this.project()?.serverFns??[]);fnById=Q(()=>new Map(this.serverFns().map(e=>[e.id,e])));refetchedFns=Q(()=>Array.from(new Set((this.state().refetches??[]).map(e=>this.fnById().get(e.id)?.name??e.id))));duplicates=Q(()=>Array.from(new Set((this.state().duplicates??[]).map(e=>e.route))));modeCounts=Q(()=>[`ssr`,`ssg`,`cached`,`client`,`redirect`].map(e=>({mode:e,label:BW[e],count:this.renderRows().filter(t=>t.mode===e).length})).filter(e=>e.count));lintCards=Q(()=>{let e={error:0,warning:1,info:2},t=new Map;for(let e of this.findings()){let n=t.get(e.rule);if(!n){let r=LW[e.rule];n={rule:e.rule,severity:e.severity,title:r?.title??e.rule,summary:r?.summary??e.message,fix:e.fix,items:[]},t.set(e.rule,n)}let r=zW.has(e.rule)||e.message===n.summary?void 0:e.message;n.items.some(t=>t.file===e.file&&t.path===e.path&&t.message===r)||n.items.push({file:e.file,path:e.path,message:r})}return Array.from(t.values()).sort((t,n)=>e[t.severity]-e[n.severity])});lintCount=Q(()=>{let e=this.findings();return{errors:e.filter(e=>e.severity===`error`).length,warnings:e.filter(e=>e.severity===`warning`).length}});lintTone=Q(()=>{let{errors:e,warnings:t}=this.lintCount();return e?`bad`:t?`warn`:``});views=Q(()=>{let{errors:e,warnings:t}=this.lintCount();return[{id:`routes`,label:`Routes`,count:this.pageCount(),tone:``},{id:`server`,label:`Server`,count:this.allCalls().length,tone:``},{id:`render`,label:`Render`,count:this.renderRows().length,tone:``},{id:`content`,label:`Content`,count:this.project()?.content.length??0,tone:``},{id:`lint`,label:`Lint`,count:e+t,tone:this.lintTone()}]});constructor(){dc(()=>{let e=this.rpc();e&&jv(()=>void this.load(e))}),dc(()=>{let e=this.view();this.state(),jv(()=>this.scheduleRefresh(e))}),this.destroyRef.onDestroy(()=>{this.unsubscribe?.(),clearTimeout(this.refreshTimer)})}async load(e){let t=await hE(e,`analog-project`);if(!this.destroyRef.destroyed){this.project.set(t),this.loadFailed.set(t===null);try{let t=await e.scope(`pangular`).rpc.sharedState(`analog`);if(this.destroyRef.destroyed)return;let n=e=>this.state.set(e??{});n(t.value()),this.unsubscribe?.(),this.unsubscribe=t.on(`updated`,n)}catch{this.state.set({})}this.destroyRef.destroyed||await this.refresh(this.view())}}retry(){let e=this.rpc();e&&(this.loadFailed.set(!1),this.load(e))}scheduleRefresh(e){clearTimeout(this.refreshTimer),this.refreshTimer=setTimeout(()=>void this.refresh(e),300)}async refresh(e){let t=this.rpc();if(!t)return;let n=++this.refreshRun,[r,i]=await Promise.all([hE(t,`analog-lint`,this.hostPageId??void 0),hE(t,`analog-render`)]);if(n===this.refreshRun&&(this.findings.set(r??[]),this.renderRows.set(i?.rows??[]),this.plan.set(i?.plan??null),e===`routes`||e===`content`||this.project()===null)){let e=await hE(t,`analog-project`);e&&n===this.refreshRun&&(this.project.set(e),this.loadFailed.set(!1))}}isOpen(e){return!!e.file&&this.openFiles().has(e.file)}kindText(e){return e.catchAll?e.catchAll===`optional`?`optional catch-all`:`catch-all`:e.kind===`implicit`?`folder`:e.kind}serverExports(e){return(e.serverExports??[]).filter(e=>e===`load`||e===`action`)}short(e){return e?.replace(/^\/src\/app\//,``).replace(/^\//,``)}dir(e){let t=this.short(e)??e;return t.includes(`/`)?t.slice(0,t.lastIndexOf(`/`)+1):``}base(e){return e.slice(e.lastIndexOf(`/`)+1)}paramList(e){return Object.entries(e)}kindLabel(e){return VW[e]}kindCount(e){return e===`all`?this.allCalls().length:this.allCalls().filter(t=>t.kind===e).length}modeLabel(e){return BW[e]}mismatch(e){return!e.last?.render||e.mode===`redirect`?!1:e.mode===`client`?e.last.render!==`client`:e.last.render===`client`}fnOf(e){return e.kind===`fn`&&e.route?this.fnById().get(e.route):void 0}fnCalls(e){return this.allCalls().filter(t=>t.kind===`fn`&&t.route===e).length}outcomeLabel(e){return HW[e]}outcomeTone(e){return UW[e]}statusClass(e){return e>=500||e===0?`bad`:e>=400?`warn`:`good`}tone(e){return e===`error`?`bad`:e===`warning`?`warn`:`info`}shadowed(e){return this.findings().find(t=>t.rule===`content-shadows-page`&&t.file===e)?.relatedFile}contentUrl(e){return this.allRoutes().find(t=>t.route.file===e)?.route.fullPath}pretty(e){try{return JSON.stringify(JSON.parse(e),null,2)}catch{return e}}time=$D;tryApi(e){this.method.set(e.method===`ANY`?`GET`:e.method),this.apiPath.set(e.path.replace(/:(\w+)/g,`1`).replace(`**`,`x`)),this.response.set(null),queueMicrotask(()=>document.getElementById(`api-path`)?.focus())}isFailed(e){return!e.status||e.status>=400||e.outcome===`error`}callText(e){let t=this.fnOf(e);return[e.url,e.route,t?.name,t?.file].filter(Boolean).join(` `).toLowerCase()}clearCallFilters(){this.callQuery.set(``),this.failedOnly.set(!1),this.kind.set(`all`),queueMicrotask(()=>this.host.nativeElement.querySelector(`#analog-call-search`)?.focus())}async clearCalls(){let e=this.rpc();try{if(!e)throw Error(`No devtools server`);await mE(e,`analog-clear-calls`),this.callsMessage.set(`Calls cleared.`),queueMicrotask(()=>this.host.nativeElement.querySelector(`input[name="analog-kind"]:checked`)?.focus())}catch{this.callsMessage.set(`Could not clear the calls.`)}}async explain(){let e=this.testUrl().trim();if(!e){this.explained.set(null),this.explainError.set(`Type a URL to explain, for example /products/42.`);return}this.explaining.set(!0),this.explainError.set(``);try{let t=await mE(this.rpc(),`analog-explain-url`,e);if(!t)throw Error(`The devtools server did not answer`);this.explained.set({url:e,match:t})}catch(t){let n=String(t?.message||`The devtools server did not answer`);this.explained.set(null),this.explainError.set(`Could not explain ${e}. ${n.replace(/\.?$/,`.`)}`)}finally{this.explaining.set(!1)}}async send(){let e=this.apiPath().trim();if(!e||this.sending()||this.needsConfirm())return;let t;if(this.method()!==`GET`&&this.apiBody().trim())try{t=JSON.parse(this.apiBody())}catch{this.response.set({error:`The body is not valid JSON.`});return}this.response.set(null),this.sending.set(!0);try{let n=await hE(this.rpc(),`analog-call-api`,{method:this.method(),path:e,body:t,confirm:this.confirmSend()});this.response.set(n??{error:`No answer from the devtools server.`})}finally{this.sending.set(!1)}}onKey(e){let t=this.views().map(e=>e.id),n=t.indexOf(this.view()),r=n;if(e.key===`ArrowRight`)r=(n+1)%t.length;else if(e.key===`ArrowLeft`)r=(n-1+t.length)%t.length;else if(e.key===`Home`)r=0;else if(e.key===`End`)r=t.length-1;else return;e.preventDefault(),this.view.set(t[r]);let i=e.currentTarget;queueMicrotask(()=>i.querySelector(`#analog-tab-${t[r]}`)?.focus())}static ɵfac=function(t){return new(t||e)};static ɵcmp=Wh({type:e,selectors:[[`app-analog-inspector`]],inputs:{rpc:[1,`rpc`]},decls:4,vars:1,consts:[[`role`,`alert`,1,`empty`],[`role`,`status`,1,`loading`],[1,`empty`],[1,`empty-title`],[1,`muted`],[`type`,`button`,1,`btn`,3,`click`],[`aria-hidden`,`true`,1,`spinner`],[`aria-label`,`Analog summary`,1,`summary`],[1,`stat`],[1,`label`],[1,`value`],[1,`stat`,`wide`],[`role`,`tablist`,`aria-label`,`Analog views`,1,`tabs`,3,`keydown`],[`type`,`button`,`role`,`tab`,3,`id`],[`role`,`tabpanel`,1,`panel`,3,`id`],[1,`value`,`mono`,3,`title`],[`type`,`button`,`role`,`tab`,3,`click`,`id`],[1,`count`],[1,`toolbar`],[1,`inline`,`explain`,3,`submit`],[`for`,`analog-url`],[`id`,`analog-url`,`type`,`text`,`placeholder`,`/products/42`,1,`field`,`grow`,`mono`,3,`input`,`value`],[`type`,`submit`,1,`btn`,`primary`,3,`disabled`],[`for`,`route-filter`,1,`sr-only`],[`id`,`route-filter`,`type`,`search`,`placeholder`,`Filter by path or file`,1,`field`,`filter`,3,`input`,`keydown.escape`,`value`],[`role`,`status`,1,`explain-result`],[`data-tone`,`bad`,1,`callout`],[1,`callout`],[`role`,`region`,`aria-label`,`File routes`,`tabindex`,`0`,1,`table-wrap`],[`scope`,`col`],[3,`open`,`dim`],[1,`mono`],[1,`chain`],[1,`chips`],[1,`mono`,3,`file`],[1,`pill`],[1,`chip`,`mono`],[1,`plain`],[1,`route`],[`aria-hidden`,`true`,1,`guide`],[1,`mono`,`path`],[1,`pill`,`live`],[1,`file`,3,`file`],[1,`meta`],[`data-kind`,`load`,1,`pill`],[1,`chip`],[1,`dir`],[`colspan`,`4`,1,`empty-row`],[`data-tone`,`warn`,`role`,`note`,1,`callout`],[`id`,`analog-calls-heading`],[1,`calls-bar`],[1,`segmented`],[1,`sr-only`],[3,`on`],[1,`calls-actions`],[`type`,`button`,1,`btn`,`ghost`,3,`click`,`disabled`],[`role`,`status`,1,`calls-message`],[`role`,`group`,`aria-label`,`Filter the server calls`,1,`call-filters`],[1,`search`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`,1,`search-icon`],[`cx`,`11`,`cy`,`11`,`r`,`7`],[`d`,`m20 20-3.5-3.5`],[`id`,`analog-call-search`,`type`,`search`,`placeholder`,`Find a URL, path or function…`,`aria-label`,`Find a URL, path or function`,`autocomplete`,`off`,`spellcheck`,`false`,1,`field`,3,`input`,`keydown.escape`,`value`],[1,`check`],[`type`,`checkbox`,3,`change`,`checked`],[`aria-live`,`polite`,1,`total`],[1,`note`],[`role`,`region`,`aria-label`,`Server calls`,`tabindex`,`0`,1,`table-wrap`],[`role`,`status`,1,`empty-box`,`no-match`],[1,`empty-box`],[`role`,`region`,`aria-label`,`API routes`,`tabindex`,`0`,1,`table-wrap`],[1,`card`,`playground`,3,`submit`],[1,`row`],[`ariaLabel`,`Method`,1,`method-select`,3,`valueChange`,`options`,`value`],[`for`,`api-path`,1,`sr-only`],[`id`,`api-path`,`type`,`text`,`placeholder`,`/api/v1/products`,1,`field`,`grow`,`mono`,3,`input`,`value`],[`id`,`analog-calls-off`,1,`muted`],[`id`,`analog-confirm-hint`,1,`muted`],[`role`,`status`,1,`muted`],[`role`,`status`,1,`response`],[`type`,`radio`,`name`,`analog-kind`,1,`sr-only`,3,`change`,`checked`],[`scope`,`col`,1,`num`],[1,`muted`,`nowrap`],[1,`request`],[1,`method`],[1,`mono`,`url`],[1,`status`],[1,`num`,`nowrap`],[1,`mono`,`muted`,3,`file`],[1,`code`],[1,`empty-lead`],[1,`empty-actions`],[`type`,`button`,1,`btn`,`ghost`,3,`click`],[1,`actions`],[`role`,`region`,`aria-label`,`Server functions`,`tabindex`,`0`,1,`table-wrap`],[1,`num`,`tnum`],[`for`,`api-body`],[`id`,`api-body`,`rows`,`3`,`placeholder`,`{"name": "Ada"}`,1,`field`,`mono`,3,`input`,`value`],[1,`check`,`confirm-send`],[`data-status`,`bad`,1,`status`],[`role`,`region`,`aria-label`,`Render modes`,`tabindex`,`0`,1,`table-wrap`],[1,`card`],[1,`muted`,`small`],[1,`muted`,`small`,`tnum`],[`data-tone`,`warn`,1,`pill`],[1,`facts`],[1,`tnum`],[`data-tone`,`warn`,1,`chip`,`mono`],[`data-tone`,`bad`,1,`chip`,`mono`],[`role`,`region`,`aria-label`,`Content files`,`tabindex`,`0`,1,`table-wrap`],[1,`muted`,`nowrap`,`tnum`],[`data-tone`,`bad`,1,`pill`],[`data-tone`,`good`,`role`,`status`,1,`callout`],[1,`findings`],[1,`finding-head`],[1,`finding-title`],[1,`where`],[1,`fix`],[1,`rule`,`mono`],[1,`detail`]],template:function(e,t){e&1&&P(0,IH,7,0,`div`,0)(1,LH,4,0,`div`,1)(2,RH,14,0,`div`,2)(3,IW,36,10),e&2&&F(t.project()===null&&t.loadFailed()?0:t.project()===null?1:t.project().analog?3:2)},dependencies:[GD,TO],styles:[`@charset "UTF-8";
+}`]})},rU=()=>[],iU=()=>[`/`],aU=(e,t)=>t.id,oU=(e,t)=>t.route.id,sU=(e,t)=>t[0],cU=(e,t)=>t.file+t.method,lU=(e,t)=>t.path,uU=(e,t)=>t.mode,dU=(e,t)=>t.file,fU=(e,t)=>t.rule;function pU(e,t){if(e&1){let e=W();z(0,`div`,0)(1,`h2`,3),J(2,`Could not read the project.`),B(),z(3,`p`,4),J(4,` Check that the dev server with Pangular Inspector is still running, then retry. `),B(),z(5,`button`,5),G(`click`,function(){return O(e),k(K().retry())}),J(6,`Retry`),B()()}}function mU(e,t){e&1&&(z(0,`div`,1),V(1,`span`,6),z(2,`span`),J(3,`Reading the project…`),B()())}function hU(e,t){e&1&&(z(0,`div`,2)(1,`h2`,3),J(2,`This app is not an Analog app.`),B(),z(3,`p`,4),J(4,` Add `),z(5,`code`),J(6,`pangular()`),B(),J(7,` from `),z(8,`code`),J(9,`@pangular-inspector/devtools/vite`),B(),J(10,` next to `),z(11,`code`),J(12,`analog()`),B(),J(13,` in vite.config.ts and run the Analog dev server. `),B()())}function gU(e,t){if(e&1&&(z(0,`div`,11)(1,`span`,9),J(2,`Open in the browser`),B(),z(3,`span`,15),J(4),B()()),e&2){let e=t;M(3),R(`title`,e.url),M(),Y(e.url)}}function _U(e,t){if(e&1){let e=W();z(0,`button`,16),G(`click`,function(){let t=O(e).$implicit;return k(K(2).view.set(t.id))}),J(1),z(2,`span`,17),J(3),B()()}if(e&2){let e=t.$implicit,n=K(2);R(`id`,`analog-tab-`+e.id),N(`aria-selected`,e.id===n.view())(`aria-controls`,`analog-panel-`+e.id)(`tabindex`,e.id===n.view()?0:-1),M(),X(` `,e.label,` `),M(),N(`data-tone`,e.tone),M(),Y(e.count)}}function vU(e,t){e&1&&(z(0,`div`,26),J(1),B()),e&2&&(M(),Y(t))}function yU(e,t){if(e&1&&(z(0,`app-source-link`,34),J(1),B()),e&2){let e=K().$implicit,t=K(5);R(`file`,e.file),M(),Y(t.short(e.file))}}function bU(e,t){if(e&1&&(z(0,`span`,31),J(1),B()),e&2){let e=K().$implicit;M(),Y(e.fullPath)}}function xU(e,t){if(e&1&&(z(0,`li`),P(1,yU,2,2,`app-source-link`,34)(2,bU,2,1,`span`,31),z(3,`span`,35),J(4),B()()),e&2){let e=t.$implicit;M(),F(e.file?1:2),M(2),N(`data-kind`,e.kind),M(),Y(e.kind)}}function SU(e,t){if(e&1&&(z(0,`span`,36),J(1),B()),e&2){let e=t.$implicit;M(),Z(``,e[0],` = `,e[1])}}function CU(e,t){if(e&1&&(z(0,`div`,33),I(1,SU,2,2,`span`,36,sU),B()),e&2){let e=K(2),t=K(3);M(),L(t.paramList(e.match.params))}}function wU(e,t){if(e&1&&(z(0,`strong`,31),J(1),B(),J(2,` renders `),z(3,`ol`,32),I(4,xU,5,3,`li`,null,aU),B(),P(6,CU,3,0,`div`,33)),e&2){let e=K(),t=K(3);M(),Y(e.url),M(3),L(e.match.chain),M(2),F(t.paramList(e.match.params).length?6:-1)}}function TU(e,t){if(e&1&&(z(0,`app-source-link`,34),J(1),B()),e&2){let e=K().$implicit,t=K(6);R(`file`,e.file),M(),Y(t.short(e.file))}}function EU(e,t){if(e&1&&(z(0,`span`,31),J(1),B()),e&2){let e=K().$implicit;M(),Y(e.path)}}function DU(e,t){if(e&1&&(z(0,`li`),P(1,TU,2,2,`app-source-link`,34)(2,EU,2,1,`span`,31),z(3,`span`,4),J(4),B()()),e&2){let e=t.$implicit;M(),F(e.file?1:2),M(3),Y(e.reason)}}function OU(e,t){if(e&1&&(z(0,`ul`,37),I(1,DU,5,2,`li`,null,Dg),B()),e&2){let e=K(2);M(),L(e.match.rejected.slice(0,5))}}function kU(e,t){if(e&1&&(z(0,`strong`,31),J(1),B(),J(2,` matches no file route. Angular throws NG04002 "Cannot match any routes". `),P(3,OU,3,0,`ul`,37)),e&2){let e=K();M(),Y(e.url),M(2),F(e.match.rejected.length?3:-1)}}function AU(e,t){if(e&1&&(z(0,`div`,27),P(1,wU,7,2)(2,kU,4,2),B()),e&2){let e=t;N(`data-tone`,e.match.matched?`good`:`bad`),M(),F(e.match.matched?1:2)}}function jU(e,t){e&1&&(z(0,`span`,39),J(1,`└`),B())}function MU(e,t){e&1&&(z(0,`span`,41),J(1,`open`),B())}function NU(e,t){if(e&1&&(z(0,`app-source-link`,42)(1,`span`,46),J(2),B(),J(3),B()),e&2){let e=K().$implicit,t=K(3);R(`file`,e.route.file),M(2),Y(t.dir(e.route.file)),M(),Y(t.base(e.route.file))}}function PU(e,t){e&1&&(z(0,`span`,4),J(1,`folder only`),B())}function FU(e,t){if(e&1&&(z(0,`span`,44),J(1),B()),e&2){let e=t.$implicit;M(),X(``,e,`()`)}}function IU(e,t){if(e&1&&(z(0,`span`,45),J(1),B()),e&2){let e=K().$implicit;M(),X(`"`,e.route.title,`"`)}}function LU(e,t){if(e&1&&(z(0,`span`,36),J(1),B()),e&2){let e=K().$implicit;M(),Y(e)}}function RU(e,t){if(e&1&&P(0,LU,2,1,`span`,36),e&2){let e=t.$implicit;F(e===`title`?-1:0)}}function zU(e,t){if(e&1&&(z(0,`tr`)(1,`td`)(2,`div`,38),P(3,jU,2,0,`span`,39),z(4,`span`,40),J(5),B(),z(6,`span`,35),J(7),B(),P(8,MU,2,0,`span`,41),B()(),z(9,`td`),P(10,NU,4,3,`app-source-link`,42)(11,PU,2,0,`span`,4),B(),z(12,`td`)(13,`div`,43),I(14,FU,2,1,`span`,44,Og),B()(),z(16,`td`),P(17,IU,2,1,`span`,45),I(18,RU,1,1,null,null,Og),B()()),e&2){let e=t.$implicit,n=K(3);q(`open`,n.isOpen(e.route))(`dim`,e.route.kind===`group`||e.route.kind===`implicit`),M(2),j_(`padding-left`,e.depth*16,`px`),M(),F(e.depth?3:-1),M(2),Y(e.route.fullPath),M(),N(`data-kind`,e.route.kind),M(),Y(n.kindText(e.route)),M(),F(n.isOpen(e.route)?8:-1),M(2),F(e.route.file?10:11),M(4),L(n.serverExports(e.route)),M(3),F(e.route.title?17:-1),M(),L(e.route.routeMeta??mv(13,rU))}}function BU(e,t){e&1&&J(0,` No route matches the filter. Try part of a path or a file name. `)}function VU(e,t){e&1&&J(0,` No file routes yet. Add a .page.ts file under src/app/pages. `)}function HU(e,t){if(e&1&&(z(0,`tr`)(1,`td`,47),P(2,BU,1,0)(3,VU,1,0),B()()),e&2){let e=K(3);M(2),F(e.filter().trim()?2:3)}}function UU(e,t){if(e&1){let e=W();z(0,`div`,18)(1,`form`,19),G(`submit`,function(t){O(e);let n=K(2);return t.preventDefault(),k(n.explain())}),z(2,`label`,20),J(3,`Test a URL`),B(),z(4,`input`,21),G(`input`,function(t){return O(e),k(K(2).testUrl.set(t.target.value))}),B(),z(5,`button`,22),J(6),B()(),z(7,`label`,23),J(8,`Filter routes`),B(),z(9,`input`,24),G(`input`,function(t){return O(e),k(K(2).filter.set(t.target.value))})(`keydown.escape`,function(){return O(e),k(K(2).filter.set(``))}),B()(),z(10,`div`,25),P(11,vU,2,1,`div`,26)(12,AU,3,2,`div`,27),B(),z(13,`div`,28)(14,`table`)(15,`thead`)(16,`tr`)(17,`th`,29),J(18,`Route`),B(),z(19,`th`,29),J(20,`File`),B(),z(21,`th`,29),J(22,`Data`),B(),z(23,`th`,29),J(24,`Route meta`),B()()(),z(25,`tbody`),I(26,zU,20,14,`tr`,30,oU,!1,HU,4,1,`tr`),B()()()}if(e&2){let e,t=K(2);M(4),R(`value`,t.testUrl()),M(),R(`disabled`,t.explaining()),M(),X(` `,t.explaining()?`Explaining…`:`Explain`,` `),M(3),R(`value`,t.filter()),M(2),F((e=t.explainError())?11:(e=t.explained())?12:-1,e),M(15),L(t.routeRows())}}function WU(e,t){if(e&1&&(z(0,`span`,31),J(1),B(),J(2)),e&2){let e=t.$implicit,n=t.$index,r=t.$count;M(),Y(e),M(),X(``,n===r-1?``:`, `,` `)}}function GU(e,t){if(e&1&&(z(0,`div`,48)(1,`strong`),J(2,`load() ran twice`),B(),J(3,` for `),I(4,WU,3,2,null,null,Og),J(6,` : once while server rendering, again in the browser. TransferState did not serve the server result. `),B()),e&2){let e=K(3);M(4),L(e.duplicates())}}function KU(e,t){if(e&1&&(z(0,`span`,31),J(1),B(),J(2)),e&2){let e=t.$implicit,n=t.$index,r=t.$count;M(),Y(e),M(),X(``,n===r-1?``:`, `,` `)}}function qU(e,t){if(e&1&&(z(0,`div`,48)(1,`strong`),J(2,`Server function read ran twice`),B(),J(3,`: `),I(4,KU,3,2,null,null,Og),J(6,` ran while server rendering, then again in the browser. The browser did not use the TransferState seed. `),B()),e&2){let e=K(3);M(4),L(e.refetchedFns())}}function JU(e,t){if(e&1){let e=W();z(0,`label`)(1,`input`,80),G(`change`,function(){let t=O(e).$implicit;return k(K(3).kind.set(t))}),B(),J(2),z(3,`span`,4),J(4),B()()}if(e&2){let e=t.$implicit,n=K(3);q(`on`,n.kind()===e),M(),R(`checked`,n.kind()===e),N(`data-kind`,e),M(),X(` `,n.kindLabel(e),` `),M(2),Y(n.kindCount(e))}}function YU(e,t){if(e&1&&J(0),e&2){let e=K(4);Z(` Showing the newest `,e.shownCount(),` of `,e.matchingCalls().length,`. `)}}function XU(e,t){e&1&&J(0),e&2&&X(` The dev server keeps only the newest `,K(4).maxServerCalls,` calls and drops older ones. `)}function ZU(e,t){if(e&1&&(z(0,`p`,66),P(1,YU,1,2),P(2,XU,1,1),B()),e&2){let e=K(3);M(),F(e.shownCount()1?6:-1),M(2),Y(e.summary),M(2),L(e.items),M(5),X(` `,e.fix),M(2),Y(e.rule)}}function uG(e,t){if(e&1&&(z(0,`p`,4),J(1),B(),z(2,`ul`,113),I(3,lG,18,8,`li`,null,fU),B()),e&2){let e=K(3);M(),Z(` `,e.findings().length,` issue(s) in `,e.lintCards().length,` group(s). Each card says what is wrong, where, and how to fix it. `),M(2),L(e.lintCards())}}function dG(e,t){e&1&&(z(0,`div`,112)(1,`strong`),J(2,`No Analog problems found.`),B(),J(3,` Routes, server files, prerender config and content all check out. `),B())}function fG(e,t){e&1&&P(0,uG,5,2)(1,dG,4,0,`div`,112),e&2&&F(+!K(2).findings().length)}function pG(e,t){if(e&1){let e=W();z(0,`section`,7)(1,`div`,8)(2,`span`,9),J(3,`Analog`),B(),z(4,`span`,10),J(5),B()(),z(6,`div`,8)(7,`span`,9),J(8,`Pages`),B(),z(9,`span`,10),J(10),B()(),z(11,`div`,8)(12,`span`,9),J(13,`API routes`),B(),z(14,`span`,10),J(15),B()(),z(16,`div`,8)(17,`span`,9),J(18,`Server calls`),B(),z(19,`span`,10),J(20),B()(),z(21,`div`,8)(22,`span`,9),J(23,`Issues`),B(),z(24,`span`,10),J(25),B()(),P(26,gU,5,2,`div`,11),B(),z(27,`div`,12),G(`keydown`,function(t){return O(e),k(K().onKey(t))}),I(28,_U,4,7,`button`,13,aU),B(),z(30,`div`,14),P(31,UU,29,6)(32,DW,65,21)(33,ZW,18,3)(34,rG,2,1)(35,fG,2,1),B()}if(e&2){let e,t,n=K();M(5),Y(n.project().version||`unknown`),M(5),Y(n.pageCount()),M(5),Y(n.project().api.length),M(5),Y(n.allCalls().length),M(),N(`data-tone`,n.lintTone()||`good`),M(4),Y(n.lintCount().errors+n.lintCount().warnings),M(),F((e=n.page())?26:-1,e),M(2),L(n.views()),M(2),R(`id`,`analog-panel-`+n.view()),N(`aria-labelledby`,`analog-tab-`+n.view()),M(),F((t=n.view())===`routes`?31:t===`server`?32:t===`render`?33:t===`content`?34:t===`lint`?35:-1)}}var mG={"scan-error":{title:`A folder could not be read`,summary:`Its files are missing from routes, API routes and lint results.`},"duplicate-url":{title:`Two files serve the same URL`,summary:`Only one of them is reachable; the other never renders.`},"sibling-params":{title:`Two dynamic pages in one folder`,summary:`Both are [param] pages at the same level, so the first one always wins.`},"missing-default-export":{title:`Page has no default export`,summary:`Analog needs the component as the default export, so the page renders nothing.`},"redirect-with-component":{title:`Redirect page also exports a component`,summary:`The redirect runs first, so the component never shows.`},"redirect-path-match":{title:`Redirect matches too much`,summary:`An empty-path redirect without pathMatch "full" catches every URL below it.`},"layout-without-outlet":{title:`Layout has no router-outlet`,summary:`The layout has child pages, but without  they never render.`},"server-without-load":{title:`.server.ts without load or action`,summary:`The server file exports no load, action or server function, so Analog calls nothing.`},"orphan-server-file":{title:`.server.ts without a page`,summary:`No page file sits next to it, so its load never runs.`},"api-method-suffix":{title:`Unknown method suffix on an API file`,summary:`The suffix is not an HTTP method, so it becomes part of the URL.`},"duplicate-api-route":{title:`Two handlers for one API route`,summary:`Two files answer the same method and path.`},"api-outside-prefix":{title:`Server route outside the API prefix`,summary:`During vite dev only routes under the prefix reach Nitro.`},"prerender-unknown-route":{title:`Prerender entry matches no page`,summary:`prerender.routes lists a path that no page file serves.`},"prerender-missing-root":{title:`Home page is not prerendered`,summary:`static is on, but prerender.routes leaves out /.`},"content-frontmatter":{title:`Broken frontmatter`,summary:`The markdown frontmatter cannot be read.`},"duplicate-slug":{title:`Two posts share a slug`,summary:`injectContent picks one of them at random.`},"content-shadows-page":{title:`Markdown file takes over a page`,summary:`Files under src/content are routes too, so these URLs render the markdown file instead of the [param] page.`},"load-fetched-twice":{title:`load() runs twice`,summary:`These pages fetched their data while rendering on the server and again in the browser.`},"fn-fetched-twice":{title:`Server function read runs twice`,summary:`These reads ran while rendering on the server and again in the browser right after hydration.`},"restart-needed":{title:`New pages need a restart`,summary:`These page files exist, but the running router does not know them yet.`},"hydration-error":{title:`Hydration error`,summary:`The browser DOM did not match the server HTML.`},"api-not-found":{title:`API call failed with 404 or 405`,summary:`A request hit a path or method that no server route handles.`}},hG=200,gG=new Set([`missing-default-export`,`redirect-with-component`,`redirect-path-match`,`layout-without-outlet`,`server-without-load`,`orphan-server-file`,`load-fetched-twice`,`restart-needed`,`prerender-missing-root`]),_G={ssr:`SSR`,ssg:`Prerendered`,client:`Client only`,cached:`Cached`,redirect:`Redirect`},vG={all:`All`,page:`Pages`,load:`load()`,action:`Actions`,fn:`Server fn`,api:`API`},yG={success:`succeeded`,redirect:`redirected`,invalid:`validation errors`,error:`failed`},bG={success:`good`,redirect:`info`,invalid:`warn`,error:`bad`};function xG(e,t=0,n=[]){for(let r of e)n.push({route:r,depth:t}),xG(r.children,t+1,n);return n}var SG=class e{rpc=$(null);canCall=Q(()=>ME(this.rpc(),`analog`));callsOff=iE(`analog`);kinds=[`all`,`page`,`load`,`action`,`fn`,`api`];methods=[`GET`,`POST`,`PUT`,`PATCH`,`DELETE`];methodOptions=this.methods.map(e=>({value:e,label:e}));view=j(`routes`);project=j(null);loadFailed=j(!1);state=j({});findings=j([]);renderRows=j([]);plan=j(null);filter=j(``);testUrl=j(``);explained=j(null);explainError=j(``);explaining=j(!1);kind=j(`all`);method=j(`GET`);apiPath=j(``);apiBody=j(``);confirmSend=j(!1);response=j(null);sending=j(!1);needsConfirm=Q(()=>this.method()!==`GET`&&!this.confirmSend());canSend=Q(()=>this.canCall()&&!this.sending()&&!this.needsConfirm());sendHintId=Q(()=>this.canCall()?this.needsConfirm()?`analog-confirm-hint`:null:`analog-calls-off`);unsubscribe=null;refreshTimer;refreshRun=0;destroyRef=E(ws);host=E(Nl);hostPageId=fE();page=Q(()=>{let e=this.state().pages??[];return(this.hostPageId?e.find(e=>e.pageId===this.hostPageId):e[0])??null});openFiles=Q(()=>new Set((this.page()?.chain??[]).map(e=>e.file)));allCalls=Q(()=>this.state().calls??[]);maxServerCalls=hG;callQuery=j(``);failedOnly=j(!1);callsMessage=j(``);callFiltered=Q(()=>!!this.callQuery().trim()||this.failedOnly());matchingCalls=Q(()=>{let e=this.kind(),t=this.callQuery().trim().toLowerCase(),n=this.failedOnly();return this.allCalls().filter(r=>(e===`all`||r.kind===e)&&(!n||this.isFailed(r))&&(!t||this.callText(r).includes(t)))});calls=Q(()=>this.matchingCalls().slice(-150).reverse());shownCount=Q(()=>this.calls().length);serverFull=Q(()=>this.allCalls().length>=hG);allRoutes=Q(()=>xG(this.project()?.routes??[]));pageCount=Q(()=>this.allRoutes().filter(e=>e.route.file&&e.route.kind!==`layout`).length);routeRows=Q(()=>{let e=this.filter().trim().toLowerCase();return e?this.allRoutes().filter(t=>t.route.fullPath.toLowerCase().includes(e)||!!t.route.file?.toLowerCase().includes(e)):this.allRoutes()});serverFns=Q(()=>this.project()?.serverFns??[]);fnById=Q(()=>new Map(this.serverFns().map(e=>[e.id,e])));refetchedFns=Q(()=>Array.from(new Set((this.state().refetches??[]).map(e=>this.fnById().get(e.id)?.name??e.id))));duplicates=Q(()=>Array.from(new Set((this.state().duplicates??[]).map(e=>e.route))));modeCounts=Q(()=>[`ssr`,`ssg`,`cached`,`client`,`redirect`].map(e=>({mode:e,label:_G[e],count:this.renderRows().filter(t=>t.mode===e).length})).filter(e=>e.count));lintCards=Q(()=>{let e={error:0,warning:1,info:2},t=new Map;for(let e of this.findings()){let n=t.get(e.rule);if(!n){let r=mG[e.rule];n={rule:e.rule,severity:e.severity,title:r?.title??e.rule,summary:r?.summary??e.message,fix:e.fix,items:[]},t.set(e.rule,n)}let r=gG.has(e.rule)||e.message===n.summary?void 0:e.message;n.items.some(t=>t.file===e.file&&t.path===e.path&&t.message===r)||n.items.push({file:e.file,path:e.path,message:r})}return Array.from(t.values()).sort((t,n)=>e[t.severity]-e[n.severity])});lintCount=Q(()=>{let e=this.findings();return{errors:e.filter(e=>e.severity===`error`).length,warnings:e.filter(e=>e.severity===`warning`).length}});lintTone=Q(()=>{let{errors:e,warnings:t}=this.lintCount();return e?`bad`:t?`warn`:``});views=Q(()=>{let{errors:e,warnings:t}=this.lintCount();return[{id:`routes`,label:`Routes`,count:this.pageCount(),tone:``},{id:`server`,label:`Server`,count:this.allCalls().length,tone:``},{id:`render`,label:`Render`,count:this.renderRows().length,tone:``},{id:`content`,label:`Content`,count:this.project()?.content.length??0,tone:``},{id:`lint`,label:`Lint`,count:e+t,tone:this.lintTone()}]});constructor(){dc(()=>{let e=this.rpc();e&&Nv(()=>void this.load(e))}),dc(()=>{let e=this.view();this.state(),Nv(()=>this.scheduleRefresh(e))}),this.destroyRef.onDestroy(()=>{this.unsubscribe?.(),clearTimeout(this.refreshTimer)})}async load(e){let t=await _E(e,`analog-project`);if(!this.destroyRef.destroyed){this.project.set(t),this.loadFailed.set(t===null);try{let t=await e.scope(`pangular`).rpc.sharedState(`analog`);if(this.destroyRef.destroyed)return;let n=e=>this.state.set(e??{});n(t.value()),this.unsubscribe?.(),this.unsubscribe=t.on(`updated`,n)}catch{this.state.set({})}this.destroyRef.destroyed||await this.refresh(this.view())}}retry(){let e=this.rpc();e&&(this.loadFailed.set(!1),this.load(e))}scheduleRefresh(e){clearTimeout(this.refreshTimer),this.refreshTimer=setTimeout(()=>void this.refresh(e),300)}async refresh(e){let t=this.rpc();if(!t)return;let n=++this.refreshRun,[r,i]=await Promise.all([_E(t,`analog-lint`,this.hostPageId??void 0),_E(t,`analog-render`)]);if(n===this.refreshRun&&(this.findings.set(r??[]),this.renderRows.set(i?.rows??[]),this.plan.set(i?.plan??null),e===`routes`||e===`content`||this.project()===null)){let e=await _E(t,`analog-project`);e&&n===this.refreshRun&&(this.project.set(e),this.loadFailed.set(!1))}}isOpen(e){return!!e.file&&this.openFiles().has(e.file)}kindText(e){return e.catchAll?e.catchAll===`optional`?`optional catch-all`:`catch-all`:e.kind===`implicit`?`folder`:e.kind}serverExports(e){return(e.serverExports??[]).filter(e=>e===`load`||e===`action`)}short(e){return e?.replace(/^\/src\/app\//,``).replace(/^\//,``)}dir(e){let t=this.short(e)??e;return t.includes(`/`)?t.slice(0,t.lastIndexOf(`/`)+1):``}base(e){return e.slice(e.lastIndexOf(`/`)+1)}paramList(e){return Object.entries(e)}kindLabel(e){return vG[e]}kindCount(e){return e===`all`?this.allCalls().length:this.allCalls().filter(t=>t.kind===e).length}modeLabel(e){return _G[e]}mismatch(e){return!e.last?.render||e.mode===`redirect`?!1:e.mode===`client`?e.last.render!==`client`:e.last.render===`client`}fnOf(e){return e.kind===`fn`&&e.route?this.fnById().get(e.route):void 0}fnCalls(e){return this.allCalls().filter(t=>t.kind===`fn`&&t.route===e).length}outcomeLabel(e){return yG[e]}outcomeTone(e){return bG[e]}statusClass(e){return e>=500||e===0?`bad`:e>=400?`warn`:`good`}tone(e){return e===`error`?`bad`:e===`warning`?`warn`:`info`}shadowed(e){return this.findings().find(t=>t.rule===`content-shadows-page`&&t.file===e)?.relatedFile}contentUrl(e){return this.allRoutes().find(t=>t.route.file===e)?.route.fullPath}pretty(e){try{return JSON.stringify(JSON.parse(e),null,2)}catch{return e}}time=tO;tryApi(e){this.method.set(e.method===`ANY`?`GET`:e.method),this.apiPath.set(e.path.replace(/:(\w+)/g,`1`).replace(`**`,`x`)),this.response.set(null),queueMicrotask(()=>document.getElementById(`api-path`)?.focus())}isFailed(e){return!e.status||e.status>=400||e.outcome===`error`}callText(e){let t=this.fnOf(e);return[e.url,e.route,t?.name,t?.file].filter(Boolean).join(` `).toLowerCase()}clearCallFilters(){this.callQuery.set(``),this.failedOnly.set(!1),this.kind.set(`all`),queueMicrotask(()=>this.host.nativeElement.querySelector(`#analog-call-search`)?.focus())}async clearCalls(){let e=this.rpc();try{if(!e)throw Error(`No devtools server`);await gE(e,`analog-clear-calls`),this.callsMessage.set(`Calls cleared.`),queueMicrotask(()=>this.host.nativeElement.querySelector(`input[name="analog-kind"]:checked`)?.focus())}catch{this.callsMessage.set(`Could not clear the calls.`)}}async explain(){let e=this.testUrl().trim();if(!e){this.explained.set(null),this.explainError.set(`Type a URL to explain, for example /products/42.`);return}this.explaining.set(!0),this.explainError.set(``);try{let t=await gE(this.rpc(),`analog-explain-url`,e);if(!t)throw Error(`The devtools server did not answer`);this.explained.set({url:e,match:t})}catch(t){let n=String(t?.message||`The devtools server did not answer`);this.explained.set(null),this.explainError.set(`Could not explain ${e}. ${n.replace(/\.?$/,`.`)}`)}finally{this.explaining.set(!1)}}async send(){let e=this.apiPath().trim();if(!e||this.sending()||this.needsConfirm())return;let t;if(this.method()!==`GET`&&this.apiBody().trim())try{t=JSON.parse(this.apiBody())}catch{this.response.set({error:`The body is not valid JSON.`});return}this.response.set(null),this.sending.set(!0);try{let n=await _E(this.rpc(),`analog-call-api`,{method:this.method(),path:e,body:t,confirm:this.confirmSend()});this.response.set(n??{error:`No answer from the devtools server.`})}finally{this.sending.set(!1)}}onKey(e){let t=this.views().map(e=>e.id),n=t.indexOf(this.view()),r=n;if(e.key===`ArrowRight`)r=(n+1)%t.length;else if(e.key===`ArrowLeft`)r=(n-1+t.length)%t.length;else if(e.key===`Home`)r=0;else if(e.key===`End`)r=t.length-1;else return;e.preventDefault(),this.view.set(t[r]);let i=e.currentTarget;queueMicrotask(()=>i.querySelector(`#analog-tab-${t[r]}`)?.focus())}static ɵfac=function(t){return new(t||e)};static ɵcmp=Wh({type:e,selectors:[[`app-analog-inspector`]],inputs:{rpc:[1,`rpc`]},decls:4,vars:1,consts:[[`role`,`alert`,1,`empty`],[`role`,`status`,1,`loading`],[1,`empty`],[1,`empty-title`],[1,`muted`],[`type`,`button`,1,`btn`,3,`click`],[`aria-hidden`,`true`,1,`spinner`],[`aria-label`,`Analog summary`,1,`summary`],[1,`stat`],[1,`label`],[1,`value`],[1,`stat`,`wide`],[`role`,`tablist`,`aria-label`,`Analog views`,1,`tabs`,3,`keydown`],[`type`,`button`,`role`,`tab`,3,`id`],[`role`,`tabpanel`,1,`panel`,3,`id`],[1,`value`,`mono`,3,`title`],[`type`,`button`,`role`,`tab`,3,`click`,`id`],[1,`count`],[1,`toolbar`],[1,`inline`,`explain`,3,`submit`],[`for`,`analog-url`],[`id`,`analog-url`,`type`,`text`,`placeholder`,`/products/42`,1,`field`,`grow`,`mono`,3,`input`,`value`],[`type`,`submit`,1,`btn`,`primary`,3,`disabled`],[`for`,`route-filter`,1,`sr-only`],[`id`,`route-filter`,`type`,`search`,`placeholder`,`Filter by path or file`,1,`field`,`filter`,3,`input`,`keydown.escape`,`value`],[`role`,`status`,1,`explain-result`],[`data-tone`,`bad`,1,`callout`],[1,`callout`],[`role`,`region`,`aria-label`,`File routes`,`tabindex`,`0`,1,`table-wrap`],[`scope`,`col`],[3,`open`,`dim`],[1,`mono`],[1,`chain`],[1,`chips`],[1,`mono`,3,`file`],[1,`pill`],[1,`chip`,`mono`],[1,`plain`],[1,`route`],[`aria-hidden`,`true`,1,`guide`],[1,`mono`,`path`],[1,`pill`,`live`],[1,`file`,3,`file`],[1,`meta`],[`data-kind`,`load`,1,`pill`],[1,`chip`],[1,`dir`],[`colspan`,`4`,1,`empty-row`],[`data-tone`,`warn`,`role`,`note`,1,`callout`],[`id`,`analog-calls-heading`],[1,`calls-bar`],[1,`segmented`],[1,`sr-only`],[3,`on`],[1,`calls-actions`],[`type`,`button`,1,`btn`,`ghost`,3,`click`,`disabled`],[`role`,`status`,1,`calls-message`],[`role`,`group`,`aria-label`,`Filter the server calls`,1,`call-filters`],[1,`search`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`,1,`search-icon`],[`cx`,`11`,`cy`,`11`,`r`,`7`],[`d`,`m20 20-3.5-3.5`],[`id`,`analog-call-search`,`type`,`search`,`placeholder`,`Find a URL, path or function…`,`aria-label`,`Find a URL, path or function`,`autocomplete`,`off`,`spellcheck`,`false`,1,`field`,3,`input`,`keydown.escape`,`value`],[1,`check`],[`type`,`checkbox`,3,`change`,`checked`],[`aria-live`,`polite`,1,`total`],[1,`note`],[`role`,`region`,`aria-label`,`Server calls`,`tabindex`,`0`,1,`table-wrap`],[`role`,`status`,1,`empty-box`,`no-match`],[1,`empty-box`],[`role`,`region`,`aria-label`,`API routes`,`tabindex`,`0`,1,`table-wrap`],[1,`card`,`playground`,3,`submit`],[1,`row`],[`ariaLabel`,`Method`,1,`method-select`,3,`valueChange`,`options`,`value`],[`for`,`api-path`,1,`sr-only`],[`id`,`api-path`,`type`,`text`,`placeholder`,`/api/v1/products`,1,`field`,`grow`,`mono`,3,`input`,`value`],[`id`,`analog-calls-off`,1,`muted`],[`id`,`analog-confirm-hint`,1,`muted`],[`role`,`status`,1,`muted`],[`role`,`status`,1,`response`],[`type`,`radio`,`name`,`analog-kind`,1,`sr-only`,3,`change`,`checked`],[`scope`,`col`,1,`num`],[1,`muted`,`nowrap`],[1,`request`],[1,`method`],[1,`mono`,`url`],[1,`status`],[1,`num`,`nowrap`],[1,`mono`,`muted`,3,`file`],[1,`code`],[1,`empty-lead`],[1,`empty-actions`],[`type`,`button`,1,`btn`,`ghost`,3,`click`],[1,`actions`],[`role`,`region`,`aria-label`,`Server functions`,`tabindex`,`0`,1,`table-wrap`],[1,`num`,`tnum`],[`for`,`api-body`],[`id`,`api-body`,`rows`,`3`,`placeholder`,`{"name": "Ada"}`,1,`field`,`mono`,3,`input`,`value`],[1,`check`,`confirm-send`],[`data-status`,`bad`,1,`status`],[`role`,`region`,`aria-label`,`Render modes`,`tabindex`,`0`,1,`table-wrap`],[1,`card`],[1,`muted`,`small`],[1,`muted`,`small`,`tnum`],[`data-tone`,`warn`,1,`pill`],[1,`facts`],[1,`tnum`],[`data-tone`,`warn`,1,`chip`,`mono`],[`data-tone`,`bad`,1,`chip`,`mono`],[`role`,`region`,`aria-label`,`Content files`,`tabindex`,`0`,1,`table-wrap`],[1,`muted`,`nowrap`,`tnum`],[`data-tone`,`bad`,1,`pill`],[`data-tone`,`good`,`role`,`status`,1,`callout`],[1,`findings`],[1,`finding-head`],[1,`finding-title`],[1,`where`],[1,`fix`],[1,`rule`,`mono`],[1,`detail`]],template:function(e,t){e&1&&P(0,pU,7,0,`div`,0)(1,mU,4,0,`div`,1)(2,hU,14,0,`div`,2)(3,pG,36,10),e&2&&F(t.project()===null&&t.loadFailed()?0:t.project()===null?1:t.project().analog?3:2)},dependencies:[qD,DO],styles:[`@charset "UTF-8";
 [_nghost-%COMP%] {
   --%NS%good: var(--%NS%ok);
   --%NS%bad: var(--%NS%danger);
@@ -11879,7 +12153,7 @@ h2[_ngcontent-%COMP%] {
   color: var(--%NS%text-strong);
   font-size: 15px;
   font-weight: 600;
-}`]})},KW=(e,t)=>t.id,qW=(e,t)=>t.id+t.kind,JW=(e,t)=>t.side+t.id,YW=(e,t)=>t.key;function XW(e,t){e&1&&(z(0,`div`,0),V(1,`span`,67),z(2,`span`),J(3,`Loading…`),B()())}function ZW(e,t){if(e&1){let e=W();z(0,`div`,1)(1,`strong`),J(2,`Could not reach the devtools server.`),B(),z(3,`span`),J(4,`Check that the app's dev server is running with the devtools plugin.`),B(),z(5,`button`,68),G(`click`,function(){return O(e),k(K().retry())}),J(6,`Try again`),B()()}}function QW(e,t){e&1&&(z(0,`span`,81),J(1,`this page`),B())}function $W(e,t){e&1&&(z(0,`span`,82),J(1,`overridden`),B())}function eG(e,t){e&1&&(z(0,`span`,83),J(1,`aborted`),B())}function tG(e,t){if(e&1){let e=W();z(0,`tr`,73),G(`click`,function(){let t=O(e).$implicit;return k(K(2).selectedRequestId.set(t.id))}),z(1,`td`,74)(2,`button`,75)(3,`span`,76),J(4),B(),J(5),B()(),z(6,`td`,77),V(7,`span`,78),J(8),B(),z(9,`td`),J(10),B(),z(11,`td`,79),J(12),B(),z(13,`td`,79),J(14),B(),z(15,`td`)(16,`div`,80),P(17,QW,2,0,`span`,81),P(18,$W,2,0,`span`,82),P(19,eG,2,0,`span`,83),B()()()}if(e&2){let e=t.$implicit,n=K(2);q(`selected`,n.selectedRequest()?.id===e.id),M(2),R(`title`,e.url),N(`aria-pressed`,n.selectedRequest()?.id===e.id),M(2),Y(e.method),M(),X(` `,e.url,` `),M(),q(`ok`,n.statusTone(e.status)===`ok`)(`redirect`,n.statusTone(e.status)===`redirect`)(`bad`,n.statusTone(e.status)===`bad`),M(2),X(``,e.status,` `),M(2),Y(n.renderModeLabel(e.renderMode)),M(2),X(``,e.renderMs,` ms`),M(2),Z(``,e.fetches,` (`,e.fetchMs,` ms)`),M(3),F(e.id===n.selected()?.ssrRequestId?17:-1),M(),F(e.overrides?.length?18:-1),M(),F(e.aborted?19:-1)}}function nG(e,t){e&1&&(z(0,`p`,56),J(1),z(2,`code`),J(3,`ssrMiddleware`),B(),J(4,` saw it, so the render mode can't be read and TransferState edits can't apply. Mount `),z(5,`code`),J(6,`ssrMiddleware`),B(),J(7,` after `),z(8,`code`),J(9,`compression()`),B(),J(10,`. `),B()),e&2&&(M(),X(` The body was already compressed (`,t,`) when `))}function rG(e,t){if(e&1&&(z(0,`span`,88),J(1),B()),e&2){let e=K().$implicit;M(),Y(e.note)}}function iG(e,t){if(e&1&&(z(0,`p`,87)(1,`span`,82),J(2),B(),z(3,`span`),J(4),B(),P(5,rG,2,1,`span`,88),B()),e&2){let e=t.$implicit,n=K(4);M(2),Y(n.overrideLabel(e.kind)),M(2),Y(e.applied?`applied`:`not applied`),M(),F(e.note?5:-1)}}function aG(e,t){if(e&1&&(z(0,`h3`),J(1,`Overrides from the panel`),B(),z(2,`p`,56),J(3,` This response was changed on purpose, so it is not what the app sends on its own. `),B(),I(4,iG,6,3,`p`,87,qW)),e&2){let e=K();M(4),L(e.overrides)}}function oG(e,t){if(e&1&&(J(0,` to `),z(1,`code`),J(2),B()),e&2){let e=K().$implicit;M(2),Y(e.finalUrl)}}function sG(e,t){if(e&1&&(z(0,`div`)(1,`dt`),J(2,`Guards`),B(),z(3,`dd`),J(4),B()()),e&2){let e=K().$implicit,t=K(4);M(3),q(`bad`,t.guardVerdict(e)===`rejected`),M(),Z(` `,t.msLabel(e.guards.ms),``,t.guardVerdict(e)?`, `+t.guardVerdict(e):``,` `)}}function cG(e,t){if(e&1&&(z(0,`div`)(1,`dt`),J(2,`Resolvers`),B(),z(3,`dd`),J(4),B()()),e&2){let e=K().$implicit,t=K(4);M(4),Y(t.msLabel(e.resolvers.ms))}}function lG(e,t){if(e&1&&(z(0,`div`)(1,`dt`),J(2,`Navigation total`),B(),z(3,`dd`),J(4),B()()),e&2){let e=K().$implicit;M(4),X(``,e.durationMs,` ms`)}}function uG(e,t){if(e&1&&(z(0,`p`,56),J(1),B()),e&2){let e=K().$implicit;M(),Y(e.reason)}}function dG(e,t){if(e&1&&(z(0,`dl`,89)(1,`div`)(2,`dt`),J(3,`Navigation`),B(),z(4,`dd`)(5,`code`),J(6),B(),P(7,oG,3,1),J(8),B()(),P(9,sG,5,4,`div`),P(10,cG,5,1,`div`),P(11,lG,5,1,`div`),B(),P(12,uG,2,1,`p`,56)),e&2){let e=t.$implicit;M(6),Y(e.url),M(),F(e.finalUrl?7:-1),M(),X(` (`,e.outcome,`) `),M(),F(e.guards?9:-1),M(),F(e.resolvers?10:-1),M(),F(e.durationMs===void 0?-1:11),M(),F(e.reason?12:-1)}}function fG(e,t){if(e&1&&(z(0,`h3`),J(1,`Router during the render`),B(),I(2,dG,13,7,null,null,Dg)),e&2){let e=K();M(2),L(e.navigations)}}function pG(e,t){e&1&&(z(0,`span`,81),J(1,`cached`),B())}function mG(e,t){if(e&1&&(z(0,`span`,91),J(1,`not cached`),B()),e&2){let e=K().$implicit;R(`title`,K(3).skipText(e.cacheSkip))}}function hG(e,t){if(e&1&&(z(0,`p`,92),J(1),B()),e&2){let e=K().$implicit,t=K(3);M(),X(`Not cached: `,t.skipText(e.cacheSkip),`.`)}}function gG(e,t){if(e&1&&(z(0,`p`,87)(1,`span`,76),J(2),B(),z(3,`span`,90),J(4),B(),z(5,`span`,77),J(6),B(),z(7,`span`,88),J(8),B(),P(9,pG,2,0,`span`,81)(10,mG,2,1,`span`,91),B(),P(11,hG,2,1,`p`,92)),e&2){let e=t.$implicit,n=K(3);M(2),Y(e.method),M(),R(`title`,e.url),M(),Y(e.url),M(),q(`ok`,n.callTone(e)===`ok`)(`bad`,n.callTone(e)===`bad`),M(),Y(n.statusLabel(e)),M(2),X(``,e.durationMs,` ms`),M(),F(e.cacheStored?9:e.cacheSkip?10:-1),M(2),F(!e.cacheStored&&e.cacheSkip?11:-1)}}function _G(e,t){e&1&&(z(0,`p`,56),J(1,`The render made no HttpClient calls.`),B())}function vG(e,t){e&1&&(z(0,`p`,92),J(1),B()),e&2&&(M(),X(`Why: `,t,`.`))}function yG(e,t){if(e&1&&(z(0,`p`,87)(1,`span`,76),J(2),B(),z(3,`span`,90),J(4),B(),z(5,`span`,83),J(6,`cache miss`),B()(),P(7,vG,2,1,`p`,92)),e&2){let e,n=t.$implicit,r=K(4);M(2),Y(n.method),M(),R(`title`,n.url),M(),Y(n.url),M(3),F((e=r.refetchReason(n))?7:-1,e)}}function bG(e,t){if(e&1&&(z(0,`h3`),J(1),B(),z(2,`p`,56),J(3,` These calls ran on the server and again after hydration instead of reading the transfer cache. `),B(),I(4,yG,8,4,null,null,KW)),e&2){let e=K(3);M(),X(`Fetched again in the browser (`,e.refetched().length,`)`),M(3),L(e.refetched())}}function xG(e,t){e&1&&(z(0,`p`,86),J(1,`No server call ran again in the browser.`),B())}function SG(e,t){if(e&1&&(z(0,`div`,72)(1,`h3`,84),J(2),z(3,`code`),J(4),B()(),z(5,`dl`,85)(6,`div`)(7,`dt`),J(8,`Request id`),B(),z(9,`dd`)(10,`code`),J(11),B()()(),z(12,`div`)(13,`dt`),J(14,`Render`),B(),z(15,`dd`),J(16),B()(),z(17,`div`)(18,`dt`),J(19,`Total`),B(),z(20,`dd`),J(21),B()(),z(22,`div`)(23,`dt`),J(24,`Sent`),B(),z(25,`dd`),J(26),B()(),z(27,`div`)(28,`dt`),J(29,`Browser page`),B(),z(30,`dd`),J(31),B()()(),P(32,nG,11,1,`p`,56),P(33,aG,6,0),P(34,fG,4,0),z(35,`h3`),J(36),B(),I(37,gG,12,11,null,null,KW,!1,_G,2,0,`p`,56),P(40,bG,6,1)(41,xG,2,0,`p`,86),B()),e&2){let e,n=t,r=K(2);M(2),X(` `,n.method,` `),M(2),Y(n.url),M(7),Y(n.id),M(5),X(``,n.renderMs,` ms`),M(5),X(``,n.durationMs,` ms`),M(5),X(``,n.bytes,` B`),M(5),Y(r.requestPage()?.title||r.requestPage()?.url||`not connected`),M(),F((e=r.compressedWith(n))?32:-1,e),M(),F(n.overrides?.length?33:-1),M(),F(n.navigations?.length?34:-1),M(2),X(`Server calls (`,r.requestCalls().length,`)`),M(),L(r.requestCalls()),M(3),F(r.refetched().length?40:r.requestPage()&&r.requestCalls().length?41:-1)}}function CG(e,t){if(e&1&&(z(0,`div`,26)(1,`table`)(2,`thead`)(3,`tr`)(4,`th`,69),J(5,`Request`),B(),z(6,`th`,69),J(7,`Status`),B(),z(8,`th`,69),J(9,`Render mode`),B(),z(10,`th`,70),J(11,`Render`),B(),z(12,`th`,70),J(13,`Server calls`),B(),z(14,`th`,69),J(15,`Notes`),B()()(),z(16,`tbody`),I(17,tG,20,20,`tr`,71,KW),B()()(),P(19,SG,42,13,`div`,72)),e&2){let e,t=K();M(17),L(t.requests()),M(2),F((e=t.selectedRequest())?19:-1,e)}}function wG(e,t){e&1&&(z(0,`div`,11)(1,`p`),J(2,`No SSR requests traced.`),B(),z(3,`p`,56),J(4,` Add `),z(5,`code`),J(6,`app.use(devtools.ssrMiddleware)`),B(),J(7,` before the Angular handler in `),z(8,`code`),J(9,`server.ts`),B(),J(10,`, then load a server rendered page. `),B()())}function TG(e,t){e&1&&(z(0,`span`,94),J(1,`transfer cache`),B())}function EG(e,t){if(e&1&&(z(0,`span`,94),J(1),B()),e&2){let e=K().$implicit;M(),X(`delayed `,e.delayMs,` ms`)}}function DG(e,t){e&1&&(z(0,`span`,82),J(1,`mocked`),B())}function OG(e,t){e&1&&(z(0,`span`,83),J(1,`faulted`),B())}function kG(e,t){if(e&1&&(z(0,`span`,97),J(1,`rule `),z(2,`code`),J(3),B()()),e&2){let e=t;R(`title`,`Matched rule: `+e),M(3),Y(e)}}function AG(e,t){if(e&1){let e=W();z(0,`tr`,73),G(`click`,function(){let t=O(e).$implicit;return k(K(2).openCall(t.id))}),z(1,`td`)(2,`span`,94),J(3),B()(),z(4,`td`,76),J(5),B(),z(6,`td`,74)(7,`button`,95),J(8),B()(),z(9,`td`,96),J(10),B(),z(11,`td`,77),V(12,`span`,78),J(13),B(),z(14,`td`,79),J(15),B(),z(16,`td`)(17,`div`,80),P(18,TG,2,0,`span`,94),P(19,EG,2,1,`span`,94),P(20,DG,2,0,`span`,82),P(21,OG,2,0,`span`,83),P(22,kG,4,2,`span`,97),B()()()}if(e&2){let e,n=t.$implicit,r=K(2);q(`selected`,r.selectedCall()?.id===n.id),M(2),q(`server`,n.side===`server`),M(),Y(n.side===`server`?`SSR`:`Client`),M(2),Y(n.method),M(2),R(`title`,n.url),N(`data-call-id`,n.id)(`aria-pressed`,r.selectedCall()?.id===n.id)(`aria-controls`,r.selectedCall()?`call-preview`:null),M(),X(` `,n.url,` `),M(),R(`title`,n.pageUrl??``),M(),X(` `,n.pageUrl??``,` `),M(),q(`ok`,r.callTone(n)===`ok`)(`redirect`,r.callTone(n)===`redirect`)(`bad`,r.callTone(n)===`bad`),M(2),X(``,r.statusLabel(n),` `),M(2),X(``,n.durationMs,` ms`),M(3),F(n.cacheHit?18:-1),M(),F(n.delayMs?19:-1),M(),F(n.mocked?20:-1),M(),F(n.faulted?21:-1),M(),F((e=r.rulePatternOf(n))?22:-1,e)}}function jG(e,t){if(e&1&&(z(0,`div`,26)(1,`table`)(2,`thead`)(3,`tr`)(4,`th`,69),J(5,`Side`),B(),z(6,`th`,69),J(7,`Method`),B(),z(8,`th`,69),J(9,`URL`),B(),z(10,`th`,69),J(11,`Page`),B(),z(12,`th`,69),J(13,`Status`),B(),z(14,`th`,70),J(15,`Time`),B(),z(16,`th`,69),J(17,`Notes`),B()()(),z(18,`tbody`,93),I(19,AG,23,26,`tr`,71,JW),B()()()),e&2){let e=K();M(19),L(e.visibleCalls())}}function MG(e,t){e&1&&J(0),e&2&&X(` Nothing matches “`,K(2).callQuery().trim(),`” with these filters. `)}function NG(e,t){e&1&&J(0),e&2&&X(` None of the `,K(2).timeline().length,` requests fit these filters. `)}function PG(e,t){if(e&1){let e=W();z(0,`div`,27)(1,`p`),J(2,`No requests match.`),B(),z(3,`p`,56),P(4,MG,1,1)(5,NG,1,1),B(),z(6,`div`,98)(7,`button`,68),G(`click`,function(){return O(e),k(K().clearCallFilters())}),J(8,`Clear filters`),B()()()}if(e&2){let e=K();M(4),F(e.callQuery().trim()?4:5)}}function FG(e,t){e&1&&(z(0,`div`,11)(1,`p`),J(2,`No requests yet.`),B(),z(3,`p`,56),J(4,` Add `),z(5,`code`),J(6,`withPangular()`),B(),J(7,` to `),z(8,`code`),J(9,`provideHttpClient`),B(),J(10,`, then load a page of the app. `),B()())}function IG(e,t){if(e&1){let e=W();z(0,`button`,105),G(`click`,function(){O(e);let t=K();return k(K().copyPreview(t))}),J(1,` Copy `),B()}if(e&2){let e=K();N(`aria-label`,`Copy the response of `+e.method+` `+e.url)}}function LG(e,t){e&1&&(z(0,`p`,107),J(1,` Matched rule `),z(2,`code`),J(3),B()()),e&2&&(M(3),Y(t))}function RG(e,t){if(e&1){let e=W();z(0,`div`,99),G(`keydown.escape`,function(){return O(e),k(K().closePreview())}),z(1,`div`,100)(2,`h3`,101),J(3,`Response preview`),B(),z(4,`div`,102),P(5,IG,2,1,`button`,103),z(6,`button`,104),G(`click`,function(){let t=O(e);return k(K().mockCall(t))}),J(7,` Mock this request `),B(),z(8,`button`,105),G(`click`,function(){return O(e),k(K().closePreview())}),J(9,`Close`),B()()(),z(10,`p`,106)(11,`span`,76),J(12),B(),z(13,`span`,77),J(14),B(),z(15,`span`,90),J(16),B()(),P(17,LG,4,1,`p`,107),z(18,`pre`,108),J(19),B()()}if(e&2){let e,n=t,r=K();M(5),F(!n.error&&n.preview?5:-1),M(),R(`disabled`,!r.canWrite()),N(`aria-describedby`,r.canWrite()?null:`http-writes-off`),M(6),Y(n.method),M(),q(`ok`,r.callTone(n)===`ok`)(`redirect`,r.callTone(n)===`redirect`)(`bad`,r.callTone(n)===`bad`),M(),Y(r.statusLabel(n)),M(),R(`title`,n.url),M(),Y(n.url),M(),F((e=r.rulePatternOf(n))?17:-1,e),M(),q(`error`,!!n.error&&!n.cancelled),N(`aria-label`,n.error?`Response error`:`Response body`),M(),Y(n.error??r.previewText(n)??`(no body)`)}}function zG(e,t){if(e&1&&(z(0,`p`,31),J(1),B()),e&2){let e=K();M(),Y(e.writesOff)}}function BG(e,t){e&1&&(z(0,`p`,46),J(1,` SSR mocks are not transferred to the client: the browser requests the URL again and gets the real response unless the rule also applies on the client. `),B())}function VG(e,t){e&1&&(z(0,`span`),J(1,`passthrough`),B())}function HG(e,t){if(e&1&&(z(0,`span`,77),J(1),B()),e&2){let e=K().$implicit,t=K();q(`ok`,t.statusTone(e.status)===`ok`)(`redirect`,t.statusTone(e.status)===`redirect`)(`bad`,t.statusTone(e.status)===`bad`),M(),Y(e.status)}}function UG(e,t){if(e&1&&(z(0,`span`),J(1),B()),e&2){let e=K().$implicit;M(),X(``,e.delayMs,` ms`)}}function WG(e,t){e&1&&(z(0,`span`),J(1,`mock body`),B())}function GG(e,t){e&1&&(z(0,`p`,116),J(1,` The SSR mock is not written to TransferState, so the browser requests this URL again. `),B())}function KG(e,t){if(e&1){let e=W();z(0,`li`)(1,`label`,109)(2,`input`,110),G(`change`,function(){let t=O(e).$implicit;return k(K().toggleRule(t.id))}),B(),z(3,`code`,111)(4,`span`,112),J(5),B(),J(6),B()(),z(7,`button`,113),G(`click`,function(){let t=O(e).$implicit;return k(K().removeRule(t.id))}),J(8,` Remove `),B(),z(9,`span`,114)(10,`span`),J(11),B(),P(12,VG,2,0,`span`)(13,HG,2,7,`span`,115),P(14,UG,2,1,`span`),P(15,WG,2,0,`span`),B(),P(16,GG,2,0,`p`,116),B()}if(e&2){let e=t.$implicit,n=K();q(`off`,!e.enabled),M(2),R(`checked`,e.enabled)(`disabled`,!n.canWrite()),N(`aria-describedby`,n.canWrite()?null:`http-writes-off`)(`aria-label`,`Enable rule for `+e.pattern),M(),R(`title`,e.pattern),M(2),Y(e.method||`ANY`),M(),X(` `,e.pattern),M(),R(`disabled`,!n.canWrite()),N(`aria-describedby`,n.canWrite()?null:`http-writes-off`)(`aria-label`,`Remove rule for `+e.pattern),M(4),Y(n.targetLabel(e.target)),M(),F(e.status===void 0?12:13),M(2),F(e.delayMs?14:-1),M(),F(e.body?15:-1),M(),F(n.mocksOnServer(e)?16:-1)}}function qG(e,t){e&1&&(z(0,`li`,53),J(1,`No rules. SSR rules apply on the next page load.`),B())}function JG(e,t){if(e&1){let e=W();z(0,`p`,61),J(1,` Throws while the server renders, so it needs `),z(2,`code`),J(3,`providePangularHttp()`),B(),J(4,` and a page the engine renders. Prerendered files served as static files skip it. `),B(),z(5,`label`),J(6,` Error message `),z(7,`input`,117),G(`input`,function(t){return O(e),k(K().patchOverride(`message`,t))}),B()()}if(e&2){let e=K();M(7),R(`value`,e.overrideDraft().message)}}function YG(e,t){e&1&&J(0,` For a cached HTTP response this is the whole cache record, not only the response body. `)}function XG(e,t){e&1&&(z(0,`p`,121),J(1,` Filled in from the TransferState payload. The value starts empty because the panel only shows a redacted copy, so type the JSON the server should send. `),P(2,YG,1,0),B()),e&2&&(M(2),F(t===`http`?2:-1))}function ZG(e,t){if(e&1){let e=W();z(0,`label`),J(1,` TransferState key `),z(2,`input`,118),G(`input`,function(t){return O(e),k(K().patchOverride(`key`,t))}),B()(),z(3,`label`)(4,`span`),J(5,`New JSON value `),z(6,`span`,33),J(7,`(empty removes the entry)`),B()(),z(8,`textarea`,119),G(`input`,function(t){return O(e),k(K().patchOverride(`value`,t))}),B()(),z(9,`p`,120),J(10),B(),P(11,XG,3,1,`p`,121)}if(e&2){let e,t=K();M(2),R(`value`,t.overrideDraft().key),M(6),R(`value`,t.overrideDraft().value),N(`aria-invalid`,t.overrideValueError()?`true`:null)(`aria-describedby`,t.overrideFromPayload()?`override-value-error override-value-note`:`override-value-error`),M(2),Y(t.overrideValueError()),M(),F((e=t.overrideFromPayload())?11:-1,e)}}function QG(e,t){e&1&&(z(0,`p`,61),J(1,` Serves `),z(2,`code`),J(3,`index.csr.html`),B(),J(4,` instead of rendering. Needs `),z(5,`code`),J(6,`browserDistFolder`),B(),J(7,` in `),z(8,`code`),J(9,`initPangularHub()`),B(),J(10,`. `),B())}function $G(e,t){if(e&1&&(z(0,`span`),J(1),B()),e&2){let e=K().$implicit;M(),Y(e.message)}}function eK(e,t){if(e&1&&(z(0,`span`),J(1),B()),e&2){let e=K().$implicit;M(),Z(``,e.value===void 0?`remove`:`set`,` `,e.key)}}function tK(e,t){if(e&1){let e=W();z(0,`li`)(1,`label`,109)(2,`input`,110),G(`change`,function(){let t=O(e).$implicit;return k(K().toggleOverride(t.id))}),B(),z(3,`code`,111)(4,`span`,112),J(5),B(),J(6),B()(),z(7,`button`,122),G(`click`,function(){let t=O(e).$implicit;return k(K().removeOverride(t.id))}),J(8,` Remove `),B(),z(9,`span`,114),P(10,$G,2,1,`span`),P(11,eK,2,2,`span`),B()()}if(e&2){let e=t.$implicit,n=K();q(`off`,!e.enabled),M(2),R(`checked`,e.enabled)(`disabled`,!n.canWrite()),N(`aria-label`,`Enable `+n.overrideLabel(e.kind)+` for `+e.pattern),M(),R(`title`,e.pattern),M(2),Y(n.overrideLabel(e.kind)),M(),X(` `,e.pattern),M(),R(`disabled`,!n.canWrite()),N(`aria-label`,`Remove `+n.overrideLabel(e.kind)+` for `+e.pattern),M(3),F(e.message?10:-1),M(),F(e.key?11:-1)}}function nK(e,t){e&1&&(z(0,`li`,53),J(1,`No overrides.`),B())}function rK(e,t){if(e&1&&(z(0,`div`)(1,`dt`),J(2,`DOM nodes hydrated`),B(),z(3,`dd`),J(4),B()(),z(5,`div`)(6,`dt`),J(7,`DOM nodes skipped`),B(),z(8,`dd`),J(9),B()(),z(10,`div`)(11,`dt`),J(12,`Mismatched components`),B(),z(13,`dd`),J(14),B()()),e&2){let e=t;M(4),Y(e.hydrated),M(5),Y(e.skipped),M(4),q(`bad`,e.mismatched>0),M(),Y(e.mismatched)}}function iK(e,t){if(e&1&&(z(0,`span`,124)(1,`span`,125),J(2,`Expected`),B(),z(3,`code`),J(4),B()()),e&2){let e=K().$implicit;M(4),Y(e.expected)}}function aK(e,t){if(e&1&&(z(0,`span`,124)(1,`span`,125),J(2,`Actual`),B(),z(3,`code`),J(4),B()()),e&2){let e=K().$implicit;M(4),Y(e.actual)}}function oK(e,t){if(e&1&&(z(0,`li`)(1,`code`),J(2),B(),P(3,iK,5,1,`span`,124),P(4,aK,5,1,`span`,124),B()),e&2){let e=t.$implicit;M(2),Y(`<`+e.component+`>`),M(),F(e.expected?3:-1),M(),F(e.actual?4:-1)}}function sK(e,t){if(e&1&&(z(0,`h3`),J(1),B(),z(2,`ul`,123),I(3,oK,5,3,`li`,null,Dg),B()),e&2){let e=K();M(),X(`Mismatches (`,e.mismatches.length,`)`),M(2),L(e.mismatches)}}function cK(e,t){if(e&1&&(z(0,`li`)(1,`code`),J(2),B()()),e&2){let e=t.$implicit;M(2),Y(e)}}function lK(e,t){if(e&1&&(z(0,`h3`),J(1,`ngSkipHydration hosts`),B(),z(2,`ul`,126),I(3,cK,3,1,`li`,null,Dg),B()),e&2){let e=K();M(3),L(e.skipHydrationHosts)}}function uK(e,t){e&1&&(z(0,`h3`),J(1,`Warnings`),B(),z(2,`p`,56),J(3,` Not captured: add `),z(4,`code`),J(5,`providePangularHttp()`),B(),J(6,` to the app providers. `),B())}function dK(e,t){if(e&1&&(z(0,`pre`,127),J(1),B()),e&2){let e=t.$implicit;M(),Y(e)}}function fK(e,t){e&1&&(z(0,`p`,86),J(1,`No hydration warnings.`),B())}function pK(e,t){if(e&1&&(z(0,`h3`),J(1),B(),I(2,dK,2,1,`pre`,127,Dg,!1,fK,2,0,`p`,86)),e&2){let e=K();M(),X(`Warnings (`,e.warnings.length,`)`),M(),L(e.warnings)}}function mK(e,t){if(e&1&&(z(0,`dl`,85)(1,`div`)(2,`dt`),J(3,`Enabled`),B(),z(4,`dd`)(5,`span`,94),J(6),B()()(),z(7,`div`)(8,`dt`),J(9,`Hydrated components`),B(),z(10,`dd`),J(11),B()(),z(12,`div`)(13,`dt`),J(14,`Hydrated nodes`),B(),z(15,`dd`),J(16),B()(),z(17,`div`)(18,`dt`),J(19,`Skipped components`),B(),z(20,`dd`),J(21),B()(),z(22,`div`)(23,`dt`),J(24,`App stable after`),B(),z(25,`dd`),J(26),B()(),z(27,`div`)(28,`dt`),J(29,`Incremental defer blocks`),B(),z(30,`dd`),J(31),B()(),P(32,rK,15,5),B(),P(33,sK,5,1),P(34,lK,5,0),P(35,uK,7,0)(36,pK,5,2)),e&2){let e,n=t;M(5),q(`on`,n.enabled)(`off-tag`,!n.enabled),M(),Y(n.enabled?`yes`:`no (client render only)`),M(5),Y(n.hydratedComponents??`n/a`),M(5),Y(n.hydratedNodes??`n/a`),M(5),Y(n.componentsSkippedHydration??`n/a`),M(5),Y(n.stableMs===void 0?`n/a`:n.stableMs+` ms`),M(5),Y(n.deferBlocksWithIncrementalHydration??`n/a`),M(),F((e=n.nodes)?32:-1,e),M(),F(n.mismatches?.length?33:-1),M(),F(n.skipHydrationHosts.length?34:-1),M(),F(n.warningsCaptured===!1?35:36)}}function hK(e,t){e&1&&(z(0,`div`,11)(1,`p`),J(2,`No hydration data for this page.`),B(),z(3,`p`,56),J(4,`Open a server rendered page of the app to see its stats.`),B()())}function gK(e,t){e&1&&(z(0,`div`,11)(1,`p`),J(2,`No TransferState script: this page was not server rendered.`),B()())}function _K(e,t){if(e&1&&(z(0,`p`,129),J(1),B()),e&2){let e=K(2);M(),Y(e.error)}}function vK(e,t){e&1&&(z(0,`span`,94),J(1),B()),e&2&&(M(),Y(t))}function yK(e,t){if(e&1&&(z(0,`span`,94),J(1),B(),z(2,`span`,132),J(3),B()),e&2){let e=t,n=K().$implicit,r=K(3);q(`server`,r.statusTone(e.status)===`ok`)(`fault`,r.statusTone(e.status)===`bad`),M(),X(`HTTP `,e.status),M(2),Y(e.url??n.key)}}function bK(e,t){if(e&1&&(z(0,`span`,132),J(1),B()),e&2){let e=K().$implicit;M(),Y(e.key)}}function xK(e,t){if(e&1){let e=W();z(0,`button`,105),G(`click`,function(){O(e);let t=K().$implicit;return k(K(3).editEntry(t))}),J(1,` Edit in SSR overrides `),B()}if(e&2){let e=K().$implicit;N(`aria-label`,`Edit in SSR overrides, key `+e.key)}}function SK(e,t){if(e&1){let e=W();z(0,`details`)(1,`summary`),V(2,`span`,131),P(3,vK,2,1,`span`,94),P(4,yK,4,6)(5,bK,2,1,`span`,132),z(6,`span`,133),J(7),B()(),z(8,`div`,134)(9,`span`,135),J(10,`Key`),B(),z(11,`code`,136),J(12),B(),z(13,`div`,137)(14,`button`,105),G(`click`,function(){let t=O(e).$implicit;return k(K(3).copyKey(t.key))}),J(15,` Copy `),B(),P(16,xK,2,1,`button`,103),B()(),z(17,`pre`,138),J(18),yv(19,`json`),B()()}if(e&2){let e,n,r=t.$implicit,i=K(3);M(3),F((e=i.payloadLabel(r))?3:-1,e),M(),F((n=r.http)?4:5,n),M(3),X(``,r.size,` B`),M(5),Y(r.key),M(2),N(`aria-label`,`Copy key `+r.key),M(2),F(i.canEditEntry(r)?16:-1),M(),N(`aria-label`,`Value of `+r.key),M(),Y(xv(19,8,r.value))}}function CK(e,t){if(e&1&&(z(0,`p`,128),J(1),B(),P(2,_K,2,1,`p`,129),z(3,`div`,130),I(4,SK,20,10,`details`,null,YW),B()),e&2){let e=K();M(),rv(` `,e.entries.length,` entr`,e.entries.length===1?`y`:`ies`,`, `,e.size,` bytes `),M(),F(e.error?2:-1),M(2),L(e.entries)}}function wK(e,t){e&1&&P(0,gK,3,0,`div`,11)(1,CK,6,4),e&2&&F(+!!t.found)}function TK(e,t){e&1&&(z(0,`div`,11)(1,`p`),J(2,`Open a page of the app to see its payload.`),B()())}var EK={kind:`render-error`,pattern:``,message:``,key:``,value:``},DK={"render-error":`Render error`,"client-render":`Client render`,"state-edit":`TransferState edit`},OK={server:`Server`,prerender:`Prerender`,client:`Client`,redirect:`Redirect`,"not-rendered":`Not rendered`,unknown:`Unknown`},kK={pattern:``,method:``,target:`both`,status:``,delayMs:``,body:``};function AK(e){try{let t=new URL(e,`http://x`);return t.pathname+t.search}catch{return e}}var jK=/\[redacted\]|%5Bredacted%5D/gi;function MK(e){return(/^([a-z][a-z\d+.-]*:|\/\/)/i.test(e)?AK(e):e).replace(jK,`*`)}function NK(e){let t=tO(e);if(t!==null)return t;try{return JSON.parse(e),e.trim()}catch{return null}}var PK=[`GET`,`POST`,`PUT`,`PATCH`,`DELETE`];function FK(e){try{return new URL(e,`http://x`).pathname}catch{return``}}function IK(e){let t=FK(e);return t===`/`?``:t}var LK=/\[redacted\]|%5Bredacted%5D/i,RK=200,zK=50,BK=500,VK=1e5,HK=[{value:``,label:`None`},...WT.map(([e,t])=>({value:String(e),label:`${e} ${t}`}))],UK=class e{rpc=$(null);canWrite=Q(()=>AE(this.rpc(),`http`));writesOff=nE(`http`);loading=j(!1);failed=j(!1);serverCalls=j([]);pages=j([]);payloads=j({});serverDropped=j(0);requests=j([]);rules=j([]);overrides=j([]);overrideDraft=j({...EK});overrideFromPayload=j(null);overrideKindOptions=[{value:`render-error`,label:`Render error`},{value:`client-render`,label:`Force Client render`},{value:`state-edit`,label:`Edit TransferState entry`}];overrideValueError=Q(()=>{let e=this.overrideDraft().value.trim();if(!e)return``;try{return JSON.parse(e),``}catch{return`The value must be valid JSON.`}});overrideReady=Q(()=>{let e=this.overrideDraft();return!e.pattern.trim()||this.overrides().length>=20?!1:e.kind!==`state-edit`||!!e.key.trim()&&!this.overrideValueError()});hostPageId=uE();selectedPageId=Nv({source:()=>this.pages(),computation:(e,t)=>t?.value&&e.some(e=>e.pageId===t.value)?t.value:e.find(e=>e.pageId===this.hostPageId)?.pageId??e[0]?.pageId??null});selectedCallId=j(null);draft=j({...kK});message=j(``);bodyPlaceholder=`{ "error": "Service unavailable" }`;statusOptions=HK;unsubscribe=[];destroyRef=E(ws);injector=E(Ss);host=E(Nl);selected=Q(()=>this.pages().find(e=>e.pageId===this.selectedPageId())??null);pageRequestId=Q(()=>this.selected()?.ssrRequestId??null);selectedRequestId=Nv(()=>this.pageRequestId());selectedPayload=Q(()=>{let e=this.selectedPageId();return e?this.payloads()[e]??null:null});maxCalls=Q(()=>kE(this.rpc()).limits.httpCalls);droppedCalls=Q(()=>(this.selected()?.dropped??0)+this.serverDropped());pageServerCalls=Q(()=>{let e=this.selected()?.initialUrl;return e?this.serverCalls().filter(t=>!t.pageUrl||t.pageUrl===e):this.serverCalls()});timeline=Q(()=>[...this.pageServerCalls(),...this.selected()?.calls??[]].sort((e,t)=>t.at-e.at));callQuery=j(``);sideFilter=j(`all`);failedOnly=j(!1);sideOptions=[{value:`all`,label:`All sides`},{value:`server`,label:`SSR`},{value:`client`,label:`Client`}];visibleCalls=Q(()=>{let e=this.callQuery().trim().toLowerCase(),t=this.sideFilter()??`all`,n=this.failedOnly();return this.timeline().filter(r=>(t===`all`||r.side===t)&&(!n||this.isFailed(r))&&(!e||`${r.method} ${r.url}`.toLowerCase().includes(e)||`${r.method} ${AK(r.url)}`.toLowerCase().includes(e)))});filterStatus=Q(()=>{this.callQuery(),this.sideFilter(),this.failedOnly(),this.filterFlip=!this.filterFlip;let e=jv(()=>`${this.visibleCalls().length} of ${this.timeline().length}`);return this.filterFlip?`${e}\u00a0`:e});filterFlip=!0;selectedCall=Q(()=>this.visibleCalls().find(e=>e.id===this.selectedCallId())??null);selectedRequest=Q(()=>this.requests().find(e=>e.id===this.selectedRequestId())??null);requestCalls=Q(()=>{let e=this.selectedRequest()?.id;return e?this.serverCalls().filter(t=>t.requestId===e):[]});requestPage=Q(()=>{let e=this.selectedRequest()?.id;return e?this.pages().find(t=>t.ssrRequestId===e)??null:null});refetched=Q(()=>{let e=this.selectedRequest(),t=this.requestPage();if(!e||!t)return[];let n=new Set(this.requestCalls().filter(e=>e.status).map(e=>`${e.method} ${AK(e.url)}`));return t.calls.filter(t=>t.side===`client`&&!t.cacheHit&&!t.mocked&&t.at>=e.at&&n.has(`${t.method} ${AK(t.url)}`))});draftMocksOnServer=Q(()=>{let e=this.draftRule();return!!e&&this.mocksOnServer(e)});draftRule=Q(()=>{let e=this.draft(),t=e.pattern.trim();if(!t||t.length>BK||this.bodyError()||this.rules().length>=zK)return null;let n=e.body.trim(),r=Math.min(Math.max(Math.round(Number(e.delayMs))||0,0),1e4),i=e.status.trim()?Number(e.status):n?200:void 0;return i!==void 0&&!GT(i)||i===void 0&&!r?null:{pattern:t,enabled:!0,target:e.target,...e.method?{method:e.method}:{},...i===void 0?{}:{status:i},...r?{delayMs:r}:{},...n?{body:n}:{}}});draftHint=Q(()=>{let e=this.draft();return this.rules().length>=zK?`You can add up to ${zK} rules. Remove one to add another.`:e.pattern.trim()?e.pattern.trim().length>BK?`The URL pattern is limited to ${BK} characters.`:this.bodyError()?``:e.status.trim()&&!GT(Number(e.status))?`Pick a status from the list.`:this.draftRule()?!e.status.trim()&&e.body.trim()?`With no status, the mock body returns 200.`:``:`Set a status, a delay or a mock body.`:`Enter a URL pattern to add a rule.`});bodyError=Q(()=>{let e=this.draft().body.trim();if(!e)return``;if(e.length>VK)return`The mock body is limited to ${VK} characters.`;try{return JSON.parse(e),``}catch{return`The mock body must be valid JSON.`}});constructor(){dc(()=>{let e=this.rpc();e&&this.load(e)}),this.destroyRef.onDestroy(()=>this.stopListening())}async load(e){this.loading.set(!0),this.failed.set(!1);try{let t=e.scope(`pangular`).rpc,[n,r]=await Promise.all([t.sharedState(`http`),t.sharedState(`http-payloads`)]);if(this.destroyRef.destroyed)return;let i=e=>{let t=e;this.serverCalls.set(t?.serverCalls??[]),this.serverDropped.set(t?.serverDropped??0),this.requests.set([...t?.requests??[]].reverse()),this.pages.set(t?.pages??[]),this.rules.set(t?.rules??[]),this.overrides.set(t?.ssrOverrides??[])},a=e=>this.payloads.set(e?.pages??{});i(n.value()),a(r.value()),this.stopListening(),this.unsubscribe=[n.on(`updated`,i),r.on(`updated`,a)]}catch{this.failed.set(!0)}finally{this.loading.set(!1)}}retry(){let e=this.rpc();e&&this.load(e)}guardVerdict(e){return e.guards?.passed===!1?e.outcome===`redirected`?`redirected`:`rejected`:``}msLabel(e){return e===void 0?`n/a`:`${e} ms`}skipText(e){return UT[e]??``}refetchReason(e){let t=`${e.method} ${AK(e.url)}`,n=this.requestCalls().filter(e=>`${e.method} ${AK(e.url)}`===t),r=n[0];return r?.cacheSkip&&n.every(e=>e.cacheSkip===r.cacheSkip)?this.skipText(r.cacheSkip):``}compressedWith(e){if(e.compressedBeforeTrace)return e.headers[`content-encoding`]??`unknown encoding`}renderModeLabel(e){return OK[e]??`Unknown`}statusLabel(e){return e.cancelled?`cancelled`:e.status?String(e.status):`ERR`}callTone(e){return e.cancelled?`neutral`:this.statusTone(e.status)}isFailed(e){return!!e.cancelled||!e.status||e.status>=400}clearCallFilters(){this.callQuery.set(``),this.sideFilter.set(`all`),this.failedOnly.set(!1),this.host.nativeElement.querySelector(`#timeline-search`)?.focus()}rulePatternOf(e){return e.rulePattern?e.rulePattern:e.ruleId?this.rules().find(t=>t.id===e.ruleId)?.pattern??null:null}openCall(e){this.selectedCallId.set(e),zd(()=>this.host.nativeElement.querySelector(`#preview-heading`)?.focus(),{injector:this.injector})}previewText(e){if(e.preview!==void 0)return tO(e.preview)??e.preview}async copyPreview(e){let t=this.previewText(e);if(t)try{await navigator.clipboard.writeText(t),this.message.set(`Copied.`)}catch{this.message.set(`The clipboard is not available here.`)}}mockCall(e){let t=e.method.toUpperCase(),n=MK(e.url),r=e.error||!e.preview?null:NK(e.preview);this.draft.set({...kK,pattern:n,method:t,body:r??``});let i=`${t} ${n}`;this.message.set(r?`Filled in a rule for ${i} with the preview as its body. Check it, then add the rule.`:e.preview&&!e.error?`Filled in a rule for ${i}. The preview is not complete JSON, so it is not used as the body.`:`Filled in a rule for ${i}. Set a status, a delay or a body, then add the rule.`),zd(()=>this.host.nativeElement.querySelector(`#rule-pattern`)?.focus(),{injector:this.injector})}closePreview(){let e=this.selectedCallId();this.selectedCallId.set(null),e&&[...this.host.nativeElement.querySelectorAll(`button[data-call-id]`)].find(t=>t.dataset.callId===e)?.focus()}stopListening(){for(let e of this.unsubscribe.splice(0))e()}statusTone(e){return e===void 0?`neutral`:e===0||e>=400?`bad`:e>=300?`redirect`:e>=200?`ok`:`neutral`}mocksOnServer(e){return e.target!==`client`&&e.status!==void 0&&e.status<400}payloadLabel(e){return e.source===`hydration`?`hydration annotations`:e.fn?`Analog server function ${e.fn.name??e.fn.id}`:e.source===`analog`?`Analog`:null}targetLabel(e){return e===`both`?`SSR + client`:e===`server`?`SSR only`:`Client only`}pageOptions=Q(()=>this.pages().map(e=>({value:e.pageId,label:e.title||e.url})));methodOptions=Q(()=>{let e=this.draft().method;return[{value:``,label:`Any`},...(e&&!PK.includes(e)?[...PK,e]:PK).map(e=>({value:e,label:e}))]});targetOptions=[{value:`both`,label:`SSR + client`},{value:`server`,label:`SSR only`},{value:`client`,label:`Client only`}];selectPage(e){e&&this.selectedPageId.set(e),this.selectedCallId.set(null),this.overrideFromPayload.set(null)}setDraft(e,t){this.draft.update(n=>({...n,[e]:t}))}patch(e,t){let n=t.target.value;this.draft.update(t=>({...t,[e]:n}))}async addRule(e){e.preventDefault();let t=this.draftRule();if(!t)return;let n={id:`r${Date.now().toString(36)}${Math.random().toString(36).slice(2,6)}`,...t};await this.saveRules([...this.rules(),n],`Rule added.`,n)&&(this.draft.set({...kK}),this.host.nativeElement.querySelector(`#rule-pattern`)?.focus())}toggleRule(e){let t=this.rules().find(t=>t.id===e);t&&this.saveRules(this.rules().map(t=>t.id===e?{...t,enabled:!t.enabled}:t),`Rule updated.`,t)}async removeRule(e){let t=this.rules().findIndex(t=>t.id===e);if(t<0)return;let n=this.rules().filter(t=>t.id!==e);await this.saveRules(n,`Rule removed.`,this.rules()[t])&&this.focusAfterRemove(`[data-remove-rule]`,t,`#rule-list-heading`)}async clearCalls(){try{await mE(this.rpc(),`clear-http-calls`),this.selectedCallId.set(null),this.message.set(`Timeline cleared.`)}catch{this.message.set(`Could not clear the timeline.`)}}overrideLabel(e){return DK[e]??e}setOverrideDraft(e,t){this.overrideDraft.update(n=>({...n,[e]:t})),e===`kind`&&t!==`state-edit`&&this.overrideFromPayload.set(null)}patchOverride(e,t){let n=t.target.value;this.overrideDraft.update(t=>({...t,[e]:n})),e===`key`&&this.overrideFromPayload.set(null)}async copyKey(e){try{await navigator.clipboard.writeText(e),this.message.set(`Copied.`)}catch{this.message.set(`The clipboard is not available here.`)}}canEditEntry(e){let{key:t}=e;return this.canWrite()&&!!t&&t===t.trim()&&t.length<=RK&&!LK.test(t)}editEntry(e){if(!this.canEditEntry(e))return;let t=this.selected();this.overrideDraft.set({...EK,kind:`state-edit`,pattern:t?IK(t.initialUrl??t.url):``,key:e.key}),this.overrideFromPayload.set(e.http?`http`:`other`),this.message.set(`Editing the TransferState entry in SSR overrides.`),zd(()=>{let e=this.host.nativeElement.querySelector(this.overrideDraft().pattern?`#override-value`:`#override-pattern`);e?.scrollIntoView?.({block:`center`}),e?.focus()},{injector:this.injector})}async addOverride(e){if(e.preventDefault(),!this.overrideReady())return;let t=this.overrideDraft(),n={id:`o${Date.now().toString(36)}${Math.random().toString(36).slice(2,6)}`,kind:t.kind,pattern:t.pattern.trim(),enabled:!0,...t.kind===`render-error`&&t.message.trim()?{message:t.message.trim()}:{},...t.kind===`state-edit`?{key:t.key.trim()}:{},...t.kind===`state-edit`&&t.value.trim()?{value:t.value.trim()}:{}};await this.saveOverrides([...this.overrides(),n],`Override added. Reload the page.`)&&(this.overrideDraft.set({...EK,kind:t.kind}),this.overrideFromPayload.set(null),this.host.nativeElement.querySelector(`#override-pattern`)?.focus())}toggleOverride(e){this.saveOverrides(this.overrides().map(t=>t.id===e?{...t,enabled:!t.enabled}:t),`Override updated. Reload the page.`)}async removeOverride(e){let t=this.overrides().findIndex(t=>t.id===e);if(t<0)return;let n=this.overrides().filter(t=>t.id!==e);await this.saveOverrides(n,`Override removed.`)&&this.focusAfterRemove(`[data-remove-override]`,t,`#override-list-heading`)}focusAfterRemove(e,t,n){zd(()=>{let r=this.host.nativeElement,i=r.querySelectorAll(e);(i[Math.min(t,i.length-1)]??r.querySelector(n))?.focus()},{injector:this.injector})}announce(e){if(this.message()!==e){this.message.set(e);return}this.message.set(``),zd(()=>{this.message()===``&&this.message.set(e)},{injector:this.injector})}async saveOverrides(e,t){try{let n=await mE(this.rpc(),`set-ssr-overrides`,e);return this.overrides.set(Array.isArray(n)?n:e),this.announce(t),!0}catch{return this.message.set(`Could not save the overrides.`),!1}}async saveRules(e,t,n){try{let r=await mE(this.rpc(),`set-http-rules`,e);return this.rules.set(Array.isArray(r)?r:e),this.announce(n.target===`client`?t:`${t} Reload the page to apply it to SSR.`),!0}catch{return this.message.set(`Could not save the rules.`),!1}}static ɵfac=function(t){return new(t||e)};static ɵcmp=Wh({type:e,selectors:[[`app-network-inspector`]],inputs:{rpc:[1,`rpc`]},decls:128,vars:54,consts:[[`role`,`status`,1,`state`],[`role`,`alert`,1,`state`,`error`],[1,`toolbar`],[1,`page-picker`],[`id`,`page-picker-label`],[`labelledBy`,`page-picker-label`,`emptyText`,`No connected page`,`placeholder`,`No connected page`,3,`valueChange`,`options`,`value`],[`type`,`button`,3,`click`,`disabled`],[`role`,`status`,1,`message`],[1,`grid`],[`aria-labelledby`,`ssr-heading`,1,`panel`,`wide`],[`id`,`ssr-heading`],[1,`empty`],[`aria-labelledby`,`timeline-heading`,1,`panel`,`wide`],[`id`,`timeline-heading`],[`what`,`HTTP calls`,`limit`,`httpCalls`,3,`dropped`,`max`],[`role`,`group`,`aria-label`,`Filter the HTTP timeline`,1,`filters`],[1,`search`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`,1,`search-icon`],[`cx`,`11`,`cy`,`11`,`r`,`7`],[`d`,`m20 20-3.5-3.5`],[`id`,`timeline-search`,`type`,`search`,`placeholder`,`Find a URL or method…`,`aria-label`,`Find a URL or method`,`autocomplete`,`off`,`spellcheck`,`false`,3,`input`,`keydown.escape`,`value`],[`ariaLabel`,`Side`,1,`side-filter`,3,`valueChange`,`options`,`value`],[1,`inline`,`failed-toggle`],[`type`,`checkbox`,3,`change`,`checked`],[1,`total`],[`role`,`status`,1,`sr-only`],[1,`table-wrap`],[`role`,`status`,1,`empty`,`no-match`],[`id`,`call-preview`,`role`,`region`,`aria-labelledby`,`preview-heading`,1,`preview`],[`aria-labelledby`,`rules-heading`,1,`panel`],[`id`,`rules-heading`],[`id`,`http-writes-off`,1,`muted`,`small`],[`id`,`rule-form`,1,`rule-form`,3,`submit`],[1,`hint`],[`id`,`rule-pattern`,`required`,``,`spellcheck`,`false`,`autocomplete`,`off`,`placeholder`,`e.g. /api/products`,3,`input`,`value`],[1,`row`],[1,`field-group`],[`id`,`rule-method-label`],[`labelledBy`,`rule-method-label`,3,`valueChange`,`options`,`value`],[`id`,`rule-target-label`],[`labelledBy`,`rule-target-label`,3,`valueChange`,`describedBy`,`options`,`value`],[`id`,`rule-status-label`],[`labelledBy`,`rule-status-label`,3,`valueChange`,`describedBy`,`options`,`value`],[`type`,`number`,`inputmode`,`numeric`,`min`,`0`,`max`,`10000`,`placeholder`,`0`,3,`input`,`value`],[`rows`,`3`,`spellcheck`,`false`,`aria-describedby`,`body-error`,3,`input`,`placeholder`,`value`],[`id`,`body-error`,1,`field-error`],[`id`,`rule-ssr-note`,1,`muted`,`small`],[`id`,`rule-hint`,1,`muted`,`small`],[1,`form-actions`],[`type`,`submit`,3,`disabled`],[`id`,`rule-list-heading`,`tabindex`,`-1`,1,`rules-heading`],[1,`rules`],[3,`off`],[1,`empty-rule`],[`aria-labelledby`,`overrides-heading`,1,`panel`],[`id`,`overrides-heading`],[1,`muted`,`small`],[1,`rule-form`,3,`submit`],[`id`,`override-kind-label`],[`labelledBy`,`override-kind-label`,3,`valueChange`,`describedBy`,`options`,`value`],[`id`,`override-pattern`,`required`,``,`spellcheck`,`false`,`autocomplete`,`off`,`placeholder`,`e.g. /examples/ssr`,3,`input`,`value`],[`id`,`override-kind-help`,1,`muted`,`small`],[`id`,`override-list-heading`,`tabindex`,`-1`,1,`rules-heading`],[`aria-labelledby`,`hydration-heading`,1,`panel`],[`id`,`hydration-heading`],[`aria-labelledby`,`payload-heading`,1,`panel`,`wide`],[`id`,`payload-heading`],[`aria-hidden`,`true`,1,`spinner`],[`type`,`button`,3,`click`],[`scope`,`col`],[`scope`,`col`,1,`num`],[3,`selected`],[`id`,`ssr-detail`,`role`,`region`,`aria-labelledby`,`ssr-detail-heading`,1,`preview`],[3,`click`],[1,`url`],[`type`,`button`,`aria-controls`,`ssr-detail`,1,`link`,3,`title`],[1,`method`],[1,`status`],[`aria-hidden`,`true`,1,`dot`],[1,`num`],[1,`notes`],[1,`tag`,`server`],[1,`tag`,`mock`],[1,`tag`,`fault`],[`id`,`ssr-detail-heading`],[1,`stats`],[1,`muted`,`small`,`ok-note`],[1,`request-call`],[1,`muted`],[1,`stats`,`nav-stats`],[1,`preview-url`,3,`title`],[1,`tag`,3,`title`],[1,`muted`,`small`,`skip-reason`],[`appRovingList`,`button[data-call-id]`],[1,`tag`],[`type`,`button`,1,`link`,3,`title`],[1,`page-url`,3,`title`],[1,`tag`,`rule-ref`,3,`title`],[1,`empty-actions`],[`id`,`call-preview`,`role`,`region`,`aria-labelledby`,`preview-heading`,1,`preview`,3,`keydown.escape`],[1,`preview-head`],[`id`,`preview-heading`,`tabindex`,`-1`],[1,`preview-actions`],[`type`,`button`,1,`ghost`],[`type`,`button`,`aria-controls`,`rule-form`,1,`ghost`,3,`click`,`disabled`],[`type`,`button`,1,`ghost`,3,`click`],[1,`preview-meta`],[1,`preview-rule`],[`tabindex`,`0`,`role`,`region`,1,`preview-body`],[1,`inline`],[`type`,`checkbox`,3,`change`,`checked`,`disabled`],[1,`rule-pattern`,3,`title`],[1,`rule-method`],[`type`,`button`,`data-remove-rule`,``,1,`link`,`remove`,3,`click`,`disabled`],[1,`rule-meta`],[1,`status`,3,`ok`,`redirect`,`bad`],[1,`rule-note`],[`spellcheck`,`false`,`placeholder`,`Simulated render error`,`aria-describedby`,`override-kind-help`,3,`input`,`value`],[`id`,`override-key`,`spellcheck`,`false`,`autocomplete`,`off`,3,`input`,`value`],[`id`,`override-value`,`rows`,`3`,`spellcheck`,`false`,3,`input`,`value`],[`id`,`override-value-error`,1,`field-error`],[`id`,`override-value-note`,1,`muted`,`small`],[`type`,`button`,`data-remove-override`,``,1,`link`,`remove`,3,`click`,`disabled`],[1,`plain`,`mismatches`],[1,`mismatch-row`],[1,`mismatch-label`],[1,`plain`],[1,`warn`],[1,`muted`,`small`,`summary-line`],[`role`,`alert`,1,`bad`],[1,`entries`],[`aria-hidden`,`true`,1,`chevron`],[1,`entry-key`],[1,`entry-size`],[1,`entry-key-row`],[1,`entry-key-label`],[1,`entry-key-text`],[1,`entry-actions`],[`tabindex`,`0`,`role`,`region`]],template:function(e,t){if(e&1&&(P(0,XW,4,0,`div`,0)(1,ZW,7,0,`div`,1),z(2,`div`,2)(3,`div`,3)(4,`span`,4),J(5,`Page`),B(),z(6,`app-select`,5),G(`valueChange`,function(e){return t.selectPage(e)}),B()(),z(7,`button`,6),G(`click`,function(){return t.clearCalls()}),J(8,` Clear timeline `),B(),z(9,`p`,7),J(10),B()(),z(11,`div`,8)(12,`section`,9)(13,`h2`,10),J(14),B(),P(15,CG,20,1)(16,wG,11,0,`div`,11),B(),z(17,`section`,12)(18,`h2`,13),J(19),B(),V(20,`app-limit-note`,14),z(21,`div`,15)(22,`div`,16),A(),z(23,`svg`,17),V(24,`circle`,18)(25,`path`,19),B(),ms(),z(26,`input`,20),G(`input`,function(e){return t.callQuery.set(e.target.value)})(`keydown.escape`,function(){return t.callQuery.set(``)}),B()(),z(27,`app-select`,21),cv(`valueChange`,function(e){return sv(t.sideFilter,e)||(t.sideFilter=e),e}),B(),z(28,`label`,22)(29,`input`,23),G(`change`,function(e){return t.failedOnly.set(e.target.checked)}),B(),J(30,` Failed only `),B(),z(31,`span`,24),J(32),B(),z(33,`span`,25),J(34),B()(),P(35,jG,21,0,`div`,26)(36,PG,9,1,`div`,27)(37,FG,11,0,`div`,11),P(38,RG,20,18,`div`,28),B(),z(39,`section`,29)(40,`h2`,30),J(41,`Fault injection`),B(),P(42,zG,2,1,`p`,31),z(43,`form`,32),G(`submit`,function(e){return t.addRule(e)}),z(44,`label`)(45,`span`),J(46,`URL pattern `),z(47,`span`,33),J(48,`(substring or * glob, ^ anchors the path)`),B()(),z(49,`input`,34),G(`input`,function(e){return t.patch(`pattern`,e)}),B()(),z(50,`div`,35)(51,`div`,36)(52,`span`,37),J(53,`Method`),B(),z(54,`app-select`,38),G(`valueChange`,function(e){return t.setDraft(`method`,e??``)}),B()(),z(55,`div`,36)(56,`span`,39),J(57,`Apply on`),B(),z(58,`app-select`,40),G(`valueChange`,function(e){return t.setDraft(`target`,e??`both`)}),B()()(),z(59,`div`,35)(60,`div`,36)(61,`span`,41),J(62,`Status`),B(),z(63,`app-select`,42),G(`valueChange`,function(e){return t.setDraft(`status`,e??``)}),B()(),z(64,`label`),J(65,` Delay (ms) `),z(66,`input`,43),G(`input`,function(e){return t.patch(`delayMs`,e)}),B()()(),z(67,`label`)(68,`span`),J(69,`Mock JSON body `),z(70,`span`,33),J(71,`(optional)`),B()(),z(72,`textarea`,44),G(`input`,function(e){return t.patch(`body`,e)}),B()(),z(73,`p`,45),J(74),B(),P(75,BG,2,0,`p`,46),z(76,`p`,47),J(77),B(),z(78,`div`,48)(79,`button`,49),J(80,` Add rule `),B()()(),z(81,`h3`,50),J(82),B(),z(83,`ul`,51),I(84,KG,17,17,`li`,52,KW,!1,qG,2,0,`li`,53),B()(),z(87,`section`,54)(88,`h2`,55),J(89,`SSR overrides`),B(),z(90,`p`,56),J(91,` Development only. These change what the server sends for matching pages, from the next full page load, and the request is marked `),z(92,`strong`),J(93,`overridden`),B(),J(94,`. `),B(),z(95,`form`,57),G(`submit`,function(e){return t.addOverride(e)}),z(96,`div`,36)(97,`span`,58),J(98,`Override`),B(),z(99,`app-select`,59),G(`valueChange`,function(e){return t.setOverrideDraft(`kind`,e??`render-error`)}),B()(),z(100,`label`)(101,`span`),J(102,`Page pattern `),z(103,`span`,33),J(104,`(substring or * glob, ^ anchors the path)`),B()(),z(105,`input`,60),G(`input`,function(e){return t.patchOverride(`pattern`,e)}),B()(),P(106,JG,8,1)(107,ZG,12,6)(108,QG,11,0,`p`,61),z(109,`div`,48)(110,`button`,49),J(111,` Add override `),B()()(),z(112,`h3`,62),J(113),B(),z(114,`ul`,51),I(115,tK,12,12,`li`,52,KW,!1,nK,2,0,`li`,53),B()(),z(118,`section`,63)(119,`h2`,64),J(120,`Hydration`),B(),P(121,mK,37,14)(122,hK,5,0,`div`,11),B(),z(123,`section`,65)(124,`h2`,66),J(125,`TransferState payload`),B(),P(126,wK,2,1)(127,TK,3,0,`div`,11),B()()),e&2){let e,n,r,i;F(t.loading()?0:t.failed()?1:-1),M(6),R(`options`,t.pageOptions())(`value`,t.selected()?.pageId??null),M(),R(`disabled`,!t.canWrite()),N(`aria-describedby`,t.canWrite()?null:`http-writes-off`),M(3),Y(t.message()),M(4),X(`SSR requests (`,t.requests().length,`)`),M(),F(t.requests().length?15:16),M(4),X(`HTTP timeline (`,t.timeline().length,`)`),M(),R(`dropped`,t.droppedCalls())(`max`,t.maxCalls()),M(),q(`no-calls`,!t.timeline().length),M(5),R(`value`,t.callQuery()),M(),R(`options`,t.sideOptions),ov(`value`,t.sideFilter),M(2),R(`checked`,t.failedOnly()),M(3),Z(``,t.visibleCalls().length,` of `,t.timeline().length),M(2),Y(t.filterStatus()),M(),F(t.visibleCalls().length?35:t.timeline().length?36:37),M(3),F((e=t.selectedCall())?38:-1,e),M(4),F(t.canWrite()?-1:42),M(7),R(`value`,t.draft().pattern),M(5),R(`options`,t.methodOptions())(`value`,t.draft().method),M(4),R(`describedBy`,t.draftMocksOnServer()?`rule-ssr-note`:``)(`options`,t.targetOptions)(`value`,t.draft().target),M(5),R(`describedBy`,t.draftMocksOnServer()?`rule-ssr-note`:``)(`options`,t.statusOptions)(`value`,t.draft().status),M(3),R(`value`,t.draft().delayMs),M(6),R(`placeholder`,t.bodyPlaceholder)(`value`,t.draft().body),N(`aria-invalid`,t.bodyError()?`true`:null),M(2),Y(t.bodyError()),M(),F(t.draftMocksOnServer()?75:-1),M(2),Y(t.draftHint()),M(2),R(`disabled`,!t.canWrite()||!t.draftRule()),N(`aria-describedby`,t.canWrite()?`rule-hint`:`http-writes-off`),M(3),X(` Rules (`,t.rules().length,`) `),M(2),L(t.rules()),M(15),R(`describedBy`,t.overrideDraft().kind===`state-edit`?``:`override-kind-help`)(`options`,t.overrideKindOptions)(`value`,t.overrideDraft().kind),M(6),R(`value`,t.overrideDraft().pattern),M(),F((n=t.overrideDraft().kind)===`render-error`?106:n===`state-edit`?107:n===`client-render`?108:-1),M(4),R(`disabled`,!t.canWrite()||!t.overrideReady()),N(`aria-describedby`,t.canWrite()?null:`http-writes-off`),M(3),X(` Overrides (`,t.overrides().length,`) `),M(2),L(t.overrides()),M(6),F((r=t.selected()?.hydration)?121:122,r),M(5),F((i=t.selectedPayload())?126:127,i)}},dependencies:[iO,RN,GD,pb],styles:[`@charset "UTF-8";
+}`]})},CG=(e,t)=>t.id,wG=(e,t)=>t.id+t.kind,TG=(e,t)=>t.side+t.id,EG=(e,t)=>t.key;function DG(e,t){e&1&&(z(0,`div`,0),V(1,`span`,67),z(2,`span`),J(3,`Loading…`),B()())}function OG(e,t){if(e&1){let e=W();z(0,`div`,1)(1,`strong`),J(2,`Could not reach the devtools server.`),B(),z(3,`span`),J(4,`Check that the app's dev server is running with the devtools plugin.`),B(),z(5,`button`,68),G(`click`,function(){return O(e),k(K().retry())}),J(6,`Try again`),B()()}}function kG(e,t){e&1&&(z(0,`span`,81),J(1,`this page`),B())}function AG(e,t){e&1&&(z(0,`span`,82),J(1,`overridden`),B())}function jG(e,t){e&1&&(z(0,`span`,83),J(1,`aborted`),B())}function MG(e,t){if(e&1){let e=W();z(0,`tr`,73),G(`click`,function(){let t=O(e).$implicit;return k(K(2).selectedRequestId.set(t.id))}),z(1,`td`,74)(2,`button`,75)(3,`span`,76),J(4),B(),J(5),B()(),z(6,`td`,77),V(7,`span`,78),J(8),B(),z(9,`td`),J(10),B(),z(11,`td`,79),J(12),B(),z(13,`td`,79),J(14),B(),z(15,`td`)(16,`div`,80),P(17,kG,2,0,`span`,81),P(18,AG,2,0,`span`,82),P(19,jG,2,0,`span`,83),B()()()}if(e&2){let e=t.$implicit,n=K(2);q(`selected`,n.selectedRequest()?.id===e.id),M(2),R(`title`,e.url),N(`aria-pressed`,n.selectedRequest()?.id===e.id),M(2),Y(e.method),M(),X(` `,e.url,` `),M(),q(`ok`,n.statusTone(e.status)===`ok`)(`redirect`,n.statusTone(e.status)===`redirect`)(`bad`,n.statusTone(e.status)===`bad`),M(2),X(``,e.status,` `),M(2),Y(n.renderModeLabel(e.renderMode)),M(2),X(``,e.renderMs,` ms`),M(2),Z(``,e.fetches,` (`,e.fetchMs,` ms)`),M(3),F(e.id===n.selected()?.ssrRequestId?17:-1),M(),F(e.overrides?.length?18:-1),M(),F(e.aborted?19:-1)}}function NG(e,t){e&1&&(z(0,`p`,56),J(1),z(2,`code`),J(3,`ssrMiddleware`),B(),J(4,` saw it, so the render mode can't be read and TransferState edits can't apply. Mount `),z(5,`code`),J(6,`ssrMiddleware`),B(),J(7,` after `),z(8,`code`),J(9,`compression()`),B(),J(10,`. `),B()),e&2&&(M(),X(` The body was already compressed (`,t,`) when `))}function PG(e,t){if(e&1&&(z(0,`span`,88),J(1),B()),e&2){let e=K().$implicit;M(),Y(e.note)}}function FG(e,t){if(e&1&&(z(0,`p`,87)(1,`span`,82),J(2),B(),z(3,`span`),J(4),B(),P(5,PG,2,1,`span`,88),B()),e&2){let e=t.$implicit,n=K(4);M(2),Y(n.overrideLabel(e.kind)),M(2),Y(e.applied?`applied`:`not applied`),M(),F(e.note?5:-1)}}function IG(e,t){if(e&1&&(z(0,`h3`),J(1,`Overrides from the panel`),B(),z(2,`p`,56),J(3,` This response was changed on purpose, so it is not what the app sends on its own. `),B(),I(4,FG,6,3,`p`,87,wG)),e&2){let e=K();M(4),L(e.overrides)}}function LG(e,t){if(e&1&&(J(0,` to `),z(1,`code`),J(2),B()),e&2){let e=K().$implicit;M(2),Y(e.finalUrl)}}function RG(e,t){if(e&1&&(z(0,`div`)(1,`dt`),J(2,`Guards`),B(),z(3,`dd`),J(4),B()()),e&2){let e=K().$implicit,t=K(4);M(3),q(`bad`,t.guardVerdict(e)===`rejected`),M(),Z(` `,t.msLabel(e.guards.ms),``,t.guardVerdict(e)?`, `+t.guardVerdict(e):``,` `)}}function zG(e,t){if(e&1&&(z(0,`div`)(1,`dt`),J(2,`Resolvers`),B(),z(3,`dd`),J(4),B()()),e&2){let e=K().$implicit,t=K(4);M(4),Y(t.msLabel(e.resolvers.ms))}}function BG(e,t){if(e&1&&(z(0,`div`)(1,`dt`),J(2,`Navigation total`),B(),z(3,`dd`),J(4),B()()),e&2){let e=K().$implicit;M(4),X(``,e.durationMs,` ms`)}}function VG(e,t){if(e&1&&(z(0,`p`,56),J(1),B()),e&2){let e=K().$implicit;M(),Y(e.reason)}}function HG(e,t){if(e&1&&(z(0,`dl`,89)(1,`div`)(2,`dt`),J(3,`Navigation`),B(),z(4,`dd`)(5,`code`),J(6),B(),P(7,LG,3,1),J(8),B()(),P(9,RG,5,4,`div`),P(10,zG,5,1,`div`),P(11,BG,5,1,`div`),B(),P(12,VG,2,1,`p`,56)),e&2){let e=t.$implicit;M(6),Y(e.url),M(),F(e.finalUrl?7:-1),M(),X(` (`,e.outcome,`) `),M(),F(e.guards?9:-1),M(),F(e.resolvers?10:-1),M(),F(e.durationMs===void 0?-1:11),M(),F(e.reason?12:-1)}}function UG(e,t){if(e&1&&(z(0,`h3`),J(1,`Router during the render`),B(),I(2,HG,13,7,null,null,Dg)),e&2){let e=K();M(2),L(e.navigations)}}function WG(e,t){e&1&&(z(0,`span`,81),J(1,`cached`),B())}function GG(e,t){if(e&1&&(z(0,`span`,91),J(1,`not cached`),B()),e&2){let e=K().$implicit;R(`title`,K(3).skipText(e.cacheSkip))}}function KG(e,t){if(e&1&&(z(0,`p`,92),J(1),B()),e&2){let e=K().$implicit,t=K(3);M(),X(`Not cached: `,t.skipText(e.cacheSkip),`.`)}}function qG(e,t){if(e&1&&(z(0,`p`,87)(1,`span`,76),J(2),B(),z(3,`span`,90),J(4),B(),z(5,`span`,77),J(6),B(),z(7,`span`,88),J(8),B(),P(9,WG,2,0,`span`,81)(10,GG,2,1,`span`,91),B(),P(11,KG,2,1,`p`,92)),e&2){let e=t.$implicit,n=K(3);M(2),Y(e.method),M(),R(`title`,e.url),M(),Y(e.url),M(),q(`ok`,n.callTone(e)===`ok`)(`bad`,n.callTone(e)===`bad`),M(),Y(n.statusLabel(e)),M(2),X(``,e.durationMs,` ms`),M(),F(e.cacheStored?9:e.cacheSkip?10:-1),M(2),F(!e.cacheStored&&e.cacheSkip?11:-1)}}function JG(e,t){e&1&&(z(0,`p`,56),J(1,`The render made no HttpClient calls.`),B())}function YG(e,t){e&1&&(z(0,`p`,92),J(1),B()),e&2&&(M(),X(`Why: `,t,`.`))}function XG(e,t){if(e&1&&(z(0,`p`,87)(1,`span`,76),J(2),B(),z(3,`span`,90),J(4),B(),z(5,`span`,83),J(6,`cache miss`),B()(),P(7,YG,2,1,`p`,92)),e&2){let e,n=t.$implicit,r=K(4);M(2),Y(n.method),M(),R(`title`,n.url),M(),Y(n.url),M(3),F((e=r.refetchReason(n))?7:-1,e)}}function ZG(e,t){if(e&1&&(z(0,`h3`),J(1),B(),z(2,`p`,56),J(3,` These calls ran on the server and again after hydration instead of reading the transfer cache. `),B(),I(4,XG,8,4,null,null,CG)),e&2){let e=K(3);M(),X(`Fetched again in the browser (`,e.refetched().length,`)`),M(3),L(e.refetched())}}function QG(e,t){e&1&&(z(0,`p`,86),J(1,`No server call ran again in the browser.`),B())}function $G(e,t){if(e&1&&(z(0,`div`,72)(1,`h3`,84),J(2),z(3,`code`),J(4),B()(),z(5,`dl`,85)(6,`div`)(7,`dt`),J(8,`Request id`),B(),z(9,`dd`)(10,`code`),J(11),B()()(),z(12,`div`)(13,`dt`),J(14,`Render`),B(),z(15,`dd`),J(16),B()(),z(17,`div`)(18,`dt`),J(19,`Total`),B(),z(20,`dd`),J(21),B()(),z(22,`div`)(23,`dt`),J(24,`Sent`),B(),z(25,`dd`),J(26),B()(),z(27,`div`)(28,`dt`),J(29,`Browser page`),B(),z(30,`dd`),J(31),B()()(),P(32,NG,11,1,`p`,56),P(33,IG,6,0),P(34,UG,4,0),z(35,`h3`),J(36),B(),I(37,qG,12,11,null,null,CG,!1,JG,2,0,`p`,56),P(40,ZG,6,1)(41,QG,2,0,`p`,86),B()),e&2){let e,n=t,r=K(2);M(2),X(` `,n.method,` `),M(2),Y(n.url),M(7),Y(n.id),M(5),X(``,n.renderMs,` ms`),M(5),X(``,n.durationMs,` ms`),M(5),X(``,n.bytes,` B`),M(5),Y(r.requestPage()?.title||r.requestPage()?.url||`not connected`),M(),F((e=r.compressedWith(n))?32:-1,e),M(),F(n.overrides?.length?33:-1),M(),F(n.navigations?.length?34:-1),M(2),X(`Server calls (`,r.requestCalls().length,`)`),M(),L(r.requestCalls()),M(3),F(r.refetched().length?40:r.requestPage()&&r.requestCalls().length?41:-1)}}function eK(e,t){if(e&1&&(z(0,`div`,26)(1,`table`)(2,`thead`)(3,`tr`)(4,`th`,69),J(5,`Request`),B(),z(6,`th`,69),J(7,`Status`),B(),z(8,`th`,69),J(9,`Render mode`),B(),z(10,`th`,70),J(11,`Render`),B(),z(12,`th`,70),J(13,`Server calls`),B(),z(14,`th`,69),J(15,`Notes`),B()()(),z(16,`tbody`),I(17,MG,20,20,`tr`,71,CG),B()()(),P(19,$G,42,13,`div`,72)),e&2){let e,t=K();M(17),L(t.requests()),M(2),F((e=t.selectedRequest())?19:-1,e)}}function tK(e,t){e&1&&(z(0,`div`,11)(1,`p`),J(2,`No SSR requests traced.`),B(),z(3,`p`,56),J(4,` Add `),z(5,`code`),J(6,`app.use(devtools.ssrMiddleware)`),B(),J(7,` before the Angular handler in `),z(8,`code`),J(9,`server.ts`),B(),J(10,`, then load a server rendered page. `),B()())}function nK(e,t){e&1&&(z(0,`span`,94),J(1,`transfer cache`),B())}function rK(e,t){if(e&1&&(z(0,`span`,94),J(1),B()),e&2){let e=K().$implicit;M(),X(`delayed `,e.delayMs,` ms`)}}function iK(e,t){e&1&&(z(0,`span`,82),J(1,`mocked`),B())}function aK(e,t){e&1&&(z(0,`span`,83),J(1,`faulted`),B())}function oK(e,t){if(e&1&&(z(0,`span`,97),J(1,`rule `),z(2,`code`),J(3),B()()),e&2){let e=t;R(`title`,`Matched rule: `+e),M(3),Y(e)}}function sK(e,t){if(e&1){let e=W();z(0,`tr`,73),G(`click`,function(){let t=O(e).$implicit;return k(K(2).openCall(t.id))}),z(1,`td`)(2,`span`,94),J(3),B()(),z(4,`td`,76),J(5),B(),z(6,`td`,74)(7,`button`,95),J(8),B()(),z(9,`td`,96),J(10),B(),z(11,`td`,77),V(12,`span`,78),J(13),B(),z(14,`td`,79),J(15),B(),z(16,`td`)(17,`div`,80),P(18,nK,2,0,`span`,94),P(19,rK,2,1,`span`,94),P(20,iK,2,0,`span`,82),P(21,aK,2,0,`span`,83),P(22,oK,4,2,`span`,97),B()()()}if(e&2){let e,n=t.$implicit,r=K(2);q(`selected`,r.selectedCall()?.id===n.id),M(2),q(`server`,n.side===`server`),M(),Y(n.side===`server`?`SSR`:`Client`),M(2),Y(n.method),M(2),R(`title`,n.url),N(`data-call-id`,n.id)(`aria-pressed`,r.selectedCall()?.id===n.id)(`aria-controls`,r.selectedCall()?`call-preview`:null),M(),X(` `,n.url,` `),M(),R(`title`,n.pageUrl??``),M(),X(` `,n.pageUrl??``,` `),M(),q(`ok`,r.callTone(n)===`ok`)(`redirect`,r.callTone(n)===`redirect`)(`bad`,r.callTone(n)===`bad`),M(2),X(``,r.statusLabel(n),` `),M(2),X(``,n.durationMs,` ms`),M(3),F(n.cacheHit?18:-1),M(),F(n.delayMs?19:-1),M(),F(n.mocked?20:-1),M(),F(n.faulted?21:-1),M(),F((e=r.rulePatternOf(n))?22:-1,e)}}function cK(e,t){if(e&1&&(z(0,`div`,26)(1,`table`)(2,`thead`)(3,`tr`)(4,`th`,69),J(5,`Side`),B(),z(6,`th`,69),J(7,`Method`),B(),z(8,`th`,69),J(9,`URL`),B(),z(10,`th`,69),J(11,`Page`),B(),z(12,`th`,69),J(13,`Status`),B(),z(14,`th`,70),J(15,`Time`),B(),z(16,`th`,69),J(17,`Notes`),B()()(),z(18,`tbody`,93),I(19,sK,23,26,`tr`,71,TG),B()()()),e&2){let e=K();M(19),L(e.visibleCalls())}}function lK(e,t){e&1&&J(0),e&2&&X(` Nothing matches “`,K(2).callQuery().trim(),`” with these filters. `)}function uK(e,t){e&1&&J(0),e&2&&X(` None of the `,K(2).timeline().length,` requests fit these filters. `)}function dK(e,t){if(e&1){let e=W();z(0,`div`,27)(1,`p`),J(2,`No requests match.`),B(),z(3,`p`,56),P(4,lK,1,1)(5,uK,1,1),B(),z(6,`div`,98)(7,`button`,68),G(`click`,function(){return O(e),k(K().clearCallFilters())}),J(8,`Clear filters`),B()()()}if(e&2){let e=K();M(4),F(e.callQuery().trim()?4:5)}}function fK(e,t){e&1&&(z(0,`div`,11)(1,`p`),J(2,`No requests yet.`),B(),z(3,`p`,56),J(4,` Add `),z(5,`code`),J(6,`withPangular()`),B(),J(7,` to `),z(8,`code`),J(9,`provideHttpClient`),B(),J(10,`, then load a page of the app. `),B()())}function pK(e,t){if(e&1){let e=W();z(0,`button`,105),G(`click`,function(){O(e);let t=K();return k(K().copyPreview(t))}),J(1,` Copy `),B()}if(e&2){let e=K();N(`aria-label`,`Copy the response of `+e.method+` `+e.url)}}function mK(e,t){e&1&&(z(0,`p`,107),J(1,` Matched rule `),z(2,`code`),J(3),B()()),e&2&&(M(3),Y(t))}function hK(e,t){if(e&1){let e=W();z(0,`div`,99),G(`keydown.escape`,function(){return O(e),k(K().closePreview())}),z(1,`div`,100)(2,`h3`,101),J(3,`Response preview`),B(),z(4,`div`,102),P(5,pK,2,1,`button`,103),z(6,`button`,104),G(`click`,function(){let t=O(e);return k(K().mockCall(t))}),J(7,` Mock this request `),B(),z(8,`button`,105),G(`click`,function(){return O(e),k(K().closePreview())}),J(9,`Close`),B()()(),z(10,`p`,106)(11,`span`,76),J(12),B(),z(13,`span`,77),J(14),B(),z(15,`span`,90),J(16),B()(),P(17,mK,4,1,`p`,107),z(18,`pre`,108),J(19),B()()}if(e&2){let e,n=t,r=K();M(5),F(!n.error&&n.preview?5:-1),M(),R(`disabled`,!r.canWrite()),N(`aria-describedby`,r.canWrite()?null:`http-writes-off`),M(6),Y(n.method),M(),q(`ok`,r.callTone(n)===`ok`)(`redirect`,r.callTone(n)===`redirect`)(`bad`,r.callTone(n)===`bad`),M(),Y(r.statusLabel(n)),M(),R(`title`,n.url),M(),Y(n.url),M(),F((e=r.rulePatternOf(n))?17:-1,e),M(),q(`error`,!!n.error&&!n.cancelled),N(`aria-label`,n.error?`Response error`:`Response body`),M(),Y(n.error??r.previewText(n)??`(no body)`)}}function gK(e,t){if(e&1&&(z(0,`p`,31),J(1),B()),e&2){let e=K();M(),Y(e.writesOff)}}function _K(e,t){e&1&&(z(0,`p`,46),J(1,` SSR mocks are not transferred to the client: the browser requests the URL again and gets the real response unless the rule also applies on the client. `),B())}function vK(e,t){e&1&&(z(0,`span`),J(1,`passthrough`),B())}function yK(e,t){if(e&1&&(z(0,`span`,77),J(1),B()),e&2){let e=K().$implicit,t=K();q(`ok`,t.statusTone(e.status)===`ok`)(`redirect`,t.statusTone(e.status)===`redirect`)(`bad`,t.statusTone(e.status)===`bad`),M(),Y(e.status)}}function bK(e,t){if(e&1&&(z(0,`span`),J(1),B()),e&2){let e=K().$implicit;M(),X(``,e.delayMs,` ms`)}}function xK(e,t){e&1&&(z(0,`span`),J(1,`mock body`),B())}function SK(e,t){e&1&&(z(0,`p`,116),J(1,` The SSR mock is not written to TransferState, so the browser requests this URL again. `),B())}function CK(e,t){if(e&1){let e=W();z(0,`li`)(1,`label`,109)(2,`input`,110),G(`change`,function(){let t=O(e).$implicit;return k(K().toggleRule(t.id))}),B(),z(3,`code`,111)(4,`span`,112),J(5),B(),J(6),B()(),z(7,`button`,113),G(`click`,function(){let t=O(e).$implicit;return k(K().removeRule(t.id))}),J(8,` Remove `),B(),z(9,`span`,114)(10,`span`),J(11),B(),P(12,vK,2,0,`span`)(13,yK,2,7,`span`,115),P(14,bK,2,1,`span`),P(15,xK,2,0,`span`),B(),P(16,SK,2,0,`p`,116),B()}if(e&2){let e=t.$implicit,n=K();q(`off`,!e.enabled),M(2),R(`checked`,e.enabled)(`disabled`,!n.canWrite()),N(`aria-describedby`,n.canWrite()?null:`http-writes-off`)(`aria-label`,`Enable rule for `+e.pattern),M(),R(`title`,e.pattern),M(2),Y(e.method||`ANY`),M(),X(` `,e.pattern),M(),R(`disabled`,!n.canWrite()),N(`aria-describedby`,n.canWrite()?null:`http-writes-off`)(`aria-label`,`Remove rule for `+e.pattern),M(4),Y(n.targetLabel(e.target)),M(),F(e.status===void 0?12:13),M(2),F(e.delayMs?14:-1),M(),F(e.body?15:-1),M(),F(n.mocksOnServer(e)?16:-1)}}function wK(e,t){e&1&&(z(0,`li`,53),J(1,`No rules. SSR rules apply on the next page load.`),B())}function TK(e,t){if(e&1){let e=W();z(0,`p`,61),J(1,` Throws while the server renders, so it needs `),z(2,`code`),J(3,`providePangularHttp()`),B(),J(4,` and a page the engine renders. Prerendered files served as static files skip it. `),B(),z(5,`label`),J(6,` Error message `),z(7,`input`,117),G(`input`,function(t){return O(e),k(K().patchOverride(`message`,t))}),B()()}if(e&2){let e=K();M(7),R(`value`,e.overrideDraft().message)}}function EK(e,t){e&1&&J(0,` For a cached HTTP response this is the whole cache record, not only the response body. `)}function DK(e,t){e&1&&(z(0,`p`,121),J(1,` Filled in from the TransferState payload. The value starts empty because the panel only shows a redacted copy, so type the JSON the server should send. `),P(2,EK,1,0),B()),e&2&&(M(2),F(t===`http`?2:-1))}function OK(e,t){if(e&1){let e=W();z(0,`label`),J(1,` TransferState key `),z(2,`input`,118),G(`input`,function(t){return O(e),k(K().patchOverride(`key`,t))}),B()(),z(3,`label`)(4,`span`),J(5,`New JSON value `),z(6,`span`,33),J(7,`(empty removes the entry)`),B()(),z(8,`textarea`,119),G(`input`,function(t){return O(e),k(K().patchOverride(`value`,t))}),B()(),z(9,`p`,120),J(10),B(),P(11,DK,3,1,`p`,121)}if(e&2){let e,t=K();M(2),R(`value`,t.overrideDraft().key),M(6),R(`value`,t.overrideDraft().value),N(`aria-invalid`,t.overrideValueError()?`true`:null)(`aria-describedby`,t.overrideFromPayload()?`override-value-error override-value-note`:`override-value-error`),M(2),Y(t.overrideValueError()),M(),F((e=t.overrideFromPayload())?11:-1,e)}}function kK(e,t){e&1&&(z(0,`p`,61),J(1,` Serves `),z(2,`code`),J(3,`index.csr.html`),B(),J(4,` instead of rendering. Needs `),z(5,`code`),J(6,`browserDistFolder`),B(),J(7,` in `),z(8,`code`),J(9,`initPangularHub()`),B(),J(10,`. `),B())}function AK(e,t){if(e&1&&(z(0,`span`),J(1),B()),e&2){let e=K().$implicit;M(),Y(e.message)}}function jK(e,t){if(e&1&&(z(0,`span`),J(1),B()),e&2){let e=K().$implicit;M(),Z(``,e.value===void 0?`remove`:`set`,` `,e.key)}}function MK(e,t){if(e&1){let e=W();z(0,`li`)(1,`label`,109)(2,`input`,110),G(`change`,function(){let t=O(e).$implicit;return k(K().toggleOverride(t.id))}),B(),z(3,`code`,111)(4,`span`,112),J(5),B(),J(6),B()(),z(7,`button`,122),G(`click`,function(){let t=O(e).$implicit;return k(K().removeOverride(t.id))}),J(8,` Remove `),B(),z(9,`span`,114),P(10,AK,2,1,`span`),P(11,jK,2,2,`span`),B()()}if(e&2){let e=t.$implicit,n=K();q(`off`,!e.enabled),M(2),R(`checked`,e.enabled)(`disabled`,!n.canWrite()),N(`aria-label`,`Enable `+n.overrideLabel(e.kind)+` for `+e.pattern),M(),R(`title`,e.pattern),M(2),Y(n.overrideLabel(e.kind)),M(),X(` `,e.pattern),M(),R(`disabled`,!n.canWrite()),N(`aria-label`,`Remove `+n.overrideLabel(e.kind)+` for `+e.pattern),M(3),F(e.message?10:-1),M(),F(e.key?11:-1)}}function NK(e,t){e&1&&(z(0,`li`,53),J(1,`No overrides.`),B())}function PK(e,t){if(e&1&&(z(0,`div`)(1,`dt`),J(2,`DOM nodes hydrated`),B(),z(3,`dd`),J(4),B()(),z(5,`div`)(6,`dt`),J(7,`DOM nodes skipped`),B(),z(8,`dd`),J(9),B()(),z(10,`div`)(11,`dt`),J(12,`Mismatched components`),B(),z(13,`dd`),J(14),B()()),e&2){let e=t;M(4),Y(e.hydrated),M(5),Y(e.skipped),M(4),q(`bad`,e.mismatched>0),M(),Y(e.mismatched)}}function FK(e,t){if(e&1&&(z(0,`span`,124)(1,`span`,125),J(2,`Expected`),B(),z(3,`code`),J(4),B()()),e&2){let e=K().$implicit;M(4),Y(e.expected)}}function IK(e,t){if(e&1&&(z(0,`span`,124)(1,`span`,125),J(2,`Actual`),B(),z(3,`code`),J(4),B()()),e&2){let e=K().$implicit;M(4),Y(e.actual)}}function LK(e,t){if(e&1&&(z(0,`li`)(1,`code`),J(2),B(),P(3,FK,5,1,`span`,124),P(4,IK,5,1,`span`,124),B()),e&2){let e=t.$implicit;M(2),Y(`<`+e.component+`>`),M(),F(e.expected?3:-1),M(),F(e.actual?4:-1)}}function RK(e,t){if(e&1&&(z(0,`h3`),J(1),B(),z(2,`ul`,123),I(3,LK,5,3,`li`,null,Dg),B()),e&2){let e=K();M(),X(`Mismatches (`,e.mismatches.length,`)`),M(2),L(e.mismatches)}}function zK(e,t){if(e&1&&(z(0,`li`)(1,`code`),J(2),B()()),e&2){let e=t.$implicit;M(2),Y(e)}}function BK(e,t){if(e&1&&(z(0,`h3`),J(1,`ngSkipHydration hosts`),B(),z(2,`ul`,126),I(3,zK,3,1,`li`,null,Dg),B()),e&2){let e=K();M(3),L(e.skipHydrationHosts)}}function VK(e,t){e&1&&(z(0,`h3`),J(1,`Warnings`),B(),z(2,`p`,56),J(3,` Not captured: add `),z(4,`code`),J(5,`providePangularHttp()`),B(),J(6,` to the app providers. `),B())}function HK(e,t){if(e&1&&(z(0,`pre`,127),J(1),B()),e&2){let e=t.$implicit;M(),Y(e)}}function UK(e,t){e&1&&(z(0,`p`,86),J(1,`No hydration warnings.`),B())}function WK(e,t){if(e&1&&(z(0,`h3`),J(1),B(),I(2,HK,2,1,`pre`,127,Dg,!1,UK,2,0,`p`,86)),e&2){let e=K();M(),X(`Warnings (`,e.warnings.length,`)`),M(),L(e.warnings)}}function GK(e,t){if(e&1&&(z(0,`dl`,85)(1,`div`)(2,`dt`),J(3,`Enabled`),B(),z(4,`dd`)(5,`span`,94),J(6),B()()(),z(7,`div`)(8,`dt`),J(9,`Hydrated components`),B(),z(10,`dd`),J(11),B()(),z(12,`div`)(13,`dt`),J(14,`Hydrated nodes`),B(),z(15,`dd`),J(16),B()(),z(17,`div`)(18,`dt`),J(19,`Skipped components`),B(),z(20,`dd`),J(21),B()(),z(22,`div`)(23,`dt`),J(24,`App stable after`),B(),z(25,`dd`),J(26),B()(),z(27,`div`)(28,`dt`),J(29,`Incremental defer blocks`),B(),z(30,`dd`),J(31),B()(),P(32,PK,15,5),B(),P(33,RK,5,1),P(34,BK,5,0),P(35,VK,7,0)(36,WK,5,2)),e&2){let e,n=t;M(5),q(`on`,n.enabled)(`off-tag`,!n.enabled),M(),Y(n.enabled?`yes`:`no (client render only)`),M(5),Y(n.hydratedComponents??`n/a`),M(5),Y(n.hydratedNodes??`n/a`),M(5),Y(n.componentsSkippedHydration??`n/a`),M(5),Y(n.stableMs===void 0?`n/a`:n.stableMs+` ms`),M(5),Y(n.deferBlocksWithIncrementalHydration??`n/a`),M(),F((e=n.nodes)?32:-1,e),M(),F(n.mismatches?.length?33:-1),M(),F(n.skipHydrationHosts.length?34:-1),M(),F(n.warningsCaptured===!1?35:36)}}function KK(e,t){e&1&&(z(0,`div`,11)(1,`p`),J(2,`No hydration data for this page.`),B(),z(3,`p`,56),J(4,`Open a server rendered page of the app to see its stats.`),B()())}function qK(e,t){e&1&&(z(0,`div`,11)(1,`p`),J(2,`No TransferState script: this page was not server rendered.`),B()())}function JK(e,t){if(e&1&&(z(0,`p`,129),J(1),B()),e&2){let e=K(2);M(),Y(e.error)}}function YK(e,t){e&1&&(z(0,`span`,94),J(1),B()),e&2&&(M(),Y(t))}function XK(e,t){if(e&1&&(z(0,`span`,94),J(1),B(),z(2,`span`,132),J(3),B()),e&2){let e=t,n=K().$implicit,r=K(3);q(`server`,r.statusTone(e.status)===`ok`)(`fault`,r.statusTone(e.status)===`bad`),M(),X(`HTTP `,e.status),M(2),Y(e.url??n.key)}}function ZK(e,t){if(e&1&&(z(0,`span`,132),J(1),B()),e&2){let e=K().$implicit;M(),Y(e.key)}}function QK(e,t){if(e&1){let e=W();z(0,`button`,105),G(`click`,function(){O(e);let t=K().$implicit;return k(K(3).editEntry(t))}),J(1,` Edit in SSR overrides `),B()}if(e&2){let e=K().$implicit;N(`aria-label`,`Edit in SSR overrides, key `+e.key)}}function $K(e,t){if(e&1){let e=W();z(0,`details`)(1,`summary`),V(2,`span`,131),P(3,YK,2,1,`span`,94),P(4,XK,4,6)(5,ZK,2,1,`span`,132),z(6,`span`,133),J(7),B()(),z(8,`div`,134)(9,`span`,135),J(10,`Key`),B(),z(11,`code`,136),J(12),B(),z(13,`div`,137)(14,`button`,105),G(`click`,function(){let t=O(e).$implicit;return k(K(3).copyKey(t.key))}),J(15,` Copy `),B(),P(16,QK,2,1,`button`,103),B()(),z(17,`pre`,138),J(18),xv(19,`json`),B()()}if(e&2){let e,n,r=t.$implicit,i=K(3);M(3),F((e=i.payloadLabel(r))?3:-1,e),M(),F((n=r.http)?4:5,n),M(3),X(``,r.size,` B`),M(5),Y(r.key),M(2),N(`aria-label`,`Copy key `+r.key),M(2),F(i.canEditEntry(r)?16:-1),M(),N(`aria-label`,`Value of `+r.key),M(),Y(Cv(19,8,r.value))}}function eq(e,t){if(e&1&&(z(0,`p`,128),J(1),B(),P(2,JK,2,1,`p`,129),z(3,`div`,130),I(4,$K,20,10,`details`,null,EG),B()),e&2){let e=K();M(),rv(` `,e.entries.length,` entr`,e.entries.length===1?`y`:`ies`,`, `,e.size,` bytes `),M(),F(e.error?2:-1),M(2),L(e.entries)}}function tq(e,t){e&1&&P(0,qK,3,0,`div`,11)(1,eq,6,4),e&2&&F(+!!t.found)}function nq(e,t){e&1&&(z(0,`div`,11)(1,`p`),J(2,`Open a page of the app to see its payload.`),B()())}var rq={kind:`render-error`,pattern:``,message:``,key:``,value:``},iq={"render-error":`Render error`,"client-render":`Client render`,"state-edit":`TransferState edit`},aq={server:`Server`,prerender:`Prerender`,client:`Client`,redirect:`Redirect`,"not-rendered":`Not rendered`,unknown:`Unknown`},oq={pattern:``,method:``,target:`both`,status:``,delayMs:``,body:``};function sq(e){try{let t=new URL(e,`http://x`);return t.pathname+t.search}catch{return e}}var cq=/\[redacted\]|%5Bredacted%5D/gi;function lq(e){return(/^([a-z][a-z\d+.-]*:|\/\/)/i.test(e)?sq(e):e).replace(cq,`*`)}function uq(e){let t=rO(e);if(t!==null)return t;try{return JSON.parse(e),e.trim()}catch{return null}}var dq=[`GET`,`POST`,`PUT`,`PATCH`,`DELETE`];function fq(e){try{return new URL(e,`http://x`).pathname}catch{return``}}function pq(e){let t=fq(e);return t===`/`?``:t}var mq=/\[redacted\]|%5Bredacted%5D/i,hq=200,gq=50,_q=500,vq=1e5,yq=[{value:``,label:`None`},...KT.map(([e,t])=>({value:String(e),label:`${e} ${t}`}))],bq=class e{rpc=$(null);canWrite=Q(()=>ME(this.rpc(),`http`));writesOff=iE(`http`);loading=j(!1);failed=j(!1);serverCalls=j([]);pages=j([]);payloads=j({});serverDropped=j(0);requests=j([]);rules=j([]);overrides=j([]);overrideDraft=j({...rq});overrideFromPayload=j(null);overrideKindOptions=[{value:`render-error`,label:`Render error`},{value:`client-render`,label:`Force Client render`},{value:`state-edit`,label:`Edit TransferState entry`}];overrideValueError=Q(()=>{let e=this.overrideDraft().value.trim();if(!e)return``;try{return JSON.parse(e),``}catch{return`The value must be valid JSON.`}});overrideReady=Q(()=>{let e=this.overrideDraft();return!e.pattern.trim()||this.overrides().length>=20?!1:e.kind!==`state-edit`||!!e.key.trim()&&!this.overrideValueError()});hostPageId=fE();selectedPageId=Fv({source:()=>this.pages(),computation:(e,t)=>t?.value&&e.some(e=>e.pageId===t.value)?t.value:e.find(e=>e.pageId===this.hostPageId)?.pageId??e[0]?.pageId??null});selectedCallId=j(null);draft=j({...oq});message=j(``);bodyPlaceholder=`{ "error": "Service unavailable" }`;statusOptions=yq;unsubscribe=[];destroyRef=E(ws);injector=E(Ss);host=E(Nl);selected=Q(()=>this.pages().find(e=>e.pageId===this.selectedPageId())??null);pageRequestId=Q(()=>this.selected()?.ssrRequestId??null);selectedRequestId=Fv(()=>this.pageRequestId());selectedPayload=Q(()=>{let e=this.selectedPageId();return e?this.payloads()[e]??null:null});maxCalls=Q(()=>jE(this.rpc()).limits.httpCalls);droppedCalls=Q(()=>(this.selected()?.dropped??0)+this.serverDropped());pageServerCalls=Q(()=>{let e=this.selected()?.initialUrl;return e?this.serverCalls().filter(t=>!t.pageUrl||t.pageUrl===e):this.serverCalls()});timeline=Q(()=>[...this.pageServerCalls(),...this.selected()?.calls??[]].sort((e,t)=>t.at-e.at));callQuery=j(``);sideFilter=j(`all`);failedOnly=j(!1);sideOptions=[{value:`all`,label:`All sides`},{value:`server`,label:`SSR`},{value:`client`,label:`Client`}];visibleCalls=Q(()=>{let e=this.callQuery().trim().toLowerCase(),t=this.sideFilter()??`all`,n=this.failedOnly();return this.timeline().filter(r=>(t===`all`||r.side===t)&&(!n||this.isFailed(r))&&(!e||`${r.method} ${r.url}`.toLowerCase().includes(e)||`${r.method} ${sq(r.url)}`.toLowerCase().includes(e)))});filterStatus=Q(()=>{this.callQuery(),this.sideFilter(),this.failedOnly(),this.filterFlip=!this.filterFlip;let e=Nv(()=>`${this.visibleCalls().length} of ${this.timeline().length}`);return this.filterFlip?`${e}\u00a0`:e});filterFlip=!0;selectedCall=Q(()=>this.visibleCalls().find(e=>e.id===this.selectedCallId())??null);selectedRequest=Q(()=>this.requests().find(e=>e.id===this.selectedRequestId())??null);requestCalls=Q(()=>{let e=this.selectedRequest()?.id;return e?this.serverCalls().filter(t=>t.requestId===e):[]});requestPage=Q(()=>{let e=this.selectedRequest()?.id;return e?this.pages().find(t=>t.ssrRequestId===e)??null:null});refetched=Q(()=>{let e=this.selectedRequest(),t=this.requestPage();if(!e||!t)return[];let n=new Set(this.requestCalls().filter(e=>e.status).map(e=>`${e.method} ${sq(e.url)}`));return t.calls.filter(t=>t.side===`client`&&!t.cacheHit&&!t.mocked&&t.at>=e.at&&n.has(`${t.method} ${sq(t.url)}`))});draftMocksOnServer=Q(()=>{let e=this.draftRule();return!!e&&this.mocksOnServer(e)});draftRule=Q(()=>{let e=this.draft(),t=e.pattern.trim();if(!t||t.length>_q||this.bodyError()||this.rules().length>=gq)return null;let n=e.body.trim(),r=Math.min(Math.max(Math.round(Number(e.delayMs))||0,0),1e4),i=e.status.trim()?Number(e.status):n?200:void 0;return i!==void 0&&!qT(i)||i===void 0&&!r?null:{pattern:t,enabled:!0,target:e.target,...e.method?{method:e.method}:{},...i===void 0?{}:{status:i},...r?{delayMs:r}:{},...n?{body:n}:{}}});draftHint=Q(()=>{let e=this.draft();return this.rules().length>=gq?`You can add up to ${gq} rules. Remove one to add another.`:e.pattern.trim()?e.pattern.trim().length>_q?`The URL pattern is limited to ${_q} characters.`:this.bodyError()?``:e.status.trim()&&!qT(Number(e.status))?`Pick a status from the list.`:this.draftRule()?!e.status.trim()&&e.body.trim()?`With no status, the mock body returns 200.`:``:`Set a status, a delay or a mock body.`:`Enter a URL pattern to add a rule.`});bodyError=Q(()=>{let e=this.draft().body.trim();if(!e)return``;if(e.length>vq)return`The mock body is limited to ${vq} characters.`;try{return JSON.parse(e),``}catch{return`The mock body must be valid JSON.`}});constructor(){dc(()=>{let e=this.rpc();e&&this.load(e)}),this.destroyRef.onDestroy(()=>this.stopListening())}async load(e){this.loading.set(!0),this.failed.set(!1);try{let t=e.scope(`pangular`).rpc,[n,r]=await Promise.all([t.sharedState(`http`),t.sharedState(`http-payloads`)]);if(this.destroyRef.destroyed)return;let i=e=>{let t=e;this.serverCalls.set(t?.serverCalls??[]),this.serverDropped.set(t?.serverDropped??0),this.requests.set([...t?.requests??[]].reverse()),this.pages.set(t?.pages??[]),this.rules.set(t?.rules??[]),this.overrides.set(t?.ssrOverrides??[])},a=e=>this.payloads.set(e?.pages??{});i(n.value()),a(r.value()),this.stopListening(),this.unsubscribe=[n.on(`updated`,i),r.on(`updated`,a)]}catch{this.failed.set(!0)}finally{this.loading.set(!1)}}retry(){let e=this.rpc();e&&this.load(e)}guardVerdict(e){return e.guards?.passed===!1?e.outcome===`redirected`?`redirected`:`rejected`:``}msLabel(e){return e===void 0?`n/a`:`${e} ms`}skipText(e){return GT[e]??``}refetchReason(e){let t=`${e.method} ${sq(e.url)}`,n=this.requestCalls().filter(e=>`${e.method} ${sq(e.url)}`===t),r=n[0];return r?.cacheSkip&&n.every(e=>e.cacheSkip===r.cacheSkip)?this.skipText(r.cacheSkip):``}compressedWith(e){if(e.compressedBeforeTrace)return e.headers[`content-encoding`]??`unknown encoding`}renderModeLabel(e){return aq[e]??`Unknown`}statusLabel(e){return e.cancelled?`cancelled`:e.status?String(e.status):`ERR`}callTone(e){return e.cancelled?`neutral`:this.statusTone(e.status)}isFailed(e){return!!e.cancelled||!e.status||e.status>=400}clearCallFilters(){this.callQuery.set(``),this.sideFilter.set(`all`),this.failedOnly.set(!1),this.host.nativeElement.querySelector(`#timeline-search`)?.focus()}rulePatternOf(e){return e.rulePattern?e.rulePattern:e.ruleId?this.rules().find(t=>t.id===e.ruleId)?.pattern??null:null}openCall(e){this.selectedCallId.set(e),zd(()=>this.host.nativeElement.querySelector(`#preview-heading`)?.focus(),{injector:this.injector})}previewText(e){if(e.preview!==void 0)return rO(e.preview)??e.preview}async copyPreview(e){let t=this.previewText(e);if(t)try{await navigator.clipboard.writeText(t),this.message.set(`Copied.`)}catch{this.message.set(`The clipboard is not available here.`)}}mockCall(e){let t=e.method.toUpperCase(),n=lq(e.url),r=e.error||!e.preview?null:uq(e.preview);this.draft.set({...oq,pattern:n,method:t,body:r??``});let i=`${t} ${n}`;this.message.set(r?`Filled in a rule for ${i} with the preview as its body. Check it, then add the rule.`:e.preview&&!e.error?`Filled in a rule for ${i}. The preview is not complete JSON, so it is not used as the body.`:`Filled in a rule for ${i}. Set a status, a delay or a body, then add the rule.`),zd(()=>this.host.nativeElement.querySelector(`#rule-pattern`)?.focus(),{injector:this.injector})}closePreview(){let e=this.selectedCallId();this.selectedCallId.set(null),e&&[...this.host.nativeElement.querySelectorAll(`button[data-call-id]`)].find(t=>t.dataset.callId===e)?.focus()}stopListening(){for(let e of this.unsubscribe.splice(0))e()}statusTone(e){return e===void 0?`neutral`:e===0||e>=400?`bad`:e>=300?`redirect`:e>=200?`ok`:`neutral`}mocksOnServer(e){return e.target!==`client`&&e.status!==void 0&&e.status<400}payloadLabel(e){return e.source===`hydration`?`hydration annotations`:e.fn?`Analog server function ${e.fn.name??e.fn.id}`:e.source===`analog`?`Analog`:null}targetLabel(e){return e===`both`?`SSR + client`:e===`server`?`SSR only`:`Client only`}pageOptions=Q(()=>this.pages().map(e=>({value:e.pageId,label:e.title||e.url})));methodOptions=Q(()=>{let e=this.draft().method;return[{value:``,label:`Any`},...(e&&!dq.includes(e)?[...dq,e]:dq).map(e=>({value:e,label:e}))]});targetOptions=[{value:`both`,label:`SSR + client`},{value:`server`,label:`SSR only`},{value:`client`,label:`Client only`}];selectPage(e){e&&this.selectedPageId.set(e),this.selectedCallId.set(null),this.overrideFromPayload.set(null)}setDraft(e,t){this.draft.update(n=>({...n,[e]:t}))}patch(e,t){let n=t.target.value;this.draft.update(t=>({...t,[e]:n}))}async addRule(e){e.preventDefault();let t=this.draftRule();if(!t)return;let n={id:`r${Date.now().toString(36)}${Math.random().toString(36).slice(2,6)}`,...t};await this.saveRules([...this.rules(),n],`Rule added.`,n)&&(this.draft.set({...oq}),this.host.nativeElement.querySelector(`#rule-pattern`)?.focus())}toggleRule(e){let t=this.rules().find(t=>t.id===e);t&&this.saveRules(this.rules().map(t=>t.id===e?{...t,enabled:!t.enabled}:t),`Rule updated.`,t)}async removeRule(e){let t=this.rules().findIndex(t=>t.id===e);if(t<0)return;let n=this.rules().filter(t=>t.id!==e);await this.saveRules(n,`Rule removed.`,this.rules()[t])&&this.focusAfterRemove(`[data-remove-rule]`,t,`#rule-list-heading`)}async clearCalls(){try{await gE(this.rpc(),`clear-http-calls`),this.selectedCallId.set(null),this.message.set(`Timeline cleared.`)}catch{this.message.set(`Could not clear the timeline.`)}}overrideLabel(e){return iq[e]??e}setOverrideDraft(e,t){this.overrideDraft.update(n=>({...n,[e]:t})),e===`kind`&&t!==`state-edit`&&this.overrideFromPayload.set(null)}patchOverride(e,t){let n=t.target.value;this.overrideDraft.update(t=>({...t,[e]:n})),e===`key`&&this.overrideFromPayload.set(null)}async copyKey(e){try{await navigator.clipboard.writeText(e),this.message.set(`Copied.`)}catch{this.message.set(`The clipboard is not available here.`)}}canEditEntry(e){let{key:t}=e;return this.canWrite()&&!!t&&t===t.trim()&&t.length<=hq&&!mq.test(t)}editEntry(e){if(!this.canEditEntry(e))return;let t=this.selected();this.overrideDraft.set({...rq,kind:`state-edit`,pattern:t?pq(t.initialUrl??t.url):``,key:e.key}),this.overrideFromPayload.set(e.http?`http`:`other`),this.message.set(`Editing the TransferState entry in SSR overrides.`),zd(()=>{let e=this.host.nativeElement.querySelector(this.overrideDraft().pattern?`#override-value`:`#override-pattern`);e?.scrollIntoView?.({block:`center`}),e?.focus()},{injector:this.injector})}async addOverride(e){if(e.preventDefault(),!this.overrideReady())return;let t=this.overrideDraft(),n={id:`o${Date.now().toString(36)}${Math.random().toString(36).slice(2,6)}`,kind:t.kind,pattern:t.pattern.trim(),enabled:!0,...t.kind===`render-error`&&t.message.trim()?{message:t.message.trim()}:{},...t.kind===`state-edit`?{key:t.key.trim()}:{},...t.kind===`state-edit`&&t.value.trim()?{value:t.value.trim()}:{}};await this.saveOverrides([...this.overrides(),n],`Override added. Reload the page.`)&&(this.overrideDraft.set({...rq,kind:t.kind}),this.overrideFromPayload.set(null),this.host.nativeElement.querySelector(`#override-pattern`)?.focus())}toggleOverride(e){this.saveOverrides(this.overrides().map(t=>t.id===e?{...t,enabled:!t.enabled}:t),`Override updated. Reload the page.`)}async removeOverride(e){let t=this.overrides().findIndex(t=>t.id===e);if(t<0)return;let n=this.overrides().filter(t=>t.id!==e);await this.saveOverrides(n,`Override removed.`)&&this.focusAfterRemove(`[data-remove-override]`,t,`#override-list-heading`)}focusAfterRemove(e,t,n){zd(()=>{let r=this.host.nativeElement,i=r.querySelectorAll(e);(i[Math.min(t,i.length-1)]??r.querySelector(n))?.focus()},{injector:this.injector})}announce(e){if(this.message()!==e){this.message.set(e);return}this.message.set(``),zd(()=>{this.message()===``&&this.message.set(e)},{injector:this.injector})}async saveOverrides(e,t){try{let n=await gE(this.rpc(),`set-ssr-overrides`,e);return this.overrides.set(Array.isArray(n)?n:e),this.announce(t),!0}catch{return this.message.set(`Could not save the overrides.`),!1}}async saveRules(e,t,n){try{let r=await gE(this.rpc(),`set-http-rules`,e);return this.rules.set(Array.isArray(r)?r:e),this.announce(n.target===`client`?t:`${t} Reload the page to apply it to SSR.`),!0}catch{return this.message.set(`Could not save the rules.`),!1}}static ɵfac=function(t){return new(t||e)};static ɵcmp=Wh({type:e,selectors:[[`app-network-inspector`]],inputs:{rpc:[1,`rpc`]},decls:128,vars:54,consts:[[`role`,`status`,1,`state`],[`role`,`alert`,1,`state`,`error`],[1,`toolbar`],[1,`page-picker`],[`id`,`page-picker-label`],[`labelledBy`,`page-picker-label`,`emptyText`,`No connected page`,`placeholder`,`No connected page`,3,`valueChange`,`options`,`value`],[`type`,`button`,3,`click`,`disabled`],[`role`,`status`,1,`message`],[1,`grid`],[`aria-labelledby`,`ssr-heading`,1,`panel`,`wide`],[`id`,`ssr-heading`],[1,`empty`],[`aria-labelledby`,`timeline-heading`,1,`panel`,`wide`],[`id`,`timeline-heading`],[`what`,`HTTP calls`,`limit`,`httpCalls`,3,`dropped`,`max`],[`role`,`group`,`aria-label`,`Filter the HTTP timeline`,1,`filters`],[1,`search`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`,1,`search-icon`],[`cx`,`11`,`cy`,`11`,`r`,`7`],[`d`,`m20 20-3.5-3.5`],[`id`,`timeline-search`,`type`,`search`,`placeholder`,`Find a URL or method…`,`aria-label`,`Find a URL or method`,`autocomplete`,`off`,`spellcheck`,`false`,3,`input`,`keydown.escape`,`value`],[`ariaLabel`,`Side`,1,`side-filter`,3,`valueChange`,`options`,`value`],[1,`inline`,`failed-toggle`],[`type`,`checkbox`,3,`change`,`checked`],[1,`total`],[`role`,`status`,1,`sr-only`],[1,`table-wrap`],[`role`,`status`,1,`empty`,`no-match`],[`id`,`call-preview`,`role`,`region`,`aria-labelledby`,`preview-heading`,1,`preview`],[`aria-labelledby`,`rules-heading`,1,`panel`],[`id`,`rules-heading`],[`id`,`http-writes-off`,1,`muted`,`small`],[`id`,`rule-form`,1,`rule-form`,3,`submit`],[1,`hint`],[`id`,`rule-pattern`,`required`,``,`spellcheck`,`false`,`autocomplete`,`off`,`placeholder`,`e.g. /api/products`,3,`input`,`value`],[1,`row`],[1,`field-group`],[`id`,`rule-method-label`],[`labelledBy`,`rule-method-label`,3,`valueChange`,`options`,`value`],[`id`,`rule-target-label`],[`labelledBy`,`rule-target-label`,3,`valueChange`,`describedBy`,`options`,`value`],[`id`,`rule-status-label`],[`labelledBy`,`rule-status-label`,3,`valueChange`,`describedBy`,`options`,`value`],[`type`,`number`,`inputmode`,`numeric`,`min`,`0`,`max`,`10000`,`placeholder`,`0`,3,`input`,`value`],[`rows`,`3`,`spellcheck`,`false`,`aria-describedby`,`body-error`,3,`input`,`placeholder`,`value`],[`id`,`body-error`,1,`field-error`],[`id`,`rule-ssr-note`,1,`muted`,`small`],[`id`,`rule-hint`,1,`muted`,`small`],[1,`form-actions`],[`type`,`submit`,3,`disabled`],[`id`,`rule-list-heading`,`tabindex`,`-1`,1,`rules-heading`],[1,`rules`],[3,`off`],[1,`empty-rule`],[`aria-labelledby`,`overrides-heading`,1,`panel`],[`id`,`overrides-heading`],[1,`muted`,`small`],[1,`rule-form`,3,`submit`],[`id`,`override-kind-label`],[`labelledBy`,`override-kind-label`,3,`valueChange`,`describedBy`,`options`,`value`],[`id`,`override-pattern`,`required`,``,`spellcheck`,`false`,`autocomplete`,`off`,`placeholder`,`e.g. /examples/ssr`,3,`input`,`value`],[`id`,`override-kind-help`,1,`muted`,`small`],[`id`,`override-list-heading`,`tabindex`,`-1`,1,`rules-heading`],[`aria-labelledby`,`hydration-heading`,1,`panel`],[`id`,`hydration-heading`],[`aria-labelledby`,`payload-heading`,1,`panel`,`wide`],[`id`,`payload-heading`],[`aria-hidden`,`true`,1,`spinner`],[`type`,`button`,3,`click`],[`scope`,`col`],[`scope`,`col`,1,`num`],[3,`selected`],[`id`,`ssr-detail`,`role`,`region`,`aria-labelledby`,`ssr-detail-heading`,1,`preview`],[3,`click`],[1,`url`],[`type`,`button`,`aria-controls`,`ssr-detail`,1,`link`,3,`title`],[1,`method`],[1,`status`],[`aria-hidden`,`true`,1,`dot`],[1,`num`],[1,`notes`],[1,`tag`,`server`],[1,`tag`,`mock`],[1,`tag`,`fault`],[`id`,`ssr-detail-heading`],[1,`stats`],[1,`muted`,`small`,`ok-note`],[1,`request-call`],[1,`muted`],[1,`stats`,`nav-stats`],[1,`preview-url`,3,`title`],[1,`tag`,3,`title`],[1,`muted`,`small`,`skip-reason`],[`appRovingList`,`button[data-call-id]`],[1,`tag`],[`type`,`button`,1,`link`,3,`title`],[1,`page-url`,3,`title`],[1,`tag`,`rule-ref`,3,`title`],[1,`empty-actions`],[`id`,`call-preview`,`role`,`region`,`aria-labelledby`,`preview-heading`,1,`preview`,3,`keydown.escape`],[1,`preview-head`],[`id`,`preview-heading`,`tabindex`,`-1`],[1,`preview-actions`],[`type`,`button`,1,`ghost`],[`type`,`button`,`aria-controls`,`rule-form`,1,`ghost`,3,`click`,`disabled`],[`type`,`button`,1,`ghost`,3,`click`],[1,`preview-meta`],[1,`preview-rule`],[`tabindex`,`0`,`role`,`region`,1,`preview-body`],[1,`inline`],[`type`,`checkbox`,3,`change`,`checked`,`disabled`],[1,`rule-pattern`,3,`title`],[1,`rule-method`],[`type`,`button`,`data-remove-rule`,``,1,`link`,`remove`,3,`click`,`disabled`],[1,`rule-meta`],[1,`status`,3,`ok`,`redirect`,`bad`],[1,`rule-note`],[`spellcheck`,`false`,`placeholder`,`Simulated render error`,`aria-describedby`,`override-kind-help`,3,`input`,`value`],[`id`,`override-key`,`spellcheck`,`false`,`autocomplete`,`off`,3,`input`,`value`],[`id`,`override-value`,`rows`,`3`,`spellcheck`,`false`,3,`input`,`value`],[`id`,`override-value-error`,1,`field-error`],[`id`,`override-value-note`,1,`muted`,`small`],[`type`,`button`,`data-remove-override`,``,1,`link`,`remove`,3,`click`,`disabled`],[1,`plain`,`mismatches`],[1,`mismatch-row`],[1,`mismatch-label`],[1,`plain`],[1,`warn`],[1,`muted`,`small`,`summary-line`],[`role`,`alert`,1,`bad`],[1,`entries`],[`aria-hidden`,`true`,1,`chevron`],[1,`entry-key`],[1,`entry-size`],[1,`entry-key-row`],[1,`entry-key-label`],[1,`entry-key-text`],[1,`entry-actions`],[`tabindex`,`0`,`role`,`region`]],template:function(e,t){if(e&1&&(P(0,DG,4,0,`div`,0)(1,OG,7,0,`div`,1),z(2,`div`,2)(3,`div`,3)(4,`span`,4),J(5,`Page`),B(),z(6,`app-select`,5),G(`valueChange`,function(e){return t.selectPage(e)}),B()(),z(7,`button`,6),G(`click`,function(){return t.clearCalls()}),J(8,` Clear timeline `),B(),z(9,`p`,7),J(10),B()(),z(11,`div`,8)(12,`section`,9)(13,`h2`,10),J(14),B(),P(15,eK,20,1)(16,tK,11,0,`div`,11),B(),z(17,`section`,12)(18,`h2`,13),J(19),B(),V(20,`app-limit-note`,14),z(21,`div`,15)(22,`div`,16),A(),z(23,`svg`,17),V(24,`circle`,18)(25,`path`,19),B(),ms(),z(26,`input`,20),G(`input`,function(e){return t.callQuery.set(e.target.value)})(`keydown.escape`,function(){return t.callQuery.set(``)}),B()(),z(27,`app-select`,21),cv(`valueChange`,function(e){return sv(t.sideFilter,e)||(t.sideFilter=e),e}),B(),z(28,`label`,22)(29,`input`,23),G(`change`,function(e){return t.failedOnly.set(e.target.checked)}),B(),J(30,` Failed only `),B(),z(31,`span`,24),J(32),B(),z(33,`span`,25),J(34),B()(),P(35,cK,21,0,`div`,26)(36,dK,9,1,`div`,27)(37,fK,11,0,`div`,11),P(38,hK,20,18,`div`,28),B(),z(39,`section`,29)(40,`h2`,30),J(41,`Fault injection`),B(),P(42,gK,2,1,`p`,31),z(43,`form`,32),G(`submit`,function(e){return t.addRule(e)}),z(44,`label`)(45,`span`),J(46,`URL pattern `),z(47,`span`,33),J(48,`(substring or * glob, ^ anchors the path)`),B()(),z(49,`input`,34),G(`input`,function(e){return t.patch(`pattern`,e)}),B()(),z(50,`div`,35)(51,`div`,36)(52,`span`,37),J(53,`Method`),B(),z(54,`app-select`,38),G(`valueChange`,function(e){return t.setDraft(`method`,e??``)}),B()(),z(55,`div`,36)(56,`span`,39),J(57,`Apply on`),B(),z(58,`app-select`,40),G(`valueChange`,function(e){return t.setDraft(`target`,e??`both`)}),B()()(),z(59,`div`,35)(60,`div`,36)(61,`span`,41),J(62,`Status`),B(),z(63,`app-select`,42),G(`valueChange`,function(e){return t.setDraft(`status`,e??``)}),B()(),z(64,`label`),J(65,` Delay (ms) `),z(66,`input`,43),G(`input`,function(e){return t.patch(`delayMs`,e)}),B()()(),z(67,`label`)(68,`span`),J(69,`Mock JSON body `),z(70,`span`,33),J(71,`(optional)`),B()(),z(72,`textarea`,44),G(`input`,function(e){return t.patch(`body`,e)}),B()(),z(73,`p`,45),J(74),B(),P(75,_K,2,0,`p`,46),z(76,`p`,47),J(77),B(),z(78,`div`,48)(79,`button`,49),J(80,` Add rule `),B()()(),z(81,`h3`,50),J(82),B(),z(83,`ul`,51),I(84,CK,17,17,`li`,52,CG,!1,wK,2,0,`li`,53),B()(),z(87,`section`,54)(88,`h2`,55),J(89,`SSR overrides`),B(),z(90,`p`,56),J(91,` Development only. These change what the server sends for matching pages, from the next full page load, and the request is marked `),z(92,`strong`),J(93,`overridden`),B(),J(94,`. `),B(),z(95,`form`,57),G(`submit`,function(e){return t.addOverride(e)}),z(96,`div`,36)(97,`span`,58),J(98,`Override`),B(),z(99,`app-select`,59),G(`valueChange`,function(e){return t.setOverrideDraft(`kind`,e??`render-error`)}),B()(),z(100,`label`)(101,`span`),J(102,`Page pattern `),z(103,`span`,33),J(104,`(substring or * glob, ^ anchors the path)`),B()(),z(105,`input`,60),G(`input`,function(e){return t.patchOverride(`pattern`,e)}),B()(),P(106,TK,8,1)(107,OK,12,6)(108,kK,11,0,`p`,61),z(109,`div`,48)(110,`button`,49),J(111,` Add override `),B()()(),z(112,`h3`,62),J(113),B(),z(114,`ul`,51),I(115,MK,12,12,`li`,52,CG,!1,NK,2,0,`li`,53),B()(),z(118,`section`,63)(119,`h2`,64),J(120,`Hydration`),B(),P(121,GK,37,14)(122,KK,5,0,`div`,11),B(),z(123,`section`,65)(124,`h2`,66),J(125,`TransferState payload`),B(),P(126,tq,2,1)(127,nq,3,0,`div`,11),B()()),e&2){let e,n,r,i;F(t.loading()?0:t.failed()?1:-1),M(6),R(`options`,t.pageOptions())(`value`,t.selected()?.pageId??null),M(),R(`disabled`,!t.canWrite()),N(`aria-describedby`,t.canWrite()?null:`http-writes-off`),M(3),Y(t.message()),M(4),X(`SSR requests (`,t.requests().length,`)`),M(),F(t.requests().length?15:16),M(4),X(`HTTP timeline (`,t.timeline().length,`)`),M(),R(`dropped`,t.droppedCalls())(`max`,t.maxCalls()),M(),q(`no-calls`,!t.timeline().length),M(5),R(`value`,t.callQuery()),M(),R(`options`,t.sideOptions),ov(`value`,t.sideFilter),M(2),R(`checked`,t.failedOnly()),M(3),Z(``,t.visibleCalls().length,` of `,t.timeline().length),M(2),Y(t.filterStatus()),M(),F(t.visibleCalls().length?35:t.timeline().length?36:37),M(3),F((e=t.selectedCall())?38:-1,e),M(4),F(t.canWrite()?-1:42),M(7),R(`value`,t.draft().pattern),M(5),R(`options`,t.methodOptions())(`value`,t.draft().method),M(4),R(`describedBy`,t.draftMocksOnServer()?`rule-ssr-note`:``)(`options`,t.targetOptions)(`value`,t.draft().target),M(5),R(`describedBy`,t.draftMocksOnServer()?`rule-ssr-note`:``)(`options`,t.statusOptions)(`value`,t.draft().status),M(3),R(`value`,t.draft().delayMs),M(6),R(`placeholder`,t.bodyPlaceholder)(`value`,t.draft().body),N(`aria-invalid`,t.bodyError()?`true`:null),M(2),Y(t.bodyError()),M(),F(t.draftMocksOnServer()?75:-1),M(2),Y(t.draftHint()),M(2),R(`disabled`,!t.canWrite()||!t.draftRule()),N(`aria-describedby`,t.canWrite()?`rule-hint`:`http-writes-off`),M(3),X(` Rules (`,t.rules().length,`) `),M(2),L(t.rules()),M(15),R(`describedBy`,t.overrideDraft().kind===`state-edit`?``:`override-kind-help`)(`options`,t.overrideKindOptions)(`value`,t.overrideDraft().kind),M(6),R(`value`,t.overrideDraft().pattern),M(),F((n=t.overrideDraft().kind)===`render-error`?106:n===`state-edit`?107:n===`client-render`?108:-1),M(4),R(`disabled`,!t.canWrite()||!t.overrideReady()),N(`aria-describedby`,t.canWrite()?null:`http-writes-off`),M(3),X(` Overrides (`,t.overrides().length,`) `),M(2),L(t.overrides()),M(6),F((r=t.selected()?.hydration)?121:122,r),M(5),F((i=t.selectedPayload())?126:127,i)}},dependencies:[oO,pP,qD,hb],styles:[`@charset "UTF-8";
 [_nghost-%COMP%] {
   display: block;
   color: var(--%NS%text);
@@ -12919,7 +13193,7 @@ summary[_ngcontent-%COMP%]:hover   .entry-key[_ngcontent-%COMP%] {
   .message[_ngcontent-%COMP%] {
     text-align: left;
   }
-}`]})};function WK(e,t){e&1&&(A(),H(0,`svg`,9),zg(1,`path`,20),U())}function GK(e,t){e&1&&(A(),H(0,`svg`,10)(1,`defs`)(2,`linearGradient`,21),zg(3,`stop`,22)(4,`stop`,23),U()(),zg(5,`path`,24),H(6,`g`,25),zg(7,`path`,26)(8,`path`,27)(9,`path`,28)(10,`path`,29),U()())}function KK(e,t){e&1&&(A(),H(0,`svg`,11),zg(1,`path`,30)(2,`path`,31)(3,`path`,32)(4,`path`,33),U())}function qK(e,t){e&1&&(A(),H(0,`svg`,9),zg(1,`path`,34)(2,`path`,35)(3,`path`,36)(4,`path`,37)(5,`path`,38)(6,`path`,39),U())}function JK(e,t){if(e&1&&(H(0,`a`,16)(1,`span`,40)(2,`strong`),J(3),U()(),H(4,`span`,41),J(5,`→`),U(),H(6,`span`,42),J(7,`(opens in a new tab)`),U()()),e&2){let e=t;Gg(`href`,e.href,Au),M(3),Y(e.label)}}function YK(e,t){if(e&1&&(H(0,`li`),J(1),U()),e&2){let e=t.$implicit,n=t.$index;j_(`animation-delay`,200+n*120,`ms`),M(),Y(e)}}var XK=class e{info=$.required();plansTitle=Q(()=>{let e=this.info();return e.plansTitle??(e.link?`In an ${e.name} app`:`On the roadmap`)});static ɵfac=function(t){return new(t||e)};static ɵcmp=Wh({type:e,selectors:[[`app-coming-soon`]],hostVars:2,hostBindings:function(e,t){e&2&&j_(`--%NS%brand`,t.info().color)},inputs:{info:[1,`info`]},decls:29,vars:6,consts:[[`aria-labelledby`,`soon-title`,1,`soon`],[`aria-hidden`,`true`,1,`stage`],[1,`ring`,`r1`],[1,`ring`,`r2`],[1,`orbit`,`o1`],[1,`dot`],[1,`orbit`,`o2`],[1,`orbit`,`o3`],[1,`logo`],[`viewBox`,`0 0 256 256`,`width`,`96`,`height`,`96`],[`viewBox`,`0 0 32 32`,`width`,`88`,`height`,`88`],[`viewBox`,`0 0 256 182`,`width`,`104`,`height`,`74`],[1,`badge`],[`aria-hidden`,`true`,1,`spark`],[`id`,`soon-title`],[1,`summary`],[`target`,`_blank`,`rel`,`noopener noreferrer`,1,`author`,`cta`,3,`href`],[1,`plans-title`],[1,`plans`],[3,`animation-delay`],[`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`],[`id`,`an-hero-grad`,`x1`,`0`,`y1`,`0`,`x2`,`1`,`y2`,`1`],[`offset`,`0`,`stop-color`,`#f0224f`],[`offset`,`1`,`stop-color`,`#c4002d`],[`d`,`M16 0C27.2 0 32 4.8 32 16S27.2 32 16 32 0 27.2 0 16 4.8 0 16 0Z`,`fill`,`url(#an-hero-grad)`],[`transform`,`translate(6.4 6.4) scale(0.8)`,`fill`,`#fff`],[`d`,`M14.8486 0L23.138 16.8551L23.9996 3.99892L14.8486 0Z`],[`d`,`M16.9875 17.7114H7.01272L5.73926 20.627L12.0001 24L18.261 20.627L16.9875 17.7114Z`],[`d`,`M8.72168 13.9298H15.2812L11.9997 6.39575L8.72168 13.9298Z`],[`d`,`M9.15103 0L0 3.99892L0.861556 16.8551L9.15103 0Z`],[`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`],[`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`],[1,`who`],[`aria-hidden`,`true`,1,`go`],[1,`sr-only`]],template:function(e,t){if(e&1&&(H(0,`section`,0)(1,`div`,1),zg(2,`span`,2)(3,`span`,3),H(4,`span`,4),zg(5,`span`,5),U(),H(6,`span`,6),zg(7,`span`,5),U(),H(8,`span`,7),zg(9,`span`,5),U(),H(10,`div`,8),P(11,WK,2,0,`:svg:svg`,9)(12,GK,11,0,`:svg:svg`,10)(13,KK,5,0,`:svg:svg`,11)(14,qK,7,0,`:svg:svg`,9),U()(),H(15,`p`,12)(16,`span`,13),J(17,`✦`),U(),J(18),U(),H(19,`h2`,14),J(20),U(),H(21,`p`,15),J(22),U(),P(23,JK,8,2,`a`,16),H(24,`h3`,17),J(25),U(),H(26,`ul`,18),I(27,YK,2,3,`li`,19,Og),U()()),e&2){let e,n;M(11),F((e=t.info().id)===`nativescript`?11:e===`angular-native`?12:e===`analog`?13:e===`capacitor`?14:-1),M(7),X(` `,t.info().badge),M(2),Y(t.info().heading),M(2),Y(t.info().summary),M(),F((n=t.info().link)?23:-1,n),M(2),X(` `,t.plansTitle(),` `),M(2),L(t.info().plans)}},styles:[`[_nghost-%COMP%] {
+}`]})};function xq(e,t){e&1&&(A(),H(0,`svg`,9),zg(1,`path`,20),U())}function Sq(e,t){e&1&&(A(),H(0,`svg`,10)(1,`defs`)(2,`linearGradient`,21),zg(3,`stop`,22)(4,`stop`,23),U()(),zg(5,`path`,24),H(6,`g`,25),zg(7,`path`,26)(8,`path`,27)(9,`path`,28)(10,`path`,29),U()())}function Cq(e,t){e&1&&(A(),H(0,`svg`,11),zg(1,`path`,30)(2,`path`,31)(3,`path`,32)(4,`path`,33),U())}function wq(e,t){e&1&&(A(),H(0,`svg`,9),zg(1,`path`,34)(2,`path`,35)(3,`path`,36)(4,`path`,37)(5,`path`,38)(6,`path`,39),U())}function Tq(e,t){if(e&1&&(H(0,`a`,16)(1,`span`,40)(2,`strong`),J(3),U()(),H(4,`span`,41),J(5,`→`),U(),H(6,`span`,42),J(7,`(opens in a new tab)`),U()()),e&2){let e=t;Gg(`href`,e.href,Au),M(3),Y(e.label)}}function Eq(e,t){if(e&1&&(H(0,`li`),J(1),U()),e&2){let e=t.$implicit,n=t.$index;j_(`animation-delay`,200+n*120,`ms`),M(),Y(e)}}var Dq=class e{info=$.required();plansTitle=Q(()=>{let e=this.info();return e.plansTitle??(e.link?`In an ${e.name} app`:`On the roadmap`)});static ɵfac=function(t){return new(t||e)};static ɵcmp=Wh({type:e,selectors:[[`app-coming-soon`]],hostVars:2,hostBindings:function(e,t){e&2&&j_(`--%NS%brand`,t.info().color)},inputs:{info:[1,`info`]},decls:29,vars:6,consts:[[`aria-labelledby`,`soon-title`,1,`soon`],[`aria-hidden`,`true`,1,`stage`],[1,`ring`,`r1`],[1,`ring`,`r2`],[1,`orbit`,`o1`],[1,`dot`],[1,`orbit`,`o2`],[1,`orbit`,`o3`],[1,`logo`],[`viewBox`,`0 0 256 256`,`width`,`96`,`height`,`96`],[`viewBox`,`0 0 32 32`,`width`,`88`,`height`,`88`],[`viewBox`,`0 0 256 182`,`width`,`104`,`height`,`74`],[1,`badge`],[`aria-hidden`,`true`,1,`spark`],[`id`,`soon-title`],[1,`summary`],[`target`,`_blank`,`rel`,`noopener noreferrer`,1,`author`,`cta`,3,`href`],[1,`plans-title`],[1,`plans`],[3,`animation-delay`],[`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`],[`id`,`an-hero-grad`,`x1`,`0`,`y1`,`0`,`x2`,`1`,`y2`,`1`],[`offset`,`0`,`stop-color`,`#f0224f`],[`offset`,`1`,`stop-color`,`#c4002d`],[`d`,`M16 0C27.2 0 32 4.8 32 16S27.2 32 16 32 0 27.2 0 16 4.8 0 16 0Z`,`fill`,`url(#an-hero-grad)`],[`transform`,`translate(6.4 6.4) scale(0.8)`,`fill`,`#fff`],[`d`,`M14.8486 0L23.138 16.8551L23.9996 3.99892L14.8486 0Z`],[`d`,`M16.9875 17.7114H7.01272L5.73926 20.627L12.0001 24L18.261 20.627L16.9875 17.7114Z`],[`d`,`M8.72168 13.9298H15.2812L11.9997 6.39575L8.72168 13.9298Z`],[`d`,`M9.15103 0L0 3.99892L0.861556 16.8551L9.15103 0Z`],[`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`],[`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`],[1,`who`],[`aria-hidden`,`true`,1,`go`],[1,`sr-only`]],template:function(e,t){if(e&1&&(H(0,`section`,0)(1,`div`,1),zg(2,`span`,2)(3,`span`,3),H(4,`span`,4),zg(5,`span`,5),U(),H(6,`span`,6),zg(7,`span`,5),U(),H(8,`span`,7),zg(9,`span`,5),U(),H(10,`div`,8),P(11,xq,2,0,`:svg:svg`,9)(12,Sq,11,0,`:svg:svg`,10)(13,Cq,5,0,`:svg:svg`,11)(14,wq,7,0,`:svg:svg`,9),U()(),H(15,`p`,12)(16,`span`,13),J(17,`✦`),U(),J(18),U(),H(19,`h2`,14),J(20),U(),H(21,`p`,15),J(22),U(),P(23,Tq,8,2,`a`,16),H(24,`h3`,17),J(25),U(),H(26,`ul`,18),I(27,Eq,2,3,`li`,19,Og),U()()),e&2){let e,n;M(11),F((e=t.info().id)===`nativescript`?11:e===`angular-native`?12:e===`analog`?13:e===`capacitor`?14:-1),M(7),X(` `,t.info().badge),M(2),Y(t.info().heading),M(2),Y(t.info().summary),M(),F((n=t.info().link)?23:-1,n),M(2),X(` `,t.plansTitle(),` `),M(2),L(t.info().plans)}},styles:[`[_nghost-%COMP%] {
   display: block;
   min-height: 100%;
   background: radial-gradient(60% 50% at 50% 18%, color-mix(in srgb, var(--%NS%brand) 22%, transparent), transparent 70%);
@@ -13265,9 +13539,9 @@ h2[_ngcontent-%COMP%] {
    .author[_ngcontent-%COMP%]:hover   .go[_ngcontent-%COMP%] {
     transform: none;
   }
-}`]})},ZK=new Set([`CapacitorCookies`,`CapacitorHttp`,`SystemBars`,`WebView`]);function QK(e){return e==null?`Unknown`:e?`Yes`:`No`}function $K(e,t){let n=t.size?Math.max(...t.values())+1:0;for(let r of e)t.has(r.pageId)||t.set(r.pageId,n++);let r=new Set(e.map(e=>e.pageId));for(let e of t.keys())r.has(e)||t.delete(e);return[...e].sort((e,n)=>t.get(e.pageId)-t.get(n.pageId))}function eq(e,t){let n=[...e].sort((e,t)=>t.reportedAt-e.reportedAt);return e.find(e=>e.pageId===t)?.pageId??n.find(e=>e.info.bridge)?.pageId??n[0]?.pageId??null}var tq=new WeakMap;function nq(e){let t=e.calls;if(Array.isArray(t))return e;let n=tq.get(e);if(!n){let r=Object.values(t??{}).filter(e=>!!e&&typeof e.id==`number`);n={...e,calls:r.sort((e,t)=>e.id-t.id)},tq.set(e,n)}return n}function rq(e){let t=e?.pages;return!t||typeof t!=`object`?[]:Object.values(t).filter(e=>e&&typeof e.pageId==`string`&&!!e.info).map(nq).sort((e,t)=>t.reportedAt-e.reportedAt)}function iq(e){let t=e.error;return!!t&&(t.code===`UNIMPLEMENTED`||/not implemented/i.test(t.message))}function aq(e,t){return e.durationMs===void 0?e.status===`pending`?Math.max(0,t-e.startedAt):0:e.durationMs}function oq(e,t,n){return t===`failed`?e.status===`error`:t===`pending`?e.status===`pending`:t!==`slow`||aq(e,n)>=500}function sq(e){if(e<1e3)return`${Math.max(0,Math.round(e))} ms`;let t=Math.round(e/1e3);if(t<60)return`${t} s`;let n=Math.round(t/60);return n<60?`${n} min`:`${Math.round(n/60)} h`}function cq(e,t){let n=t-e;return n<1e3?`just now`:`${sq(n)} ago`}function lq(e,t){return ZK.has(e.name)?null:e.registered===!0&&!e.available?t===`android`||t===`ios`?{before:`Not available on ${t}. Run `,command:`npx cap sync ${t}`,after:`, then run the app again.`}:{before:`Not available here. Run `,command:`npx cap sync`,after:` if it should be native.`}:e.native&&e.registered===!1?{before:`Installed, not imported by the app.`}:null}function uq(e,t){let n=e.info,r=n=>e.calls.filter(e=>oq(e,n,t)).length,i=n.env.capacitorHttp;return{pageId:e.pageId,platform:n.platform,native:n.native,logsCalls:n.bridge||n.webCalls,calls:e.calls.length,failed:r(`failed`),slow:r(`slow`),pending:r(`pending`),capacitorHttp:i===null?`Unknown`:i?`On`:`Off`,hints:n.plugins.filter(e=>lq(e,n.platform)).length}}function dq(e){let t=new Map;for(let n of e){if(n.removed)continue;let e=`${n.plugin} ${n.event}`;t.set(e,(t.get(e)??0)+1)}return t}var fq=/^[A-Za-z_$][\w$]*$/;function pq(e,t=``){if(e===void 0)return`undefined`;if(typeof e!=`object`||!e)return JSON.stringify(e)??String(e);let n=`${t}  `;if(Array.isArray(e))return e.length?`[\n${e.map(e=>n+pq(e,n)).join(`,
-`)},\n${t}]`:`[]`;let r=Object.entries(e);return r.length?`{\n${r.map(([e,t])=>`${n}${fq.test(e)?e:JSON.stringify(e)}: ${pq(t,n)}`).join(`,
-`)},\n${t}}`:`{}`}function mq(e){let t=fq.test(e.plugin)?e.plugin:`Capacitor.Plugins[${JSON.stringify(e.plugin)}]`,n=fq.test(e.method)?`.${e.method}`:`[${JSON.stringify(e.method)}]`,r=e.args===void 0?[]:[pq(e.args)];return e.kind===`callback`&&(r.length||r.push(`{}`),r.push(`(result, error) => {}`)),`await ${t}${n}(${r.join(`, `)});`}function hq(e){if(e===void 0)return`undefined`;try{return JSON.stringify(e,null,2)??`undefined`}catch{return String(e)}}function gq(e,t=120){let n;try{n=JSON.stringify(e)??`undefined`}catch{n=String(e)}return n.length>t?`${n.slice(0,t-1)}…`:n}function _q(e,t){if(e&1){let e=W();H(0,`button`,8),n_(`click`,function(){let t=O(e).$implicit;return k(K().tab.set(t))}),J(1),U()}if(e&2){let e=t.$implicit,n=K();Gg(`id`,`cap-tab-`+e),N(`aria-selected`,n.tab()===e)(`aria-controls`,`cap-panel-`+e)(`tabindex`,n.tab()===e?0:-1),M(),X(` `,n.tabLabel(e),` `)}}function vq(e,t){e&1&&(H(0,`p`,9),J(1,`No arguments.`),U())}function yq(e,t){if(e&1&&(H(0,`pre`,10),J(1),U()),e&2){let e=K(2),t=fv(0);M(),Y(e.json(t.args))}}function bq(e,t){e&1&&P(0,vq,2,0,`p`,9)(1,yq,2,1,`pre`,10),e&2&&(K(),F(fv(0).args===void 0?0:1))}function xq(e,t){if(e&1&&(H(0,`code`),J(1),U()),e&2){let e=K();M(),Y(e.code)}}function Sq(e,t){if(e&1&&(H(0,`p`,11),P(1,xq,2,1,`code`),J(2),U()),e&2){let e=t;M(),F(e.code?1:-1),M(),X(` `,e.message,` `)}}function Cq(e,t){e&1&&(H(0,`p`,9),J(1,`No answer yet.`),U())}function wq(e,t){if(e&1&&(H(0,`p`,9),J(1),U()),e&2){K(3);let e=fv(0);M(),X(`The latest of `,e.callbacks,` callbacks.`)}}function Tq(e,t){e&1&&(H(0,`p`,9),J(1,`Resolved without a value.`),U())}function Eq(e,t){if(e&1&&(H(0,`pre`,12),J(1),U()),e&2){let e=K(3),t=fv(0);M(),Y(e.json(t.result))}}function Dq(e,t){if(e&1&&(P(0,wq,2,1,`p`,9),P(1,Tq,2,0,`p`,9)(2,Eq,2,1,`pre`,12)),e&2){K(2);let e=fv(0);F(e.callbacks&&e.callbacks>1?0:-1),M(),F(e.result===void 0?1:2)}}function Oq(e,t){if(e&1&&P(0,Sq,3,2,`p`,11)(1,Cq,2,0,`p`,9)(2,Dq,3,2),e&2){let e;K();let t=fv(0);F((e=t.error)?0:t.status===`pending`?1:2,e)}}function kq(e,t){if(e&1&&(H(0,`div`)(1,`dt`),J(2,`Callbacks`),U(),H(3,`dd`),J(4),U()()),e&2){K(2);let e=fv(0);M(4),Y(e.callbacks??0)}}function Aq(e,t){if(e&1&&(H(0,`dl`)(1,`div`)(2,`dt`),J(3,`Started`),U(),H(4,`dd`),J(5),U()(),H(6,`div`)(7,`dt`),J(8,`Finished`),U(),H(9,`dd`),J(10),U()(),H(11,`div`)(12,`dt`),J(13),U(),H(14,`dd`),J(15),U()(),P(16,kq,5,1,`div`),U()),e&2){let e=K(),t=fv(0);M(5),Y(e.time(t.startedAt)),M(5),X(` `,t.durationMs===void 0?`Not yet`:e.time(t.startedAt+t.durationMs),` `),M(3),Y(t.status===`pending`?`Waiting for`:`Duration`),M(2),Y(e.span(e.took(t,e.now()))),M(),F(t.kind===`callback`?16:-1)}}var jq=[`args`,`outcome`,`timing`],Mq=class e{call=$.required();now=$.required();announce=Iv();host=E(Nl);tab=j(`args`);tabOrder=jq;json=hq;time=$D;span=sq;took=aq;statusText=Q(()=>{let e=this.call();return e.status===`pending`?`Pending`:e.status===`ok`?`OK`:iq(e)?`Not implemented`:`Error`});panelHasFocusable=Q(()=>{let e=this.call();return this.tab()===`args`?e.args!==void 0:this.tab()===`outcome`&&!e.error&&e.status===`ok`&&e.result!==void 0});tabLabel(e){return e===`args`?`Arguments`:e===`timing`?`Timing`:this.call().status===`error`?`Error`:`Result`}onTabKey(e){let t=jq.indexOf(this.tab()),n;if(e.key===`ArrowRight`)n=(t+1)%jq.length;else if(e.key===`ArrowLeft`)n=(t-1+jq.length)%jq.length;else if(e.key===`Home`)n=0;else if(e.key===`End`)n=jq.length-1;else return;e.preventDefault();let r=jq[n];this.tab.set(r),this.host.nativeElement.querySelector(`#cap-tab-${r}`)?.focus()}async copy(e){let t=this.call(),n=`${t.plugin}.${t.method}()`,r=e===`json`?hq(t):mq(t);try{await navigator.clipboard.writeText(r),this.announce.emit(`Copied ${n} as ${e===`json`?`JSON`:`code`}.`)}catch{this.announce.emit(`The clipboard is not available here.`)}}static ɵfac=function(t){return new(t||e)};static ɵcmp=Wh({type:e,selectors:[[`app-capacitor-call-detail`]],inputs:{call:[1,`call`],now:[1,`now`]},outputs:{announce:`announce`},decls:19,vars:10,consts:[[`id`,`cap-detail`,`aria-labelledby`,`cap-detail-title`,1,`detail`],[`id`,`cap-detail-title`],[1,`meta`],[1,`actions`],[`type`,`button`,1,`small`,3,`click`],[`role`,`tablist`,`aria-label`,`Call details`,1,`tabs`,3,`keydown`],[`type`,`button`,`role`,`tab`,3,`id`],[`role`,`tabpanel`,1,`panel`,3,`id`],[`type`,`button`,`role`,`tab`,3,`click`,`id`],[1,`muted`],[`tabindex`,`0`,`aria-label`,`Arguments`],[1,`error-text`],[`tabindex`,`0`,`aria-label`,`Result`]],template:function(e,t){if(e&1&&(uv(0),H(1,`section`,0)(2,`h3`,1)(3,`code`),J(4),U()(),H(5,`p`,2),J(6),U(),H(7,`div`,3)(8,`button`,4),n_(`click`,function(){return t.copy(`json`)}),J(9,`Copy as JSON`),U(),H(10,`button`,4),n_(`click`,function(){return t.copy(`code`)}),J(11,`Copy as code`),U()(),H(12,`div`,5),n_(`keydown`,function(e){return t.onTabKey(e)}),I(13,_q,2,5,`button`,6,Og),U(),H(15,`div`,7),P(16,bq,2,1)(17,Oq,3,1)(18,Aq,17,5,`dl`),U()()),e&2){let e,n=dv(t.call());M(4),Z(``,n.plugin,`.`,n.method,`()`),M(2),rv(` `,t.statusText(),`, `,n.via,`, `,n.kind===`callback`?`stream`:`promise`,` `),M(7),L(t.tabOrder),M(2),Gg(`id`,`cap-panel-`+t.tab()),N(`aria-labelledby`,`cap-tab-`+t.tab())(`tabindex`,t.panelHasFocusable()?null:0),M(),F((e=t.tab())===`args`?16:e===`outcome`?17:e===`timing`?18:-1)}},styles:[`.detail[_ngcontent-%COMP%] {
+}`]})},Oq=new Set([`CapacitorCookies`,`CapacitorHttp`,`SystemBars`,`WebView`]);function kq(e){return e==null?`Unknown`:e?`Yes`:`No`}function Aq(e,t){let n=t.size?Math.max(...t.values())+1:0;for(let r of e)t.has(r.pageId)||t.set(r.pageId,n++);let r=new Set(e.map(e=>e.pageId));for(let e of t.keys())r.has(e)||t.delete(e);return[...e].sort((e,n)=>t.get(e.pageId)-t.get(n.pageId))}function jq(e,t){let n=[...e].sort((e,t)=>t.reportedAt-e.reportedAt);return e.find(e=>e.pageId===t)?.pageId??n.find(e=>e.info.bridge)?.pageId??n[0]?.pageId??null}var Mq=new WeakMap;function Nq(e){let t=e.calls;if(Array.isArray(t))return e;let n=Mq.get(e);if(!n){let r=Object.values(t??{}).filter(e=>!!e&&typeof e.id==`number`);n={...e,calls:r.sort((e,t)=>e.id-t.id)},Mq.set(e,n)}return n}function Pq(e){let t=e?.pages;return!t||typeof t!=`object`?[]:Object.values(t).filter(e=>e&&typeof e.pageId==`string`&&!!e.info).map(Nq).sort((e,t)=>t.reportedAt-e.reportedAt)}function Fq(e){let t=e.error;return!!t&&(t.code===`UNIMPLEMENTED`||/not implemented/i.test(t.message))}function Iq(e,t){return e.durationMs===void 0?e.status===`pending`?Math.max(0,t-e.startedAt):0:e.durationMs}function Lq(e,t,n){return t===`failed`?e.status===`error`:t===`pending`?e.status===`pending`:t!==`slow`||Iq(e,n)>=500}function Rq(e){if(e<1e3)return`${Math.max(0,Math.round(e))} ms`;let t=Math.round(e/1e3);if(t<60)return`${t} s`;let n=Math.round(t/60);return n<60?`${n} min`:`${Math.round(n/60)} h`}function zq(e,t){let n=t-e;return n<1e3?`just now`:`${Rq(n)} ago`}function Bq(e,t){return Oq.has(e.name)?null:e.registered===!0&&!e.available?t===`android`||t===`ios`?{before:`Not available on ${t}. Run `,command:`npx cap sync ${t}`,after:`, then run the app again.`}:{before:`Not available here. Run `,command:`npx cap sync`,after:` if it should be native.`}:e.native&&e.registered===!1?{before:`Installed, not imported by the app.`}:null}function Vq(e,t){let n=e.info,r=n=>e.calls.filter(e=>Lq(e,n,t)).length,i=n.env.capacitorHttp;return{pageId:e.pageId,platform:n.platform,native:n.native,logsCalls:n.bridge||n.webCalls,calls:e.calls.length,failed:r(`failed`),slow:r(`slow`),pending:r(`pending`),capacitorHttp:i===null?`Unknown`:i?`On`:`Off`,hints:n.plugins.filter(e=>Bq(e,n.platform)).length}}function Hq(e){let t=new Map;for(let n of e){if(n.removed)continue;let e=`${n.plugin} ${n.event}`;t.set(e,(t.get(e)??0)+1)}return t}var Uq=/^[A-Za-z_$][\w$]*$/;function Wq(e,t=``){if(e===void 0)return`undefined`;if(typeof e!=`object`||!e)return JSON.stringify(e)??String(e);let n=`${t}  `;if(Array.isArray(e))return e.length?`[\n${e.map(e=>n+Wq(e,n)).join(`,
+`)},\n${t}]`:`[]`;let r=Object.entries(e);return r.length?`{\n${r.map(([e,t])=>`${n}${Uq.test(e)?e:JSON.stringify(e)}: ${Wq(t,n)}`).join(`,
+`)},\n${t}}`:`{}`}function Gq(e){let t=Uq.test(e.plugin)?e.plugin:`Capacitor.Plugins[${JSON.stringify(e.plugin)}]`,n=Uq.test(e.method)?`.${e.method}`:`[${JSON.stringify(e.method)}]`,r=e.args===void 0?[]:[Wq(e.args)];return e.kind===`callback`&&(r.length||r.push(`{}`),r.push(`(result, error) => {}`)),`await ${t}${n}(${r.join(`, `)});`}function Kq(e){if(e===void 0)return`undefined`;try{return JSON.stringify(e,null,2)??`undefined`}catch{return String(e)}}function qq(e,t=120){let n;try{n=JSON.stringify(e)??`undefined`}catch{n=String(e)}return n.length>t?`${n.slice(0,t-1)}…`:n}function Jq(e,t){if(e&1){let e=W();H(0,`button`,8),n_(`click`,function(){let t=O(e).$implicit;return k(K().tab.set(t))}),J(1),U()}if(e&2){let e=t.$implicit,n=K();Gg(`id`,`cap-tab-`+e),N(`aria-selected`,n.tab()===e)(`aria-controls`,`cap-panel-`+e)(`tabindex`,n.tab()===e?0:-1),M(),X(` `,n.tabLabel(e),` `)}}function Yq(e,t){e&1&&(H(0,`p`,9),J(1,`No arguments.`),U())}function Xq(e,t){if(e&1&&(H(0,`pre`,10),J(1),U()),e&2){let e=K(2),t=fv(0);M(),Y(e.json(t.args))}}function Zq(e,t){e&1&&P(0,Yq,2,0,`p`,9)(1,Xq,2,1,`pre`,10),e&2&&(K(),F(fv(0).args===void 0?0:1))}function Qq(e,t){if(e&1&&(H(0,`code`),J(1),U()),e&2){let e=K();M(),Y(e.code)}}function $q(e,t){if(e&1&&(H(0,`p`,11),P(1,Qq,2,1,`code`),J(2),U()),e&2){let e=t;M(),F(e.code?1:-1),M(),X(` `,e.message,` `)}}function eJ(e,t){e&1&&(H(0,`p`,9),J(1,`No answer yet.`),U())}function tJ(e,t){if(e&1&&(H(0,`p`,9),J(1),U()),e&2){K(3);let e=fv(0);M(),X(`The latest of `,e.callbacks,` callbacks.`)}}function nJ(e,t){e&1&&(H(0,`p`,9),J(1,`Resolved without a value.`),U())}function rJ(e,t){if(e&1&&(H(0,`pre`,12),J(1),U()),e&2){let e=K(3),t=fv(0);M(),Y(e.json(t.result))}}function iJ(e,t){if(e&1&&(P(0,tJ,2,1,`p`,9),P(1,nJ,2,0,`p`,9)(2,rJ,2,1,`pre`,12)),e&2){K(2);let e=fv(0);F(e.callbacks&&e.callbacks>1?0:-1),M(),F(e.result===void 0?1:2)}}function aJ(e,t){if(e&1&&P(0,$q,3,2,`p`,11)(1,eJ,2,0,`p`,9)(2,iJ,3,2),e&2){let e;K();let t=fv(0);F((e=t.error)?0:t.status===`pending`?1:2,e)}}function oJ(e,t){if(e&1&&(H(0,`div`)(1,`dt`),J(2,`Callbacks`),U(),H(3,`dd`),J(4),U()()),e&2){K(2);let e=fv(0);M(4),Y(e.callbacks??0)}}function sJ(e,t){if(e&1&&(H(0,`dl`)(1,`div`)(2,`dt`),J(3,`Started`),U(),H(4,`dd`),J(5),U()(),H(6,`div`)(7,`dt`),J(8,`Finished`),U(),H(9,`dd`),J(10),U()(),H(11,`div`)(12,`dt`),J(13),U(),H(14,`dd`),J(15),U()(),P(16,oJ,5,1,`div`),U()),e&2){let e=K(),t=fv(0);M(5),Y(e.time(t.startedAt)),M(5),X(` `,t.durationMs===void 0?`Not yet`:e.time(t.startedAt+t.durationMs),` `),M(3),Y(t.status===`pending`?`Waiting for`:`Duration`),M(2),Y(e.span(e.took(t,e.now()))),M(),F(t.kind===`callback`?16:-1)}}var cJ=[`args`,`outcome`,`timing`],lJ=class e{call=$.required();now=$.required();announce=Rv();host=E(Nl);tab=j(`args`);tabOrder=cJ;json=Kq;time=tO;span=Rq;took=Iq;statusText=Q(()=>{let e=this.call();return e.status===`pending`?`Pending`:e.status===`ok`?`OK`:Fq(e)?`Not implemented`:`Error`});panelHasFocusable=Q(()=>{let e=this.call();return this.tab()===`args`?e.args!==void 0:this.tab()===`outcome`&&!e.error&&e.status===`ok`&&e.result!==void 0});tabLabel(e){return e===`args`?`Arguments`:e===`timing`?`Timing`:this.call().status===`error`?`Error`:`Result`}onTabKey(e){let t=cJ.indexOf(this.tab()),n;if(e.key===`ArrowRight`)n=(t+1)%cJ.length;else if(e.key===`ArrowLeft`)n=(t-1+cJ.length)%cJ.length;else if(e.key===`Home`)n=0;else if(e.key===`End`)n=cJ.length-1;else return;e.preventDefault();let r=cJ[n];this.tab.set(r),this.host.nativeElement.querySelector(`#cap-tab-${r}`)?.focus()}async copy(e){let t=this.call(),n=`${t.plugin}.${t.method}()`,r=e===`json`?Kq(t):Gq(t);try{await navigator.clipboard.writeText(r),this.announce.emit(`Copied ${n} as ${e===`json`?`JSON`:`code`}.`)}catch{this.announce.emit(`The clipboard is not available here.`)}}static ɵfac=function(t){return new(t||e)};static ɵcmp=Wh({type:e,selectors:[[`app-capacitor-call-detail`]],inputs:{call:[1,`call`],now:[1,`now`]},outputs:{announce:`announce`},decls:19,vars:10,consts:[[`id`,`cap-detail`,`aria-labelledby`,`cap-detail-title`,1,`detail`],[`id`,`cap-detail-title`],[1,`meta`],[1,`actions`],[`type`,`button`,1,`small`,3,`click`],[`role`,`tablist`,`aria-label`,`Call details`,1,`tabs`,3,`keydown`],[`type`,`button`,`role`,`tab`,3,`id`],[`role`,`tabpanel`,1,`panel`,3,`id`],[`type`,`button`,`role`,`tab`,3,`click`,`id`],[1,`muted`],[`tabindex`,`0`,`aria-label`,`Arguments`],[1,`error-text`],[`tabindex`,`0`,`aria-label`,`Result`]],template:function(e,t){if(e&1&&(uv(0),H(1,`section`,0)(2,`h3`,1)(3,`code`),J(4),U()(),H(5,`p`,2),J(6),U(),H(7,`div`,3)(8,`button`,4),n_(`click`,function(){return t.copy(`json`)}),J(9,`Copy as JSON`),U(),H(10,`button`,4),n_(`click`,function(){return t.copy(`code`)}),J(11,`Copy as code`),U()(),H(12,`div`,5),n_(`keydown`,function(e){return t.onTabKey(e)}),I(13,Jq,2,5,`button`,6,Og),U(),H(15,`div`,7),P(16,Zq,2,1)(17,aJ,3,1)(18,sJ,17,5,`dl`),U()()),e&2){let e,n=dv(t.call());M(4),Z(``,n.plugin,`.`,n.method,`()`),M(2),rv(` `,t.statusText(),`, `,n.via,`, `,n.kind===`callback`?`stream`:`promise`,` `),M(7),L(t.tabOrder),M(2),Gg(`id`,`cap-panel-`+t.tab()),N(`aria-labelledby`,`cap-tab-`+t.tab())(`tabindex`,t.panelHasFocusable()?null:0),M(),F((e=t.tab())===`args`?16:e===`outcome`?17:e===`timing`?18:-1)}},styles:[`.detail[_ngcontent-%COMP%] {
   border: 1px solid var(--%NS%border);
   border-radius: var(--%NS%radius);
   background: var(--%NS%surface);
@@ -13420,7 +13694,7 @@ dd[_ngcontent-%COMP%] {
   margin: 0;
   color: var(--%NS%text);
   font-variant-numeric: tabular-nums;
-}`]})},Nq=(e,t)=>t.plugin,Pq=(e,t)=>t.label;function Fq(e,t){if(e&1&&(H(0,`span`,5),J(1),U(),J(2,` `),H(3,`span`,6),J(4,`from `),H(5,`code`),J(6),U(),J(7),U()),e&2){let e=K().$implicit,t=K(2);M(),Y(e.value),M(5),Y(e.from),M(),X(`, `,t.ago(e.at,t.now()))}}function Iq(e,t){e&1&&(H(0,`span`,4),J(1,`Not reported yet`),U())}function Lq(e,t){if(e&1&&(H(0,`div`)(1,`dt`),J(2),U(),H(3,`dd`),P(4,Fq,8,3)(5,Iq,2,0,`span`,4),U()()),e&2){let e=t.$implicit;M(2),Y(e.label),M(2),F(e.value===null?5:4)}}function Rq(e,t){if(e&1&&(H(0,`article`,2)(1,`h3`,3)(2,`code`),J(3),U()(),H(4,`dl`),I(5,Lq,6,2,`div`,null,Pq),U()()),e&2){let e=t.$implicit;N(`aria-labelledby`,`cap-state-`+e.plugin),M(),Gg(`id`,`cap-state-`+e.plugin),M(2),Y(e.plugin),M(2),L(e.fields)}}function zq(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function Bq(e,t=e=>e){return n=>{let r=zq(n)?n[e]:void 0;return typeof r==`string`||typeof r==`number`||typeof r==`boolean`?t(String(r)):null}}function Vq(e,t,n){return[...e.map(e=>({method:e,read:n})),...t.map(e=>({event:e,read:n}))]}var Hq=[{plugin:`Foldable`,fields:[{label:`Fold state`,sources:Vq([`getFoldState`],[`foldStateChange`],Bq(`state`))},{label:`Posture`,sources:Vq([`getFoldState`],[`foldStateChange`],Bq(`posture`))},{label:`Hinge orientation`,sources:Vq([`getFoldState`],[`foldStateChange`],Bq(`hingeOrientation`))},{label:`Hinge angle`,sources:Vq([`getHingeAngle`],[`hingeAngleChange`],Bq(`angle`,e=>`${e}°`))},{label:`Active display`,sources:Vq([`getFoldState`],[`foldStateChange`],Bq(`activeDisplay`))},{label:`Size class`,sources:Vq([`getSizeClass`],[`sizeClassChange`],e=>{let t=Bq(`widthClass`)(e),n=Bq(`heightClass`)(e);return!t&&!n?null:[t&&`width ${t}`,n&&`height ${n}`].filter(Boolean).join(`, `)})}]}];function Uq(e,t,n){let r=null,i=(e,t,i)=>{if(r&&r.at>=i)return;let a=n.read(e);a!==null&&(r={value:a,from:t,at:i})};if(`method`in n)for(let r of e.calls)r.plugin===t&&r.method===n.method&&r.status===`ok`&&i(r.result,`${n.method}()`,r.startedAt+(r.durationMs??0));else for(let r of e.listeners)r.plugin===t&&r.event===n.event&&r.lastEventAt!==void 0&&r.last!==void 0&&i(r.last,n.event,r.lastEventAt);return r}function Wq(e,t=Hq){let n=new Set(e.info.plugins.map(e=>e.name));return t.filter(e=>n.has(e.plugin)).map(t=>({plugin:t.plugin,fields:t.fields.map(n=>{let r=null;for(let i of n.sources){let n=Uq(e,t.plugin,i);n&&(!r||n.at>r.at)&&(r=n)}let i=r;return{label:n.label,value:i?.value??null,from:i?.from??null,at:i?.at??null}})}))}var Gq=class e{cards=$.required();now=$.required();ago=cq;static ɵfac=function(t){return new(t||e)};static ɵcmp=Wh({type:e,selectors:[[`app-capacitor-state`]],inputs:{cards:[1,`cards`],now:[1,`now`]},decls:5,vars:0,consts:[[1,`lead`],[1,`cards`],[1,`card`],[3,`id`],[1,`missing`],[1,`value`],[1,`source`]],template:function(e,t){e&1&&(H(0,`p`,0),J(1,` Read from the results and events the app already received. The panel calls nothing in the app. `),U(),H(2,`div`,1),I(3,Rq,7,3,`article`,2,Nq),U()),e&2&&(M(3),L(t.cards()))},styles:[`[_nghost-%COMP%] {
+}`]})},uJ=(e,t)=>t.plugin,dJ=(e,t)=>t.label;function fJ(e,t){if(e&1&&(H(0,`span`,5),J(1),U(),J(2,` `),H(3,`span`,6),J(4,`from `),H(5,`code`),J(6),U(),J(7),U()),e&2){let e=K().$implicit,t=K(2);M(),Y(e.value),M(5),Y(e.from),M(),X(`, `,t.ago(e.at,t.now()))}}function pJ(e,t){e&1&&(H(0,`span`,4),J(1,`Not reported yet`),U())}function mJ(e,t){if(e&1&&(H(0,`div`)(1,`dt`),J(2),U(),H(3,`dd`),P(4,fJ,8,3)(5,pJ,2,0,`span`,4),U()()),e&2){let e=t.$implicit;M(2),Y(e.label),M(2),F(e.value===null?5:4)}}function hJ(e,t){if(e&1&&(H(0,`article`,2)(1,`h3`,3)(2,`code`),J(3),U()(),H(4,`dl`),I(5,mJ,6,2,`div`,null,dJ),U()()),e&2){let e=t.$implicit;N(`aria-labelledby`,`cap-state-`+e.plugin),M(),Gg(`id`,`cap-state-`+e.plugin),M(2),Y(e.plugin),M(2),L(e.fields)}}function gJ(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function _J(e,t=e=>e){return n=>{let r=gJ(n)?n[e]:void 0;return typeof r==`string`||typeof r==`number`||typeof r==`boolean`?t(String(r)):null}}function vJ(e,t,n){return[...e.map(e=>({method:e,read:n})),...t.map(e=>({event:e,read:n}))]}var yJ=[{plugin:`Foldable`,fields:[{label:`Fold state`,sources:vJ([`getFoldState`],[`foldStateChange`],_J(`state`))},{label:`Posture`,sources:vJ([`getFoldState`],[`foldStateChange`],_J(`posture`))},{label:`Hinge orientation`,sources:vJ([`getFoldState`],[`foldStateChange`],_J(`hingeOrientation`))},{label:`Hinge angle`,sources:vJ([`getHingeAngle`],[`hingeAngleChange`],_J(`angle`,e=>`${e}°`))},{label:`Active display`,sources:vJ([`getFoldState`],[`foldStateChange`],_J(`activeDisplay`))},{label:`Size class`,sources:vJ([`getSizeClass`],[`sizeClassChange`],e=>{let t=_J(`widthClass`)(e),n=_J(`heightClass`)(e);return!t&&!n?null:[t&&`width ${t}`,n&&`height ${n}`].filter(Boolean).join(`, `)})}]}];function bJ(e,t,n){let r=null,i=(e,t,i)=>{if(r&&r.at>=i)return;let a=n.read(e);a!==null&&(r={value:a,from:t,at:i})};if(`method`in n)for(let r of e.calls)r.plugin===t&&r.method===n.method&&r.status===`ok`&&i(r.result,`${n.method}()`,r.startedAt+(r.durationMs??0));else for(let r of e.listeners)r.plugin===t&&r.event===n.event&&r.lastEventAt!==void 0&&r.last!==void 0&&i(r.last,n.event,r.lastEventAt);return r}function xJ(e,t=yJ){let n=new Set(e.info.plugins.map(e=>e.name));return t.filter(e=>n.has(e.plugin)).map(t=>({plugin:t.plugin,fields:t.fields.map(n=>{let r=null;for(let i of n.sources){let n=bJ(e,t.plugin,i);n&&(!r||n.at>r.at)&&(r=n)}let i=r;return{label:n.label,value:i?.value??null,from:i?.from??null,at:i?.at??null}})}))}var SJ=class e{cards=$.required();now=$.required();ago=zq;static ɵfac=function(t){return new(t||e)};static ɵcmp=Wh({type:e,selectors:[[`app-capacitor-state`]],inputs:{cards:[1,`cards`],now:[1,`now`]},decls:5,vars:0,consts:[[1,`lead`],[1,`cards`],[1,`card`],[3,`id`],[1,`missing`],[1,`value`],[1,`source`]],template:function(e,t){e&1&&(H(0,`p`,0),J(1,` Read from the results and events the app already received. The panel calls nothing in the app. `),U(),H(2,`div`,1),I(3,hJ,7,3,`article`,2,uJ),U()),e&2&&(M(3),L(t.cards()))},styles:[`[_nghost-%COMP%] {
   display: block;
 }
 
@@ -13496,7 +13770,7 @@ dd[_ngcontent-%COMP%] {
 
 .missing[_ngcontent-%COMP%] {
   font-style: italic;
-}`]})},Kq=(e,t)=>t.filter,qq=(e,t)=>t.id,Jq=(e,t)=>t.name;function Yq(e,t){e&1&&(z(0,`p`,1),J(1,`Loading Capacitor data…`),B())}function Xq(e,t){if(e&1){let e=W();z(0,`div`,2)(1,`p`),J(2,`Can't read the Capacitor data from the devtools server.`),B(),z(3,`button`,3),G(`click`,function(){return O(e),k(K().retry())}),J(4,`Retry`),B()()}}function Zq(e,t){if(e&1){let e=W();z(0,`button`,27),G(`click`,function(){let t=O(e).$implicit;return k(K(4).pickFilter(t.filter))}),z(1,`span`,24),J(2),B(),J(3,` `),z(4,`span`,25),J(5),B()()}if(e&2){let e=t.$implicit,n=K(4);N(`data-filter`,e.filter)(`aria-pressed`,n.callFilter()===e.filter),M(2),Y(e.label),M(3),Y(e.count)}}function Qq(e,t){if(e&1&&I(0,Zq,6,4,`button`,26,Kq),e&2){let e=K();L(K(2).callStats(e))}}function $q(e,t){if(e&1&&(z(0,`span`,23)(1,`span`,24),J(2,`Platform`),B(),J(3,` `),z(4,`span`,25)(5,`code`),J(6),B(),J(7),B()(),P(8,Qq,2,0),z(9,`span`,23)(10,`span`,24),J(11,`CapacitorHttp`),B(),J(12,` `),z(13,`span`,25),J(14),B()(),z(15,`span`,23)(16,`span`,24),J(17,`Plugin hints`),B(),J(18,` `),z(19,`span`,25),J(20),B()()),e&2){let e=t;M(6),Y(e.platform),M(),X(` `,e.native?`native`:`web`),M(),F(e.logsCalls?8:-1),M(6),Y(e.capacitorHttp),M(6),Y(e.hints)}}function eJ(e,t){if(e&1){let e=W();z(0,`div`,10)(1,`span`,28),J(2,`Page`),B(),z(3,`app-select`,29),G(`valueChange`,function(t){return O(e),k(K(2).selectedPageId.set(t))}),B()()}if(e&2){let e=K(),t=K();M(3),R(`options`,t.pageOptions())(`value`,e.pageId)}}function tJ(e,t){if(e&1&&(z(0,`section`,12)(1,`h2`,30),J(2,`Plugin state`),B(),V(3,`app-capacitor-state`,31),B()),e&2){let e=K(2);M(3),R(`cards`,e.stateCards())(`now`,e.now())}}function nJ(e,t){if(e&1&&(z(0,`p`,15),J(1,` Plugin calls aren't shown on this page. Native calls are logged on iOS and Android, where plugins go through the native bridge. To log calls a web implementation answers, load `),z(2,`code`),J(3,`@pangular-inspector/devtools/capacitor-hook`),B(),J(4,` before `),z(5,`code`),J(6,`@capacitor/core`),B(),J(7,`. `),z(8,`a`,32),J(9,`How to log web calls`),z(10,`span`,6),J(11,` (opens in a new tab)`),B()()()),e&2){let e=K(2);M(8),R(`href`,e.guideUrl,Au)}}function rJ(e,t){if(e&1&&(z(0,`p`,15),J(1,` Only native calls are logged. Calls a web implementation answers are left out. `),z(2,`a`,32),J(3,`How to log them too`),z(4,`span`,6),J(5,` (opens in a new tab)`),B()()()),e&2){let e=K(3);M(2),R(`href`,e.guideUrl,Au)}}function iJ(e,t){e&1&&(z(0,`p`,18),J(1,`No plugin calls yet. Use the app and they show up here.`),B())}function aJ(e,t){if(e&1){let e=W();z(0,`div`,18)(1,`p`),J(2,`No call matches the filters.`),B(),z(3,`p`,43),J(4),B(),z(5,`button`,3),G(`click`,function(){O(e),K();let t=u_(7);return K(2).clearFilters(),k(t.focus())}),J(6,` Clear filters `),B()()}if(e&2){let e=K(2),t=K();M(4),rv(` `,e.calls.length,` `,e.calls.length===1?`call is`:`calls are`,` hidden by `,t.hiddenBy(),`. `)}}function oJ(e,t){e&1&&(A(),V(0,`path`,50))}function sJ(e,t){e&1&&(A(),V(0,`circle`,55)(1,`path`,56))}function cJ(e,t){e&1&&(A(),V(0,`circle`,55)(1,`path`,57))}function lJ(e,t){e&1&&(A(),V(0,`circle`,55)(1,`path`,58))}function uJ(e,t){e&1&&(z(0,`span`,51),J(1,`stream`),B())}function dJ(e,t){if(e&1){let e=W();z(0,`li`)(1,`button`,46),G(`focus`,function(){let t=O(e).$implicit;return k(K(4).focusedCallId.set(t.id))})(`click`,function(){let t=O(e).$implicit;return k(K(4).select(t.id))}),z(2,`code`,47),J(3),B(),z(4,`span`,48),A(),z(5,`svg`,49),P(6,oJ,1,0,`:svg:path`,50)(7,sJ,2,0)(8,cJ,2,0)(9,lJ,2,0),B(),J(10),B(),P(11,uJ,2,0,`span`,51),ms(),z(12,`span`,52)(13,`span`,53),V(14,`span`),B(),J(15),B(),z(16,`span`,51),J(17),B(),z(18,`time`,54),J(19),B()()()}if(e&2){let e,n=t.$implicit,r=K(4);M(),q(`selected`,r.selected()?.id===n.id),N(`aria-pressed`,r.selected()?.id===n.id)(`tabindex`,r.tabStop()===n.id?0:-1),M(2),Z(``,n.plugin,`.`,n.method,`()`),M(),N(`data-tone`,r.tone(n)),M(2),F((e=r.tone(n))===`ok`?6:e===`danger`?7:e===`warn`?8:9),M(4),X(` `,r.statusLabel(n),` `),M(),F(n.kind===`callback`?11:-1),M(3),j_(`width`,r.barWidth(n),`%`),M(),X(` `,r.durationText(n),` `),M(2),Y(n.via),M(2),Y(r.time(n.startedAt))}}function fJ(e,t){if(e&1){let e=W();z(0,`app-capacitor-call-detail`,59),G(`announce`,function(t){return O(e),k(K(4).announce(t))}),B()}if(e&2){let e=K(4);R(`call`,t)(`now`,e.now())}}function pJ(e,t){if(e&1){let e=W();z(0,`div`,42)(1,`ol`,44),G(`keydown`,function(t){return O(e),k(K(3).onListKey(t))}),I(2,dJ,20,15,`li`,null,qq),B(),P(4,fJ,1,2,`app-capacitor-call-detail`,45),B()}if(e&2){let e,t=K(3);M(2),L(t.shownCalls()),M(2),F((e=t.selected())?4:-1,e)}}function mJ(e,t){if(e&1){let e=W();P(0,rJ,6,1,`p`,15),z(1,`div`,33)(2,`div`,34),A(),z(3,`svg`,35),V(4,`circle`,36)(5,`path`,37),B(),ms(),z(6,`input`,38,0),G(`input`,function(t){return O(e),k(K(2).setSearch(t.target.value))})(`keydown.escape`,function(){return O(e),k(K(2).setSearch(``))}),B()(),z(8,`app-select`,39),G(`valueChange`,function(t){return O(e),k(K(2).setFilter(t))}),B(),z(9,`span`,40),J(10),B()(),V(11,`app-limit-note`,41),P(12,iJ,2,0,`p`,18)(13,aJ,7,3,`div`,18)(14,pJ,5,1,`div`,42)}if(e&2){let e=K(),t=K();F(e.info.webCalls?-1:0),M(6),R(`value`,t.filter()),M(2),R(`options`,t.filterOptions)(`value`,t.callFilter()),M(2),Z(``,t.shownCalls().length,` of `,e.calls.length,` calls`),M(),R(`dropped`,e.dropped)(`max`,t.maxCalls()),M(),F(e.calls.length?t.shownCalls().length?14:13:12)}}function hJ(e,t){e&1&&(z(0,`p`,18),J(1,`No plugins are registered or installed.`),B())}function gJ(e,t){if(e&1&&(z(0,`code`),J(1),B()),e&2){let e=K();M(),Y(e.command)}}function _J(e,t){if(e&1){let e=W();z(0,`button`,65),G(`click`,function(){O(e);let t=K();return k(K(4).copyCommand(t.command))}),J(1,` Copy `),B()}e&2&&N(`aria-label`,`Copy `+K().command)}function vJ(e,t){if(e&1&&(z(0,`span`,63),J(1),P(2,gJ,2,1,`code`),J(3),B(),P(4,_J,2,1,`button`,64)),e&2){let e=t;M(),Y(e.before),M(),F(e.command?2:-1),M(),Y(e.after),M(),F(e.command?4:-1)}}function yJ(e,t){if(e&1&&(z(0,`tr`)(1,`th`,61)(2,`code`),J(3),B()(),z(4,`td`),J(5),B(),z(6,`td`),J(7),B(),z(8,`td`),J(9),B(),z(10,`td`,62),P(11,vJ,5,4),B()()),e&2){let e,n=t.$implicit,r=K(2),i=K();M(3),Y(n.name),M(2),Y(n.available?`Yes`:`No`),M(2),Y(i.yesNo(n.registered)),M(2),Y(n.native?`Yes`:`No`),M(2),F((e=i.pluginHint(n,r.info.platform))?11:-1,e)}}function bJ(e,t){if(e&1&&(z(0,`div`,19)(1,`table`)(2,`thead`)(3,`tr`)(4,`th`,60),J(5,`Plugin`),B(),z(6,`th`,60),J(7,`Available`),B(),z(8,`th`,60),J(9,`Imported`),B(),z(10,`th`,60),J(11,`Native`),B(),z(12,`th`,60),J(13,`Note`),B()()(),z(14,`tbody`),I(15,yJ,12,5,`tr`,null,Jq),B()()()),e&2){let e=K();M(15),L(e.info.plugins)}}function xJ(e,t){e&1&&(z(0,`p`,18),J(1,`No plugin listeners. They show up when the app calls addListener.`),B())}function SJ(e,t){if(e&1&&(z(0,`code`,68),J(1),B()),e&2){let e=K(2).$implicit,t=K(3);M(),Y(t.preview(e.last))}}function CJ(e,t){e&1&&(z(0,`span`,68),J(1,`No data`),B())}function wJ(e,t){if(e&1&&(P(0,SJ,2,1,`code`,68)(1,CJ,2,0,`span`,68),z(2,`span`,43),J(3),B()),e&2){let e=K().$implicit,t=K(3);F(+(e.last===void 0)),M(3),X(`at `,t.time(e.lastEventAt))}}function TJ(e,t){e&1&&J(0,` None yet `)}function EJ(e,t){if(e&1&&(z(0,`span`,67),A(),z(1,`svg`,49),V(2,`path`,69)(3,`path`,70),B(),J(4),B()),e&2){let e=K().$implicit,t=K(3);M(4),X(` `,t.leakCount(e),` active listeners: possible leak `)}}function DJ(e,t){if(e&1&&(z(0,`tr`)(1,`th`,61)(2,`code`),J(3),B()(),z(4,`td`)(5,`code`),J(6),B()(),z(7,`td`),J(8),B(),z(9,`td`,66),P(10,wJ,4,2)(11,TJ,1,0),B(),z(12,`td`),J(13),P(14,EJ,5,1,`span`,67),B()()),e&2){let e=t.$implicit,n=K(3);M(3),Y(e.plugin),M(3),Y(e.event),M(2),Y(e.events),M(2),F(e.lastEventAt?10:11),M(3),X(` `,e.removed?`Removed`:`Active`,` `),M(),F(!e.removed&&n.leakCount(e)>1?14:-1)}}function OJ(e,t){if(e&1&&(z(0,`div`,22)(1,`table`)(2,`thead`)(3,`tr`)(4,`th`,60),J(5,`Plugin`),B(),z(6,`th`,60),J(7,`Event`),B(),z(8,`th`,60),J(9,`Events`),B(),z(10,`th`,60),J(11,`Last event`),B(),z(12,`th`,60),J(13,`State`),B()()(),z(14,`tbody`),I(15,DJ,15,6,`tr`,null,qq),B()()()),e&2){let e=K();M(15),L(e.listeners)}}function kJ(e,t){if(e&1&&(z(0,`p`,4),J(1,` Plugin calls, plugins and listeners of a Capacitor app, as its WebView reports them. Values are masked like other live data. `),B(),z(2,`div`,5),P(3,$q,21,5),z(4,`span`,6),J(5),B()(),z(6,`section`,7)(7,`div`,8)(8,`h2`,9),J(9,`Environment`),B(),P(10,eJ,4,2,`div`,10),B(),z(11,`dl`)(12,`div`)(13,`dt`),J(14,`Platform`),B(),z(15,`dd`)(16,`code`),J(17),B(),J(18),B()(),z(19,`div`)(20,`dt`),J(21,`Server URL`),B(),z(22,`dd`)(23,`code`),J(24),B()()(),z(25,`div`)(26,`dt`),J(27,`CapacitorHttp`),B(),z(28,`dd`),J(29),B()(),z(30,`div`)(31,`dt`),J(32,`Calls logged`),B(),z(33,`dd`),J(34),B()(),z(35,`div`,11)(36,`dt`),J(37,`User agent`),B(),z(38,`dd`)(39,`code`),J(40),B()()()()(),P(41,tJ,4,2,`section`,12),z(42,`section`,13)(43,`h2`,14),J(44,`Plugin calls`),B(),P(45,nJ,12,1,`p`,15)(46,mJ,15,9),B(),z(47,`section`,16)(48,`h2`,17),J(49,`Plugins`),B(),P(50,hJ,2,0,`p`,18)(51,bJ,17,0,`div`,19),B(),z(52,`section`,20)(53,`h2`,21),J(54,`Listeners`),B(),P(55,xJ,2,0,`p`,18)(56,OJ,17,0,`div`,22),B()),e&2){let e,n=t,r=K();M(3),F((e=r.summary())?3:-1,e),M(2),Y(r.message()),M(5),F(r.pageOptions().length>1?10:-1),M(7),Y(n.info.platform),M(),X(` (`,n.info.native?`native`:`web`,`) `),M(6),Y(n.info.env.serverUrl||`none`),M(5),X(` `,n.info.env.capacitorHttp===null?`Unknown`:n.info.env.capacitorHttp?`On`:`Off`,` `),M(5),Y(r.loggedLabel()),M(6),Y(n.info.env.userAgent||`unknown`),M(),F(r.stateCards().length?41:-1),M(4),F(!n.info.bridge&&!n.info.webCalls?45:46),M(5),F(n.info.plugins.length?51:50),M(5),F(n.listeners.length?56:55)}}function AJ(e,t){e&1&&(z(0,`p`,1),J(1,` No Capacitor app reports to this server. Start the overlay in the app, then use it. `),B())}var jJ=`https://pangular-inspector.dev/inspectors/capacitor/#web-calls`,MJ=2e3,NJ={all:`All calls`,failed:`Failed`,slow:`Slow (500 ms or more)`,pending:`Pending`},PJ=class e{rpc=$(null);destroyRef=E(ws);host=E(Nl);injector=E(Ss);seen=new Map;hostPageId=uE();unsubscribe;time=$D;preview=gq;pluginHint=lq;guideUrl=jJ;yesNo=QK;filterOptions=Object.keys(NJ).map(e=>({value:e,label:NJ[e]}));pages=j([]);loaded=j(!1);failed=j(!1);selectedPageId=Nv({source:()=>this.pages(),computation:(e,t)=>t?.value&&e.some(e=>e.pageId===t.value)?t.value:eq(e,this.hostPageId)});selectedCallId=j(null);focusedCallId=j(null);filter=j(``);callFilter=j(`all`);now=j(Date.now());message=j(``);page=Q(()=>{let e=this.selectedPageId();return this.pages().find(t=>t.pageId===e)??null});pageOptions=Q(()=>this.pages().map(e=>({value:e.pageId,label:e.title||e.url||e.pageId,hint:e.info.platform})));maxCalls=Q(()=>kE(this.rpc()).limits.capacitorCalls);loggedLabel=Q(()=>{let e=this.page()?.info;return e?e.bridge&&e.webCalls?`Native and web`:e.bridge?`Native only`:e.webCalls?`Web only`:`None on this platform`:``});shownCalls=Q(()=>{let e=this.page();if(!e)return[];let t=this.filter().trim().toLowerCase(),n=this.callFilter(),r=n===`slow`?this.now():0;return[...e.calls].filter(e=>oq(e,n,r)).filter(e=>!t||`${e.plugin}.${e.method}`.toLowerCase().includes(t)).sort((e,t)=>t.startedAt-e.startedAt)});selected=Q(()=>this.shownCalls().find(e=>e.id===this.selectedCallId())??null);tabStop=Q(()=>{let e=this.shownCalls();for(let t of[this.focusedCallId(),this.selectedCallId()])if(t!==null&&e.some(e=>e.id===t))return t;return e[0]?.id??null});slowest=Q(()=>{let e=this.now();return Math.max(1,...this.shownCalls().map(t=>aq(t,e)))});hiddenBy=Q(()=>{let e=[],t=this.filter().trim();return t&&e.push(`the search “${t}”`),this.callFilter()!==`all`&&e.push(`the ${NJ[this.callFilter()]} filter`),e.join(` and `)});stateCards=Q(()=>{let e=this.page();return e?Wq(e):[]});leaks=Q(()=>dq(this.page()?.listeners??[]));liveSummary=Q(()=>{let e=this.page();return e?uq(e,this.now()):null});summary=j(null);summaryShownAt=0;summaryTimer;messageFlip=!1;constructor(){dc(()=>{let e=this.rpc();e&&this.load(e)}),dc(()=>{let e=this.liveSummary();jv(()=>this.queueSummary(e))});let e=setInterval(()=>this.now.set(Date.now()),1e3);this.destroyRef.onDestroy(()=>{clearInterval(e),clearTimeout(this.summaryTimer),this.unsubscribe?.()})}retry(){let e=this.rpc();e&&this.load(e)}callStats(e){return[{filter:`all`,label:`Calls`,count:e.calls},{filter:`failed`,label:`Failed`,count:e.failed},{filter:`slow`,label:`Slow, 500 ms+`,count:e.slow},{filter:`pending`,label:`Pending`,count:e.pending}]}select(e){this.selectedCallId.set(e),zd(()=>{globalThis.matchMedia?.(`(max-width: 880px)`).matches&&this.host.nativeElement.querySelector(`#cap-detail`)?.scrollIntoView?.({block:`nearest`})},{injector:this.injector})}onListKey(e){if(![`ArrowDown`,`ArrowUp`,`Home`,`End`].includes(e.key))return;let t=Array.from(this.host.nativeElement.querySelectorAll(`[data-cap-call]`));if(!t.length)return;let n=t.indexOf(document.activeElement),r=n;r=e.key===`ArrowDown`?Math.min(n+1,t.length-1):e.key===`ArrowUp`?Math.max(n-1,0):e.key===`Home`?0:t.length-1,e.preventDefault(),t[r]?.focus()}setSearch(e){e!==this.filter()&&(this.filter.set(e),this.announceCount())}setFilter(e){e!==this.callFilter()&&(this.callFilter.set(e),this.announceCount())}pickFilter(e){this.setFilter(this.callFilter()===e?`all`:e)}clearFilters(){this.filter.set(``),this.callFilter.set(`all`),this.announceCount()}announce(e){this.messageFlip=!this.messageFlip,this.message.set(this.messageFlip?`${e} `:e)}async copyCommand(e){try{await navigator.clipboard.writeText(e),this.announce(`Copied ${e}.`)}catch{this.announce(`The clipboard is not available here.`)}}leakCount(e){return this.leaks().get(`${e.plugin} ${e.event}`)??0}tone(e){return e.status===`pending`?`accent`:e.status===`ok`?`ok`:iq(e)?`warn`:`danger`}statusLabel(e){return e.status===`pending`?`Pending`:e.status===`ok`?`OK`:iq(e)?`Not implemented`:`Error`}durationText(e){return e.status===`pending`?`waiting ${sq(aq(e,this.now()))}`:e.durationMs===void 0?``:`${Math.round(e.durationMs)} ms`}barWidth(e){return Math.min(100,aq(e,this.now())/this.slowest()*100)}announceCount(){let e=this.page();e&&this.announce(`${this.shownCalls().length} of ${e.calls.length} calls shown`)}queueSummary(e){let t=this.summary();if(JSON.stringify(e)===JSON.stringify(t))return;clearTimeout(this.summaryTimer),this.summaryTimer=void 0;let n=this.summaryShownAt+MJ-Date.now();if(!t||!e||e.pageId!==t.pageId||n<=0){this.summary.set(e),this.summaryShownAt=Date.now();return}this.summaryTimer=setTimeout(()=>{this.summaryTimer=void 0,this.summary.set(this.liveSummary()),this.summaryShownAt=Date.now()},n)}async load(e){this.failed.set(!1);try{let t=await e.scope(`pangular`).rpc.sharedState(`capacitor`);if(this.destroyRef.destroyed)return;let n=e=>this.pages.set($K(rq(e),this.seen));n(t.value()),this.unsubscribe?.(),this.unsubscribe=t.on(`updated`,n)}catch{this.failed.set(!0)}finally{this.loaded.set(!0)}}static ɵfac=function(t){return new(t||e)};static ɵcmp=Wh({type:e,selectors:[[`app-capacitor-inspector`]],inputs:{rpc:[1,`rpc`]},decls:4,vars:1,consts:[[`search`,``],[`role`,`status`,1,`state`],[`role`,`alert`,1,`state`],[`type`,`button`,1,`small`,3,`click`],[1,`intro`],[`role`,`status`,`aria-label`,`Capacitor summary`,`aria-atomic`,`false`,1,`strip`],[1,`sr-only`],[`aria-labelledby`,`cap-env-title`,1,`env`],[1,`env-head`],[`id`,`cap-env-title`],[1,`page-picker`],[1,`wide`],[`aria-labelledby`,`cap-state-title`],[`aria-labelledby`,`cap-calls-title`],[`id`,`cap-calls-title`],[1,`notice`],[`aria-labelledby`,`cap-plugins-title`],[`id`,`cap-plugins-title`],[1,`empty`],[`tabindex`,`0`,`role`,`group`,`aria-label`,`Plugins table`,1,`table-wrap`],[`aria-labelledby`,`cap-listeners-title`],[`id`,`cap-listeners-title`],[`tabindex`,`0`,`role`,`group`,`aria-label`,`Listeners table`,1,`table-wrap`],[`aria-atomic`,`true`,1,`stat`],[1,`stat-label`],[1,`stat-value`],[`type`,`button`,`aria-atomic`,`true`,1,`stat`],[`type`,`button`,`aria-atomic`,`true`,1,`stat`,3,`click`],[`id`,`cap-page-label`,1,`label-key`],[`labelledBy`,`cap-page-label`,3,`valueChange`,`options`,`value`],[`id`,`cap-state-title`],[3,`cards`,`now`],[`target`,`_blank`,`rel`,`noopener noreferrer`,3,`href`],[1,`toolbar`],[1,`search`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`,1,`search-icon`],[`cx`,`11`,`cy`,`11`,`r`,`7`],[`d`,`m20 20-3.5-3.5`],[`type`,`search`,`aria-label`,`Filter calls by plugin or method`,`placeholder`,`Filter by plugin or method`,3,`input`,`keydown.escape`,`value`],[`ariaLabel`,`Show calls`,1,`show`,3,`valueChange`,`options`,`value`],[1,`count`],[`what`,`plugin calls`,`limit`,`capacitorCalls`,3,`dropped`,`max`],[1,`split`],[1,`muted`],[`aria-label`,`Plugin calls, newest first`,1,`calls`,3,`keydown`],[3,`call`,`now`],[`type`,`button`,`data-cap-call`,``,1,`call`,3,`focus`,`click`],[1,`name`],[1,`chip`,`status`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`],[`d`,`M20 6 9 17l-5-5`],[1,`chip`,`via`],[1,`duration`],[`aria-hidden`,`true`,1,`bar`],[1,`when`],[`cx`,`12`,`cy`,`12`,`r`,`9`],[`d`,`m15 9-6 6M9 9l6 6`],[`d`,`M5.6 5.6l12.8 12.8`],[`d`,`M12 7v5l3 2`],[3,`announce`,`call`,`now`],[`scope`,`col`],[`scope`,`row`],[1,`note`],[1,`hint`],[`type`,`button`,1,`copy`],[`type`,`button`,1,`copy`,3,`click`],[1,`last`],[`data-tone`,`warn`,1,`chip`,`leak`],[1,`payload`],[`d`,`M12 3 2 21h20z`],[`d`,`M12 10v4M12 17.5v.01`]],template:function(e,t){if(e&1&&P(0,Yq,2,0,`p`,1)(1,Xq,5,0,`div`,2)(2,kJ,57,13)(3,AJ,2,0,`p`,1),e&2){let e;F(t.loaded()?t.failed()?1:(e=t.page())?2:3:0,e)}},dependencies:[iO,GD,Mq,Gq],styles:[`[_nghost-%COMP%] {
+}`]})},CJ=(e,t)=>t.filter,wJ=(e,t)=>t.id,TJ=(e,t)=>t.name;function EJ(e,t){e&1&&(z(0,`p`,1),J(1,`Loading Capacitor data…`),B())}function DJ(e,t){if(e&1){let e=W();z(0,`div`,2)(1,`p`),J(2,`Can't read the Capacitor data from the devtools server.`),B(),z(3,`button`,3),G(`click`,function(){return O(e),k(K().retry())}),J(4,`Retry`),B()()}}function OJ(e,t){if(e&1){let e=W();z(0,`button`,27),G(`click`,function(){let t=O(e).$implicit;return k(K(4).pickFilter(t.filter))}),z(1,`span`,24),J(2),B(),J(3,` `),z(4,`span`,25),J(5),B()()}if(e&2){let e=t.$implicit,n=K(4);N(`data-filter`,e.filter)(`aria-pressed`,n.callFilter()===e.filter),M(2),Y(e.label),M(3),Y(e.count)}}function kJ(e,t){if(e&1&&I(0,OJ,6,4,`button`,26,CJ),e&2){let e=K();L(K(2).callStats(e))}}function AJ(e,t){if(e&1&&(z(0,`span`,23)(1,`span`,24),J(2,`Platform`),B(),J(3,` `),z(4,`span`,25)(5,`code`),J(6),B(),J(7),B()(),P(8,kJ,2,0),z(9,`span`,23)(10,`span`,24),J(11,`CapacitorHttp`),B(),J(12,` `),z(13,`span`,25),J(14),B()(),z(15,`span`,23)(16,`span`,24),J(17,`Plugin hints`),B(),J(18,` `),z(19,`span`,25),J(20),B()()),e&2){let e=t;M(6),Y(e.platform),M(),X(` `,e.native?`native`:`web`),M(),F(e.logsCalls?8:-1),M(6),Y(e.capacitorHttp),M(6),Y(e.hints)}}function jJ(e,t){if(e&1){let e=W();z(0,`div`,10)(1,`span`,28),J(2,`Page`),B(),z(3,`app-select`,29),G(`valueChange`,function(t){return O(e),k(K(2).selectedPageId.set(t))}),B()()}if(e&2){let e=K(),t=K();M(3),R(`options`,t.pageOptions())(`value`,e.pageId)}}function MJ(e,t){if(e&1&&(z(0,`section`,12)(1,`h2`,30),J(2,`Plugin state`),B(),V(3,`app-capacitor-state`,31),B()),e&2){let e=K(2);M(3),R(`cards`,e.stateCards())(`now`,e.now())}}function NJ(e,t){if(e&1&&(z(0,`p`,15),J(1,` Plugin calls aren't shown on this page. Native calls are logged on iOS and Android, where plugins go through the native bridge. To log calls a web implementation answers, load `),z(2,`code`),J(3,`@pangular-inspector/devtools/capacitor-hook`),B(),J(4,` before `),z(5,`code`),J(6,`@capacitor/core`),B(),J(7,`. `),z(8,`a`,32),J(9,`How to log web calls`),z(10,`span`,6),J(11,` (opens in a new tab)`),B()()()),e&2){let e=K(2);M(8),R(`href`,e.guideUrl,Au)}}function PJ(e,t){if(e&1&&(z(0,`p`,15),J(1,` Only native calls are logged. Calls a web implementation answers are left out. `),z(2,`a`,32),J(3,`How to log them too`),z(4,`span`,6),J(5,` (opens in a new tab)`),B()()()),e&2){let e=K(3);M(2),R(`href`,e.guideUrl,Au)}}function FJ(e,t){e&1&&(z(0,`p`,18),J(1,`No plugin calls yet. Use the app and they show up here.`),B())}function IJ(e,t){if(e&1){let e=W();z(0,`div`,18)(1,`p`),J(2,`No call matches the filters.`),B(),z(3,`p`,43),J(4),B(),z(5,`button`,3),G(`click`,function(){O(e),K();let t=u_(7);return K(2).clearFilters(),k(t.focus())}),J(6,` Clear filters `),B()()}if(e&2){let e=K(2),t=K();M(4),rv(` `,e.calls.length,` `,e.calls.length===1?`call is`:`calls are`,` hidden by `,t.hiddenBy(),`. `)}}function LJ(e,t){e&1&&(A(),V(0,`path`,50))}function RJ(e,t){e&1&&(A(),V(0,`circle`,55)(1,`path`,56))}function zJ(e,t){e&1&&(A(),V(0,`circle`,55)(1,`path`,57))}function BJ(e,t){e&1&&(A(),V(0,`circle`,55)(1,`path`,58))}function VJ(e,t){e&1&&(z(0,`span`,51),J(1,`stream`),B())}function HJ(e,t){if(e&1){let e=W();z(0,`li`)(1,`button`,46),G(`focus`,function(){let t=O(e).$implicit;return k(K(4).focusedCallId.set(t.id))})(`click`,function(){let t=O(e).$implicit;return k(K(4).select(t.id))}),z(2,`code`,47),J(3),B(),z(4,`span`,48),A(),z(5,`svg`,49),P(6,LJ,1,0,`:svg:path`,50)(7,RJ,2,0)(8,zJ,2,0)(9,BJ,2,0),B(),J(10),B(),P(11,VJ,2,0,`span`,51),ms(),z(12,`span`,52)(13,`span`,53),V(14,`span`),B(),J(15),B(),z(16,`span`,51),J(17),B(),z(18,`time`,54),J(19),B()()()}if(e&2){let e,n=t.$implicit,r=K(4);M(),q(`selected`,r.selected()?.id===n.id),N(`aria-pressed`,r.selected()?.id===n.id)(`tabindex`,r.tabStop()===n.id?0:-1),M(2),Z(``,n.plugin,`.`,n.method,`()`),M(),N(`data-tone`,r.tone(n)),M(2),F((e=r.tone(n))===`ok`?6:e===`danger`?7:e===`warn`?8:9),M(4),X(` `,r.statusLabel(n),` `),M(),F(n.kind===`callback`?11:-1),M(3),j_(`width`,r.barWidth(n),`%`),M(),X(` `,r.durationText(n),` `),M(2),Y(n.via),M(2),Y(r.time(n.startedAt))}}function UJ(e,t){if(e&1){let e=W();z(0,`app-capacitor-call-detail`,59),G(`announce`,function(t){return O(e),k(K(4).announce(t))}),B()}if(e&2){let e=K(4);R(`call`,t)(`now`,e.now())}}function WJ(e,t){if(e&1){let e=W();z(0,`div`,42)(1,`ol`,44),G(`keydown`,function(t){return O(e),k(K(3).onListKey(t))}),I(2,HJ,20,15,`li`,null,wJ),B(),P(4,UJ,1,2,`app-capacitor-call-detail`,45),B()}if(e&2){let e,t=K(3);M(2),L(t.shownCalls()),M(2),F((e=t.selected())?4:-1,e)}}function GJ(e,t){if(e&1){let e=W();P(0,PJ,6,1,`p`,15),z(1,`div`,33)(2,`div`,34),A(),z(3,`svg`,35),V(4,`circle`,36)(5,`path`,37),B(),ms(),z(6,`input`,38,0),G(`input`,function(t){return O(e),k(K(2).setSearch(t.target.value))})(`keydown.escape`,function(){return O(e),k(K(2).setSearch(``))}),B()(),z(8,`app-select`,39),G(`valueChange`,function(t){return O(e),k(K(2).setFilter(t))}),B(),z(9,`span`,40),J(10),B()(),V(11,`app-limit-note`,41),P(12,FJ,2,0,`p`,18)(13,IJ,7,3,`div`,18)(14,WJ,5,1,`div`,42)}if(e&2){let e=K(),t=K();F(e.info.webCalls?-1:0),M(6),R(`value`,t.filter()),M(2),R(`options`,t.filterOptions)(`value`,t.callFilter()),M(2),Z(``,t.shownCalls().length,` of `,e.calls.length,` calls`),M(),R(`dropped`,e.dropped)(`max`,t.maxCalls()),M(),F(e.calls.length?t.shownCalls().length?14:13:12)}}function KJ(e,t){e&1&&(z(0,`p`,18),J(1,`No plugins are registered or installed.`),B())}function qJ(e,t){if(e&1&&(z(0,`code`),J(1),B()),e&2){let e=K();M(),Y(e.command)}}function JJ(e,t){if(e&1){let e=W();z(0,`button`,65),G(`click`,function(){O(e);let t=K();return k(K(4).copyCommand(t.command))}),J(1,` Copy `),B()}e&2&&N(`aria-label`,`Copy `+K().command)}function YJ(e,t){if(e&1&&(z(0,`span`,63),J(1),P(2,qJ,2,1,`code`),J(3),B(),P(4,JJ,2,1,`button`,64)),e&2){let e=t;M(),Y(e.before),M(),F(e.command?2:-1),M(),Y(e.after),M(),F(e.command?4:-1)}}function XJ(e,t){if(e&1&&(z(0,`tr`)(1,`th`,61)(2,`code`),J(3),B()(),z(4,`td`),J(5),B(),z(6,`td`),J(7),B(),z(8,`td`),J(9),B(),z(10,`td`,62),P(11,YJ,5,4),B()()),e&2){let e,n=t.$implicit,r=K(2),i=K();M(3),Y(n.name),M(2),Y(n.available?`Yes`:`No`),M(2),Y(i.yesNo(n.registered)),M(2),Y(n.native?`Yes`:`No`),M(2),F((e=i.pluginHint(n,r.info.platform))?11:-1,e)}}function ZJ(e,t){if(e&1&&(z(0,`div`,19)(1,`table`)(2,`thead`)(3,`tr`)(4,`th`,60),J(5,`Plugin`),B(),z(6,`th`,60),J(7,`Available`),B(),z(8,`th`,60),J(9,`Imported`),B(),z(10,`th`,60),J(11,`Native`),B(),z(12,`th`,60),J(13,`Note`),B()()(),z(14,`tbody`),I(15,XJ,12,5,`tr`,null,TJ),B()()()),e&2){let e=K();M(15),L(e.info.plugins)}}function QJ(e,t){e&1&&(z(0,`p`,18),J(1,`No plugin listeners. They show up when the app calls addListener.`),B())}function $J(e,t){if(e&1&&(z(0,`code`,68),J(1),B()),e&2){let e=K(2).$implicit,t=K(3);M(),Y(t.preview(e.last))}}function eY(e,t){e&1&&(z(0,`span`,68),J(1,`No data`),B())}function tY(e,t){if(e&1&&(P(0,$J,2,1,`code`,68)(1,eY,2,0,`span`,68),z(2,`span`,43),J(3),B()),e&2){let e=K().$implicit,t=K(3);F(+(e.last===void 0)),M(3),X(`at `,t.time(e.lastEventAt))}}function nY(e,t){e&1&&J(0,` None yet `)}function rY(e,t){if(e&1&&(z(0,`span`,67),A(),z(1,`svg`,49),V(2,`path`,69)(3,`path`,70),B(),J(4),B()),e&2){let e=K().$implicit,t=K(3);M(4),X(` `,t.leakCount(e),` active listeners: possible leak `)}}function iY(e,t){if(e&1&&(z(0,`tr`)(1,`th`,61)(2,`code`),J(3),B()(),z(4,`td`)(5,`code`),J(6),B()(),z(7,`td`),J(8),B(),z(9,`td`,66),P(10,tY,4,2)(11,nY,1,0),B(),z(12,`td`),J(13),P(14,rY,5,1,`span`,67),B()()),e&2){let e=t.$implicit,n=K(3);M(3),Y(e.plugin),M(3),Y(e.event),M(2),Y(e.events),M(2),F(e.lastEventAt?10:11),M(3),X(` `,e.removed?`Removed`:`Active`,` `),M(),F(!e.removed&&n.leakCount(e)>1?14:-1)}}function aY(e,t){if(e&1&&(z(0,`div`,22)(1,`table`)(2,`thead`)(3,`tr`)(4,`th`,60),J(5,`Plugin`),B(),z(6,`th`,60),J(7,`Event`),B(),z(8,`th`,60),J(9,`Events`),B(),z(10,`th`,60),J(11,`Last event`),B(),z(12,`th`,60),J(13,`State`),B()()(),z(14,`tbody`),I(15,iY,15,6,`tr`,null,wJ),B()()()),e&2){let e=K();M(15),L(e.listeners)}}function oY(e,t){if(e&1&&(z(0,`p`,4),J(1,` Plugin calls, plugins and listeners of a Capacitor app, as its WebView reports them. Values are masked like other live data. `),B(),z(2,`div`,5),P(3,AJ,21,5),z(4,`span`,6),J(5),B()(),z(6,`section`,7)(7,`div`,8)(8,`h2`,9),J(9,`Environment`),B(),P(10,jJ,4,2,`div`,10),B(),z(11,`dl`)(12,`div`)(13,`dt`),J(14,`Platform`),B(),z(15,`dd`)(16,`code`),J(17),B(),J(18),B()(),z(19,`div`)(20,`dt`),J(21,`Server URL`),B(),z(22,`dd`)(23,`code`),J(24),B()()(),z(25,`div`)(26,`dt`),J(27,`CapacitorHttp`),B(),z(28,`dd`),J(29),B()(),z(30,`div`)(31,`dt`),J(32,`Calls logged`),B(),z(33,`dd`),J(34),B()(),z(35,`div`,11)(36,`dt`),J(37,`User agent`),B(),z(38,`dd`)(39,`code`),J(40),B()()()()(),P(41,MJ,4,2,`section`,12),z(42,`section`,13)(43,`h2`,14),J(44,`Plugin calls`),B(),P(45,NJ,12,1,`p`,15)(46,GJ,15,9),B(),z(47,`section`,16)(48,`h2`,17),J(49,`Plugins`),B(),P(50,KJ,2,0,`p`,18)(51,ZJ,17,0,`div`,19),B(),z(52,`section`,20)(53,`h2`,21),J(54,`Listeners`),B(),P(55,QJ,2,0,`p`,18)(56,aY,17,0,`div`,22),B()),e&2){let e,n=t,r=K();M(3),F((e=r.summary())?3:-1,e),M(2),Y(r.message()),M(5),F(r.pageOptions().length>1?10:-1),M(7),Y(n.info.platform),M(),X(` (`,n.info.native?`native`:`web`,`) `),M(6),Y(n.info.env.serverUrl||`none`),M(5),X(` `,n.info.env.capacitorHttp===null?`Unknown`:n.info.env.capacitorHttp?`On`:`Off`,` `),M(5),Y(r.loggedLabel()),M(6),Y(n.info.env.userAgent||`unknown`),M(),F(r.stateCards().length?41:-1),M(4),F(!n.info.bridge&&!n.info.webCalls?45:46),M(5),F(n.info.plugins.length?51:50),M(5),F(n.listeners.length?56:55)}}function sY(e,t){e&1&&(z(0,`p`,1),J(1,` No Capacitor app reports to this server. Start the overlay in the app, then use it. `),B())}var cY=`https://pangular-inspector.dev/inspectors/capacitor/#web-calls`,lY=2e3,uY={all:`All calls`,failed:`Failed`,slow:`Slow (500 ms or more)`,pending:`Pending`},dY=class e{rpc=$(null);destroyRef=E(ws);host=E(Nl);injector=E(Ss);seen=new Map;hostPageId=fE();unsubscribe;time=tO;preview=qq;pluginHint=Bq;guideUrl=cY;yesNo=kq;filterOptions=Object.keys(uY).map(e=>({value:e,label:uY[e]}));pages=j([]);loaded=j(!1);failed=j(!1);selectedPageId=Fv({source:()=>this.pages(),computation:(e,t)=>t?.value&&e.some(e=>e.pageId===t.value)?t.value:jq(e,this.hostPageId)});selectedCallId=j(null);focusedCallId=j(null);filter=j(``);callFilter=j(`all`);now=j(Date.now());message=j(``);page=Q(()=>{let e=this.selectedPageId();return this.pages().find(t=>t.pageId===e)??null});pageOptions=Q(()=>this.pages().map(e=>({value:e.pageId,label:e.title||e.url||e.pageId,hint:e.info.platform})));maxCalls=Q(()=>jE(this.rpc()).limits.capacitorCalls);loggedLabel=Q(()=>{let e=this.page()?.info;return e?e.bridge&&e.webCalls?`Native and web`:e.bridge?`Native only`:e.webCalls?`Web only`:`None on this platform`:``});shownCalls=Q(()=>{let e=this.page();if(!e)return[];let t=this.filter().trim().toLowerCase(),n=this.callFilter(),r=n===`slow`?this.now():0;return[...e.calls].filter(e=>Lq(e,n,r)).filter(e=>!t||`${e.plugin}.${e.method}`.toLowerCase().includes(t)).sort((e,t)=>t.startedAt-e.startedAt)});selected=Q(()=>this.shownCalls().find(e=>e.id===this.selectedCallId())??null);tabStop=Q(()=>{let e=this.shownCalls();for(let t of[this.focusedCallId(),this.selectedCallId()])if(t!==null&&e.some(e=>e.id===t))return t;return e[0]?.id??null});slowest=Q(()=>{let e=this.now();return Math.max(1,...this.shownCalls().map(t=>Iq(t,e)))});hiddenBy=Q(()=>{let e=[],t=this.filter().trim();return t&&e.push(`the search “${t}”`),this.callFilter()!==`all`&&e.push(`the ${uY[this.callFilter()]} filter`),e.join(` and `)});stateCards=Q(()=>{let e=this.page();return e?xJ(e):[]});leaks=Q(()=>Hq(this.page()?.listeners??[]));liveSummary=Q(()=>{let e=this.page();return e?Vq(e,this.now()):null});summary=j(null);summaryShownAt=0;summaryTimer;messageFlip=!1;constructor(){dc(()=>{let e=this.rpc();e&&this.load(e)}),dc(()=>{let e=this.liveSummary();Nv(()=>this.queueSummary(e))});let e=setInterval(()=>this.now.set(Date.now()),1e3);this.destroyRef.onDestroy(()=>{clearInterval(e),clearTimeout(this.summaryTimer),this.unsubscribe?.()})}retry(){let e=this.rpc();e&&this.load(e)}callStats(e){return[{filter:`all`,label:`Calls`,count:e.calls},{filter:`failed`,label:`Failed`,count:e.failed},{filter:`slow`,label:`Slow, 500 ms+`,count:e.slow},{filter:`pending`,label:`Pending`,count:e.pending}]}select(e){this.selectedCallId.set(e),zd(()=>{globalThis.matchMedia?.(`(max-width: 880px)`).matches&&this.host.nativeElement.querySelector(`#cap-detail`)?.scrollIntoView?.({block:`nearest`})},{injector:this.injector})}onListKey(e){if(![`ArrowDown`,`ArrowUp`,`Home`,`End`].includes(e.key))return;let t=Array.from(this.host.nativeElement.querySelectorAll(`[data-cap-call]`));if(!t.length)return;let n=t.indexOf(document.activeElement),r=n;r=e.key===`ArrowDown`?Math.min(n+1,t.length-1):e.key===`ArrowUp`?Math.max(n-1,0):e.key===`Home`?0:t.length-1,e.preventDefault(),t[r]?.focus()}setSearch(e){e!==this.filter()&&(this.filter.set(e),this.announceCount())}setFilter(e){e!==this.callFilter()&&(this.callFilter.set(e),this.announceCount())}pickFilter(e){this.setFilter(this.callFilter()===e?`all`:e)}clearFilters(){this.filter.set(``),this.callFilter.set(`all`),this.announceCount()}announce(e){this.messageFlip=!this.messageFlip,this.message.set(this.messageFlip?`${e} `:e)}async copyCommand(e){try{await navigator.clipboard.writeText(e),this.announce(`Copied ${e}.`)}catch{this.announce(`The clipboard is not available here.`)}}leakCount(e){return this.leaks().get(`${e.plugin} ${e.event}`)??0}tone(e){return e.status===`pending`?`accent`:e.status===`ok`?`ok`:Fq(e)?`warn`:`danger`}statusLabel(e){return e.status===`pending`?`Pending`:e.status===`ok`?`OK`:Fq(e)?`Not implemented`:`Error`}durationText(e){return e.status===`pending`?`waiting ${Rq(Iq(e,this.now()))}`:e.durationMs===void 0?``:`${Math.round(e.durationMs)} ms`}barWidth(e){return Math.min(100,Iq(e,this.now())/this.slowest()*100)}announceCount(){let e=this.page();e&&this.announce(`${this.shownCalls().length} of ${e.calls.length} calls shown`)}queueSummary(e){let t=this.summary();if(JSON.stringify(e)===JSON.stringify(t))return;clearTimeout(this.summaryTimer),this.summaryTimer=void 0;let n=this.summaryShownAt+lY-Date.now();if(!t||!e||e.pageId!==t.pageId||n<=0){this.summary.set(e),this.summaryShownAt=Date.now();return}this.summaryTimer=setTimeout(()=>{this.summaryTimer=void 0,this.summary.set(this.liveSummary()),this.summaryShownAt=Date.now()},n)}async load(e){this.failed.set(!1);try{let t=await e.scope(`pangular`).rpc.sharedState(`capacitor`);if(this.destroyRef.destroyed)return;let n=e=>this.pages.set(Aq(Pq(e),this.seen));n(t.value()),this.unsubscribe?.(),this.unsubscribe=t.on(`updated`,n)}catch{this.failed.set(!0)}finally{this.loaded.set(!0)}}static ɵfac=function(t){return new(t||e)};static ɵcmp=Wh({type:e,selectors:[[`app-capacitor-inspector`]],inputs:{rpc:[1,`rpc`]},decls:4,vars:1,consts:[[`search`,``],[`role`,`status`,1,`state`],[`role`,`alert`,1,`state`],[`type`,`button`,1,`small`,3,`click`],[1,`intro`],[`role`,`status`,`aria-label`,`Capacitor summary`,`aria-atomic`,`false`,1,`strip`],[1,`sr-only`],[`aria-labelledby`,`cap-env-title`,1,`env`],[1,`env-head`],[`id`,`cap-env-title`],[1,`page-picker`],[1,`wide`],[`aria-labelledby`,`cap-state-title`],[`aria-labelledby`,`cap-calls-title`],[`id`,`cap-calls-title`],[1,`notice`],[`aria-labelledby`,`cap-plugins-title`],[`id`,`cap-plugins-title`],[1,`empty`],[`tabindex`,`0`,`role`,`group`,`aria-label`,`Plugins table`,1,`table-wrap`],[`aria-labelledby`,`cap-listeners-title`],[`id`,`cap-listeners-title`],[`tabindex`,`0`,`role`,`group`,`aria-label`,`Listeners table`,1,`table-wrap`],[`aria-atomic`,`true`,1,`stat`],[1,`stat-label`],[1,`stat-value`],[`type`,`button`,`aria-atomic`,`true`,1,`stat`],[`type`,`button`,`aria-atomic`,`true`,1,`stat`,3,`click`],[`id`,`cap-page-label`,1,`label-key`],[`labelledBy`,`cap-page-label`,3,`valueChange`,`options`,`value`],[`id`,`cap-state-title`],[3,`cards`,`now`],[`target`,`_blank`,`rel`,`noopener noreferrer`,3,`href`],[1,`toolbar`],[1,`search`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`,1,`search-icon`],[`cx`,`11`,`cy`,`11`,`r`,`7`],[`d`,`m20 20-3.5-3.5`],[`type`,`search`,`aria-label`,`Filter calls by plugin or method`,`placeholder`,`Filter by plugin or method`,3,`input`,`keydown.escape`,`value`],[`ariaLabel`,`Show calls`,1,`show`,3,`valueChange`,`options`,`value`],[1,`count`],[`what`,`plugin calls`,`limit`,`capacitorCalls`,3,`dropped`,`max`],[1,`split`],[1,`muted`],[`aria-label`,`Plugin calls, newest first`,1,`calls`,3,`keydown`],[3,`call`,`now`],[`type`,`button`,`data-cap-call`,``,1,`call`,3,`focus`,`click`],[1,`name`],[1,`chip`,`status`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`],[`d`,`M20 6 9 17l-5-5`],[1,`chip`,`via`],[1,`duration`],[`aria-hidden`,`true`,1,`bar`],[1,`when`],[`cx`,`12`,`cy`,`12`,`r`,`9`],[`d`,`m15 9-6 6M9 9l6 6`],[`d`,`M5.6 5.6l12.8 12.8`],[`d`,`M12 7v5l3 2`],[3,`announce`,`call`,`now`],[`scope`,`col`],[`scope`,`row`],[1,`note`],[1,`hint`],[`type`,`button`,1,`copy`],[`type`,`button`,1,`copy`,3,`click`],[1,`last`],[`data-tone`,`warn`,1,`chip`,`leak`],[1,`payload`],[`d`,`M12 3 2 21h20z`],[`d`,`M12 10v4M12 17.5v.01`]],template:function(e,t){if(e&1&&P(0,EJ,2,0,`p`,1)(1,DJ,5,0,`div`,2)(2,oY,57,13)(3,sY,2,0,`p`,1),e&2){let e;F(t.loaded()?t.failed()?1:(e=t.page())?2:3:0,e)}},dependencies:[oO,qD,lJ,SJ],styles:[`[_nghost-%COMP%] {
   display: block;
   font-size: 13px;
 }
@@ -13979,7 +14253,7 @@ td.last[_ngcontent-%COMP%] {
 .empty[_ngcontent-%COMP%]   p[_ngcontent-%COMP%], 
 .state[_ngcontent-%COMP%]   p[_ngcontent-%COMP%] {
   margin: 0 0 8px;
-}`]})};function FJ(e){let t=e===`light`?`#ffffff`:`#0b0b0e`,n=e===`light`?`#92400e`:`#f5a524`;return`
+}`]})};function fY(e){let t=e===`light`?`#ffffff`:`#0b0b0e`,n=e===`light`?`#92400e`:`#f5a524`;return`
   .devframes-dock-entry button {
     transition: background-color 0.2s, transform 0.3s;
   }
@@ -14070,7 +14344,7 @@ td.last[_ngcontent-%COMP%] {
       transition: none;
     }
   }
-`}var IJ=new Map;function LJ(e,t=`dark`,n=50){let r=e?.querySelector(`devframes-dock-standalone`)?.shadowRoot;if(r){if(e){let t=IJ.get(e);t!==void 0&&(clearTimeout(t),IJ.delete(e))}let n=r.querySelector(`style[data-pangular]`);n||(n=e.createElement(`style`),n.dataset.pangular=``,r.append(n)),n.textContent=FJ(t);return}if(n>0&&e){let r=IJ.get(e);r!==void 0&&clearTimeout(r);let i=setTimeout(()=>{IJ.delete(e),LJ(e,t,n-1)},100);IJ.set(e,i)}}var RJ=class e{current=j(`dark`);constructor(){let e=E(ws),t=VJ(),n=document.documentElement.dataset.theme,r=n===`light`||n===`dark`;if(n===`light`||n===`dark`)this.current.set(n);else if(t)r=!0,this.apply(BJ(t));else{let t=zJ();if(t){this.current.set(t.matches?`light`:`dark`);let n=e=>{r||this.current.set(e.matches?`light`:`dark`)};t.addEventListener(`change`,n),e.onDestroy(()=>t.removeEventListener(`change`,n))}}let i;try{i=new BroadcastChannel(`pangular:theme`)}catch{}dc(()=>{let e=this.current();try{i?.postMessage(e)}catch{}for(let{win:t,origin:n}of HJ())try{t.postMessage({type:`pangular:theme-change`,theme:e},n)}catch{}});let a=e=>{if(e.source!==window.parent)return;let t=e.data;t?.type===`pangular:theme-change`&&(r=!0,this.apply(t.theme===`dark`?`dark`:`light`))};window.addEventListener(`message`,a);let o;t&&(o=new MutationObserver(()=>this.apply(BJ(t))),o.observe(t,{attributes:!0,attributeFilter:[`class`]})),e.onDestroy(()=>{window.removeEventListener(`message`,a),o?.disconnect(),i?.close()})}apply(e){this.current.set(e),document.documentElement.dataset.theme=e}static ɵfac=function(t){return new(t||e)};static ɵprov=Al({token:e,factory:e.ɵfac})};function zJ(){try{return window.matchMedia?.(`(prefers-color-scheme: light)`)??null}catch{return null}}function BJ(e){return e.classList.contains(`dark`)?`dark`:`light`}function VJ(){try{return window.frameElement?.closest(`.devframes-color-root`)??null}catch{return null}}function HJ(e=window){let t=[],n;try{n=e.location.ancestorOrigins}catch{}let r=e;try{for(let i=0;r!==r.parent;i++){r=r.parent;let a=UJ(e,r,i,n);a&&t.push({win:r,origin:a})}}catch{}return t}function UJ(e,t,n,r){let i=e=>e&&e!==`null`?e:void 0,a=i(r?.item(n));if(a)return a;try{let e=i(t.location.origin);if(e)return e}catch{}if(!(n>0))try{return i(new URL(e.document.referrer).origin)}catch{return}}var WJ=`__DEVFRAME_HUB_CLIENT_CONTEXT__`;function GJ(){try{return window.parent===window?void 0:window.parent[WJ]}catch{return}}function KJ(e,t,n=50){let r=GJ();if(!r){if(n<=0||window.parent===window)return()=>{};let r=()=>{},i=setTimeout(()=>r=KJ(e,t,n-1),100);return()=>{clearTimeout(i),r()}}let i=e.map(e=>r.docks.getStateById(BT(e))?.events.on(`entry:activated`,()=>t(e))??(()=>{})),a=r.docks.selectedId,o=e.find(e=>BT(e)===a);return o&&t(o),()=>i.forEach(e=>e())}function qJ(){return!!GJ()}async function JJ(e){let t=GJ();if(!t)return!1;try{return await t.docks.switchEntry(BT(e))}catch{return!1}}function YJ(e,t){let n=new URL(e);return n.searchParams.delete(`view`),n.hash=t?`tab=${t}`:``,n.pathname+n.search+n.hash}function XJ(e){return e.button===0&&!e.metaKey&&!e.ctrlKey&&!e.shiftKey&&!e.altKey}var ZJ=`pangular-tab`;function QJ(e,t,n){let r=new URLSearchParams(e.replace(/^#/,``)).get(`tab`)||t;return n.find(e=>e===r)}function $J(e){try{return sessionStorage.getItem(`${ZJ}:${e}`)}catch{return null}}function eY(e,t){try{sessionStorage.setItem(`${ZJ}:${e}`,t)}catch{}}function tY(e,t){try{return new URL(e,t.href).origin===t.origin}catch{return!1}}function nY(e,t){if(t.protocol!==`chrome-extension:`)return!1;try{let{protocol:t}=new URL(e);return t===`http:`||t===`https:`}catch{return!1}}function rY(e=location){let t=new URLSearchParams(e.search).get(`baseURL`);if(t&&(tY(t,e)||nY(t,e)))return t;if(!(e.pathname.includes(`__pangular`)||e.pathname.includes(`__devframes/`)))return[`/__pangular/`,`./`]}var iY={dark:{ngrx:{accent:`#d770e8`,text:`#f0abfc`},analog:{accent:`#ff5470`,text:`#fda4af`},"angular-native":{accent:`#ff4d6d`,text:`#fda4af`},nativescript:{accent:`#8196ff`,text:`#a5b4fc`},capacitor:{accent:`#53b9ff`,text:`#7dd3fc`}},light:{ngrx:{accent:`#a21caf`,text:`#701a75`},analog:{accent:`#be123c`,text:`#881337`},"angular-native":{accent:`#be123c`,text:`#881337`},nativescript:{accent:`#3448c5`,text:`#3730a3`},capacitor:{accent:`#0369a1`,text:`#0c4a6e`}}};function aY(e,t){let n=iY[t];return e&&n[e]||null}var oY=[`nav`],sY=[`main`],cY=e=>[e],lY=(e,t)=>t.id;function uY(e,t){e&1&&(A(),z(0,`svg`,4),V(1,`path`,22),B())}function dY(e,t){e&1&&(A(),z(0,`svg`,4),V(1,`path`,23)(2,`path`,24)(3,`path`,25)(4,`path`,26)(5,`path`,27)(6,`path`,28),B())}function fY(e,t){e&1&&(A(),z(0,`svg`,5)(1,`defs`)(2,`linearGradient`,29),V(3,`stop`,30)(4,`stop`,31),B()(),V(5,`path`,32),z(6,`g`,33),V(7,`path`,34)(8,`path`,35)(9,`path`,36)(10,`path`,37),B()())}function pY(e,t){e&1&&(A(),z(0,`svg`,6),V(1,`path`,38)(2,`path`,39)(3,`path`,40)(4,`path`,41),B())}function mY(e,t){e&1&&(A(),z(0,`svg`,7),V(1,`path`,42),B())}function hY(e,t){e&1&&(A(),z(0,`svg`,8)(1,`defs`)(2,`linearGradient`,43),V(3,`stop`,44)(4,`stop`,45)(5,`stop`,46)(6,`stop`,47)(7,`stop`,48)(8,`stop`,49),B()(),V(9,`path`,50),B())}function gY(e,t){e&1&&(A(),z(0,`svg`,9),V(1,`rect`,51),z(2,`g`,52)(3,`defs`)(4,`mask`,53),V(5,`rect`,54),z(6,`g`,55),V(7,`path`,56)(8,`path`,57),B()(),z(9,`clipPath`,58),V(10,`rect`,59),B()(),z(11,`g`,60),V(12,`ellipse`,61),B(),z(13,`g`,62),V(14,`path`,63)(15,`path`,64),B(),z(16,`g`,60),V(17,`ellipse`,65)(18,`ellipse`,66),z(19,`g`,67),V(20,`line`,68)(21,`circle`,69)(22,`line`,70)(23,`circle`,71),B()()()())}function _Y(e,t){if(e&1){let e=W();z(0,`button`,73),G(`click`,function(){let t=O(e).$implicit;return k(K(2).switchTab(t.id))}),V(1,`app-tab-icon`,74),z(2,`span`),J(3),B()()}if(e&2){let e=t.$implicit,n=K(2);q(`active`,n.tab()===e.id),N(`aria-current`,n.tab()===e.id?`page`:null)(`tabindex`,n.rovingTab()===e.id?0:-1),M(),R(`name`,e.id),M(2),Y(e.label)}}function vY(e,t){if(e&1&&(z(0,`div`,12),I(1,_Y,4,6,`button`,72,lY),B()),e&2){let e=K();M(),L(e.tabs())}}function yY(e,t){if(e&1){let e=W();z(0,`a`,75),G(`click`,function(t){let n=O(e);return k(K().openFullPanel(t,n.tab))}),A(),z(1,`svg`,76),V(2,`rect`,77)(3,`rect`,78)(4,`rect`,79)(5,`rect`,80),B(),J(6,` Open full panel `),B()}e&2&&R(`href`,t.href,Au)}function bY(e,t){if(e&1){let e=W();z(0,`div`,18)(1,`p`),J(2,` Can't reach the devtools server. Check that the dev server is running. The panel keeps trying to connect. `),B(),z(3,`button`,73),G(`click`,function(){return O(e),k(K().retryConnection())}),J(4,`Retry now`),B()()}}function xY(e,t){e&1&&V(0,`app-coming-soon`,19),e&2&&R(`info`,t)}function SY(e,t){e&1&&(z(0,`p`,20),J(1,`Looking for an Angular Native app…`),B())}function CY(e,t){e&1&&(J(0,` To turn it on, set `),z(1,`code`),J(2),B(),J(3,` in the devtools options. `)),e&2&&(M(2),Y(t))}function wY(e,t){if(e&1&&(z(0,`p`,21),J(1,` This inspector is turned off in the devtools config (`),z(2,`code`),J(3,`inspectors`),B(),J(4,`). `),P(5,CY,4,1),z(6,`a`,81),J(7,`About inspectors`),z(8,`span`,82),J(9,` (opens in a new tab)`),B()()()),e&2){let e,t=K();M(5),F((e=t.turnOnSnippet())?5:-1,e),M(),R(`href`,t.inspectorsDocsUrl,Au)}}function TY(e,t){if(e&1){let e=W();z(0,`app-dashboard`,85),G(`navigate`,function(t){return O(e),k(K(3).switchTab(t))}),B()}e&2&&R(`rpc`,K(3).rpc())}function EY(e,t){if(e&1){let e=W();z(0,`app-component-tree`,86),G(`focusHandled`,function(){return O(e),k(K(3).componentFocus.set(null))})(`showForm`,function(t){return O(e),k(K(3).showForm(t))}),B()}if(e&2){let e=K(3);R(`rpc`,e.rpc())(`focus`,e.componentFocus())}}function DY(e,t){if(e&1){let e=W();z(0,`app-route-inspector`,87),G(`showComponent`,function(t){return O(e),k(K(3).showComponent(t))}),B()}e&2&&R(`rpc`,K(3).rpc())}function OY(e,t){e&1&&V(0,`app-signal-inspector`,83),e&2&&R(`rpc`,K(3).rpc())}function kY(e,t){e&1&&V(0,`app-di-inspector`,83),e&2&&R(`rpc`,K(3).rpc())}function AY(e,t){e&1&&V(0,`app-store-inspector`,83),e&2&&R(`rpc`,K(3).rpc())}function jY(e,t){e&1&&V(0,`app-network-inspector`,83),e&2&&R(`rpc`,K(3).rpc())}function MY(e,t){if(e&1){let e=W();z(0,`app-forms-inspector`,88),G(`focusHandled`,function(){return O(e),k(K(3).formFocus.set(null))}),B()}if(e&2){let e=K(3);R(`rpc`,e.rpc())(`focus`,e.formFocus())}}function NY(e,t){e&1&&V(0,`app-pipes-inspector`,83),e&2&&R(`rpc`,K(3).rpc())}function PY(e,t){e&1&&V(0,`app-analog-inspector`,83),e&2&&R(`rpc`,K(3).rpc())}function FY(e,t){e&1&&V(0,`app-capacitor-inspector`,83),e&2&&R(`rpc`,K(3).rpc())}function IY(e,t){if(e&1&&P(0,TY,1,1,`app-dashboard`,83)(1,EY,1,2,`app-component-tree`,84)(2,DY,1,1,`app-route-inspector`,83)(3,OY,1,1,`app-signal-inspector`,83)(4,kY,1,1,`app-di-inspector`,83)(5,AY,1,1,`app-store-inspector`,83)(6,jY,1,1,`app-network-inspector`,83)(7,MY,1,2,`app-forms-inspector`,84)(8,NY,1,1,`app-pipes-inspector`,83)(9,PY,1,1,`app-analog-inspector`,83)(10,FY,1,1,`app-capacitor-inspector`,83),e&2){let e;F((e=K(2).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:e===`capacitor`?10:-1)}}function LY(e,t){e&1&&I(0,IY,11,1,null,null,Og),e&2&&L(hv(0,cY,K().scopeKey()))}var RY=`all`,zY=[RY,...zT],BY={angular:`Angular`,ngrx:`NgRx Store`,analog:`Analog`,"angular-native":`Angular Native`,nativescript:`NativeScript`,capacitor:`Capacitor`},VY={ngrx:`store`,analog:`analog`,capacitor:`capacitor`},HY={store:`ngrx`,analog:`analog`,capacitor:`capacitor`},UY={"angular-native":[`components`,`signals`,`injectors`,`store`,`pipes`]},WY={id:`nativescript`,name:`NativeScript`,badge:`Available`,heading:`Inspect NativeScript apps`,summary:`A NativeScript Angular app reports from the simulator or device to this server, and its components, signals, injectors and NgRx stores show up in the Angular dock.`,color:`#3c5afd`,plansTitle:`Set up an app`,plans:[`Install @pangular-inspector/devtools and @valor/nativescript-websockets`,`Call initNativeScriptOverlay() in main.ts, before the app bootstraps`,`Run npx pangular dev --no-auth in the app, then open the Angular dock`],link:{label:`NativeScript setup guide`,href:`https://pangular-inspector.dev/guides/nativescript/`}},GY={id:`capacitor`,name:`Capacitor`,badge:`Available`,heading:`Inspect Capacitor apps`,summary:`An Ionic or Capacitor app runs the browser overlay in its WebView and reports to this server, so it shows up in the Angular dock like a browser tab.`,color:`#119eff`,plansTitle:`Set up an app`,plans:[`With live reload on localhost, load @pangular-inspector/devtools/overlay as in a browser`,`In a bundled build, call initOverlay() from @pangular-inspector/devtools/overlay-manual with this server’s address and connectionMeta`,`Run the app, then come back here for its plugin calls, or open the Angular dock`],link:{label:`Capacitor setup guide`,href:`https://pangular-inspector.dev/guides/capacitor/`}},KY={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`}},qY={id:`angular-native`,name:`Angular Native`,badge:`Not connected`,heading:`No Angular Native app is connected`,summary:`Start the overlay in your Angular Native app and run this server with --no-auth. The tabs fill as soon as the app reports.`,color:`#e11d48`,plans:[`The component tree, with the view outlined on the device`,`Signals and injectors of the running app`,`Live @ngrx/signals and @ngrx/store state`],link:{label:`Set up Angular Native`,href:`https://pangular-inspector.dev/guides/angular-native/`}},JY=[1e3,2e3,5e3,1e4];function YY(){let e=new URLSearchParams(location.search).get(`view`);return zT.find(t=>t===e)??null}Zb(class e{analog=j(!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`},{id:`capacitor`,label:`Capacitor`}];view=j(YY());viewAccent=Q(()=>aY(this.view(),this.themeService.current()));title=Q(()=>{let e=this.view();return e?BY[e]:`Pangular Inspector`});mainLabel=Q(()=>this.availableTabs().find(e=>e.id===this.tab())?.label??this.title());analogKnown=j(!1);capacitorReporting=j(!1);capacitorKnown=j(!1);nativePageId=j(null);nativeKnown=j(!1);scopeKey=Q(()=>this.view()===`angular-native`?this.nativePageId()??``:``);comingSoon=Q(()=>{let e=this.view();if(e===`analog`)return this.analogKnown()&&!this.analog()?KY:void 0;if(e===`nativescript`)return WY;if(e===`capacitor`)return this.config().inspectors.capacitor&&this.capacitorKnown()&&!this.capacitorReporting()?GY:void 0;if(e===`angular-native`)return this.nativeKnown()&&!this.nativePageId()?qY:void 0});config=Q(()=>kE(this.rpc()));tabEnabled=PE;inspectorsDocsUrl=NE;turnOnSnippet=Q(()=>{let e=ME(this.tab());return e?`inspectors: {${e}: true}`:null});availableTabs=Q(()=>{if(this.comingSoon())return[];let e=this.view(),t=e?VY[e]:void 0,n=this.allTabs.filter(e=>PE(e.id,this.config()));if(t)return n.filter(e=>e.id===t);let r=e?UY[e]:void 0;return r?n.filter(e=>r.includes(e.id)):n.filter(t=>(t.id!==`analog`||this.analog())&&(t.id!==`capacitor`||this.capacitorReporting())&&!(e===`angular`&&HY[t.id]))});tabs=Q(()=>{let e=this.availableTabs();if(this.rpc())return e;let t=this.tab();return e.filter(e=>e.id===`dashboard`||e.id===t)});rovingTab=Q(()=>{let e=this.tabs(),t=this.tab();return e.some(e=>e.id===t)?t:e[0]?.id});onNavKey(e){let t=this.nav()?.nativeElement;if(!t||e.altKey||e.ctrlKey||e.metaKey)return;let n=[...t.querySelectorAll(`button`)],r=n.indexOf(document.activeElement);if(r<0)return;let i=n.length-1,a={ArrowRight:r===i?0:r+1,ArrowLeft:r===0?i:r-1,Home:0,End:i},o=Object.hasOwn(a,e.key)?a[e.key]:-1;o<0||(e.preventDefault(),n[o].focus())}fullPanelLink=Q(()=>{let e=this.view();if(!e||location.protocol===`chrome-extension:`)return null;let t=this.comingSoon()?`dashboard`:VY[e]??this.tab();return{tab:t,href:YJ(location.href,t)}});tab=Nv(()=>{let e=this.view();return e&&(VY[e]??UY[e]?.[0])||`dashboard`});rpc=j(null);openedDock=j(null);connected=j(!1);connectionFailed=j(!1);hiddenPages=j([]);pageId=uE();backgroundNote=Q(()=>{let e=this.hiddenPages();return this.pageId?e.includes(this.pageId)?`Tab in background, showing the last data.`:``:e.length?e.length===1?`A tab is in the background, showing its last data.`:`${e.length} tabs are in the background, showing their last data.`:``});stopVisibility=()=>{};stopNative=()=>{};stopCapacitor=()=>{};stopFollowing=()=>{};stopHighlights=()=>{};nav=Kv(`nav`);main=Kv(`main`);injector=E(Ss);themeService=E(RJ);navObserver;navFade=j({start:!1,end:!1});constructor(){E(CO).use(this.rpc),zd(()=>{let e=this.nav()?.nativeElement;e&&typeof ResizeObserver<`u`&&(this.navObserver=new ResizeObserver(()=>this.measureNav()),this.navObserver.observe(e))}),cy(()=>{this.tab(),this.tabs(),jv(()=>{this.revealActiveTab(),this.measureNav()})}),dc(()=>{let e=this.openedDock(),t=this.rpc();e&&t&&jv(()=>void hE(t,`hub-dock-seen`,BT(e.dock)))}),dc(()=>{let e=this.themeService.current();jv(()=>{try{window.parent!==window&&LJ(window.parent.document,e)}catch{}})})}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.scrollLeft{this.openedDock.set({dock:e}),e===RY?this.showFullPanel():this.showView(e)});let e=QJ(location.hash,$J(this.tabScope()),this.availableTabs().map(e=>e.id));e?this.tab.set(e):!this.view()&&QJ(location.hash,$J(this.tabScope()),[`capacitor`])===`capacitor`?this.restoreCapacitor=!0:!this.view()&&QJ(location.hash,$J(this.tabScope()),[`analog`])===`analog`&&(this.restoreAnalog=!0),this.stopHighlights=_E(()=>this.rpc()),this.connect()}connecting=!1;retries=0;retryTimer;connect(){if(this.connecting||this.rpc())return;this.connecting=!0,clearTimeout(this.retryTimer);let e=rY();LT(e?{baseURL:e}:{}).then(e=>{if(this.connecting=!1,this.destroyed){e.close?.();return}this.retries=0,this.connectionFailed.set(!1),this.refocusOnConnect&&this.focusCurrentTab(),this.refocusOnConnect=!1,this.rpc.set(e),this.connected.set(!0),this.watchVisibility(e),this.watchAngularNative(e),this.watchCapacitor(e),e.scope(`pangular`).rpc.call(`analog-project`).then(e=>{let t=!!e?.analog;this.analog.set(t),this.analogKnown.set(!0),t&&this.restoreAnalog&&PE(`analog`,this.config())&&this.tab.set(`analog`),this.restoreAnalog=!1,!t&&this.tab()===`analog`&&!this.view()&&this.tab.set(`dashboard`)},()=>{this.analogKnown.set(!0),this.restoreAnalog=!1,this.tab()===`analog`&&!this.view()&&this.tab.set(`dashboard`)}),e.events.on(`connection:status`,t=>{this.connected.set(t===`connected`),!(t!==`disconnected`&&t!==`error`||this.rpc()!==e)&&(this.rpc.set(null),e.close?.(),this.retryLater())})},()=>{this.connecting=!1,!this.destroyed&&(this.analogKnown.set(!0),this.nativeKnown.set(!0),this.retryLater())})}retryLater(){if(this.destroyed)return;this.connectionFailed.set(!0);let e=JY[Math.min(this.retries++,JY.length-1)];clearTimeout(this.retryTimer),this.retryTimer=setTimeout(()=>this.connect(),e)}retryConnection(){this.retries=0,this.refocusOnConnect=!0,this.connect()}refocusOnConnect=!1;destroyed=!1;ngOnDestroy(){this.destroyed=!0,clearTimeout(this.retryTimer),this.stopNative(),this.stopCapacitor(),this.stopFollowing(),this.stopVisibility(),this.stopHighlights(),this.navObserver?.disconnect()}showView(e){if(e===this.view())return;lE(e===`angular-native`?this.nativePageId():null),this.view.set(e);let t=new URL(location.href);t.searchParams.set(`view`,e),t.hash=``,history.replaceState(history.state,``,t)}showFullPanel(e){if(!this.view())return;lE(null),this.view.set(null);let t=new URL(location.href);t.searchParams.delete(`view`),t.hash=e?`tab=${e}`:``,history.replaceState(history.state,``,t);let n=e??$J(this.tabScope()),r=this.availableTabs().map(e=>e.id),i=QJ(t.hash,n,r);i?this.setTab(i):n===`capacitor`&&(this.restoreCapacitor=!0)}openFullPanel(e,t){XJ(e)&&qJ()&&(e.preventDefault(),this.showFullPanel(t),this.focusCurrentTab(),JJ(RY))}formFocus=j(null);componentFocus=Nv({source:this.tab,computation:()=>null});showForm(e){this.formFocus.set({id:e}),this.switchTab(`forms`)}showComponent(e){this.config().inspectors.components&&(this.switchTab(`components`),this.componentFocus.set(e))}inspectFromPanel({source:e,origin:t,data:n}){if(e!==window.parent||t!==location.origin)return;let r=n;r?.type===`pangular:inspect-component`&&typeof r.id==`string`&&this.tab()===`components`&&this.config().inspectors.components&&this.componentFocus.set({id:r.id})}switchTab(e){let t=HY[e];if(this.view()===`angular`&&t){this.activateDock(t,e);return}this.setTab(e),history.replaceState(history.state,``,`#tab=${e}`)}restoreAnalog=!1;restoreCapacitor=!1;setTab(e){this.restoreAnalog=!1,this.restoreCapacitor=!1,this.keepFocus(),this.tab.set(e),eY(this.tabScope(),e)}tabScope(){return this.view()??`panel`}async watchAngularNative(e){try{let t=await e.scope(`pangular`).rpc.sharedState(`component-tree`),n=e=>{let t=e?.pages,n=FD(t,this.nativePageId());this.view()===`angular-native`&&lE(n),this.nativePageId.set(n),this.nativeKnown.set(!0)};n(t.value()),this.stopNative(),this.stopNative=t.on(`updated`,n)}catch{this.nativeKnown.set(!0)}}async watchCapacitor(e){try{let t=await e.scope(`pangular`).rpc.sharedState(`capacitor`),n=e=>{if(e===void 0)return;let t=rq(e).length>0;this.capacitorReporting.set(t),this.capacitorKnown.set(!0),t&&this.restoreCapacitor&&PE(`capacitor`,this.config())&&(this.restoreCapacitor=!1,this.tab.set(`capacitor`)),!t&&this.tab()===`capacitor`&&!this.view()&&this.tab.set(`dashboard`)};n(t.value()),this.stopCapacitor(),this.stopCapacitor=t.on(`updated`,n)}catch{this.capacitorReporting.set(!1),this.capacitorKnown.set(!0)}}async watchVisibility(e){try{let t=await e.scope(`pangular`).rpc.sharedState(`page-visibility`),n=e=>{let t=e?.hidden;this.hiddenPages.set(Array.isArray(t)?t.filter(e=>typeof e==`string`):[])};n(t.value()),this.stopVisibility(),this.stopVisibility=t.on(`updated`,n)}catch{}}keepFocus(){let e=document.activeElement,t=this.main()?.nativeElement;(!e||e===document.body||t?.contains(e))&&this.focusCurrentTab()}focusCurrentTab(){zd(()=>{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 JJ(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:BT(e)}),this.keepFocus(),this.showView(e)}catch{this.setTab(t)}}static ɵfac=function(t){return new(t||e)};static ɵcmp=Wh({type:e,selectors:[[`app-root`]],viewQuery:function(e,t){e&1&&c_(t.nav,oY,5)(t.main,sY,5),e&2&&l_(2)},hostVars:4,hostBindings:function(e,t){e&1&&G(`message`,function(e){return t.inspectFromPanel(e)},Mu),e&2&&j_(`--%NS%accent`,t.viewAccent()?.accent??null)(`--%NS%accent-text`,t.viewAccent()?.text??null)},decls:29,vars:22,consts:[[`nav`,``],[`main`,``],[1,`brand`],[1,`mark`],[`width`,`22`,`height`,`22`,`viewBox`,`0 0 256 256`,`aria-hidden`,`true`],[`width`,`22`,`height`,`22`,`viewBox`,`0 0 32 32`,`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`,`30`,`height`,`30`,`viewBox`,`0 0 500 500`,`aria-hidden`,`true`],[1,`title`],[`aria-label`,`Inspectors`,3,`scroll`,`keydown`],[`role`,`toolbar`,`aria-label`,`Inspectors`,`aria-orientation`,`horizontal`,1,`tab-bar`],[1,`full-panel`,3,`href`],[`role`,`status`,1,`status`],[`aria-hidden`,`true`,1,`dot`],[`tabindex`,`-1`],[`role`,`status`,1,`background-note`],[`role`,`alert`,1,`connection-error`],[3,`info`],[`role`,`status`,1,`turned-off`],[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`],[`id`,`an-mark-grad`,`x1`,`0`,`y1`,`0`,`x2`,`1`,`y2`,`1`],[`offset`,`0`,`stop-color`,`#f0224f`],[`offset`,`1`,`stop-color`,`#c4002d`],[`d`,`M16 0C27.2 0 32 4.8 32 16S27.2 32 16 32 0 27.2 0 16 4.8 0 16 0Z`,`fill`,`url(#an-mark-grad)`],[`transform`,`translate(6.4 6.4) scale(0.8)`,`fill`,`#fff`],[`d`,`M14.8486 0L23.138 16.8551L23.9996 3.99892L14.8486 0Z`],[`d`,`M16.9875 17.7114H7.01272L5.73926 20.627L12.0001 24L18.261 20.627L16.9875 17.7114Z`],[`d`,`M8.72168 13.9298H15.2812L11.9997 6.39575L8.72168 13.9298Z`],[`d`,`M9.15103 0L0 3.99892L0.861556 16.8551L9.15103 0Z`],[`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`],[`width`,`500`,`height`,`500`,`rx`,`112`,`fill`,`#1c1a17`],[`transform`,`translate(250 252) scale(1.38) translate(-120 -129)`],[`id`,`pi-mark-mask`],[`x`,`-60`,`y`,`-60`,`width`,`360`,`height`,`380`,`fill`,`#fff`],[`fill`,`none`,`stroke`,`#000`,`stroke-width`,`30`,`stroke-linejoin`,`miter`],[`d`,`M88 66 V196`],[`d`,`M88 66 H143 L170 98 L143 130 H88 Z`],[`id`,`pi-mark-clip`],[`x`,`-40`,`y`,`129`,`width`,`320`,`height`,`200`],[`transform`,`rotate(-10 120 129)`],[`cx`,`120`,`cy`,`129`,`rx`,`128`,`ry`,`34`,`fill`,`none`,`stroke`,`#78350f`,`stroke-width`,`10`],[`mask`,`url(#pi-mark-mask)`],[`fill`,`#fbbf24`,`d`,`M120 5 L2 46 L22 198 L120 253 Z`],[`fill`,`#f59e0b`,`d`,`M120 5 L238 46 L218 198 L120 253 Z`],[`clip-path`,`url(#pi-mark-clip)`,`cx`,`120`,`cy`,`129`,`rx`,`128`,`ry`,`34`,`fill`,`none`,`stroke`,`#1c1a17`,`stroke-width`,`22`],[`clip-path`,`url(#pi-mark-clip)`,`cx`,`120`,`cy`,`129`,`rx`,`128`,`ry`,`34`,`fill`,`none`,`stroke`,`#fde68a`,`stroke-width`,`10`],[`transform`,`translate(230.9 146.0) rotate(10) scale(1.5) translate(-4 -4)`],[`x1`,`9`,`y1`,`9`,`x2`,`21`,`y2`,`21`,`stroke`,`#1c1a17`,`stroke-width`,`14`,`stroke-linecap`,`round`],[`r`,`16`,`fill`,`#1c1a17`],[`x1`,`9`,`y1`,`9`,`x2`,`21`,`y2`,`21`,`stroke`,`#fde68a`,`stroke-width`,`7`,`stroke-linecap`,`round`],[`r`,`12`,`fill`,`#1c1a17`,`stroke`,`#fde68a`,`stroke-width`,`5`],[`type`,`button`,3,`active`],[`type`,`button`,3,`click`],[3,`name`],[1,`full-panel`,3,`click`,`href`],[`width`,`14`,`height`,`14`,`viewBox`,`0 0 24 24`,`aria-hidden`,`true`],[`x`,`3`,`y`,`3`,`width`,`7`,`height`,`7`,`rx`,`1.5`],[`x`,`14`,`y`,`3`,`width`,`7`,`height`,`7`,`rx`,`1.5`],[`x`,`3`,`y`,`14`,`width`,`7`,`height`,`7`,`rx`,`1.5`],[`x`,`14`,`y`,`14`,`width`,`7`,`height`,`7`,`rx`,`1.5`],[`target`,`_blank`,`rel`,`noopener noreferrer`,3,`href`],[1,`sr-only`],[3,`rpc`],[3,`rpc`,`focus`],[3,`navigate`,`rpc`],[3,`focusHandled`,`showForm`,`rpc`,`focus`],[3,`showComponent`,`rpc`],[3,`focusHandled`,`rpc`,`focus`]],template:function(e,t){if(e&1&&(z(0,`header`)(1,`h1`,2)(2,`span`,3),P(3,uY,2,0,`:svg:svg`,4)(4,dY,7,0,`:svg:svg`,4)(5,fY,11,0,`:svg:svg`,5)(6,pY,5,0,`:svg:svg`,6)(7,mY,2,0,`:svg:svg`,7)(8,hY,10,0,`:svg:svg`,8)(9,gY,24,0,`:svg:svg`,9),B(),z(10,`span`,10),J(11),B()(),z(12,`nav`,11,0),G(`scroll`,function(){return t.measureNav()})(`keydown`,function(e){return t.onNavKey(e)}),P(14,vY,3,0,`div`,12),B(),P(15,yY,7,1,`a`,13),z(16,`span`,14)(17,`span`,15),V(18,`span`),B(),J(19),B()(),z(20,`main`,16,1)(22,`p`,17),J(23),B(),P(24,bY,5,0,`div`,18)(25,xY,1,1,`app-coming-soon`,19)(26,SY,2,0,`p`,20)(27,wY,10,2,`p`,21)(28,LY,2,2),B()),e&2){let e,n;M(2),q(`ng-mark`,t.view()===`angular`)(`pi-mark`,!t.view()),M(),F(t.view()===`nativescript`?3:t.view()===`capacitor`?4:t.view()===`angular-native`?5:t.view()===`analog`?6:t.view()===`ngrx`?7:t.view()===`angular`?8:9),M(7),q(`ng-text`,t.view()===`angular`),M(),Y(t.title()),M(),q(`fade-start`,t.navFade().start)(`fade-end`,t.navFade().end),M(2),F(t.availableTabs().length>1?14:-1),M(),F((e=t.fullPanelLink())?15:-1,e),M(),q(`connected`,t.connected())(`failed`,t.connectionFailed()),M(3),X(` `,t.connected()?`Live`:t.connectionFailed()?`Disconnected`:`Connecting…`,` `),M(),N(`aria-label`,t.mainLabel()),M(3),Y(t.backgroundNote()),M(),F(t.connectionFailed()?24:(n=t.comingSoon())?25:t.view()===`angular-native`&&!t.nativePageId()?26:t.tabEnabled(t.tab(),t.config())?28:27,n)}},dependencies:[ED,nA,FN,tF,EI,BR,iV,TH,GW,UK,PJ,XK,KE],styles:[`[_nghost-%COMP%] {
+`}var pY=new Map;function mY(e,t=`dark`,n=50){let r=e?.querySelector(`devframes-dock-standalone`)?.shadowRoot;if(r){if(e){let t=pY.get(e);t!==void 0&&(clearTimeout(t),pY.delete(e))}let n=r.querySelector(`style[data-pangular]`);n||(n=e.createElement(`style`),n.dataset.pangular=``,r.append(n)),n.textContent=fY(t);return}if(n>0&&e){let r=pY.get(e);r!==void 0&&clearTimeout(r);let i=setTimeout(()=>{pY.delete(e),mY(e,t,n-1)},100);pY.set(e,i)}}var hY=class e{current=j(`dark`);constructor(){let e=E(ws),t=vY(),n=document.documentElement.dataset.theme,r=n===`light`||n===`dark`;if(n===`light`||n===`dark`)this.current.set(n);else if(t)r=!0,this.apply(_Y(t));else{let t=gY();if(t){this.current.set(t.matches?`light`:`dark`);let n=e=>{r||this.current.set(e.matches?`light`:`dark`)};t.addEventListener(`change`,n),e.onDestroy(()=>t.removeEventListener(`change`,n))}}let i;try{i=new BroadcastChannel(`pangular:theme`)}catch{}dc(()=>{let e=this.current();try{i?.postMessage(e)}catch{}for(let{win:t,origin:n}of yY())try{t.postMessage({type:`pangular:theme-change`,theme:e},n)}catch{}});let a=e=>{if(e.source!==window.parent)return;let t=e.data;t?.type===`pangular:theme-change`&&(r=!0,this.apply(t.theme===`dark`?`dark`:`light`))};window.addEventListener(`message`,a);let o;t&&(o=new MutationObserver(()=>this.apply(_Y(t))),o.observe(t,{attributes:!0,attributeFilter:[`class`]})),e.onDestroy(()=>{window.removeEventListener(`message`,a),o?.disconnect(),i?.close()})}apply(e){this.current.set(e),document.documentElement.dataset.theme=e}static ɵfac=function(t){return new(t||e)};static ɵprov=Al({token:e,factory:e.ɵfac})};function gY(){try{return window.matchMedia?.(`(prefers-color-scheme: light)`)??null}catch{return null}}function _Y(e){return e.classList.contains(`dark`)?`dark`:`light`}function vY(){try{return window.frameElement?.closest(`.devframes-color-root`)??null}catch{return null}}function yY(e=window){let t=[],n;try{n=e.location.ancestorOrigins}catch{}let r=e;try{for(let i=0;r!==r.parent;i++){r=r.parent;let a=bY(e,r,i,n);a&&t.push({win:r,origin:a})}}catch{}return t}function bY(e,t,n,r){let i=e=>e&&e!==`null`?e:void 0,a=i(r?.item(n));if(a)return a;try{let e=i(t.location.origin);if(e)return e}catch{}if(!(n>0))try{return i(new URL(e.document.referrer).origin)}catch{return}}var xY=`__DEVFRAME_HUB_CLIENT_CONTEXT__`;function SY(){try{return window.parent===window?void 0:window.parent[xY]}catch{return}}function CY(e,t,n=50){let r=SY();if(!r){if(n<=0||window.parent===window)return()=>{};let r=()=>{},i=setTimeout(()=>r=CY(e,t,n-1),100);return()=>{clearTimeout(i),r()}}let i=e.map(e=>r.docks.getStateById(HT(e))?.events.on(`entry:activated`,()=>t(e))??(()=>{})),a=r.docks.selectedId,o=e.find(e=>HT(e)===a);return o&&t(o),()=>i.forEach(e=>e())}function wY(){return!!SY()}async function TY(e){let t=SY();if(!t)return!1;try{return await t.docks.switchEntry(HT(e))}catch{return!1}}function EY(e,t){let n=new URL(e);return n.searchParams.delete(`view`),n.hash=t?`tab=${t}`:``,n.pathname+n.search+n.hash}function DY(e){return e.button===0&&!e.metaKey&&!e.ctrlKey&&!e.shiftKey&&!e.altKey}var OY=`pangular-tab`;function kY(e,t,n){let r=new URLSearchParams(e.replace(/^#/,``)).get(`tab`)||t;return n.find(e=>e===r)}function AY(e){try{return sessionStorage.getItem(`${OY}:${e}`)}catch{return null}}function jY(e,t){try{sessionStorage.setItem(`${OY}:${e}`,t)}catch{}}function MY(e,t){try{return new URL(e,t.href).origin===t.origin}catch{return!1}}function NY(e,t){if(t.protocol!==`chrome-extension:`)return!1;try{let{protocol:t}=new URL(e);return t===`http:`||t===`https:`}catch{return!1}}function PY(e=location){let t=new URLSearchParams(e.search).get(`baseURL`);if(t&&(MY(t,e)||NY(t,e)))return t;if(!(e.pathname.includes(`__pangular`)||e.pathname.includes(`__devframes/`)))return[`/__pangular/`,`./`]}var FY={dark:{ngrx:{accent:`#d770e8`,text:`#f0abfc`},analog:{accent:`#ff5470`,text:`#fda4af`},"angular-native":{accent:`#ff4d6d`,text:`#fda4af`},nativescript:{accent:`#8196ff`,text:`#a5b4fc`},capacitor:{accent:`#53b9ff`,text:`#7dd3fc`}},light:{ngrx:{accent:`#a21caf`,text:`#701a75`},analog:{accent:`#be123c`,text:`#881337`},"angular-native":{accent:`#be123c`,text:`#881337`},nativescript:{accent:`#3448c5`,text:`#3730a3`},capacitor:{accent:`#0369a1`,text:`#0c4a6e`}}};function IY(e,t){let n=FY[t];return e&&n[e]||null}var LY=[`nav`],RY=[`main`],zY=e=>[e],BY=(e,t)=>t.id;function VY(e,t){e&1&&(A(),z(0,`svg`,4),V(1,`path`,22),B())}function HY(e,t){e&1&&(A(),z(0,`svg`,4),V(1,`path`,23)(2,`path`,24)(3,`path`,25)(4,`path`,26)(5,`path`,27)(6,`path`,28),B())}function UY(e,t){e&1&&(A(),z(0,`svg`,5)(1,`defs`)(2,`linearGradient`,29),V(3,`stop`,30)(4,`stop`,31),B()(),V(5,`path`,32),z(6,`g`,33),V(7,`path`,34)(8,`path`,35)(9,`path`,36)(10,`path`,37),B()())}function WY(e,t){e&1&&(A(),z(0,`svg`,6),V(1,`path`,38)(2,`path`,39)(3,`path`,40)(4,`path`,41),B())}function GY(e,t){e&1&&(A(),z(0,`svg`,7),V(1,`path`,42),B())}function KY(e,t){e&1&&(A(),z(0,`svg`,8)(1,`defs`)(2,`linearGradient`,43),V(3,`stop`,44)(4,`stop`,45)(5,`stop`,46)(6,`stop`,47)(7,`stop`,48)(8,`stop`,49),B()(),V(9,`path`,50),B())}function qY(e,t){e&1&&(A(),z(0,`svg`,9),V(1,`rect`,51),z(2,`g`,52)(3,`defs`)(4,`mask`,53),V(5,`rect`,54),z(6,`g`,55),V(7,`path`,56)(8,`path`,57),B()(),z(9,`clipPath`,58),V(10,`rect`,59),B()(),z(11,`g`,60),V(12,`ellipse`,61),B(),z(13,`g`,62),V(14,`path`,63)(15,`path`,64),B(),z(16,`g`,60),V(17,`ellipse`,65)(18,`ellipse`,66),z(19,`g`,67),V(20,`line`,68)(21,`circle`,69)(22,`line`,70)(23,`circle`,71),B()()()())}function JY(e,t){if(e&1){let e=W();z(0,`button`,73),G(`click`,function(){let t=O(e).$implicit;return k(K(2).switchTab(t.id))}),V(1,`app-tab-icon`,74),z(2,`span`),J(3),B()()}if(e&2){let e=t.$implicit,n=K(2);q(`active`,n.tab()===e.id),N(`aria-current`,n.tab()===e.id?`page`:null)(`tabindex`,n.rovingTab()===e.id?0:-1),M(),R(`name`,e.id),M(2),Y(e.label)}}function YY(e,t){if(e&1&&(z(0,`div`,12),I(1,JY,4,6,`button`,72,BY),B()),e&2){let e=K();M(),L(e.tabs())}}function XY(e,t){if(e&1){let e=W();z(0,`a`,75),G(`click`,function(t){let n=O(e);return k(K().openFullPanel(t,n.tab))}),A(),z(1,`svg`,76),V(2,`rect`,77)(3,`rect`,78)(4,`rect`,79)(5,`rect`,80),B(),J(6,` Open full panel `),B()}e&2&&R(`href`,t.href,Au)}function ZY(e,t){if(e&1){let e=W();z(0,`div`,18)(1,`p`),J(2,` Can't reach the devtools server. Check that the dev server is running. The panel keeps trying to connect. `),B(),z(3,`button`,73),G(`click`,function(){return O(e),k(K().retryConnection())}),J(4,`Retry now`),B()()}}function QY(e,t){e&1&&V(0,`app-coming-soon`,19),e&2&&R(`info`,t)}function $Y(e,t){e&1&&(z(0,`p`,20),J(1,`Looking for an Angular Native app…`),B())}function eX(e,t){e&1&&(J(0,` To turn it on, set `),z(1,`code`),J(2),B(),J(3,` in the devtools options. `)),e&2&&(M(2),Y(t))}function tX(e,t){if(e&1&&(z(0,`p`,21),J(1,` This inspector is turned off in the devtools config (`),z(2,`code`),J(3,`inspectors`),B(),J(4,`). `),P(5,eX,4,1),z(6,`a`,81),J(7,`About inspectors`),z(8,`span`,82),J(9,` (opens in a new tab)`),B()()()),e&2){let e,t=K();M(5),F((e=t.turnOnSnippet())?5:-1,e),M(),R(`href`,t.inspectorsDocsUrl,Au)}}function nX(e,t){if(e&1){let e=W();z(0,`app-dashboard`,85),G(`navigate`,function(t){return O(e),k(K(3).switchTab(t))}),B()}e&2&&R(`rpc`,K(3).rpc())}function rX(e,t){if(e&1){let e=W();z(0,`app-component-tree`,86),G(`focusHandled`,function(){return O(e),k(K(3).componentFocus.set(null))})(`showForm`,function(t){return O(e),k(K(3).showForm(t))}),B()}if(e&2){let e=K(3);R(`rpc`,e.rpc())(`focus`,e.componentFocus())}}function iX(e,t){if(e&1){let e=W();z(0,`app-route-inspector`,87),G(`showComponent`,function(t){return O(e),k(K(3).showComponent(t))}),B()}e&2&&R(`rpc`,K(3).rpc())}function aX(e,t){e&1&&V(0,`app-signal-inspector`,83),e&2&&R(`rpc`,K(3).rpc())}function oX(e,t){e&1&&V(0,`app-di-inspector`,83),e&2&&R(`rpc`,K(3).rpc())}function sX(e,t){e&1&&V(0,`app-store-inspector`,83),e&2&&R(`rpc`,K(3).rpc())}function cX(e,t){e&1&&V(0,`app-network-inspector`,83),e&2&&R(`rpc`,K(3).rpc())}function lX(e,t){if(e&1){let e=W();z(0,`app-forms-inspector`,88),G(`focusHandled`,function(){return O(e),k(K(3).formFocus.set(null))}),B()}if(e&2){let e=K(3);R(`rpc`,e.rpc())(`focus`,e.formFocus())}}function uX(e,t){e&1&&V(0,`app-pipes-inspector`,83),e&2&&R(`rpc`,K(3).rpc())}function dX(e,t){e&1&&V(0,`app-analog-inspector`,83),e&2&&R(`rpc`,K(3).rpc())}function fX(e,t){e&1&&V(0,`app-capacitor-inspector`,83),e&2&&R(`rpc`,K(3).rpc())}function pX(e,t){if(e&1&&P(0,nX,1,1,`app-dashboard`,83)(1,rX,1,2,`app-component-tree`,84)(2,iX,1,1,`app-route-inspector`,83)(3,aX,1,1,`app-signal-inspector`,83)(4,oX,1,1,`app-di-inspector`,83)(5,sX,1,1,`app-store-inspector`,83)(6,cX,1,1,`app-network-inspector`,83)(7,lX,1,2,`app-forms-inspector`,84)(8,uX,1,1,`app-pipes-inspector`,83)(9,dX,1,1,`app-analog-inspector`,83)(10,fX,1,1,`app-capacitor-inspector`,83),e&2){let e;F((e=K(2).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:e===`capacitor`?10:-1)}}function mX(e,t){e&1&&I(0,pX,11,1,null,null,Og),e&2&&L(hv(0,zY,K().scopeKey()))}var hX=`all`,gX=[hX,...VT],_X={angular:`Angular`,ngrx:`NgRx Store`,analog:`Analog`,"angular-native":`Angular Native`,nativescript:`NativeScript`,capacitor:`Capacitor`},vX={ngrx:`store`,analog:`analog`,capacitor:`capacitor`},yX={store:`ngrx`,analog:`analog`,capacitor:`capacitor`},bX={"angular-native":[`components`,`signals`,`injectors`,`store`,`pipes`]},xX={id:`nativescript`,name:`NativeScript`,badge:`Available`,heading:`Inspect NativeScript apps`,summary:`A NativeScript Angular app reports from the simulator or device to this server, and its components, signals, injectors and NgRx stores show up in the Angular dock.`,color:`#3c5afd`,plansTitle:`Set up an app`,plans:[`Install @pangular-inspector/devtools and @valor/nativescript-websockets`,`Call initNativeScriptOverlay() in main.ts, before the app bootstraps`,`Run npx pangular dev --no-auth in the app, then open the Angular dock`],link:{label:`NativeScript setup guide`,href:`https://pangular-inspector.dev/guides/nativescript/`}},SX={id:`capacitor`,name:`Capacitor`,badge:`Available`,heading:`Inspect Capacitor apps`,summary:`An Ionic or Capacitor app runs the browser overlay in its WebView and reports to this server, so it shows up in the Angular dock like a browser tab.`,color:`#119eff`,plansTitle:`Set up an app`,plans:[`With live reload on localhost, load @pangular-inspector/devtools/overlay as in a browser`,`In a bundled build, call initOverlay() from @pangular-inspector/devtools/overlay-manual with this server’s address and connectionMeta`,`Run the app, then come back here for its plugin calls, or open the Angular dock`],link:{label:`Capacitor setup guide`,href:`https://pangular-inspector.dev/guides/capacitor/`}},CX={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`}},wX={id:`angular-native`,name:`Angular Native`,badge:`Not connected`,heading:`No Angular Native app is connected`,summary:`Start the overlay in your Angular Native app and run this server with --no-auth. The tabs fill as soon as the app reports.`,color:`#e11d48`,plans:[`The component tree, with the view outlined on the device`,`Signals and injectors of the running app`,`Live @ngrx/signals and @ngrx/store state`],link:{label:`Set up Angular Native`,href:`https://pangular-inspector.dev/guides/angular-native/`}},TX=[1e3,2e3,5e3,1e4];function EX(){let e=new URLSearchParams(location.search).get(`view`);return VT.find(t=>t===e)??null}$b(class e{analog=j(!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`},{id:`capacitor`,label:`Capacitor`}];view=j(EX());viewAccent=Q(()=>IY(this.view(),this.themeService.current()));title=Q(()=>{let e=this.view();return e?_X[e]:`Pangular Inspector`});mainLabel=Q(()=>this.availableTabs().find(e=>e.id===this.tab())?.label??this.title());analogKnown=j(!1);capacitorReporting=j(!1);capacitorKnown=j(!1);nativePageId=j(null);nativeKnown=j(!1);scopeKey=Q(()=>this.view()===`angular-native`?this.nativePageId()??``:``);comingSoon=Q(()=>{let e=this.view();if(e===`analog`)return this.analogKnown()&&!this.analog()?CX:void 0;if(e===`nativescript`)return xX;if(e===`capacitor`)return this.config().inspectors.capacitor&&this.capacitorKnown()&&!this.capacitorReporting()?SX:void 0;if(e===`angular-native`)return this.nativeKnown()&&!this.nativePageId()?wX:void 0});config=Q(()=>jE(this.rpc()));tabEnabled=IE;inspectorsDocsUrl=FE;turnOnSnippet=Q(()=>{let e=PE(this.tab());return e?`inspectors: {${e}: true}`:null});availableTabs=Q(()=>{if(this.comingSoon())return[];let e=this.view(),t=e?vX[e]:void 0,n=this.allTabs.filter(e=>IE(e.id,this.config()));if(t)return n.filter(e=>e.id===t);let r=e?bX[e]:void 0;return r?n.filter(e=>r.includes(e.id)):n.filter(t=>(t.id!==`analog`||this.analog())&&(t.id!==`capacitor`||this.capacitorReporting())&&!(e===`angular`&&yX[t.id]))});tabs=Q(()=>{let e=this.availableTabs();if(this.rpc())return e;let t=this.tab();return e.filter(e=>e.id===`dashboard`||e.id===t)});rovingTab=Q(()=>{let e=this.tabs(),t=this.tab();return e.some(e=>e.id===t)?t:e[0]?.id});onNavKey(e){let t=this.nav()?.nativeElement;if(!t||e.altKey||e.ctrlKey||e.metaKey)return;let n=[...t.querySelectorAll(`button`)],r=n.indexOf(document.activeElement);if(r<0)return;let i=n.length-1,a={ArrowRight:r===i?0:r+1,ArrowLeft:r===0?i:r-1,Home:0,End:i},o=Object.hasOwn(a,e.key)?a[e.key]:-1;o<0||(e.preventDefault(),n[o].focus())}fullPanelLink=Q(()=>{let e=this.view();if(!e||location.protocol===`chrome-extension:`)return null;let t=this.comingSoon()?`dashboard`:vX[e]??this.tab();return{tab:t,href:EY(location.href,t)}});tab=Fv(()=>{let e=this.view();return e&&(vX[e]??bX[e]?.[0])||`dashboard`});rpc=j(null);openedDock=j(null);connected=j(!1);connectionFailed=j(!1);hiddenPages=j([]);pageId=fE();backgroundNote=Q(()=>{let e=this.hiddenPages();return this.pageId?e.includes(this.pageId)?`Tab in background, showing the last data.`:``:e.length?e.length===1?`A tab is in the background, showing its last data.`:`${e.length} tabs are in the background, showing their last data.`:``});stopVisibility=()=>{};stopNative=()=>{};stopCapacitor=()=>{};stopFollowing=()=>{};stopHighlights=()=>{};nav=Jv(`nav`);main=Jv(`main`);injector=E(Ss);themeService=E(hY);navObserver;navFade=j({start:!1,end:!1});constructor(){E(TO).use(this.rpc),zd(()=>{let e=this.nav()?.nativeElement;e&&typeof ResizeObserver<`u`&&(this.navObserver=new ResizeObserver(()=>this.measureNav()),this.navObserver.observe(e))}),uy(()=>{this.tab(),this.tabs(),Nv(()=>{this.revealActiveTab(),this.measureNav()})}),dc(()=>{let e=this.openedDock(),t=this.rpc();e&&t&&Nv(()=>void _E(t,`hub-dock-seen`,HT(e.dock)))}),dc(()=>{let e=this.themeService.current();Nv(()=>{try{window.parent!==window&&mY(window.parent.document,e)}catch{}})})}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.scrollLeft{this.openedDock.set({dock:e}),e===hX?this.showFullPanel():this.showView(e)});let e=kY(location.hash,AY(this.tabScope()),this.availableTabs().map(e=>e.id));e?this.tab.set(e):!this.view()&&kY(location.hash,AY(this.tabScope()),[`capacitor`])===`capacitor`?this.restoreCapacitor=!0:!this.view()&&kY(location.hash,AY(this.tabScope()),[`analog`])===`analog`&&(this.restoreAnalog=!0),this.stopHighlights=yE(()=>this.rpc()),this.connect()}connecting=!1;retries=0;retryTimer;connect(){if(this.connecting||this.rpc())return;this.connecting=!0,clearTimeout(this.retryTimer);let e=PY();zT(e?{baseURL:e}:{}).then(e=>{if(this.connecting=!1,this.destroyed){e.close?.();return}this.retries=0,this.connectionFailed.set(!1),this.refocusOnConnect&&this.focusCurrentTab(),this.refocusOnConnect=!1,this.rpc.set(e),this.connected.set(!0),this.watchVisibility(e),this.watchAngularNative(e),this.watchCapacitor(e),e.scope(`pangular`).rpc.call(`analog-project`).then(e=>{let t=!!e?.analog;this.analog.set(t),this.analogKnown.set(!0),t&&this.restoreAnalog&&IE(`analog`,this.config())&&this.tab.set(`analog`),this.restoreAnalog=!1,!t&&this.tab()===`analog`&&!this.view()&&this.tab.set(`dashboard`)},()=>{this.analogKnown.set(!0),this.restoreAnalog=!1,this.tab()===`analog`&&!this.view()&&this.tab.set(`dashboard`)}),e.events.on(`connection:status`,t=>{this.connected.set(t===`connected`),!(t!==`disconnected`&&t!==`error`||this.rpc()!==e)&&(this.rpc.set(null),e.close?.(),this.retryLater())})},()=>{this.connecting=!1,!this.destroyed&&(this.analogKnown.set(!0),this.nativeKnown.set(!0),this.retryLater())})}retryLater(){if(this.destroyed)return;this.connectionFailed.set(!0);let e=TX[Math.min(this.retries++,TX.length-1)];clearTimeout(this.retryTimer),this.retryTimer=setTimeout(()=>this.connect(),e)}retryConnection(){this.retries=0,this.refocusOnConnect=!0,this.connect()}refocusOnConnect=!1;destroyed=!1;ngOnDestroy(){this.destroyed=!0,clearTimeout(this.retryTimer),this.stopNative(),this.stopCapacitor(),this.stopFollowing(),this.stopVisibility(),this.stopHighlights(),this.navObserver?.disconnect()}showView(e){if(e===this.view())return;dE(e===`angular-native`?this.nativePageId():null),this.view.set(e);let t=new URL(location.href);t.searchParams.set(`view`,e),t.hash=``,history.replaceState(history.state,``,t)}showFullPanel(e){if(!this.view())return;dE(null),this.view.set(null);let t=new URL(location.href);t.searchParams.delete(`view`),t.hash=e?`tab=${e}`:``,history.replaceState(history.state,``,t);let n=e??AY(this.tabScope()),r=this.availableTabs().map(e=>e.id),i=kY(t.hash,n,r);i?this.setTab(i):n===`capacitor`&&(this.restoreCapacitor=!0)}openFullPanel(e,t){DY(e)&&wY()&&(e.preventDefault(),this.showFullPanel(t),this.focusCurrentTab(),TY(hX))}formFocus=j(null);componentFocus=Fv({source:this.tab,computation:()=>null});showForm(e){this.formFocus.set({id:e}),this.switchTab(`forms`)}showComponent(e){this.config().inspectors.components&&(this.switchTab(`components`),this.componentFocus.set(e))}inspectFromPanel({source:e,origin:t,data:n}){if(e!==window.parent||t!==location.origin)return;let r=n;r?.type===`pangular:inspect-component`&&typeof r.id==`string`&&this.tab()===`components`&&this.config().inspectors.components&&this.componentFocus.set({id:r.id})}switchTab(e){let t=yX[e];if(this.view()===`angular`&&t){this.activateDock(t,e);return}this.setTab(e),history.replaceState(history.state,``,`#tab=${e}`)}restoreAnalog=!1;restoreCapacitor=!1;setTab(e){this.restoreAnalog=!1,this.restoreCapacitor=!1,this.keepFocus(),this.tab.set(e),jY(this.tabScope(),e)}tabScope(){return this.view()??`panel`}async watchAngularNative(e){try{let t=await e.scope(`pangular`).rpc.sharedState(`component-tree`),n=e=>{let t=e?.pages,n=LD(t,this.nativePageId());this.view()===`angular-native`&&dE(n),this.nativePageId.set(n),this.nativeKnown.set(!0)};n(t.value()),this.stopNative(),this.stopNative=t.on(`updated`,n)}catch{this.nativeKnown.set(!0)}}async watchCapacitor(e){try{let t=await e.scope(`pangular`).rpc.sharedState(`capacitor`),n=e=>{if(e===void 0)return;let t=Pq(e).length>0;this.capacitorReporting.set(t),this.capacitorKnown.set(!0),t&&this.restoreCapacitor&&IE(`capacitor`,this.config())&&(this.restoreCapacitor=!1,this.tab.set(`capacitor`)),!t&&this.tab()===`capacitor`&&!this.view()&&this.tab.set(`dashboard`)};n(t.value()),this.stopCapacitor(),this.stopCapacitor=t.on(`updated`,n)}catch{this.capacitorReporting.set(!1),this.capacitorKnown.set(!0)}}async watchVisibility(e){try{let t=await e.scope(`pangular`).rpc.sharedState(`page-visibility`),n=e=>{let t=e?.hidden;this.hiddenPages.set(Array.isArray(t)?t.filter(e=>typeof e==`string`):[])};n(t.value()),this.stopVisibility(),this.stopVisibility=t.on(`updated`,n)}catch{}}keepFocus(){let e=document.activeElement,t=this.main()?.nativeElement;(!e||e===document.body||t?.contains(e))&&this.focusCurrentTab()}focusCurrentTab(){zd(()=>{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 TY(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:HT(e)}),this.keepFocus(),this.showView(e)}catch{this.setTab(t)}}static ɵfac=function(t){return new(t||e)};static ɵcmp=Wh({type:e,selectors:[[`app-root`]],viewQuery:function(e,t){e&1&&c_(t.nav,LY,5)(t.main,RY,5),e&2&&l_(2)},hostVars:4,hostBindings:function(e,t){e&1&&G(`message`,function(e){return t.inspectFromPanel(e)},Mu),e&2&&j_(`--%NS%accent`,t.viewAccent()?.accent??null)(`--%NS%accent-text`,t.viewAccent()?.text??null)},decls:29,vars:22,consts:[[`nav`,``],[`main`,``],[1,`brand`],[1,`mark`],[`width`,`22`,`height`,`22`,`viewBox`,`0 0 256 256`,`aria-hidden`,`true`],[`width`,`22`,`height`,`22`,`viewBox`,`0 0 32 32`,`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`,`30`,`height`,`30`,`viewBox`,`0 0 500 500`,`aria-hidden`,`true`],[1,`title`],[`aria-label`,`Inspectors`,3,`scroll`,`keydown`],[`role`,`toolbar`,`aria-label`,`Inspectors`,`aria-orientation`,`horizontal`,1,`tab-bar`],[1,`full-panel`,3,`href`],[`role`,`status`,1,`status`],[`aria-hidden`,`true`,1,`dot`],[`tabindex`,`-1`],[`role`,`status`,1,`background-note`],[`role`,`alert`,1,`connection-error`],[3,`info`],[`role`,`status`,1,`turned-off`],[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`],[`id`,`an-mark-grad`,`x1`,`0`,`y1`,`0`,`x2`,`1`,`y2`,`1`],[`offset`,`0`,`stop-color`,`#f0224f`],[`offset`,`1`,`stop-color`,`#c4002d`],[`d`,`M16 0C27.2 0 32 4.8 32 16S27.2 32 16 32 0 27.2 0 16 4.8 0 16 0Z`,`fill`,`url(#an-mark-grad)`],[`transform`,`translate(6.4 6.4) scale(0.8)`,`fill`,`#fff`],[`d`,`M14.8486 0L23.138 16.8551L23.9996 3.99892L14.8486 0Z`],[`d`,`M16.9875 17.7114H7.01272L5.73926 20.627L12.0001 24L18.261 20.627L16.9875 17.7114Z`],[`d`,`M8.72168 13.9298H15.2812L11.9997 6.39575L8.72168 13.9298Z`],[`d`,`M9.15103 0L0 3.99892L0.861556 16.8551L9.15103 0Z`],[`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`],[`width`,`500`,`height`,`500`,`rx`,`112`,`fill`,`#1c1a17`],[`transform`,`translate(250 252) scale(1.38) translate(-120 -129)`],[`id`,`pi-mark-mask`],[`x`,`-60`,`y`,`-60`,`width`,`360`,`height`,`380`,`fill`,`#fff`],[`fill`,`none`,`stroke`,`#000`,`stroke-width`,`30`,`stroke-linejoin`,`miter`],[`d`,`M88 66 V196`],[`d`,`M88 66 H143 L170 98 L143 130 H88 Z`],[`id`,`pi-mark-clip`],[`x`,`-40`,`y`,`129`,`width`,`320`,`height`,`200`],[`transform`,`rotate(-10 120 129)`],[`cx`,`120`,`cy`,`129`,`rx`,`128`,`ry`,`34`,`fill`,`none`,`stroke`,`#78350f`,`stroke-width`,`10`],[`mask`,`url(#pi-mark-mask)`],[`fill`,`#fbbf24`,`d`,`M120 5 L2 46 L22 198 L120 253 Z`],[`fill`,`#f59e0b`,`d`,`M120 5 L238 46 L218 198 L120 253 Z`],[`clip-path`,`url(#pi-mark-clip)`,`cx`,`120`,`cy`,`129`,`rx`,`128`,`ry`,`34`,`fill`,`none`,`stroke`,`#1c1a17`,`stroke-width`,`22`],[`clip-path`,`url(#pi-mark-clip)`,`cx`,`120`,`cy`,`129`,`rx`,`128`,`ry`,`34`,`fill`,`none`,`stroke`,`#fde68a`,`stroke-width`,`10`],[`transform`,`translate(230.9 146.0) rotate(10) scale(1.5) translate(-4 -4)`],[`x1`,`9`,`y1`,`9`,`x2`,`21`,`y2`,`21`,`stroke`,`#1c1a17`,`stroke-width`,`14`,`stroke-linecap`,`round`],[`r`,`16`,`fill`,`#1c1a17`],[`x1`,`9`,`y1`,`9`,`x2`,`21`,`y2`,`21`,`stroke`,`#fde68a`,`stroke-width`,`7`,`stroke-linecap`,`round`],[`r`,`12`,`fill`,`#1c1a17`,`stroke`,`#fde68a`,`stroke-width`,`5`],[`type`,`button`,3,`active`],[`type`,`button`,3,`click`],[3,`name`],[1,`full-panel`,3,`click`,`href`],[`width`,`14`,`height`,`14`,`viewBox`,`0 0 24 24`,`aria-hidden`,`true`],[`x`,`3`,`y`,`3`,`width`,`7`,`height`,`7`,`rx`,`1.5`],[`x`,`14`,`y`,`3`,`width`,`7`,`height`,`7`,`rx`,`1.5`],[`x`,`3`,`y`,`14`,`width`,`7`,`height`,`7`,`rx`,`1.5`],[`x`,`14`,`y`,`14`,`width`,`7`,`height`,`7`,`rx`,`1.5`],[`target`,`_blank`,`rel`,`noopener noreferrer`,3,`href`],[1,`sr-only`],[3,`rpc`],[3,`rpc`,`focus`],[3,`navigate`,`rpc`],[3,`focusHandled`,`showForm`,`rpc`,`focus`],[3,`showComponent`,`rpc`],[3,`focusHandled`,`rpc`,`focus`]],template:function(e,t){if(e&1&&(z(0,`header`)(1,`h1`,2)(2,`span`,3),P(3,VY,2,0,`:svg:svg`,4)(4,HY,7,0,`:svg:svg`,4)(5,UY,11,0,`:svg:svg`,5)(6,WY,5,0,`:svg:svg`,6)(7,GY,2,0,`:svg:svg`,7)(8,KY,10,0,`:svg:svg`,8)(9,qY,24,0,`:svg:svg`,9),B(),z(10,`span`,10),J(11),B()(),z(12,`nav`,11,0),G(`scroll`,function(){return t.measureNav()})(`keydown`,function(e){return t.onNavKey(e)}),P(14,YY,3,0,`div`,12),B(),P(15,XY,7,1,`a`,13),z(16,`span`,14)(17,`span`,15),V(18,`span`),B(),J(19),B()(),z(20,`main`,16,1)(22,`p`,17),J(23),B(),P(24,ZY,5,0,`div`,18)(25,QY,1,1,`app-coming-soon`,19)(26,$Y,2,0,`p`,20)(27,tX,10,2,`p`,21)(28,mX,2,2),B()),e&2){let e,n;M(2),q(`ng-mark`,t.view()===`angular`)(`pi-mark`,!t.view()),M(),F(t.view()===`nativescript`?3:t.view()===`capacitor`?4:t.view()===`angular-native`?5:t.view()===`analog`?6:t.view()===`ngrx`?7:t.view()===`angular`?8:9),M(7),q(`ng-text`,t.view()===`angular`),M(),Y(t.title()),M(),q(`fade-start`,t.navFade().start)(`fade-end`,t.navFade().end),M(2),F(t.availableTabs().length>1?14:-1),M(),F((e=t.fullPanelLink())?15:-1,e),M(),q(`connected`,t.connected())(`failed`,t.connectionFailed()),M(3),X(` `,t.connected()?`Live`:t.connectionFailed()?`Disconnected`:`Connecting…`,` `),M(),N(`aria-label`,t.mainLabel()),M(3),Y(t.backgroundNote()),M(),F(t.connectionFailed()?24:(n=t.comingSoon())?25:t.view()===`angular-native`&&!t.nativePageId()?26:t.tabEnabled(t.tab(),t.config())?28:27,n)}},dependencies:[OD,jA,uP,AF,nL,_z,FV,nU,SG,bq,dY,Dq,JE],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;
@@ -14483,4 +14757,4 @@ main[_ngcontent-%COMP%]    > *[_ngcontent-%COMP%] {
     flex-shrink: 1;
     gap: 8px;
   }
-}`]})}).catch(console.error);export{eS as t};
\ No newline at end of file
+}`]})}).catch(console.error);export{nS as t};
\ No newline at end of file
diff --git a/extension/ui/index.html b/extension/ui/index.html
index 463efaf8..400199ef 100644
--- a/extension/ui/index.html
+++ b/extension/ui/index.html
@@ -9,7 +9,7 @@
     
     Pangular Inspector
     
-    
+    
     
   
   
diff --git a/packages/devtools/src/__tests__/block-owner.test.ts b/packages/devtools/src/__tests__/block-owner.test.ts
new file mode 100644
index 00000000..667a7594
--- /dev/null
+++ b/packages/devtools/src/__tests__/block-owner.test.ts
@@ -0,0 +1,76 @@
+// @vitest-environment jsdom
+import { afterEach, describe, expect, it } from 'vitest';
+import { blockOwnerOf, type BlockOwnerDebugNg } from '../block-owner.ts';
+import { elementById } from '../element-id.ts';
+
+class _SignalsExample {}
+class _ExamplePanel {}
+class _Card {}
+
+function page() {
+  document.body.innerHTML = `
+    
+      
+
`; + const root = document.querySelector('app-root')!; + const panel = document.querySelector('app-example-panel')!; + const card = document.querySelector('app-card')!; + const anchor = document.createComment('container'); + panel.querySelector('.panel')!.appendChild(anchor); + const instances = new Map([ + [root, new _SignalsExample()], + [panel, new _ExamplePanel()], + [card, new _Card()], + ]); + const hosts = new Map([...instances].map(([el, instance]) => [instance, el])); + return { root, panel, card, anchor, instances, hosts }; +} + +describe('blockOwnerOf', () => { + afterEach(() => { + document.body.innerHTML = ''; + }); + + it('names the component that declared a projected block', () => { + const { root, anchor, instances, hosts } = page(); + const ng: BlockOwnerDebugNg = { + getComponent: (el) => instances.get(el) ?? null, + getOwningComponent: (node) => (node === anchor ? instances.get(root) : null), + getHostElement: (instance) => hosts.get(instance) ?? null, + }; + const owner = blockOwnerOf(ng, anchor)!; + expect(owner).toMatchObject({ name: 'SignalsExample', tag: 'app-root' }); + expect(elementById(owner.id)).toBe(root); + expect(blockOwnerOf(ng, anchor)!.id).toBe(owner.id); + }); + + it('falls back to the nearest host above the node without getOwningComponent', () => { + const { anchor, instances } = page(); + const ng: BlockOwnerDebugNg = { getComponent: (el) => instances.get(el) ?? null }; + expect(blockOwnerOf(ng, anchor)).toMatchObject({ name: 'ExamplePanel' }); + }); + + it('falls back when the utils throw or give no host element', () => { + const { anchor, instances } = page(); + const throwing: BlockOwnerDebugNg = { + getComponent: (el) => instances.get(el) ?? null, + getOwningComponent: () => { + throw new Error('not in a view'); + }, + }; + expect(blockOwnerOf(throwing, anchor)).toMatchObject({ name: 'ExamplePanel' }); + const hostless: BlockOwnerDebugNg = { + getComponent: (el) => instances.get(el) ?? null, + getOwningComponent: () => ({}), + getHostElement: () => null, + }; + expect(blockOwnerOf(hostless, anchor)).toMatchObject({ name: 'ExamplePanel' }); + }); + + it('starts the fallback above a root node that is a component host', () => { + const { card, instances } = page(); + const ng: BlockOwnerDebugNg = { getComponent: (el) => instances.get(el) ?? null }; + expect(blockOwnerOf(ng, card)).toMatchObject({ name: 'ExamplePanel' }); + expect(blockOwnerOf(ng, null)).toBeUndefined(); + }); +}); diff --git a/packages/devtools/src/__tests__/component-agent.test.ts b/packages/devtools/src/__tests__/component-agent.test.ts index 20b6dc86..245f98fd 100644 --- a/packages/devtools/src/__tests__/component-agent.test.ts +++ b/packages/devtools/src/__tests__/component-agent.test.ts @@ -227,6 +227,40 @@ describe('defer-blocks tool', () => { }); }); +describe('for-blocks tool', () => { + it('lists the @for blocks each page reported and narrows to one page', async () => { + const { push, call } = await boot(); + await push('push-component-tree', { + pageId: 'p1', + roots, + count: 3, + detail: null, + forBlocks: [ + { + id: 'f1', + owner: { id: 'c2', name: 'Card', tag: 'app-card' }, + count: 0, + track: 'item', + hasEmptyBlock: true, + showingEmpty: true, + rootIds: [], + }, + ], + }); + await push('push-component-tree', { pageId: 'p2', roots, count: 3, detail: null }); + const all = await call('for-blocks', {}); + expect(all).toContain('Page `p1`: 1 `@for` block.'); + expect(all).toContain( + '| `f1` | Card (`c2`) | 0 | the item itself | showing | showing @empty |', + ); + expect(all).toMatch(/Page `p2`: this page's Angular has no `ng\.ɵgetControlFlowBlocks`/); + expect(await call('for-blocks', { page: 'p2' })).not.toContain('`p1`'); + expect(await call('for-blocks', { page: 'gone' })).toMatch( + /No page `gone` is reporting a component tree\./, + ); + }); +}); + describe('component pick', () => { it('refuses to pick when no page is connected', async () => { const { push } = await boot(); diff --git a/packages/devtools/src/__tests__/component-edit-tools.test.ts b/packages/devtools/src/__tests__/component-edit-tools.test.ts new file mode 100644 index 00000000..03788471 --- /dev/null +++ b/packages/devtools/src/__tests__/component-edit-tools.test.ts @@ -0,0 +1,208 @@ +import { createHostContext } from 'devframe/node'; +import { describe, expect, it, vi } from 'vitest'; +import pangular, { createPangular } from '../devframe.ts'; +import type { PangularConfig } from '../config.ts'; +import { agentSafety, resolvePangularConfig } from '../config.ts'; +import { UNTRUSTED } from '../rpc/forms-tools.ts'; + +async function boot(config?: PangularConfig) { + const host = { + mountStatic: () => {}, + resolveOrigin: () => 'http://localhost', + getStorageDir: () => '', + }; + const ctx = await createHostContext({ cwd: process.cwd(), mode: 'dev', host: host as never }); + await (config ? createPangular(config) : pangular).setup(ctx as never); + const push = (name: string, payload: unknown) => + ctx.rpc.invokeLocal(`pangular:${name}` as never, ...([payload] as never)); + const call = async (tool: string, args: Record) => + ((await ctx.agent.invoke(`pangular:${tool}`, args)) as { markdown: string }).markdown; + const tools = () => ctx.agent.list().tools.map((tool) => tool.id); + return { ctx, push, call, tools }; +} + +const tree = (pageId: string) => ({ + pageId, + url: `/${pageId}`, + count: 3, + detail: null, + roots: [ + { + id: `${pageId}-root`, + name: 'App', + tag: 'app-root', + children: [ + { id: `${pageId}-a`, name: 'Card', tag: 'app-card', children: [] }, + { id: `${pageId}-b`, name: 'Card', tag: 'app-card', children: [] }, + ], + }, + ], +}); + +type Broadcast = { + method: string; + args: [{ requestId: string; pageId: string; request: Record }]; +}; + +/** Answers every component-edit broadcast the way the page would. */ +function answerEdits( + ctx: Awaited>['ctx'], + push: Awaited>['push'], + result: (request: Record) => unknown, +) { + const sent: Broadcast['args'][0][] = []; + vi.spyOn(ctx.rpc, 'broadcast').mockImplementation((async (options: Broadcast) => { + if (!options.method.endsWith('component-edit')) return; + const message = options.args[0]; + sent.push(message); + setTimeout( + () => + void push('component-edit-result', { + requestId: message.requestId, + pageId: message.pageId, + result: result(message.request), + }), + 5, + ); + }) as never); + return sent; +} + +describe('set-component-property and set-signal', () => { + it('are action tools of the components inspector', () => { + const config = resolvePangularConfig(); + expect(agentSafety('pangular:set-component-property', config)).toBe('action'); + expect(agentSafety('pangular:set-signal', config)).toBe('action'); + }); + + it('send the write to the page of the instance and return the new value', async () => { + const { ctx, push, call } = await boot(); + await push('push-component-tree', tree('p1')); + const sent = answerEdits(ctx, push, (request) => ({ + ok: true, + kind: request.kind, + component: 'Card', + path: request.path, + value: request.value, + })); + const text = await call('set-signal', { component: 'p1-a', signal: 'count', value: 3 }); + expect(text.startsWith(UNTRUSTED)).toBe(true); + expect(text).toContain('Set `count` on `Card` (instance `p1-a` on page `p1`) with `.set()`'); + expect(text).toContain('```json\n3\n```'); + expect(sent[0]).toMatchObject({ + pageId: 'p1', + request: { id: 'p1-a', path: 'count', value: 3, kind: 'signal' }, + }); + const prop = await call('set-component-property', { + component: 'p1-b', + property: 'user.name', + value: 'Ada', + }); + expect(prop).toContain('ng.applyChanges'); + expect(sent[1].request).toMatchObject({ kind: 'property', path: 'user.name' }); + }); + + it('pass the page refusal on behind the untrusted notice', async () => { + const { ctx, push, call } = await boot(); + await push('push-component-tree', tree('p1')); + answerEdits(ctx, push, () => ({ error: '`title` is a signal input.' })); + const text = await call('set-signal', { component: 'p1-a', signal: 'title', value: 'x' }); + expect(text.startsWith(UNTRUSTED)).toBe(true); + expect(text).toContain( + 'Nothing was written to instance `p1-a` on page `p1`. `title` is a signal input.', + ); + }); + + it('refuse a class name that matches several instances', async () => { + const { ctx, push, call } = await boot(); + await push('push-component-tree', tree('p1')); + const sent = answerEdits(ctx, push, () => ({ ok: true })); + const text = await call('set-component-property', { + component: 'Card', + property: 'price', + value: 1, + }); + expect(text).toMatch(/2 instances match `Card`.*nothing was written/s); + expect(sent).toHaveLength(0); + }); + + it('write nothing without `page` when several pages report, or to an unknown page', async () => { + const { ctx, push, call } = await boot(); + await push('push-component-tree', tree('p1')); + await push('push-component-tree', tree('p2')); + const sent = answerEdits(ctx, push, () => ({ ok: true })); + expect(await call('set-signal', { component: 'p1-a', signal: 'count', value: 1 })).toMatch( + /2 pages report a component tree/, + ); + expect( + await call('set-signal', { component: 'p1-a', signal: 'count', value: 1, page: 'p9' }), + ).toMatch(/No page `p9`/); + expect(sent).toHaveLength(0); + // The panel RPC follows the same rule. + expect( + await push('request-component-edit', { request: { id: 'p1-a', path: 'count', value: 1 } }), + ).toEqual({ error: expect.stringMatching(/2 pages report a component tree/) }); + }); + + it('only take a result from the page the write went to', async () => { + const { ctx, push } = await boot(); + await push('push-component-tree', tree('p1')); + let requestId = ''; + vi.spyOn(ctx.rpc, 'broadcast').mockImplementation((async (options: Broadcast) => { + if (options.method.endsWith('component-edit')) requestId = options.args[0].requestId; + }) as never); + const answer = push('request-component-edit', { + pageId: 'p1', + request: { id: 'p1-a', path: 'count', value: 1 }, + }); + await new Promise((resolve) => setTimeout(resolve, 0)); + await push('component-edit-result', { requestId, pageId: 'p2', result: { ok: true } }); + await push('component-edit-result', { + requestId, + pageId: 'p1', + result: { ok: true, kind: 'signal', component: 'Card', path: 'count', value: 1 }, + }); + expect(await answer).toMatchObject({ ok: true, value: 1 }); + }); + + it('are left out when actions.components is off, and the RPC refuses', async () => { + const { push, tools } = await boot({ actions: { components: false } }); + expect(tools()).not.toContain('pangular:set-component-property'); + expect(tools()).not.toContain('pangular:set-signal'); + expect(tools()).toContain('pangular:inspect-component'); + await push('push-component-tree', tree('p1')); + expect( + await push('request-component-edit', { + pageId: 'p1', + request: { id: 'p1-a', path: 'count', value: 1 }, + }), + ).toEqual({ error: expect.stringContaining('actions.components') }); + }); + + it('are left out under agent.readOnly, and when the components inspector or its tools are off', async () => { + for (const config of [ + { agent: { readOnly: true } }, + { agent: { tools: { components: false } } }, + { inspectors: { components: false } }, + ] satisfies PangularConfig[]) { + const { tools } = await boot(config); + expect(tools(), JSON.stringify(config)).not.toContain('pangular:set-component-property'); + expect(tools(), JSON.stringify(config)).not.toContain('pangular:set-signal'); + } + const { ctx } = await boot({ inspectors: { components: false } }); + await expect( + ctx.rpc.invokeLocal('pangular:request-component-edit' as never, ...([{}] as never)), + ).rejects.toThrow(); + }); + + it('refuse requests that are not JSON or name no instance', async () => { + const { push } = await boot(); + await push('push-component-tree', tree('p1')); + expect( + await push('request-component-edit', { pageId: 'p1', request: { path: 'x', value: 1 } }), + ).toEqual({ error: 'Pass the instance id of a component.' }); + expect( + await push('request-component-edit', { pageId: 'p1', request: { id: 'p1-a', path: 'x' } }), + ).toEqual({ error: 'Pass a JSON value.' }); + }); +}); diff --git a/packages/devtools/src/__tests__/component-edit.test.ts b/packages/devtools/src/__tests__/component-edit.test.ts new file mode 100644 index 00000000..bcfcfc0c --- /dev/null +++ b/packages/devtools/src/__tests__/component-edit.test.ts @@ -0,0 +1,281 @@ +// @vitest-environment jsdom +import { afterEach, describe, expect, it, vi } from 'vitest'; +import { + editComponent, + LOCKED, + markEditable, + parsePath, + type EditDebugNg, +} from '../component-edit.ts'; +import { registerComponentEdit } from '../component-edit-overlay.ts'; +import { collectComponentTree } from '../component-tree.ts'; +import { elementById, elementId } from '../element-id.ts'; +import { setRedaction } from '../forms-privacy.ts'; + +const SIGNAL = Symbol('SIGNAL'); + +/** Like Angular's signal(): a getter with `set`, `update` and the SIGNAL brand. */ +function writable(initial: T) { + let value = initial; + const fn = (() => value) as (() => T) & { set(v: T): void; update(f: (v: T) => T): void }; + (fn as unknown as Record)[SIGNAL] = { kind: 'signal' }; + fn.set = vi.fn((v: T) => { + value = v; + }); + fn.update = (f) => fn.set(f(value)); + return fn; +} + +/** Like input() or computed(): a branded getter without `set`. */ +function readonly(value: T) { + const fn = () => value; + (fn as unknown as Record)[SIGNAL] = { kind: 'input' }; + return fn; +} + +class _Card { + title = readonly('Paris'); + count = writable(1); + filters = writable({ query: 'a', page: 2 }); + total = readonly(10); + price = 120; + user = { name: 'Ada', tags: ['x', 'y'] }; + apiToken = 'abc'; + session = { token: 'abc', label: 'main' }; + when = new Date(0); + selected = { emit: () => {} }; + get label() { + return 'card'; + } + save() {} +} + +function setup(instance: object = new _Card()) { + document.body.innerHTML = ''; + const host = document.querySelector('app-card')!; + const applyChanges = vi.fn(); + const ng: EditDebugNg = { + getComponent: (el) => (el === host ? instance : null), + getDirectiveMetadata: () => ({ + inputs: { title: 'title', costInput: 'price' }, + outputs: { selected: 'selected' }, + }), + isSignal: (v) => typeof v === 'function' && SIGNAL in (v as object), + applyChanges, + }; + const id = elementId(host); + const find = (target: string) => elementById(target); + return { ng, host, id, instance: instance as _Card, applyChanges, find }; +} + +describe('editComponent', () => { + afterEach(() => { + document.body.innerHTML = ''; + setRedaction({ secretNames: [], unmask: [] }); + }); + + it('sets a writable signal with .set() and does not run applyChanges', () => { + const { ng, id, instance, applyChanges, find } = setup(); + const result = editComponent(ng, { id, path: 'count', value: 5, kind: 'signal' }, find); + expect(result).toEqual({ + ok: true, + kind: 'signal', + component: 'Card', + path: 'count', + value: 5, + }); + expect(instance.count.set).toHaveBeenCalledWith(5); + expect(instance.count()).toBe(5); + expect(applyChanges).not.toHaveBeenCalled(); + }); + + it('sets a path inside a signal value with a copy, keeping the rest', () => { + const { ng, id, instance, find } = setup(); + const before = instance.filters(); + const result = editComponent(ng, { id, path: 'filters.query', value: 'b' }, find); + expect(result).toMatchObject({ ok: true, kind: 'signal', value: 'b' }); + expect(instance.filters()).toEqual({ query: 'b', page: 2 }); + expect(instance.filters()).not.toBe(before); + expect(before.query).toBe('a'); + }); + + it('assigns a plain property and calls ng.applyChanges on the component', () => { + const { ng, id, instance, applyChanges, find } = setup(); + const result = editComponent(ng, { id, path: 'user.tags[1]', value: 'z' }, find); + expect(result).toMatchObject({ ok: true, kind: 'property', path: 'user.tags.1', value: 'z' }); + expect(instance.user.tags).toEqual(['x', 'z']); + expect(applyChanges).toHaveBeenCalledWith(instance); + }); + + it('maps a public input name to its class property', () => { + const { ng, id, instance, find } = setup(); + const result = editComponent(ng, { id, path: 'costInput', value: 99 }, find); + expect(result).toMatchObject({ ok: true, path: 'price' }); + expect(instance.price).toBe(99); + }); + + it('refuses a signal input', () => { + const { ng, id, find } = setup(); + const result = editComponent(ng, { id, path: 'title', value: 'Rome' }, find); + expect(result).toEqual({ + error: '`title` is a signal input. Its parent binding sets it, so it cannot be written.', + }); + }); + + it('refuses a computed or read-only signal', () => { + const { ng, id, find } = setup(); + const result = editComponent(ng, { id, path: 'total', value: 3, kind: 'signal' }, find); + expect('error' in result && result.error).toMatch(/read-only signal/); + }); + + it('refuses the wrong kind with the tool to use', () => { + const { ng, id, find } = setup(); + expect(editComponent(ng, { id, path: 'count', value: 2, kind: 'property' }, find)).toEqual({ + error: '`count` is a signal. Write it with set-signal.', + }); + expect(editComponent(ng, { id, path: 'price', value: 2, kind: 'signal' }, find)).toEqual({ + error: '`price` is not a signal. Write it with set-component-property.', + }); + }); + + it('refuses redacted names, config secret names and values that hold redacted data', () => { + const { ng, id, instance, find } = setup(); + expect(editComponent(ng, { id, path: 'apiToken', value: 'x' }, find)).toMatchObject({ + error: expect.stringMatching(/redacted/), + }); + expect(editComponent(ng, { id, path: 'session', value: {} }, find)).toMatchObject({ + error: expect.stringMatching(/redacted data/), + }); + // A sibling of the secret is fine, and the secret stays. + expect(editComponent(ng, { id, path: 'session.label', value: 'b' }, find)).toMatchObject({ + ok: true, + }); + expect(instance.session.token).toBe('abc'); + setRedaction({ secretNames: ['price'], unmask: [] }); + expect(editComponent(ng, { id, path: 'price', value: 1 }, find)).toMatchObject({ + error: expect.stringMatching(/redacted/), + }); + expect(instance.price).toBe(120); + }); + + it('refuses outputs, methods, getters, unknown paths, class instances and unsafe keys', () => { + const { ng, id, find } = setup(); + const error = (path: string, value: unknown = 1) => { + const result = editComponent(ng, { id, path, value }, find); + return 'error' in result ? result.error : 'ok'; + }; + expect(error('selected')).toMatch(/output/); + expect(error('save')).toMatch(/method/); + expect(error('label')).toMatch(/getter without a setter/); + expect(error('missing')).toMatch(/no property/); + expect(error('user.age')).toMatch(/does not exist/); + expect(error('when')).toMatch(/not JSON/); + expect(error('user.__proto__')).toMatch(/cannot be written/); + expect(error('price', { at: new Date() })).toMatch(/must be JSON/); + }); + + it('answers an unknown or destroyed instance id', () => { + const { ng, find } = setup(); + expect(editComponent(ng, { id: 'nope', path: 'price', value: 1 }, find)).toEqual({ + error: expect.stringMatching(/No component instance `nope`/), + }); + }); + + it('returns the new value redacted like the detail', () => { + const { ng, id, find } = setup(); + const jwt = 'eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxIn0.c2lnbmF0dXJlc2lnbmF0dXJl'; + const result = editComponent(ng, { id, path: 'user.name', value: jwt }, find); + expect(result).toMatchObject({ ok: true, value: '[redacted]' }); + }); +}); + +describe('parsePath', () => { + it('splits dots and brackets and refuses empty parts', () => { + expect(parsePath('items[0].title')).toEqual(['items', '0', 'title']); + expect(parsePath('a..b')).toBeNull(); + expect(parsePath('')).toBeNull(); + }); +}); + +describe('markEditable', () => { + afterEach(() => { + document.body.innerHTML = ''; + }); + + it('says which inputs and properties can be edited, and why the others cannot', () => { + const { ng, host } = setup(); + const id = elementId(host); + const detail = collectComponentTree(ng, { selectedId: id }).detail!; + const byName = (list: { name: string }[], name: string) => list.find((p) => p.name === name); + expect(byName(detail.inputs, 'title')).toMatchObject({ locked: LOCKED.signalInput }); + expect(byName(detail.inputs, 'costInput')).toMatchObject({ edit: 'property' }); + const props = detail.properties ?? []; + expect(byName(props, 'count')).toMatchObject({ edit: 'signal' }); + expect(byName(props, 'total')).toMatchObject({ locked: LOCKED.readonlySignal }); + expect(byName(props, 'user')).toMatchObject({ edit: 'property' }); + expect(byName(props, 'apiToken')).toMatchObject({ locked: LOCKED.redacted }); + expect(byName(props, 'session')).toMatchObject({ locked: LOCKED.redacted }); + expect(byName(props, 'when')).toMatchObject({ locked: LOCKED.notJson }); + }); + + it('locks a value the panel shows clipped', () => { + const { ng } = setup(); + const detail = { inputs: [], properties: [{ name: 'text', prop: 'text' }] }; + markEditable(ng, { text: 'x'.repeat(1000) }, detail); + expect(detail.properties[0]).toMatchObject({ locked: LOCKED.clipped }); + }); +}); + +describe('registerComponentEdit', () => { + afterEach(() => { + document.body.innerHTML = ''; + }); + + function wire(allowed: boolean) { + const ctx = setup(); + let handler: ((message: unknown) => unknown) | undefined; + const call = vi.fn(async () => undefined); + const edited = vi.fn(); + registerComponentEdit( + { + call, + register: (definition) => { + handler = definition.handler as (message: unknown) => unknown; + }, + }, + 'page-1', + { getNg: () => ctx.ng, allowed, edited }, + ); + return { ...ctx, handler: handler!, call, edited }; + } + + it('answers with the result for its own page and refreshes the tree', () => { + const { handler, call, edited, id, instance } = wire(true); + handler({ requestId: 'e1', pageId: 'page-1', request: { id, path: 'price', value: 7 } }); + expect(instance.price).toBe(7); + expect(call).toHaveBeenCalledWith('component-edit-result', { + requestId: 'e1', + pageId: 'page-1', + result: expect.objectContaining({ ok: true, value: 7 }), + }); + expect(edited).toHaveBeenCalled(); + }); + + it('ignores another page and refuses when the action is off', () => { + const off = wire(false); + off.handler({ requestId: 'e1', pageId: 'page-2', request: {} }); + expect(off.call).not.toHaveBeenCalled(); + off.handler({ + requestId: 'e2', + pageId: 'page-1', + request: { id: off.id, path: 'price', value: 7 }, + }); + expect(off.instance.price).toBe(120); + expect(off.call).toHaveBeenCalledWith('component-edit-result', { + requestId: 'e2', + pageId: 'page-1', + result: { error: expect.stringMatching(/actions\.components/) }, + }); + expect(off.edited).not.toHaveBeenCalled(); + }); +}); diff --git a/packages/devtools/src/__tests__/component-tree.test.ts b/packages/devtools/src/__tests__/component-tree.test.ts index 1cb75116..0390e5f9 100644 --- a/packages/devtools/src/__tests__/component-tree.test.ts +++ b/packages/devtools/src/__tests__/component-tree.test.ts @@ -8,6 +8,7 @@ import { hostPath, type ComponentDebugNg, } from '../component-tree.ts'; +import { LOCKED } from '../component-edit.ts'; import { elementById, elementId } from '../element-id.ts'; const SIGNAL = Symbol('SIGNAL'); @@ -446,10 +447,21 @@ describe('component properties', () => { }), }); expect(detail.properties).toEqual([ - { name: 'trips', prop: 'trips', value: ['Rome', 'Lisbon'], kind: 'signal' }, - { name: 'loading', prop: 'loading', value: false }, - { name: 'filters', prop: 'filters', value: { city: 'Rome', sessionToken: '[redacted]' } }, - { name: 'password', prop: 'password', value: '[redacted]' }, + { + name: 'trips', + prop: 'trips', + value: ['Rome', 'Lisbon'], + kind: 'signal', + locked: LOCKED.readonlySignal, + }, + { name: 'loading', prop: 'loading', value: false, edit: 'property' }, + { + name: 'filters', + prop: 'filters', + value: { city: 'Rome', sessionToken: '[redacted]' }, + locked: LOCKED.redacted, + }, + { name: 'password', prop: 'password', value: '[redacted]', locked: LOCKED.redacted }, ]); }); @@ -464,6 +476,7 @@ describe('component properties', () => { prop: 'trips', kind: 'resource', value: { status: 'error', error: 'Error: Offline' }, + locked: LOCKED.resource, }, ]); }); diff --git a/packages/devtools/src/__tests__/config.test.ts b/packages/devtools/src/__tests__/config.test.ts index 2a6365fa..5b7df5c1 100644 --- a/packages/devtools/src/__tests__/config.test.ts +++ b/packages/devtools/src/__tests__/config.test.ts @@ -61,6 +61,7 @@ describe('resolvePangularConfig', () => { ngrx: true, http: true, analog: true, + components: true, }); }); @@ -79,6 +80,7 @@ describe('resolvePangularConfig', () => { ngrx: false, http: true, analog: true, + components: true, }); }); @@ -89,6 +91,7 @@ describe('resolvePangularConfig', () => { ngrx: false, http: false, analog: false, + components: false, }); expect(resolvePangularConfig({ actions: { router: false } }).actions).toEqual({ forms: true, @@ -96,6 +99,7 @@ describe('resolvePangularConfig', () => { ngrx: true, http: true, analog: true, + components: true, }); }); @@ -254,7 +258,9 @@ describe('agent tool and RPC registration', () => { 'navigate', 'record-pipes', 'remove-http-rule', + 'set-component-property', 'set-http-rule', + 'set-signal', ].sort(), ); expect(tools).toContain('inspect-forms'); @@ -348,7 +354,9 @@ describe('agent tool and RPC registration', () => { 'navigate', 'record-pipes', 'remove-http-rule', + 'set-component-property', 'set-http-rule', + 'set-signal', ].sort(), ); expect(forms.tools).toEqual(expect.arrayContaining(['inspect-forms', 'form-history'])); @@ -366,6 +374,10 @@ describe('agent tool and RPC registration', () => { expect(http.actionTools).not.toContain('set-http-rule'); expect(http.actionTools).not.toContain('remove-http-rule'); expect(http.tools).toContain('list-http-rules'); + const components = await boot({ actions: { components: false } }); + expect(components.actionTools).not.toContain('set-component-property'); + expect(components.actionTools).not.toContain('set-signal'); + expect(components.tools).toContain('inspect-component'); }); it('leaves out the RPC functions, tools and resources of a disabled inspector', async () => { diff --git a/packages/devtools/src/__tests__/console-globals.test.ts b/packages/devtools/src/__tests__/console-globals.test.ts new file mode 100644 index 00000000..24b7ddcb --- /dev/null +++ b/packages/devtools/src/__tests__/console-globals.test.ts @@ -0,0 +1,76 @@ +import { createHostContext } from 'devframe/node'; +import { describe, expect, it, vi } from 'vitest'; +import { resolvePangularConfig } from '../config.ts'; +import pangular from '../devframe.ts'; + +type Broadcast = { method: string; args: [Record] }; + +async function boot(config?: unknown) { + const host = { + mountStatic: () => {}, + resolveOrigin: () => 'http://localhost', + getStorageDir: () => '', + }; + const ctx = await createHostContext({ cwd: process.cwd(), mode: 'dev', host: host as never }); + await pangular.setup(ctx as never, { config: resolvePangularConfig(config) } as never); + const call = (name: string, payload: unknown) => + ctx.rpc.invokeLocal(`pangular:${name}` as never, ...([payload] as never)); + const sent: Broadcast[] = []; + vi.spyOn(ctx.rpc, 'broadcast').mockImplementation((async (options: Broadcast) => { + sent.push(options); + }) as never); + return { call, sent }; +} + +const target = { kind: 'component', id: 'c2' }; + +describe('Store as global on the server', () => { + it('asks the one page and returns the name it stored the value under', async () => { + const { call, sent } = await boot(); + const answer = call('request-console-global', { pageId: 'p1', target }); + const request = await vi.waitFor( + () => sent.find((b) => b.method.endsWith('console-global'))!.args[0], + ); + expect(request).toMatchObject({ pageId: 'p1', target }); + // Another page can't answer for p1. + await call('console-global-result', { + requestId: request['requestId'], + pageId: 'p2', + result: { ok: true, name: 'temp9', message: 'Stored as temp9.' }, + }); + await call('console-global-result', { + requestId: request['requestId'], + pageId: 'p1', + result: { ok: true, name: 'temp1', message: 'Stored as temp1.', extra: 'x' }, + }); + expect(await answer).toEqual({ ok: true, name: 'temp1', message: 'Stored as temp1.' }); + }); + + it('refuses without a page, with a malformed target, or with the inspector off', async () => { + const { call, sent } = await boot({ inspectors: { ngrx: false } }); + expect(await call('request-console-global', { target })).toMatchObject({ ok: false }); + expect( + await call('request-console-global', { pageId: 'p1', target: { kind: 'window' } }), + ).toMatchObject({ ok: false, message: 'Nothing to store.' }); + expect( + await call('request-console-global', { + pageId: 'p1', + target: { kind: 'ngrx', storeId: 'store' }, + }), + ).toMatchObject({ ok: false, message: expect.stringMatching(/ngrx inspector is turned off/) }); + expect(sent.some((b) => b.method.endsWith('console-global'))).toBe(false); + }); + + it('marks a panel selection for one page so that page sets $ng0', async () => { + const { call, sent } = await boot(); + await call('select-component', { pageId: 'p1', id: 'c2', console: true }); + await call('select-component', { id: 'c3', console: true }); + const selections = sent + .filter((b) => b.method.endsWith('inspect-component-in-page')) + .map((b) => b.args[0]); + expect(selections).toEqual([ + { pageId: 'p1', id: 'c2', console: true }, + { pageId: undefined, id: 'c3' }, + ]); + }); +}); diff --git a/packages/devtools/src/__tests__/console-handles.test.ts b/packages/devtools/src/__tests__/console-handles.test.ts new file mode 100644 index 00000000..4b04fc25 --- /dev/null +++ b/packages/devtools/src/__tests__/console-handles.test.ts @@ -0,0 +1,215 @@ +// @vitest-environment jsdom +import { afterEach, describe, expect, it } from 'vitest'; +import { + attachConsoleGlobals, + createConsoleHandles, + isConsoleTarget, + NG_HANDLES, + providerRefusal, + redactedCopy, + type ConsoleGlobalResult, +} from '../console-handles.ts'; +import { elementId } from '../element-id.ts'; +import { REDACTED } from '../forms-privacy.ts'; + +const JWT = + 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIn0.dozjgNryP4J3jVmNHl0w5N_XgL0n3I9PlFUP0THsR8U'; + +describe('createConsoleHandles', () => { + it('sets $ng0 on selection and shifts earlier selections down to $ng4', () => { + const win: Record = {}; + const handles = createConsoleHandles(win); + const picks = Array.from({ length: NG_HANDLES + 1 }, (_, i) => ({ i })); + for (const pick of picks) handles.select(pick); + expect(win['$ng0']).toBe(picks[5]); + expect(win['$ng1']).toBe(picks[4]); + expect(win['$ng4']).toBe(picks[1]); + expect('$ng5' in win).toBe(false); + }); + + it('moves a component selected again back to $ng0 without repeating it', () => { + const win: Record = {}; + const handles = createConsoleHandles(win); + const [a, b, c] = [{ a: 1 }, { b: 1 }, { c: 1 }]; + handles.select(a); + handles.select(b); + handles.select(b); + expect([win['$ng0'], win['$ng1']]).toEqual([b, a]); + handles.select(c); + handles.select(a); + expect([win['$ng0'], win['$ng1'], win['$ng2']]).toEqual([a, c, b]); + expect('$ng3' in win).toBe(false); + handles.select(null); + expect(win['$ng0']).toBe(a); + }); + + it('never overwrites a $ng global the page set itself', () => { + const own = { mine: true }; + const win: Record = { $ng1: own }; + const handles = createConsoleHandles(win); + handles.select({ a: 1 }); + const b = { b: 1 }; + handles.select(b); + expect(win['$ng0']).toBe(b); + expect(win['$ng1']).toBe(own); + }); + + it('names stored values temp1, temp2… and skips names the page uses', () => { + const win: Record = { temp2: 'page' }; + const handles = createConsoleHandles(win); + expect(handles.store('a')).toBe('temp1'); + expect(handles.store('b')).toBe('temp3'); + expect(win['temp2']).toBe('page'); + expect(win['temp3']).toBe('b'); + }); + + it('removes only the globals it still owns when disposed', () => { + const win: Record = {}; + const handles = createConsoleHandles(win); + handles.select({ a: 1 }); + handles.store('x'); + handles.store('y'); + win['temp2'] = 'changed by the page'; + handles.dispose(); + expect(win).toEqual({ temp2: 'changed by the page' }); + }); +}); + +describe('redaction of stored values', () => { + it('copies state with secret fields and tokens masked, and leaves the original alone', () => { + const state = { + user: { name: 'Ada', password: 'hunter2', session: `Bearer ${JWT}` }, + list: [{ apiKey: 'k' }], + map: new Map([['token', 'abc']]), + when: new Date(0), + }; + const { value, masked } = redactedCopy(state); + expect(masked).toBe(true); + const copy = value as typeof state; + expect(copy).not.toBe(state); + expect(copy.user.name).toBe('Ada'); + expect(copy.user.password).toBe(REDACTED); + expect(copy.user.session).not.toContain(JWT); + expect(copy.list[0].apiKey).toBe(REDACTED); + expect(copy.map.get('token')).toBe(REDACTED); + expect(copy.when).toBe(state.when); + expect(state.user.password).toBe('hunter2'); + }); + + it('says nothing was masked for plain data, and keeps cycles', () => { + const state: Record = { count: 1 }; + state['self'] = state; + const { value, masked } = redactedCopy(state); + expect(masked).toBe(false); + expect((value as Record)['self']).toBe(value); + }); + + it('refuses providers whose token looks secret or whose value is a credential', () => { + expect(providerRefusal('API_KEY', 'x')).toMatch(/looks like a secret/); + expect(providerRefusal('GREETING', `Bearer ${JWT}`)).toMatch(/credential/); + expect(providerRefusal('TripService', {})).toBeNull(); + }); + + it('accepts only well-formed targets', () => { + expect(isConsoleTarget({ kind: 'component', id: 'c1' })).toBe(true); + expect(isConsoleTarget({ kind: 'provider', injectorId: 'i', token: 'T', index: 0 })).toBe(true); + expect(isConsoleTarget({ kind: 'provider', injectorId: 'i', token: 'T', index: -1 })).toBe( + false, + ); + expect(isConsoleTarget({ kind: 'ngrx', storeId: '' })).toBe(false); + expect(isConsoleTarget({ kind: 'window' })).toBe(false); + }); +}); + +describe('attachConsoleGlobals', () => { + afterEach(() => { + document.body.innerHTML = ''; + }); + + function setup(inspectors = { components: true, injectors: true, ngrx: true }) { + document.body.innerHTML = ''; + const card = document.querySelector('app-card')!; + const instance = { title: 'Rome' }; + const handlers = new Map void>(); + const results: { requestId: string; pageId: string; result: ConsoleGlobalResult }[] = []; + const my = { + rpc: { + call: async (name: string, payload: unknown) => { + if (name === 'console-global-result') results.push(payload as (typeof results)[number]); + }, + register: (definition: { name: string; handler: (message: unknown) => void }) => { + handlers.set(definition.name, definition.handler); + }, + }, + }; + const win: Record = {}; + const globals = attachConsoleGlobals(my, 'p1', { + getNg: () => ({ getComponent: (el: Element) => (el === card ? instance : null) }), + inspectors, + ngrxState: (id) => (id === 'store' ? { value: { trips: [], token: 'abc' } } : null), + win, + }); + const send = (message: unknown) => handlers.get('console-global')!(message); + return { card, instance, win, globals, results, send }; + } + + it('sets $ng0 for a component selected on this page', () => { + const { card, instance, win, globals } = setup(); + globals.selectComponent(elementId(card)); + expect(win['$ng0']).toBe(instance); + globals.dispose(); + expect('$ng0' in win).toBe(false); + }); + + it('leaves $ng0 alone when the components inspector is off', () => { + const { card, win, globals } = setup({ components: false, injectors: true, ngrx: true }); + globals.selectComponent(elementId(card)); + expect('$ng0' in win).toBe(false); + }); + + it('stores a component as temp1 and answers only for its own page', () => { + const { card, instance, win, results, send } = setup(); + const target = { kind: 'component', id: elementId(card) }; + send({ requestId: 'g1', pageId: 'p2', target }); + send({ requestId: 'g2', target }); + expect(results).toEqual([]); + expect('temp1' in win).toBe(false); + send({ requestId: 'g3', pageId: 'p1', target }); + expect(results).toEqual([ + { + requestId: 'g3', + pageId: 'p1', + result: { ok: true, name: 'temp1', message: 'Stored as temp1.' }, + }, + ]); + expect(win['temp1']).toBe(instance); + }); + + it('stores a masked copy of NgRx state and says so', () => { + const { win, results, send } = setup(); + send({ requestId: 'g1', pageId: 'p1', target: { kind: 'ngrx', storeId: 'store' } }); + expect(results[0].result).toMatchObject({ ok: true, name: 'temp1', masked: true }); + expect(win['temp1']).toEqual({ trips: [], token: REDACTED }); + send({ requestId: 'g2', pageId: 'p1', target: { kind: 'ngrx', storeId: 'gone' } }); + expect(results[1].result).toMatchObject({ ok: false, message: /no longer on the page/ }); + }); + + it('refuses a target whose inspector is off, and malformed targets', () => { + const { win, results, send } = setup({ components: true, injectors: true, ngrx: false }); + send({ requestId: 'g1', pageId: 'p1', target: { kind: 'ngrx', storeId: 'store' } }); + send({ requestId: 'g2', pageId: 'p1', target: { kind: 'window', name: 'x' } }); + expect(results.map((r) => r.result.ok)).toEqual([false, false]); + expect(results[0].result.message).toMatch(/ngrx inspector is turned off/); + expect(Object.keys(win)).toEqual([]); + }); + + it('refuses a provider the injector tree never listed', () => { + const { results, send } = setup(); + send({ + requestId: 'g1', + pageId: 'p1', + target: { kind: 'provider', injectorId: 'inj-404', token: 'TripService', index: 0 }, + }); + expect(results[0].result).toMatchObject({ ok: false, message: /no longer on the page/ }); + }); +}); diff --git a/packages/devtools/src/__tests__/console-providers-real.test.ts b/packages/devtools/src/__tests__/console-providers-real.test.ts new file mode 100644 index 00000000..e12d49b4 --- /dev/null +++ b/packages/devtools/src/__tests__/console-providers-real.test.ts @@ -0,0 +1,93 @@ +// @vitest-environment jsdom +import '@angular/compiler'; +import { + Component, + Injectable, + InjectionToken, + inject, + provideZonelessChangeDetection, + type ApplicationRef, +} from '@angular/core'; +import { bootstrapApplication } from '@angular/platform-browser'; +import { afterEach, describe, expect, it } from 'vitest'; +import { collectInjectorTree, providerValue, type DebugNg } from '../injector-tree.ts'; +import type { InjectorTreeNode } from '../types.ts'; + +const API_URL = new InjectionToken('API_URL'); +const UNUSED = new InjectionToken<{ ready: boolean }>('UNUSED'); +let unusedCreated = 0; + +class CardState { + readonly open = true; +} +Injectable()(CardState); + +class SpareState {} +Injectable()(SpareState); + +class TripCard { + readonly state = inject(CardState); + readonly api = inject(API_URL); +} +Component({ + selector: 'app-root', + template: 'card', + providers: [CardState, SpareState], +})(TripCard); + +const flatten = (nodes: InjectorTreeNode[]): InjectorTreeNode[] => + nodes.flatMap((node) => [node, ...flatten(node.children)]); + +describe('providerValue with a real app', () => { + let app: ApplicationRef | null = null; + afterEach(() => { + app?.destroy(); + app = null; + document.body.innerHTML = ''; + }); + + it('gives the live value of created providers and never creates one', async () => { + document.body.innerHTML = ''; + app = await bootstrapApplication(TripCard, { + providers: [ + provideZonelessChangeDetection(), + { provide: API_URL, useValue: '/api' }, + { + provide: UNUSED, + useFactory: () => { + unusedCreated++; + return { ready: true }; + }, + }, + ], + }); + app.tick(); + const ng = (globalThis as { ng?: DebugNg }).ng!; + const report = collectInjectorTree(ng); + const card = flatten(report.roots).find((n) => n.injector.component === 'TripCard')!; + const card$ = app.components[0].instance as TripCard; + + const index = (node: InjectorTreeNode, token: string) => + node.providers.findIndex((p) => p.token === token); + expect(providerValue(ng, card.injector.id, 'CardState', index(card, 'CardState'))).toEqual({ + value: card$.state, + }); + expect( + providerValue(ng, card.injector.id, 'SpareState', index(card, 'SpareState')), + ).toMatchObject({ error: expect.stringMatching(/storing it would create it/) }); + expect(providerValue(ng, card.injector.id, 'Nope', 0)).toMatchObject({ + error: expect.stringMatching(/no longer provided/), + }); + + const env = flatten(report.environment).find((n) => + n.providers.some((p) => p.token === 'API_URL'), + )!; + expect(providerValue(ng, env.injector.id, 'API_URL', index(env, 'API_URL'))).toEqual({ + value: '/api', + }); + expect(providerValue(ng, env.injector.id, 'UNUSED', index(env, 'UNUSED'))).toMatchObject({ + error: expect.stringMatching(/not been created yet/), + }); + expect(unusedCreated).toBe(0); + }); +}); diff --git a/packages/devtools/src/__tests__/defer-blocks-real.test.ts b/packages/devtools/src/__tests__/defer-blocks-real.test.ts index 2a379548..165d1839 100644 --- a/packages/devtools/src/__tests__/defer-blocks-real.test.ts +++ b/packages/devtools/src/__tests__/defer-blocks-real.test.ts @@ -8,6 +8,7 @@ import { } from '@angular/core'; import { bootstrapApplication } from '@angular/platform-browser'; import { afterEach, describe, expect, it } from 'vitest'; +import { elementById } from '../element-id.ts'; import { createDeferTracker, type DeferDebugNg } from '../defer-blocks.ts'; class TripReviews { @@ -26,6 +27,27 @@ Component({ `, })(TripReviews); +class ExamplePanel {} +Component({ + selector: 'app-example-panel', + template: `
`, +})(ExamplePanel); + +class LazyExample {} +Component({ + selector: 'app-root', + imports: [ExamplePanel], + template: ` + + @defer (on idle) { +

Loaded

+ } @placeholder { +

Waiting

+ } +
+ `, +})(LazyExample); + const settle = async (app: ApplicationRef) => { for (let i = 0; i < 5; i++) { await new Promise((resolve) => setTimeout(resolve, 0)); @@ -67,4 +89,20 @@ describe('createDeferTracker with a real app', () => { expect(loaded).toMatchObject({ id: block.id, state: 'complete' }); expect(loaded.rootIds).toHaveLength(1); }); + + it('names the template owner of a @defer block projected into another component', async () => { + document.body.innerHTML = ''; + app = await bootstrapApplication(LazyExample, { + providers: [provideZonelessChangeDetection()], + }); + await settle(app); + + const ng = (globalThis as { ng?: DeferDebugNg }).ng!; + const tracker = createDeferTracker(); + const [block] = tracker.collect(ng) ?? []; + expect(block).toMatchObject({ owner: { name: 'LazyExample', tag: 'app-root' } }); + expect(elementById(block.owner!.id)).toBe(document.querySelector('app-root')); + const [again] = tracker.collect(ng) ?? []; + expect(again.id).toBe(block.id); + }); }); diff --git a/packages/devtools/src/__tests__/docs-tool-count.test.ts b/packages/devtools/src/__tests__/docs-tool-count.test.ts index 53bacb10..4adaf598 100644 --- a/packages/devtools/src/__tests__/docs-tool-count.test.ts +++ b/packages/devtools/src/__tests__/docs-tool-count.test.ts @@ -20,6 +20,14 @@ const WORDS = [ 'Sixty', 'Sixty-one', 'Sixty-two', + 'Sixty-three', + 'Sixty-four', + 'Sixty-five', + 'Sixty-six', + 'Sixty-seven', + 'Sixty-eight', + 'Sixty-nine', + 'Seventy', ]; it('states on the tools page how many tools the server registers', async () => { diff --git a/packages/devtools/src/__tests__/for-blocks-real.test.ts b/packages/devtools/src/__tests__/for-blocks-real.test.ts new file mode 100644 index 00000000..991971dd --- /dev/null +++ b/packages/devtools/src/__tests__/for-blocks-real.test.ts @@ -0,0 +1,132 @@ +// @vitest-environment jsdom +import '@angular/compiler'; +import { + Component, + provideZonelessChangeDetection, + signal, + type ApplicationRef, +} from '@angular/core'; +import { bootstrapApplication } from '@angular/platform-browser'; +import { afterEach, describe, expect, it } from 'vitest'; +import { elementById } from '../element-id.ts'; +import { createForTracker, type ControlFlowDebugNg } from '../for-blocks.ts'; + +class TripList { + readonly trips = signal([ + { id: 1, city: 'Rome' }, + { id: 2, city: 'Oslo' }, + ]); + readonly tags = signal([]); + readonly stops = signal(['a', 'b', 'c']); +} +Component({ + selector: 'app-root', + template: ` +
    + @for (trip of trips(); track trip.id) { +
  • {{ trip.city }}
  • + } +
+ @for (tag of tags(); track tag) { + {{ tag }} + } @empty { +

No tags

+ } + @for (stop of stops(); track $index) { + {{ stop }} + } + `, +})(TripList); + +class ExamplePanel {} +Component({ + selector: 'app-example-panel', + template: `
`, +})(ExamplePanel); + +class SignalsExample { + readonly items = signal(['x', 'y']); +} +Component({ + selector: 'app-root', + imports: [ExamplePanel], + template: ` + + @for (item of items(); track item) { + {{ item }} + } + + `, +})(SignalsExample); + +const settle = async (app: ApplicationRef) => { + for (let i = 0; i < 5; i++) { + await new Promise((resolve) => setTimeout(resolve, 0)); + app.tick(); + } +}; + +describe('createForTracker with a real app', () => { + let app: ApplicationRef | null = null; + afterEach(() => { + app?.destroy(); + app = null; + document.body.innerHTML = ''; + }); + + it('reads real @for blocks through ɵgetControlFlowBlocks and keeps their ids', async () => { + document.body.innerHTML = ''; + app = await bootstrapApplication(TripList, { + providers: [provideZonelessChangeDetection()], + }); + await settle(app); + + const ng = (globalThis as { ng?: ControlFlowDebugNg }).ng!; + expect(typeof ng.ɵgetControlFlowBlocks).toBe('function'); + const tracker = createForTracker(); + const report = tracker.collect(ng)!; + expect(report.forBlocks).toHaveLength(3); + const [trips, tags, stops] = report.forBlocks; + expect(trips).toMatchObject({ + count: 2, + track: 'function', + hasEmptyBlock: false, + showingEmpty: false, + owner: { name: 'TripList', tag: 'app-root' }, + }); + expect(trips.rootIds.map((id) => elementById(id)?.textContent)).toEqual(['Rome', 'Oslo']); + expect(tags).toMatchObject({ + count: 0, + track: 'item', + hasEmptyBlock: true, + showingEmpty: true, + }); + expect(stops).toMatchObject({ count: 3, track: '$index', hasEmptyBlock: false }); + + const list = app.components[0].instance as TripList; + list.trips.update((all) => [...all, { id: 3, city: 'Lima' }]); + list.tags.set(['beach']); + await settle(app); + const [moreTrips, someTags] = tracker.collect(ng)!.forBlocks; + expect(moreTrips).toMatchObject({ id: trips.id, count: 3 }); + expect(someTags).toMatchObject({ id: tags.id, count: 1, showingEmpty: false }); + }); + + it('names the template owner of a @for block projected into another component', async () => { + document.body.innerHTML = ''; + app = await bootstrapApplication(SignalsExample, { + providers: [provideZonelessChangeDetection()], + }); + await settle(app); + + const ng = (globalThis as { ng?: ControlFlowDebugNg }).ng!; + const tracker = createForTracker(); + const [block] = tracker.collect(ng)!.forBlocks; + expect(block).toMatchObject({ + count: 2, + owner: { name: 'SignalsExample', tag: 'app-root' }, + }); + expect(elementById(block.owner!.id)).toBe(document.querySelector('app-root')); + expect(tracker.collect(ng)!.forBlocks[0].id).toBe(block.id); + }); +}); diff --git a/packages/devtools/src/__tests__/for-blocks.test.ts b/packages/devtools/src/__tests__/for-blocks.test.ts new file mode 100644 index 00000000..8bf400ce --- /dev/null +++ b/packages/devtools/src/__tests__/for-blocks.test.ts @@ -0,0 +1,226 @@ +// @vitest-environment jsdom +import { afterEach, describe, expect, it, vi } from 'vitest'; +import { createDeferTracker } from '../defer-blocks.ts'; +import { elementById } from '../element-id.ts'; +import { + controlFlowReader, + createForTracker, + MAX_FOR_BLOCKS, + type ControlFlowDebugNg, +} from '../for-blocks.ts'; +import { toComponentPage } from '../rpc/component-tools.ts'; +import { FOR_ROWS, forBlocksText } from '../rpc/for-blocks-tools.ts'; +import type { ComponentPage, ForBlockInfo } from '../types.ts'; + +class _TripList {} + +function page() { + document.body.innerHTML = ` + +
  • Rome
  • Oslo
+
`; + const root = document.querySelector('app-root')!; + const list = document.querySelector('app-trip-list')!; + const ul = list.querySelector('ul')!; + const anchor = document.createComment('container'); + ul.appendChild(anchor); + const instances = new Map([ + [root, {}], + [list, new _TripList()], + ]); + return { root, list, ul, anchor, instances }; +} + +const forBlock = (overrides: Record) => ({ + type: 1, + items: [], + hasEmptyBlock: false, + rootNodes: [], + trackExpression: 'function', + ...overrides, +}); + +describe('createForTracker', () => { + afterEach(() => { + document.body.innerHTML = ''; + }); + + it('reports nothing when Angular has no ɵgetControlFlowBlocks (before 22.0)', () => { + const { instances } = page(); + const ng: ControlFlowDebugNg = { getComponent: (el) => instances.get(el) ?? null }; + expect(createForTracker().collect(ng)).toBeUndefined(); + expect(createForTracker().collect(undefined)).toBeUndefined(); + }); + + it('reads the owner, item count, track kind and @empty of each @for block', () => { + const { root, list, ul, anchor, instances } = page(); + const [rome, oslo] = [...ul.querySelectorAll('li')]; + const emptyAnchor = document.createComment('container'); + list.appendChild(emptyAnchor); + const raw = [ + { type: 0, state: 'complete', hostNode: anchor, rootNodes: [] }, + forBlock({ + items: [{ id: 1 }, { id: 2 }], + hostNode: anchor, + rootNodes: [rome, document.createTextNode(' '), oslo], + trackExpression: '$index', + }), + forBlock({ hostNode: emptyAnchor, hasEmptyBlock: true, trackExpression: 'item' }), + ]; + const ng: ControlFlowDebugNg = { + getComponent: (el) => instances.get(el) ?? null, + ɵgetControlFlowBlocks: (node) => (node === root ? raw : []), + }; + const report = createForTracker().collect(ng)!; + expect(report.forBlocksTruncated).toBeUndefined(); + const [loop, empty] = report.forBlocks; + expect(report.forBlocks).toHaveLength(2); + expect(loop).toMatchObject({ + count: 2, + track: '$index', + hasEmptyBlock: false, + showingEmpty: false, + owner: { name: 'TripList', tag: 'app-trip-list' }, + }); + expect(loop.rootIds.map((id) => elementById(id))).toEqual([rome, oslo]); + expect(elementById(loop.owner!.id)).toBe(list); + expect(empty).toMatchObject({ + count: 0, + track: 'item', + hasEmptyBlock: true, + showingEmpty: true, + }); + // Only the count leaves the page, never the items. + expect(JSON.stringify(report)).not.toContain('"id":1'); + }); + + it('keeps a block id while its items change and gives a new block a new id', () => { + const { root, anchor, instances } = page(); + let raw: unknown[] = [forBlock({ hostNode: anchor, items: [1, 2] })]; + const ng: ControlFlowDebugNg = { + getComponent: (el) => instances.get(el) ?? null, + ɵgetControlFlowBlocks: (node) => (node === root ? raw : []), + }; + const tracker = createForTracker(); + const first = tracker.collect(ng)!.forBlocks[0]; + raw = [forBlock({ hostNode: anchor, items: [1, 2, 3] })]; + const second = tracker.collect(ng)!.forBlocks[0]; + expect(second).toMatchObject({ id: first.id, count: 3 }); + const other = document.createComment('container'); + root.appendChild(other); + raw = [forBlock({ hostNode: other }), forBlock({ hostNode: anchor })]; + const [added, kept] = tracker.collect(ng)!.forBlocks; + expect(kept.id).toBe(first.id); + expect(added.id).not.toBe(first.id); + }); + + it('gives an unknown track kind as null and ignores malformed entries', () => { + const { root, anchor, instances } = page(); + const raw = [ + null, + { type: 1 }, + forBlock({ hostNode: anchor, trackExpression: 'trackByName', items: 'nope' }), + ]; + const ng: ControlFlowDebugNg = { + getComponent: (el) => instances.get(el) ?? null, + ɵgetControlFlowBlocks: (node) => (node === root ? raw : []), + }; + expect(createForTracker().collect(ng)!.forBlocks).toEqual([ + expect.objectContaining({ track: null, count: 0, showingEmpty: false }), + ]); + }); + + it(`stops at ${MAX_FOR_BLOCKS} blocks and says the list is truncated`, () => { + const { root, instances } = page(); + const raw = Array.from({ length: MAX_FOR_BLOCKS + 3 }, () => + forBlock({ hostNode: root.appendChild(document.createComment('container')) }), + ); + const ng: ControlFlowDebugNg = { + getComponent: (el) => instances.get(el) ?? null, + ɵgetControlFlowBlocks: (node) => (node === root ? raw : []), + }; + const report = createForTracker().collect(ng)!; + expect(report.forBlocks).toHaveLength(MAX_FOR_BLOCKS); + expect(report.forBlocksTruncated).toBe(true); + }); + + it('shares one ɵgetControlFlowBlocks call per root with the defer tracker', () => { + const { root, anchor, instances } = page(); + const util = vi.fn((node: Node) => + node === root + ? [ + { + type: 0, + state: 'placeholder', + incrementalHydrationState: 'not-configured', + triggers: [], + hostNode: anchor, + rootNodes: [], + }, + forBlock({ hostNode: anchor, items: [1] }), + ] + : [], + ); + const ng: ControlFlowDebugNg = { + getComponent: (el) => instances.get(el) ?? null, + ɵgetControlFlowBlocks: util, + }; + const blocksOf = controlFlowReader(ng); + const defer = createDeferTracker().collect(ng, document, blocksOf); + const loops = createForTracker().collect(ng, document, blocksOf); + expect(defer).toHaveLength(1); + expect(loops?.forBlocks).toHaveLength(1); + expect(util).toHaveBeenCalledTimes(1); + }); +}); + +describe('@for blocks on the server', () => { + const block = (id: string, overrides: Partial = {}): ForBlockInfo => ({ + id, + owner: { id: 'c2', name: 'TripList', tag: 'app-trip-list' }, + count: 3, + track: 'function', + hasEmptyBlock: true, + showingEmpty: false, + rootIds: [], + ...overrides, + }); + const pageWith = (extra: Partial): ComponentPage => + toComponentPage({ pageId: 'p1', roots: [], count: 0, detail: null, ...extra }); + + it('keeps the blocks and the truncation flag the page sent', () => { + const kept = pageWith({ forBlocks: [block('f1')], forBlocksTruncated: true }); + expect(kept.forBlocks).toHaveLength(1); + expect(kept.forBlocksTruncated).toBe(true); + expect(pageWith({}).forBlocks).toBeUndefined(); + }); + + it('lists each block with its owner, items, track kind and @empty', () => { + const text = forBlocksText([ + pageWith({ + url: 'http://localhost/trips', + forBlocks: [ + block('f1', { track: '$index' }), + block('f2', { count: 0, showingEmpty: true }), + block('f3', { count: 0, hasEmptyBlock: false }), + ], + }), + ]); + expect(text).toContain('Page `p1` (http://localhost/trips): 3 `@for` blocks.'); + expect(text).toContain('| `f1` | TripList (`c2`) | 3 | `$index` | yes | |'); + expect(text).toContain( + '| `f2` | TripList (`c2`) | 0 | an expression | showing | showing @empty |', + ); + expect(text).toContain('no items and no @empty block, so it renders nothing'); + }); + + it('says when the page has no util, no blocks or more blocks than it lists', () => { + expect(forBlocksText([])).toMatch(/^No component tree has been reported/); + expect(forBlocksText([pageWith({})])).toMatch(/Angular 22\.0 added/); + expect(forBlocksText([pageWith({ forBlocks: [] })])).toContain('no `@for` blocks are rendered'); + const many = Array.from({ length: FOR_ROWS + 2 }, (_, i) => block(`f${i}`)); + const text = forBlocksText([pageWith({ forBlocks: many, forBlocksTruncated: true })]); + expect(text).toContain(`${FOR_ROWS + 2} or more`); + expect(text).toContain('2 more blocks not shown.'); + }); +}); diff --git a/packages/devtools/src/block-owner.ts b/packages/devtools/src/block-owner.ts new file mode 100644 index 00000000..8c09c9d5 --- /dev/null +++ b/packages/devtools/src/block-owner.ts @@ -0,0 +1,58 @@ +import { componentHostOf, type ComponentDebugNg } from './component-tree.ts'; +import { elementId } from './element-id.ts'; +import { className } from './injector-tree.ts'; + +export interface BlockOwnerDebugNg extends ComponentDebugNg { + getOwningComponent?(node: Node): unknown; + getHostElement?(instance: object): unknown; +} + +export interface BlockOwner { + id: string; + name: string; + tag: string; +} + +function read(fn: () => T, fallback: T): T { + try { + return fn(); + } catch { + return fallback; + } +} + +/** + * The component whose template holds a control flow block, read from the + * block's anchor comment or, failing that, one of its root nodes. Angular + * patches each container anchor with the view that declares it. + * + * `ng.getOwningComponent` reads the node's own view and climbs embedded views + * up to the component view that declared it (`_debug_node-chunk.mjs`), so a + * block that component A content-projects into component B still names A. + * `ng.getHostElement` then gives A's host. When either util is missing or + * answers nothing, the nearest component host above the node stands in, + * which is right for every block that is not projected. It starts at the + * node's parent, so a root node that is a component host itself still names + * the template it sits in. + */ +export function blockOwnerOf(ng: BlockOwnerDebugNg, node: Node | null): BlockOwner | undefined { + if (!node) return undefined; + let owner: Element | null = null; + let instance: unknown = null; + const owning = read(() => ng.getOwningComponent?.(node) ?? null, null); + if (owning && typeof owning === 'object') { + const host = read(() => ng.getHostElement?.(owning) ?? null, null); + if (host instanceof Element) { + owner = host; + instance = owning; + } + } + if (!owner) { + const parent = node.parentElement; + owner = parent ? componentHostOf(ng, parent) : null; + instance = owner ? read(() => ng.getComponent?.(owner!), null) : null; + } + const ctor = (instance as { constructor?: unknown } | null)?.constructor; + if (!owner || typeof ctor !== 'function') return undefined; + return { id: elementId(owner), name: className(ctor), tag: owner.tagName.toLowerCase() }; +} diff --git a/packages/devtools/src/component-edit-overlay.ts b/packages/devtools/src/component-edit-overlay.ts new file mode 100644 index 00000000..0f91d891 --- /dev/null +++ b/packages/devtools/src/component-edit-overlay.ts @@ -0,0 +1,63 @@ +import { editComponent, type ComponentEditRequest, type EditDebugNg } from './component-edit.ts'; +import { actionBlockedMessage } from './config.ts'; +import { elementById } from './element-id.ts'; +import { documentTree, type HostTree } from './host-tree.ts'; + +interface EditRpc { + call(name: string, ...args: unknown[]): Promise; + register(definition: { + name: string; + type: 'event'; + jsonSerializable: boolean; + handler: (message: never) => unknown; + }): void; +} + +export interface ComponentEditOptions { + getNg: () => EditDebugNg | undefined; + /** `actions.components` from the config the server published. */ + allowed: boolean; + tree?: HostTree; + /** Runs after a write, so the next push carries the new value. */ + edited?: () => void; +} + +/** + * Answers the server's `component-edit` events for this page. The server + * checks the action gate first; the page checks it again, so a server + * started with writes off never gets one through. + */ +export function registerComponentEdit( + rpc: EditRpc, + pageId: string, + options: ComponentEditOptions, +): void { + const tree = options.tree ?? documentTree(); + const connected = (host: object) => tree.isHost(host) && tree.connected(host); + rpc.register({ + name: 'component-edit', + type: 'event', + jsonSerializable: true, + handler: ( + message: { requestId?: unknown; pageId?: unknown; request?: ComponentEditRequest } | null, + ) => { + if (!message || typeof message.requestId !== 'string' || message.pageId !== pageId) return; + let result; + if (!options.allowed) { + result = { error: actionBlockedMessage('components') }; + } else { + try { + result = editComponent(options.getNg(), message.request as ComponentEditRequest, (id) => + elementById(id, connected), + ); + } catch (error) { + result = { error: String((error as Error)?.message ?? error) }; + } + } + void rpc + .call('component-edit-result', { requestId: message.requestId, pageId, result }) + .catch(() => {}); + if ('ok' in result && result.ok) options.edited?.(); + }, + }); +} diff --git a/packages/devtools/src/component-edit.ts b/packages/devtools/src/component-edit.ts new file mode 100644 index 00000000..45272dc1 --- /dev/null +++ b/packages/devtools/src/component-edit.ts @@ -0,0 +1,416 @@ +import type { ComponentDebugNg } from './component-tree.ts'; +import { isSecretName, REDACTED, serialize, serializeNamed } from './serialize.ts'; +import type { ComponentDetail, ComponentProp } from './types.ts'; + +/** + * Writes to one component instance, asked for from the panel or an agent tool + * (`set-component-property`, `set-signal`). The collector never writes on its + * own: this runs only for an explicit request, after the server checked + * `actions.components`, and the overlay checks it again. + */ + +export type ComponentEditKind = 'property' | 'signal'; + +export interface ComponentEditRequest { + /** The component tree's instance id (`elementId` of the host). */ + id: string; + /** A property name, or a path into its value: `user.name`, `items[0].title`. */ + path: string; + value: unknown; + /** `signal` asks for a writable signal, `property` for anything else. */ + kind?: ComponentEditKind; +} + +export type ComponentEditResult = + | { + ok: true; + kind: ComponentEditKind; + component: string; + path: string; + /** The value now in the app, serialized and redacted like the detail. */ + value: unknown; + } + | { ok?: false; error: string }; + +export interface EditDebugNg extends ComponentDebugNg { + applyChanges?(component: unknown): void; +} + +/** The longest JSON text a write may carry. */ +export const MAX_EDIT_JSON = 100_000; +const MAX_JSON_NODES = 2000; +const MAX_PATH = 20; +const VALUE_LIMITS = { depth: 3, keys: 30, items: 30, text: 300 }; +const UNSAFE_KEYS = new Set(['__proto__', 'prototype', 'constructor']); + +export const LOCKED = { + redacted: 'Redacted, so it cannot be edited here.', + signalInput: 'Signal input. Its parent binding sets it, so it has no set().', + readonlySignal: 'Read-only signal (computed() or asReadonly()), so it has no set().', + resource: 'Resource. Reload it from the app instead.', + getter: 'Getter without a setter.', + notJson: 'Only text, numbers, booleans, null, arrays and plain objects can be edited.', + clipped: 'Too large to edit in the panel.', +} as const; + +function read(fn: () => T, fallback: T): T { + try { + return fn(); + } catch { + return fallback; + } +} + +function isPlainObject(value: unknown): value is Record { + if (!value || typeof value !== 'object') return false; + const proto = Object.getPrototypeOf(value); + return proto === null || proto === Object.prototype; +} + +/** Whether a value is JSON data: primitives, `null`, arrays and plain objects, without cycles. */ +export function isJsonValue(value: unknown, budget = { left: MAX_JSON_NODES }): boolean { + const seen = new Set(); + const walk = (v: unknown): boolean => { + if (--budget.left < 0) return false; + if (v === null || typeof v === 'string' || typeof v === 'boolean') return true; + if (typeof v === 'number') return Number.isFinite(v); + if (typeof v !== 'object') return false; + if (seen.has(v)) return false; + seen.add(v); + try { + if (Array.isArray(v)) return v.every(walk); + if (!isPlainObject(v)) return false; + return Object.keys(v).every((key) => { + const d = Object.getOwnPropertyDescriptor(v, key); + return !!d && 'value' in d && walk(d.value); + }); + } finally { + seen.delete(v); + } + }; + return read(() => walk(value), false); +} + +/** `a.b[0].c` as `['a', 'b', '0', 'c']`; `null` when it is empty or too deep. */ +export function parsePath(path: unknown): string[] | null { + if (typeof path !== 'string' || !path || path.length > 500) return null; + const parts = path + .replace(/\[(\d+)\]/g, '.$1') + .split('.') + .map((part) => part.trim()); + if (parts.some((part) => !part) || parts.length > MAX_PATH) return null; + return parts; +} + +function isSignal(ng: EditDebugNg, value: unknown): boolean { + return typeof value === 'function' && read(() => !!ng.isSignal?.(value), false); +} + +function isWritableSignal(ng: EditDebugNg, value: unknown): boolean { + return isSignal(ng, value) && typeof (value as { set?: unknown }).set === 'function'; +} + +function isResource(ng: EditDebugNg, value: unknown): boolean { + if (!value || typeof value !== 'object') return false; + const ref = value as Record; + return ( + isSignal( + ng, + read(() => ref['value'], undefined), + ) && + isSignal( + ng, + read(() => ref['status'], undefined), + ) + ); +} + +/** The class property behind each input, mapped from both its public name and its own name. */ +function inputProps(inputs: Record | undefined): Map { + const map = new Map(); + for (const [name, entry] of Object.entries(inputs ?? {})) { + const prop = + typeof entry === 'string' + ? entry + : Array.isArray(entry) && typeof entry[0] === 'string' + ? entry[0] + : name; + map.set(name, prop); + map.set(prop, prop); + } + return map; +} + +/** The accessor of a property on an object or its prototypes, if it is one. */ +function accessorOf(target: object, key: string): PropertyDescriptor | null { + for (let o: object | null = target; o; o = Object.getPrototypeOf(o)) { + const d = Object.getOwnPropertyDescriptor(o, key); + if (d) return 'value' in d ? null : d; + } + return null; +} + +function hasRedaction(serialized: unknown): boolean { + return read(() => JSON.stringify(serialized) ?? '', '').includes(REDACTED); +} + +/** Whether the current value would show masked anywhere, so a writer never saw all of it. */ +function masked(name: string, value: unknown): boolean { + return hasRedaction(serializeNamed(name, value, { budget: MAX_JSON_NODES })); +} + +/** + * Why a top-level property cannot be edited in the panel, or how it can be: + * `edit` names the write to send, `locked` says why there is none. + */ +export function editabilityOf( + ng: EditDebugNg, + instance: object, + prop: string, + names: string[], + isInput: boolean, +): Pick { + if (names.some(isSecretName)) return { locked: LOCKED.redacted }; + const raw = read(() => (instance as Record)[prop], undefined); + if (isResource(ng, raw)) return { locked: LOCKED.resource }; + let value = raw; + let edit: ComponentEditKind = 'property'; + if (isSignal(ng, raw)) { + if (!isWritableSignal(ng, raw)) { + return { locked: isInput ? LOCKED.signalInput : LOCKED.readonlySignal }; + } + edit = 'signal'; + value = read(() => (raw as () => unknown)(), undefined); + } else { + const accessor = accessorOf(instance, prop); + if (accessor && !accessor.set) return { locked: LOCKED.getter }; + } + if (value !== undefined && !isJsonValue(value)) return { locked: LOCKED.notJson }; + const shown = serializeNamed(prop, value, VALUE_LIMITS); + if (hasRedaction(shown)) return { locked: LOCKED.redacted }; + // The panel edits what it shows, so a clipped value would lose its tail. + if (value !== undefined && JSON.stringify(shown) !== JSON.stringify(value)) { + return { locked: LOCKED.clipped }; + } + return { edit }; +} + +/** Adds `edit` or `locked` to the component's own inputs and properties. */ +export function markEditable( + ng: EditDebugNg, + instance: object, + detail: Pick, +): void { + for (const input of detail.inputs) { + Object.assign(input, editabilityOf(ng, instance, input.prop, [input.name, input.prop], true)); + } + for (const prop of detail.properties ?? []) { + Object.assign(prop, editabilityOf(ng, instance, prop.prop, [prop.name], false)); + } +} + +/** A copy of `root` with `value` at `path`, copying each plain object or array on the way. */ +function replaced(root: unknown, path: string[], value: unknown): unknown { + if (!path.length) return value; + const [key, ...rest] = path; + if (Array.isArray(root)) { + const index = Number(key); + if (!Number.isInteger(index) || index < 0 || index >= root.length) throw new PathError(key); + const copy = root.slice(); + copy[index] = replaced(root[index], rest, value); + return copy; + } + if (!isPlainObject(root) || !Object.hasOwn(root, key)) throw new PathError(key); + return { ...root, [key]: replaced(root[key], rest, value) }; +} + +class PathError extends Error { + readonly key: string; + constructor(key: string) { + super(key); + this.key = key; + } +} + +function leafOf(root: unknown, path: string[]): unknown { + let current = root; + for (const key of path) { + if (!current || typeof current !== 'object') throw new PathError(key); + if (Array.isArray(current) ? !(Number(key) < current.length) : !(key in current)) { + throw new PathError(key); + } + current = (current as Record)[key]; + } + return current; +} + +const fail = (error: string): ComponentEditResult => ({ error }); + +/** + * Writes `request.value` at `request.path` on the component hosted by the + * element with `request.id`. A writable signal gets `.set()` (with a copy of + * its value when the path goes inside it); a plain property is assigned and + * the view refreshed with `ng.applyChanges`. Signal inputs, read-only signals, + * getters, functions, outputs, values that are not JSON and paths the + * redaction masks are refused. + */ +export function editComponent( + ng: EditDebugNg | undefined, + request: ComponentEditRequest, + find: (id: string) => H | null, +): ComponentEditResult { + if (!ng?.getComponent) return fail('Angular debug APIs are not available on this page.'); + if (!request || typeof request.id !== 'string' || !request.id) { + return fail('Pass the instance id of a component.'); + } + const path = parsePath(request.path); + if (!path) return fail('Pass a property name, or a path such as user.name or items[0].title.'); + const unsafe = path.find((key) => UNSAFE_KEYS.has(key)); + if (unsafe) return fail(`\`${unsafe}\` cannot be written.`); + if (!isJsonValue(request.value)) { + return fail('The value must be JSON: text, a number, a boolean, null, an array or an object.'); + } + if ((read(() => JSON.stringify(request.value), '') ?? '').length > MAX_EDIT_JSON) { + return fail(`The value is longer than ${MAX_EDIT_JSON} characters of JSON.`); + } + const host = find(request.id); + const instance = host ? read(() => ng.getComponent?.(host) ?? null, null) : null; + if (!instance || typeof instance !== 'object') { + return fail( + `No component instance \`${request.id}\` is on this page. It may have been destroyed; read the component tree again for current ids.`, + ); + } + const component = read(() => { + const ctor = (instance as { constructor?: { name?: string } }).constructor; + return (ctor?.name ?? 'Component').replace(/^_(?=[A-Z])/, ''); + }, 'Component'); + const meta = read(() => ng.getDirectiveMetadata?.(instance) ?? null, null); + const inputs = inputProps(meta?.inputs); + const outputs = inputProps(meta?.outputs); + + // A public input name stands for its class property. + const [first, ...rest] = path; + const isInput = inputs.has(first); + const prop = isInput ? inputs.get(first)! : first; + const full = [prop, ...rest]; + const shownPath = full.join('.'); + const names = isInput ? [first, prop, ...rest] : full; + if (names.some(isSecretName)) { + return fail(`\`${shownPath}\` is redacted, so it cannot be written.`); + } + if (outputs.has(prop)) return fail(`\`${prop}\` is an output, not a value.`); + if (prop.startsWith('__ng') || prop.startsWith('ɵ')) { + return fail(`\`${prop}\` is internal to Angular.`); + } + if (!(prop in instance)) { + return fail(`${component} has no property \`${prop}\`.`); + } + + // Walk to the first signal on the path, or to the last container. + let container: object = instance; + let index = 0; + let signal: unknown = null; + for (; index < full.length; index++) { + const key = full[index]; + const exists = Array.isArray(container) + ? Number.isInteger(Number(key)) && Number(key) >= 0 && Number(key) < container.length + : key in container; + if (!exists) return fail(`\`${full.slice(0, index + 1).join('.')}\` does not exist.`); + const value = read(() => (container as Record)[key], undefined); + if (isSignal(ng, value)) { + signal = value; + break; + } + if (index === full.length - 1) break; + if (!value || typeof value !== 'object') { + return fail(`\`${full.slice(0, index + 1).join('.')}\` holds no object to go into.`); + } + if (isResource(ng, value)) { + return fail( + `\`${full.slice(0, index + 1).join('.')}\` is a resource. Reload it from the app instead.`, + ); + } + container = value; + } + + if (signal) { + const signalPath = full.slice(0, index + 1).join('.'); + if (request.kind === 'property') { + return fail(`\`${signalPath}\` is a signal. Write it with set-signal.`); + } + if (!isWritableSignal(ng, signal)) { + const reason = + index === 0 && isInput + ? 'is a signal input. Its parent binding sets it, so it cannot be written' + : 'is a read-only signal (computed() or asReadonly()), so it has no set()'; + return fail(`\`${signalPath}\` ${reason}.`); + } + const inner = full.slice(index + 1); + let next: unknown; + let current: unknown; + try { + const root = (signal as () => unknown)(); + current = leafOf(root, inner); + next = replaced(root, inner, request.value); + } catch (error) { + if (error instanceof PathError) { + return fail( + `\`${shownPath}\` does not exist, or goes through a value that is not a plain object or array.`, + ); + } + return fail(`Reading \`${signalPath}\` threw: ${String((error as Error)?.message ?? error)}`); + } + const problem = currentProblem(full.at(-1)!, current, shownPath); + if (problem) return fail(problem); + try { + (signal as { set(value: unknown): void }).set(next); + } catch (error) { + return fail(`Setting \`${signalPath}\` threw: ${String((error as Error)?.message ?? error)}`); + } + const now = read(() => leafOf((signal as () => unknown)(), inner), request.value); + return { ok: true, kind: 'signal', component, path: shownPath, value: shown(full, now) }; + } + + if (request.kind === 'signal') { + return fail(`\`${shownPath}\` is not a signal. Write it with set-component-property.`); + } + const key = full.at(-1)!; + const current = read(() => (container as Record)[key], undefined); + if (typeof current === 'function') return fail(`\`${shownPath}\` is a method, not a value.`); + if (isResource(ng, current)) { + return fail(`\`${shownPath}\` is a resource. Reload it from the app instead.`); + } + const accessor = accessorOf(container, key); + if (accessor && !accessor.set) return fail(`\`${shownPath}\` is a getter without a setter.`); + const problem = currentProblem(key, current, shownPath); + if (problem) return fail(problem); + let written = false; + try { + written = Reflect.set(container, key, request.value); + } catch (error) { + return fail(`Setting \`${shownPath}\` threw: ${String((error as Error)?.message ?? error)}`); + } + if (!written) return fail(`\`${shownPath}\` is read-only.`); + try { + ng.applyChanges?.(instance); + } catch { + // The value is set; the next change detection shows it. + } + const now = read(() => (container as Record)[key], request.value); + return { ok: true, kind: 'property', component, path: shownPath, value: shown(full, now) }; +} + +/** Why the value at the target cannot be replaced, from what it holds now. */ +function currentProblem(key: string, current: unknown, path: string): string | null { + if (current !== undefined && !isJsonValue(current)) { + return `\`${path}\` holds a value that is not JSON (a class instance, Map, Date or function), so it is not replaced.`; + } + if (masked(key, current)) { + return `\`${path}\` holds redacted data, so it cannot be replaced. Write a path next to it instead.`; + } + return null; +} + +function shown(path: string[], value: unknown): unknown { + return path.some(isSecretName) ? REDACTED : serialize(value, VALUE_LIMITS); +} diff --git a/packages/devtools/src/component-tree.ts b/packages/devtools/src/component-tree.ts index 039e1e32..18278a49 100644 --- a/packages/devtools/src/component-tree.ts +++ b/packages/devtools/src/component-tree.ts @@ -1,3 +1,4 @@ +import { markEditable } from './component-edit.ts'; import { componentSource } from './component-source.ts'; import { elementById, elementId, pruneElementIds } from './element-id.ts'; import { documentTree, type HostTree } from './host-tree.ts'; @@ -282,6 +283,7 @@ export function componentDetail( }), dependencies: [], }; + markEditable(ng, instance, detail); const source = componentSource(instance); if (source) detail.source = source; const cd = meta?.changeDetection; diff --git a/packages/devtools/src/config.ts b/packages/devtools/src/config.ts index 96d98b8d..8ced33f6 100644 --- a/packages/devtools/src/config.ts +++ b/packages/devtools/src/config.ts @@ -36,7 +36,14 @@ export function hubDockId(view: string): string { return `pangular:${view}`; } -export const PANGULAR_ACTIONS = ['forms', 'router', 'ngrx', 'http', 'analog'] as const; +export const PANGULAR_ACTIONS = [ + 'forms', + 'router', + 'ngrx', + 'http', + 'analog', + 'components', +] as const; export type PangularAction = (typeof PANGULAR_ACTIONS)[number]; @@ -448,6 +455,7 @@ export const ACTION_TOOLS: Record = { ngrx: ['dispatch-ngrx-action'], http: ['set-http-rule', 'remove-http-rule', 'clear-recordings'], analog: ['analog-call-api', 'clear-recordings'], + components: ['set-component-property', 'set-signal'], }; /** @@ -481,6 +489,8 @@ export const AGENT_SAFETY: Record> = { 'change-detection': 'action', 'clear-recordings': 'destructive', 'analog-call-api': 'destructive', + 'set-component-property': 'action', + 'set-signal': 'action', }; /** @@ -503,6 +513,7 @@ export function actionBlockedMessage(action: PangularAction): string { ngrx: 'Restoring NgRx state and dispatching actions', http: 'Changing HTTP mock rules and clearing HTTP calls', analog: 'Calling API routes and clearing server calls', + components: 'Editing component properties and signals', }[action]; return `${what} is turned off in the devtools config (actions.${action}).`; } @@ -519,6 +530,10 @@ export const SHARED_RPC: readonly string[] = [ 'list-pages', 'open-in-editor', 'hub-dock-seen', + // Store as global spans the components, injectors and NgRx inspectors; the + // handler checks that the inspector of each request is on. + 'request-console-global', + 'console-global-result', ]; /** @@ -539,6 +554,8 @@ export const RPC_INSPECTOR: Record = { 'cancel-component-pick': 'components', 'component-pick-result': 'components', 'request-page-highlight': 'components', + 'request-component-edit': 'components', + 'component-edit-result': 'components', 'get-signals': 'signals', 'push-signal-graph': 'signals', 'ping-signal-graph': 'signals', @@ -607,7 +624,10 @@ export const AGENT_INSPECTOR: Record = { 'inspect-component': 'components', 'list-components': 'components', 'defer-blocks': 'components', + 'for-blocks': 'components', 'change-detection': 'components', + 'set-component-property': 'components', + 'set-signal': 'components', 'signal-graph': 'signals', 'inspect-signals': 'signals', 'injector-tree': 'injectors', @@ -703,7 +723,10 @@ export const PAGE_AGENT_ENTRIES: readonly string[] = [ 'inspect-component', 'list-components', 'defer-blocks', + 'for-blocks', 'change-detection', + 'set-component-property', + 'set-signal', 'signal-graph', 'inspect-signals', 'injector-tree', @@ -810,6 +833,7 @@ const ACTION_LABEL: Record = { ngrx: 'NgRx restore and dispatch', http: 'HTTP mocking', analog: 'Analog API calls', + components: 'Component edits', }; const LIMIT_LABEL: Record string> = { diff --git a/packages/devtools/src/console-handles.ts b/packages/devtools/src/console-handles.ts new file mode 100644 index 00000000..db072173 --- /dev/null +++ b/packages/devtools/src/console-handles.ts @@ -0,0 +1,311 @@ +import { elementById } from './element-id.ts'; +import { isRedactedKey, REDACTED } from './forms-privacy.ts'; +import { providerValue, type DebugNg } from './injector-tree.ts'; +import { isSecretName, redactText } from './serialize.ts'; + +/** How many selected components `$ng0..$ng4` keep, like Chrome's `$0..$4`. */ +export const NG_HANDLES = 5; + +/** What "Store as global" stores: a component, a provider or NgRx state. */ +export type ConsoleTarget = + | { kind: 'component'; id: string } + | { kind: 'provider'; injectorId: string; token: string; index: number } + | { kind: 'ngrx'; storeId: string }; + +export interface ConsoleGlobalResult { + ok: boolean; + /** The global the value went to, such as `temp1`. */ + name?: string; + message: string; + /** Secret fields were masked in the stored copy. */ + masked?: boolean; +} + +export function isConsoleTarget(value: unknown): value is ConsoleTarget { + if (!value || typeof value !== 'object') return false; + const target = value as Record; + const text = (key: string) => typeof target[key] === 'string' && (target[key] as string).length; + switch (target['kind']) { + case 'component': + return !!text('id'); + case 'provider': + return ( + !!text('injectorId') && + !!text('token') && + typeof target['index'] === 'number' && + Number.isInteger(target['index']) && + target['index'] >= 0 + ); + case 'ngrx': + return !!text('storeId'); + default: + return false; + } +} + +const MAX_COPY_DEPTH = 32; + +function isPlainObject(value: object): boolean { + const proto = Object.getPrototypeOf(value); + return proto === Object.prototype || proto === null; +} + +/** + * A copy of `value` with the fields the panel masks replaced by `[redacted]` + * and credentials, JWTs and bearer tokens masked in strings. Plain objects, + * arrays, `Map`s and `Set`s are copied; other objects (class instances, + * dates, elements) are kept as they are unless they hold a masked field, in + * which case their own fields are copied into a plain object. + */ +export function redactedCopy(value: unknown): { value: unknown; masked: boolean } { + let masked = false; + const seen = new Map(); + const walk = (val: unknown, depth: number): unknown => { + if (typeof val === 'string') { + const text = redactText(val); + if (text !== val) masked = true; + return text; + } + if (!val || typeof val !== 'object') return val; + if (seen.has(val)) return seen.get(val); + if (depth >= MAX_COPY_DEPTH) return val; + if (Array.isArray(val)) { + const out: unknown[] = []; + seen.set(val, out); + for (const item of val) out.push(walk(item, depth + 1)); + return out; + } + if (val instanceof Map) { + const out = new Map(); + seen.set(val, out); + for (const [key, item] of val) { + if (typeof key === 'string' && isRedactedKey(key)) { + masked = true; + out.set(key, REDACTED); + } else out.set(key, walk(item, depth + 1)); + } + return out; + } + if (val instanceof Set) { + const out = new Set(); + seen.set(val, out); + for (const item of val) out.add(walk(item, depth + 1)); + return out; + } + if (val instanceof Date || (typeof Node !== 'undefined' && val instanceof Node)) return val; + const plain = isPlainObject(val); + const before = masked; + const out: Record = {}; + seen.set(val, out); + for (const key of Object.keys(val)) { + if (isRedactedKey(key)) { + masked = true; + out[key] = REDACTED; + continue; + } + let item: unknown; + try { + item = (val as Record)[key]; + } catch { + continue; + } + out[key] = walk(item, depth + 1); + } + if (plain || masked !== before) return out; + // A class instance with nothing to mask stays the live object. + seen.set(val, val); + return val; + }; + const copy = walk(value, 0); + return { value: copy, masked }; +} + +/** Why a provider must not be stored at all, or `null` when it may be. */ +export function providerRefusal(token: string, value: unknown): string | null { + if (isSecretName(token)) { + return `${token} looks like a secret, so the devtools mask it and did not store it.`; + } + if (typeof value === 'string' && redactText(value) !== value) { + return `${token} holds a credential or token, so the devtools mask it and did not store it.`; + } + return null; +} + +/** + * The console globals the overlay writes into the page: `$ng0..$ng4` for the + * components selected in the panel, newest first, and `temp1`, `temp2`… for + * "Store as global", named like Chrome's "Store as global variable". A global + * the page (or another tool) already set is never overwritten, and + * `dispose()` removes only the globals this module still owns. + */ +export function createConsoleHandles(win: object = globalThis) { + const scope = win as Record; + const ours = new Map(); + let selected: object[] = []; + + const owned = (name: string) => ours.has(name) && Object.is(scope[name], ours.get(name)); + const free = (name: string) => !(name in scope) || owned(name); + const write = (name: string, value: unknown) => { + scope[name] = value; + ours.set(name, value); + }; + + return { + /** + * Makes `instance` `$ng0` and moves the earlier selections down to + * `$ng1..$ng4`. Selecting the current `$ng0` again changes nothing; an + * earlier one moves back to the top instead of appearing twice. + */ + select(instance: unknown) { + if (!instance || typeof instance !== 'object' || selected[0] === instance) return; + selected = [instance, ...selected.filter((item) => item !== instance)].slice(0, NG_HANDLES); + for (let index = 0; index < NG_HANDLES; index++) { + const name = `$ng${index}`; + if (!free(name)) continue; + if (index < selected.length) write(name, selected[index]); + } + }, + /** Stores `value` as the first free `tempN` and returns its name. */ + store(value: unknown): string { + for (let n = 1; ; n++) { + const name = `temp${n}`; + if (name in scope) continue; + write(name, value); + return name; + } + }, + /** The components `$ng0..$ng4` hold, newest first. */ + selection: () => [...selected], + dispose() { + for (const name of ours.keys()) if (owned(name)) delete scope[name]; + ours.clear(); + selected = []; + }, + }; +} + +export type ConsoleHandles = ReturnType; + +interface RpcScope { + rpc: { + call(name: string, ...args: unknown[]): Promise; + register(definition: { + name: string; + type: 'event'; + jsonSerializable: boolean; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + handler: (...args: any[]) => unknown; + }): void; + }; +} + +export interface ConsoleGlobalsOptions { + getNg: () => DebugNg | undefined; + /** The inspectors turned on in the devtools config. */ + inspectors: { components: boolean; injectors: boolean; ngrx: boolean }; + /** The live state of an NgRx store, when the NgRx inspector runs. */ + ngrxState?: (storeId: string) => { value: unknown } | null; + /** Where the globals go; the page's `window` by default. */ + win?: object; +} + +const KIND_INSPECTOR = { component: 'components', provider: 'injectors', ngrx: 'ngrx' } as const; + +function isPlainData(value: unknown): boolean { + return ( + Array.isArray(value) || + value instanceof Map || + value instanceof Set || + (!!value && typeof value === 'object' && isPlainObject(value)) + ); +} + +/** + * Wires the console globals into the overlay: `selectComponent(id)` sets + * `$ng0` for a component the panel selected on this page, and the + * `console-global` event stores a component, provider or NgRx state as + * `tempN` for the page that owns the request. Only the variable name and a + * message go back to the server. + */ +export function attachConsoleGlobals(my: RpcScope, pageId: string, options: ConsoleGlobalsOptions) { + const handles = createConsoleHandles(options.win ?? globalThis); + const componentAt = (id: string): unknown => { + const el = elementById(id); + if (!el) return null; + try { + return options.getNg()?.getComponent?.(el) ?? null; + } catch { + return null; + } + }; + const fail = (message: string): ConsoleGlobalResult => ({ ok: false, message }); + + const store = (target: unknown): ConsoleGlobalResult => { + if (!isConsoleTarget(target)) return fail('Nothing to store.'); + const inspector = KIND_INSPECTOR[target.kind]; + if (!options.inspectors[inspector]) { + return fail(`The ${inspector} inspector is turned off in the devtools config.`); + } + if (target.kind === 'component') { + const instance = componentAt(target.id); + if (!instance) return fail('That component is no longer on the page.'); + const name = handles.store(instance); + return { ok: true, name, message: `Stored as ${name}.` }; + } + if (target.kind === 'provider') { + const found = providerValue(options.getNg(), target.injectorId, target.token, target.index); + if ('error' in found) return fail(found.error); + const refused = providerRefusal(target.token, found.value); + if (refused) return fail(refused); + if (!isPlainData(found.value)) { + const name = handles.store(found.value); + return { ok: true, name, message: `Stored as ${name}.` }; + } + return storeCopy(found.value); + } + const state = options.ngrxState?.(target.storeId); + if (!state) return fail('That store is no longer on the page.'); + return storeCopy(state.value); + }; + + const storeCopy = (value: unknown): ConsoleGlobalResult => { + const copy = redactedCopy(value); + const name = handles.store(copy.value); + return copy.masked + ? { + ok: true, + name, + masked: true, + message: `Stored a copy as ${name}, with secret fields masked.`, + } + : { ok: true, name, message: `Stored a copy as ${name}.` }; + }; + + my.rpc.register({ + name: 'console-global', + type: 'event', + jsonSerializable: true, + handler: (message: { requestId?: unknown; pageId?: unknown; target?: unknown } | null) => { + // Only the page that owns the request answers it; a request for every page is ignored. + if (!message || typeof message.requestId !== 'string' || message.pageId !== pageId) return; + let result: ConsoleGlobalResult; + try { + result = store(message.target); + } catch (error) { + result = fail(String((error as Error)?.message ?? error)); + } + void my.rpc + .call('console-global-result', { requestId: message.requestId, pageId, result }) + .catch(() => {}); + }, + }); + + return { + /** Sets `$ng0` to the component with this id, when the components inspector runs. */ + selectComponent(id: string | null) { + if (!id || !options.inspectors.components) return; + handles.select(componentAt(id)); + }, + dispose: () => handles.dispose(), + }; +} diff --git a/packages/devtools/src/defer-blocks.ts b/packages/devtools/src/defer-blocks.ts index b21ca41e..36e127a2 100644 --- a/packages/devtools/src/defer-blocks.ts +++ b/packages/devtools/src/defer-blocks.ts @@ -1,10 +1,9 @@ -import { componentHostOf, type ComponentDebugNg } from './component-tree.ts'; +import { blockOwnerOf, type BlockOwnerDebugNg } from './block-owner.ts'; import { elementId } from './element-id.ts'; import { angularRoots } from './host-tree.ts'; -import { className } from './injector-tree.ts'; import type { DeferBlockInfo } from './types.ts'; -export interface DeferDebugNg extends ComponentDebugNg { +export interface DeferDebugNg extends BlockOwnerDebugNg { ɵgetControlFlowBlocks?(node: Node): unknown[]; ɵgetDeferBlocks?(node: Node): unknown[]; } @@ -106,29 +105,28 @@ export function createDeferTracker(now: () => number = Date.now) { return id; }; - const ownerOf = (ng: DeferDebugNg, host: Node | null): DeferBlockInfo['owner'] => { - const parent = !host ? null : host instanceof Element ? host : host.parentElement; - const owner = parent ? componentHostOf(ng, parent) : null; - const instance = owner ? read(() => ng.getComponent?.(owner), null) : null; - const ctor = (instance as { constructor?: unknown } | null)?.constructor; - if (!owner || typeof ctor !== 'function') return undefined; - return { id: elementId(owner), name: className(ctor), tag: owner.tagName.toLowerCase() }; - }; - return { /** True when the last `collect` stopped at {@link MAX_DEFER_BLOCKS} with blocks left. */ get truncated() { return truncated; }, /** Every defer block on the page, or `undefined` when Angular exposes no util for them. */ - collect(ng: DeferDebugNg | undefined, doc: Document = document): DeferBlockInfo[] | undefined { + collect( + ng: DeferDebugNg | undefined, + doc: Document = document, + blocksOf?: (root: Element) => unknown[], + ): DeferBlockInfo[] | undefined { truncated = false; const util = ng?.ɵgetControlFlowBlocks ?? ng?.ɵgetDeferBlocks; if (!ng || typeof util !== 'function') return undefined; const hosts = new Set(); const out: DeferBlockInfo[] = []; for (const root of angularRoots(doc)) { - const blocks = read(() => util.call(ng, root) ?? [], [] as unknown[]); + // `blocksOf` shares one `ɵgetControlFlowBlocks` walk with the `@for` tracker. + const blocks = read( + () => (blocksOf && ng.ɵgetControlFlowBlocks ? blocksOf(root) : util.call(ng, root)) ?? [], + [] as unknown[], + ); const valid = Array.isArray(blocks) ? blocks.filter(isDeferBlock) : []; const order: object[] = []; let position = 0; @@ -177,10 +175,7 @@ export function createDeferTracker(now: () => number = Date.now) { .slice(0, MAX_ROOT_IDS) .map((el) => elementId(el)), }; - const owner = ownerOf( - ng, - raw.hostNode instanceof Node ? raw.hostNode : (hostNode?.parentNode ?? null), - ); + const owner = blockOwnerOf(ng, hostNode); if (owner) block.owner = owner; if (triggers.includes('hydrate never')) block.hydrateNever = true; if (raw.loadingBlock?.exists) { diff --git a/packages/devtools/src/devframe.ts b/packages/devtools/src/devframe.ts index 3b13aaae..b1d90bc8 100644 --- a/packages/devtools/src/devframe.ts +++ b/packages/devtools/src/devframe.ts @@ -16,6 +16,8 @@ import { type CapacitorPage, type CapacitorState, } from './rpc/capacitor-tools.ts'; +import { forBlocksText } from './rpc/for-blocks-tools.ts'; +import { registerConsoleGlobals } from './rpc/console-globals.ts'; import { inspectProvidersText } from './rpc/injector-tools.ts'; import { sanitizeInjectorTree } from './rpc/injector-report.ts'; import { lintPipes, lintPipesText } from './rpc/pipe-lint.ts'; @@ -76,6 +78,7 @@ import { } from './rpc/component-tools.ts'; import { LIST_COMPONENTS_DESCRIPTION, listComponentsText } from './rpc/component-outline.ts'; import { inspectComponentText } from './rpc/component-detail-text.ts'; +import { createComponentEdits } from './rpc/component-edits.ts'; import { explainFormsText, formsResourceText, @@ -359,13 +362,18 @@ const pangular = defineDevframe({ draft.nodes = latestComponentPage(componentPages.values())?.roots ?? []; }); const componentWaiters = new Set<() => void>(); - const selectComponentOnPage = (pageId: string | undefined, id: string | null) => { + // `console` marks a selection made in the panel, which sets `$ng0` on that page. + const selectComponentOnPage = ( + pageId: string | undefined, + id: string | null, + console = false, + ) => { componentTree.mutate((draft) => { draft.selectedId = id; }); void my.rpc.broadcast({ method: 'inspect-component-in-page', - args: [{ pageId, id }], + args: [{ pageId, id, ...(console && pageId ? { console: true } : {}) }], optional: true, }); }; @@ -1634,7 +1642,7 @@ const pangular = defineDevframe({ name: 'select-component', type: 'action', jsonSerializable: true, - handler: (target: string | { pageId?: unknown; id?: unknown } | null) => { + handler: (target: string | { pageId?: unknown; id?: unknown; console?: unknown } | null) => { if (typeof target === 'string') { void my.rpc.broadcast({ method: 'select-signal-component', @@ -1645,10 +1653,40 @@ const pangular = defineDevframe({ } const id = typeof target?.id === 'string' ? target.id.slice(0, 50) : null; const pageId = typeof target?.pageId === 'string' ? target.pageId : undefined; - selectComponentOnPage(pageId, id); + selectComponentOnPage(pageId, id, target?.console === true); }, }); + // Writes to component inputs, properties and signals: panel and agent tools. + const componentEdits = createComponentEdits({ + config, + pages: () => componentPages.values(), + broadcast: (method, message) => + void my.rpc.broadcast({ method, args: [message], optional: true }), + answersFor, + }); + register({ + name: 'component-edit-result', + type: 'action', + jsonSerializable: true, + handler: componentEdits.answer, + }); + register({ + name: 'request-component-edit', + type: 'action', + jsonSerializable: true, + handler: (message: { pageId?: unknown; request?: unknown } | null) => + componentEdits.request(message?.pageId, message?.request), + }); + for (const tool of componentEdits.tools) agent.registerTool(tool); + + registerConsoleGlobals({ + config, + register, + broadcast: (message) => void my.rpc.broadcast(message), + answersFor, + }); + const pendingPicks = new Map< string, { pageId: string; settle: (result: Record) => void } @@ -2181,7 +2219,7 @@ const pangular = defineDevframe({ agent.registerTool({ id: 'pangular:inspect-component', description: - 'Get the live detail of one component instance: inputs, outputs with whether a parent listens, other own properties (signals and resources unwrapped), DOM listeners, host directives, change detection, encapsulation, host path, injected services and the source file and line of the class when a dev build has them. Pass an instance id from the pangular:component-tree resource, a class name or a host tag. This selects the instance on its page (the panel follows) and waits for the page to report it. A class name or tag that matches several instances answers for the first and lists the ids of all of them. Secret-looking values are redacted. Past 20,000 characters, values longer than 1,000 characters show only their start, then each list keeps fewer entries, with a note saying what was left out; the `detail` of the pangular:component-tree resource has it all.', + 'Get the live detail of one component instance: inputs, outputs with whether a parent listens, other own properties (signals and resources unwrapped), DOM listeners, host directives, change detection, encapsulation, host path, injected services and the source file and line of the class when a dev build has them. Pass an instance id from the pangular:component-tree resource, a class name or a host tag. This selects the instance on its page (the panel follows) and waits for the page to report it. A class name or tag that matches several instances answers for the first and lists the ids of all of them. Each input and property of the component carries `edit` (`property` for pangular:set-component-property, `signal` for pangular:set-signal) when it can be written, or `locked` with the reason it cannot. Secret-looking values are redacted. Past 20,000 characters, values longer than 1,000 characters show only their start, then each list keeps fewer entries, with a note saying what was left out; the `detail` of the pangular:component-tree resource has it all.', inputSchema: { type: 'object', properties: { @@ -2293,6 +2331,33 @@ const pangular = defineDevframe({ }, }); + agent.registerTool({ + id: 'pangular:for-blocks', + description: + "List the `@for` blocks the running page renders, read live through Angular's debug API (`ng.ɵgetControlFlowBlocks`, Angular 22.0 and later, development builds): the owning component, the item count, what the `track` expression tracks by (`$index`, the item itself, or an expression) and whether the block has an `@empty` block and shows it. Flags blocks with no items and no `@empty` block. Each open tab reports its own list; `page` picks one. Lists at most 50 blocks per page, says how many more are not shown, and cuts the answer at 20,000 characters. Says so when the page's Angular is older than 22.0 or a production build.", + inputSchema: { + type: 'object', + properties: { + page: { + type: 'string', + description: + 'Page id, when more than one tab reports (see pangular:list-pages). Lists every page without it.', + }, + pageId: { type: 'string', description: 'Same as `page`.' }, + }, + }, + handler: async (args: { page?: string; pageId?: string }) => { + const page = pageArgument(args, 'pageId'); + return ( + unknownComponentPage(page) ?? { + markdown: forBlocksText( + byRecency(componentPages.values()).filter((entry) => !page || entry.pageId === page), + ), + } + ); + }, + }); + // Read-only mode keeps this tool as a read tool, without `record`. const cdRecordAllowed = !config.agent.readOnly; agent.registerTool({ diff --git a/packages/devtools/src/for-blocks.ts b/packages/devtools/src/for-blocks.ts new file mode 100644 index 00000000..47792a4f --- /dev/null +++ b/packages/devtools/src/for-blocks.ts @@ -0,0 +1,157 @@ +import { blockOwnerOf, type BlockOwnerDebugNg } from './block-owner.ts'; +import { elementId } from './element-id.ts'; +import { angularRoots } from './host-tree.ts'; +import type { ForBlockInfo } from './types.ts'; + +export interface ControlFlowDebugNg extends BlockOwnerDebugNg { + ɵgetControlFlowBlocks?(node: Node): unknown[]; +} + +/** + * One `@for` entry of `ng.ɵgetControlFlowBlocks` (Angular 22+), checked + * against `forLoopFinder` in `@angular/core/fesm2022/_debug_node-chunk.mjs`: + * `type` is `ControlFlowBlockType.For` (1), `items` the live collection, + * `hasEmptyBlock`, `rootNodes` of every rendered item view, `hostNode` the + * container's comment anchor, and `trackExpression` (`$index`, `item` or + * `function`). + */ +interface RawForBlock { + type: number; + items?: unknown; + hasEmptyBlock?: unknown; + rootNodes?: unknown; + hostNode?: unknown; + trackExpression?: unknown; +} + +/** Cap on the `@for` blocks one page reports; `forBlocksTruncated` says when it was hit. */ +export const MAX_FOR_BLOCKS = 500; +const MAX_ROOT_IDS = 5; +const FOR_TYPE = 1; +const TRACK = new Set(['$index', 'item', 'function']); + +function read(fn: () => T, fallback: T): T { + try { + return fn(); + } catch { + return fallback; + } +} + +function isForBlock(raw: unknown): raw is RawForBlock { + return ( + !!raw && + typeof raw === 'object' && + (raw as RawForBlock).type === FOR_TYPE && + 'hasEmptyBlock' in raw + ); +} + +/** + * Reads `ng.ɵgetControlFlowBlocks` once per Angular root for one collection, + * so the `@defer` and `@for` trackers share a single walk of the views. + * `undefined` when the page's Angular has no such util (before 22.0, or a + * production build). + */ +export function controlFlowReader( + ng: ControlFlowDebugNg | undefined, +): ((root: Element) => unknown[]) | undefined { + const util = ng?.ɵgetControlFlowBlocks; + if (!ng || typeof util !== 'function') return undefined; + const cache = new Map(); + return (root) => { + let blocks = cache.get(root); + if (!blocks) { + const answer = read(() => util.call(ng, root), [] as unknown[]); + blocks = Array.isArray(answer) ? answer : []; + cache.set(root, blocks); + } + return blocks; + }; +} + +export interface ForBlocksReport { + forBlocks: ForBlockInfo[]; + forBlocksTruncated?: true; +} + +/** + * Collects `@for` blocks: the owning component, the item count, the `track` + * kind Angular reports and whether `@empty` exists and shows. A block keeps + * its id between collections through a `WeakMap` keyed by its container + * anchor, which stays in place while items come and go. + */ +export function createForTracker() { + const ids = new WeakMap(); + const byPosition = new WeakMap(); + let nextId = 0; + + const idOf = (key: object) => { + let id = ids.get(key); + if (!id) { + id = `f${++nextId}`; + ids.set(key, id); + } + return id; + }; + + const positionKey = (root: Element, index: number) => { + let keys = byPosition.get(root); + if (!keys) { + keys = []; + byPosition.set(root, keys); + } + return (keys[index] ??= {}); + }; + + return { + /** + * Every `@for` block on the page, or `undefined` when Angular exposes no + * `ɵgetControlFlowBlocks` (Angular before 22.0, or a production build). + */ + collect( + ng: ControlFlowDebugNg | undefined, + doc: Document = document, + blocksOf = controlFlowReader(ng), + ): ForBlocksReport | undefined { + if (!ng || !blocksOf) return undefined; + const out: ForBlockInfo[] = []; + const seen = new Set(); + for (const root of angularRoots(doc)) { + let position = 0; + for (const raw of blocksOf(root)) { + if (!isForBlock(raw)) continue; + const anchor = raw.hostNode instanceof Node ? raw.hostNode : null; + const key = anchor ?? positionKey(root, position++); + if (seen.has(key)) continue; + seen.add(key); + if (out.length >= MAX_FOR_BLOCKS) return { forBlocks: out, forBlocksTruncated: true }; + const count = Array.isArray(raw.items) ? raw.items.length : 0; + const hasEmptyBlock = raw.hasEmptyBlock === true; + const roots: unknown[] = Array.isArray(raw.rootNodes) ? raw.rootNodes : []; + const block: ForBlockInfo = { + id: idOf(key), + count, + track: + typeof raw.trackExpression === 'string' && TRACK.has(raw.trackExpression) + ? (raw.trackExpression as ForBlockInfo['track']) + : null, + hasEmptyBlock, + showingEmpty: hasEmptyBlock && count === 0, + rootIds: roots + .filter((node): node is Element => node instanceof Element) + .slice(0, MAX_ROOT_IDS) + .map((el) => elementId(el)), + }; + const owner = blockOwnerOf( + ng, + anchor ?? (roots.find((n) => n instanceof Node) as Node) ?? null, + ); + if (owner) block.owner = owner; + out.push(block); + } + } + return { forBlocks: out }; + }, + }; +} diff --git a/packages/devtools/src/injector-tree.ts b/packages/devtools/src/injector-tree.ts index f71a1e9b..28c973b4 100644 --- a/packages/devtools/src/injector-tree.ts +++ b/packages/devtools/src/injector-tree.ts @@ -36,17 +36,27 @@ export interface DebugNg { } const ids = new WeakMap(); +const byId = new Map>(); let nextId = 0; +let sweepAt = 1024; function idFor(key: object): string { let id = ids.get(key); if (!id) { id = `inj-${++nextId}`; ids.set(key, id); + if (byId.size >= sweepAt) { + for (const [known, ref] of byId) if (!ref.deref()) byId.delete(known); + sweepAt = Math.max(1024, byId.size * 2); + } + byId.set(id, new WeakRef(key)); } return id; } +/** `injectorId|token` pairs some component or directive injected, from the last collection. */ +let injectedPairs = new Set(); + export function className( ctor: { readonly name?: string } | (abstract new (...args: never[]) => unknown), ): string { @@ -461,6 +471,18 @@ export function collectInjectorTree( } } + const pairs = new Set(); + const notePairs = (nodes: InjectorTreeNode[]) => { + for (const node of nodes) { + for (const dep of node.dependencies ?? []) { + if (dep.providedBy) pairs.add(`${dep.providedBy}|${dep.token}`); + } + notePairs(node.children); + } + }; + notePairs(roots); + injectedPairs = pairs; + const environment: InjectorTreeNode[] = []; for (const env of envs.values()) { const parent = env.parent ? envs.get(env.parent) : undefined; @@ -478,3 +500,63 @@ export function collectInjectorTree( if (zone) report.zone = zone; return report; } + +/** + * The live value of one provider the injector tree listed, for "Store as + * global". `index` is the provider's place in the injector's `providers`, and + * `token` must still match there. Nothing is created: an environment injector + * gives only a value it already holds, and an element injector only a token + * that some component or directive on the page injected (Angular creates + * element providers on first use). + */ +export function providerValue( + ng: DebugNg | undefined, + injectorId: string, + token: string, + index: number, +): { value: unknown } | { error: string } { + const key = byId.get(injectorId)?.deref(); + if (!ng || !key) return { error: 'This injector is no longer on the page.' }; + const element = elementEntries.has(key); + let injector: unknown = key; + if (element) { + try { + injector = ng.getInjector?.(key as H); + } catch { + injector = null; + } + } + if (!injector) return { error: 'This injector is no longer on the page.' }; + let list: ProviderRecord[] = []; + try { + list = ng.ɵgetInjectorProviders?.(injector) ?? []; + } catch { + list = []; + } + const record = list.filter((entry) => !isBuiltInElementToken(entry))[index]; + if (!record || tokenName(record.token) !== token) { + return { error: `${token} is no longer provided there. Refresh and try again.` }; + } + if (!element) { + const own = ownRecords(injector).find(([candidate]) => candidate === record.token)?.[1]; + if (!own || !isCreated(own)) { + return { + error: `${token} has not been created yet, and storing it would create it. Store it once the app uses it.`, + }; + } + return { value: own.value }; + } + if (!injectedPairs.has(`${injectorId}|${token}`)) { + return { + error: `Nothing on the page has injected ${token} from this element yet, so Angular may not have created it, and storing it would create it.`, + }; + } + try { + const value = ( + injector as { get(token: unknown, notFound: unknown, options: object): unknown } + ).get(record.token, null, { self: true, optional: true }); + return value === null ? { error: `${token} has no value here.` } : { value }; + } catch (error) { + return { error: `Reading ${token} failed: ${String((error as Error)?.message ?? error)}` }; + } +} diff --git a/packages/devtools/src/ngrx-collector.ts b/packages/devtools/src/ngrx-collector.ts index b9993941..d49e65bd 100644 --- a/packages/devtools/src/ngrx-collector.ts +++ b/packages/devtools/src/ngrx-collector.ts @@ -255,6 +255,11 @@ export interface NgrxCollector { /** Entries that became unrestorable after update number `after`, and the last update number. */ unrestorableSince(after: number): { updates: NgrxUnrestorableUpdate[]; last: number }; run(request: NgrxRequest): NgrxRequestResult; + /** + * The live state of one store, unserialized: `store` is the classic Store, + * any other id a signal store's state fields. `null` when the store is gone. + */ + rawState(storeId: string): { value: unknown } | null; stop(): void; } @@ -1381,6 +1386,13 @@ export function createNgrxCollector( last: lostSeq, }), run, + rawState: (storeId) => { + if (storeId === 'store') return classic ? { value: classicState(classic.store) } : null; + for (const t of tracked.values()) { + if (t.id === storeId) return { value: { ...snapshot(t) } }; + } + return null; + }, stop: () => { classic?.stop(); dispatcherUndo?.(); diff --git a/packages/devtools/src/ngrx-overlay.ts b/packages/devtools/src/ngrx-overlay.ts index 0c099f54..ccf5199f 100644 --- a/packages/devtools/src/ngrx-overlay.ts +++ b/packages/devtools/src/ngrx-overlay.ts @@ -122,6 +122,7 @@ export function attachNgrx( return { push, + rawState: (storeId: string) => collector.rawState(storeId), leave: () => void my.rpc.call('forget-ngrx-page', pageId).catch(() => {}), stop: () => { clearTimeout(timer); diff --git a/packages/devtools/src/overlay.ts b/packages/devtools/src/overlay.ts index 0ed9a918..0bdee15a 100644 --- a/packages/devtools/src/overlay.ts +++ b/packages/devtools/src/overlay.ts @@ -44,8 +44,11 @@ import { registerSignalPeek } from './signal-peek.ts'; export { installSignalWriteHook } from './signal-history.ts'; import { collectComponentTree, componentHostOf } from './component-tree.ts'; import { startComponentPick } from './component-pick.ts'; +import { registerComponentEdit } from './component-edit-overlay.ts'; import { installSourceHelpers } from './component-source.ts'; import { createDeferTracker } from './defer-blocks.ts'; +import { controlFlowReader, createForTracker } from './for-blocks.ts'; +import { attachConsoleGlobals } from './console-handles.ts'; import { elementById, elementId } from './element-id.ts'; import { collectSignalGraph, @@ -282,17 +285,20 @@ async function startOverlay(options: OverlayOptions, own: (cleanup: () => void) let componentTarget: string | null = null; const deferTracker = createDeferTracker(); + const forTracker = createForTracker(); let lastTreeJson = ''; let treeSentAt = 0; async function pushTree(force = false) { const ng = getNg(); - const deferBlocks = deferTracker.collect(ng); + const blocksOf = controlFlowReader(ng); + const deferBlocks = deferTracker.collect(ng, document, blocksOf); const tree = { ...collectComponentTree(ng, { selectedId: componentTarget }), url: redactUrl(location.href), title: redactMessage(document.title), ...(deferBlocks ? { deferBlocks } : {}), ...(deferTracker.truncated ? { deferTruncated: true } : {}), + ...forTracker.collect(ng, document, blocksOf), }; const json = JSON.stringify(tree); if (!force && json === lastTreeJson) { @@ -425,6 +431,12 @@ async function startOverlay(options: OverlayOptions, own: (cleanup: () => void) ? attachChangeDetection(my, pageId, getNg, limits.cdCycles, tickMs) : null; const ngrx = on.ngrx ? attachNgrx(my, pageId, getNg, limits.changeLog) : null; + const consoleGlobals = attachConsoleGlobals(my, pageId, { + getNg, + inspectors: on, + ngrxState: ngrx?.rawState, + }); + own(consoleGlobals.dispose); const navigations: NavigationRecord[] = []; const preloads: PreloadRecord[] = []; @@ -729,9 +741,13 @@ async function startOverlay(options: OverlayOptions, own: (cleanup: () => void) name: 'inspect-component-in-page', type: 'event', jsonSerializable: true, - handler: (request: { pageId?: string; id?: string | null } | null) => { + handler: (request: { pageId?: string; id?: string | null; console?: boolean } | null) => { if (request?.pageId && request.pageId !== pageId) return; componentTarget = typeof request?.id === 'string' ? request.id : null; + // Only a selection made in the panel for this page sets `$ng0`. + if (request?.console === true && request.pageId === pageId) { + consoleGlobals.selectComponent(componentTarget); + } void pushTree(true).catch(() => {}); }, }); @@ -756,6 +772,7 @@ async function startOverlay(options: OverlayOptions, own: (cleanup: () => void) if (cancelComponentPick === pick.cancel) cancelComponentPick = null; if (result.ok) { componentTarget = result.id; + consoleGlobals.selectComponent(result.id); void pushTree(true).catch(() => {}); if (result.openInEditor && result.source) { void my.rpc.call('open-in-editor', result.source).catch(() => {}); @@ -766,6 +783,11 @@ async function startOverlay(options: OverlayOptions, own: (cleanup: () => void) }, }); own(() => cancelComponentPick?.()); + registerComponentEdit(my.rpc, pageId, { + getNg, + allowed: devtoolsConfig.actions.components, + edited: () => void pushTree(true).catch(() => {}), + }); const componentOf = (el: unknown) => { const host = el instanceof Element ? componentHostOf(getNg(), el) : null; diff --git a/packages/devtools/src/rpc/component-edits.ts b/packages/devtools/src/rpc/component-edits.ts new file mode 100644 index 00000000..d90554c1 --- /dev/null +++ b/packages/devtools/src/rpc/component-edits.ts @@ -0,0 +1,244 @@ +import type { ComponentEditKind, ComponentEditResult } from '../component-edit.ts'; +import { MAX_EDIT_JSON } from '../component-edit.ts'; +import { actionBlockedMessage, type ResolvedPangularConfig } from '../config.ts'; +import type { ComponentPage } from '../types.ts'; +import { findComponents, otherMatchesText, truncationText } from './component-tools.ts'; +import { untrusted } from './forms-tools.ts'; +import { byRecency, choosePageText, pageArgument, unknownPageText } from './pages.ts'; + +/** How long a write waits for its page to answer. */ +export const EDIT_TIMEOUT_MS = 10_000; + +export interface ComponentEditMessage { + id?: unknown; + path?: unknown; + value?: unknown; + kind?: unknown; +} + +interface Deps { + config: ResolvedPangularConfig; + /** The pages that report a component tree. */ + pages: () => Iterable; + /** Sends an event to every connected page. */ + broadcast: (method: string, message: unknown) => void; + /** Whether a result for `target` may come from the connection that sent it for `pageId`. */ + answersFor: (target: string, pageId: unknown) => boolean; + timeoutMs?: number; +} + +export interface ComponentEditTool { + id: string; + description: string; + inputSchema: Record; + handler: (args: Record) => Promise<{ markdown: string }>; +} + +function liveOnly(pages: Iterable) { + return byRecency(pages).filter((page) => page.roots.length > 0); +} + +/** The write request, or why it cannot be sent. */ +function toRequest(message: unknown): ComponentEditMessage | string { + const m = (message ?? {}) as ComponentEditMessage; + if (typeof m.id !== 'string' || !m.id || m.id.length > 100) { + return 'Pass the instance id of a component.'; + } + if (typeof m.path !== 'string' || !m.path || m.path.length > 500) { + return 'Pass a property name, or a path such as user.name.'; + } + if (m.kind !== undefined && m.kind !== 'property' && m.kind !== 'signal') { + return 'kind must be property or signal.'; + } + if (m.value === undefined) return 'Pass a JSON value.'; + let json: string | undefined; + try { + json = JSON.stringify(m.value); + } catch { + json = undefined; + } + if (json === undefined) return 'The value must be JSON.'; + if (json.length > MAX_EDIT_JSON) { + return `The value is longer than ${MAX_EDIT_JSON} characters of JSON.`; + } + return { id: m.id, path: m.path, value: JSON.parse(json), kind: m.kind }; +} + +/** + * Writes to components on the page: the panel's `request-component-edit` + * RPC and the `set-component-property` and `set-signal` agent tools. The + * server sends `component-edit` to the page and waits for its + * `component-edit-result`, which only the connection that owns the page can + * settle. + */ +export function createComponentEdits(deps: Deps) { + const pending = new Map void }>(); + let seq = 0; + + const answer = (message: { requestId?: unknown; pageId?: unknown; result?: unknown } | null) => { + if (typeof message?.requestId !== 'string') return; + const entry = pending.get(message.requestId); + if (entry && deps.answersFor(entry.pageId, message.pageId)) entry.settle(message.result); + }; + + /** Sends one write to one page. Without `page`, only when exactly one page reports components. */ + const request = (page: unknown, message: unknown) => + new Promise((resolve) => { + if (!deps.config.actions.components) { + return resolve({ error: actionBlockedMessage('components') }); + } + const live = liveOnly(deps.pages()); + if (typeof page === 'string' && page) { + if (!live.some((entry) => entry.pageId === page)) { + return resolve({ error: unknownPageText(page, live, 'a component tree') }); + } + } else if (live.length !== 1) { + // A write changes the app, so it never picks one of several tabs on its own. + return resolve({ + error: live.length + ? choosePageText(live, 'a component tree') + : 'No page reports a component tree. Open the app in a browser.', + }); + } + const edit = toRequest(message); + if (typeof edit === 'string') return resolve({ error: edit }); + const pageId = typeof page === 'string' && page ? page : live[0].pageId; + const requestId = `e${++seq}`; + const timer = setTimeout(() => { + pending.delete(requestId); + resolve({ + error: `No page answered within ${Math.round((deps.timeoutMs ?? EDIT_TIMEOUT_MS) / 1000)}s. Is the app open in a browser, and its tab in the foreground?`, + }); + }, deps.timeoutMs ?? EDIT_TIMEOUT_MS); + timer.unref?.(); + pending.set(requestId, { + pageId, + settle: (result) => { + clearTimeout(timer); + pending.delete(requestId); + resolve(toResult(result)); + }, + }); + deps.broadcast('component-edit', { requestId, pageId, request: edit }); + }); + + const tool = (kind: ComponentEditKind): ComponentEditTool => { + const field = kind === 'signal' ? 'signal' : 'property'; + return { + id: kind === 'signal' ? 'pangular:set-signal' : 'pangular:set-component-property', + description: + kind === 'signal' + ? 'Sets a writable signal of one live component instance with `.set()` (development only) and returns the value it now holds, redacted like the component detail. `signal` names the class property, such as `count`, or a path inside the signal value, such as `filters.query`: the signal is then set to a copy with that one value changed. Covers signal(), linkedSignal() and model(); refuses signal inputs (input(), input.required()), computed() and asReadonly() signals, values that are not JSON, and names the redaction masks. Only signals that a component holds as a property can be set; signals that pangular:signal-graph lists elsewhere cannot. Pass an instance id from the pangular:component-tree resource, a class name or a host tag that matches one instance. Without `page` it uses the one page that reports components; with several, it writes nothing and lists them. Needs the component edit action (actions.components).' + : 'Sets an input or another property of one live component instance (development only), runs change detection with ng.applyChanges and returns the value it now holds, redacted like the component detail. `property` is the class property or the public input name, or a path inside its value such as `user.name` or `items[0].title`. Refuses signals (use pangular:set-signal), getters without a setter, methods, outputs, values that are not JSON and names the redaction masks. A parent binding sets a bound input again the next time its own value changes. Pass an instance id from the pangular:component-tree resource, a class name or a host tag that matches one instance. Without `page` it uses the one page that reports components; with several, it writes nothing and lists them. Needs the component edit action (actions.components).', + inputSchema: { + type: 'object', + properties: { + component: { + type: 'string', + description: 'Instance id (e.g. c12), class name (e.g. ProductCard) or host tag.', + }, + [field]: + kind === 'signal' + ? { type: 'string', description: 'Signal property, or a path inside its value.' } + : { + type: 'string', + description: 'Property or input name, or a path such as user.name.', + }, + value: { description: 'The new value, as JSON.' }, + page: { + type: 'string', + description: + 'Page id, when more than one tab reports (see pangular:list-pages). Required then.', + }, + }, + required: ['component', field, 'value'], + }, + handler: async (args) => { + const page = pageArgument(args); + const live = liveOnly(deps.pages()); + if (page && !live.some((entry) => entry.pageId === page)) { + return { markdown: unknownPageText(page, live, 'a component tree') }; + } + if (!live.length) { + return { + markdown: + 'No page reports a component tree, so nothing was written. Open the app in a browser with the devtools connected.', + }; + } + if (!page && live.length > 1) { + return { markdown: choosePageText(live, 'a component tree') }; + } + const selector = typeof args['component'] === 'string' ? args['component'] : ''; + if (!selector) return { markdown: 'Pass `component`: an instance id, class name or tag.' }; + const scope = page ? live.filter((entry) => entry.pageId === page) : live; + const hits = findComponents(scope, selector); + if (!hits.length) { + const cut = truncationText(scope); + return { + markdown: `No component instance matches \`${selector}\`, so nothing was written. Pass an instance id, class name or host tag from the pangular:component-tree resource.${cut ? ` ${cut}` : ''}`, + }; + } + if (hits.length > 1) { + return { + markdown: untrusted( + `${otherMatchesText(hits, selector).replace(/ This used the first one; pass an instance id to pick another\.$/, '')} A write needs one instance, so nothing was written. Pass an instance id.`, + ), + }; + } + const [hit] = hits; + const result = await request(hit.pageId, { + id: hit.node.id, + path: args[field], + value: args['value'], + kind, + }); + return { markdown: editResultText(result, hit.node.id, hit.pageId) }; + }, + }; + }; + + return { + answer, + request, + tools: [tool('property'), tool('signal')], + /** Writes waiting for an answer, for tests. */ + pendingCount: () => pending.size, + }; +} + +function toResult(result: unknown): ComponentEditResult { + const r = (result ?? {}) as Record; + if (r['ok'] === true && (r['kind'] === 'property' || r['kind'] === 'signal')) { + return { + ok: true, + kind: r['kind'], + component: typeof r['component'] === 'string' ? r['component'].slice(0, 200) : 'Component', + path: typeof r['path'] === 'string' ? r['path'].slice(0, 500) : '', + value: r['value'], + }; + } + return { + error: + typeof r['error'] === 'string' ? r['error'].slice(0, 2000) : 'The page did not write it.', + }; +} + +/** The answer of set-component-property and set-signal, as markdown. */ +export function editResultText(result: ComponentEditResult, id: string, pageId: string): string { + if (!result.ok) { + return untrusted( + `Nothing was written to instance \`${id}\` on page \`${pageId}\`. ${result.error}`, + ); + } + const how = + result.kind === 'signal' ? 'with `.set()`' : 'and ran change detection with `ng.applyChanges`'; + let json: string; + try { + json = JSON.stringify(result.value, null, 2) ?? 'undefined'; + } catch { + json = String(result.value); + } + return untrusted( + `Set \`${result.path}\` on \`${result.component}\` (instance \`${id}\` on page \`${pageId}\`) ${how}. It now holds:\n\n\`\`\`json\n${json}\n\`\`\``, + ); +} diff --git a/packages/devtools/src/rpc/component-tools.ts b/packages/devtools/src/rpc/component-tools.ts index de52ab87..3e786d3c 100644 --- a/packages/devtools/src/rpc/component-tools.ts +++ b/packages/devtools/src/rpc/component-tools.ts @@ -1,4 +1,5 @@ import { MAX_DEFER_BLOCKS } from '../defer-blocks.ts'; +import { MAX_FOR_BLOCKS } from '../for-blocks.ts'; import type { ComponentPage, DeferBlockInfo, LiveComponentNode } from '../types.ts'; import { redactMessage, redactUrl } from '../router.ts'; import { untrusted } from './forms-tools.ts'; @@ -46,6 +47,12 @@ export function toComponentPage(report: Omit, now = page.deferTruncated = true; } } + if (Array.isArray(report.forBlocks)) { + page.forBlocks = report.forBlocks.slice(0, MAX_FOR_BLOCKS); + if (report.forBlocksTruncated || report.forBlocks.length > MAX_FOR_BLOCKS) { + page.forBlocksTruncated = true; + } + } if (report.platform === 'angular-native' || report.platform === 'nativescript') { page.platform = report.platform; } diff --git a/packages/devtools/src/rpc/console-globals.ts b/packages/devtools/src/rpc/console-globals.ts new file mode 100644 index 00000000..3d11e908 --- /dev/null +++ b/packages/devtools/src/rpc/console-globals.ts @@ -0,0 +1,116 @@ +import type { PangularInspector, ResolvedPangularConfig } from '../config.ts'; +import { + isConsoleTarget, + type ConsoleGlobalResult, + type ConsoleTarget, +} from '../console-handles.ts'; + +/** + * The inspector behind each kind of "Store as global". Like the forms + * inspector's Store as global, it changes nothing in the app, so no `actions` + * key blocks it; turning the inspector off does. + */ +export const CONSOLE_TARGET_INSPECTOR: Record = { + component: 'components', + provider: 'injectors', + ngrx: 'ngrx', +}; + +const TIMEOUT_MS = 10_000; + +interface Definition { + name: string; + type: 'action'; + jsonSerializable: true; + handler: (message: never) => unknown; +} + +export interface ConsoleGlobalsDeps { + config: ResolvedPangularConfig; + register: (definition: Definition) => void; + broadcast: (message: { method: string; args: unknown[]; optional: true }) => void; + /** Whether `pageId` may answer a request sent to `target` (see `answersFor` in devframe.ts). */ + answersFor: (target: string | undefined, pageId: unknown) => boolean; + timeoutMs?: number; +} + +/** Why the config blocks a target, or `null` when it may be stored. */ +export function consoleTargetBlocked( + target: ConsoleTarget, + config: ResolvedPangularConfig, +): string | null { + const inspector = CONSOLE_TARGET_INSPECTOR[target.kind]; + return config.inspectors[inspector] + ? null + : `The ${inspector} inspector is turned off in the devtools config.`; +} + +/** + * Panel -> `request-console-global` -> `console-global` on the one page that + * owns `pageId` -> `console-global-result`. The page stores the value as + * `tempN` and answers with the name; nothing else comes back. + */ +export function registerConsoleGlobals(deps: ConsoleGlobalsDeps) { + const pending = new Map void }>(); + let seq = 0; + + deps.register({ + name: 'console-global-result', + type: 'action', + jsonSerializable: true, + handler: (message: { requestId?: unknown; pageId?: unknown; result?: unknown } | null) => { + if (typeof message?.requestId !== 'string') return; + const entry = pending.get(message.requestId); + if (entry && deps.answersFor(entry.pageId, message.pageId)) entry.settle(message.result); + }, + }); + + deps.register({ + name: 'request-console-global', + type: 'action', + jsonSerializable: true, + handler: (message: { pageId?: unknown; target?: unknown } | null) => + new Promise((resolve) => { + const pageId = message?.pageId; + const target = message?.target; + if (typeof pageId !== 'string' || !pageId || pageId.length >= 50) { + return resolve({ ok: false, message: 'Pick the page to store the value in.' }); + } + if (!isConsoleTarget(target)) { + return resolve({ ok: false, message: 'Nothing to store.' }); + } + const blocked = consoleTargetBlocked(target, deps.config); + if (blocked) return resolve({ ok: false, message: blocked }); + const requestId = `g${++seq}`; + const timer = setTimeout(() => { + pending.delete(requestId); + resolve({ + ok: false, + message: 'The page did not answer. Is the app still open in a browser?', + }); + }, deps.timeoutMs ?? TIMEOUT_MS); + timer.unref?.(); + pending.set(requestId, { + pageId, + settle: (result) => { + clearTimeout(timer); + pending.delete(requestId); + const answer = (result ?? {}) as Partial; + resolve({ + ok: answer.ok === true, + message: typeof answer.message === 'string' ? answer.message.slice(0, 500) : '', + ...(typeof answer.name === 'string' && /^temp\d+$/.test(answer.name) + ? { name: answer.name } + : {}), + ...(answer.masked === true ? { masked: true } : {}), + }); + }, + }); + deps.broadcast({ + method: 'console-global', + args: [{ requestId, pageId, target }], + optional: true, + }); + }), + }); +} diff --git a/packages/devtools/src/rpc/for-blocks-tools.ts b/packages/devtools/src/rpc/for-blocks-tools.ts new file mode 100644 index 00000000..fdd99d89 --- /dev/null +++ b/packages/devtools/src/rpc/for-blocks-tools.ts @@ -0,0 +1,68 @@ +import type { ComponentPage, ForBlockInfo } from '../types.ts'; +import { untrusted } from './forms-tools.ts'; +import { capped } from './router-tools.ts'; + +/** Table rows the for-blocks tool lists per page. */ +export const FOR_ROWS = 50; + +const PANEL = 'The @for blocks list on the Components page of the panel has every block'; + +const TRACK_TEXT: Record, string> = { + $index: '`$index`', + item: 'the item itself', + function: 'an expression', +}; + +function notes(block: ForBlockInfo): string { + if (block.showingEmpty) return 'showing @empty'; + if (block.count === 0) return 'no items and no @empty block, so it renders nothing'; + return ''; +} + +/** + * Markdown answer for the for-blocks agent tool, one section per page. Each + * page lists at most {@link FOR_ROWS} blocks, and the whole answer is cut by + * {@link capped}. + */ +export function forBlocksText(pages: ComponentPage[]): string { + if (!pages.length) { + return 'No component tree has been reported. Live data needs a page: connect through the MCP endpoint of the server that runs the app, with the app open in a browser. The stdio server has no page attached and only ever reports this.'; + } + const cell = (text: string) => text.replace(/\|/g, '\\|'); + const narrow = `${pages.length > 1 ? ' Pass `page` to read one tab.' : ''} ${PANEL}.`; + const sections = pages.map((page) => { + const title = `Page \`${page.pageId}\`${page.url ? ` (${page.url})` : ''}`; + const blocks = page.forBlocks; + if (!blocks) { + return `${title}: this page's Angular has no \`ng.ɵgetControlFlowBlocks\`, which Angular 22.0 added for development builds, so its \`@for\` blocks cannot be listed. Update Angular or use a development build.`; + } + if (!blocks.length) return `${title}: no \`@for\` blocks are rendered.`; + const rows = blocks.map((block) => { + const owner = block.owner ? `${block.owner.name} (\`${block.owner.id}\`)` : 'unknown'; + const track = block.track ? TRACK_TEXT[block.track] : 'unknown'; + const empty = block.hasEmptyBlock ? (block.showingEmpty ? 'showing' : 'yes') : 'no'; + return `| \`${block.id}\` | ${cell(owner)} | ${block.count} | ${track} | ${empty} | ${notes(block)} |`; + }); + const hidden = rows.length - FOR_ROWS; + const total = page.forBlocksTruncated ? `${blocks.length} or more` : `${blocks.length}`; + return [ + `${title}: ${total} \`@for\` ${blocks.length === 1 ? 'block' : 'blocks'}.`, + ...(page.forBlocksTruncated + ? ['', `The page has more \`@for\` blocks than the ${blocks.length} it reports.`] + : []), + '', + '| Block | Owner | Items | Tracks by | @empty | Notes |', + '| --- | --- | --- | --- | --- | --- |', + ...rows.slice(0, FOR_ROWS), + ...(hidden > 0 + ? ['', `${hidden} more ${hidden === 1 ? 'block' : 'blocks'} not shown.${narrow}`] + : []), + ].join('\n'); + }); + return capped( + untrusted(sections.join('\n\n')), + pages.length > 1 + ? 'pass `page` to read one tab' + : 'see the @for blocks list on the Components page of the panel', + ); +} diff --git a/packages/devtools/src/types.ts b/packages/devtools/src/types.ts index e1d84fcc..3e83d6d4 100644 --- a/packages/devtools/src/types.ts +++ b/packages/devtools/src/types.ts @@ -131,6 +131,10 @@ export interface ComponentProp { value?: unknown; listened?: boolean; kind?: 'signal' | 'resource'; + /** The write that edits it: `property` (set-component-property) or `signal` (set-signal). */ + edit?: 'property' | 'signal'; + /** Why it cannot be edited, when it cannot. */ + locked?: string; } export interface ComponentSource { @@ -176,6 +180,24 @@ export interface DeferBlockInfo { hydratedAt?: number; } +export interface ForBlockInfo { + id: string; + /** The component whose template holds the block. */ + owner?: { id: string; name: string; tag: string }; + /** Items in the collection the block renders. */ + count: number; + /** + * What Angular reports for the `track` expression: `$index`, `item` (tracks + * the item itself), `function` (any other expression), or `null` when unknown. + */ + track: '$index' | 'item' | 'function' | null; + hasEmptyBlock: boolean; + /** The `@empty` block shows: there are no items and the block has one. */ + showingEmpty: boolean; + /** Element ids of the first rendered root elements, for highlighting. */ + rootIds: string[]; +} + export type PagePlatform = 'browser' | 'angular-native' | 'nativescript'; export interface ComponentTreeReport { @@ -193,6 +215,10 @@ export interface ComponentTreeReport { deferBlocks?: DeferBlockInfo[]; /** True when the page has more defer blocks than the 500 in `deferBlocks`. */ deferTruncated?: boolean; + /** Missing when the page's Angular has no `ɵgetControlFlowBlocks` (before 22.0). */ + forBlocks?: ForBlockInfo[]; + /** The page has more `@for` blocks than it lists. */ + forBlocksTruncated?: boolean; } export interface ComponentPage extends ComponentTreeReport {