diff --git a/app/src/__tests__/audit-inspector.test.ts b/app/src/__tests__/audit-inspector.test.ts new file mode 100644 index 00000000..fb04cca5 --- /dev/null +++ b/app/src/__tests__/audit-inspector.test.ts @@ -0,0 +1,279 @@ +import { TestBed, type ComponentFixture } from '@angular/core/testing'; +import type { DevframeRpcClient } from 'devframe/client'; +import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'; +import { AUDIT_REFRESH_DELAY_MS, AuditInspector } from '../pages/audit-inspector'; +import type { AuditFinding, AuditResponse } from '../pages/audit-types'; + +const NOW = Date.UTC(2026, 9, 13, 10, 0, 0); + +const finding = (extra: Partial): AuditFinding => ({ + key: `${extra.area ?? 'errors'}:${extra.rule ?? 'x'}:${extra.subject ?? ''}`, + severity: 'error', + area: 'errors', + rule: 'NG0201', + why: 'NullInjectorError: No provider for TripApi!', + tool: 'pangular:explain-error', + ...extra, +}); + +const findings: AuditFinding[] = [ + finding({ + area: 'accessibility', + rule: 'image-alt', + subject: 'TripPhoto', + why: 'Images must have alternative text (critical).', + tool: 'pangular:audit', + args: { page: 'p1', area: 'accessibility' }, + count: 2, + elementId: 'c1-9', + }), + finding({ subject: 'TripList', elementId: 'c1-2', args: { page: 'p1', id: 'e1' }, count: 3 }), + finding({ + severity: 'warning', + area: 'change-detection', + rule: 'onpush-candidate', + subject: 'TripList', + why: 'TripList was refreshed 40 times and changed something in 2.', + tool: 'pangular:diagnose-change-detection', + }), +]; + +function response(extra: Partial = {}): AuditResponse { + return { + pages: [{ pageId: 'p1', url: '/trips', title: 'Trips' }], + report: { + pageId: 'p1', + url: '/trips', + at: NOW, + findings, + metrics: { cdMeanMs: 4.5, errors: 3, findingsError: 2, findingsWarning: 1, findingsInfo: 0 }, + sources: [ + { area: 'accessibility', state: 'ok' }, + { area: 'router', state: 'off' }, + { area: 'leaks', state: 'empty', note: 'No leak report yet.' }, + ], + }, + session: { before: null, after: null, diff: null }, + axe: null, + ...extra, + }; +} + +let fixture: ComponentFixture; +let calls: { name: string; arg: unknown }[]; +let answers: Record; +let listeners: (() => void)[]; +const host = () => fixture.nativeElement as HTMLElement; +const text = () => host().textContent!.replace(/\s+/g, ' '); +const button = (label: string) => + [...host().querySelectorAll('button')].find((b) => b.textContent?.trim().startsWith(label))!; +const settle = async () => { + for (let i = 0; i < 4; i++) { + await fixture.whenStable(); + await new Promise((resolve) => setTimeout(resolve, 0)); + } + fixture.detectChanges(); +}; + +function start(backend = 'websocket') { + const client = { + connectionMeta: { backend }, + scope: () => ({ + rpc: { + call: vi.fn(async (name: string, arg: unknown) => { + calls.push({ name, arg }); + const answer = answers[name]; + return typeof answer === 'function' ? answer(arg) : answer; + }), + sharedState: async () => ({ + value: () => ({ pages: {} }), + on: (_: string, listener: () => void) => { + listeners.push(listener); + return () => {}; + }, + }), + }, + }), + }; + fixture = TestBed.createComponent(AuditInspector); + fixture.componentRef.setInput('rpc', client as unknown as DevframeRpcClient); +} + +describe('AuditInspector', () => { + beforeEach(() => { + calls = []; + listeners = []; + answers = { 'get-audit': response() }; + }); + + afterEach(() => { + fixture?.destroy(); + TestBed.resetTestingModule(); + }); + + it('lists the findings ranked as the server sent them, with the agent tool for each', async () => { + start(); + await settle(); + const rows = [...host().querySelectorAll('.finding')]; + expect(rows).toHaveLength(3); + expect(rows[0]!.textContent).toContain('Accessibility'); + expect(rows[0]!.textContent).toContain('TripPhoto'); + expect(rows[0]!.textContent).toContain('2×'); + expect(rows[1]!.textContent).toContain('explain-error { id: "e1" }'); + expect(text()).toContain('3 of 3 findings'); + expect(text()).toContain('Mean cycle time4.5 ms'); + expect(text()).toContain('Router Its inspector is turned off.'); + expect(text()).toContain('Leaks No leak report yet.'); + expect(host().querySelector('h2')?.textContent).toContain('Before and after'); + expect(calls[0]).toEqual({ name: 'get-audit', arg: { pageId: undefined } }); + }); + + it('filters by text and shows Clear filters when nothing matches', async () => { + start(); + await settle(); + const search = host().querySelector('input[type="search"]')!; + search.value = 'onpush'; + search.dispatchEvent(new Event('input')); + await settle(); + expect(host().querySelectorAll('.finding')).toHaveLength(1); + expect(text()).toContain('1 of 3 findings'); + search.value = 'nothing like this'; + search.dispatchEvent(new Event('input')); + await settle(); + expect(text()).toContain('No finding matches the filters.'); + button('Clear filters').click(); + await settle(); + expect(host().querySelectorAll('.finding')).toHaveLength(3); + }); + + it('runs axe on the page and reads the audit again, or says why it did not run', async () => { + answers['request-axe-run'] = { ok: true, violations: 1 }; + start(); + await settle(); + answers['get-audit'] = response({ axe: { at: NOW, ms: 30, violations: [{}] } }); + button('Run axe').click(); + await settle(); + expect(calls.map((c) => c.name)).toEqual(['get-audit', 'request-axe-run', 'get-audit']); + expect(calls[1]!.arg).toEqual({ pageId: 'p1' }); + expect(text()).toContain('1 rule broken'); + + answers['request-axe-run'] = { ok: false, error: 'The page did not answer within 60s.' }; + button('Run axe').click(); + await settle(); + expect(host().querySelector('[role="alert"]')?.textContent).toContain('did not answer'); + }); + + it('takes a baseline and an after audit, and shows the comparison', async () => { + answers['audit-session'] = { ok: true }; + start(); + await settle(); + expect(button('Take after audit').disabled).toBe(true); + const before = { at: NOW, findings, metrics: {}, axe: true }; + answers['get-audit'] = response({ session: { before, after: null, diff: null } }); + button('Take baseline').click(); + await settle(); + expect(calls.find((c) => c.name === 'audit-session')?.arg).toEqual({ + pageId: 'p1', + action: 'before', + }); + expect(text()).toContain('Baseline at'); + expect(button('Take after audit').disabled).toBe(false); + + answers['get-audit'] = response({ + session: { + before, + after: { ...before, findings: findings.slice(1) }, + diff: { + resolved: [findings[0]!], + added: [], + remaining: [{ ...findings[1]!, count: 1, countBefore: 3 }], + metrics: [ + { metric: 'cdMeanMs', before: 6, after: 4.5, delta: -1.5 }, + { metric: 'errors', before: 3, after: 4, delta: 1 }, + { metric: 'retained', after: 0 }, + ], + notes: [], + }, + }, + }); + button('Take after audit').click(); + await settle(); + const rows = [...host().querySelectorAll('tbody tr')].map((row) => + [...row.children].map((cell) => cell.textContent!.trim()).join(' | '), + ); + expect(rows).toEqual([ + 'Mean cycle time | 6 ms | 4.5 ms | −1.5 ms, better', + 'Retained components | Not measured | 0 | Not compared', + 'Error occurrences | 3 | 4 | +1, worse', + ]); + expect(text()).toContain('Resolved (1)'); + expect(text()).toContain('image-alt in TripPhoto'); + expect(text()).toContain('NG0201 in TripList: 3× → 1×'); + expect([...host().querySelectorAll('h3')].map((h) => h.textContent?.trim())).toEqual([ + 'Resolved (1)', + 'New (0)', + 'Changed count (1)', + ]); + }); + + it('opens a component for errors and highlights an element for axe findings', async () => { + start(); + await settle(); + const emitted: unknown[] = []; + fixture.componentInstance.showComponent.subscribe((focus) => emitted.push(focus)); + button('Show component').click(); + expect(emitted).toEqual([{ id: 'c1-2', pageId: 'p1' }]); + button('Show in page').click(); + await settle(); + expect(calls.find((c) => c.name === 'request-page-highlight')?.arg).toEqual({ + pageId: 'p1', + id: 'c1-9', + reveal: true, + }); + }); + + it('reads the audit again once for a burst of session or axe pass changes', async () => { + start(); + await settle(); + expect(listeners).toHaveLength(1); + // An axe pass starting, its result and its end arrive together. + listeners[0]!(); + listeners[0]!(); + listeners[0]!(); + await settle(); + expect(calls.filter((c) => c.name === 'get-audit')).toHaveLength(1); + await new Promise((resolve) => setTimeout(resolve, AUDIT_REFRESH_DELAY_MS + 20)); + await settle(); + expect(calls.filter((c) => c.name === 'get-audit')).toHaveLength(2); + }); + + it('offers no Show component, Show in page nor outline with the Components inspector off', async () => { + start(); + fixture.componentRef.setInput('canShowComponent', false); + await settle(); + expect(button('Show component')).toBeUndefined(); + expect(button('Show in page')).toBeUndefined(); + host().querySelector('.finding')!.dispatchEvent(new Event('mouseenter')); + await settle(); + expect(calls.some((c) => c.name === 'request-page-highlight')).toBe(false); + }); + + it('says what to do without a page, after an error, and in a static report', async () => { + answers['get-audit'] = { pages: [], report: null }; + start(); + await settle(); + expect(text()).toContain('No page reports live data yet.'); + fixture.destroy(); + + answers['get-audit'] = () => Promise.reject(new Error('gone')); + start(); + await settle(); + expect(text()).toContain("Can't read the audit"); + expect(button('Retry')).toBeTruthy(); + fixture.destroy(); + + start('static'); + await settle(); + expect(text()).toContain('a static report has none'); + }); +}); diff --git a/app/src/app.ts b/app/src/app.ts index 5ed2728b..ab9bda9e 100644 --- a/app/src/app.ts +++ b/app/src/app.ts @@ -31,6 +31,7 @@ import { NetworkInspector } from './pages/network-inspector'; import { ComingSoon, type ComingSoonInfo } from './pages/coming-soon'; import { CapacitorInspector } from './pages/capacitor-inspector'; import { ErrorsInspector } from './pages/errors-inspector'; +import { AuditInspector } from './pages/audit-inspector'; import { Timeline } from './pages/timeline'; import { capacitorPages } from './pages/capacitor-types'; import { TabIcon } from './pages/tab-icon'; @@ -211,6 +212,7 @@ function readView(): View | null { NetworkInspector, CapacitorInspector, ErrorsInspector, + AuditInspector, Timeline, ComingSoon, TabIcon, @@ -506,6 +508,13 @@ function readView(): View | null { @case ('timeline') { } + @case ('audit') { + + } @case ('components') { {{ note }}

+ } +
+ + + + + + + + + + + + @for (row of rows(); track row.label) { + + + + + + + } + +
+ Numbers before and after. Lower is better for each. +
NumberBeforeAfterChange
{{ row.label }}{{ row.before }}{{ row.after }} + {{ row.change }} +
+
+
+
+

Resolved ({{ diff().resolved.length }})

+ @if (diff().resolved.length) { +
    + @for (finding of diff().resolved; track finding.key) { +
  • + {{ areaLabel[finding.area] }} + {{ label(finding) }} +
  • + } +
+ } @else { +

None.

+ } +
+
+

New ({{ diff().added.length }})

+ @if (diff().added.length) { +
    + @for (finding of diff().added; track finding.key) { +
  • + {{ areaLabel[finding.area] }} + {{ label(finding) }} +
  • + } +
+ } @else { +

None.

+ } +
+
+

Changed count ({{ changed().length }})

+ @if (changed().length) { +
    + @for (finding of changed(); track finding.key) { +
  • + {{ areaLabel[finding.area] }} + {{ label(finding) }}: {{ finding.countBefore }}× → {{ finding.count ?? 1 }}× +
  • + } +
+ } @else { +

{{ diff().remaining.length }} still there with the same count.

+ } +
+
+ `, + styles: ` + @use 'mixins' as m; + :host { + display: grid; + gap: 12px; + } + .notice { + margin: 0; + padding: 8px 12px; + border: 1px solid var(--border); + border-radius: var(--radius-sm); + background: var(--surface); + color: var(--text-2); + } + .table-wrap { + overflow-x: auto; + border: 1px solid var(--border); + border-radius: var(--radius-sm); + } + .table-wrap:focus-visible { + @include m.focus-ring(-2px); + } + table { + width: 100%; + border-collapse: collapse; + font-size: 12px; + } + th, + td { + padding: 6px 10px; + border-bottom: 1px solid var(--border); + text-align: left; + white-space: nowrap; + } + thead th { + @include m.label; + background: var(--surface); + } + tbody th { + font-weight: 500; + color: var(--text); + } + td { + color: var(--text-2); + font-variant-numeric: tabular-nums; + } + tbody tr:last-child > * { + border-bottom: 0; + } + .chip { + display: inline-flex; + padding: 1px 8px; + border-radius: 99px; + font-size: 11px; + font-weight: 600; + border: 1px solid var(--border); + background: var(--surface-2); + color: var(--text-2); + } + .chip[data-tone='ok'] { + border-color: transparent; + @include m.tint(ok); + } + .chip[data-tone='danger'] { + border-color: transparent; + @include m.tint(danger); + } + .lists { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); + gap: 12px; + } + h3 { + @include m.label; + margin: 0 0 6px; + } + ul { + display: grid; + gap: 4px; + margin: 0; + padding: 0; + list-style: none; + font-size: 12px; + overflow-wrap: anywhere; + } + .area { + color: var(--text-2); + font-weight: 600; + } + .muted { + margin: 0; + color: var(--text-2); + font-size: 12px; + } + `, +}) +export class AuditDiffView { + readonly diff = input.required(); + + protected readonly areaLabel = AREA_LABEL; + + readonly changed = computed(() => + this.diff().remaining.filter( + (finding) => finding.countBefore !== undefined && finding.countBefore !== finding.count, + ), + ); + + readonly rows = computed(() => { + const byKey = new Map(this.diff().metrics.map((change) => [change.metric, change])); + return METRICS.filter((metric) => byKey.has(metric.key)).map((metric) => { + const change = byKey.get(metric.key)!; + const unit = metric.unit ? ` ${metric.unit}` : ''; + const show = (value?: number) => (value === undefined ? 'Not measured' : `${value}${unit}`); + const delta = change.delta; + return { + label: metric.unit === '%' ? `${metric.label} (%)` : metric.label, + before: show(change.before), + after: show(change.after), + change: + delta === undefined + ? 'Not compared' + : delta === 0 + ? 'Same' + : `${delta > 0 ? '+' : '−'}${Math.abs(delta)}${unit}, ${delta < 0 ? 'better' : 'worse'}`, + tone: delta === undefined || delta === 0 ? 'plain' : delta < 0 ? 'ok' : 'danger', + }; + }); + }); + + label(finding: AuditFinding): string { + return `${finding.rule}${finding.subject ? ` in ${finding.subject}` : ''}`; + } +} diff --git a/app/src/pages/audit-inspector.ts b/app/src/pages/audit-inspector.ts new file mode 100644 index 00000000..dd92566c --- /dev/null +++ b/app/src/pages/audit-inspector.ts @@ -0,0 +1,759 @@ +import { + Component, + DestroyRef, + computed, + effect, + inject, + input, + linkedSignal, + output, + signal, + untracked, +} from '@angular/core'; +import type { DevframeRpcClient } from 'devframe/client'; +import { time } from '../format'; +import { hostPageId } from '../page-id'; +import { isStaticReport, rpcCall } from '../rpc'; +import { Select, type SelectOption } from '../ui/select'; +import type { ComponentFocus } from '../types/component-focus.types'; +import { AuditDiffView } from './audit-diff'; +import { + AREA_LABEL, + AUDIT_AREAS, + METRICS, + toAuditResponse, + toolCall, + type AuditArea, + type AuditFinding, + type AuditResponse, +} from './audit-types'; + +type SeverityFilter = 'all' | 'error' | 'warning'; + +const SEVERITY_TONE = { error: 'danger', warning: 'warn', info: 'accent' } as const; +const SEVERITY_RANK = { error: 0, warning: 1, info: 2 } as const; +/** Areas whose findings point at a component host the Components tab can select. */ +const COMPONENT_AREAS: readonly AuditArea[] = ['errors', 'hydration']; +/** + * How long the panel waits after a change to the `audit` shared state before + * reading the audit again, so a burst (an axe pass starting, its result, it + * ending) costs one read. + */ +export const AUDIT_REFRESH_DELAY_MS = 150; + +@Component({ + selector: 'app-audit-inspector', + imports: [Select, AuditDiffView], + template: ` + @if (staticReport()) { +
+

The audit reads a live page, and a static report has none.

+

Open the panel from the server that runs the app to audit it.

+
+ } @else if (!loaded()) { +

Loading the audit…

+ } @else if (failed()) { + + } @else if (!report()) { +
+

No page reports live data yet.

+

+ Open the app with the overlay loaded. The audit reads what the other inspectors collect + from it. +

+
+ } @else { +

+ One ranked list of what the inspectors found on the live page, with an axe pass over the app + when you run one. Take a baseline before a change and an after audit to compare them. Agents + get the same list from the audit tool. +

+ +
+ + + + @if (pageOptions().length > 1) { + + } + {{ countText() }} + + +
+ +

{{ axeStatus() }}

+ @if (axeError(); as error) { + + } + +
+
+

Before and after

+
+ + + @if (before()) { + + } +
+
+

{{ sessionText() }}

+ @if (sessionError(); as error) { + + } + @if (diff(); as diff) { + + } +
+ +
+

Findings

+ @if (!findings().length) { +

+ No finding on this page. Run axe, or record change detection, to check more. +

+ } @else if (!shown().length) { +
+

No finding matches the filters.

+ +
+ } @else { +
    + @for (finding of shown(); track finding.key) { +
  1. +
    + {{ + finding.severity + }} + {{ areaLabel[finding.area] }} + @if (finding.subject) { + {{ finding.subject }} + } + @if ((finding.count ?? 1) > 1) { + {{ finding.count }}× + } +
    +

    {{ finding.why }}

    +
    + Rule {{ finding.rule }} + Agent tool {{ toolCall(finding) }} + + @if (finding.elementId && canShowComponent()) { + @if (isComponentArea(finding.area)) { + + } @else { + + } + } +
    +
  2. + } +
+ } +
+ +
+

Key numbers

+
+ @for (metric of numbers(); track metric.label) { +
+
{{ metric.label }}
+
{{ metric.value }}
+
+ } +
+
+ + @if (coverage().length) { +
+

Not checked

+
    + @for (source of coverage(); track source.area) { +
  • + {{ areaLabel[source.area] }} + {{ + source.state === 'off' + ? 'Its inspector is turned off.' + : (source.note ?? 'Nothing to read yet.') + }} +
  • + } +
+
+ } + } + `, + styles: ` + @use 'mixins' as m; + :host { + display: block; + font-size: 13px; + } + .intro { + margin: 0 0 12px; + color: var(--text-2); + line-height: 1.5; + } + code { + font-family: var(--font-mono); + font-size: 12px; + } + .muted { + color: var(--text-2); + } + .toolbar { + position: sticky; + top: 0; + z-index: 2; + display: flex; + flex-wrap: wrap; + gap: 8px 12px; + align-items: center; + margin: 0 0 8px; + padding: 8px; + background: color-mix(in srgb, var(--surface) 85%, transparent); + backdrop-filter: blur(10px); + border: 1px solid var(--border); + border-radius: var(--radius); + } + .search { + position: relative; + flex: 1 1 200px; + min-width: 0; + } + .search-icon { + position: absolute; + top: 50%; + left: 12px; + width: 14px; + height: 14px; + transform: translateY(-50%); + fill: none; + stroke: var(--text-3); + stroke-width: 2.2; + stroke-linecap: round; + pointer-events: none; + } + input[type='search'] { + width: 100%; + height: var(--control-h); + padding: 0 12px 0 34px; + background: var(--bg); + border: 1px solid var(--border-strong); + border-radius: var(--radius-sm); + color: var(--text); + font-size: 13px; + } + input[type='search']:focus { + @include m.field-focus; + } + .filter-select { + flex: 0 1 170px; + min-width: 0; + } + .count { + margin-left: auto; + color: var(--text-2); + font-size: 12px; + } + .small { + height: var(--control-h); + padding: 0 12px; + border: 1px solid var(--border-strong); + border-radius: var(--radius-sm); + background: var(--surface-2); + color: var(--text); + font: inherit; + cursor: pointer; + } + .small:hover:not(:disabled) { + background: var(--surface-3); + } + .small:disabled { + color: var(--text-2); + cursor: default; + } + .small:focus-visible { + @include m.focus-ring; + } + .axe-status { + min-height: 1.5em; + margin: 0 0 8px; + color: var(--text-2); + font-size: 12px; + } + .notice { + margin: 0 0 12px; + padding: 8px 12px; + border: 1px solid var(--border); + border-radius: var(--radius-sm); + background: var(--surface); + color: var(--text-2); + line-height: 1.5; + } + .notice.error { + color: var(--danger-text); + border-color: color-mix(in srgb, var(--danger) 40%, transparent); + } + section { + margin: 0 0 16px; + } + .session { + @include m.panel; + display: grid; + gap: 8px; + padding: 10px 12px; + } + .session p { + margin: 0; + } + .session-head { + display: flex; + flex-wrap: wrap; + gap: 8px 12px; + align-items: center; + justify-content: space-between; + } + .actions { + display: flex; + flex-wrap: wrap; + gap: 6px; + } + h2 { + margin: 0; + color: var(--text-strong); + font-size: 14px; + font-weight: 600; + } + .section-title { + margin: 0 0 8px; + } + .findings { + display: grid; + gap: 6px; + margin: 0; + padding: 0; + list-style: none; + } + .finding { + @include m.panel; + display: grid; + gap: 4px; + min-width: 0; + padding: 8px 12px; + } + .head, + .meta { + display: flex; + flex-wrap: wrap; + gap: 6px 10px; + align-items: center; + min-width: 0; + } + .meta { + font-size: 12px; + } + .meta code { + overflow-wrap: anywhere; + } + .subject { + min-width: 0; + color: var(--text-strong); + overflow-wrap: anywhere; + } + .times { + color: var(--text-2); + font-weight: 600; + font-variant-numeric: tabular-nums; + } + .why { + margin: 0; + color: var(--text); + line-height: 1.5; + overflow-wrap: anywhere; + } + .chip { + display: inline-flex; + align-items: center; + padding: 1px 8px; + border: 1px solid transparent; + border-radius: 99px; + font-size: 11px; + font-weight: 600; + @include m.tint(accent); + } + .chip.plain { + border-color: var(--border); + background: var(--surface-2); + color: var(--text-2); + } + .chip[data-tone='danger'] { + @include m.tint(danger); + } + .chip[data-tone='warn'] { + @include m.tint(warn); + } + .link { + padding: 0; + border: 0; + border-radius: 2px; + background: none; + color: var(--accent-text); + font: inherit; + text-decoration: underline; + text-underline-offset: 2px; + cursor: pointer; + } + .link:focus-visible { + @include m.focus-ring; + } + .numbers { + display: grid; + grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); + gap: 6px; + margin: 0; + } + .numbers div { + @include m.panel; + padding: 6px 10px; + } + .numbers dt { + color: var(--text-2); + font-size: 12px; + } + .numbers dd { + margin: 0; + color: var(--text-strong); + font-size: 15px; + font-weight: 600; + font-variant-numeric: tabular-nums; + } + .coverage { + display: grid; + gap: 4px; + margin: 0; + padding: 0 0 0 18px; + color: var(--text-2); + font-size: 12px; + } + .coverage strong { + color: var(--text); + font-weight: 600; + } + .empty, + .state { + margin: 0 0 12px; + color: var(--text-2); + } + .empty p, + .state p { + margin: 0 0 8px; + } + `, +}) +export class AuditInspector { + readonly rpc = input(null); + /** + * Whether the Components inspector is on: "Show component" opens its tab, and + * "Show in page" and hover outlines go through its `request-page-highlight`. + */ + readonly canShowComponent = input(true); + readonly showComponent = output(); + + private readonly destroyRef = inject(DestroyRef); + private readonly hostPageId = hostPageId(); + private unsubscribe?: () => void; + private seq = 0; + private highlighted = false; + private queued?: ReturnType; + + protected readonly time = time; + protected readonly toolCall = toolCall; + protected readonly areaLabel = AREA_LABEL; + protected readonly tone = SEVERITY_TONE; + protected readonly severityOptions: SelectOption[] = [ + { value: 'all', label: 'All severities' }, + { value: 'error', label: 'Errors' }, + { value: 'warning', label: 'Warnings and errors' }, + ]; + + readonly data = signal(null); + readonly loaded = signal(false); + readonly failed = signal(false); + readonly busy = signal(false); + readonly axeRunning = signal(false); + readonly axeError = signal(null); + readonly sessionError = signal(null); + readonly filter = signal(''); + readonly area = signal('all'); + readonly severity = signal('all'); + /** The page picked here, else the page the panel sits on, else the server's most recent. */ + readonly pageId = linkedSignal({ + source: () => this.data(), + computation: (data, previous) => + previous?.value && data?.pages.some((page) => page.pageId === previous.value) + ? previous.value + : (data?.report?.pageId ?? this.hostPageId ?? ''), + }); + + readonly staticReport = computed(() => isStaticReport(this.rpc())); + readonly report = computed(() => this.data()?.report ?? null); + readonly findings = computed(() => this.report()?.findings ?? []); + readonly before = computed(() => this.data()?.session?.before ?? null); + readonly after = computed(() => this.data()?.session?.after ?? null); + readonly diff = computed(() => this.data()?.session?.diff ?? null); + readonly pageOptions = computed(() => + (this.data()?.pages ?? []).map((page) => ({ + value: page.pageId, + label: page.title || page.url || page.pageId, + ...(page.url && page.url !== (page.title || page.url) ? { hint: page.url } : {}), + })), + ); + readonly areaOptions = computed(() => [ + { value: 'all', label: 'All areas' }, + ...AUDIT_AREAS.map((area) => ({ + value: area, + label: AREA_LABEL[area], + hint: String(this.findings().filter((finding) => finding.area === area).length), + })), + ]); + readonly shown = computed(() => { + const text = this.filter().trim().toLowerCase(); + const area = this.area(); + const floor = this.severity() === 'all' ? 2 : SEVERITY_RANK[this.severity() as 'error']; + return this.findings().filter( + (finding) => + (area === 'all' || finding.area === area) && + SEVERITY_RANK[finding.severity] <= floor && + (!text || + `${finding.subject ?? ''} ${finding.rule} ${finding.why}`.toLowerCase().includes(text)), + ); + }); + readonly countText = computed( + () => `${this.shown().length} of ${this.findings().length} findings`, + ); + readonly numbers = computed(() => { + const metrics = this.report()?.metrics ?? {}; + return METRICS.filter((metric) => metrics[metric.key] !== undefined).map((metric) => ({ + label: metric.unit === '%' ? `${metric.label} (%)` : metric.label, + value: `${metrics[metric.key]}${metric.unit === 'ms' ? ' ms' : ''}`, + })); + }); + readonly coverage = computed(() => + (this.report()?.sources ?? []).filter((source) => source.state !== 'ok'), + ); + readonly axeStatus = computed(() => { + if (this.axeRunning()) return 'Running axe on the page…'; + const axe = this.data()?.axe; + if (!axe) return 'No axe pass on this page yet. Run axe to check accessibility.'; + return `Last axe pass at ${time(axe.at)}: ${axe.violations.length} ${axe.violations.length === 1 ? 'rule' : 'rules'} broken.`; + }); + readonly sessionText = computed(() => { + const before = this.before(); + const after = this.after(); + if (!before) { + return 'Take a baseline, make your change, then take an after audit. Run axe and record change detection the same way both times, so the numbers compare.'; + } + const base = `Baseline at ${time(before.at)} with ${before.findings.length} findings.`; + return after + ? `${base} After audit at ${time(after.at)} with ${after.findings.length} findings.` + : `${base} Make your change, then take an after audit.`; + }); + + constructor() { + effect(() => { + const client = this.rpc(); + // Only the client is a dependency: the fetch reads the picked page, which must not re-run this. + if (client && !isStaticReport(client)) untracked(() => void this.subscribe(client)); + }); + this.destroyRef.onDestroy(() => { + this.unsubscribe?.(); + clearTimeout(this.queued); + this.highlight(null); + }); + } + + isComponentArea(area: AuditArea): boolean { + return COMPONENT_AREAS.includes(area); + } + + clearFilters() { + this.filter.set(''); + this.area.set('all'); + this.severity.set('all'); + } + + pickPage(pageId: string | null) { + if (!pageId) return; + this.pageId.set(pageId); + void this.refresh(); + } + + async refresh(): Promise { + const client = this.rpc(); + if (!client) return; + const seq = ++this.seq; + this.failed.set(false); + try { + const value = await rpcCall(client, 'get-audit', { pageId: this.pageId() || undefined }); + if (seq !== this.seq || this.destroyRef.destroyed) return; + const data = toAuditResponse(value); + // The panel's own page may not report (yet): fall back to the server's most recent. + if (!data.report && data.pages.length && this.pageId()) { + this.pageId.set(''); + return this.refresh(); + } + this.data.set(data); + } catch { + if (seq === this.seq) this.failed.set(true); + } finally { + if (seq === this.seq) this.loaded.set(true); + } + } + + async runAxe() { + const client = this.rpc(); + if (!client || this.axeRunning()) return; + this.axeRunning.set(true); + this.axeError.set(null); + try { + const result = (await rpcCall(client, 'request-axe-run', { + pageId: this.pageId() || undefined, + })) as { ok?: boolean; error?: string } | null; + if (!result?.ok) this.axeError.set(result?.error ?? 'The axe pass did not run.'); + } catch { + this.axeError.set("Can't reach the devtools server to run axe."); + } finally { + this.axeRunning.set(false); + } + await this.refresh(); + } + + async mark(action: 'before' | 'after' | 'clear') { + const client = this.rpc(); + if (!client) return; + this.busy.set(true); + this.sessionError.set(null); + try { + const result = (await rpcCall(client, 'audit-session', { + pageId: this.pageId() || undefined, + action, + })) as { ok?: boolean; error?: string } | null; + if (!result?.ok) this.sessionError.set(result?.error ?? 'The session did not change.'); + } catch { + this.sessionError.set("Can't reach the devtools server."); + } finally { + this.busy.set(false); + } + await this.refresh(); + } + + highlight(finding: AuditFinding | null, reveal = false) { + const client = this.rpc(); + if (!client || !this.canShowComponent()) return; + const pageId = this.pageId(); + const target = + finding?.elementId && pageId + ? { pageId, id: finding.elementId, ...(reveal ? { reveal: true } : {}) } + : null; + // Clear only a box this view drew. + if (!target && !this.highlighted) return; + this.highlighted = !!target; + void rpcCall(client, 'request-page-highlight', target).catch(() => {}); + } + + /** One read for a burst of shared state changes; none while an action here reads it when done. */ + private refreshSoon() { + if (this.queued !== undefined) return; + this.queued = setTimeout(() => { + this.queued = undefined; + if (this.destroyRef.destroyed || this.axeRunning() || this.busy()) return; + void this.refresh(); + }, AUDIT_REFRESH_DELAY_MS); + } + + private async subscribe(client: DevframeRpcClient) { + await this.refresh(); + try { + // Sessions and axe passes change from agents too; fetch again when they do. + const state = await client.scope('pangular').rpc.sharedState('audit'); + if (this.destroyRef.destroyed) return; + this.unsubscribe?.(); + this.unsubscribe = state.on('updated', () => this.refreshSoon()); + } catch { + // Without the shared state the Refresh button still works. + } + } +} diff --git a/app/src/pages/audit-types.ts b/app/src/pages/audit-types.ts new file mode 100644 index 00000000..37d5b55b --- /dev/null +++ b/app/src/pages/audit-types.ts @@ -0,0 +1,158 @@ +/** The audit as the `get-audit` RPC returns it (`rpc/audit-findings.ts` in the package). */ + +export type AuditSeverity = 'error' | 'warning' | 'info'; + +export type AuditArea = + | 'accessibility' + | 'change-detection' + | 'leaks' + | 'errors' + | 'router' + | 'forms' + | 'hydration' + | 'http' + | 'pipes'; + +export const AUDIT_AREAS: readonly AuditArea[] = [ + 'accessibility', + 'errors', + 'hydration', + 'change-detection', + 'leaks', + 'router', + 'forms', + 'http', + 'pipes', +]; + +export const AREA_LABEL: Record = { + accessibility: 'Accessibility', + 'change-detection': 'Change detection', + leaks: 'Leaks', + errors: 'Errors', + router: 'Router', + forms: 'Forms', + hydration: 'Hydration', + http: 'HTTP', + pipes: 'Pipes', +}; + +export interface AuditFinding { + key: string; + severity: AuditSeverity; + area: AuditArea; + rule: string; + subject?: string; + why: string; + tool: string; + args?: Record; + count?: number; + elementId?: string; +} + +export type AuditMetrics = Partial>; + +/** The numbers in the order the panel lists them, with their labels. */ +export const METRICS: readonly { key: string; label: string; unit?: string }[] = [ + { key: 'cdCycles', label: 'Change detection cycles' }, + { key: 'cdMeanMs', label: 'Mean cycle time', unit: 'ms' }, + { key: 'cdMaxMs', label: 'Slowest cycle', unit: 'ms' }, + { key: 'wastedChecks', label: 'Wasted checks' }, + { key: 'wastedPercent', label: 'Wasted checks', unit: '%' }, + { key: 'retained', label: 'Retained components' }, + { key: 'openSubscriptions', label: 'Open subscriptions after destroy' }, + { key: 'errorGroups', label: 'Error groups' }, + { key: 'errors', label: 'Error occurrences' }, + { key: 'axeViolations', label: 'axe rules broken' }, + { key: 'axeNodes', label: 'axe elements' }, + { key: 'httpFailures', label: 'Failed HTTP calls' }, + { key: 'findingsError', label: 'Errors found' }, + { key: 'findingsWarning', label: 'Warnings found' }, + { key: 'findingsInfo', label: 'Info found' }, +]; + +export interface AuditSource { + area: AuditArea; + /** `hidden` only reaches agents; the panel sees every area that is on. */ + state: 'ok' | 'empty' | 'off' | 'hidden'; + note?: string; +} + +export interface AuditReport { + pageId?: string; + url?: string; + title?: string; + at: number; + findings: AuditFinding[]; + metrics: AuditMetrics; + sources: AuditSource[]; + axeAt?: number; +} + +export interface AuditSnapshot { + at: number; + url?: string; + findings: AuditFinding[]; + metrics: AuditMetrics; + axe: boolean; + axeAt?: number; +} + +export interface MetricChange { + metric: string; + before?: number; + after?: number; + delta?: number; +} + +export interface AuditDiff { + resolved: AuditFinding[]; + added: AuditFinding[]; + remaining: (AuditFinding & { countBefore?: number })[]; + metrics: MetricChange[]; + notes: string[]; +} + +export interface AuditPage { + pageId: string; + url?: string; + title?: string; +} + +export interface AuditResponse { + pages: AuditPage[]; + report: AuditReport | null; + session?: { + before: AuditSnapshot | null; + after: AuditSnapshot | null; + diff: AuditDiff | null; + }; + axe?: { at: number; ms: number; violations: unknown[] } | null; +} + +/** The detail tool of a finding as an agent would call it, such as `explain-error { id: "e1" }`. */ +export function toolCall(finding: AuditFinding): string { + const args = Object.entries(finding.args ?? {}) + .filter(([key]) => key !== 'page') + .map(([key, value]) => `${key}: ${JSON.stringify(value)}`) + .join(', '); + return `${finding.tool.replace(/^pangular:/, '')}${args ? ` { ${args} }` : ''}`; +} + +/** Reads a `get-audit` answer, dropping what does not fit. */ +export function toAuditResponse(value: unknown): AuditResponse { + const record = (value ?? {}) as Partial; + const pages = Array.isArray(record.pages) + ? record.pages.filter((page): page is AuditPage => typeof page?.pageId === 'string') + : []; + const report = + record.report && Array.isArray(record.report.findings) && Array.isArray(record.report.sources) + ? record.report + : null; + return { + pages, + report, + session: record.session ?? { before: null, after: null, diff: null }, + axe: record.axe ?? null, + }; +} diff --git a/app/src/pages/tab-icon.ts b/app/src/pages/tab-icon.ts index 1594a061..ec40cae2 100644 --- a/app/src/pages/tab-icon.ts +++ b/app/src/pages/tab-icon.ts @@ -27,6 +27,10 @@ import { Component, input } from '@angular/core'; } + @case ('audit') { + + + } @case ('components') { diff --git a/app/src/types/tab.types.ts b/app/src/types/tab.types.ts index 8f35e260..59858f74 100644 --- a/app/src/types/tab.types.ts +++ b/app/src/types/tab.types.ts @@ -1,6 +1,7 @@ export type Tab = | 'dashboard' | 'timeline' + | 'audit' | 'components' | 'pipes' | 'routes' diff --git a/apps/docs/src/content/agents/resources.md b/apps/docs/src/content/agents/resources.md index 9b444703..edc2f413 100644 --- a/apps/docs/src/content/agents/resources.md +++ b/apps/docs/src/content/agents/resources.md @@ -96,6 +96,7 @@ This table covers the data that has no resource of its own. | `pangular:pipe-usage` | Live pipe instances and recorded calls | | `pangular:errors` | Error groups and console calls, by page id | | `pangular:leaks` | Leak hints: retained instances, open subscriptions, effects, by page id | +| `pangular:audit` | Audit sessions and axe passes: when each was taken, by page id | | `pangular:analog` | Analog page data and the server call log | | `pangular:routes` | Declared but not filled. Use `get-routes` or `list-routes` instead. | diff --git a/apps/docs/src/content/agents/tools.md b/apps/docs/src/content/agents/tools.md index 609b3292..724ebfb0 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 --- - Seventy-five tools, grouped by inspector. Each one answers a question you would otherwise answer by clicking through the panel. + Seventy-six tools, grouped by inspector. Each one answers a question you would otherwise answer by clicking through the panel. # Tools @@ -53,11 +53,11 @@ The URL comes from the HTTP or router report. A page that sends neither (no rout Gives the user a link that opens the panel on one tab with one item selected, and switches the panels that are open to it. Reads: page. Use it to point the user at what you found. -| Argument | Required | What it is | -| -------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `tab` | Yes | The tab: `dashboard`, `timeline`, `components`, `routes`, `signals`, `injectors`, `store`, `forms`, `pipes`, `network` (SSR & HTTP), `errors`, `analog` or `capacitor`. Only tabs that are on count. | -| `id` | No | The item to select: a component id on `components`, the id of the component whose element injector to show on `injectors`, a form id on `forms`. Other tabs ignore it. | -| `page` | No | The page the item belongs to, from `list-pages`. | +| Argument | Required | What it is | +| -------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `tab` | Yes | The tab: `dashboard`, `timeline`, `audit`, `components`, `routes`, `signals`, `injectors`, `store`, `forms`, `pipes`, `network` (SSR & HTTP), `errors`, `analog` or `capacitor`. Only tabs that are on count. | +| `id` | No | The item to select: a component id on `components`, the id of the component whose element injector to show on `injectors`, a form id on `forms`. Other tabs ignore it. | +| `page` | No | The page the item belongs to, from `list-pages`. | The answer is a full URL, such as `http://localhost:4200/__devframes/pangular/#tab=components&id=12&page=k3x9`, when the hub serves the panel and a page has reported its address. Otherwise it is the hash to add to the panel's address. Each panel that is open and not in a background tab opens the link at once. The tool is `read`: it changes what the panel shows, not the app. See [Deep links](../getting-started/popup-and-hub.md#deep-links). @@ -65,21 +65,21 @@ The answer is a full URL, such as `http://localhost:4200/__devframes/pangular/#t 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`, `set-component-property`, `set-signal`, `watch-signal`, `record-pipes`, `track-subscriptions`, `change-detection` and `hydration` | -| `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`, `watch-signal`, `record-pipes`, `track-subscriptions`, `change-detection`, `hydration` and `audit` | +| `destructive` | Can lose data: it erases recordings, or sends writes to your own API routes. | `clear-recordings` and `analog-call-api` | - The fifteen action and destructive tools act on the app. Your client can ask you before it runs them. + The sixteen 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, or turns a live view on or off, and `hydration` only when it turns the overlay on or off. See [Messages and badges](../getting-started/popup-and-hub.md#messages-and-badges). +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, or turns a live view on or off, `hydration` only when it turns the overlay on or off, and `audit` only when it runs axe. See [Messages and badges](../getting-started/popup-and-hub.md#messages-and-badges). ### Turn tools off -The server decides which tools exist. Set `agent.readOnly` to keep only the `read` tools. `change-detection` stays as a `read` tool without its `record`, `flash`, `track` and `angularProfiling` arguments, so it reads a recording the panel started. `hydration` stays as a `read` tool without its `overlay` argument. Set `agent.tools.` to `false` to hide one inspector's tools and resources, and keep its tab. Turning an inspector off with `inspectors`, or blocking an action with `actions`, drops the matching tools too. `actions.router` is the exception: `navigate` stays for `instrument` and `resolve-lazy`, and refuses `navigate`, `abort`, `replay` and `probe`. See [Inspectors and agent tools](../getting-started/configuration.md#inspectors-and-agent-tools). +The server decides which tools exist. Set `agent.readOnly` to keep only the `read` tools. `change-detection` stays as a `read` tool without its `record`, `flash`, `track` and `angularProfiling` arguments, so it reads a recording the panel started. `hydration` stays as a `read` tool without its `overlay` argument, and `audit` without its `axe` argument, so it reads the last axe pass the panel ran. Set `agent.tools.` to `false` to hide one inspector's tools and resources, and keep its tab. Turning an inspector off with `inspectors`, or blocking an action with `actions`, drops the matching tools too. `actions.router` is the exception: `navigate` stays for `instrument` and `resolve-lazy`, and refuses `navigate`, `abort`, `replay` and `probe`. See [Inspectors and agent tools](../getting-started/configuration.md#inspectors-and-agent-tools). ## Source scan @@ -630,6 +630,26 @@ The explainers are the ones the [Errors](../inspectors/errors.md#explainers) tab `code` accepts `NG0100`, `ng100` or `NG01203`. `explain-error` says so when Angular's error reference has no page for a code, and gives no known cause then. Pass the owner's instance id to `inspect-component` for its inputs and state. `list-errors` takes `limit` up to 100 (default 30), and `list-console` up to 200 (default 50). Messages, stacks and console text are masked like other live values. +## Audit + +### audit Action + +One ranked list of what is wrong on the page, gathered from the other inspectors, with an axe pass over the app on request. See [Audit](../inspectors/audit.md). Reads: page. + +Each finding has a severity, an area, the component, route or URL it is about, one line on why, and the tool to call for detail, with its arguments. The answer also lists key numbers (mean and slowest change detection cycle, wasted checks, retained components, open subscriptions after destroy, errors, axe violations and failed HTTP calls) and the areas it could not read, under **Coverage**. + +| Argument | Required | Value | +| ---------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `axe` | no | `true` runs axe-core over the app first. Without it, the audit uses the last axe pass on the page. | +| `session` | no | `before` saves this audit as the page's baseline. `after` audits again and compares with the baseline. `clear` drops the baseline. | +| `area` | no | `accessibility`, `errors`, `hydration`, `change-detection`, `leaks`, `router`, `forms`, `http` or `pipes`. `accessibility` also lists the elements that break each axe rule. | +| `severity` | no | `error`, `warning` or `info`: only findings at that severity or above. | +| `limit` | no | Rows to list, 1 to 200. Default 30. | + +The audit reuses each inspector's own checks: `diagnose-change-detection` hints and checks slower than 16 ms, `find-leaks`, `explain-error`, `hydration`, `lint-routes`, `lint-forms`, `list-http-calls` and `lint-pipes`. Change detection numbers need a recording from `change-detection`. Retention is not judged on a page whose Angular keeps DI debug data, the same as `find-leaks`. An area whose inspector is off, or whose agent tools are hidden with `agent.tools.: false`, is left out, and **Coverage** says which. With the Components agent tools hidden, axe findings name no component or instance id. + +The axe pass loads axe-core into the page on demand and changes nothing in the app. It leaves out the overlay's own elements and frames, masks selectors, attributes and summaries, and leaves out text content. With `agent.readOnly`, the tool has no `axe` argument and is marked read-only, and it refuses `session: "clear"` and a `session: "before"` that would replace a baseline, so it never drops one the user took. Two audits that used the same axe pass don't compare accessibility, and a note says so. A reload of the tab drops its axe pass. A session is kept per page for 30 minutes after its last use, so it survives a reload of the tab. Comparing only works within one page id. See [Inspect, fix and verify](../guides/inspect-fix-verify.md) for the loop. + ## Analog These tools cover *Analog apps. Most read your source. Some also read what the Vite plugin recorded. diff --git a/apps/docs/src/content/getting-started/popup-and-hub.md b/apps/docs/src/content/getting-started/popup-and-hub.md index e15e4b37..b3e7a7eb 100644 --- a/apps/docs/src/content/getting-started/popup-and-hub.md +++ b/apps/docs/src/content/getting-started/popup-and-hub.md @@ -152,7 +152,7 @@ When the page's server mounts the hub (`/__devframes/`), the button opens the wh | Dock | Shows | | -------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | | All tools | The full panel, with every tab in one tab bar (`/__devframes/pangular/`) | -| Angular | Dashboard, Timeline, Components, Routes, Signals, Injectors, Forms, Pipes, SSR & HTTP, and Errors | +| Angular | Dashboard, Timeline, Audit, Components, Routes, Signals, Injectors, Forms, Pipes, SSR & HTTP, and Errors | | NgRx | The Store tab | | Analog | The Analog tab, or a notice in apps that do not use Analog | | Angular Native | Components, Signals, Injectors and Store for a connected [Angular Native](./angular-native.md) app, or a setup notice when none is connected | @@ -217,6 +217,7 @@ The URL hash selects a tab. Open `/__devframes/pangular/#tab=signals` to land on | ---------- | ----------------- | | Dashboard | `#tab=dashboard` | | Timeline | `#tab=timeline` | +| Audit | `#tab=audit` | | Components | `#tab=components` | | Routes | `#tab=routes` | | Signals | `#tab=signals` | diff --git a/apps/docs/src/content/guides/inspect-fix-verify.md b/apps/docs/src/content/guides/inspect-fix-verify.md new file mode 100644 index 00000000..3e67e77e --- /dev/null +++ b/apps/docs/src/content/guides/inspect-fix-verify.md @@ -0,0 +1,120 @@ +--- +title: Inspect, fix and verify +description: Let an agent audit the running app, fix what it finds and prove the fix with a before and after comparison. +--- + + + Audit the live page, change the code, audit again and compare. The agent sees what it fixed, and what it broke. + + +# Inspect, fix and verify + +This guide walks an agent through one loop with the `audit` tool: take a baseline of the running page, fix a finding in the code, and compare the page after the change with the baseline. You can run the same loop by hand on the [Audit](../inspectors/audit.md) tab. + +## Before you start + + + + The agent connects to the MCP endpoint of the server that runs the app. The stdio server has no page. + + + The app is open with the overlay loaded, in a development build. + + + agent.readOnly is off, so the agent can run axe and record change detection. + + + +## The loop + + + + Find the page id with list-pages. + + + Start a change detection recording and use the app the way the user does. + + + Call audit with session: "before" and axe: true. + + + Call the detail tool each finding names, then change the code. + + + Wait for the reload, record again and use the app the same way. + + + Call audit with session: "after" and axe: true. + + + +## Step 1: Pick the page + +Call `list-pages`. If more than one tab reports, pass its id as `page` to every call below. Without `page`, each tool uses the most recent page, which can change when you open another tab. + +## Step 2: Record what you measure + +The audit reads what the inspectors already hold. Errors, hydration, router, form and HTTP findings are there as soon as the page reports. Change detection numbers need a recording: + +```json +{"tool": "pangular:change-detection", "arguments": {"record": "start", "page": "k3x9"}} +``` + +Then use the app: open the screens and click what the change is about. Subscriptions after destroy need tracking, so call `track-subscriptions` with `action: "start"` too if leaks matter to the change. + +## Step 3: Take the baseline + +```json +{"tool": "pangular:audit", "arguments": {"session": "before", "axe": true, "page": "k3x9"}} +``` + +The answer is the ranked list of findings, the key numbers and what the audit could not check. It saves the audit as the page's baseline for 30 minutes after its last use. A reload keeps the page id, so the baseline survives the rebuild after your change. + +## Step 4: Read the detail and fix + +Each finding names the tool that explains it, with the arguments to pass, such as `explain-error { id: "e1" }` or `diagnose-change-detection`. For accessibility findings, call `audit` with `area: "accessibility"`: it lists the elements that break each axe rule, their component and instance id, and a link to the rule. Pass an instance id to `inspect-component`, or to `highlight` to show the user where it is. + +Fix one area at a time, so the comparison says what each change did. + +## Step 5: Repeat the same steps + +After the reload, the recording, the leak data and the error list start again. Start a change detection recording and use the app the same way as before the change. The numbers only compare when the page did the same work. + +## Step 6: Compare + +```json +{"tool": "pangular:audit", "arguments": {"session": "after", "axe": true, "page": "k3x9"}} +``` + +The answer adds a **Before and after** section: + +| Part | What it shows | +| ----------- | ----------------------------------------------------------------------------------------------------------- | +| Numbers | Each number before and after, with the difference marked better or worse. Lower is better for every number. | +| Resolved | Findings the baseline had and the after audit doesn't. | +| New | Findings only the after audit has. Look at these before you call the change done. | +| Still there | Findings in both. When a count moved, it lists those findings, otherwise the first five. | + +When only one of the two audits ran axe, or both used the same pass, accessibility findings are not compared, and a note says so. A reload drops the page's last axe pass, so pass `axe: true` again after the change. Call `audit` with `session: "after"` again after another fix: it compares with the same baseline. Call it with `session: "before"` to start over from the current state, or `session: "clear"` to drop the baseline. + +## Show the user + +Call `open-in-panel` with `tab: "audit"` to give the user a link to the same list and comparison in the panel. + +## Gotchas + + + With agent.readOnly, audit has no axe argument and change-detection can't record. Run axe and the recording from the panel, and the agent's audit reads them. + + +- Findings are matched by area, rule and subject, not by position. A renamed component or route counts as one finding resolved and one new. +- An area whose inspector or agent tools are off is left out, and **Coverage** names it. +- Pipe findings come from the source scan, so they change only when the source does. + +## Where to next + + + + + + diff --git a/apps/docs/src/content/inspectors/audit.md b/apps/docs/src/content/inspectors/audit.md new file mode 100644 index 00000000..ba150c6e --- /dev/null +++ b/apps/docs/src/content/inspectors/audit.md @@ -0,0 +1,145 @@ +--- +title: Audit +description: One ranked list of what the inspectors found on the running page, an axe pass over the app, and a before and after comparison of a change. +--- + + + Everything the inspectors found wrong on the page in one ranked list, with an accessibility pass and a way to measure a fix. + + +# Audit + +The Audit tab gathers the findings of the other inspectors into one list, ranked by severity. It adds an axe-core pass over the app when you run one. Take a baseline before a change and an after audit once it is in, and the tab compares the two: what was resolved, what is new, and how the key numbers moved. + +Agents get the same list from the `audit` tool. See [Agent tools](#agent-tools). + +## What it shows + +### Findings + +Each row is one finding: + +| Part | What it shows | +| -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Severity | **error**, **warning** or **info**. | +| Area | The inspector it comes from, or **Accessibility** for the axe pass. | +| Subject | The component class, route, form, URL or pipe it is about. | +| Count | How many times or places it occurs, as **3×**. | +| Why | One line on why it is a problem. Values are masked like other live data. | +| Rule | The check's id, such as `onpush-candidate`, `wildcard-not-last` or `image-alt`. | +| Agent tool | The tool that explains the finding in detail, with its arguments, such as `explain-error { id: "e1" }`. | +| Show component | For errors and hydration mismatches, opens the [Components](./components.md) tab on the component. Only with the Components inspector on. | +| Show in page | For other findings that map to an element, such as an axe violation, scrolls the page to it and draws a box around. Only with the Components inspector on, which draws the box. | + +Errors come first, then warnings, then info. Within a severity, accessibility comes first, then errors, hydration, change detection, leaks, router, forms, HTTP and pipes, and then the finding that occurs most often. Filter by text, **Area** or **Severity**, and press `Escape` to clear the search. Hovering a row with an element outlines that element in the app, when the Components inspector is on. + +### Where the findings come from + +The audit runs no check of its own. It reads what each inspector already collected and turns its results into findings. + +| Area | Findings | Detail tool | +| ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------- | +| Accessibility | Each axe rule the app breaks, per component, with the rule's impact as severity: critical and serious are errors, moderate a warning, minor info. | `audit` with `area` | +| Errors | Each error group, with its count and owning component. | `explain-error` | +| Hydration | Mismatches, server HTML that was not hydrated at all, and hosts that skip hydration. | `hydration` | +| Change detection | The hints of the [change detection diagnosis](./components.md#change-detection): OnPush candidates, inputs mutated in place, components that depend on zone.js. Also components whose slowest check took 16 ms or more. | `diagnose-change-detection` | +| Leaks | Components still retained after destroy, and subscriptions still open after their component went away. | `find-leaks` | +| Router | The findings of [Router Lint](./router.md), redirect loops included. | `lint-routes` | +| Forms | The findings of Forms Lint, and NG01xxx setup errors. | `lint-forms` | +| HTTP | Failed `HttpClient` calls by endpoint, calls a fault rule failed, and calls the browser fetched again because the transfer cache did not keep them. | `list-http-calls` | +| Pipes | The findings of the pipe lint, from the source scan. | `lint-pipes` | + +### Key numbers + +Under the list, the tab shows the numbers a before and after comparison reads: + +| Number | Source | +| -------------------------------- | ---------------------------------------------------------------------------- | +| Change detection cycles | The cycles of the current recording. | +| Mean cycle time, slowest cycle | The duration of those cycles, in ms. | +| Wasted checks | Refreshed checks that changed nothing, as a count and a share of all checks. | +| Retained components | Destroyed components still in memory after enough navigations. | +| Open subscriptions after destroy | Counted while subscription tracking is on. | +| Error groups, error occurrences | The errors the page hit since it loaded. | +| axe rules broken, axe elements | From the last axe pass. | +| Failed HTTP calls | Failed calls the page made, cancelled calls and fault rules left out. | +| Errors, warnings and info found | The findings by severity. | + +A number shows only when its area could be read. **Not checked** lists the areas the audit could not read and why, such as a missing change detection recording or an inspector that is turned off. + +### Run axe + +**Run axe** runs [axe-core](https://github.com/dequelabs/axe-core) over the app on the page. The overlay loads axe-core only then, so a page that never runs a pass doesn't download it. The pass: + +- Leaves out the overlay's own elements: the popup, the change detection flash layer, the hydration outline and the highlight box. +- Skips frames, and reports violations only. +- Reads the DOM and changes nothing in the app. +- Masks selectors, attributes and axe's summaries, and leaves out text content and `value` attributes. `alt`, `title`, `aria-label` and `name` values are always replaced, since they can hold personal text. +- Names the component whose template holds each element, when the Components inspector is on. + +The tab keeps the last pass of each page, and the status line says when it ran. A reload of the page drops its pass, since the elements it names are gone. A page whose overlay has no axe pass, or that takes more than 45 seconds, gets an error that says so. + +### Before and after + + + + Run axe and record change detection if you want their numbers, then click Take baseline. + + + Edit the code. The page reloads with the same page id, so the baseline stays. + + + Run axe and record the same interactions again, then click Take after audit. + + + +The comparison shows each number before and after, with the change marked **better** or **worse** (lower is better for every number). Under it, **Resolved** lists findings the after audit no longer has, **New** the ones only it has, and **Changed count** the findings whose count moved. When only one of the two audits ran axe, or both used the same axe pass, accessibility findings are left out of the comparison, and a note says so. Run axe again after the change. A baseline an agent took compares with an after audit you take here, and the other way round. Taking another baseline drops the after audit. **Clear** drops both. + +### Pages + +When several tabs report, **Page** picks the one to audit. The panel of a tab starts on that tab. + +## Agent tools + +| Tool | What it does | +| ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `pangular:audit` | The ranked findings with the tool to call for each, the key numbers and what could not be checked. `axe: true` runs a fresh axe pass first. `session` takes a baseline (`before`), compares (`after`) or `clear`s it. | + +The tool is an `action` tool because of `axe`. With `agent.readOnly`, it has no `axe` argument, reads the last pass the panel ran, and is marked read-only. It can then take a baseline only for a page that has none, and compare with it: `session: "clear"`, and `session: "before"` over an existing baseline, are refused, so the agent never drops a baseline you took. An area whose agent tools are hidden with `agent.tools.: false` is left out of the agent's answer, and **Coverage** says its agent tools are off. The panel still shows it. With the Components inspector's agent tools off, the axe findings name no component and no instance id. See [Tools](../agents/tools.md#audit) and [Inspect, fix and verify](../guides/inspect-fix-verify.md). + +## Limits and gotchas + + + Messages, routes, URLs and axe selectors are masked like other live values: secret field names, JWTs, bearer tokens and secret key=value pairs. See Access and redaction. + + +### Caps + +| What | Kept | +| ------------------------ | ------------------------------------------------ | +| Findings per audit | 300, the most severe first. | +| axe rules per pass | 100, the ones with the most elements first. | +| Elements per axe rule | 20. The count still covers all of them. | +| Pages with a session | 10. The one unused the longest goes first. | +| Session and axe pass age | 30 minutes after their last use, then forgotten. | + +### Numbers depend on what you did + +Change detection numbers come from the current recording, and leak and error counts start again when the page reloads. To compare a change, do the same things on the page before each audit, and record change detection for both. + +### Retention with DI debug data + +On Angular 16.2 and later in a development build, Angular's DI debug data keeps every destroyed component in memory, so the audit, like [find-leaks](./components.md#leaks), doesn't judge retention there. Open subscriptions after destroy still count. + +### It needs a live page + +The audit reads what connected pages report. A [static report](../getting-started/cli.md#static-report) has no page, so the tab says so. + +## Where to next + + + + + + + diff --git a/apps/docs/src/ngmd.config.ts b/apps/docs/src/ngmd.config.ts index f5f526b7..da58148a 100644 --- a/apps/docs/src/ngmd.config.ts +++ b/apps/docs/src/ngmd.config.ts @@ -209,6 +209,7 @@ const config: NgmdConfig = { {label: 'Analog', href: '/inspectors/analog', status: 'new'}, {label: 'Capacitor', href: '/inspectors/capacitor', status: 'new'}, {label: 'Errors', href: '/inspectors/errors', status: 'new'}, + {label: 'Audit', href: '/inspectors/audit', status: 'new'}, ], }, { @@ -228,6 +229,7 @@ const config: NgmdConfig = { {label: 'Set up NativeScript', href: '/guides/nativescript'}, {label: 'Set up Angular Native', href: '/guides/angular-native'}, {label: 'Set up Capacitor', href: '/guides/capacitor', status: 'new'}, + {label: 'Inspect, fix and verify', href: '/guides/inspect-fix-verify', status: 'new'}, ], }, { diff --git a/extension/ui/assets/browser-agent-rpc-BXhoSh1z-Cq6OpQlN.js b/extension/ui/assets/browser-agent-rpc-BXhoSh1z-B_f3HV4w.js similarity index 93% rename from extension/ui/assets/browser-agent-rpc-BXhoSh1z-Cq6OpQlN.js rename to extension/ui/assets/browser-agent-rpc-BXhoSh1z-B_f3HV4w.js index 8dce9762..80939169 100644 --- a/extension/ui/assets/browser-agent-rpc-BXhoSh1z-Cq6OpQlN.js +++ b/extension/ui/assets/browser-agent-rpc-BXhoSh1z-B_f3HV4w.js @@ -1 +1 @@ -import{t as e}from"./index-CyKw4x-n.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-DJ-lPKba.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-CyKw4x-n.js b/extension/ui/assets/index-DJ-lPKba.js similarity index 81% rename from extension/ui/assets/index-CyKw4x-n.js rename to extension/ui/assets/index-DJ-lPKba.js index e2800fd0..f5439644 100644 --- a/extension/ui/assets/index-CyKw4x-n.js +++ b/extension/ui/assets/index-DJ-lPKba.js @@ -5,10 +5,10 @@ `):``,this.name=`UnsubscriptionError`,this.errors=t}});function gr(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var _r=function(){function e(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var e,t,n,r,i;if(!this.closed){this.closed=!0;var a=this._parentage;if(a){if(this._parentage=null,Array.isArray(a))try{for(var o=ur(a),s=o.next();!s.done;s=o.next())s.value.remove(this)}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}else a.remove(this)}var c=this.initialTeardown;if(pr(c))try{c()}catch(e){i=e instanceof hr?e.errors:[e]}var l=this._finalizers;if(l){this._finalizers=null;try{for(var u=ur(l),d=u.next();!d.done;d=u.next()){var f=d.value;try{br(f)}catch(e){i??=[],e instanceof hr?i=fr(fr([],dr(i)),dr(e.errors)):i.push(e)}}}catch(e){n={error:e}}finally{try{d&&!d.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}}if(i)throw new hr(i)}},e.prototype.add=function(t){if(t&&t!==this){if(this.closed)br(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=this._finalizers??[]).push(t)}}},e.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},e.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},e.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&gr(t,e)},e.prototype.remove=function(t){var n=this._finalizers;n&&gr(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=(function(){var t=new e;return t.closed=!0,t})(),e}(),vr=_r.EMPTY;function yr(e){return e instanceof _r||e&&`closed`in e&&pr(e.remove)&&pr(e.add)&&pr(e.unsubscribe)}function br(e){pr(e)?e():e.unsubscribe()}var xr={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Sr={setTimeout:function(e,t){var n=[...arguments].slice(2),r=Sr.delegate;return r?.setTimeout?r.setTimeout.apply(r,fr([e,t],dr(n))):setTimeout.apply(void 0,fr([e,t],dr(n)))},clearTimeout:function(e){return(Sr.delegate?.clearTimeout||clearTimeout)(e)},delegate:void 0};function Cr(e){Sr.setTimeout(function(){var t=xr.onUnhandledError;if(t)t(e);else throw e})}function wr(){}var Tr=(function(){return Or(`C`,void 0,void 0)})();function Er(e){return Or(`E`,void 0,e)}function Dr(e){return Or(`N`,e,void 0)}function Or(e,t,n){return{kind:e,value:t,error:n}}var kr=null;function Ar(e){if(xr.useDeprecatedSynchronousErrorHandling){var t=!kr;if(t&&(kr={errorThrown:!1,error:null}),e(),t){var n=kr,r=n.errorThrown,i=n.error;if(kr=null,r)throw i}}else e()}function jr(e){xr.useDeprecatedSynchronousErrorHandling&&kr&&(kr.errorThrown=!0,kr.error=e)}var Mr=function(e){lr(t,e);function t(t){var n=e.call(this)||this;return n.isStopped=!1,t?(n.destination=t,yr(t)&&t.add(n)):n.destination=Br,n}return t.create=function(e,t,n){return new Ir(e,t,n)},t.prototype.next=function(e){this.isStopped?zr(Dr(e),this):this._next(e)},t.prototype.error=function(e){this.isStopped?zr(Er(e),this):(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped?zr(Tr,this):(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(_r),Nr=Function.prototype.bind;function Pr(e,t){return Nr.call(e,t)}var Fr=function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){Lr(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){Lr(e)}else Lr(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){Lr(e)}},e}(),Ir=function(e){lr(t,e);function t(t,n,r){var i=e.call(this)||this,a;if(pr(t)||!t)a={next:t??void 0,error:n??void 0,complete:r??void 0};else{var o;i&&xr.useDeprecatedNextContext?(o=Object.create(t),o.unsubscribe=function(){return i.unsubscribe()},a={next:t.next&&Pr(t.next,o),error:t.error&&Pr(t.error,o),complete:t.complete&&Pr(t.complete,o)}):a=t}return i.destination=new Fr(a),i}return t}(Mr);function Lr(e){xr.useDeprecatedSynchronousErrorHandling?jr(e):Cr(e)}function Rr(e){throw e}function zr(e,t){var n=xr.onStoppedNotification;n&&Sr.setTimeout(function(){return n(e,t)})}var Br={closed:!0,next:wr,error:Rr,complete:wr},Vr=(function(){return typeof Symbol==`function`&&Symbol.observable||`@@observable`})();function Hr(e){return e}function Ur(e){return e.length===0?Hr:e.length===1?e[0]:function(t){return e.reduce(function(e,t){return t(e)},t)}}var Wr=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(e,t,n){var r=this,i=qr(e)?e:new Ir(e,t,n);return Ar(function(){var e=r,t=e.operator,n=e.source;i.add(t?t.call(i,n):n?r._subscribe(i):r._trySubscribe(i))}),i},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var n=this;return t=Gr(t),new t(function(t,r){var i=new Ir({next:function(t){try{e(t)}catch(e){r(e),i.unsubscribe()}},error:r,complete:t});n.subscribe(i)})},e.prototype._subscribe=function(e){return this.source?.subscribe(e)},e.prototype[Vr]=function(){return this},e.prototype.pipe=function(){return Ur([...arguments])(this)},e.prototype.toPromise=function(e){var t=this;return e=Gr(e),new e(function(e,n){var r;t.subscribe(function(e){return r=e},function(e){return n(e)},function(){return e(r)})})},e.create=function(t){return new e(t)},e}();function Gr(e){return e??xr.Promise??Promise}function Kr(e){return e&&pr(e.next)&&pr(e.error)&&pr(e.complete)}function qr(e){return e&&e instanceof Mr||Kr(e)&&yr(e)}function Jr(e){return pr(e?.lift)}function Yr(e){return function(t){if(Jr(t))return t.lift(function(t){try{return e(t,this)}catch(e){this.error(e)}});throw TypeError(`Unable to lift unknown Observable type`)}}function Xr(e,t,n,r,i){return new Zr(e,t,n,r,i)}var Zr=function(e){lr(t,e);function t(t,n,r,i,a,o){var s=e.call(this,t)||this;return s.onFinalize=a,s.shouldUnsubscribe=o,s._next=n?function(e){try{n(e)}catch(e){t.error(e)}}:e.prototype._next,s._error=i?function(e){try{i(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,s._complete=r?function(){try{r()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,s}return t.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;e.prototype.unsubscribe.call(this),!n&&((t=this.onFinalize)==null||t.call(this))}},t}(Mr),Qr=mr(function(e){return function(){e(this),this.name=`ObjectUnsubscribedError`,this.message=`object unsubscribed`}}),$r=function(e){lr(t,e);function t(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return t.prototype.lift=function(e){var t=new ei(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new Qr},t.prototype.next=function(e){var t=this;Ar(function(){var n,r;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||=Array.from(t.observers);try{for(var i=ur(t.currentObservers),a=i.next();!a.done;a=i.next())a.value.next(e)}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}})},t.prototype.error=function(e){var t=this;Ar(function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var n=t.observers;n.length;)n.shift().error(e)}})},t.prototype.complete=function(){var e=this;Ar(function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){return this.observers?.length>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var t=this,n=this,r=n.hasError,i=n.isStopped,a=n.observers;return r||i?vr:(this.currentObservers=null,a.push(e),new _r(function(){t.currentObservers=null,gr(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 Wr;return e.source=this,e},t.create=function(e,t){return new ei(e,t)},t}(Wr),ei=function(e){lr(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)??vr},t}($r),ti=function(e){lr(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}($r);function ni(e,t){return Yr(function(n,r){var i=0;n.subscribe(Xr(r,function(n){r.next(e.call(t,n,i++))}))})}var ri=`https://angular.dev/best-practices/security#preventing-cross-site-scripting-xss`,ii=class extends Error{code;constructor(e,t){super(oi(e,t)),this.code=e}};function ai(e){return`NG0${Math.abs(e)}`}function oi(e,t){return`${ai(e)}${t?`: `+t:``}`}function si(e){for(let t in e)if(e[t]===si)return t;throw Error(``)}function ci(e){if(typeof e==`string`)return e;if(Array.isArray(e))return`[${e.map(ci).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 li(e,t){return e?t?`${e} ${t}`:e:t||``}var ui=si({__forward_ref__:si});function di(e){return e.__forward_ref__=di,e}function fi(e){return pi(e)?e():e}function pi(e){return typeof e==`function`&&Object.hasOwn(e,ui)&&e.__forward_ref__===di}function mi(e){return{token:e.token,providedIn:e.providedIn||null,factory:e.factory,value:void 0}}function hi(e){return gi(e,yi)}function gi(e,t){return Object.hasOwn(e,t)&&e[t]||null}function _i(e){return(e?.[yi]??null)||null}function vi(e){return e&&Object.hasOwn(e,bi)?e[bi]:null}var yi=si({ɵprov:si}),bi=si({ɵinj:si}),xi=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=mi({token:this,providedIn:t.providedIn||`root`,factory:t.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}};function Si(e){return e&&!!e.ɵproviders}var Ci=si({ɵcmp:si}),wi=si({ɵdir:si}),Ti=si({ɵpipe:si}),Ei=si({ɵfac:si}),Di=si({__NG_ELEMENT_ID__:si}),Oi=si({__NG_ENV_ID__:si});function ki(e){return Mi(e,`@Component`),e[Ci]||null}function Ai(e){return Mi(e,`@Directive`),e[wi]||null}function ji(e){return Mi(e,`@Pipe`),e[Ti]||null}function Mi(e,t){if(e==null)throw new ii(-919,!1)}function Ni(e){return typeof e==`string`?e:e==null?``:String(e)}var Pi=si({ngErrorCode:si}),Fi=si({ngErrorMessage:si}),Ii=si({ngTokenPath:si});function Li(e,t){return zi(``,-200,t)}function Ri(e,t){throw new ii(-201,!1)}function zi(e,t,n){let r=new ii(t,e);return r[Pi]=t,r[Fi]=e,n&&(r[Ii]=n),r}function Bi(e){return e[Pi]}var Vi;function Hi(){return Vi}function Ui(e){let t=Vi;return Vi=e,t}function Wi(e,t,n){let r=hi(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;Ri(e,``)}var Gi=globalThis,Ki={},qi=`__NG_DI_FLAG__`,Ji=class{injector;constructor(e){this.injector=e}retrieve(e,t){let n=Zi(t)||0;try{return this.injector.get(e,n&8?null:Ki,n)}catch(e){if(nr(e))return e;throw e}}};function Yi(e,t=0){let n=$n();if(n===void 0)throw new ii(-203,!1);if(n===null)return Wi(e,void 0,t);{let r=Qi(t),i=n.retrieve(e,r);if(nr(i)){if(r.optional)return null;throw i}return i}}function Xi(e,t=0){return(Hi()||Yi)(fi(e),t)}function C(e,t){return Xi(e,Zi(t))}function Zi(e){return e===void 0||typeof e==`number`?e:0|(e.optional&&8)|(e.host&&1)|(e.self&&2)|(e.skipSelf&&4)}function Qi(e){return{optional:!!(e&8),host:!!(e&1),self:!!(e&2),skipSelf:!!(e&4)}}function $i(e){let t=[];for(let n=0;nArray.isArray(e)?ia(e,t):t(e))}function aa(e,t,n){t>=e.length?e.push(n):e.splice(t,0,n)}function oa(e,t){return t>=e.length-1?e.pop():e.splice(t,1)[0]}function sa(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 la(e,t,n){let r=da(e,t);return r>=0?e[r|1]=n:(r=~r,ca(e,r,t,n)),r}function ua(e,t){let n=da(e,t);if(n>=0)return e[n|1]}function da(e,t){return fa(e,t,1)}function fa(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 ia(t,e=>{let t=e;Sa(t,a,[],r)&&(i||=[],i.push(t))}),i!==void 0&&xa(i,a),n}function xa(e,t){for(let n=0;n{t(e,r)})}}function Sa(e,t,n,r){if(e=fi(e),!e)return!1;let i=null,a=vi(e),o=!a&&ki(e);if(!a&&!o){let t=e.ngModule;if(a=vi(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)Sa(i,t,n,r)}}else if(a){if(a.imports!=null&&!s){r.add(i);let e;try{ia(a.imports,i=>{Sa(i,t,n,r)&&(e||=[],e.push(i))})}finally{}e!==void 0&&xa(e,t)}if(!s){let e=ta(i)||(()=>new i);t({provide:i,useFactory:e,deps:ma},i),t({provide:_a,useValue:i,multi:!0},i),t({provide:ha,useValue:()=>Xi(i),multi:!0},i)}let o=a.providers;if(o!=null&&!s){let n=e;Ca(o,e=>{t(e,n)})}}else return!1;return i!==e&&e.providers!==void 0}function Ca(e,t){for(let n of e)Si(n)&&(n=n.ɵproviders),Array.isArray(n)?Ca(n,t):t(n)}var wa=si({provide:String,useValue:si});function Ta(e){return typeof e==`object`&&!!e&&wa in e}function Ea(e){return!!(e&&e.useExisting)}function Da(e){return!!(e&&e.useFactory)}function Oa(e){return typeof e==`function`}var ka=new xi(``),Aa={},ja={},Ma=void 0;function Na(){return Ma===void 0&&(Ma=new va),Ma}var Pa=class{},Fa=class extends Pa{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,Ga(e,e=>this.processProvider(e)),this.records.set(ga,Va(void 0,this)),r.has(`environment`)&&this.records.set(Pa,Va(void 0,this));let i=this.records.get(ka);i!=null&&typeof i.value==`string`&&this.scopes.add(i.value),this.injectorDefTypes=new Set(this.get(_a,ma,{self:!0}))}retrieve(e,t){let n=Zi(t)||0;try{return this.get(e,Ki,n)}catch(e){if(nr(e))return e;throw e}}destroy(){Ba(this),this._destroyed=!0;let e=pn(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(),pn(e)}}onDestroy(e){return Ba(this),this._onDestroyHooks.push(e),()=>this.removeOnDestroy(e)}runInContext(e){Ba(this);let t=er(this),n=Ui(void 0);try{return e()}finally{er(t),Ui(n)}}get(e,t=Ki,n){if(Ba(this),Object.hasOwn(e,Oi))return e[Oi](this);let r=Zi(n),i=er(this),a=Ui(void 0);try{if(!(r&4)){let t=this.records.get(e);if(t===void 0){let n=Wa(e)&&hi(e);t=n&&this.injectableDefInScope(n)?Va(Ia(e),Aa):null,this.records.set(e,t)}if(t!=null)return this.hydrate(e,t,r)}let n=r&2?Na():this.parent;return t=r&8&&t===Ki?null:t,n.get(e,t)}catch(e){let t=Bi(e);throw t===-200||t===-201?new ii(t,null):e}finally{Ui(a),er(i)}}resolveInjectorInitializers(){let e=pn(null),t=er(this),n=Ui(void 0);try{let e=this.get(ha,ma,{self:!0});for(let t of e)t()}finally{er(t),Ui(n),pn(e)}}toString(){return`R3Injector[...]`}processProvider(e){e=fi(e);let t=Oa(e)?e:fi(e&&e.provide),n=Ra(e);if(!Oa(e)&&e.multi===!0){let n=this.records.get(t);n||(n=Va(void 0,Aa,!0),n.factory=()=>$i(n.multi),this.records.set(t,n)),t=e,n.multi.push(e)}this.records.set(t,n)}hydrate(e,t,n){let r=pn(null);try{if(t.value===ja)throw Li(``);return t.value===Aa&&(t.value=ja,t.value=t.factory(void 0,n)),typeof t.value==`object`&&t.value&&Ua(t.value)&&this._ngOnDestroyHooks.add(t.value),t.value}finally{pn(r)}}injectableDefInScope(e){if(!e.providedIn)return!1;let t=fi(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 Ia(e){let t=hi(e),n=t===null?ta(e):t.factory;if(n!==null)return n;if(e instanceof xi)throw new ii(-204,!1);if(e instanceof Function)return La(e);throw new ii(-204,!1)}function La(e){if(e.length>0)throw new ii(-204,!1);let t=_i(e);return t===null?()=>new e:()=>t.factory(e)}function Ra(e){return Ta(e)?Va(void 0,e.useValue):Va(za(e),Aa)}function za(e,t,n){let r;if(Oa(e)){let t=fi(e);return ta(t)||Ia(t)}if(Ta(e))r=()=>fi(e.useValue);else if(Da(e))r=()=>e.useFactory(...$i(e.deps||[]));else if(Ea(e))r=(t,n)=>Xi(fi(e.useExisting),n!==void 0&&n&8?8:void 0);else{let t=fi(e&&(e.useClass||e.provide));if(Ha(e))r=()=>new t(...$i(e.deps));else return ta(t)||Ia(t)}return r}function Ba(e){if(e.destroyed)throw new ii(-205,!1)}function Va(e,t,n=!1){return{factory:e,value:t,multi:n?[]:void 0}}function Ha(e){return!!e.deps}function Ua(e){return typeof e==`object`&&!!e&&typeof e.ngOnDestroy==`function`}function Wa(e){return typeof e==`function`||typeof e==`object`&&e.ngMetadataName===`InjectionToken`}function Ga(e,t){for(let n of e)Array.isArray(n)?Ga(n,t):n&&Si(n)?Ga(n.ɵproviders,t):t(n)}function Ka(e,t){let n;e instanceof Fa?(Ba(e),n=e):n=new Ji(e);let r=er(n),i=Ui(void 0);try{return t()}finally{er(r),Ui(i)}}function qa(){return Hi()!==void 0||$n()!=null}var Ja=1;function Ya(e){return Array.isArray(e)&&typeof e[Ja]==`object`}function Xa(e){return Array.isArray(e)&&e[Ja]===!0}function Za(e){return!!(e.flags&4)}function Qa(e){return e.componentOffset>-1}function $a(e){return(e.flags&1)==1}function eo(e){return!!e.template}function to(e){return!!(e[2]&512)}function no(e){return(e[2]&256)==256}var ro=(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})(ro||{}),io=`math`;function ao(e){for(;Array.isArray(e);)e=e[0];return e}function oo(e,t){return ao(t[e])}function so(e,t){return ao(t[e.index])}function co(e,t){return e.data[t]}function lo(e,t){return e[t]}function uo(e,t,n,r){n>=e.data.length&&(e.data[n]=null,e.blueprint[n]=null),t[n]=r}function fo(e,t){let n=t[e];return Ya(n)?n:n[0]}function po(e){return(e[2]&128)==128}function mo(e){return Xa(e[3])}function ho(e,t){return t==null?null:e[t]}function go(e){e[17]=0}function _o(e){e[2]&1024||(e[2]|=1024,po(e)&&xo(e))}function vo(e,t){for(;e>0;)t=t[14],e--;return t}function yo(e){return!!(e[2]&9216||e[24]?.dirty)}function bo(e){e[10].changeDetectionScheduler?.notify(8),e[2]&64&&(e[2]|=1024),yo(e)&&xo(e)}function xo(e){e[10].changeDetectionScheduler?.notify(0);let t=wo(e);for(;t!==null&&!(t[2]&8192||(t[2]|=8192,!po(t)));)t=wo(t)}function So(e,t){if(no(e))throw new ii(911,!1);e[21]===null&&(e[21]=[]),e[21].push(t)}function Co(e,t){if(e[21]===null)return;let n=e[21].indexOf(t);n!==-1&&e[21].splice(n,1)}function wo(e){let t=e[3];return Xa(t)?t[3]:t}function To(e){return e[7]??=[]}function Eo(e){return e.cleanup??=[]}function Do(e,t,n,r){let i=To(t);i.push(n),e.firstCreatePass&&Eo(e).push(r,i.length-1)}var Oo={lFrame:ls(null),bindingsEnabled:!0,skipHydrationRootTNode:null},ko=!1;function Ao(){return Oo.lFrame.elementDepthCount}function jo(){Oo.lFrame.elementDepthCount++}function Mo(){Oo.lFrame.elementDepthCount--}function No(){return Oo.bindingsEnabled}function Po(){return Oo.skipHydrationRootTNode!==null}function Fo(e){return Oo.skipHydrationRootTNode===e}function Io(){Oo.skipHydrationRootTNode=null}function w(){return Oo.lFrame.lView}function Lo(){return Oo.lFrame.tView}function T(e){return Oo.lFrame.contextLView=e,e[8]}function E(e){return Oo.lFrame.contextLView=null,e}function Ro(){let e=zo();for(;e!==null&&e.type===64;)e=e.parent;return e}function zo(){return Oo.lFrame.currentTNode}function Bo(){let e=Oo.lFrame,t=e.currentTNode;return e.isParent?t:t.parent}function Vo(e,t){let n=Oo.lFrame;n.currentTNode=e,n.isParent=t}function Ho(){return Oo.lFrame.isParent}function Uo(){Oo.lFrame.isParent=!1}function Wo(){return Oo.lFrame.contextLView}function Go(){return ko}function Ko(e){let t=ko;return ko=e,t}function qo(){let e=Oo.lFrame,t=e.bindingRootIndex;return t===-1&&(t=e.bindingRootIndex=e.tView.bindingStartIndex),t}function Jo(){return Oo.lFrame.bindingIndex}function Yo(e){return Oo.lFrame.bindingIndex=e}function Xo(){return Oo.lFrame.bindingIndex++}function Zo(e){let t=Oo.lFrame,n=t.bindingIndex;return t.bindingIndex+=e,n}function Qo(){return Oo.lFrame.inI18n}function $o(e,t){let n=Oo.lFrame;n.bindingIndex=n.bindingRootIndex=e,ts(t)}function es(){return Oo.lFrame.currentDirectiveIndex}function ts(e){Oo.lFrame.currentDirectiveIndex=e}function ns(e){let t=Oo.lFrame.currentDirectiveIndex;return t===-1?null:e[t]}function rs(){return Oo.lFrame.currentQueryIndex}function is(e){Oo.lFrame.currentQueryIndex=e}function as(e){let t=e[1];return t.type===2?t.declTNode:t.type===1?e[5]:null}function os(e,t,n){if(n&4){let r=t,i=e;for(;r=r.parent,r===null&&!(n&1)&&(r=as(i),!(r===null||(i=i[14],r.type&10))););if(r===null)return!1;t=r,e=i}let r=Oo.lFrame=cs();return r.currentTNode=t,r.lView=e,!0}function ss(e){let t=cs(),n=e[1];Oo.lFrame=t,t.currentTNode=n.firstChild,t.lView=e,t.tView=n,t.contextLView=e,t.bindingIndex=n.bindingStartIndex,t.inI18n=!1}function cs(){let e=Oo.lFrame,t=e===null?null:e.child;return t===null?ls(e):t}function ls(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 us(){let e=Oo.lFrame;return Oo.lFrame=e.parent,e.currentTNode=null,e.lView=null,e}var ds=us;function fs(){let e=us();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 ps(e){return(Oo.lFrame.contextLView=vo(e,Oo.lFrame.contextLView))[8]}function ms(){return Oo.lFrame.selectedIndex}function hs(e){Oo.lFrame.selectedIndex=e}function gs(){let e=Oo.lFrame;return co(e.tView,e.selectedIndex)}function D(){Oo.lFrame.currentNamespace=`svg`}function _s(){vs()}function vs(){Oo.lFrame.currentNamespace=null}function ys(){return Oo.lFrame.currentNamespace}var bs=!0;function xs(){return bs}function Ss(e){bs=e}function Cs(e,t=null,n=null,r){let i=ws(e,t,n,r);return i.resolveInjectorInitializers(),i}function ws(e,t=null,n=null,r,i=new Set){return new Fa([n||ma,ya(e)],t||Na(),null,i)}var Ts=class e{static THROW_IF_NOT_FOUND=Ki;static NULL=new va;static create(e,t){if(Array.isArray(e))return Cs({name:``},t,e,``);{let t=e.name??``;return Cs({name:t},e.parent,e.providers,t)}}static ɵprov=mi({token:e,providedIn:`any`,factory:()=>Xi(ga)});static __NG_ELEMENT_ID__=-1},Es=new xi(``),Ds=class{static __NG_ELEMENT_ID__=ks;static __NG_ENV_ID__=e=>e},Os=class extends Ds{_lView;constructor(e){super(),this._lView=e}get destroyed(){return no(this._lView)}onDestroy(e){let t=this._lView;return So(t,e),()=>Co(t,e)}};function ks(){return new Os(w())}var As=new xi(``),js=(()=>{class e{taskId=0;pendingTasks=new Set;destroyed=!1;pendingTask=new ti(!1);debugTaskTracker=C(As,{optional:!0});get hasPendingTasks(){return!this.destroyed&&this.pendingTask.value}get hasPendingTasksObservable(){return this.destroyed?new Wr(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=mi({token:e,providedIn:`root`,factory:()=>new e})}return e})(),Ms=class extends $r{__isAsync;destroyRef=void 0;pendingTasks=void 0;constructor(e=!1){super(),this.__isAsync=e,qa()&&(this.destroyRef=C(Ds,{optional:!0})??void 0,this.pendingTasks=C(js,{optional:!0})??void 0)}emit(e){let t=pn(null);try{super.next(e)}finally{pn(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 _r&&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 Ns(...e){}function Ps(e){let t,n;function r(){e=Ns;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 Fs(e){return queueMicrotask(()=>e()),()=>{e=Ns}}var Is=`isAngularZone`,Ls=`isAngularZone_ID`,Rs=0,zs=class e{hasPendingMacrotasks=!1;hasPendingMicrotasks=!1;isStable=!0;onUnstable=new Ms(!1);onMicrotaskEmpty=new Ms(!1);onStable=new Ms(!1);onError=new Ms(!1);constructor(e){let{enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:n=!1,shouldCoalesceRunChangeDetection:r=!1,scheduleInRootZone:i=!1}=e;if(typeof Zone>`u`)throw new ii(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,Us(a)}static isInAngularZone(){return typeof Zone<`u`&&Zone.current.get(Is)===!0}static assertInAngularZone(){if(!e.isInAngularZone())throw new ii(909,!1)}static assertNotInAngularZone(){if(e.isInAngularZone())throw new ii(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,Bs,Ns,Ns);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)}},Bs={};function Vs(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 Hs(e){if(e.isCheckStableRunning||e.callbackScheduled)return;e.callbackScheduled=!0;function t(){Ps(()=>{e.callbackScheduled=!1,Ws(e),e.isCheckStableRunning=!0,Vs(e),e.isCheckStableRunning=!1})}e.scheduleInRootZone?Zone.root.run(()=>{t()}):e._outer.run(()=>{t()}),Ws(e)}function Us(e){let t=()=>{Hs(e)},n=Rs++;e._inner=e._inner.fork({name:`angular`,properties:{[Is]:!0,[Ls]:n,[Ls+n]:!0},onInvokeTask:(n,r,i,a,o,s)=>{if(Js(s))return n.invokeTask(i,a,o,s);try{return Gs(e),n.invokeTask(i,a,o,s)}finally{(e.shouldCoalesceEventChangeDetection&&a.type===`eventTask`||e.shouldCoalesceRunChangeDetection)&&t(),Ks(e)}},onInvoke:(n,r,i,a,o,s,c)=>{try{return Gs(e),n.invoke(i,a,o,s,c)}finally{e.shouldCoalesceRunChangeDetection&&!e.callbackScheduled&&!Ys(s)&&t(),Ks(e)}},onHasTask:(t,n,r,i)=>{t.hasTask(r,i),n===r&&(i.change==`microTask`?(e._hasPendingMicrotasks=i.microTask,Ws(e),Vs(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 Ws(e){e.hasPendingMicrotasks=!!(e._hasPendingMicrotasks||(e.shouldCoalesceEventChangeDetection||e.shouldCoalesceRunChangeDetection)&&e.callbackScheduled===!0)}function Gs(e){e._nesting++,e.isStable&&(e.isStable=!1,e.onUnstable.emit(null))}function Ks(e){e._nesting--,Vs(e)}var qs=class{hasPendingMicrotasks=!1;hasPendingMacrotasks=!1;isStable=!0;onUnstable=new Ms;onMicrotaskEmpty=new Ms;onStable=new Ms;onError=new Ms;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 Js(e){return Xs(e,`__ignore_ng_zone__`)}function Ys(e){return Xs(e,`__scheduler_tick__`)}function Xs(e,t){return!Array.isArray(e)||e.length!==1?!1:e[0]?.data?.[t]===!0}var Zs=class{_console=console;handleError(e){this._console.error(`ERROR`,e)}},Qs=new xi(``,{factory:()=>{let e=C(zs),t=C(Pa),n;return r=>{e.runOutsideAngular(()=>{t.destroyed&&!n?setTimeout(()=>{throw r}):(n??=t.get(Zs),n.handleError(r))})}}}),$s={provide:ha,useValue:()=>{C(Zs,{optional:!0})},multi:!0};function O(e,t){let[n,r,i]=Wn(e,t?.equal),a=n;return a[fn],a.set=r,a.update=i,a.asReadonly=ec.bind(a),a}function ec(){let e=this[fn];if(e.readonlyFn===void 0){let t=()=>this();t[fn]=e,e.readonlyFn=t}return e.readonlyFn}var tc=new xi(``,{factory:()=>nc}),nc=`ng`,rc=new xi(``),ic=new xi(``,{providedIn:`platform`,factory:()=>`unknown`}),ac=new xi(``,{factory:()=>C(Es).body?.querySelector(`[ngCspNonce]`)?.getAttribute(`ngCspNonce`)||null}),oc=(()=>{class e{view;node;constructor(e,t){this.view=e,this.node=t}static __NG_ELEMENT_ID__=sc}return e})();function sc(){return new oc(w(),Ro())}var cc=class{},lc=new xi(``,{factory:()=>!0}),uc=new xi(``),dc=(()=>{class e{static ɵprov=mi({token:e,providedIn:`root`,factory:()=>new fc})}return e})(),fc=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}},pc=class{[fn];constructor(e){this[fn]=e}destroy(){this[fn].destroy()}};function mc(e,t){let n=t?.injector??C(Ts),r=t?.manualCleanup===!0?null:n.get(Ds),i,a=n.get(oc,null,{optional:!0}),o=n.get(cc);return a===null?i=yc(e,n.get(dc),o):(i=vc(a.view,o,e),r instanceof Os&&r._lView===a.view&&(r=null)),i.injector=n,r!==null&&(i.onDestroyFns=[r.onDestroy(()=>i.destroy())]),new pc(i)}var hc={...Xn,cleanupFns:void 0,zone:null,onDestroyFns:null,run(){let e=Ko(!1);try{Zn(this)}finally{Ko(e)}},cleanup(){if(!this.cleanupFns?.length)return;let e=pn(null);try{for(;this.cleanupFns.length;)this.cleanupFns.pop()()}finally{this.cleanupFns=[],pn(e)}}},gc={...hc,consumerMarkedDirty(){this.scheduler.schedule(this),this.notifier.notify(12)},destroy(){if(On(this),this.onDestroyFns!==null)for(let e of this.onDestroyFns)e();this.cleanup(),this.scheduler.remove(this)}},_c={...hc,consumerMarkedDirty(){this.view[2]|=8192,xo(this.view),this.notifier.notify(13)},destroy(){if(On(this),this.onDestroyFns!==null)for(let e of this.onDestroyFns)e();this.cleanup(),this.view[23]?.delete(this)}};function vc(e,t,n){let r=Object.create(_c);return r.view=e,r.zone=typeof Zone<`u`?Zone.current:null,r.notifier=t,r.fn=bc(r,n),e[23]??=new Set,e[23].add(r),r.consumerMarkedDirty(r),r}function yc(e,t,n){let r=Object.create(gc);return r.fn=bc(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 bc(e,t){return()=>{t(t=>(e.cleanupFns??=[]).push(t))}}function xc(e){return typeof e==`function`&&e[fn]!==void 0}function Sc(e){return xc(e)&&typeof e.set==`function`}var Cc=Symbol(`InputSignalNode#UNSET`),wc={...Jn,transformFn:void 0,applyValueToInputSignal(e,t){Kn(e,t)}};function Tc(e){return{toString:e}.toString()}var Ec=(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})(Ec||{}),Dc=class{previousValue;currentValue;firstChange;constructor(e,t,n){this.previousValue=e,this.currentValue=t,this.firstChange=n}isFirstChange(){return this.firstChange}};function Oc(e,t,n,r){t===null?e[n]=r:t.applyValueToInputSignal(t,r)}var kc=null,Ac=(()=>{kc=Mc;let e=()=>Mc;return e.ngInherit=!0,e})();function jc(){return kc}function Mc(e){return e.type.prototype.ngOnChanges&&(e.setInput=Pc),Nc}function Nc(){let e=Ic(this),t=e?.current;if(t){let n=e.previous;if(n===pa)e.previous=t;else for(let e in t)n[e]=t[e];e.current=null,this.ngOnChanges(t)}}function Pc(e,t,n,r,i){let a=this.declaredInputs[r],o=Ic(e)||Lc(e,{previous:pa,current:null}),s=o.current||={},c=o.previous,l=c[a];s[a]=new Dc(l&&l.currentValue,n,c===pa),Oc(e,t,i,n)}var Fc=`__ngSimpleChanges__`;function Ic(e){return Object.hasOwn(e,Fc)&&e[Fc]||null}function Lc(e,t){return e[Fc]=t}var Rc=[],zc=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,Kc(o,a)):Kc(o,a)}var Jc=-1,Yc=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 Xc(e){return!!(e.flags&8)}function Zc(e){return!!(e.flags&16)}function Qc(e,t,n){let r=0;for(;rt){o=a-1;break}}}for(;a>16}function ol(e,t){let n=al(e),r=t;for(;n>0;)r=r[14],n--;return r}var sl=!0;function cl(e){let t=sl;return sl=e,t}var ll=255,ul=5,dl=0,fl={};function pl(e,t,n){let r;typeof n==`string`?r=n.charCodeAt(0)||0:Object.hasOwn(n,Di)&&(r=n[Di]),r??=n[Di]=dl++;let i=r&ll,a=1<>ul)]|=a}function ml(e,t){let n=gl(e,t);if(n!==-1)return n;let r=t[1];r.firstCreatePass&&(e.injectorIndex=t.length,hl(r.data,e),hl(t,null),hl(r.blueprint,null));let i=_l(e,t),a=e.injectorIndex;if(rl(i)){let e=il(i),n=ol(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 hl(e,t){e.push(0,0,0,0,0,0,0,0,t)}function gl(e,t){return e.injectorIndex===-1||e.parent&&e.parent.injectorIndex===e.injectorIndex||t[e.injectorIndex+8]===null?-1:e.injectorIndex}function _l(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=Ml(i),r===null)return Jc;if(n++,i=i[14],r.injectorIndex!==-1)return r.injectorIndex|n<<16}return Jc}function vl(e,t,n){pl(e,t,n)}function yl(e,t,n){if(n&8||e!==void 0)return e;Ri(t,`NodeInjector`)}function bl(e,t,n,r){if(n&8&&r===void 0&&(r=null),!(n&3)){let i=e[9],a=Ui(void 0);try{return i?i.get(t,r,n&8):Wi(t,r,n&8)}finally{Ui(a)}}return yl(r,t,n)}function xl(e,t,n,r=0,i){if(e!==null){if(t[2]&2048&&!(r&2)){let i=jl(e,t,n,r,fl);if(i!==fl)return i}let i=Sl(e,t,n,r,fl);if(i!==fl)return i}return bl(t,n,r,i)}function Sl(e,t,n,r,i){let a=El(n);if(typeof a==`function`){if(!os(t,e,r))return r&1?yl(i,n,r):bl(t,n,r,i);try{let e;if(e=a(r),e==null&&!(r&8))Ri(n);else return e}finally{ds()}}else if(typeof a==`number`){let i=null,o=gl(e,t),s=Jc,c=r&1?t[15][5]:null;for((o===-1||r&4)&&(s=o===-1?_l(e,t):t[o+8],s===Jc||!Ol(r,!1)?o=-1:(i=t[1],o=il(s),t=ol(s,t)));o!==-1;){let e=t[1];if(Dl(a,o,e.data)){let e=Cl(o,t,n,i,r,c);if(e!==fl)return e}s=t[o+8],s!==Jc&&Ol(r,t[1].data[o+8]===c)&&Dl(a,o,t)?(i=e,o=il(s),t=ol(s,t)):o=-1}}return i}function Cl(e,t,n,r,i,a){let o=t[1],s=o.data[e+8],c=wl(s,o,n,r==null?Qa(s)&&sl:r!=o&&!!(s.type&3),i&1&&a===s);return c===null?fl:Tl(t,o,c,s,i)}function wl(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&&eo(e)&&e.type===n)return c}return null}function Tl(e,t,n,r,i){let a=e[n],o=t.data;if(a instanceof Yc){let s=a;if(s.resolving)throw Li(``);let c=cl(s.canSeeViewProviders);s.resolving=!0,o[n].type||o[n];let l=s.injectImpl?Ui(s.injectImpl):null;os(e,r,0);try{a=e[n]=s.factory(void 0,i,o,e,r),t.firstCreatePass&&n>=r.directiveStart&&Bc(n,o[n],t)}finally{l!==null&&Ui(l),cl(c),s.resolving=!1,ds()}}return a}function El(e){if(typeof e==`string`)return e.charCodeAt(0)||0;let t=Object.hasOwn(e,Di)?e[Di]:void 0;return typeof t==`number`?t>=0?t&ll:Al:t}function Dl(e,t,n){let r=1<>ul)]&r)}function Ol(e,t){return!(e&2)&&!(e&1&&t)}var kl=class{_tNode;_lView;constructor(e,t){this._tNode=e,this._lView=t}get(e,t,n){return xl(this._tNode,this._lView,e,Zi(n),t)}};function Al(){return new kl(Ro(),w())}function jl(e,t,n,r,i){let a=e,o=t;for(;a!==null&&o!==null&&o[2]&2048&&!to(o);){let e=Sl(a,o,n,r|2,fl);if(e!==fl)return e;r&=-5;let t=a.parent;if(!t){let e=o[20];if(e){let t=e.get(n,fl,r);if(t!==fl)return t}t=Ml(o),o=o[14]}a=t}return i}function Ml(e){let t=e[1],n=t.type;return n===2?t.declTNode:n===1?e[5]:null}function Nl(e){return{token:e.token,providedIn:e.autoProvided===!1?null:`root`,factory:e.factory,value:void 0}}function Pl(){return Fl(Ro(),w())}function Fl(e,t){return new Il(so(e,t))}var Il=(()=>{class e{nativeElement;constructor(e){this.nativeElement=e}static __NG_ELEMENT_ID__=Pl}return e})();function Ll(e){return e instanceof Il?e.nativeElement:e}function Rl(){return this._results[Symbol.iterator]()}var zl=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 $r}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=ra(e);(this._changesDetected=!na(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]=Rl};function Bl(e){return(e.flags&128)==128}var Vl=(function(e){return e[e.OnPush=0]=`OnPush`,e[e.Eager=1]=`Eager`,e[e.Default=1]=`Default`,e})(Vl||{}),Hl=new Map,Ul=0;function Wl(){return Ul++}function Gl(e){Hl.set(e[19],e)}function Kl(e){Hl.delete(e[19])}var ql=`__ngContext__`;function Jl(e,t){Ya(t)?(e[ql]=t[19],Gl(t)):e[ql]=t}function Yl(e){return Zl(e[12])}function Xl(e){return Zl(e[4])}function Zl(e){for(;e!==null&&!Xa(e);)e=e[4];return e}var Ql=void 0;function $l(e){Ql=e}function eu(){if(Ql!==void 0)return Ql;if(typeof document<`u`)return document;throw new ii(210,!1)}var tu=!1,nu=new xi(``,{factory:()=>tu}),ru=new WeakMap;function iu(e,t){if(typeof e!=`object`||!e)return;let n=ru.get(e);n||(n=new WeakSet,ru.set(e,n)),n.add(t)}function au(e){return(e.flags&32)==32}var ou=()=>null;function su(e,t,n=!1){return ou(e,t,n)}function cu(e,t){let n=e.contentQueries;if(n!==null){let r=pn(null);try{for(let r=0;r|^->||--!>|)/g,bu=`​$1​`;function xu(e){return e.replace(vu,e=>e.replace(yu,bu))}function Su(e,t){return e.createText(t)}function Cu(e,t,n){e.setValue(t,n)}function wu(e,t){return e.createComment(xu(t))}function Tu(e,t,n){return e.createElement(t,n)}function Eu(e,t,n,r,i){e.insertBefore(t,n,r,i)}function Du(e,t,n){e.appendChild(t,n)}function Ou(e,t,n,r,i){r===null?Du(e,t,n):Eu(e,t,n,r,i)}function ku(e,t,n,r){e.removeChild(null,t,n,r)}function Au(e,t,n){e.setAttribute(t,`style`,n)}function ju(e,t,n){n===``?e.removeAttribute(t,`class`):e.setAttribute(t,`class`,n)}function Mu(e,t,n){let{mergedAttrs:r,classes:i,styles:a}=n;r!==null&&Qc(e,t,r),i!==null&&ju(e,t,i),a!==null&&Au(e,t,a)}function Nu(e){let t=Pu();return t?t.sanitize(ro.URL,e)||``:mu(e,`URL`)?pu(e):_u(Ni(e))}function Pu(){let e=w();return e&&e[10].sanitizer}function Fu(e){return e.ownerDocument.defaultView}function Iu(e){return e.ownerDocument}function Lu(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 Ru=`ng-template`;function zu(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(Uu(r))return!1;o=!0}}}}}return Uu(r)||o}function Uu(e){return!(e&1)}function Wu(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!==``&&!Uu(o)&&(t+=Xu(a,i),i=``),r=o,a||=!Uu(r);n++}return i!==``&&(t+=Xu(a,i)),t}function Qu(e){return e.map(Zu).join(`,`)}function $u(e){let t=[],n=[],r=1,i=2;for(;r!1});function ad(e){if(!e)return 0;let t=e.toLowerCase().indexOf(`ms`)>-1?1:1e3;return parseFloat(e)*t}function od(e,t){return e.getPropertyValue(t).split(`,`).map(e=>e.trim())}function sd(e){let t=od(e,`transition-property`),n=od(e,`transition-duration`),r=od(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 cd(e){let t=od(e,`animation-name`),n=od(e,`animation-delay`),r=od(e,`animation-duration`),i=od(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 ld(e,t){return e!==void 0&&e.duration>t.duration}function ud(e){return(e.animationName!=null||e.propertyName!=null)&&e.duration>0}function dd(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 fd(e,t){let n=getComputedStyle(e),r=cd(n),i=sd(n),a=r.duration>i.duration?r:i;ld(t.get(e),a)||ud(a)&&t.set(e,a)}function pd(e,t,n){if(!n)return;let r=e.getAnimations();return r.length===0?fd(e,t):md(e,t,r)}function md(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=dd(e)??0,n,i;e.animationName?i=e.animationName:n=e.transitionProperty,t>=r.duration&&(r={animationName:i,propertyName:n,duration:t})}ld(t.get(e),r)||ud(r)&&t.set(e,r)}var hd=new Set,gd=!1,_d=1,vd=typeof document<`u`&&typeof document?.documentElement?.getAnimations==`function`;function yd(e){return e[9].get(id,gd)}function bd(e,t,n){let r=Sd.get(e);if(r){for(let e of t)r.classList.push(e);for(let e of n)r.cleanupFns.push(e)}else Sd.set(e,{classList:t,cleanupFns:n})}function xd(e){let t=Sd.get(e);if(t){for(let e of t.cleanupFns)e();Sd.delete(e)}Cd.delete(e)}var Sd=new WeakMap,Cd=new WeakMap,wd=new WeakMap;function Td(e){return e?e[14]??e:null}var Ed=new WeakSet;function Dd(e,t,n){let r=wd.get(e);if(!r||r.length===0)return;let i=t.parentNode,a=t.previousSibling,o=Td(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),Ed.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 Od(e,t,n){let r=Td(n),i=wd.get(e);i?i.some(e=>e.el===t)||i.push({el:t,declarationView:r}):wd.set(e,[{el:t,declarationView:r}])}function kd(e){let t=e[26]??={};return t.enter??=new Map}function Ad(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 jd(e){return e.composedPath?e.composedPath()[0]:e.target}function Md(e,t){let n=Cd.get(t);if(n===void 0)return!0;if(t!==jd(e))return!1;let r=e.animation;if(r){let e=dd(r);if(e!==void 0&&e+_d{class e{impl=null;execute(){this.impl?.execute()}static ɵprov=mi({token:e,providedIn:`root`,factory:()=>new e})}return e})(),zd=[0,1,2,3],Bd=(()=>{class e{ngZone=C(zs);scheduler=C(cc);errorHandler=C(Zs,{optional:!0});sequences=new Set;deferredRegistrations=new Set;executing=!1;constructor(){C(Fd,{optional:!0})}execute(){let e=this.sequences.size>0;e&&zc(Ec.AfterRenderHooksStart),this.executing=!0;for(let e of zd)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&&zc(Ec.AfterRenderHooksEnd)}register(e){let{view:t}=e;t===void 0?this.executing?this.deferredRegistrations.add(e):this.addSequence(e):((t[25]??=[]).push(e),xo(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(Pd.AFTER_NEXT_RENDER,e):e()}static ɵprov=mi({token:e,providedIn:`root`,factory:()=>new e})}return e})(),Vd=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 Hd(e,t){let n=t?.injector??C(Ts);return Ld(`NgAfterNextRender`),Wd(e,n,t,!0)}function Ud(e){return e instanceof Function?[void 0,void 0,e,void 0]:[e.earlyRead,e.write,e.mixedReadWrite,e.read]}function Wd(e,t,n,r){let i=t.get(Rd);i.impl??=t.get(Bd);let a=t.get(Fd,null,{optional:!0}),o=n?.manualCleanup===!0?null:t.get(Ds),s=t.get(oc,null,{optional:!0}),c=new Vd(i.impl,Ud(e),s?.view,r,o,a?.snapshot(null));return i.impl.register(c),c}var Gd=new xi(``,{factory:()=>{let e=C(Pa),t=new Set;return e.onDestroy(()=>t.clear()),{queue:t,isScheduled:!1,scheduler:null,injector:e}}});function Kd(e,t,n){let r=e.get(Gd);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 qd(e,t){let n=e.get(Gd);if(Array.isArray(t))for(let e of t)n.queue.delete(e);else n.queue.delete(t)}function Jd(e,t){let n=e.get(Gd);if(t.detachedLeaveAnimationFns){for(let e of t.detachedLeaveAnimationFns)n.queue.delete(e);t.detachedLeaveAnimationFns=void 0}}function Yd(e){let t=e.get(Gd);t.isScheduled||=(Hd(()=>{t.isScheduled=!1;for(let e of t.queue)e();t.queue.clear()},{injector:t.injector}),!0)}function Xd(e){let t=e.get(Gd);t.scheduler=Yd,t.scheduler(e)}function Zd(e,t){for(let[n,r]of t)Kd(e,r.animateFns)}function Qd(e,t,n,r){let i=e?.[26]?.enter;t!==null&&i&&i.has(n.index)&&Zd(r,i)}function $d(e,t,n,r){try{n.get(ga)}catch{return r(!1)}let i=e?.[26];i?.enter?.has(t.index)&&qd(n,i.enter.get(t.index).animateFns);let a=ef(e,t,i);if(a.size===0){let n=!1;if(e){let r=[];nf(e,t,r),n=r.length>0}if(!n)return r(!1)}e&&hd.add(e[19]),Kd(n,()=>tf(e,t,i||void 0,a,r),i||void 0)}function ef(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 tf(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&&nf(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),af(e,t.running,i)}else Promise.allSettled(a).then(()=>{e&&hd.delete(e[19]),i(!0)})}else e&&hd.delete(e[19]),i(!1)}function nf(e,t,n){if(t.type&12){let r=e[t.index];if(Xa(r))for(let e=10;e{e[26]?.running===t&&(e[26].running=void 0,hd.delete(e[19])),n(!0)})}function of(e,t,n,r,i,a,o,s){if(i!=null){let c,l=!1;Xa(i)?c=i:Ya(i)&&(l=!0,i=i[0]);let u=ao(i);e===0&&r!==null?(Qd(s,r,a,n),o==null?Du(t,r,u):Eu(t,r,u,o||null,!0)):e===1&&r!==null?(Qd(s,r,a,n),Eu(t,r,u,o||null,!0),Dd(a,u,s)):e===2?(s?.[26]?.leave?.has(a.index)&&Od(a,u,s),Ed.delete(u),$d(s,a,n,e=>{if(Ed.has(u)){Ed.delete(u);return}ku(t,u,l,e)})):e===3&&(Ed.delete(u),$d(s,a,n,()=>{t.destroyNode(u)})),c!=null&&Af(t,e,n,c,a,r,o)}}function sf(e,t){lf(e,t),t[0]=null,t[5]=null}function cf(e,t,n,r,i,a){r[0]=i,r[5]=t,Ef(e,r,n,1,i,a)}function lf(e,t){t[10].changeDetectionScheduler?.notify(9),Ef(e,t,t[11],2,null,null)}function uf(e){let t=e[12];if(!t)return pf(e[1],e);for(;t;){let n=null;if(Ya(t))n=t[12];else{let e=t[10];e&&(n=e)}if(!n){for(;t&&!t[4]&&t!==e;)Ya(t)&&pf(t[1],t),t=t[3];t===null&&(t=e),Ya(t)&&pf(t[1],t),n=t&&t[4]}t=n}}function df(e,t){let n=e[9],r=n.indexOf(t);n.splice(r,1)}function ff(e,t){if(no(t))return;let n=t[11];n.destroyNode&&Ef(e,t,n,3,null,null),uf(t)}function pf(e,t){if(no(t))return;let n=pn(null);try{t[2]&=-129,t[2]|=256,t[24]&&On(t[24]),hf(e,t),mf(e,t),t[1].type===1&&t[11].destroy();let n=t[16];if(n!==null&&Xa(t[3])){n!==t[3]&&df(n,t);let r=t[18];r!==null&&r.detachView(e)}Kl(t)}finally{pn(n)}}function mf(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&&Bf(e,t,27,!1),zc(o?Ec.TemplateUpdateStart:Ec.TemplateCreateStart,i,n),n(r,i)}finally{hs(a),zc(o?Ec.TemplateUpdateEnd:Ec.TemplateCreateEnd,i,n)}}function Wf(e,t,n){Zf(e,t,n),(n.flags&64)==64&&Qf(e,t,n)}function Gf(e,t,n=so){let r=t.localNames;if(r!==null){let i=t.index+1;for(let a=0;a{xo(e.lView)},consumerOnSignalRead(){this.lView[24]=this}};function Sp(e){let t=e[24]??Object.create(Cp);return t.lView=e,t}var Cp={...hn,consumerIsAlwaysLive:!0,kind:`template`,consumerMarkedDirty:e=>{let t=wo(e.lView);for(;t&&!wp(t[1]);)t=wo(t);t&&_o(t)},consumerOnSignalRead(){this.lView[24]=this}};function wp(e){return e.type!==2}function Tp(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 Ep=100;function Dp(e,t=0){let n=e[10].rendererFactory;n.begin?.();try{Op(e,t)}finally{n.end?.()}}function Op(e,t){let n=Go();try{Ko(!0),Pp(e,t);let n=0;for(;yo(e);){if(n===Ep)throw new ii(103,!1);n++,Pp(e,1)}}finally{Ko(n)}}function kp(e,t,n,r){if(no(t))return;let i=t[2];ss(t);let a=!0,o=null,s=null;wp(e)?(s=vp(t),o=Cn(s)):mn()===null?(a=!1,s=Sp(t),o=Cn(s)):t[24]&&=(On(t[24]),null);try{go(t),Yo(e.bindingStartIndex),n!==null&&Uf(e,t,n,2,r);let a=(i&3)==3;if(a){let n=e.preOrderCheckHooks;n!==null&&Hc(t,n,null)}else{let n=e.preOrderHooks;n!==null&&Uc(t,n,0,null),Wc(t,0)}if(jp(t),Tp(t),Ap(t,0),e.contentQueries!==null&&cu(e,t),a){let n=e.contentCheckHooks;n!==null&&Hc(t,n)}else{let n=e.contentHooks;n!==null&&Uc(t,n,1),Wc(t,1)}Ip(e,t);let o=e.components;o!==null&&Fp(t,o,0);let s=e.viewQuery;if(s!==null&&lu(2,s,r),a){let n=e.viewCheckHooks;n!==null&&Hc(t,n)}else{let n=e.viewHooks;n!==null&&Uc(t,n,2),Wc(t,2)}if(e.firstUpdatePass===!0&&(e.firstUpdatePass=!1),t[22]){for(let e of t[22])e();t[22]=null}gp(t),t[2]&=-73}catch(e){throw xo(t),e}finally{s!==null&&(Tn(s,o),a&&bp(s)),fs()}}function Ap(e,t){for(let n=Yl(e);n!==null;n=Xl(n))for(let e=10;e0&&(e[n-1][4]=r[4]);let a=oa(e,10+t);sf(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 Up(e,t,n,r){let i=10+r,a=n.length;r>0&&(n[i-1][4]=t),r-1&&(Hp(e,n),oa(t,n))}this._attachedToViewContainer=!1}ff(this._lView[1],this._lView)}onDestroy(e){So(this._lView,e)}markForCheck(){Lp(this._cdRefInjectingView||this._lView,4)}detach(){this._lView[2]&=-129}reattach(){bo(this._lView),this._lView[2]|=128}detectChanges(){this._lView[2]|=1024,Dp(this._lView)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new ii(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;let e=to(this._lView),t=this._lView[16];t!==null&&!e&&df(t,this._lView),lf(this._lView[1],this._lView)}attachToAppRef(e){if(this._attachedToViewContainer)throw new ii(902,!1);this._appRef=e;let t=to(this._lView),n=this._lView[16];n!==null&&!t&&Wp(n,this._lView),bo(this._lView)}},Kp=(()=>{class e{_declarationLView;_declarationTContainer;elementRef;static __NG_ELEMENT_ID__=qp;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 Gp(fp(this._declarationLView,this._declarationTContainer,e,{embeddedViewInjector:t,dehydratedView:n}))}}return e})();function qp(){return Jp(Ro(),w())}function Jp(e,t){return e.type&4?new Kp(t,e,Fl(e,t)):null}function Yp(e,t,n,r,i){let a=e.data[t];if(a===null)a=Xp(e,t,n,r,i),Qo()&&(a.flags|=32);else if(a.type&64){a.type=n,a.value=r,a.attrs=i;let e=Bo();a.injectorIndex=e===null?-1:e.injectorIndex}return Vo(a,!0),a}function Xp(e,t,n,r,i){let a=zo(),o=Ho(),s=o?a:a&&a.parent,c=e.data[t]=Qp(e,s,n,t,r,i);return Zp(e,c,a,o),c}function Zp(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 Qp(e,t,n,r,i,a){let o=t?t.injectorIndex:-1,s=0;return Po()&&(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:ys(),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 $p(e){let t=e[6]??[],n=e[3][11],r=[];for(let e of t)e.data.di===void 0?em(e,n):r.push(e);e[6]=r}function em(e,t){let n=0,r=e.firstChild;if(r){let i=e.data.r;for(;nnull,nm=()=>null;function rm(e,t){return tm(e,t)}function im(e,t,n){return nm(e,t,n)}var am=class{},om=class{},sm=(()=>{class e{static ɵprov=mi({token:e,providedIn:`root`,factory:()=>null})}return e})();function cm(e){return e.debugInfo?.className||e.type.name||null}var lm={},um=class{injector;parentInjector;constructor(e,t){this.injector=e,this.parentInjector=t}get(e,t,n){let r=this.injector.get(e,lm,n);return r!==lm||t===lm?r:this.parentInjector.get(e,t,n)}};function dm(e,t,n){return e[t]=n}function fm(e,t){return e[t]}function pm(e,t,n){if(n===ed)return!1;let r=e[t];return!Object.is(r,n)&&(e[t]=n,!0)}function mm(e,t,n,r){let i=pm(e,t,n);return pm(e,t+1,r)||i}function hm(e,t,n,r,i){let a=mm(e,t,n,r);return pm(e,t+2,i)||a}function gm(e,t,n,r,i,a){let o=mm(e,t,n,r);return mm(e,t+2,i,a)||o}function _m(e,t,n){return function r(i){let a=r.__ngNativeEl__;a!==void 0&&iu(i,a),Lp(Qa(e)?fo(e.index,t):t,5);let o=t[8],s=vm(t,o,n,i),c=r.__ngNextListenerFn__;for(;c;)s=vm(t,o,c,i)&&s,c=c.__ngNextListenerFn__;return s}}function vm(e,t,n,r){let i=pn(null);try{return zc(Ec.OutputStart,t,n),n(r)!==!1}catch(t){return op(e,t),!1}finally{zc(Ec.OutputEnd,t,n),pn(i)}}function ym(e,t,n,r,i,a,o,s){let c=$a(e),l=!1,u=null;if(!r&&c&&(u=xm(t,n,a,e.index)),u!==null){let e=u.__ngLastListenerFn__||u;e.__ngNextListenerFn__=o,u.__ngLastListenerFn__=o,l=!0}else{let o=so(e,n),c=r?r(o):o;r||(s.__ngNativeEl__=o);let l=i.listen(c,a,s);bm(a)||Sm(r?t=>r(ao(t[e.index])):e.index,t,n,a,s,l,!1)}return l}function bm(e){return e.startsWith(`animation`)||e.startsWith(`transition`)}function xm(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 Sm(e,t,n,r,i,a,o){let s=t.firstCreatePass?Eo(t):null,c=To(n),l=c.length;c.push(i,a),s&&s.push(r,e,l,(l+1)*(o?-1:1))}function Cm(e,t,n,r,i,a){let o=t[n],s=t[1],c=o[s.data[n].outputs[r]].subscribe(a);Sm(e.index,s,t,i,a,c,!0)}var wm=Symbol(`BINDING`),Tm=new xi(``);function Em(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 Bm(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&Vf.SignalBased)!==0};return i&&(a.transform=i),a})}function Jm(e){return Object.keys(e).map(t=>({propName:e[t],templateName:t}))}function Ym(e,t,n){let r=t instanceof Pa?t:t?.injector;return r&&e.getStandaloneInjector!==null&&(r=e.getStandaloneInjector(r)||r),r?new um(n,r):n}function Xm(e){let t=e.get(om,null);if(t===null)throw new ii(407,!1);return{rendererFactory:t,sanitizer:e.get(sm,null),changeDetectionScheduler:e.get(cc,null),ngReflect:!1,tracingService:e.get(Fd,null,{optional:!0})}}function Zm(e,t,n){let r=$m(e);return Tu(t,r,r===`svg`?`svg`:r===`math`?io:n)}function Qm(e){if((e&&`localName`in e&&typeof e.localName==`string`?e.localName:e?.tagName)?.toLowerCase()===`script`)throw new ii(905,!1)}function $m(e){return(e.selectors[0][0]||`div`).toLowerCase()}var eh=class{componentDef;ngModule;selector;componentType;ngContentSelectors;isBoundToModule;cachedInputs=null;cachedOutputs=null;get inputs(){return this.cachedInputs??=qm(this.componentDef.inputs),this.cachedInputs}get outputs(){return this.cachedOutputs??=Jm(this.componentDef.outputs),this.cachedOutputs}constructor(e,t){this.componentDef=e,this.ngModule=t,this.componentType=e.type,this.selector=Qu(e.selectors),this.ngContentSelectors=e.ngContentSelectors??[],this.isBoundToModule=!!t}create(e,t,n,r,i,a,o){zc(Ec.DynamicComponentStart);let s=pn(null);try{let s=this.componentDef,c=Ym(s,r||this.ngModule,e),l=Xm(c),u=l.tracingService;return u&&u.componentCreate?u.componentCreate(cm(s),()=>this.createComponentRef(l,c,t,n,i,a,o)):this.createComponentRef(l,c,t,n,i,a,o)}finally{pn(s)}}createComponentRef(e,t,n,r,i,a,o){let s=this.componentDef,c=th(r,s,a,i),l=e.rendererFactory.createRenderer(null,s),u=r?Kf(l,r,s.encapsulation,t):Zm(s,l,o??null);Qm(u);let d=t.get(Tm,null),f=nh(u,()=>t.get(Es,null)??eu());d&&d.addHost(f);let p=a?.some(ih)||i?.some(e=>typeof e!=`function`&&e.bindings.some(ih)),m=Ff(null,c,null,512|Lf(s),null,null,e,l,t,null,su(u,t,!0));d&&Gm&&f instanceof ShadowRoot&&So(m,()=>{d.removeHost(f)}),m[27]=u,ss(m);let h=null;try{let e=Hm(27,m,2,`#host`,()=>c.directiveRegistry,!0,0);Mu(l,u,e),Jl(u,m),Wf(c,m,e),uu(c,e,m),Um(c,e),n!==void 0&&oh(e,this.ngContentSelectors,n),h=fo(e.index,m),m[8]=h[8],up(c,m,null)}catch(e){throw h!==null&&Kl(h),Kl(m),e}finally{zc(Ec.DynamicComponentEnd),fs()}return new ah(this.componentType,m,!!p)}};function th(e,t,n,r){let i=e?[`ng-version`,`22.1.7`]:$u(t.selectors[0]),a=null,o=null,s=0;if(n)for(let e of n)s+=e[wm].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 ih(e){let t=e[wm].kind;return t===`input`||t===`twoWay`}var ah=class extends am{_rootLView;_hasInputBindings;instance;hostView;changeDetectorRef;componentType;location;previousInputValues=null;_tNode;constructor(e,t,n){super(),this._rootLView=t,this._hasInputBindings=n,this._tNode=co(t[1],27),this.location=Fl(this._tNode,t),this.instance=fo(this._tNode.index,t)[8],this.hostView=this.changeDetectorRef=new Gp(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;sp(n,r[1],r,e,t),this.previousInputValues.set(e,t),Lp(fo(n.index,r),1)}get injector(){return new kl(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(e){this.hostView.onDestroy(e)}};function oh(e,t,n){let r=e.projection=[];for(let e=0;e{class e{static __NG_ELEMENT_ID__=ch}return e})();function ch(){return fh(Ro(),w())}var lh=class e extends sh{_lContainer;_hostTNode;_hostLView;constructor(e,t,n){super(),this._lContainer=e,this._hostTNode=t,this._hostLView=n}get element(){return Fl(this._hostTNode,this._hostLView)}get injector(){return new kl(this._hostTNode,this._hostLView)}get parentInjector(){let e=_l(this._hostTNode,this._hostLView);if(rl(e)){let t=ol(e,this._hostLView),n=il(e),r=t[1].data[n+8];return new kl(r,t)}return new kl(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(e){let t=uh(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=rm(this._lContainer,e.ssrId),o=e.createEmbeddedViewImpl(t||{},i,a);return this.insertImpl(o,r,pp(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 eh(ki(e)),u=n||this.parentInjector;if(!i&&l.ngModule==null){let e=this.parentInjector.get(Pa,null);e&&(i=e)}let d=ki(l.componentType??{}),f=rm(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,pp(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(mo(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 Bp(o,i,a,r),t.attachToViewContainerRef(),aa(dh(o),a,t),t}move(e,t){return this.insert(e,t)}indexOf(e){let t=uh(this._lContainer);return t===null?-1:t.indexOf(e)}remove(e){let t=this._adjustIndex(e,-1),n=Hp(this._lContainer,t);n&&(oa(dh(this._lContainer),t),ff(n[1],n))}detach(e){let t=this._adjustIndex(e,-1),n=Hp(this._lContainer,t);return n&&oa(dh(this._lContainer),t)!=null?new Gp(n):null}_adjustIndex(e,t=0){return e??this.length+t}};function uh(e){return e[8]}function dh(e){return e[8]||=[]}function fh(e,t){let n,r=t[e.index];return Xa(r)?n=r:(n=Rp(r,t,null,e),t[e.index]=n,zf(t,n)),mh(n,t,e,r),new lh(n,e,t)}function ph(e,t){let n=e[11],r=n.createComment(``),i=so(t,e);return Eu(n,n.parentNode(i),r,n.nextSibling(i),!1),r}var mh=_h,hh=()=>!1;function gh(e,t,n){return hh(e,t,n)}function _h(e,t,n,r){if(e[7])return;let i;i=n.type&8?ao(r):ph(t,n),e[7]=i}var vh=class e{queryList;matches=null;constructor(e){this.queryList=e}clone(){return new e(this.queryList)}setDirty(){this.queryList.setDirty()}},yh=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 Nh(e,t,n){e.queries===null&&(e.queries=new xh),e.queries.track(new Sh(t,n))}function Ph(e,t){return e.queries.getByIndex(t)}function Fh(e,t){let n=e[1],r=Ph(n,t);return r.crossesNgTemplate?Oh(n,e,t,[]):Dh(n,e,r,t)}function Ih(e,t,n){let r,i=Pn(()=>{r._dirtyCounter();let n=Bh(r,e);if(t&&n===void 0)throw new ii(-951,!1);return n});return r=i[fn],r._dirtyCounter=O(0),r._flatValue=void 0,i}function Lh(e){return Ih(!0,!1,e)}function Rh(e){return Ih(!0,!0,e)}function zh(e,t){let n=e[fn];n._lView=w(),n._queryIndex=t,n._queryList=kh(n._lView,t),n._queryList.onDirty(()=>n._dirtyCounter.update(e=>e+1))}function Bh(e,t){let n=e._lView,r=e._queryIndex;if(n===void 0||r===void 0||n[2]&4)return t?void 0:ma;let i=kh(n,r),a=Fh(n,r);return i.reset(a,Ll),t?i.first:i._changesDetected||e._flatValue===void 0?e._flatValue=i.toArray():e._flatValue}function Vh(e){return!!e&&typeof e.then==`function`}function Hh(e){return!!e&&typeof e.subscribe==`function`}var Uh=class{},Wh=class extends Uh{injector;instance=null;constructor(e){super();let t=new Fa([...e.providers,{provide:Uh,useValue:this}],e.parent||Na(),e.debugName,new Set([`environment`]));this.injector=t,e.runEnvironmentInitializers&&t.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(e){this.injector.onDestroy(e)}};function Gh(e,t,n=null){return new Wh({providers:e,parent:t,debugName:n,runEnvironmentInitializers:!0}).injector}var Kh=(()=>{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=ba(!1,e.type),n=t.length>0?Gh([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=mi({token:e,providedIn:`environment`,factory:()=>new e(Xi(Pa))})}return e})();function A(e){return Tc(()=>{let t=Qh(e),n={...t,decls:e.decls,vars:e.vars,template:e.template,consts:e.consts||null,ngContentSelectors:e.ngContentSelectors,onPush:e.changeDetection!==Vl.Eager,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&e.dependencies||null,getStandaloneInjector:t.standalone?e=>e.get(Kh).getOrCreateStandaloneInjector(n):null,getExternalStyles:null,signals:e.signals??!1,data:e.data||{},encapsulation:e.encapsulation||du.Emulated,styles:e.styles||ma,_:null,schemas:e.schemas||null,tView:null,id:``};t.standalone&&Ld(`NgStandalone`),$h(n);let r=e.dependencies;return n.directiveDefs=eg(r,qh),n.pipeDefs=eg(r,ji),n.id=tg(n),n})}function qh(e){return ki(e)||Ai(e)}function Jh(e,t){if(e==null)return pa;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=Vf.None,c=null),n[a]=[r,s,c],t[a]=o}return n}function Yh(e){if(e==null)return pa;let t={};for(let n in e)Object.hasOwn(e,n)&&(t[e[n]]=n);return t}function Xh(e){return Tc(()=>{let t=Qh(e);return $h(t),t})}function Zh(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 Qh(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||pa,exportAs:e.exportAs||null,standalone:e.standalone??!0,signals:e.signals===!0,selectors:e.selectors||ma,viewQuery:e.viewQuery||null,features:e.features||null,setInput:null,resolveHostDirectives:null,hostDirectives:null,controlDef:null,signalFormsInputPresence:null,inputs:Jh(e.inputs,t),outputs:Yh(e.outputs),debugInfo:null}}function $h(e){e.features?.forEach(t=>t(e))}function eg(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 tg(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 ng=new xi(``),rg=(()=>{class e{resolve;reject;initialized=!1;done=!1;donePromise=new Promise((e,t)=>{this.resolve=e,this.reject=t});appInits=C(ng,{optional:!0})??[];injector=C(Ts);constructor(){}runInitializers(){if(this.initialized)return;let e=[];for(let t of this.appInits){let n=Ka(this.injector,t);if(Vh(n))e.push(n);else if(Hh(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=Nl({token:e,factory:e.ɵfac})}return e})();function ig(e,t,n,r,i,a,o,s){if(n.firstCreatePass){e.mergedAttrs=tl(e.mergedAttrs,e.attrs);let t=e.tView=Mf(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),Vo(e,!1);let c=cg(n,t,e,r);xs()&&xf(n,t,c,e),Jl(c,t);let l=Rp(c,t,c,e);t[r+27]=l,zf(t,l),gh(l,e,t)}function ag(e,t,n,r,i,a,o,s,c,l,u){let d=n+27,f;return t.firstCreatePass?(f=Yp(t,d,4,o||null,s||null),No()&&Om(t,e,f,ho(t.consts,l),ep),Vc(t,f)):f=t.data[d],ig(f,e,t,n,r,i,a,c),$a(f)&&Wf(t,e,f),l!=null&&Gf(e,f,u),f}function og(e,t,n,r,i,a,o,s,c,l,u){let d=n+27,f;if(t.firstCreatePass){if(f=Yp(t,d,4,o||null,s||null),l!=null){let e=ho(t.consts,l);f.localNames=[];for(let t=0;t{throw new ii(600,``)})}var pg=10,mg=(()=>{class e{_runningTick=!1;_destroyed=!1;_destroyListeners=[];_views=[];internalErrorHandler=C(Qs);afterRenderManager=C(Rd);zonelessEnabled=C(lc);rootEffectScheduler=C(dc);dirtyFlags=0;tracingSnapshot=null;allTestViews=new Set;autoDetectTestViews=new Set;includeAllTestViews=!1;afterTick=new $r;get allViews(){return[...(this.includeAllTestViews?this.allTestViews:this.autoDetectTestViews).keys(),...this._views]}get destroyed(){return this._destroyed}componentTypes=[];components=[];internalPendingTask=C(js);get isStable(){return this.internalPendingTask.hasPendingTasksObservable.pipe(ni(e=>!e))}constructor(){C(Fd,{optional:!0})}whenStable(){let e;return new Promise(t=>{e=this.isStable.subscribe({next:e=>{e&&t()}})}).finally(()=>{e.unsubscribe()})}_injector=C(Pa);_rendererFactory=null;get injector(){return this._injector}bootstrap(e,t){return this.bootstrapImpl(e,t)}bootstrapImpl(e,t,n=Ts.NULL){return this._injector.get(zs).run(()=>{if(zc(Ec.BootstrapComponentStart),!this._injector.get(rg).done)throw new ii(405,``);let r=ki(e),i=this._injector.get(Uh),a=new eh(r,i);this.componentTypes.push(e);let{hostElement:o,directives:s,bindings:c}=hg(t),l=o||a.selector,u=a.create(n,[],l,i.injector,s,c),d=u.location.nativeElement,f=u.injector.get(ug,null);return f?.registerApplication(d),u.onDestroy(()=>{this.detachView(u.hostView),gg(this.components,u),f?.unregisterApplication(d)}),this._loadComponent(u),zc(Ec.BootstrapComponentEnd,u),u})}tick(){this.zonelessEnabled||(this.dirtyFlags|=1),this._tick()}_tick(){zc(Ec.ChangeDetectionStart),this.tracingSnapshot===null?this.tickImpl():this.tracingSnapshot.run(Pd.CHANGE_DETECTION,this.tickImpl)}tickImpl=()=>{if(this._runningTick)throw zc(Ec.ChangeDetectionEnd),new ii(101,!1);let e=pn(null);try{this._runningTick=!0,this.synchronize()}finally{this._runningTick=!1,this.tracingSnapshot?.dispose(),this.tracingSnapshot=null,pn(e),this.afterTick.next(),zc(Ec.ChangeDetectionEnd)}};synchronize(){this._rendererFactory===null&&!this._injector.destroyed&&(this._rendererFactory=this._injector.get(om,null,{optional:!0}));let e=0;for(;this.dirtyFlags!==0&&e++yo(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;gg(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(dg,[]).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),()=>gg(this._destroyListeners,e)}destroy(){if(this._destroyed)throw new ii(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=Nl({token:e,factory:e.ɵfac})}return e})();function hg(e){return e===void 0||typeof e==`string`||e instanceof Element?{hostElement:e}:e}function gg(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}function j(e,t,n,r){let i=w();return pm(i,Xo(),t)&&(Lo(),tp(gs(),i,e,t,n,r)),j}function _g(e){if(Ld(`NgAnimateEnter`),!vd)return _g;let t=w();if(yd(t))return _g;let n=Ro(),r=t[9].get(zs);return Nd(kd(t),n,()=>vg(t,n,e,r)),Xd(t[9]),Zd(t[9],kd(t)),_g}function vg(e,t,n,r){let i=so(t,e),a=e[11],o=Ad(n),s=[],c=!1,l=e=>{if(jd(e)!==i)return;let t=e instanceof AnimationEvent?`animationend`:`transitionend`;r.runOutsideAngular(()=>{a.listen(i,t,u)})},u=e=>{jd(e)===i&&(Md(e,i)&&(c=!0),yg(e,i,a))};if(o&&o.length>0){r.runOutsideAngular(()=>{s.push(a.listen(i,`animationstart`,l)),s.push(a.listen(i,`transitionstart`,l))}),bd(i,o,s);for(let e of o)a.addClass(i,e);r.runOutsideAngular(()=>{requestAnimationFrame(()=>{if(!c&&(pd(i,Cd,vd),!Cd.has(i))){for(let e of o)a.removeClass(i,e);xd(i)}})})}}function yg(e,t,n){let r=Sd.get(t);if(jd(e)===t&&r&&Md(e,t)){e.stopPropagation();for(let e of r.classList)n.removeClass(t,e);xd(t)}}var bg=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 xg(e,t,n,r,i){return e===n&&Object.is(t,r)?1:Object.is(i(e,t),i(n,r))?-1:0}function Sg(e,t,n,r){let i,a,o=0,s=e.length-1;if(Array.isArray(t)){pn(r);let c=t.length-1;for(pn(null);o<=s&&o<=c;){let r=e.at(o),l=t[o],u=xg(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=xg(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 Eg,a??=Tg(e,o,s,n),Cg(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;)wg(e,i,n,o,t[o]),o++}else if(t!=null){pn(r);let c=t[Symbol.iterator]();pn(null);let l=c.next();for(;!l.done&&o<=s;){let t=e.at(o),r=l.value,u=xg(o,t,o,r,n);if(u!==0)u<0&&e.updateValue(o,r),o++,l=c.next();else{i??=new Eg,a??=Tg(e,o,s,n);let u=n(o,r);if(Cg(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;)wg(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 Cg(e,t,n,r){return t!==void 0&&t.has(r)?(e.attach(n,t.get(r)),t.delete(r),!0):!1}function wg(e,t,n,r,i){if(Cg(e,t,r,n(r,i)))e.updateValue(r,i);else{let t=e.create(r,i);e.attach(r,t)}}function Tg(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 Eg=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 M(e,t,n,r,i,a,o,s){Ld(`NgControlFlow`);let c=w(),l=Lo();return og(c,l,e,t,n,r,i,ho(l.consts,a),256,o,s),Dg}function Dg(e,t,n,r,i,a,o,s){Ld(`NgControlFlow`);let c=w(),l=Lo();return og(c,l,e,t,n,r,i,ho(l.consts,a),512,o,s),Dg}function N(e,t){Ld(`NgControlFlow`);let n=w(),r=Xo(),i=n[r]===ed?-1:n[r],a=i===-1?void 0:Ng(n,27+i);if(pm(n,r,e)){let r=pn(null);try{if(a!==void 0&&Vp(a,0),e!==-1){let r=27+e,i=Ng(n,r),a=Rg(n[1],r),o=im(i,a,n);Bp(i,fp(n,a,t,{dehydratedView:o}),0,pp(a,o))}}finally{pn(r)}}else if(a!==void 0){let e=zp(a,0);e!==void 0&&(e[8]=t)}}var Og=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 kg(e){return e}function Ag(e,t){return t}var jg=class{hasEmptyBlock;trackByFn;liveCollection;constructor(e,t,n){this.hasEmptyBlock=e,this.trackByFn=t,this.liveCollection=n}};function P(e,t,n,r,i,a,o,s,c,l,u,d,f){Ld(`NgControlFlow`);let p=w(),m=Lo(),h=c!==void 0,g=w(),_=new jg(h,s?o.bind(g[15][8]):o);g[27+e]=_,og(p,m,e+1,t,n,r,i,ho(m.consts,a),256),h&&og(p,m,e+2,c,l,u,d,ho(m.consts,f),512)}var Mg=class extends bg{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,Bp(this.lContainer,t,e,pp(this.templateTNode,n)),Pg(this.lContainer,e)}detach(e){return this.needsIndexUpdate||=e!==this.length-1,Fg(this.lContainer,e),Ig(this.lContainer,e)}create(e,t){let n=rm(this.lContainer,this.templateTNode.tView.ssrId);return fp(this.hostLView,this.templateTNode,new Og(this.lContainer,t,e),{dehydratedView:n})}destroy(e){ff(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];Jd(e,r),hd.delete(n[19]),r.detachedLeaveAnimationFns=void 0}}function Fg(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 Ig(e,t){return Hp(e,t)}function Lg(e,t){return zp(e,t)}function Rg(e,t){return co(e,t)}function I(e,t,n){let r=w();return pm(r,Xo(),t)&&(Lo(),Jf(gs(),r,e,t,r[11],n)),I}function zg(e,t,n,r,i){sp(t,e,n,i?`class`:`style`,r)}function L(e,t,n,r){let i=w(),a=i[1],o=e+27,s=a.firstCreatePass?Hm(o,i,2,t,ep,No(),n,r):a.data[o];if(Qa(s)){let n=i[10].tracingService;if(n&&n.componentCreate){let o=a.data[s.directiveStart+s.componentOffset];return n.componentCreate(cm(o),()=>(Bg(e,t,i,s,r),L))}}return Bg(e,t,i,s,r),L}function Bg(e,t,n,r,i){if(ip(r,n,e,t,Hg),$a(r)){let e=n[1];Wf(e,n,r),uu(e,r,n)}i!=null&&Gf(n,r)}function R(){let e=Lo(),t=ap(Ro());return e.firstCreatePass&&Um(e,t),Fo(t)&&Io(),Mo(),t.classesWithoutHost!=null&&Xc(t)&&zg(e,t,w(),t.classesWithoutHost,!0),t.stylesWithoutHost!=null&&Zc(t)&&zg(e,t,w(),t.stylesWithoutHost,!1),R}function z(e,t,n,r){return L(e,t,n,r),R(),z}function B(e,t,n,r){let i=w(),a=i[1],o=e+27,s=a.firstCreatePass?Wm(o,a,2,t,n,r):a.data[o];return ip(s,i,e,t,Hg),r!=null&&Gf(i,s),B}function V(){return Fo(ap(Ro()))&&Io(),Mo(),V}function Vg(e,t,n,r){return B(e,t,n,r),V(),Vg}var Hg=(e,t,n,r,i)=>(Ss(!0),Tu(t[11],r,ys()));function Ug(e,t,n){let r=w(),i=r[1],a=e+27,o=i.firstCreatePass?Hm(a,r,8,`ng-container`,ep,No(),t,n):i.data[a];if(ip(o,r,e,`ng-container`,Kg),$a(o)){let e=r[1];Wf(e,r,o),uu(e,o,r)}return n!=null&&Gf(r,o),Ug}function Wg(){let e=Lo(),t=ap(Ro());return e.firstCreatePass&&Um(e,t),Wg}function Gg(e,t,n){return Ug(e,t,n),Wg(),Gg}var Kg=(e,t,n,r,i)=>(Ss(!0),wu(t[11],``));function H(){return w()}function qg(e,t,n){let r=w();return pm(r,Xo(),t)&&(Lo(),Yf(gs(),r,e,t,r[11],n)),qg}var Jg=void 0;function Yg(e){let t=Math.floor(Math.abs(e)),n=e.toString().replace(/^[^.]*\.?/,``).length;return t===1&&n===0?1:5}var Xg=[`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`]],Jg,[[`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`]],Jg,[[`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}`,Jg,Jg,Jg],[`.`,`,`,`;`,`%`,`+`,`-`,`E`,`×`,`‰`,`∞`,`NaN`,`:`],[`#,##0.###`,`#,##0%`,`¤#,##0.00`,`#E0`],`USD`,`$`,`US Dollar`,{},`ltr`,Yg],Zg=Object.create(null);function Qg(e){let t=t_(e),n=$g(t);if(n)return n;let r=t.split(`-`)[0];if(n=$g(r),n)return n;if(r===`en`)return Xg;throw new ii(701,!1)}function $g(e){if(!(e in Zg)){let t=Gi.ng&&Gi.ng.common&&Gi.ng.common.locales&&Gi.ng.common.locales[e];return t!==void 0&&(Zg[e]=t),t}return Zg[e]}var e_={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 t_(e){return e.toLowerCase().replace(/_/g,`-`)}var n_=`en-US`;function r_(e){typeof e==`string`&&e.toLowerCase().replace(/_/g,`-`)}function U(e,t,n){let r=w(),i=Lo(),a=Ro();return i_(i,r,r[11],a,e,t,n),U}function W(e,t,n){let r=w(),i=Lo(),a=Ro();return(a.type&3||n)&&ym(a,i,r,n,r[11],e,t,_m(a,r,t)),W}function i_(e,t,n,r,i,a,o){let s=!0,c=null;if((r.type&3||o)&&(c??=_m(r,t,a),ym(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 m_(e){return(e&2)==2}function h_(e,t){return e&131071|t<<17}function g_(e){return e|2}function __(e){return(e&131068)>>2}function v_(e,t){return e&-131069|t<<2}function y_(e){return(e&1)==1}function b_(e){return e|1}function x_(e,t,n,r,i,a){let o=a?t.classBindings:t.styleBindings,s=p_(o),c=__(o);e[r]=n;let l=!1,u;if(Array.isArray(n)){let e=n;u=e[1],(u===null||da(e,u)>0)&&(l=!0)}else u=n;if(i){if(c!==0){let t=p_(e[s+1]);e[r+1]=f_(t,s),t!==0&&(e[t+1]=v_(e[t+1],r)),e[s+1]=h_(e[s+1],r)}else e[r+1]=f_(s,0),s!==0&&(e[s+1]=v_(e[s+1],r)),s=r}else e[r+1]=f_(c,0),s===0?s=r:e[c+1]=v_(e[c+1],r),c=r;l&&(e[r+1]=g_(e[r+1])),C_(e,u,r,!0),C_(e,u,r,!1),S_(t,u,e,r,a),o=f_(s,c),a?t.classBindings=o:t.styleBindings=o}function S_(e,t,n,r,i){let a=i?e.residualClasses:e.residualStyles;a!=null&&typeof t==`string`&&da(a,t)>=0&&(n[r+1]=b_(n[r+1]))}function C_(e,t,n,r){let i=e[n+1],a=t===null,o=r?p_(i):__(i),s=!1;for(;o!==0&&(s===!1||a);){let n=e[o],i=e[o+1];w_(n,t)&&(s=!0,e[o+1]=r?b_(i):g_(i)),o=r?p_(i):__(i)}s&&(e[n+1]=r?g_(i):b_(i))}function w_(e,t){return e===null||t==null||(Array.isArray(e)?e[1]:e)===t?!0:Array.isArray(e)&&typeof t==`string`?da(e,t)>=0:!1}var T_={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function E_(e){return e.substring(T_.key,T_.keyEnd)}function D_(e){return k_(e),O_(e,A_(e,0,T_.textEnd))}function O_(e,t){let n=T_.textEnd;return n===t?-1:(t=T_.keyEnd=j_(e,T_.key=t,n),A_(e,t,n))}function k_(e){T_.key=0,T_.keyEnd=0,T_.value=0,T_.valueEnd=0,T_.textEnd=e.length}function A_(e,t,n){for(;t32;)t++;return t}function K(e,t,n){return P_(e,t,n,!1),K}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=D_(t);n>=0;n=O_(t,n))la(e,E_(t),!0)}function P_(e,t,n,r){let i=w(),a=Lo(),o=Zo(2);if(a.firstUpdatePass&&L_(a,e,o,r),t!==ed&&pm(i,o,t)){let s=a.data[ms()];q_(a,s,i,i[11],e,i[o+1]=X_(t,n),r,o)}}function F_(e,t,n,r){let i=Lo(),a=Zo(2);i.firstUpdatePass&&L_(i,null,a,r);let o=w();if(n!==ed&&pm(o,a,n)){let s=i.data[ms()];if(Z_(s,r)&&!I_(i,a)){let e=r?s.classesWithoutHost:s.stylesWithoutHost;e!==null&&(n=li(e,n||``)),zg(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[ms()],o=I_(e,n);Z_(a,r)&&t===null&&!o&&(t=!1),t=R_(i,a,t,r),x_(i,a,t,n,o,r)}}function R_(e,t,n,r){let i=ns(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(__(r)!==0)return e[p_(r)]}function B_(e,t,n,r){let i=n?t.classBindings:t.styleBindings;e[p_(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===ed&&(u=l?ma:void 0);let d=l?ua(u,r):c===r?u:void 0;if(a&&!Y_(d)&&(d=ua(t,r)),Y_(d)&&(s=d,o))return s;let f=e[i+1];i=o?p_(f):__(f)}if(t!==null){let e=a?t.residualClasses:t.residualStyles;e!=null&&(s=ua(e,r))}return s}function Y_(e){return e!==void 0}function X_(e,t){return e==null||e===``||(typeof t==`string`?e=pu(e)+t:typeof e==`object`&&(e=ci(pu(e)))),e}function Z_(e,t){return!!(e.flags&(t?8:16))}function J(e,t=``){let n=w(),r=Lo(),i=e+27,a=r.firstCreatePass?Yp(r,i,1,t,null):r.data[i],o=Q_(r,n,a,t);n[i]=o,xs()&&xf(r,n,o,a),Vo(a,!1)}var Q_=(e,t,n,r)=>(Ss(!0),Su(t[11],r));function $_(e,t,n,r=``){return pm(e,Xo(),n)?t+Ni(n)+r:ed}function ev(e,t,n,r,i,a=``){let o=mm(e,Jo(),n,i);return Zo(2),o?t+Ni(n)+r+Ni(i)+a:ed}function tv(e,t,n,r,i,a,o,s=``){let c=hm(e,Jo(),n,i,o);return Zo(3),c?t+Ni(n)+r+Ni(i)+a+Ni(o)+s:ed}function nv(e,t,n,r,i,a,o,s,c,l=``){let u=gm(e,Jo(),n,i,o,c);return Zo(4),u?t+Ni(n)+r+Ni(i)+a+Ni(o)+s+Ni(c)+l:ed}function Y(e){return X(``,e),Y}function X(e,t,n){let r=w(),i=$_(r,e,t,n);return i!==ed&&av(r,ms(),i),X}function Z(e,t,n,r,i){let a=w(),o=ev(a,e,t,n,r,i);return o!==ed&&av(a,ms(),o),Z}function rv(e,t,n,r,i,a,o){let s=w(),c=tv(s,e,t,n,r,i,a,o);return c!==ed&&av(s,ms(),c),rv}function iv(e,t,n,r,i,a,o,s,c){let l=w(),u=nv(l,e,t,n,r,i,a,o,s,c);return u!==ed&&av(l,ms(),u),iv}function av(e,t,n){let r=oo(t,e);Cu(e[11],r,n)}function ov(e,t,n){Sc(t)&&(t=t());let r=w();return pm(r,Xo(),t)&&(Lo(),Jf(gs(),r,e,t,r[11],n)),ov}function sv(e,t){let n=Sc(e);return n&&e.set(t),n}function cv(e,t){let n=w(),r=Lo(),i=Ro();return i_(r,n,n[11],i,e,t),cv}var lv={};function uv(e){Ld(`NgLet`);let t=Lo(),n=w(),r=e+27;return Vo(Yp(t,r,128,null,null),!1),uo(t,n,r,lv),uv}function dv(e){return uo(Lo(),w(),ms(),e),e}function fv(e){let t=lo(Wo(),27+e);if(t===lv)throw new ii(314,!1);return t}function pv(e,t,n=``){return $_(w(),e,t,n)}function mv(e,t){let n=qo()+e,r=w();return r[n]===ed?dm(r,n,t()):fm(r,n)}function hv(e,t,n){return vv(w(),qo(),e,t,n)}function gv(e,t,n,r,i){return bv(w(),qo(),e,t,n,r,i)}function _v(e,t){let n=e[t];return n===ed?void 0:n}function vv(e,t,n,r,i,a){let o=t+n;return pm(e,o,i)?dm(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 mm(e,s,i,a)?dm(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 hm(e,c,i,a,o)?dm(e,c+3,s?r.call(s,i,a,o):r(i,a,o)):_v(e,c+3)}function xv(e,t){let n=Lo(),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=ta(r.type,!0)),o=Ui(Dm);try{let e=cl(!1),t=a();return cl(e),uo(n,w(),i,t),t}finally{Ui(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=w(),a=lo(i,r);return Tv(i,r)?vv(i,qo(),t,a.transform,n,a):a.transform(n)}function wv(e,t,n,r){let i=e+27,a=w(),o=lo(a,i);return Tv(a,i)?yv(a,qo(),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 Jp(e,t)}var Dv=(()=>{class e{applicationErrorHandler=C(Qs);appRef=C(mg);taskService=C(js);ngZone=C(zs);zonelessEnabled=C(lc);tracing=C(Fd,{optional:!0});zoneIsDefined=typeof Zone<`u`&&!!Zone.root.run;schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}];subscriptions=new _r;angularZoneId=this.zoneIsDefined?this.ngZone._inner?.get(Ls):null;scheduleInRootZone=!this.zonelessEnabled&&this.zoneIsDefined&&(C(uc,{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?Fs:Ps;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=Nl({token:e,factory:e.ɵfac})}return e})();function Ov(){return[{provide:cc,useExisting:Dv},{provide:zs,useClass:qs},{provide:lc,useValue:!0}]}function kv(){return typeof $localize<`u`&&$localize.locale||`en-US`}var Av=new xi(``,{factory:()=>C(Av,{optional:!0,skipSelf:!0})||kv()}),jv=class{destroyed=!1;listeners=null;errorHandler=C(Zs,{optional:!0});isEmitting=!1;hasNullListeners=!1;destroyRef=C(Ds);constructor(){this.destroyRef.onDestroy(()=>{this.destroyed=!0,this.listeners=null})}subscribe(e){if(this.destroyed)throw new ii(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(oi(953,!1));return}if(this.listeners===null)return;this.isEmitting=!0;let t=pn(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)),pn(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 Pn(e,t?.equal)}function Nv(e){return sr(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(rr(e,Pv,t?.equal),t?.debugName,t?.set):Iv(rr(e.source,e.computation,e.equal),e.debugName,e.set)}function Iv(e,t,n){let r=e[fn],i=e;if(n!==void 0){let t=e=>ir(r,e);i.set=e=>n(e,t),i.update=r=>n(r(Nv(e)),t)}else i.set=e=>ir(r,e),i.update=e=>ar(r,e);return i.asReadonly=ec.bind(e),i}function Lv(e,t){let n=Object.create(wc);n.value=e,n.transformFn=t?.transform;function r(){if(gn(n),n.value===Cc)throw new ii(-950,null);return n.value}return r[fn]=n,r}function Rv(e){return new jv}function zv(e,t){return Lv(e,t)}function Bv(e){return Lv(Cc,e)}var $=(zv.required=Bv,zv);function Vv(e,t){let n=Object.create(wc),r=new jv;n.value=e;function i(){return gn(n),Hv(n.value),n.value}return i[fn]=n,i.asReadonly=ec.bind(i),i.set=e=>{n.equal(n.value,e)||(Kn(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===Cc)throw new ii(952,!1)}function Uv(e,t){return Vv(e,t)}function Wv(e){return Vv(Cc,e)}var Gv=(Uv.required=Wv,Uv);function Kv(e,t){return Lh(t)}function qv(e,t){return Rh(t)}var Jv=(Kv.required=qv,Kv),Yv=new xi(``),Xv=new xi(``);function Zv(e){return!e.moduleRef}function Qv(e){let t=Zv(e)?e.r3Injector:e.moduleRef.injector,n=t.get(zs);return n.run(()=>{Zv(e)?e.r3Injector.resolveInjectorInitializers():e.moduleRef.resolveInjectorInitializers();let r=t.get(Qs),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(()=>{gg(e.allPlatformModules,e.moduleRef),i.unsubscribe(),n.delete(t)})}return ey(r,n,()=>{let n=t.get(js),r=n.add(),i=t.get(rg);return i.runInitializers(),i.donePromise.then(()=>{if(r_(t.get(Av,n_)||`en-US`),!t.get(Xv,!0))return Zv(e)?t.get(mg):(e.allPlatformModules.push(e.moduleRef),e.moduleRef);if(Zv(e)){let n=t.get(mg);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 Vh(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 Ts.create({name:t,providers:[{provide:ka,useValue:`platform`},{provide:Yv,useValue:new Set([()=>ty=null])},...e]})}function ry(e=[]){if(ty)return ty;let t=ny(e);return ty=t,fg(),iy(t),t}function iy(e){let t=e.get(rc,null);Ka(e,()=>{t?.forEach(e=>e())})}function ay(e){let{rootComponent:t,appProviders:n,platformProviders:r,platformRef:i}=e;zc(Ec.BootstrapApplicationStart);try{let e=i?.injector??ry(r);return Qv({r3Injector:new Wh({providers:[Ov(),$s,...n||[]],parent:e,debugName:``,runEnvironmentInitializers:!1}).injector,platformInjector:e,rootComponent:t})}catch(e){return Promise.reject(e)}finally{zc(Ec.BootstrapApplicationEnd)}}function oy(e){return typeof e==`boolean`?e:e!=null&&e!==`false`}var sy=Symbol(`NOT_SET`),cy=new Set,ly={...Jn,kind:`afterRenderEffectPhase`,consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!0,value:sy,cleanup:null,consumerMarkedDirty(){if(this.sequence.impl.executing){if(this.sequence.lastPhase===null||this.sequence.lastPhase(gn(r),r.value),r.signal[fn]=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??cy)t()}finally{On(e)}}};function dy(e,t){let n=t?.injector??C(Ts),r=n.get(cc),i=n.get(Rd),a=n.get(Fd,null,{optional:!0});i.impl??=n.get(Bd);let o=e;typeof o==`function`&&(o={mixedReadWrite:e});let s=n.get(oc,null,{optional:!0}),c=new uy(i.impl,[o.earlyRead,o.write,o.mixedReadWrite,o.read],s?.view,r,n,a?.snapshot(null));return i.impl.register(c),c}var fy=null;function py(){return fy}function my(e){fy??=e}var hy=class{},gy=(function(e){return e[e.Format=0]=`Format`,e[e.Standalone=1]=`Standalone`,e})(gy||{}),_y=(function(e){return e[e.Narrow=0]=`Narrow`,e[e.Abbreviated=1]=`Abbreviated`,e[e.Wide=2]=`Wide`,e[e.Short=3]=`Short`,e})(_y||{}),vy=(function(e){return e[e.Short=0]=`Short`,e[e.Medium=1]=`Medium`,e[e.Long=2]=`Long`,e[e.Full=3]=`Full`,e})(vy||{}),yy={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 by(e){return Qg(e)[e_.LocaleId]}function xy(e,t,n){let r=Qg(e);return My(My([r[e_.DayPeriodsFormat],r[e_.DayPeriodsStandalone]],t),n)}function Sy(e,t,n){let r=Qg(e);return My(My([r[e_.DaysFormat],r[e_.DaysStandalone]],t),n)}function Cy(e,t,n){let r=Qg(e);return My(My([r[e_.MonthsFormat],r[e_.MonthsStandalone]],t),n)}function wy(e,t){let n=Qg(e)[e_.Eras];return My(n,t)}function Ty(e,t){return My(Qg(e)[e_.DateFormat],t)}function Ey(e,t){return My(Qg(e)[e_.TimeFormat],t)}function Dy(e,t){let n=Qg(e)[e_.DateTimeFormat];return My(n,t)}function Oy(e,t){let n=Qg(e),r=n[e_.NumberSymbols][t];if(r===void 0){if(t===yy.CurrencyDecimal)return n[e_.NumberSymbols][yy.Decimal];if(t===yy.CurrencyGroup)return n[e_.NumberSymbols][yy.Group]}return r}function ky(e){if(!e[e_.ExtraData])throw new ii(2303,!1)}function Ay(e){let t=Qg(e);return ky(t),(t[e_.ExtraData][2]||[]).map(e=>typeof e==`string`?Ny(e):[Ny(e[0]),Ny(e[1])])}function jy(e,t,n){let r=Qg(e);return ky(r),My(My([r[e_.ExtraData][0],r[e_.ExtraData][1]],t)||[],n)||[]}function My(e,t){for(let n=t;n>-1;n--)if(e[n]!==void 0)return e[n];throw new ii(2304,!1)}function Ny(e){let[t,n]=e.split(`:`);return{hours:+t,minutes:+n}}var Py=/^(\d{4,})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,Fy=Object.create(null),Iy=/((?:[^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]*)/,Ly=256;function Ry(e,t,n,r){let i=sb(e);zy(t),t=Vy(n,t)||t;let a=[],o;for(;t;)if(o=Iy.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=ib(r,s),i=ob(i,r));let c=``;return a.forEach(e=>{let t=rb(e);c+=t?t(i,n,s):e===`''`?`'`:e.replace(/(^'|'$)/g,``).replace(/''/g,`'`)}),c}function zy(e){if(e.length>Ly)throw new ii(2300,!1)}function By(e,t,n){let r=new Date(0);return r.setFullYear(e,t,n),r.setHours(0,0,0),r}function Vy(e,t){let n=by(e);if(Fy[n]??=Object.create(null),Fy[n][t])return Fy[n][t];let r=``;switch(t){case`shortDate`:r=Ty(e,vy.Short);break;case`mediumDate`:r=Ty(e,vy.Medium);break;case`longDate`:r=Ty(e,vy.Long);break;case`fullDate`:r=Ty(e,vy.Full);break;case`shortTime`:r=Ey(e,vy.Short);break;case`mediumTime`:r=Ey(e,vy.Medium);break;case`longTime`:r=Ey(e,vy.Long);break;case`fullTime`:r=Ey(e,vy.Full);break;case`short`:let t=Vy(e,`shortTime`),n=Vy(e,`shortDate`);r=Hy(Dy(e,vy.Short),[t,n]);break;case`medium`:let i=Vy(e,`mediumTime`),a=Vy(e,`mediumDate`);r=Hy(Dy(e,vy.Medium),[i,a]);break;case`long`:let o=Vy(e,`longTime`),s=Vy(e,`longDate`);r=Hy(Dy(e,vy.Long),[o,s]);break;case`full`:let c=Vy(e,`fullTime`),l=Vy(e,`fullDate`);r=Hy(Dy(e,vy.Full),[c,l])}return r&&(Fy[n][t]=r),r}function Hy(e,t){return t&&(e=e.replace(/\{([^}]+)}/g,function(e,n){return Object.hasOwn(t,n)?t[n]:e})),e}function Uy(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 Wy(s,t);let c=Oy(o,yy.MinusSign);return Uy(s,t,c,r,i)}}function Ky(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 ii(2301,!1)}}function qy(e,t,n=gy.Format,r=!1){return function(i,a){return Jy(i,a,e,t,n,r)}}function Jy(e,t,n,r,i,a){switch(n){case 2:return Cy(t,i,r)[e.getMonth()];case 1:return Sy(t,i,r)[e.getDay()];case 0:let n=e.getHours(),o=e.getMinutes();if(a){let e=Ay(t),a=jy(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?`+`:``)+Uy(o,2,a)+Uy(Math.abs(i%60),2,a);case 1:return`GMT`+(i>=0?`+`:``)+Uy(o,1,a);case 2:return`GMT`+(i>=0?`+`:``)+Uy(o,2,a)+`:`+Uy(Math.abs(i%60),2,a);case 3:return r===0?`Z`:(i>=0?`+`:``)+Uy(o,2,a)+`:`+Uy(Math.abs(i%60),2,a);default:throw new ii(2310,!1)}}}var Xy=0,Zy=4;function Qy(e){let t=By(e,Xy,1).getDay();return By(e,0,1+(t<=Zy?Zy:11)-t)}function $y(e){let t=e.getDay(),n=t===0?-3:Zy-t;return By(e.getFullYear(),e.getMonth(),e.getDate()+n)}function eb(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=$y(n),t=Qy(e.getFullYear()),r=e.getTime()-t.getTime();i=1+Math.round(r/6048e5)}return Uy(i,e,Oy(r,yy.MinusSign))}}function tb(e,t=!1){return function(n,r){return Uy($y(n).getFullYear(),e,Oy(r,yy.MinusSign),t)}}var nb=Object.create(null);function rb(e){if(nb[e])return nb[e];let t;switch(e){case`G`:case`GG`:case`GGG`:t=qy(3,_y.Abbreviated);break;case`GGGG`:t=qy(3,_y.Wide);break;case`GGGGG`:t=qy(3,_y.Narrow);break;case`y`:t=Gy(0,1,0,!1,!0);break;case`yy`:t=Gy(0,2,0,!0,!0);break;case`yyy`:t=Gy(0,3,0,!1,!0);break;case`yyyy`:t=Gy(0,4,0,!1,!0);break;case`Y`:t=tb(1);break;case`YY`:t=tb(2,!0);break;case`YYY`:t=tb(3);break;case`YYYY`:t=tb(4);break;case`M`:case`L`:t=Gy(1,1,1);break;case`MM`:case`LL`:t=Gy(1,2,1);break;case`MMM`:t=qy(2,_y.Abbreviated);break;case`MMMM`:t=qy(2,_y.Wide);break;case`MMMMM`:t=qy(2,_y.Narrow);break;case`LLL`:t=qy(2,_y.Abbreviated,gy.Standalone);break;case`LLLL`:t=qy(2,_y.Wide,gy.Standalone);break;case`LLLLL`:t=qy(2,_y.Narrow,gy.Standalone);break;case`w`:t=eb(1);break;case`ww`:t=eb(2);break;case`W`:t=eb(1,!0);break;case`d`:t=Gy(2,1);break;case`dd`:t=Gy(2,2);break;case`c`:case`cc`:t=Gy(7,1);break;case`ccc`:t=qy(1,_y.Abbreviated,gy.Standalone);break;case`cccc`:t=qy(1,_y.Wide,gy.Standalone);break;case`ccccc`:t=qy(1,_y.Narrow,gy.Standalone);break;case`cccccc`:t=qy(1,_y.Short,gy.Standalone);break;case`E`:case`EE`:case`EEE`:t=qy(1,_y.Abbreviated);break;case`EEEE`:t=qy(1,_y.Wide);break;case`EEEEE`:t=qy(1,_y.Narrow);break;case`EEEEEE`:t=qy(1,_y.Short);break;case`a`:case`aa`:case`aaa`:t=qy(0,_y.Abbreviated);break;case`aaaa`:t=qy(0,_y.Wide);break;case`aaaaa`:t=qy(0,_y.Narrow);break;case`b`:case`bb`:case`bbb`:t=qy(0,_y.Abbreviated,gy.Standalone,!0);break;case`bbbb`:t=qy(0,_y.Wide,gy.Standalone,!0);break;case`bbbbb`:t=qy(0,_y.Narrow,gy.Standalone,!0);break;case`B`:case`BB`:case`BBB`:t=qy(0,_y.Abbreviated,gy.Format,!0);break;case`BBBB`:t=qy(0,_y.Wide,gy.Format,!0);break;case`BBBBB`:t=qy(0,_y.Narrow,gy.Format,!0);break;case`h`:t=Gy(3,1,-12);break;case`hh`:t=Gy(3,2,-12);break;case`H`:t=Gy(3,1);break;case`HH`:t=Gy(3,2);break;case`m`:t=Gy(4,1);break;case`mm`:t=Gy(4,2);break;case`s`:t=Gy(5,1);break;case`ss`:t=Gy(5,2);break;case`S`:t=Gy(6,1);break;case`SS`:t=Gy(6,2);break;case`SSS`:t=Gy(6,3);break;case`Z`:case`ZZ`:case`ZZZ`:t=Yy(0);break;case`ZZZZZ`:t=Yy(3);break;case`O`:case`OO`:case`OOO`:case`z`:case`zz`:case`zzz`:t=Yy(1);break;case`OOOO`:case`ZZZZ`:case`zzzz`:t=Yy(2);break;default:return null}return nb[e]=t,t}function ib(e,t){e=e.replace(/:/g,``);let n=Date.parse(`Jan 01, 1970 00:00:00 `+e)/6e4;return isNaN(n)?t:n}function ab(e,t){return e=new Date(e.getTime()),e.setMinutes(e.getMinutes()+t),e}function ob(e,t,n){let r=e.getTimezoneOffset();return ab(e,-1*(ib(t,r)-r))}function sb(e){if(lb(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 By(t,n-1,r)}let t=parseFloat(e);if(!isNaN(e-t))return new Date(t);let n;if(n=e.match(Py))return cb(n)}let t=new Date(e);if(!lb(t))throw new ii(2311,!1);return t}function cb(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 lb(e){return e instanceof Date&&!isNaN(e.valueOf())}var ub=(()=>{class e{_viewContainerRef;_viewRef=null;ngTemplateOutletContext=null;ngTemplateOutlet=null;ngTemplateOutletInjector=null;injector=C(Ts);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)(Dm(sh))};static ɵdir=Xh({type:e,selectors:[[``,`ngTemplateOutlet`,``]],inputs:{ngTemplateOutletContext:`ngTemplateOutletContext`,ngTemplateOutlet:`ngTemplateOutlet`,ngTemplateOutletInjector:`ngTemplateOutletInjector`},features:[Ac]})}return e})();function db(e,t){return new ii(2100,!1)}var fb=`mediumDate`,pb=new xi(``),mb=new xi(``),hb=(()=>{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??fb,a=r??this.defaultOptions?.timezone??this.defaultTimezone??void 0;return Ry(t,e,i||this.locale,a)}catch(t){throw db(e,t.message)}}static ɵfac=function(t){return new(t||e)(Dm(Av,16),Dm(pb,24),Dm(mb,24))};static ɵpipe=Zh({name:`date`,type:e,pure:!0})}return e})(),gb=(()=>{class e{transform(e){return JSON.stringify(e,null,2)}static ɵfac=function(t){return new(t||e)};static ɵpipe=Zh({name:`json`,type:e,pure:!1})}return e})();function _b(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 vb=`browser`,yb=class{_doc;constructor(e){this._doc=e}manager},bb=(()=>{class e extends yb{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)(Xi(Es))};static ɵprov=mi({token:e,factory:e.ɵfac})}return e})(),xb=new xi(``),Sb=(()=>{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 bb));this._plugins=n.slice().reverse();let r=e.find(e=>e instanceof bb);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 ii(-5101,!1);return this._eventNameToPlugin.set(e,t),t}static ɵfac=function(t){return new(t||e)(Xi(xb),Xi(zs))};static ɵprov=mi({token:e,factory:e.ɵfac})}return e})(),Cb=`ng-app-id`;function wb(e){for(let t of e)t.remove()}function Tb(e,t){let n=t.createElement(`style`);return n.textContent=e,n}function Eb(e,t,n,r){let i=e.head?.querySelectorAll(`style[${Cb}="${t}"],link[${Cb}="${t}"]`);if(!i||i.length===0)return!1;for(let e of i)e.removeAttribute(Cb),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 Db(e,t){let n=t.createElement(`link`);return n.setAttribute(`rel`,`stylesheet`),n.setAttribute(`href`,e),n}var Ob=(()=>{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,Eb(e,t,this.inline,this.external)&&this.hosts.add(e.head)}addStyles(e,t){for(let t of e)this.addUsage(t,this.inline,Tb);t?.forEach(e=>this.addUsage(e,this.external,Db))}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&&(wb(n.elements),t.delete(e)))}ngOnDestroy(){for(let[,{elements:e}]of[...this.inline,...this.external])wb(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,Tb(t,this.doc)));for(let[t,{elements:n}]of this.external)n.push(this.addElement(e,Db(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)(Xi(Es),Xi(tc),Xi(ac,8),Xi(ic))};static ɵprov=mi({token:e,factory:e.ɵfac})}return e})(),kb={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`},Ab=/%COMP%/g,jb=`%COMP%`,Mb=`_nghost-${jb}`,Nb=`_ngcontent-${jb}`,Pb=!0,Fb=new xi(``,{factory:()=>Pb}),Ib=new xi(``);function Lb(e){return Nb.replace(Ab,e)}function Rb(e){return Mb.replace(Ab,e)}function zb(e,t){return t.map(t=>t.replace(Ab,e))}var Bb=(()=>{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 Vb(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 Gb?n.applyToHost(e):n instanceof Wb&&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 du.Emulated:r=new Gb(o,s,t,this.appId,c,i,a,l,this.cssVarNamespace);break;case du.ShadowDom:return new Ub(o,e,t,i,a,this.nonce,l,this.cssVarNamespace,s);case du.ExperimentalIsolatedShadowDom:return new Ub(o,e,t,i,a,this.nonce,l,this.cssVarNamespace);default:r=new Wb(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)(Xi(Sb),Xi(Tm),Xi(tc),Xi(Fb),Xi(Es),Xi(zs),Xi(ac),Xi(Fd,8),Xi(Ib,8))};static ɵprov=mi({token:e,factory:e.ɵfac})}return e})(),Vb=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(kb[t]||t,e):this.doc.createElement(e)}createComment(e){return this.doc.createComment(e)}createText(e){return this.doc.createTextNode(e)}appendChild(e,t){(Hb(e)?e.content:e).appendChild(t)}insertBefore(e,t,n){if(e){let r=Hb(e)?e.content:e;if(n!=null&&n.parentNode!==r)throw new ii(-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 ii(-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=kb[r];i?e.setAttributeNS(i,t,n):e.setAttribute(t,n)}else e.setAttribute(t,n)}removeAttribute(e,t,n){if(n){let r=kb[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&(td.DashCase|td.Important)?e.style.setProperty(t,n,r&td.Important?`important`:``):e.style[t]=n}removeStyle(e,t,n){let r=t.startsWith(`--`);r&&(t=t.replace(`%NS%`,this.cssVarNamespace)),r||n&td.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=py().getGlobalEventTarget(this.doc,e),!e))throw new ii(-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 Hb(e){return e.tagName===`TEMPLATE`&&e.content!==void 0}var Ub=class extends Vb{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=zb(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=Db(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)}},Wb=class extends Vb{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?zb(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&&hd.size===0&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},Gb=class extends Wb{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=Lb(l),this.hostAttr=Rb(l)}applyToHost(e){this.applyStyles(),this.setAttribute(e,this.hostAttr,``)}createElement(e,t){let n=super.createElement(e,t);return super.setAttribute(n,this.contentAttr,``),n}},Kb=class e extends hy{supportsDOMEvents=!0;static makeCurrent(){my(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=Jb();return t==null?null:Yb(t)}resetBaseElement(){qb=null}getUserAgent(){return window.navigator.userAgent}getCookie(e){return _b(document.cookie,e)}},qb=null;function Jb(){return qb||=document.head.querySelector(`base`),qb?qb.getAttribute(`href`):null}function Yb(e){return new URL(e,document.baseURI).pathname}var Xb=[`alt`,`control`,`meta`,`shift`],Zb={"\b":`Backspace`," ":`Tab`,"":`Delete`,"\x1B":`Escape`,Del:`Delete`,Esc:`Escape`,Left:`ArrowLeft`,Right:`ArrowRight`,Up:`ArrowUp`,Down:`ArrowDown`,Menu:`ContextMenu`,Scroll:`ScrollLock`,Win:`OS`},Qb={alt:e=>e.altKey,control:e=>e.ctrlKey,meta:e=>e.metaKey,shift:e=>e.shiftKey},$b=(()=>{class e extends yb{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(()=>py().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.`),Xb.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=Zb[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`),Xb.forEach(t=>{if(t!==n){let n=Qb[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)(Xi(Es))};static ɵprov=mi({token:e,factory:e.ɵfac})}return e})();async function ex(e,t,n){return ay({rootComponent:e,...tx(t,n)})}function tx(e,t){return{platformRef:t?.platformRef,appProviders:[...ox,...e?.providers??[]],platformProviders:ax}}function nx(){Kb.makeCurrent()}function rx(){return new Zs}function ix(){return $l(document),document}var ax=[{provide:ic,useValue:vb},{provide:rc,useValue:nx,multi:!0},{provide:Es,useFactory:ix}],ox=[{provide:ka,useValue:`root`},{provide:Zs,useFactory:rx},{provide:xb,useClass:bb,multi:!0},{provide:xb,useClass:$b,multi:!0},Bb,{provide:Tm,useClass:Ob},{provide:Ob,useExisting:Tm},Sb,{provide:om,useExisting:Bb},[]];function sx(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 dx({code:i,why:lx(a.why,e),fix:lx(a.fix,e),docs:o,cause:e.cause,sources:e.sources,data:lx(a.data,e)},s);for(let e of t)e(r,n);return r};n[i]=s}return n}function mx(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 bx=Math.random.bind(Math),xx=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`;function Sx(e=21){let t=``,n=e;for(;n--;)t+=xx[bx()*64|0];return t}var Cx=6e4,wx=e=>e,Tx=wx,{clearTimeout:Ex,setTimeout:Dx}=globalThis;function Ox(e,t){let{post:n,on:r,off:i=()=>{},eventNames:a=[],serialize:o=wx,deserialize:s=Tx,resolver:c,bind:l=`rpc`,timeout:u=Cx,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}=yx(),_=Sx();s.i=_;let ee;async function te(n=s){return u>=0&&(ee=Dx(()=>{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,te,d):await te()}catch(e){if(t.onGeneralError?.call(h,e)!==!0)throw e;return}finally{Ex(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:te,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(ne)}function te(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 ne(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&&(Ex(r.timeoutId),n?r.reject(n):r.resolve(t)),p.delete(e)}}return m=r(ne),h}function kx(e,t){return t.safety?t.safety:e===`static`||e===`query`||e==null?`read`:`action`}var Ax=Object.freeze({type:`object`,additionalProperties:!0});function jx(e){let t=e[`~standard`];if(t.jsonSchema)try{return t.jsonSchema.input({target:`draft-2020-12`})}catch{return Ax}return Ax}function Mx(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 Px(e,t){return Nx(e,t)??[e]}function Fx(e){return typeof e==`string`?`'${e}'`:new zx().serialize(e)}var Ix=` _-,;:!?.'"()[]{}@*/\\&#%\`^+<=>|~$0123456789abcdefghijklmnopqrstuvwxyz`,Lx=(function(){let e=new Uint8Array(128);for(let t=0;t<69;t++)e[Ix.charCodeAt(t)]=t+1;for(let t=65;t<=90;t++)e[t]=e[t+32];return e})();function Rx(e,t){if(e===t)return 0;let n=Math.min(e.length,t.length),r=0;for(let i=0;ia?-1:1)}return e.length===t.length?r:e.lengththis.compare(e[0],t[0])),r=`${e}{`;for(let e=0;ethis.compare(e,t)))}`}$Map(e){return this.serializeObjectEntries(`Map`,e.entries())}}for(let t of[`Error`,`RegExp`,`URL`])e.prototype[`$`+t]=function(e){return`${t}(${e})`};for(let t of[`Int8Array`,`Uint8Array`,`Uint8ClampedArray`,`Int16Array`,`Uint16Array`,`Int32Array`,`Uint32Array`,`Float32Array`,`Float64Array`])e.prototype[`$`+t]=function(e){return`${t}[${e.join(`,`)}]`};for(let t of[`BigInt64Array`,`BigUint64Array`])e.prototype[`$`+t]=function(e){return`${t}[${e.join(`n,`)}${e.length>0?`n`:``}]`};return e})(),Bx=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225],Vx=[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],Hx=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_`,Ux=[],Wx=class{_data=new Gx;_hash=new Gx([...Bx]);_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)Ux[n]=e[t+n]|0;else{let e=Ux[n-15],t=(e<<25|e>>>7)^(e<<14|e>>>18)^e>>>3,r=Ux[n-2],i=(r<<15|r>>>17)^(r<<13|r>>>19)^r>>>10;Ux[n]=t+Ux[n-7]+i+Ux[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+Vx[n]+Ux[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=Gx.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 Kx(e){return new Wx().finalize(e).toBase64()}function qx(e){return Kx(Fx(e))}function Jx(e){return qx(e)}function Yx(){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 Xx=/^[\w+.-]{2,}:\/\//;function Zx(e){return e.endsWith(`/`)?e:`${e}/`}function Qx(e){return(e.endsWith(`/`)?e.slice(0,-1):e)||`/`}function $x(e,...t){let n=e;for(let e of t)e&&e!==`/`&&(n=n?Zx(n)+e.replace(/^\.?\//,``):e);return n}function eS(e,t){if(!t||t===`/`||Xx.test(e))return e;let n=Qx(t);return e.startsWith(n)?e:$x(n,e)}function tS(e,t){let n=e.match(Xx);return t+(n?e.slice(n[0].length):e)}var nS=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`;function rS(e=21){let t=``,n=e;for(;n--;)t+=nS[Math.random()*64|0];return t}var iS=Symbol.for(`immer-nothing`),aS=Symbol.for(`immer-draftable`),oS=Symbol.for(`immer-state`),sS=[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 cS(e,...t){{let n=sS[e],r=MS(n)?n.apply(null,t):n;throw Error(`[Immer] ${r}`)}}var lS=Object,uS=lS.getPrototypeOf,dS=`constructor`,fS=`prototype`,pS=`configurable`,mS=`enumerable`,hS=`writable`,gS=`value`,_S=e=>!!e&&!!e[oS];function vS(e){return e?xS(e)||OS(e)||!!e[aS]||!!e[dS]?.[aS]||kS(e)||AS(e):!1}var yS=lS[fS][dS].toString(),bS=new WeakMap;function xS(e){if(!e||!jS(e))return!1;let t=uS(e);if(t===null||t===lS[fS])return!0;let n=lS.hasOwnProperty.call(t,dS)&&t[dS];if(n===Object)return!0;if(!MS(n))return!1;let r=bS.get(n);return r===void 0&&(r=Function.toString.call(n),bS.set(n,r)),r===yS}function SS(e,t,n=!0){CS(e)===0?(n?Reflect.ownKeys(e):lS.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function CS(e){let t=e[oS];return t?t.type_:OS(e)?1:kS(e)?2:AS(e)?3:0}var wS=(e,t,n=CS(e))=>n===2?e.has(t):lS[fS].hasOwnProperty.call(e,t),TS=(e,t,n=CS(e))=>n===2?e.get(t):e[t],ES=(e,t,n,r=CS(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n};function DS(e,t){return e===t?e!==0||1/e==1/t:e!==e&&t!==t}var OS=Array.isArray,kS=e=>e instanceof Map,AS=e=>e instanceof Set,jS=e=>typeof e==`object`,MS=e=>typeof e==`function`,NS=e=>typeof e==`boolean`;function PS(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var FS=e=>jS(e)?e?.[oS]:null,IS=e=>e.copy_||e.base_,LS=e=>e.modified_?e.copy_:e.base_;function RS(e,t){if(kS(e))return new Map(e);if(AS(e))return new Set(e);if(OS(e))return Array[fS].slice.call(e);let n=xS(e);if(t===!0||t===`class_only`&&!n){let t=lS.getOwnPropertyDescriptors(e);delete t[oS];let n=Reflect.ownKeys(t);for(let r=0;r1&&lS.defineProperties(e,{set:VS,add:VS,clear:VS,delete:VS}),lS.freeze(e),t&&SS(e,(e,t)=>{zS(t,!0)},!1),e)}function BS(){cS(2)}var VS={[gS]:BS};function HS(e){return e===null||!jS(e)||lS.isFrozen(e)}var US=`MapSet`,WS=`Patches`,GS=`ArrayMethods`,KS={};function qS(e){let t=KS[e];return t||cS(0,e),t}var JS=e=>!!KS[e];function YS(e,t){KS[e]||(KS[e]=t)}var XS,ZS=()=>XS,QS=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:JS(US)?qS(US):void 0,arrayMethodsPlugin_:JS(GS)?qS(GS):void 0});function $S(e,t){t&&(e.patchPlugin_=qS(WS),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function eC(e){tC(e),e.drafts_.forEach(rC),e.drafts_=null}function tC(e){e===XS&&(XS=e.parent_)}var nC=e=>XS=QS(XS,e);function rC(e){let t=e[oS];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function iC(e,t){t.unfinalizedDrafts_=t.drafts_.length;let n=t.drafts_[0];if(e!==void 0&&e!==n){n[oS].modified_&&(eC(t),cS(4)),vS(e)&&(e=aC(t,e));let{patchPlugin_:r}=t;r&&r.generateReplacementPatches_(n[oS].base_,e,t)}else e=aC(t,n);return oC(t,e,!0),eC(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e===iS?void 0:e}function aC(e,t){if(HS(t))return t;let n=t[oS];if(!n)return mC(t,e.handledSet_,e);if(!cC(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);fC(n,e)}return n.copy_}function oC(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&zS(t,n)}function sC(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var cC=(e,t)=>e.scope_===t,lC=[];function uC(e,t,n,r){let i=IS(e),a=e.type_;if(r!==void 0&&TS(i,r,a)===t){ES(i,r,n,a);return}if(!e.draftLocations_){let t=e.draftLocations_=new Map;SS(i,(e,n)=>{if(_S(n)){let r=t.get(n)||[];r.push(e),t.set(n,r)}})}let o=e.draftLocations_.get(t)??lC;for(let e of o)ES(i,e,n,a)}function dC(e,t,n){e.callbacks_.push(function(r){let i=t;if(!i||!cC(i,r))return;r.mapSetPlugin_?.fixSetContents(i);let a=LS(i);uC(e,i.draft_??i,a,n),fC(i,r)})}function fC(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)}sC(e)}}function pC(e,t,n){let{scope_:r}=e;if(_S(n)){let i=n[oS];cC(i,r)&&i.callbacks_.push(function(){CC(e),uC(e,n,LS(i),t)})}else vS(n)&&e.callbacks_.push(function(){let i=IS(e);e.type_===3?i.has(n)&&mC(n,r.handledSet_,r):TS(i,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&mC(TS(e.copy_,t,e.type_),r.handledSet_,r)})}function mC(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||_S(e)||t.has(e)||!vS(e)||HS(e)?e:(t.add(e),SS(e,(r,i)=>{if(_S(i)){let t=i[oS];cC(t,n)&&(ES(e,r,LS(t),e.type_),sC(t))}else vS(i)&&mC(i,t,n)}),e)}function hC(e,t){let n=OS(e),r={type_:+!!n,scope_:t?t.scope_:ZS(),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=gC;n&&(i=[r],a=_C);let{revoke:o,proxy:s}=Proxy.revocable(i,a);return r.draft_=s,r.revoke_=o,[s,r]}var gC={get(e,t){if(t===oS)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=IS(e);if(!wS(i,t,e.type_))return bC(e,i,t);let a=i[t];if(e.finalized_||!vS(a)||r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&PS(t))return a;if(a===vC(e.base_,t)||yC(e,t,a)){CC(e);let n=e.type_===1?+t:t,r=TC(e.scope_,a,e,n);return e.copy_[n]=r}return a},has(e,t){return t in IS(e)},ownKeys(e){return Reflect.ownKeys(IS(e))},set(e,t,n){let r=xC(IS(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){let r=vC(IS(e),t),i=r?.[oS];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_.delete(t),!0;if(DS(n,r)&&(n!==void 0||wS(e.base_,t,e.type_)))return!0;CC(e),SC(e)}return e.copy_[t]===n&&(n!==void 0||wS(e.copy_,t,e.type_))||Number.isNaN(n)&&Number.isNaN(e.copy_[t])?!0:(e.copy_[t]=n,e.assigned_.set(t,!0),pC(e,t,n),!0)},deleteProperty(e,t){return CC(e),vC(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),SC(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let n=IS(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[hS]:!0,[pS]:e.type_!==1||t!==`length`,[mS]:r[mS],[gS]:n[t]}},defineProperty(){cS(11)},getPrototypeOf(e){return uS(e.base_)},setPrototypeOf(){cS(12)}},_C={};for(let e in gC){let t=gC[e];_C[e]=function(){let e=arguments;return e[0]=e[0][0],t.apply(this,e)}}_C.deleteProperty=function(e,t){return isNaN(parseInt(t))&&cS(13),_C.set.call(this,e,t,void 0)},_C.set=function(e,t,n){return t!==`length`&&isNaN(parseInt(t))&&cS(14),gC.set.call(this,e[0],t,n,e[0])};function vC(e,t){let n=e[oS];return(n?IS(n):e)[t]}function yC(e,t,n){return e.type_!==1||!e.allIndicesReassigned_||e.assigned_?.get(t)||!vS(n)||n[oS]?!1:e.baseRefs_.has(n)}function bC(e,t,n){let r=xC(t,n);return r?gS in r?r[gS]:r.get?.call(e.draft_):void 0}function xC(e,t){if(!(t in e))return;let n=uS(e);for(;n;){let e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=uS(n)}}function SC(e){e.modified_||(e.modified_=!0,e.parent_&&SC(e.parent_))}function CC(e){e.copy_||=(e.assigned_=new Map,RS(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var wC=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,n)=>{if(MS(e)&&!MS(t)){let n=t;t=e;let r=this;return function(e=n,...i){return r.produce(e,e=>t.call(this,e,...i))}}MS(t)||cS(6),n!==void 0&&!MS(n)&&cS(7);let r;if(vS(e)){let i=nC(this),a=TC(i,e,void 0),o=!0;try{r=t(a),o=!1}finally{o?eC(i):tC(i)}return $S(i,n),iC(r,i)}if(!e||!jS(e)){if(r=t(e),r===void 0&&(r=e),r===iS&&(r=void 0),this.autoFreeze_&&zS(r,!0),n){let t=[],i=[];qS(WS).generateReplacementPatches_(e,r,{patches_:t,inversePatches_:i}),n(t,i)}return r}cS(1,e)},this.produceWithPatches=(e,t)=>{if(MS(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]},NS(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),NS(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),NS(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){vS(e)||cS(8),_S(e)&&(e=EC(e));let t=nC(this),n=TC(t,e,void 0);return n[oS].isManual_=!0,tC(t),n}finishDraft(e,t){let n=e&&e[oS];(!n||!n.isManual_)&&cS(9);let{scope_:r}=n;return $S(r,t),iC(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=qS(WS).applyPatches_;return _S(e)?r(e,t):this.produce(e,e=>r(e,t))}};function TC(e,t,n,r){let[i,a]=kS(t)?qS(US).proxyMap_(t,n):AS(t)?qS(US).proxySet_(t,n):hC(t,n);return(n?.scope_??ZS()).drafts_.push(i),a.callbacks_=n?.callbacks_??[],a.key_=r,n&&r!==void 0?dC(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 EC(e){return _S(e)||cS(10,e),DC(e)}function DC(e){if(!vS(e)||HS(e))return e;let t=e[oS],n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=RS(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=RS(e,!0);return SS(n,(e,t)=>{ES(n,e,DC(t))},r),t&&(t.finalized_=!1),n}function OC(){sS.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=FS(TS(e,n.key_)),i=TS(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||wS(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=TS(o,e,c),f=TS(s,e,c),p=l?wS(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===iS?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(AS(e))return new Set(Array.from(e).map(u));let t=Object.create(uS(e));for(let n in e)t[n]=u(e[n]);return wS(e,aS)&&(t[aS]=e[aS]),t}function d(e){return _S(e)?u(e):e}YS(WS,{applyPatches_:l,generatePatches_:i,generateReplacementPatches_:c,getPath:e})}globalThis.Iterator?.from;var kC=new wC,AC=kC.produce,jC=kC.produceWithPatches.bind(kC),MC=kC.applyPatches.bind(kC),NC=1e3;function PC(e,t){if(e.add(t),e.size>NC){let t=e.values().next().value;t!==void 0&&e.delete(t)}}function FC(e){let{enablePatches:t=!1}=e;t&&OC();let n=Yx(),r=e.initialValue,i=new Set;return{on:n.on,value:()=>r,patch:(e,t=rS())=>{i.has(t)||(OC(),r=MC(r,e),PC(i,t),n.emit(`updated`,r,void 0,t))},mutate:(e,a=rS())=>{if(!i.has(a)){if(PC(i,a),t){let[t,i]=jC(r,e);if(t===r)return;r=t,n.emit(`updated`,r,i,a)}else{let t=AC(r,e);if(t===r)return;r=t,n.emit(`updated`,r,void 0,a)}}},syncIds:i}}var IC=typeof self==`object`?self:globalThis,LC=new Set([`Error`,`EvalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`,`AggregateError`]),RC=new Set([`Boolean`,`Number`,`String`,`Int8Array`,`Uint8Array`,`Uint8ClampedArray`,`Int16Array`,`Uint16Array`,`Int32Array`,`Uint32Array`,`Float16Array`,`Float32Array`,`Float64Array`,`BigInt64Array`,`BigUint64Array`]);function zC(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=LC.has(e)?IC[e]:void 0;return n(new(r??IC.Error)(t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}}if(typeof a==`string`&&RC.has(a))return n(new IC[a](o),i);throw TypeError(`unable to deserialize unsafe or unknown type: ${String(a)}`)};return r}function BC(e){return zC(new Map,e)(0)}var VC=``,{toString:HC}={},{keys:UC}=Object;function WC(e){let t=typeof e;if(t!==`object`||!e)return[0,t];let n=HC.call(e).slice(8,-1);switch(n){case`Array`:return[1,VC];case`Object`:return[2,VC];case`Date`:return[3,VC];case`RegExp`:return[4,VC];case`Map`:return[5,VC];case`Set`:return[6,VC];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:n.includes(`Error`)?[7,n]:[2,n]}function GC([e,t]){return e===0&&(t===`function`||t===`symbol`)}function KC(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]=WC(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 UC(r))(e||!GC(WC(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||!(GC(WC(n))||GC(WC(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!GC(WC(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a}function qC(e,t={}){let n=[];return KC(!(t.json||t.lossy),!!t.json,new Map,n)(e),n}var{parse:JC,stringify:YC}=JSON,XC={json:!0,lossy:!0};function ZC(e){return BC(JC(e))}function QC(e){return YC(qC(e,XC))}function $C(e){return BC(e)}function ew(e){return QC(e)}function tw(e){return ZC(e)}var nw=256,rw=class extends Error{name=`StreamClosedError`};function iw(e={}){let t=e.id??rS(),n=Math.max(0,e.replayWindow??0),r=Yx(),i=new AbortController,a=[],o=!1,s=0;function c(e){if(o)throw new rw(`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=ow(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 aw(e={}){let t=e.id??rS(),n=Math.max(1,e.highWaterMark??nw),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 ow(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 sw=128;function cw(e){return e.replace(/[^\w-]+/g,`_`).slice(0,sw)}var lw=`modulepreload`,uw=function(e,t){return new URL(e,t).href},dw={},fw=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=uw(t,n),t=s(t),t in dw)return;dw[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`:lw,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)})},pw=`__connection.json`,mw=`__DEVFRAME_CONNECTION__`,hw=`x-birpc-session`,gw=`__rpc-dump/index.json`,_w=`devframe:services`,vw=`devframe_otp`,yw=`devframe_auth_token`;hx.postMessage.remoteAssetsError;var bw=class{cacheMap=new Map;options;keySerializer;constructor(e){this.options=e,this.keySerializer=e.keySerializer||(e=>Jx(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()}},xw=vx({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 Sw(e){if(e.agent&&e.jsonSerializable===!1)throw xw.DF0019({name:e.name});e.agent&&!e.jsonSerializable&&(e.jsonSerializable=!0)}async function Cw(e,t){let n=e[`~standard`].validate(t);return n instanceof Promise?await n:n}function ww(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 Tw(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 Ow(e,t){let n=e.handler;if(!n){let r=await Dw(e,t);if(!r.handler)throw xw.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 Tw(e.name,r,t),o=await a(...n);return await Ew(e.name,i,o)}}var kw=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 Ow(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 xw.DF0021({name:e.name});Sw(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 xw.DF0022({name:e.name});Sw(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 Ow(this.definitions.get(e),this.context)}getSchema(e){let t=this.definitions.get(e);if(!t)throw xw.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 Aw(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 Mw(t,`undefined`,r,e);return n}return i!==null&&jw(i,r,e,t),n})}function jw(e,t,n,r){if(typeof e==`bigint`)throw Mw(r,`BigInt`,t,n);if(typeof e!=`object`)return;if(e instanceof Map)throw Mw(r,`Map`,t,n);if(e instanceof Set)throw Mw(r,`Set`,t,n);if(e instanceof Date)throw Mw(r,`Date`,t,n);if(Array.isArray(e))return;let i=Object.getPrototypeOf(e);if(i!==null&&i!==Object.prototype)throw Mw(r,e.constructor?.name??`class instance`,t,n)}function Mw(e,t,n,r){let i=Nw(n,r);return xw.DF0020({name:e||``,type:t,path:i})}function Nw(e,t){return Array.isArray(e)?`[${t}]`:t===``?``:t}var Pw=`__DEVFRAME_CONNECTION_META__`,Fw=`__DEVFRAME_CONNECTION_AUTH_TOKEN__`;function Iw(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 Lw(){return Iw(mw)}function Rw(){return Iw(Pw)}function zw(e){if(e)return e;try{let e=localStorage.getItem(Fw);if(e)return e}catch{}return Iw(Fw)}function Bw(e){globalThis[mw]=e,globalThis[Pw]={...e.connectionMeta,baseUrl:e.metaBaseUrl},e.authToken&&Vw(e.authToken)}function Vw(e){try{localStorage.setItem(Fw,e)}catch{}globalThis[Fw]=e;let t=Lw();t&&(globalThis[mw]={...t,authToken:e})}function Hw(e){let t=eS(pw,e);try{return new URL(t,globalThis.location?.href).href}catch{return t}}function Uw(e,t){return t&&t!==e.authToken?{...e,authToken:t}:e}function Ww(){let e=Lw();if(e)return Uw(e,zw()??e.authToken??e.connectionMeta.authToken);let t=Rw();if(t)return{connectionMeta:t,metaBaseUrl:t.baseUrl??Hw(`./`),authToken:zw(t.authToken)}}async function Gw(e={}){if(e.connection){let t=Uw(e.connection,zw(e.authToken??e.connection.authToken??e.connection.connectionMeta.authToken));return Bw(t),t}let t=Array.isArray(e.baseURL)?e.baseURL:[e.baseURL??`./`];if(e.connectionMeta){let n={connectionMeta:e.connectionMeta,metaBaseUrl:Hw(t[0]??`./`),authToken:zw(e.authToken??e.connectionMeta.authToken)};return Bw(n),n}let n=Ww();if(n){let t=Uw(n,zw(e.authToken??n.authToken??n.connectionMeta.authToken));return Bw(t),t}let r=[];for(let n of t){let t=eS(pw,n),i=Hw(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:zw(e.authToken??r.authToken)};return Bw(o),o}catch(e){r.push(e)}}throw Error(`Failed to get connection meta from ${t.join(`, `)}`,{cause:r})}var Kw=class extends Error{name=`DevframeConnectionError`;kind;constructor(e,t,n){super(t,n),this.kind=e}};function qw(e=vw){try{let t=globalThis.location?.hash?.replace(/^#/,``)??``;return new URLSearchParams(t).get(e)||void 0}catch{return}}function Jw(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 Yw(e=vw){let t=qw(e);return t&&Jw(e),t}async function Xw(e,t={}){let n=Yw(t.param??`devframe_otp`);return n?e.isTrusted?!0:e.requestTrustWithCode(n):!1}function Zw(e){let t={},n=new WeakMap,r,i=()=>(r??=e.sharedState.get(_w,{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 Qw(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:hx.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:hx.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=FC({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(hx.client.isTrustedUpdated,e=>{e&&!n&&(n=!0,d())})}})}}}var $w=new Map;function eT(e=$w){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?Aw(n,r??``):`s:${ew(n)}`},deserialize:e=>{let n=e.startsWith(`s:`)?tw(e.slice(2)):JSON.parse(e);return n.t===`q`&&n.i&&n.m&&t.set(n.i,n.m),n}}}function tT(){}function nT(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 rT(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 iT(e){let{onConnected:t=tT,onError:n=tT,onDisconnected:r=tT,definitions:i,fetch:a=globalThis.fetch.bind(globalThis)}=e,o=e.url;e.authToken&&(o=`${o}${o.includes(`?`)?`&`:`?`}${yw}=${encodeURIComponent(e.authToken)}`);let s=eT(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=nT(r);if(!e)break;r=e.rest;let{event:t,data:n}=rT(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`,[hw]: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 aT(e,t){let{channel:n,rpcOptions:r={}}=t;return Ox(e,{...n,timeout:-1,...r,proxify:!1})}function oT(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(hx.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 Kw(`connection`,`[devframe] Not connected to the devframe server`,{cause:u??void 0}):l===`unauthorized`?new Kw(`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(hx.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 Kw(`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(hx.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(hx.client.connectionError,e),m(new Kw(`connection`,`[devframe] Connection to the devframe server failed`,{cause:e}))},onDisconnected(){l!==`error`&&f(`disconnected`),m(new Kw(`connection`,`[devframe] Disconnected from the devframe server`,{cause:u??void 0}))}}),te=aT(a.functions,{channel:ee,rpcOptions:o});a.register({name:hx.broadcast.authRevoked,type:`event`,handler:()=>{c=!1;let e=new Kw(`auth`,`[devframe] The devframe server revoked this client's trust`);f(`unauthorized`,e),i.emit(hx.client.connectionError,e),m(e),i.emit(hx.client.isTrustedUpdated,!1)}});let ne=n;async function re(e){ne=e;let t=await te.$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 Kw(`auth`,`[devframe] The devframe server refused this client's credentials`);f(`unauthorized`,e),i.emit(hx.client.connectionError,e)}return i.emit(hx.client.isTrustedUpdated,c),t.isTrusted}async function ie(e){let t=(await te.$call(`anonymous:devframe:auth:exchange`,{code:e,ua:navigator.userAgent,origin:location.origin}))?.authToken??null;return t&&(ne=t,c=!0,d.resolve(!0),f(`connected`),i.emit(hx.client.isTrustedUpdated,!0)),t}async function ae(e={}){await te.$call(`anonymous:devframe:auth:request-code`,{ua:navigator.userAgent,origin:location.origin,...e.reissue?{reissue:!0}:{}})}async function oe(){return c?!0:re(ne??``)}async function se(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:oe,requestTrustWithToken:re,requestTrustWithCode:ie,requestAuthCode:ae,ensureTrusted:se,call:(...e)=>{let t=String(e[0]),n=h();return n?(i.emit(hx.client.error,n,t),Promise.reject(n)):g(te.$call(...e),t)},callEvent:(...e)=>{let t=h();if(t){i.emit(hx.client.error,t,String(e[0]));return}return te.$callEvent(...e)},callOptional:(...e)=>{let t=String(e[0]),n=h();return n?(i.emit(hx.client.error,n,t),Promise.reject(n)):g(te.$callOptional(...e),t)},close:()=>{ee.close()}}}function sT(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 cT(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},sseOptions:s={},callTimeout:c=0}=e,l=sT(n.sse,r??`./`,location);return oT({transport:`sse`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>iT({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 lT(e){let{name:t,message:n,cause:r,...i}=e,a=r instanceof Error?r:uT(r)?lT(r):r,o=a===void 0?Error(n):Error(n,{cause:a});return o.name=t,Object.assign(o,i),o}function uT(e){return typeof e==`object`&&!!e&&typeof e.message==`string`&&typeof e.name==`string`}function dT(e){return typeof e==`object`&&!!e&&e.type===`static`&&typeof e.path==`string`}function fT(e){return typeof e==`object`&&!!e&&e.type===`query`&&typeof e.records==`object`&&e.records!==null}function pT(e){return typeof e==`object`&&!!e&&(`output`in e||`error`in e)}function mT(e){if(e.error)throw lT(e.error);return e.output}function hT(e){return e.some(e=>e!=null)}function gT(e){return typeof e==`object`&&e&&`serialization`in e&&`data`in e?e.data:e}function _T(e,t){let n=new Map,r=new Map;function i(e,t){return t===`structured-clone`&&Array.isArray(e)?$C(e):e}function a(e,t){return i(gT(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 pT(r)?mT(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(dT(r)){if(hT(n))throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`);return await o(r)}if(fT(r)){let e=Jx(n),i=r.records[e];if(i)return mT(await s(i,r.serialization));if(r.fallback)return mT(await s(r.fallback,r.serialization));throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`)}if(!hT(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 vT(e){let t=_T(await e.fetchJsonFromBases(gw),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 yT=``;function bT(e,t){return`${e}${yT}${t}`}function xT(e){let t=new Map,n=new Map;e.client.register({name:hx.broadcast.streamingChunk,type:`event`,handler(e,n,r,i){t.get(bT(e,n))?._push(r,i)}}),e.client.register({name:hx.broadcast.streamingEnd,type:`event`,handler(e,n,r){let i=bT(e,n),a=t.get(i);a&&(a._end(r),t.delete(i))}}),e.client.register({name:hx.broadcast.streamingUploadCancel,type:`event`,handler(e,t){let r=bT(e,t),i=n.get(r);i&&(i.abort(`server cancelled upload`),n.delete(r))}}),e.events.on(hx.client.isTrustedUpdated,n=>{if(n)for(let[n,r]of t){if(r.cancelled||r.done)continue;let t=n.indexOf(yT);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=bT(n,r),o=t.get(a);if(o)return o;let s=aw({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(hx.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=bT(t,r),a=n.get(i);if(a)return a;let o=iw({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 ST(){}var CT=new Map;function wT(e){let t=e.url;e.authToken&&(t=`${t}?${yw}=${encodeURIComponent(e.authToken)}`);let n=new WebSocket(t),{onConnected:r=ST,onError:i=ST,onDisconnected:a=ST,definitions:o=CT}=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=eT(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 TT(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 tS(a,/^https/i.test(a)?`wss://`:`ws://`);let o=new URL(a,r);return o.protocol=i,o.href}function ET(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},wsOptions:s={},callTimeout:c=0}=e,l=TT(n.websocket,r??`./`,location);return oT({transport:`websocket`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>wT({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 DT(e){return e.includes(`:`)}function OT(e,t){return DT(t)?t:`${e}:${t}`}function kT(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 AT(e,t,n){let r=`devframe:settings:${n}:${t}`,i;function a(){return i||=e.sharedState.get(r,{initialValue:{}}),i}return kT(a)}function jT(e,t){return{global:AT(e,t,`global`),project:AT(e,t,`project`)}}function MT(e,t){return{namespace:t,base:e,rpc:{namespace:t,register(n){if(DT(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(OT(t,n),...r)),callEvent:((n,...r)=>e.callEvent(OT(t,n),...r)),callOptional:((n,...r)=>e.callOptional(OT(t,n),...r)),sharedState:((n,r)=>e.sharedState.get(OT(t,n),r)),streaming:{subscribe:(n,r,i)=>e.streaming.subscribe(OT(t,n),r,i),upload:(n,r)=>e.streaming.upload(OT(t,n),r)}},settings:jT(e,t),scope:e.scope}}function NT(){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 PT(e,t={}){let n=t.modelContext??NT();if(!n)return()=>{};let r=n,i=new Map,a=new Map;function o(t,n){let o=cw(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=kx(t.type,n),u=r.registerTool({name:o,description:n.description,inputSchema:Mx(t.args),annotations:{title:n.title??t.name,readOnlyHint:l===`read`,destructiveHint:l===`destructive`},execute:n=>FT(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 FT(e,t,n){try{let r=Px(n,e.args?.length);return{content:[{type:`text`,text:IT(await(await Ow(e,t))(...r))}]}}catch(e){return{isError:!0,content:[{type:`text`,text:LT(e)}]}}}function IT(e){return e===void 0?`undefined`:typeof e==`string`?e:JSON.stringify(e,null,2)}function LT(e){if(!(e instanceof Error))return String(e);let t=e.cause instanceof Error?` (cause: ${e.cause.message})`:``;return`${e.name}: ${e.message}${t}`}function RT(e,t){if(t.backend===`static`)return`static`;let n=t.websocket!==void 0,r=t.sse!==void 0;if(e===`websocket`){if(!n)throw Error(`[devframe] transport: 'websocket' was requested, but this server does not advertise a WebSocket endpoint`);return`websocket`}if(e===`sse`){if(!r)throw Error(`[devframe] transport: 'sse' was requested, but this server does not advertise an SSE endpoint`);return`sse`}if(t.backend===`sse`&&r)return`sse`;if(n)return`websocket`;if(r)return`sse`;throw Error(`[devframe] This server advertises no RPC transport (backend "none"), so there is nothing to connect to. Enable the WebSocket or SSE endpoint on the server, or use its static/MCP surfaces instead.`)}async function zT(e={}){let{baseURL:t=`./`,rpcOptions:n={},cacheOptions:r=!1}=e,i=Yx(),a=Array.isArray(t)?t:[t],o=await Gw(e),{connectionMeta:s,metaBaseUrl:c,authToken:l}=o,u=a[0]??`./`;try{u=new URL(`.`,c).href}catch{}let d=new bw({functions:[],...typeof e.cacheOptions==`object`?e.cacheOptions:{}}),f={rpc:void 0},p=new kw(f),m=e.webmcp===!1?void 0:PT(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(eS(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)}}},te=RT(e.transport??`auto`,s),ne=te===`static`?await vT({fetchJsonFromBases:_}):te===`sse`?cT({...ee,sseOptions:e.sseOptions}):ET({...ee,wsOptions:e.wsOptions}),re;try{re=new BroadcastChannel(`devframe-auth`)}catch{}let ie,ae=!1;function oe(e){return((...t)=>ae||!ie?e(...t):ie.then(()=>e(...t)))}function se(){g=!0;try{h?.(),m?.()}finally{try{re?.close()}finally{ne.close?.()}}}let ce={events:i,get isTrusted(){return ne.isTrusted},get status(){return ne.status},get connectionError(){return ne.connectionError},get transport(){return ne.transport??te},get connection(){return o},connectionMeta:s,ensureTrusted:ne.ensureTrusted,requestTrust:ne.requestTrust,requestTrustWithToken:async e=>(Vw(e),o={...o,authToken:e},ne.requestTrustWithToken(e)),requestTrustWithCode:async e=>{let t=await ne.requestTrustWithCode(e);if(!t)return!1;Vw(t),o={...o,authToken:t};try{re?.postMessage({type:`auth-update`,authToken:t})}catch{}return!0},requestAuthCode:e=>ne.requestAuthCode(e),call:oe(ne.call),callEvent:oe(ne.callEvent),callOptional:oe(ne.callOptional),client:p,sharedState:void 0,services:void 0,streaming:void 0,cacheManager:d,scope:void 0,close:se};ce.sharedState=Qw(ce),ce.streaming=xT(ce),ce.services=Zw(ce);let le=new Map;ce.scope=(e=>{if(!e)return ce;let t=le.get(e);return t||(t=MT(ce,e),le.set(e,t)),t}),f.rpc=ce;function ue(){try{return typeof window<`u`&&window.self===window.top}catch{return!1}}async function de(){if(e.simpleAuth!==!1&&ue()&&typeof globalThis.prompt==`function`)for(await ce.requestAuthCode().catch(()=>{});!ce.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 ce.requestTrustWithCode(t))return}}async function fe(){let t=await ne.requestTrust(),n=e.otpParam??`devframe_otp`,r=n?await Xw(ce,{param:n}):!1;t||r||ce.isTrusted||await de()}return ie=fe().then(()=>{ae=!0},()=>{ae=!0}),s.mcp&&fw(async()=>{let{setupBrowserAgentRpcBridge:e}=await import(`./browser-agent-rpc-BXhoSh1z-Cq6OpQlN.js`);return{setupBrowserAgentRpcBridge:e}},[],import.meta.url).then(({setupBrowserAgentRpcBridge:e})=>{g||(h=e(ce))}).catch(()=>{}),re&&(re.onmessage=e=>{e.data?.type===`auth-update`&&e.data.authToken&&ce.requestTrustWithToken(e.data.authToken)}),ce}var BT=zT,VT=[`components`,`injectors`,`signals`,`ngrx`,`forms`,`router`,`pipes`,`http`,`analog`,`capacitor`,`errors`],HT=[`angular`,`ngrx`,`analog`,`angular-native`,`nativescript`,`capacitor`];function UT(e){return`pangular:${e}`}var WT=[`forms`,`router`,`ngrx`,`http`,`analog`,`components`],GT={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},idleAfterMs:{default:6e4,min:0,max:6e5}},KT={"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`},qT=[[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 JT(e){return qT.some(([t])=>t===e)}var YT=`pangular`,XT={mod:`Mod`,ctrl:`Ctrl`,control:`Ctrl`,meta:`Meta`,cmd:`Meta`,command:`Meta`,alt:`Alt`,option:`Alt`,opt:`Alt`,shift:`Shift`},ZT=[`Mod`,`Ctrl`,`Meta`,`Alt`,`Shift`];function QT(e){if(typeof e!=`string`||e.length>40)return;let t=e.split(`+`).map(e=>e.trim());if(t.some(e=>!e))return;let n=new Set,r;for(let e of t){let t=XT[e.toLowerCase()];if(t){if(n.has(t))return;n.add(t);continue}if(r!==void 0)return;if(/^[a-z0-9]$/i.test(e))r=e.toUpperCase();else if(/^f([1-9]|1[0-2])$/i.test(e))r=e.toUpperCase();else return}if(r&&[...n].some(e=>e!==`Shift`)&&!(n.has(`Mod`)&&(n.has(`Ctrl`)||n.has(`Meta`))))return[...ZT.filter(e=>n.has(e)),r].join(`+`)}function $T(e,t,n){let r=t.split(`+`),i=r.pop(),a=new Set(r),o=a.has(`Ctrl`)||a.has(`Mod`)&&!n,s=a.has(`Meta`)||a.has(`Mod`)&&n;if(e.ctrlKey!==o||e.metaKey!==s||e.altKey!==a.has(`Alt`)||e.shiftKey!==a.has(`Shift`))return!1;if(/^F\d+$/.test(i))return e.key.toUpperCase()===i;let c=/^\d$/.test(i)?`Digit${i}`:`Key${i}`;return e.code?e.code===c:e.key.toUpperCase()===i}function eE(e,t){if(!t)return e.replace(/^Mod\b/,`Ctrl`);let n={Mod:`⌘`,Meta:`⌘`,Ctrl:`⌃`,Alt:`⌥`,Shift:`⇧`};return e.split(`+`).map(e=>n[e]??e).join(``)}var tE=[{id:`dashboard`,label:`Dashboard`},{id:`timeline`,label:`Timeline`},{id:`analog`,label:`Analog`,inspector:`analog`},{id:`components`,label:`Components`,inspector:`components`},{id:`routes`,label:`Routes`,inspector:`router`},{id:`signals`,label:`Signals`,inspector:`signals`},{id:`injectors`,label:`Injectors`,inspector:`injectors`},{id:`store`,label:`Store`,inspector:`ngrx`},{id:`forms`,label:`Forms`,inspector:`forms`},{id:`pipes`,label:`Pipes`,inspector:`pipes`},{id:`network`,label:`SSR & HTTP`,inspector:`http`},{id:`errors`,label:`Errors`,inspector:`errors`},{id:`capacitor`,label:`Capacitor`,inspector:`capacitor`}],nE=1e4;function rE(e){return tE.filter(t=>!(`inspector`in t)||e.inspectors[t.inspector])}var iE={components:`a component instance, by its id in the component tree`,injectors:`a component's element injector, by the component's id`,forms:`a form, by its id`},aE=200;function oE(e){let t=new URLSearchParams({tab:e.tab});return e.id&&t.set(`id`,e.id),e.page&&t.set(`page`,e.page),`#${t.toString()}`}function sE(e){let t=new URLSearchParams(e.replace(/^#/,``)),n=e=>{let n=t.get(e)?.trim();return n&&n.length<=aE?n:void 0},r=n(`tab`);if(!r)return null;let i=n(`id`),a=n(`page`);return{tab:r,...i?{id:i}:{},...a?{page:a}:{}}}var cE=[{id:`settings`,title:`Open settings`,group:`Go to`,keywords:`preferences tabs`},{id:`pick-component`,title:`Pick component on page`,group:`Actions`,keywords:`select inspect element`,inspector:`components`},{id:`cd-record-start`,title:`Start recording change detection`,group:`Actions`,keywords:`profiler cycles`,inspector:`components`},{id:`cd-record-stop`,title:`Stop recording change detection`,group:`Actions`,keywords:`profiler cycles`,inspector:`components`},{id:`cd-clear`,title:`Clear change detection recording`,group:`Actions`,keywords:`reset recordings cycles`,inspector:`components`},{id:`theme:system`,title:`Theme: follow the system`,group:`Theme`,keywords:`auto`},{id:`theme:light`,title:`Theme: light`,group:`Theme`},{id:`theme:dark`,title:`Theme: dark`,group:`Theme`},{id:`dock:float`,title:`Popup: float`,group:`Popup`,keywords:`dock`,popupOnly:!0},{id:`dock:bottom`,title:`Popup: dock to the bottom`,group:`Popup`,keywords:`dock`,popupOnly:!0},{id:`dock:right`,title:`Popup: dock to the right`,group:`Popup`,keywords:`dock`,popupOnly:!0},{id:`dock:reset-size`,title:`Popup: reset the docked size`,group:`Popup`,keywords:`splitter resize height width`,popupOnly:!0},{id:`popout`,title:`Popup: open in its own window`,group:`Popup`,keywords:`pop out detach new window`,popupOnly:!0},{id:`popout:return`,title:`Popup: back into the page`,group:`Popup`,keywords:`pop in attach dock window`,popupOnly:!0}];function lE(e){let t=rE(e).map(e=>({id:`tab:${e.id}`,title:`Go to ${e.label}`,group:`Go to`,keywords:`tab open`})),n=cE.filter(t=>!t.inspector||e.inspectors[t.inspector]).map(({inspector:e,...t})=>t);return[...t,...n]}function uE(e){return e&&typeof e==`object`&&!Array.isArray(e)?e:{}}function dE(e,t){return typeof e==`boolean`?e:t}var fE=100,pE=100;function mE(e){if(!Array.isArray(e))return[];let t=e.filter(e=>typeof e==`string`).map(e=>e.trim()).filter(e=>e&&e.length<=pE);return[...new Set(t)].slice(0,fE)}function hE(e,t){let{default:n,min:r,max:i}=GT[t];return typeof e!=`number`||!Number.isFinite(e)?n:Math.min(i,Math.max(r,Math.round(e)))}function gE(e,t){return Object.fromEntries(e.map(e=>[e,t(e)]))}function _E(e){let t=uE(e),n=uE(t.agent),r=uE(t.inspectors),i=uE(n.tools),a=uE(t.actions),o=dE(t.actions,!0),s=uE(t.redaction),c=uE(t.limits),l=gE(VT,e=>dE(r[e],!0));return{inspectors:l,agent:{readOnly:dE(n.readOnly,!1),tools:gE(VT,e=>l[e]&&dE(i[e],!0))},actions:gE(WT,e=>l[e]&&dE(a[e],o)),redaction:{secretNames:mE(s.secretNames),unmask:mE(s.unmask)},limits:Object.fromEntries(Object.keys(GT).map(e=>[e,hE(c[e],e)])),popup:{hotkey:vE(uE(t.popup).hotkey)}}}function vE(e){return e===!1?!1:QT(e)??`Alt+Shift+P`}function yE(e){let t=e?.configs;return _E(t?.[YT])}function bE(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 xE={components:`Components`,injectors:`Injectors`,signals:`Signals`,ngrx:`NgRx`,forms:`Forms`,router:`Router`,pipes:`Pipes`,http:`HTTP`,analog:`Analog`,capacitor:`Capacitor`,errors:`Errors`},SE={forms:`Form writes`,router:`Navigation`,ngrx:`NgRx restore and dispatch`,http:`HTTP mocking`,analog:`Analog API calls`,components:`Component edits`},CE={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`,idleAfterMs:e=>e?`idle ${e/1e3} s after the last agent call`:`never idle`};function wE(e){let t=[],n=(e,n)=>{n.length&&t.push({label:e,value:n.join(`, `)})},r=VT.filter(t=>e.inspectors[t]);return n(`Inspectors off`,VT.filter(t=>!e.inspectors[t]).map(e=>xE[e])),n(`Agent`,e.agent.readOnly?[`Read-only`]:[]),n(`Hidden from the agent`,r.filter(t=>!e.agent.tools[t]).map(e=>xE[e])),n(`Blocked actions`,WT.filter(t=>e.inspectors[t]&&!e.actions[t]).map(e=>SE[e])),n(`Extra secret names`,e.redaction.secretNames),n(`Unmasked names`,e.redaction.unmask),n(`Limits`,Object.keys(GT).filter(t=>e.limits[t]!==GT[t].default).map(t=>CE[t](e.limits[t]))),e.popup.hotkey!==`Alt+Shift+P`&&n(`Popup shortcut`,[e.popup.hotkey===!1?`Off`:e.popup.hotkey]),t}function TE(e){let t={tags:[],directives:[],text:``},n=e.toLowerCase();return n=n.replace(/<\s*([^<>\s]+)\s*>/g,(e,n)=>(t.tags.push({value:n,exact:!0}),` `)),n=n.replace(/\[\s*([^[\]\s]+)\s*\]/g,(e,n)=>(t.directives.push({value:n,exact:!0}),` `)),n=n.replace(/(^|\s)([<[])([^<>[\]\s]*)$/,(e,n,r,i)=>(i&&(r===`<`?t.tags:t.directives).push({value:i,exact:!1}),n)),t.text=n.replace(/\s+/g,` `).trim(),t}function EE(e){return!e.tags.length&&!e.directives.length&&!e.text}function DE(e,t){let n=e.tag.toLowerCase(),r=(e.directives??[]).map(e=>e.toLowerCase()),i=(e.attributes??[]).map(e=>e.toLowerCase()),a=[...r,...r.map(e=>e.replace(/directive$/,``)),...i];for(let{value:e,exact:r}of t.tags)if(r?n!==e:!n.startsWith(e))return!1;for(let{value:e,exact:n}of t.directives)if(!a.some(t=>n?t===e:t.includes(e)))return!1;if(t.text){let a=t.text;if(!(e.name.toLowerCase().includes(a)||n.includes(a)||r.some(e=>e.includes(a))||i.some(e=>e.includes(a))))return!1}return!0}var OE={debugApi:{subject:`Live data`,since:`12.0`},injectorProviders:{subject:`Reading providers and environment injectors`,since:`16.2`},injectorMetadata:{subject:`The full injector tree`,since:`17.0`},isSignal:{subject:`Telling signals apart in component values`,since:`17.1`},signalGraph:{subject:`The live signal graph`,since:`20.1`},deferBlocks:{subject:`Listing @defer blocks`,since:`19.1`},forBlocks:{subject:`Listing @for blocks`,since:`22.0`},profiler:{subject:`Recording change detection`,since:`20.0`},angularProfiling:{subject:`Angular profiling`,since:`20.0`},routerInstance:{subject:`The router debug util`,since:`20.3`}};function kE(e){let t=/^(\d+)\.(\d+)/.exec(e.trim());return t?`${t[1]}.${t[2]}`:e.trim()}function AE(e){let t=/^(\d+)(?:\.(\d+))?/.exec(e.trim());return t?[Number(t[1]),Number(t[2]??0)]:null}function jE(e,t){let n=AE(e),r=AE(t);return!n||!r?!1:n[0]===r[0]?n[1]>=r[1]:n[0]>r[0]}function ME(e,t){return e?.capabilities?.[t]===!1}function NE(e,t){let n=OE[e],r=`${n.subject} needs Angular ${n.since} or later`;if(!t)return`${r}; this page's Angular version is unknown.`;let i=kE(t);return jE(t,n.since)?`${r} in a development build; this page runs Angular ${i} without it, which usually means a production build.`:`${r}; this page runs Angular ${i}.`}var PE=`pangular-page-id`,FE=null;function IE(e){FE=e}function LE(){if(FE)return FE;try{return new URLSearchParams(location.search).get(`pageId`)||(window.top===window?null:sessionStorage.getItem(PE)||null)}catch{return null}}function RE(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 zE(e,t){return e?t?e.pages?.[t]??null:e:null}function BE(e,t){return e?t?e.pages?.[t]??null:e.graph??null:null}function VE(e,t,n){return e?e.scope(`pangular`).rpc.call(t,...n===void 0?[]:[n]):Promise.resolve(null)}function HE(e,t,n){return VE(e,t,n).then(e=>e,()=>null)}function UE(e){return e?.connectionMeta.backend===`static`}function WE(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 GE(e){return e.split(`@`)[1]??``}var KE={signal:`Signal Forms`,reactive:`Reactive`,template:`Template-driven`},qE={own:`validator`,directive:`template attribute`,tree:`cross-field rule`,async:`async`,parse:`parse`,submission:`server`,schema:`schema`,manual:`setErrors`},JE=HE,YE={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 XE(e){return YE[e]??e}var ZE=`https://pangular-inspector.dev/security/#opt-fields-in-or-out`;async function QE(e,t){return await JE(e,`request-form-action`,t)??{ok:!1,error:`The devtools server did not answer.`}}function $E(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 eD=/"(?:[^"\\\n]|\\.)*"|`([^`\n]*)`|\*\*/g;function tD(e){return(e??``).replace(/^_Labels, paths.*_\n\n/,``).replace(eD,(e,t)=>t??(e===`**`?``:e))}function nD(e){return yE(e?.connectionMeta)}function rD(e,t){return nD(e).actions[t]}var iD={components:`components`,routes:`router`,signals:`signals`,injectors:`injectors`,store:`ngrx`,forms:`forms`,pipes:`pipes`,network:`http`,analog:`analog`,capacitor:`capacitor`,errors:`errors`};function aD(e){return iD[e]}var oD=`https://pangular-inspector.dev/getting-started/configuration/#inspectors-and-agent-tools`;function sD(e,t){let n=iD[e];return!n||t.inspectors[n]}function cD(e,t){e&1&&(D(),Vg(0,`rect`,4)(1,`rect`,5)(2,`rect`,6)(3,`rect`,7))}function lD(e,t){e&1&&(D(),Vg(0,`path`,8)(1,`circle`,9)(2,`circle`,10)(3,`path`,11))}function uD(e,t){e&1&&(D(),Vg(0,`path`,12)(1,`path`,13)(2,`path`,14))}function dD(e,t){e&1&&(D(),Vg(0,`circle`,15)(1,`path`,16)(2,`circle`,17))}function fD(e,t){e&1&&(D(),Vg(0,`path`,1))}function pD(e,t){e&1&&(D(),Vg(0,`path`,18)(1,`path`,19)(2,`path`,20)(3,`path`,21))}function mD(e,t){e&1&&(D(),Vg(0,`ellipse`,22)(1,`path`,23)(2,`path`,24))}function hD(e,t){e&1&&(D(),Vg(0,`rect`,25)(1,`path`,26)(2,`path`,27)(3,`path`,28))}function gD(e,t){e&1&&(D(),Vg(0,`circle`,29)(1,`path`,8)(2,`path`,30))}function _D(e,t){e&1&&(D(),Vg(0,`path`,31)(1,`path`,32)(2,`path`,33)(3,`path`,34)(4,`circle`,35))}function vD(e,t){e&1&&(D(),Vg(0,`circle`,36)(1,`path`,37))}function yD(e,t){e&1&&(D(),Vg(0,`circle`,29)(1,`path`,38)(2,`path`,39))}function bD(e,t){e&1&&(D(),Vg(0,`path`,2))}function xD(e,t){e&1&&(D(),Vg(0,`path`,3))}var SD=class e{name=$.required();static ɵfac=function(t){return new(t||e)};static ɵcmp=A({type:e,selectors:[[`app-tab-icon`]],inputs:{name:[1,`name`]},decls:15,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`,`M3 12h18`],[`cx`,`7`,`cy`,`12`,`r`,`2`],[`cx`,`14`,`cy`,`12`,`r`,`2`],[`d`,`M18 7v10`],[`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`,`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`],[`cx`,`12`,`cy`,`12`,`r`,`3`],[`d`,`M19.4 15a1.7 1.7 0 0 0 .3 1.8l.1.1a2 2 0 1 1-2.8 2.8l-.1-.1a1.7 1.7 0 0 0-1.8-.3 1.7 1.7 0 0 0-1 1.5V21a2 2 0 1 1-4 0v-.1a1.7 1.7 0 0 0-1.1-1.5 1.7 1.7 0 0 0-1.8.3l-.1.1a2 2 0 1 1-2.8-2.8l.1-.1a1.7 1.7 0 0 0 .3-1.8 1.7 1.7 0 0 0-1.5-1H3a2 2 0 1 1 0-4h.1a1.7 1.7 0 0 0 1.5-1.1 1.7 1.7 0 0 0-.3-1.8l-.1-.1a2 2 0 1 1 2.8-2.8l.1.1a1.7 1.7 0 0 0 1.8.3H9a1.7 1.7 0 0 0 1-1.5V3a2 2 0 1 1 4 0v.1a1.7 1.7 0 0 0 1 1.5 1.7 1.7 0 0 0 1.8-.3l.1-.1a2 2 0 1 1 2.8 2.8l-.1.1a1.7 1.7 0 0 0-.3 1.8V9a1.7 1.7 0 0 0 1.5 1H21a2 2 0 1 1 0 4h-.1a1.7 1.7 0 0 0-1.5 1Z`],[`d`,`M12 7v6`],[`d`,`M12 16.5v.01`]],template:function(e,t){if(e&1&&(D(),B(0,`svg`,0),M(1,cD,4,0)(2,lD,4,0)(3,uD,3,0)(4,dD,3,0)(5,fD,1,0,`:svg:path`,1)(6,pD,4,0)(7,mD,3,0)(8,hD,4,0)(9,gD,3,0)(10,_D,5,0)(11,vD,2,0)(12,yD,3,0)(13,bD,1,0,`:svg:path`,2)(14,xD,1,0,`:svg:path`,3),V()),e&2){let e;k(),N((e=t.name())===`dashboard`?1:e===`timeline`?2:e===`components`?3:e===`routes`?4:e===`signals`?5:e===`injectors`?6:e===`store`?7:e===`forms`?8:e===`network`?9:e===`pipes`?10:e===`settings`?11:e===`errors`?12:e===`analog`?13:e===`capacitor`?14:-1)}},styles:[`[_nghost-%COMP%] { +`))}}g()}return(async()=>{try{let e=await a(o,{headers:{accept:`text/event-stream`},signal:c.signal});if(!e.ok||!e.body)throw Error(`Devframe SSE stream request failed: ${e.status}`);await ee(e.body)}catch(e){if(c.signal.aborted){g();return}h(e instanceof Error?e:Error(String(e)))}})(),{close:()=>{l=!0,c.abort(),d?.cancel().catch(()=>{})},on:e=>{u=e},post:async e=>{let t;try{t=await m}catch{return}if(l){n(Error(`Devframe SSE channel is closed; message dropped`));return}try{let n=await a(o,{method:`POST`,headers:{"content-type":`text/plain; charset=utf-8`,[hw]: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 aT(e,t){let{channel:n,rpcOptions:r={}}=t;return Ox(e,{...n,timeout:-1,...r,proxify:!1})}function oT(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(hx.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 Kw(`connection`,`[devframe] Not connected to the devframe server`,{cause:u??void 0}):l===`unauthorized`?new Kw(`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(hx.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 Kw(`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(hx.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(hx.client.connectionError,e),m(new Kw(`connection`,`[devframe] Connection to the devframe server failed`,{cause:e}))},onDisconnected(){l!==`error`&&f(`disconnected`),m(new Kw(`connection`,`[devframe] Disconnected from the devframe server`,{cause:u??void 0}))}}),te=aT(a.functions,{channel:ee,rpcOptions:o});a.register({name:hx.broadcast.authRevoked,type:`event`,handler:()=>{c=!1;let e=new Kw(`auth`,`[devframe] The devframe server revoked this client's trust`);f(`unauthorized`,e),i.emit(hx.client.connectionError,e),m(e),i.emit(hx.client.isTrustedUpdated,!1)}});let ne=n;async function re(e){ne=e;let t=await te.$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 Kw(`auth`,`[devframe] The devframe server refused this client's credentials`);f(`unauthorized`,e),i.emit(hx.client.connectionError,e)}return i.emit(hx.client.isTrustedUpdated,c),t.isTrusted}async function ie(e){let t=(await te.$call(`anonymous:devframe:auth:exchange`,{code:e,ua:navigator.userAgent,origin:location.origin}))?.authToken??null;return t&&(ne=t,c=!0,d.resolve(!0),f(`connected`),i.emit(hx.client.isTrustedUpdated,!0)),t}async function ae(e={}){await te.$call(`anonymous:devframe:auth:request-code`,{ua:navigator.userAgent,origin:location.origin,...e.reissue?{reissue:!0}:{}})}async function oe(){return c?!0:re(ne??``)}async function se(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:oe,requestTrustWithToken:re,requestTrustWithCode:ie,requestAuthCode:ae,ensureTrusted:se,call:(...e)=>{let t=String(e[0]),n=h();return n?(i.emit(hx.client.error,n,t),Promise.reject(n)):g(te.$call(...e),t)},callEvent:(...e)=>{let t=h();if(t){i.emit(hx.client.error,t,String(e[0]));return}return te.$callEvent(...e)},callOptional:(...e)=>{let t=String(e[0]),n=h();return n?(i.emit(hx.client.error,n,t),Promise.reject(n)):g(te.$callOptional(...e),t)},close:()=>{ee.close()}}}function sT(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 cT(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},sseOptions:s={},callTimeout:c=0}=e,l=sT(n.sse,r??`./`,location);return oT({transport:`sse`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>iT({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 lT(e){let{name:t,message:n,cause:r,...i}=e,a=r instanceof Error?r:uT(r)?lT(r):r,o=a===void 0?Error(n):Error(n,{cause:a});return o.name=t,Object.assign(o,i),o}function uT(e){return typeof e==`object`&&!!e&&typeof e.message==`string`&&typeof e.name==`string`}function dT(e){return typeof e==`object`&&!!e&&e.type===`static`&&typeof e.path==`string`}function fT(e){return typeof e==`object`&&!!e&&e.type===`query`&&typeof e.records==`object`&&e.records!==null}function pT(e){return typeof e==`object`&&!!e&&(`output`in e||`error`in e)}function mT(e){if(e.error)throw lT(e.error);return e.output}function hT(e){return e.some(e=>e!=null)}function gT(e){return typeof e==`object`&&e&&`serialization`in e&&`data`in e?e.data:e}function _T(e,t){let n=new Map,r=new Map;function i(e,t){return t===`structured-clone`&&Array.isArray(e)?$C(e):e}function a(e,t){return i(gT(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 pT(r)?mT(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(dT(r)){if(hT(n))throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`);return await o(r)}if(fT(r)){let e=Jx(n),i=r.records[e];if(i)return mT(await s(i,r.serialization));if(r.fallback)return mT(await s(r.fallback,r.serialization));throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`)}if(!hT(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 vT(e){let t=_T(await e.fetchJsonFromBases(gw),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 yT=``;function bT(e,t){return`${e}${yT}${t}`}function xT(e){let t=new Map,n=new Map;e.client.register({name:hx.broadcast.streamingChunk,type:`event`,handler(e,n,r,i){t.get(bT(e,n))?._push(r,i)}}),e.client.register({name:hx.broadcast.streamingEnd,type:`event`,handler(e,n,r){let i=bT(e,n),a=t.get(i);a&&(a._end(r),t.delete(i))}}),e.client.register({name:hx.broadcast.streamingUploadCancel,type:`event`,handler(e,t){let r=bT(e,t),i=n.get(r);i&&(i.abort(`server cancelled upload`),n.delete(r))}}),e.events.on(hx.client.isTrustedUpdated,n=>{if(n)for(let[n,r]of t){if(r.cancelled||r.done)continue;let t=n.indexOf(yT);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=bT(n,r),o=t.get(a);if(o)return o;let s=aw({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(hx.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=bT(t,r),a=n.get(i);if(a)return a;let o=iw({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 ST(){}var CT=new Map;function wT(e){let t=e.url;e.authToken&&(t=`${t}?${yw}=${encodeURIComponent(e.authToken)}`);let n=new WebSocket(t),{onConnected:r=ST,onError:i=ST,onDisconnected:a=ST,definitions:o=CT}=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=eT(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 TT(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 tS(a,/^https/i.test(a)?`wss://`:`ws://`);let o=new URL(a,r);return o.protocol=i,o.href}function ET(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},wsOptions:s={},callTimeout:c=0}=e,l=TT(n.websocket,r??`./`,location);return oT({transport:`websocket`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>wT({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 DT(e){return e.includes(`:`)}function OT(e,t){return DT(t)?t:`${e}:${t}`}function kT(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 AT(e,t,n){let r=`devframe:settings:${n}:${t}`,i;function a(){return i||=e.sharedState.get(r,{initialValue:{}}),i}return kT(a)}function jT(e,t){return{global:AT(e,t,`global`),project:AT(e,t,`project`)}}function MT(e,t){return{namespace:t,base:e,rpc:{namespace:t,register(n){if(DT(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(OT(t,n),...r)),callEvent:((n,...r)=>e.callEvent(OT(t,n),...r)),callOptional:((n,...r)=>e.callOptional(OT(t,n),...r)),sharedState:((n,r)=>e.sharedState.get(OT(t,n),r)),streaming:{subscribe:(n,r,i)=>e.streaming.subscribe(OT(t,n),r,i),upload:(n,r)=>e.streaming.upload(OT(t,n),r)}},settings:jT(e,t),scope:e.scope}}function NT(){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 PT(e,t={}){let n=t.modelContext??NT();if(!n)return()=>{};let r=n,i=new Map,a=new Map;function o(t,n){let o=cw(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=kx(t.type,n),u=r.registerTool({name:o,description:n.description,inputSchema:Mx(t.args),annotations:{title:n.title??t.name,readOnlyHint:l===`read`,destructiveHint:l===`destructive`},execute:n=>FT(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 FT(e,t,n){try{let r=Px(n,e.args?.length);return{content:[{type:`text`,text:IT(await(await Ow(e,t))(...r))}]}}catch(e){return{isError:!0,content:[{type:`text`,text:LT(e)}]}}}function IT(e){return e===void 0?`undefined`:typeof e==`string`?e:JSON.stringify(e,null,2)}function LT(e){if(!(e instanceof Error))return String(e);let t=e.cause instanceof Error?` (cause: ${e.cause.message})`:``;return`${e.name}: ${e.message}${t}`}function RT(e,t){if(t.backend===`static`)return`static`;let n=t.websocket!==void 0,r=t.sse!==void 0;if(e===`websocket`){if(!n)throw Error(`[devframe] transport: 'websocket' was requested, but this server does not advertise a WebSocket endpoint`);return`websocket`}if(e===`sse`){if(!r)throw Error(`[devframe] transport: 'sse' was requested, but this server does not advertise an SSE endpoint`);return`sse`}if(t.backend===`sse`&&r)return`sse`;if(n)return`websocket`;if(r)return`sse`;throw Error(`[devframe] This server advertises no RPC transport (backend "none"), so there is nothing to connect to. Enable the WebSocket or SSE endpoint on the server, or use its static/MCP surfaces instead.`)}async function zT(e={}){let{baseURL:t=`./`,rpcOptions:n={},cacheOptions:r=!1}=e,i=Yx(),a=Array.isArray(t)?t:[t],o=await Gw(e),{connectionMeta:s,metaBaseUrl:c,authToken:l}=o,u=a[0]??`./`;try{u=new URL(`.`,c).href}catch{}let d=new bw({functions:[],...typeof e.cacheOptions==`object`?e.cacheOptions:{}}),f={rpc:void 0},p=new kw(f),m=e.webmcp===!1?void 0:PT(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(eS(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)}}},te=RT(e.transport??`auto`,s),ne=te===`static`?await vT({fetchJsonFromBases:_}):te===`sse`?cT({...ee,sseOptions:e.sseOptions}):ET({...ee,wsOptions:e.wsOptions}),re;try{re=new BroadcastChannel(`devframe-auth`)}catch{}let ie,ae=!1;function oe(e){return((...t)=>ae||!ie?e(...t):ie.then(()=>e(...t)))}function se(){g=!0;try{h?.(),m?.()}finally{try{re?.close()}finally{ne.close?.()}}}let ce={events:i,get isTrusted(){return ne.isTrusted},get status(){return ne.status},get connectionError(){return ne.connectionError},get transport(){return ne.transport??te},get connection(){return o},connectionMeta:s,ensureTrusted:ne.ensureTrusted,requestTrust:ne.requestTrust,requestTrustWithToken:async e=>(Vw(e),o={...o,authToken:e},ne.requestTrustWithToken(e)),requestTrustWithCode:async e=>{let t=await ne.requestTrustWithCode(e);if(!t)return!1;Vw(t),o={...o,authToken:t};try{re?.postMessage({type:`auth-update`,authToken:t})}catch{}return!0},requestAuthCode:e=>ne.requestAuthCode(e),call:oe(ne.call),callEvent:oe(ne.callEvent),callOptional:oe(ne.callOptional),client:p,sharedState:void 0,services:void 0,streaming:void 0,cacheManager:d,scope:void 0,close:se};ce.sharedState=Qw(ce),ce.streaming=xT(ce),ce.services=Zw(ce);let le=new Map;ce.scope=(e=>{if(!e)return ce;let t=le.get(e);return t||(t=MT(ce,e),le.set(e,t)),t}),f.rpc=ce;function ue(){try{return typeof window<`u`&&window.self===window.top}catch{return!1}}async function de(){if(e.simpleAuth!==!1&&ue()&&typeof globalThis.prompt==`function`)for(await ce.requestAuthCode().catch(()=>{});!ce.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 ce.requestTrustWithCode(t))return}}async function fe(){let t=await ne.requestTrust(),n=e.otpParam??`devframe_otp`,r=n?await Xw(ce,{param:n}):!1;t||r||ce.isTrusted||await de()}return ie=fe().then(()=>{ae=!0},()=>{ae=!0}),s.mcp&&fw(async()=>{let{setupBrowserAgentRpcBridge:e}=await import(`./browser-agent-rpc-BXhoSh1z-B_f3HV4w.js`);return{setupBrowserAgentRpcBridge:e}},[],import.meta.url).then(({setupBrowserAgentRpcBridge:e})=>{g||(h=e(ce))}).catch(()=>{}),re&&(re.onmessage=e=>{e.data?.type===`auth-update`&&e.data.authToken&&ce.requestTrustWithToken(e.data.authToken)}),ce}var BT=zT,VT=[`components`,`injectors`,`signals`,`ngrx`,`forms`,`router`,`pipes`,`http`,`analog`,`capacitor`,`errors`],HT=[`angular`,`ngrx`,`analog`,`angular-native`,`nativescript`,`capacitor`];function UT(e){return`pangular:${e}`}var WT=[`forms`,`router`,`ngrx`,`http`,`analog`,`components`],GT={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},idleAfterMs:{default:6e4,min:0,max:6e5}},KT={"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`},qT=[[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 JT(e){return qT.some(([t])=>t===e)}var YT=`pangular`,XT={mod:`Mod`,ctrl:`Ctrl`,control:`Ctrl`,meta:`Meta`,cmd:`Meta`,command:`Meta`,alt:`Alt`,option:`Alt`,opt:`Alt`,shift:`Shift`},ZT=[`Mod`,`Ctrl`,`Meta`,`Alt`,`Shift`];function QT(e){if(typeof e!=`string`||e.length>40)return;let t=e.split(`+`).map(e=>e.trim());if(t.some(e=>!e))return;let n=new Set,r;for(let e of t){let t=XT[e.toLowerCase()];if(t){if(n.has(t))return;n.add(t);continue}if(r!==void 0)return;if(/^[a-z0-9]$/i.test(e))r=e.toUpperCase();else if(/^f([1-9]|1[0-2])$/i.test(e))r=e.toUpperCase();else return}if(r&&[...n].some(e=>e!==`Shift`)&&!(n.has(`Mod`)&&(n.has(`Ctrl`)||n.has(`Meta`))))return[...ZT.filter(e=>n.has(e)),r].join(`+`)}function $T(e,t,n){let r=t.split(`+`),i=r.pop(),a=new Set(r),o=a.has(`Ctrl`)||a.has(`Mod`)&&!n,s=a.has(`Meta`)||a.has(`Mod`)&&n;if(e.ctrlKey!==o||e.metaKey!==s||e.altKey!==a.has(`Alt`)||e.shiftKey!==a.has(`Shift`))return!1;if(/^F\d+$/.test(i))return e.key.toUpperCase()===i;let c=/^\d$/.test(i)?`Digit${i}`:`Key${i}`;return e.code?e.code===c:e.key.toUpperCase()===i}function eE(e,t){if(!t)return e.replace(/^Mod\b/,`Ctrl`);let n={Mod:`⌘`,Meta:`⌘`,Ctrl:`⌃`,Alt:`⌥`,Shift:`⇧`};return e.split(`+`).map(e=>n[e]??e).join(``)}var tE=[{id:`dashboard`,label:`Dashboard`},{id:`timeline`,label:`Timeline`},{id:`audit`,label:`Audit`},{id:`analog`,label:`Analog`,inspector:`analog`},{id:`components`,label:`Components`,inspector:`components`},{id:`routes`,label:`Routes`,inspector:`router`},{id:`signals`,label:`Signals`,inspector:`signals`},{id:`injectors`,label:`Injectors`,inspector:`injectors`},{id:`store`,label:`Store`,inspector:`ngrx`},{id:`forms`,label:`Forms`,inspector:`forms`},{id:`pipes`,label:`Pipes`,inspector:`pipes`},{id:`network`,label:`SSR & HTTP`,inspector:`http`},{id:`errors`,label:`Errors`,inspector:`errors`},{id:`capacitor`,label:`Capacitor`,inspector:`capacitor`}],nE=1e4;function rE(e){return tE.filter(t=>!(`inspector`in t)||e.inspectors[t.inspector])}var iE={components:`a component instance, by its id in the component tree`,injectors:`a component's element injector, by the component's id`,forms:`a form, by its id`},aE=200;function oE(e){let t=new URLSearchParams({tab:e.tab});return e.id&&t.set(`id`,e.id),e.page&&t.set(`page`,e.page),`#${t.toString()}`}function sE(e){let t=new URLSearchParams(e.replace(/^#/,``)),n=e=>{let n=t.get(e)?.trim();return n&&n.length<=aE?n:void 0},r=n(`tab`);if(!r)return null;let i=n(`id`),a=n(`page`);return{tab:r,...i?{id:i}:{},...a?{page:a}:{}}}var cE=[{id:`settings`,title:`Open settings`,group:`Go to`,keywords:`preferences tabs`},{id:`pick-component`,title:`Pick component on page`,group:`Actions`,keywords:`select inspect element`,inspector:`components`},{id:`cd-record-start`,title:`Start recording change detection`,group:`Actions`,keywords:`profiler cycles`,inspector:`components`},{id:`cd-record-stop`,title:`Stop recording change detection`,group:`Actions`,keywords:`profiler cycles`,inspector:`components`},{id:`cd-clear`,title:`Clear change detection recording`,group:`Actions`,keywords:`reset recordings cycles`,inspector:`components`},{id:`theme:system`,title:`Theme: follow the system`,group:`Theme`,keywords:`auto`},{id:`theme:light`,title:`Theme: light`,group:`Theme`},{id:`theme:dark`,title:`Theme: dark`,group:`Theme`},{id:`dock:float`,title:`Popup: float`,group:`Popup`,keywords:`dock`,popupOnly:!0},{id:`dock:bottom`,title:`Popup: dock to the bottom`,group:`Popup`,keywords:`dock`,popupOnly:!0},{id:`dock:right`,title:`Popup: dock to the right`,group:`Popup`,keywords:`dock`,popupOnly:!0},{id:`dock:reset-size`,title:`Popup: reset the docked size`,group:`Popup`,keywords:`splitter resize height width`,popupOnly:!0},{id:`popout`,title:`Popup: open in its own window`,group:`Popup`,keywords:`pop out detach new window`,popupOnly:!0},{id:`popout:return`,title:`Popup: back into the page`,group:`Popup`,keywords:`pop in attach dock window`,popupOnly:!0}];function lE(e){let t=rE(e).map(e=>({id:`tab:${e.id}`,title:`Go to ${e.label}`,group:`Go to`,keywords:`tab open`})),n=cE.filter(t=>!t.inspector||e.inspectors[t.inspector]).map(({inspector:e,...t})=>t);return[...t,...n]}function uE(e){return e&&typeof e==`object`&&!Array.isArray(e)?e:{}}function dE(e,t){return typeof e==`boolean`?e:t}var fE=100,pE=100;function mE(e){if(!Array.isArray(e))return[];let t=e.filter(e=>typeof e==`string`).map(e=>e.trim()).filter(e=>e&&e.length<=pE);return[...new Set(t)].slice(0,fE)}function hE(e,t){let{default:n,min:r,max:i}=GT[t];return typeof e!=`number`||!Number.isFinite(e)?n:Math.min(i,Math.max(r,Math.round(e)))}function gE(e,t){return Object.fromEntries(e.map(e=>[e,t(e)]))}function _E(e){let t=uE(e),n=uE(t.agent),r=uE(t.inspectors),i=uE(n.tools),a=uE(t.actions),o=dE(t.actions,!0),s=uE(t.redaction),c=uE(t.limits),l=gE(VT,e=>dE(r[e],!0));return{inspectors:l,agent:{readOnly:dE(n.readOnly,!1),tools:gE(VT,e=>l[e]&&dE(i[e],!0))},actions:gE(WT,e=>l[e]&&dE(a[e],o)),redaction:{secretNames:mE(s.secretNames),unmask:mE(s.unmask)},limits:Object.fromEntries(Object.keys(GT).map(e=>[e,hE(c[e],e)])),popup:{hotkey:vE(uE(t.popup).hotkey)}}}function vE(e){return e===!1?!1:QT(e)??`Alt+Shift+P`}function yE(e){let t=e?.configs;return _E(t?.[YT])}function bE(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 xE={components:`Components`,injectors:`Injectors`,signals:`Signals`,ngrx:`NgRx`,forms:`Forms`,router:`Router`,pipes:`Pipes`,http:`HTTP`,analog:`Analog`,capacitor:`Capacitor`,errors:`Errors`},SE={forms:`Form writes`,router:`Navigation`,ngrx:`NgRx restore and dispatch`,http:`HTTP mocking`,analog:`Analog API calls`,components:`Component edits`},CE={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`,idleAfterMs:e=>e?`idle ${e/1e3} s after the last agent call`:`never idle`};function wE(e){let t=[],n=(e,n)=>{n.length&&t.push({label:e,value:n.join(`, `)})},r=VT.filter(t=>e.inspectors[t]);return n(`Inspectors off`,VT.filter(t=>!e.inspectors[t]).map(e=>xE[e])),n(`Agent`,e.agent.readOnly?[`Read-only`]:[]),n(`Hidden from the agent`,r.filter(t=>!e.agent.tools[t]).map(e=>xE[e])),n(`Blocked actions`,WT.filter(t=>e.inspectors[t]&&!e.actions[t]).map(e=>SE[e])),n(`Extra secret names`,e.redaction.secretNames),n(`Unmasked names`,e.redaction.unmask),n(`Limits`,Object.keys(GT).filter(t=>e.limits[t]!==GT[t].default).map(t=>CE[t](e.limits[t]))),e.popup.hotkey!==`Alt+Shift+P`&&n(`Popup shortcut`,[e.popup.hotkey===!1?`Off`:e.popup.hotkey]),t}function TE(e){let t={tags:[],directives:[],text:``},n=e.toLowerCase();return n=n.replace(/<\s*([^<>\s]+)\s*>/g,(e,n)=>(t.tags.push({value:n,exact:!0}),` `)),n=n.replace(/\[\s*([^[\]\s]+)\s*\]/g,(e,n)=>(t.directives.push({value:n,exact:!0}),` `)),n=n.replace(/(^|\s)([<[])([^<>[\]\s]*)$/,(e,n,r,i)=>(i&&(r===`<`?t.tags:t.directives).push({value:i,exact:!1}),n)),t.text=n.replace(/\s+/g,` `).trim(),t}function EE(e){return!e.tags.length&&!e.directives.length&&!e.text}function DE(e,t){let n=e.tag.toLowerCase(),r=(e.directives??[]).map(e=>e.toLowerCase()),i=(e.attributes??[]).map(e=>e.toLowerCase()),a=[...r,...r.map(e=>e.replace(/directive$/,``)),...i];for(let{value:e,exact:r}of t.tags)if(r?n!==e:!n.startsWith(e))return!1;for(let{value:e,exact:n}of t.directives)if(!a.some(t=>n?t===e:t.includes(e)))return!1;if(t.text){let a=t.text;if(!(e.name.toLowerCase().includes(a)||n.includes(a)||r.some(e=>e.includes(a))||i.some(e=>e.includes(a))))return!1}return!0}var OE={debugApi:{subject:`Live data`,since:`12.0`},injectorProviders:{subject:`Reading providers and environment injectors`,since:`16.2`},injectorMetadata:{subject:`The full injector tree`,since:`17.0`},isSignal:{subject:`Telling signals apart in component values`,since:`17.1`},signalGraph:{subject:`The live signal graph`,since:`20.1`},deferBlocks:{subject:`Listing @defer blocks`,since:`19.1`},forBlocks:{subject:`Listing @for blocks`,since:`22.0`},profiler:{subject:`Recording change detection`,since:`20.0`},angularProfiling:{subject:`Angular profiling`,since:`20.0`},routerInstance:{subject:`The router debug util`,since:`20.3`}};function kE(e){let t=/^(\d+)\.(\d+)/.exec(e.trim());return t?`${t[1]}.${t[2]}`:e.trim()}function AE(e){let t=/^(\d+)(?:\.(\d+))?/.exec(e.trim());return t?[Number(t[1]),Number(t[2]??0)]:null}function jE(e,t){let n=AE(e),r=AE(t);return!n||!r?!1:n[0]===r[0]?n[1]>=r[1]:n[0]>r[0]}function ME(e,t){return e?.capabilities?.[t]===!1}function NE(e,t){let n=OE[e],r=`${n.subject} needs Angular ${n.since} or later`;if(!t)return`${r}; this page's Angular version is unknown.`;let i=kE(t);return jE(t,n.since)?`${r} in a development build; this page runs Angular ${i} without it, which usually means a production build.`:`${r}; this page runs Angular ${i}.`}var PE=`pangular-page-id`,FE=null;function IE(e){FE=e}function LE(){if(FE)return FE;try{return new URLSearchParams(location.search).get(`pageId`)||(window.top===window?null:sessionStorage.getItem(PE)||null)}catch{return null}}function RE(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 zE(e,t){return e?t?e.pages?.[t]??null:e:null}function BE(e,t){return e?t?e.pages?.[t]??null:e.graph??null:null}function VE(e,t,n){return e?e.scope(`pangular`).rpc.call(t,...n===void 0?[]:[n]):Promise.resolve(null)}function HE(e,t,n){return VE(e,t,n).then(e=>e,()=>null)}function UE(e){return e?.connectionMeta.backend===`static`}function WE(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 GE(e){return e.split(`@`)[1]??``}var KE={signal:`Signal Forms`,reactive:`Reactive`,template:`Template-driven`},qE={own:`validator`,directive:`template attribute`,tree:`cross-field rule`,async:`async`,parse:`parse`,submission:`server`,schema:`schema`,manual:`setErrors`},JE=HE,YE={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 XE(e){return YE[e]??e}var ZE=`https://pangular-inspector.dev/security/#opt-fields-in-or-out`;async function QE(e,t){return await JE(e,`request-form-action`,t)??{ok:!1,error:`The devtools server did not answer.`}}function $E(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 eD=/"(?:[^"\\\n]|\\.)*"|`([^`\n]*)`|\*\*/g;function tD(e){return(e??``).replace(/^_Labels, paths.*_\n\n/,``).replace(eD,(e,t)=>t??(e===`**`?``:e))}function nD(e){return yE(e?.connectionMeta)}function rD(e,t){return nD(e).actions[t]}var iD={components:`components`,routes:`router`,signals:`signals`,injectors:`injectors`,store:`ngrx`,forms:`forms`,pipes:`pipes`,network:`http`,analog:`analog`,capacitor:`capacitor`,errors:`errors`};function aD(e){return iD[e]}var oD=`https://pangular-inspector.dev/getting-started/configuration/#inspectors-and-agent-tools`;function sD(e,t){let n=iD[e];return!n||t.inspectors[n]}function cD(e,t){e&1&&(D(),Vg(0,`rect`,4)(1,`rect`,5)(2,`rect`,6)(3,`rect`,7))}function lD(e,t){e&1&&(D(),Vg(0,`path`,8)(1,`circle`,9)(2,`circle`,10)(3,`path`,11))}function uD(e,t){e&1&&(D(),Vg(0,`path`,12)(1,`path`,13))}function dD(e,t){e&1&&(D(),Vg(0,`path`,14)(1,`path`,15)(2,`path`,16))}function fD(e,t){e&1&&(D(),Vg(0,`circle`,17)(1,`path`,18)(2,`circle`,19))}function pD(e,t){e&1&&(D(),Vg(0,`path`,1))}function mD(e,t){e&1&&(D(),Vg(0,`path`,20)(1,`path`,21)(2,`path`,22)(3,`path`,23))}function hD(e,t){e&1&&(D(),Vg(0,`ellipse`,24)(1,`path`,25)(2,`path`,26))}function gD(e,t){e&1&&(D(),Vg(0,`rect`,27)(1,`path`,28)(2,`path`,29)(3,`path`,30))}function _D(e,t){e&1&&(D(),Vg(0,`circle`,31)(1,`path`,8)(2,`path`,32))}function vD(e,t){e&1&&(D(),Vg(0,`path`,33)(1,`path`,34)(2,`path`,35)(3,`path`,36)(4,`circle`,37))}function yD(e,t){e&1&&(D(),Vg(0,`circle`,38)(1,`path`,39))}function bD(e,t){e&1&&(D(),Vg(0,`circle`,31)(1,`path`,40)(2,`path`,41))}function xD(e,t){e&1&&(D(),Vg(0,`path`,2))}function SD(e,t){e&1&&(D(),Vg(0,`path`,3))}var CD=class e{name=$.required();static ɵfac=function(t){return new(t||e)};static ɵcmp=A({type:e,selectors:[[`app-tab-icon`]],inputs:{name:[1,`name`]},decls:16,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`,`M3 12h18`],[`cx`,`7`,`cy`,`12`,`r`,`2`],[`cx`,`14`,`cy`,`12`,`r`,`2`],[`d`,`M18 7v10`],[`d`,`M9 11l2 2 4-4`],[`d`,`M12 3 4 6v6c0 4.5 3.4 8.3 8 9 4.6-.7 8-4.5 8-9V6l-8-3Z`],[`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`,`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`],[`cx`,`12`,`cy`,`12`,`r`,`3`],[`d`,`M19.4 15a1.7 1.7 0 0 0 .3 1.8l.1.1a2 2 0 1 1-2.8 2.8l-.1-.1a1.7 1.7 0 0 0-1.8-.3 1.7 1.7 0 0 0-1 1.5V21a2 2 0 1 1-4 0v-.1a1.7 1.7 0 0 0-1.1-1.5 1.7 1.7 0 0 0-1.8.3l-.1.1a2 2 0 1 1-2.8-2.8l.1-.1a1.7 1.7 0 0 0 .3-1.8 1.7 1.7 0 0 0-1.5-1H3a2 2 0 1 1 0-4h.1a1.7 1.7 0 0 0 1.5-1.1 1.7 1.7 0 0 0-.3-1.8l-.1-.1a2 2 0 1 1 2.8-2.8l.1.1a1.7 1.7 0 0 0 1.8.3H9a1.7 1.7 0 0 0 1-1.5V3a2 2 0 1 1 4 0v.1a1.7 1.7 0 0 0 1 1.5 1.7 1.7 0 0 0 1.8-.3l.1-.1a2 2 0 1 1 2.8 2.8l-.1.1a1.7 1.7 0 0 0-.3 1.8V9a1.7 1.7 0 0 0 1.5 1H21a2 2 0 1 1 0 4h-.1a1.7 1.7 0 0 0-1.5 1Z`],[`d`,`M12 7v6`],[`d`,`M12 16.5v.01`]],template:function(e,t){if(e&1&&(D(),B(0,`svg`,0),M(1,cD,4,0)(2,lD,4,0)(3,uD,2,0)(4,dD,3,0)(5,fD,3,0)(6,pD,1,0,`:svg:path`,1)(7,mD,4,0)(8,hD,3,0)(9,gD,4,0)(10,_D,3,0)(11,vD,5,0)(12,yD,2,0)(13,bD,3,0)(14,xD,1,0,`:svg:path`,2)(15,SD,1,0,`:svg:path`,3),V()),e&2){let e;k(),N((e=t.name())===`dashboard`?1:e===`timeline`?2:e===`audit`?3:e===`components`?4:e===`routes`?5:e===`signals`?6:e===`injectors`?7:e===`store`?8:e===`forms`?9:e===`network`?10:e===`pipes`?11:e===`settings`?12:e===`errors`?13:e===`analog`?14:e===`capacitor`?15:-1)}},styles:[`[_nghost-%COMP%] { display: inline-flex; flex-shrink: 0; -}`]})},CD=(e,t)=>t.tab,wD=(e,t)=>t.label;function TD(e,t){e&1&&J(0),e&2&&X(` `,G().meta()?.projectName,` `)}function ED(e,t){e&1&&J(0,` Project details unavailable `)}function DD(e,t){e&1&&J(0,` Loading… `)}function OD(e,t){e&1&&(J(0,` Run `),L(1,`code`),J(2,`pangular build`),R(),J(3,` again to rebuild the report. `))}function kD(e,t){e&1&&J(0,` Check that the dev server is running. `)}function AD(e,t){if(e&1){let e=H();L(0,`button`,12),U(`click`,function(){return T(e),E(G(2).loadMeta())}),J(1,`Try again`),R()}}function jD(e,t){if(e&1&&(L(0,`p`,10),M(1,OD,4,0)(2,kD,1,0),R(),M(3,AD,2,0,`button`,11)),e&2){let e=G();k(),N(e.staticReport()?1:2),k(2),N(e.staticReport()?-1:3)}}function MD(e,t){e&1&&(L(0,`li`,5)(1,`span`),J(2,`Analog`),R(),J(3),R()),e&2&&(k(3),Y(t))}function ND(e,t){e&1&&(L(0,`li`)(1,`span`),J(2,`Change detection`),R(),J(3),R()),e&2&&(k(3),Y(t))}function PD(e,t){if(e&1&&(L(0,`span`,19),J(1),R(),L(2,`span`,20),J(3),R()),e&2){let e=G().$implicit,t=G();k(),Y(t.cards()[e.tab]?.value),k(2),Y(t.cards()[e.tab]?.sub)}}function FD(e,t){e&1&&(L(0,`span`,21),J(1,`–`),R(),L(2,`span`,20),J(3,`Count unavailable`),R())}function ID(e,t){e&1&&(z(0,`span`,22),L(1,`span`,20),J(2,`Counting…`),R())}function LD(e,t){if(e&1){let e=H();L(0,`button`,13),U(`click`,function(){let t=T(e).$implicit;return E(G().navigate.emit(t.tab))}),L(1,`span`,14)(2,`span`,15),z(3,`app-tab-icon`,16),R(),L(4,`span`,17),J(5,`→`),R()(),L(6,`span`,18),J(7),R(),M(8,PD,4,2)(9,FD,4,0)(10,ID,3,0),R()}if(e&2){let e,n=t.$implicit,r=t.$index,i=G().stateOf(n.tab);K(`animation-delay`,60*r,`ms`),j(`aria-busy`,i===`loading`),k(3),I(`name`,n.tab),k(4),Y(n.label),k(),N((e=i)===`ready`?8:e===`error`?9:10)}}function RD(e,t){e&1&&(L(0,`p`),J(1,`Loading…`),R())}function zD(e,t){if(e&1&&(L(0,`div`)(1,`dt`),J(2),R(),L(3,`dd`),J(4),R()()),e&2){let e=t.$implicit;k(2),Y(e.label),k(2),Y(e.value)}}function BD(e,t){if(e&1&&(L(0,`dl`),P(1,zD,5,2,`div`,null,wD),R()),e&2){let e=G();k(),F(e.configItems())}}function VD(e,t){e&1&&(L(0,`p`),J(1,`Defaults`),R())}var HD=[{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 UD(e){return HD.filter(t=>sD(t.tab,e))}var WD={zoneless:`Zoneless`,zone:`zone.js`,"zone-unused":`Zoneless, zone.js loaded`};function GD(e){return e&&Object.hasOwn(WD,e)?WD[e]:null}var KD=new Set([`signal`,`computed`,`linkedSignal`,`effect`]),qD={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 JD(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 XD(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 · ${JD(t,`directive`,`directives`)}`}}function ZD(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 · ${JD(t,`redirect`,`redirects`)}`}}function QD(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]=qD[e]??[e,e];return JD(t,n,r)});return{value:e.length,sub:n.join(` · `)}}function $D(e,t){let n=e?.forms??[],r=t?n.filter(e=>GE(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 eO(e){return e.cancelled||e.status===void 0?!1:e.status===0||e.status>=400}function tO(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(eO).length;return{value:o.length,sub:`${o.length===1?`call`:`calls`} · ${s} failed`}}var nO=class e{rpc=$(null);navigate=Rv();staticReport=Q(()=>UE(this.rpc()));meta=O(null);config=Q(()=>nD(this.rpc()));stats=Q(()=>this.rpc()?UD(this.config()):[]);configItems=Q(()=>wE(this.config()));metaState=O(`loading`);states=O({});rows=O({});injectorTree=O(null);signalGraph=O(null);formsState=O(null);httpState=O(null);pageId=LE();destroyRef=C(Ds);stopLive=[];zone=Q(()=>GD(zE(this.injectorTree(),this.pageId)?.zone));liveInjectors=Q(()=>{let e=zE(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=BE(this.signalGraph(),this.pageId);return e?.nodes?.length?e.nodes.filter(e=>KD.has(e.kind??``)).length:null});cards=Q(()=>{let e=this.rows(),t={};if(e.components&&(t.components=XD(e.components)),e.routes&&(t.routes=ZD(e.routes)),e.store&&(t.store=QD(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 · ${JD(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=$D(i,this.pageId));let a=this.httpState();return a&&(t.network=tO(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(){mc(()=>{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=nD(e),r=e=>sD(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)),sD(`forms`,t)&&r(`forms`,e=>this.formsState.set(e??{}),`forms`),sD(`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=A({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&&(L(0,`section`,0)(1,`div`,1)(2,`p`,2),J(3,`Project`),R(),L(4,`h2`,3),M(5,TD,1,1)(6,ED,1,0)(7,DD,1,0),R(),M(8,jD,4,2),R(),L(9,`ul`,4)(10,`li`)(11,`span`),J(12,`Angular`),R(),J(13),R(),L(14,`li`)(15,`span`),J(16,`TypeScript`),R(),J(17),R(),L(18,`li`)(19,`span`),J(20,`SSR`),R(),J(21),R(),M(22,MD,4,1,`li`,5),M(23,ND,4,1,`li`),R()(),L(24,`div`,6),P(25,LD,11,6,`button`,7,CD),R(),L(27,`section`,8)(28,`h2`,9),J(29,`Configuration`),R(),M(30,RD,2,0,`p`)(31,BD,3,0,`dl`)(32,VD,2,0,`p`),R()),e&2){let e,n,r;j(`aria-busy`,t.metaState()===`loading`),k(4),q(`muted`,t.metaState()!==`ready`),k(),N((e=t.metaState())===`ready`?5:e===`error`?6:7),k(3),N(t.metaState()===`error`?8:-1),k(),q(`pending`,t.metaState()===`loading`),k(4),Y(t.meta()?.angularVersion??`…`),k(4),Y(t.meta()?.typescript??`…`),k(4),Y(t.meta()?t.meta()?.ssr?`On`:`Off`:`…`),k(),N((n=t.meta()?.analog)?22:-1,n),k(),N((r=t.zone())?23:-1,r),k(2),F(t.stats()),k(2),j(`aria-busy`,!t.rpc()),k(3),N(t.rpc()?t.configItems().length?31:32:30)}},dependencies:[SD],styles:[`[_nghost-%COMP%] { +}`]})},wD=(e,t)=>t.tab,TD=(e,t)=>t.label;function ED(e,t){e&1&&J(0),e&2&&X(` `,G().meta()?.projectName,` `)}function DD(e,t){e&1&&J(0,` Project details unavailable `)}function OD(e,t){e&1&&J(0,` Loading… `)}function kD(e,t){e&1&&(J(0,` Run `),L(1,`code`),J(2,`pangular build`),R(),J(3,` again to rebuild the report. `))}function AD(e,t){e&1&&J(0,` Check that the dev server is running. `)}function jD(e,t){if(e&1){let e=H();L(0,`button`,12),U(`click`,function(){return T(e),E(G(2).loadMeta())}),J(1,`Try again`),R()}}function MD(e,t){if(e&1&&(L(0,`p`,10),M(1,kD,4,0)(2,AD,1,0),R(),M(3,jD,2,0,`button`,11)),e&2){let e=G();k(),N(e.staticReport()?1:2),k(2),N(e.staticReport()?-1:3)}}function ND(e,t){e&1&&(L(0,`li`,5)(1,`span`),J(2,`Analog`),R(),J(3),R()),e&2&&(k(3),Y(t))}function PD(e,t){e&1&&(L(0,`li`)(1,`span`),J(2,`Change detection`),R(),J(3),R()),e&2&&(k(3),Y(t))}function FD(e,t){if(e&1&&(L(0,`span`,19),J(1),R(),L(2,`span`,20),J(3),R()),e&2){let e=G().$implicit,t=G();k(),Y(t.cards()[e.tab]?.value),k(2),Y(t.cards()[e.tab]?.sub)}}function ID(e,t){e&1&&(L(0,`span`,21),J(1,`–`),R(),L(2,`span`,20),J(3,`Count unavailable`),R())}function LD(e,t){e&1&&(z(0,`span`,22),L(1,`span`,20),J(2,`Counting…`),R())}function RD(e,t){if(e&1){let e=H();L(0,`button`,13),U(`click`,function(){let t=T(e).$implicit;return E(G().navigate.emit(t.tab))}),L(1,`span`,14)(2,`span`,15),z(3,`app-tab-icon`,16),R(),L(4,`span`,17),J(5,`→`),R()(),L(6,`span`,18),J(7),R(),M(8,FD,4,2)(9,ID,4,0)(10,LD,3,0),R()}if(e&2){let e,n=t.$implicit,r=t.$index,i=G().stateOf(n.tab);K(`animation-delay`,60*r,`ms`),j(`aria-busy`,i===`loading`),k(3),I(`name`,n.tab),k(4),Y(n.label),k(),N((e=i)===`ready`?8:e===`error`?9:10)}}function zD(e,t){e&1&&(L(0,`p`),J(1,`Loading…`),R())}function BD(e,t){if(e&1&&(L(0,`div`)(1,`dt`),J(2),R(),L(3,`dd`),J(4),R()()),e&2){let e=t.$implicit;k(2),Y(e.label),k(2),Y(e.value)}}function VD(e,t){if(e&1&&(L(0,`dl`),P(1,BD,5,2,`div`,null,TD),R()),e&2){let e=G();k(),F(e.configItems())}}function HD(e,t){e&1&&(L(0,`p`),J(1,`Defaults`),R())}var UD=[{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 WD(e){return UD.filter(t=>sD(t.tab,e))}var GD={zoneless:`Zoneless`,zone:`zone.js`,"zone-unused":`Zoneless, zone.js loaded`};function KD(e){return e&&Object.hasOwn(GD,e)?GD[e]:null}var qD=new Set([`signal`,`computed`,`linkedSignal`,`effect`]),JD={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 YD(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 ZD(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 · ${YD(t,`directive`,`directives`)}`}}function QD(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 · ${YD(t,`redirect`,`redirects`)}`}}function $D(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]=JD[e]??[e,e];return YD(t,n,r)});return{value:e.length,sub:n.join(` · `)}}function eO(e,t){let n=e?.forms??[],r=t?n.filter(e=>GE(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 tO(e){return e.cancelled||e.status===void 0?!1:e.status===0||e.status>=400}function nO(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(tO).length;return{value:o.length,sub:`${o.length===1?`call`:`calls`} · ${s} failed`}}var rO=class e{rpc=$(null);navigate=Rv();staticReport=Q(()=>UE(this.rpc()));meta=O(null);config=Q(()=>nD(this.rpc()));stats=Q(()=>this.rpc()?WD(this.config()):[]);configItems=Q(()=>wE(this.config()));metaState=O(`loading`);states=O({});rows=O({});injectorTree=O(null);signalGraph=O(null);formsState=O(null);httpState=O(null);pageId=LE();destroyRef=C(Ds);stopLive=[];zone=Q(()=>KD(zE(this.injectorTree(),this.pageId)?.zone));liveInjectors=Q(()=>{let e=zE(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=BE(this.signalGraph(),this.pageId);return e?.nodes?.length?e.nodes.filter(e=>qD.has(e.kind??``)).length:null});cards=Q(()=>{let e=this.rows(),t={};if(e.components&&(t.components=ZD(e.components)),e.routes&&(t.routes=QD(e.routes)),e.store&&(t.store=$D(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 · ${YD(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=eO(i,this.pageId));let a=this.httpState();return a&&(t.network=nO(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(){mc(()=>{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=nD(e),r=e=>sD(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)),sD(`forms`,t)&&r(`forms`,e=>this.formsState.set(e??{}),`forms`),sD(`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=A({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&&(L(0,`section`,0)(1,`div`,1)(2,`p`,2),J(3,`Project`),R(),L(4,`h2`,3),M(5,ED,1,1)(6,DD,1,0)(7,OD,1,0),R(),M(8,MD,4,2),R(),L(9,`ul`,4)(10,`li`)(11,`span`),J(12,`Angular`),R(),J(13),R(),L(14,`li`)(15,`span`),J(16,`TypeScript`),R(),J(17),R(),L(18,`li`)(19,`span`),J(20,`SSR`),R(),J(21),R(),M(22,ND,4,1,`li`,5),M(23,PD,4,1,`li`),R()(),L(24,`div`,6),P(25,RD,11,6,`button`,7,wD),R(),L(27,`section`,8)(28,`h2`,9),J(29,`Configuration`),R(),M(30,zD,2,0,`p`)(31,VD,3,0,`dl`)(32,HD,2,0,`p`),R()),e&2){let e,n,r;j(`aria-busy`,t.metaState()===`loading`),k(4),q(`muted`,t.metaState()!==`ready`),k(),N((e=t.metaState())===`ready`?5:e===`error`?6:7),k(3),N(t.metaState()===`error`?8:-1),k(),q(`pending`,t.metaState()===`loading`),k(4),Y(t.meta()?.angularVersion??`…`),k(4),Y(t.meta()?.typescript??`…`),k(4),Y(t.meta()?t.meta()?.ssr?`On`:`Off`:`…`),k(),N((n=t.meta()?.analog)?22:-1,n),k(),N((r=t.zone())?23:-1,r),k(2),F(t.stats()),k(2),j(`aria-busy`,!t.rpc()),k(3),N(t.rpc()?t.configItems().length?31:32:30)}},dependencies:[CD],styles:[`[_nghost-%COMP%] { display: block; max-width: 1200px; } @@ -325,7 +325,7 @@ h2.muted[_ngcontent-%COMP%] { .skeleton[_ngcontent-%COMP%] { animation: none; } -}`]})},rO=`pangular:panel-action-result`,iO=6e3,aO=0;function oO(e=window){return e.location.protocol===`chrome-extension:`&&e.parent!==e}function sO(e,t=window){let n=`pa-${Date.now().toString(36)}-${++aO}`;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!==rO||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`}),iO);t.addEventListener(`message`,a),t.parent.postMessage({...e,requestId:n},t.location.origin)})}var cO=class e{available=oO();reveal(e,t){return sO({type:`pangular:reveal-element`,pageId:e,id:t})}openSource(e,t,n){return sO({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=Nl({token:e,factory:e.ɵfac})};function lO(e){let t=e?.pages;return t&&typeof t==`object`?t:{}}function uO(e){let t=C(Ds),n=O({}),r=null,i=null,a=async e=>{i?.(),i=null,r=e;try{let a=await e.scope(`pangular`).rpc.sharedState(`page-angular`);if(t.destroyed||r!==e)return;let o=e=>n.set(lO(e));o(a.value()),i=a.on(`updated`,o)}catch{r===e&&n.set({})}};return mc(()=>{let t=e();t&&t!==r&&Nv(()=>void a(t))}),t.onDestroy(()=>i?.()),n.asReadonly()}function dO(e,t){if(t)return e[t]??null;let n=null;for(let t of Object.values(e))(!n||t.reportedAt>n.reportedAt)&&(n=t);return n}var fO=[`*`];function pO(e,t){if(e&1&&(B(0,`div`,1)(1,`p`,2),J(2),V(),B(3,`p`,3),J(4),s_(5),B(6,`a`,4),J(7,`Supported versions`),V()()()),e&2){let e=G();q(`compact`,e.compact()),k(2),Y(e.title()),k(2),X(` `,t,` `),k(2),qg(`href`,e.docsUrl,Nu)}}var mO=`https://pangular-inspector.dev/getting-started/installation/#supported-angular-versions`,hO=class e{page=$(null);capability=$.required();missing=$(!1,{transform:oy});compact=$(!1,{transform:oy});docsUrl=mO;text=Q(()=>{let e=this.page();return!this.missing()&&!ME(e,this.capability())?null:NE(this.capability(),e?.version)});title=Q(()=>{let e=this.page()?.version;return e?`Not available on Angular ${kE(e)}`:`Not available on this page`});static ɵfac=function(t){return new(t||e)};static ɵcmp=A({type:e,selectors:[[`app-angular-unavailable`]],inputs:{page:[1,`page`],capability:[1,`capability`],missing:[1,`missing`],compact:[1,`compact`]},ngContentSelectors:fO,decls:1,vars:1,consts:[[`role`,`status`,1,`unavailable`,3,`compact`],[`role`,`status`,1,`unavailable`],[1,`title`],[1,`hint`],[`target`,`_blank`,`rel`,`noopener noreferrer`,3,`href`]],template:function(e,t){if(e&1&&(o_(),M(0,pO,8,5,`div`,0)),e&2){let e;N((e=t.text())?0:-1,e)}},styles:[`[_nghost-%COMP%] { +}`]})},iO=`pangular:panel-action-result`,aO=6e3,oO=0;function sO(e=window){return e.location.protocol===`chrome-extension:`&&e.parent!==e}function cO(e,t=window){let n=`pa-${Date.now().toString(36)}-${++oO}`;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!==iO||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`}),aO);t.addEventListener(`message`,a),t.parent.postMessage({...e,requestId:n},t.location.origin)})}var lO=class e{available=sO();reveal(e,t){return cO({type:`pangular:reveal-element`,pageId:e,id:t})}openSource(e,t,n){return cO({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=Nl({token:e,factory:e.ɵfac})};function uO(e){let t=e?.pages;return t&&typeof t==`object`?t:{}}function dO(e){let t=C(Ds),n=O({}),r=null,i=null,a=async e=>{i?.(),i=null,r=e;try{let a=await e.scope(`pangular`).rpc.sharedState(`page-angular`);if(t.destroyed||r!==e)return;let o=e=>n.set(uO(e));o(a.value()),i=a.on(`updated`,o)}catch{r===e&&n.set({})}};return mc(()=>{let t=e();t&&t!==r&&Nv(()=>void a(t))}),t.onDestroy(()=>i?.()),n.asReadonly()}function fO(e,t){if(t)return e[t]??null;let n=null;for(let t of Object.values(e))(!n||t.reportedAt>n.reportedAt)&&(n=t);return n}var pO=[`*`];function mO(e,t){if(e&1&&(B(0,`div`,1)(1,`p`,2),J(2),V(),B(3,`p`,3),J(4),s_(5),B(6,`a`,4),J(7,`Supported versions`),V()()()),e&2){let e=G();q(`compact`,e.compact()),k(2),Y(e.title()),k(2),X(` `,t,` `),k(2),qg(`href`,e.docsUrl,Nu)}}var hO=`https://pangular-inspector.dev/getting-started/installation/#supported-angular-versions`,gO=class e{page=$(null);capability=$.required();missing=$(!1,{transform:oy});compact=$(!1,{transform:oy});docsUrl=hO;text=Q(()=>{let e=this.page();return!this.missing()&&!ME(e,this.capability())?null:NE(this.capability(),e?.version)});title=Q(()=>{let e=this.page()?.version;return e?`Not available on Angular ${kE(e)}`:`Not available on this page`});static ɵfac=function(t){return new(t||e)};static ɵcmp=A({type:e,selectors:[[`app-angular-unavailable`]],inputs:{page:[1,`page`],capability:[1,`capability`],missing:[1,`missing`],compact:[1,`compact`]},ngContentSelectors:pO,decls:1,vars:1,consts:[[`role`,`status`,1,`unavailable`,3,`compact`],[`role`,`status`,1,`unavailable`],[1,`title`],[1,`hint`],[`target`,`_blank`,`rel`,`noopener noreferrer`,3,`href`]],template:function(e,t){if(e&1&&(o_(),M(0,mO,8,5,`div`,0)),e&2){let e;N((e=t.text())?0:-1,e)}},styles:[`[_nghost-%COMP%] { display: block; } @@ -372,7 +372,7 @@ a[_ngcontent-%COMP%] { a[_ngcontent-%COMP%]:focus-visible { outline: 2px solid var(--%NS%accent); outline-offset: 2px; -}`]})};function gO(e){return e?.platform===`angular-native`}function _O(e){return gO(e)||e?.platform===`nativescript`}function vO(e,t){let n=Object.values(e??{}).filter(gO);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 yO=[`trigger`],bO=[`list`],xO=(e,t)=>t.value;function SO(e,t){if(e&1&&(B(0,`span`,4),J(1),V()),e&2){let e=G();k(),Y(e.current().hint)}}function CO(e,t){if(e&1&&(B(0,`span`,15),J(1),V()),e&2){let e=G().$implicit;k(),Y(e.hint)}}function wO(e,t){if(e&1){let e=H();B(0,`li`,11),W(`pointerenter`,function(){let t=T(e).$index;return E(G(2).active.set(t))})(`pointerdown`,function(e){return e.preventDefault()})(`click`,function(){let t=T(e).$index;return E(G(2).choose(t))}),D(),B(1,`svg`,12),Vg(2,`path`,13),V(),_s(),B(3,`span`,14),J(4),V(),M(5,CO,2,1,`span`,15),V()}if(e&2){let e=t.$implicit,n=t.$index,r=G(2);q(`active`,n===r.active())(`selected`,e.value===r.value()),j(`id`,r.uid+`-opt-`+n)(`aria-selected`,e.value===r.value())(`aria-disabled`,e.disabled||null),k(4),Y(e.label),k(),N(e.hint?5:-1)}}function TO(e,t){if(e&1&&(B(0,`li`,10),J(1),V()),e&2){let e=G(2);k(),Y(e.emptyText())}}function EO(e,t){if(e&1&&(B(0,`ul`,8,1),_g(`list-in`),W(`pointerdown`,function(e){return e.preventDefault()}),P(2,wO,6,9,`li`,9,xO,!1,TO,2,1,`li`,10),V()),e&2){let e=G();q(`up`,e.dropUp()),j(`id`,e.uid+`-list`)(`aria-labelledby`,e.labelledBy()||e.uid+`-trigger`),k(2),F(e.options())}}var DO=0,OO=class e{options=$.required();value=Gv(null);placeholder=$(`Select…`);ariaLabel=$(``);labelledBy=$(``);describedBy=$(``);disabled=$(!1);emptyText=$(`Nothing to choose`);uid=`app-select-${++DO}`;open=O(!1);active=O(-1);dropUp=O(!1);current=Q(()=>this.options().find(e=>e.value===this.value())??null);host=C(Il);injector=C(Ts);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=A({type:e,selectors:[[`app-select`]],viewQuery:function(e,t){e&1&&l_(t.trigger,yO,5)(t.list,bO,5),e&2&&u_(2)},hostAttrs:[1,`app-select`],hostVars:2,hostBindings:function(e,t){e&1&&U(`pointerdown`,function(e){return t.onOutside(e)},Iu),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&&(B(0,`button`,2,0),W(`click`,function(){return t.toggle()})(`keydown`,function(e){return t.onKey(e)})(`blur`,function(e){return t.onBlur(e)}),B(2,`span`,3),J(3),V(),M(4,SO,2,1,`span`,4),D(),B(5,`svg`,5),Vg(6,`path`,6),V()(),M(7,EO,5,5,`ul`,7)),e&2&&(qg(`disabled`,t.disabled()),j(`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),k(2),q(`placeholder`,!t.current()),k(),X(` `,t.current()?.label??t.placeholder(),` `),k(),N(t.current()?.hint?4:-1),k(3),N(t.open()?7:-1))},styles:[`[_nghost-%COMP%] { +}`]})};function _O(e){return e?.platform===`angular-native`}function vO(e){return _O(e)||e?.platform===`nativescript`}function yO(e,t){let n=Object.values(e??{}).filter(_O);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 bO=[`trigger`],xO=[`list`],SO=(e,t)=>t.value;function CO(e,t){if(e&1&&(B(0,`span`,4),J(1),V()),e&2){let e=G();k(),Y(e.current().hint)}}function wO(e,t){if(e&1&&(B(0,`span`,15),J(1),V()),e&2){let e=G().$implicit;k(),Y(e.hint)}}function TO(e,t){if(e&1){let e=H();B(0,`li`,11),W(`pointerenter`,function(){let t=T(e).$index;return E(G(2).active.set(t))})(`pointerdown`,function(e){return e.preventDefault()})(`click`,function(){let t=T(e).$index;return E(G(2).choose(t))}),D(),B(1,`svg`,12),Vg(2,`path`,13),V(),_s(),B(3,`span`,14),J(4),V(),M(5,wO,2,1,`span`,15),V()}if(e&2){let e=t.$implicit,n=t.$index,r=G(2);q(`active`,n===r.active())(`selected`,e.value===r.value()),j(`id`,r.uid+`-opt-`+n)(`aria-selected`,e.value===r.value())(`aria-disabled`,e.disabled||null),k(4),Y(e.label),k(),N(e.hint?5:-1)}}function EO(e,t){if(e&1&&(B(0,`li`,10),J(1),V()),e&2){let e=G(2);k(),Y(e.emptyText())}}function DO(e,t){if(e&1&&(B(0,`ul`,8,1),_g(`list-in`),W(`pointerdown`,function(e){return e.preventDefault()}),P(2,TO,6,9,`li`,9,SO,!1,EO,2,1,`li`,10),V()),e&2){let e=G();q(`up`,e.dropUp()),j(`id`,e.uid+`-list`)(`aria-labelledby`,e.labelledBy()||e.uid+`-trigger`),k(2),F(e.options())}}var OO=0,kO=class e{options=$.required();value=Gv(null);placeholder=$(`Select…`);ariaLabel=$(``);labelledBy=$(``);describedBy=$(``);disabled=$(!1);emptyText=$(`Nothing to choose`);uid=`app-select-${++OO}`;open=O(!1);active=O(-1);dropUp=O(!1);current=Q(()=>this.options().find(e=>e.value===this.value())??null);host=C(Il);injector=C(Ts);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=A({type:e,selectors:[[`app-select`]],viewQuery:function(e,t){e&1&&l_(t.trigger,bO,5)(t.list,xO,5),e&2&&u_(2)},hostAttrs:[1,`app-select`],hostVars:2,hostBindings:function(e,t){e&1&&U(`pointerdown`,function(e){return t.onOutside(e)},Iu),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&&(B(0,`button`,2,0),W(`click`,function(){return t.toggle()})(`keydown`,function(e){return t.onKey(e)})(`blur`,function(e){return t.onBlur(e)}),B(2,`span`,3),J(3),V(),M(4,CO,2,1,`span`,4),D(),B(5,`svg`,5),Vg(6,`path`,6),V()(),M(7,DO,5,5,`ul`,7)),e&2&&(qg(`disabled`,t.disabled()),j(`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),k(2),q(`placeholder`,!t.current()),k(),X(` `,t.current()?.label??t.placeholder(),` `),k(),N(t.current()?.hint?4:-1),k(3),N(t.open()?7:-1))},styles:[`[_nghost-%COMP%] { position: relative; display: inline-flex; min-width: 0; @@ -567,7 +567,7 @@ li.selected[_ngcontent-%COMP%] .check[_ngcontent-%COMP%] { .chevron[_ngcontent-%COMP%] { transition: none; } -}`]})};function kO(e,t){let n=TE(t);if(EE(n))return{nodes:e,matches:0};let r=0,i=e=>e.flatMap(e=>{let t=DE(e,n);t&&r++;let a=i(e.children);return t||a.length?[{...e,children:a}]:[]});return{nodes:i(e),matches:r}}function AO(e){return e.flatMap(e=>e.kind===`directive`?AO(e.children):[{...e,children:AO(e.children)}])}function jO(e){return(e.attributes?.length?e.attributes:e.directives??[e.name]).map(e=>`[${e}]`).join(` `)}var MO={hydrated:`Hydrated`,skipped:`Skipped`,mismatched:`Mismatch`,client:`Client`};function NO(e){return MO[e]}function PO(e,t,n,r=!1,i=0){let a=r?`${e}+`:`${e}`;if(n)return`${t} of ${r?`${e+i}+`:e+i}`;let o=i?` · ${i} directive ${i===1?`host`:`hosts`}`:``;return`${a} ${e===1&&!r?`instance`:`instances`}${o}`}function FO(e,t,n,r=!1,i=0){if(!n.trim())return``;if(!t)return`No components match.`;let a=e+i,o=r?`${a}+`:`${a}`,s=!r&&a===1;return`${t} of ${o} ${i?s?`row`:`rows`:s?`instance`:`instances`} match.`}function IO(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 LO(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&&!RO(t.roots,i)?{pageId:r,selectedId:null,detailId:n,destroyed:i}:{pageId:r,selectedId:i,detailId:n,destroyed:null}}function RO(e,t){return e.some(e=>e.id===t||RO(e.children,t))}function zO(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}var BO=(e,t)=>t.key,VO=(e,t)=>t.id;function HO(e,t){e&1&&(B(0,`p`,2),J(1,` The HTML came from the server, but no component was hydrated, so the app rendered again on the client. Add `),B(2,`code`),J(3,`provideClientHydration()`),V(),J(4,` and use a development build to see each component's status. `),V())}function UO(e,t){if(e&1&&(B(0,`li`)(1,`span`,9),J(2),V(),J(3),V()),e&2){let e=t.$implicit;M_(`count count-`+e.key),k(2),Y(e.value),k(),X(` `,e.label,` `)}}function WO(e,t){if(e&1&&(B(0,`span`,15),J(1,`Expected `),B(2,`code`),J(3),V()()),e&2){let e=G().$implicit;k(3),Y(e.expected)}}function GO(e,t){if(e&1&&(B(0,`span`,15),J(1,`Found `),B(2,`code`),J(3),V()()),e&2){let e=G().$implicit;k(3),Y(e.actual)}}function KO(e,t){if(e&1){let e=H();B(0,`li`)(1,`button`,12),W(`click`,function(){let t=T(e).$implicit;return E(G(4).showNode.emit(t.id))})(`focus`,function(){let t=T(e).$implicit;return E(G(4).highlight.emit(t.id))})(`blur`,function(){return T(e),E(G(4).highlight.emit(null))})(`mouseenter`,function(){let t=T(e).$implicit;return E(G(4).highlight.emit(t.id))})(`mouseleave`,function(){return T(e),E(G(4).highlight.emit(null))}),B(2,`span`,13),J(3),V(),B(4,`span`,14),J(5),V(),M(6,WO,4,1,`span`,15),M(7,GO,4,1,`span`,15),V()()}if(e&2){let e=t.$implicit;k(3),Y(e.name),k(2),X(`<`,e.tag,`>`),k(),N(e.expected?6:-1),k(),N(e.actual?7:-1)}}function qO(e,t){if(e&1&&(B(0,`h3`,10),J(1,`Mismatches`),V(),B(2,`ul`,11),P(3,KO,8,4,`li`,null,VO),V()),e&2){let e=G(2);k(3),F(e.mismatches)}}function JO(e,t){if(e&1){let e=H();B(0,`div`,3)(1,`ul`,4),P(2,UO,4,4,`li`,5,BO),V(),B(4,`button`,6),W(`click`,function(){return T(e),E(G(2).toggleOverlay())}),D(),B(5,`svg`,7),Vg(6,`rect`,8),V(),J(7,` Outline on page `),V()(),M(8,qO,5,0)}if(e&2){let e=G(),t=G();k(2),F(t.counts()),k(2),j(`aria-pressed`,t.overlayOn()),k(4),N(e.mismatches.length?8:-1)}}function YO(e,t){e&1&&M(0,HO,5,0,`p`,2)(1,JO,9,2),e&2&&N(+!!t.hydrated)}function XO(e,t){e&1&&(B(0,`p`,2),J(1,` This page was not rendered on the server, so there is nothing to hydrate. With server-side rendering and `),B(2,`code`),J(3,`provideClientHydration()`),V(),J(4,`, each component shows whether it was hydrated, skipped or mismatched. `),V())}var ZO=class e{report=$(void 0);overlay=Rv();showNode=Rv();highlight=Rv();overlayOn=Fv(()=>this.report()?.overlay===!0);counts=Q(()=>{let e=this.report()?.counts;return e?[{key:`hydrated`,label:`hydrated`,value:e.hydrated},{key:`skipped`,label:`skipped`,value:e.skipped},{key:`mismatched`,label:`mismatched`,value:e.mismatched},{key:`client`,label:`created on the client`,value:e.client},{key:`dehydratedBlocks`,label:e.dehydratedBlocks===1?`dehydrated @defer block`:`dehydrated @defer blocks`,value:e.dehydratedBlocks}]:[]});toggleOverlay(){let e=!this.overlayOn();this.overlayOn.set(e),this.overlay.emit(e)}static ɵfac=function(t){return new(t||e)};static ɵcmp=A({type:e,selectors:[[`app-hydration-section`]],inputs:{report:[1,`report`]},outputs:{overlay:`overlay`,showNode:`showNode`,highlight:`highlight`},decls:5,vars:1,consts:[[`aria-labelledby`,`ct-hydration-title`,1,`hydration`],[`id`,`ct-hydration-title`,1,`title`],[1,`empty`],[1,`summary`],[`aria-label`,`Hydration summary`,1,`counts`],[3,`class`],[`type`,`button`,1,`outline`,3,`click`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`],[`x`,`3`,`y`,`3`,`width`,`18`,`height`,`18`,`rx`,`2`,`stroke-dasharray`,`4 3`],[1,`num`],[1,`label`],[1,`mismatches`],[`type`,`button`,1,`mismatch`,3,`click`,`focus`,`blur`,`mouseenter`,`mouseleave`],[1,`name`,`mono`],[1,`mono`,`muted`],[1,`detail-line`]],template:function(e,t){if(e&1&&(B(0,`section`,0)(1,`h2`,1),J(2,`Hydration`),V(),M(3,YO,2,1)(4,XO,5,0,`p`,2),V()),e&2){let e;k(3),N((e=t.report())?3:4,e)}},styles:[`.hydration[_ngcontent-%COMP%] { +}`]})};function AO(e,t){let n=TE(t);if(EE(n))return{nodes:e,matches:0};let r=0,i=e=>e.flatMap(e=>{let t=DE(e,n);t&&r++;let a=i(e.children);return t||a.length?[{...e,children:a}]:[]});return{nodes:i(e),matches:r}}function jO(e){return e.flatMap(e=>e.kind===`directive`?jO(e.children):[{...e,children:jO(e.children)}])}function MO(e){return(e.attributes?.length?e.attributes:e.directives??[e.name]).map(e=>`[${e}]`).join(` `)}var NO={hydrated:`Hydrated`,skipped:`Skipped`,mismatched:`Mismatch`,client:`Client`};function PO(e){return NO[e]}function FO(e,t,n,r=!1,i=0){let a=r?`${e}+`:`${e}`;if(n)return`${t} of ${r?`${e+i}+`:e+i}`;let o=i?` · ${i} directive ${i===1?`host`:`hosts`}`:``;return`${a} ${e===1&&!r?`instance`:`instances`}${o}`}function IO(e,t,n,r=!1,i=0){if(!n.trim())return``;if(!t)return`No components match.`;let a=e+i,o=r?`${a}+`:`${a}`,s=!r&&a===1;return`${t} of ${o} ${i?s?`row`:`rows`:s?`instance`:`instances`} match.`}function LO(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 RO(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&&!zO(t.roots,i)?{pageId:r,selectedId:null,detailId:n,destroyed:i}:{pageId:r,selectedId:i,detailId:n,destroyed:null}}function zO(e,t){return e.some(e=>e.id===t||zO(e.children,t))}function BO(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}var VO=(e,t)=>t.key,HO=(e,t)=>t.id;function UO(e,t){e&1&&(B(0,`p`,2),J(1,` The HTML came from the server, but no component was hydrated, so the app rendered again on the client. Add `),B(2,`code`),J(3,`provideClientHydration()`),V(),J(4,` and use a development build to see each component's status. `),V())}function WO(e,t){if(e&1&&(B(0,`li`)(1,`span`,9),J(2),V(),J(3),V()),e&2){let e=t.$implicit;M_(`count count-`+e.key),k(2),Y(e.value),k(),X(` `,e.label,` `)}}function GO(e,t){if(e&1&&(B(0,`span`,15),J(1,`Expected `),B(2,`code`),J(3),V()()),e&2){let e=G().$implicit;k(3),Y(e.expected)}}function KO(e,t){if(e&1&&(B(0,`span`,15),J(1,`Found `),B(2,`code`),J(3),V()()),e&2){let e=G().$implicit;k(3),Y(e.actual)}}function qO(e,t){if(e&1){let e=H();B(0,`li`)(1,`button`,12),W(`click`,function(){let t=T(e).$implicit;return E(G(4).showNode.emit(t.id))})(`focus`,function(){let t=T(e).$implicit;return E(G(4).highlight.emit(t.id))})(`blur`,function(){return T(e),E(G(4).highlight.emit(null))})(`mouseenter`,function(){let t=T(e).$implicit;return E(G(4).highlight.emit(t.id))})(`mouseleave`,function(){return T(e),E(G(4).highlight.emit(null))}),B(2,`span`,13),J(3),V(),B(4,`span`,14),J(5),V(),M(6,GO,4,1,`span`,15),M(7,KO,4,1,`span`,15),V()()}if(e&2){let e=t.$implicit;k(3),Y(e.name),k(2),X(`<`,e.tag,`>`),k(),N(e.expected?6:-1),k(),N(e.actual?7:-1)}}function JO(e,t){if(e&1&&(B(0,`h3`,10),J(1,`Mismatches`),V(),B(2,`ul`,11),P(3,qO,8,4,`li`,null,HO),V()),e&2){let e=G(2);k(3),F(e.mismatches)}}function YO(e,t){if(e&1){let e=H();B(0,`div`,3)(1,`ul`,4),P(2,WO,4,4,`li`,5,VO),V(),B(4,`button`,6),W(`click`,function(){return T(e),E(G(2).toggleOverlay())}),D(),B(5,`svg`,7),Vg(6,`rect`,8),V(),J(7,` Outline on page `),V()(),M(8,JO,5,0)}if(e&2){let e=G(),t=G();k(2),F(t.counts()),k(2),j(`aria-pressed`,t.overlayOn()),k(4),N(e.mismatches.length?8:-1)}}function XO(e,t){e&1&&M(0,UO,5,0,`p`,2)(1,YO,9,2),e&2&&N(+!!t.hydrated)}function ZO(e,t){e&1&&(B(0,`p`,2),J(1,` This page was not rendered on the server, so there is nothing to hydrate. With server-side rendering and `),B(2,`code`),J(3,`provideClientHydration()`),V(),J(4,`, each component shows whether it was hydrated, skipped or mismatched. `),V())}var QO=class e{report=$(void 0);overlay=Rv();showNode=Rv();highlight=Rv();overlayOn=Fv(()=>this.report()?.overlay===!0);counts=Q(()=>{let e=this.report()?.counts;return e?[{key:`hydrated`,label:`hydrated`,value:e.hydrated},{key:`skipped`,label:`skipped`,value:e.skipped},{key:`mismatched`,label:`mismatched`,value:e.mismatched},{key:`client`,label:`created on the client`,value:e.client},{key:`dehydratedBlocks`,label:e.dehydratedBlocks===1?`dehydrated @defer block`:`dehydrated @defer blocks`,value:e.dehydratedBlocks}]:[]});toggleOverlay(){let e=!this.overlayOn();this.overlayOn.set(e),this.overlay.emit(e)}static ɵfac=function(t){return new(t||e)};static ɵcmp=A({type:e,selectors:[[`app-hydration-section`]],inputs:{report:[1,`report`]},outputs:{overlay:`overlay`,showNode:`showNode`,highlight:`highlight`},decls:5,vars:1,consts:[[`aria-labelledby`,`ct-hydration-title`,1,`hydration`],[`id`,`ct-hydration-title`,1,`title`],[1,`empty`],[1,`summary`],[`aria-label`,`Hydration summary`,1,`counts`],[3,`class`],[`type`,`button`,1,`outline`,3,`click`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`],[`x`,`3`,`y`,`3`,`width`,`18`,`height`,`18`,`rx`,`2`,`stroke-dasharray`,`4 3`],[1,`num`],[1,`label`],[1,`mismatches`],[`type`,`button`,1,`mismatch`,3,`click`,`focus`,`blur`,`mouseenter`,`mouseleave`],[1,`name`,`mono`],[1,`mono`,`muted`],[1,`detail-line`]],template:function(e,t){if(e&1&&(B(0,`section`,0)(1,`h2`,1),J(2,`Hydration`),V(),M(3,XO,2,1)(4,ZO,5,0,`p`,2),V()),e&2){let e;k(3),N((e=t.report())?3:4,e)}},styles:[`.hydration[_ngcontent-%COMP%] { margin-top: 16px; } @@ -738,7 +738,7 @@ svg[_ngcontent-%COMP%] { button[_ngcontent-%COMP%] { transition: none; } -}`]})};function QO(e){return new Date(e).toLocaleTimeString()}var $O=/[ \t\n\r]/;function ek(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 $O(e){return new Date(e).toLocaleTimeString()}var ek=/[ \t\n\r]/;function tk(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; } @@ -765,7 +765,7 @@ a[_ngcontent-%COMP%] { a[_ngcontent-%COMP%]:focus-visible { outline: 2px solid var(--%NS%accent); outline-offset: 2px; -}`]})},ik=864e13,ak=200,ok=300,sk=100,ck=10,lk=100,uk=2e3,dk=2e3,fk=4e3,pk=1e3,mk=100,hk=3,gk=50,_k={component:`c`,hook:`h`,afterRender:`r`,output:`o`},vk=Object.values(_k),yk=e=>!!e&&typeof e==`object`&&!Array.isArray(e),bk=e=>typeof e==`number`&&Number.isFinite(e)&&e>=0?e:0,xk=(e,t)=>typeof e==`string`?e.slice(0,t):``,Sk=e=>bk(e)>0?bk(e):void 0,Ck=(e,t)=>Array.isArray(e)?e.slice(0,t):[];function wk(e){if(!yk(e))return null;let t=xk(e.name,ak);return t?{name:t,checks:bk(e.checks),ms:bk(e.ms)}:null}function Tk(e,t){if(!Array.isArray(e)||e.length!==5)return null;let[n,r,i,a,o]=e;return typeof n!=`number`||!Number.isInteger(n)||n<0||n>=t||typeof r!=`number`||!Number.isFinite(r)||Math.abs(r)>1e7||typeof a!=`number`||!Number.isInteger(a)||a<0||a>pk||typeof o!=`string`||!vk.includes(o)?null:[n,r,bk(i),a,o]}function Ek(e,t){if(!yk(e)||typeof e.id!=`number`)return null;let n=Ck(e.components,ck).map(wk).filter(e=>!!e),r=xk(e.trigger,ok),i=Ck(e.spans,40).map(e=>Tk(e,t)).filter(e=>!!e),a=Array.isArray(e.spans)?e.spans.length-40:0,o=Math.floor(bk(e.droppedSpans))+Math.max(0,a),s={t:typeof e.t==`number`?bk(e.t):void 0,hookMs:Sk(e.hookMs),afterRenderMs:Sk(e.afterRenderMs),outputMs:Sk(e.outputMs)},c=Ak(e.cause),l=Sk(e.refreshed),u=Sk(e.unchanged);return{id:bk(e.id),at:bk(e.at),ms:bk(e.ms),passes:bk(e.passes),...r?{trigger:r}:{},checks:bk(e.checks),components:n,...Object.fromEntries(Object.entries(s).filter(([,e])=>e!==void 0)),...i.length?{spans:i}:{},...o?{droppedSpans:o}:{},...c?{cause:c}:{},...l?{refreshed:l}:{},...u?{unchanged:u}:{}}}var Dk=[`event`,`http`,`timer`,`signal`,`effect`,`markForCheck`,`input`,`view`,`tick`,`zone`,`unknown`],Ok={event:`Event`,http:`HTTP response`,timer:`Timer`,signal:`Signal write`,effect:`Effect`,markForCheck:`markForCheck`,input:`setInput`,view:`View change`,tick:`ApplicationRef.tick`,zone:`zone.js only`,unknown:`Unknown`},kk=e=>typeof e==`string`&&Dk.includes(e);function Ak(e){if(!yk(e)||!kk(e.kind))return;let t=[`component`,`listener`,`event`,`target`,`signal`,`task`],n={kind:e.kind};kk(e.via)&&(n.via=e.via);for(let r of t){let t=xk(e[r],ak);t&&(n[r]=t)}e.zone===!0&&(n.zone=!0);let r=Ck(e.stack,hk).map(e=>xk(e,ok)).filter(Boolean);r.length&&(n.stack=r);let i=Math.floor(bk(e.more));return i&&(n.more=i),n}function jk(e){if(!yk(e))return null;let t=xk(e.name,ak);if(!t)return null;let n=e.strategy;return{name:t,refreshed:Math.floor(bk(e.refreshed)),unchanged:Math.floor(bk(e.unchanged)),...n===`OnPush`||n===`Eager`?{strategy:n}:{}}}function Mk(e){if(!yk(e))return null;let t=xk(e.name,ak),n=xk(e.input,ak);if(!t||!n)return null;let r=xk(e.parent,ak);return{name:t,input:n,...r?{parent:r}:{},inPlace:Math.floor(bk(e.inPlace)),sameContents:Math.floor(bk(e.sameContents))}}function Nk(e){if(!yk(e))return null;let t=xk(e.name,ak);if(!t)return null;let n=Ck(e.tasks,3).map(e=>xk(e,ak)).filter(Boolean);return{name:t,ticks:Math.floor(bk(e.ticks)),...n.length?{tasks:n}:{}}}function Pk(e){if(!yk(e))return;let t={};if(yk(e.causes))for(let n of Dk){let r=Math.floor(bk(e.causes[n]));r&&(t[n]=r)}let n=Ck(e.components,lk).map(jk).filter(e=>!!e),r=Ck(e.inputs,gk).map(Mk).filter(e=>!!e),i=Ck(e.zone,gk).map(Nk).filter(e=>!!e),a=Math.floor(bk(e.major));return{triggers:e.triggers===!0,waste:e.waste===!0,...a&&a<1e3?{major:a}:{},causes:t,components:n,...r.length?{inputs:r}:{},...i.length?{zone:i}:{},...typeof e.zoneJs==`boolean`?{zoneJs:e.zoneJs}:{}}}function Fk(e){let t=[],n=e.component?` in ${e.component}${e.listener?` (${e.listener})`:``}`:``;switch(e.kind){case`event`:t.push(`${e.event??`Template listener`}${e.target?` on ${e.target}`:``}${n}`);break;case`http`:t.push(`HTTP response${n}`);break;case`timer`:t.push(`${e.task??`Timer`}${n}`);break;case`zone`:t.push(`zone.js tick with no Angular notification${e.task?` after ${e.task}`:``}`);break;case`tick`:t.push(`ApplicationRef.tick()${n}`);break;default:t.push(`${Ok[e.kind]}${n}`)}return e.signal?t.push(e.signal===`?`?`wrote an unnamed signal`:`wrote signal ${e.signal}`):e.via&&e.via!==e.kind&&t.push(`via ${Ok[e.via]}`),e.zone&&e.kind!==`zone`&&t.push(`run by zone.js`),e.more&&t.push(`${e.more} more notification${e.more===1?``:`s`}`),t.join(`, `)}function Ik(e){if(!e)return[];let t=[],n=(e.major??0)>=22;for(let r of e.components){if(r.refreshed<10)continue;let e=r.refreshed-r.unchanged;if(e/r.refreshed>.2)continue;let i=`refreshed ${r.refreshed} times and changed something in ${e}`;r.strategy===`Eager`?t.push({name:r.name,kind:`on-push`,text:n?`${r.name} was ${i}. It opts out of OnPush, which is the default from Angular 22: remove \`changeDetection: ChangeDetectionStrategy.Eager\` (or \`Default\`) so Angular skips it until an input, event, signal or markForCheck marks it.`:`${r.name} was ${i}. Add \`changeDetection: ChangeDetectionStrategy.OnPush\` so Angular skips it until an input, event, signal or markForCheck marks it.`}):r.strategy===`OnPush`&&t.push({name:r.name,kind:`already-on-push`,text:`${r.name} was ${i}, and it is already OnPush${n?` (the default from Angular 22)`:``}. Something keeps marking it: an input that gets a new reference each time, an event or output in it, markForCheck, or a signal it reads that is set to an equal value.`})}for(let n of e.inputs??[]){let e=n.parent?` set by ${n.parent}`:``;n.inPlace&&t.push({name:n.name,kind:`in-place`,text:`Input ${n.input} of ${n.name}${e} changed in place ${n.inPlace} time${n.inPlace===1?``:`s`}: same reference, different contents. OnPush components, computed and signal equality don't see that. Pass a new object or array instead of mutating it.`}),n.sameContents&&t.push({name:n.name,kind:`same-contents`,text:`Input ${n.input} of ${n.name}${e} got a new reference with the same contents ${n.sameContents} time${n.sameContents===1?``:`s`}, so Angular refreshed ${n.name} for nothing. Keep the reference when nothing changed, for example with a computed instead of a method call in the template.`})}for(let n of e.zone??[]){let e=n.tasks?.length?` (after ${n.tasks.join(`, `)})`:``;t.push({name:n.name,kind:`zone`,text:`${n.name} changed in ${n.ticks} tick${n.ticks===1?``:`s`} that only zone.js started${e}. Without zone.js it would not update: keep that state in a signal, or call markForCheck after changing it.`})}return t}function Lk(e){let t=wk(e);return!t||!yk(e)?null:{...t,maxMs:bk(e.maxMs),cycles:bk(e.cycles)}}function Rk(e){if(!yk(e))return null;let t=xk(e.name,ak),n=xk(e.hook,sk);if(!t||!n)return null;let{calls:r,ms:i,maxMs:a}=e;return{name:t,hook:n,calls:bk(r),ms:bk(i),maxMs:bk(a)}}function zk(e){if(!yk(e))return null;let t=xk(e.name,ak);if(!t)return null;let n=xk(e.listener,ak);return{name:t,...n?{listener:n}:{},calls:bk(e.calls),ms:bk(e.ms),maxMs:bk(e.maxMs)}}function Bk(e){if(yk(e)&&bk(e.runs))return{runs:bk(e.runs),ms:bk(e.ms),maxMs:bk(e.maxMs)}}function Vk(e,t){if(!yk(e))return null;let n=Ck(e.spanNames,fk).map(e=>xk(e,ok)),r=Array.isArray(e.cycles)?e.cycles.slice(-Math.min(t,dk)).map(e=>Ek(e,n.length)).filter(e=>!!e):[],i={},a=0;if(yk(e.hosts)){let t=Object.entries(e.hosts);a=Math.max(0,t.length-uk);for(let[e,n]of t.slice(0,uk))e.length<50&&bk(n)&&(i[e]=bk(n))}let o=Array.isArray(e.components)?e.components:[],s=Math.floor(bk(e.droppedClasses))+Math.max(0,o.length-lk),c=Math.floor(bk(e.droppedHosts))+a,l=Ck(e.hooks,mk).map(Rk).filter(e=>!!e),u=Ck(e.outputs,mk).map(zk).filter(e=>!!e),d=Math.max(0,Ck(e.hooks,1/0).length-mk)+Math.max(0,Ck(e.outputs,1/0).length-mk),f=Math.floor(bk(e.droppedTimings))+d,p=Bk(e.afterRender),m=r.some(e=>e.spans?.length),h=Pk(e.diagnosis);return{recording:e.recording===!0,startedAt:typeof e.startedAt==`number`&&e.startedAt<=ik?bk(e.startedAt):null,dropped:bk(e.dropped),cycles:r,components:o.slice(0,lk).map(Lk).filter(e=>!!e),...s?{droppedClasses:s}:{},hosts:i,...c?{droppedHosts:c}:{},...l.length?{hooks:l}:{},...u.length?{outputs:u}:{},...f?{droppedTimings:f}:{},...p?{afterRender:p}:{},...m?{spanNames:n}:{},...h?{diagnosis:h}:{}}}var Hk=`pangular-inspector/change-detection`;function Uk(e,t,n=Date.now()){return{format:Hk,version:1,exportedAt:n,pageId:t,recording:{...Vk(e,dk)??e,recording:!1,hosts:{}}}}function Wk(e,t){if(e.length>2e7||e.length*3>2e7&&new TextEncoder().encode(e).byteLength>2e7)return{ok:!1,error:`The file is larger than 20 MB.`};let n;try{n=JSON.parse(e)}catch{return{ok:!1,error:`The file is not valid JSON.`}}if(!yk(n))return{ok:!1,error:`The file is not a recording.`};if(n.format!==void 0&&n.format!==`pangular-inspector/change-detection`)return{ok:!1,error:`The file is not a change detection recording.`};let r=yk(n.recording)?n.recording:n;if(!Array.isArray(r.cycles))return{ok:!1,error:`The file has no change detection cycles.`};let i=Vk(r,t);if(!i)return{ok:!1,error:`The file is not a recording.`};let a=xk(n.pageId??r.pageId,49)||`imported`,o=Sk(n.exportedAt);return{ok:!0,pageId:a,...o?{exportedAt:o}:{},recording:{...i,recording:!1}}}var Gk=1,Kk=1,qk=2,Jk={c:`component`,h:`lifecycle-hook`,r:`after-render`,o:`output`},Yk=e=>Math.round(e*1e6)/1e3;function Xk(e,t){let n=e.spanNames??[],r=e.cycles[0]?.at??0,i=e.startedAt??r,a=[],o=0,s=0;for(let t of e.cycles){let e=t.t??Math.max(0,t.at-i),r=e+t.ms;a.push({name:`Change detection #${t.id}`,cat:`change-detection`,ph:`X`,pid:Gk,tid:Kk,ts:Yk(e),dur:Yk(t.ms),args:{checks:t.checks,passes:t.passes,...t.trigger?{trigger:t.trigger}:{},...t.hookMs?{hookMs:t.hookMs}:{},...t.afterRenderMs?{afterRenderMs:t.afterRenderMs}:{},...t.outputMs?{outputMs:t.outputMs}:{},...t.cause?{cause:Fk(t.cause)}:{},...t.unchanged?{unchanged:t.unchanged}:{},slowest:t.components.map(e=>`${e.name} ${e.checks}x ${e.ms}ms`)}}),s+=t.droppedSpans??0;let c=[{end:r}],l=[...t.spans??[]].sort((e,t)=>e[1]-t[1]||t[2]-e[2]);for(let[r,i,s,u,d]of l){o++;let l=n[r]??`?`;if(d===_k.output){let n=e+i;a.push({name:l,cat:Jk[d],ph:`X`,pid:Gk,tid:qk,ts:Yk(n),dur:Yk(i<0?Math.max(0,Math.min(s,-i)):s),args:{cycle:t.id}});continue}let f=Math.max(e,e+i);for(;c.length>1&&c.at(-1).end<=f;)c.pop();let p=c.at(-1).end,m=Math.min(f+s,p);me.ts??0));if(c<0)for(let e of a)e.ts=Yk((e.ts-c)/1e3);a.sort((e,t)=>e.ts-t.ts||t.dur-e.dur);let l=(e,t,n)=>({name:t,ph:`M`,pid:Gk,tid:e,args:{name:n}});return{traceEvents:[l(0,`process_name`,`Angular change detection (page ${t})`),l(Kk,`thread_name`,`Change detection`),l(qk,`thread_name`,`Outputs`),...a],displayTimeUnit:`ms`,otherData:{source:`Pangular Inspector change detection recording`,pageId:t,cycles:e.cycles.length,droppedCycles:e.dropped,spans:o,droppedSpans:s,...e.startedAt&&e.startedAt<=ik?{startedAt:new Date(e.startedAt).toISOString()}:{}}}}var Zk=16.6;function Qk(e){return e.ms>Zk}function $k(e){return`${e<10?e.toFixed(2):Math.round(e)} ms`}function eA(e,t){if(!t)return[...e];let n=Math.min(t.from,t.to),r=Math.max(t.from,t.to),i=e.filter(e=>e.id>=n&&e.id<=r);return i.length?i:[...e]}function tA(e){let t=new Map;for(let n of e)for(let e of n.components){let n=t.get(e.name);n?(n.checks+=e.checks,n.ms+=e.ms,n.maxMs=Math.max(n.maxMs,e.ms),n.cycles+=1):t.set(e.name,{name:e.name,checks:e.checks,ms:e.ms,maxMs:e.ms,cycles:1})}return[...t.values()].sort((e,t)=>t.ms-e.ms||e.name.localeCompare(t.name))}function nA(e){let t=e.reduce((e,t)=>Math.max(e,t.ms),0);return Math.max(t,Zk*1.25)}function rA(e,t,n=3){let r=e.map(e=>({item:e,value:t(e)})).filter(e=>e.value>0).sort((e,t)=>t.value-e.value),i=r.reduce((e,t)=>e+t.value,0);if(!i)return[];let a=n/i,o=[],s=0,c=0,l=n,u=1,d=[],f=(e,t)=>{let n=e.reduce((e,t)=>e+t,0),r=Math.max(...e),i=Math.min(...e);return Math.max(t*t*r/(n*n),n*n/(t*t*i))},p=()=>{let e=d.reduce((e,t)=>e+t.area,0);if(l>=u){let t=e/u,n=c;for(let e of d){let r=e.area/t;o.push({item:e.item,x:s,y:n,w:t,h:r}),n+=r}s+=t,l-=t}else{let t=e/l,n=s;for(let e of d){let r=e.area/t;o.push({item:e.item,x:n,y:c,w:r,h:t}),n+=r}c+=t,u-=t}d=[]};for(let e of r){let t=e.value*a,n=Math.min(l,u),r=d.map(e=>e.area);d.length&&f([...r,t],n)>f(r,n)&&p(),d.push({item:e.item,area:t})}return d.length&&p(),o.map(e=>({item:e.item,x:e.x/n*100,y:e.y*100,w:e.w/n*100,h:e.h*100}))}var iA={c:`component`,h:`hook`,r:`afterRender`,o:`output`};function aA(e,t){if(t===`c`)return e||null;if(t===`h`){let t=e.lastIndexOf(`.`);return t>0?e.slice(0,t):null}if(t===`o`){let t=e.indexOf(` (`),n=t>0?e.slice(0,t):e;return n&&n!==`?`?n:null}return null}function oA(e,t){let n=e.filter(e=>e.spans?.length);if(!n.length)return null;let r=n.map(e=>{let t=e.spans,n=Math.min(0,...t.map(e=>e[1])),r=Math.max(e.ms,...t.map(e=>e[1]+e[2]));return{cycle:e,spans:t,from:n,width:Math.max(r-n,.001)}}),i=r.reduce((e,t)=>e+t.width,0),a=[],o=[],s=0,c=0;for(let{cycle:e,spans:n,from:l,width:u}of r){o.push({id:e.id,x:s/i*100,w:u/i*100,droppedSpans:e.droppedSpans??0});let r=[...n].sort((e,t)=>e[1]-t[1]||e[3]-t[3]),d=[];for(let[n,o,u,f,p]of r){let r=t[n]??`unknown`,m=d[f-1],h=f>0&&m!==void 0&&ot.kind,cA=(e,t)=>t.name,lA=(e,t)=>t.name+`.`+t.input;function uA(e,t){e&1&&(B(0,`p`,3),J(1,` The page has no Angular change detection scheduler the overlay could find (it needs Angular 18 or later), so cycles have no cause. `),V())}function dA(e,t){if(e&1&&(B(0,`tr`)(1,`td`),J(2),V(),B(3,`td`,6),J(4),V()()),e&2){let e=t.$implicit;k(2),Y(e.label),k(2),Y(e.count)}}function fA(e,t){if(e&1&&(B(0,`table`)(1,`thead`)(2,`tr`)(3,`th`,4),J(4,`Trigger`),V(),B(5,`th`,5),J(6,`Cycles`),V()()(),B(7,`tbody`),P(8,dA,5,2,`tr`,null,sA),V()()),e&2){let e=G(2);k(8),F(e.causes())}}function pA(e,t){e&1&&(B(0,`p`,3),J(1,`No cycle has a cause yet.`),V())}function mA(e,t){if(e&1&&(B(0,`tr`)(1,`td`,7),J(2),V(),B(3,`td`,6),J(4),V(),B(5,`td`,7),J(6),V()()),e&2){let e=t.$implicit;k(2),Y(e.name),k(2),Y(e.ticks),k(2),Y(e.tasks?.join(`, `))}}function hA(e,t){if(e&1&&(B(0,`table`)(1,`thead`)(2,`tr`)(3,`th`,4),J(4,`Component`),V(),B(5,`th`,5),J(6,`Zone-only ticks`),V(),B(7,`th`,4),J(8,`After`),V()()(),B(9,`tbody`),P(10,mA,7,3,`tr`,null,cA),V()()),e&2){let e=G(3);k(10),F(e.zone())}}function gA(e,t){if(e&1&&(B(0,`p`,3),J(1),V()),e&2){let e=G(3);k(),Y(e.zoneNote())}}function _A(e,t){if(e&1&&(B(0,`div`)(1,`h4`),J(2,`Depends on zone.js`),V(),M(3,hA,12,0,`table`)(4,gA,2,1,`p`,3),V()),e&2){let e=G(),t=G();k(3),N(t.zone().length?3:e.triggers?4:-1)}}function vA(e,t){e&1&&(B(0,`p`,3),J(1,`The page can't watch DOM updates, so wasted checks are not counted.`),V())}function yA(e,t){if(e&1&&(B(0,`tr`)(1,`td`,7),J(2),V(),B(3,`td`,6),J(4),V(),B(5,`td`,6),J(6),V(),B(7,`td`),J(8),V()()),e&2){let e=t.$implicit,n=G(3);k(2),Y(e.name),k(2),Y(e.refreshed),k(2),Z(``,e.unchanged,` (`,n.share(e.unchanged,e.refreshed),`)`),k(2),Y(e.strategy??`Unknown`)}}function bA(e,t){if(e&1&&(B(0,`table`)(1,`thead`)(2,`tr`)(3,`th`,4),J(4,`Component`),V(),B(5,`th`,5),J(6,`Refreshed`),V(),B(7,`th`,5),J(8,`Changed nothing`),V(),B(9,`th`,4),J(10,`Strategy`),V()()(),B(11,`tbody`),P(12,yA,9,5,`tr`,null,cA),V()()),e&2){let e=G(2);k(12),F(e.wasted())}}function xA(e,t){e&1&&(B(0,`p`,3),J(1,`Every refreshed check changed something.`),V())}function SA(e,t){if(e&1&&(B(0,`tr`)(1,`td`,7),J(2),V(),B(3,`td`,7),J(4),V(),B(5,`td`,6),J(6),V(),B(7,`td`,6),J(8),V()()),e&2){let e=t.$implicit;k(2),Z(``,e.name,`.`,e.input),k(2),Y(e.parent??`Unknown`),k(2),Y(e.inPlace),k(2),Y(e.sameContents)}}function CA(e,t){if(e&1&&(B(0,`h4`),J(1,`Inputs that break OnPush`),V(),B(2,`table`)(3,`thead`)(4,`tr`)(5,`th`,4),J(6,`Input`),V(),B(7,`th`,4),J(8,`Set by`),V(),B(9,`th`,5),J(10,`Changed in place`),V(),B(11,`th`,5),J(12,`Same contents, new reference`),V()()(),B(13,`tbody`),P(14,SA,9,5,`tr`,null,lA),V()()),e&2){let e=G(2);k(14),F(e.inputs())}}function wA(e,t){if(e&1&&(B(0,`li`),J(1),V()),e&2){let e=t.$implicit;k(),Y(e.text)}}function TA(e,t){if(e&1&&(B(0,`h4`),J(1,`Hints`),V(),B(2,`ul`,8),P(3,wA,2,1,`li`,null,kg),V()),e&2){let e=G(2);k(3),F(e.hints())}}function EA(e,t){if(e&1&&(B(0,`section`,0)(1,`h3`,1),J(2,`Why it ran and what it wasted`),V(),B(3,`div`,2)(4,`div`)(5,`h4`),J(6,`What started the cycles`),V(),M(7,uA,2,0,`p`,3)(8,fA,10,0,`table`)(9,pA,2,0,`p`,3),V(),M(10,_A,5,1,`div`),V(),B(11,`h4`),J(12,`Wasted checks`),V(),M(13,vA,2,0,`p`,3)(14,bA,14,0,`table`)(15,xA,2,0,`p`,3),M(16,CA,16,0),M(17,TA,5,0),V()),e&2){let e=t,n=G();k(7),N(e.triggers?n.causes().length?8:9:7),k(3),N(n.hasZone()?10:-1),k(3),N(e.waste?n.wasted().length?14:15:13),k(3),N(n.inputs().length?16:-1),k(),N(n.hints().length?17:-1)}}var DA=10,OA=class e{page=$(null);diagnosis=Q(()=>this.page()?.diagnosis??null);causes=Q(()=>{let e=this.diagnosis()?.causes??{};return Dk.filter(t=>e[t]).map(t=>({kind:t,label:Ok[t],count:e[t]}))});zone=Q(()=>(this.diagnosis()?.zone??[]).slice(0,DA));zoneTicks=Q(()=>this.diagnosis()?.causes.zone??0);hasZone=Q(()=>this.diagnosis()?.zoneJs??(this.zone().length>0||this.zoneTicks()>0));zoneNote=Q(()=>{let e=this.zoneTicks();return e?`${e} ${e===1?`tick`:`ticks`} came from zone.js alone, and no component changed in them.`:`No component changed in a tick only zone.js started.`});wasted=Q(()=>(this.diagnosis()?.components??[]).filter(e=>e.unchanged>0).slice(0,DA));inputs=Q(()=>(this.diagnosis()?.inputs??[]).slice(0,DA));hints=Q(()=>Ik(this.diagnosis()??void 0).slice(0,DA));share(e,t){return t?`${Math.round(e/t*100)}%`:`0%`}static ɵfac=function(t){return new(t||e)};static ɵcmp=A({type:e,selectors:[[`app-cd-diagnosis`]],inputs:{page:[1,`page`]},decls:1,vars:1,consts:[[`aria-labelledby`,`cd-diagnosis-heading`,1,`diagnosis`],[`id`,`cd-diagnosis-heading`],[1,`grid`],[1,`note`],[`scope`,`col`],[`scope`,`col`,1,`num`],[1,`num`],[1,`mono`],[1,`hints`]],template:function(e,t){if(e&1&&M(0,EA,18,5,`section`,0),e&2){let e;N((e=t.diagnosis())?0:-1,e)}},styles:[`[_nghost-%COMP%] { +}`]})},ak=864e13,ok=200,sk=300,ck=100,lk=10,uk=100,dk=2e3,fk=2e3,pk=4e3,mk=1e3,hk=100,gk=3,_k=50,vk={component:`c`,hook:`h`,afterRender:`r`,output:`o`},yk=Object.values(vk),bk=e=>!!e&&typeof e==`object`&&!Array.isArray(e),xk=e=>typeof e==`number`&&Number.isFinite(e)&&e>=0?e:0,Sk=(e,t)=>typeof e==`string`?e.slice(0,t):``,Ck=e=>xk(e)>0?xk(e):void 0,wk=(e,t)=>Array.isArray(e)?e.slice(0,t):[];function Tk(e){if(!bk(e))return null;let t=Sk(e.name,ok);return t?{name:t,checks:xk(e.checks),ms:xk(e.ms)}:null}function Ek(e,t){if(!Array.isArray(e)||e.length!==5)return null;let[n,r,i,a,o]=e;return typeof n!=`number`||!Number.isInteger(n)||n<0||n>=t||typeof r!=`number`||!Number.isFinite(r)||Math.abs(r)>1e7||typeof a!=`number`||!Number.isInteger(a)||a<0||a>mk||typeof o!=`string`||!yk.includes(o)?null:[n,r,xk(i),a,o]}function Dk(e,t){if(!bk(e)||typeof e.id!=`number`)return null;let n=wk(e.components,lk).map(Tk).filter(e=>!!e),r=Sk(e.trigger,sk),i=wk(e.spans,40).map(e=>Ek(e,t)).filter(e=>!!e),a=Array.isArray(e.spans)?e.spans.length-40:0,o=Math.floor(xk(e.droppedSpans))+Math.max(0,a),s={t:typeof e.t==`number`?xk(e.t):void 0,hookMs:Ck(e.hookMs),afterRenderMs:Ck(e.afterRenderMs),outputMs:Ck(e.outputMs)},c=jk(e.cause),l=Ck(e.refreshed),u=Ck(e.unchanged);return{id:xk(e.id),at:xk(e.at),ms:xk(e.ms),passes:xk(e.passes),...r?{trigger:r}:{},checks:xk(e.checks),components:n,...Object.fromEntries(Object.entries(s).filter(([,e])=>e!==void 0)),...i.length?{spans:i}:{},...o?{droppedSpans:o}:{},...c?{cause:c}:{},...l?{refreshed:l}:{},...u?{unchanged:u}:{}}}var Ok=[`event`,`http`,`timer`,`signal`,`effect`,`markForCheck`,`input`,`view`,`tick`,`zone`,`unknown`],kk={event:`Event`,http:`HTTP response`,timer:`Timer`,signal:`Signal write`,effect:`Effect`,markForCheck:`markForCheck`,input:`setInput`,view:`View change`,tick:`ApplicationRef.tick`,zone:`zone.js only`,unknown:`Unknown`},Ak=e=>typeof e==`string`&&Ok.includes(e);function jk(e){if(!bk(e)||!Ak(e.kind))return;let t=[`component`,`listener`,`event`,`target`,`signal`,`task`],n={kind:e.kind};Ak(e.via)&&(n.via=e.via);for(let r of t){let t=Sk(e[r],ok);t&&(n[r]=t)}e.zone===!0&&(n.zone=!0);let r=wk(e.stack,gk).map(e=>Sk(e,sk)).filter(Boolean);r.length&&(n.stack=r);let i=Math.floor(xk(e.more));return i&&(n.more=i),n}function Mk(e){if(!bk(e))return null;let t=Sk(e.name,ok);if(!t)return null;let n=e.strategy;return{name:t,refreshed:Math.floor(xk(e.refreshed)),unchanged:Math.floor(xk(e.unchanged)),...n===`OnPush`||n===`Eager`?{strategy:n}:{}}}function Nk(e){if(!bk(e))return null;let t=Sk(e.name,ok),n=Sk(e.input,ok);if(!t||!n)return null;let r=Sk(e.parent,ok);return{name:t,input:n,...r?{parent:r}:{},inPlace:Math.floor(xk(e.inPlace)),sameContents:Math.floor(xk(e.sameContents))}}function Pk(e){if(!bk(e))return null;let t=Sk(e.name,ok);if(!t)return null;let n=wk(e.tasks,3).map(e=>Sk(e,ok)).filter(Boolean);return{name:t,ticks:Math.floor(xk(e.ticks)),...n.length?{tasks:n}:{}}}function Fk(e){if(!bk(e))return;let t={};if(bk(e.causes))for(let n of Ok){let r=Math.floor(xk(e.causes[n]));r&&(t[n]=r)}let n=wk(e.components,uk).map(Mk).filter(e=>!!e),r=wk(e.inputs,_k).map(Nk).filter(e=>!!e),i=wk(e.zone,_k).map(Pk).filter(e=>!!e),a=Math.floor(xk(e.major));return{triggers:e.triggers===!0,waste:e.waste===!0,...a&&a<1e3?{major:a}:{},causes:t,components:n,...r.length?{inputs:r}:{},...i.length?{zone:i}:{},...typeof e.zoneJs==`boolean`?{zoneJs:e.zoneJs}:{}}}function Ik(e){let t=[],n=e.component?` in ${e.component}${e.listener?` (${e.listener})`:``}`:``;switch(e.kind){case`event`:t.push(`${e.event??`Template listener`}${e.target?` on ${e.target}`:``}${n}`);break;case`http`:t.push(`HTTP response${n}`);break;case`timer`:t.push(`${e.task??`Timer`}${n}`);break;case`zone`:t.push(`zone.js tick with no Angular notification${e.task?` after ${e.task}`:``}`);break;case`tick`:t.push(`ApplicationRef.tick()${n}`);break;default:t.push(`${kk[e.kind]}${n}`)}return e.signal?t.push(e.signal===`?`?`wrote an unnamed signal`:`wrote signal ${e.signal}`):e.via&&e.via!==e.kind&&t.push(`via ${kk[e.via]}`),e.zone&&e.kind!==`zone`&&t.push(`run by zone.js`),e.more&&t.push(`${e.more} more notification${e.more===1?``:`s`}`),t.join(`, `)}function Lk(e){if(!e)return[];let t=[],n=(e.major??0)>=22;for(let r of e.components){if(r.refreshed<10)continue;let e=r.refreshed-r.unchanged;if(e/r.refreshed>.2)continue;let i=`refreshed ${r.refreshed} times and changed something in ${e}`;r.strategy===`Eager`?t.push({name:r.name,kind:`on-push`,text:n?`${r.name} was ${i}. It opts out of OnPush, which is the default from Angular 22: remove \`changeDetection: ChangeDetectionStrategy.Eager\` (or \`Default\`) so Angular skips it until an input, event, signal or markForCheck marks it.`:`${r.name} was ${i}. Add \`changeDetection: ChangeDetectionStrategy.OnPush\` so Angular skips it until an input, event, signal or markForCheck marks it.`}):r.strategy===`OnPush`&&t.push({name:r.name,kind:`already-on-push`,text:`${r.name} was ${i}, and it is already OnPush${n?` (the default from Angular 22)`:``}. Something keeps marking it: an input that gets a new reference each time, an event or output in it, markForCheck, or a signal it reads that is set to an equal value.`})}for(let n of e.inputs??[]){let e=n.parent?` set by ${n.parent}`:``;n.inPlace&&t.push({name:n.name,kind:`in-place`,text:`Input ${n.input} of ${n.name}${e} changed in place ${n.inPlace} time${n.inPlace===1?``:`s`}: same reference, different contents. OnPush components, computed and signal equality don't see that. Pass a new object or array instead of mutating it.`}),n.sameContents&&t.push({name:n.name,kind:`same-contents`,text:`Input ${n.input} of ${n.name}${e} got a new reference with the same contents ${n.sameContents} time${n.sameContents===1?``:`s`}, so Angular refreshed ${n.name} for nothing. Keep the reference when nothing changed, for example with a computed instead of a method call in the template.`})}for(let n of e.zone??[]){let e=n.tasks?.length?` (after ${n.tasks.join(`, `)})`:``;t.push({name:n.name,kind:`zone`,text:`${n.name} changed in ${n.ticks} tick${n.ticks===1?``:`s`} that only zone.js started${e}. Without zone.js it would not update: keep that state in a signal, or call markForCheck after changing it.`})}return t}function Rk(e){let t=Tk(e);return!t||!bk(e)?null:{...t,maxMs:xk(e.maxMs),cycles:xk(e.cycles)}}function zk(e){if(!bk(e))return null;let t=Sk(e.name,ok),n=Sk(e.hook,ck);if(!t||!n)return null;let{calls:r,ms:i,maxMs:a}=e;return{name:t,hook:n,calls:xk(r),ms:xk(i),maxMs:xk(a)}}function Bk(e){if(!bk(e))return null;let t=Sk(e.name,ok);if(!t)return null;let n=Sk(e.listener,ok);return{name:t,...n?{listener:n}:{},calls:xk(e.calls),ms:xk(e.ms),maxMs:xk(e.maxMs)}}function Vk(e){if(bk(e)&&xk(e.runs))return{runs:xk(e.runs),ms:xk(e.ms),maxMs:xk(e.maxMs)}}function Hk(e,t){if(!bk(e))return null;let n=wk(e.spanNames,pk).map(e=>Sk(e,sk)),r=Array.isArray(e.cycles)?e.cycles.slice(-Math.min(t,fk)).map(e=>Dk(e,n.length)).filter(e=>!!e):[],i={},a=0;if(bk(e.hosts)){let t=Object.entries(e.hosts);a=Math.max(0,t.length-dk);for(let[e,n]of t.slice(0,dk))e.length<50&&xk(n)&&(i[e]=xk(n))}let o=Array.isArray(e.components)?e.components:[],s=Math.floor(xk(e.droppedClasses))+Math.max(0,o.length-uk),c=Math.floor(xk(e.droppedHosts))+a,l=wk(e.hooks,hk).map(zk).filter(e=>!!e),u=wk(e.outputs,hk).map(Bk).filter(e=>!!e),d=Math.max(0,wk(e.hooks,1/0).length-hk)+Math.max(0,wk(e.outputs,1/0).length-hk),f=Math.floor(xk(e.droppedTimings))+d,p=Vk(e.afterRender),m=r.some(e=>e.spans?.length),h=Fk(e.diagnosis);return{recording:e.recording===!0,startedAt:typeof e.startedAt==`number`&&e.startedAt<=ak?xk(e.startedAt):null,dropped:xk(e.dropped),cycles:r,components:o.slice(0,uk).map(Rk).filter(e=>!!e),...s?{droppedClasses:s}:{},hosts:i,...c?{droppedHosts:c}:{},...l.length?{hooks:l}:{},...u.length?{outputs:u}:{},...f?{droppedTimings:f}:{},...p?{afterRender:p}:{},...m?{spanNames:n}:{},...h?{diagnosis:h}:{}}}var Uk=`pangular-inspector/change-detection`;function Wk(e,t,n=Date.now()){return{format:Uk,version:1,exportedAt:n,pageId:t,recording:{...Hk(e,fk)??e,recording:!1,hosts:{}}}}function Gk(e,t){if(e.length>2e7||e.length*3>2e7&&new TextEncoder().encode(e).byteLength>2e7)return{ok:!1,error:`The file is larger than 20 MB.`};let n;try{n=JSON.parse(e)}catch{return{ok:!1,error:`The file is not valid JSON.`}}if(!bk(n))return{ok:!1,error:`The file is not a recording.`};if(n.format!==void 0&&n.format!==`pangular-inspector/change-detection`)return{ok:!1,error:`The file is not a change detection recording.`};let r=bk(n.recording)?n.recording:n;if(!Array.isArray(r.cycles))return{ok:!1,error:`The file has no change detection cycles.`};let i=Hk(r,t);if(!i)return{ok:!1,error:`The file is not a recording.`};let a=Sk(n.pageId??r.pageId,49)||`imported`,o=Ck(n.exportedAt);return{ok:!0,pageId:a,...o?{exportedAt:o}:{},recording:{...i,recording:!1}}}var Kk=1,qk=1,Jk=2,Yk={c:`component`,h:`lifecycle-hook`,r:`after-render`,o:`output`},Xk=e=>Math.round(e*1e6)/1e3;function Zk(e,t){let n=e.spanNames??[],r=e.cycles[0]?.at??0,i=e.startedAt??r,a=[],o=0,s=0;for(let t of e.cycles){let e=t.t??Math.max(0,t.at-i),r=e+t.ms;a.push({name:`Change detection #${t.id}`,cat:`change-detection`,ph:`X`,pid:Kk,tid:qk,ts:Xk(e),dur:Xk(t.ms),args:{checks:t.checks,passes:t.passes,...t.trigger?{trigger:t.trigger}:{},...t.hookMs?{hookMs:t.hookMs}:{},...t.afterRenderMs?{afterRenderMs:t.afterRenderMs}:{},...t.outputMs?{outputMs:t.outputMs}:{},...t.cause?{cause:Ik(t.cause)}:{},...t.unchanged?{unchanged:t.unchanged}:{},slowest:t.components.map(e=>`${e.name} ${e.checks}x ${e.ms}ms`)}}),s+=t.droppedSpans??0;let c=[{end:r}],l=[...t.spans??[]].sort((e,t)=>e[1]-t[1]||t[2]-e[2]);for(let[r,i,s,u,d]of l){o++;let l=n[r]??`?`;if(d===vk.output){let n=e+i;a.push({name:l,cat:Yk[d],ph:`X`,pid:Kk,tid:Jk,ts:Xk(n),dur:Xk(i<0?Math.max(0,Math.min(s,-i)):s),args:{cycle:t.id}});continue}let f=Math.max(e,e+i);for(;c.length>1&&c.at(-1).end<=f;)c.pop();let p=c.at(-1).end,m=Math.min(f+s,p);me.ts??0));if(c<0)for(let e of a)e.ts=Xk((e.ts-c)/1e3);a.sort((e,t)=>e.ts-t.ts||t.dur-e.dur);let l=(e,t,n)=>({name:t,ph:`M`,pid:Kk,tid:e,args:{name:n}});return{traceEvents:[l(0,`process_name`,`Angular change detection (page ${t})`),l(qk,`thread_name`,`Change detection`),l(Jk,`thread_name`,`Outputs`),...a],displayTimeUnit:`ms`,otherData:{source:`Pangular Inspector change detection recording`,pageId:t,cycles:e.cycles.length,droppedCycles:e.dropped,spans:o,droppedSpans:s,...e.startedAt&&e.startedAt<=ak?{startedAt:new Date(e.startedAt).toISOString()}:{}}}}var Qk=16.6;function $k(e){return e.ms>Qk}function eA(e){return`${e<10?e.toFixed(2):Math.round(e)} ms`}function tA(e,t){if(!t)return[...e];let n=Math.min(t.from,t.to),r=Math.max(t.from,t.to),i=e.filter(e=>e.id>=n&&e.id<=r);return i.length?i:[...e]}function nA(e){let t=new Map;for(let n of e)for(let e of n.components){let n=t.get(e.name);n?(n.checks+=e.checks,n.ms+=e.ms,n.maxMs=Math.max(n.maxMs,e.ms),n.cycles+=1):t.set(e.name,{name:e.name,checks:e.checks,ms:e.ms,maxMs:e.ms,cycles:1})}return[...t.values()].sort((e,t)=>t.ms-e.ms||e.name.localeCompare(t.name))}function rA(e){let t=e.reduce((e,t)=>Math.max(e,t.ms),0);return Math.max(t,Qk*1.25)}function iA(e,t,n=3){let r=e.map(e=>({item:e,value:t(e)})).filter(e=>e.value>0).sort((e,t)=>t.value-e.value),i=r.reduce((e,t)=>e+t.value,0);if(!i)return[];let a=n/i,o=[],s=0,c=0,l=n,u=1,d=[],f=(e,t)=>{let n=e.reduce((e,t)=>e+t,0),r=Math.max(...e),i=Math.min(...e);return Math.max(t*t*r/(n*n),n*n/(t*t*i))},p=()=>{let e=d.reduce((e,t)=>e+t.area,0);if(l>=u){let t=e/u,n=c;for(let e of d){let r=e.area/t;o.push({item:e.item,x:s,y:n,w:t,h:r}),n+=r}s+=t,l-=t}else{let t=e/l,n=s;for(let e of d){let r=e.area/t;o.push({item:e.item,x:n,y:c,w:r,h:t}),n+=r}c+=t,u-=t}d=[]};for(let e of r){let t=e.value*a,n=Math.min(l,u),r=d.map(e=>e.area);d.length&&f([...r,t],n)>f(r,n)&&p(),d.push({item:e.item,area:t})}return d.length&&p(),o.map(e=>({item:e.item,x:e.x/n*100,y:e.y*100,w:e.w/n*100,h:e.h*100}))}var aA={c:`component`,h:`hook`,r:`afterRender`,o:`output`};function oA(e,t){if(t===`c`)return e||null;if(t===`h`){let t=e.lastIndexOf(`.`);return t>0?e.slice(0,t):null}if(t===`o`){let t=e.indexOf(` (`),n=t>0?e.slice(0,t):e;return n&&n!==`?`?n:null}return null}function sA(e,t){let n=e.filter(e=>e.spans?.length);if(!n.length)return null;let r=n.map(e=>{let t=e.spans,n=Math.min(0,...t.map(e=>e[1])),r=Math.max(e.ms,...t.map(e=>e[1]+e[2]));return{cycle:e,spans:t,from:n,width:Math.max(r-n,.001)}}),i=r.reduce((e,t)=>e+t.width,0),a=[],o=[],s=0,c=0;for(let{cycle:e,spans:n,from:l,width:u}of r){o.push({id:e.id,x:s/i*100,w:u/i*100,droppedSpans:e.droppedSpans??0});let r=[...n].sort((e,t)=>e[1]-t[1]||e[3]-t[3]),d=[];for(let[n,o,u,f,p]of r){let r=t[n]??`unknown`,m=d[f-1],h=f>0&&m!==void 0&&ot.kind,lA=(e,t)=>t.name,uA=(e,t)=>t.name+`.`+t.input;function dA(e,t){e&1&&(B(0,`p`,3),J(1,` The page has no Angular change detection scheduler the overlay could find (it needs Angular 18 or later), so cycles have no cause. `),V())}function fA(e,t){if(e&1&&(B(0,`tr`)(1,`td`),J(2),V(),B(3,`td`,6),J(4),V()()),e&2){let e=t.$implicit;k(2),Y(e.label),k(2),Y(e.count)}}function pA(e,t){if(e&1&&(B(0,`table`)(1,`thead`)(2,`tr`)(3,`th`,4),J(4,`Trigger`),V(),B(5,`th`,5),J(6,`Cycles`),V()()(),B(7,`tbody`),P(8,fA,5,2,`tr`,null,cA),V()()),e&2){let e=G(2);k(8),F(e.causes())}}function mA(e,t){e&1&&(B(0,`p`,3),J(1,`No cycle has a cause yet.`),V())}function hA(e,t){if(e&1&&(B(0,`tr`)(1,`td`,7),J(2),V(),B(3,`td`,6),J(4),V(),B(5,`td`,7),J(6),V()()),e&2){let e=t.$implicit;k(2),Y(e.name),k(2),Y(e.ticks),k(2),Y(e.tasks?.join(`, `))}}function gA(e,t){if(e&1&&(B(0,`table`)(1,`thead`)(2,`tr`)(3,`th`,4),J(4,`Component`),V(),B(5,`th`,5),J(6,`Zone-only ticks`),V(),B(7,`th`,4),J(8,`After`),V()()(),B(9,`tbody`),P(10,hA,7,3,`tr`,null,lA),V()()),e&2){let e=G(3);k(10),F(e.zone())}}function _A(e,t){if(e&1&&(B(0,`p`,3),J(1),V()),e&2){let e=G(3);k(),Y(e.zoneNote())}}function vA(e,t){if(e&1&&(B(0,`div`)(1,`h4`),J(2,`Depends on zone.js`),V(),M(3,gA,12,0,`table`)(4,_A,2,1,`p`,3),V()),e&2){let e=G(),t=G();k(3),N(t.zone().length?3:e.triggers?4:-1)}}function yA(e,t){e&1&&(B(0,`p`,3),J(1,`The page can't watch DOM updates, so wasted checks are not counted.`),V())}function bA(e,t){if(e&1&&(B(0,`tr`)(1,`td`,7),J(2),V(),B(3,`td`,6),J(4),V(),B(5,`td`,6),J(6),V(),B(7,`td`),J(8),V()()),e&2){let e=t.$implicit,n=G(3);k(2),Y(e.name),k(2),Y(e.refreshed),k(2),Z(``,e.unchanged,` (`,n.share(e.unchanged,e.refreshed),`)`),k(2),Y(e.strategy??`Unknown`)}}function xA(e,t){if(e&1&&(B(0,`table`)(1,`thead`)(2,`tr`)(3,`th`,4),J(4,`Component`),V(),B(5,`th`,5),J(6,`Refreshed`),V(),B(7,`th`,5),J(8,`Changed nothing`),V(),B(9,`th`,4),J(10,`Strategy`),V()()(),B(11,`tbody`),P(12,bA,9,5,`tr`,null,lA),V()()),e&2){let e=G(2);k(12),F(e.wasted())}}function SA(e,t){e&1&&(B(0,`p`,3),J(1,`Every refreshed check changed something.`),V())}function CA(e,t){if(e&1&&(B(0,`tr`)(1,`td`,7),J(2),V(),B(3,`td`,7),J(4),V(),B(5,`td`,6),J(6),V(),B(7,`td`,6),J(8),V()()),e&2){let e=t.$implicit;k(2),Z(``,e.name,`.`,e.input),k(2),Y(e.parent??`Unknown`),k(2),Y(e.inPlace),k(2),Y(e.sameContents)}}function wA(e,t){if(e&1&&(B(0,`h4`),J(1,`Inputs that break OnPush`),V(),B(2,`table`)(3,`thead`)(4,`tr`)(5,`th`,4),J(6,`Input`),V(),B(7,`th`,4),J(8,`Set by`),V(),B(9,`th`,5),J(10,`Changed in place`),V(),B(11,`th`,5),J(12,`Same contents, new reference`),V()()(),B(13,`tbody`),P(14,CA,9,5,`tr`,null,uA),V()()),e&2){let e=G(2);k(14),F(e.inputs())}}function TA(e,t){if(e&1&&(B(0,`li`),J(1),V()),e&2){let e=t.$implicit;k(),Y(e.text)}}function EA(e,t){if(e&1&&(B(0,`h4`),J(1,`Hints`),V(),B(2,`ul`,8),P(3,TA,2,1,`li`,null,kg),V()),e&2){let e=G(2);k(3),F(e.hints())}}function DA(e,t){if(e&1&&(B(0,`section`,0)(1,`h3`,1),J(2,`Why it ran and what it wasted`),V(),B(3,`div`,2)(4,`div`)(5,`h4`),J(6,`What started the cycles`),V(),M(7,dA,2,0,`p`,3)(8,pA,10,0,`table`)(9,mA,2,0,`p`,3),V(),M(10,vA,5,1,`div`),V(),B(11,`h4`),J(12,`Wasted checks`),V(),M(13,yA,2,0,`p`,3)(14,xA,14,0,`table`)(15,SA,2,0,`p`,3),M(16,wA,16,0),M(17,EA,5,0),V()),e&2){let e=t,n=G();k(7),N(e.triggers?n.causes().length?8:9:7),k(3),N(n.hasZone()?10:-1),k(3),N(e.waste?n.wasted().length?14:15:13),k(3),N(n.inputs().length?16:-1),k(),N(n.hints().length?17:-1)}}var OA=10,kA=class e{page=$(null);diagnosis=Q(()=>this.page()?.diagnosis??null);causes=Q(()=>{let e=this.diagnosis()?.causes??{};return Ok.filter(t=>e[t]).map(t=>({kind:t,label:kk[t],count:e[t]}))});zone=Q(()=>(this.diagnosis()?.zone??[]).slice(0,OA));zoneTicks=Q(()=>this.diagnosis()?.causes.zone??0);hasZone=Q(()=>this.diagnosis()?.zoneJs??(this.zone().length>0||this.zoneTicks()>0));zoneNote=Q(()=>{let e=this.zoneTicks();return e?`${e} ${e===1?`tick`:`ticks`} came from zone.js alone, and no component changed in them.`:`No component changed in a tick only zone.js started.`});wasted=Q(()=>(this.diagnosis()?.components??[]).filter(e=>e.unchanged>0).slice(0,OA));inputs=Q(()=>(this.diagnosis()?.inputs??[]).slice(0,OA));hints=Q(()=>Lk(this.diagnosis()??void 0).slice(0,OA));share(e,t){return t?`${Math.round(e/t*100)}%`:`0%`}static ɵfac=function(t){return new(t||e)};static ɵcmp=A({type:e,selectors:[[`app-cd-diagnosis`]],inputs:{page:[1,`page`]},decls:1,vars:1,consts:[[`aria-labelledby`,`cd-diagnosis-heading`,1,`diagnosis`],[`id`,`cd-diagnosis-heading`],[1,`grid`],[1,`note`],[`scope`,`col`],[`scope`,`col`,1,`num`],[1,`num`],[1,`mono`],[1,`hints`]],template:function(e,t){if(e&1&&M(0,DA,18,5,`section`,0),e&2){let e;N((e=t.diagnosis())?0:-1,e)}},styles:[`[_nghost-%COMP%] { display: block; } @@ -844,7 +844,7 @@ td.mono[_ngcontent-%COMP%] { .hints[_ngcontent-%COMP%] li[_ngcontent-%COMP%] + li[_ngcontent-%COMP%] { margin-top: 4px; -}`]})},kA=(e,t)=>t.cycle.id,AA=(e,t)=>t.id;function jA(e,t){if(e&1){let e=H();B(0,`button`,27),W(`click`,function(){return T(e),E(G().showAll())}),J(1,`Show all cycles`),V()}}function MA(e,t){if(e&1&&Vg(0,`div`,28),e&2){let e=t;K(`left`,e.left,`%`)(`width`,e.width,`%`)}}function NA(e,t){if(e&1&&(B(0,`div`,29),Vg(1,`span`,30),V()),e&2){let e=t.$implicit,n=G();q(`over`,e.over)(`out`,!n.inRange(e.index)&&!!n.range())(`active`,n.focused()&&n.active()===e.index),qg(`id`,n.optionId(e.index)),j(`data-index`,e.index)(`aria-selected`,n.inRange(e.index))(`aria-label`,e.label),k(),K(`height`,e.height,`%`)}}function PA(e,t){e&1&&(B(0,`span`,33),J(1,`over budget`),V())}function FA(e,t){if(e&1&&(B(0,`p`),J(1,` after `),B(2,`span`,35),J(3),V()()),e&2){let e=G();k(3),Y(e.cycle.trigger)}}function IA(e,t){if(e&1&&(B(0,`p`,34)(1,`span`,36),J(2),V(),B(3,`span`),J(4),V()()),e&2){let e=t.$implicit,n=G(2);k(2),Y(e.name),k(2),Y(n.fmt(e.ms))}}function LA(e,t){if(e&1&&(B(0,`div`,31)(1,`p`,32)(2,`strong`),J(3),V(),B(4,`span`),J(5),V(),M(6,PA,2,0,`span`,33),V(),M(7,FA,4,1,`p`),B(8,`p`),J(9),V(),P(10,IA,5,2,`p`,34,kg),V()),e&2){let e=t,n=G();K(`left`,e.left)(`right`,e.right),k(3),Y(n.fmt(e.cycle.ms)),k(2),X(`cycle `,e.cycle.id),k(),N(e.over?6:-1),k(),N(e.cycle.trigger?7:-1),k(2),iv(` `,e.cycle.checks,` `,e.cycle.checks===1?`check`:`checks`,`, `,e.cycle.passes,` `,e.cycle.passes===1?`pass`:`passes`,` `),k(),F(e.top)}}function RA(e,t){if(e&1&&Vg(0,`span`),e&2){let e=t.$implicit;q(`over`,e.over)}}function zA(e,t){if(e&1&&J(0),e&2){let e=t,n=G(2);Z(` `,e.name,` (`,n.fmt(e.ms),`) `)}}function BA(e,t){if(e&1&&(B(0,`tr`)(1,`td`,37),J(2),V(),B(3,`td`,37),J(4),V(),B(5,`td`),J(6),V(),B(7,`td`,37),J(8),V(),B(9,`td`,37),J(10),V(),B(11,`td`,35),J(12),V(),B(13,`td`,35),M(14,zA,1,2),V()()),e&2){let e,n=t.$implicit,r=G();k(2),Y(n.id),k(2),Y(r.fmt(n.ms)),k(2),Y(r.isOver(n)?`Over`:`Within`),k(2),Y(n.checks),k(2),Y(n.passes),k(2),Y(n.trigger??``),k(2),N((e=n.components[0])?14:-1,e)}}var VA=0,HA=80,UA=10,WA=class e{cycles=$([]);range=Gv(null);gapUntil=HA;budgetLabel=`${Zk} ms budget`;uid=`cd-chart-${VA++}`;hintId=`${this.uid}-hint`;active=O(null);anchor=null;dragging=!1;hover=O(null);focused=O(!1);max=Q(()=>nA(this.cycles()));budgetAt=Q(()=>Zk/this.max()*100);bars=Q(()=>{let e=this.max();return this.cycles().map((t,n)=>({cycle:t,index:n,height:t.ms/e*100,over:Qk(t),label:this.describe(t)}))});firstId=Q(()=>this.cycles()[0]?.id??0);lastId=Q(()=>this.cycles().at(-1)?.id??0);span=Q(()=>{let e=this.range();if(!e)return null;let t=this.cycles(),n=Math.min(e.from,e.to),r=Math.max(e.from,e.to),i=t.findIndex(e=>e.id>=n),a=-1;for(let e=t.length-1;e>=0;e--)if(t[e].id<=r){a=e;break}return i<0||aeA(this.cycles(),this.range()));startId=Q(()=>this.selected()[0]?.id??``);endId=Q(()=>this.selected().at(-1)?.id??``);band=Q(()=>{let e=this.span(),t=this.cycles().length;return!e||!t?null:{left:e.start/t*100,width:(e.end-e.start+1)/t*100}});summary=Q(()=>{let e=this.selected(),t=e.filter(Qk).length;return`${this.span()?e.length===1?`Cycle ${e[0].id}`:`Cycles ${e[0].id} to ${e.at(-1).id} (${e.length})`:`All ${e.length} ${e.length===1?`cycle`:`cycles`}`}. ${t} over the ${Zk} ms budget.`});tableLabel=Q(()=>this.span()?`Picked cycles, ${this.summary()}`:`All recorded cycles`);activeOptionId=Q(()=>{let e=this.active();return this.focused()&&e!==null&&e{let e=this.hover()??(this.focused()?this.active():null),t=e===null?void 0:this.cycles()[e];return!t||e===null?null:{cycle:t,over:Qk(t),top:t.components.slice(0,3),...this.tipSide(e)}});tipSide(e){let t=this.cycles().length;return e+.5=t.start&&e<=t.end}describe(e){let t=[`Cycle ${e.id}`,$k(e.ms)];Qk(e)&&t.push(`over budget`),e.trigger&&t.push(`after ${e.trigger}`),t.push(`${e.checks} ${e.checks===1?`check`:`checks`}`);let n=e.components[0];return n&&t.push(`slowest ${n.name} ${$k(n.ms)}`),t.join(`, `)}select(e,t){let n=this.cycles(),r=n[Math.min(e,t)],i=n[Math.max(e,t)];r&&i&&this.range.set({from:r.id,to:i.id})}showAll(){this.range.set(null),this.anchor=null}setEnd(e,t){if(!this.cycles().length)return;let n=t.target,r=Number.parseInt(n.value,10);if(Number.isNaN(r)){n.value=String(e===`from`?this.startId():this.endId());return}let i=Math.min(Math.max(r,this.firstId()),this.lastId()),a=this.selected(),o=e===`from`?i:a[0]?.id??this.firstId(),s=e===`to`?i:a.at(-1)?.id??this.lastId();this.range.set({from:Math.min(o,s),to:Math.max(o,s)}),n.value=String(e===`from`?Math.min(o,s):Math.max(o,s))}onFocus(){this.focused.set(!0),(this.active()===null||this.active()>=this.cycles().length)&&this.active.set(this.span()?.start??Math.max(this.cycles().length-1,0)),this.anchor??=this.active()}onKey(e){let t=this.cycles().length;if(!t)return;let n=Math.min(this.active()??t-1,t-1),r=null;switch(e.key){case`ArrowRight`:case`ArrowDown`:r=n+1;break;case`ArrowLeft`:case`ArrowUp`:r=n-1;break;case`PageDown`:r=n+UA;break;case`PageUp`:r=n-UA;break;case`Home`:r=0;break;case`End`:r=t-1;break;case`Enter`:case` `:e.preventDefault(),this.anchor=n,this.select(n,n);return;case`Escape`:this.range()&&(e.preventDefault(),this.showAll());return;default:return}e.preventDefault(),r=Math.min(Math.max(r,0),t-1),this.active.set(r),this.hover.set(null),e.shiftKey?(this.anchor??=n,this.select(this.anchor,r)):this.anchor=r}indexAt(e){let t=e.target?.closest?.(`[data-index]`);if(t)return Number(t.getAttribute(`data-index`));let n=e.currentTarget?.getBoundingClientRect(),r=this.cycles().length;if(!n?.width||!r)return null;let i=(e.clientX-n.left)/n.width;return Math.min(Math.max(Math.floor(i*r),0),r-1)}startDrag(e){if(e.button!==0)return;let t=this.indexAt(e);t!==null&&(this.dragging=!0,this.anchor=t,this.active.set(t),this.select(t,t))}onPointerMove(e){let t=this.indexAt(e);this.hover.set(t),this.dragging&&t!==null&&this.anchor!==null&&(this.active.set(t),this.select(this.anchor,t))}endDrag(){this.dragging=!1}static ɵfac=function(t){return new(t||e)};static ɵcmp=A({type:e,selectors:[[`app-cd-cycle-chart`]],hostBindings:function(e,t){e&1&&U(`pointerup`,function(){return t.endDrag()},Fu)(`pointercancel`,function(){return t.endDrag()},Fu)},inputs:{cycles:[1,`cycles`],range:[1,`range`]},outputs:{range:`rangeChange`},decls:69,vars:25,consts:[[1,`range`],[`type`,`number`,`inputmode`,`numeric`,3,`change`,`min`,`max`,`value`],[`type`,`button`],[1,`summary`],[1,`hint`,3,`id`],[1,`plot`],[`aria-hidden`,`true`,1,`axis`],[1,`tick`,`top`],[1,`tick`,`zero`],[1,`area`],[`aria-hidden`,`true`,1,`band`,3,`left`,`width`],[`aria-hidden`,`true`,1,`budget`],[`role`,`listbox`,`aria-multiselectable`,`true`,`aria-orientation`,`horizontal`,`tabindex`,`0`,1,`bars`,3,`keydown`,`focus`,`blur`,`pointerdown`,`pointermove`,`pointerleave`],[`role`,`option`,1,`col`,3,`id`,`over`,`out`,`active`],[`aria-hidden`,`true`,1,`tip`,3,`left`,`right`],[`aria-hidden`,`true`,1,`markers`],[3,`over`],[`aria-label`,`Chart key`,1,`legend`],[`aria-hidden`,`true`,1,`key`,`ok`],[`aria-hidden`,`true`,1,`key`,`over`],[`aria-hidden`,`true`,1,`key-marker`],[`aria-hidden`,`true`,1,`key`,`line`],[1,`table`],[`tabindex`,`0`,`role`,`region`,1,`table-wrap`],[1,`sr-only`],[`scope`,`col`,1,`num`],[`scope`,`col`],[`type`,`button`,3,`click`],[`aria-hidden`,`true`,1,`band`],[`role`,`option`,1,`col`,3,`id`],[1,`bar`],[`aria-hidden`,`true`,1,`tip`],[1,`tip-head`],[1,`flag`],[1,`tip-row`],[1,`mono`],[1,`mono`,`name`],[1,`num`]],template:function(e,t){if(e&1&&(B(0,`div`,0)(1,`label`)(2,`span`),J(3,`Start`),V(),B(4,`input`,1),W(`change`,function(e){return t.setEnd(`from`,e)}),V()(),B(5,`label`)(6,`span`),J(7,`End`),V(),B(8,`input`,1),W(`change`,function(e){return t.setEnd(`to`,e)}),V()(),M(9,jA,2,0,`button`,2),B(10,`p`,3),J(11),V()(),B(12,`p`,4),J(13,` Drag across the bars to pick a range of cycles. With the chart focused, the arrow keys move between cycles, Shift with an arrow key extends the range, Enter picks one cycle and Escape shows all cycles again. `),V(),B(14,`div`,5)(15,`div`,6)(16,`span`,7),J(17),V(),B(18,`span`,8),J(19,`0 ms`),V()(),B(20,`div`,9),M(21,MA,1,4,`div`,10),B(22,`div`,11)(23,`span`),J(24),V()(),B(25,`div`,12),W(`keydown`,function(e){return t.onKey(e)})(`focus`,function(){return t.onFocus()})(`blur`,function(){return t.focused.set(!1)})(`pointerdown`,function(e){return t.startDrag(e)})(`pointermove`,function(e){return t.onPointerMove(e)})(`pointerleave`,function(){return t.hover.set(null)}),P(26,NA,2,12,`div`,13,kA),V(),M(28,LA,12,12,`div`,14),V()(),B(29,`div`,15),P(30,RA,1,2,`span`,16,kA),V(),B(32,`ul`,17)(33,`li`),Vg(34,`span`,18),J(35,`Within budget`),V(),B(36,`li`),Vg(37,`span`,19)(38,`span`,20),J(39,`Over budget `),V(),B(40,`li`),Vg(41,`span`,21),J(42),V()(),B(43,`details`,22)(44,`summary`),J(45,`Show the cycles as a table`),V(),B(46,`div`,23)(47,`table`)(48,`caption`,24),J(49),V(),B(50,`thead`)(51,`tr`)(52,`th`,25),J(53,`Cycle`),V(),B(54,`th`,25),J(55,`Duration`),V(),B(56,`th`,26),J(57,`Budget`),V(),B(58,`th`,25),J(59,`Checks`),V(),B(60,`th`,25),J(61,`Passes`),V(),B(62,`th`,26),J(63,`After`),V(),B(64,`th`,26),J(65,`Slowest component`),V()()(),B(66,`tbody`),P(67,BA,15,7,`tr`,null,AA),V()()()()),e&2){let e,n;k(4),qg(`min`,t.firstId())(`max`,t.lastId())(`value`,t.startId()),k(4),qg(`min`,t.firstId())(`max`,t.lastId())(`value`,t.endId()),k(),N(t.range()?9:-1),k(2),Y(t.summary()),k(),qg(`id`,t.hintId),k(2),q(`flush`,t.bars().length>t.gapUntil),k(3),Y(t.fmt(t.max())),k(4),N((e=t.band())?21:-1,e),k(),K(`bottom`,t.budgetAt(),`%`),k(2),Y(t.budgetLabel),k(),j(`aria-label`,`Change detection cycles, `+t.summary())(`aria-describedby`,t.hintId)(`aria-activedescendant`,t.activeOptionId()),k(),F(t.bars()),k(2),N((n=t.tip())?28:-1,n),k(),q(`flush`,t.bars().length>t.gapUntil),k(),F(t.bars()),k(12),Y(t.budgetLabel),k(4),j(`aria-label`,t.tableLabel()),k(3),X(` `,t.tableLabel(),` `),k(18),F(t.selected())}},styles:[`[_nghost-%COMP%] { +}`]})},AA=(e,t)=>t.cycle.id,jA=(e,t)=>t.id;function MA(e,t){if(e&1){let e=H();B(0,`button`,27),W(`click`,function(){return T(e),E(G().showAll())}),J(1,`Show all cycles`),V()}}function NA(e,t){if(e&1&&Vg(0,`div`,28),e&2){let e=t;K(`left`,e.left,`%`)(`width`,e.width,`%`)}}function PA(e,t){if(e&1&&(B(0,`div`,29),Vg(1,`span`,30),V()),e&2){let e=t.$implicit,n=G();q(`over`,e.over)(`out`,!n.inRange(e.index)&&!!n.range())(`active`,n.focused()&&n.active()===e.index),qg(`id`,n.optionId(e.index)),j(`data-index`,e.index)(`aria-selected`,n.inRange(e.index))(`aria-label`,e.label),k(),K(`height`,e.height,`%`)}}function FA(e,t){e&1&&(B(0,`span`,33),J(1,`over budget`),V())}function IA(e,t){if(e&1&&(B(0,`p`),J(1,` after `),B(2,`span`,35),J(3),V()()),e&2){let e=G();k(3),Y(e.cycle.trigger)}}function LA(e,t){if(e&1&&(B(0,`p`,34)(1,`span`,36),J(2),V(),B(3,`span`),J(4),V()()),e&2){let e=t.$implicit,n=G(2);k(2),Y(e.name),k(2),Y(n.fmt(e.ms))}}function RA(e,t){if(e&1&&(B(0,`div`,31)(1,`p`,32)(2,`strong`),J(3),V(),B(4,`span`),J(5),V(),M(6,FA,2,0,`span`,33),V(),M(7,IA,4,1,`p`),B(8,`p`),J(9),V(),P(10,LA,5,2,`p`,34,kg),V()),e&2){let e=t,n=G();K(`left`,e.left)(`right`,e.right),k(3),Y(n.fmt(e.cycle.ms)),k(2),X(`cycle `,e.cycle.id),k(),N(e.over?6:-1),k(),N(e.cycle.trigger?7:-1),k(2),iv(` `,e.cycle.checks,` `,e.cycle.checks===1?`check`:`checks`,`, `,e.cycle.passes,` `,e.cycle.passes===1?`pass`:`passes`,` `),k(),F(e.top)}}function zA(e,t){if(e&1&&Vg(0,`span`),e&2){let e=t.$implicit;q(`over`,e.over)}}function BA(e,t){if(e&1&&J(0),e&2){let e=t,n=G(2);Z(` `,e.name,` (`,n.fmt(e.ms),`) `)}}function VA(e,t){if(e&1&&(B(0,`tr`)(1,`td`,37),J(2),V(),B(3,`td`,37),J(4),V(),B(5,`td`),J(6),V(),B(7,`td`,37),J(8),V(),B(9,`td`,37),J(10),V(),B(11,`td`,35),J(12),V(),B(13,`td`,35),M(14,BA,1,2),V()()),e&2){let e,n=t.$implicit,r=G();k(2),Y(n.id),k(2),Y(r.fmt(n.ms)),k(2),Y(r.isOver(n)?`Over`:`Within`),k(2),Y(n.checks),k(2),Y(n.passes),k(2),Y(n.trigger??``),k(2),N((e=n.components[0])?14:-1,e)}}var HA=0,UA=80,WA=10,GA=class e{cycles=$([]);range=Gv(null);gapUntil=UA;budgetLabel=`${Qk} ms budget`;uid=`cd-chart-${HA++}`;hintId=`${this.uid}-hint`;active=O(null);anchor=null;dragging=!1;hover=O(null);focused=O(!1);max=Q(()=>rA(this.cycles()));budgetAt=Q(()=>Qk/this.max()*100);bars=Q(()=>{let e=this.max();return this.cycles().map((t,n)=>({cycle:t,index:n,height:t.ms/e*100,over:$k(t),label:this.describe(t)}))});firstId=Q(()=>this.cycles()[0]?.id??0);lastId=Q(()=>this.cycles().at(-1)?.id??0);span=Q(()=>{let e=this.range();if(!e)return null;let t=this.cycles(),n=Math.min(e.from,e.to),r=Math.max(e.from,e.to),i=t.findIndex(e=>e.id>=n),a=-1;for(let e=t.length-1;e>=0;e--)if(t[e].id<=r){a=e;break}return i<0||atA(this.cycles(),this.range()));startId=Q(()=>this.selected()[0]?.id??``);endId=Q(()=>this.selected().at(-1)?.id??``);band=Q(()=>{let e=this.span(),t=this.cycles().length;return!e||!t?null:{left:e.start/t*100,width:(e.end-e.start+1)/t*100}});summary=Q(()=>{let e=this.selected(),t=e.filter($k).length;return`${this.span()?e.length===1?`Cycle ${e[0].id}`:`Cycles ${e[0].id} to ${e.at(-1).id} (${e.length})`:`All ${e.length} ${e.length===1?`cycle`:`cycles`}`}. ${t} over the ${Qk} ms budget.`});tableLabel=Q(()=>this.span()?`Picked cycles, ${this.summary()}`:`All recorded cycles`);activeOptionId=Q(()=>{let e=this.active();return this.focused()&&e!==null&&e{let e=this.hover()??(this.focused()?this.active():null),t=e===null?void 0:this.cycles()[e];return!t||e===null?null:{cycle:t,over:$k(t),top:t.components.slice(0,3),...this.tipSide(e)}});tipSide(e){let t=this.cycles().length;return e+.5=t.start&&e<=t.end}describe(e){let t=[`Cycle ${e.id}`,eA(e.ms)];$k(e)&&t.push(`over budget`),e.trigger&&t.push(`after ${e.trigger}`),t.push(`${e.checks} ${e.checks===1?`check`:`checks`}`);let n=e.components[0];return n&&t.push(`slowest ${n.name} ${eA(n.ms)}`),t.join(`, `)}select(e,t){let n=this.cycles(),r=n[Math.min(e,t)],i=n[Math.max(e,t)];r&&i&&this.range.set({from:r.id,to:i.id})}showAll(){this.range.set(null),this.anchor=null}setEnd(e,t){if(!this.cycles().length)return;let n=t.target,r=Number.parseInt(n.value,10);if(Number.isNaN(r)){n.value=String(e===`from`?this.startId():this.endId());return}let i=Math.min(Math.max(r,this.firstId()),this.lastId()),a=this.selected(),o=e===`from`?i:a[0]?.id??this.firstId(),s=e===`to`?i:a.at(-1)?.id??this.lastId();this.range.set({from:Math.min(o,s),to:Math.max(o,s)}),n.value=String(e===`from`?Math.min(o,s):Math.max(o,s))}onFocus(){this.focused.set(!0),(this.active()===null||this.active()>=this.cycles().length)&&this.active.set(this.span()?.start??Math.max(this.cycles().length-1,0)),this.anchor??=this.active()}onKey(e){let t=this.cycles().length;if(!t)return;let n=Math.min(this.active()??t-1,t-1),r=null;switch(e.key){case`ArrowRight`:case`ArrowDown`:r=n+1;break;case`ArrowLeft`:case`ArrowUp`:r=n-1;break;case`PageDown`:r=n+WA;break;case`PageUp`:r=n-WA;break;case`Home`:r=0;break;case`End`:r=t-1;break;case`Enter`:case` `:e.preventDefault(),this.anchor=n,this.select(n,n);return;case`Escape`:this.range()&&(e.preventDefault(),this.showAll());return;default:return}e.preventDefault(),r=Math.min(Math.max(r,0),t-1),this.active.set(r),this.hover.set(null),e.shiftKey?(this.anchor??=n,this.select(this.anchor,r)):this.anchor=r}indexAt(e){let t=e.target?.closest?.(`[data-index]`);if(t)return Number(t.getAttribute(`data-index`));let n=e.currentTarget?.getBoundingClientRect(),r=this.cycles().length;if(!n?.width||!r)return null;let i=(e.clientX-n.left)/n.width;return Math.min(Math.max(Math.floor(i*r),0),r-1)}startDrag(e){if(e.button!==0)return;let t=this.indexAt(e);t!==null&&(this.dragging=!0,this.anchor=t,this.active.set(t),this.select(t,t))}onPointerMove(e){let t=this.indexAt(e);this.hover.set(t),this.dragging&&t!==null&&this.anchor!==null&&(this.active.set(t),this.select(this.anchor,t))}endDrag(){this.dragging=!1}static ɵfac=function(t){return new(t||e)};static ɵcmp=A({type:e,selectors:[[`app-cd-cycle-chart`]],hostBindings:function(e,t){e&1&&U(`pointerup`,function(){return t.endDrag()},Fu)(`pointercancel`,function(){return t.endDrag()},Fu)},inputs:{cycles:[1,`cycles`],range:[1,`range`]},outputs:{range:`rangeChange`},decls:69,vars:25,consts:[[1,`range`],[`type`,`number`,`inputmode`,`numeric`,3,`change`,`min`,`max`,`value`],[`type`,`button`],[1,`summary`],[1,`hint`,3,`id`],[1,`plot`],[`aria-hidden`,`true`,1,`axis`],[1,`tick`,`top`],[1,`tick`,`zero`],[1,`area`],[`aria-hidden`,`true`,1,`band`,3,`left`,`width`],[`aria-hidden`,`true`,1,`budget`],[`role`,`listbox`,`aria-multiselectable`,`true`,`aria-orientation`,`horizontal`,`tabindex`,`0`,1,`bars`,3,`keydown`,`focus`,`blur`,`pointerdown`,`pointermove`,`pointerleave`],[`role`,`option`,1,`col`,3,`id`,`over`,`out`,`active`],[`aria-hidden`,`true`,1,`tip`,3,`left`,`right`],[`aria-hidden`,`true`,1,`markers`],[3,`over`],[`aria-label`,`Chart key`,1,`legend`],[`aria-hidden`,`true`,1,`key`,`ok`],[`aria-hidden`,`true`,1,`key`,`over`],[`aria-hidden`,`true`,1,`key-marker`],[`aria-hidden`,`true`,1,`key`,`line`],[1,`table`],[`tabindex`,`0`,`role`,`region`,1,`table-wrap`],[1,`sr-only`],[`scope`,`col`,1,`num`],[`scope`,`col`],[`type`,`button`,3,`click`],[`aria-hidden`,`true`,1,`band`],[`role`,`option`,1,`col`,3,`id`],[1,`bar`],[`aria-hidden`,`true`,1,`tip`],[1,`tip-head`],[1,`flag`],[1,`tip-row`],[1,`mono`],[1,`mono`,`name`],[1,`num`]],template:function(e,t){if(e&1&&(B(0,`div`,0)(1,`label`)(2,`span`),J(3,`Start`),V(),B(4,`input`,1),W(`change`,function(e){return t.setEnd(`from`,e)}),V()(),B(5,`label`)(6,`span`),J(7,`End`),V(),B(8,`input`,1),W(`change`,function(e){return t.setEnd(`to`,e)}),V()(),M(9,MA,2,0,`button`,2),B(10,`p`,3),J(11),V()(),B(12,`p`,4),J(13,` Drag across the bars to pick a range of cycles. With the chart focused, the arrow keys move between cycles, Shift with an arrow key extends the range, Enter picks one cycle and Escape shows all cycles again. `),V(),B(14,`div`,5)(15,`div`,6)(16,`span`,7),J(17),V(),B(18,`span`,8),J(19,`0 ms`),V()(),B(20,`div`,9),M(21,NA,1,4,`div`,10),B(22,`div`,11)(23,`span`),J(24),V()(),B(25,`div`,12),W(`keydown`,function(e){return t.onKey(e)})(`focus`,function(){return t.onFocus()})(`blur`,function(){return t.focused.set(!1)})(`pointerdown`,function(e){return t.startDrag(e)})(`pointermove`,function(e){return t.onPointerMove(e)})(`pointerleave`,function(){return t.hover.set(null)}),P(26,PA,2,12,`div`,13,AA),V(),M(28,RA,12,12,`div`,14),V()(),B(29,`div`,15),P(30,zA,1,2,`span`,16,AA),V(),B(32,`ul`,17)(33,`li`),Vg(34,`span`,18),J(35,`Within budget`),V(),B(36,`li`),Vg(37,`span`,19)(38,`span`,20),J(39,`Over budget `),V(),B(40,`li`),Vg(41,`span`,21),J(42),V()(),B(43,`details`,22)(44,`summary`),J(45,`Show the cycles as a table`),V(),B(46,`div`,23)(47,`table`)(48,`caption`,24),J(49),V(),B(50,`thead`)(51,`tr`)(52,`th`,25),J(53,`Cycle`),V(),B(54,`th`,25),J(55,`Duration`),V(),B(56,`th`,26),J(57,`Budget`),V(),B(58,`th`,25),J(59,`Checks`),V(),B(60,`th`,25),J(61,`Passes`),V(),B(62,`th`,26),J(63,`After`),V(),B(64,`th`,26),J(65,`Slowest component`),V()()(),B(66,`tbody`),P(67,VA,15,7,`tr`,null,jA),V()()()()),e&2){let e,n;k(4),qg(`min`,t.firstId())(`max`,t.lastId())(`value`,t.startId()),k(4),qg(`min`,t.firstId())(`max`,t.lastId())(`value`,t.endId()),k(),N(t.range()?9:-1),k(2),Y(t.summary()),k(),qg(`id`,t.hintId),k(2),q(`flush`,t.bars().length>t.gapUntil),k(3),Y(t.fmt(t.max())),k(4),N((e=t.band())?21:-1,e),k(),K(`bottom`,t.budgetAt(),`%`),k(2),Y(t.budgetLabel),k(),j(`aria-label`,`Change detection cycles, `+t.summary())(`aria-describedby`,t.hintId)(`aria-activedescendant`,t.activeOptionId()),k(),F(t.bars()),k(2),N((n=t.tip())?28:-1,n),k(),q(`flush`,t.bars().length>t.gapUntil),k(),F(t.bars()),k(12),Y(t.budgetLabel),k(4),j(`aria-label`,t.tableLabel()),k(3),X(` `,t.tableLabel(),` `),k(18),F(t.selected())}},styles:[`[_nghost-%COMP%] { display: block; min-width: 0; } @@ -1224,7 +1224,7 @@ td.mono[_ngcontent-%COMP%] { .bar[_ngcontent-%COMP%] { transition: none; } -}`]})},GA=(e,t)=>t.id,KA=(e,t)=>t.index,qA=(e,t)=>t.kind;function JA(e,t){if(e&1&&(B(0,`p`,0),J(1),V()),e&2){let e=G(2);k(),Z(` Pick `,e.max,` cycles or fewer to see their spans. `,e.count(),` are picked. `)}}function YA(e,t){if(e&1&&(B(0,`span`),J(1),V()),e&2){let e=t.$implicit;K(`left`,e.x,`%`)(`width`,e.w,`%`),k(),X(`cycle `,e.id)}}function XA(e,t){if(e&1){let e=H();B(0,`button`,11),W(`focus`,function(){let t=T(e).$implicit;return E(G(3).current.set(t.index))})(`mouseenter`,function(){let t=T(e).$implicit;return E(G(3).hover.set(t.index))})(`mouseleave`,function(){return T(e),E(G(3).hover.set(null))})(`click`,function(){let t=T(e).$implicit;return E(G(3).choose(t))}),B(1,`span`,12),J(2),V()()}if(e&2){let e=t.$implicit,n=G(3);M_(pv(`block kind-`,e.kind)),K(`left`,e.x,`%`)(`width`,e.w,`%`)(`top`,e.depth*n.row,`px`),q(`narrow`,e.w<4),j(`tabindex`,e.index===n.tabStop()?0:-1)(`data-index`,e.index)(`aria-label`,n.describe(e))(`aria-disabled`,e.component?null:`true`),k(2),Y(e.name)}}function ZA(e,t){if(e&1&&(B(0,`li`),Vg(1,`span`,13),J(2),V()),e&2){let e=t.$implicit;k(),M_(pv(`key kind-`,e.kind)),k(),Y(e.label)}}function QA(e,t){if(e&1&&(B(0,`p`,0),J(1),V()),e&2){let e=G(3);k(),Z(` Each cycle keeps its longest spans. `,e.dropped(),` shorter `,e.dropped()===1?`span was`:`spans were`,` left out. `)}}function $A(e,t){if(e&1&&(B(0,`tr`)(1,`td`,17),J(2),V(),B(3,`td`,18),J(4),V(),B(5,`td`),J(6),V(),B(7,`td`,17),J(8),V(),B(9,`td`,17),J(10),V(),B(11,`td`,17),J(12),V(),B(13,`td`,17),J(14),V()()),e&2){let e=t.$implicit,n=G(4);k(2),Y(e.cycleId),k(),K(`padding-left`,6+e.depth*8,`px`),k(),Y(e.name),k(2),Y(n.kindLabel(e)),k(2),Y(e.depth),k(2),Y(n.fmt(e.start)),k(2),Y(n.fmt(e.ms)),k(2),Y(n.fmt(e.selfMs))}}function ej(e,t){if(e&1&&(B(0,`div`,10)(1,`table`)(2,`caption`,14),J(3),V(),B(4,`thead`)(5,`tr`)(6,`th`,15),J(7,`Cycle`),V(),B(8,`th`,16),J(9,`Span`),V(),B(10,`th`,16),J(11,`Kind`),V(),B(12,`th`,15),J(13,`Depth`),V(),B(14,`th`,15),J(15,`Start`),V(),B(16,`th`,15),J(17,`Total`),V(),B(18,`th`,15),J(19,`Self`),V()()(),B(20,`tbody`),P(21,$A,15,9,`tr`,null,KA),V()()()),e&2){let e=G(),t=G(2);j(`aria-label`,t.tableLabel()),k(3),X(` `,t.tableLabel(),` `),k(18),F(e.blocks)}}function tj(e,t){if(e&1){let e=H();B(0,`div`,1),W(`keydown`,function(t){return T(e),E(G(2).onKey(t))}),B(1,`div`,2),P(2,YA,2,5,`span`,3,GA),V(),B(4,`div`,4),P(5,XA,3,16,`button`,5,KA),V()(),B(7,`p`,6),J(8),V(),B(9,`ul`,7),P(10,ZA,3,4,`li`,null,qA),V(),B(12,`p`,8),J(13,` Arrow keys move along a row, Up goes to the enclosing span and Down to the first nested one. Enter on a component shows it in the tree. `),V(),M(14,QA,2,2,`p`,0),B(15,`details`,9),W(`toggle`,function(t){return T(e),E(G(2).onToggle(t))}),B(16,`summary`),J(17,`Show the spans as a table`),V(),M(18,ej,23,2,`div`,10),V()}if(e&2){let e=t,n=G(2);j(`aria-label`,n.label()),k(2),F(e.cycles),k(2),K(`height`,e.depth*n.row,`px`),k(),F(e.blocks),k(3),Y(n.readout()),k(2),F(n.kinds),k(4),N(n.dropped()?14:-1),k(4),N(n.tableOpen()?18:-1)}}function nj(e,t){if(e&1&&(B(0,`h3`),J(1,`Spans in the picked cycles`),V(),M(2,JA,2,2,`p`,0)(3,tj,19,6)),e&2){let e,t=G();k(2),N(t.tooMany()?2:(e=t.graph())?3:-1,e)}}var rj=22;function ij(e,t){for(let n=e.length-1;n>=0;n--)if(t(e[n]))return e[n]}var aj=class e{cycles=$([]);names=$([]);scope=$(`the recording`);pick=Rv();row=rj;max=30;kinds=[`c`,`h`,`r`,`o`].map(e=>({kind:e,label:iA[e]}));current=O(0);tableOpen=O(!1);hover=O(null);hasSpans=Q(()=>this.cycles().some(e=>e.spans?.length));count=Q(()=>this.cycles().length);tooMany=Q(()=>this.count()>30);graph=Q(()=>this.tooMany()?null:oA(this.cycles(),this.names()));tabStop=Q(()=>Math.min(this.current(),Math.max((this.graph()?.blocks.length??1)-1,0)));dropped=Q(()=>this.graph()?.cycles.reduce((e,t)=>e+t.droppedSpans,0)??0);label=Q(()=>`Spans in ${this.scope()} over time, nested by depth. Pick a component to show it in the tree.`);readout=Q(()=>{let e=(this.graph()?.blocks??[])[this.hover()??this.tabStop()];return e?this.describe(e):``});tableLabel=Q(()=>`Timed spans in ${this.scope()}`);fmt(e){return $k(e)}kindLabel(e){return iA[e.kind]}onToggle(e){this.tableOpen.set(e.target.open)}describe(e){let t=[e.name,iA[e.kind],`${$k(e.ms)} total`];return e.selfMs!==e.ms&&t.push(`${$k(e.selfMs)} self`),t.push(e.start<0?`cycle ${e.cycleId}, ${$k(-e.start)} before it started`:`cycle ${e.cycleId} at ${$k(e.start)}`),t.join(`, `)}choose(e){this.current.set(e.index),e.component&&this.pick.emit(e.component)}onKey(e){let t=this.graph()?.blocks??[];if(!t.length)return;let n=t[this.tabStop()],r;switch(e.key){case`ArrowRight`:r=t.find(e=>e.index>n.index&&e.depth===n.depth);break;case`ArrowLeft`:r=ij(t,e=>e.indexe.indexe.parent===n.index)??t.find(e=>e.index>n.index&&e.depth===n.depth+1);break;case`Home`:r=t[0];break;case`End`:r=t.at(-1);break;default:return}e.preventDefault(),this.hover.set(null),r&&(this.current.set(r.index),e.currentTarget.querySelector(`button[data-index="${r.index}"]`)?.focus())}static ɵfac=function(t){return new(t||e)};static ɵcmp=A({type:e,selectors:[[`app-cd-flame-graph`]],inputs:{cycles:[1,`cycles`],names:[1,`names`],scope:[1,`scope`]},outputs:{pick:`pick`},decls:1,vars:1,consts:[[1,`note`],[`role`,`group`,1,`flame`,3,`keydown`],[`aria-hidden`,`true`,1,`cycles`],[3,`left`,`width`],[1,`rows`],[`type`,`button`,3,`class`,`narrow`,`left`,`width`,`top`],[`aria-hidden`,`true`,1,`readout`],[`aria-label`,`Span kinds`,1,`legend`],[1,`hint`],[1,`table`,3,`toggle`],[`tabindex`,`0`,`role`,`region`,1,`table-wrap`],[`type`,`button`,3,`focus`,`mouseenter`,`mouseleave`,`click`],[1,`text`],[`aria-hidden`,`true`],[1,`sr-only`],[`scope`,`col`,1,`num`],[`scope`,`col`],[1,`num`],[1,`mono`]],template:function(e,t){e&1&&M(0,nj,4,1),e&2&&N(t.hasSpans()?0:-1)},styles:[`[_nghost-%COMP%] { +}`]})},KA=(e,t)=>t.id,qA=(e,t)=>t.index,JA=(e,t)=>t.kind;function YA(e,t){if(e&1&&(B(0,`p`,0),J(1),V()),e&2){let e=G(2);k(),Z(` Pick `,e.max,` cycles or fewer to see their spans. `,e.count(),` are picked. `)}}function XA(e,t){if(e&1&&(B(0,`span`),J(1),V()),e&2){let e=t.$implicit;K(`left`,e.x,`%`)(`width`,e.w,`%`),k(),X(`cycle `,e.id)}}function ZA(e,t){if(e&1){let e=H();B(0,`button`,11),W(`focus`,function(){let t=T(e).$implicit;return E(G(3).current.set(t.index))})(`mouseenter`,function(){let t=T(e).$implicit;return E(G(3).hover.set(t.index))})(`mouseleave`,function(){return T(e),E(G(3).hover.set(null))})(`click`,function(){let t=T(e).$implicit;return E(G(3).choose(t))}),B(1,`span`,12),J(2),V()()}if(e&2){let e=t.$implicit,n=G(3);M_(pv(`block kind-`,e.kind)),K(`left`,e.x,`%`)(`width`,e.w,`%`)(`top`,e.depth*n.row,`px`),q(`narrow`,e.w<4),j(`tabindex`,e.index===n.tabStop()?0:-1)(`data-index`,e.index)(`aria-label`,n.describe(e))(`aria-disabled`,e.component?null:`true`),k(2),Y(e.name)}}function QA(e,t){if(e&1&&(B(0,`li`),Vg(1,`span`,13),J(2),V()),e&2){let e=t.$implicit;k(),M_(pv(`key kind-`,e.kind)),k(),Y(e.label)}}function $A(e,t){if(e&1&&(B(0,`p`,0),J(1),V()),e&2){let e=G(3);k(),Z(` Each cycle keeps its longest spans. `,e.dropped(),` shorter `,e.dropped()===1?`span was`:`spans were`,` left out. `)}}function ej(e,t){if(e&1&&(B(0,`tr`)(1,`td`,17),J(2),V(),B(3,`td`,18),J(4),V(),B(5,`td`),J(6),V(),B(7,`td`,17),J(8),V(),B(9,`td`,17),J(10),V(),B(11,`td`,17),J(12),V(),B(13,`td`,17),J(14),V()()),e&2){let e=t.$implicit,n=G(4);k(2),Y(e.cycleId),k(),K(`padding-left`,6+e.depth*8,`px`),k(),Y(e.name),k(2),Y(n.kindLabel(e)),k(2),Y(e.depth),k(2),Y(n.fmt(e.start)),k(2),Y(n.fmt(e.ms)),k(2),Y(n.fmt(e.selfMs))}}function tj(e,t){if(e&1&&(B(0,`div`,10)(1,`table`)(2,`caption`,14),J(3),V(),B(4,`thead`)(5,`tr`)(6,`th`,15),J(7,`Cycle`),V(),B(8,`th`,16),J(9,`Span`),V(),B(10,`th`,16),J(11,`Kind`),V(),B(12,`th`,15),J(13,`Depth`),V(),B(14,`th`,15),J(15,`Start`),V(),B(16,`th`,15),J(17,`Total`),V(),B(18,`th`,15),J(19,`Self`),V()()(),B(20,`tbody`),P(21,ej,15,9,`tr`,null,qA),V()()()),e&2){let e=G(),t=G(2);j(`aria-label`,t.tableLabel()),k(3),X(` `,t.tableLabel(),` `),k(18),F(e.blocks)}}function nj(e,t){if(e&1){let e=H();B(0,`div`,1),W(`keydown`,function(t){return T(e),E(G(2).onKey(t))}),B(1,`div`,2),P(2,XA,2,5,`span`,3,KA),V(),B(4,`div`,4),P(5,ZA,3,16,`button`,5,qA),V()(),B(7,`p`,6),J(8),V(),B(9,`ul`,7),P(10,QA,3,4,`li`,null,JA),V(),B(12,`p`,8),J(13,` Arrow keys move along a row, Up goes to the enclosing span and Down to the first nested one. Enter on a component shows it in the tree. `),V(),M(14,$A,2,2,`p`,0),B(15,`details`,9),W(`toggle`,function(t){return T(e),E(G(2).onToggle(t))}),B(16,`summary`),J(17,`Show the spans as a table`),V(),M(18,tj,23,2,`div`,10),V()}if(e&2){let e=t,n=G(2);j(`aria-label`,n.label()),k(2),F(e.cycles),k(2),K(`height`,e.depth*n.row,`px`),k(),F(e.blocks),k(3),Y(n.readout()),k(2),F(n.kinds),k(4),N(n.dropped()?14:-1),k(4),N(n.tableOpen()?18:-1)}}function rj(e,t){if(e&1&&(B(0,`h3`),J(1,`Spans in the picked cycles`),V(),M(2,YA,2,2,`p`,0)(3,nj,19,6)),e&2){let e,t=G();k(2),N(t.tooMany()?2:(e=t.graph())?3:-1,e)}}var ij=22;function aj(e,t){for(let n=e.length-1;n>=0;n--)if(t(e[n]))return e[n]}var oj=class e{cycles=$([]);names=$([]);scope=$(`the recording`);pick=Rv();row=ij;max=30;kinds=[`c`,`h`,`r`,`o`].map(e=>({kind:e,label:aA[e]}));current=O(0);tableOpen=O(!1);hover=O(null);hasSpans=Q(()=>this.cycles().some(e=>e.spans?.length));count=Q(()=>this.cycles().length);tooMany=Q(()=>this.count()>30);graph=Q(()=>this.tooMany()?null:sA(this.cycles(),this.names()));tabStop=Q(()=>Math.min(this.current(),Math.max((this.graph()?.blocks.length??1)-1,0)));dropped=Q(()=>this.graph()?.cycles.reduce((e,t)=>e+t.droppedSpans,0)??0);label=Q(()=>`Spans in ${this.scope()} over time, nested by depth. Pick a component to show it in the tree.`);readout=Q(()=>{let e=(this.graph()?.blocks??[])[this.hover()??this.tabStop()];return e?this.describe(e):``});tableLabel=Q(()=>`Timed spans in ${this.scope()}`);fmt(e){return eA(e)}kindLabel(e){return aA[e.kind]}onToggle(e){this.tableOpen.set(e.target.open)}describe(e){let t=[e.name,aA[e.kind],`${eA(e.ms)} total`];return e.selfMs!==e.ms&&t.push(`${eA(e.selfMs)} self`),t.push(e.start<0?`cycle ${e.cycleId}, ${eA(-e.start)} before it started`:`cycle ${e.cycleId} at ${eA(e.start)}`),t.join(`, `)}choose(e){this.current.set(e.index),e.component&&this.pick.emit(e.component)}onKey(e){let t=this.graph()?.blocks??[];if(!t.length)return;let n=t[this.tabStop()],r;switch(e.key){case`ArrowRight`:r=t.find(e=>e.index>n.index&&e.depth===n.depth);break;case`ArrowLeft`:r=aj(t,e=>e.indexe.indexe.parent===n.index)??t.find(e=>e.index>n.index&&e.depth===n.depth+1);break;case`Home`:r=t[0];break;case`End`:r=t.at(-1);break;default:return}e.preventDefault(),this.hover.set(null),r&&(this.current.set(r.index),e.currentTarget.querySelector(`button[data-index="${r.index}"]`)?.focus())}static ɵfac=function(t){return new(t||e)};static ɵcmp=A({type:e,selectors:[[`app-cd-flame-graph`]],inputs:{cycles:[1,`cycles`],names:[1,`names`],scope:[1,`scope`]},outputs:{pick:`pick`},decls:1,vars:1,consts:[[1,`note`],[`role`,`group`,1,`flame`,3,`keydown`],[`aria-hidden`,`true`,1,`cycles`],[3,`left`,`width`],[1,`rows`],[`type`,`button`,3,`class`,`narrow`,`left`,`width`,`top`],[`aria-hidden`,`true`,1,`readout`],[`aria-label`,`Span kinds`,1,`legend`],[1,`hint`],[1,`table`,3,`toggle`],[`tabindex`,`0`,`role`,`region`,1,`table-wrap`],[`type`,`button`,3,`focus`,`mouseenter`,`mouseleave`,`click`],[1,`text`],[`aria-hidden`,`true`],[1,`sr-only`],[`scope`,`col`,1,`num`],[`scope`,`col`],[1,`num`],[1,`mono`]],template:function(e,t){e&1&&M(0,rj,4,1),e&2&&N(t.hasSpans()?0:-1)},styles:[`[_nghost-%COMP%] { display: block; min-width: 0; } @@ -1431,7 +1431,7 @@ td.mono[_ngcontent-%COMP%] { .num[_ngcontent-%COMP%] { text-align: right; font-variant-numeric: tabular-nums; -}`]})};function oj(e,t){if(e&1&&(B(0,`tr`)(1,`td`,5),J(2),V(),B(3,`td`,6),J(4),V(),B(5,`td`,6),J(6),V(),B(7,`td`,6),J(8),V()()),e&2){let e=t.$implicit,n=G(3);k(2),Z(``,e.name,`.`,e.hook),k(2),Y(e.calls),k(2),Y(n.ms(e.ms)),k(2),Y(n.ms(e.maxMs))}}function sj(e,t){if(e&1&&(B(0,`div`)(1,`h3`),J(2,`Lifecycle hooks`),V(),B(3,`table`)(4,`thead`)(5,`tr`)(6,`th`,3),J(7,`Hook`),V(),B(8,`th`,4),J(9,`Calls`),V(),B(10,`th`,4),J(11,`Time`),V(),B(12,`th`,4),J(13,`Slowest`),V()()(),B(14,`tbody`),P(15,oj,9,5,`tr`,null,kg),V()()()),e&2){let e=G(2);k(15),F(e.hooks())}}function cj(e,t){if(e&1&&J(0),e&2){let e=G().$implicit;X(` (`,e.listener,`) `)}}function lj(e,t){if(e&1&&(B(0,`tr`)(1,`td`,5),J(2),M(3,cj,1,1),V(),B(4,`td`,6),J(5),V(),B(6,`td`,6),J(7),V(),B(8,`td`,6),J(9),V()()),e&2){let e=t.$implicit,n=G(3);k(2),X(` `,e.name,` `),k(),N(e.listener?3:-1),k(2),Y(e.calls),k(2),Y(n.ms(e.ms)),k(2),Y(n.ms(e.maxMs))}}function uj(e,t){if(e&1&&(B(0,`div`)(1,`h3`),J(2,`Output listeners`),V(),B(3,`table`)(4,`thead`)(5,`tr`)(6,`th`,3),J(7,`Listener`),V(),B(8,`th`,4),J(9,`Calls`),V(),B(10,`th`,4),J(11,`Time`),V(),B(12,`th`,4),J(13,`Slowest`),V()()(),B(14,`tbody`),P(15,lj,10,5,`tr`,null,kg),V()()()),e&2){let e=G(2);k(15),F(e.outputs())}}function dj(e,t){if(e&1&&(B(0,`p`,1),J(1),V()),e&2){let e=t,n=G(2);k(),iv(` afterRender callbacks ran `,e.runs,` `,e.runs===1?`time`:`times`,`, `,n.ms(e.ms),` in total, slowest `,n.ms(e.maxMs),`. `)}}function fj(e,t){if(e&1&&(B(0,`p`,2),J(1),V()),e&2){let e=G(2);k(),Z(` `,e.dropped(),` more hook or output `,e.dropped()===1?`row is`:`rows are`,` left out. A recording lists at most 100 of each. `)}}function pj(e,t){if(e&1&&(B(0,`div`,0),M(1,sj,17,0,`div`),M(2,uj,17,0,`div`),V(),M(3,dj,2,4,`p`,1),M(4,fj,2,2,`p`,2)),e&2){let e,t=G();k(),N(t.hooks().length?1:-1),k(),N(t.outputs().length?2:-1),k(),N((e=t.afterRender())?3:-1,e),k(),N(t.dropped()?4:-1)}}var mj=10;function hj(e){return`${e<10?e.toFixed(2):Math.round(e)} ms`}var gj=class e{page=$(null);hooks=Q(()=>(this.page()?.hooks??[]).slice(0,mj));outputs=Q(()=>(this.page()?.outputs??[]).slice(0,mj));afterRender=Q(()=>{let e=this.page()?.afterRender;return e?.runs?e:null});dropped=Q(()=>this.page()?.droppedTimings??0);ms(e){return hj(e)}static ɵfac=function(t){return new(t||e)};static ɵcmp=A({type:e,selectors:[[`app-cd-timing`]],inputs:{page:[1,`page`]},decls:1,vars:1,consts:[[1,`timing`],[1,`after-render`],[1,`note`],[`scope`,`col`],[`scope`,`col`,1,`num`],[1,`mono`],[1,`num`]],template:function(e,t){e&1&&M(0,pj,5,4),e&2&&N(t.hooks().length||t.outputs().length||t.afterRender()?0:-1)},styles:[`[_nghost-%COMP%] { +}`]})};function sj(e,t){if(e&1&&(B(0,`tr`)(1,`td`,5),J(2),V(),B(3,`td`,6),J(4),V(),B(5,`td`,6),J(6),V(),B(7,`td`,6),J(8),V()()),e&2){let e=t.$implicit,n=G(3);k(2),Z(``,e.name,`.`,e.hook),k(2),Y(e.calls),k(2),Y(n.ms(e.ms)),k(2),Y(n.ms(e.maxMs))}}function cj(e,t){if(e&1&&(B(0,`div`)(1,`h3`),J(2,`Lifecycle hooks`),V(),B(3,`table`)(4,`thead`)(5,`tr`)(6,`th`,3),J(7,`Hook`),V(),B(8,`th`,4),J(9,`Calls`),V(),B(10,`th`,4),J(11,`Time`),V(),B(12,`th`,4),J(13,`Slowest`),V()()(),B(14,`tbody`),P(15,sj,9,5,`tr`,null,kg),V()()()),e&2){let e=G(2);k(15),F(e.hooks())}}function lj(e,t){if(e&1&&J(0),e&2){let e=G().$implicit;X(` (`,e.listener,`) `)}}function uj(e,t){if(e&1&&(B(0,`tr`)(1,`td`,5),J(2),M(3,lj,1,1),V(),B(4,`td`,6),J(5),V(),B(6,`td`,6),J(7),V(),B(8,`td`,6),J(9),V()()),e&2){let e=t.$implicit,n=G(3);k(2),X(` `,e.name,` `),k(),N(e.listener?3:-1),k(2),Y(e.calls),k(2),Y(n.ms(e.ms)),k(2),Y(n.ms(e.maxMs))}}function dj(e,t){if(e&1&&(B(0,`div`)(1,`h3`),J(2,`Output listeners`),V(),B(3,`table`)(4,`thead`)(5,`tr`)(6,`th`,3),J(7,`Listener`),V(),B(8,`th`,4),J(9,`Calls`),V(),B(10,`th`,4),J(11,`Time`),V(),B(12,`th`,4),J(13,`Slowest`),V()()(),B(14,`tbody`),P(15,uj,10,5,`tr`,null,kg),V()()()),e&2){let e=G(2);k(15),F(e.outputs())}}function fj(e,t){if(e&1&&(B(0,`p`,1),J(1),V()),e&2){let e=t,n=G(2);k(),iv(` afterRender callbacks ran `,e.runs,` `,e.runs===1?`time`:`times`,`, `,n.ms(e.ms),` in total, slowest `,n.ms(e.maxMs),`. `)}}function pj(e,t){if(e&1&&(B(0,`p`,2),J(1),V()),e&2){let e=G(2);k(),Z(` `,e.dropped(),` more hook or output `,e.dropped()===1?`row is`:`rows are`,` left out. A recording lists at most 100 of each. `)}}function mj(e,t){if(e&1&&(B(0,`div`,0),M(1,cj,17,0,`div`),M(2,dj,17,0,`div`),V(),M(3,fj,2,4,`p`,1),M(4,pj,2,2,`p`,2)),e&2){let e,t=G();k(),N(t.hooks().length?1:-1),k(),N(t.outputs().length?2:-1),k(),N((e=t.afterRender())?3:-1,e),k(),N(t.dropped()?4:-1)}}var hj=10;function gj(e){return`${e<10?e.toFixed(2):Math.round(e)} ms`}var _j=class e{page=$(null);hooks=Q(()=>(this.page()?.hooks??[]).slice(0,hj));outputs=Q(()=>(this.page()?.outputs??[]).slice(0,hj));afterRender=Q(()=>{let e=this.page()?.afterRender;return e?.runs?e:null});dropped=Q(()=>this.page()?.droppedTimings??0);ms(e){return gj(e)}static ɵfac=function(t){return new(t||e)};static ɵcmp=A({type:e,selectors:[[`app-cd-timing`]],inputs:{page:[1,`page`]},decls:1,vars:1,consts:[[1,`timing`],[1,`after-render`],[1,`note`],[`scope`,`col`],[`scope`,`col`,1,`num`],[1,`mono`],[1,`num`]],template:function(e,t){e&1&&M(0,mj,5,4),e&2&&N(t.hooks().length||t.outputs().length||t.afterRender()?0:-1)},styles:[`[_nghost-%COMP%] { display: block; } @@ -1491,7 +1491,7 @@ td.mono[_ngcontent-%COMP%] { margin: 8px 0 0; color: var(--%NS%text-2); font-size: 12px; -}`]})};function _j(e,t){if(e&1&&(B(0,`p`,5),J(1),V()),e&2){let e=G();k(),Y(e.error())}}function vj(e,t){let n=new Blob([JSON.stringify(e,null,2)],{type:`application/json`}),r=URL.createObjectURL(n),i=document.createElement(`a`);i.href=r,i.download=t,document.body.append(i),i.click(),i.remove(),setTimeout(()=>URL.revokeObjectURL(r),0)}var yj=class e{page=$(null);maxCycles=$(200);imported=Rv();error=O(``);hasCycles(){return(this.page()?.cycles.length??0)>0}exportJson(){let e=this.page();e&&vj(Uk(e,e.pageId),`change-detection-${e.pageId}.json`)}exportTrace(){let e=this.page();e&&vj(Xk(e,e.pageId),`change-detection-${e.pageId}.trace.json`)}async read(e){let t=e.files?.[0];if(e.value=``,!t)return;if(t.size>2e7){this.error.set(`${t.name}: The file is larger than 20 MB.`);return}let n;try{n=await t.text()}catch{this.error.set(`Could not read the file.`);return}let r=Wk(n,this.maxCycles());if(!r.ok){this.error.set(`${t.name}: ${r.error}`);return}this.error.set(``),this.imported.emit({fileName:t.name,page:{...r.recording,pageId:r.pageId,supported:!0}})}static ɵfac=function(t){return new(t||e)};static ɵcmp=A({type:e,selectors:[[`app-cd-transfer`]],inputs:{page:[1,`page`],maxCycles:[1,`maxCycles`]},outputs:{imported:`imported`},decls:10,vars:3,consts:[[`file`,``],[`role`,`group`,`aria-label`,`Export and import the recording`,1,`transfer`],[`type`,`button`,3,`click`,`disabled`],[`type`,`button`,3,`click`],[`type`,`file`,`accept`,`.json,application/json`,`hidden`,``,3,`change`],[`role`,`alert`,1,`error`]],template:function(e,t){if(e&1){let e=H();B(0,`div`,1)(1,`button`,2),W(`click`,function(){return t.exportJson()}),J(2,`Export JSON`),V(),B(3,`button`,2),W(`click`,function(){return t.exportTrace()}),J(4,` Export trace (Perfetto) `),V(),B(5,`button`,3),W(`click`,function(){return T(e),E(d_(8).click())}),J(6,`Import`),V(),B(7,`input`,4,0),W(`change`,function(){T(e);let n=d_(8);return E(t.read(n))}),V()(),M(9,_j,2,1,`p`,5)}e&2&&(k(),qg(`disabled`,!t.hasCycles()),k(2),qg(`disabled`,!t.hasCycles()),k(6),N(t.error()?9:-1))},styles:[`[_nghost-%COMP%] { +}`]})};function vj(e,t){if(e&1&&(B(0,`p`,5),J(1),V()),e&2){let e=G();k(),Y(e.error())}}function yj(e,t){let n=new Blob([JSON.stringify(e,null,2)],{type:`application/json`}),r=URL.createObjectURL(n),i=document.createElement(`a`);i.href=r,i.download=t,document.body.append(i),i.click(),i.remove(),setTimeout(()=>URL.revokeObjectURL(r),0)}var bj=class e{page=$(null);maxCycles=$(200);imported=Rv();error=O(``);hasCycles(){return(this.page()?.cycles.length??0)>0}exportJson(){let e=this.page();e&&yj(Wk(e,e.pageId),`change-detection-${e.pageId}.json`)}exportTrace(){let e=this.page();e&&yj(Zk(e,e.pageId),`change-detection-${e.pageId}.trace.json`)}async read(e){let t=e.files?.[0];if(e.value=``,!t)return;if(t.size>2e7){this.error.set(`${t.name}: The file is larger than 20 MB.`);return}let n;try{n=await t.text()}catch{this.error.set(`Could not read the file.`);return}let r=Gk(n,this.maxCycles());if(!r.ok){this.error.set(`${t.name}: ${r.error}`);return}this.error.set(``),this.imported.emit({fileName:t.name,page:{...r.recording,pageId:r.pageId,supported:!0}})}static ɵfac=function(t){return new(t||e)};static ɵcmp=A({type:e,selectors:[[`app-cd-transfer`]],inputs:{page:[1,`page`],maxCycles:[1,`maxCycles`]},outputs:{imported:`imported`},decls:10,vars:3,consts:[[`file`,``],[`role`,`group`,`aria-label`,`Export and import the recording`,1,`transfer`],[`type`,`button`,3,`click`,`disabled`],[`type`,`button`,3,`click`],[`type`,`file`,`accept`,`.json,application/json`,`hidden`,``,3,`change`],[`role`,`alert`,1,`error`]],template:function(e,t){if(e&1){let e=H();B(0,`div`,1)(1,`button`,2),W(`click`,function(){return t.exportJson()}),J(2,`Export JSON`),V(),B(3,`button`,2),W(`click`,function(){return t.exportTrace()}),J(4,` Export trace (Perfetto) `),V(),B(5,`button`,3),W(`click`,function(){return T(e),E(d_(8).click())}),J(6,`Import`),V(),B(7,`input`,4,0),W(`change`,function(){T(e);let n=d_(8);return E(t.read(n))}),V()(),M(9,vj,2,1,`p`,5)}e&2&&(k(),qg(`disabled`,!t.hasCycles()),k(2),qg(`disabled`,!t.hasCycles()),k(6),N(t.error()?9:-1))},styles:[`[_nghost-%COMP%] { display: contents; } @@ -1533,7 +1533,7 @@ button[_ngcontent-%COMP%]:disabled { margin: 0; color: var(--%NS%danger-text); font-size: 12px; -}`]})},bj=(e,t)=>t.stat.name;function xj(e,t){if(e&1&&(B(0,`span`,8),J(1),V()),e&2){let e=G(2).$implicit;k(),X(``,e.other,` more`)}}function Sj(e,t){if(e&1&&(B(0,`div`,6)(1,`span`,7),J(2),V(),M(3,xj,2,1,`span`,8),V()),e&2){let e=G().$implicit;K(`--%NS%tone`,e.tone+`%`),k(2),Y(e.label),k(),N(e.roomy?3:-1)}}function Cj(e,t){if(e&1&&(B(0,`span`,10),J(1),V(),B(2,`span`,11),J(3),V()),e&2){let e=G(2).$implicit,t=G(2);k(),Y(e.stat.name),k(2),Y(t.fmt(e.stat.ms))}}function wj(e,t){if(e&1){let e=H();B(0,`button`,9),W(`focus`,function(){T(e);let t=G().$index;return E(G(2).current.set(t))})(`click`,function(){T(e);let t=G().$implicit;return E(G(2).pick.emit(t.stat.name))}),M(1,Cj,4,2),V()}if(e&2){let e=G(),t=e.$implicit,n=e.$index,r=G(2);K(`--%NS%tone`,t.tone+`%`),j(`tabindex`,n===r.tabStop()?0:-1)(`aria-label`,t.label)(`data-index`,n),k(),N(t.roomy?1:-1)}}function Tj(e,t){if(e&1&&(B(0,`li`),M(1,Sj,4,4,`div`,4)(2,wj,2,6,`button`,5),V()),e&2){let e=t.$implicit;K(`left`,e.x,`%`)(`top`,e.y,`%`)(`width`,e.w,`%`)(`height`,e.h,`%`),k(),N(e.other?1:2)}}function Ej(e,t){if(e&1){let e=H();B(0,`ul`,2),W(`keydown`,function(t){return T(e),E(G().onKey(t))}),P(1,Tj,3,9,`li`,3,bj),V()}if(e&2){let e=G();j(`aria-label`,e.label()),k(),F(e.cells())}}function Dj(e,t){e&1&&(B(0,`p`,1),J(1,`No component time in these cycles.`),V())}var Oj=24,kj=3,Aj=class e{stats=$([]);scope=$(`the recording`);pick=Rv();current=O(0);label=Q(()=>`Self time per component in ${this.scope()}, largest first. Pick one to show it in the tree.`);cells=Q(()=>{let e=this.stats().filter(e=>e.ms>0),t=e.slice(0,Oj),n=e.slice(Oj),r=n.reduce((e,t)=>e+t.ms,0),i=t.map(e=>({stat:e,other:0}));n.length&&i.push({stat:{name:`Other components`,checks:0,ms:r,maxMs:0,cycles:0},other:n.length});let a=e.reduce((e,t)=>e+t.ms,0),o=t[0]?.ms??1,s=rA(i,e=>e.stat.ms,kj);return s.sort((e,t)=>Number(e.item.other>0)-Number(t.item.other>0)),s.map(e=>{let{stat:t,other:n}=e.item,r=a?Math.round(t.ms/a*100):0;return{stat:t,other:n,x:e.x,y:e.y,w:e.w,h:e.h,tone:n?0:14+Math.round(26*Math.min(t.ms/o,1)),roomy:e.w>=10&&e.h>=22,label:n?`${n} more components, ${$k(t.ms)}, ${r}% of self time`:`${t.name}, ${$k(t.ms)} self time, ${r}%, ${t.checks} ${t.checks===1?`check`:`checks`}`}})});tabStop=Q(()=>Math.min(this.current(),Math.max(this.cells().filter(e=>!e.other).length-1,0)));fmt(e){return $k(e)}onKey(e){let t=this.cells().filter(e=>!e.other).length;if(!t)return;let n=this.tabStop(),r;switch(e.key){case`ArrowRight`:case`ArrowDown`:r=Math.min(n+1,t-1);break;case`ArrowLeft`:case`ArrowUp`:r=Math.max(n-1,0);break;case`Home`:r=0;break;case`End`:r=t-1;break;default:return}e.preventDefault(),this.current.set(r),e.currentTarget.querySelector(`button[data-index="${r}"]`)?.focus()}static ɵfac=function(t){return new(t||e)};static ɵcmp=A({type:e,selectors:[[`app-cd-treemap`]],inputs:{stats:[1,`stats`],scope:[1,`scope`]},outputs:{pick:`pick`},decls:2,vars:1,consts:[[1,`map`],[1,`empty`],[1,`map`,3,`keydown`],[3,`left`,`top`,`width`,`height`],[1,`cell`,`other`,3,`--%NS%tone`],[`type`,`button`,1,`cell`,3,`--%NS%tone`],[1,`cell`,`other`],[1,`sr-only`],[`aria-hidden`,`true`,1,`name`],[`type`,`button`,1,`cell`,3,`focus`,`click`],[1,`name`,`mono`],[1,`ms`]],template:function(e,t){e&1&&M(0,Ej,3,1,`ul`,0)(1,Dj,2,0,`p`,1),e&2&&N(+!t.cells().length)},styles:[`[_nghost-%COMP%] { +}`]})},xj=(e,t)=>t.stat.name;function Sj(e,t){if(e&1&&(B(0,`span`,8),J(1),V()),e&2){let e=G(2).$implicit;k(),X(``,e.other,` more`)}}function Cj(e,t){if(e&1&&(B(0,`div`,6)(1,`span`,7),J(2),V(),M(3,Sj,2,1,`span`,8),V()),e&2){let e=G().$implicit;K(`--%NS%tone`,e.tone+`%`),k(2),Y(e.label),k(),N(e.roomy?3:-1)}}function wj(e,t){if(e&1&&(B(0,`span`,10),J(1),V(),B(2,`span`,11),J(3),V()),e&2){let e=G(2).$implicit,t=G(2);k(),Y(e.stat.name),k(2),Y(t.fmt(e.stat.ms))}}function Tj(e,t){if(e&1){let e=H();B(0,`button`,9),W(`focus`,function(){T(e);let t=G().$index;return E(G(2).current.set(t))})(`click`,function(){T(e);let t=G().$implicit;return E(G(2).pick.emit(t.stat.name))}),M(1,wj,4,2),V()}if(e&2){let e=G(),t=e.$implicit,n=e.$index,r=G(2);K(`--%NS%tone`,t.tone+`%`),j(`tabindex`,n===r.tabStop()?0:-1)(`aria-label`,t.label)(`data-index`,n),k(),N(t.roomy?1:-1)}}function Ej(e,t){if(e&1&&(B(0,`li`),M(1,Cj,4,4,`div`,4)(2,Tj,2,6,`button`,5),V()),e&2){let e=t.$implicit;K(`left`,e.x,`%`)(`top`,e.y,`%`)(`width`,e.w,`%`)(`height`,e.h,`%`),k(),N(e.other?1:2)}}function Dj(e,t){if(e&1){let e=H();B(0,`ul`,2),W(`keydown`,function(t){return T(e),E(G().onKey(t))}),P(1,Ej,3,9,`li`,3,xj),V()}if(e&2){let e=G();j(`aria-label`,e.label()),k(),F(e.cells())}}function Oj(e,t){e&1&&(B(0,`p`,1),J(1,`No component time in these cycles.`),V())}var kj=24,Aj=3,jj=class e{stats=$([]);scope=$(`the recording`);pick=Rv();current=O(0);label=Q(()=>`Self time per component in ${this.scope()}, largest first. Pick one to show it in the tree.`);cells=Q(()=>{let e=this.stats().filter(e=>e.ms>0),t=e.slice(0,kj),n=e.slice(kj),r=n.reduce((e,t)=>e+t.ms,0),i=t.map(e=>({stat:e,other:0}));n.length&&i.push({stat:{name:`Other components`,checks:0,ms:r,maxMs:0,cycles:0},other:n.length});let a=e.reduce((e,t)=>e+t.ms,0),o=t[0]?.ms??1,s=iA(i,e=>e.stat.ms,Aj);return s.sort((e,t)=>Number(e.item.other>0)-Number(t.item.other>0)),s.map(e=>{let{stat:t,other:n}=e.item,r=a?Math.round(t.ms/a*100):0;return{stat:t,other:n,x:e.x,y:e.y,w:e.w,h:e.h,tone:n?0:14+Math.round(26*Math.min(t.ms/o,1)),roomy:e.w>=10&&e.h>=22,label:n?`${n} more components, ${eA(t.ms)}, ${r}% of self time`:`${t.name}, ${eA(t.ms)} self time, ${r}%, ${t.checks} ${t.checks===1?`check`:`checks`}`}})});tabStop=Q(()=>Math.min(this.current(),Math.max(this.cells().filter(e=>!e.other).length-1,0)));fmt(e){return eA(e)}onKey(e){let t=this.cells().filter(e=>!e.other).length;if(!t)return;let n=this.tabStop(),r;switch(e.key){case`ArrowRight`:case`ArrowDown`:r=Math.min(n+1,t-1);break;case`ArrowLeft`:case`ArrowUp`:r=Math.max(n-1,0);break;case`Home`:r=0;break;case`End`:r=t-1;break;default:return}e.preventDefault(),this.current.set(r),e.currentTarget.querySelector(`button[data-index="${r}"]`)?.focus()}static ɵfac=function(t){return new(t||e)};static ɵcmp=A({type:e,selectors:[[`app-cd-treemap`]],inputs:{stats:[1,`stats`],scope:[1,`scope`]},outputs:{pick:`pick`},decls:2,vars:1,consts:[[1,`map`],[1,`empty`],[1,`map`,3,`keydown`],[3,`left`,`top`,`width`,`height`],[1,`cell`,`other`,3,`--%NS%tone`],[`type`,`button`,1,`cell`,3,`--%NS%tone`],[1,`cell`,`other`],[1,`sr-only`],[`aria-hidden`,`true`,1,`name`],[`type`,`button`,1,`cell`,3,`focus`,`click`],[1,`name`,`mono`],[1,`ms`]],template:function(e,t){e&1&&M(0,Dj,3,1,`ul`,0)(1,Oj,2,0,`p`,1),e&2&&N(+!t.cells().length)},styles:[`[_nghost-%COMP%] { display: block; min-width: 0; } @@ -1609,7 +1609,7 @@ button.cell[_ngcontent-%COMP%]:focus-visible { .empty[_ngcontent-%COMP%] { margin: 8px 0; color: var(--%NS%text-2); -}`]})},jj=(e,t)=>t.id;function Mj(e,t){if(e&1){let e=H();L(0,`button`,15),U(`click`,function(){return T(e),E(G(2).clear())}),J(1,`Clear`),R()}}function Nj(e,t){if(e&1){let e=H();L(0,`button`,12),U(`click`,function(){return T(e),E(G().toggle())}),z(1,`span`,13),J(2),R(),M(3,Mj,2,0,`button`,14)}if(e&2){let e=G();q(`on`,e.recording()),I(`disabled`,!e.pageId()),k(2),X(` `,e.recording()?`Stop recording`:`Record`,` `),k(),N(e.cycles().length?3:-1)}}function Pj(e,t){if(e&1){let e=H();L(0,`p`,6)(1,`span`,16),J(2,`Imported recording`),R(),L(3,`span`,17),J(4),R(),L(5,`button`,15),U(`click`,function(){return T(e),E(G().closeImport())}),J(6,`Back to live recording`),R()()}e&2&&(k(4),Y(t.fileName))}function Fj(e,t){e&1&&z(0,`app-angular-unavailable`,8),e&2&&I(`page`,G().angularPage())}function Ij(e,t){e&1&&(L(0,`p`,10),J(1,`Angular profiling stays on until the page reloads.`),R())}function Lj(e,t){e&1&&z(0,`app-angular-unavailable`,21),e&2&&I(`page`,G(2).angularPage())}function Rj(e,t){if(e&1){let e=H();L(0,`div`,18)(1,`span`,19),J(2,`Live views`),R(),L(3,`button`,20),U(`click`,function(){T(e);let t=G();return E(t.setView(`flash`,!t.views().flash))}),z(4,`span`,13),J(5,` Flash checks `),R(),L(6,`button`,20),U(`click`,function(){T(e);let t=G();return E(t.setView(`track`,!t.views().track))}),z(7,`span`,13),J(8,` Performance track `),R(),L(9,`button`,20),U(`click`,function(){return T(e),E(G().setView(`angularProfiling`,!0))}),z(10,`span`,13),J(11,` Angular profiling `),R()(),L(12,`p`,7),J(13,` Flash checks draws a box over each component on the page as Angular checks it, with its name and how often it was checked, fading over a second. Performance track adds a Pangular track to the Chrome Performance panel with every component check, hook and output. Angular profiling turns on Angular's own track there. `),R(),M(14,Ij,2,0,`p`,10)(15,Lj,1,1,`app-angular-unavailable`,21)}if(e&2){let e=G();k(3),I(`disabled`,!e.canShowViews()),j(`aria-pressed`,e.views().flash),k(3),I(`disabled`,!e.canShowViews()),j(`aria-pressed`,e.views().track),k(3),I(`disabled`,!e.canShowViews()||e.views().angularProfiling||!e.views().angularProfilingAvailable),j(`aria-pressed`,e.views().angularProfiling),k(5),N(e.views().angularProfiling?14:e.views().angularProfilingAvailable?-1:15)}}function zj(e,t){if(e&1&&(L(0,`p`,10),J(1),R()),e&2){let e=t.$implicit;k(),Y(e)}}function Bj(e,t){if(e&1&&(L(0,`p`,24),J(1),R()),e&2){let e=G(2);k(),X(` `,e.range()?`The picked cycles have no timed spans, so there is no flame graph for them.`:`This recording has no timed spans, so there is no flame graph. A recording from an older version, or a file saved without spans, has none.`,` `)}}function Vj(e,t){e&1&&(L(0,`p`,10),J(1,` For picked cycles, totals come from the 10 slowest components each cycle lists. `),R())}function Hj(e,t){if(e&1){let e=H();L(0,`h3`),J(1,`Cycles`),R(),L(2,`app-cd-cycle-chart`,22),cv(`rangeChange`,function(t){T(e);let n=G();return sv(n.range,t)||(n.range=t),E(t)}),R(),L(3,`app-cd-flame-graph`,23),U(`pick`,function(t){return T(e),E(G().showComponent.emit(t))}),R(),M(4,Bj,2,1,`p`,24),L(5,`h3`),J(6,`Self time by component`),R(),M(7,Vj,2,0,`p`,10),L(8,`app-cd-treemap`,25),U(`pick`,function(t){return T(e),E(G().showComponent.emit(t))}),R()}if(e&2){let e=G();k(2),I(`cycles`,e.cycles()),ov(`range`,e.range),k(),I(`cycles`,e.picked())(`names`,e.spanNames())(`scope`,e.scope()),k(),N(e.hasSpans()?-1:4),k(3),N(e.range()?7:-1),k(),I(`stats`,e.stats())(`scope`,e.scope())}}function Uj(e,t){if(e&1&&(L(0,`tr`)(1,`td`,17),J(2),R(),L(3,`td`,31),J(4),R(),L(5,`td`,31),J(6),R(),L(7,`td`,31),J(8),R()()),e&2){let e=t.$implicit,n=G(2);k(2),Y(e.name),k(2),Y(e.checks),k(2),Y(n.ms(e.ms)),k(2),Y(n.ms(e.maxMs))}}function Wj(e,t){e&1&&(L(0,`tr`)(1,`td`,32),J(2,`No component time in the picked cycles.`),R()())}function Gj(e,t){if(e&1&&(L(0,`span`,34),J(1,`from `),L(2,`span`,17),J(3),R()()),e&2){let e=G(3);k(3),Y(e.causeText(t))}}function Kj(e,t){if(e&1&&(L(0,`span`,34),J(1,`after `),L(2,`span`,17),J(3),R()()),e&2){let e=G().$implicit;k(3),Y(e.trigger)}}function qj(e,t){if(e&1&&(L(0,`span`,35),J(1),R()),e&2){let e=G().$implicit;k(),X(``,e.unchanged,` changed nothing`)}}function Jj(e,t){if(e&1&&(L(0,`span`,35),J(1),R()),e&2){let e=G().$implicit,t=G(2);k(),X(`hooks `,t.ms(e.hookMs))}}function Yj(e,t){if(e&1&&(L(0,`span`,35),J(1),R()),e&2){let e=G().$implicit,t=G(2);k(),X(`afterRender `,t.ms(e.afterRenderMs))}}function Xj(e,t){if(e&1&&(L(0,`span`,36),J(1,` slowest `),L(2,`span`,17),J(3),R(),J(4),R()),e&2){let e=t,n=G(3);k(3),Y(e.name),k(),X(` `,n.ms(e.ms),` `)}}function Zj(e,t){if(e&1&&(L(0,`li`)(1,`span`,33),J(2),R(),L(3,`span`,17),J(4),R(),L(5,`span`),J(6),R(),M(7,Gj,4,1,`span`,34)(8,Kj,4,1,`span`,34),M(9,qj,2,1,`span`,35),M(10,Jj,2,1,`span`,35),M(11,Yj,2,1,`span`,35),M(12,Xj,5,2,`span`,36),R()),e&2){let e,n,r=t.$implicit,i=G(2);k(2),Y(i.clock(r.at)),k(2),Y(i.ms(r.ms)),k(2),iv(` `,r.checks,` `,r.checks===1?`check`:`checks`,`, `,r.passes,` `,r.passes===1?`pass`:`passes`,` `),k(),N((e=r.cause)?7:r.trigger?8:-1,e),k(2),N(r.unchanged?9:-1),k(),N(r.hookMs?10:-1),k(),N(r.afterRenderMs?11:-1),k(),N((n=r.components[0])?12:-1,n)}}function Qj(e,t){if(e&1&&(L(0,`div`,26)(1,`div`)(2,`h3`),J(3),R(),L(4,`table`)(5,`thead`)(6,`tr`)(7,`th`,27),J(8,`Component`),R(),L(9,`th`,28),J(10,`Checks`),R(),L(11,`th`,28),J(12,`Self time`),R(),L(13,`th`,28),J(14,`Slowest`),R()()(),L(15,`tbody`),P(16,Uj,9,4,`tr`,null,kg,!1,Wj,3,0,`tr`),R()()(),L(19,`div`)(20,`h3`),J(21,`Latest cycles`),R(),L(22,`ol`,29),P(23,Zj,13,11,`li`,null,jj),R()()(),z(25,`app-cd-timing`,30)(26,`app-cd-diagnosis`,30)),e&2){let e=G();k(3),X(` `,e.range()?`Slowest components in the picked cycles`:`Slowest components`,` `),k(13),F(e.slowest()),k(7),F(e.latest()),k(2),I(`page`,e.page()),k(),I(`page`,e.page())}}function $j(e,t){e&1&&(L(0,`p`,11),J(1,`Use the app. Cycles show up here as Angular runs change detection.`),R())}var eM=10,tM=class e{livePage=$(null,{alias:`page`});pageId=$(null);rpc=$(null);angularPages=uO(()=>this.rpc());angularPage=Q(()=>dO(this.angularPages(),this.pageId()));showComponent=Rv();range=O(null);imported=O(null);page=Q(()=>this.imported()?.page??this.livePage());views=Fv(()=>this.livePage()?.options??{flash:!1,track:!1,angularProfiling:!1,angularProfilingAvailable:!0});canShowViews=Q(()=>!!this.pageId()&&this.livePage()?.supported!==!1);message=O(``);announcement=O(``);recording=Q(()=>this.page()?.recording===!0);cycles=Q(()=>this.page()?.cycles??[]);maxCycles=Q(()=>nD(this.rpc()).limits.cdCycles);picked=Q(()=>eA(this.cycles(),this.range()));hasSpans=Q(()=>this.picked().some(e=>e.spans?.length));spanNames=Q(()=>this.page()?.spanNames??[]);stats=Q(()=>this.range()?tA(this.picked()):[...this.page()?.components??[]].sort((e,t)=>t.ms-e.ms));scope=Q(()=>{let e=this.range()?this.picked():[];return e.length?e.length===1?`cycle ${e[0].id}`:`cycles ${e[0].id} to ${e.at(-1).id}`:`the recording`});slowest=Q(()=>this.stats().slice(0,eM));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.imported()?`${e} ${e===1?`cycle`:`cycles`} imported.`: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 QO(e)}causeText(e){return Fk(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.`)}showImport(e){this.message.set(``),this.range.set(null),this.imported.set(e);let t=e.page.cycles.length;this.announce(`Imported ${e.fileName}: ${t} ${t===1?`cycle`:`cycles`}. Showing the imported recording.`)}closeImport(){this.imported.set(null),this.range.set(null),this.announce(`Showing the live recording.`)}async clear(){this.range.set(null),await this.send({clear:!0},``,()=>`Cleared the recorded cycles.`)}async setView(e,t){let n=this.views();this.views.set({...n,[e]:t});let r={flash:t?`Flash checks on.`:`Flash checks off.`,track:t?`Performance track on. Record in the Chrome Performance panel to see it.`:`Performance track off.`,angularProfiling:`Angular profiling on. It stays on until the page reloads.`}[e];await this.send({[e]:t},``,()=>r,`request-change-detection-options`)||this.views.set(n)}async send(e,t,n,r=`request-change-detection-record`){this.message.set(t);try{if(!this.rpc())throw Error(`no client`);return await VE(this.rpc(),r,{pageId:this.pageId(),...e}),this.message.set(``),this.announce(n()),!0}catch{let e=`Could not reach the page.`;return this.message.set(e),this.announce(e),!1}}announce(e){this.announcement.update(t=>t===e?`${e} `:e)}static ɵfac=function(t){return new(t||e)};static ɵcmp=A({type:e,selectors:[[`app-cd-recording`]],inputs:{livePage:[1,`page`,`livePage`],pageId:[1,`pageId`],rpc:[1,`rpc`]},outputs:{showComponent:`showComponent`},decls:21,vars:12,consts:[[`aria-labelledby`,`cd-heading`,1,`cd`],[1,`cd-head`],[`id`,`cd-heading`],[3,`imported`,`page`,`maxCycles`],[1,`status`],[`role`,`status`,1,`sr-only`],[1,`imported`],[1,`hint`],[`capability`,`profiler`,`missing`,``,`compact`,``,3,`page`],[`what`,`cycles`,`limit`,`cdCycles`,3,`dropped`,`max`],[1,`note`],[1,`empty`],[`type`,`button`,3,`click`,`disabled`],[`aria-hidden`,`true`,1,`dot`],[`type`,`button`],[`type`,`button`,3,`click`],[1,`badge`],[1,`mono`],[`role`,`group`,`aria-labelledby`,`cd-views-label`,1,`views`],[`id`,`cd-views-label`,1,`views-label`],[`type`,`button`,1,`view`,3,`click`,`disabled`],[`capability`,`angularProfiling`,`missing`,``,`compact`,``,3,`page`],[3,`rangeChange`,`cycles`,`range`],[3,`pick`,`cycles`,`names`,`scope`],[1,`spans-note`],[3,`pick`,`stats`,`scope`],[1,`cd-grid`],[`scope`,`col`],[`scope`,`col`,1,`num`],[`aria-label`,`Latest change detection cycles, newest first`,1,`cycles`],[3,`page`],[1,`num`],[`colspan`,`4`],[1,`when`],[1,`trigger`],[1,`timing`],[1,`top`]],template:function(e,t){if(e&1&&(L(0,`section`,0)(1,`div`,1)(2,`h2`,2),J(3,`Change detection`),R(),M(4,Nj,4,5),L(5,`app-cd-transfer`,3),U(`imported`,function(e){return t.showImport(e)}),R(),L(6,`p`,4),J(7),R(),L(8,`p`,5),J(9),R()(),M(10,Pj,7,1,`p`,6),L(11,`p`,7),J(12,` Records each change detection cycle with Angular's profiler: how long it took, how many components it checked, what started it and which checks changed nothing. Tree rows show how often each instance was checked. Times come from a development build. While it records, the page also wraps Angular's scheduler, adds a signal write hook and watches DOM updates; all of it stops with the recording. `),R(),M(13,Fj,1,1,`app-angular-unavailable`,8),M(14,Rj,16,7),z(15,`app-limit-note`,9),P(16,zj,2,1,`p`,10,Ag),M(18,Hj,9,9),M(19,Qj,27,4)(20,$j,2,0,`p`,11),R()),e&2){let e;k(4),N(t.imported()?-1:4),k(),I(`page`,t.page())(`maxCycles`,t.maxCycles()),k(2),Y(t.status()),k(2),Y(t.announcement()),k(),N((e=t.imported())?10:-1,e),k(3),N(t.page()?.supported===!1?13:-1),k(),N(t.imported()?-1:14),k(),I(`dropped`,t.page()?.dropped??0)(`max`,t.maxCycles()),k(),F(t.capNotes()),k(2),N(t.cycles().length?18:-1),k(),N(t.page()?.components?.length?19:t.recording()?20:-1)}},dependencies:[hO,rk,gj,OA,yj,WA,aj,Aj],styles:[`[_nghost-%COMP%] { +}`]})},Mj=(e,t)=>t.id;function Nj(e,t){if(e&1){let e=H();L(0,`button`,15),U(`click`,function(){return T(e),E(G(2).clear())}),J(1,`Clear`),R()}}function Pj(e,t){if(e&1){let e=H();L(0,`button`,12),U(`click`,function(){return T(e),E(G().toggle())}),z(1,`span`,13),J(2),R(),M(3,Nj,2,0,`button`,14)}if(e&2){let e=G();q(`on`,e.recording()),I(`disabled`,!e.pageId()),k(2),X(` `,e.recording()?`Stop recording`:`Record`,` `),k(),N(e.cycles().length?3:-1)}}function Fj(e,t){if(e&1){let e=H();L(0,`p`,6)(1,`span`,16),J(2,`Imported recording`),R(),L(3,`span`,17),J(4),R(),L(5,`button`,15),U(`click`,function(){return T(e),E(G().closeImport())}),J(6,`Back to live recording`),R()()}e&2&&(k(4),Y(t.fileName))}function Ij(e,t){e&1&&z(0,`app-angular-unavailable`,8),e&2&&I(`page`,G().angularPage())}function Lj(e,t){e&1&&(L(0,`p`,10),J(1,`Angular profiling stays on until the page reloads.`),R())}function Rj(e,t){e&1&&z(0,`app-angular-unavailable`,21),e&2&&I(`page`,G(2).angularPage())}function zj(e,t){if(e&1){let e=H();L(0,`div`,18)(1,`span`,19),J(2,`Live views`),R(),L(3,`button`,20),U(`click`,function(){T(e);let t=G();return E(t.setView(`flash`,!t.views().flash))}),z(4,`span`,13),J(5,` Flash checks `),R(),L(6,`button`,20),U(`click`,function(){T(e);let t=G();return E(t.setView(`track`,!t.views().track))}),z(7,`span`,13),J(8,` Performance track `),R(),L(9,`button`,20),U(`click`,function(){return T(e),E(G().setView(`angularProfiling`,!0))}),z(10,`span`,13),J(11,` Angular profiling `),R()(),L(12,`p`,7),J(13,` Flash checks draws a box over each component on the page as Angular checks it, with its name and how often it was checked, fading over a second. Performance track adds a Pangular track to the Chrome Performance panel with every component check, hook and output. Angular profiling turns on Angular's own track there. `),R(),M(14,Lj,2,0,`p`,10)(15,Rj,1,1,`app-angular-unavailable`,21)}if(e&2){let e=G();k(3),I(`disabled`,!e.canShowViews()),j(`aria-pressed`,e.views().flash),k(3),I(`disabled`,!e.canShowViews()),j(`aria-pressed`,e.views().track),k(3),I(`disabled`,!e.canShowViews()||e.views().angularProfiling||!e.views().angularProfilingAvailable),j(`aria-pressed`,e.views().angularProfiling),k(5),N(e.views().angularProfiling?14:e.views().angularProfilingAvailable?-1:15)}}function Bj(e,t){if(e&1&&(L(0,`p`,10),J(1),R()),e&2){let e=t.$implicit;k(),Y(e)}}function Vj(e,t){if(e&1&&(L(0,`p`,24),J(1),R()),e&2){let e=G(2);k(),X(` `,e.range()?`The picked cycles have no timed spans, so there is no flame graph for them.`:`This recording has no timed spans, so there is no flame graph. A recording from an older version, or a file saved without spans, has none.`,` `)}}function Hj(e,t){e&1&&(L(0,`p`,10),J(1,` For picked cycles, totals come from the 10 slowest components each cycle lists. `),R())}function Uj(e,t){if(e&1){let e=H();L(0,`h3`),J(1,`Cycles`),R(),L(2,`app-cd-cycle-chart`,22),cv(`rangeChange`,function(t){T(e);let n=G();return sv(n.range,t)||(n.range=t),E(t)}),R(),L(3,`app-cd-flame-graph`,23),U(`pick`,function(t){return T(e),E(G().showComponent.emit(t))}),R(),M(4,Vj,2,1,`p`,24),L(5,`h3`),J(6,`Self time by component`),R(),M(7,Hj,2,0,`p`,10),L(8,`app-cd-treemap`,25),U(`pick`,function(t){return T(e),E(G().showComponent.emit(t))}),R()}if(e&2){let e=G();k(2),I(`cycles`,e.cycles()),ov(`range`,e.range),k(),I(`cycles`,e.picked())(`names`,e.spanNames())(`scope`,e.scope()),k(),N(e.hasSpans()?-1:4),k(3),N(e.range()?7:-1),k(),I(`stats`,e.stats())(`scope`,e.scope())}}function Wj(e,t){if(e&1&&(L(0,`tr`)(1,`td`,17),J(2),R(),L(3,`td`,31),J(4),R(),L(5,`td`,31),J(6),R(),L(7,`td`,31),J(8),R()()),e&2){let e=t.$implicit,n=G(2);k(2),Y(e.name),k(2),Y(e.checks),k(2),Y(n.ms(e.ms)),k(2),Y(n.ms(e.maxMs))}}function Gj(e,t){e&1&&(L(0,`tr`)(1,`td`,32),J(2,`No component time in the picked cycles.`),R()())}function Kj(e,t){if(e&1&&(L(0,`span`,34),J(1,`from `),L(2,`span`,17),J(3),R()()),e&2){let e=G(3);k(3),Y(e.causeText(t))}}function qj(e,t){if(e&1&&(L(0,`span`,34),J(1,`after `),L(2,`span`,17),J(3),R()()),e&2){let e=G().$implicit;k(3),Y(e.trigger)}}function Jj(e,t){if(e&1&&(L(0,`span`,35),J(1),R()),e&2){let e=G().$implicit;k(),X(``,e.unchanged,` changed nothing`)}}function Yj(e,t){if(e&1&&(L(0,`span`,35),J(1),R()),e&2){let e=G().$implicit,t=G(2);k(),X(`hooks `,t.ms(e.hookMs))}}function Xj(e,t){if(e&1&&(L(0,`span`,35),J(1),R()),e&2){let e=G().$implicit,t=G(2);k(),X(`afterRender `,t.ms(e.afterRenderMs))}}function Zj(e,t){if(e&1&&(L(0,`span`,36),J(1,` slowest `),L(2,`span`,17),J(3),R(),J(4),R()),e&2){let e=t,n=G(3);k(3),Y(e.name),k(),X(` `,n.ms(e.ms),` `)}}function Qj(e,t){if(e&1&&(L(0,`li`)(1,`span`,33),J(2),R(),L(3,`span`,17),J(4),R(),L(5,`span`),J(6),R(),M(7,Kj,4,1,`span`,34)(8,qj,4,1,`span`,34),M(9,Jj,2,1,`span`,35),M(10,Yj,2,1,`span`,35),M(11,Xj,2,1,`span`,35),M(12,Zj,5,2,`span`,36),R()),e&2){let e,n,r=t.$implicit,i=G(2);k(2),Y(i.clock(r.at)),k(2),Y(i.ms(r.ms)),k(2),iv(` `,r.checks,` `,r.checks===1?`check`:`checks`,`, `,r.passes,` `,r.passes===1?`pass`:`passes`,` `),k(),N((e=r.cause)?7:r.trigger?8:-1,e),k(2),N(r.unchanged?9:-1),k(),N(r.hookMs?10:-1),k(),N(r.afterRenderMs?11:-1),k(),N((n=r.components[0])?12:-1,n)}}function $j(e,t){if(e&1&&(L(0,`div`,26)(1,`div`)(2,`h3`),J(3),R(),L(4,`table`)(5,`thead`)(6,`tr`)(7,`th`,27),J(8,`Component`),R(),L(9,`th`,28),J(10,`Checks`),R(),L(11,`th`,28),J(12,`Self time`),R(),L(13,`th`,28),J(14,`Slowest`),R()()(),L(15,`tbody`),P(16,Wj,9,4,`tr`,null,kg,!1,Gj,3,0,`tr`),R()()(),L(19,`div`)(20,`h3`),J(21,`Latest cycles`),R(),L(22,`ol`,29),P(23,Qj,13,11,`li`,null,Mj),R()()(),z(25,`app-cd-timing`,30)(26,`app-cd-diagnosis`,30)),e&2){let e=G();k(3),X(` `,e.range()?`Slowest components in the picked cycles`:`Slowest components`,` `),k(13),F(e.slowest()),k(7),F(e.latest()),k(2),I(`page`,e.page()),k(),I(`page`,e.page())}}function eM(e,t){e&1&&(L(0,`p`,11),J(1,`Use the app. Cycles show up here as Angular runs change detection.`),R())}var tM=10,nM=class e{livePage=$(null,{alias:`page`});pageId=$(null);rpc=$(null);angularPages=dO(()=>this.rpc());angularPage=Q(()=>fO(this.angularPages(),this.pageId()));showComponent=Rv();range=O(null);imported=O(null);page=Q(()=>this.imported()?.page??this.livePage());views=Fv(()=>this.livePage()?.options??{flash:!1,track:!1,angularProfiling:!1,angularProfilingAvailable:!0});canShowViews=Q(()=>!!this.pageId()&&this.livePage()?.supported!==!1);message=O(``);announcement=O(``);recording=Q(()=>this.page()?.recording===!0);cycles=Q(()=>this.page()?.cycles??[]);maxCycles=Q(()=>nD(this.rpc()).limits.cdCycles);picked=Q(()=>tA(this.cycles(),this.range()));hasSpans=Q(()=>this.picked().some(e=>e.spans?.length));spanNames=Q(()=>this.page()?.spanNames??[]);stats=Q(()=>this.range()?nA(this.picked()):[...this.page()?.components??[]].sort((e,t)=>t.ms-e.ms));scope=Q(()=>{let e=this.range()?this.picked():[];return e.length?e.length===1?`cycle ${e[0].id}`:`cycles ${e[0].id} to ${e.at(-1).id}`:`the recording`});slowest=Q(()=>this.stats().slice(0,tM));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.imported()?`${e} ${e===1?`cycle`:`cycles`} imported.`: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 $O(e)}causeText(e){return Ik(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.`)}showImport(e){this.message.set(``),this.range.set(null),this.imported.set(e);let t=e.page.cycles.length;this.announce(`Imported ${e.fileName}: ${t} ${t===1?`cycle`:`cycles`}. Showing the imported recording.`)}closeImport(){this.imported.set(null),this.range.set(null),this.announce(`Showing the live recording.`)}async clear(){this.range.set(null),await this.send({clear:!0},``,()=>`Cleared the recorded cycles.`)}async setView(e,t){let n=this.views();this.views.set({...n,[e]:t});let r={flash:t?`Flash checks on.`:`Flash checks off.`,track:t?`Performance track on. Record in the Chrome Performance panel to see it.`:`Performance track off.`,angularProfiling:`Angular profiling on. It stays on until the page reloads.`}[e];await this.send({[e]:t},``,()=>r,`request-change-detection-options`)||this.views.set(n)}async send(e,t,n,r=`request-change-detection-record`){this.message.set(t);try{if(!this.rpc())throw Error(`no client`);return await VE(this.rpc(),r,{pageId:this.pageId(),...e}),this.message.set(``),this.announce(n()),!0}catch{let e=`Could not reach the page.`;return this.message.set(e),this.announce(e),!1}}announce(e){this.announcement.update(t=>t===e?`${e} `:e)}static ɵfac=function(t){return new(t||e)};static ɵcmp=A({type:e,selectors:[[`app-cd-recording`]],inputs:{livePage:[1,`page`,`livePage`],pageId:[1,`pageId`],rpc:[1,`rpc`]},outputs:{showComponent:`showComponent`},decls:21,vars:12,consts:[[`aria-labelledby`,`cd-heading`,1,`cd`],[1,`cd-head`],[`id`,`cd-heading`],[3,`imported`,`page`,`maxCycles`],[1,`status`],[`role`,`status`,1,`sr-only`],[1,`imported`],[1,`hint`],[`capability`,`profiler`,`missing`,``,`compact`,``,3,`page`],[`what`,`cycles`,`limit`,`cdCycles`,3,`dropped`,`max`],[1,`note`],[1,`empty`],[`type`,`button`,3,`click`,`disabled`],[`aria-hidden`,`true`,1,`dot`],[`type`,`button`],[`type`,`button`,3,`click`],[1,`badge`],[1,`mono`],[`role`,`group`,`aria-labelledby`,`cd-views-label`,1,`views`],[`id`,`cd-views-label`,1,`views-label`],[`type`,`button`,1,`view`,3,`click`,`disabled`],[`capability`,`angularProfiling`,`missing`,``,`compact`,``,3,`page`],[3,`rangeChange`,`cycles`,`range`],[3,`pick`,`cycles`,`names`,`scope`],[1,`spans-note`],[3,`pick`,`stats`,`scope`],[1,`cd-grid`],[`scope`,`col`],[`scope`,`col`,1,`num`],[`aria-label`,`Latest change detection cycles, newest first`,1,`cycles`],[3,`page`],[1,`num`],[`colspan`,`4`],[1,`when`],[1,`trigger`],[1,`timing`],[1,`top`]],template:function(e,t){if(e&1&&(L(0,`section`,0)(1,`div`,1)(2,`h2`,2),J(3,`Change detection`),R(),M(4,Pj,4,5),L(5,`app-cd-transfer`,3),U(`imported`,function(e){return t.showImport(e)}),R(),L(6,`p`,4),J(7),R(),L(8,`p`,5),J(9),R()(),M(10,Fj,7,1,`p`,6),L(11,`p`,7),J(12,` Records each change detection cycle with Angular's profiler: how long it took, how many components it checked, what started it and which checks changed nothing. Tree rows show how often each instance was checked. Times come from a development build. While it records, the page also wraps Angular's scheduler, adds a signal write hook and watches DOM updates; all of it stops with the recording. `),R(),M(13,Ij,1,1,`app-angular-unavailable`,8),M(14,zj,16,7),z(15,`app-limit-note`,9),P(16,Bj,2,1,`p`,10,Ag),M(18,Uj,9,9),M(19,$j,27,4)(20,eM,2,0,`p`,11),R()),e&2){let e;k(4),N(t.imported()?-1:4),k(),I(`page`,t.page())(`maxCycles`,t.maxCycles()),k(2),Y(t.status()),k(2),Y(t.announcement()),k(),N((e=t.imported())?10:-1,e),k(3),N(t.page()?.supported===!1?13:-1),k(),N(t.imported()?-1:14),k(),I(`dropped`,t.page()?.dropped??0)(`max`,t.maxCycles()),k(),F(t.capNotes()),k(2),N(t.cycles().length?18:-1),k(),N(t.page()?.components?.length?19:t.recording()?20:-1)}},dependencies:[gO,ik,_j,kA,bj,GA,oj,jj],styles:[`[_nghost-%COMP%] { display: block; margin-top: 16px; } @@ -1811,7 +1811,7 @@ td.mono[_ngcontent-%COMP%] { .trigger[_ngcontent-%COMP%] .mono[_ngcontent-%COMP%], .top[_ngcontent-%COMP%] .mono[_ngcontent-%COMP%] { overflow-wrap: anywhere; -}`]})},nM=[`*`];function rM(e,t){e&1&&J(0),e&2&&Y(G(2).label())}function iM(e,t){e&1&&s_(0,0,null,rM,1,1)}function aM(e,t){if(e&1&&(L(0,`span`,4),J(1),R()),e&2){let e=G(2);k(),Y(e.message())}}function oM(e,t){if(e&1){let e=H();L(0,`button`,2),U(`click`,function(){return T(e),E(G().open())}),Gg(1,3),R(),M(2,aM,2,1,`span`,4)}if(e&2){let e=G(),t=d_(1);I(`title`,`Open `+e.label()+` in your editor`),j(`aria-label`,`Open `+e.label()+` in your editor`),k(),I(`ngTemplateOutlet`,t),k(),N(e.message()?2:-1)}}function sM(e,t){if(e&1&&(L(0,`span`,1),Gg(1,3),R()),e&2){let e=G(),t=d_(1);I(`title`,e.label()),k(),I(`ngTemplateOutlet`,t)}}var cM=class e{source=O(O(null));client=Q(()=>this.source()());available=Q(()=>{let e=this.client();return!!e&&!UE(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 VE(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=Nl({token:e,factory:e.ɵfac})};function lM(e,t){return t?`${e}:${t}`:e}var uM=class e{editor=C(cM);file=$.required();line=$(void 0);label=Q(()=>lM(this.file(),this.line()));message=O(``);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=A({type:e,selectors:[[`app-source-link`]],inputs:{file:[1,`file`],line:[1,`line`]},ngContentSelectors:nM,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&&(o_(),sg(0,iM,2,0,`ng-template`,null,0,Ev),M(2,oM,3,4)(3,sM,2,2,`span`,1)),e&2&&(k(2),N(t.editor.available()?2:3))},dependencies:[ub],styles:[`[_nghost-%COMP%] { +}`]})},rM=[`*`];function iM(e,t){e&1&&J(0),e&2&&Y(G(2).label())}function aM(e,t){e&1&&s_(0,0,null,iM,1,1)}function oM(e,t){if(e&1&&(L(0,`span`,4),J(1),R()),e&2){let e=G(2);k(),Y(e.message())}}function sM(e,t){if(e&1){let e=H();L(0,`button`,2),U(`click`,function(){return T(e),E(G().open())}),Gg(1,3),R(),M(2,oM,2,1,`span`,4)}if(e&2){let e=G(),t=d_(1);I(`title`,`Open `+e.label()+` in your editor`),j(`aria-label`,`Open `+e.label()+` in your editor`),k(),I(`ngTemplateOutlet`,t),k(),N(e.message()?2:-1)}}function cM(e,t){if(e&1&&(L(0,`span`,1),Gg(1,3),R()),e&2){let e=G(),t=d_(1);I(`title`,e.label()),k(),I(`ngTemplateOutlet`,t)}}var lM=class e{source=O(O(null));client=Q(()=>this.source()());available=Q(()=>{let e=this.client();return!!e&&!UE(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 VE(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=Nl({token:e,factory:e.ɵfac})};function uM(e,t){return t?`${e}:${t}`:e}var dM=class e{editor=C(lM);file=$.required();line=$(void 0);label=Q(()=>uM(this.file(),this.line()));message=O(``);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=A({type:e,selectors:[[`app-source-link`]],inputs:{file:[1,`file`],line:[1,`line`]},ngContentSelectors:rM,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&&(o_(),sg(0,aM,2,0,`ng-template`,null,0,Ev),M(2,sM,3,4)(3,cM,2,2,`span`,1)),e&2&&(k(2),N(t.editor.available()?2:3))},dependencies:[ub],styles:[`[_nghost-%COMP%] { display: inline; min-width: 0; } @@ -1846,7 +1846,7 @@ td.mono[_ngcontent-%COMP%] { color: var(--%NS%danger-text); font-family: var(--%NS%font-sans); font-size: 0.92em; -}`]})},dM=[`field`],fM=[`editButton`],pM=[`valueBox`];function mM(e,t){if(e&1){let e=H();B(0,`div`,5)(1,`label`,6),J(2),V(),B(3,`input`,7,0),W(`input`,function(t){return T(e),E(G().draft.set(t.target.value))})(`keydown.enter`,function(t){T(e);let n=G();return t.preventDefault(),E(n.apply())})(`keydown.escape`,function(t){T(e);let n=G();return t.preventDefault(),t.stopPropagation(),E(n.cancel())}),V(),B(5,`button`,8),W(`click`,function(){return T(e),E(G().apply())}),J(6,`Apply`),V(),B(7,`button`,9),W(`click`,function(){return T(e),E(G().cancel())}),J(8,`Cancel`),V()(),B(9,`p`,10),J(10),V()}if(e&2){let e=G();k(),qg(`htmlFor`,e.fieldId),k(),X(`New value of `,e.prop().name,`, as JSON`),k(),qg(`id`,e.fieldId)(`value`,e.draft())(`readOnly`,e.busy()),j(`aria-busy`,e.busy()?`true`:null)(`aria-invalid`,e.error()?`true`:null)(`aria-describedby`,e.hintId+(e.error()?` `+e.errorId:``)),k(2),qg(`disabled`,e.busy()),k(4),qg(`id`,e.hintId),k(),X(` JSON, such as "text", 42, true or `,e.objectSample,`. Enter applies, Escape cancels. `)}}function hM(e,t){if(e&1&&(B(0,`pre`,null,1),J(2),xv(3,`json`),V()),e&2){let e=G(2);j(`tabindex`,e.scrollable()?0:null)(`role`,e.scrollable()?`region`:null)(`aria-label`,e.scrollable()?`Value of `+e.prop().name:null),k(2),Y(Cv(3,4,e.prop().value))}}function gM(e,t){if(e&1){let e=H();B(0,`button`,14,2),W(`click`,function(){return T(e),E(G(2).start())}),J(2,` Edit `),V()}if(e&2){let e=G(2);qg(`disabled`,e.busy()),j(`aria-label`,`Edit `+e.prop().name)}}function _M(e,t){if(e&1&&(B(0,`p`,13),J(1),V()),e&2){let e=G(2);k(),Y(e.prop().locked)}}function vM(e,t){if(e&1&&(B(0,`div`,11),M(1,hM,4,6,`pre`),M(2,gM,3,2,`button`,12),V(),M(3,_M,2,1,`p`,13)),e&2){let e=G();k(),N(e.bare()?-1:1),k(),N(e.editable()?2:-1),k(),N(e.writes()&&e.prop().locked?3:-1)}}function yM(e,t){if(e&1&&(B(0,`p`,3),J(1),V()),e&2){let e=G();qg(`id`,e.errorId),k(),Y(e.error())}}var bM=0;function xM(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 SM=class e{prop=$.required();componentId=$.required();pageId=$(null);rpc=$(null);writes=$(!1);bare=$(!1);readDraft=$(null);fieldId=`prop-edit-${++bM}`;hintId=`${this.fieldId}-hint`;errorId=`${this.fieldId}-error`;objectSample=`{"a": 1}`;editing=O(!1);draft=O(``);busy=O(!1);error=O(``);done=O(``);editable=Q(()=>this.writes()&&!!this.prop().edit&&!!this.pageId()&&!!this.rpc());field=Jv(`field`);editButton=Jv(`editButton`);valueBox=Jv(`valueBox`);injector=C(Ts);scrollable=O(!1);constructor(){dy(()=>{this.prop();let e=this.valueBox()?.nativeElement;this.scrollable.set(!!e&&e.scrollHeight>e.clientHeight+1)})}async start(){let e=this.prop().value;this.error.set(``),this.done.set(``);let t=this.readDraft();if(t){this.busy.set(!0);let n=await t();if(this.busy.set(!1),n.error!==void 0){this.error.set(n.error);return}e=n.value}this.draft.set(e===void 0?``:JSON.stringify(e)),this.editing.set(!0),Hd(()=>{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=xM(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(){Hd(()=>this.editButton()?.nativeElement.focus(),{injector:this.injector})}static ɵfac=function(t){return new(t||e)};static ɵcmp=A({type:e,selectors:[[`app-prop-value`]],viewQuery:function(e,t){e&1&&l_(t.field,dM,5)(t.editButton,fM,5)(t.valueBox,pM,5),e&2&&u_(3)},inputs:{prop:[1,`prop`],componentId:[1,`componentId`],pageId:[1,`pageId`],rpc:[1,`rpc`],writes:[1,`writes`],bare:[1,`bare`],readDraft:[1,`readDraft`]},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`,3,`disabled`],[1,`locked`],[`type`,`button`,1,`edit`,3,`click`,`disabled`]],template:function(e,t){e&1&&(M(0,mM,11,11)(1,vM,4,3),M(2,yM,2,2,`p`,3),B(3,`p`,4),J(4),V()),e&2&&(N(+!t.editing()),k(2),N(t.error()?2:-1),k(2),Y(t.done()))},dependencies:[gb],styles:[`[_nghost-%COMP%] { +}`]})},fM=[`field`],pM=[`editButton`],mM=[`valueBox`];function hM(e,t){if(e&1){let e=H();B(0,`div`,5)(1,`label`,6),J(2),V(),B(3,`input`,7,0),W(`input`,function(t){return T(e),E(G().draft.set(t.target.value))})(`keydown.enter`,function(t){T(e);let n=G();return t.preventDefault(),E(n.apply())})(`keydown.escape`,function(t){T(e);let n=G();return t.preventDefault(),t.stopPropagation(),E(n.cancel())}),V(),B(5,`button`,8),W(`click`,function(){return T(e),E(G().apply())}),J(6,`Apply`),V(),B(7,`button`,9),W(`click`,function(){return T(e),E(G().cancel())}),J(8,`Cancel`),V()(),B(9,`p`,10),J(10),V()}if(e&2){let e=G();k(),qg(`htmlFor`,e.fieldId),k(),X(`New value of `,e.prop().name,`, as JSON`),k(),qg(`id`,e.fieldId)(`value`,e.draft())(`readOnly`,e.busy()),j(`aria-busy`,e.busy()?`true`:null)(`aria-invalid`,e.error()?`true`:null)(`aria-describedby`,e.hintId+(e.error()?` `+e.errorId:``)),k(2),qg(`disabled`,e.busy()),k(4),qg(`id`,e.hintId),k(),X(` JSON, such as "text", 42, true or `,e.objectSample,`. Enter applies, Escape cancels. `)}}function gM(e,t){if(e&1&&(B(0,`pre`,null,1),J(2),xv(3,`json`),V()),e&2){let e=G(2);j(`tabindex`,e.scrollable()?0:null)(`role`,e.scrollable()?`region`:null)(`aria-label`,e.scrollable()?`Value of `+e.prop().name:null),k(2),Y(Cv(3,4,e.prop().value))}}function _M(e,t){if(e&1){let e=H();B(0,`button`,14,2),W(`click`,function(){return T(e),E(G(2).start())}),J(2,` Edit `),V()}if(e&2){let e=G(2);qg(`disabled`,e.busy()),j(`aria-label`,`Edit `+e.prop().name)}}function vM(e,t){if(e&1&&(B(0,`p`,13),J(1),V()),e&2){let e=G(2);k(),Y(e.prop().locked)}}function yM(e,t){if(e&1&&(B(0,`div`,11),M(1,gM,4,6,`pre`),M(2,_M,3,2,`button`,12),V(),M(3,vM,2,1,`p`,13)),e&2){let e=G();k(),N(e.bare()?-1:1),k(),N(e.editable()?2:-1),k(),N(e.writes()&&e.prop().locked?3:-1)}}function bM(e,t){if(e&1&&(B(0,`p`,3),J(1),V()),e&2){let e=G();qg(`id`,e.errorId),k(),Y(e.error())}}var xM=0;function SM(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 CM=class e{prop=$.required();componentId=$.required();pageId=$(null);rpc=$(null);writes=$(!1);bare=$(!1);readDraft=$(null);fieldId=`prop-edit-${++xM}`;hintId=`${this.fieldId}-hint`;errorId=`${this.fieldId}-error`;objectSample=`{"a": 1}`;editing=O(!1);draft=O(``);busy=O(!1);error=O(``);done=O(``);editable=Q(()=>this.writes()&&!!this.prop().edit&&!!this.pageId()&&!!this.rpc());field=Jv(`field`);editButton=Jv(`editButton`);valueBox=Jv(`valueBox`);injector=C(Ts);scrollable=O(!1);constructor(){dy(()=>{this.prop();let e=this.valueBox()?.nativeElement;this.scrollable.set(!!e&&e.scrollHeight>e.clientHeight+1)})}async start(){let e=this.prop().value;this.error.set(``),this.done.set(``);let t=this.readDraft();if(t){this.busy.set(!0);let n=await t();if(this.busy.set(!1),n.error!==void 0){this.error.set(n.error);return}e=n.value}this.draft.set(e===void 0?``:JSON.stringify(e)),this.editing.set(!0),Hd(()=>{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=SM(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(){Hd(()=>this.editButton()?.nativeElement.focus(),{injector:this.injector})}static ɵfac=function(t){return new(t||e)};static ɵcmp=A({type:e,selectors:[[`app-prop-value`]],viewQuery:function(e,t){e&1&&l_(t.field,fM,5)(t.editButton,pM,5)(t.valueBox,mM,5),e&2&&u_(3)},inputs:{prop:[1,`prop`],componentId:[1,`componentId`],pageId:[1,`pageId`],rpc:[1,`rpc`],writes:[1,`writes`],bare:[1,`bare`],readDraft:[1,`readDraft`]},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`,3,`disabled`],[1,`locked`],[`type`,`button`,1,`edit`,3,`click`,`disabled`]],template:function(e,t){e&1&&(M(0,hM,11,11)(1,yM,4,3),M(2,bM,2,2,`p`,3),B(3,`p`,4),J(4),V()),e&2&&(N(+!t.editing()),k(2),N(t.error()?2:-1),k(2),Y(t.done()))},dependencies:[gb],styles:[`[_nghost-%COMP%] { display: block; min-width: 0; } @@ -1969,7 +1969,7 @@ button.edit[_ngcontent-%COMP%] { .error[_ngcontent-%COMP%] { color: var(--%NS%danger-text); -}`]})},CM=1e3,wM={depth:5,limit:100},TM=`[redacted]`;function EM(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function DM(e){return EM(e)&&typeof e.$more==`number`&&Object.keys(e).length===1}function OM(e){return EM(e)&&typeof e.$collapsed==`string`&&typeof e.size==`number`&&Object.keys(e).length===2}function kM(e){return e===`Array`?`array`:e===`Map`?`map`:e===`Set`?`set`:`object`}function AM(e){return e.$type===`Map`&&Array.isArray(e.entries)}function jM(e){return e.$type===`Set`&&Array.isArray(e.values)}function MM(e){return Object.keys(e).filter(e=>e!==`$type`&&e!==`$more`)}function NM(e){if(!e||typeof e!=`object`)return null;if(OM(e))return e.size<=0?null:{kind:kM(e.$collapsed),type:e.$collapsed,size:e.size,collapsed:!0};if(DM(e))return null;if(Array.isArray(e)){let t=e.at(-1),n=DM(t)?t.$more:0,r=e.length-+!!n+n;return r?{kind:`array`,type:`Array`,size:r,collapsed:!1}:null}let t=e;if(AM(t)||jM(t)){let e=typeof t.size==`number`?t.size:0,n=AM(t)?`map`:`set`;return e?{kind:n,type:n===`map`?`Map`:`Set`,size:e,collapsed:!1}:null}let n=typeof t.$more==`number`?t.$more:0,r=MM(t).length+n,i=typeof t.$type==`string`?t.$type:`Object`;return r?{kind:`object`,type:i,size:r,collapsed:!1}:null}function PM(e){if(typeof e==`string`)return JSON.stringify(e);let t=NM(e);if(t)return LM(t);try{return JSON.stringify(e)??String(e)}catch{return String(e)}}function FM(e){let t=NM(e);if(!t||t.collapsed)return{children:[],more:0};if(Array.isArray(e)){let n=(DM(e.at(-1))?e.slice(0,-1):e).map((e,t)=>({key:String(t),label:String(t),value:e}));return{children:n,more:t.size-n.length}}let n=e;if(t.kind===`map`){let e=n.entries.map((e,t)=>{let[n,r]=Array.isArray(e)?e:[void 0,e];return{key:String(t),label:PM(n),value:r}});return{children:e,more:Math.max(0,t.size-e.length)}}if(t.kind===`set`){let e=n.values.map((e,t)=>({key:String(t),label:String(t),value:e}));return{children:e,more:Math.max(0,t.size-e.length)}}return{children:MM(n).map(e=>({key:e,label:e,value:n[e]})),more:typeof n.$more==`number`?n.$more:0}}function IM(e,t,n){return`${e} ${e===1?t:n}`}function LM(e){let t={array:IM(e.size,`item`,`items`),object:IM(e.size,`key`,`keys`),map:IM(e.size,`entry`,`entries`),set:IM(e.size,`value`,`values`)}[e.kind];return`${e.type} (${t})`}function RM(e,t){return JSON.stringify(t===void 0?e:[t,...e])}function zM(e,t){return e.map((e,n)=>n===0?e:(t?t[n-1]!==`object`:/^\d+$/.test(e))?`[${e}]`:`.${e}`).join(``)}function BM(e){return e.every(e=>e&&e===e.trim()&&!/[.[\]]/.test(e))?e.join(`.`):null}var VM=/^\[(Getter|Unreadable|Circular|Truncated|Function\b.*|Promise)\]$/;function HM(e){return e===null||typeof e==`boolean`?!0:typeof e==`number`?Number.isFinite(e):typeof e==`string`&&e!==TM&&!VM.test(e)&&!e.endsWith(`…`)}function UM(e,t){return!e||t.kind===`map`||t.kind===`set`||e===`signal`&&t.kind===`object`&&t.type!==`Object`?null:e}function WM(e,t,n,r,i=500){let a=[],o=r.trim().toLowerCase();if(!o)return a;let s=new Set,c=(e,t)=>{let r=RM(e);if(!(s.has(r)||a.length>=i)){s.add(r);for(let r of FM(t).children){let t=[...e,r.key];if(r.label.toLowerCase().includes(o)&&a.push(t),!NM(r.value))continue;let i=n(t)??(NM(r.value)?.collapsed?void 0:r.value);i!==void 0&&c(t,i)}}};return c(e,n(e)??t),a}var GM=(e,t)=>t.id;function KM(e,t){if(e&1){let e=H();L(0,`button`,2),U(`click`,function(){T(e);let t=G().$implicit;return E(G(3).toggle(t))}),D(),L(1,`svg`,3),z(2,`path`,4),R(),_s(),L(3,`span`,14),J(4),R(),L(5,`span`,5),J(6),R()()}if(e&2){let e=G().$implicit;j(`aria-expanded`,e.open)(`aria-label`,e.label+`: `+e.text),k(4),X(``,e.label,`:`),k(2),Y(e.text)}}function qM(e,t){if(e&1&&z(0,`app-prop-value`,15),e&2){let e=G(5);I(`prop`,t)(`componentId`,e.componentId())(`pageId`,e.pageId())(`rpc`,e.rpc())(`writes`,e.writes())}}function JM(e,t){if(e&1&&(L(0,`span`,16),J(1),R()),e&2){let e=G(2).$implicit;k(),Y(e.text)}}function YM(e,t){if(e&1&&(L(0,`span`,14),J(1),R(),M(2,qM,1,5,`app-prop-value`,15)(3,JM,2,1,`span`,16)),e&2){let e,t=G().$implicit;k(),X(``,t.label,`:`),k(),N((e=t.edit)?2:3,e)}}function XM(e,t){if(e&1){let e=H();L(0,`button`,17),U(`click`,function(){T(e);let t=G().$implicit;return E(G(3).more(t))}),J(1),L(2,`span`,18),J(3),R()()}if(e&2){let e=G().$implicit,t=G(3);k(),X(` Show `,t.step(e),` more `),k(2),X(`(`,e.more,` not listed)`)}}function ZM(e,t){e&1&&(L(0,`span`,12),J(1,`Reading from the page…`),R())}function QM(e,t){if(e&1&&(L(0,`span`,13),J(1),R()),e&2){let e=G().$implicit;k(),Y(e.text)}}function $M(e,t){if(e&1&&(L(0,`li`,9),M(1,KM,7,4,`button`,10)(2,YM,4,2)(3,XM,4,2,`button`,11)(4,ZM,2,0,`span`,12)(5,QM,2,1,`span`,13),R()),e&2){let e,n=t.$implicit;K(`padding-left`,n.depth*14,`px`),k(),N((e=n.kind)===`node`?1:e===`leaf`?2:e===`more`?3:e===`loading`?4:e===`error`?5:-1)}}function eN(e,t){if(e&1&&(L(0,`ul`,7),P(1,$M,6,3,`li`,8,GM),R()),e&2){let e=G(2);I(`id`,e.listId),j(`aria-label`,e.prop().name+` entries`),k(),F(e.rows())}}function tN(e,t){if(e&1){let e=H();L(0,`div`,1)(1,`button`,2),U(`click`,function(){return T(e),E(G().toggleRoot())}),D(),L(2,`svg`,3),z(3,`path`,4),R(),_s(),L(4,`span`,5),J(5),R()(),z(6,`app-prop-value`,6),R(),M(7,eN,3,2,`ul`,7)}if(e&2){let e=t,n=G();k(),j(`aria-expanded`,n.rootOpen())(`aria-controls`,n.rootOpen()?n.listId:null)(`aria-label`,n.prop().name+`: `+n.summaryOf(e)),k(4),Y(n.summaryOf(e)),k(),I(`bare`,!0)(`prop`,n.prop())(`componentId`,n.componentId())(`pageId`,n.pageId())(`rpc`,n.rpc())(`writes`,n.writes())(`readDraft`,n.readWhole),k(),N(n.rootOpen()?7:-1)}}function nN(e,t){if(e&1&&z(0,`app-prop-value`,0),e&2){let e=G();I(`prop`,e.prop())(`componentId`,e.componentId())(`pageId`,e.pageId())(`rpc`,e.rpc())(`writes`,e.writes())}}var rN=0;function iN(e){if(e===void 0)return`undefined`;try{return JSON.stringify(e)??String(e)}catch{return String(e)}}function aN(e){if(Array.isArray(e))return e.every(aN);if(e&&typeof e==`object`){let t=e;return![`$collapsed`,`$more`,`$type`].some(e=>Object.hasOwn(t,e))&&Object.values(t).every(aN)}return HM(e)}var oN=class e{prop=$.required();store=$.required();componentId=$.required();pageId=$(null);rpc=$(null);writes=$(!1);directive=$(void 0);query=$(``);listId=`value-tree-${++rN}`;host=C(Il);pendingMore=null;constructor(){dy(()=>{let e=this.rows(),t=this.pendingMore;if(!t)return;let n=e.findIndex(e=>(e.kind===`leaf`||e.kind===`node`)&&!t.has(e.id));if(n<0)return;this.pendingMore=null;let r=document.activeElement;r&&r!==document.body&&r.isConnected||this.focusNear(n)})}rootPath=Q(()=>[this.prop().prop]);rootValue=Q(()=>this.store().level(this.rootPath(),this.directive())??this.prop().value);root=Q(()=>NM(this.rootValue()));needle=Q(()=>this.query().trim().toLowerCase());matches=Q(()=>{let e=this.needle(),t=this.prop();if(!e||[t.name,t.prop].some(t=>t.toLowerCase().includes(e)))return null;let n=this.store(),r=this.directive();return WM(this.rootPath(),this.rootValue(),e=>n.level(e,r),e)});rootOpen=Q(()=>!!this.matches()?.length||this.store().isOpen(this.rootPath(),this.directive()));rows=Q(()=>{let e=this.root();if(!e)return[];let t=this.store(),n=this.directive(),r=this.matches(),i=new Set,a=new Set;for(let e of r??[]){a.add(RM(e));for(let t=2;t<=e.length;t++)i.add(RM(e.slice(0,t)))}let o=this.prop(),s=this.writes()&&n===void 0,c=[],l=(e,o,d,f,p,m)=>{let{children:h,more:g}=FM(e);for(let e of h){let h=[...o,e.key],g=RM(h);if(r&&!m&&!i.has(g))continue;let _=NM(e.value),ee=RM(h,n);if(!_){let t=p&&HM(e.value)?BM(h):null;c.push({id:ee,kind:`leaf`,depth:f,path:h,label:e.label,text:iN(e.value),edit:s&&t&&p?{name:zM(h,[...d]),prop:t,value:e.value,edit:p}:void 0});continue}let te=!!r&&!m&&i.has(g)&&!a.has(g)||t.isOpen(h,n);if(c.push({id:ee,kind:`node`,depth:f,path:h,label:e.label,text:LM(_),container:_,open:te}),!te)continue;let ne=t.level(h,n)??(_.collapsed?void 0:e.value),re=[...d,_.kind];ne===void 0?t.errors().has(ee)?c.push({...u(h,f+1,`error`),text:t.errors().get(ee)}):c.push(u(h,f+1,`loading`)):l(ne,h,re,f+1,UM(p,_),m||a.has(g))}g>0&&(!r||m)&&c.push({...u(o,f,`more`),more:g,listed:h.length})},u=(e,t,r)=>({id:`${RM(e,n)}:${r}`,kind:r,depth:t,path:e,label:``,text:``});return l(this.rootValue(),this.rootPath(),[e.kind],0,s?UM(o.editInside??null,e):null,!r),c});readWhole=async()=>{let e=await this.store().read(this.rootPath(),wM.depth,wM.limit);return e.ok?aN(e.value)?{value:e.value}:{error:`Too large to edit as a whole. Open it to edit the values inside.`}:{error:e.error??`The page did not read it.`}};summaryOf(e){return LM(e)}toggleRoot(){this.pendingMore=null,this.store().toggle(this.rootPath(),this.directive(),!1)}toggle(e){this.pendingMore=null,this.store().toggle(e.path,this.directive(),!!e.container?.collapsed)}more(e){this.pendingMore=new Set(this.rows().map(e=>e.id)),this.store().more(e.path,this.directive(),e.listed??0)}focusNear(e){let t=this.host.nativeElement,n=Array.from(t.querySelectorAll(`#${this.listId} > li`)),r=e=>e?.querySelector(`button:not([disabled]), input, textarea, [tabindex="0"]`);(n.slice(e).map(r).find(Boolean)??n.slice(0,e).reverse().map(r).find(Boolean)??t.querySelector(`.root > .toggle`))?.focus()}step(e){return Math.min(100,e.more??0)}static ɵfac=function(t){return new(t||e)};static ɵcmp=A({type:e,selectors:[[`app-value-tree`]],inputs:{prop:[1,`prop`],store:[1,`store`],componentId:[1,`componentId`],pageId:[1,`pageId`],rpc:[1,`rpc`],writes:[1,`writes`],directive:[1,`directive`],query:[1,`query`]},decls:2,vars:1,consts:[[3,`prop`,`componentId`,`pageId`,`rpc`,`writes`],[1,`root`],[`type`,`button`,1,`toggle`,3,`click`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`,1,`chevron`],[`d`,`m9 6 6 6-6 6`],[1,`summary`,`mono`],[1,`whole`,3,`bare`,`prop`,`componentId`,`pageId`,`rpc`,`writes`,`readDraft`],[1,`entries`,3,`id`],[1,`entry`,3,`padding-left`],[1,`entry`],[`type`,`button`,1,`toggle`],[`type`,`button`,1,`more`],[`role`,`status`,1,`muted`],[`role`,`alert`,1,`error`],[1,`key`,`mono`],[1,`leaf-edit`,3,`prop`,`componentId`,`pageId`,`rpc`,`writes`],[1,`leaf`,`mono`],[`type`,`button`,1,`more`,3,`click`],[1,`muted`]],template:function(e,t){if(e&1&&M(0,tN,8,12)(1,nN,1,5,`app-prop-value`,0),e&2){let e;N((e=t.root())?0:1,e)}},dependencies:[SM],styles:[`[_nghost-%COMP%] { +}`]})},wM=1e3,TM={depth:5,limit:100},EM=`[redacted]`;function DM(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function OM(e){return DM(e)&&typeof e.$more==`number`&&Object.keys(e).length===1}function kM(e){return DM(e)&&typeof e.$collapsed==`string`&&typeof e.size==`number`&&Object.keys(e).length===2}function AM(e){return e===`Array`?`array`:e===`Map`?`map`:e===`Set`?`set`:`object`}function jM(e){return e.$type===`Map`&&Array.isArray(e.entries)}function MM(e){return e.$type===`Set`&&Array.isArray(e.values)}function NM(e){return Object.keys(e).filter(e=>e!==`$type`&&e!==`$more`)}function PM(e){if(!e||typeof e!=`object`)return null;if(kM(e))return e.size<=0?null:{kind:AM(e.$collapsed),type:e.$collapsed,size:e.size,collapsed:!0};if(OM(e))return null;if(Array.isArray(e)){let t=e.at(-1),n=OM(t)?t.$more:0,r=e.length-+!!n+n;return r?{kind:`array`,type:`Array`,size:r,collapsed:!1}:null}let t=e;if(jM(t)||MM(t)){let e=typeof t.size==`number`?t.size:0,n=jM(t)?`map`:`set`;return e?{kind:n,type:n===`map`?`Map`:`Set`,size:e,collapsed:!1}:null}let n=typeof t.$more==`number`?t.$more:0,r=NM(t).length+n,i=typeof t.$type==`string`?t.$type:`Object`;return r?{kind:`object`,type:i,size:r,collapsed:!1}:null}function FM(e){if(typeof e==`string`)return JSON.stringify(e);let t=PM(e);if(t)return RM(t);try{return JSON.stringify(e)??String(e)}catch{return String(e)}}function IM(e){let t=PM(e);if(!t||t.collapsed)return{children:[],more:0};if(Array.isArray(e)){let n=(OM(e.at(-1))?e.slice(0,-1):e).map((e,t)=>({key:String(t),label:String(t),value:e}));return{children:n,more:t.size-n.length}}let n=e;if(t.kind===`map`){let e=n.entries.map((e,t)=>{let[n,r]=Array.isArray(e)?e:[void 0,e];return{key:String(t),label:FM(n),value:r}});return{children:e,more:Math.max(0,t.size-e.length)}}if(t.kind===`set`){let e=n.values.map((e,t)=>({key:String(t),label:String(t),value:e}));return{children:e,more:Math.max(0,t.size-e.length)}}return{children:NM(n).map(e=>({key:e,label:e,value:n[e]})),more:typeof n.$more==`number`?n.$more:0}}function LM(e,t,n){return`${e} ${e===1?t:n}`}function RM(e){let t={array:LM(e.size,`item`,`items`),object:LM(e.size,`key`,`keys`),map:LM(e.size,`entry`,`entries`),set:LM(e.size,`value`,`values`)}[e.kind];return`${e.type} (${t})`}function zM(e,t){return JSON.stringify(t===void 0?e:[t,...e])}function BM(e,t){return e.map((e,n)=>n===0?e:(t?t[n-1]!==`object`:/^\d+$/.test(e))?`[${e}]`:`.${e}`).join(``)}function VM(e){return e.every(e=>e&&e===e.trim()&&!/[.[\]]/.test(e))?e.join(`.`):null}var HM=/^\[(Getter|Unreadable|Circular|Truncated|Function\b.*|Promise)\]$/;function UM(e){return e===null||typeof e==`boolean`?!0:typeof e==`number`?Number.isFinite(e):typeof e==`string`&&e!==EM&&!HM.test(e)&&!e.endsWith(`…`)}function WM(e,t){return!e||t.kind===`map`||t.kind===`set`||e===`signal`&&t.kind===`object`&&t.type!==`Object`?null:e}function GM(e,t,n,r,i=500){let a=[],o=r.trim().toLowerCase();if(!o)return a;let s=new Set,c=(e,t)=>{let r=zM(e);if(!(s.has(r)||a.length>=i)){s.add(r);for(let r of IM(t).children){let t=[...e,r.key];if(r.label.toLowerCase().includes(o)&&a.push(t),!PM(r.value))continue;let i=n(t)??(PM(r.value)?.collapsed?void 0:r.value);i!==void 0&&c(t,i)}}};return c(e,n(e)??t),a}var KM=(e,t)=>t.id;function qM(e,t){if(e&1){let e=H();L(0,`button`,2),U(`click`,function(){T(e);let t=G().$implicit;return E(G(3).toggle(t))}),D(),L(1,`svg`,3),z(2,`path`,4),R(),_s(),L(3,`span`,14),J(4),R(),L(5,`span`,5),J(6),R()()}if(e&2){let e=G().$implicit;j(`aria-expanded`,e.open)(`aria-label`,e.label+`: `+e.text),k(4),X(``,e.label,`:`),k(2),Y(e.text)}}function JM(e,t){if(e&1&&z(0,`app-prop-value`,15),e&2){let e=G(5);I(`prop`,t)(`componentId`,e.componentId())(`pageId`,e.pageId())(`rpc`,e.rpc())(`writes`,e.writes())}}function YM(e,t){if(e&1&&(L(0,`span`,16),J(1),R()),e&2){let e=G(2).$implicit;k(),Y(e.text)}}function XM(e,t){if(e&1&&(L(0,`span`,14),J(1),R(),M(2,JM,1,5,`app-prop-value`,15)(3,YM,2,1,`span`,16)),e&2){let e,t=G().$implicit;k(),X(``,t.label,`:`),k(),N((e=t.edit)?2:3,e)}}function ZM(e,t){if(e&1){let e=H();L(0,`button`,17),U(`click`,function(){T(e);let t=G().$implicit;return E(G(3).more(t))}),J(1),L(2,`span`,18),J(3),R()()}if(e&2){let e=G().$implicit,t=G(3);k(),X(` Show `,t.step(e),` more `),k(2),X(`(`,e.more,` not listed)`)}}function QM(e,t){e&1&&(L(0,`span`,12),J(1,`Reading from the page…`),R())}function $M(e,t){if(e&1&&(L(0,`span`,13),J(1),R()),e&2){let e=G().$implicit;k(),Y(e.text)}}function eN(e,t){if(e&1&&(L(0,`li`,9),M(1,qM,7,4,`button`,10)(2,XM,4,2)(3,ZM,4,2,`button`,11)(4,QM,2,0,`span`,12)(5,$M,2,1,`span`,13),R()),e&2){let e,n=t.$implicit;K(`padding-left`,n.depth*14,`px`),k(),N((e=n.kind)===`node`?1:e===`leaf`?2:e===`more`?3:e===`loading`?4:e===`error`?5:-1)}}function tN(e,t){if(e&1&&(L(0,`ul`,7),P(1,eN,6,3,`li`,8,KM),R()),e&2){let e=G(2);I(`id`,e.listId),j(`aria-label`,e.prop().name+` entries`),k(),F(e.rows())}}function nN(e,t){if(e&1){let e=H();L(0,`div`,1)(1,`button`,2),U(`click`,function(){return T(e),E(G().toggleRoot())}),D(),L(2,`svg`,3),z(3,`path`,4),R(),_s(),L(4,`span`,5),J(5),R()(),z(6,`app-prop-value`,6),R(),M(7,tN,3,2,`ul`,7)}if(e&2){let e=t,n=G();k(),j(`aria-expanded`,n.rootOpen())(`aria-controls`,n.rootOpen()?n.listId:null)(`aria-label`,n.prop().name+`: `+n.summaryOf(e)),k(4),Y(n.summaryOf(e)),k(),I(`bare`,!0)(`prop`,n.prop())(`componentId`,n.componentId())(`pageId`,n.pageId())(`rpc`,n.rpc())(`writes`,n.writes())(`readDraft`,n.readWhole),k(),N(n.rootOpen()?7:-1)}}function rN(e,t){if(e&1&&z(0,`app-prop-value`,0),e&2){let e=G();I(`prop`,e.prop())(`componentId`,e.componentId())(`pageId`,e.pageId())(`rpc`,e.rpc())(`writes`,e.writes())}}var iN=0;function aN(e){if(e===void 0)return`undefined`;try{return JSON.stringify(e)??String(e)}catch{return String(e)}}function oN(e){if(Array.isArray(e))return e.every(oN);if(e&&typeof e==`object`){let t=e;return![`$collapsed`,`$more`,`$type`].some(e=>Object.hasOwn(t,e))&&Object.values(t).every(oN)}return UM(e)}var sN=class e{prop=$.required();store=$.required();componentId=$.required();pageId=$(null);rpc=$(null);writes=$(!1);directive=$(void 0);query=$(``);listId=`value-tree-${++iN}`;host=C(Il);pendingMore=null;constructor(){dy(()=>{let e=this.rows(),t=this.pendingMore;if(!t)return;let n=e.findIndex(e=>(e.kind===`leaf`||e.kind===`node`)&&!t.has(e.id));if(n<0)return;this.pendingMore=null;let r=document.activeElement;r&&r!==document.body&&r.isConnected||this.focusNear(n)})}rootPath=Q(()=>[this.prop().prop]);rootValue=Q(()=>this.store().level(this.rootPath(),this.directive())??this.prop().value);root=Q(()=>PM(this.rootValue()));needle=Q(()=>this.query().trim().toLowerCase());matches=Q(()=>{let e=this.needle(),t=this.prop();if(!e||[t.name,t.prop].some(t=>t.toLowerCase().includes(e)))return null;let n=this.store(),r=this.directive();return GM(this.rootPath(),this.rootValue(),e=>n.level(e,r),e)});rootOpen=Q(()=>!!this.matches()?.length||this.store().isOpen(this.rootPath(),this.directive()));rows=Q(()=>{let e=this.root();if(!e)return[];let t=this.store(),n=this.directive(),r=this.matches(),i=new Set,a=new Set;for(let e of r??[]){a.add(zM(e));for(let t=2;t<=e.length;t++)i.add(zM(e.slice(0,t)))}let o=this.prop(),s=this.writes()&&n===void 0,c=[],l=(e,o,d,f,p,m)=>{let{children:h,more:g}=IM(e);for(let e of h){let h=[...o,e.key],g=zM(h);if(r&&!m&&!i.has(g))continue;let _=PM(e.value),ee=zM(h,n);if(!_){let t=p&&UM(e.value)?VM(h):null;c.push({id:ee,kind:`leaf`,depth:f,path:h,label:e.label,text:aN(e.value),edit:s&&t&&p?{name:BM(h,[...d]),prop:t,value:e.value,edit:p}:void 0});continue}let te=!!r&&!m&&i.has(g)&&!a.has(g)||t.isOpen(h,n);if(c.push({id:ee,kind:`node`,depth:f,path:h,label:e.label,text:RM(_),container:_,open:te}),!te)continue;let ne=t.level(h,n)??(_.collapsed?void 0:e.value),re=[...d,_.kind];ne===void 0?t.errors().has(ee)?c.push({...u(h,f+1,`error`),text:t.errors().get(ee)}):c.push(u(h,f+1,`loading`)):l(ne,h,re,f+1,WM(p,_),m||a.has(g))}g>0&&(!r||m)&&c.push({...u(o,f,`more`),more:g,listed:h.length})},u=(e,t,r)=>({id:`${zM(e,n)}:${r}`,kind:r,depth:t,path:e,label:``,text:``});return l(this.rootValue(),this.rootPath(),[e.kind],0,s?WM(o.editInside??null,e):null,!r),c});readWhole=async()=>{let e=await this.store().read(this.rootPath(),TM.depth,TM.limit);return e.ok?oN(e.value)?{value:e.value}:{error:`Too large to edit as a whole. Open it to edit the values inside.`}:{error:e.error??`The page did not read it.`}};summaryOf(e){return RM(e)}toggleRoot(){this.pendingMore=null,this.store().toggle(this.rootPath(),this.directive(),!1)}toggle(e){this.pendingMore=null,this.store().toggle(e.path,this.directive(),!!e.container?.collapsed)}more(e){this.pendingMore=new Set(this.rows().map(e=>e.id)),this.store().more(e.path,this.directive(),e.listed??0)}focusNear(e){let t=this.host.nativeElement,n=Array.from(t.querySelectorAll(`#${this.listId} > li`)),r=e=>e?.querySelector(`button:not([disabled]), input, textarea, [tabindex="0"]`);(n.slice(e).map(r).find(Boolean)??n.slice(0,e).reverse().map(r).find(Boolean)??t.querySelector(`.root > .toggle`))?.focus()}step(e){return Math.min(100,e.more??0)}static ɵfac=function(t){return new(t||e)};static ɵcmp=A({type:e,selectors:[[`app-value-tree`]],inputs:{prop:[1,`prop`],store:[1,`store`],componentId:[1,`componentId`],pageId:[1,`pageId`],rpc:[1,`rpc`],writes:[1,`writes`],directive:[1,`directive`],query:[1,`query`]},decls:2,vars:1,consts:[[3,`prop`,`componentId`,`pageId`,`rpc`,`writes`],[1,`root`],[`type`,`button`,1,`toggle`,3,`click`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`,1,`chevron`],[`d`,`m9 6 6 6-6 6`],[1,`summary`,`mono`],[1,`whole`,3,`bare`,`prop`,`componentId`,`pageId`,`rpc`,`writes`,`readDraft`],[1,`entries`,3,`id`],[1,`entry`,3,`padding-left`],[1,`entry`],[`type`,`button`,1,`toggle`],[`type`,`button`,1,`more`],[`role`,`status`,1,`muted`],[`role`,`alert`,1,`error`],[1,`key`,`mono`],[1,`leaf-edit`,3,`prop`,`componentId`,`pageId`,`rpc`,`writes`],[1,`leaf`,`mono`],[`type`,`button`,1,`more`,3,`click`],[1,`muted`]],template:function(e,t){if(e&1&&M(0,nN,8,12)(1,rN,1,5,`app-prop-value`,0),e&2){let e;N((e=t.root())?0:1,e)}},dependencies:[CM],styles:[`[_nghost-%COMP%] { display: block; min-width: 0; } @@ -2091,7 +2091,7 @@ button.edit[_ngcontent-%COMP%] { .more[_ngcontent-%COMP%] { transition: none; } -}`]})};function sN(e,t){return e.length>t.length&&e.startsWith(`${t.slice(0,-1)},`)}var cN=class{target={rpc:null,pageId:null,componentId:null};fetched=O(new Map);pushed=O({});open=O(new Set);loading=O(new Set);errors=O(new Map);limits=new Map;generation=0;follow(e,t){let n=e.componentId===this.target.componentId&&e.pageId===this.target.pageId;this.target=e,n||(this.generation++,this.fetched.set(new Map),this.open.set(new Set),this.loading.set(new Set),this.errors.set(new Map),this.limits.clear()),this.pushed.set(t??{})}level(e,t){let n=RM(e,t),r=this.pushed();return Object.hasOwn(r,n)?r[n]:this.fetched().get(n)}isOpen(e,t){return this.open().has(RM(e,t))}toggle(e,t,n){let r=RM(e,t),i=new Set(this.open());if(i.has(r)){for(let e of i)(e===r||sN(e,r))&&i.delete(e);this.open.set(i),this.send({path:e,directive:t,forget:!0});return}i.add(r),this.open.set(i),n&&this.load(e,t,this.limits.get(r)??30)}more(e,t,n){let r=RM(e,t),i=Math.min(CM,Math.max(n,this.limits.get(r)??0)+100);this.limits.set(r,i),this.load(e,t,i)}async read(e,t,n){return this.send({path:e,depth:t,limit:n})}async load(e,t,n){let r=RM(e,t),i=this.generation;this.loading.update(e=>new Set(e).add(r));let a=await this.send({path:e,directive:t,limit:n,watch:!0});i===this.generation&&(this.loading.update(e=>{let t=new Set(e);return t.delete(r),t}),this.errors.update(e=>{let t=new Map(e);return a.ok?t.delete(r):t.set(r,a.error??`The page did not read it.`),t}),a.ok&&this.fetched.update(e=>new Map(e).set(r,a.value)))}async send(e){let{rpc:t,pageId:n,componentId:r}=this.target;if(!t||!n||!r)return{error:`No live page to read from.`};let{directive:i,...a}=e;try{return await t.scope(`pangular`).rpc.call(`request-component-value`,{pageId:n,request:{id:r,...a,...i===void 0?{}:{directive:i}}})??{}}catch{return{error:`The devtools server did not answer. Try again.`}}}};function lN(e,t){if(e&1&&(B(0,`span`,1),J(1),V()),e&2){let e=G(2);k(),X(`: `,e.label())}}function uN(e,t){if(e&1&&(B(0,`span`,1),J(1),V()),e&2){let e=G(3);k(),X(`: `,e.label())}}function dN(e,t){if(e&1){let e=H();B(0,`button`,4),W(`click`,function(){return T(e),E(G(2).store(`log`))}),J(1,` Log to console `),M(2,uN,2,1,`span`,1),V()}if(e&2){let e=G(2);qg(`disabled`,e.busy()||!e.rpc()||!e.pageId()),k(2),N(e.label()?2:-1)}}function fN(e,t){if(e&1){let e=H();B(0,`button`,0),W(`click`,function(){return T(e),E(G().store())}),J(1,` Store as global `),M(2,lN,2,1,`span`,1),V(),M(3,dN,3,2,`button`,2),B(4,`span`,3),J(5),V()}if(e&2){let e=G();qg(`disabled`,e.busy()||!e.rpc()||!e.pageId()),k(2),N(e.label()?2:-1),k(),N(e.canLog()?3:-1),k(2),Y(e.message())}}var pN=class e{rpc=$(null);pageId=$(null);target=$.required();label=$(``);canLog=$(!1);staticReport=Q(()=>UE(this.rpc()));busy=O(!1);message=O(``);async store(e=`store`){let t=this.rpc(),n=this.pageId();if(t&&n){this.busy.set(!0),this.message.set(``);try{let r=await t.scope(`pangular`).rpc.call(`request-console-global`,{pageId:n,target:this.target(),...e===`log`?{mode:e}:{}}),i=e===`log`?r?.ok?`Logged in the page console.`:`Not logged.`:r?.ok&&r.name?`Stored as ${r.name}.`:`Not stored.`;this.message.set(r?.message||i)}catch{this.message.set(`Could not reach the page.`)}finally{this.busy.set(!1)}}}static ɵfac=function(t){return new(t||e)};static ɵcmp=A({type:e,selectors:[[`app-store-global`]],inputs:{rpc:[1,`rpc`],pageId:[1,`pageId`],target:[1,`target`],label:[1,`label`],canLog:[1,`canLog`]},decls:1,vars:1,consts:[[`type`,`button`,1,`store`,3,`click`,`disabled`],[1,`sr-only`],[`type`,`button`,1,`store`,`log`,3,`disabled`],[`role`,`status`,1,`status`],[`type`,`button`,1,`store`,`log`,3,`click`,`disabled`]],template:function(e,t){e&1&&M(0,fN,6,4),e&2&&N(t.staticReport()?-1:0)},styles:[`[_nghost-%COMP%] { +}`]})};function cN(e,t){return e.length>t.length&&e.startsWith(`${t.slice(0,-1)},`)}var lN=class{target={rpc:null,pageId:null,componentId:null};fetched=O(new Map);pushed=O({});open=O(new Set);loading=O(new Set);errors=O(new Map);limits=new Map;generation=0;follow(e,t){let n=e.componentId===this.target.componentId&&e.pageId===this.target.pageId;this.target=e,n||(this.generation++,this.fetched.set(new Map),this.open.set(new Set),this.loading.set(new Set),this.errors.set(new Map),this.limits.clear()),this.pushed.set(t??{})}level(e,t){let n=zM(e,t),r=this.pushed();return Object.hasOwn(r,n)?r[n]:this.fetched().get(n)}isOpen(e,t){return this.open().has(zM(e,t))}toggle(e,t,n){let r=zM(e,t),i=new Set(this.open());if(i.has(r)){for(let e of i)(e===r||cN(e,r))&&i.delete(e);this.open.set(i),this.send({path:e,directive:t,forget:!0});return}i.add(r),this.open.set(i),n&&this.load(e,t,this.limits.get(r)??30)}more(e,t,n){let r=zM(e,t),i=Math.min(wM,Math.max(n,this.limits.get(r)??0)+100);this.limits.set(r,i),this.load(e,t,i)}async read(e,t,n){return this.send({path:e,depth:t,limit:n})}async load(e,t,n){let r=zM(e,t),i=this.generation;this.loading.update(e=>new Set(e).add(r));let a=await this.send({path:e,directive:t,limit:n,watch:!0});i===this.generation&&(this.loading.update(e=>{let t=new Set(e);return t.delete(r),t}),this.errors.update(e=>{let t=new Map(e);return a.ok?t.delete(r):t.set(r,a.error??`The page did not read it.`),t}),a.ok&&this.fetched.update(e=>new Map(e).set(r,a.value)))}async send(e){let{rpc:t,pageId:n,componentId:r}=this.target;if(!t||!n||!r)return{error:`No live page to read from.`};let{directive:i,...a}=e;try{return await t.scope(`pangular`).rpc.call(`request-component-value`,{pageId:n,request:{id:r,...a,...i===void 0?{}:{directive:i}}})??{}}catch{return{error:`The devtools server did not answer. Try again.`}}}};function uN(e,t){if(e&1&&(B(0,`span`,1),J(1),V()),e&2){let e=G(2);k(),X(`: `,e.label())}}function dN(e,t){if(e&1&&(B(0,`span`,1),J(1),V()),e&2){let e=G(3);k(),X(`: `,e.label())}}function fN(e,t){if(e&1){let e=H();B(0,`button`,4),W(`click`,function(){return T(e),E(G(2).store(`log`))}),J(1,` Log to console `),M(2,dN,2,1,`span`,1),V()}if(e&2){let e=G(2);qg(`disabled`,e.busy()||!e.rpc()||!e.pageId()),k(2),N(e.label()?2:-1)}}function pN(e,t){if(e&1){let e=H();B(0,`button`,0),W(`click`,function(){return T(e),E(G().store())}),J(1,` Store as global `),M(2,uN,2,1,`span`,1),V(),M(3,fN,3,2,`button`,2),B(4,`span`,3),J(5),V()}if(e&2){let e=G();qg(`disabled`,e.busy()||!e.rpc()||!e.pageId()),k(2),N(e.label()?2:-1),k(),N(e.canLog()?3:-1),k(2),Y(e.message())}}var mN=class e{rpc=$(null);pageId=$(null);target=$.required();label=$(``);canLog=$(!1);staticReport=Q(()=>UE(this.rpc()));busy=O(!1);message=O(``);async store(e=`store`){let t=this.rpc(),n=this.pageId();if(t&&n){this.busy.set(!0),this.message.set(``);try{let r=await t.scope(`pangular`).rpc.call(`request-console-global`,{pageId:n,target:this.target(),...e===`log`?{mode:e}:{}}),i=e===`log`?r?.ok?`Logged in the page console.`:`Not logged.`:r?.ok&&r.name?`Stored as ${r.name}.`:`Not stored.`;this.message.set(r?.message||i)}catch{this.message.set(`Could not reach the page.`)}finally{this.busy.set(!1)}}}static ɵfac=function(t){return new(t||e)};static ɵcmp=A({type:e,selectors:[[`app-store-global`]],inputs:{rpc:[1,`rpc`],pageId:[1,`pageId`],target:[1,`target`],label:[1,`label`],canLog:[1,`canLog`]},decls:1,vars:1,consts:[[`type`,`button`,1,`store`,3,`click`,`disabled`],[1,`sr-only`],[`type`,`button`,1,`store`,`log`,3,`disabled`],[`role`,`status`,1,`status`],[`type`,`button`,1,`store`,`log`,3,`click`,`disabled`]],template:function(e,t){e&1&&M(0,pN,6,4),e&2&&N(t.staticReport()?-1:0)},styles:[`[_nghost-%COMP%] { display: inline-flex; flex-wrap: wrap; align-items: center; @@ -2111,7 +2111,7 @@ button.edit[_ngcontent-%COMP%] { .status[_ngcontent-%COMP%]:empty { display: none; -}`]})},mN=(e,t)=>t.id;function hN(e,t){if(e&1&&(L(0,`p`,4),J(1),R()),e&2){let e=G(2);k(),X(`The page has more @for blocks than the `,e.length,` listed.`)}}function gN(e,t){e&1&&(L(0,`span`,9),J(1,`@empty showing`),R())}function _N(e,t){e&1&&(L(0,`span`,10),J(1,`@empty`),R())}function vN(e,t){e&1&&(L(0,`span`,10),J(1,`renders nothing`),R())}function yN(e,t){if(e&1){let e=H();L(0,`li`)(1,`button`,6),U(`click`,function(){let t=T(e).$implicit;return E(G(3).showOwner.emit(t))})(`focus`,function(){let t=T(e).$implicit,n=G(3);return E(n.highlight.emit(n.target(t)))})(`blur`,function(){return T(e),E(G(3).highlight.emit(null))})(`mouseenter`,function(){let t=T(e).$implicit,n=G(3);return E(n.highlight.emit(n.target(t)))})(`mouseleave`,function(){return T(e),E(G(3).highlight.emit(null))}),L(2,`span`,7),J(3),R(),L(4,`span`,8),J(5),R(),M(6,gN,2,0,`span`,9)(7,_N,2,0,`span`,10)(8,vN,2,0,`span`,10),L(9,`span`,11),J(10),R()()()}if(e&2){let e=t.$implicit,n=G(3);k(),j(`aria-disabled`,e.owner?null:`true`),k(2),Y(e.owner?.name??`Unknown component`),k(2),Z(` `,e.count,` `,e.count===1?`item`:`items`,` `),k(),N(e.showingEmpty?6:e.hasEmptyBlock?7:e.count===0?8:-1),k(4),Y(n.trackLabel(e))}}function bN(e,t){if(e&1&&(L(0,`section`,1)(1,`h2`,2),J(2,` @for blocks `),L(3,`span`,3),J(4),R()(),M(5,hN,2,1,`p`,4),L(6,`ul`,5),P(7,yN,11,6,`li`,null,mN),R()()),e&2){let e=G(),t=G();k(4),Y(t.truncated()?e.length+`+`:e.length),k(),N(t.truncated()?5:-1),k(2),F(e)}}function xN(e,t){e&1&&M(0,bN,9,2,`section`,1),e&2&&N(t.length?0:-1)}function SN(e,t){e&1&&z(0,`app-angular-unavailable`,0),e&2&&I(`page`,G().angular())}var CN={$index:`track $index`,item:`track item`,function:`track expression`},wN=class e{blocks=$(void 0);truncated=$(!1);supported=$(null);angular=$(null);showOwner=Rv();highlight=Rv();target(e){return e.rootIds[0]??e.owner?.id??null}trackLabel(e){return e.track?CN[e.track]:`track unknown`}static ɵfac=function(t){return new(t||e)};static ɵcmp=A({type:e,selectors:[[`app-for-blocks`]],inputs:{blocks:[1,`blocks`],truncated:[1,`truncated`],supported:[1,`supported`],angular:[1,`angular`]},outputs:{showOwner:`showOwner`,highlight:`highlight`},decls:2,vars:1,consts:[[`capability`,`forBlocks`,`missing`,``,`compact`,``,1,`for`,3,`page`],[`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&&M(0,xN,1,1)(1,SN,1,1,`app-angular-unavailable`,0),e&2){let e;N((e=t.blocks())?0:t.supported()===!1?1:-1,e)}},dependencies:[hO],styles:[`[_nghost-%COMP%] { +}`]})},hN=(e,t)=>t.id;function gN(e,t){if(e&1&&(L(0,`p`,4),J(1),R()),e&2){let e=G(2);k(),X(`The page has more @for blocks than the `,e.length,` listed.`)}}function _N(e,t){e&1&&(L(0,`span`,9),J(1,`@empty showing`),R())}function vN(e,t){e&1&&(L(0,`span`,10),J(1,`@empty`),R())}function yN(e,t){e&1&&(L(0,`span`,10),J(1,`renders nothing`),R())}function bN(e,t){if(e&1){let e=H();L(0,`li`)(1,`button`,6),U(`click`,function(){let t=T(e).$implicit;return E(G(3).showOwner.emit(t))})(`focus`,function(){let t=T(e).$implicit,n=G(3);return E(n.highlight.emit(n.target(t)))})(`blur`,function(){return T(e),E(G(3).highlight.emit(null))})(`mouseenter`,function(){let t=T(e).$implicit,n=G(3);return E(n.highlight.emit(n.target(t)))})(`mouseleave`,function(){return T(e),E(G(3).highlight.emit(null))}),L(2,`span`,7),J(3),R(),L(4,`span`,8),J(5),R(),M(6,_N,2,0,`span`,9)(7,vN,2,0,`span`,10)(8,yN,2,0,`span`,10),L(9,`span`,11),J(10),R()()()}if(e&2){let e=t.$implicit,n=G(3);k(),j(`aria-disabled`,e.owner?null:`true`),k(2),Y(e.owner?.name??`Unknown component`),k(2),Z(` `,e.count,` `,e.count===1?`item`:`items`,` `),k(),N(e.showingEmpty?6:e.hasEmptyBlock?7:e.count===0?8:-1),k(4),Y(n.trackLabel(e))}}function xN(e,t){if(e&1&&(L(0,`section`,1)(1,`h2`,2),J(2,` @for blocks `),L(3,`span`,3),J(4),R()(),M(5,gN,2,1,`p`,4),L(6,`ul`,5),P(7,bN,11,6,`li`,null,hN),R()()),e&2){let e=G(),t=G();k(4),Y(t.truncated()?e.length+`+`:e.length),k(),N(t.truncated()?5:-1),k(2),F(e)}}function SN(e,t){e&1&&M(0,xN,9,2,`section`,1),e&2&&N(t.length?0:-1)}function CN(e,t){e&1&&z(0,`app-angular-unavailable`,0),e&2&&I(`page`,G().angular())}var wN={$index:`track $index`,item:`track item`,function:`track expression`},TN=class e{blocks=$(void 0);truncated=$(!1);supported=$(null);angular=$(null);showOwner=Rv();highlight=Rv();target(e){return e.rootIds[0]??e.owner?.id??null}trackLabel(e){return e.track?wN[e.track]:`track unknown`}static ɵfac=function(t){return new(t||e)};static ɵcmp=A({type:e,selectors:[[`app-for-blocks`]],inputs:{blocks:[1,`blocks`],truncated:[1,`truncated`],supported:[1,`supported`],angular:[1,`angular`]},outputs:{showOwner:`showOwner`,highlight:`highlight`},decls:2,vars:1,consts:[[`capability`,`forBlocks`,`missing`,``,`compact`,``,1,`for`,3,`page`],[`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&&M(0,SN,1,1)(1,CN,1,1,`app-angular-unavailable`,0),e&2){let e;N((e=t.blocks())?0:t.supported()===!1?1:-1,e)}},dependencies:[gO],styles:[`[_nghost-%COMP%] { display: block; } @@ -2229,7 +2229,7 @@ button.edit[_ngcontent-%COMP%] { min-width: 0; text-overflow: ellipsis; white-space: nowrap; -}`]})},TN=(e,t)=>t.id;function EN(e,t){if(e&1&&(L(0,`p`,11),J(1),R(),L(2,`h3`,7),J(3,`Still retained`),R(),L(4,`p`,6),J(5,` In a development build, Angular's DI debug data keeps every destroyed component in memory, so Pangular can't tell a leak from that. Check retainers in the Chrome DevTools Memory panel: take a heap snapshot after a few navigations, search for the class and look for a retainer other than Angular's DI debug records. Open subscriptions after destroy are still tracked below. `),R()),e&2){let e=G(),t=G();k(),Y(t.plural(e.navigations,`navigation`))}}function DN(e,t){e&1&&(L(0,`p`,6),J(1,` This page cannot track destroyed components. It needs WeakRef, FinalizationRegistry and the Angular debug API of a development build. `),R())}function ON(e,t){if(e&1&&(L(0,`span`,18),J(1),R()),e&2){let e=G().$implicit,t=G(4);k(),Y(t.plural(e.subscriptions,`open subscription`))}}function kN(e,t){if(e&1&&(L(0,`li`,13)(1,`span`,14),J(2),R(),L(3,`span`,15),J(4),R(),L(5,`span`,16),J(6),R(),L(7,`span`,17),J(8),R(),M(9,ON,2,1,`span`,18),R()),e&2){let e=t.$implicit,n=G(4);k(2),Y(e.name),k(2),Y(e.route||`/`),k(2),X(``,n.plural(e.navigations,`navigation`),` ago`),k(2),Y(n.ageOf(e)),k(),N(e.subscriptions?9:-1)}}function AN(e,t){if(e&1&&(L(0,`p`,6),J(1),R(),L(2,`ul`,12),P(3,kN,10,5,`li`,13,TN),R()),e&2){let e=G(3);k(),Z(` Destroyed, yet still in memory after at least `,e.minNavigations,` navigations and `,e.minSeconds,` seconds. Take a heap snapshot, search for the class and read its retainers. `),k(2),F(e.retained().slice(0,e.shown))}}function jN(e,t){e&1&&(L(0,`p`,6),J(1,`No destroyed component is still in memory after a few navigations.`),R())}function MN(e,t){if(e&1&&(L(0,`p`,6),J(1),L(2,`span`,19),J(3),R(),J(4,`. Navigate a few times to see whether they stay. `),R()),e&2){let e=G(3);k(),X(` `,e.plural(e.recent().length,`instance`),` destroyed recently and not collected yet: `),k(2),Y(e.names(e.recent()))}}function NN(e,t){if(e&1&&(M(0,DN,2,0,`p`,6),L(1,`p`,11),J(2),R(),L(3,`h3`,7),J(4,` Still retained `),L(5,`span`,8),J(6),R()(),M(7,AN,5,2)(8,jN,2,0,`p`,6),M(9,MN,5,2,`p`,6)),e&2){let e=G(),t=G();N(e.support.retention?-1:0),k(2),rv(` `,t.plural(e.navigations,`navigation`),` · `,t.retained().length,` still retained · `,t.plural(e.totals.collected,`instance`),` collected `),k(4),Y(t.retained().length),k(),N(t.retained().length?7:8),k(2),N(t.recent().length?9:-1)}}function PN(e,t){if(e&1&&(L(0,`p`,6),J(1,` Off the page but not destroyed (detached views, such as a route reuse cache): `),L(2,`span`,19),J(3),R(),J(4,`. `),R()),e&2){let e=G(2);k(3),Y(e.names(e.detached()))}}function FN(e,t){if(e&1&&(L(0,`span`,8),J(1),R()),e&2){let e=G();k(),Y(e.subscriptions.length)}}function IN(e,t){if(e&1&&(L(0,`span`,15),J(1),R()),e&2){let e=G().$implicit;k(),Y(e.source)}}function LN(e,t){if(e&1&&(L(0,`li`,13)(1,`span`,14),J(2),R(),L(3,`span`,16),J(4),R(),L(5,`span`,18),J(6),R(),M(7,IN,2,1,`span`,15),R()),e&2){let e=t.$implicit;k(2),Y(e.name),k(2),X(``,e.count,` open`),k(2),X(` `,e.reason===`instance-destroyed`?`instance destroyed`:`no instance left`,` `),k(),N(e.source?7:-1)}}function RN(e,t){if(e&1&&(L(0,`p`,6),J(1,` Still open although the component that made them is gone. Tear them down with takeUntilDestroyed(), DestroyRef.onDestroy or the async pipe. `),R(),L(2,`ul`,12),P(3,LN,8,4,`li`,13,kg),R()),e&2){let e=G(2),t=G();k(3),F(e.subscriptions.slice(0,t.shown))}}function zN(e,t){e&1&&(L(0,`p`,6),J(1,`No subscription is still open after its component went away.`),R())}function BN(e,t){e&1&&(L(0,`p`,6),J(1,` Subscriptions are tied to component classes only; Angular 20 profiler hooks tie them to instances. `),R())}function VN(e,t){if(e&1&&(M(0,RN,5,0)(1,zN,2,0,`p`,6),M(2,BN,2,0,`p`,6)),e&2){let e=G();N(+!e.subscriptions.length),k(2),N(e.support.instances?-1:2)}}function HN(e,t){e&1&&(L(0,`p`,9),J(1,` Tracking could not start: the page has no RxJS the overlay can load. `),R())}function UN(e,t){e&1&&(L(0,`p`,6),J(1,` Off. Track subscriptions wraps Observable.prototype.subscribe on the page to record which component makes each subscription, until you stop it. Subscriptions made before you start are not seen, so reload or navigate again after starting. `),R())}function WN(e,t){e&1&&z(0,`app-angular-unavailable`,10),e&2&&I(`page`,G(2).angular())}function GN(e,t){if(e&1&&(L(0,`span`,16),J(1),R()),e&2){let e=G().$implicit,t=G(3);k(),Y(t.plural(e.subscriptions,`subscription`))}}function KN(e,t){if(e&1){let e=H();L(0,`li`)(1,`button`,20),U(`click`,function(){let t=T(e).$implicit;return E(G(3).showComponent.emit(t.id))})(`focus`,function(){let t=T(e).$implicit;return E(G(3).highlight.emit(t.id))})(`blur`,function(){return T(e),E(G(3).highlight.emit(null))})(`mouseenter`,function(){let t=T(e).$implicit;return E(G(3).highlight.emit(t.id))})(`mouseleave`,function(){return T(e),E(G(3).highlight.emit(null))}),L(2,`span`,14),J(3),R(),L(4,`span`,16),J(5),R(),M(6,GN,2,1,`span`,16),R()()}if(e&2){let e=t.$implicit,n=G(2),r=G();k(3),Y(e.name),k(2),Y(r.effectsText(e)),k(),N(n.support.subscriptions===`on`?6:-1)}}function qN(e,t){e&1&&(L(0,`p`,6),J(1,` Angular files a component's effects under the template its host sits in, so effects of components side by side in one template show as shared. `),R())}function JN(e,t){if(e&1&&(L(0,`ul`,12),P(1,KN,7,3,`li`,null,TN),R(),M(3,qN,2,0,`p`,6)),e&2){let e=G(),t=G();k(),F(e.components.slice(0,t.shown)),k(2),N(e.components.some(t.hasShared)?3:-1)}}function YN(e,t){e&1&&(L(0,`p`,6),J(1,`No component on the page has a live effect or a tracked subscription.`),R())}function XN(e,t){if(e&1&&(M(0,EN,6,1)(1,NN,10,7),M(2,PN,5,1,`p`,6),L(3,`h3`,7),J(4,` Open subscriptions after destroy `),M(5,FN,2,1,`span`,8),R(),M(6,VN,3,2)(7,HN,2,0,`p`,9)(8,UN,2,0,`p`,6),L(9,`h3`,7),J(10,` Live effects and subscriptions `),L(11,`span`,8),J(12),R()(),M(13,WN,1,1,`app-angular-unavailable`,10),M(14,JN,4,1)(15,YN,2,0,`p`,6)),e&2){let e,n=t,r=G();N(n.support.retention===`dev-di-debug`?0:1),k(2),N(r.detached().length?2:-1),k(3),N(n.support.subscriptions===`on`?5:-1),k(),N((e=n.support.subscriptions)===`on`?6:e===`unavailable`?7:8),k(6),Y(n.components.length),k(),N(n.support.effects?-1:13),k(),N(n.components.length?14:15)}}function ZN(e,t){e&1&&(L(0,`p`,6),J(1,`No leak data from this page yet. It comes with the next report.`),R())}var QN=20;function $N(e){let t=Math.max(0,Math.round(e/1e3));if(t<120)return`${t} s`;let n=Math.round(t/60);return n<120?`${n} min`:`${Math.round(n/60)} h`}var eP=(e,t,n=`${t}s`)=>`${e} ${e===1?t:n}`,tP=class e{report=$(null);pageId=$(null);rpc=$(null);angular=$(null);now=$(()=>Date.now());showComponent=Rv();highlight=Rv();shown=QN;minNavigations=2;minSeconds=nE/1e3;plural=eP;busy=O(!1);announcement=O(``);tracking=Q(()=>this.report()?.support.subscriptions===`on`);split=Q(()=>{let e=this.report(),t=[],n=[],r=[];if(!e)return{retained:t,recent:n,detached:r};let i=e.support.retention===`dev-di-debug`;for(let a of e.destroyed)if(a.detached)r.push(a);else if(i)continue;else this.isRetained(e,a)?t.push(a):n.push(a);return{retained:t,recent:n,detached:r}});retained=Q(()=>this.split().retained);recent=Q(()=>this.split().recent);detached=Q(()=>this.split().detached);ageMs(e,t){return Math.max(0,this.now()()-e.reportedAt+(e.at-t.destroyedAt))}isRetained(e,t){return t.navigations>=2&&this.ageMs(e,t)>=1e4}ageOf(e){let t=this.report();return t?`${$N(this.ageMs(t,e))} old`:``}names(e){let t=[...new Set(e.map(e=>e.name))];return t.length>6?`${t.slice(0,6).join(`, `)} and more`:t.join(`, `)}hasShared(e){return!!e.sharedEffects}effectsText(e){let t=eP(e.effects,`effect`);return e.sharedEffects?`${t}, ${e.sharedEffects} shared`:t}async toggle(){let e=this.pageId();if(!e||this.busy())return;let t=!this.tracking();this.busy.set(!0);try{await VE(this.rpc(),`request-leak-tracking`,{pageId:e,on:t}),this.announcement.set(t?`Tracking subscriptions. Reload or navigate to see subscriptions made at start.`:`Stopped tracking subscriptions.`)}catch{this.announcement.set(`Could not reach the page. Try again.`)}finally{this.busy.set(!1)}}static ɵfac=function(t){return new(t||e)};static ɵcmp=A({type:e,selectors:[[`app-leaks-section`]],inputs:{report:[1,`report`],pageId:[1,`pageId`],rpc:[1,`rpc`],angular:[1,`angular`],now:[1,`now`]},outputs:{showComponent:`showComponent`,highlight:`highlight`},decls:12,vars:5,consts:[[`aria-labelledby`,`ct-leaks-title`,1,`leaks`],[1,`head`],[`id`,`ct-leaks-title`],[`type`,`button`,1,`track`,3,`click`,`disabled`],[`role`,`status`,1,`sr-only`],[1,`hint`],[1,`note`],[1,`sub`],[1,`pill`],[`role`,`status`,1,`note`],[`capability`,`signalGraph`,`missing`,``,`compact`,``,3,`page`],[1,`stats`],[1,`rows`],[1,`row`],[1,`name`,`mono`],[1,`meta`,`mono`],[1,`count`],[1,`meta`],[1,`flag`,`warn`],[1,`mono`],[`type`,`button`,1,`row`,`live`,3,`click`,`focus`,`blur`,`mouseenter`,`mouseleave`]],template:function(e,t){if(e&1&&(L(0,`section`,0)(1,`div`,1)(2,`h2`,2),J(3,`Leaks`),R(),L(4,`button`,3),U(`click`,function(){return t.toggle()}),J(5,` Track subscriptions `),R(),L(6,`p`,4),J(7),R()(),L(8,`p`,5),J(9,` Components that left the page but are still in memory, and the live effects and RxJS subscriptions of each component. The browser collects garbage when it decides, so a retained instance is a hint: check what holds it in the Chrome DevTools Memory panel. `),R(),M(10,XN,16,7)(11,ZN,2,0,`p`,6),R()),e&2){let e;k(4),I(`disabled`,!t.pageId()||!t.report()),j(`aria-pressed`,t.tracking())(`aria-disabled`,t.busy()||null),k(3),Y(t.announcement()),k(3),N((e=t.report())?10:11,e)}},dependencies:[hO],styles:[`[_nghost-%COMP%] { +}`]})},EN=(e,t)=>t.id;function DN(e,t){if(e&1&&(L(0,`p`,11),J(1),R(),L(2,`h3`,7),J(3,`Still retained`),R(),L(4,`p`,6),J(5,` In a development build, Angular's DI debug data keeps every destroyed component in memory, so Pangular can't tell a leak from that. Check retainers in the Chrome DevTools Memory panel: take a heap snapshot after a few navigations, search for the class and look for a retainer other than Angular's DI debug records. Open subscriptions after destroy are still tracked below. `),R()),e&2){let e=G(),t=G();k(),Y(t.plural(e.navigations,`navigation`))}}function ON(e,t){e&1&&(L(0,`p`,6),J(1,` This page cannot track destroyed components. It needs WeakRef, FinalizationRegistry and the Angular debug API of a development build. `),R())}function kN(e,t){if(e&1&&(L(0,`span`,18),J(1),R()),e&2){let e=G().$implicit,t=G(4);k(),Y(t.plural(e.subscriptions,`open subscription`))}}function AN(e,t){if(e&1&&(L(0,`li`,13)(1,`span`,14),J(2),R(),L(3,`span`,15),J(4),R(),L(5,`span`,16),J(6),R(),L(7,`span`,17),J(8),R(),M(9,kN,2,1,`span`,18),R()),e&2){let e=t.$implicit,n=G(4);k(2),Y(e.name),k(2),Y(e.route||`/`),k(2),X(``,n.plural(e.navigations,`navigation`),` ago`),k(2),Y(n.ageOf(e)),k(),N(e.subscriptions?9:-1)}}function jN(e,t){if(e&1&&(L(0,`p`,6),J(1),R(),L(2,`ul`,12),P(3,AN,10,5,`li`,13,EN),R()),e&2){let e=G(3);k(),Z(` Destroyed, yet still in memory after at least `,e.minNavigations,` navigations and `,e.minSeconds,` seconds. Take a heap snapshot, search for the class and read its retainers. `),k(2),F(e.retained().slice(0,e.shown))}}function MN(e,t){e&1&&(L(0,`p`,6),J(1,`No destroyed component is still in memory after a few navigations.`),R())}function NN(e,t){if(e&1&&(L(0,`p`,6),J(1),L(2,`span`,19),J(3),R(),J(4,`. Navigate a few times to see whether they stay. `),R()),e&2){let e=G(3);k(),X(` `,e.plural(e.recent().length,`instance`),` destroyed recently and not collected yet: `),k(2),Y(e.names(e.recent()))}}function PN(e,t){if(e&1&&(M(0,ON,2,0,`p`,6),L(1,`p`,11),J(2),R(),L(3,`h3`,7),J(4,` Still retained `),L(5,`span`,8),J(6),R()(),M(7,jN,5,2)(8,MN,2,0,`p`,6),M(9,NN,5,2,`p`,6)),e&2){let e=G(),t=G();N(e.support.retention?-1:0),k(2),rv(` `,t.plural(e.navigations,`navigation`),` · `,t.retained().length,` still retained · `,t.plural(e.totals.collected,`instance`),` collected `),k(4),Y(t.retained().length),k(),N(t.retained().length?7:8),k(2),N(t.recent().length?9:-1)}}function FN(e,t){if(e&1&&(L(0,`p`,6),J(1,` Off the page but not destroyed (detached views, such as a route reuse cache): `),L(2,`span`,19),J(3),R(),J(4,`. `),R()),e&2){let e=G(2);k(3),Y(e.names(e.detached()))}}function IN(e,t){if(e&1&&(L(0,`span`,8),J(1),R()),e&2){let e=G();k(),Y(e.subscriptions.length)}}function LN(e,t){if(e&1&&(L(0,`span`,15),J(1),R()),e&2){let e=G().$implicit;k(),Y(e.source)}}function RN(e,t){if(e&1&&(L(0,`li`,13)(1,`span`,14),J(2),R(),L(3,`span`,16),J(4),R(),L(5,`span`,18),J(6),R(),M(7,LN,2,1,`span`,15),R()),e&2){let e=t.$implicit;k(2),Y(e.name),k(2),X(``,e.count,` open`),k(2),X(` `,e.reason===`instance-destroyed`?`instance destroyed`:`no instance left`,` `),k(),N(e.source?7:-1)}}function zN(e,t){if(e&1&&(L(0,`p`,6),J(1,` Still open although the component that made them is gone. Tear them down with takeUntilDestroyed(), DestroyRef.onDestroy or the async pipe. `),R(),L(2,`ul`,12),P(3,RN,8,4,`li`,13,kg),R()),e&2){let e=G(2),t=G();k(3),F(e.subscriptions.slice(0,t.shown))}}function BN(e,t){e&1&&(L(0,`p`,6),J(1,`No subscription is still open after its component went away.`),R())}function VN(e,t){e&1&&(L(0,`p`,6),J(1,` Subscriptions are tied to component classes only; Angular 20 profiler hooks tie them to instances. `),R())}function HN(e,t){if(e&1&&(M(0,zN,5,0)(1,BN,2,0,`p`,6),M(2,VN,2,0,`p`,6)),e&2){let e=G();N(+!e.subscriptions.length),k(2),N(e.support.instances?-1:2)}}function UN(e,t){e&1&&(L(0,`p`,9),J(1,` Tracking could not start: the page has no RxJS the overlay can load. `),R())}function WN(e,t){e&1&&(L(0,`p`,6),J(1,` Off. Track subscriptions wraps Observable.prototype.subscribe on the page to record which component makes each subscription, until you stop it. Subscriptions made before you start are not seen, so reload or navigate again after starting. `),R())}function GN(e,t){e&1&&z(0,`app-angular-unavailable`,10),e&2&&I(`page`,G(2).angular())}function KN(e,t){if(e&1&&(L(0,`span`,16),J(1),R()),e&2){let e=G().$implicit,t=G(3);k(),Y(t.plural(e.subscriptions,`subscription`))}}function qN(e,t){if(e&1){let e=H();L(0,`li`)(1,`button`,20),U(`click`,function(){let t=T(e).$implicit;return E(G(3).showComponent.emit(t.id))})(`focus`,function(){let t=T(e).$implicit;return E(G(3).highlight.emit(t.id))})(`blur`,function(){return T(e),E(G(3).highlight.emit(null))})(`mouseenter`,function(){let t=T(e).$implicit;return E(G(3).highlight.emit(t.id))})(`mouseleave`,function(){return T(e),E(G(3).highlight.emit(null))}),L(2,`span`,14),J(3),R(),L(4,`span`,16),J(5),R(),M(6,KN,2,1,`span`,16),R()()}if(e&2){let e=t.$implicit,n=G(2),r=G();k(3),Y(e.name),k(2),Y(r.effectsText(e)),k(),N(n.support.subscriptions===`on`?6:-1)}}function JN(e,t){e&1&&(L(0,`p`,6),J(1,` Angular files a component's effects under the template its host sits in, so effects of components side by side in one template show as shared. `),R())}function YN(e,t){if(e&1&&(L(0,`ul`,12),P(1,qN,7,3,`li`,null,EN),R(),M(3,JN,2,0,`p`,6)),e&2){let e=G(),t=G();k(),F(e.components.slice(0,t.shown)),k(2),N(e.components.some(t.hasShared)?3:-1)}}function XN(e,t){e&1&&(L(0,`p`,6),J(1,`No component on the page has a live effect or a tracked subscription.`),R())}function ZN(e,t){if(e&1&&(M(0,DN,6,1)(1,PN,10,7),M(2,FN,5,1,`p`,6),L(3,`h3`,7),J(4,` Open subscriptions after destroy `),M(5,IN,2,1,`span`,8),R(),M(6,HN,3,2)(7,UN,2,0,`p`,9)(8,WN,2,0,`p`,6),L(9,`h3`,7),J(10,` Live effects and subscriptions `),L(11,`span`,8),J(12),R()(),M(13,GN,1,1,`app-angular-unavailable`,10),M(14,YN,4,1)(15,XN,2,0,`p`,6)),e&2){let e,n=t,r=G();N(n.support.retention===`dev-di-debug`?0:1),k(2),N(r.detached().length?2:-1),k(3),N(n.support.subscriptions===`on`?5:-1),k(),N((e=n.support.subscriptions)===`on`?6:e===`unavailable`?7:8),k(6),Y(n.components.length),k(),N(n.support.effects?-1:13),k(),N(n.components.length?14:15)}}function QN(e,t){e&1&&(L(0,`p`,6),J(1,`No leak data from this page yet. It comes with the next report.`),R())}var $N=20;function eP(e){let t=Math.max(0,Math.round(e/1e3));if(t<120)return`${t} s`;let n=Math.round(t/60);return n<120?`${n} min`:`${Math.round(n/60)} h`}var tP=(e,t,n=`${t}s`)=>`${e} ${e===1?t:n}`,nP=class e{report=$(null);pageId=$(null);rpc=$(null);angular=$(null);now=$(()=>Date.now());showComponent=Rv();highlight=Rv();shown=$N;minNavigations=2;minSeconds=nE/1e3;plural=tP;busy=O(!1);announcement=O(``);tracking=Q(()=>this.report()?.support.subscriptions===`on`);split=Q(()=>{let e=this.report(),t=[],n=[],r=[];if(!e)return{retained:t,recent:n,detached:r};let i=e.support.retention===`dev-di-debug`;for(let a of e.destroyed)if(a.detached)r.push(a);else if(i)continue;else this.isRetained(e,a)?t.push(a):n.push(a);return{retained:t,recent:n,detached:r}});retained=Q(()=>this.split().retained);recent=Q(()=>this.split().recent);detached=Q(()=>this.split().detached);ageMs(e,t){return Math.max(0,this.now()()-e.reportedAt+(e.at-t.destroyedAt))}isRetained(e,t){return t.navigations>=2&&this.ageMs(e,t)>=1e4}ageOf(e){let t=this.report();return t?`${eP(this.ageMs(t,e))} old`:``}names(e){let t=[...new Set(e.map(e=>e.name))];return t.length>6?`${t.slice(0,6).join(`, `)} and more`:t.join(`, `)}hasShared(e){return!!e.sharedEffects}effectsText(e){let t=tP(e.effects,`effect`);return e.sharedEffects?`${t}, ${e.sharedEffects} shared`:t}async toggle(){let e=this.pageId();if(!e||this.busy())return;let t=!this.tracking();this.busy.set(!0);try{await VE(this.rpc(),`request-leak-tracking`,{pageId:e,on:t}),this.announcement.set(t?`Tracking subscriptions. Reload or navigate to see subscriptions made at start.`:`Stopped tracking subscriptions.`)}catch{this.announcement.set(`Could not reach the page. Try again.`)}finally{this.busy.set(!1)}}static ɵfac=function(t){return new(t||e)};static ɵcmp=A({type:e,selectors:[[`app-leaks-section`]],inputs:{report:[1,`report`],pageId:[1,`pageId`],rpc:[1,`rpc`],angular:[1,`angular`],now:[1,`now`]},outputs:{showComponent:`showComponent`,highlight:`highlight`},decls:12,vars:5,consts:[[`aria-labelledby`,`ct-leaks-title`,1,`leaks`],[1,`head`],[`id`,`ct-leaks-title`],[`type`,`button`,1,`track`,3,`click`,`disabled`],[`role`,`status`,1,`sr-only`],[1,`hint`],[1,`note`],[1,`sub`],[1,`pill`],[`role`,`status`,1,`note`],[`capability`,`signalGraph`,`missing`,``,`compact`,``,3,`page`],[1,`stats`],[1,`rows`],[1,`row`],[1,`name`,`mono`],[1,`meta`,`mono`],[1,`count`],[1,`meta`],[1,`flag`,`warn`],[1,`mono`],[`type`,`button`,1,`row`,`live`,3,`click`,`focus`,`blur`,`mouseenter`,`mouseleave`]],template:function(e,t){if(e&1&&(L(0,`section`,0)(1,`div`,1)(2,`h2`,2),J(3,`Leaks`),R(),L(4,`button`,3),U(`click`,function(){return t.toggle()}),J(5,` Track subscriptions `),R(),L(6,`p`,4),J(7),R()(),L(8,`p`,5),J(9,` Components that left the page but are still in memory, and the live effects and RxJS subscriptions of each component. The browser collects garbage when it decides, so a retained instance is a hint: check what holds it in the Chrome DevTools Memory panel. `),R(),M(10,ZN,16,7)(11,QN,2,0,`p`,6),R()),e&2){let e;k(4),I(`disabled`,!t.pageId()||!t.report()),j(`aria-pressed`,t.tracking())(`aria-disabled`,t.busy()||null),k(3),Y(t.announcement()),k(3),N((e=t.report())?10:11,e)}},dependencies:[gO],styles:[`[_nghost-%COMP%] { display: block; } @@ -2385,7 +2385,7 @@ h2[_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); -}`]})},nP=12,rP=900;function iP(e){for(let t=e.parentElement;t;t=t.parentElement){let e=getComputedStyle(t);if(/(auto|scroll|overlay)/.test(e.overflowY))return t}return null}var aP=class{options;injector=C(Ts);visibleTop=O(0);viewport=O(rP);rowHeight;host=null;scroller=null;detach=null;enabled;range;padTop;padBottom;constructor(e){this.options=e,this.rowHeight=O(e.estimate);let t=e.min??300;this.enabled=Q(()=>e.count()>t),this.range=Q(()=>{let t=e.count();if(!this.enabled())return{start:0,end:t};let n=this.rowHeight(),r=this.viewport(),i=Math.max(0,Math.min(this.visibleTop(),t*n-r)),a=Math.max(0,Math.min(t-1,Math.floor(i/n)-nP));return{start:a,end:Math.min(t,Math.max(a,Math.ceil((i+r)/n)+nP))}}),this.padTop=Q(()=>this.enabled()?this.range().start*this.rowHeight():0),this.padBottom=Q(()=>this.enabled()?(e.count()-this.range().end)*this.rowHeight():0),mc(()=>{e.count(),Hd(()=>this.update(),{injector:this.injector})}),C(Ds).onDestroy(()=>this.detach?.())}get count(){return this.options.count()}rendered(e){let{start:t,end:n}=this.range();return e>=t&&ethis.update();n.addEventListener(`scroll`,r,{passive:!0}),window.addEventListener(`resize`,r),this.detach=()=>{n.removeEventListener(`scroll`,r),window.removeEventListener(`resize`,r)},this.update()}update(){let e=this.host;if(e){if(this.scroller===e)this.place(e.scrollTop,e.clientHeight);else{let t=this.scroller?this.scroller.getBoundingClientRect().top:0,n=this.scroller?this.scroller.clientHeight:window.innerHeight;this.place(t-e.getBoundingClientRect().top,n)}this.options.fixed||this.measure()}}place(e,t){this.visibleTop.set(e),this.viewport.set(t>0?t:rP)}measure(){let e=this.host?.querySelectorAll(`[data-vindex]`);if(!e||e.length<2)return;let t=e[0].getBoundingClientRect(),n=(e[e.length-1].getBoundingClientRect().bottom-t.top)/e.length;n>4&&Math.abs(n-this.rowHeight())>1&&this.rowHeight.set(n)}reveal(e,t){if(this.enabled()&&!this.rendered(e)){let t=e*this.rowHeight(),n=this.viewport(),r=Math.max(0,t-n/2);if(this.place(r,n),this.host&&this.scroller===this.host)this.host.scrollTop=r;else if(this.host){let e=this.scroller?this.scroller.getBoundingClientRect().top:0,t=this.host.getBoundingClientRect().top-e+r;this.scroller?this.scroller.scrollTop+=t:window.scrollBy(0,t)}}t&&Hd(t,{injector:this.injector})}};function oP(e){let t=e.ownerDocument.defaultView;if(!t)return null;for(let n=e.parentElement;n&&n!==e.ownerDocument.documentElement&&n!==e.ownerDocument.body;n=n.parentElement)if(/(auto|scroll|overlay)/.test(t.getComputedStyle(n).overflowY))return n;return null}var sP=e=>{let t=parseFloat(e);return Number.isFinite(t)?t:0};function cP(e,t=8){let n=e.ownerDocument.defaultView;if(!n)return e.offsetHeight+t;let r=oP(e),i=r?n.getComputedStyle(r):null,a=i?sP(i.paddingTop):0,o=i?sP(i.scrollPaddingTop):0,s=sP(n.getComputedStyle(e).top);return Math.max(0,Math.ceil(a+s+e.offsetHeight+t-o))}function lP(e,t,n=8){let r=oP(e),i=t.getBoundingClientRect().bottom+n-e.getBoundingClientRect().top;i<=0||(r?r.scrollTop-=i:e.ownerDocument.defaultView?.scrollBy(0,-i))}var uP=[`filterInput`],dP=[`treeEl`],fP=[`propFilterInput`],pP=()=>[],mP=e=>({kind:`component`,id:e}),hP=(e,t)=>t.row.node.id,gP=(e,t)=>t.outlet+t.route,_P=(e,t)=>t+e,vP=(e,t)=>t.formId,yP=(e,t)=>t.name+t.index,bP=(e,t)=>t.name,xP=(e,t)=>t.token+e,SP=(e,t)=>t.id;function CP(e,t){return this.sourceKey(t)}function wP(e,t){if(e&1){let e=H();L(0,`span`,35),J(1,`Page`),R(),L(2,`app-select`,36),U(`valueChange`,function(t){return T(e),E(G(2).selectPage(t))}),R()}if(e&2){let e=G(2);k(2),I(`options`,e.pageOptions())(`value`,e.page()?.pageId??null)}}function TP(e,t){if(e&1){let e=H();L(0,`button`,37),U(`click`,function(){return T(e),E(G(2).toggleDirectiveHosts())}),D(),L(1,`svg`,14),z(2,`path`,38)(3,`path`,39),R(),J(4,` Directive hosts `),R()}e&2&&j(`aria-pressed`,G(2).showDirectiveHosts())}function EP(e,t){if(e&1){let e=H();L(0,`button`,40),U(`click`,function(){T(e);let t=G(2);return E(t.picking()?t.cancelPick():t.pick())}),D(),L(1,`svg`,14),z(2,`path`,41),R(),J(3),R()}if(e&2){let e=G(2);q(`on`,e.picking()),k(3),X(` `,e.picking()?`Cancel pick`:`Pick component on page`,` `)}}function DP(e,t){if(e&1&&(L(0,`p`,21),J(1),R()),e&2){let e=G(2);k(),Y(e.pickMessage())}}function OP(e,t){if(e&1&&(L(0,`p`,22),J(1),R()),e&2){let e=G(2);k(),Y(e.truncationText())}}function kP(e,t){e&1&&(L(0,`p`,43),J(1,`The filter only searches the components the tree lists.`),R())}function AP(e,t){e&1&&(L(0,`p`,43),J(1,`Directive hosts are hidden, so they are not searched.`),R())}function jP(e,t){if(e&1){let e=H();L(0,`div`,25)(1,`p`,42),J(2),R(),M(3,kP,2,0,`p`,43),M(4,AP,2,0,`p`,43),L(5,`button`,44),U(`click`,function(){return T(e),E(G(2).clearFilter())}),J(6,`Clear filter`),R()()}if(e&2){let e=G(2);k(2),X(`No components match “`,e.filter().trim(),`”`),k(),N(e.page().truncated?3:-1),k(),N(!e.showDirectiveHosts()&&e.page().directiveHostCount?4:-1)}}function MP(e,t){if(e&1&&(L(0,`p`,26),J(1),R()),e&2){let e=G(2);k(),X(` `,e.rows().length,` rows. Rows render as you scroll, so the browser's find only sees the ones near view; the filter above searches them all. `)}}function NP(e,t){if(e&1){let e=H();L(0,`span`,52),U(`click`,function(t){T(e),G();let n=fv(0);return E(G(2).toggle(n.node.id,t))}),D(),L(1,`svg`,53),z(2,`path`,54),R()()}e&2&&(G(),q(`open`,fv(0).expanded))}function PP(e,t){e&1&&z(0,`span`,47)}function FP(e,t){if(e&1&&(L(0,`span`,55),J(1),R(),L(2,`span`,56),J(3),R(),L(4,`span`,24),J(5,`directive host`),R()),e&2){G();let e=fv(0),t=G(2);k(),X(`<`,e.node.tag,`>`),k(),j(`title`,e.node.directives?.join(`, `)),k(),Y(t.hostLabel(e.node))}}function IP(e,t){if(e&1&&(L(0,`span`,57),J(1),R(),L(2,`span`,58),J(3),R()),e&2){G();let e=fv(0);k(),Y(e.node.name),k(2),X(`<`,e.node.tag,`>`)}}function LP(e,t){if(e&1&&(L(0,`span`)(1,`span`,24),J(2,`Hydration: `),R(),J(3),R()),e&2){let e=t,n=G(3);M_(`hyd hyd-`+e),k(3),Y(n.hydrationText(e))}}function RP(e,t){if(e&1&&(L(0,`span`,49),J(1),R()),e&2){let e=t.$implicit;k(),Y(e.route||`/`)}}function zP(e,t){if(e&1&&(L(0,`span`,50),J(1),L(2,`span`,24),J(3),R()()),e&2){let e=t;k(),X(` `,e),k(2),X(` `,e===1?`check`:`checks`,` while recording`)}}function BP(e,t){if(e&1&&(L(0,`span`,51),J(1),L(2,`span`,24),J(3),R()()),e&2){G();let e=fv(0);j(`title`,e.node.directives.join(`, `)),k(),X(` +`,e.node.directives.length,` `),k(2),X(` `,e.node.directives.length===1?`directive`:`directives`,` `)}}function VP(e,t){if(e&1){let e=H();uv(0),L(1,`div`,45),U(`click`,function(){T(e);let t=fv(0);return E(G(2).select(t.node.id))})(`focus`,function(){T(e);let t=fv(0),n=G(2);return n.focusId.set(t.node.id),E(n.highlight(t.node.id))})(`blur`,function(){return T(e),E(G(2).highlight(null))})(`mouseenter`,function(){T(e);let t=fv(0);return E(G(2).highlight(t.node.id))})(`mouseleave`,function(){return T(e),E(G(2).highlight(null))}),M(2,NP,3,2,`span`,46)(3,PP,1,0,`span`,47),M(4,FP,6,3)(5,IP,4,2),M(6,LP,4,3,`span`,48),P(7,RP,2,1,`span`,49,gP),M(9,zP,4,2,`span`,50),M(10,BP,4,3,`span`,51),R()}if(e&2){let e,n,r=t.$implicit,i=G(2),a=dv(r.row);k(),K(`--%NS%depth`,a.depth),q(`selected`,i.selectedId()===a.node.id)(`dir-host`,a.node.kind===`directive`),j(`aria-level`,a.depth+1)(`aria-setsize`,a.setsize)(`aria-posinset`,a.posinset)(`aria-expanded`,a.hasChildren?a.expanded:null)(`aria-selected`,i.selectedId()===a.node.id)(`tabindex`,i.tabStop()===a.node.id?0:-1)(`data-vindex`,r.index)(`data-id`,a.node.id),k(),N(a.hasChildren?2:3),k(2),N(a.node.kind===`directive`?4:5),k(2),N((e=a.node.hydration)?6:-1,e),k(),F(i.routedById().get(a.node.id)??mv(20,pP)),k(2),N((n=i.cdHosts()[a.node.id])?9:-1,n),k(),N(a.node.kind!==`directive`&&a.node.directives?.length?10:-1)}}function HP(e,t){if(e&1&&(L(0,`li`,66),J(1),R()),e&2){let e=t.$implicit;k(),Y(e)}}function UP(e,t){if(e&1){let e=H();L(0,`div`,68)(1,`button`,44),U(`click`,function(){let t=T(e);return E(G(3).reveal(t.id,!0))}),J(2),R()()}e&2&&(k(2),X(` Show `,t.name,` `))}function WP(e,t){if(e&1&&(L(0,`section`,29)(1,`header`,59)(2,`span`,60),J(3,`directive host`),R(),L(4,`h2`,61),J(5),R(),L(6,`span`,62),J(7),R()(),L(8,`div`,63)(9,`h3`),J(10,` Directives `),L(11,`span`,64),J(12),R()(),L(13,`ul`,65),P(14,HP,2,1,`li`,66,_P),R()(),L(16,`div`,63)(17,`p`,67),J(18,` This element hosts directives but no component. Their inputs are bound in the template of the component that renders it. `),R(),M(19,UP,3,1,`div`,68),R()()),e&2){let e,n=t,r=G(2);k(5),X(`<`,n.tag,`>`),k(2),Y(r.hostLabel(n)),k(5),Y(n.directives?.length??0),k(2),F(n.directives??mv(4,pP)),k(5),N((e=r.ownerOf(n.id))?19:-1,e)}}function GP(e,t){if(e&1&&(L(0,`p`,69),z(1,`app-source-link`,73),R()),e&2){let e=t;k(),I(`file`,e.file)(`line`,e.line)}}function KP(e,t){if(e&1){let e=H();L(0,`div`,74)(1,`button`,44),U(`click`,function(){T(e);let t=G();return E(G(2).revealInElements(t))}),J(2,`Reveal in Elements`),R(),L(3,`button`,44),U(`click`,function(){T(e);let t=G();return E(G(2).openSource(t))}),J(4,`Open source`),R()(),L(5,`p`,75),J(6),R()}if(e&2){let e=G(3);k(6),Y(e.actionMessage())}}function qP(e,t){if(e&1){let e=H();L(0,`button`,77),U(`click`,function(){let t=T(e).$implicit;return E(G(5).showForm.emit(t.formId))}),J(1),R()}if(e&2){let e=t.$implicit;k(),X(` Show `,e.label,` in Forms `)}}function JP(e,t){if(e&1&&(L(0,`div`,70),P(1,qP,2,1,`button`,76,vP),R()),e&2){let e=G(),t=G(3);k(),F(t.formsIn(e.file))}}function YP(e,t){e&1&&M(0,JP,3,0,`div`,70),e&2&&N(G(3).formsIn(t.file).length?0:-1)}function XP(e,t){if(e&1){let e=H();L(0,`div`,70)(1,`button`,44),U(`click`,function(){T(e);let t=G();return E(G(2).openInjector(t))}),J(2,` Show in Injectors `),L(3,`span`,24),J(4),R()()()}if(e&2){let e=G();k(4),X(`: `,e.name)}}function ZP(e,t){if(e&1&&z(0,`app-store-global`,71),e&2){let e=G(),t=G(2);I(`rpc`,t.rpc())(`pageId`,t.page()?.pageId)(`target`,hv(4,mP,e.id))(`label`,e.name)}}function QP(e,t){if(e&1&&(L(0,`dt`),J(1,`Routed`),R(),L(2,`dd`,79),J(3),R()),e&2){let e=t.$implicit;k(3),Z(``,e.route||`/`,` in outlet `,e.outlet)}}function $P(e,t){if(e&1&&(L(0,`span`,11),J(1),R()),e&2){let e=G(4);k(),Z(``,e.shownValues()?.count??0,` of `,e.valueTotal())}}function eF(e,t){if(e&1){let e=H();L(0,`div`,83)(1,`p`,42),J(2),R(),L(3,`p`,43),J(4,` The filter searches names, and the nested keys of values you opened. `),R(),L(5,`button`,44),U(`click`,function(){return T(e),E(G(5).clearPropFilter())}),J(6,`Clear filter`),R()()}if(e&2){let e=G(5);k(2),X(` No inputs, outputs or properties match “`,e.propFilter().trim(),`” `)}}function tF(e,t){if(e&1&&(L(0,`span`,87),J(1),R()),e&2){let e=G().$implicit;k(),X(`(`,e.prop,`)`)}}function nF(e,t){if(e&1&&(L(0,`li`,85)(1,`span`,86),J(2),M(3,tF,2,1,`span`,87),R(),z(4,`app-value-tree`,88),R()),e&2){let e=t.$implicit,n=G(4),r=G(3);k(2),X(` `,e.name,` `),k(),N(e.prop===e.name?-1:3),k(),I(`prop`,e)(`store`,r.values)(`query`,r.propFilter())(`componentId`,n.id)(`pageId`,r.page()?.pageId??null)(`rpc`,r.rpc())(`writes`,r.canEdit())}}function rF(e,t){if(e&1&&(L(0,`ul`,84),P(1,nF,5,9,`li`,85,bP),R()),e&2){let e=G(2);k(),F(e.inputs)}}function iF(e,t){e&1&&(L(0,`p`,67),J(1,`No inputs.`),R())}function aF(e,t){if(e&1&&(L(0,`div`,63)(1,`h3`),J(2,` Inputs `),L(3,`span`,64),J(4),R()(),M(5,rF,3,0,`ul`,84)(6,iF,2,0,`p`,67),R()),e&2){let e=G();k(4),Y(e.inputs.length),k(),N(e.inputs.length?5:6)}}function oF(e,t){if(e&1&&(L(0,`li`,90)(1,`span`,79),J(2),R(),L(3,`span`,91),J(4),R()()),e&2){let e=t.$implicit;q(`on`,e.listened),k(2),Y(e.name),k(2),Y(e.listened?`listened`:`no listener`)}}function sF(e,t){if(e&1&&(L(0,`ul`,65),P(1,oF,5,4,`li`,89,bP),R()),e&2){let e=G(2);k(),F(e.outputs)}}function cF(e,t){e&1&&(L(0,`p`,67),J(1,`No outputs.`),R())}function lF(e,t){if(e&1&&(L(0,`div`,63)(1,`h3`),J(2,` Outputs `),L(3,`span`,64),J(4),R()(),M(5,sF,3,0,`ul`,65)(6,cF,2,0,`p`,67),R()),e&2){let e=G();k(4),Y(e.outputs.length),k(),N(e.outputs.length?5:6)}}function uF(e,t){if(e&1&&(L(0,`span`,92),J(1),R()),e&2){let e=G().$implicit;k(),Y(e.kind)}}function dF(e,t){if(e&1&&(L(0,`li`,85)(1,`span`,86),J(2),M(3,uF,2,1,`span`,92),R(),z(4,`app-value-tree`,88),R()),e&2){let e=t.$implicit,n=G(4),r=G(3);k(2),X(` `,e.name,` `),k(),N(e.kind?3:-1),k(),I(`prop`,e)(`store`,r.values)(`query`,r.propFilter())(`componentId`,n.id)(`pageId`,r.page()?.pageId??null)(`rpc`,r.rpc())(`writes`,r.canEdit())}}function fF(e,t){if(e&1&&(L(0,`ul`,84),P(1,dF,5,9,`li`,85,bP),R()),e&2){let e=G(2);k(),F(e.properties)}}function pF(e,t){e&1&&(L(0,`p`,67),J(1,`No other properties.`),R())}function mF(e,t){if(e&1&&(L(0,`div`,63)(1,`h3`),J(2,` Properties `),L(3,`span`,64),J(4),R()(),M(5,fF,3,0,`ul`,84)(6,pF,2,0,`p`,67),R()),e&2){let e=G();k(4),Y(e.properties.length),k(),N(e.properties.length?5:6)}}function hF(e,t){if(e&1&&(L(0,`li`,66),J(1),R()),e&2){let e=t.$implicit;k(),Y(e)}}function gF(e,t){if(e&1&&(L(0,`div`,63)(1,`h3`),J(2,` DOM listeners `),L(3,`span`,64),J(4),R()(),L(5,`ul`,65),P(6,hF,2,1,`li`,66,Ag),R()()),e&2){let e=G(2);k(4),Y(e.listeners.length),k(2),F(e.listeners)}}function _F(e,t){if(e&1&&(L(0,`li`,85)(1,`span`,86),J(2),R(),z(3,`app-value-tree`,93),R()),e&2){let e=t.$implicit,n=G(2).$implicit,r=G(2),i=G(3);k(2),Y(e.name),k(),I(`prop`,e)(`store`,i.values)(`query`,i.propFilter())(`directive`,n.index)(`componentId`,r.id)(`pageId`,i.page()?.pageId??null)(`rpc`,i.rpc())}}function vF(e,t){if(e&1&&(L(0,`ul`,84),P(1,_F,4,8,`li`,85,bP),R()),e&2){let e=G().$implicit;k(),F(e.inputs)}}function yF(e,t){if(e&1&&(L(0,`li`,90)(1,`span`,79),J(2),R(),L(3,`span`,91),J(4),R()()),e&2){let e=t.$implicit;q(`on`,e.listened),k(2),Y(e.name),k(2),Y(e.listened?`listened`:`no listener`)}}function bF(e,t){if(e&1&&(L(0,`ul`,65),P(1,yF,5,4,`li`,89,bP),R()),e&2){let e=G().$implicit;k(),F(e.outputs)}}function xF(e,t){e&1&&(L(0,`p`,67),J(1,`No inputs or outputs.`),R())}function SF(e,t){if(e&1&&(L(0,`div`,63)(1,`h3`)(2,`span`,79),J(3),R(),L(4,`span`,92),J(5,`directive on host`),R()(),M(6,vF,3,0,`ul`,84),M(7,bF,3,0,`ul`,65),M(8,xF,2,0,`p`,67),R()),e&2){let e=t.$implicit;k(3),Y(e.name),k(3),N(e.inputs.length?6:-1),k(),N(e.outputs.length?7:-1),k(),N(!e.inputs.length&&!e.outputs.length?8:-1)}}function CF(e,t){if(e&1&&(M(0,eF,7,1,`div`,83),M(1,aF,7,2,`div`,63),M(2,lF,7,2,`div`,63),M(3,mF,7,2,`div`,63),M(4,gF,8,1,`div`,63),P(5,SF,9,4,`div`,63,yP)),e&2){let e=t,n=G(),r=G(3);N(r.propQuery()&&!e.count?0:-1),k(),N(!r.propQuery()||e.inputs.length?1:-1),k(),N(!r.propQuery()||e.outputs.length?2:-1),k(),N(!r.propQuery()||e.properties.length?3:-1),k(),N(!r.propQuery()&&n.listeners.length?4:-1),k(),F(e.directives)}}function wF(e,t){if(e&1&&(L(0,`span`,92),J(1),R()),e&2){let e=t.$implicit;k(),Y(e)}}function TF(e,t){if(e&1&&(L(0,`span`,96),J(1,`from `),L(2,`span`,79),J(3),R()()),e&2){let e=G().$implicit;k(3),Y(e.providedByName??`an injector`)}}function EF(e,t){e&1&&(L(0,`span`,97),J(1,`not provided`),R())}function DF(e,t){if(e&1&&(L(0,`li`,94)(1,`span`,95),J(2),R(),P(3,wF,2,1,`span`,92,Ag),M(5,TF,4,1,`span`,96)(6,EF,2,0,`span`,97),R()),e&2){let e=t.$implicit;k(2),Y(e.token),k(),F(e.flags),k(2),N(e.providedBy?5:6)}}function OF(e,t){if(e&1&&(L(0,`ul`,82),P(1,DF,7,2,`li`,94,xP),R()),e&2){let e=G();k(),F(e.dependencies)}}function kF(e,t){e&1&&(L(0,`p`,67),J(1,`Nothing is injected through the constructor or inject().`),R())}function AF(e,t){if(e&1){let e=H();L(0,`dl`,78)(1,`dt`),J(2,`Change detection`),R(),L(3,`dd`),J(4),R(),L(5,`dt`),J(6,`Encapsulation`),R(),L(7,`dd`),J(8),R(),L(9,`dt`),J(10,`Host path`),R(),L(11,`dd`,79),J(12),R(),P(13,QP,4,2,null,null,gP),R(),L(15,`div`,80)(16,`div`,5),D(),L(17,`svg`,6),z(18,`circle`,7)(19,`path`,8),R(),_s(),L(20,`input`,81,2),U(`input`,function(t){return T(e),E(G(3).propFilter.set(t.target.value))})(`keydown.escape`,function(t){return T(e),E(G(3).clearPropFilter(t))}),R()(),M(22,$P,2,2,`span`,11),L(23,`p`,20),J(24),R()(),M(25,CF,7,5),L(26,`div`,63)(27,`h3`),J(28,` Injected `),L(29,`span`,64),J(30),R()(),M(31,OF,3,0,`ul`,82)(32,kF,2,0,`p`,67),R()}if(e&2){let e,n=t,r=G(),i=G(2);k(4),Y(n.changeDetection??`Unknown`),k(4),Y(n.encapsulation??`Unknown`),k(4),Y(n.path),k(),F(i.routedById().get(r.id)??mv(9,pP)),k(7),I(`value`,i.propFilter()),k(2),N(i.propQuery()?22:-1),k(2),Y(i.propFilterStatus()),k(),N((e=i.shownValues())?25:-1,e),k(5),Y(n.dependencies.length),k(),N(n.dependencies.length?31:32)}}function jF(e,t){e&1&&(L(0,`div`,72),z(1,`span`,98),L(2,`p`,43),J(3,`Reading live values from the page…`),R()())}function MF(e,t){if(e&1&&(L(0,`section`,29)(1,`header`,59)(2,`span`,60),J(3,`component`),R(),L(4,`h2`,61),J(5),R(),L(6,`span`,62),J(7),R(),M(8,GP,2,2,`p`,69),M(9,KP,7,1),M(10,YP,1,1),M(11,XP,5,1,`div`,70),M(12,ZP,1,6,`app-store-global`,71),R(),M(13,AF,33,10)(14,jF,4,0,`div`,72),R()),e&2){let e,n,r,i=t,a=G(2);k(5),Y(i.name),k(2),X(`<`,i.tag,`>`),k(),N((e=a.whereOf(i))?8:-1,e),k(),N(a.devtoolsActions()?9:-1),k(),N((n=a.sourceFor(i))?10:-1,n),k(),N(a.canShowInjector()&&!a.staticReport()?11:-1),k(),N(!a.staticReport()&&!a.native()?12:-1),k(),N((r=a.detail())?13:14,r)}}function NF(e,t){e&1&&(L(0,`p`,42),J(1,`The selected component was destroyed`),R(),L(2,`p`,43)(3,`span`,79),J(4),R(),J(5,` is no longer on the page. Select another component to see its live values. `),R()),e&2&&(k(4),Y(t))}function PF(e,t){e&1&&(L(0,`p`,43),J(1,` Select a component to see its live inputs, properties, outputs, change detection and injected services. `),R())}function FF(e,t){if(e&1&&(L(0,`div`,30),M(1,NF,6,1)(2,PF,2,0,`p`,43),R()),e&2){let e,t=G(2);k(),N((e=t.destroyed())?1:2,e)}}function IF(e,t){e&1&&(L(0,`span`,92),J(1,`hydrate never`),R())}function LF(e,t){if(e&1&&(L(0,`span`,92),J(1),R()),e&2){let e=G().$implicit;k(),Y(e.hydration)}}function RF(e,t){if(e&1){let e=H();L(0,`li`)(1,`button`,101),U(`click`,function(){let t=T(e).$implicit;return E(G(3).showOwner(t))})(`focus`,function(){let t=T(e).$implicit;return E(G(3).highlightBlock(t))})(`blur`,function(){return T(e),E(G(3).highlight(null))})(`mouseenter`,function(){let t=T(e).$implicit;return E(G(3).highlightBlock(t))})(`mouseleave`,function(){return T(e),E(G(3).highlight(null))}),L(2,`span`,57),J(3),R(),L(4,`span`,102),J(5),R(),M(6,IF,2,0,`span`,92)(7,LF,2,1,`span`,92),L(8,`span`,103),J(9),R()()()}if(e&2){let e=t.$implicit;k(),j(`aria-disabled`,e.owner?null:`true`),k(2),Y(e.owner?.name??`Unknown component`),k(),M_(`defer-state-`+e.state),k(),Y(e.state),k(),N(e.hydrateNever?6:e.hydration===`not-configured`?-1:7),k(3),Y(e.triggers.join(`, `)||`no triggers`)}}function zF(e,t){if(e&1&&(L(0,`section`,31)(1,`h2`,99),J(2,` Defer blocks `),L(3,`span`,64),J(4),R()(),L(5,`ul`,100),P(6,RF,10,7,`li`,null,SP),R()()),e&2){let e=G(2);k(4),Y(e.deferCount()),k(2),F(e.deferBlocks())}}function BF(e,t){e&1&&z(0,`app-angular-unavailable`,32),e&2&&I(`page`,G(2).angularPage())}function VF(e,t){if(e&1){let e=H();L(0,`app-hydration-section`,104),U(`overlay`,function(t){return T(e),E(G(2).setHydrationOverlay(t))})(`showNode`,function(t){return T(e),E(G(2).revealNode(t))})(`highlight`,function(t){return T(e),E(G(2).highlight(t))}),R()}e&2&&I(`report`,G(2).page()?.hydration)}function HF(e,t){if(e&1){let e=H();L(0,`app-cd-recording`,105),U(`showComponent`,function(t){return T(e),E(G(2).showCdComponent(t))}),R(),L(1,`app-leaks-section`,106),U(`showComponent`,function(t){return T(e),E(G(2).showLeakComponent(t))})(`highlight`,function(t){return T(e),E(G(2).highlight(t))}),R()}if(e&2){let e=G(2);I(`page`,e.cdPage())(`pageId`,e.page().pageId)(`rpc`,e.rpc()),k(),I(`report`,e.leaksPage())(`pageId`,e.page().pageId)(`rpc`,e.rpc())(`angular`,e.angularPage())}}function UF(e,t){if(e&1){let e=H();L(0,`p`,3),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. `),R(),L(2,`div`,4)(3,`div`,5),D(),L(4,`svg`,6),z(5,`circle`,7)(6,`path`,8),R(),_s(),L(7,`input`,9,0),U(`input`,function(t){return T(e),E(G().setFilter(t.target.value))})(`keydown.escape`,function(){return T(e),E(G().setFilter(``))}),R(),L(9,`span`,10),J(10,` Type plain text, a tag such as