diff --git a/.claude/skills/devtools-docs/SKILL.md b/.claude/skills/devtools-docs/SKILL.md index 55d3a350..0bc97ec4 100644 --- a/.claude/skills/devtools-docs/SKILL.md +++ b/.claude/skills/devtools-docs/SKILL.md @@ -27,7 +27,7 @@ Reviewers reject changes that break these. 1. **No em dashes.** Use a period, comma or parentheses. 2. **No first person** ("we", "our"). 3. **No future tense** ("will"). -4. **No time-relative claims** ("new", "recently", "upcoming", "now supports"). Use a sidebar `status` badge in `ngmd.config.ts` and the changelog instead. +4. **No time-relative claims** ("new", "recently", "upcoming", "now supports"). Use a sidebar `status` badge in `ngmd.config.ts` and the changelog instead. A `new` or `updated` badge needs `until`: the minor after the release that ships the page (`until: '1.2.0'` for a page in 1.1), so it expires. 5. **No comparisons with other devtools products.** Describe this project on its own terms. 6. **No marketing words**: powerful, seamless, blazingly fast, simply, just, easy. 7. **No invented features.** Every name, label, option, default, tool and argument must exist in the code. diff --git a/README.md b/README.md index b07cc2a3..eeea1553 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ npm install -D @pangular-inspector/devtools An Angular SSR server imports the hub when it starts, so install the package as a dependency there (`npm install @pangular-inspector/devtools`). -For an Angular CLI app with SSR, the [quick start](./apps/docs/src/content/getting-started/quick-start.md) takes you from install to a live panel. For other setups, follow the [installation guide](./apps/docs/src/content/getting-started/installation.md): a client-only Angular CLI app, Vite and Analog, the standalone CLI, [Angular Native](./apps/docs/src/content/guides/angular-native.md), or [Capacitor](./apps/docs/src/content/guides/capacitor.md). For a coding agent, run `npx @pangular-inspector/devtools mcp`. +For an Angular CLI app with SSR, the [quick start](./apps/docs/src/content/getting-started/quick-start.md) takes you from install to a live panel. For other setups, follow the [installation guide](./apps/docs/src/content/getting-started/installation.md): a client-only Angular CLI app, Vite and Analog, the standalone CLI, [Angular Native](./apps/docs/src/content/getting-started/angular-native.md), or [Capacitor](./apps/docs/src/content/guides/capacitor.md). For a coding agent, run `npx @pangular-inspector/devtools mcp`. ## Documentation diff --git a/app/src/__tests__/angular-native-view.test.ts b/app/src/__tests__/angular-native-view.test.ts index c6a7a157..ff1043a7 100644 --- a/app/src/__tests__/angular-native-view.test.ts +++ b/app/src/__tests__/angular-native-view.test.ts @@ -101,7 +101,9 @@ describe('Angular Native view', () => { expect(text).toContain('No Angular Native app is connected'); const link = host(fixture).querySelector('a.cta'); expect(link?.textContent).toContain('Set up Angular Native'); - expect(link?.href).toContain('guides/angular-native/'); + expect(link?.href).toContain('getting-started/angular-native/'); + const platforms = host(fixture).querySelector('.platforms a'); + expect(platforms?.href).toBe('https://pangular-inspector.dev/getting-started/platforms/'); expect(tabNames(fixture)).toEqual([]); }); diff --git a/app/src/__tests__/capacitor-view.test.ts b/app/src/__tests__/capacitor-view.test.ts index 05f62e5f..5be65d1e 100644 --- a/app/src/__tests__/capacitor-view.test.ts +++ b/app/src/__tests__/capacitor-view.test.ts @@ -158,6 +158,10 @@ describe('Capacitor view', () => { expect(link?.textContent).toContain('Capacitor setup guide'); expect(link?.href).toBe('https://pangular-inspector.dev/guides/capacitor/'); expect(link?.target).toBe('_blank'); + const platforms = el.querySelector('.platforms a'); + expect(platforms?.textContent).toContain('Supported and planned platforms'); + expect(platforms?.href).toBe('https://pangular-inspector.dev/getting-started/platforms/'); + expect(platforms?.target).toBe('_blank'); expect(el.textContent).not.toContain('Coming Soon'); expect(tabNames(fixture)).toEqual([]); }); diff --git a/app/src/app.ts b/app/src/app.ts index 95c0449a..b8ea7233 100644 --- a/app/src/app.ts +++ b/app/src/app.ts @@ -131,7 +131,7 @@ const NATIVESCRIPT_SETUP: ComingSoonInfo = { ], link: { label: 'NativeScript setup guide', - href: 'https://pangular-inspector.dev/guides/nativescript/', + href: 'https://pangular-inspector.dev/getting-started/nativescript/', }, }; @@ -186,7 +186,7 @@ const NO_ANGULAR_NATIVE: ComingSoonInfo = { ], link: { label: 'Set up Angular Native', - href: 'https://pangular-inspector.dev/guides/angular-native/', + href: 'https://pangular-inspector.dev/getting-started/angular-native/', }, }; diff --git a/app/src/pages/coming-soon.ts b/app/src/pages/coming-soon.ts index 78a52173..444258da 100644 --- a/app/src/pages/coming-soon.ts +++ b/app/src/pages/coming-soon.ts @@ -12,6 +12,9 @@ export interface ComingSoonInfo { link?: { label: string; href: string }; } +/** The docs page that lists the supported platforms and the planned ones, with their issues. */ +export const PLATFORMS_URL = 'https://pangular-inspector.dev/getting-started/platforms/'; + @Component({ selector: 'app-coming-soon', host: { '[style.--brand]': 'info().color' }, @@ -111,6 +114,14 @@ export interface ComingSoonInfo {
  • {{ plan }}
  • } + + @if (info().id !== 'analog') { +

    + Supported and planned platforms (opens in a new tab) +

    + } `, styles: ` @@ -352,6 +363,24 @@ export interface ComingSoonInfo { background: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 20%, transparent); } + .platforms { + width: 100%; + max-width: 440px; + margin: 16px auto 0; + font-size: 13px; + text-align: left; + } + .platforms a { + color: var(--accent-text); + text-decoration: underline; + text-underline-offset: 2px; + } + .platforms a:hover { + color: var(--text-strong); + } + .platforms a:focus-visible { + @include m.focus-ring; + } @media (max-height: 640px) { .soon { padding-top: 12px; @@ -449,6 +478,7 @@ export interface ComingSoonInfo { }) export class ComingSoon { readonly info = input.required(); + protected readonly platformsUrl = PLATFORMS_URL; readonly plansTitle = computed(() => { const info = this.info(); return info.plansTitle ?? (info.link ? `In an ${info.name} app` : 'On the roadmap'); diff --git a/apps/docs/agent-tool-index.spec.ts b/apps/docs/agent-tool-index.spec.ts new file mode 100644 index 00000000..321324fa --- /dev/null +++ b/apps/docs/agent-tool-index.spec.ts @@ -0,0 +1,47 @@ +import {readFileSync} from 'node:fs'; +import {join} from 'node:path'; +import * as prettier from 'prettier'; +import {TOOL_INDEX_PATH, findSection, renderToolIndex} from './agent-tool-index'; + +const docsRoot = import.meta.dirname; + +describe('agent tool index', () => { + it('names every agent tool and resource in tools.md or resources.md', () => { + expect(renderToolIndex(docsRoot).problems).toEqual([]); + }); + + it('matches the page in the repository; run pnpm docs:agent-tools when it fails', async () => { + const file = join(docsRoot, TOOL_INDEX_PATH); + const options = (await prettier.resolveConfig(file)) ?? {}; + const expected = await prettier.format(renderToolIndex(docsRoot).markdown, { + ...options, + filepath: file, + }); + expect(readFileSync(file, 'utf8')).toBe(expected); + }, 30_000); + + it('links a tool to its own heading, then to the table that defines it', () => { + const markdown = [ + '## Before you call a tool', + 'Use `explain-field` and `explain-form-changes`.', + '## Forms', + '### Read', + '| Tool | What it answers |', + '| --- | --- |', + '| `explain-field` | One field |', + '', + '| Tool | Cap |', + '| --- | --- |', + '| `explain-form-changes` | 100 fields |', + '### Track', + '| Tool | What it answers |', + '| --- | --- |', + '| `explain-form-changes` | The net change |', + '### wait-for', + ].join('\n'); + expect(findSection(markdown, 'explain-field')?.slug).toBe('read'); + expect(findSection(markdown, 'explain-form-changes')?.slug).toBe('track'); + expect(findSection(markdown, 'wait-for')?.slug).toBe('wait-for'); + expect(findSection(markdown, 'missing-tool')).toBeNull(); + }); +}); diff --git a/apps/docs/agent-tool-index.ts b/apps/docs/agent-tool-index.ts new file mode 100644 index 00000000..a5d23c18 --- /dev/null +++ b/apps/docs/agent-tool-index.ts @@ -0,0 +1,201 @@ +import {readFileSync} from 'node:fs'; +import {join} from 'node:path'; +import {AGENT_ENTRIES, type AgentEntry} from '../../packages/devtools/src/config.ts'; +import {createSlugger, headingText, slugify} from './src/app/utils/heading-slug.ts'; + +/** + * Builds `src/content/agents/tool-index.md` from `AGENT_ENTRIES` in + * `packages/devtools/src/config.ts`, the list the server registers its agent + * tools and resources from. `scripts/docs-agent-tools.mjs` writes the page, + * and `agent-tool-index.spec.ts` fails when the committed page is stale or a + * tool has no place in `tools.md` or `resources.md`. + */ + +export const TOOL_INDEX_PATH = 'src/content/agents/tool-index.md'; + +const INSPECTOR_LABELS: Record = { + components: 'Components', + signals: 'Signals', + injectors: 'Injectors', + ngrx: 'NgRx Store', + tanstackQuery: 'TanStack Query', + forms: 'Forms', + router: 'Router', + pipes: 'Pipes', + http: 'SSR & HTTP', + analog: 'Analog', + capacitor: 'Capacitor', + errors: 'Errors', + plugins: 'Plugins', +}; + +/** Sections that mention every tool in passing, so they are not where a tool is described. */ +const PASSING_SECTIONS = new Set(['before-you-call-a-tool', 'renamed-tools', 'shared-state']); + +interface Heading { + slug: string; + text: string; + section: string; +} + +/** Each line's heading, with slugs computed the way the link guard and the TOC do. */ +function headingsByLine(markdown: string): (Heading | null)[] { + const slug = createSlugger(); + const out: (Heading | null)[] = []; + let current: Heading | null = null; + let section = ''; + let fence: string | null = null; + for (const line of markdown.split(/\r?\n/)) { + const marker = /^ {0,3}(`{3,}|~{3,})/.exec(line)?.[1]; + if (marker && (fence === null || marker.startsWith(fence))) { + fence = fence === null ? marker : null; + } else if (fence === null) { + const m = /^ {0,3}(#{1,6})\s+(.+?)\s*$/.exec(line); + if (m) { + const text = headingText(m[2]); + const id = m[1].length === 1 ? slugify(text) : slug(text); + if (m[1].length <= 2) section = id; + current = {slug: id, text, section}; + } + } + out.push(current); + } + return out; +} + +/** The heading a name is described under: its own heading, or the first section that names it. */ +export function findSection(markdown: string, name: string): Heading | null { + const lines = markdown.split(/\r?\n/); + const headings = headingsByLine(markdown); + const own = headings.find((h) => h?.text === name); + if (own) return own; + const needle = '`' + name + '`'; + // The header row of the table each line is in, so a row in a table of limits doesn't count. + const tableHeaders: string[] = []; + lines.forEach((line, i) => { + const inTable = line.startsWith('|'); + tableHeaders.push(!inTable ? '' : lines[i - 1]?.startsWith('|') ? tableHeaders[i - 1] : line); + }); + const isLimits = (i: number) => /^\|\s*\S+\s*\|\s*(Cap|Limit)\s*\|/.test(tableHeaders[i]); + // A table row that defines it, then a paragraph that starts with it, then any mention. + const tests = [ + (line: string, i: number) => line.startsWith(`| ${needle} `) && !isLimits(i), + (line: string) => line.startsWith(needle), + (line: string) => line.includes(needle), + ]; + for (const test of tests) { + for (let i = 0; i < lines.length; i++) { + const heading = headings[i]; + if (!heading || PASSING_SECTIONS.has(heading.section)) continue; + if (test(lines[i], i)) return heading; + } + } + return null; +} + +function tier(entry: AgentEntry): string { + const base = entry.safety ?? 'read'; + return entry.readOnlyVariant ? `${base} (read under \`agent.readOnly\`)` : base; +} + +function inspectorOf(entry: AgentEntry): string { + const first = entry.inspectors?.[0]; + if (!first) return 'Shared'; + return entry.anyInspector ? `${INSPECTOR_LABELS[first]} and others` : INSPECTOR_LABELS[first]; +} + +function turnedOffBy(entry: AgentEntry): string { + if (!entry.inspectors?.length) return 'None'; + const keys = entry.anyInspector ? entry.inspectors : entry.inspectors.slice(0, 1); + const parts = keys.map((key) => `\`inspectors.${key}\``); + const joined = entry.anyInspector ? `${parts.join(', ')} (all of them)` : parts[0]; + return entry.actions?.length + ? `${joined}, or blocking ${entry.actions.map((a) => `\`actions.${a}\``).join(' and ')}` + : joined; +} + +export interface IndexProblem { + name: string; + problem: string; +} + +/** The markdown of the page, and the entries that have no place in the docs. */ +export function renderToolIndex(docsRoot: string): {markdown: string; problems: IndexProblem[]} { + const tools = readFileSync(join(docsRoot, 'src/content/agents/tools.md'), 'utf8'); + const resources = readFileSync(join(docsRoot, 'src/content/agents/resources.md'), 'utf8'); + const problems: IndexProblem[] = []; + const toolRows: string[] = []; + const resourceRows: string[] = []; + + const order = ['Shared', ...Object.values(INSPECTOR_LABELS)]; + const entries = Object.entries(AGENT_ENTRIES).sort( + ([a, x], [b, y]) => + order.indexOf(inspectorOf(x).replace(/ and others$/, '')) - + order.indexOf(inspectorOf(y).replace(/ and others$/, '')) || a.localeCompare(b), + ); + + for (const [name, entry] of entries) { + const isResource = entry.kind === 'resource'; + const page = isResource ? './resources.md' : './tools.md'; + const section = findSection(isResource ? resources : tools, name); + if (!section) { + problems.push({name, problem: `not named in ${isResource ? 'resources.md' : 'tools.md'}`}); + continue; + } + const link = `[${section.text}](${page}#${section.slug})`; + const stdio = entry.page ? 'No' : 'Yes'; + if (isResource) { + resourceRows.push(`| \`pangular:${name}\` | ${inspectorOf(entry)} | ${stdio} | ${link} |`); + } else { + toolRows.push( + `| \`${name}\` | ${inspectorOf(entry)} | ${tier(entry)} | ${stdio} | ${turnedOffBy(entry)} | ${link} |`, + ); + } + } + + const markdown = `--- +title: Tool index +description: Every built-in agent tool and resource with its inspector, safety tier, transports and the option that turns it off, generated from the server's own list. +--- + + + Every built-in agent tool and resource on one page, generated from the list the server registers them from. + + +# Tool index + +This page is generated from \`AGENT_ENTRIES\` in \`packages/devtools/src/config.ts\`, the list the server registers its tools and resources from, so it can't drift from the code. [Tools](./tools.md) and [Resources](./resources.md) describe the arguments and answers of each one. Run \`pnpm docs:agent-tools\` after you add or change an entry. + +Clients see each tool as \`pangular_\`. See [Names](./tools.md#names). Plugin tools, \`pangular:plugin::\`, come from the plugins and are not listed here. See [A plugin's own tools](./tools.md#a-plugin-s-own-tools). + +## Columns + +| Column | Meaning | +| ------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | +| Inspector | The inspector the entry belongs to. Shared entries belong to none. | +| Tier | \`read\`, \`action\` or \`destructive\`. See [Action tools](./tools.md#action-tools). | +| Over stdio | Whether the stdio server offers it. Entries that need a connected page, the app's dev server or the panel are HTTP only. | +| Turned off by | The [configuration](../getting-started/configuration.md#inspectors-and-agent-tools) that removes it. \`agent.tools.: false\` also hides an inspector's entries, and \`agent.readOnly\` drops the \`action\` and \`destructive\` tools. | + +## Tools + +| Tool | Inspector | Tier | Over stdio | Turned off by | Described in | +| ---- | --------- | ---- | ---------- | ------------- | ------------ | +${toolRows.join('\n')} + +## Resources + +| Resource | Inspector | Over stdio | Described in | +| -------- | --------- | ---------- | ------------ | +${resourceRows.join('\n')} + +## Where to next + + + + + + +`; + return {markdown, problems}; +} diff --git a/apps/docs/api-reference.spec.ts b/apps/docs/api-reference.spec.ts new file mode 100644 index 00000000..c59d73ae --- /dev/null +++ b/apps/docs/api-reference.spec.ts @@ -0,0 +1,37 @@ +import {readFileSync, readdirSync} from 'node:fs'; +import {join, resolve} from 'node:path'; +import * as prettier from 'prettier'; +import {API_DIR, readApiEntries, renderApiReference} from './api-reference'; + +const docsRoot = import.meta.dirname; +const repoRoot = resolve(docsRoot, '../..'); +const dir = join(docsRoot, API_DIR); + +describe('API reference', () => { + it('matches the pages in the repository; run pnpm docs:api when it fails', async () => { + const pages = renderApiReference(repoRoot, 'https://github.com/pangular-inspector/devtools'); + const onDisk = readdirSync(dir).filter((file) => file.endsWith('.md')); + expect(onDisk.sort()).toEqual([...pages.keys()].sort()); + for (const [file, markdown] of pages) { + const path = join(dir, file); + const options = (await prettier.resolveConfig(path)) ?? {}; + const expected = await prettier.format(markdown, {...options, filepath: path}); + expect(readFileSync(path, 'utf8'), file).toBe(expected); + } + }, 60_000); + + it('documents the entry points apps use, without internal symbols', () => { + const entries = readApiEntries(repoRoot); + const hub = entries.find((entry) => entry.slug === 'hub'); + expect(hub?.symbols.map((s) => s.name)).toContain('initPangularHub'); + expect(entries.some((entry) => entry.slug.startsWith('internal-'))).toBe(false); + }, 60_000); + + it('shows inferred return types and symbols re-exported from a dependency', () => { + const devframe = readApiEntries(repoRoot).find((entry) => entry.slug === 'devframe'); + const create = devframe?.symbols.find((s) => s.name === 'createPangular'); + expect(create?.declaration).toMatch(/\): import\(['"]devframe['"]\)\.DevframeDefinition$/); + const init = devframe?.symbols.find((s) => s.name === 'initDevframe'); + expect(init).toMatchObject({kind: 'function', from: 'devframe', file: ''}); + }, 60_000); +}); diff --git a/apps/docs/api-reference.ts b/apps/docs/api-reference.ts new file mode 100644 index 00000000..d98d1aeb --- /dev/null +++ b/apps/docs/api-reference.ts @@ -0,0 +1,249 @@ +import {readFileSync} from 'node:fs'; +import {join, posix} from 'node:path'; +import {Node, Project, ts, type JSDoc} from 'ts-morph'; + +/** + * Builds the API reference pages in `src/content/api/` from the public entry + * points of `@pangular-inspector/devtools`: the `exports` of + * `packages/devtools/package.json`, read from their TypeScript sources. + * + * Each entry point gets one page with every symbol it exports: its kind, the + * JSDoc summary, the declaration and a link to the source. Symbols marked + * `@internal` are left out, as the published types leave them out. + * `scripts/docs-api.mjs` writes the pages, and `api-reference.spec.ts` + * fails when a page in the repository is stale. + */ + +export const API_DIR = 'src/content/api'; + +/** Entry points that are not part of the public API. */ +const SKIPPED_EXPORTS = new Set(['./package.json', '.']); + +type Kind = 'class' | 'interface' | 'function' | 'const' | 'type' | 'enum'; + +interface ApiSymbol { + name: string; + kind: Kind; + summary: string; + tags: Array<{name: string; text: string}>; + declaration: string; + /** The source file in this repository, or empty for a symbol re-exported from a dependency. */ + file: string; + /** The npm package a re-exported symbol comes from. */ + from?: string; +} + +/** The package a file under `node_modules` belongs to, such as `devframe` or `@scope/name`. */ +function packageOf(filePath: string): string { + const rest = filePath.replace(/\\/g, '/').split('/node_modules/').at(-1) ?? ''; + const parts = rest.split('/'); + return parts[0].startsWith('@') ? `${parts[0]}/${parts[1]}` : parts[0]; +} + +export interface ApiEntry { + /** The import path, such as `@pangular-inspector/devtools/hub`. */ + specifier: string; + /** The page slug, such as `hub`. */ + slug: string; + source: string; + symbols: ApiSymbol[]; +} + +function kindOf(node: Node): Kind | null { + if (Node.isClassDeclaration(node)) return 'class'; + if (Node.isInterfaceDeclaration(node)) return 'interface'; + if (Node.isFunctionDeclaration(node)) return 'function'; + if (Node.isVariableDeclaration(node)) return 'const'; + if (Node.isTypeAliasDeclaration(node)) return 'type'; + if (Node.isEnumDeclaration(node)) return 'enum'; + return null; +} + +function jsDocsOf(node: Node): JSDoc[] { + const host = Node.isVariableDeclaration(node) + ? (node.getFirstAncestorByKind(ts.SyntaxKind.VariableStatement) ?? node) + : node; + return Node.isJSDocable(host) ? host.getJsDocs() : []; +} + +function declarationOf(nodes: Node[]): string { + const [first] = nodes; + if (Node.isFunctionDeclaration(first)) { + const overloads = nodes.filter(Node.isFunctionDeclaration).filter((n) => n.isOverload()); + return (overloads.length ? overloads : [first]) + .map((n) => { + const text = n.getText(); + const body = n.getBody(); + const head = clean(body ? text.slice(0, body.getStart() - n.getStart()) : text); + // Without an annotation, show the return type TypeScript infers, as the published types do. + return n.getReturnTypeNode() ? head : `${head}: ${n.getReturnType().getText(n)}`; + }) + .join('\n'); + } + if (Node.isClassDeclaration(first)) { + const brace = first.getFirstChildByKind(ts.SyntaxKind.OpenBraceToken); + const text = first.getText(); + return clean(brace ? text.slice(0, brace.getStart() - first.getStart()) : text); + } + if (Node.isVariableDeclaration(first)) { + const type = first.getTypeNode()?.getText() ?? first.getType().getText(first); + return `const ${first.getName()}: ${type}`; + } + return clean(first.getText()); +} + +function clean(text: string): string { + return text + .trim() + .replace(/^export\s+(default\s+)?(declare\s+)?/, '') + .replace(/;$/, ''); +} + +/** The entry points of the package, with the symbols each one exports. */ +export function readApiEntries(repoRoot: string): ApiEntry[] { + const pkgDir = join(repoRoot, 'packages/devtools'); + const pkg = JSON.parse(readFileSync(join(pkgDir, 'package.json'), 'utf8')) as { + name: string; + exports: Record; + }; + const project = new Project({ + tsConfigFilePath: join(pkgDir, 'tsconfig.json'), + skipAddingFilesFromTsConfig: true, + }); + const entries: ApiEntry[] = []; + for (const [key, target] of Object.entries(pkg.exports)) { + // `./internal/*` entries serve the panel and the extension, not apps. + if (SKIPPED_EXPORTS.has(key) || key.startsWith('./internal/')) continue; + const rel = typeof target === 'string' ? target : (target.import ?? target.default); + if (!rel?.endsWith('.ts')) continue; + const sourceFile = project.addSourceFileAtPath(join(pkgDir, rel)); + const symbols: ApiSymbol[] = []; + for (const [name, decls] of sourceFile.getExportedDeclarations()) { + const nodes = decls.filter((d) => kindOf(d)); + const first = nodes[0]; + if (!first) continue; + // A symbol re-exported from a dependency is still part of this entry point's API. + const external = first.getSourceFile().isInNodeModules(); + const docs = nodes.flatMap(jsDocsOf); + const tags = docs.flatMap((d) => + d.getTags().map((t) => ({name: t.getTagName(), text: (t.getCommentText() ?? '').trim()})), + ); + if (tags.some((t) => t.name === 'internal')) continue; + symbols.push({ + name, + kind: kindOf(first)!, + summary: docs.at(-1)?.getDescription().trim() ?? '', + tags, + declaration: declarationOf(nodes), + file: external + ? '' + : posix.relative(repoRoot.replace(/\\/g, '/'), first.getSourceFile().getFilePath()), + ...(external ? {from: packageOf(first.getSourceFile().getFilePath())} : {}), + }); + } + symbols.sort((a, b) => a.name.localeCompare(b.name)); + const slug = key === '.' ? 'index' : key.slice(2).replace(/\//g, '-'); + entries.push({ + specifier: key === '.' ? pkg.name : `${pkg.name}/${key.slice(2)}`, + slug, + source: posix.join('packages/devtools', rel.replace(/^\.\//, '')), + symbols, + }); + } + return entries; +} + +const KIND_LABEL: Record = { + class: 'Class', + interface: 'Interface', + function: 'Function', + const: 'Constant', + type: 'Type', + enum: 'Enum', +}; + +/** JSDoc text as one markdown paragraph: `{@link X}` becomes `X` in code. */ +function prose(text: string): string { + return text + .replace(/\{@link\s+([^}\s|]+)(?:[\s|][^}]*)?\}/g, '`$1`') + .replace(/\r/g, '') + .trim(); +} + +export function renderApiPage(entry: ApiEntry, githubUrl: string): string { + const out = [ + '---', + `title: '${entry.specifier}'`, + `description: 'Every symbol the ${entry.specifier} entry point exports, with its declaration and JSDoc, generated from the package source.'`, + '---', + '', + ``, + ` The symbols ${entry.specifier.replace('@', '@')} exports, generated from the package source.`, + '', + '', + `# ${entry.specifier}`, + '', + `Import from \`${entry.specifier}\`. This page is generated from [\`${entry.source}\`](${githubUrl}/blob/main/${entry.source}) and the files it re-exports. Run \`pnpm docs:api\` after you change the public API.`, + '', + ]; + if (!entry.symbols.length) { + out.push('This entry point exports no symbols. Importing it runs its side effect.', ''); + } + for (const symbol of entry.symbols) { + out.push(`## ${symbol.name}`, ''); + out.push( + symbol.from + ? `${KIND_LABEL[symbol.kind]}. Re-exported from the \`${symbol.from}\` package.` + : `${KIND_LABEL[symbol.kind]}. Source: [\`${symbol.file}\`](${githubUrl}/blob/main/${symbol.file}).`, + '', + ); + if (symbol.summary) out.push(prose(symbol.summary), ''); + const deprecated = symbol.tags.find((t) => t.name === 'deprecated'); + if (deprecated) out.push(`Deprecated. ${prose(deprecated.text)}`.trim(), ''); + out.push('```ts', symbol.declaration, '```', ''); + } + return escapeEnv(out.join('\n')); +} + +/** + * Vite replaces `process.env.NODE_ENV` and `import.meta.env.X` even inside the + * compiled page, which breaks the build. The bracket form means the same and + * is left alone, as the hand-written pages write it. + */ +function escapeEnv(text: string): string { + return text.replace(/\b(process\.env|import\.meta\.env)\.([A-Za-z_]\w*)/g, "$1['$2']"); +} + +export function renderApiIndex(entries: ApiEntry[]): string { + const rows = entries.map( + (entry) => + `| [\`${entry.specifier}\`](./${entry.slug}.md) | ${entry.symbols.length ? entry.symbols.map((s) => `\`${s.name}\``).join(', ') : 'None, it runs on import'} |`, + ); + return [ + '---', + 'title: API reference', + "description: 'The public entry points of @pangular-inspector/devtools and the symbols each one exports, generated from the package source.'", + '---', + '', + '', + ' Every public entry point of the package and the symbols it exports, generated from the source.', + '', + '', + '# API reference', + '', + 'Each entry point of `@pangular-inspector/devtools` has a page with every symbol it exports, its declaration and its JSDoc. The pages are generated from the package source, so names and types match the published code. [Installation](../getting-started/installation.md#entry-points) says what each entry point is for, and [Configuration](../getting-started/configuration.md) explains the options.', + '', + '| Entry point | Exports |', + '| ----------- | ------- |', + ...rows, + '', + ].join('\n'); +} + +/** Every page, keyed by its path under `src/content/api/`. */ +export function renderApiReference(repoRoot: string, githubUrl: string): Map { + const entries = readApiEntries(repoRoot); + const pages = new Map([['index.md', renderApiIndex(entries)]]); + for (const entry of entries) pages.set(`${entry.slug}.md`, renderApiPage(entry, githubUrl)); + return pages; +} diff --git a/apps/docs/llms-txt.plugin.spec.ts b/apps/docs/llms-txt.plugin.spec.ts new file mode 100644 index 00000000..b4fd28a7 --- /dev/null +++ b/apps/docs/llms-txt.plugin.spec.ts @@ -0,0 +1,84 @@ +import {mkdirSync, mkdtempSync, rmSync, writeFileSync} from 'node:fs'; +import {tmpdir} from 'node:os'; +import {join} from 'node:path'; +import type {NgmdConfig} from './src/ngmd.config.ts'; +import siteConfig from './src/ngmd.config.ts'; +import {buildLlmsTxt} from './llms-txt.plugin.ts'; + +const config: NgmdConfig = { + site: { + name: 'Fixture Docs', + description: 'A fixture site.', + url: 'https://docs.example/', + githubUrl: 'https://github.com/example/docs', + }, + nav: [ + { + label: 'Start', + items: [ + {label: 'Second', href: '/start/second'}, + {label: 'First', href: '/start/first'}, + {label: 'Hidden', href: '/start/hidden'}, + ], + }, + ], +}; + +const page = (title: string, description: string, body: string, extra = '') => + `---\ntitle: ${title}\ndescription: ${description}\n${extra}---\n\n# ${title}\n\n${body}\n`; + +let root: string; +let index: string; +let full: string; + +beforeAll(() => { + root = mkdtempSync(join(tmpdir(), 'llms-txt-')); + mkdirSync(join(root, 'src/content/start'), {recursive: true}); + writeFileSync(join(root, 'src/content/start/first.md'), page('First', 'The first page.', 'One.')); + writeFileSync( + join(root, 'src/content/start/second.md'), + page('Second', 'The second page.', 'Two.'), + ); + writeFileSync( + join(root, 'src/content/start/hidden.md'), + page('Hidden', 'Not indexed.', 'Secret.', 'noIndex: true\n'), + ); + writeFileSync(join(root, 'src/content/extra.md'), page('Extra', 'Not in the sidebar.', 'Three.')); + ({index, full} = buildLlmsTxt(root, config)); +}); + +afterAll(() => rmSync(root, {recursive: true, force: true})); + +describe('llms.txt', () => { + it('starts with the site name and summary', () => { + expect(index.startsWith('# Fixture Docs\n\n> A fixture site.\n')).toBe(true); + expect(full.startsWith('# Fixture Docs\n')).toBe(true); + }); + + it('links each sidebar page to its markdown route with its description, in sidebar order', () => { + const second = index.indexOf( + '- [Second](https://docs.example/start/second.md): The second page.', + ); + const first = index.indexOf('- [First](https://docs.example/start/first.md): The first page.'); + expect(index).toContain('## Start'); + expect(second).toBeGreaterThan(-1); + expect(first).toBeGreaterThan(second); + }); + + it('lists content pages missing from the sidebar under Optional', () => { + expect(index).toMatch(/## Optional\n\n- \[Extra\]\(https:\/\/docs\.example\/extra\.md\)/); + }); + + it('leaves out noIndex pages and keeps page bodies without frontmatter', () => { + expect(index).not.toContain('hidden'); + expect(full).not.toContain('Secret.'); + expect(full).toContain('\n\n# First\n\nOne.'); + expect(full).not.toContain('description: The first page.'); + }); + + it('builds the real site without errors', () => { + const site = buildLlmsTxt(import.meta.dirname, siteConfig); + expect(site.index.startsWith(`# ${siteConfig.site.name}\n`)).toBe(true); + expect(site.index).toContain(`## ${siteConfig.nav[0].label}`); + }); +}); diff --git a/apps/docs/llms-txt.plugin.ts b/apps/docs/llms-txt.plugin.ts new file mode 100644 index 00000000..6c1a2c30 --- /dev/null +++ b/apps/docs/llms-txt.plugin.ts @@ -0,0 +1,134 @@ +import {existsSync, readFileSync} from 'node:fs'; +import {join} from 'node:path'; +import type {Plugin} from 'vite'; +import type {NgmdConfig} from './src/ngmd.config.ts'; +import {isNoIndex, parseFrontmatter, walkContentFiles} from './plugin-utils.ts'; +import {substituteMdVars} from './vars.plugin.ts'; + +/** + * Emits `/llms.txt` and `/llms-full.txt` (https://llmstxt.org) next to the + * raw `.md` routes that `rawMdPlugin` serves. + * + * /llms.txt the site name and summary, then one link per page, in + * sidebar order, to its `.md` route with its description. + * Content pages missing from the sidebar go under Optional. + * /llms-full.txt the same pages' markdown, frontmatter dropped, one after + * the other, each under a heading with its URL. + * + * `noIndex` pages are left out of both. The dev server answers the same two + * paths from `src/content` on each request. + */ + +interface LlmsPage { + route: string; + title: string; + description: string; + body: string; +} + +function readPages(root: string): Map { + const contentDir = join(root, 'src/content'); + const pages = new Map(); + if (!existsSync(contentDir)) return pages; + for (const [rel, route] of walkContentFiles(contentDir, root)) { + const {attributes, body} = parseFrontmatter( + substituteMdVars(readFileSync(join(root, rel), 'utf8'), root), + ); + if (isNoIndex(attributes)) continue; + pages.set(route, { + route, + title: String(attributes['title'] ?? route), + description: String(attributes['description'] ?? ''), + body: body.trim(), + }); + } + return pages; +} + +/** The pages in sidebar order, grouped by section, then the rest under Optional. */ +function orderedSections( + pages: Map, + config: NgmdConfig, +): Array<[string, LlmsPage[]]> { + const used = new Set(); + const sections: Array<[string, LlmsPage[]]> = []; + for (const section of config.nav) { + const items: LlmsPage[] = []; + for (const item of section.items) { + const page = pages.get(item.href); + if (!page || used.has(item.href)) continue; + used.add(item.href); + items.push(page); + } + if (items.length) sections.push([section.label, items]); + } + const rest = [...pages.values()] + .filter((page) => !used.has(page.route)) + .sort((a, b) => a.route.localeCompare(b.route)); + if (rest.length) sections.push(['Optional', rest]); + return sections; +} + +export function buildLlmsTxt(root: string, config: NgmdConfig): {index: string; full: string} { + const site = config.site.url.replace(/\/+$/, ''); + const sections = orderedSections(readPages(root), config); + const mdUrl = (route: string) => `${site}${route === '/' ? '/index' : route}.md`; + + const index = [ + `# ${config.site.name}`, + '', + `> ${config.site.description}`, + '', + `Each link below is the page's markdown source. The whole site in one file is ${site}/llms-full.txt.`, + '', + ...sections.flatMap(([label, items]) => [ + `## ${label}`, + '', + ...items.map( + (page) => + `- [${page.title}](${mdUrl(page.route)})${page.description ? `: ${page.description}` : ''}`, + ), + '', + ]), + ].join('\n'); + + const full = [ + `# ${config.site.name}`, + '', + `> ${config.site.description}`, + '', + ...sections.flatMap(([, items]) => + items.flatMap((page) => [``, '', page.body, '']), + ), + ].join('\n'); + + return {index, full}; +} + +export function llmsTxtPlugin(config: NgmdConfig): Plugin { + let root = process.cwd(); + return { + name: 'ngmd-llms-txt', + configResolved(cfg) { + root = cfg.root; + }, + configureServer(server) { + server.middlewares.use((req, res, next) => { + const path = req.url?.split('?')[0]; + if (path !== '/llms.txt' && path !== '/llms-full.txt') return next(); + try { + const {index, full} = buildLlmsTxt(root, config); + res.setHeader('Content-Type', 'text/plain; charset=utf-8'); + res.end(path === '/llms.txt' ? index : full); + } catch (err) { + next(err); + } + }); + }, + generateBundle() { + const {index, full} = buildLlmsTxt(root, config); + this.emitFile({type: 'asset', fileName: 'llms.txt', source: index}); + this.emitFile({type: 'asset', fileName: 'llms-full.txt', source: full}); + }, + }; +} diff --git a/apps/docs/public/_redirects b/apps/docs/public/_redirects new file mode 100644 index 00000000..f6fe040d --- /dev/null +++ b/apps/docs/public/_redirects @@ -0,0 +1,11 @@ +# Cloudflare reads this file from the static assets and moves each old URL to its page. +# The NativeScript, Angular Native and Analog setup guides merged into their Getting Started pages. +/guides/nativescript /getting-started/nativescript 301 +/guides/nativescript/ /getting-started/nativescript 301 +/guides/nativescript.md /getting-started/nativescript.md 301 +/guides/angular-native /getting-started/angular-native 301 +/guides/angular-native/ /getting-started/angular-native 301 +/guides/angular-native.md /getting-started/angular-native.md 301 +/guides/analog /getting-started/vite 301 +/guides/analog/ /getting-started/vite 301 +/guides/analog.md /getting-started/vite.md 301 diff --git a/apps/docs/src/app/components/sidebar.ts b/apps/docs/src/app/components/sidebar.ts index 1c8b180f..01b57c8b 100644 --- a/apps/docs/src/app/components/sidebar.ts +++ b/apps/docs/src/app/components/sidebar.ts @@ -13,6 +13,7 @@ import {Router, RouterLink, RouterLinkActive} from '@angular/router'; import {LucideDynamicIcon, LucideChevronDown} from '@lucide/angular'; import config from '../../ngmd.config'; import {BADGE_VARIANTS, type BadgeVariant} from '../../types/badge'; +import {activeBadge, type BadgedItem} from '../../nav-badges'; import {onNavigation} from '../utils/enhance-on-navigation'; import {RouteUrlService} from '../services/route-url/route-url.service'; @@ -68,7 +69,7 @@ export class SidebarState { class="flex items-center justify-between gap-2 rounded-md px-3 py-1.5 text-zinc-700 dark:text-zinc-300 hover:bg-[color:var(--accent-soft)] hover:text-[color:var(--accent-strong)] focus:outline-none focus-visible:outline-2 focus-visible:outline focus-visible:outline-offset-[-2px] focus-visible:outline-[color:var(--accent)]" > {{ item.label }} - @if (item.status; as status) { + @if (badge(item); as status) { diff --git a/apps/docs/src/content/agents/recipes.md b/apps/docs/src/content/agents/recipes.md new file mode 100644 index 00000000..1a58c404 --- /dev/null +++ b/apps/docs/src/content/agents/recipes.md @@ -0,0 +1,101 @@ +--- +title: Recipes for agents +description: Prompts to paste into Claude Code, Cursor or Copilot for common debugging tasks, with the agent tools each one leads to and what to check in the answer. +--- + + + Prompts for the questions developers ask most, with the tools an agent calls to answer them. + + +# Recipes for agents + +Each recipe is a prompt you paste into your coding agent, the agent tools it leads to, and what to check in the answer. The prompts work in any client that is connected to the HTTP endpoint of the [MCP server](./mcp-server.md), such as Claude Code, Cursor or VS Code with Copilot. The stdio server leaves out the tools that read the running app, so these recipes need HTTP. See [What stdio can answer](./mcp-server.md#what-stdio-can-answer). Clients see the tools as `pangular_`. See [Names](./tools.md#names). + +Keep the app open in a development build with the overlay loaded while the agent works. The live tools read the pages that report to the server. If several tabs are open, ask the agent to call `list-pages` first and name the tab. + + + The HTTP endpoint also offers MCP prompts, such as fix-form and debug-error, which clients that support them show as slash commands. See Prompts. + + +## Debug an invalid form + +```text +The checkout form won't submit. Use the Pangular tools to find which fields make it +invalid and why, fix the cause in the code, then show me the form is valid. +``` + +| Step | Tool | +| --------------------------- | ----------------------------------------------------------------------------------- | +| Record the starting point | `inspect-forms` with `form` for its status, `list-form-changes` for a marker | +| Find the invalid fields | `explain-invalid-forms` | +| Look at one field | `explain-field` with `form` and `path` | +| See why submit does nothing | `explain-submit` | +| Reproduce after the fix | Enter the original input again, then `wait-for` with `condition: "form"` and `form` | +| See what changed | `explain-form-changes` with `form` and the marker as `after` | +| Prove the form is valid | `inspect-forms` with `form`, compared with the status recorded first | + +A code change can reload the page and reset the form, so enter the same input as before the fix and wait until the form is settled before you compare. `explain-form-changes` reads the change events recorded since the marker, not a saved copy of the form, so the status from `inspect-forms` is the proof. Check that the answer names the failing validator and its message for each field, not only that the form is invalid. Values that look secret stay redacted. See [Forms](./tools.md#forms). + +## Explain a failed navigation + +```text +Clicking "My trips" sends me back to the home page. Use the Pangular tools to explain +the last navigations: who started them, which guard or redirect changed the URL, and why. +``` + +| Step | Tool | +| ---------------------------- | ------------------------------------------- | +| Read the recent navigations | `explain-navigation` | +| Read the current route | `inspect-route` | +| Time each guard and resolver | `record-guards`, then navigate again | +| Get a repro to keep | `explain-navigation` with `format: "repro"` | + +`record-guards` is an action tool, and the server tells agents to call action tools only when you ask for the change. Add "record the guards" to the prompt for the timing. Check that the answer names the guard verdict or the redirect behind each hop. See [Router](./tools.md#router). + +## Find a missing provider + +```text +The trip details page throws NG0201 for TripService. Use the Pangular tools to show where +Angular looked for it and why no injector provided it, then fix the providers. +``` + +| Step | Tool | +| ----------------------------- | --------------------------------------------------------------------------------------------- | +| Find the error and its owner | `list-errors`, then `explain-error` with its `id` | +| Walk the lookup path | `explain-injection` with the owner as `injector`, the token and the failing injection's flags | +| Read the providers at a level | `inspect-providers` | + +`explain-error` adds the missing provider explainer, and its owner id works as the `injector` of `explain-injection`. Pass the flags the failing injection used, such as `self: true`, `skipSelf`, `host` or `optional`, so the lookup follows the same path. If it says **Component: not found**, for example when a routed component fails before it is in the tree, `explain-injection` has no injector to start from and answers **No injector on page**. Read the stack of the error for the class that injects the token, then call `scan-providers` to see where the source provides the token. A lookup from an injector that is on the page, such as the parent route's component or `Root`, is a separate lookup, not part of the failing one: it can resolve differently, for example when the failing injection used `self`. When an owner is found, check that the answer marks each injector on the path as **provides it**, **not provided**, **hidden**, **skipped**, **not asked** or **unknown**. See [explain-injection](./tools.md#explain-injection). + +## Find wasted change detection + +```text +Typing in the search box feels slow. Record change detection while I type, then use the +Pangular tools to tell me what triggered each check and which components ran for nothing. +``` + +| Step | Tool | +| -------------------------- | --------------------------- | +| Start and stop a recording | `record-change-detection` | +| Read the cycles | `change-detection` | +| Find the waste | `diagnose-change-detection` | + +The recording needs Angular 20 or later. Check that the answer names the trigger of each cycle and the checks that changed nothing. See [diagnose-change-detection](./tools.md#diagnose-change-detection). + +## Check that a fix worked + +```text +Before you change anything, take a Pangular audit of this page as a baseline. After the +fix, repeat the same steps, run the audit again and compare the two. +``` + +The agent calls `audit` with `session: "before"`, makes the change, repeats the same steps in the app and calls `audit` with `session: "after"`, which compares the two. [Inspect, fix and verify](../guides/inspect-fix-verify.md) walks through the loop. The `verify-fix` prompt is a lighter check without the audit: it repeats the calls that showed the problem, compares the answers and looks for new errors. + +## Where to next + + + + + + + diff --git a/apps/docs/src/content/agents/tool-index.md b/apps/docs/src/content/agents/tool-index.md new file mode 100644 index 00000000..ccdfc2cf --- /dev/null +++ b/apps/docs/src/content/agents/tool-index.md @@ -0,0 +1,161 @@ +--- +title: Tool index +description: Every built-in agent tool and resource with its inspector, safety tier, transports and the option that turns it off, generated from the server's own list. +--- + + + Every built-in agent tool and resource on one page, generated from the list the server registers them from. + + +# Tool index + +This page is generated from `AGENT_ENTRIES` in `packages/devtools/src/config.ts`, the list the server registers its tools and resources from, so it can't drift from the code. [Tools](./tools.md) and [Resources](./resources.md) describe the arguments and answers of each one. Run `pnpm docs:agent-tools` after you add or change an entry. + +Clients see each tool as `pangular_`. See [Names](./tools.md#names). Plugin tools, `pangular:plugin::`, come from the plugins and are not listed here. See [A plugin's own tools](./tools.md#a-plugin-s-own-tools). + +## Columns + +| Column | Meaning | +| ------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Inspector | The inspector the entry belongs to. Shared entries belong to none. | +| Tier | `read`, `action` or `destructive`. See [Action tools](./tools.md#action-tools). | +| Over stdio | Whether the stdio server offers it. Entries that need a connected page, the app's dev server or the panel are HTTP only. | +| Turned off by | The [configuration](../getting-started/configuration.md#inspectors-and-agent-tools) that removes it. `agent.tools.: false` also hides an inspector's entries, and `agent.readOnly` drops the `action` and `destructive` tools. | + +## Tools + +| Tool | Inspector | Tier | Over stdio | Turned off by | Described in | +| ------------------------------ | --------------------- | ------------------------------------ | ---------- | ---------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `audit` | Shared | action (read under `agent.readOnly`) | No | None | [audit](./tools.md#audit-1) | +| `list-pages` | Shared | read | No | None | [list-pages](./tools.md#list-pages) | +| `open-in-panel` | Shared | read | No | None | [open-in-panel](./tools.md#open-in-panel) | +| `scan-build` | Shared | read | Yes | None | [Source scan](./tools.md#source-scan) | +| `snapshot` | Shared | read | No | None | [snapshot](./tools.md#snapshot) | +| `change-detection` | Components | read | No | `inspectors.components` | [change-detection](./tools.md#change-detection) | +| `defer-blocks` | Components | read | No | `inspectors.components` | [defer-blocks](./tools.md#defer-blocks) | +| `diagnose-change-detection` | Components | read | No | `inspectors.components` | [diagnose-change-detection](./tools.md#diagnose-change-detection) | +| `find-leaks` | Components | read | No | `inspectors.components` | [find-leaks](./tools.md#find-leaks) | +| `for-blocks` | Components | read | No | `inspectors.components` | [for-blocks](./tools.md#for-blocks) | +| `highlight` | Components | read | No | `inspectors.components` | [highlight](./tools.md#highlight) | +| `hydration` | Components | read | No | `inspectors.components` | [hydration](./tools.md#hydration) | +| `inspect-component` | Components | read | No | `inspectors.components` | [inspect-component](./tools.md#inspect-component) | +| `list-components` | Components | read | No | `inspectors.components` | [list-components](./tools.md#list-components) | +| `load-defer-block` | Components | action | No | `inspectors.components`, or blocking `actions.components` | [load-defer-block](./tools.md#load-defer-block) | +| `record-change-detection` | Components | action | No | `inspectors.components` | [record-change-detection](./tools.md#record-change-detection) | +| `scan-components` | Components | read | Yes | `inspectors.components` | [Source scan](./tools.md#source-scan) | +| `scan-templates` | Components | read | Yes | `inspectors.components` | [scan-templates](./tools.md#scan-templates) | +| `screenshot-component` | Components | read | No | `inspectors.components` | [screenshot-component](./tools.md#screenshot-component) | +| `set-component-property` | Components | action | No | `inspectors.components`, or blocking `actions.components` | [Edit a component](./tools.md#edit-a-component) | +| `set-signal` | Components | action | No | `inspectors.components`, or blocking `actions.components` | [Edit a component](./tools.md#edit-a-component) | +| `track-subscriptions` | Components | action | No | `inspectors.components` | [Track subscriptions](./tools.md#track-subscriptions) | +| `wait-for` | Components and others | read | No | `inspectors.components`, `inspectors.router`, `inspectors.http`, `inspectors.errors`, `inspectors.forms` (all of them) | [wait-for](./tools.md#wait-for) | +| `inspect-signals` | Signals | read | No | `inspectors.signals` | [inspect-signals](./tools.md#inspect-signals) | +| `scan-signals` | Signals | read | Yes | `inspectors.signals` | [Source scan](./tools.md#source-scan) | +| `watch-signal` | Signals | action | No | `inspectors.signals` | [watch-signal](./tools.md#watch-signal) | +| `explain-injection` | Injectors | read | No | `inspectors.injectors` | [explain-injection](./tools.md#explain-injection) | +| `inspect-providers` | Injectors | read | No | `inspectors.injectors` | [inspect-providers](./tools.md#inspect-providers) | +| `read-provider-value` | Injectors | read | No | `inspectors.injectors` | [read-provider-value](./tools.md#read-provider-value) | +| `scan-providers` | Injectors | read | Yes | `inspectors.injectors` | [Source scan](./tools.md#source-scan) | +| `startup-timing` | Injectors | read | No | `inspectors.injectors` | [startup-timing](./tools.md#startup-timing) | +| `ngrx-dispatch` | NgRx Store | action | No | `inspectors.ngrx`, or blocking `actions.ngrx` | [Dispatch an action](./tools.md#dispatch-an-action) | +| `ngrx-explain-change` | NgRx Store | read | No | `inspectors.ngrx` | [ngrx-explain-change](./tools.md#ngrx-explain-change) | +| `ngrx-export-session` | NgRx Store | read | No | `inspectors.ngrx` | [ngrx-export-session](./tools.md#ngrx-export-session) | +| `ngrx-generate-test` | NgRx Store | read | Yes | `inspectors.ngrx` | [ngrx-generate-test](./tools.md#ngrx-generate-test) | +| `ngrx-history` | NgRx Store | read | No | `inspectors.ngrx` | [ngrx-history](./tools.md#ngrx-history) | +| `ngrx-import-session` | NgRx Store | read | Yes | `inspectors.ngrx` | [ngrx-import-session](./tools.md#ngrx-import-session) | +| `ngrx-inspect-entry` | NgRx Store | read | Yes | `inspectors.ngrx` | [ngrx-inspect-entry](./tools.md#ngrx-inspect-entry) | +| `ngrx-inspect-store` | NgRx Store | read | No | `inspectors.ngrx` | [ngrx-inspect-store](./tools.md#ngrx-inspect-store) | +| `ngrx-restore` | NgRx Store | action | No | `inspectors.ngrx`, or blocking `actions.ngrx` | [Restore a state](./tools.md#restore-a-state) | +| `ngrx-scan` | NgRx Store | read | Yes | `inspectors.ngrx` | [Source scan](./tools.md#source-scan) | +| `ngrx-store-devtools` | NgRx Store | destructive | No | `inspectors.ngrx`, or blocking `actions.ngrx` | [Change the Store DevTools history](./tools.md#change-the-store-devtools-history) | +| `redux-inspect-stores` | NgRx Store | read | No | `inspectors.ngrx` | [redux-inspect-stores](./tools.md#redux-inspect-stores) | +| `tanstack-inspect-query` | TanStack Query | read | No | `inspectors.tanstackQuery` | [TanStack Query](./tools.md#tanstack-query) | +| `tanstack-list-queries` | TanStack Query | read | No | `inspectors.tanstackQuery` | [TanStack Query](./tools.md#tanstack-query) | +| `tanstack-run-query` | TanStack Query | action | No | `inspectors.tanstackQuery`, or blocking `actions.tanstackQuery` | [Invalidate or refetch a query](./tools.md#invalidate-or-refetch-a-query) | +| `explain-custom-control` | Forms | read | No | `inspectors.forms` | [Read form state](./tools.md#read-form-state) | +| `explain-field` | Forms | read | No | `inspectors.forms` | [Read form state](./tools.md#read-form-state) | +| `explain-form-changes` | Forms | read | No | `inspectors.forms` | [Track changes](./tools.md#track-changes) | +| `explain-invalid-forms` | Forms | read | No | `inspectors.forms` | [Read form state](./tools.md#read-form-state) | +| `explain-submit` | Forms | read | No | `inspectors.forms` | [Read form state](./tools.md#read-form-state) | +| `export-form` | Forms | read | No | `inspectors.forms` | [Track changes](./tools.md#track-changes) | +| `fill-form` | Forms | action | No | `inspectors.forms`, or blocking `actions.forms` | [Act on a form](./tools.md#act-on-a-form) | +| `inspect-form-payload` | Forms | read | No | `inspectors.forms` | [Read form state](./tools.md#read-form-state) | +| `inspect-forms` | Forms | read | No | `inspectors.forms` | [Read form state](./tools.md#read-form-state) | +| `lint-forms` | Forms | read | No | `inspectors.forms` | [Track changes](./tools.md#track-changes) | +| `list-form-changes` | Forms | read | No | `inspectors.forms` | [Track changes](./tools.md#track-changes) | +| `run-form-action` | Forms | action | No | `inspectors.forms`, or blocking `actions.forms` | [Act on a form](./tools.md#act-on-a-form) | +| `diff-navigations` | Router | read | No | `inspectors.router` | [Read the current route](./tools.md#read-the-current-route) | +| `explain-navigation` | Router | read | No | `inspectors.router` | [Read the current route](./tools.md#read-the-current-route) | +| `follow-navigations` | Router | read | No | `inspectors.router` | [Follow navigations](./tools.md#follow-navigations) | +| `inspect-route` | Router | read | No | `inspectors.router` | [Read the current route](./tools.md#read-the-current-route) | +| `lint-routes` | Router | read | No | `inspectors.router` | [Read the route config](./tools.md#read-the-route-config) | +| `list-routes` | Router | read | No | `inspectors.router` | [Read the route config](./tools.md#read-the-route-config) | +| `navigate` | Router | action | No | `inspectors.router`, or blocking `actions.router` | [Act on the router](./tools.md#act-on-the-router) | +| `preview-navigation` | Router | read | No | `inspectors.router` | [Read the route config](./tools.md#read-the-route-config) | +| `probe-route` | Router | action | No | `inspectors.router`, or blocking `actions.router` | [Act on the router](./tools.md#act-on-the-router) | +| `record-guards` | Router | action | No | `inspectors.router` | [Act on the router](./tools.md#act-on-the-router) | +| `router-config` | Router | read | No | `inspectors.router` | [Read the route config](./tools.md#read-the-route-config) | +| `scan-render-mode` | Router | read | Yes | `inspectors.router` | [Read the route config](./tools.md#read-the-route-config) | +| `scan-routes` | Router | read | Yes | `inspectors.router` | [Source scan](./tools.md#source-scan) | +| `explain-pipe` | Pipes | read | Yes | `inspectors.pipes` | [Explain a pipe](./tools.md#explain-a-pipe) | +| `record-pipes` | Pipes | action | No | `inspectors.pipes` | [Record pipe calls](./tools.md#record-pipe-calls) | +| `scan-pipe-usage` | Pipes | read | Yes | `inspectors.pipes` | [scan-pipe-usage](./tools.md#scan-pipe-usage) | +| `scan-pipes` | Pipes | read | Yes | `inspectors.pipes` | [Source scan](./tools.md#source-scan) | +| `suggest-pipe-migrations` | Pipes | read | Yes | `inspectors.pipes` | [Suggest pipe migrations](./tools.md#suggest-pipe-migrations) | +| `clear-recordings` | SSR & HTTP | destructive | No | `inspectors.http`, or blocking `actions.router` and `actions.http` and `actions.analog` | [Clear recordings](./tools.md#clear-recordings) | +| `explain-ssr-request` | SSR & HTTP | read | No | `inspectors.http` | [SSR & HTTP](./tools.md#ssr-http) | +| `inspect-transfer-state` | SSR & HTTP | read | No | `inspectors.http` | [TransferState and SSR overrides](./tools.md#transferstate-and-ssr-overrides) | +| `lint-http` | SSR & HTTP | read | No | `inspectors.http` | [SSR & HTTP](./tools.md#ssr-http) | +| `list-http-calls` | SSR & HTTP | read | No | `inspectors.http` | [SSR & HTTP](./tools.md#ssr-http) | +| `list-http-rules` | SSR & HTTP | read | No | `inspectors.http` | [Fault rules](./tools.md#fault-rules) | +| `list-ssr-overrides` | SSR & HTTP | read | No | `inspectors.http` | [TransferState and SSR overrides](./tools.md#transferstate-and-ssr-overrides) | +| `list-ssr-requests` | SSR & HTTP | read | No | `inspectors.http` | [SSR & HTTP](./tools.md#ssr-http) | +| `remove-http-rule` | SSR & HTTP | action | No | `inspectors.http`, or blocking `actions.http` | [Fault rules](./tools.md#fault-rules) | +| `remove-ssr-override` | SSR & HTTP | action | No | `inspectors.http`, or blocking `actions.http` | [TransferState and SSR overrides](./tools.md#transferstate-and-ssr-overrides) | +| `set-http-rule` | SSR & HTTP | action | No | `inspectors.http`, or blocking `actions.http` | [Fault rules](./tools.md#fault-rules) | +| `set-ssr-override` | SSR & HTTP | action | No | `inspectors.http`, or blocking `actions.http` | [TransferState and SSR overrides](./tools.md#transferstate-and-ssr-overrides) | +| `analog-explain-render-modes` | Analog | read | Yes | `inspectors.analog` | [Rendering](./tools.md#rendering) | +| `analog-inspect-page` | Analog | read | No | `inspectors.analog` | [The running page](./tools.md#the-running-page) | +| `analog-inspect-render-mode` | Analog | read | No | `inspectors.analog` | [Rendering](./tools.md#rendering) | +| `analog-inspect-transform` | Analog | read | No | `inspectors.analog` | [The running page](./tools.md#the-running-page) | +| `analog-lint` | Analog | read | Yes | `inspectors.analog` | [Lint](./tools.md#lint) | +| `analog-list-server-calls` | Analog | read | No | `inspectors.analog` | [The running page](./tools.md#the-running-page) | +| `analog-purge-nitro-cache` | Analog | destructive | Yes | `inspectors.analog`, or blocking `actions.analog` | [Purge the Nitro cache](./tools.md#purge-the-nitro-cache) | +| `analog-run-api` | Analog | destructive | No | `inspectors.analog`, or blocking `actions.analog` | [Call a server route](./tools.md#call-a-server-route) | +| `analog-run-nitro-task` | Analog | action | No | `inspectors.analog`, or blocking `actions.analog` | [Run a Nitro task](./tools.md#run-a-nitro-task) | +| `analog-scan-api-routes` | Analog | read | Yes | `inspectors.analog` | [Routes and files](./tools.md#routes-and-files) | +| `analog-scan-build` | Analog | read | Yes | `inspectors.analog` | [Routes and files](./tools.md#routes-and-files) | +| `analog-scan-content` | Analog | read | Yes | `inspectors.analog` | [Routes and files](./tools.md#routes-and-files) | +| `analog-scan-nitro` | Analog | read | Yes | `inspectors.analog` | [Routes and files](./tools.md#routes-and-files) | +| `analog-scan-prerender` | Analog | read | Yes | `inspectors.analog` | [Rendering](./tools.md#rendering) | +| `analog-scan-routes` | Analog | read | Yes | `inspectors.analog` | [Routes and files](./tools.md#routes-and-files) | +| `analog-scan-runtime-config` | Analog | read | Yes | `inspectors.analog` | [Routes and files](./tools.md#routes-and-files) | +| `analog-scan-server-functions` | Analog | read | Yes | `inspectors.analog` | [Routes and files](./tools.md#routes-and-files) | +| `analog-scan-url` | Analog | read | Yes | `inspectors.analog` | [Routes and files](./tools.md#routes-and-files) | +| `capacitor-list-calls` | Capacitor | read | No | `inspectors.capacitor` | [Capacitor](./tools.md#capacitor) | +| `capacitor-list-plugins` | Capacitor | read | No | `inspectors.capacitor` | [Capacitor](./tools.md#capacitor) | +| `explain-error` | Errors | read | No | `inspectors.errors` | [Errors](./tools.md#errors) | +| `list-console` | Errors | read | No | `inspectors.errors` | [Errors](./tools.md#errors) | +| `list-errors` | Errors | read | No | `inspectors.errors` | [Errors](./tools.md#errors) | +| `inspect-plugin` | Plugins | read | No | `inspectors.plugins` | [Plugins](./tools.md#plugins) | +| `list-plugins` | Plugins | read | No | `inspectors.plugins` | [Plugins](./tools.md#plugins) | + +## Resources + +| Resource | Inspector | Over stdio | Described in | +| ------------------------- | ---------- | ---------- | ----------------------------------------------- | +| `pangular:component-tree` | Components | No | [component-tree](./resources.md#component-tree) | +| `pangular:signal-graph` | Signals | No | [signal-graph](./resources.md#signal-graph) | +| `pangular:injector-tree` | Injectors | No | [injector-tree](./resources.md#injector-tree) | +| `pangular:ngrx-store` | NgRx Store | No | [ngrx-store](./resources.md#ngrx-store) | +| `pangular:forms` | Forms | No | [forms](./resources.md#forms) | +| `pangular:router` | Router | No | [router](./resources.md#router) | +| `pangular:pipe-usages` | Pipes | Yes | [pipe-usages](./resources.md#pipe-usages) | + +## Where to next + + + + + + diff --git a/apps/docs/src/content/agents/tools.md b/apps/docs/src/content/agents/tools.md index 9275b417..d3593229 100644 --- a/apps/docs/src/content/agents/tools.md +++ b/apps/docs/src/content/agents/tools.md @@ -19,7 +19,7 @@ The server's [prompts](./mcp-server.md#prompts) chain these tools into ready wor Tool ids use a colon, as `pangular:scan-routes`. MCP clients see them with an underscore, as `pangular_scan-routes`. The tables below drop the `pangular:` prefix. The `read` tools are also registered on the page under the same names, for [browser agents](./browser-agents.md). -Each tool has a short title that clients show in their tool lists. Every tool answers with one plain text block: markdown, or compact JSON for a source scan. See [Titles and answers](./mcp-server.md#titles-and-answers). +The [Tool index](./tool-index.md) lists every tool with its inspector, tier and transports, generated from the server's own list. Each tool has a short title that clients show in their tool lists. Every tool answers with one plain text block: markdown, or compact JSON for a source scan. See [Titles and answers](./mcp-server.md#titles-and-answers). ### Source and live tools diff --git a/apps/docs/src/content/api/capacitor-hook.md b/apps/docs/src/content/api/capacitor-hook.md new file mode 100644 index 00000000..0cac12ca --- /dev/null +++ b/apps/docs/src/content/api/capacitor-hook.md @@ -0,0 +1,22 @@ +--- +title: '@pangular-inspector/devtools/capacitor-hook' +description: 'Every symbol the @pangular-inspector/devtools/capacitor-hook entry point exports, with its declaration and JSDoc, generated from the package source.' +--- + + + The symbols @pangular-inspector/devtools/capacitor-hook exports, generated from the package source. + + +# @pangular-inspector/devtools/capacitor-hook + +Import from `@pangular-inspector/devtools/capacitor-hook`. This page is generated from [`packages/devtools/src/capacitor-hook.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/capacitor-hook.ts) and the files it re-exports. Run `pnpm docs:api` after you change the public API. + +## installCapacitorHook + +Function. Source: [`packages/devtools/src/capacitor-hook.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/capacitor-hook.ts). + +Starts logging plugin calls now. Safe to call more than once. + +```ts +function installCapacitorHook(options: Pick = {}): void; +``` diff --git a/apps/docs/src/content/api/cd-data.md b/apps/docs/src/content/api/cd-data.md new file mode 100644 index 00000000..9dced33c --- /dev/null +++ b/apps/docs/src/content/api/cd-data.md @@ -0,0 +1,316 @@ +--- +title: '@pangular-inspector/devtools/cd-data' +description: 'Every symbol the @pangular-inspector/devtools/cd-data entry point exports, with its declaration and JSDoc, generated from the package source.' +--- + + + The symbols @pangular-inspector/devtools/cd-data exports, generated from the package source. + + +# @pangular-inspector/devtools/cd-data + +Import from `@pangular-inspector/devtools/cd-data`. This page is generated from [`packages/devtools/src/cd-data.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/cd-data.ts) and the files it re-exports. Run `pnpm docs:api` after you change the public API. + +## CD_CAUSE_KINDS + +Constant. Source: [`packages/devtools/src/cd-data.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/cd-data.ts). + +Every cause kind, in the order the panel and the agent tool list them. + +```ts +const CD_CAUSE_KINDS: readonly CdCauseKind[]; +``` + +## CD_CAUSE_LABEL + +Constant. Source: [`packages/devtools/src/cd-data.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/cd-data.ts). + +How the panel and the agent tool name each cause kind. + +```ts +const CD_CAUSE_LABEL: Record; +``` + +## CD_EXPORT_FORMAT + +Constant. Source: [`packages/devtools/src/cd-data.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/cd-data.ts). + +The `format` of a recording file, so an import can tell it apart from other JSON. + +```ts +const CD_EXPORT_FORMAT: 'pangular-inspector/change-detection'; +``` + +## CD_HINT_MAX_CHANGED + +Constant. Source: [`packages/devtools/src/cd-data.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/cd-data.ts). + +The share of refreshed checks that may change something for the OnPush hint. + +```ts +const CD_HINT_MAX_CHANGED: 0.2; +``` + +## CD_HINT_MIN_CHECKS + +Constant. Source: [`packages/devtools/src/cd-data.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/cd-data.ts). + +Refreshed checks a class needs before the OnPush hint looks at it. + +```ts +const CD_HINT_MIN_CHECKS: 10; +``` + +## CD_SPAN_KIND + +Constant. Source: [`packages/devtools/src/cd-data.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/cd-data.ts). + +What each `CdSpan` kind letter means. + +```ts +const CD_SPAN_KIND: { + readonly component: 'c'; + readonly hook: 'h'; + readonly afterRender: 'r'; + readonly output: 'o'; +}; +``` + +## cdCauseText + +Function. Source: [`packages/devtools/src/cd-data.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/cd-data.ts). + +One line on what started a cycle, such as `click on button in Cart (add), wrote count`. + +```ts +function cdCauseText(reason: CdCause): string; +``` + +## cdExportFile + +Function. Source: [`packages/devtools/src/cd-data.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/cd-data.ts). + +A recording as a JSON file, with only the recording's own fields. Host +counts are left out: their element ids only mean something in the page +that recorded them. + +```ts +function cdExportFile( + recording: CdRecording, + pageId: string, + exportedAt = Date.now(), +): CdExportFile; +``` + +## CdExportFile + +Interface. Source: [`packages/devtools/src/cd-data.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/cd-data.ts). + +```ts +interface CdExportFile { + format: typeof CD_EXPORT_FORMAT; + version: 1; + /** When the file was written, in ms since the epoch. */ + exportedAt: number; + pageId: string; + recording: CdRecording; +} +``` + +## CdHint + +Interface. Source: [`packages/devtools/src/cd-data.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/cd-data.ts). + +A suggestion from a recording's diagnosis. + +```ts +interface CdHint { + /** The component class it is about. */ + name: string; + kind: 'on-push' | 'already-on-push' | 'in-place' | 'same-contents' | 'zone'; + text: string; +} +``` + +## cdHints + +Function. Source: [`packages/devtools/src/cd-data.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/cd-data.ts). + +Suggestions from a diagnosis: OnPush for classes refreshed often that +rarely change, inputs mutated in place or renewed with equal contents, and +components that only zone.js keeps up to date. + +```ts +function cdHints(diagnosis: CdDiagnosis | undefined): CdHint[]; +``` + +## CdOptionsRequest + +Interface. Source: [`packages/devtools/src/cd-data.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/cd-data.ts). + +A `change-detection-options` request; a missing field leaves that view as it is. + +```ts +interface CdOptionsRequest { + flash?: boolean; + track?: boolean; + /** Only `true` does anything: Angular has no way to turn its profiling off again. */ + angularProfiling?: boolean; +} +``` + +## cdSlowMs + +Function. Source: [`packages/devtools/src/cd-data.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/cd-data.ts). + +A recording's `slowMs`, or the default when it names none or one out of range. + +```ts +function cdSlowMs(value: unknown): number; +``` + +## CdTraceEvent + +Interface. Source: [`packages/devtools/src/cd-data.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/cd-data.ts). + +One event of the Trace Event Format that Perfetto and `chrome://tracing` read. + +```ts +interface CdTraceEvent { + name: string; + /** `X` is a complete event with `dur`, `M` a metadata event that names a process or thread. */ + ph: 'X' | 'M'; + pid: number; + tid: number; + /** Microseconds. */ + ts?: number; + /** Microseconds. */ + dur?: number; + cat?: string; + args?: Record; +} +``` + +## cdTraceFile + +Function. Source: [`packages/devtools/src/cd-data.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/cd-data.ts). + +A recording in the Trace Event Format, for Perfetto (ui.perfetto.dev) or +`chrome://tracing`: one complete (`X`) event per cycle, one per kept span +(component check, lifecycle hook, afterRender) nested inside it, and the +output listeners that started cycles on a thread of their own. Times are in +microseconds from the first cycle. + +```ts +function cdTraceFile(recording: CdRecording, pageId: string): CdTraceFile; +``` + +## CdTraceFile + +Interface. Source: [`packages/devtools/src/cd-data.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/cd-data.ts). + +```ts +interface CdTraceFile { + traceEvents: CdTraceEvent[]; + displayTimeUnit: 'ms'; + otherData: Record; +} +``` + +## DEFAULT_CD_SLOW_MS + +Constant. Source: [`packages/devtools/src/cd-data.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/cd-data.ts). + +The slow cycle threshold of a recording that names none, such as one from a +page older than `limits.cdSlowMs`. Matches that limit's default. + +```ts +const DEFAULT_CD_SLOW_MS: 16; +``` + +## MAX_CD_IMPORT_BYTES + +Constant. Source: [`packages/devtools/src/cd-data.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/cd-data.ts). + +Files larger than this are not read. + +```ts +const MAX_CD_IMPORT_BYTES: 20000000; +``` + +## MAX_SPANS + +Constant. Source: [`packages/devtools/src/cd-data.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/cd-data.ts). + +Spans a cycle keeps, the longest ones. The recorder uses the same cap. + +```ts +const MAX_SPANS: 40; +``` + +## parseCdImport + +Function. Source: [`packages/devtools/src/cd-data.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/cd-data.ts). + +Reads a recording file: an export from the panel or the agent tool, or a +bare recording. Everything in it goes through `sanitizeCdRecording`. + +```ts +function parseCdImport( + json: string, + maxCycles: number, +): + | {ok: true; pageId: string; exportedAt?: number; recording: CdRecording} + | {ok: false; error: string}; +``` + +## sanitizeCdDiagnosis + +Function. Source: [`packages/devtools/src/cd-data.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/cd-data.ts). + +Checks a recording's `diagnosis`; undefined when there is none. + +```ts +function sanitizeCdDiagnosis(value: unknown): CdDiagnosis | undefined; +``` + +## sanitizeCdRecording + +Function. Source: [`packages/devtools/src/cd-data.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/cd-data.ts). + +Checks a recording from a page push or a file: known fields only, strings +cut, numbers finite and lists capped. Null when `value` is not an object. + +```ts +function sanitizeCdRecording(value: unknown, maxCycles: number): CdRecording | null; +``` + +## toCdOptions + +Function. Source: [`packages/devtools/src/cd-data.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/cd-data.ts). + +The views a page reports it has on, with only the known boolean fields. + +```ts +function toCdOptions(value: unknown): CdOptions | undefined; +``` + +## toCdOptionsRequest + +Function. Source: [`packages/devtools/src/cd-data.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/cd-data.ts). + +Reads an options request from the wire, keeping only the fields it knows. + +```ts +function toCdOptionsRequest(value: unknown): CdOptionsRequest; +``` + +## UNNAMED_SIGNAL + +Constant. Source: [`packages/devtools/src/cd-data.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/cd-data.ts). + +What a cause holds for a signal written without a `debugName`. + +```ts +const UNNAMED_SIGNAL: '?'; +``` diff --git a/apps/docs/src/content/api/cli.md b/apps/docs/src/content/api/cli.md new file mode 100644 index 00000000..cde01399 --- /dev/null +++ b/apps/docs/src/content/api/cli.md @@ -0,0 +1,108 @@ +--- +title: '@pangular-inspector/devtools/cli' +description: 'Every symbol the @pangular-inspector/devtools/cli entry point exports, with its declaration and JSDoc, generated from the package source.' +--- + + + The symbols @pangular-inspector/devtools/cli exports, generated from the package source. + + +# @pangular-inspector/devtools/cli + +Import from `@pangular-inspector/devtools/cli`. This page is generated from [`packages/devtools/src/entries/cli.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/entries/cli.ts) and the files it re-exports. Run `pnpm docs:api` after you change the public API. + +## buildReport + +Function. Source: [`packages/devtools/src/build-report.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/build-report.ts). + +Writes the static report that `pangular build` writes, from a script: the +panel with the source scan baked in (components, routes, signals, +providers, pipes, NgRx declarations and build metadata). It does not change +the working directory, so it can run inside a Vite or Analog build hook. + +```ts +import {buildReport} from '@pangular-inspector/devtools/cli'; + +await buildReport({outDir: 'dist/devtools-report'}); +``` + +```ts +async function buildReport(options: BuildReportOptions = {}): Promise; +``` + +## BuildReportOptions + +Interface. Source: [`packages/devtools/src/build-report.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/build-report.ts). + +```ts +interface BuildReportOptions { + /** + * The folder the report goes into, relative to the working directory. + * Defaults to `dist-static`, as `pangular build` does. The build empties it + * first, so it refuses a folder that is not empty and not a previous report, + * unless `force` is set. + */ + outDir?: string; + /** The project folder the source scans read. Defaults to the working directory. */ + root?: string; + /** + * The devtools config. Without it, `pangular.config.json` in `root` is read + * when it exists, as the CLI does. + */ + config?: PangularConfig; + /** Empty `outDir` even when it is not a previous report. */ + force?: boolean; + /** Pretty-print the JSON files of the report, to read or diff them by hand. */ + pretty?: boolean; + /** A folder with a panel build to copy instead of the one this package ships. */ + distDir?: string; +} +``` + +## BuildReportResult + +Interface. Source: [`packages/devtools/src/build-report.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/build-report.ts). + +```ts +interface BuildReportResult { + /** The absolute path of the report folder. */ + outDir: string; + /** The absolute path of the project folder that was scanned. */ + root: string; +} +``` + +## createPangularCli + +Function. Source: [`packages/devtools/src/cli.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/cli.ts). + +The `pangular` command line: `dev` (the default), `build`, `mcp`, `skills` +and `lint`, with `--root`, `--config` and `--read-only` on each. + +```ts +function createPangularCli(options: PangularCliOptions = {}): { + cli: CAC; + parse(argv?: string[]): Promise; +}; +``` + +## DEFAULT_REPORT_DIR + +Constant. Source: [`packages/devtools/src/build-report.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/build-report.ts). + +Where `buildReport()` and `pangular build` write the report when no folder is given. + +```ts +const DEFAULT_REPORT_DIR: 'dist-static'; +``` + +## PangularCliOptions + +Interface. Source: [`packages/devtools/src/cli.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/cli.ts). + +```ts +interface PangularCliOptions { + env?: Env; + log?: (message: string) => void; +} +``` diff --git a/apps/docs/src/content/api/config.md b/apps/docs/src/content/api/config.md new file mode 100644 index 00000000..a463d0c5 --- /dev/null +++ b/apps/docs/src/content/api/config.md @@ -0,0 +1,276 @@ +--- +title: '@pangular-inspector/devtools/config' +description: 'Every symbol the @pangular-inspector/devtools/config entry point exports, with its declaration and JSDoc, generated from the package source.' +--- + + + The symbols @pangular-inspector/devtools/config exports, generated from the package source. + + +# @pangular-inspector/devtools/config + +Import from `@pangular-inspector/devtools/config`. This page is generated from [`packages/devtools/src/entries/config.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/entries/config.ts) and the files it re-exports. Run `pnpm docs:api` after you change the public API. + +## DEFAULT_POPUP_HOTKEY + +Constant. Source: [`packages/devtools/src/config.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/config.ts). + +The popup shortcut when `popup.hotkey` is left out. + +```ts +const DEFAULT_POPUP_HOTKEY: 'Alt+Shift+P'; +``` + +## PANGULAR_ACTIONS + +Constant. Source: [`packages/devtools/src/config.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/config.ts). + +```ts +const PANGULAR_ACTIONS: readonly [ + 'forms', + 'router', + 'ngrx', + 'http', + 'analog', + 'components', + 'tanstackQuery', + 'plugins', +]; +``` + +## PANGULAR_INSPECTORS + +Constant. Source: [`packages/devtools/src/config.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/config.ts). + +```ts +const PANGULAR_INSPECTORS: readonly [ + 'components', + 'injectors', + 'signals', + 'ngrx', + 'tanstackQuery', + 'forms', + 'router', + 'pipes', + 'http', + 'analog', + 'capacitor', + 'errors', + 'plugins', +]; +``` + +## PANGULAR_LIMITS + +Constant. Source: [`packages/devtools/src/config.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/config.ts). + +Default, minimum and maximum of each `limits` option. Values outside are clamped. + +```ts +const PANGULAR_LIMITS: { + readonly refreshMs: {readonly default: 3000; readonly min: 500; readonly max: 8000}; + readonly navigations: {readonly default: 50; readonly min: 5; readonly max: 500}; + readonly formTimeline: {readonly default: 200; readonly min: 10; readonly max: 2000}; + readonly httpCalls: {readonly default: 200; readonly min: 10; readonly max: 2000}; + readonly changeLog: {readonly default: 200; readonly min: 10; readonly max: 2000}; + readonly cdCycles: {readonly default: 200; readonly min: 10; readonly max: 2000}; + readonly cdSlowMs: {readonly default: 16; readonly min: 1; readonly max: 1000}; + readonly capacitorCalls: {readonly default: 200; readonly min: 10; readonly max: 2000}; + readonly idleAfterMs: {readonly default: 60000; readonly min: 0; readonly max: 600000}; +}; +``` + +## PangularAction + +Type. Source: [`packages/devtools/src/config.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/config.ts). + +```ts +type PangularAction = (typeof PANGULAR_ACTIONS)[number]; +``` + +## PangularConfig + +Interface. Source: [`packages/devtools/src/config.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/config.ts). + +Options shared by `initPangularHub()`, the Vite plugin and +`createPangular()`. Everything is on when left out. + +```ts +interface PangularConfig { + /** Turn an inspector off: no tab or dock, no page collector, no RPC and no agent tools. */ + inspectors?: Partial>; + agent?: { + /** Drop every agent tool that is not a `read` tool (see `AgentSafety`). */ + readOnly?: boolean; + /** Hide one inspector's agent tools and resources while keeping its tab. */ + tools?: Partial>; + /** + * Register the `read` agent tools on the page for browser agents, through + * WebMCP (`document.modelContext`) and Chrome DevTools for agents + * (`devtoolstooldiscovery`). Off by default, since any script on the page could + * then call them; `true` turns them on. This is where the switch starts: + * **Browser agent tools** in the panel's Settings changes it for every + * page until the server restarts. + */ + browserTools?: boolean; + }; + /** Allow or block writes from the panel and the agent. `false` blocks them all. */ + actions?: boolean | Partial>; + redaction?: { + /** + * Field names to treat as secret on top of the built-in list, matched by + * words like it: `passport` also covers `passportNumber`. + */ + secretNames?: string[]; + /** Field names to show even when they look secret, like `window.__PANGULAR_FORMS__.unmask`. */ + unmask?: string[]; + /** + * Also mask high-entropy strings that no name or shape rule catches, such + * as an opaque token in a harmless-looking field. Off by default. Hex + * values (hashes, UUIDs), ULIDs and camelCase identifiers stay readable. + * `true` uses runs of 24 characters or more and 4.5 bits per character; + * an object sets `minLength` (16 to 512) and `threshold` (2 to 6 bits). + */ + entropy?: boolean | {minLength?: number; threshold?: number}; + }; + limits?: { + /** + * How often the page polls for changes, in ms, when it can't follow change + * detection, such as before the app bootstraps. Also sets the + * Analog runtime refresh. Default 3000, from 500 to 8000. + */ + refreshMs?: number; + /** Navigations kept per page. Default 50. */ + navigations?: number; + /** Form timeline events kept. Default 200. */ + formTimeline?: number; + /** HTTP calls kept per page and on the server. Default 200. */ + httpCalls?: number; + /** NgRx change log entries kept per page. Default 200. */ + changeLog?: number; + /** Change detection cycles kept per page while recording. Default 200. */ + cdCycles?: number; + /** + * A change detection cycle longer than this, in ms, counts as slow: the + * recording flags it and the chart draws it over the line. Default 16 + * (about one frame at 60 frames per second), from 1 to 1000. + */ + cdSlowMs?: number; + /** Capacitor plugin calls kept per page and on the server. Default 200. */ + capacitorCalls?: number; + /** + * How long, in ms, pages keep sending the component tree, injectors, + * change detection and forms after an agent's last call when no panel is + * open. Idle pages only say they are still there, and send everything + * again when a panel opens or an agent asks. `0` keeps them sending all + * the time. Default 60000, up to 600000. + */ + idleAfterMs?: number; + }; + popup?: { + /** + * The keyboard shortcut that opens and closes the floating panel on the + * page, such as `Alt+Shift+P` (the default) or `Mod+Shift+I`. `Mod` is + * Cmd on macOS and Ctrl elsewhere. `false` turns the shortcut off. + */ + hotkey?: string | false; + }; + /** + * Turn one Pangular plugin off, by its id, or only its agent tools or its + * actions: `{ travel: false }` or `{ travel: { actions: false } }`. + * `inspectors.plugins: false` turns every plugin off. + */ + plugins?: Record; + /** Turn individual lint rules off: `{ 'img-missing-alt': false }`. */ + lint?: { + /** Rule status by rule name. `false` turns the rule off; `true` or omitted keeps it on. */ + rules?: Record; + }; + analog?: { + /** + * A JSON Schema file, relative to the Analog project root, that the + * frontmatter of every markdown file under `src/content` must match, such + * as `content.schema.json`. The Content tab and `analog-lint` report the + * files that don't. Left out, the frontmatter is only checked for syntax. + */ + contentSchema?: string; + }; + ngrx?: { + /** + * Record where each NgRx change log entry came from: the app frames of the + * dispatch, method call or `patchState`, with origins and query strings + * removed and secrets masked. Off by default, since taking a stack on every + * write costs time. + */ + trace?: boolean; + }; +} +``` + +## PangularInspector + +Type. Source: [`packages/devtools/src/config.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/config.ts). + +```ts +type PangularInspector = (typeof PANGULAR_INSPECTORS)[number]; +``` + +## PangularLimit + +Type. Source: [`packages/devtools/src/config.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/config.ts). + +```ts +type PangularLimit = keyof typeof PANGULAR_LIMITS; +``` + +## PluginSwitchInput + +Interface. Source: [`packages/devtools/src/config.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/config.ts). + +What a `plugins` entry can turn off; each is on when left out. + +```ts +interface PluginSwitchInput { + enabled?: boolean; + /** The plugin's agent tools. */ + tools?: boolean; + /** The plugin's actions: page actions run from the panel and its action agent tools. */ + actions?: boolean; +} +``` + +## ResolvedPangularConfig + +Interface. Source: [`packages/devtools/src/config.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/config.ts). + +```ts +interface ResolvedPangularConfig { + inspectors: Record; + agent: { + readOnly: boolean; + tools: Record; + browserTools: boolean; + }; + actions: Record; + /** `entropy` is set only when it is on, so a default config keeps its two lists. */ + redaction: {secretNames: string[]; unmask: string[]; entropy?: EntropyOptions}; + limits: Record; + popup: {hotkey: string | false}; + /** The `plugins` entries that were given, by plugin id. */ + plugins: Record; + lint: { + rules: Record; + }; + /** `contentSchema` is left out when it is not set. */ + analog: {contentSchema?: string}; + ngrx: {trace: boolean}; +} +``` + +## resolvePangularConfig + +Function. Source: [`packages/devtools/src/config.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/config.ts). + +```ts +function resolvePangularConfig(config?: unknown): ResolvedPangularConfig; +``` diff --git a/apps/docs/src/content/api/devframe.md b/apps/docs/src/content/api/devframe.md new file mode 100644 index 00000000..d43241d5 --- /dev/null +++ b/apps/docs/src/content/api/devframe.md @@ -0,0 +1,348 @@ +--- +title: '@pangular-inspector/devtools/devframe' +description: 'Every symbol the @pangular-inspector/devtools/devframe entry point exports, with its declaration and JSDoc, generated from the package source.' +--- + + + The symbols @pangular-inspector/devtools/devframe exports, generated from the package source. + + +# @pangular-inspector/devtools/devframe + +Import from `@pangular-inspector/devtools/devframe`. This page is generated from [`packages/devtools/src/entries/devframe.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/entries/devframe.ts) and the files it re-exports. Run `pnpm docs:api` after you change the public API. + +## createPangular + +Function. Source: [`packages/devtools/src/devframe.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/devframe.ts). + +```ts +function createPangular( + options: PangularConfig = {}, + host: PangularHostOptions = {}, +): import('devframe').DevframeDefinition; +``` + +## default + +Constant. Source: [`packages/devtools/src/devframe.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/devframe.ts). + +```ts +const pangular: import('devframe').DevframeDefinition; +``` + +## DEFAULT_POPUP_HOTKEY + +Constant. Source: [`packages/devtools/src/config.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/config.ts). + +The popup shortcut when `popup.hotkey` is left out. + +```ts +const DEFAULT_POPUP_HOTKEY: 'Alt+Shift+P'; +``` + +## initDevframe + +Function. Re-exported from the `devframe` package. + +Serve a devframe through one framework-agnostic, web-standard handler: +the SPA, `__connection.json` discovery, the WebSocket RPC endpoint, the +auth gate, and the optional MCP route, all under a single mount base. +Mount `handler` on any framework's catch-all route (or `nodeMiddleware` on +a connect stack) and the devframe is live inside that app. + +The factory is synchronous and kicks off initialization eagerly; +`handler`/`nodeMiddleware` await readiness internally. Nothing binds a port +on its own: the WebSocket resolves in precedence order: `ws.port` (pinned +side-car) > `server` (shared upgrade at `__ws`) > `ws.sidecar` +(auto-port side-car) > the host driving upgrades itself through +`DevframeInstance.attach`. Meanwhile `ws.url`, when set, overrides the +advertised* endpoint (the tunnel pattern) and on its own hands the whole +transport to an external server. `__connection.json` reflects whichever +combination is active. + +```ts +function initDevframe(def: DevframeDefinition, options: InitDevframeOptions): DevframeInstance; +``` + +## PANGULAR_ACTIONS + +Constant. Source: [`packages/devtools/src/config.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/config.ts). + +```ts +const PANGULAR_ACTIONS: readonly [ + 'forms', + 'router', + 'ngrx', + 'http', + 'analog', + 'components', + 'tanstackQuery', + 'plugins', +]; +``` + +## PANGULAR_INSPECTORS + +Constant. Source: [`packages/devtools/src/config.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/config.ts). + +```ts +const PANGULAR_INSPECTORS: readonly [ + 'components', + 'injectors', + 'signals', + 'ngrx', + 'tanstackQuery', + 'forms', + 'router', + 'pipes', + 'http', + 'analog', + 'capacitor', + 'errors', + 'plugins', +]; +``` + +## PANGULAR_LIMITS + +Constant. Source: [`packages/devtools/src/config.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/config.ts). + +Default, minimum and maximum of each `limits` option. Values outside are clamped. + +```ts +const PANGULAR_LIMITS: { + readonly refreshMs: {readonly default: 3000; readonly min: 500; readonly max: 8000}; + readonly navigations: {readonly default: 50; readonly min: 5; readonly max: 500}; + readonly formTimeline: {readonly default: 200; readonly min: 10; readonly max: 2000}; + readonly httpCalls: {readonly default: 200; readonly min: 10; readonly max: 2000}; + readonly changeLog: {readonly default: 200; readonly min: 10; readonly max: 2000}; + readonly cdCycles: {readonly default: 200; readonly min: 10; readonly max: 2000}; + readonly cdSlowMs: {readonly default: 16; readonly min: 1; readonly max: 1000}; + readonly capacitorCalls: {readonly default: 200; readonly min: 10; readonly max: 2000}; + readonly idleAfterMs: {readonly default: 60000; readonly min: 0; readonly max: 600000}; +}; +``` + +## PangularAction + +Type. Source: [`packages/devtools/src/config.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/config.ts). + +```ts +type PangularAction = (typeof PANGULAR_ACTIONS)[number]; +``` + +## PangularConfig + +Interface. Source: [`packages/devtools/src/config.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/config.ts). + +Options shared by `initPangularHub()`, the Vite plugin and +`createPangular()`. Everything is on when left out. + +```ts +interface PangularConfig { + /** Turn an inspector off: no tab or dock, no page collector, no RPC and no agent tools. */ + inspectors?: Partial>; + agent?: { + /** Drop every agent tool that is not a `read` tool (see `AgentSafety`). */ + readOnly?: boolean; + /** Hide one inspector's agent tools and resources while keeping its tab. */ + tools?: Partial>; + /** + * Register the `read` agent tools on the page for browser agents, through + * WebMCP (`document.modelContext`) and Chrome DevTools for agents + * (`devtoolstooldiscovery`). Off by default, since any script on the page could + * then call them; `true` turns them on. This is where the switch starts: + * **Browser agent tools** in the panel's Settings changes it for every + * page until the server restarts. + */ + browserTools?: boolean; + }; + /** Allow or block writes from the panel and the agent. `false` blocks them all. */ + actions?: boolean | Partial>; + redaction?: { + /** + * Field names to treat as secret on top of the built-in list, matched by + * words like it: `passport` also covers `passportNumber`. + */ + secretNames?: string[]; + /** Field names to show even when they look secret, like `window.__PANGULAR_FORMS__.unmask`. */ + unmask?: string[]; + /** + * Also mask high-entropy strings that no name or shape rule catches, such + * as an opaque token in a harmless-looking field. Off by default. Hex + * values (hashes, UUIDs), ULIDs and camelCase identifiers stay readable. + * `true` uses runs of 24 characters or more and 4.5 bits per character; + * an object sets `minLength` (16 to 512) and `threshold` (2 to 6 bits). + */ + entropy?: boolean | {minLength?: number; threshold?: number}; + }; + limits?: { + /** + * How often the page polls for changes, in ms, when it can't follow change + * detection, such as before the app bootstraps. Also sets the + * Analog runtime refresh. Default 3000, from 500 to 8000. + */ + refreshMs?: number; + /** Navigations kept per page. Default 50. */ + navigations?: number; + /** Form timeline events kept. Default 200. */ + formTimeline?: number; + /** HTTP calls kept per page and on the server. Default 200. */ + httpCalls?: number; + /** NgRx change log entries kept per page. Default 200. */ + changeLog?: number; + /** Change detection cycles kept per page while recording. Default 200. */ + cdCycles?: number; + /** + * A change detection cycle longer than this, in ms, counts as slow: the + * recording flags it and the chart draws it over the line. Default 16 + * (about one frame at 60 frames per second), from 1 to 1000. + */ + cdSlowMs?: number; + /** Capacitor plugin calls kept per page and on the server. Default 200. */ + capacitorCalls?: number; + /** + * How long, in ms, pages keep sending the component tree, injectors, + * change detection and forms after an agent's last call when no panel is + * open. Idle pages only say they are still there, and send everything + * again when a panel opens or an agent asks. `0` keeps them sending all + * the time. Default 60000, up to 600000. + */ + idleAfterMs?: number; + }; + popup?: { + /** + * The keyboard shortcut that opens and closes the floating panel on the + * page, such as `Alt+Shift+P` (the default) or `Mod+Shift+I`. `Mod` is + * Cmd on macOS and Ctrl elsewhere. `false` turns the shortcut off. + */ + hotkey?: string | false; + }; + /** + * Turn one Pangular plugin off, by its id, or only its agent tools or its + * actions: `{ travel: false }` or `{ travel: { actions: false } }`. + * `inspectors.plugins: false` turns every plugin off. + */ + plugins?: Record; + /** Turn individual lint rules off: `{ 'img-missing-alt': false }`. */ + lint?: { + /** Rule status by rule name. `false` turns the rule off; `true` or omitted keeps it on. */ + rules?: Record; + }; + analog?: { + /** + * A JSON Schema file, relative to the Analog project root, that the + * frontmatter of every markdown file under `src/content` must match, such + * as `content.schema.json`. The Content tab and `analog-lint` report the + * files that don't. Left out, the frontmatter is only checked for syntax. + */ + contentSchema?: string; + }; + ngrx?: { + /** + * Record where each NgRx change log entry came from: the app frames of the + * dispatch, method call or `patchState`, with origins and query strings + * removed and secrets masked. Off by default, since taking a stack on every + * write costs time. + */ + trace?: boolean; + }; +} +``` + +## PangularHostOptions + +Interface. Source: [`packages/devtools/src/devframe.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/devframe.ts). + +```ts +interface PangularHostOptions { + /** + * Register the agent tools and resources that need a connected page. Off + * for the stdio MCP server, which no page can reach. + */ + pageTools?: boolean; + /** + * Pairing tokens a client may send to be trusted without the one-time code. + * Server-only: they never go into the published config. + */ + authTokens?: string[]; + /** Server plugins: agent tools and shared state of Pangular plugins (`plugin.ts`). */ + serverPlugins?: readonly PangularServerPlugin[]; + /** How the host lets clients in, for the Dashboard's security status (`security-status.ts`). */ + security?: PangularSecurityHost; + /** + * The folder the server scans, when it holds no Angular project (a wrong + * `--root`). Source scan tools then refuse and name it, so the agent sees + * why they would come back empty. + */ + notAProject?: string; +} +``` + +## PangularInspector + +Type. Source: [`packages/devtools/src/config.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/config.ts). + +```ts +type PangularInspector = (typeof PANGULAR_INSPECTORS)[number]; +``` + +## PangularLimit + +Type. Source: [`packages/devtools/src/config.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/config.ts). + +```ts +type PangularLimit = keyof typeof PANGULAR_LIMITS; +``` + +## PluginSwitchInput + +Interface. Source: [`packages/devtools/src/config.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/config.ts). + +What a `plugins` entry can turn off; each is on when left out. + +```ts +interface PluginSwitchInput { + enabled?: boolean; + /** The plugin's agent tools. */ + tools?: boolean; + /** The plugin's actions: page actions run from the panel and its action agent tools. */ + actions?: boolean; +} +``` + +## ResolvedPangularConfig + +Interface. Source: [`packages/devtools/src/config.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/config.ts). + +```ts +interface ResolvedPangularConfig { + inspectors: Record; + agent: { + readOnly: boolean; + tools: Record; + browserTools: boolean; + }; + actions: Record; + /** `entropy` is set only when it is on, so a default config keeps its two lists. */ + redaction: {secretNames: string[]; unmask: string[]; entropy?: EntropyOptions}; + limits: Record; + popup: {hotkey: string | false}; + /** The `plugins` entries that were given, by plugin id. */ + plugins: Record; + lint: { + rules: Record; + }; + /** `contentSchema` is left out when it is not set. */ + analog: {contentSchema?: string}; + ngrx: {trace: boolean}; +} +``` + +## resolvePangularConfig + +Function. Source: [`packages/devtools/src/config.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/config.ts). + +```ts +function resolvePangularConfig(config?: unknown): ResolvedPangularConfig; +``` diff --git a/apps/docs/src/content/api/http.md b/apps/docs/src/content/api/http.md new file mode 100644 index 00000000..a23b9ba7 --- /dev/null +++ b/apps/docs/src/content/api/http.md @@ -0,0 +1,99 @@ +--- +title: '@pangular-inspector/devtools/http' +description: 'Every symbol the @pangular-inspector/devtools/http entry point exports, with its declaration and JSDoc, generated from the package source.' +--- + + + The symbols @pangular-inspector/devtools/http exports, generated from the package source. + + +# @pangular-inspector/devtools/http + +Import from `@pangular-inspector/devtools/http`. This page is generated from [`packages/devtools/src/entries/http.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/entries/http.ts) and the files it re-exports. Run `pnpm docs:api` after you change the public API. + +## HttpTransferCacheOptions + +Interface. Re-exported from the `@angular/common` package. + +Options to configure how TransferCache should be used to cache requests made via HttpClient. + +```ts +interface HttpTransferCacheOptions { + /** + * A function that receives a request as an argument and returns a boolean to indicate + * whether a request should be included into the cache. + */ + filter?: (req: HttpRequest) => boolean; + /** + * Specifies which headers should be included into cached responses. No headers are included by default. + */ + includeHeaders?: string[]; + /** + * Enables caching for `POST` requests. By default, only `GET` and `HEAD` requests are cached. + * This option can be enabled if `POST` requests are used to retrieve data (for example using `GraphQL`). + */ + includePostRequests?: boolean; + /** + * Enables caching of requests containing `Authorization`, `Proxy-Authorization`, or `Cookie` headers. + * By default, these requests are excluded from caching. + */ + includeRequestsWithAuthHeaders?: boolean; + /** + * Enables caching of requests sent using `withCredentials` or Fetch API `credentials` modes (`include` or `same-origin`). + * By default, these requests are excluded from caching. + */ + includeRequestsWithCredentials?: boolean; + /** + * Enables caching of requests and responses with `Cache-Control` directives that forbid caching + * (such as `no-cache`, `no-store`, or `private`), responses with a `Set-Cookie` header, or requests using Fetch API `no-cache` or `no-store` modes. + * By default, these requests/responses are excluded from caching. + */ + includeNonCacheableRequests?: boolean; +} +``` + +## PangularHttpOptions + +Interface. Source: [`packages/devtools/src/http.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/http.ts). + +Options for `withPangular()`. + +```ts +interface PangularHttpOptions { + /** + * Options for Angular's HTTP transfer cache, the same as + * `withHttpTransferCacheOptions()` takes. They are passed to the cache that + * `provideClientHydration()` sets up, and the SSR & HTTP inspector uses them + * to explain why a request was or was not cached. + */ + transferCache?: HttpTransferCacheOptions; +} +``` + +## providePangularHttp + +Function. Source: [`packages/devtools/src/http.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/http.ts). + +Captures hydration warnings (NG05xx) before the overlay loads. During a +server render traced by `ssrMiddleware`, it also records the router's guard +and resolver timings and applies render-error overrides from the panel. +Add it next to `provideHttpClient(withPangular())`. + +```ts +function providePangularHttp(): EnvironmentProviders; +``` + +## withPangular + +Function. Source: [`packages/devtools/src/http.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/http.ts). + +`provideHttpClient(withPangular())` registers the DevTools interceptor. +`withPangular({ transferCache })` also configures Angular's transfer cache. + +```ts +function withPangular( + options: PangularHttpOptions = {}, +): import('@angular/common/http').HttpFeature< + import('@angular/common/http').HttpFeatureKind.Interceptors +>; +``` diff --git a/apps/docs/src/content/api/hub.md b/apps/docs/src/content/api/hub.md new file mode 100644 index 00000000..1bb07cd7 --- /dev/null +++ b/apps/docs/src/content/api/hub.md @@ -0,0 +1,206 @@ +--- +title: '@pangular-inspector/devtools/hub' +description: 'Every symbol the @pangular-inspector/devtools/hub entry point exports, with its declaration and JSDoc, generated from the package source.' +--- + + + The symbols @pangular-inspector/devtools/hub exports, generated from the package source. + + +# @pangular-inspector/devtools/hub + +Import from `@pangular-inspector/devtools/hub`. This page is generated from [`packages/devtools/src/entries/hub-source.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/entries/hub-source.ts) and the files it re-exports. Run `pnpm docs:api` after you change the public API. + +## hubEnabled + +Function. Source: [`packages/devtools/src/hub-off.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/hub-off.ts). + +`enabled`, or on unless this is production: `NODE_ENV` is `production`, or +the server is a production Angular build (`ngDevMode` is `false`), which +the Angular CLI's SSR server is even without `NODE_ENV`. + +```ts +function hubEnabled( + enabled: boolean | undefined, + env: Record = processEnv(), + warn: (message: string) => void = console.warn, + devMode: boolean = angularDevMode(), +): boolean; +``` + +## initPangularHub + +Function. Source: [`packages/devtools/src/hub.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/hub.ts). + +Mounts the devtools hub in an Express or Connect server, behind the request +gate: loopback requests only (unless `allowLan`), a loopback or allowed +`Host`, and the origin check. Off in production unless `enabled` is `true`. + +```ts +function initPangularHub(options: PangularHubOptions = {}): PangularHub; +``` + +## PANGULAR_HUB_BASE + +Constant. Source: [`packages/devtools/src/hub.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/hub.ts). + +```ts +const PANGULAR_HUB_BASE: '/__devframes/'; +``` + +## PangularConfig + +Interface. Source: [`packages/devtools/src/config.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/config.ts). + +Options shared by `initPangularHub()`, the Vite plugin and +`createPangular()`. Everything is on when left out. + +```ts +interface PangularConfig { + /** Turn an inspector off: no tab or dock, no page collector, no RPC and no agent tools. */ + inspectors?: Partial>; + agent?: { + /** Drop every agent tool that is not a `read` tool (see `AgentSafety`). */ + readOnly?: boolean; + /** Hide one inspector's agent tools and resources while keeping its tab. */ + tools?: Partial>; + /** + * Register the `read` agent tools on the page for browser agents, through + * WebMCP (`document.modelContext`) and Chrome DevTools for agents + * (`devtoolstooldiscovery`). Off by default, since any script on the page could + * then call them; `true` turns them on. This is where the switch starts: + * **Browser agent tools** in the panel's Settings changes it for every + * page until the server restarts. + */ + browserTools?: boolean; + }; + /** Allow or block writes from the panel and the agent. `false` blocks them all. */ + actions?: boolean | Partial>; + redaction?: { + /** + * Field names to treat as secret on top of the built-in list, matched by + * words like it: `passport` also covers `passportNumber`. + */ + secretNames?: string[]; + /** Field names to show even when they look secret, like `window.__PANGULAR_FORMS__.unmask`. */ + unmask?: string[]; + /** + * Also mask high-entropy strings that no name or shape rule catches, such + * as an opaque token in a harmless-looking field. Off by default. Hex + * values (hashes, UUIDs), ULIDs and camelCase identifiers stay readable. + * `true` uses runs of 24 characters or more and 4.5 bits per character; + * an object sets `minLength` (16 to 512) and `threshold` (2 to 6 bits). + */ + entropy?: boolean | {minLength?: number; threshold?: number}; + }; + limits?: { + /** + * How often the page polls for changes, in ms, when it can't follow change + * detection, such as before the app bootstraps. Also sets the + * Analog runtime refresh. Default 3000, from 500 to 8000. + */ + refreshMs?: number; + /** Navigations kept per page. Default 50. */ + navigations?: number; + /** Form timeline events kept. Default 200. */ + formTimeline?: number; + /** HTTP calls kept per page and on the server. Default 200. */ + httpCalls?: number; + /** NgRx change log entries kept per page. Default 200. */ + changeLog?: number; + /** Change detection cycles kept per page while recording. Default 200. */ + cdCycles?: number; + /** + * A change detection cycle longer than this, in ms, counts as slow: the + * recording flags it and the chart draws it over the line. Default 16 + * (about one frame at 60 frames per second), from 1 to 1000. + */ + cdSlowMs?: number; + /** Capacitor plugin calls kept per page and on the server. Default 200. */ + capacitorCalls?: number; + /** + * How long, in ms, pages keep sending the component tree, injectors, + * change detection and forms after an agent's last call when no panel is + * open. Idle pages only say they are still there, and send everything + * again when a panel opens or an agent asks. `0` keeps them sending all + * the time. Default 60000, up to 600000. + */ + idleAfterMs?: number; + }; + popup?: { + /** + * The keyboard shortcut that opens and closes the floating panel on the + * page, such as `Alt+Shift+P` (the default) or `Mod+Shift+I`. `Mod` is + * Cmd on macOS and Ctrl elsewhere. `false` turns the shortcut off. + */ + hotkey?: string | false; + }; + /** + * Turn one Pangular plugin off, by its id, or only its agent tools or its + * actions: `{ travel: false }` or `{ travel: { actions: false } }`. + * `inspectors.plugins: false` turns every plugin off. + */ + plugins?: Record; + /** Turn individual lint rules off: `{ 'img-missing-alt': false }`. */ + lint?: { + /** Rule status by rule name. `false` turns the rule off; `true` or omitted keeps it on. */ + rules?: Record; + }; + analog?: { + /** + * A JSON Schema file, relative to the Analog project root, that the + * frontmatter of every markdown file under `src/content` must match, such + * as `content.schema.json`. The Content tab and `analog-lint` report the + * files that don't. Left out, the frontmatter is only checked for syntax. + */ + contentSchema?: string; + }; + ngrx?: { + /** + * Record where each NgRx change log entry came from: the app frames of the + * dispatch, method call or `patchState`, with origins and query strings + * removed and secrets masked. Off by default, since taking a stack on every + * write costs time. + */ + trace?: boolean; + }; +} +``` + +## PangularHubOptions + +Type. Source: [`packages/devtools/src/hub.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/hub.ts). + +```ts +type PangularHubOptions = Partial> & + PangularConfig & { + /** + * The one-time code. `false` turns it off. `{tokens}` keeps it on and also + * trusts clients that send one of the tokens, such as an app on a phone. + */ + auth?: InitHubOptions['auth'] | PangularAuthTokens; + /** The app's browser build folder, so a forced Client render can serve `index.csr.html`. */ + browserDistFolder?: string; + /** + * Mount the hub. Defaults to `process.env['NODE_ENV'] !== 'production'`. When + * off, the middlewares only call `next()`. Passing `true` in production + * mounts it anyway, with a warning. + */ + enabled?: boolean; + /** + * Also answer other machines, such as a phone on Wi-Fi, under the same + * origin check. Needs the one-time code on: with `auth: false` it is + * ignored. Off by default: only this machine. + */ + allowLan?: boolean; + /** + * Add a terminals dock that runs the project's own build and test + * commands (its `build` and `test` scripts, or `ng build` and `ng test`). + * Off by default. Only on in development, with the origin check on and + * without `allowLan`. + */ + terminals?: boolean; + /** Pangular plugins' server sides: their agent tools and shared state. */ + serverPlugins?: readonly PangularServerPlugin[]; + }; +``` diff --git a/apps/docs/src/content/api/index.md b/apps/docs/src/content/api/index.md new file mode 100644 index 00000000..b6f5c9fc --- /dev/null +++ b/apps/docs/src/content/api/index.md @@ -0,0 +1,32 @@ +--- +title: API reference +description: 'The public entry points of @pangular-inspector/devtools and the symbols each one exports, generated from the package source.' +--- + + + Every public entry point of the package and the symbols it exports, generated from the source. + + +# API reference + +Each entry point of `@pangular-inspector/devtools` has a page with every symbol it exports, its declaration and its JSDoc. The pages are generated from the package source, so names and types match the published code. [Installation](../getting-started/installation.md#entry-points) says what each entry point is for, and [Configuration](../getting-started/configuration.md) explains the options. + +| Entry point | Exports | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| [`@pangular-inspector/devtools/devframe`](./devframe.md) | `createPangular`, `default`, `DEFAULT_POPUP_HOTKEY`, `initDevframe`, `PANGULAR_ACTIONS`, `PANGULAR_INSPECTORS`, `PANGULAR_LIMITS`, `PangularAction`, `PangularConfig`, `PangularHostOptions`, `PangularInspector`, `PangularLimit`, `PluginSwitchInput`, `ResolvedPangularConfig`, `resolvePangularConfig` | +| [`@pangular-inspector/devtools/config`](./config.md) | `DEFAULT_POPUP_HOTKEY`, `PANGULAR_ACTIONS`, `PANGULAR_INSPECTORS`, `PANGULAR_LIMITS`, `PangularAction`, `PangularConfig`, `PangularInspector`, `PangularLimit`, `PluginSwitchInput`, `ResolvedPangularConfig`, `resolvePangularConfig` | +| [`@pangular-inspector/devtools/cd-data`](./cd-data.md) | `CD_CAUSE_KINDS`, `CD_CAUSE_LABEL`, `CD_EXPORT_FORMAT`, `CD_HINT_MAX_CHANGED`, `CD_HINT_MIN_CHECKS`, `CD_SPAN_KIND`, `cdCauseText`, `cdExportFile`, `CdExportFile`, `CdHint`, `cdHints`, `CdOptionsRequest`, `cdSlowMs`, `CdTraceEvent`, `cdTraceFile`, `CdTraceFile`, `DEFAULT_CD_SLOW_MS`, `MAX_CD_IMPORT_BYTES`, `MAX_SPANS`, `parseCdImport`, `sanitizeCdDiagnosis`, `sanitizeCdRecording`, `toCdOptions`, `toCdOptionsRequest`, `UNNAMED_SIGNAL` | +| [`@pangular-inspector/devtools/overlay`](./overlay.md) | `disposeOverlay`, `initOverlay`, `installSignalWriteHook`, `lanDevtoolsURL`, `OverlayConnectionMeta`, `OverlayOptions`, `registerNgrxSignals` | +| [`@pangular-inspector/devtools/overlay-manual`](./overlay-manual.md) | `disposeOverlay`, `initOverlay`, `installSignalWriteHook`, `lanDevtoolsURL`, `OverlayConnectionMeta`, `OverlayOptions`, `registerNgrxSignals` | +| [`@pangular-inspector/devtools/plugin`](./plugin.md) | `definePangularServerPlugin`, `PANGULAR_PLUGIN_API_VERSION`, `PangularPagePlugin`, `PangularPluginAction`, `PangularPluginContext`, `PangularPluginPage`, `pangularPluginRegistry`, `PangularPluginRegistry`, `PangularPluginTool`, `PangularPluginToolContext`, `PangularPluginToolSafety`, `PangularServerPlugin`, `PangularServerPluginContext`, `PluginActionResult`, `PluginBadge`, `PluginCell`, `PluginListSection`, `PluginSection`, `PluginSerializeLimits`, `PluginStatsSection`, `PluginTableSection`, `PluginTextSection`, `PluginTone`, `PluginTreeSection`, `PluginView`, `PluginViewAction`, `registerPangularPlugin` | +| [`@pangular-inspector/devtools/capacitor-hook`](./capacitor-hook.md) | `installCapacitorHook` | +| [`@pangular-inspector/devtools/store-hook`](./store-hook.md) | `installStoreHook` | +| [`@pangular-inspector/devtools/startup-hook`](./startup-hook.md) | `installStartupHook` | +| [`@pangular-inspector/devtools/overlay-angular-native`](./overlay-angular-native.md) | `AngularNativeNode`, `AngularNativeOverlayOptions`, `DEFAULT_ANGULAR_NATIVE_BASE_URL`, `initAngularNativeOverlay`, `withWebShims` | +| [`@pangular-inspector/devtools/popup`](./popup.md) | `createDevtoolsPopup`, `hideDevtools`, `LauncherCounts`, `shortCount`, `showDevtools` | +| [`@pangular-inspector/devtools/overlay-nativescript`](./overlay-nativescript.md) | `defaultDevtoolsBaseURL`, `initNativeScriptOverlay`, `lanDevtoolsURL`, `NativeScriptOverlayOptions` | +| [`@pangular-inspector/devtools/cli`](./cli.md) | `buildReport`, `BuildReportOptions`, `BuildReportResult`, `createPangularCli`, `DEFAULT_REPORT_DIR`, `PangularCliOptions` | +| [`@pangular-inspector/devtools/http`](./http.md) | `HttpTransferCacheOptions`, `PangularHttpOptions`, `providePangularHttp`, `withPangular` | +| [`@pangular-inspector/devtools/hub`](./hub.md) | `hubEnabled`, `initPangularHub`, `PANGULAR_HUB_BASE`, `PangularConfig`, `PangularHubOptions` | +| [`@pangular-inspector/devtools/ssr`](./ssr.md) | `NodeEventLike`, `pangularSsrEventHandler`, `pangularSsrMiddleware`, `PangularSsrOptions`, `WebRequestHandler`, `withPangularSsr` | +| [`@pangular-inspector/devtools/vite`](./vite.md) | `default`, `PangularConfig`, `PangularViteOptions` | diff --git a/apps/docs/src/content/api/overlay-angular-native.md b/apps/docs/src/content/api/overlay-angular-native.md new file mode 100644 index 00000000..579abb20 --- /dev/null +++ b/apps/docs/src/content/api/overlay-angular-native.md @@ -0,0 +1,78 @@ +--- +title: '@pangular-inspector/devtools/overlay-angular-native' +description: 'Every symbol the @pangular-inspector/devtools/overlay-angular-native entry point exports, with its declaration and JSDoc, generated from the package source.' +--- + + + The symbols @pangular-inspector/devtools/overlay-angular-native exports, generated from the package source. + + +# @pangular-inspector/devtools/overlay-angular-native + +Import from `@pangular-inspector/devtools/overlay-angular-native`. This page is generated from [`packages/devtools/src/overlay-angular-native.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/overlay-angular-native.ts) and the files it re-exports. Run `pnpm docs:api` after you change the public API. + +## AngularNativeNode + +Interface. Source: [`packages/devtools/src/overlay-angular-native-views.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/overlay-angular-native-views.ts). + +The part of an `@ng-native/fabric` engine node the overlay reads. Structural, +so this file compiles and tests without Angular Native installed. + +```ts +interface AngularNativeNode { + /** `element`, `text` or `anchor`. */ + readonly kind: string; + /** The template spelling, such as `view` or `app-row`. */ + readonly name: string; + readonly children: readonly AngularNativeNode[]; + readonly parent: AngularNativeNode | null; + props?: Record; + ownStyle?: object; + readonly host?: {setProp(node: never, key: string, value: unknown): void}; +} +``` + +## AngularNativeOverlayOptions + +Interface. Source: [`packages/devtools/src/overlay-angular-native.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/overlay-angular-native.ts). + +```ts +interface AngularNativeOverlayOptions { + /** The root node `mount()` created (`app.engine.root`), or a function that returns it. */ + root: AngularNativeNode | (() => AngularNativeNode | null | undefined); + /** Absolute URL of the devtools server. Defaults to `http://localhost:9999/`. */ + baseURL?: string; + /** How often the app reports, in milliseconds. Defaults to the server's `limits.refreshMs`. */ + intervalMs?: number; + /** How long to wait before trying the server again, in milliseconds. */ + retryMs?: number; +} +``` + +## DEFAULT_ANGULAR_NATIVE_BASE_URL + +Constant. Source: [`packages/devtools/src/overlay-angular-native.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/overlay-angular-native.ts). + +```ts +const DEFAULT_ANGULAR_NATIVE_BASE_URL: 'http://localhost:9999/'; +``` + +## initAngularNativeOverlay + +Function. Source: [`packages/devtools/src/overlay-angular-native.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/overlay-angular-native.ts). + +Report an Angular Native app to a devtools server over a WebSocket. Call it +after `mount()`, in development only. A session that fails or drops is +replaced after `retryMs` until the returned function is called. + +```ts +function initAngularNativeOverlay(options: AngularNativeOverlayOptions): () => void; +``` + +## withWebShims + +Function. Source: [`packages/devtools/src/overlay-angular-native.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/overlay-angular-native.ts). + +```ts +async function withWebShims(baseURL: string, connect: () => Promise): Promise; +``` diff --git a/apps/docs/src/content/api/overlay-manual.md b/apps/docs/src/content/api/overlay-manual.md new file mode 100644 index 00000000..5be0136d --- /dev/null +++ b/apps/docs/src/content/api/overlay-manual.md @@ -0,0 +1,118 @@ +--- +title: '@pangular-inspector/devtools/overlay-manual' +description: 'Every symbol the @pangular-inspector/devtools/overlay-manual entry point exports, with its declaration and JSDoc, generated from the package source.' +--- + + + The symbols @pangular-inspector/devtools/overlay-manual exports, generated from the package source. + + +# @pangular-inspector/devtools/overlay-manual + +Import from `@pangular-inspector/devtools/overlay-manual`. This page is generated from [`packages/devtools/src/overlay.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/overlay.ts) and the files it re-exports. Run `pnpm docs:api` after you change the public API. + +## disposeOverlay + +Function. Source: [`packages/devtools/src/overlay.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/overlay.ts). + +Stops the running overlay and removes the floating devtools button. + +```ts +async function disposeOverlay(): Promise; +``` + +## initOverlay + +Function. Source: [`packages/devtools/src/overlay.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/overlay.ts). + +Starts the overlay and resolves with its dispose. Only one overlay runs per +page: starting another stops the one before it, including the auto-started one. + +```ts +function initOverlay(options: OverlayOptions = {}): Promise<() => void>; +``` + +## installSignalWriteHook + +Function. Source: [`packages/devtools/src/signal-history.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/signal-history.ts). + +```ts +async function installSignalWriteHook( + onWrite: (node: RawSignalNode) => void, + load: () => Promise = loadSignalPrimitives, +): Promise<(() => void) | null>; +``` + +## lanDevtoolsURL + +Function. Source: [`packages/devtools/src/lan-url.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/lan-url.ts). + +The devtools server URL on the LAN that the build injected, or `undefined` +when it injected none. Bundlers replace the constant at build time; Vite's +dev server may define it on `globalThis` instead, so both are read. + +```ts +function lanDevtoolsURL(): string | undefined; +``` + +## OverlayConnectionMeta + +Type. Source: [`packages/devtools/src/overlay.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/overlay.ts). + +The content of a devtools server's `__connection.json`. `configs` is loose, +so the whole file, with its `pangular` config, can be passed as it is. + +```ts +type OverlayConnectionMeta = Omit & { + /** A string, so an imported `__connection.json` type-checks as it is. */ + backend: string; + configs?: Record; +}; +``` + +## OverlayOptions + +Interface. Source: [`packages/devtools/src/overlay.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/overlay.ts). + +```ts +interface OverlayOptions { + /** Where the devtools server is, or a list of places to try in order. */ + baseURL?: string | string[]; + /** + * The server's `__connection.json`, passed in so the overlay does not fetch + * it. Use it when the page runs on another origin than the server, such as a + * Capacitor WebView, where that fetch is blocked. + */ + connectionMeta?: OverlayConnectionMeta; + /** + * A pairing token the server trusts (`auth: {tokens}`, or `--auth-token` on + * the CLI), so the page skips the one-time code. A dev secret: don't commit it. + */ + authToken?: string; +} +``` + +## registerNgrxSignals + +Function. Source: [`packages/devtools/src/ngrx-register.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/ngrx-register.ts). + +Lets an app share `@ngrx/signals` functions with the devtools overlay. Both +fields are optional and merge with earlier registrations, so calling it +twice (once for `patchState` and once for `watchState`) keeps both. + +- `patchState`: makes a restore from the change log go through `patchState` + so `watchState` listeners run (otherwise restore writes state signals + directly, components still update, but `watchState` is bypassed). +- `watchState`: lets the overlay record every state change individually, + including several patchState calls in the same tick, instead of merging + them into one entry per microtask. + +```ts +function registerNgrxSignals(api: { + // `never[]` on inputs lets the caller pass the real `@ngrx/signals` exports + // (whose stricter `WritableStateSource` input is contravariant with + // `PatchState`'s plain `object`) without a cast. + patchState?: (...args: never[]) => unknown; + watchState?: (...args: never[]) => unknown; +}): void; +``` diff --git a/apps/docs/src/content/api/overlay-nativescript.md b/apps/docs/src/content/api/overlay-nativescript.md new file mode 100644 index 00000000..bcd6166f --- /dev/null +++ b/apps/docs/src/content/api/overlay-nativescript.md @@ -0,0 +1,61 @@ +--- +title: '@pangular-inspector/devtools/overlay-nativescript' +description: 'Every symbol the @pangular-inspector/devtools/overlay-nativescript entry point exports, with its declaration and JSDoc, generated from the package source.' +--- + + + The symbols @pangular-inspector/devtools/overlay-nativescript exports, generated from the package source. + + +# @pangular-inspector/devtools/overlay-nativescript + +Import from `@pangular-inspector/devtools/overlay-nativescript`. This page is generated from [`packages/devtools/src/overlay-nativescript.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/overlay-nativescript.ts) and the files it re-exports. Run `pnpm docs:api` after you change the public API. + +## defaultDevtoolsBaseURL + +Function. Source: [`packages/devtools/src/overlay-nativescript.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/overlay-nativescript.ts). + +Where a simulator or emulator finds a devtools server on the machine that +runs it. A physical device needs the machine's LAN address instead. + +```ts +function defaultDevtoolsBaseURL(port = 9999): string; +``` + +## initNativeScriptOverlay + +Function. Source: [`packages/devtools/src/overlay-nativescript.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/overlay-nativescript.ts). + +```ts +function initNativeScriptOverlay(options: NativeScriptOverlayOptions = {}): () => void; +``` + +## lanDevtoolsURL + +Function. Source: [`packages/devtools/src/lan-url.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/lan-url.ts). + +The devtools server URL on the LAN that the build injected, or `undefined` +when it injected none. Bundlers replace the constant at build time; Vite's +dev server may define it on `globalThis` instead, so both are read. + +```ts +function lanDevtoolsURL(): string | undefined; +``` + +## NativeScriptOverlayOptions + +Interface. Source: [`packages/devtools/src/overlay-nativescript.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/overlay-nativescript.ts). + +```ts +interface NativeScriptOverlayOptions { + /** + * Absolute URL of the devtools server. Defaults to the LAN address the build + * injected (`lanDevtoolsURL()`), then to `defaultDevtoolsBaseURL()`. + */ + baseURL?: string; + /** How often the app reports, in milliseconds. Defaults to the server's `limits.refreshMs`. */ + intervalMs?: number; + /** How long to wait before trying the server again after a failure, in milliseconds. */ + retryMs?: number; +} +``` diff --git a/apps/docs/src/content/api/overlay.md b/apps/docs/src/content/api/overlay.md new file mode 100644 index 00000000..000689de --- /dev/null +++ b/apps/docs/src/content/api/overlay.md @@ -0,0 +1,118 @@ +--- +title: '@pangular-inspector/devtools/overlay' +description: 'Every symbol the @pangular-inspector/devtools/overlay entry point exports, with its declaration and JSDoc, generated from the package source.' +--- + + + The symbols @pangular-inspector/devtools/overlay exports, generated from the package source. + + +# @pangular-inspector/devtools/overlay + +Import from `@pangular-inspector/devtools/overlay`. This page is generated from [`packages/devtools/src/overlay-auto.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/overlay-auto.ts) and the files it re-exports. Run `pnpm docs:api` after you change the public API. + +## disposeOverlay + +Function. Source: [`packages/devtools/src/overlay.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/overlay.ts). + +Stops the running overlay and removes the floating devtools button. + +```ts +async function disposeOverlay(): Promise; +``` + +## initOverlay + +Function. Source: [`packages/devtools/src/overlay.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/overlay.ts). + +Starts the overlay and resolves with its dispose. Only one overlay runs per +page: starting another stops the one before it, including the auto-started one. + +```ts +function initOverlay(options: OverlayOptions = {}): Promise<() => void>; +``` + +## installSignalWriteHook + +Function. Source: [`packages/devtools/src/signal-history.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/signal-history.ts). + +```ts +async function installSignalWriteHook( + onWrite: (node: RawSignalNode) => void, + load: () => Promise = loadSignalPrimitives, +): Promise<(() => void) | null>; +``` + +## lanDevtoolsURL + +Function. Source: [`packages/devtools/src/lan-url.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/lan-url.ts). + +The devtools server URL on the LAN that the build injected, or `undefined` +when it injected none. Bundlers replace the constant at build time; Vite's +dev server may define it on `globalThis` instead, so both are read. + +```ts +function lanDevtoolsURL(): string | undefined; +``` + +## OverlayConnectionMeta + +Type. Source: [`packages/devtools/src/overlay.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/overlay.ts). + +The content of a devtools server's `__connection.json`. `configs` is loose, +so the whole file, with its `pangular` config, can be passed as it is. + +```ts +type OverlayConnectionMeta = Omit & { + /** A string, so an imported `__connection.json` type-checks as it is. */ + backend: string; + configs?: Record; +}; +``` + +## OverlayOptions + +Interface. Source: [`packages/devtools/src/overlay.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/overlay.ts). + +```ts +interface OverlayOptions { + /** Where the devtools server is, or a list of places to try in order. */ + baseURL?: string | string[]; + /** + * The server's `__connection.json`, passed in so the overlay does not fetch + * it. Use it when the page runs on another origin than the server, such as a + * Capacitor WebView, where that fetch is blocked. + */ + connectionMeta?: OverlayConnectionMeta; + /** + * A pairing token the server trusts (`auth: {tokens}`, or `--auth-token` on + * the CLI), so the page skips the one-time code. A dev secret: don't commit it. + */ + authToken?: string; +} +``` + +## registerNgrxSignals + +Function. Source: [`packages/devtools/src/ngrx-register.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/ngrx-register.ts). + +Lets an app share `@ngrx/signals` functions with the devtools overlay. Both +fields are optional and merge with earlier registrations, so calling it +twice (once for `patchState` and once for `watchState`) keeps both. + +- `patchState`: makes a restore from the change log go through `patchState` + so `watchState` listeners run (otherwise restore writes state signals + directly, components still update, but `watchState` is bypassed). +- `watchState`: lets the overlay record every state change individually, + including several patchState calls in the same tick, instead of merging + them into one entry per microtask. + +```ts +function registerNgrxSignals(api: { + // `never[]` on inputs lets the caller pass the real `@ngrx/signals` exports + // (whose stricter `WritableStateSource` input is contravariant with + // `PatchState`'s plain `object`) without a cast. + patchState?: (...args: never[]) => unknown; + watchState?: (...args: never[]) => unknown; +}): void; +``` diff --git a/apps/docs/src/content/api/plugin.md b/apps/docs/src/content/api/plugin.md new file mode 100644 index 00000000..31a5acbc --- /dev/null +++ b/apps/docs/src/content/api/plugin.md @@ -0,0 +1,447 @@ +--- +title: '@pangular-inspector/devtools/plugin' +description: 'Every symbol the @pangular-inspector/devtools/plugin entry point exports, with its declaration and JSDoc, generated from the package source.' +--- + + + The symbols @pangular-inspector/devtools/plugin exports, generated from the package source. + + +# @pangular-inspector/devtools/plugin + +Import from `@pangular-inspector/devtools/plugin`. This page is generated from [`packages/devtools/src/plugin.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/plugin.ts) and the files it re-exports. Run `pnpm docs:api` after you change the public API. + +## definePangularServerPlugin + +Function. Source: [`packages/devtools/src/plugin.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/plugin.ts). + +Types a server plugin. Returns it unchanged; the server checks it when it starts. + +```ts +function definePangularServerPlugin(plugin: PangularServerPlugin): PangularServerPlugin; +``` + +## PANGULAR_PLUGIN_API_VERSION + +Constant. Source: [`packages/devtools/src/plugin.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/plugin.ts). + +The plugin API version this package runs. A plugin that needs a later one is not run. + +```ts +const PANGULAR_PLUGIN_API_VERSION: 1; +``` + +## PangularPagePlugin + +Interface. Source: [`packages/devtools/src/plugin.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/plugin.ts). + +A plugin's page side. + +```ts +interface PangularPagePlugin { + /** Lowercase letters, digits and dashes, starting with a letter, such as `tanstack-query`. */ + id: string; + /** The plugin's own version, shown in the panel. */ + version: string; + /** The plugin API version it was written for. Defaults to 1. */ + apiVersion?: number; + /** The name in the panel. Defaults to the id. */ + title?: string; + description?: string; + /** Runs once when the overlay starts the plugin; return a cleanup. */ + setup?(ctx: PangularPluginContext): void | (() => void); + /** Returns the view to report. Called after Angular updates the page, while someone watches. */ + collect?(ctx: PangularPluginContext): PluginView | null | undefined; + /** + * Page actions, by name. They change the app, so `actions: false` (or + * `plugins..actions: false`) in the devtools config blocks them. + */ + actions?: Record; +} +``` + +## PangularPluginAction + +Type. Source: [`packages/devtools/src/plugin.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/plugin.ts). + +A page action: runs on the page when the panel's button or a server plugin tool asks. + +```ts +type PangularPluginAction = (args: unknown, ctx: PangularPluginContext) => unknown; +``` + +## PangularPluginContext + +Interface. Source: [`packages/devtools/src/plugin.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/plugin.ts). + +What the overlay hands a page plugin. + +```ts +interface PangularPluginContext { + readonly apiVersion: number; + /** The page id every report carries. */ + readonly pageId: string; + /** + * Whether a panel or an agent is watching. `collect` runs only while it is; + * a `push` made meanwhile is sent once it is again. + */ + readonly active: boolean; + /** Angular's debug API (`window.ng`) in a development build, or `undefined`. */ + getNg(): Record | undefined; + /** + * Reports a view without waiting for the next `collect`. It goes out about + * 50 ms later, so a burst sends once; an unchanged view is skipped, and + * while nobody watches it goes out once someone does. + */ + push(view: PluginView): void; + /** + * Asks for a `collect`, such as after the plugin's store changed. It runs + * while someone watches, at most once a second. + */ + refresh(): void; + /** + * Makes a value safe to send: limits depth and size and masks secret-looking + * names, JWTs and bearer tokens, like every other inspector. The overlay + * runs it over every view too. + */ + serialize(value: unknown, limits?: PluginSerializeLimits): unknown; + /** Masks credentials, JWTs, bearer tokens and secret `key=value` pairs in a text. */ + redact(text: string): string; + /** Whether a field name looks secret under the devtools config. */ + isSecretName(name: string): boolean; +} +``` + +## PangularPluginPage + +Interface. Source: [`packages/devtools/src/plugin.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/plugin.ts). + +What a plugin page reported, as a server plugin reads it. + +```ts +interface PangularPluginPage { + pageId: string; + url?: string; + title?: string; + /** When the page last reported, in ms since the epoch. */ + reportedAt: number; + /** The page plugin's version. */ + version: string; + /** The last view, already masked; `null` before the first one. */ + view: PluginView | null; +} +``` + +## pangularPluginRegistry + +Function. Source: [`packages/devtools/src/plugin.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/plugin.ts). + +The registry on `target`, created on first use. + +```ts +function pangularPluginRegistry(target: object = globalThis): PangularPluginRegistry; +``` + +## PangularPluginRegistry + +Interface. Source: [`packages/devtools/src/plugin.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/plugin.ts). + +The global registry. Its shape is part of the API, since copies of this entry share it. + +```ts +interface PangularPluginRegistry { + api: number; + plugins: PangularPagePlugin[]; + listeners: Set<() => void>; +} +``` + +## PangularPluginTool + +Interface. Source: [`packages/devtools/src/plugin.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/plugin.ts). + +```ts +interface PangularPluginTool { + /** + * Lowercase letters, digits and dashes. The tool's id is + * `pangular:plugin::`, which MCP clients call as + * `pangular_plugin__`. That name can be at most 64 + * characters, so the plugin id and the tool name together at most 47; the + * server skips a plugin with a longer one. + */ + name: string; + description: string; + /** JSON Schema of the arguments object. */ + inputSchema?: Record; + /** Defaults to `read`. Anything else is dropped under `agent.readOnly` or with actions off. */ + safety?: PangularPluginToolSafety; + handler( + args: Record, + ctx: PangularPluginToolContext, + ): string | {markdown: string} | Promise; +} +``` + +## PangularPluginToolContext + +Interface. Source: [`packages/devtools/src/plugin.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/plugin.ts). + +What a tool's handler gets. `runPageAction` refuses in `read` tools. + +```ts +interface PangularPluginToolContext extends PangularServerPluginContext { + /** + * Runs one of the page plugin's `actions` on a page (`page`, or the newest) + * and waits for its answer, up to `timeoutMs` (default 10000, at most 30000). + * The page gives up after the same time and answers with a timeout. + */ + runPageAction( + name: string, + args?: unknown, + options?: {page?: string; timeoutMs?: number}, + ): Promise; +} +``` + +## PangularPluginToolSafety + +Type. Source: [`packages/devtools/src/plugin.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/plugin.ts). + +How much a tool can change. `read` tools only read; `action` tools change +the running page until a reload; `destructive` ones can lose data. + +```ts +type PangularPluginToolSafety = 'read' | 'action' | 'destructive'; +``` + +## PangularServerPlugin + +Interface. Source: [`packages/devtools/src/plugin.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/plugin.ts). + +A plugin's server side. + +```ts +interface PangularServerPlugin { + /** The same id as the page plugin. */ + id: string; + version: string; + apiVersion?: number; + title?: string; + description?: string; + tools?: PangularPluginTool[]; + /** Creates the plugin's shared state with this value. */ + state?: {initialValue: unknown}; + /** Runs once when the devtools server starts; return a cleanup. */ + setup?(ctx: PangularServerPluginContext): void | (() => void); +} +``` + +## PangularServerPluginContext + +Interface. Source: [`packages/devtools/src/plugin.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/plugin.ts). + +What a server plugin's `setup` and tools get. + +```ts +interface PangularServerPluginContext { + readonly pluginId: string; + /** The pages that run this plugin, newest report first. */ + pages(): PangularPluginPage[]; + /** One page by id, or the newest without one. */ + page(pageId?: string): PangularPluginPage | undefined; + /** + * The plugin's shared state, `pangular:plugin.`. Agents read it with + * `devframe_state_read` while the plugin's tools are on. + */ + state: {get(): unknown; set(value: unknown): void}; + serialize(value: unknown, limits?: PluginSerializeLimits): unknown; + redact(text: string): string; + /** A view as markdown, the way `pangular:inspect-plugin` writes it. */ + markdown(view: PluginView): string; +} +``` + +## PluginActionResult + +Interface. Source: [`packages/devtools/src/plugin.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/plugin.ts). + +```ts +interface PluginActionResult { + ok: boolean; + /** The page that ran it. */ + pageId?: string; + /** What the action returned, masked like other live values. */ + result?: unknown; + error?: string; +} +``` + +## PluginBadge + +Interface. Source: [`packages/devtools/src/plugin-view.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/plugin-view.ts). + +```ts +interface PluginBadge { + label: string; + tone?: PluginTone; +} +``` + +## PluginCell + +Type. Source: [`packages/devtools/src/plugin-view.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/plugin-view.ts). + +A table cell: plain text or a number, or text with a tone. + +```ts +type PluginCell = string | number | boolean | null | {text: string; tone?: PluginTone}; +``` + +## PluginListSection + +Interface. Source: [`packages/devtools/src/plugin-view.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/plugin-view.ts). + +```ts +interface PluginListSection { + kind: 'list'; + title: string; + items: {label: string; detail?: string; badge?: PluginBadge}[]; + empty?: string; +} +``` + +## PluginSection + +Type. Source: [`packages/devtools/src/plugin-view.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/plugin-view.ts). + +```ts +type PluginSection = + | PluginTableSection + | PluginTreeSection + | PluginListSection + | PluginStatsSection + | PluginTextSection; +``` + +## PluginSerializeLimits + +Interface. Source: [`packages/devtools/src/plugin.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/plugin.ts). + +Limits a plugin can pass to `serialize()`. + +```ts +interface PluginSerializeLimits { + depth?: number; + keys?: number; + items?: number; + text?: number; +} +``` + +## PluginStatsSection + +Interface. Source: [`packages/devtools/src/plugin-view.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/plugin-view.ts). + +```ts +interface PluginStatsSection { + kind: 'stats'; + title: string; + items: {label: string; value: string | number; tone?: PluginTone}[]; +} +``` + +## PluginTableSection + +Interface. Source: [`packages/devtools/src/plugin-view.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/plugin-view.ts). + +```ts +interface PluginTableSection { + kind: 'table'; + title: string; + columns: {key: string; label: string}[]; + rows: Record[]; + /** Shown when `rows` is empty. */ + empty?: string; +} +``` + +## PluginTextSection + +Interface. Source: [`packages/devtools/src/plugin-view.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/plugin-view.ts). + +```ts +interface PluginTextSection { + kind: 'text'; + title: string; + text: string; +} +``` + +## PluginTone + +Type. Source: [`packages/devtools/src/plugin-view.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/plugin-view.ts). + +The tone of a badge, a stat or a table cell. + +```ts +type PluginTone = 'ok' | 'warn' | 'danger' | 'accent' | 'neutral'; +``` + +## PluginTreeSection + +Interface. Source: [`packages/devtools/src/plugin-view.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/plugin-view.ts). + +A value shown as a tree of keys and values, folded past the first level. + +```ts +interface PluginTreeSection { + kind: 'tree'; + title: string; + value: unknown; +} +``` + +## PluginView + +Interface. Source: [`packages/devtools/src/plugin-view.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/plugin-view.ts). + +What a plugin reports for one page. + +```ts +interface PluginView { + /** One line under the plugin's title. */ + summary?: string; + badges?: PluginBadge[]; + sections: PluginSection[]; + actions?: PluginViewAction[]; +} +``` + +## PluginViewAction + +Interface. Source: [`packages/devtools/src/plugin-view.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/plugin-view.ts). + +A button the panel shows for one of the plugin's page actions. + +```ts +interface PluginViewAction { + /** A key of the plugin's `actions`. */ + name: string; + label: string; + /** Asks before running, for actions that lose data. */ + confirm?: string; +} +``` + +## registerPangularPlugin + +Function. Source: [`packages/devtools/src/plugin.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/plugin.ts). + +Registers a page plugin and returns a function that removes it. Registering +the same id again replaces the plugin, as a hot reload does. Throws for an +id that is not lowercase letters, digits and dashes, and warns about and +drops an action whose name is not. + +```ts +function registerPangularPlugin(plugin: PangularPagePlugin): () => void; +``` diff --git a/apps/docs/src/content/api/popup.md b/apps/docs/src/content/api/popup.md new file mode 100644 index 00000000..5b9d93d2 --- /dev/null +++ b/apps/docs/src/content/api/popup.md @@ -0,0 +1,71 @@ +--- +title: '@pangular-inspector/devtools/popup' +description: 'Every symbol the @pangular-inspector/devtools/popup entry point exports, with its declaration and JSDoc, generated from the package source.' +--- + + + The symbols @pangular-inspector/devtools/popup exports, generated from the package source. + + +# @pangular-inspector/devtools/popup + +Import from `@pangular-inspector/devtools/popup`. This page is generated from [`packages/devtools/src/popup.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/popup.ts) and the files it re-exports. Run `pnpm docs:api` after you change the public API. + +## createDevtoolsPopup + +Function. Source: [`packages/devtools/src/popup.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/popup.ts). + +Adds the floating button and returns its handle. `src` is the page the panel +loads; without it the panel looks for the hub, then for the devtools alone. +A later call returns the same handle and applies a new `src`. + +```ts +function createDevtoolsPopup( + options: {src?: string; hotkey?: string | false} = {}, +): {toggle: () => void; destroy: () => void} | undefined; +``` + +## hideDevtools + +Function. Source: [`packages/devtools/src/popup.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/popup.ts). + +Removes the popup, waiting for one that is still being created. + +```ts +async function hideDevtools(): Promise; +``` + +## LauncherCounts + +Interface. Source: [`packages/devtools/src/popup.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/popup.ts). + +What the launcher pill shows, as the overlay last counted it. + +```ts +interface LauncherCounts { + /** Component template updates since the page loaded. */ + renders: number; + /** Errors the errors inspector caught, each repeat included. */ + errors: number; +} +``` + +## shortCount + +Function. Source: [`packages/devtools/src/popup.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/popup.ts). + +A count short enough for the pill: 999, 1.2k, 12k, 1.2M. + +```ts +function shortCount(value: number): string; +``` + +## showDevtools + +Function. Source: [`packages/devtools/src/popup.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/popup.ts). + +Adds the floating button. The panel finds the devtools server when it first opens. + +```ts +function showDevtools(): Promise; +``` diff --git a/apps/docs/src/content/api/ssr.md b/apps/docs/src/content/api/ssr.md new file mode 100644 index 00000000..d4411c8b --- /dev/null +++ b/apps/docs/src/content/api/ssr.md @@ -0,0 +1,97 @@ +--- +title: '@pangular-inspector/devtools/ssr' +description: 'Every symbol the @pangular-inspector/devtools/ssr entry point exports, with its declaration and JSDoc, generated from the package source.' +--- + + + The symbols @pangular-inspector/devtools/ssr exports, generated from the package source. + + +# @pangular-inspector/devtools/ssr + +Import from `@pangular-inspector/devtools/ssr`. This page is generated from [`packages/devtools/src/ssr.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/ssr.ts) and the files it re-exports. Run `pnpm docs:api` after you change the public API. + +## NodeEventLike + +Interface. Source: [`packages/devtools/src/ssr.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/ssr.ts). + +The part of an h3 event the tracer reads. + +```ts +interface NodeEventLike { + node: {req: IncomingMessage; res: ServerResponse}; +} +``` + +## pangularSsrEventHandler + +Function. Source: [`packages/devtools/src/ssr.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/ssr.ts). + +An h3 or Nitro server middleware that traces page renders on Node, such as +Analog's: `export default defineEventHandler(pangularSsrEventHandler())` in +`src/server/middleware`. It answers only a forced Client render; otherwise +it returns nothing, so the request goes on to the renderer. + +```ts +function pangularSsrEventHandler( + options: PangularSsrOptions = {}, +): (event: NodeEventLike) => true | undefined; +``` + +## pangularSsrMiddleware + +Function. Source: [`packages/devtools/src/ssr.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/ssr.ts). + +The Node `(req, res, next)` tracer behind the hub's `ssrMiddleware`, for a +server that renders on Node without the Express hub, such as Fastify. + +```ts +function pangularSsrMiddleware( + options: PangularSsrOptions = {}, +): (req: IncomingMessage, res: ServerResponse, next: (error?: unknown) => void) => void; +``` + +## PangularSsrOptions + +Interface. Source: [`packages/devtools/src/ssr-fetch.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/ssr-fetch.ts). + +```ts +interface PangularSsrOptions { + /** Path prefixes that are never traced, such as the hub base. */ + skip?: string[]; + /** + * The app's browser build folder, which holds `index.csr.html`. Needed to + * force a Client render from the panel. It is read with `node:fs` when an + * override asks for it. + */ + browserDistFolder?: string; +} +``` + +## WebRequestHandler + +Type. Source: [`packages/devtools/src/ssr-fetch.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/ssr-fetch.ts). + +A web-standard request handler, such as `AngularAppEngine.handle` or `app.fetch`. + +```ts +type WebRequestHandler = ( + request: Request, + ...rest: Args +) => Result | Promise; +``` + +## withPangularSsr + +Function. Source: [`packages/devtools/src/ssr.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/ssr.ts). + +Wraps a web-standard SSR handler (`(request: Request) => Promise`), +such as `AngularAppEngine.handle`, a Hono or h3 app's `fetch`, or a Nitro +route, so each page it renders shows in the SSR & HTTP tab. + +```ts +function withPangularSsr( + handler: (request: Request, ...rest: Args) => Result | Promise, + options: PangularSsrOptions = {}, +): (request: Request, ...rest: Args) => Promise; +``` diff --git a/apps/docs/src/content/api/startup-hook.md b/apps/docs/src/content/api/startup-hook.md new file mode 100644 index 00000000..175c1c51 --- /dev/null +++ b/apps/docs/src/content/api/startup-hook.md @@ -0,0 +1,22 @@ +--- +title: '@pangular-inspector/devtools/startup-hook' +description: 'Every symbol the @pangular-inspector/devtools/startup-hook entry point exports, with its declaration and JSDoc, generated from the package source.' +--- + + + The symbols @pangular-inspector/devtools/startup-hook exports, generated from the package source. + + +# @pangular-inspector/devtools/startup-hook + +Import from `@pangular-inspector/devtools/startup-hook`. This page is generated from [`packages/devtools/src/startup-hook.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/startup-hook.ts) and the files it re-exports. Run `pnpm docs:api` after you change the public API. + +## installStartupHook + +Function. Source: [`packages/devtools/src/startup-hook.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/startup-hook.ts). + +Starts recording now. Safe to call more than once. + +```ts +function installStartupHook(): void; +``` diff --git a/apps/docs/src/content/api/store-hook.md b/apps/docs/src/content/api/store-hook.md new file mode 100644 index 00000000..027d9f2a --- /dev/null +++ b/apps/docs/src/content/api/store-hook.md @@ -0,0 +1,22 @@ +--- +title: '@pangular-inspector/devtools/store-hook' +description: 'Every symbol the @pangular-inspector/devtools/store-hook entry point exports, with its declaration and JSDoc, generated from the package source.' +--- + + + The symbols @pangular-inspector/devtools/store-hook exports, generated from the package source. + + +# @pangular-inspector/devtools/store-hook + +Import from `@pangular-inspector/devtools/store-hook`. This page is generated from [`packages/devtools/src/store-hook.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/store-hook.ts) and the files it re-exports. Run `pnpm docs:api` after you change the public API. + +## installStoreHook + +Function. Source: [`packages/devtools/src/store-hook.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/store-hook.ts). + +Puts the Redux DevTools stand-in on the page now. Safe to call more than once. + +```ts +function installStoreHook(): void; +``` diff --git a/apps/docs/src/content/api/vite.md b/apps/docs/src/content/api/vite.md new file mode 100644 index 00000000..6cf3ea20 --- /dev/null +++ b/apps/docs/src/content/api/vite.md @@ -0,0 +1,183 @@ +--- +title: '@pangular-inspector/devtools/vite' +description: 'Every symbol the @pangular-inspector/devtools/vite entry point exports, with its declaration and JSDoc, generated from the package source.' +--- + + + The symbols @pangular-inspector/devtools/vite exports, generated from the package source. + + +# @pangular-inspector/devtools/vite + +Import from `@pangular-inspector/devtools/vite`. This page is generated from [`packages/devtools/src/entries/vite.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/entries/vite.ts) and the files it re-exports. Run `pnpm docs:api` after you change the public API. + +## default + +Function. Source: [`packages/devtools/src/vite.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/vite.ts). + +```ts +function pangularVite(options: PangularViteOptions = {}): Plugin; +``` + +## PangularConfig + +Interface. Source: [`packages/devtools/src/config.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/config.ts). + +Options shared by `initPangularHub()`, the Vite plugin and +`createPangular()`. Everything is on when left out. + +```ts +interface PangularConfig { + /** Turn an inspector off: no tab or dock, no page collector, no RPC and no agent tools. */ + inspectors?: Partial>; + agent?: { + /** Drop every agent tool that is not a `read` tool (see `AgentSafety`). */ + readOnly?: boolean; + /** Hide one inspector's agent tools and resources while keeping its tab. */ + tools?: Partial>; + /** + * Register the `read` agent tools on the page for browser agents, through + * WebMCP (`document.modelContext`) and Chrome DevTools for agents + * (`devtoolstooldiscovery`). Off by default, since any script on the page could + * then call them; `true` turns them on. This is where the switch starts: + * **Browser agent tools** in the panel's Settings changes it for every + * page until the server restarts. + */ + browserTools?: boolean; + }; + /** Allow or block writes from the panel and the agent. `false` blocks them all. */ + actions?: boolean | Partial>; + redaction?: { + /** + * Field names to treat as secret on top of the built-in list, matched by + * words like it: `passport` also covers `passportNumber`. + */ + secretNames?: string[]; + /** Field names to show even when they look secret, like `window.__PANGULAR_FORMS__.unmask`. */ + unmask?: string[]; + /** + * Also mask high-entropy strings that no name or shape rule catches, such + * as an opaque token in a harmless-looking field. Off by default. Hex + * values (hashes, UUIDs), ULIDs and camelCase identifiers stay readable. + * `true` uses runs of 24 characters or more and 4.5 bits per character; + * an object sets `minLength` (16 to 512) and `threshold` (2 to 6 bits). + */ + entropy?: boolean | {minLength?: number; threshold?: number}; + }; + limits?: { + /** + * How often the page polls for changes, in ms, when it can't follow change + * detection, such as before the app bootstraps. Also sets the + * Analog runtime refresh. Default 3000, from 500 to 8000. + */ + refreshMs?: number; + /** Navigations kept per page. Default 50. */ + navigations?: number; + /** Form timeline events kept. Default 200. */ + formTimeline?: number; + /** HTTP calls kept per page and on the server. Default 200. */ + httpCalls?: number; + /** NgRx change log entries kept per page. Default 200. */ + changeLog?: number; + /** Change detection cycles kept per page while recording. Default 200. */ + cdCycles?: number; + /** + * A change detection cycle longer than this, in ms, counts as slow: the + * recording flags it and the chart draws it over the line. Default 16 + * (about one frame at 60 frames per second), from 1 to 1000. + */ + cdSlowMs?: number; + /** Capacitor plugin calls kept per page and on the server. Default 200. */ + capacitorCalls?: number; + /** + * How long, in ms, pages keep sending the component tree, injectors, + * change detection and forms after an agent's last call when no panel is + * open. Idle pages only say they are still there, and send everything + * again when a panel opens or an agent asks. `0` keeps them sending all + * the time. Default 60000, up to 600000. + */ + idleAfterMs?: number; + }; + popup?: { + /** + * The keyboard shortcut that opens and closes the floating panel on the + * page, such as `Alt+Shift+P` (the default) or `Mod+Shift+I`. `Mod` is + * Cmd on macOS and Ctrl elsewhere. `false` turns the shortcut off. + */ + hotkey?: string | false; + }; + /** + * Turn one Pangular plugin off, by its id, or only its agent tools or its + * actions: `{ travel: false }` or `{ travel: { actions: false } }`. + * `inspectors.plugins: false` turns every plugin off. + */ + plugins?: Record; + /** Turn individual lint rules off: `{ 'img-missing-alt': false }`. */ + lint?: { + /** Rule status by rule name. `false` turns the rule off; `true` or omitted keeps it on. */ + rules?: Record; + }; + analog?: { + /** + * A JSON Schema file, relative to the Analog project root, that the + * frontmatter of every markdown file under `src/content` must match, such + * as `content.schema.json`. The Content tab and `analog-lint` report the + * files that don't. Left out, the frontmatter is only checked for syntax. + */ + contentSchema?: string; + }; + ngrx?: { + /** + * Record where each NgRx change log entry came from: the app frames of the + * dispatch, method call or `patchState`, with origins and query strings + * removed and secrets masked. Off by default, since taking a stack on every + * write costs time. + */ + trace?: boolean; + }; +} +``` + +## PangularViteOptions + +Interface. Source: [`packages/devtools/src/vite.ts`](https://github.com/pangular-inspector/devtools/blob/main/packages/devtools/src/vite.ts). + +```ts +interface PangularViteOptions extends PangularConfig { + base?: string; + apiPrefix?: string; + allowedOrigins?: string[]; + /** + * The one-time code: on, off, or on with pairing tokens (`{tokens}`) that a + * client may send instead. On by default, along with the MCP token. + */ + auth?: boolean | PangularAuthTokens; + /** + * Also answer requests from other machines, such as a phone on Wi-Fi, when + * their origin is in `allowedOrigins`. Needs the one-time code on: with + * `auth: false` it is ignored. Off by default: only this machine. + */ + allowLan?: boolean; + /** + * Add the overlay to the pages the dev server serves. On by default; pass + * `false` to load it yourself, for example with `initOverlay` options. + */ + overlay?: boolean; + /** + * Add a terminals dock that runs the project's own build and test commands + * (its `build` and `test` scripts, or `ng build` and `ng test`). Off by + * default. Ignored with `allowLan`. + */ + terminals?: boolean; + /** + * Inject the dev server's LAN address into the app as `__PANGULAR_LAN_URL__`, + * so a phone app (Capacitor, NativeScript) built in development mode finds + * the devtools. `true` picks this machine's address; a string names one, + * such as `'192.168.1.20'`. Off by default. Needs `allowLan` in effect and + * `server.host` on the network; it changes nothing about who may connect. + */ + lanAddress?: boolean | string; + /** Pangular plugins' server sides: their agent tools and shared state. */ + serverPlugins?: readonly PangularServerPlugin[]; +} +``` diff --git a/apps/docs/src/content/contributing/demo-apps.md b/apps/docs/src/content/contributing/demo-apps.md index 303c59de..037b9834 100644 --- a/apps/docs/src/content/contributing/demo-apps.md +++ b/apps/docs/src/content/contributing/demo-apps.md @@ -173,7 +173,7 @@ npm run devtools - + diff --git a/apps/docs/src/content/contributing/development.md b/apps/docs/src/content/contributing/development.md index 7cf643a0..60eed746 100644 --- a/apps/docs/src/content/contributing/development.md +++ b/apps/docs/src/content/contributing/development.md @@ -292,6 +292,8 @@ Give every registered tool and resource an entry in `AGENT_ENTRIES` in `packages `packages/devtools/src/__tests__/agent-metadata.test.ts` boots the server and fails when a registered tool has no entry, or an entry has no registered tool. It also compares the derived lists with `packages/devtools/src/__tests__/fixtures/agent-metadata-derived.json`, so update that file with the tool and the reviewer sees what changed. See [Configuration](../getting-started/configuration.md). +Then run `pnpm docs:agent-tools`. It writes the [Tool index](../agents/tool-index.md) from `AGENT_ENTRIES`, and `pnpm docs:test` fails while that page is stale or a tool is not named on the Tools or Resources page. + Run pnpm extension:build and commit extension/ui. CI fails when it is stale. See Build the extension. @@ -301,12 +303,19 @@ Give every registered tool and resource an entry in `AGENT_ENTRIES` in `packages This site lives in `apps/docs`. It is built with [NgMd](https://github.com/erkamyaman/ngmd) on *Analog. ```bash -pnpm docs:dev # Dev server -pnpm docs:build # Production build +pnpm docs:dev # Dev server +pnpm docs:build # Production build +pnpm docs:test # Docs site tests, including the stale page checks +pnpm docs:agent-tools # Regenerate the agent tool index +pnpm docs:api # Regenerate the API reference ``` Pages are markdown files under `apps/docs/src/content`. The sidebar comes from `apps/docs/src/ngmd.config.ts`. +The pages under `api/` are generated from the entry points in `packages/devtools/package.json` by `apps/docs/api-reference.ts`. Run `pnpm docs:api` after you change an exported symbol or its JSDoc; `pnpm docs:test` fails while a page is stale. + +The build also writes `/llms.txt`, one link per page to its markdown source in sidebar order, and `/llms-full.txt`, every page's markdown in one file. Both follow the [llms.txt](https://llmstxt.org) format and come from `apps/docs/llms-txt.plugin.ts`. + The build fails on broken internal links and on raw external anchors without target="_blank". Run pnpm docs:build before you open a PR. diff --git a/apps/docs/src/content/contributing/writing-docs.md b/apps/docs/src/content/contributing/writing-docs.md index 8d8415d1..b650fbff 100644 --- a/apps/docs/src/content/contributing/writing-docs.md +++ b/apps/docs/src/content/contributing/writing-docs.md @@ -113,6 +113,15 @@ A short intro: what the tab is and when you open it. Add an entry to `nav` in `apps/docs/src/ngmd.config.ts`. Pages that aren't listed still build, but readers can't find them. Use `status: 'new'` or `status: 'updated'` for a sidebar badge instead of saying "new" in the text. +A `new` or `updated` badge needs `until`, the package version it expires at. Set it to the minor after the release that ships the page, so the badge disappears with the next minor release: + +```ts +// apps/docs/src/ngmd.config.ts +{label: 'Platforms', href: '/getting-started/platforms', status: 'new', until: '1.2.0'}, +``` + +The sidebar shows the badge while the version in `packages/devtools/package.json` is older than `until`, and never shows a `new` or `updated` badge without one. `pnpm docs:test` fails on a missing or malformed `until`. Remove an entry's `status` and `until` once its version has shipped. + ### Link to other pages Link to another page by the relative path of its `.md` file, in markdown links and in `` tags: `[Configuration](./configuration.md)`, ``. The site turns these into routes, and the same links work when the page is read on GitHub. diff --git a/apps/docs/src/content/getting-started/angular-native.md b/apps/docs/src/content/getting-started/angular-native.md index 681ddee9..0492e186 100644 --- a/apps/docs/src/content/getting-started/angular-native.md +++ b/apps/docs/src/content/getting-started/angular-native.md @@ -1,6 +1,6 @@ --- title: Angular Native -description: Send live components, signals, injectors, stores, change detection, leaks and errors from an Angular Native app on a device to the devtools on your machine. +description: Add the devtools to an Angular Native app and send live components, signals, injectors, stores, change detection, leaks and errors from a device to your machine. --- @@ -9,9 +9,159 @@ description: Send live components, signals, injectors, stores, change detection, # Angular Native -[Angular Native](https://ng-native.com) renders *Angular onto React Native's Fabric renderer, so the app has no DOM for the [browser overlay](./overlay.md) to walk. The `@pangular-inspector/devtools/overlay-angular-native` entry point walks Angular Native's own node tree instead and sends the same live data to a devtools server that runs on your machine. +[Angular Native](https://ng-native.com) renders *Angular onto React Native's Fabric renderer, so the app has no DOM for the [browser overlay](./overlay.md) to walk. The `@pangular-inspector/devtools/overlay-angular-native` entry point walks Angular Native's own node tree instead, and sends the same live data to the [standalone devtools server](./cli.md) on your machine. -This page describes what the overlay shows and how it works. To add it to an app, follow [Set up Angular Native](../guides/angular-native.md). +This page sets the overlay up, then describes what it shows and how it works. + +## Requirements + +- A development build. Angular publishes its debug API on `globalThis.ng` only when `ngDevMode` is on, which is the default in a Metro development build. +- An app started with `mount()` from `@ng-native/platform`. The overlay needs the root node it returns. The demo uses `@ng-native/*` 0.2.0, the version the overlay is written against. +- A `WebSocket` global and a standards-compliant `URL`. React Native provides `WebSocket`. Expo provides `URL`. React Native's own `URL` is read-only, and the client sets the `protocol` of the socket URL, so a bare React Native app needs a polyfill such as `react-native-url-polyfill`. + +## Set up + + + + Add @pangular-inspector/devtools. A bare React Native app also needs a URL polyfill. + + + Call initAngularNativeOverlay() in src/main.ts, after mount(), with the root node it returns. + + + Start pangular dev --no-auth in the app's folder. + + + Open the Angular Native apps URL the server prints. The live tabs fill once the app connects. + + + +### Install + +```bash group="install" name="pnpm" image="https://cdn.simpleicons.org/pnpm/F69220" active +pnpm add @pangular-inspector/devtools +``` + +```bash group="install" name="npm" image="https://cdn.simpleicons.org/npm/CB3837" +npm install @pangular-inspector/devtools +``` + +```bash group="install" name="yarn" image="https://cdn.simpleicons.org/yarn/2C8EBB" +yarn add @pangular-inspector/devtools +``` + +```bash group="install" name="bun" image="https://bun.sh/logo.svg" +bun add @pangular-inspector/devtools +``` + +### WebSocket and URL + +The overlay needs a `WebSocket` global and a standards-compliant `URL`. React Native provides `WebSocket`, and Expo provides `URL`, so an Expo app needs nothing more. + +React Native's own `URL` is read-only, and the client sets the `protocol` of the socket URL. In a bare React Native app, install a polyfill such as `react-native-url-polyfill`: + +```bash group="url-polyfill" name="pnpm" image="https://cdn.simpleicons.org/pnpm/F69220" active +pnpm add react-native-url-polyfill +``` + +```bash group="url-polyfill" name="npm" image="https://cdn.simpleicons.org/npm/CB3837" +npm install react-native-url-polyfill +``` + +```bash group="url-polyfill" name="yarn" image="https://cdn.simpleicons.org/yarn/2C8EBB" +yarn add react-native-url-polyfill +``` + +```bash group="url-polyfill" name="bun" image="https://bun.sh/logo.svg" +bun add react-native-url-polyfill +``` + +Then import it first in `src/main.ts`, above the imports of the next sample: + +```ts +// src/main.ts +import 'react-native-url-polyfill/auto'; +``` + +### Start the overlay + +Start the overlay after `mount()` from `@ng-native/platform`, and pass the root node of the mounted app: + +```ts {5,15} +// src/main.ts +import {AppRegistry, Image, Platform, processColor} from 'react-native'; +import {mount} from '@ng-native/platform'; +import {getFabricUIManager, registerPlatformComponents} from '@ng-native/fabric'; +import {initAngularNativeOverlay} from '@pangular-inspector/devtools/overlay-angular-native'; +import {App} from './app/app.ts'; + +registerPlatformComponents(Platform.OS); + +AppRegistry.registerRunnable('main', ({rootTag}) => { + const app = mount(Number(rootTag), App, getFabricUIManager(), { + processColor, + resolveAssetSource: (value) => Image.resolveAssetSource(value as never), + }); + if (__DEV__) initAngularNativeOverlay({root: app.engine.root}); +}); +``` + +The `__DEV__` check keeps the overlay out of release builds, which have no `ng` debug global to read. `initAngularNativeOverlay()` returns a function that stops the overlay and tells the server to forget the app. See [Options](#options) for `baseURL`, `intervalMs` and `retryMs`. + +### Where the overlay connects + +The overlay connects to `http://localhost:9999/` unless you pass `baseURL`. + +| Where the app runs | What to do | +| -------------------------------------- | ----------------------------------------------------------------------------------------------- | +| iOS simulator | Nothing. The simulator shares your machine's `localhost`. | +| Android emulator or USB Android device | Run `adb reverse tcp:9999 tcp:9999`, the same forwarding Metro uses for its own port. | +| Physical device over Wi-Fi | Pass your machine's LAN address as `baseURL`, such as `{baseURL: 'http://192.168.1.20:9999/'}`. | + +A device that reaches the server over plain HTTP may need a cleartext exception for that address in `Info.plist` or the Android network security config. + +### Run the devtools server + +Run the server in the app's folder, so the source scanners read its `src/`: + +```bash +cd my-angular-native-app +npx @pangular-inspector/devtools dev --no-auth +``` + +The server listens on `localhost` only, which the iOS simulator reaches directly and an Android emulator reaches through `adb reverse`. `--no-auth` is needed because the app cannot enter the one-time code the panel asks for. Without it, the overlay logs a warning in the Metro log that names the flag and keeps retrying. + +When it is ready, the server prints the Angular Native view on its own line, next to the NativeScript setup view: + +```text + pangular v + Panel: http://localhost:9999/ + Angular Native apps: http://localhost:9999/?view=angular-native + NativeScript setup: http://localhost:9999/?view=nativescript + MCP: http://localhost:9999/__mcp +``` + +A physical device over Wi-Fi reaches your machine over the network, so the server has to listen on an interface the device can reach: + +```bash +npx @pangular-inspector/devtools dev --host 192.168.1.20 --allowed-origin http://192.168.1.20:9999 --no-auth +``` + +The server then listens on that address only, not on `localhost`, so open the panel at `http://192.168.1.20:9999/`. `--allowed-origin` lets the panel's own origin through there. Use your machine's address and the server's port. + + + With --host and --no-auth, every host that can reach that address can call the devtools RPC and MCP endpoints without a code. Use it on a trusted network only. Binding to the one address the device uses, as above, keeps the server off your other interfaces, which 0.0.0.0 would not. + + +See [Standalone CLI](./cli.md) for the other server options and [Security](../security.md) for what `--no-auth` turns off. + +### Open the panel + +Open `http://localhost:9999/?view=angular-native` on your machine. The **Angular Native** view shows the tabs an app on a device fills: **Components**, **Signals**, **Injectors**, **Store**, **Queries**, **Pipes** and **Errors**. With no app connected, it says **No Angular Native app is connected**. + +When the app connects, the Metro log shows `[pangular] Connected to the devtools server at http://localhost:9999/` and the tabs fill. Hover a component in the tree to outline its view on the device. + +If the app reports to a hub (Express or the Vite plugin) instead, pick the **Angular Native** dock in the side rail. See [Where it shows in the panel](#where-it-shows-in-the-panel). ## What it shows @@ -60,16 +210,6 @@ The overlay marks its component reports with `platform: 'angular-native'`, and t `list-pages` gives each page's platform, so an agent can tell an Angular Native app from a browser tab. See [Agent tools](../agents/tools.md#list-pages). -## Requirements - -- A development build. Angular publishes its debug API on `globalThis.ng` only when `ngDevMode` is on, which is the default in a Metro development build. -- An app started with `mount()` from `@ng-native/platform`. The overlay needs the root node it returns. The demo uses `@ng-native/*` 0.2.0, the version the overlay is written against. -- A `WebSocket` global and a standards-compliant `URL`. React Native provides `WebSocket`. Expo provides `URL`. React Native's own `URL` is read-only, and the client sets the `protocol` of the socket URL, so a bare React Native app needs a polyfill such as `react-native-url-polyfill`. - -## Set up - -[Set up Angular Native](../guides/angular-native.md) walks through it: install the package, start the overlay after `mount()`, run the server with `--no-auth` and open the panel. It also covers how the app reaches the server from a simulator, an emulator or a device, and how to run the [Angular Native demo](../contributing/demo-apps.md#angular-native-demo). - ## Options | Option | Default | What it does | @@ -101,11 +241,39 @@ The hook does nothing when `ngDevMode` is off. Without it, only stores created a - **Errors**: the overlay wraps the app's `ErrorHandler`, listens to the console, and hears React Native's global error handler (`ErrorUtils`), which it calls on with every error and puts back when the overlay stops. - **Highlight**: when the panel or the `highlight` agent tool points at a component, the overlay sets `outlineWidth`, `outlineStyle` and `outlineColor` in the view's inline style, and restores the previous values when the panel clears it. -## FAQ +## Try the demo + +`examples/angular-native` is an Expo app wired up this way, with a root service, an `@ngrx/signals` store and components with signals to inspect. It is outside the pnpm workspace and installs with npm, using a tarball of the devtools package built from this repository. It uses `@ng-native/*` 0.2.0. The overlay's tests run against a simulated view tree and connection, and no automated test runs the demo on a simulator or device: + +```bash +cd examples/angular-native +npm run devtools:pack +npm install +npm run devtools +``` + +`npm run devtools` starts the devtools server with `--no-auth` on `http://localhost:9999/`, scanning the demo's `src`. In a second terminal, build and start the app: + +```bash +npm run ios +``` + +On Android, forward the devtools port first: + +```bash +adb reverse tcp:9999 tcp:9999 +npm run android +``` + +After a change in `packages/devtools`, run `npm run devtools:pack` and then `npm install ./pangular-inspector-devtools.tgz`, since a plain `npm install` keeps the tarball its lockfile pins. See [Angular Native demo](../contributing/demo-apps.md#angular-native-demo) for what each file covers. + +## Troubleshooting + +The [troubleshooting page](./troubleshooting.md) lists the problems every setup shares, by symptom. - Check the Metro log for a [pangular] line. A warning about --no-auth means the server asked for a code. A warning about reaching the server means the address is wrong for where the app runs. See where the overlay connects. A release build has no ng global, so nothing is collected there. + Check the Metro log for a [pangular] line. A warning about --no-auth means the server asked for a code. A warning about reaching the server means the address is wrong for where the app runs. See where the overlay connects. A release build has no ng global, so nothing is collected there. Angular records providers only when a window global exists as mount() creates the platform. When __DEV__ is true and no window exists, importing @pangular-inspector/devtools/overlay-angular-native defines one until Angular publishes its debug utilities, then removes it. Keep the import at the top of src/main.ts, so it runs before mount(). If the list stays empty, check that window is defined before mount() runs. @@ -115,9 +283,9 @@ The hook does nothing when `ngDevMode` is off. Without it, only stores created a ## Where to next - + diff --git a/apps/docs/src/content/getting-started/chrome-extension.md b/apps/docs/src/content/getting-started/chrome-extension.md index bc37dd92..f95fbf73 100644 --- a/apps/docs/src/content/getting-started/chrome-extension.md +++ b/apps/docs/src/content/getting-started/chrome-extension.md @@ -251,6 +251,8 @@ The panel needs a devtools server: it reads the page through the overlay and the ## FAQ +The [troubleshooting page](./troubleshooting.md) lists the problems every setup shares, by symptom. + The page did not look like an Angular app within about five seconds of opening DevTools. Check that it renders an ng-version attribute or exposes window.ng, which development builds do. If the page shows a prompt for the one-time code, the extension cannot check the page until you answer or close the prompt. Then close and reopen DevTools, or reload the page. diff --git a/apps/docs/src/content/getting-started/cli.md b/apps/docs/src/content/getting-started/cli.md index b26be398..473ce82a 100644 --- a/apps/docs/src/content/getting-started/cli.md +++ b/apps/docs/src/content/getting-started/cli.md @@ -150,7 +150,7 @@ It prints lines like these after the startup lines: ng build --configuration development --define "__PANGULAR_LAN_URL__='http://192.168.1.20:9999/'" ``` -The `--define` flag needs the `application` builder of Angular 17.2 or later. The NativeScript overlay connects to the injected URL when you pass no `baseURL`, and `lanDevtoolsURL()` from `@pangular-inspector/devtools/overlay-manual` reads it in a Capacitor app. See [Set up Capacitor](../guides/capacitor.md#use-the-injected-lan-address) and [Set up NativeScript](../guides/nativescript.md#use-the-injected-lan-address). +The `--define` flag needs the `application` builder of Angular 17.2 or later. The NativeScript overlay connects to the injected URL when you pass no `baseURL`, and `lanDevtoolsURL()` from `@pangular-inspector/devtools/overlay-manual` reads it in a Capacitor app. See [Set up Capacitor](../guides/capacitor.md#use-the-injected-lan-address) and [Set up NativeScript](./nativescript.md#use-the-injected-lan-address). `--lan-address` only prints. It doesn't change the host the server binds to, the origin check or the one-time code. With `--host localhost`, the default, it prints a warning and no address, since a phone can't reach that server. `--lan-address 192.168.1.20` names the address, for a machine on several networks. A loopback address is refused. @@ -318,6 +318,8 @@ The SARIF output is a SARIF 2.1.0 log with one run. Rule ids are the lint and th ## FAQ +The [troubleshooting page](./troubleshooting.md) lists the problems every setup shares, by symptom. + No. dev, build, mcp and lint read your source files. Only live data needs a running app with the overlay loaded. diff --git a/apps/docs/src/content/getting-started/express.md b/apps/docs/src/content/getting-started/express.md index 7a6fd944..a9395879 100644 --- a/apps/docs/src/content/getting-started/express.md +++ b/apps/docs/src/content/getting-started/express.md @@ -208,7 +208,7 @@ A floating button appears on your page. It opens the devtools with one dock entr | NgRx | Store patterns from source, and live state and actions | | Analog | File routes, server calls, render modes and lint (a notice in non-Analog apps) | | Angular Native | Components, signals, injectors, stores, queries, pipes and errors of a connected [Angular Native](./angular-native.md) app | -| NativeScript | Setup steps for [NativeScript apps](../guides/nativescript.md) | +| NativeScript | Setup steps for [NativeScript apps](./nativescript.md) | | Capacitor | Plugin calls of a connected [Capacitor app](../inspectors/capacitor.md), or setup steps when none is connected | [Popup and hub](./popup-and-hub.md) covers the panel, its dock modes and deep links. @@ -313,6 +313,8 @@ Like `@pangular-inspector/devtools/hub`, the devframe entry point loads Devframe ## Troubleshooting +The [troubleshooting page](./troubleshooting.md) lists the problems every setup shares, by symptom. + The app is probably a production build. Run ng serve, or build with --configuration development. Then check that main.ts imports the overlay. diff --git a/apps/docs/src/content/getting-started/features.md b/apps/docs/src/content/getting-started/features.md new file mode 100644 index 00000000..721c43e9 --- /dev/null +++ b/apps/docs/src/content/getting-started/features.md @@ -0,0 +1,132 @@ +--- +title: Features +description: A tour of every tab in the panel and what to open it for, with screenshots of most tabs, plus what works outside the panel. +--- + + + Every tab in the panel, what it shows and when to open it. Each section links to the inspector page that covers it in full. + + +# Features + +Each tab of the panel is an inspector. It reads your source files, your running app, or both. Agents read the same data through the [agent tools](../agents/tools.md). The screenshots come from the [demo apps](../contributing/demo-apps.md). + +## App structure + +### Dashboard + +Get your bearings: the Angular and TypeScript versions, SSR, change detection mode and a count for each inspector, from the source scan and the live page. See [Dashboard](../inspectors/dashboard.md). + + + +### Components + +Find out what a component received and holds right now: its inputs, properties, outputs, injected services, defer blocks and `@for` blocks, with change detection recordings and leaks. See [Components](../inspectors/components.md). + + + +### Injectors + +See why an injection resolved to the provider it did, or failed: the injector hierarchy, the lookup path of a token and the providers at each level. See [Injectors](../inspectors/injectors.md). + + + +### Signals + +Follow a value through its producers and consumers in the live signal graph of a component or injector, with resources and a value history per signal. See [Signals](../inspectors/signals.md). + + + +### Pipes + +Check where custom, built-in and library pipes are used, how many instances are live, and record their calls. See [Pipes](../inspectors/pipes.md). + + + +## State and data + +### NgRx Store + +Read NgRx signal stores and @ngrx/store state with their change logs and diffs, restore an earlier state and dispatch actions. NGXS, Elf and MiniRx stores show too. See [NgRx Store](../inspectors/ngrx-store.md). + + + +### TanStack Query + +See each query and mutation with its status, freshness, observers, error and data, then invalidate or refetch it. See [TanStack Query](../inspectors/tanstack-query.md). + +### Forms + +Find out why a form is invalid or did not submit: each field with its state and errors, a change timeline and a lint. See [Forms](../inspectors/forms.md). + + + +## Navigation and the network + +### Router + +Explain a navigation: the live route, each navigation with its guards and resolvers, the route config and a route lint. See [Router](../inspectors/router.md). + + + +### SSR & HTTP + +Trace an HTTP call from the server render to the browser, inject faults, and read hydration stats and the TransferState payload. See [SSR & HTTP](../inspectors/ssr-http.md). + + + +### Timeline + +Put navigations, HTTP calls, NgRx actions, change detection, form events and signal changes on one time axis to see what happened in what order. See [Timeline](../inspectors/timeline.md). + + + +## Problems + +### Errors + +Read every error from the ErrorHandler, uncaught errors, unhandled rejections and the console, with the component that threw it, a docs link for NG0xxx codes and explainers for NG0100, hydration mismatches and missing providers. See [Errors](../inspectors/errors.md). + + + +### Audit + +Get one ranked list of what the inspectors found, an axe pass over the page, and a before and after comparison of a change. See [Audit](../inspectors/audit.md). + +## Frameworks and platforms + +### Analog + +Map an Analog URL to its page, layout and server files, and list server calls, render modes, content and lint. See [Analog](../inspectors/analog.md). + + + +### Capacitor + +Watch a Capacitor app's plugin calls and listeners, with the platform and the plugins its WebView reports. See [Capacitor](../inspectors/capacitor.md). + + + +## Outside the panel + +| Feature | What it does | Read more | +| --------------------- | ------------------------------------------------------------------------------------------- | --------------------------------------------- | +| Agent tools over *MCP | The same data and actions for a coding agent, over HTTP or stdio. | [MCP server](../agents/mcp-server.md) | +| Browser agents | Read-only tools registered on the page through WebMCP, off by default. | [Browser agents](../agents/browser-agents.md) | +| Standalone CLI | A local server, a static report, an MCP server and a lint export, without your app running. | [Standalone CLI](./cli.md) | +| Chrome extension | The panel inside Chrome DevTools, following the **Elements** panel. | [Chrome extension](./chrome-extension.md) | +| Command palette | Any tab or action from the keyboard. | [Command palette](./command-palette.md) | +| Plugins | A library's own tab and agent tools. | [Write a plugin](../guides/write-a-plugin.md) | + +## Which Angular version each feature needs + +Most tabs work from Angular 12.2. Some features read debug APIs that later releases added, such as the live signal graph (20.1) and change detection recording (20.0). [Supported Angular versions](./installation.md#supported-angular-versions) lists the minimum version of each feature. + +## Where to next + + + + + + + diff --git a/apps/docs/src/content/getting-started/installation.md b/apps/docs/src/content/getting-started/installation.md index 08bb50c2..246e9242 100644 --- a/apps/docs/src/content/getting-started/installation.md +++ b/apps/docs/src/content/getting-started/installation.md @@ -29,6 +29,49 @@ The devtools ship as one npm package, `@pangular-inspector/devtools`. It contain Live data comes from Angular's debug API (window.ng). Production builds remove it, so the live tabs stay empty there. Run your app in development mode while you inspect it. +## Supported setups + +Every setup has a server part, which serves the panel. To see live data from a page, the page also runs the [overlay](./overlay.md). The standalone CLI on its own reads only your source files and needs no overlay. Find your app in the table, then follow its page. + +| Your app | Dev server or builder | Server part | Steps | Install check | +| ---------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------------------- | ------ | ------------- | +| Angular CLI with SSR | `ng serve` or the built SSR server (`@angular/build`) | [`initPangularHub()` in `server.ts`](./express.md) | 3 | Weekly | +| Angular CLI without SSR | `ng serve` with a proxy (`@angular/build`) | [Standalone CLI next to `ng serve`](#client-only-angular-cli-app) | 5 | Weekly | +| Analog | Vite | [Vite plugin](./vite.md) | 2 | Weekly | +| Another Angular app with its own `vite.config` | Vite | [Vite plugin](./vite.md) | 2 | No | +| Angular SSR on Hono, h3 or Fastify | Your server | [`initPangularHub()` handler](./other-servers.md) | 3 | No | +| Your source files, with no app running | None | [Standalone CLI](./cli.md) | 1 | Weekly | +| NativeScript, Angular Native or Capacitor | The platform's own tooling | Standalone CLI or a hub | 3 to 4 | No | + +Steps count what you add to the app, from the install to the first **Live** panel. The [Chrome extension](./chrome-extension.md) works on top of any setup with a browser page and adds no server part. [Platforms](./platforms.md) lists the device targets and what is checked on each. + +### Builders + +The builder bundles your app and the overlay import in `main.ts`. Only the Vite plugin plugs into it. The other server parts run in your server or in the standalone CLI. + +| Builder | Status | +| ------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `@angular/build:application` and `@angular/build:dev-server` | Supported. The weekly install check runs it on Angular 20.3, 21 and 22, with and without SSR. | +| Vite, through `@analogjs/platform` | Supported. The weekly install check runs a fresh Analog app. | +| Vite, with your own `vite.config` | Supported through the same plugin, but not tested. The Angular CLI dev server does not accept Vite plugins, so `ng serve` apps use the hub or the CLI instead. | +| `@angular-devkit/build-angular:browser` (webpack) | Supported, but not in the install check. Load the overlay in `main.ts` and run the standalone CLI next to `ng serve`, or the Express hub for an SSR app. See [Setup on Angular 12 to 19](#setup-on-angular-12-to-19). | +| Nx executors | Not tested. The standalone CLI reads every `project.json` of the workspace, see [Nx workspaces](./cli.md#nx-workspaces). The rest depends on the builder the executor runs. | +| Rsbuild and other bundlers | Not tested. | + +### What the install check runs + +The weekly E2E workflow packs the package, publishes it to a local registry, installs it into fresh apps the way these pages say. Each cell with an app builds it, starts it, and opens the app and the panel in Chromium until the **Components** tab shows the app root. + +| Cell | App | Package managers | Angular | +| ------------------- | ---------------------------------------------------------------------------------------------- | ---------------- | --------------- | +| `angular-cli` | `ng new --ssr` with the Express hub, built for development and run on the SSR server | npm, pnpm | 20.3, 21 and 22 | +| `angular-cli-serve` | The same app under `ng serve` | npm, pnpm | 20.3, 21 and 22 | +| `angular-cli-nossr` | `ng new --ssr=false` with the standalone CLI behind the `ng serve` proxy | npm, pnpm | 20.3, 21 and 22 | +| `analog` | `create-analog` with the Vite plugin, built with `vite build`, then run on the Vite dev server | pnpm | The template's | +| `cli` | The standalone CLI with `npx`, its MCP endpoint and the static report | npm, pnpm | Newest | + +yarn and bun are not in the weekly run. [End-to-end scripts](../contributing/development.md#end-to-end-scripts) shows how to run the cells yourself. + ## Supported Angular versions The peer range covers Angular 12.2 and later, and CI tests it (see [Tested versions](#tested-versions)). The overlay checks each debug API on the page and sends what it finds with the page's Angular version, so each tab shows the data that version provides. Only the profiler also looks at the version: the overlay uses `ɵsetProfiler` from Angular 20.0, because before that it holds a single profiler. @@ -154,6 +197,8 @@ The overlay goes after bootstrap, behind the `ngDevMode` check shown in [Browser ### Entry points +The [API reference](../api/index.md) lists every symbol each entry point exports, with its declaration. + | Import | Use it for | | ----------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | | `@pangular-inspector/devtools/hub` | `initPangularHub()`, the server middleware for an Express app. | @@ -334,6 +379,8 @@ The [Chrome extension](./chrome-extension.md) adds a panel to Chrome DevTools. I ## FAQ +The [troubleshooting page](./troubleshooting.md) lists the problems every setup shares, by symptom. + No. The package depends on Devframe and re-exports initDevframe from @pangular-inspector/devtools/devframe, for example to mount only the panel. Import it from there, so the panel and the devframe definition come from the same Devframe copy. diff --git a/apps/docs/src/content/getting-started/introduction.md b/apps/docs/src/content/getting-started/introduction.md index e0f5ad81..7ca82a94 100644 --- a/apps/docs/src/content/getting-started/introduction.md +++ b/apps/docs/src/content/getting-started/introduction.md @@ -21,7 +21,7 @@ The same tool runs in several places. It is built with *Devframe, so one definit ### Live inspectors -These tabs read the running page through Angular's debug API. They need a development build. +These tabs read the running page through Angular's debug API. They need a development build. [Features](./features.md) walks through each tab, with screenshots of most of them. diff --git a/apps/docs/src/content/getting-started/keyboard-shortcuts.md b/apps/docs/src/content/getting-started/keyboard-shortcuts.md new file mode 100644 index 00000000..71b45ce7 --- /dev/null +++ b/apps/docs/src/content/getting-started/keyboard-shortcuts.md @@ -0,0 +1,70 @@ +--- +title: Keyboard shortcuts +description: Every keyboard shortcut of the popup, the panel, the command palette and the inspector tabs, on one page. +--- + + + The keys that open the popup and the command palette, and the keys each tab answers. Each table links to the page that describes it. + + +# Keyboard shortcuts + +Use Cmd on macOS where a shortcut says Ctrl. Every control the shortcuts reach also has a button or a link, so the mouse and a screen reader get the same actions. + +## On your app's page + +| Keys | What it does | +| -------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | +| Alt+Shift+P | Opens or closes the popup anywhere on the page. [`popup.hotkey`](./configuration.md#popup) sets another shortcut, or `false` turns it off. | +| Enter or Space | Opens the panel from the focused floating button, and moves focus into the panel. | +| Arrow keys on the floating button | Move the button. Hold Shift to move it further. | +| Alt+click while picking | Picks the component and also opens its file in your editor, in a development build. Option+click on macOS. | +| Escape | Stops picking a component or a form field, in the app or in the panel. | + +See [Keyboard and mouse](./popup-and-hub.md#keyboard-and-mouse) and [Pick a component on the page](../inspectors/components.md#pick-a-component-on-the-page). + +## In the panel + +| Keys | What it does | +| ------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| Ctrl+K | Opens the [command palette](./command-palette.md). | +| Arrow keys, Home and End in the tab bar | Move between tabs. Enter opens one. | +| Escape | Closes the panel. In a search box with text, it clears the box first. | +| Arrow keys on the splitter | Resize a docked panel by 16 pixels, or 64 with Shift. Home and End go to the smallest and largest size. | +| Enter on a file and line | Opens the file at that line in your editor, with a live devtools server. | + +See [Resize a docked panel](./popup-and-hub.md#resize-a-docked-panel). + +## In the command palette + +| Keys | What it does | +| ------------------------------------------- | --------------------------------------------- | +| ↑ and ↓ | Move through the list. It wraps at both ends. | +| Page Up and Page Down | Jump to the first or the last command. | +| Enter | Run the highlighted command. | +| Escape | Close the palette without running anything. | + +See [Filter and run](./command-palette.md#filter-and-run). + +## In the tabs + +Long lists are one Tab stop. Move inside them with the keys below. + +| Where | Keys | Read more | +| ---------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| **Components** tree | Arrow keys, Home and End. → expands a row or moves to its first child, ← collapses it or moves to its parent. * expands every row at the same level. | [Keyboard](../inspectors/components.md#keyboard) | +| **Components** change detection chart | Arrow keys move between cycles, Shift with an arrow extends the range, Enter picks one cycle and Escape shows all. | [Pick a range of cycles](../inspectors/components.md#pick-a-range-of-cycles) | +| **Signals** graph | Arrow keys move up and down a column, left to a producer and right to a consumer. Home and End go to the ends, Enter or Space selects. | [Graph](../inspectors/signals.md#graph) | +| **Timeline** events | ↑, ↓, Home and End move, Enter selects. | [Keyboard](../inspectors/timeline.md#keyboard) | +| **SSR & HTTP** timeline, **Store** lists | ↑, ↓, Home and End move through the rows. | [Keyboard and mouse](./popup-and-hub.md#keyboard-and-mouse) | +| **Capacitor** calls | Arrow keys, Home and End move, Enter selects. The same keys move between the tabs of a call. | [Plugin calls](../inspectors/capacitor.md#plugin-calls) | +| **Settings** tab list | Alt+↑ or Alt+↓ on a row moves the tab. | [Tabs](./settings.md#tabs) | +| Search and filter boxes | Escape clears the box. | The page of each tab | + +## Where to next + + + + + + diff --git a/apps/docs/src/content/getting-started/nativescript.md b/apps/docs/src/content/getting-started/nativescript.md index bab9b231..89cb1223 100644 --- a/apps/docs/src/content/getting-started/nativescript.md +++ b/apps/docs/src/content/getting-started/nativescript.md @@ -1,6 +1,6 @@ --- title: NativeScript -description: Send live components, signals, injectors, stores, change detection, leaks and errors from a NativeScript Angular app on a simulator or device to the devtools on your machine. +description: Add the devtools to a NativeScript Angular app and send live components, signals, injectors, stores, change detection, leaks and errors from a simulator or device to your machine. --- @@ -9,9 +9,188 @@ description: Send live components, signals, injectors, stores, change detection, # NativeScript -A NativeScript Angular app renders into `@nativescript/core` views, so it has no DOM for the [browser overlay](./overlay.md) to walk. The `@pangular-inspector/devtools/overlay-nativescript` entry point walks the NativeScript view tree instead and sends live data to a devtools server that runs on your machine. +A NativeScript Angular app renders into `@nativescript/core` views, so it has no DOM for the [browser overlay](./overlay.md) to walk. The `@pangular-inspector/devtools/overlay-nativescript` entry point walks the NativeScript view tree through *Angular's debug API instead, and sends live data to the [standalone devtools server](./cli.md) on your machine. -This page describes what the overlay shows and how it works. To add it to an app, follow [Set up NativeScript](../guides/nativescript.md). +This page sets the overlay up, then describes what it shows and how it works. + +## Requirements + +- A development build. Angular publishes its debug API on `globalThis.ng` only when `ngDevMode` is on. Start the overlay inside an `if (__DEV__)` check. +- `@nativescript/core`, an optional peer dependency of the package. The overlay reads the root view and the platform from it. +- A `WebSocket` global. The NativeScript runtime has none, so import `@valor/nativescript-websockets` first in `src/polyfills.ts`. Without it, the overlay logs a warning that names the package and does not start. +- `initNativeScriptOverlay()` called before `runNativeScriptAngularApp()`, so the injector inspector gets its provider lists. See [How it works](#how-it-works). +- A server started with `--no-auth`, since the app cannot enter the one-time code the panel asks for. Against a server with auth on, the overlay logs a warning that says to start it with `--no-auth`, and tries again every `retryMs`. + +## Set up + + + + Add @pangular-inspector/devtools and @valor/nativescript-websockets. + + + Import @valor/nativescript-websockets first in src/polyfills.ts. + + + Call initNativeScriptOverlay() in src/main.ts, before the app bootstraps. + + + Start pangular dev --no-auth in the app's folder and open the panel. + + + +### Install + +```bash group="install" name="pnpm" image="https://cdn.simpleicons.org/pnpm/F69220" active +pnpm add @pangular-inspector/devtools @valor/nativescript-websockets +``` + +```bash group="install" name="npm" image="https://cdn.simpleicons.org/npm/CB3837" +npm install @pangular-inspector/devtools @valor/nativescript-websockets +``` + +```bash group="install" name="yarn" image="https://cdn.simpleicons.org/yarn/2C8EBB" +yarn add @pangular-inspector/devtools @valor/nativescript-websockets +``` + +```bash group="install" name="bun" image="https://bun.sh/logo.svg" +bun add @pangular-inspector/devtools @valor/nativescript-websockets +``` + +### Add a WebSocket global + +The overlay talks to the server over a WebSocket, and the NativeScript runtime has no `WebSocket` global. Import the polyfill first: + +```ts +// src/polyfills.ts +import '@valor/nativescript-websockets'; +``` + +### Start the overlay + +```ts {7,11-13} +// src/main.ts +import { + bootstrapApplication, + provideNativeScriptRouter, + runNativeScriptAngularApp, +} from '@nativescript/angular'; +import {initNativeScriptOverlay} from '@pangular-inspector/devtools/overlay-nativescript'; +import {routes} from './app/app.routes'; +import {AppComponent} from './app/app.component'; + +if (__DEV__) { + initNativeScriptOverlay(); +} + +runNativeScriptAngularApp({ + appModuleBootstrap: () => + bootstrapApplication(AppComponent, { + providers: [provideNativeScriptRouter(routes)], + }), +}); +``` + +Call it before `runNativeScriptAngularApp()`, as above. The injector inspector relies on *Angular's injector profiler, which *Angular only wires while it creates the platform. See [Options](#options) for `baseURL`, `intervalMs` and `retryMs`. + +### Where the overlay connects + +| Target | Default URL | +| ---------------- | --------------------------------------------------------------------------------------- | +| iOS simulator | `http://localhost:9999/` | +| Android emulator | `http://10.0.2.2:9999/` | +| Physical device | Pass `{ baseURL }`, or [inject the LAN address](#use-the-injected-lan-address) at build | + +A build that defines `__PANGULAR_LAN_URL__` takes that URL over the defaults above. `baseURL` still wins over both. + +### Use the injected LAN address + +For a physical device, pass the address of your machine as `baseURL`, or let the build inject it, so `main.ts` keeps no address. Start the server with `--lan-address` (see [Run the devtools server](#run-the-devtools-server)) to print the URL, then define it in `webpack.config.js` from an environment variable: + +```js {6-13} +// webpack.config.js +const webpack = require('@nativescript/webpack'); + +module.exports = (env) => { + webpack.init(env); + const lanUrl = process.env['PANGULAR_LAN_URL']; + if (lanUrl && !env.production) { + webpack.chainWebpack((config) => { + config.plugin('DefinePlugin').tap((args) => { + Object.assign(args[0], {__PANGULAR_LAN_URL__: JSON.stringify(lanUrl)}); + return args; + }); + }); + } + return webpack.resolveConfig(); +}; +``` + +Run the app with the URL the server printed, for example `PANGULAR_LAN_URL=http://192.168.1.20:9999/ ns run android`. `initNativeScriptOverlay()` without `baseURL` then connects there. A release build (`--env.production`) gets no address. + +### Allow plain HTTP to your machine + +The devtools server speaks plain `http`. Android 9 and later block cleartext traffic, and iOS App Transport Security can block it, so allow it to your machine in development builds. + +On Android, list the hosts the app may reach over cleartext in `App_Resources/Android/src/main/res/xml/network_security_config.xml`. The emulator reaches your machine at `10.0.2.2`, and a device at your machine's address: + +```html + + + + + localhost + 10.0.2.2 + 192.168.1.20 + + +``` + +Then set `android:networkSecurityConfig="@xml/network_security_config"` on the `` element of `App_Resources/Android/src/main/AndroidManifest.xml`. If the manifest already sets `android:usesCleartextTraffic="true"`, every host is allowed already. `examples/nativescript` ships a network security config. Keep these entries out of release builds. + +On iOS, add the local networking exception to `App_Resources/iOS/Info.plist`: + +```html + +NSAppTransportSecurity + + NSAllowsLocalNetworking + + +NSLocalNetworkUsageDescription +Connects to Pangular Inspector on your computer during development. +``` + +On iOS 14 and later, the first connection to an address on your network shows a local network permission prompt with that text. If the app was denied, turn it back on in **Settings** > **Privacy & Security** > **Local Network**. + +### Run the devtools server + +Run the server in the app's folder, so the source scanners read its `src/`: + +```bash +cd my-nativescript-app +npx @pangular-inspector/devtools dev --no-auth +``` + +The server listens on `localhost` only, which the iOS simulator and the Android emulator reach. `--no-auth` is needed because the app cannot enter the one-time code the panel asks for. + +| What | Where | +| ------------ | ----------------------------- | +| Devtools UI | `http://localhost:9999/` | +| MCP endpoint | `http://localhost:9999/__mcp` | + +A physical device reaches your machine over the network, so the server has to listen on an interface the device can reach: + +```bash +npx @pangular-inspector/devtools dev --host 192.168.1.20 --allowed-origin http://192.168.1.20:9999 --no-auth --lan-address +``` + +The server then listens on that address only, not on `localhost`, so open the panel at `http://192.168.1.20:9999/`. `--allowed-origin` lets the panel's own origin through there. `--lan-address` prints the URL to [inject into the app](#use-the-injected-lan-address). Use your machine's address and the server's port. + + + With --host and --no-auth, every host that can reach that address can call the devtools RPC and MCP endpoints without a code. Use it on a trusted network only. Binding to the one address the device uses, as above, keeps the server off your other interfaces, which 0.0.0.0 would not. + + +See [Standalone CLI](./cli.md) for the other server options and [Security](../security.md) for what `--no-auth` turns off. ## What it shows @@ -56,22 +235,10 @@ The live data shows in the same tabs as a browser page. | [Standalone CLI](./cli.md) | The panel at `http://localhost:9999/`, without `?view`. | | A hub (Express or the Vite plugin) | The **Angular** dock in the side rail. | -The **NativeScript** dock (`?view=nativescript`) shows no live data. It is a setup card, **Inspect NativeScript apps**, with the setup steps and a link to the [setup guide](../guides/nativescript.md). +The **NativeScript** dock (`?view=nativescript`) shows no live data. It is a setup card, **Inspect NativeScript apps**, with the setup steps and a link to this page. The overlay marks its component reports with `platform: 'nativescript'`, the URL `/` and the title `NativeScript (iOS)` or `NativeScript (Android)`. `list-pages` lists the app with the `NativeScript` platform. See [Agent tools](../agents/tools.md#list-pages). -## Requirements - -- A development build. Angular publishes its debug API on `globalThis.ng` only when `ngDevMode` is on. Start the overlay inside an `if (__DEV__)` check. -- `@nativescript/core`, an optional peer dependency of the package. The overlay reads the root view and the platform from it. -- A `WebSocket` global. The NativeScript runtime has none, so import `@valor/nativescript-websockets` first in `src/polyfills.ts`. Without it, the overlay logs a warning that names the package and does not start. -- `initNativeScriptOverlay()` called before `runNativeScriptAngularApp()`, so the injector inspector gets its provider lists. See [How it works](#how-it-works). -- A server started with `--no-auth`, since the app cannot enter the one-time code the panel asks for. Against a server with auth on, the overlay logs a warning that says to start it with `--no-auth`, and tries again every `retryMs`. - -## Set up - -[Set up NativeScript](../guides/nativescript.md) walks through it: install the packages, add the WebSocket global, start the overlay and run the server. It also covers where the overlay connects from a simulator, an emulator or a device, and how to run the demo in `examples/nativescript`. - ## Options `initNativeScriptOverlay()` takes an optional object: @@ -91,7 +258,7 @@ The overlay marks its component reports with `platform: 'nativescript'`, the URL `10.0.2.2` is how the Android emulator reaches its host. The devtools server answers requests sent to it (and to `10.0.3.2`, Genymotion's address for the host) from the emulator without any option, as it does `localhost`. A physical device needs your machine's LAN address, as `baseURL` or injected by the build. -`lanDevtoolsURL()`, exported from the same entry point, returns the URL a development build defined as `__PANGULAR_LAN_URL__`, or `undefined`. When it returns one, the overlay connects there instead of to `defaultDevtoolsBaseURL()`. See [Use the injected LAN address](../guides/nativescript.md#use-the-injected-lan-address) and [Allow plain HTTP to your machine](../guides/nativescript.md#allow-plain-http-to-your-machine). +`lanDevtoolsURL()`, exported from the same entry point, returns the URL a development build defined as `__PANGULAR_LAN_URL__`, or `undefined`. When it returns one, the overlay connects there instead of to `defaultDevtoolsBaseURL()`. See [Use the injected LAN address](#use-the-injected-lan-address) and [Allow plain HTTP to your machine](#allow-plain-http-to-your-machine). `initNativeScriptOverlay()` returns a function that stops the overlay and tells the server to forget every report the app sent. @@ -106,11 +273,34 @@ The overlay marks its component reports with `platform: 'nativescript'`, the URL - **Reporting**: the app collects every `intervalMs` and sends a report when it changed. The **Leaks** scan walks the views again when the component tree changed, and at least every 30 seconds. When a report has not changed for a while, the app asks the server whether it still holds it, and sends it again only if not. When the connection fails or drops, it logs one warning and tries again every `retryMs`. The app keeps one page id for as long as the overlay runs, so a reconnect does not show it as a new page. - **Highlight**: when the panel or the `highlight` agent tool points at a component, the overlay sets a 2 px `#68b6ff` border on the first view under the host that draws something. It restores the previous border when the pointer leaves the row, after the duration the `highlight` tool asks for, or after two seconds. -## FAQ +## Try the demo + +`examples/nativescript` is a `ns create --ng` project wired up this way, with a small showcase component (signals, a computed, an effect and a component-level provider). It is tested on the iOS simulator. Android is untested. + +The demo maps `@pangular-inspector/devtools/*` to the package's build output in `packages/devtools/dist`, so build the package first: + +```bash +pnpm devtools:build-pkg +pnpm devtools:nativescript +``` + +`pnpm devtools:nativescript` starts the devtools server on `localhost`, scanning `examples/nativescript/src`, and keeps running. In a second terminal, install and start the app: + +```bash +cd examples/nativescript +npm install +ns debug ios --no-hmr +``` + +For a physical device, `pnpm devtools:nativescript:device` listens on every interface instead, with the same warning as above. + +## Troubleshooting + +The [troubleshooting page](./troubleshooting.md) lists the problems every setup shares, by symptom. - Check the app log for a [pangular] line. A warning about a missing WebSocket global means @valor/nativescript-websockets is not imported first in src/polyfills.ts. A warning about reaching the server means the address is wrong for where the app runs; see where the overlay connects. A release build has no ng global, so nothing is collected there. + Check the app log for a [pangular] line. A warning about a missing WebSocket global means @valor/nativescript-websockets is not imported first in src/polyfills.ts. A warning about reaching the server means the address is wrong for where the app runs; see where the overlay connects. A release build has no ng global, so nothing is collected there. The overlay has to start before runNativeScriptAngularApp() creates the platform. Call initNativeScriptOverlay() above it in src/main.ts. @@ -123,8 +313,8 @@ The overlay marks its component reports with `platform: 'nativescript'`, the URL ## Where to next - + - + diff --git a/apps/docs/src/content/getting-started/other-servers.md b/apps/docs/src/content/getting-started/other-servers.md index f6875c01..d365d7fa 100644 --- a/apps/docs/src/content/getting-started/other-servers.md +++ b/apps/docs/src/content/getting-started/other-servers.md @@ -237,6 +237,8 @@ The hub is off when `NODE_ENV` is `production`. `handler` then answers 404, `att ## Troubleshooting +The [troubleshooting page](./troubleshooting.md) lists the problems every setup shares, by symptom. + devtools.handler is mounted on a route that matches more than devtools.base. It answers 404 outside the base and doesn't fall through. Mount it on `${devtools.base}*` (Hono) or `${devtools.base}**` (h3). diff --git a/apps/docs/src/content/getting-started/overlay.md b/apps/docs/src/content/getting-started/overlay.md index be5eb6fa..5ffccf5b 100644 --- a/apps/docs/src/content/getting-started/overlay.md +++ b/apps/docs/src/content/getting-started/overlay.md @@ -284,6 +284,8 @@ While you pick an element on the page, the box follows the pointer and clears wh ## FAQ +The [troubleshooting page](./troubleshooting.md) lists the problems every setup shares, by symptom. + No. The overlay adds the floating button itself. See Popup and hub. diff --git a/apps/docs/src/content/getting-started/platforms.md b/apps/docs/src/content/getting-started/platforms.md new file mode 100644 index 00000000..011e8979 --- /dev/null +++ b/apps/docs/src/content/getting-started/platforms.md @@ -0,0 +1,58 @@ +--- +title: Platforms +description: The browsers, devices and app frameworks the devtools inspect today, how each one is checked, and the platforms still planned with their tracking issues. +--- + + + Where an Angular app can run and still report to the devtools, and which platforms are planned next. + + +# Platforms + +The devtools read a running Angular app through its debug API, wherever it renders. A browser page runs the [browser overlay](./overlay.md). A platform without a DOM gets an overlay of its own that walks its view tree and sends the same reports. For the build tools and servers each setup uses, see [Supported setups](./installation.md#supported-setups). + +## Supported platforms + +| Platform | How it reports | How it is checked | Set up | +| ---------------------------- | ------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------ | +| Browser | The browser overlay, loaded in `main.ts` or by the Vite plugin | CI and the weekly install check, in Chromium | [Installation](./installation.md) | +| Chrome DevTools | The [Chrome extension](./chrome-extension.md) shows the panel for a page that already runs the overlay | Package tests of the extension bridge. You build and load the extension from the repository | [Chrome extension](./chrome-extension.md) | +| Capacitor and Ionic WebViews | The browser overlay in the WebView, or `overlay-manual` in a bundled build | Android emulators and the iOS simulator. Checks on real phones are tracked in [#337](https://github.com/pangular-inspector/devtools/issues/337) | [Set up Capacitor](../guides/capacitor.md) | +| NativeScript | `overlay-nativescript`, over a WebSocket | The demo in `examples/nativescript` on the iOS simulator. Android is untested | [NativeScript](./nativescript.md) | +| Angular Native | `overlay-angular-native`, over a WebSocket | Package tests against a simulated view tree. No automated test runs the demo on a device | [Angular Native](./angular-native.md) | + +A platform without a DOM has no picker, no axe pass and no Router, Forms or SSR & HTTP data. The NativeScript and Angular Native pages list [what needs a browser](./nativescript.md#what-needs-a-browser). + +## How a platform shows in the panel + +| Platform | Where its data shows | +| -------------- | ------------------------------------------------------------------------------------ | +| Browser | Every tab, scoped to the page you pick. | +| Capacitor | Every tab, like a browser tab, and the **Capacitor** tab for plugin calls. | +| NativeScript | The tabs it fills, in the **Angular** dock or the CLI panel without `?view`. | +| Angular Native | The **Angular Native** view (`?view=angular-native`), and the panel without `?view`. | + +The hub's **NativeScript** dock always shows the setup steps and a link to the setup page. The **Capacitor** dock shows them while no Capacitor app reports, and the **Angular Native** view says **No Angular Native app is connected** while none does. `list-pages` gives each page's platform to agents. See [list-pages](../agents/tools.md#list-pages). + +## Planned + +Plans follow feedback. To ask for a platform, or to move one up, comment on its issue. + +| Platform or channel | What it adds | Issue | +| --------------------------------- | -------------------------------------------------------------------------------------------- | ----------------------------------------------------------------- | +| Ionic | Ionic apps on top of the Capacitor support, and what only Ionic has, such as its page stack. | [#307](https://github.com/pangular-inspector/devtools/issues/307) | +| Other app frameworks | One core and an adapter per framework, after the mobile platforms. | [#307](https://github.com/pangular-inspector/devtools/issues/307) | +| Chrome Web Store and Edge Add-ons | The extension installed from a store, instead of built from the repository. | [#342](https://github.com/pangular-inspector/devtools/issues/342) | +| Firefox | A build of the extension for Firefox. | [#342](https://github.com/pangular-inspector/devtools/issues/342) | + +The [roadmap](../roadmap.md) lists the rest of the planned work. + +## Where to next + + + + + + + + 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 1ef41a5b..fd4ac574 100644 --- a/apps/docs/src/content/getting-started/popup-and-hub.md +++ b/apps/docs/src/content/getting-started/popup-and-hub.md @@ -156,7 +156,7 @@ When the page's server mounts the hub (`/__devframes/`), the button opens the wh | NgRx | The Store tab | | Analog | The Analog tab, or a notice in apps that do not use Analog | | Angular Native | Components, Signals, Injectors, Store, Queries, Pipes and Errors for a connected [Angular Native](./angular-native.md) app, or a setup notice when none is connected | -| NativeScript | Setup steps for [NativeScript apps](../guides/nativescript.md) | +| NativeScript | Setup steps for [NativeScript apps](./nativescript.md) | | Capacitor | Plugin calls of a connected [Capacitor app](../inspectors/capacitor.md), or setup steps when none is connected | ### The full panel @@ -175,6 +175,8 @@ The Analog, Angular Native and Capacitor docks open setup steps when their tool | Angular Native | `Angular Native: no app connected` | An Angular Native app reports | | Capacitor | `Capacitor: no app connected` | A Capacitor app reports | +The setup steps of the Angular Native, NativeScript and Capacitor docks end with a **Supported and planned platforms** link to [Platforms](./platforms.md). + The tooltip comes back when the app stops reporting and its data expires. The Angular and NgRx docks always have data. The NativeScript dock always shows setup steps, because a NativeScript app's data shows in the Angular dock, so its tooltip stays **NativeScript**. ### Messages and badges @@ -271,6 +273,8 @@ A browser tab in the background runs its timers about once a minute. The app pag ## Troubleshooting +The [troubleshooting page](./troubleshooting.md) lists the problems every setup shares, by symptom. + Drag it somewhere else, or focus it and use the arrow keys. Double-click it to reset its position. To remove it, stop the overlay with disposeOverlay. diff --git a/apps/docs/src/content/getting-started/quick-start.md b/apps/docs/src/content/getting-started/quick-start.md index 7c0c3a2b..0b4ab816 100644 --- a/apps/docs/src/content/getting-started/quick-start.md +++ b/apps/docs/src/content/getting-started/quick-start.md @@ -118,6 +118,8 @@ To see the panel on a page of its own, open `http://localhost:4200/__devframes/` ## Troubleshooting +The [troubleshooting page](./troubleshooting.md) lists the problems every setup shares, by symptom. + The app is probably a production build. ng build uses the production configuration by default, and the overlay import never runs there. Use ng serve, or build with --configuration development. Then check that main.ts imports the overlay. diff --git a/apps/docs/src/content/getting-started/troubleshooting.md b/apps/docs/src/content/getting-started/troubleshooting.md new file mode 100644 index 00000000..fb3f9ef6 --- /dev/null +++ b/apps/docs/src/content/getting-started/troubleshooting.md @@ -0,0 +1,168 @@ +--- +title: Troubleshooting +description: Find the cause of a missing button, an empty tab, a refused request or a stuck connection by its symptom, in every setup. +--- + + + Problems every setup shares, sorted by what you see. Each answer links to the page that covers it in full. + + +# Troubleshooting + +Find what you see in the table, then read its section. Problems that only one setup has stay on that setup's page, in its **Troubleshooting** or **FAQ** section. The table at the end of this page lists the questions the inspector pages answer. + +## Find your symptom + +| What you see | Read | +| -------------------------------------------------------- | --------------------------------------------------------------------------- | +| No floating button on the page | [The button does not appear](#the-button-does-not-appear) | +| **No devtools server found** in the panel or the console | [No devtools server found](#no-devtools-server-found) | +| **Disconnected** or **Connecting…** in the panel header | [The panel says Disconnected](#the-panel-says-disconnected) | +| A dialog that asks for a code | [The panel asks for a one-time code](#the-panel-asks-for-a-one-time-code) | +| `403 Forbidden` from the devtools | [The devtools answer 403](#the-devtools-answer-403) | +| `401` from the MCP endpoint | [The MCP endpoint answers 401 or 403](#the-mcp-endpoint-answers-401-or-403) | +| The header shows **Live**, but the tabs are empty | [The tabs stay empty](#the-tabs-stay-empty) | +| A tab lists source files instead of the running app | [A tab shows source data only](#a-tab-shows-source-data-only) | +| **Page in background, showing the last data.** | [The data stops changing](#the-data-stops-changing) | +| A tab or dock is missing | [A tab is missing](#a-tab-is-missing) | +| A tab or tool names an Angular version it needs | [A feature needs a newer Angular](#a-feature-needs-a-newer-angular) | +| The CLI prints another port than 9999 | [Port 9999 is taken](#port-9999-is-taken) | +| An app on a phone, simulator or emulator never shows | [A device app never connects](#a-device-app-never-connects) | + +## The button and the panel + +### The button does not appear + +The app is probably a production build. `ng build` uses the production configuration by default, and the overlay import in `main.ts` runs only while `ngDevMode` is on. Run `ng serve`, or build with `--configuration development`. Then check that `main.ts` imports the overlay, as [Load it in development](./overlay.md#load-it-in-development) shows. + +With the [Vite plugin](./vite.md), `main.ts` needs no import: the plugin adds the overlay to the pages the dev server transforms. If your framework renders HTML without Vite's `transformIndexHtml`, [load the overlay yourself](./vite.md#load-the-overlay-yourself). + +### No devtools server found + +The overlay found no server part. It logs an error that starts with `[pangular] No devtools server found` and lists the paths it tried, and the panel says **No devtools server found**. + +| Cause | Fix | +| ------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | +| No server part is mounted, for example plain `ng serve` without SSR | Mount `initPangularHub()` in `server.ts`, or run the [client-only setup](./installation.md#client-only-angular-cli-app). | +| The hub is mounted after `express.static` or the SSR handler | Move `app.use(devtools.nodeMiddleware)` above them. See [Middleware order](./express.md#middleware-order). | +| The hub runs on a custom `base` | Pass `pangular/` to [`initOverlay`](./overlay.md#a-custom-mount-path). | + +[No devtools server found](./overlay.md#no-devtools-server-found) on the overlay page lists the paths the overlay tries. + +### The panel says Disconnected + +The panel lost the server, or never reached it. It tries again after 1, 2, 5 and then every 10 seconds, so a dev server that restarts connects without a reload. Click **Retry now** to try at once. If it stays disconnected, check that the server runs and that the hub is mounted before `express.static` and the SSR handler. See [Connection status](./popup-and-hub.md#connection-status). + +If the panel does not connect at all with Hono, h3 or Fastify, the hub advertises a WebSocket that no upgrade reaches. Pass `ws: false`, pass `ws: {sidecar: true}`, or call `devtools.attach(server)`. See [Hono, h3 and Fastify](./other-servers.md#troubleshooting). + +## Access and the one-time code + +### The panel asks for a one-time code + +The server has the one-time code on, which is the default for the Vite plugin, the Express hub and the CLI. Type the code the server printed in its terminal. A browser reads data only after it exchanges the code, so the tabs stay empty until you do. + +If the dialog keeps coming back, the app's origin changed, its storage was cleared, or the code expired before you typed it. A code lasts 5 minutes. Type the newest code the server printed. Too many wrong codes lock the server until it restarts. See [One-time code](../security.md#one-time-code). + +In a client-only Angular CLI app, start the CLI with `--proxy-origin`, so the link it prints opens on your app's origin. See [Client-only Angular CLI app](./installation.md#client-only-angular-cli-app). + +### The devtools answer 403 + +The request did not come from this machine, was sent to a host the server doesn't trust, or came from an origin it doesn't trust. The terminal names a refused origin or host. + +| Setup | Fix | +| ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Any | Open the app on `localhost` or `127.0.0.1`, not on a LAN address or another host name. | +| Vite plugin | List a local host name in `server.allowedHosts`, or add the origin to `allowedOrigins`. See [Hostnames other than localhost](./vite.md#hostnames-other-than-localhost). | +| Express hub | Add the origin to `allowedOrigins`. See [Access control](./express.md#access-control). | +| Another device on Wi-Fi | Pass `allowLan: true` and list the page's origin in `allowedOrigins`. Keep the one-time code on. | +| Chrome extension | A build with another extension ID needs its origin in `allowedOrigins`. See [Server origin](./chrome-extension.md#server-origin). | + +[Access and redaction](../security.md) covers every check. + +### Every app route answers 404 + +This happens with Hono and h3: `devtools.handler` is mounted on a route that matches more than `devtools.base`. It answers 404 outside the base and doesn't fall through. Mount it on the base path only, as [Hono, h3 and Fastify](./other-servers.md#troubleshooting) shows. + +## Empty or missing data + +### The tabs stay empty + +| Cause | Fix | +| ------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------- | +| The one-time code was not exchanged | Type the code from the terminal. The header shows **Live** once the panel is connected. | +| The page is a production build | Production builds leave out `window.ng`, which the overlay reads. Run a development build. | +| No page with the overlay is open | Open the app in a browser tab. The live tabs read the pages that report to the server. | +| The tab reads another page than you expect | Pick the page in the tab's page picker, where it has one. Agents read the [default page](../agents/tools.md#the-page-argument). | + +Some tabs need more than a connected page. The **SSR & HTTP** tab needs the providers in [Fill the SSR & HTTP tab](./express.md#fill-the-ssr-http-tab), and the [timeline](../inspectors/timeline.md) shows change detection only while a recording runs. + +### A tab shows source data only + +The **Components** and **Injectors** tabs fall back to what the source scan finds when no live tree reached them. No page is connected, or the connected page is a production build. Open the app in a development build with the overlay loaded. The [Dashboard](../inspectors/dashboard.md) fills its source cards from the scan without a page. + +### The data stops changing + +A browser tab in the background runs its timers about once a minute, so the page stops reading itself while it is hidden. The panel says **Page in background, showing the last data.** Switch back to the tab and it sends fresh data. The server drops a hidden tab that stops answering for 5 minutes. See [Tabs in the background](./popup-and-hub.md#tabs-in-the-background). + +### A tab is missing + +| Cause | Fix | +| --------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | +| The inspector is turned off with `inspectors` | Remove `false` for it. A tab you open while it is off names the option. See [Inspectors and agent tools](./configuration.md#inspectors-and-agent-tools). | +| You hid the tab in **Settings** | Turn it back on under tab visibility. See [Settings](./settings.md). | +| The **Analog** tab outside an Analog app | Without the hub, the tab appears only when `package.json` depends on `@analogjs/platform` or `@analogjs/router`. | + +### A feature needs a newer Angular + +The overlay reads Angular's debug API, which grows with each release. A tab that needs a missing API names the Angular version it needs and the version the page runs, and agent tools answer **Unsupported on this Angular version**. [Supported Angular versions](./installation.md#supported-angular-versions) lists the minimum version of each feature. + +## Servers and ports + +### Port 9999 is taken + +Without `--port`, the standalone CLI listens on 9999, or on a free port if 9999 is taken, and prints the port it uses. Use the URLs it prints. With `--port`, a taken port stops the server with an error. See [Dev server flags](./cli.md#dev-server-flags). + +### The MCP endpoint answers 401 or 403 + +The HTTP endpoint needs a local `Origin` header, and a bearer token while the one-time code is on. A request without the header gets `403`, and one without the right token gets `401`. The token is in `~/.pangular-inspector/mcp-token`. See [Send an Origin header](../agents/mcp-server.md#send-an-origin-header) and [Send a token](../agents/mcp-server.md#send-a-token). The stdio server needs neither. + +### vite build fails with an h3 error under pnpm + +`@analogjs/vite-plugin-nitro` imports `h3` without declaring it, so pnpm can resolve the `h3` 2 this package brings instead of the `h3` 1 Analog needs. Declare it with `packageExtensions`, as [If the build fails under pnpm](./vite.md#if-the-build-fails-under-pnpm) shows. + +## A device app never connects + +An app on a phone, a simulator or an emulator reaches your machine over the network, and can't type the one-time code in every setup. Read the log of the app for a `[pangular]` line, then follow its setup page. + +| Platform | Read | +| -------------- | --------------------------------------------------------------------------------------------------------------------------------------- | +| NativeScript | [Where the overlay connects](./nativescript.md#where-the-overlay-connects) and [Troubleshooting](./nativescript.md#troubleshooting) | +| Angular Native | [Where the overlay connects](./angular-native.md#where-the-overlay-connects) and [Troubleshooting](./angular-native.md#troubleshooting) | +| Capacitor | [Troubleshooting](../guides/capacitor.md#troubleshooting) | + +## Questions the inspector pages answer + +| Question | Answer on | +| --------------------------------------------------------------- | --------------------------------------------------------------- | +| Why are the file and line of a component missing? | [Components FAQ](../inspectors/components.md#faq) | +| Why does the signal graph show another component? | [Signals FAQ](../inspectors/signals.md#faq) | +| Why is a constructor-injected service missing from source mode? | [Injectors FAQ](../inspectors/injectors.md#faq) | +| Why can't I restore an NgRx entry? | [NgRx Store FAQ](../inspectors/ngrx-store.md#faq) | +| Why does the Forms tab say no forms on this page? | [Forms FAQ](../inspectors/forms.md#faq) | +| Why does a navigation list guards but no verdicts? | [Router FAQ](../inspectors/router.md#faq) | +| Why does `explain-pipe` return no call data? | [Pipes FAQ](../inspectors/pipes.md#faq) | +| Why are there no SSR rows? | [SSR & HTTP FAQ](../inspectors/ssr-http.md#faq) | +| Why is there no Analog tab? | [Analog FAQ](../inspectors/analog.md#faq) | +| Why is the Capacitor call list empty on the web? | [Capacitor FAQ](../inspectors/capacitor.md#faq) | +| Why does an error have no component? | [Errors FAQ](../inspectors/errors.md#faq) | +| Why is the timeline empty? | [Timeline limits](../inspectors/timeline.md#limits-and-gotchas) | +| Why does the Chrome extension panel not appear? | [Chrome extension FAQ](./chrome-extension.md#faq) | + +## Where to next + + + + + + + diff --git a/apps/docs/src/content/getting-started/vite.md b/apps/docs/src/content/getting-started/vite.md index 29d5614a..b32358a7 100644 --- a/apps/docs/src/content/getting-started/vite.md +++ b/apps/docs/src/content/getting-started/vite.md @@ -15,7 +15,7 @@ For *Analog apps, add the *Vite plugin next to `analog()`. The plugin mounts the - Add @pangular-inspector/devtools as a dev dependency. See Installation. + Add @pangular-inspector/devtools as a dev dependency. Register pangular() after analog() in vite.config.ts. @@ -25,6 +25,40 @@ For *Analog apps, add the *Vite plugin next to `analog()`. The plugin mounts the +## Install + +```bash group="install" name="pnpm" image="https://cdn.simpleicons.org/pnpm/F69220" active +pnpm add -D @pangular-inspector/devtools +``` + +```bash group="install" name="npm" image="https://cdn.simpleicons.org/npm/CB3837" +npm install -D @pangular-inspector/devtools +``` + +```bash group="install" name="yarn" image="https://cdn.simpleicons.org/yarn/2C8EBB" +yarn add -D @pangular-inspector/devtools +``` + +```bash group="install" name="bun" image="https://bun.sh/logo.svg" +bun add -D @pangular-inspector/devtools +``` + +### If the build fails under pnpm + +With pnpm, `vite build` or the dev server can stop with `SyntaxError: The requested module 'h3' does not provide an export named 'createEvent'`. `@analogjs/vite-plugin-nitro` imports `h3` without listing it as a dependency, so pnpm resolves the import to whichever `h3` it hoists. Analog's server needs `h3` 1, and this package brings `h3` 2 through *Devframe. + +Declare the missing dependency in `pnpm-workspace.yaml` at the root of your app (create the file if there is none), then run `pnpm install` again: + +```yaml +# pnpm-workspace.yaml +packageExtensions: + '@analogjs/vite-plugin-nitro': + dependencies: + h3: ^1.15.0 +``` + +Before pnpm 10, put the same entry under `pnpm.packageExtensions` in `package.json`. Adding `h3` 1 to your own dependencies does not help, because the plugin's import still resolves to the hoisted copy. + ## Add the plugin ### Register it in `vite.config.ts` @@ -54,6 +88,12 @@ The plugin adds a module script to every HTML page the dev server transforms, at When the dev server starts, Vite prints the full-page viewer URL under its own URLs, on a line labeled `Pangular Inspector`. +The terminal also prints a one-time code. Enter it when the page or the panel asks for it. In an Analog app, open the **Analog** dock to see file routes, server calls, render modes, content and lint. See [the Analog inspector](../inspectors/analog.md) for each view. + + + Point your MCP client at http://localhost:5173/__devframes/__mcp with an Origin header and the bearer token. See MCP server. The analog-list-server-calls and analog-run-api tools only work through the Vite plugin. + + ## What the plugin does ### Dev server only @@ -167,6 +207,83 @@ bootstrapApplication(App, appConfig).then(() => { `import.meta.env.DEV` is false in `vite build`, so the import stays out of your production bundle. Use the same import when your framework renders HTML without passing it through Vite's `transformIndexHtml`, which is where the plugin adds the script. +## Catch hydration errors from the first load + +The overlay can connect after the first render, so it can miss hydration errors (`NG0500` to `NG0506`) logged during the first load. `providePangularHttp()` starts listening for them when the app starts. The Analog dock lists them under **Hydration error** in **Lint**, and the `analog-inspect-page` tool returns them. + +Analog's own `load()` fetches and API calls show in the Analog dock without extra setup. `withPangular()` also records `HttpClient` calls in the **SSR & HTTP** tab. + +```ts {5,10-11} +// src/app/app.config.ts +import {provideHttpClient, withFetch} from '@angular/common/http'; +import {ApplicationConfig} from '@angular/core'; +import {provideFileRouter} from '@analogjs/router'; +import {providePangularHttp, withPangular} from '@pangular-inspector/devtools/http'; + +export const appConfig: ApplicationConfig = { + providers: [ + provideFileRouter(), + provideHttpClient(withFetch(), withPangular()), + providePangularHttp(), + ], +}; +``` + +`providePangularHttp()` and `withPangular()` do nothing in production builds. See [Set up SSR & HTTP](../guides/ssr-http.md) for the interceptor order. + +## Trace server renders + +To fill the **SSR requests** table in the **SSR & HTTP** tab, add a Nitro server middleware that traces each page render. Analog runs files in `src/server/middleware` before it renders the page, on the dev server too. The middleware imports `h3`, so add `h3` 1 to your app first, the version Analog's server uses: + +```bash group="install-h3" name="pnpm" image="https://cdn.simpleicons.org/pnpm/F69220" active +pnpm add h3@^1.15.0 +``` + +```bash group="install-h3" name="npm" image="https://cdn.simpleicons.org/npm/CB3837" +npm install h3@^1.15.0 +``` + +```bash group="install-h3" name="yarn" image="https://cdn.simpleicons.org/yarn/2C8EBB" +yarn add h3@^1.15.0 +``` + +```bash group="install-h3" name="bun" image="https://bun.sh/logo.svg" +bun add h3@^1.15.0 +``` + +Then add the middleware: + +```ts +// src/server/middleware/pangular-ssr.ts +import {pangularSsrEventHandler} from '@pangular-inspector/devtools/ssr'; +import {defineEventHandler} from 'h3'; + +export default defineEventHandler(pangularSsrEventHandler()); +``` + +It wraps the Node response of each HTML request, adds the `Server-Timing` header that links the page to its render, and records the render with its render mode. Analog marks its renders `ssr-analog`, which the tab shows as **Server**. It does nothing while the Vite plugin is not running, so it is safe in a production build. + +Analog gives the render its own `REQUEST` token, not the one from `@angular/core`, so `withPangular()` can't read the request id from a header. Instead, the tracer keeps the id in the request's async context (Node's `AsyncLocalStorage`), and each server call is linked to the request it ran under. Renders that run at the same time each keep their own calls. + +The tracer skips a request that does not accept `text/html`, such as `curl` without an `Accept` header. It also skips a path in `skip`. The calls of a render it skips show in the timeline without a link to a request, even while a traced render runs alongside. + +The tracer drops a traced request after five minutes without activity, such as a response nobody reads. A response that keeps sending chunks stays in flight. A server call made after its request was dropped is not linked. + +## Try the demo + +The repository has an Analog demo in `examples/analog`. It has file routes with route groups, `.server.ts` loads, API routes under `src/server/routes/api/v1`, markdown content, prerendered pages and a client-only `/dashboard`. + +```bash +pnpm install +pnpm analog:dev +``` + +The script builds the devtools package first, then starts the Vite dev server. + + + The demo aliases @pangular-inspector/devtools/overlay to the built package in its vite.config.ts, and the overlay script the plugin adds resolves through that alias. Your app does not need it. + + ## Hostnames other than localhost ### Local hostnames @@ -254,7 +371,9 @@ The constant reaches the pages the dev server serves and development builds, suc The Angular CLI dev server does not accept Vite plugins. For an Angular CLI app, mount the hub in your Express server instead. See Angular CLI and Express. -## FAQ +## Troubleshooting + +The [troubleshooting page](./troubleshooting.md) lists the problems every setup shares, by symptom. @@ -264,18 +383,18 @@ The constant reaches the pages the dev server serves and development builds, suc The request did not come from your machine, or its origin or the host it was sent to is not trusted. The terminal names a refused origin or host. Open the app on localhost, list your hostname in server.allowedHosts, or add the origin to allowedOrigins. - @analogjs/vite-plugin-nitro imports h3 without declaring it, so pnpm can resolve it to the h3 2 that this package brings instead of the h3 1 Analog needs. The build stops with The requested module 'h3' does not provide an export named 'createEvent'. Declare h3 for the plugin with packageExtensions, as Set up Analog shows. + @analogjs/vite-plugin-nitro imports h3 without declaring it, so pnpm can resolve it to the h3 2 that this package brings instead of the h3 1 Analog needs. The build stops with The requested module 'h3' does not provide an export named 'createEvent'. Declare h3 for the plugin with packageExtensions, as If the build fails under pnpm shows. - The plugin records server calls made through the Vite dev server. Check that the plugin is registered and that apiPrefix matches your server routes. The Analog guide walks through a full setup. + The plugin records server calls made through the Vite dev server. Check that the plugin is registered and that apiPrefix matches your server routes. To link renders to the SSR & HTTP tab too, see Trace server renders. ## Where to next - - A full Analog setup, including the demo in this repository. + + Symptoms every setup shares, such as no page connected or a 403. File routes, server calls, render modes, content and lint. diff --git a/apps/docs/src/content/guides/analog.md b/apps/docs/src/content/guides/analog.md deleted file mode 100644 index c199e627..00000000 --- a/apps/docs/src/content/guides/analog.md +++ /dev/null @@ -1,189 +0,0 @@ ---- -title: Set up Analog -description: Add the devtools to an Analog app, step by step. ---- - - - One Vite plugin. You get the Angular inspectors, the NgRx dock, the Analog dock and an MCP endpoint on the Vite dev server. - - -# Set up Analog - -This guide adds the devtools to an *Analog app. Everything runs on the *Vite dev server, so there is no separate server to start. - -## What you get - - - - Components, injectors, signals, forms, router and pipes, reading the live page. - - - File routes, server calls, render modes, content and lint. - - - Signal stores and the change log, when your app uses NgRx. - - - /__devframes/__mcp on the Vite dev server, with the Analog tools. - - - -## The flow - - - - Add @pangular-inspector/devtools as a dev dependency. - - - Register it next to analog() in vite.config.ts. It also loads the overlay into your pages. - - - Start the dev server and click the floating button. - - - -## Step 1: Install - -```bash group="install" name="pnpm" image="https://cdn.simpleicons.org/pnpm/F69220" active -pnpm add -D @pangular-inspector/devtools -``` - -```bash group="install" name="npm" image="https://cdn.simpleicons.org/npm/CB3837" -npm install -D @pangular-inspector/devtools -``` - -```bash group="install" name="yarn" image="https://cdn.simpleicons.org/yarn/2C8EBB" -yarn add -D @pangular-inspector/devtools -``` - -```bash group="install" name="bun" image="https://bun.sh/logo.svg" -bun add -D @pangular-inspector/devtools -``` - -### If the build fails under pnpm - -With pnpm, `vite build` or the dev server can stop with `SyntaxError: The requested module 'h3' does not provide an export named 'createEvent'`. `@analogjs/vite-plugin-nitro` imports `h3` without listing it as a dependency, so pnpm resolves the import to whichever `h3` it hoists. Analog's server needs `h3` 1, and this package brings `h3` 2 through *Devframe. - -Declare the missing dependency in `pnpm-workspace.yaml` at the root of your app (create the file if there is none), then run `pnpm install` again: - -```yaml -# pnpm-workspace.yaml -packageExtensions: - '@analogjs/vite-plugin-nitro': - dependencies: - h3: ^1.15.0 -``` - -Before pnpm 10, put the same entry under `pnpm.packageExtensions` in `package.json`. Adding `h3` 1 to your own dependencies does not help, because the plugin's import still resolves to the hoisted copy. - -## Step 2: Add the Vite plugin - -Add the plugin after `analog()`: - -```ts {3,7} -// vite.config.ts -import analog from '@analogjs/platform'; -import pangular from '@pangular-inspector/devtools/vite'; -import {defineConfig} from 'vite'; - -export default defineConfig(() => ({ - plugins: [analog(), pangular()], -})); -``` - -The plugin runs on the dev server only (`apply: 'serve'`). Production builds do not include it. - -### Plugin options - -Every option is optional. `apiPrefix` is read from your Analog config, and the one-time code (`auth`) is on by default. The plugin also takes the devtools options. See [Vite and Analog options](../getting-started/vite.md#options) for the full list and [Configuration](../getting-started/configuration.md) for the devtools options. - -### Custom hostnames - -The devtools only answer requests from this machine. If you open the dev server through another hostname, add it to Vite's `server.allowedHosts`. See [Security](../security.md). - -### The overlay - -The plugin adds the overlay to the pages the dev server serves, so `src/main.ts` needs no import. A production build does not include it. To load it yourself instead, see [Load the overlay yourself](../getting-started/vite.md#load-the-overlay-yourself). - -## Step 3: Open the devtools - -Start the dev server as usual. The terminal prints a one-time code. Enter it when the page or the panel asks for it. Then: - -| What | Where | -| --------------- | ------------------------------------------- | -| Floating button | On every page of your app | -| Full viewer | `/__devframes/` on the Vite dev server | -| MCP endpoint | `/__devframes/__mcp` on the Vite dev server | - -Open the **Analog** dock to see file routes, server calls, render modes, content and lint. See [the Analog inspector](../inspectors/analog.md) for each view. - - - Point your MCP client at http://localhost:5173/__devframes/__mcp with an Origin header and the bearer token. See MCP server. The analog-list-server-calls and analog-run-api tools only work through the Vite plugin. - - -## Catch hydration errors from the first load - -The overlay can connect after the first render, so it can miss hydration errors (`NG0500` to `NG0506`) logged during the first load. `providePangularHttp()` starts listening for them when the app starts. The Analog dock lists them under **Hydration error** in **Lint**, and the `analog-inspect-page` tool returns them. - -Analog's own `load()` fetches and API calls show in the Analog dock without extra setup. `withPangular()` also records `HttpClient` calls in the **SSR & HTTP** tab. - -```ts {5,10-11} -// src/app/app.config.ts -import {provideHttpClient, withFetch} from '@angular/common/http'; -import {ApplicationConfig} from '@angular/core'; -import {provideFileRouter} from '@analogjs/router'; -import {providePangularHttp, withPangular} from '@pangular-inspector/devtools/http'; - -export const appConfig: ApplicationConfig = { - providers: [ - provideFileRouter(), - provideHttpClient(withFetch(), withPangular()), - providePangularHttp(), - ], -}; -``` - -`providePangularHttp()` and `withPangular()` do nothing in production builds. See [Set up SSR & HTTP](./ssr-http.md) for the interceptor order. - -## Trace server renders - -To fill the **SSR requests** table in the **SSR & HTTP** tab, add a Nitro server middleware that traces each page render. Analog runs files in `src/server/middleware` before it renders the page, on the dev server too: - -```ts -// src/server/middleware/pangular-ssr.ts -import {pangularSsrEventHandler} from '@pangular-inspector/devtools/ssr'; -import {defineEventHandler} from 'h3'; - -export default defineEventHandler(pangularSsrEventHandler()); -``` - -It wraps the Node response of each HTML request, adds the `Server-Timing` header that links the page to its render, and records the render with its render mode. Analog marks its renders `ssr-analog`, which the tab shows as **Server**. It does nothing while the Vite plugin is not running, so it is safe in a production build. - -Analog gives the render its own `REQUEST` token, not the one from `@angular/core`, so `withPangular()` can't read the request id from a header. Instead, the tracer keeps the id in the request's async context (Node's `AsyncLocalStorage`), and each server call is linked to the request it ran under. Renders that run at the same time each keep their own calls. - -The tracer skips a request that does not accept `text/html`, such as `curl` without an `Accept` header. It also skips a path in `skip`. The calls of a render it skips show in the timeline without a link to a request, even while a traced render runs alongside. - -The tracer drops a traced request after five minutes without activity, such as a response nobody reads. A response that keeps sending chunks stays in flight. A server call made after its request was dropped is not linked. - -## Try the demo - -The repository has an Analog demo in `examples/analog`. It has file routes with route groups, `.server.ts` loads, API routes under `src/server/routes/api/v1`, markdown content, prerendered pages and a client-only `/dashboard`. - -```bash -pnpm install -pnpm analog:dev -``` - -The script builds the devtools package first, then starts the Vite dev server. - - - The demo aliases @pangular-inspector/devtools/overlay to the built package in its vite.config.ts, and the overlay script the plugin adds resolves through that alias. Your app does not need it. - - -## Where to next - - - - - - diff --git a/apps/docs/src/content/guides/angular-native.md b/apps/docs/src/content/guides/angular-native.md deleted file mode 100644 index 95d20648..00000000 --- a/apps/docs/src/content/guides/angular-native.md +++ /dev/null @@ -1,185 +0,0 @@ ---- -title: Set up Angular Native -description: Inspect an Angular Native app from a simulator, an emulator or a device, step by step. ---- - - - An Angular Native overlay walks the app's node tree and reports over a WebSocket to a devtools server on your machine. - - -# Set up Angular Native - -This guide adds the devtools to an [Angular Native](https://ng-native.com) app. The app renders through React Native's Fabric renderer and has no DOM, so a separate overlay walks Angular Native's node tree through *Angular's debug API and reports to the standalone devtools server. For what each tab shows and the overlay options, see [Angular Native](../getting-started/angular-native.md). - -## What you get - - - - The component tree, the signal graph, the injector tree and the pipes in use. - - - Live @ngrx/signals and @ngrx/store state and the change log, when your app uses NgRx. - - - Hovering a component in the panel outlines its view on the simulator or device. - - - /__mcp on the devtools server. The source scanners read the app's src/. - - - -## The flow - - - - Add @pangular-inspector/devtools. A bare React Native app also needs a URL polyfill. - - - Call initAngularNativeOverlay() in src/main.ts, after mount(), with the root node it returns. - - - Start pangular dev --no-auth in the app's folder. - - - Open the Angular Native apps URL the server prints. The live tabs fill once the app connects. - - - -## Step 1: Install - -```bash group="install" name="npm" image="https://cdn.simpleicons.org/npm/CB3837" active -npm install @pangular-inspector/devtools -``` - -```bash group="install" name="pnpm" image="https://cdn.simpleicons.org/pnpm/F69220" -pnpm add @pangular-inspector/devtools -``` - -```bash group="install" name="yarn" image="https://cdn.simpleicons.org/yarn/2C8EBB" -yarn add @pangular-inspector/devtools -``` - -```bash group="install" name="bun" image="https://bun.sh/logo.svg" -bun add @pangular-inspector/devtools -``` - -### WebSocket and URL - -The overlay needs a `WebSocket` global and a standards-compliant `URL`. React Native provides `WebSocket`, and Expo provides `URL`, so an Expo app needs nothing more. - -React Native's own `URL` is read-only, and the client sets the `protocol` of the socket URL. In a bare React Native app, add a polyfill such as `react-native-url-polyfill` and import it first in `src/main.ts`. - -## Step 2: Start the overlay - -Start the overlay after `mount()` from `@ng-native/platform`, and pass the root node of the mounted app: - -```ts {5,15} -// src/main.ts -import {AppRegistry, Image, Platform, processColor} from 'react-native'; -import {mount} from '@ng-native/platform'; -import {getFabricUIManager, registerPlatformComponents} from '@ng-native/fabric'; -import {initAngularNativeOverlay} from '@pangular-inspector/devtools/overlay-angular-native'; -import {App} from './app/app.ts'; - -registerPlatformComponents(Platform.OS); - -AppRegistry.registerRunnable('main', ({rootTag}) => { - const app = mount(Number(rootTag), App, getFabricUIManager(), { - processColor, - resolveAssetSource: (value) => Image.resolveAssetSource(value as never), - }); - if (__DEV__) initAngularNativeOverlay({root: app.engine.root}); -}); -``` - -The `__DEV__` check keeps the overlay out of release builds, which have no `ng` debug global to read. `initAngularNativeOverlay()` returns a function that stops the overlay and tells the server to forget the app. See [Options](../getting-started/angular-native.md#options) for `baseURL`, `intervalMs` and `retryMs`. - -### Where the overlay connects - -The overlay connects to `http://localhost:9999/` unless you pass `baseURL`. - -| Where the app runs | What to do | -| -------------------------------------- | ----------------------------------------------------------------------------------------------- | -| iOS simulator | Nothing. The simulator shares your machine's `localhost`. | -| Android emulator or USB Android device | Run `adb reverse tcp:9999 tcp:9999`, the same forwarding Metro uses for its own port. | -| Physical device over Wi-Fi | Pass your machine's LAN address as `baseURL`, such as `{baseURL: 'http://192.168.1.20:9999/'}`. | - -A device that reaches the server over plain HTTP may need a cleartext exception for that address in `Info.plist` or the Android network security config. - -## Step 3: Run the devtools server - -Run the server in the app's folder, so the source scanners read its `src/`: - -```bash -cd my-angular-native-app -npx @pangular-inspector/devtools dev --no-auth -``` - -The server listens on `localhost` only, which the iOS simulator reaches directly and an Android emulator reaches through `adb reverse`. `--no-auth` is needed because the app cannot enter the one-time code the panel asks for. Without it, the overlay logs a warning in the Metro log that names the flag and keeps retrying. - -When it is ready, the server prints the Angular Native view on its own line, next to the NativeScript setup view: - -```text - pangular v - Panel: http://localhost:9999/ - Angular Native apps: http://localhost:9999/?view=angular-native - NativeScript setup: http://localhost:9999/?view=nativescript - MCP: http://localhost:9999/__mcp -``` - -A physical device over Wi-Fi reaches your machine over the network, so the server has to listen on an interface the device can reach: - -```bash -npx @pangular-inspector/devtools dev --host 192.168.1.20 --allowed-origin http://192.168.1.20:9999 --no-auth -``` - -The server then listens on that address only, not on `localhost`, so open the panel at `http://192.168.1.20:9999/`. `--allowed-origin` lets the panel's own origin through there. Use your machine's address and the server's port. - - - With --host and --no-auth, every host that can reach that address can call the devtools RPC and MCP endpoints without a code. Use it on a trusted network only. Binding to the one address the device uses, as above, keeps the server off your other interfaces, which 0.0.0.0 would not. - - -See [Standalone CLI](../getting-started/cli.md) for the other server options and [Security](../security.md) for what `--no-auth` turns off. - -## Step 4: Open the panel - -Open `http://localhost:9999/?view=angular-native` on your machine. The **Angular Native** view shows the tabs an app on a device fills: **Components**, **Signals**, **Injectors**, **Store** and **Pipes**. With no app connected, it says **No Angular Native app is connected**. - -When the app connects, the Metro log shows `[pangular] Connected to the devtools server at http://localhost:9999/` and the tabs fill. Hover a component in the tree to outline its view on the device. - -If the app reports to a hub (Express or the Vite plugin) instead, pick the **Angular Native** dock in the side rail. See [Where it shows in the panel](../getting-started/angular-native.md#where-it-shows-in-the-panel). - -## Try the demo - -`examples/angular-native` is an Expo app wired up this way, with a root service, an `@ngrx/signals` store and components with signals to inspect. It is outside the pnpm workspace and installs with npm, using a tarball of the devtools package built from this repository. It uses `@ng-native/*` 0.2.0. The overlay's tests run against a simulated view tree and connection, and no automated test runs the demo on a simulator or device: - -```bash -cd examples/angular-native -npm run devtools:pack -npm install -npm run devtools -``` - -`npm run devtools` starts the devtools server with `--no-auth` on `http://localhost:9999/`, scanning the demo's `src`. In a second terminal, build and start the app: - -```bash -npm run ios -``` - -On Android, forward the devtools port first: - -```bash -adb reverse tcp:9999 tcp:9999 -npm run android -``` - -After a change in `packages/devtools`, run `npm run devtools:pack` and then `npm install ./pangular-inspector-devtools.tgz`, since a plain `npm install` keeps the tarball its lockfile pins. See [Angular Native demo](../contributing/demo-apps.md#angular-native-demo) for what each file covers. - -## Where to next - - - - - - - diff --git a/apps/docs/src/content/guides/capacitor.md b/apps/docs/src/content/guides/capacitor.md index 2d46246d..7de9e736 100644 --- a/apps/docs/src/content/guides/capacitor.md +++ b/apps/docs/src/content/guides/capacitor.md @@ -275,6 +275,8 @@ These keys are the same in Capacitor 6, 7 and 8. Keep the development ones out o ## Troubleshooting +The [troubleshooting page](../getting-started/troubleshooting.md) lists the problems every setup shares, by symptom. + Inspect the WebView, with Safari's Develop menu for iOS or chrome://inspect for Android, and read the console. [pangular] No devtools server found in a bundled build means connectionMeta is missing, or the WebView blocked the request. A Mixed Content message next to it means allowMixedContent is off, and a cleartext error means server.cleartext is. In both cases the overlay sends nothing. A failed connection to the address means the server is not running, listens only on localhost, or the address is wrong for where the app runs. A 403 under live reload over Wi-Fi means the page's origin is missing from allowedOrigins. A 400 page with is not allowed under SSR means the address is missing from Angular's security.allowedHosts, as in Live reload over Wi-Fi. diff --git a/apps/docs/src/content/guides/nativescript.md b/apps/docs/src/content/guides/nativescript.md deleted file mode 100644 index bdfdd923..00000000 --- a/apps/docs/src/content/guides/nativescript.md +++ /dev/null @@ -1,209 +0,0 @@ ---- -title: Set up NativeScript -description: Inspect a NativeScript Angular app from the simulator or a device, step by step. ---- - - - A NativeScript overlay walks the native view tree and reports over a WebSocket to a devtools server on your machine. - - -# Set up NativeScript - -This guide adds the devtools to a NativeScript Angular app. The app has no DOM, so a separate overlay walks the native view tree through *Angular's debug API and reports to the standalone devtools server. For what each tab shows and the overlay options, see [NativeScript](../getting-started/nativescript.md). - -## What you get - - - - The component tree, the signal graph and the injector tree, including environment injectors and their providers. - - - Signal stores and the change log, when your app uses NgRx. - - - The highlight tool outlines a component's view on the simulator or device. - - - /__mcp on the devtools server. The source scanners read the app's src/. - - - -## The flow - - - - Add @pangular-inspector/devtools and @valor/nativescript-websockets. - - - Import @valor/nativescript-websockets first in src/polyfills.ts. - - - Call initNativeScriptOverlay() in src/main.ts, before the app bootstraps. - - - Start pangular dev in the app's folder and open the UI. - - - -## Step 1: Install - -```bash group="install" name="npm" image="https://cdn.simpleicons.org/npm/CB3837" active -npm install @pangular-inspector/devtools @valor/nativescript-websockets -``` - -```bash group="install" name="pnpm" image="https://cdn.simpleicons.org/pnpm/F69220" -pnpm add @pangular-inspector/devtools @valor/nativescript-websockets -``` - -```bash group="install" name="yarn" image="https://cdn.simpleicons.org/yarn/2C8EBB" -yarn add @pangular-inspector/devtools @valor/nativescript-websockets -``` - -```bash group="install" name="bun" image="https://bun.sh/logo.svg" -bun add @pangular-inspector/devtools @valor/nativescript-websockets -``` - -## Step 2: Add a WebSocket global - -The overlay talks to the server over a WebSocket, and the NativeScript runtime has no `WebSocket` global. Import the polyfill first: - -```ts -// src/polyfills.ts -import '@valor/nativescript-websockets'; -``` - -## Step 3: Start the overlay - -```ts {2,4-6} -// src/main.ts -import {initNativeScriptOverlay} from '@pangular-inspector/devtools/overlay-nativescript'; - -if (__DEV__) { - initNativeScriptOverlay(); -} -``` - -Call it before `runNativeScriptAngularApp()`. The injector inspector relies on *Angular's injector profiler, which *Angular only wires while it creates the platform. See [Options](../getting-started/nativescript.md#options) for `baseURL`, `intervalMs` and `retryMs`. - -### Where the overlay connects - -| Target | Default URL | -| ---------------- | --------------------------------------------------------------------------------------- | -| iOS simulator | `http://localhost:9999/` | -| Android emulator | `http://10.0.2.2:9999/` | -| Physical device | Pass `{ baseURL }`, or [inject the LAN address](#use-the-injected-lan-address) at build | - -A build that defines `__PANGULAR_LAN_URL__` takes that URL over the defaults above. `baseURL` still wins over both. - -### Use the injected LAN address - -For a physical device, pass the address of your machine as `baseURL`, or let the build inject it, so `main.ts` keeps no address. Start the server with `--lan-address` (see [Step 4](#step-4-run-the-devtools-server)) to print the URL, then define it in `webpack.config.js` from an environment variable: - -```js {6-13} -// webpack.config.js -const webpack = require('@nativescript/webpack'); - -module.exports = (env) => { - webpack.init(env); - const lanUrl = process.env['PANGULAR_LAN_URL']; - if (lanUrl && !env.production) { - webpack.chainWebpack((config) => { - config.plugin('DefinePlugin').tap((args) => { - Object.assign(args[0], {__PANGULAR_LAN_URL__: JSON.stringify(lanUrl)}); - return args; - }); - }); - } - return webpack.resolveConfig(); -}; -``` - -Run the app with the URL the server printed, for example `PANGULAR_LAN_URL=http://192.168.1.20:9999/ ns run android`. `initNativeScriptOverlay()` without `baseURL` then connects there. A release build (`--env.production`) gets no address. - -### Allow plain HTTP to your machine - -The devtools server speaks plain `http`. Android 9 and later block cleartext traffic, and iOS App Transport Security can block it, so allow it to your machine in development builds. - -On Android, list the hosts the app may reach over cleartext in `App_Resources/Android/src/main/res/xml/network_security_config.xml`. The emulator reaches your machine at `10.0.2.2`, and a device at your machine's address: - -```html - - - - - localhost - 10.0.2.2 - 192.168.1.20 - - -``` - -Then set `android:networkSecurityConfig="@xml/network_security_config"` on the `` element of `App_Resources/Android/src/main/AndroidManifest.xml`. If the manifest already sets `android:usesCleartextTraffic="true"`, every host is allowed already. `examples/nativescript` ships a network security config. Keep these entries out of release builds. - -On iOS, add the local networking exception to `App_Resources/iOS/Info.plist`: - -```html - -NSAppTransportSecurity - - NSAllowsLocalNetworking - - -NSLocalNetworkUsageDescription -Connects to Pangular Inspector on your computer during development. -``` - -On iOS 14 and later, the first connection to an address on your network shows a local network permission prompt with that text. If the app was denied, turn it back on in **Settings** > **Privacy & Security** > **Local Network**. - -## Step 4: Run the devtools server - -Run the server in the app's folder, so the source scanners read its `src/`: - -```bash -cd my-nativescript-app -npx @pangular-inspector/devtools dev --no-auth -``` - -The server listens on `localhost` only, which the iOS simulator and the Android emulator reach. `--no-auth` is needed because the app cannot enter the one-time code the panel asks for. - -| What | Where | -| ------------ | ----------------------------- | -| Devtools UI | `http://localhost:9999/` | -| MCP endpoint | `http://localhost:9999/__mcp` | - -A physical device reaches your machine over the network, so the server has to listen on an interface the device can reach: - -```bash -npx @pangular-inspector/devtools dev --host 192.168.1.20 --allowed-origin http://192.168.1.20:9999 --no-auth --lan-address -``` - -The server then listens on that address only, not on `localhost`, so open the panel at `http://192.168.1.20:9999/`. `--allowed-origin` lets the panel's own origin through there. `--lan-address` prints the URL to [inject into the app](#use-the-injected-lan-address). Use your machine's address and the server's port. - - - With --host and --no-auth, every host that can reach that address can call the devtools RPC and MCP endpoints without a code. Use it on a trusted network only. Binding to the one address the device uses, as above, keeps the server off your other interfaces, which 0.0.0.0 would not. - - -See [Standalone CLI](../getting-started/cli.md) for the other server options and [Security](../security.md) for what `--no-auth` turns off. - -## Try the demo - -`examples/nativescript` is a `ns create --ng` project wired up this way, with a small showcase component (signals, a computed, an effect and a component-level provider). It is tested on the iOS simulator. Android is untested. - -The demo maps `@pangular-inspector/devtools/*` to the package's build output in `packages/devtools/dist`, so build the package first: - -```bash -pnpm devtools:build-pkg -pnpm devtools:nativescript -cd examples/nativescript && npm install && ns debug ios --no-hmr -``` - -`pnpm devtools:nativescript` starts the devtools server on `localhost`, scanning `examples/nativescript/src`. For a physical device, `pnpm devtools:nativescript:device` listens on every interface instead, with the same warning as above. - -## Where to next - - - - - - - diff --git a/apps/docs/src/content/guides/ssr-http.md b/apps/docs/src/content/guides/ssr-http.md index c1ed8cfe..483bcfee 100644 --- a/apps/docs/src/content/guides/ssr-http.md +++ b/apps/docs/src/content/guides/ssr-http.md @@ -190,5 +190,5 @@ Open `http://localhost:4000/examples/http`. See [Demo apps](../contributing/demo - + diff --git a/apps/docs/src/content/inspectors/analog.md b/apps/docs/src/content/inspectors/analog.md index 4ff4f9ea..c41a75c7 100644 --- a/apps/docs/src/content/inspectors/analog.md +++ b/apps/docs/src/content/inspectors/analog.md @@ -19,7 +19,7 @@ The Analog dock is always in the rail. In other apps it shows a **This app doesn ### Add the plugin -Add the Vite plugin next to `analog()` and load the overlay. See [Vite and Analog](../getting-started/vite.md) and the [Analog guide](../guides/analog.md). +Add the Vite plugin next to `analog()`. It also loads the overlay into your pages. See [Vite and Analog](../getting-started/vite.md). ```ts {3,7} // vite.config.ts @@ -157,7 +157,7 @@ Checks grouped by rule, each with a fix. The count on the tab adds up errors and - A `vite.config` the scan could not read in full (rule `config-partial`). See [Config the scan cannot read](#config-the-scan-cannot-read). - Frontmatter errors, duplicate slugs, and content that shadows a page. - Frontmatter that does not match the content schema (`content-schema`), and a schema file that can't be used (`content-schema-unreadable`). -- From the live page: `load()` fetched twice, server function reads called again after hydration, hydration errors, API routes not found, and added pages that need a restart. To catch hydration errors from the first load, add `providePangularHttp()` (see [Set up Analog](../guides/analog.md#catch-hydration-errors-from-the-first-load)). +- From the live page: `load()` fetched twice, server function reads called again after hydration, hydration errors, API routes not found, and added pages that need a restart. To catch hydration errors from the first load, add `providePangularHttp()` (see [Catch hydration errors from the first load](../getting-started/vite.md#catch-hydration-errors-from-the-first-load)). ## Where the data comes from @@ -307,11 +307,8 @@ The server keeps the last 200 calls of all tabs, and the **Server** tab renders ## Where to next - - Install, add the plugin and load the overlay. - - The Vite plugin and its options. + Install the package, add the Vite plugin and trace server renders. The TransferState payload, with Analog entries decoded. diff --git a/apps/docs/src/content/inspectors/ssr-http.md b/apps/docs/src/content/inspectors/ssr-http.md index 0c8c70ea..c405e898 100644 --- a/apps/docs/src/content/inspectors/ssr-http.md +++ b/apps/docs/src/content/inspectors/ssr-http.md @@ -52,7 +52,7 @@ app.use(devtools.ssrMiddleware); If the server uses `compression()`, mount `ssrMiddleware` after it. Mounted the other way round, the body is already compressed when `ssrMiddleware` sees it, so the render mode can't be read and **Edit TransferState** can't apply. The request detail then says so. -If your server takes web-standard handlers, as Hono, h3 and Nitro do, wrap the Angular handler with `withPangularSsr()` from `@pangular-inspector/devtools/ssr` instead. It records the same data. For Fastify and Analog, the same entry point has a Node tracer. See [Trace SSR renders](../getting-started/other-servers.md#trace-ssr-renders) and [Set up Analog](../guides/analog.md#trace-server-renders). +If your server takes web-standard handlers, as Hono, h3 and Nitro do, wrap the Angular handler with `withPangularSsr()` from `@pangular-inspector/devtools/ssr` instead. It records the same data. For Fastify and Analog, the same entry point has a Node tracer. See [Trace SSR renders](../getting-started/other-servers.md#trace-ssr-renders) and [Trace server renders](../getting-started/vite.md#trace-server-renders). ### Transfer cache options @@ -98,7 +98,7 @@ The request that served the selected page opens on its own. Click another row to The middleware gives each request an id. The id reaches the render in the `x-pangular-ssr-id` request header, so the interceptor tags each server call with it. It goes back to the browser in a `Server-Timing` header (`pangular;desc=""`, `render;dur=...`, `fetch;dur=...`, and `guards;dur=...` and `resolve;dur=...` when the router ran them), so the overlay links the page to the render, and the browser's own Network panel shows the same times. Each server HttpClient call also gets its own entry, `fetch-1;desc="GET /api/products";dur=12` and so on, so the **Timing** tab of the document request in Chrome lists the calls one by one. The description is the method and the masked path, without the origin or the query, which can carry secrets. The first 20 calls of a render get an entry; the `fetch` total still counts them all. -A render without the `REQUEST` token from `@angular/core`, as in Analog, has no header to read. The tracer keeps the id in the request's async context instead (Node's `AsyncLocalStorage`), so each server call is linked to the request it ran under, even when several renders run at the same time. The calls of a render that is not traced are not linked to any request. A traced request with no activity for five minutes no longer counts as in flight. See [Set up Analog](../guides/analog.md#trace-server-renders). +A render without the `REQUEST` token from `@angular/core`, as in Analog, has no header to read. The tracer keeps the id in the request's async context instead (Node's `AsyncLocalStorage`), so each server call is linked to the request it ran under, even when several renders run at the same time. The calls of a render that is not traced are not linked to any request. A traced request with no activity for five minutes no longer counts as in flight. See [Trace server renders](../getting-started/vite.md#trace-server-renders). #### Render modes diff --git a/apps/docs/src/content/roadmap.md b/apps/docs/src/content/roadmap.md index 98b203eb..01803b3f 100644 --- a/apps/docs/src/content/roadmap.md +++ b/apps/docs/src/content/roadmap.md @@ -17,12 +17,12 @@ Plans follow feedback. To ask for something, or to move an item up, comment on i ### Inspection and agents -| Feature | Read more | -| ----------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ | -| Agent tools over MCP for the live app | [Tools](./agents/tools.md) | -| NgRx and SignalStore time travel | [Restore an earlier state](./inspectors/ngrx-store.md#restore-an-earlier-state) | -| Why a form is invalid, for you and agents | [Forms agent tools](./inspectors/forms.md#agent-tools) | -| Mobile apps | [Capacitor](./inspectors/capacitor.md), [NativeScript](./getting-started/nativescript.md), [Angular Native](./getting-started/angular-native.md) | +| Feature | Read more | +| ----------------------------------------- | ------------------------------------------------------------------------------- | +| Agent tools over MCP for the live app | [Tools](./agents/tools.md) | +| NgRx and SignalStore time travel | [Restore an earlier state](./inspectors/ngrx-store.md#restore-an-earlier-state) | +| Why a form is invalid, for you and agents | [Forms agent tools](./inspectors/forms.md#agent-tools) | +| Mobile apps | [Platforms](./getting-started/platforms.md) | ### Setup and workflow @@ -86,6 +86,8 @@ These items remain from phase 3, [#342](https://github.com/pangular-inspector/de | Extension stores | The Chrome extension in the Chrome Web Store and Edge Add-ons, and a Firefox build. | [#342](https://github.com/pangular-inspector/devtools/issues/342) | | Ionic support | Ionic apps, on top of the Capacitor support. | [#307](https://github.com/pangular-inspector/devtools/issues/307) | +[Platforms](./getting-started/platforms.md#planned) lists the planned platforms and extension stores together. + ## Fixes and improvements per inspector Besides the phases, issues [#366](https://github.com/pangular-inspector/devtools/issues/366) through [#373](https://github.com/pangular-inspector/devtools/issues/373) track the open audit findings and proposed improvements for each inspector and the package. Pull requests for any of them are welcome. Start with [Development setup](./contributing/development.md). diff --git a/apps/docs/src/nav-badges.spec.ts b/apps/docs/src/nav-badges.spec.ts new file mode 100644 index 00000000..204d24d5 --- /dev/null +++ b/apps/docs/src/nav-badges.spec.ts @@ -0,0 +1,52 @@ +import config from './ngmd.config'; +import { + DOCS_PACKAGE_VERSION, + activeBadge, + compareVersions, + isExpiringBadge, + parseVersion, +} from './nav-badges'; + +describe('nav badges', () => { + it('compares package versions by major, minor and patch', () => { + expect(compareVersions('1.0.0', '1.2.0')).toBeLessThan(0); + expect(compareVersions('1.2.0', '1.2.0')).toBe(0); + expect(compareVersions('1.10.0', '1.2.0')).toBeGreaterThan(0); + expect(compareVersions('1.2.0-rc.1', '1.2.0')).toBeLessThan(0); + expect(compareVersions('1.2.0-rc.2', '1.2.0-rc.10')).toBeLessThan(0); + expect(compareVersions('1.2.0+build.5', '1.2.0')).toBe(0); + expect(compareVersions('next', '1.2.0')).toBeNaN(); + }); + + it('shows a badge while the package version is older than until', () => { + expect(activeBadge({status: 'new', until: '1.2.0'}, '1.1.4')).toBe('new'); + expect(activeBadge({status: 'new', until: '1.2.0'}, '1.2.0-rc.1')).toBe('new'); + expect(activeBadge({status: 'new', until: '1.2.0'}, '1.2.0')).toBeNull(); + expect(activeBadge({status: 'updated', until: '1.2.0'}, '2.0.0')).toBeNull(); + }); + + it('never shows new or updated without until, and keeps other badges', () => { + expect(activeBadge({status: 'new'}, '1.0.0')).toBeNull(); + expect(activeBadge({status: 'updated'}, '1.0.0')).toBeNull(); + expect(activeBadge({status: 'beta'}, '1.0.0')).toBe('beta'); + expect(activeBadge({status: 'deprecated', until: '2.0.0'}, '2.0.0')).toBeNull(); + expect(activeBadge({}, '1.0.0')).toBeNull(); + }); + + it('reads the package version', () => { + expect(parseVersion(DOCS_PACKAGE_VERSION)).not.toBeNull(); + }); + + it('gives every new or updated sidebar item a valid until version', () => { + const items = config.nav.flatMap((section) => section.items); + const missing = items + .filter((item) => item.status && isExpiringBadge(item.status)) + .filter((item) => !item.until || !parseVersion(item.until)) + .map((item) => item.href); + expect(missing).toEqual([]); + const malformed = items + .filter((item) => item.until !== undefined && !parseVersion(item.until)) + .map((item) => item.href); + expect(malformed).toEqual([]); + }); +}); diff --git a/apps/docs/src/nav-badges.ts b/apps/docs/src/nav-badges.ts new file mode 100644 index 00000000..9ca6cb87 --- /dev/null +++ b/apps/docs/src/nav-badges.ts @@ -0,0 +1,59 @@ +import {version as packageVersion} from '../../../packages/devtools/package.json'; +import type {BadgeVariant} from './types/badge.ts'; + +/** Badges that announce a change, so they stop meaning anything once the change is old. */ +const EXPIRING: ReadonlySet = new Set(['new', 'updated']); + +/** The published package version the docs describe, from `packages/devtools/package.json`. */ +export const DOCS_PACKAGE_VERSION: string = packageVersion; + +export interface BadgedItem { + status?: BadgeVariant; + until?: string; +} + +/** `major.minor.patch` as numbers. A build suffix (`+...`) is ignored. */ +export function parseVersion(value: string): [number, number, number] | null { + const match = /^(\d+)\.(\d+)\.(\d+)(?:-[0-9A-Za-z.-]+)?(?:\+.*)?$/.exec(value.trim()); + return match ? [Number(match[1]), Number(match[2]), Number(match[3])] : null; +} + +/** The prerelease part of a version, such as `rc.1` in `1.2.0-rc.1`, or `''`. */ +function prerelease(value: string): string { + return /^[^-+]*-([^+]*)/.exec(value.trim())?.[1] ?? ''; +} + +/** + * Negative when `a` is older than `b`, 0 when equal, positive when newer. + * A prerelease is older than its release: `1.2.0-rc.1` comes before `1.2.0`. + */ +export function compareVersions(a: string, b: string): number { + const left = parseVersion(a); + const right = parseVersion(b); + if (!left || !right) return Number.NaN; + for (let i = 0; i < 3; i++) { + if (left[i] !== right[i]) return left[i] - right[i]; + } + const [preA, preB] = [prerelease(a), prerelease(b)]; + if (preA === preB) return 0; + if (!preA) return 1; + if (!preB) return -1; + return preA.localeCompare(preB, 'en', {numeric: true}); +} + +/** Whether the badge is an announcement (`new`, `updated`) that needs an `until`. */ +export function isExpiringBadge(status: BadgeVariant): boolean { + return EXPIRING.has(status); +} + +/** + * The badge to show beside a sidebar item, or `null`. A badge with `until` + * shows while the package version is older than `until`. A `new` or + * `updated` badge without `until` never shows, so it can't stay forever. + */ +export function activeBadge(item: BadgedItem, version = DOCS_PACKAGE_VERSION): BadgeVariant | null { + const {status, until} = item; + if (!status) return null; + if (until === undefined) return isExpiringBadge(status) ? null : status; + return compareVersions(version, until) < 0 ? status : null; +} diff --git a/apps/docs/src/ngmd.config.ts b/apps/docs/src/ngmd.config.ts index f8fbd0a5..12ee3b60 100644 --- a/apps/docs/src/ngmd.config.ts +++ b/apps/docs/src/ngmd.config.ts @@ -15,6 +15,12 @@ export interface NavItem { * (`new`, `updated`, `alpha`, `beta`, `stable`, `deprecated`), so the * sidebar chip and inline `` always stay in sync. */ status?: BadgeVariant; + /** The `@pangular-inspector/devtools` version the badge expires at, such as + * `'1.2.0'`. The chip shows while the package version in + * `packages/devtools/package.json` is older. `new` and `updated` need it: + * set it to the minor after the release that ships the page, so the badge + * disappears with the next minor release. See `nav-badges.ts`. */ + until?: string; } export interface NavSection { @@ -177,20 +183,54 @@ const config: NgmdConfig = { items: [ {label: 'Quick start', href: '/getting-started/quick-start'}, {label: 'Introduction', href: '/getting-started/introduction'}, - {label: 'Installation', href: '/getting-started/installation'}, + {label: 'Features', href: '/getting-started/features', status: 'new', until: '1.2.0'}, + { + label: 'Installation', + href: '/getting-started/installation', + status: 'updated', + until: '1.2.0', + }, {label: 'Angular CLI and Express', href: '/getting-started/express'}, {label: 'Hono, h3 and Fastify', href: '/getting-started/other-servers'}, - {label: 'Vite and Analog', href: '/getting-started/vite'}, + { + label: 'Vite and Analog', + href: '/getting-started/vite', + status: 'updated', + until: '1.2.0', + }, {label: 'Standalone CLI', href: '/getting-started/cli'}, {label: 'Configuration', href: '/getting-started/configuration'}, {label: 'Popup and hub', href: '/getting-started/popup-and-hub'}, {label: 'Command palette', href: '/getting-started/command-palette'}, + { + label: 'Keyboard shortcuts', + href: '/getting-started/keyboard-shortcuts', + status: 'new', + until: '1.2.0', + }, {label: 'Terminals', href: '/getting-started/terminals'}, {label: 'Settings', href: '/getting-started/settings'}, {label: 'Browser overlay', href: '/getting-started/overlay'}, {label: 'Chrome extension', href: '/getting-started/chrome-extension'}, - {label: 'Angular Native', href: '/getting-started/angular-native'}, - {label: 'NativeScript', href: '/getting-started/nativescript'}, + { + label: 'Angular Native', + href: '/getting-started/angular-native', + status: 'updated', + until: '1.2.0', + }, + { + label: 'NativeScript', + href: '/getting-started/nativescript', + status: 'updated', + until: '1.2.0', + }, + {label: 'Platforms', href: '/getting-started/platforms', status: 'new', until: '1.2.0'}, + { + label: 'Troubleshooting', + href: '/getting-started/troubleshooting', + status: 'new', + until: '1.2.0', + }, ], }, { @@ -218,9 +258,34 @@ const config: NgmdConfig = { items: [ {label: 'MCP server', href: '/agents/mcp-server'}, {label: 'Tools', href: '/agents/tools'}, + {label: 'Tool index', href: '/agents/tool-index', status: 'new', until: '1.2.0'}, {label: 'Resources', href: '/agents/resources'}, {label: 'Browser agents', href: '/agents/browser-agents'}, {label: 'Agent skills', href: '/agents/skills'}, + {label: 'Recipes for agents', href: '/agents/recipes', status: 'new', until: '1.2.0'}, + ], + }, + { + label: 'API reference', + items: [ + {label: 'API reference', href: '/api', status: 'new', until: '1.2.0'}, + {label: 'devframe', href: '/api/devframe'}, + {label: 'config', href: '/api/config'}, + {label: 'cd-data', href: '/api/cd-data'}, + {label: 'overlay', href: '/api/overlay'}, + {label: 'overlay-manual', href: '/api/overlay-manual'}, + {label: 'plugin', href: '/api/plugin'}, + {label: 'capacitor-hook', href: '/api/capacitor-hook'}, + {label: 'store-hook', href: '/api/store-hook'}, + {label: 'startup-hook', href: '/api/startup-hook'}, + {label: 'overlay-angular-native', href: '/api/overlay-angular-native'}, + {label: 'popup', href: '/api/popup'}, + {label: 'overlay-nativescript', href: '/api/overlay-nativescript'}, + {label: 'cli', href: '/api/cli'}, + {label: 'http', href: '/api/http'}, + {label: 'hub', href: '/api/hub'}, + {label: 'ssr', href: '/api/ssr'}, + {label: 'vite', href: '/api/vite'}, ], }, { @@ -228,9 +293,6 @@ const config: NgmdConfig = { items: [ {label: 'Restore NgRx signal state', href: '/guides/ngrx-signals-restore'}, {label: 'Set up SSR & HTTP', href: '/guides/ssr-http'}, - {label: 'Set up Analog', href: '/guides/analog'}, - {label: 'Set up NativeScript', href: '/guides/nativescript'}, - {label: 'Set up Angular Native', href: '/guides/angular-native'}, {label: 'Set up Capacitor', href: '/guides/capacitor'}, {label: 'Write a plugin', href: '/guides/write-a-plugin'}, {label: 'Ship a plugin from a library', href: '/guides/ship-a-plugin'}, diff --git a/apps/docs/src/types/badge.ts b/apps/docs/src/types/badge.ts index d9d961f4..7d7579fc 100644 --- a/apps/docs/src/types/badge.ts +++ b/apps/docs/src/types/badge.ts @@ -4,7 +4,8 @@ * One map, two consumers: * - `` (`src/app/ui/badge.ts`): inline status pill * - sidebar status chip (`src/app/components/sidebar.ts`), driven by - * `NavItem.status` declared in `ngmd.config.ts` + * `NavItem.status` declared in `ngmd.config.ts`, hidden once its + * `until` version is reached (`src/nav-badges.ts`) * * Add a row here to define a new variant. Both the inline component and * the sidebar pick it up without further edits. diff --git a/apps/docs/tsconfig.json b/apps/docs/tsconfig.json index 5e79f72c..8c15c3f8 100644 --- a/apps/docs/tsconfig.json +++ b/apps/docs/tsconfig.json @@ -12,6 +12,7 @@ "declaration": false, "experimentalDecorators": true, "moduleResolution": "bundler", + "resolveJsonModule": true, "rewriteRelativeImportExtensions": true, "isolatedModules": true, "importHelpers": true, diff --git a/apps/docs/vite.config.ts b/apps/docs/vite.config.ts index 086f0138..18c92051 100644 --- a/apps/docs/vite.config.ts +++ b/apps/docs/vite.config.ts @@ -12,6 +12,7 @@ import {mdLinksPlugin} from './md-links.plugin.ts'; import {sitemapPlugin} from './sitemap.plugin.ts'; import {searchIndexPlugin} from './search-index.plugin.ts'; import {rawMdPlugin} from './raw-md.plugin.ts'; +import {llmsTxtPlugin} from './llms-txt.plugin.ts'; import {varsPlugin} from './vars.plugin.ts'; import {apiGenPlugin} from './api-gen.plugin.ts'; import {prerenderRoutes, withoutCode} from './plugin-utils.ts'; @@ -93,6 +94,7 @@ export default defineConfig(async () => ({ }), sitemapPlugin({siteUrl: config.site.url}), rawMdPlugin(), + llmsTxtPlugin(config), searchIndexPlugin(), apiGenPlugin(), analog({ diff --git a/examples/angular-native/README.md b/examples/angular-native/README.md index bfb23b1b..3e3162c3 100644 --- a/examples/angular-native/README.md +++ b/examples/angular-native/README.md @@ -57,4 +57,4 @@ If you restart the devtools server, the app reconnects within five seconds. Type-check the app with `npm run typecheck`. -The setup is explained in the [Set up Angular Native](../../apps/docs/src/content/guides/angular-native.md) guide. +The setup is explained on the [Angular Native](../../apps/docs/src/content/getting-started/angular-native.md) page. diff --git a/extension/ui/assets/browser-agent-rpc-KH4HHvHf-aajacf2X.js b/extension/ui/assets/browser-agent-rpc-KH4HHvHf-Cxjx-Meu.js similarity index 95% rename from extension/ui/assets/browser-agent-rpc-KH4HHvHf-aajacf2X.js rename to extension/ui/assets/browser-agent-rpc-KH4HHvHf-Cxjx-Meu.js index 1e02de89..9306a9fc 100644 --- a/extension/ui/assets/browser-agent-rpc-KH4HHvHf-aajacf2X.js +++ b/extension/ui/assets/browser-agent-rpc-KH4HHvHf-Cxjx-Meu.js @@ -1 +1 @@ -import{t as e}from"./index-BYk2yhgK.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(){let e=typeof document>`u`?void 0:document;return{url:e?.location?.href??``,title:e?.title??``,visible:!e||e.visibilityState===`visible`,focused:e?.hasFocus()??!0}}function u(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,l()).catch(()=>{}))}))},s=a(o),u=e.events.on(`connection:status`,e=>{e===`connected`&&o()}),d=typeof window>`u`?void 0:window;return d?.addEventListener(`focus`,o),d?.addEventListener(`blur`,o),d?.document.addEventListener(`visibilitychange`,o),o(),()=>{n=!0,s(),u(),d?.removeEventListener(`focus`,o),d?.removeEventListener(`blur`,o),d?.document.removeEventListener(`visibilitychange`,o)}}export{u as setupBrowserAgentRpcBridge}; \ No newline at end of file +import{t as e}from"./index-LBnCVphy.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(){let e=typeof document>`u`?void 0:document;return{url:e?.location?.href??``,title:e?.title??``,visible:!e||e.visibilityState===`visible`,focused:e?.hasFocus()??!0}}function u(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,l()).catch(()=>{}))}))},s=a(o),u=e.events.on(`connection:status`,e=>{e===`connected`&&o()}),d=typeof window>`u`?void 0:window;return d?.addEventListener(`focus`,o),d?.addEventListener(`blur`,o),d?.document.addEventListener(`visibilitychange`,o),o(),()=>{n=!0,s(),u(),d?.removeEventListener(`focus`,o),d?.removeEventListener(`blur`,o),d?.document.removeEventListener(`visibilitychange`,o)}}export{u as setupBrowserAgentRpcBridge}; \ No newline at end of file diff --git a/extension/ui/assets/index-BYk2yhgK.js b/extension/ui/assets/index-LBnCVphy.js similarity index 95% rename from extension/ui/assets/index-BYk2yhgK.js rename to extension/ui/assets/index-LBnCVphy.js index 353c3553..536b8613 100644 --- a/extension/ui/assets/index-BYk2yhgK.js +++ b/extension/ui/assets/index-LBnCVphy.js @@ -5,7 +5,7 @@ `):``,this.name=`UnsubscriptionError`,this.errors=t}});function ar(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var or=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=Xn(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(nr(c))try{c()}catch(e){i=e instanceof ir?e.errors:[e]}var l=this._finalizers;if(l){this._finalizers=null;try{for(var u=Xn(l),d=u.next();!d.done;d=u.next()){var f=d.value;try{lr(f)}catch(e){i??=[],e instanceof ir?i=Qn(Qn([],Zn(i)),Zn(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 ir(i)}},e.prototype.add=function(t){if(t&&t!==this){if(this.closed)lr(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)&&ar(t,e)},e.prototype.remove=function(t){var n=this._finalizers;n&&ar(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=(function(){var t=new e;return t.closed=!0,t})(),e}(),sr=or.EMPTY;function cr(e){return e instanceof or||e&&`closed`in e&&nr(e.remove)&&nr(e.add)&&nr(e.unsubscribe)}function lr(e){nr(e)?e():e.unsubscribe()}var ur={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},dr={setTimeout:function(e,t){var n=[...arguments].slice(2),r=dr.delegate;return r?.setTimeout?r.setTimeout.apply(r,Qn([e,t],Zn(n))):setTimeout.apply(void 0,Qn([e,t],Zn(n)))},clearTimeout:function(e){return(dr.delegate?.clearTimeout||clearTimeout)(e)},delegate:void 0};function fr(e){dr.setTimeout(function(){var t=ur.onUnhandledError;if(t)t(e);else throw e})}function pr(){}var mr=(function(){return _r(`C`,void 0,void 0)})();function hr(e){return _r(`E`,void 0,e)}function gr(e){return _r(`N`,e,void 0)}function _r(e,t,n){return{kind:e,value:t,error:n}}var vr=null;function yr(e){if(ur.useDeprecatedSynchronousErrorHandling){var t=!vr;if(t&&(vr={errorThrown:!1,error:null}),e(),t){var n=vr,r=n.errorThrown,i=n.error;if(vr=null,r)throw i}}else e()}function br(e){ur.useDeprecatedSynchronousErrorHandling&&vr&&(vr.errorThrown=!0,vr.error=e)}var xr=function(e){qn(t,e);function t(t){var n=e.call(this)||this;return n.isStopped=!1,t?(n.destination=t,cr(t)&&t.add(n)):n.destination=kr,n}return t.create=function(e,t,n){return new Tr(e,t,n)},t.prototype.next=function(e){this.isStopped?Or(gr(e),this):this._next(e)},t.prototype.error=function(e){this.isStopped?Or(hr(e),this):(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped?Or(mr,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}(or),Sr=Function.prototype.bind;function Cr(e,t){return Sr.call(e,t)}var wr=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){Er(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){Er(e)}else Er(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){Er(e)}},e}(),Tr=function(e){qn(t,e);function t(t,n,r){var i=e.call(this)||this,a;if(nr(t)||!t)a={next:t??void 0,error:n??void 0,complete:r??void 0};else{var o;i&&ur.useDeprecatedNextContext?(o=Object.create(t),o.unsubscribe=function(){return i.unsubscribe()},a={next:t.next&&Cr(t.next,o),error:t.error&&Cr(t.error,o),complete:t.complete&&Cr(t.complete,o)}):a=t}return i.destination=new wr(a),i}return t}(xr);function Er(e){ur.useDeprecatedSynchronousErrorHandling?br(e):fr(e)}function Dr(e){throw e}function Or(e,t){var n=ur.onStoppedNotification;n&&dr.setTimeout(function(){return n(e,t)})}var kr={closed:!0,next:pr,error:Dr,complete:pr},Ar=(function(){return typeof Symbol==`function`&&Symbol.observable||`@@observable`})();function jr(e){return e}function Mr(e){return e.length===0?jr:e.length===1?e[0]:function(t){return e.reduce(function(e,t){return t(e)},t)}}var Nr=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=Ir(e)?e:new Tr(e,t,n);return yr(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=Pr(t),new t(function(t,r){var i=new Tr({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[Ar]=function(){return this},e.prototype.pipe=function(){return Mr([...arguments])(this)},e.prototype.toPromise=function(e){var t=this;return e=Pr(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 Pr(e){return e??ur.Promise??Promise}function Fr(e){return e&&nr(e.next)&&nr(e.error)&&nr(e.complete)}function Ir(e){return e&&e instanceof xr||Fr(e)&&cr(e)}function Lr(e){return nr(e?.lift)}function Rr(e){return function(t){if(Lr(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 zr(e,t,n,r,i){return new Br(e,t,n,r,i)}var Br=function(e){qn(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}(xr),Vr=rr(function(e){return function(){e(this),this.name=`ObjectUnsubscribedError`,this.message=`object unsubscribed`}}),Hr=function(e){qn(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 Ur(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new Vr},t.prototype.next=function(e){var t=this;yr(function(){var n,r;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||=Array.from(t.observers);try{for(var i=Xn(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;yr(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;yr(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?sr:(this.currentObservers=null,a.push(e),new or(function(){t.currentObservers=null,ar(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 Nr;return e.source=this,e},t.create=function(e,t){return new Ur(e,t)},t}(Nr),Ur=function(e){qn(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)??sr},t}(Hr),Wr=function(e){qn(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}(Hr);function Gr(e){return e[e.length-1]}function Kr(e){return nr(Gr(e))?e.pop():void 0}var qr=(function(e){return e&&typeof e.length==`number`&&typeof e!=`function`});function Jr(e){return nr(e?.then)}function Yr(e){return nr(e[Ar])}function Xr(e){return Symbol.asyncIterator&&nr(e?.[Symbol.asyncIterator])}function Zr(e){return TypeError(`You provided `+(typeof e==`object`&&e?`an invalid object`:`'`+e+`'`)+` where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}function Qr(){return typeof Symbol!=`function`||!Symbol.iterator?`@@iterator`:Symbol.iterator}var $r=Qr();function ei(e){return nr(e?.[$r])}function ti(e){return er(this,arguments,function(){var t,n,r,i;return Yn(this,function(a){switch(a.label){case 0:t=e.getReader(),a.label=1;case 1:a.trys.push([1,,9,10]),a.label=2;case 2:return[4,$n(t.read())];case 3:return n=a.sent(),r=n.value,i=n.done,i?[4,$n(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,$n(r)];case 6:return[4,a.sent()];case 7:return a.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}})})}function ni(e){return nr(e?.getReader)}function ri(e){if(e instanceof Nr)return e;if(e!=null){if(Yr(e))return vee(e);if(qr(e))return yee(e);if(Jr(e))return bee(e);if(Xr(e))return ii(e);if(ei(e))return xee(e);if(ni(e))return See(e)}throw Zr(e)}function vee(e){return new Nr(function(t){var n=e[Ar]();if(nr(n.subscribe))return n.subscribe(t);throw TypeError(`Provided object does not correctly implement Symbol.observable`)})}function yee(e){return new Nr(function(t){for(var n=0;n=0?n.slice(0,r):n}function hi(e,t){return e?t?`${e} ${t}`:e:t||``}var Wee=pi({__forward_ref__:pi});function gi(e){return e.__forward_ref__=gi,e}function _i(e){return vi(e)?e():e}function vi(e){return typeof e==`function`&&Object.hasOwn(e,Wee)&&e.__forward_ref__===gi}function yi(e){return{token:e.token,providedIn:e.providedIn||null,factory:e.factory,value:void 0}}function bi(e){return xi(e,wi)}function xi(e,t){return Object.hasOwn(e,t)&&e[t]||null}function Si(e){return(e?.[wi]??null)||null}function Ci(e){return e&&Object.hasOwn(e,Ti)?e[Ti]:null}var wi=pi({ɵprov:pi}),Ti=pi({ɵinj:pi}),Ei=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=yi({token:this,providedIn:t.providedIn||`root`,factory:t.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}};function Di(e){return e&&!!e.ɵproviders}var Oi=pi({ɵcmp:pi}),ki=pi({ɵdir:pi}),Ai=pi({ɵpipe:pi}),ji=pi({ɵfac:pi}),Mi=pi({__NG_ELEMENT_ID__:pi}),Ni=pi({__NG_ENV_ID__:pi});function Pi(e){return Li(e,`@Component`),e[Oi]||null}function Fi(e){return Li(e,`@Directive`),e[ki]||null}function Ii(e){return Li(e,`@Pipe`),e[Ai]||null}function Li(e,t){if(e==null)throw new di(-919,!1)}function Ri(e){return typeof e==`string`?e:e==null?``:String(e)}var zi=pi({ngErrorCode:pi}),Bi=pi({ngErrorMessage:pi}),Vi=pi({ngTokenPath:pi});function Hi(e,t){return Wi(``,-200,t)}function Ui(e,t){throw new di(-201,!1)}function Wi(e,t,n){let r=new di(t,e);return r[zi]=t,r[Bi]=e,n&&(r[Vi]=n),r}function Gi(e){return e[zi]}var Ki;function qi(){return Ki}function Ji(e){let t=Ki;return Ki=e,t}function Yi(e,t,n){let r=bi(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;Ui(e,``)}var Xi=globalThis,Zi={},Qi=`__NG_DI_FLAG__`,$i=class{injector;constructor(e){this.injector=e}retrieve(e,t){let n=na(t)||0;try{return this.injector.get(e,n&8?null:Zi,n)}catch(e){if(Bn(e))return e;throw e}}};function ea(e,t=0){let n=Ln();if(n===void 0)throw new di(-203,!1);if(n===null)return Yi(e,void 0,t);{let r=ra(t),i=n.retrieve(e,r);if(Bn(i)){if(r.optional)return null;throw i}return i}}function ta(e,t=0){return(qi()||ea)(_i(e),t)}function x(e,t){return ta(e,na(t))}function na(e){return e===void 0||typeof e==`number`?e:0|(e.optional&&8)|(e.host&&1)|(e.self&&2)|(e.skipSelf&&4)}function ra(e){return{optional:!!(e&8),host:!!(e&1),self:!!(e&2),skipSelf:!!(e&4)}}function ia(e){let t=[];for(let n=0;nArray.isArray(e)?la(e,t):t(e))}function ua(e,t,n){t>=e.length?e.push(n):e.splice(t,0,n)}function da(e,t){return t>=e.length-1?e.pop():e.splice(t,1)[0]}function fa(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 ma(e,t,n){let r=ga(e,t);return r>=0?e[r|1]=n:(r=~r,pa(e,r,t,n)),r}function ha(e,t){let n=ga(e,t);if(n>=0)return e[n|1]}function ga(e,t){return _a(e,t,1)}function _a(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 la(t,e=>{let t=e;Da(t,a,[],r)&&(i||=[],i.push(t))}),i!==void 0&&Ea(i,a),n}function Ea(e,t){for(let n=0;n{t(e,r)})}}function Da(e,t,n,r){if(e=_i(e),!e)return!1;let i=null,a=Ci(e),o=!a&&Pi(e);if(!a&&!o){let t=e.ngModule;if(a=Ci(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)Da(i,t,n,r)}}else if(a){if(a.imports!=null&&!s){r.add(i);let e;try{la(a.imports,i=>{Da(i,t,n,r)&&(e||=[],e.push(i))})}finally{}e!==void 0&&Ea(e,t)}if(!s){let e=oa(i)||(()=>new i);t({provide:i,useFactory:e,deps:ya},i),t({provide:Sa,useValue:i,multi:!0},i),t({provide:ba,useValue:()=>ta(i),multi:!0},i)}let o=a.providers;if(o!=null&&!s){let n=e;Oa(o,e=>{t(e,n)})}}else return!1;return i!==e&&e.providers!==void 0}function Oa(e,t){for(let n of e)Di(n)&&(n=n.ɵproviders),Array.isArray(n)?Oa(n,t):t(n)}var ka=pi({provide:String,useValue:pi});function Aa(e){return typeof e==`object`&&!!e&&ka in e}function ja(e){return!!(e&&e.useExisting)}function Ma(e){return!!(e&&e.useFactory)}function Na(e){return typeof e==`function`}function Pa(e){return!!e.useClass}var Fa=new Ei(``),Ia={},La={},Ra=void 0;function za(){return Ra===void 0&&(Ra=new Ca),Ra}var Ba=class{},Va=class extends Ba{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,Za(e,e=>this.processProvider(e)),this.records.set(xa,qa(void 0,this)),r.has(`environment`)&&this.records.set(Ba,qa(void 0,this));let i=this.records.get(Fa);i!=null&&typeof i.value==`string`&&this.scopes.add(i.value),this.injectorDefTypes=new Set(this.get(Sa,ya,{self:!0}))}retrieve(e,t){let n=na(t)||0;try{return this.get(e,Zi,n)}catch(e){if(Bn(e))return e;throw e}}destroy(){Ka(this),this._destroyed=!0;let e=tn(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(),tn(e)}}onDestroy(e){return Ka(this),this._onDestroyHooks.push(e),()=>this.removeOnDestroy(e)}runInContext(e){Ka(this);let t=Rn(this),n=Ji(void 0);try{return e()}finally{Rn(t),Ji(n)}}get(e,t=Zi,n){if(Ka(this),Object.hasOwn(e,Ni))return e[Ni](this);let r=na(n),i=Rn(this),a=Ji(void 0);try{if(!(r&4)){let t=this.records.get(e);if(t===void 0){let n=Xa(e)&&bi(e);t=n&&this.injectableDefInScope(n)?qa(Ha(e),Ia):null,this.records.set(e,t)}if(t!=null)return this.hydrate(e,t,r)}let n=r&2?za():this.parent;return t=r&8&&t===Zi?null:t,n.get(e,t)}catch(e){let t=Gi(e);throw t===-200||t===-201?new di(t,null):e}finally{Ji(a),Rn(i)}}resolveInjectorInitializers(){let e=tn(null),t=Rn(this),n=Ji(void 0);try{let e=this.get(ba,ya,{self:!0});for(let t of e)t()}finally{Rn(t),Ji(n),tn(e)}}toString(){return`R3Injector[...]`}processProvider(e){e=_i(e);let t=Na(e)?e:_i(e&&e.provide),n=Wa(e);if(!Na(e)&&e.multi===!0){let n=this.records.get(t);n||(n=qa(void 0,Ia,!0),n.factory=()=>ia(n.multi),this.records.set(t,n)),t=e,n.multi.push(e)}this.records.set(t,n)}hydrate(e,t,n){let r=tn(null);try{if(t.value===La)throw Hi(``);return t.value===Ia&&(t.value=La,t.value=t.factory(void 0,n)),typeof t.value==`object`&&t.value&&Ya(t.value)&&this._ngOnDestroyHooks.add(t.value),t.value}finally{tn(r)}}injectableDefInScope(e){if(!e.providedIn)return!1;let t=_i(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 Ha(e){let t=bi(e),n=t===null?oa(e):t.factory;if(n!==null)return n;if(e instanceof Ei)throw new di(-204,!1);if(e instanceof Function)return Ua(e);throw new di(-204,!1)}function Ua(e){if(e.length>0)throw new di(-204,!1);let t=Si(e);return t===null?()=>new e:()=>t.factory(e)}function Wa(e){return Aa(e)?qa(void 0,e.useValue):qa(Ga(e),Ia)}function Ga(e,t,n){let r;if(Na(e)){let t=_i(e);return oa(t)||Ha(t)}if(Aa(e))r=()=>_i(e.useValue);else if(Ma(e))r=()=>e.useFactory(...ia(e.deps||[]));else if(ja(e))r=(t,n)=>ta(_i(e.useExisting),n!==void 0&&n&8?8:void 0);else{let t=_i(e&&(e.useClass||e.provide));if(Ja(e))r=()=>new t(...ia(e.deps));else return oa(t)||Ha(t)}return r}function Ka(e){if(e.destroyed)throw new di(-205,!1)}function qa(e,t,n=!1){return{factory:e,value:t,multi:n?[]:void 0}}function Ja(e){return!!e.deps}function Ya(e){return typeof e==`object`&&!!e&&typeof e.ngOnDestroy==`function`}function Xa(e){return typeof e==`function`||typeof e==`object`&&e.ngMetadataName===`InjectionToken`}function Za(e,t){for(let n of e)Array.isArray(n)?Za(n,t):n&&Di(n)?Za(n.ɵproviders,t):t(n)}function Qa(e,t){let n;e instanceof Va?(Ka(e),n=e):n=new $i(e);let r=Rn(n),i=Ji(void 0);try{return t()}finally{Rn(r),Ji(i)}}function $a(){return qi()!==void 0||Ln()!=null}var eo=1;function to(e){return Array.isArray(e)&&typeof e[eo]==`object`}function no(e){return Array.isArray(e)&&e[eo]===!0}function ro(e){return!!(e.flags&4)}function io(e){return e.componentOffset>-1}function ao(e){return(e.flags&1)==1}function oo(e){return!!e.template}function so(e){return!!(e[2]&512)}function co(e){return(e[2]&256)==256}var lo=(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})(lo||{}),uo=`math`;function fo(e){for(;Array.isArray(e);)e=e[0];return e}function po(e,t){return fo(t[e])}function mo(e,t){return fo(t[e.index])}function ho(e,t){return e.data[t]}function go(e,t){return e[t]}function _o(e,t,n,r){n>=e.data.length&&(e.data[n]=null,e.blueprint[n]=null),t[n]=r}function vo(e,t){let n=t[e];return to(n)?n:n[0]}function yo(e){return(e[2]&128)==128}function Gee(e){return no(e[3])}function bo(e,t){return t==null?null:e[t]}function xo(e){e[17]=0}function So(e){e[2]&1024||(e[2]|=1024,yo(e)&&To(e))}function Kee(e,t){for(;e>0;)t=t[14],e--;return t}function Co(e){return!!(e[2]&9216||e[24]?.dirty)}function wo(e){e[10].changeDetectionScheduler?.notify(8),e[2]&64&&(e[2]|=1024),Co(e)&&To(e)}function To(e){e[10].changeDetectionScheduler?.notify(0);let t=Do(e);for(;t!==null&&!(t[2]&8192||(t[2]|=8192,!yo(t)));)t=Do(t)}function Eo(e,t){if(co(e))throw new di(911,!1);e[21]===null&&(e[21]=[]),e[21].push(t)}function qee(e,t){if(e[21]===null)return;let n=e[21].indexOf(t);n!==-1&&e[21].splice(n,1)}function Do(e){let t=e[3];return no(t)?t[3]:t}function Oo(e){return e[7]??=[]}function ko(e){return e.cleanup??=[]}function Jee(e,t,n,r){let i=Oo(t);i.push(n),e.firstCreatePass&&ko(e).push(r,i.length-1)}var Ao={lFrame:ns(null),bindingsEnabled:!0,skipHydrationRootTNode:null},jo=!1;function Yee(){return Ao.lFrame.elementDepthCount}function Xee(){Ao.lFrame.elementDepthCount++}function Mo(){Ao.lFrame.elementDepthCount--}function No(){return Ao.bindingsEnabled}function Po(){return Ao.skipHydrationRootTNode!==null}function Fo(e){return Ao.skipHydrationRootTNode===e}function Io(){Ao.skipHydrationRootTNode=null}function Lo(){return Ao.lFrame.lView}function Ro(){return Ao.lFrame.tView}function S(e){return Ao.lFrame.contextLView=e,e[8]}function C(e){return Ao.lFrame.contextLView=null,e}function zo(){let e=Bo();for(;e!==null&&e.type===64;)e=e.parent;return e}function Bo(){return Ao.lFrame.currentTNode}function Zee(){let e=Ao.lFrame,t=e.currentTNode;return e.isParent?t:t.parent}function Vo(e,t){let n=Ao.lFrame;n.currentTNode=e,n.isParent=t}function Ho(){return Ao.lFrame.isParent}function Uo(){Ao.lFrame.isParent=!1}function Wo(){return Ao.lFrame.contextLView}function Go(){return jo}function Ko(e){let t=jo;return jo=e,t}function qo(){let e=Ao.lFrame,t=e.bindingRootIndex;return t===-1&&(t=e.bindingRootIndex=e.tView.bindingStartIndex),t}function Jo(){return Ao.lFrame.bindingIndex}function Qee(e){return Ao.lFrame.bindingIndex=e}function Yo(){return Ao.lFrame.bindingIndex++}function Xo(e){let t=Ao.lFrame,n=t.bindingIndex;return t.bindingIndex+=e,n}function $ee(){return Ao.lFrame.inI18n}function ete(e,t){let n=Ao.lFrame;n.bindingIndex=n.bindingRootIndex=e,Zo(t)}function tte(){return Ao.lFrame.currentDirectiveIndex}function Zo(e){Ao.lFrame.currentDirectiveIndex=e}function nte(e){let t=Ao.lFrame.currentDirectiveIndex;return t===-1?null:e[t]}function rte(){return Ao.lFrame.currentQueryIndex}function Qo(e){Ao.lFrame.currentQueryIndex=e}function ite(e){let t=e[1];return t.type===2?t.declTNode:t.type===1?e[5]:null}function $o(e,t,n){if(n&4){let r=t,i=e;for(;r=r.parent,r===null&&!(n&1)&&(r=ite(i),!(r===null||(i=i[14],r.type&10))););if(r===null)return!1;t=r,e=i}let r=Ao.lFrame=ts();return r.currentTNode=t,r.lView=e,!0}function es(e){let t=ts(),n=e[1];Ao.lFrame=t,t.currentTNode=n.firstChild,t.lView=e,t.tView=n,t.contextLView=e,t.bindingIndex=n.bindingStartIndex,t.inI18n=!1}function ts(){let e=Ao.lFrame,t=e===null?null:e.child;return t===null?ns(e):t}function ns(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 rs(){let e=Ao.lFrame;return Ao.lFrame=e.parent,e.currentTNode=null,e.lView=null,e}var is=rs;function as(){let e=rs();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 ate(e){return(Ao.lFrame.contextLView=Kee(e,Ao.lFrame.contextLView))[8]}function os(){return Ao.lFrame.selectedIndex}function ss(e){Ao.lFrame.selectedIndex=e}function cs(){let e=Ao.lFrame;return ho(e.tView,e.selectedIndex)}function w(){Ao.lFrame.currentNamespace=`svg`}function ls(){us()}function us(){Ao.lFrame.currentNamespace=null}function ds(){return Ao.lFrame.currentNamespace}var fs=!0;function ps(){return fs}function ms(e){fs=e}function hs(e,t=null,n=null,r){let i=gs(e,t,n,r);return i.resolveInjectorInitializers(),i}function gs(e,t=null,n=null,r,i=new Set){return new Va([n||ya,wa(e)],t||za(),null,i)}var _s=class e{static THROW_IF_NOT_FOUND=Zi;static NULL=new Ca;static create(e,t){if(Array.isArray(e))return hs({name:``},t,e,``);{let t=e.name??``;return hs({name:t},e.parent,e.providers,t)}}static ɵprov=yi({token:e,providedIn:`any`,factory:()=>ta(xa)});static __NG_ELEMENT_ID__=-1},vs=new Ei(``),ys=class{static __NG_ELEMENT_ID__=xs;static __NG_ENV_ID__=e=>e},bs=class extends ys{_lView;constructor(e){super(),this._lView=e}get destroyed(){return co(this._lView)}onDestroy(e){let t=this._lView;return Eo(t,e),()=>qee(t,e)}};function xs(){return new bs(Lo())}var Ss=new Ei(``),Cs=(()=>{class e{taskId=0;pendingTasks=new Set;destroyed=!1;pendingTask=new Wr(!1);debugTaskTracker=x(Ss,{optional:!0});get hasPendingTasks(){return!this.destroyed&&this.pendingTask.value}get hasPendingTasksObservable(){return this.destroyed?new Nr(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=yi({token:e,providedIn:`root`,factory:()=>new e})}return e})(),ws=class extends Hr{__isAsync;destroyRef=void 0;pendingTasks=void 0;constructor(e=!1){super(),this.__isAsync=e,$a()&&(this.destroyRef=x(ys,{optional:!0})??void 0,this.pendingTasks=x(Cs,{optional:!0})??void 0)}emit(e){let t=tn(null);try{super.next(e)}finally{tn(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 or&&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 Ts(...e){}function Es(e){let t,n;function r(){e=Ts;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 Ds(e){return queueMicrotask(()=>e()),()=>{e=Ts}}var Os=`isAngularZone`,ks=`isAngularZone_ID`,As=0,js=class e{hasPendingMacrotasks=!1;hasPendingMicrotasks=!1;isStable=!0;onUnstable=new ws(!1);onMicrotaskEmpty=new ws(!1);onStable=new ws(!1);onError=new ws(!1);constructor(e){let{enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:n=!1,shouldCoalesceRunChangeDetection:r=!1,scheduleInRootZone:i=!1}=e;if(typeof Zone>`u`)throw new di(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,Fs(a)}static isInAngularZone(){return typeof Zone<`u`&&Zone.current.get(Os)===!0}static assertInAngularZone(){if(!e.isInAngularZone())throw new di(909,!1)}static assertNotInAngularZone(){if(e.isInAngularZone())throw new di(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,Ms,Ts,Ts);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)}},Ms={};function Ns(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 Ps(e){if(e.isCheckStableRunning||e.callbackScheduled)return;e.callbackScheduled=!0;function t(){Es(()=>{e.callbackScheduled=!1,Is(e),e.isCheckStableRunning=!0,Ns(e),e.isCheckStableRunning=!1})}e.scheduleInRootZone?Zone.root.run(()=>{t()}):e._outer.run(()=>{t()}),Is(e)}function Fs(e){let t=()=>{Ps(e)},n=As++;e._inner=e._inner.fork({name:`angular`,properties:{[Os]:!0,[ks]:n,[ks+n]:!0},onInvokeTask:(n,r,i,a,o,s)=>{if(Bs(s))return n.invokeTask(i,a,o,s);try{return Ls(e),n.invokeTask(i,a,o,s)}finally{(e.shouldCoalesceEventChangeDetection&&a.type===`eventTask`||e.shouldCoalesceRunChangeDetection)&&t(),Rs(e)}},onInvoke:(n,r,i,a,o,s,c)=>{try{return Ls(e),n.invoke(i,a,o,s,c)}finally{e.shouldCoalesceRunChangeDetection&&!e.callbackScheduled&&!Vs(s)&&t(),Rs(e)}},onHasTask:(t,n,r,i)=>{t.hasTask(r,i),n===r&&(i.change==`microTask`?(e._hasPendingMicrotasks=i.microTask,Is(e),Ns(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 Is(e){e.hasPendingMicrotasks=!!(e._hasPendingMicrotasks||(e.shouldCoalesceEventChangeDetection||e.shouldCoalesceRunChangeDetection)&&e.callbackScheduled===!0)}function Ls(e){e._nesting++,e.isStable&&(e.isStable=!1,e.onUnstable.emit(null))}function Rs(e){e._nesting--,Ns(e)}var zs=class{hasPendingMicrotasks=!1;hasPendingMacrotasks=!1;isStable=!0;onUnstable=new ws;onMicrotaskEmpty=new ws;onStable=new ws;onError=new ws;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 Bs(e){return Hs(e,`__ignore_ng_zone__`)}function Vs(e){return Hs(e,`__scheduler_tick__`)}function Hs(e,t){return!Array.isArray(e)||e.length!==1?!1:e[0]?.data?.[t]===!0}var Us=class{_console=console;handleError(e){this._console.error(`ERROR`,e)}},Ws=new Ei(``,{factory:()=>{let e=x(js),t=x(Ba),n;return r=>{e.runOutsideAngular(()=>{t.destroyed&&!n?setTimeout(()=>{throw r}):(n??=t.get(Us),n.handleError(r))})}}}),Gs={provide:ba,useValue:()=>{x(Us,{optional:!0})},multi:!0};function T(e,t){let[n,r,i]=_ee(e,t?.equal),a=n;return a[en],a.set=r,a.update=i,a.asReadonly=Ks.bind(a),a}function Ks(){let e=this[en];if(e.readonlyFn===void 0){let t=()=>this();t[en]=e,e.readonlyFn=t}return e.readonlyFn}var qs=new Ei(``,{factory:()=>Js}),Js=`ng`,Ys=new Ei(``),Xs=new Ei(``,{providedIn:`platform`,factory:()=>`unknown`}),Zs=new Ei(``,{factory:()=>x(vs).body?.querySelector(`[ngCspNonce]`)?.getAttribute(`ngCspNonce`)||null}),Qs=(()=>{class e{view;node;constructor(e,t){this.view=e,this.node=t}static __NG_ELEMENT_ID__=$s}return e})();function $s(){return new Qs(Lo(),zo())}var ec=class{},tc=new Ei(``,{factory:()=>!0}),nc=new Ei(``),rc=(()=>{class e{static ɵprov=yi({token:e,providedIn:`root`,factory:()=>new ic})}return e})(),ic=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}},ac=class{[en];constructor(e){this[en]=e}destroy(){this[en].destroy()}};function E(e,t){let n=t?.injector??x(_s),r=t?.manualCleanup===!0?null:n.get(ys),i,a=n.get(Qs,null,{optional:!0}),o=n.get(ec);return a===null?i=uc(e,n.get(rc),o):(i=lc(a.view,o,e),r instanceof bs&&r._lView===a.view&&(r=null)),i.injector=n,r!==null&&(i.onDestroyFns=[r.onDestroy(()=>i.destroy())]),new ac(i)}var oc={...Pn,cleanupFns:void 0,zone:null,onDestroyFns:null,run(){let e=Ko(!1);try{Fn(this)}finally{Ko(e)}},cleanup(){if(!this.cleanupFns?.length)return;let e=tn(null);try{for(;this.cleanupFns.length;)this.cleanupFns.pop()()}finally{this.cleanupFns=[],tn(e)}}},sc={...oc,consumerMarkedDirty(){this.scheduler.schedule(this),this.notifier.notify(12)},destroy(){if(_n(this),this.onDestroyFns!==null)for(let e of this.onDestroyFns)e();this.cleanup(),this.scheduler.remove(this)}},cc={...oc,consumerMarkedDirty(){this.view[2]|=8192,To(this.view),this.notifier.notify(13)},destroy(){if(_n(this),this.onDestroyFns!==null)for(let e of this.onDestroyFns)e();this.cleanup(),this.view[23]?.delete(this)}};function lc(e,t,n){let r=Object.create(cc);return r.view=e,r.zone=typeof Zone<`u`?Zone.current:null,r.notifier=t,r.fn=dc(r,n),e[23]??=new Set,e[23].add(r),r.consumerMarkedDirty(r),r}function uc(e,t,n){let r=Object.create(sc);return r.fn=dc(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 dc(e,t){return()=>{t(t=>(e.cleanupFns??=[]).push(t))}}function fc(e){return typeof e==`function`&&e[en]!==void 0}function pc(e){return fc(e)&&typeof e.set==`function`}var mc=Symbol(`InputSignalNode#UNSET`),hc={...Mn,transformFn:void 0,applyValueToInputSignal(e,t){An(e,t)}};function gc(e){return{toString:e}.toString()}var _c=(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})(_c||{}),vc=class{previousValue;currentValue;firstChange;constructor(e,t,n){this.previousValue=e,this.currentValue=t,this.firstChange=n}isFirstChange(){return this.firstChange}};function yc(e,t,n,r){t===null?e[n]=r:t.applyValueToInputSignal(t,r)}var bc=null,xc=(()=>{bc=Cc;let e=()=>Cc;return e.ngInherit=!0,e})();function Sc(){return bc}function Cc(e){return e.type.prototype.ngOnChanges&&(e.setInput=Tc),wc}function wc(){let e=Dc(this),t=e?.current;if(t){let n=e.previous;if(n===va)e.previous=t;else for(let e in t)n[e]=t[e];e.current=null,this.ngOnChanges(t)}}function Tc(e,t,n,r,i){let a=this.declaredInputs[r],o=Dc(e)||Oc(e,{previous:va,current:null}),s=o.current||={},c=o.previous,l=c[a];s[a]=new vc(l&&l.currentValue,n,c===va),yc(e,t,i,n)}var Ec=`__ngSimpleChanges__`;function Dc(e){return Object.hasOwn(e,Ec)&&e[Ec]||null}function Oc(e,t){return e[Ec]=t}var kc=[],Ac=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,Lc(o,a)):Lc(o,a)}var zc=-1,Bc=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 Vc(e){return!!(e.flags&8)}function Hc(e){return!!(e.flags&16)}function Uc(e,t,n){let r=0;for(;rt){o=a-1;break}}}for(;a>16}function Zc(e,t){let n=Xc(e),r=t;for(;n>0;)r=r[14],n--;return r}var Qc=!0;function $c(e){let t=Qc;return Qc=e,t}var el=255,tl=5,nl=0,rl={};function il(e,t,n){let r;typeof n==`string`?r=n.charCodeAt(0)||0:Object.hasOwn(n,Mi)&&(r=n[Mi]),r??=n[Mi]=nl++;let i=r&el,a=1<>tl)]|=a}function al(e,t){let n=sl(e,t);if(n!==-1)return n;let r=t[1];r.firstCreatePass&&(e.injectorIndex=t.length,ol(r.data,e),ol(t,null),ol(r.blueprint,null));let i=cl(e,t),a=e.injectorIndex;if(Jc(i)){let e=Yc(i),n=Zc(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 ol(e,t){e.push(0,0,0,0,0,0,0,0,t)}function sl(e,t){return e.injectorIndex===-1||e.parent&&e.parent.injectorIndex===e.injectorIndex||t[e.injectorIndex+8]===null?-1:e.injectorIndex}function cl(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=Tl(i),r===null)return zc;if(n++,i=i[14],r.injectorIndex!==-1)return r.injectorIndex|n<<16}return zc}function ll(e,t,n){il(e,t,n)}function ul(e,t,n){if(n&8||e!==void 0)return e;Ui(t,`NodeInjector`)}function dl(e,t,n,r){if(n&8&&r===void 0&&(r=null),!(n&3)){let i=e[9],a=Ji(void 0);try{return i?i.get(t,r,n&8):Yi(t,r,n&8)}finally{Ji(a)}}return ul(r,t,n)}function fl(e,t,n,r=0,i){if(e!==null){if(t[2]&2048&&!(r&2)){let i=wl(e,t,n,r,rl);if(i!==rl)return i}let i=pl(e,t,n,r,rl);if(i!==rl)return i}return dl(t,n,r,i)}function pl(e,t,n,r,i){let a=_l(n);if(typeof a==`function`){if(!$o(t,e,r))return r&1?ul(i,n,r):dl(t,n,r,i);try{let e;if(e=a(r),e==null&&!(r&8))Ui(n);else return e}finally{is()}}else if(typeof a==`number`){let i=null,o=sl(e,t),s=zc,c=r&1?t[15][5]:null;for((o===-1||r&4)&&(s=o===-1?cl(e,t):t[o+8],s===zc||!yl(r,!1)?o=-1:(i=t[1],o=Yc(s),t=Zc(s,t)));o!==-1;){let e=t[1];if(vl(a,o,e.data)){let e=ml(o,t,n,i,r,c);if(e!==rl)return e}s=t[o+8],s!==zc&&yl(r,t[1].data[o+8]===c)&&vl(a,o,t)?(i=e,o=Yc(s),t=Zc(s,t)):o=-1}}return i}function ml(e,t,n,r,i,a){let o=t[1],s=o.data[e+8],c=hl(s,o,n,r==null?io(s)&&Qc:r!=o&&!!(s.type&3),i&1&&a===s);return c===null?rl:gl(t,o,c,s,i)}function hl(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&&oo(e)&&e.type===n)return c}return null}function gl(e,t,n,r,i){let a=e[n],o=t.data;if(a instanceof Bc){let s=a;if(s.resolving)throw Hi(``);let c=$c(s.canSeeViewProviders);s.resolving=!0,o[n].type||o[n];let l=s.injectImpl?Ji(s.injectImpl):null;$o(e,r,0);try{a=e[n]=s.factory(void 0,i,o,e,r),t.firstCreatePass&&n>=r.directiveStart&&jc(n,o[n],t)}finally{l!==null&&Ji(l),$c(c),s.resolving=!1,is()}}return a}function _l(e){if(typeof e==`string`)return e.charCodeAt(0)||0;let t=Object.hasOwn(e,Mi)?e[Mi]:void 0;return typeof t==`number`?t>=0?t&el:xl:t}function vl(e,t,n){let r=1<>tl)]&r)}function yl(e,t){return!(e&2)&&!(e&1&&t)}var bl=class{_tNode;_lView;constructor(e,t){this._tNode=e,this._lView=t}get(e,t,n){return fl(this._tNode,this._lView,e,na(n),t)}};function xl(){return new bl(zo(),Lo())}function Sl(e){return gc(()=>{let t=e.prototype.constructor,n=t[ji]||Cl(t),r=Object.prototype,i=Object.getPrototypeOf(e.prototype).constructor;for(;i&&i!==r;){let e=i[ji]||Cl(i);if(e&&e!==n)return e;i=Object.getPrototypeOf(i)}return e=>new e})}function Cl(e){return vi(e)?()=>{let t=Cl(_i(e));return t&&t()}:oa(e)}function wl(e,t,n,r,i){let a=e,o=t;for(;a!==null&&o!==null&&o[2]&2048&&!so(o);){let e=pl(a,o,n,r|2,rl);if(e!==rl)return e;r&=-5;let t=a.parent;if(!t){let e=o[20];if(e){let t=e.get(n,rl,r);if(t!==rl)return t}t=Tl(o),o=o[14]}a=t}return i}function Tl(e){let t=e[1],n=t.type;return n===2?t.declTNode:n===1?e[5]:null}function El(e){return{token:e.token,providedIn:e.autoProvided===!1?null:`root`,factory:e.factory,value:void 0}}function Dl(){return Ol(zo(),Lo())}function Ol(e,t){return new kl(mo(e,t))}var kl=(()=>{class e{nativeElement;constructor(e){this.nativeElement=e}static __NG_ELEMENT_ID__=Dl}return e})();function Al(e){return e instanceof kl?e.nativeElement:e}function jl(){return this._results[Symbol.iterator]()}var Ml=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 Hr}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=ca(e);(this._changesDetected=!sa(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]=jl};function Nl(e){return(e.flags&128)==128}var Pl=(function(e){return e[e.OnPush=0]=`OnPush`,e[e.Eager=1]=`Eager`,e[e.Default=1]=`Default`,e})(Pl||{}),Fl=new Map,Il=0;function Ll(){return Il++}function Rl(e){Fl.set(e[19],e)}function zl(e){Fl.delete(e[19])}var Bl=`__ngContext__`;function Vl(e,t){to(t)?(e[Bl]=t[19],Rl(t)):e[Bl]=t}function Hl(e){return Wl(e[12])}function Ul(e){return Wl(e[4])}function Wl(e){for(;e!==null&&!no(e);)e=e[4];return e}var Gl=void 0;function Kl(e){Gl=e}function ql(){if(Gl!==void 0)return Gl;if(typeof document<`u`)return document;throw new di(210,!1)}var Jl=!1,Yl=new Ei(``,{factory:()=>Jl}),Xl=new WeakMap;function Zl(e,t){if(typeof e!=`object`||!e)return;let n=Xl.get(e);n||(n=new WeakSet,Xl.set(e,n)),n.add(t)}function Ql(e){return(e.flags&32)==32}var $l=()=>null;function eu(e,t,n=!1){return $l(e,t,n)}function tu(e,t){let n=e.contentQueries;if(n!==null){let r=tn(null);try{for(let r=0;r|^->||--!>|)/g,pu=`​$1​`;function ote(e){return e.replace(du,e=>e.replace(fu,pu))}function ste(e,t){return e.createText(t)}function cte(e,t,n){e.setValue(t,n)}function lte(e,t){return e.createComment(ote(t))}function mu(e,t,n){return e.createElement(t,n)}function hu(e,t,n,r,i){e.insertBefore(t,n,r,i)}function gu(e,t,n){e.appendChild(t,n)}function _u(e,t,n,r,i){r===null?gu(e,t,n):hu(e,t,n,r,i)}function vu(e,t,n,r){e.removeChild(null,t,n,r)}function ute(e,t,n){e.setAttribute(t,`style`,n)}function dte(e,t,n){n===``?e.removeAttribute(t,`class`):e.setAttribute(t,`class`,n)}function yu(e,t,n){let{mergedAttrs:r,classes:i,styles:a}=n;r!==null&&Uc(e,t,r),i!==null&&dte(e,t,i),a!==null&&ute(e,t,a)}function bu(e){let t=fte();return t?t.sanitize(lo.URL,e)||``:su(e,`URL`)?ou(e):uu(Ri(e))}function fte(){let e=Lo();return e&&e[10].sanitizer}function xu(e){return e.ownerDocument.defaultView}function Su(e){return e.ownerDocument}function pte(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 Cu=`ng-template`;function mte(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(Tu(r))return!1;o=!0}}}}}return Tu(r)||o}function Tu(e){return!(e&1)}function _te(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!==``&&!Tu(o)&&(t+=Du(a,i),i=``),r=o,a||=!Tu(r);n++}return i!==``&&(t+=Du(a,i)),t}function Cte(e){return e.map(Ste).join(`,`)}function wte(e){let t=[],n=[],r=1,i=2;for(;r!1});function ju(e){if(!e)return 0;let t=e.toLowerCase().indexOf(`ms`)>-1?1:1e3;return parseFloat(e)*t}function Mu(e,t){return e.getPropertyValue(t).split(`,`).map(e=>e.trim())}function Dte(e){let t=Mu(e,`transition-property`),n=Mu(e,`transition-duration`),r=Mu(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 Ote(e){let t=Mu(e,`animation-name`),n=Mu(e,`animation-delay`),r=Mu(e,`animation-duration`),i=Mu(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 Nu(e,t){return e!==void 0&&e.duration>t.duration}function Pu(e){return(e.animationName!=null||e.propertyName!=null)&&e.duration>0}function Fu(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 kte(e,t){let n=getComputedStyle(e),r=Ote(n),i=Dte(n),a=r.duration>i.duration?r:i;Nu(t.get(e),a)||Pu(a)&&t.set(e,a)}function Ate(e,t,n){if(!n)return;let r=e.getAnimations();return r.length===0?kte(e,t):jte(e,t,r)}function jte(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=Fu(e)??0,n,i;e.animationName?i=e.animationName:n=e.transitionProperty,t>=r.duration&&(r={animationName:i,propertyName:n,duration:t})}Nu(t.get(e),r)||Pu(r)&&t.set(e,r)}var Iu=new Set,Mte=!1,Nte=1,Lu=typeof document<`u`&&typeof document?.documentElement?.getAnimations==`function`;function Pte(e){return e[9].get(Ete,Mte)}function Fte(e,t,n){let r=zu.get(e);if(r){for(let e of t)r.classList.push(e);for(let e of n)r.cleanupFns.push(e)}else zu.set(e,{classList:t,cleanupFns:n})}function Ru(e){let t=zu.get(e);if(t){for(let e of t.cleanupFns)e();zu.delete(e)}Bu.delete(e)}var zu=new WeakMap,Bu=new WeakMap,Vu=new WeakMap;function Hu(e){return e?e[14]??e:null}var Uu=new WeakSet;function Ite(e,t,n){let r=Vu.get(e);if(!r||r.length===0)return;let i=t.parentNode,a=t.previousSibling,o=Hu(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),Uu.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 Lte(e,t,n){let r=Hu(n),i=Vu.get(e);i?i.some(e=>e.el===t)||i.push({el:t,declarationView:r}):Vu.set(e,[{el:t,declarationView:r}])}function Wu(e){let t=e[26]??={};return t.enter??=new Map}function Rte(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 Gu(e){return e.composedPath?e.composedPath()[0]:e.target}function Ku(e,t){let n=Bu.get(t);if(n===void 0)return!0;if(t!==Gu(e))return!1;let r=e.animation;if(r){let e=Fu(r);if(e!==void 0&&e+Nte{class e{impl=null;execute(){this.impl?.execute()}static ɵprov=yi({token:e,providedIn:`root`,factory:()=>new e})}return e})(),Qu=[0,1,2,3],$u=(()=>{class e{ngZone=x(js);scheduler=x(ec);errorHandler=x(Us,{optional:!0});sequences=new Set;deferredRegistrations=new Set;executing=!1;constructor(){x(Ju,{optional:!0})}execute(){let e=this.sequences.size>0;e&&Ac(_c.AfterRenderHooksStart),this.executing=!0;for(let e of Qu)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&&Ac(_c.AfterRenderHooksEnd)}register(e){let{view:t}=e;t===void 0?this.executing?this.deferredRegistrations.add(e):this.addSequence(e):((t[25]??=[]).push(e),To(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(qu.AFTER_NEXT_RENDER,e):e()}static ɵprov=yi({token:e,providedIn:`root`,factory:()=>new e})}return e})(),ed=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 td(e,t){let n=t?.injector??x(_s);return Xu(`NgAfterNextRender`),Vte(e,n,t,!0)}function Bte(e){return e instanceof Function?[void 0,void 0,e,void 0]:[e.earlyRead,e.write,e.mixedReadWrite,e.read]}function Vte(e,t,n,r){let i=t.get(Zu);i.impl??=t.get($u);let a=t.get(Ju,null,{optional:!0}),o=n?.manualCleanup===!0?null:t.get(ys),s=t.get(Qs,null,{optional:!0}),c=new ed(i.impl,Bte(e),s?.view,r,o,a?.snapshot(null));return i.impl.register(c),c}var nd=new Ei(``,{factory:()=>{let e=x(Ba),t=new Set;return e.onDestroy(()=>t.clear()),{queue:t,isScheduled:!1,scheduler:null,injector:e}}});function rd(e,t,n){let r=e.get(nd);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 Hte(e,t){let n=e.get(nd);if(Array.isArray(t))for(let e of t)n.queue.delete(e);else n.queue.delete(t)}function Ute(e,t){let n=e.get(nd);if(t.detachedLeaveAnimationFns){for(let e of t.detachedLeaveAnimationFns)n.queue.delete(e);t.detachedLeaveAnimationFns=void 0}}function Wte(e){let t=e.get(nd);t.isScheduled||=(td(()=>{t.isScheduled=!1;for(let e of t.queue)e();t.queue.clear()},{injector:t.injector}),!0)}function Gte(e){let t=e.get(nd);t.scheduler=Wte,t.scheduler(e)}function id(e,t){for(let[n,r]of t)rd(e,r.animateFns)}function ad(e,t,n,r){let i=e?.[26]?.enter;t!==null&&i&&i.has(n.index)&&id(r,i)}function od(e,t,n,r){try{n.get(xa)}catch{return r(!1)}let i=e?.[26];i?.enter?.has(t.index)&&Hte(n,i.enter.get(t.index).animateFns);let a=Kte(e,t,i);if(a.size===0){let n=!1;if(e){let r=[];sd(e,t,r),n=r.length>0}if(!n)return r(!1)}e&&Iu.add(e[19]),rd(n,()=>qte(e,t,i||void 0,a,r),i||void 0)}function Kte(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 qte(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&&sd(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),Yte(e,t.running,i)}else Promise.allSettled(a).then(()=>{e&&Iu.delete(e[19]),i(!0)})}else e&&Iu.delete(e[19]),i(!1)}function sd(e,t,n){if(t.type&12){let r=e[t.index];if(no(r))for(let e=10;e{e[26]?.running===t&&(e[26].running=void 0,Iu.delete(e[19])),n(!0)})}function cd(e,t,n,r,i,a,o,s){if(i!=null){let c,l=!1;no(i)?c=i:to(i)&&(l=!0,i=i[0]);let u=fo(i);e===0&&r!==null?(ad(s,r,a,n),o==null?gu(t,r,u):hu(t,r,u,o||null,!0)):e===1&&r!==null?(ad(s,r,a,n),hu(t,r,u,o||null,!0),Ite(a,u,s)):e===2?(s?.[26]?.leave?.has(a.index)&&Lte(a,u,s),Uu.delete(u),od(s,a,n,e=>{if(Uu.has(u)){Uu.delete(u);return}vu(t,u,l,e)})):e===3&&(Uu.delete(u),od(s,a,n,()=>{t.destroyNode(u)})),c!=null&&wd(t,e,n,c,a,r,o)}}function Xte(e,t){ld(e,t),t[0]=null,t[5]=null}function Zte(e,t,n,r,i,a){r[0]=i,r[5]=t,bd(e,r,n,1,i,a)}function ld(e,t){t[10].changeDetectionScheduler?.notify(9),bd(e,t,t[11],2,null,null)}function Qte(e){let t=e[12];if(!t)return fd(e[1],e);for(;t;){let n=null;if(to(t))n=t[12];else{let e=t[10];e&&(n=e)}if(!n){for(;t&&!t[4]&&t!==e;)to(t)&&fd(t[1],t),t=t[3];t===null&&(t=e),to(t)&&fd(t[1],t),n=t&&t[4]}t=n}}function ud(e,t){let n=e[9],r=n.indexOf(t);n.splice(r,1)}function dd(e,t){if(co(t))return;let n=t[11];n.destroyNode&&bd(e,t,n,3,null,null),Qte(t)}function fd(e,t){if(co(t))return;let n=tn(null);try{t[2]&=-129,t[2]|=256,t[24]&&_n(t[24]),ene(e,t),$te(e,t),t[1].type===1&&t[11].destroy();let n=t[16];if(n!==null&&no(t[3])){n!==t[3]&&ud(n,t);let r=t[18];r!==null&&r.detachView(e)}zl(t)}finally{tn(n)}}function $te(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&&Pd(e,t,27,!1),Ac(o?_c.TemplateUpdateStart:_c.TemplateCreateStart,i,n),n(r,i)}finally{ss(a),Ac(o?_c.TemplateUpdateEnd:_c.TemplateCreateEnd,i,n)}}function Rd(e,t,n){Gd(e,t,n),(n.flags&64)==64&&Kd(e,t,n)}function zd(e,t,n=mo){let r=t.localNames;if(r!==null){let i=t.index+1;for(let a=0;a=s&&i<=c){let o=t.data[i],s=r[e+1];Id(o,n[i],s,a),l=!0}else if(i>c)break}}return o!==null&&Object.hasOwn(r.inputs,i)&&(Id(r,n[o],i,a),l=!0),l}function rf(e,t){let n=vo(t,e),r=n[1];af(r,n);let i=n[0];i!==null&&n[6]===null&&(n[6]=eu(i,n[9])),Ac(_c.ComponentStart);try{of(r,n,n[8])}finally{Ac(_c.ComponentEnd,n[8])}}function af(e,t){for(let n=t.length;n{To(e.lView)},consumerOnSignalRead(){this.lView[24]=this}};function vf(e){let t=e[24]??Object.create(yf);return t.lView=e,t}var yf={...rn,consumerIsAlwaysLive:!0,kind:`template`,consumerMarkedDirty:e=>{let t=Do(e.lView);for(;t&&!bf(t[1]);)t=Do(t);t&&So(t)},consumerOnSignalRead(){this.lView[24]=this}};function bf(e){return e.type!==2}function xf(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 Sf=100;function Cf(e,t=0){let n=e[10].rendererFactory;n.begin?.();try{wf(e,t)}finally{n.end?.()}}function wf(e,t){let n=Go();try{Ko(!0),Af(e,t);let n=0;for(;Co(e);){if(n===Sf)throw new di(103,!1);n++,Af(e,1)}}finally{Ko(n)}}function Tf(e,t,n,r){if(co(t))return;let i=t[2];es(t);let a=!0,o=null,s=null;bf(e)?(s=mf(t),o=fn(s)):nn()===null?(a=!1,s=vf(t),o=fn(s)):t[24]&&=(_n(t[24]),null);try{xo(t),Qee(e.bindingStartIndex),n!==null&&Ld(e,t,n,2,r);let a=(i&3)==3;if(a){let n=e.preOrderCheckHooks;n!==null&&Nc(t,n,null)}else{let n=e.preOrderHooks;n!==null&&Pc(t,n,0,null),Fc(t,0)}if(Df(t),xf(t),Ef(t,0),e.contentQueries!==null&&tu(e,t),a){let n=e.contentCheckHooks;n!==null&&Nc(t,n)}else{let n=e.contentHooks;n!==null&&Pc(t,n,1),Fc(t,1)}Mf(e,t);let o=e.components;o!==null&&jf(t,o,0);let s=e.viewQuery;if(s!==null&&nu(2,s,r),a){let n=e.viewCheckHooks;n!==null&&Nc(t,n)}else{let n=e.viewHooks;n!==null&&Pc(t,n,2),Fc(t,2)}if(e.firstUpdatePass===!0&&(e.firstUpdatePass=!1),t[22]){for(let e of t[22])e();t[22]=null}ff(t),t[2]&=-73}catch(e){throw To(t),e}finally{s!==null&&(mn(s,o),a&&gf(s)),as()}}function Ef(e,t){for(let n=Hl(e);n!==null;n=Ul(n))for(let e=10;e0&&(e[n-1][4]=r[4]);let a=da(e,10+t);Xte(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 zf(e,t,n,r){let i=10+r,a=n.length;r>0&&(n[i-1][4]=t),r-1&&(Rf(e,n),da(t,n))}this._attachedToViewContainer=!1}dd(this._lView[1],this._lView)}onDestroy(e){Eo(this._lView,e)}markForCheck(){Nf(this._cdRefInjectingView||this._lView,4)}detach(){this._lView[2]&=-129}reattach(){wo(this._lView),this._lView[2]|=128}detectChanges(){this._lView[2]|=1024,Cf(this._lView)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new di(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;let e=so(this._lView),t=this._lView[16];t!==null&&!e&&ud(t,this._lView),ld(this._lView[1],this._lView)}attachToAppRef(e){if(this._attachedToViewContainer)throw new di(902,!1);this._appRef=e;let t=so(this._lView),n=this._lView[16];n!==null&&!t&&Bf(n,this._lView),wo(this._lView)}},Hf=(()=>{class e{_declarationLView;_declarationTContainer;elementRef;static __NG_ELEMENT_ID__=Uf;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 Vf(cf(this._declarationLView,this._declarationTContainer,e,{embeddedViewInjector:t,dehydratedView:n}))}}return e})();function Uf(){return Wf(zo(),Lo())}function Wf(e,t){return e.type&4?new Hf(t,e,Ol(e,t)):null}function Gf(e,t,n,r,i){let a=e.data[t];if(a===null)a=Kf(e,t,n,r,i),$ee()&&(a.flags|=32);else if(a.type&64){a.type=n,a.value=r,a.attrs=i;let e=Zee();a.injectorIndex=e===null?-1:e.injectorIndex}return Vo(a,!0),a}function Kf(e,t,n,r,i){let a=Bo(),o=Ho(),s=o?a:a&&a.parent,c=e.data[t]=Jf(e,s,n,t,r,i);return qf(e,c,a,o),c}function qf(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 Jf(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:ds(),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 Yf(e){let t=e[6]??[],n=e[3][11],r=[];for(let e of t)e.data.di===void 0?Xf(e,n):r.push(e);e[6]=r}function Xf(e,t){let n=0,r=e.firstChild;if(r){let i=e.data.r;for(;nnull,Qf=()=>null;function $f(e,t){return Zf(e,t)}function ep(e,t,n){return Qf(e,t,n)}var tp=class{},np=class{},rp=class{destroyNode=null;static __NG_ELEMENT_ID__=()=>ip()};function ip(){let e=Lo(),t=vo(zo().index,e);return(to(t)?t:e)[11]}var ap=(()=>{class e{static ɵprov=yi({token:e,providedIn:`root`,factory:()=>null})}return e})();function op(e){return e.debugInfo?.className||e.type.name||null}var sp={},cp=class{injector;parentInjector;constructor(e,t){this.injector=e,this.parentInjector=t}get(e,t,n){let r=this.injector.get(e,sp,n);return r!==sp||t===sp?r:this.parentInjector.get(e,t,n)}};function lp(e,t,n){return e[t]=n}function up(e,t){return e[t]}function dp(e,t,n){if(n===Ou)return!1;let r=e[t];return!Object.is(r,n)&&(e[t]=n,!0)}function fp(e,t,n,r){let i=dp(e,t,n);return dp(e,t+1,r)||i}function pp(e,t,n,r,i){let a=fp(e,t,n,r);return dp(e,t+2,i)||a}function mp(e,t,n,r,i,a){let o=fp(e,t,n,r);return fp(e,t+2,i,a)||o}function hp(e,t,n){return function r(i){let a=r.__ngNativeEl__;a!==void 0&&Zl(i,a),Nf(io(e)?vo(e.index,t):t,5);let o=t[8],s=gp(t,o,n,i),c=r.__ngNextListenerFn__;for(;c;)s=gp(t,o,c,i)&&s,c=c.__ngNextListenerFn__;return s}}function gp(e,t,n,r){let i=tn(null);try{return Ac(_c.OutputStart,t,n),n(r)!==!1}catch(t){return ef(e,t),!1}finally{Ac(_c.OutputEnd,t,n),tn(i)}}function _p(e,t,n,r,i,a,o,s){let c=ao(e),l=!1,u=null;if(!r&&c&&(u=yp(t,n,a,e.index)),u!==null){let e=u.__ngLastListenerFn__||u;e.__ngNextListenerFn__=o,u.__ngLastListenerFn__=o,l=!0}else{let o=mo(e,n),c=r?r(o):o;r||(s.__ngNativeEl__=o);let l=i.listen(c,a,s);vp(a)||bp(r?t=>r(fo(t[e.index])):e.index,t,n,a,s,l,!1)}return l}function vp(e){return e.startsWith(`animation`)||e.startsWith(`transition`)}function yp(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 bp(e,t,n,r,i,a,o){let s=t.firstCreatePass?ko(t):null,c=Oo(n),l=c.length;c.push(i,a),s&&s.push(r,e,l,(l+1)*(o?-1:1))}function xp(e,t,n,r,i){let a=null,o=null,s=null,c=!1,l=e.directiveToIndex.get(n.type);if(typeof l==`number`?a=l:[a,o,s]=l,o!==null&&s!==null&&e.hostDirectiveOutputs&&Object.hasOwn(e.hostDirectiveOutputs,r)){let n=e.hostDirectiveOutputs[r];for(let a=0;a=o&&l<=s)c=!0,Sp(e,t,l,n[a+1],r,i);else if(l>s)break}}return Object.hasOwn(n.outputs,r)&&(c=!0,Sp(e,t,a,r,r,i)),c}function Sp(e,t,n,r,i,a){let o=t[n],s=t[1],c=o[s.data[n].outputs[r]].subscribe(a);bp(e.index,s,t,i,a,c,!0)}function Cp(){wp()}function wp(){let e=Lo(),t=Ro(),n=zo();if(t.firstCreatePass&&Ap(t,n),n.controlDirectiveIndex===-1)return;Xu(`NgSignalForms`);let r=e[n.controlDirectiveIndex];t.data[n.controlDirectiveIndex].controlDef.create(r,new Dp(e,t,n))}function Tp(){Ep()}function Ep(){let e=Lo(),t=Ro(),n=cs();if(n.controlDirectiveIndex===-1)return;let r=t.data[n.controlDirectiveIndex].controlDef,i=e[n.controlDirectiveIndex];r.update(i,new Dp(e,t,n))}var Dp=class{lView;tView;tNode;hasPassThrough;constructor(e,t,n){this.lView=e,this.tView=t,this.tNode=n,this.hasPassThrough=!!(n.flags&4096)}get customControl(){return this.tNode.customControlIndex===-1?void 0:this.lView[this.tNode.customControlIndex]}get nativeElement(){return mo(this.tNode,this.lView)}get descriptor(){return`<${this.tNode.value}>`}listenToCustomControlOutput(e,t){let n=this.tView.data[this.tNode.customControlIndex];xp(this.tNode,this.lView,n,e,hp(this.tNode,this.lView,t))}listenToCustomControlModel(e){let t=this.tNode.flags&1024?`valueChange`:`checkedChange`,n=this.tView.data[this.tNode.customControlIndex];xp(this.tNode,this.lView,n,t,hp(this.tNode,this.lView,e))}listenToDom(e,t){_p(this.tNode,this.tView,this.lView,void 0,this.lView[11],e,t,hp(this.tNode,this.lView,t))}setInputOnDirectives(e,t,n){let r=this.tNode.inputs?.[e],i=this.tNode.hostDirectiveInputs?.[e];if(!r&&!i)return!1;let a=!1;if(r)for(let i of r){if(i===this.tNode.controlDirectiveIndex)continue;let r=this.lView[i],o=this.tView.data[i];(!n||n(kp(r,o,e)))&&(Id(o,r,e,t),a=!0)}if(i)for(let r=0;r0;){let e=n.shift();if(typeof e!=`function`){for(let n in e.inputs)t[e.inputs[n]]=!0;let r=Op(e.directive);r!==null&&n.push(...r);continue}for(let r of e()){if(typeof r==`function`)continue;if(r.inputs)for(let e=0;e1){t.flags|=4096;return}jp(e,t)}function jp(e,t){for(let n=t.directiveStart;n{let r=t.hostDirectiveInputs[e],i=t.hostDirectiveOutputs[e+`Change`];if(!r||!i)return!1;for(let e=0;e=i&&a<=o)return t.flags|=n,t.customControlIndex=r,!0}}return!1};if(e(`value`,1024)||e(`checked`,2048))return}}function Mp(e,t){return Np(e,t)&&Pp(e,t+`Change`)}function Np(e,t){return t in e.inputs}function Pp(e,t){return t in e.outputs}var Fp=Symbol(`BINDING`),Ip=new Ei(``);function Lp(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 Zp(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&Fd.SignalBased)!==0};return i&&(a.transform=i),a})}function am(e){return Object.keys(e).map(t=>({propName:e[t],templateName:t}))}function om(e,t,n){let r=t instanceof Ba?t:t?.injector;return r&&e.getStandaloneInjector!==null&&(r=e.getStandaloneInjector(r)||r),r?new cp(n,r):n}function sm(e){let t=e.get(np,null);if(t===null)throw new di(407,!1);return{rendererFactory:t,sanitizer:e.get(ap,null),changeDetectionScheduler:e.get(ec,null),ngReflect:!1,tracingService:e.get(Ju,null,{optional:!0})}}function cm(e,t,n){let r=um(e);return mu(t,r,r===`svg`?`svg`:r===`math`?uo:n)}function lm(e){if((e&&`localName`in e&&typeof e.localName==`string`?e.localName:e?.tagName)?.toLowerCase()===`script`)throw new di(905,!1)}function um(e){return(e.selectors[0][0]||`div`).toLowerCase()}var dm=class{componentDef;ngModule;selector;componentType;ngContentSelectors;isBoundToModule;cachedInputs=null;cachedOutputs=null;get inputs(){return this.cachedInputs??=im(this.componentDef.inputs),this.cachedInputs}get outputs(){return this.cachedOutputs??=am(this.componentDef.outputs),this.cachedOutputs}constructor(e,t){this.componentDef=e,this.ngModule=t,this.componentType=e.type,this.selector=Cte(e.selectors),this.ngContentSelectors=e.ngContentSelectors??[],this.isBoundToModule=!!t}create(e,t,n,r,i,a,o){Ac(_c.DynamicComponentStart);let s=tn(null);try{let s=this.componentDef,c=om(s,r||this.ngModule,e),l=sm(c),u=l.tracingService;return u&&u.componentCreate?u.componentCreate(op(s),()=>this.createComponentRef(l,c,t,n,i,a,o)):this.createComponentRef(l,c,t,n,i,a,o)}finally{tn(s)}}createComponentRef(e,t,n,r,i,a,o){let s=this.componentDef,c=fm(r,s,a,i),l=e.rendererFactory.createRenderer(null,s),u=r?Bd(l,r,s.encapsulation,t):cm(s,l,o??null);lm(u);let d=t.get(Ip,null),f=pm(u,()=>t.get(vs,null)??ql());d&&d.addHost(f);let p=a?.some(hm)||i?.some(e=>typeof e!=`function`&&e.bindings.some(hm)),m=kd(null,c,null,512|jd(s),null,null,e,l,t,null,eu(u,t,!0));d&&nm&&f instanceof ShadowRoot&&Eo(m,()=>{d.removeHost(f)}),m[27]=u,es(m);let ee=null;try{let e=$p(27,m,2,`#host`,()=>c.directiveRegistry,!0,0);yu(l,u,e),Vl(u,m),Rd(c,m,e),ru(c,e,m),em(c,e),n!==void 0&&_m(e,this.ngContentSelectors,n),ee=vo(e.index,m),m[8]=ee[8],of(c,m,null)}catch(e){throw ee!==null&&zl(ee),zl(m),e}finally{Ac(_c.DynamicComponentEnd),as()}return new gm(this.componentType,m,!!p)}};function fm(e,t,n,r){let i=e?[`ng-version`,`22.1.7`]:wte(t.selectors[0]),a=null,o=null,s=0;if(n)for(let e of n)s+=e[Fp].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 hm(e){let t=e[Fp].kind;return t===`input`||t===`twoWay`}var gm=class extends tp{_rootLView;_hasInputBindings;instance;hostView;changeDetectorRef;componentType;location;previousInputValues=null;_tNode;constructor(e,t,n){super(),this._rootLView=t,this._hasInputBindings=n,this._tNode=ho(t[1],27),this.location=Ol(this._tNode,t),this.instance=vo(this._tNode.index,t)[8],this.hostView=this.changeDetectorRef=new Vf(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;tf(n,r[1],r,e,t),this.previousInputValues.set(e,t),Nf(vo(n.index,r),1)}get injector(){return new bl(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(e){this.hostView.onDestroy(e)}};function _m(e,t,n){let r=e.projection=[];for(let e=0;e{class e{static __NG_ELEMENT_ID__=ym}return e})();function ym(){return Cm(zo(),Lo())}var bm=class e extends vm{_lContainer;_hostTNode;_hostLView;constructor(e,t,n){super(),this._lContainer=e,this._hostTNode=t,this._hostLView=n}get element(){return Ol(this._hostTNode,this._hostLView)}get injector(){return new bl(this._hostTNode,this._hostLView)}get parentInjector(){let e=cl(this._hostTNode,this._hostLView);if(Jc(e)){let t=Zc(e,this._hostLView),n=Yc(e),r=t[1].data[n+8];return new bl(r,t)}return new bl(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(e){let t=xm(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=$f(this._lContainer,e.ssrId),o=e.createEmbeddedViewImpl(t||{},i,a);return this.insertImpl(o,r,lf(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 dm(Pi(e)),u=n||this.parentInjector;if(!i&&l.ngModule==null){let e=this.parentInjector.get(Ba,null);e&&(i=e)}let d=Pi(l.componentType??{}),f=$f(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,lf(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(Gee(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 If(o,i,a,r),t.attachToViewContainerRef(),ua(Sm(o),a,t),t}move(e,t){return this.insert(e,t)}indexOf(e){let t=xm(this._lContainer);return t===null?-1:t.indexOf(e)}remove(e){let t=this._adjustIndex(e,-1),n=Rf(this._lContainer,t);n&&(da(Sm(this._lContainer),t),dd(n[1],n))}detach(e){let t=this._adjustIndex(e,-1),n=Rf(this._lContainer,t);return n&&da(Sm(this._lContainer),t)!=null?new Vf(n):null}_adjustIndex(e,t=0){return e??this.length+t}};function xm(e){return e[8]}function Sm(e){return e[8]||=[]}function Cm(e,t){let n,r=t[e.index];return no(r)?n=r:(n=Pf(r,t,null,e),t[e.index]=n,Nd(t,n)),Tm(n,t,e,r),new bm(n,e,t)}function wm(e,t){let n=e[11],r=n.createComment(``),i=mo(t,e);return hu(n,n.parentNode(i),r,n.nextSibling(i),!1),r}var Tm=Om,Em=()=>!1;function Dm(e,t,n){return Em(e,t,n)}function Om(e,t,n,r){if(e[7])return;let i;i=n.type&8?fo(r):wm(t,n),e[7]=i}var km=class e{queryList;matches=null;constructor(e){this.queryList=e}clone(){return new e(this.queryList)}setDirty(){this.queryList.setDirty()}},Am=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 Wm(e,t,n){e.queries===null&&(e.queries=new Mm),e.queries.track(new Nm(t,n))}function Gm(e,t){return e.queries.getByIndex(t)}function Km(e,t){let n=e[1],r=Gm(n,t);return r.crossesNgTemplate?zm(n,e,t,[]):Rm(n,e,r,t)}function qm(e,t,n){let r,i=Cn(()=>{r._dirtyCounter();let n=Zm(r,e);if(t&&n===void 0)throw new di(-951,!1);return n});return r=i[en],r._dirtyCounter=T(0),r._flatValue=void 0,i}function Jm(e){return qm(!0,!1,e)}function Ym(e){return qm(!0,!0,e)}function Xm(e,t){let n=e[en];n._lView=Lo(),n._queryIndex=t,n._queryList=Bm(n._lView,t),n._queryList.onDirty(()=>n._dirtyCounter.update(e=>e+1))}function Zm(e,t){let n=e._lView,r=e._queryIndex;if(n===void 0||r===void 0||n[2]&4)return t?void 0:ya;let i=Bm(n,r),a=Km(n,r);return i.reset(a,Al),t?i.first:i._changesDetected||e._flatValue===void 0?e._flatValue=i.toArray():e._flatValue}function Qm(e){return!!e&&typeof e.then==`function`}function $m(e){return!!e&&typeof e.subscribe==`function`}var eh=class{},th=class extends eh{injector;instance=null;constructor(e){super();let t=new Va([...e.providers,{provide:eh,useValue:this}],e.parent||za(),e.debugName,new Set([`environment`]));this.injector=t,e.runEnvironmentInitializers&&t.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(e){this.injector.onDestroy(e)}};function nh(e,t,n=null){return new th({providers:e,parent:t,debugName:n,runEnvironmentInitializers:!0}).injector}var rh=(()=>{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=Ta(!1,e.type),n=t.length>0?nh([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=yi({token:e,providedIn:`environment`,factory:()=>new e(ta(Ba))})}return e})();function O(e){return gc(()=>{let t=lh(e),n={...t,decls:e.decls,vars:e.vars,template:e.template,consts:e.consts||null,ngContentSelectors:e.ngContentSelectors,onPush:e.changeDetection!==Pl.Eager,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&e.dependencies||null,getStandaloneInjector:t.standalone?e=>e.get(rh).getOrCreateStandaloneInjector(n):null,getExternalStyles:null,signals:e.signals??!1,data:e.data||{},encapsulation:e.encapsulation||iu.Emulated,styles:e.styles||ya,_:null,schemas:e.schemas||null,tView:null,id:``};t.standalone&&Xu(`NgStandalone`),uh(n);let r=e.dependencies;return n.directiveDefs=dh(r,ih),n.pipeDefs=dh(r,Ii),n.id=fh(n),n})}function ih(e){return Pi(e)||Fi(e)}function ah(e,t){if(e==null)return va;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=Fd.None,c=null),n[a]=[r,s,c],t[a]=o}return n}function oh(e){if(e==null)return va;let t={};for(let n in e)Object.hasOwn(e,n)&&(t[e[n]]=n);return t}function sh(e){return gc(()=>{let t=lh(e);return uh(t),t})}function ch(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 lh(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||va,exportAs:e.exportAs||null,standalone:e.standalone??!0,signals:e.signals===!0,selectors:e.selectors||ya,viewQuery:e.viewQuery||null,features:e.features||null,setInput:null,resolveHostDirectives:null,hostDirectives:null,controlDef:null,signalFormsInputPresence:null,inputs:ah(e.inputs,t),outputs:oh(e.outputs),debugInfo:null}}function uh(e){e.features?.forEach(t=>t(e))}function dh(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 fh(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 ph=new Ei(``),mh=(()=>{class e{resolve;reject;initialized=!1;done=!1;donePromise=new Promise((e,t)=>{this.resolve=e,this.reject=t});appInits=x(ph,{optional:!0})??[];injector=x(_s);constructor(){}runInitializers(){if(this.initialized)return;let e=[];for(let t of this.appInits){let n=Qa(this.injector,t);if(Qm(n))e.push(n);else if($m(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=El({token:e,factory:e.ɵfac})}return e})();function hh(e){return t=>{t.controlDef={create:(e,t)=>{e?.ɵngControlCreate(t)},update:(e,t)=>{e?.ɵngControlUpdate?.(t)},passThroughInput:e}}}function gh(e){return Object.getPrototypeOf(e.prototype).constructor}function _h(e){let t=gh(e.type),n=!0,r=[e];for(;t&&t!==Function.prototype&&t!==Object.prototype;){let i,a=Object.hasOwn(t,Oi)?t[Oi]:void 0,o=Object.hasOwn(t,ki)?t[ki]:void 0;if(oo(e))i=a??o;else{if(a)throw new di(903,!1);i=o}if(i){if(n){r.push(i);let t=e;t.inputs=bh(e.inputs),t.declaredInputs=bh(e.declaredInputs),t.outputs=bh(e.outputs);let n=i.hostBindings;n&&Ch(e,n);let a=i.viewQuery,o=i.contentQueries;if(a&&xh(e,a),o&&Sh(e,o),vh(e,i),Uee(e.outputs,i.outputs),oo(i)&&i.data.animation){let t=e.data;t.animation=(t.animation||[]).concat(i.data.animation)}}let t=i.features;if(t)for(let r=0;r=0;r--){let i=e[r];i.hostVars=t+=i.hostVars,i.hostAttrs=Kc(i.hostAttrs,n=Kc(n,i.hostAttrs))}}function bh(e){return e===va?{}:e===ya?[]:e}function xh(e,t){let n=e.viewQuery;e.viewQuery=n?(e,r)=>{t(e,r),n(e,r)}:t}function Sh(e,t){let n=e.contentQueries;e.contentQueries=n?(e,r,i)=>{t(e,r,i),n(e,r,i)}:t}function Ch(e,t){let n=e.hostBindings;e.hostBindings=n?(e,r)=>{t(e,r),n(e,r)}:t}function wh(e,t,n,r,i,a,o,s){if(n.firstCreatePass){e.mergedAttrs=Kc(e.mergedAttrs,e.attrs);let t=e.tView=Ed(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=Oh(n,t,e,r);ps()&&hd(n,t,c,e),Vl(c,t);let l=Pf(c,t,c,e);t[r+27]=l,Nd(t,l),Dm(l,e,t)}function Th(e,t,n,r,i,a,o,s,c,l,u){let d=n+27,f;return t.firstCreatePass?(f=Gf(t,d,4,o||null,s||null),No()&&zp(t,e,f,bo(t.consts,l),Jd),Mc(t,f)):f=t.data[d],wh(f,e,t,n,r,i,a,c),ao(f)&&Rd(t,e,f),l!=null&&zd(e,f,u),f}function Eh(e,t,n,r,i,a,o,s,c,l,u){let d=n+27,f;if(t.firstCreatePass){if(f=Gf(t,d,4,o||null,s||null),l!=null){let e=bo(t.consts,l);f.localNames=[];for(let t=0;t{throw new di(600,``)})}var Nh=10,Ph=(()=>{class e{_runningTick=!1;_destroyed=!1;_destroyListeners=[];_views=[];internalErrorHandler=x(Ws);afterRenderManager=x(Zu);zonelessEnabled=x(tc);rootEffectScheduler=x(rc);dirtyFlags=0;tracingSnapshot=null;allTestViews=new Set;autoDetectTestViews=new Set;includeAllTestViews=!1;afterTick=new Hr;get allViews(){return[...(this.includeAllTestViews?this.allTestViews:this.autoDetectTestViews).keys(),...this._views]}get destroyed(){return this._destroyed}componentTypes=[];components=[];internalPendingTask=x(Cs);get isStable(){return this.internalPendingTask.hasPendingTasksObservable.pipe(li(e=>!e))}constructor(){x(Ju,{optional:!0})}whenStable(){let e;return new Promise(t=>{e=this.isStable.subscribe({next:e=>{e&&t()}})}).finally(()=>{e.unsubscribe()})}_injector=x(Ba);_rendererFactory=null;get injector(){return this._injector}bootstrap(e,t){return this.bootstrapImpl(e,t)}bootstrapImpl(e,t,n=_s.NULL){return this._injector.get(js).run(()=>{if(Ac(_c.BootstrapComponentStart),!this._injector.get(mh).done)throw new di(405,``);let r=Pi(e),i=this._injector.get(eh),a=new dm(r,i);this.componentTypes.push(e);let{hostElement:o,directives:s,bindings:c}=Fh(t),l=o||a.selector,u=a.create(n,[],l,i.injector,s,c),d=u.location.nativeElement,f=u.injector.get(Ah,null);return f?.registerApplication(d),u.onDestroy(()=>{this.detachView(u.hostView),Ih(this.components,u),f?.unregisterApplication(d)}),this._loadComponent(u),Ac(_c.BootstrapComponentEnd,u),u})}tick(){this.zonelessEnabled||(this.dirtyFlags|=1),this._tick()}_tick(){Ac(_c.ChangeDetectionStart),this.tracingSnapshot===null?this.tickImpl():this.tracingSnapshot.run(qu.CHANGE_DETECTION,this.tickImpl)}tickImpl=()=>{if(this._runningTick)throw Ac(_c.ChangeDetectionEnd),new di(101,!1);let e=tn(null);try{this._runningTick=!0,this.synchronize()}finally{this._runningTick=!1,this.tracingSnapshot?.dispose(),this.tracingSnapshot=null,tn(e),this.afterTick.next(),Ac(_c.ChangeDetectionEnd)}};synchronize(){this._rendererFactory===null&&!this._injector.destroyed&&(this._rendererFactory=this._injector.get(np,null,{optional:!0}));let e=0;for(;this.dirtyFlags!==0&&e++Co(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;Ih(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(jh,[]).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),()=>Ih(this._destroyListeners,e)}destroy(){if(this._destroyed)throw new di(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=El({token:e,factory:e.ɵfac})}return e})();function Fh(e){return e===void 0||typeof e==`string`||e instanceof Element?{hostElement:e}:e}function Ih(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}function k(e,t,n,r){let i=Lo();return dp(i,Yo(),t)&&(Ro(),Yd(cs(),i,e,t,n,r)),k}function Lh(e){if(Xu(`NgAnimateEnter`),!Lu)return Lh;let t=Lo();if(Pte(t))return Lh;let n=zo(),r=t[9].get(js);return zte(Wu(t),n,()=>Rh(t,n,e,r)),Gte(t[9]),id(t[9],Wu(t)),Lh}function Rh(e,t,n,r){let i=mo(t,e),a=e[11],o=Rte(n),s=[],c=!1,l=e=>{if(Gu(e)!==i)return;let t=e instanceof AnimationEvent?`animationend`:`transitionend`;r.runOutsideAngular(()=>{a.listen(i,t,u)})},u=e=>{Gu(e)===i&&(Ku(e,i)&&(c=!0),zh(e,i,a))};if(o&&o.length>0){r.runOutsideAngular(()=>{s.push(a.listen(i,`animationstart`,l)),s.push(a.listen(i,`transitionstart`,l))}),Fte(i,o,s);for(let e of o)a.addClass(i,e);r.runOutsideAngular(()=>{requestAnimationFrame(()=>{if(!c&&(Ate(i,Bu,Lu),!Bu.has(i))){for(let e of o)a.removeClass(i,e);Ru(i)}})})}}function zh(e,t,n){let r=zu.get(t);if(Gu(e)===t&&r&&Ku(e,t)){e.stopPropagation();for(let e of r.classList)n.removeClass(t,e);Ru(t)}}var Bh=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 Vh(e,t,n,r,i){return e===n&&Object.is(t,r)?1:Object.is(i(e,t),i(n,r))?-1:0}function Hh(e,t,n,r){let i,a,o=0,s=e.length-1;if(Array.isArray(t)){tn(r);let c=t.length-1;for(tn(null);o<=s&&o<=c;){let r=e.at(o),l=t[o],u=Vh(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=Vh(s,d,c,f,n);if(p!==0){p<0&&e.updateValue(s,f),s--,c--;continue}let m=n(o,r),ee=n(s,d),h=n(o,l);if(Object.is(h,ee)){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 Kh,a??=Gh(e,o,s,n),Uh(e,i,o,h))e.updateValue(o,l),o++,s++;else if(a.has(h))i.set(m,e.detach(o)),s--;else{let n=e.create(o,t[o]);e.attach(o,n),o++,s++}}for(;o<=c;)Wh(e,i,n,o,t[o]),o++}else if(t!=null){tn(r);let c=t[Symbol.iterator]();tn(null);let l=c.next();for(;!l.done&&o<=s;){let t=e.at(o),r=l.value,u=Vh(o,t,o,r,n);if(u!==0)u<0&&e.updateValue(o,r),o++,l=c.next();else{i??=new Kh,a??=Gh(e,o,s,n);let u=n(o,r);if(Uh(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;)Wh(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 Uh(e,t,n,r){return t!==void 0&&t.has(r)?(e.attach(n,t.get(r)),t.delete(r),!0):!1}function Wh(e,t,n,r,i){if(Uh(e,t,r,n(r,i)))e.updateValue(r,i);else{let t=e.create(r,i);e.attach(r,t)}}function Gh(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 Kh=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 A(e,t,n,r,i,a,o,s){Xu(`NgControlFlow`);let c=Lo(),l=Ro();return Eh(c,l,e,t,n,r,i,bo(l.consts,a),256,o,s),qh}function qh(e,t,n,r,i,a,o,s){Xu(`NgControlFlow`);let c=Lo(),l=Ro();return Eh(c,l,e,t,n,r,i,bo(l.consts,a),512,o,s),qh}function j(e,t){Xu(`NgControlFlow`);let n=Lo(),r=Yo(),i=n[r]===Ou?-1:n[r],a=i===-1?void 0:$h(n,27+i);if(dp(n,r,e)){let r=tn(null);try{if(a!==void 0&&Lf(a,0),e!==-1){let r=27+e,i=$h(n,r),a=ig(n[1],r),o=ep(i,a,n);If(i,cf(n,a,t,{dehydratedView:o}),0,lf(a,o))}}finally{tn(r)}}else if(a!==void 0){let e=Ff(a,0);e!==void 0&&(e[8]=t)}}var Jh=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 Yh(e){return e}function Xh(e,t){return t}var Zh=class{hasEmptyBlock;trackByFn;liveCollection;constructor(e,t,n){this.hasEmptyBlock=e,this.trackByFn=t,this.liveCollection=n}};function M(e,t,n,r,i,a,o,s,c,l,u,d,f){Xu(`NgControlFlow`);let p=Lo(),m=Ro(),ee=c!==void 0,h=Lo(),g=new Zh(ee,s?o.bind(h[15][8]):o);h[27+e]=g,Eh(p,m,e+1,t,n,r,i,bo(m.consts,a),256),ee&&Eh(p,m,e+2,c,l,u,d,bo(m.consts,f),512)}var Qh=class extends Bh{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,If(this.lContainer,t,e,lf(this.templateTNode,n)),eg(this.lContainer,e)}detach(e){return this.needsIndexUpdate||=e!==this.length-1,tg(this.lContainer,e),ng(this.lContainer,e)}create(e,t){let n=$f(this.lContainer,this.templateTNode.tView.ssrId);return cf(this.hostLView,this.templateTNode,new Jh(this.lContainer,t,e),{dehydratedView:n})}destroy(e){dd(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];Ute(e,r),Iu.delete(n[19]),r.detachedLeaveAnimationFns=void 0}}function tg(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 ng(e,t){return Rf(e,t)}function rg(e,t){return Ff(e,t)}function ig(e,t){return ho(e,t)}function P(e,t,n){let r=Lo();return dp(r,Yo(),t)&&(Ro(),Hd(cs(),r,e,t,r[11],n)),P}function ag(e,t,n,r,i){tf(t,e,n,i?`class`:`style`,r)}function F(e,t,n,r){let i=Lo(),a=i[1],o=e+27,s=a.firstCreatePass?$p(o,i,2,t,Jd,No(),n,r):a.data[o];if(io(s)){let n=i[10].tracingService;if(n&&n.componentCreate){let o=a.data[s.directiveStart+s.componentOffset];return n.componentCreate(op(o),()=>(og(e,t,i,s,r),F))}}return og(e,t,i,s,r),F}function og(e,t,n,r,i){if(Qd(r,n,e,t,cg),ao(r)){let e=n[1];Rd(e,n,r),ru(e,r,n)}i!=null&&zd(n,r)}function I(){let e=Ro(),t=$d(zo());return e.firstCreatePass&&em(e,t),Fo(t)&&Io(),Mo(),t.classesWithoutHost!=null&&Vc(t)&&ag(e,t,Lo(),t.classesWithoutHost,!0),t.stylesWithoutHost!=null&&Hc(t)&&ag(e,t,Lo(),t.stylesWithoutHost,!1),I}function L(e,t,n,r){return F(e,t,n,r),I(),L}function R(e,t,n,r){let i=Lo(),a=i[1],o=e+27,s=a.firstCreatePass?tm(o,a,2,t,n,r):a.data[o];return Qd(s,i,e,t,cg),r!=null&&zd(i,s),R}function z(){return Fo($d(zo()))&&Io(),Mo(),z}function sg(e,t,n,r){return R(e,t,n,r),z(),sg}var cg=(e,t,n,r,i)=>(ms(!0),mu(t[11],r,ds()));function lg(e,t,n){let r=Lo(),i=r[1],a=e+27,o=i.firstCreatePass?$p(a,r,8,`ng-container`,Jd,No(),t,n):i.data[a];if(Qd(o,r,e,`ng-container`,fg),ao(o)){let e=r[1];Rd(e,r,o),ru(e,o,r)}return n!=null&&zd(r,o),lg}function ug(){let e=Ro(),t=$d(zo());return e.firstCreatePass&&em(e,t),ug}function dg(e,t,n){return lg(e,t,n),ug(),dg}var fg=(e,t,n,r,i)=>(ms(!0),lte(t[11],``));function B(){return Lo()}function V(e,t,n){let r=Lo();return dp(r,Yo(),t)&&(Ro(),Ud(cs(),r,e,t,r[11],n)),V}var pg=void 0;function mg(e){let t=Math.floor(Math.abs(e)),n=e.toString().replace(/^[^.]*\.?/,``).length;return t===1&&n===0?1:5}var hg=[`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`]],pg,[[`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`]],pg,[[`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}`,pg,pg,pg],[`.`,`,`,`;`,`%`,`+`,`-`,`E`,`×`,`‰`,`∞`,`NaN`,`:`],[`#,##0.###`,`#,##0%`,`¤#,##0.00`,`#E0`],`USD`,`$`,`US Dollar`,{},`ltr`,mg],gg=Object.create(null);function _g(e){let t=bg(e),n=vg(t);if(n)return n;let r=t.split(`-`)[0];if(n=vg(r),n)return n;if(r===`en`)return hg;throw new di(701,!1)}function vg(e){if(!(e in gg)){let t=Xi.ng&&Xi.ng.common&&Xi.ng.common.locales&&Xi.ng.common.locales[e];return t!==void 0&&(gg[e]=t),t}return gg[e]}var yg={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 bg(e){return e.toLowerCase().replace(/_/g,`-`)}var xg=`en-US`;function Sg(e){typeof e==`string`&&e.toLowerCase().replace(/_/g,`-`)}function H(e,t,n){let r=Lo(),i=Ro(),a=zo();return Cg(i,r,r[11],a,e,t,n),H}function U(e,t,n){let r=Lo(),i=Ro(),a=zo();return(a.type&3||n)&&_p(a,i,r,n,r[11],e,t,hp(a,r,t)),U}function Cg(e,t,n,r,i,a,o){let s=!0,c=null;if((r.type&3||o)&&(c??=hp(r,t,a),_p(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 Ng(e){return(e&2)==2}function Pg(e,t){return e&131071|t<<17}function Fg(e){return e|2}function Ig(e){return(e&131068)>>2}function Lg(e,t){return e&-131069|t<<2}function Rg(e){return(e&1)==1}function zg(e){return e|1}function Bg(e,t,n,r,i,a){let o=a?t.classBindings:t.styleBindings,s=Mg(o),c=Ig(o);e[r]=n;let l=!1,u;if(Array.isArray(n)){let e=n;u=e[1],(u===null||ga(e,u)>0)&&(l=!0)}else u=n;if(i){if(c!==0){let t=Mg(e[s+1]);e[r+1]=jg(t,s),t!==0&&(e[t+1]=Lg(e[t+1],r)),e[s+1]=Pg(e[s+1],r)}else e[r+1]=jg(s,0),s!==0&&(e[s+1]=Lg(e[s+1],r)),s=r}else e[r+1]=jg(c,0),s===0?s=r:e[c+1]=Lg(e[c+1],r),c=r;l&&(e[r+1]=Fg(e[r+1])),Hg(e,u,r,!0),Hg(e,u,r,!1),Vg(t,u,e,r,a),o=jg(s,c),a?t.classBindings=o:t.styleBindings=o}function Vg(e,t,n,r,i){let a=i?e.residualClasses:e.residualStyles;a!=null&&typeof t==`string`&&ga(a,t)>=0&&(n[r+1]=zg(n[r+1]))}function Hg(e,t,n,r){let i=e[n+1],a=t===null,o=r?Mg(i):Ig(i),s=!1;for(;o!==0&&(s===!1||a);){let n=e[o],i=e[o+1];Ug(n,t)&&(s=!0,e[o+1]=r?zg(i):Fg(i)),o=r?Mg(i):Ig(i)}s&&(e[n+1]=r?Fg(i):zg(i))}function Ug(e,t){return e===null||t==null||(Array.isArray(e)?e[1]:e)===t?!0:Array.isArray(e)&&typeof t==`string`?ga(e,t)>=0:!1}var Wg={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function Gg(e){return e.substring(Wg.key,Wg.keyEnd)}function Kg(e){return Jg(e),qg(e,Yg(e,0,Wg.textEnd))}function qg(e,t){let n=Wg.textEnd;return n===t?-1:(t=Wg.keyEnd=Xg(e,Wg.key=t,n),Yg(e,t,n))}function Jg(e){Wg.key=0,Wg.keyEnd=0,Wg.value=0,Wg.valueEnd=0,Wg.textEnd=e.length}function Yg(e,t,n){for(;t32;)t++;return t}function Zg(e,t,n){return e_(e,t,n,!1),Zg}function G(e,t){return e_(e,t,null,!0),G}function Qg(e){t_(d_,$g,e,!0)}function $g(e,t){for(let n=Kg(t);n>=0;n=qg(t,n))ma(e,Gg(t),!0)}function e_(e,t,n,r){let i=Lo(),a=Ro(),o=Xo(2);if(a.firstUpdatePass&&r_(a,e,o,r),t!==Ou&&dp(i,o,t)){let s=a.data[os()];p_(a,s,i,i[11],e,i[o+1]=g_(t,n),r,o)}}function t_(e,t,n,r){let i=Ro(),a=Xo(2);i.firstUpdatePass&&r_(i,null,a,r);let o=Lo();if(n!==Ou&&dp(o,a,n)){let s=i.data[os()];if(__(s,r)&&!n_(i,a)){let e=r?s.classesWithoutHost:s.stylesWithoutHost;e!==null&&(n=hi(e,n||``)),ag(i,s,o,n,r)}else f_(i,s,o,o[11],o[a+1],o[a+1]=u_(e,t,n),r,a)}}function n_(e,t){return t>=e.expandoStartIndex}function r_(e,t,n,r){let i=e.data;if(i[n+1]===null){let a=i[os()],o=n_(e,n);__(a,r)&&t===null&&!o&&(t=!1),t=i_(i,a,t,r),Bg(i,a,t,n,o,r)}}function i_(e,t,n,r){let i=nte(e),a=r?t.residualClasses:t.residualStyles;if(i===null)(r?t.classBindings:t.styleBindings)===0&&(n=c_(null,e,t,n,r),n=l_(n,t.attrs,r),a=null);else{let o=t.directiveStylingLast;if(o===-1||e[o]!==i){if(n=c_(i,e,t,n,r),a===null){let n=a_(e,t,r);n!==void 0&&Array.isArray(n)&&(n=c_(null,e,t,n[1],r),n=l_(n,t.attrs,r),o_(e,t,r,n))}else a=s_(e,t,r)}}return a!==void 0&&(r?t.residualClasses=a:t.residualStyles=a),n}function a_(e,t,n){let r=n?t.classBindings:t.styleBindings;if(Ig(r)!==0)return e[Mg(r)]}function o_(e,t,n,r){let i=n?t.classBindings:t.styleBindings;e[Mg(i)]=r}function s_(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===Ou&&(u=l?ya:void 0);let d=l?ha(u,r):c===r?u:void 0;if(a&&!h_(d)&&(d=ha(t,r)),h_(d)&&(s=d,o))return s;let f=e[i+1];i=o?Mg(f):Ig(f)}if(t!==null){let e=a?t.residualClasses:t.residualStyles;e!=null&&(s=ha(e,r))}return s}function h_(e){return e!==void 0}function g_(e,t){return e==null||e===``||(typeof t==`string`?e=ou(e)+t:typeof e==`object`&&(e=mi(ou(e)))),e}function __(e,t){return!!(e.flags&(t?8:16))}function K(e,t=``){let n=Lo(),r=Ro(),i=e+27,a=r.firstCreatePass?Gf(r,i,1,t,null):r.data[i],o=ine(r,n,a,t);n[i]=o,ps()&&hd(r,n,o,a),Vo(a,!1)}var ine=(e,t,n,r)=>(ms(!0),ste(t[11],r));function v_(e,t,n,r=``){return dp(e,Yo(),n)?t+Ri(n)+r:Ou}function ane(e,t,n,r,i,a=``){let o=fp(e,Jo(),n,i);return Xo(2),o?t+Ri(n)+r+Ri(i)+a:Ou}function one(e,t,n,r,i,a,o,s=``){let c=pp(e,Jo(),n,i,o);return Xo(3),c?t+Ri(n)+r+Ri(i)+a+Ri(o)+s:Ou}function sne(e,t,n,r,i,a,o,s,c,l=``){let u=mp(e,Jo(),n,i,o,c);return Xo(4),u?t+Ri(n)+r+Ri(i)+a+Ri(o)+s+Ri(c)+l:Ou}function q(e){return J(``,e),q}function J(e,t,n){let r=Lo(),i=v_(r,e,t,n);return i!==Ou&&x_(r,os(),i),J}function Y(e,t,n,r,i){let a=Lo(),o=ane(a,e,t,n,r,i);return o!==Ou&&x_(a,os(),o),Y}function y_(e,t,n,r,i,a,o){let s=Lo(),c=one(s,e,t,n,r,i,a,o);return c!==Ou&&x_(s,os(),c),y_}function b_(e,t,n,r,i,a,o,s,c){let l=Lo(),u=sne(l,e,t,n,r,i,a,o,s,c);return u!==Ou&&x_(l,os(),u),b_}function x_(e,t,n){let r=po(t,e);cte(e[11],r,n)}function S_(e,t,n){pc(t)&&(t=t());let r=Lo();return dp(r,Yo(),t)&&(Ro(),Hd(cs(),r,e,t,r[11],n)),S_}function C_(e,t){let n=pc(e);return n&&e.set(t),n}function w_(e,t){let n=Lo(),r=Ro(),i=zo();return Cg(r,n,n[11],i,e,t),w_}var T_={};function E_(e){Xu(`NgLet`);let t=Ro(),n=Lo(),r=e+27;return Vo(Gf(t,r,128,null,null),!1),_o(t,n,r,T_),E_}function D_(e){return _o(Ro(),Lo(),os(),e),e}function O_(e){let t=go(Wo(),27+e);if(t===T_)throw new di(314,!1);return t}function k_(e,t,n=``){return v_(Lo(),e,t,n)}function A_(e,t,n){let r=Ro();r.firstCreatePass&&j_(t,r.data,r.blueprint,oo(e),n)}function j_(e,t,n,r,i){if(e=_i(e),Array.isArray(e))for(let a=0;a>20;if(Na(e)||!e.multi){let r=new Bc(l,i,Rp,null),p=P_(c,t,i?u:u+f,d);p===-1?(ll(al(s,o),a,c),M_(a,e,t.length),t.push(c),s.directiveStart++,s.directiveEnd++,i&&(s.providerIndexes+=1048576),n.push(r),o.push(r)):(n[p]=r,o[p]=r)}else{let p=P_(c,t,u+f,d),m=P_(c,t,u,u+f),ee=p>=0&&n[p],h=m>=0&&n[m];if(i&&!h||!i&&!ee){ll(al(s,o),a,c);let u=une(i?lne:cne,n.length,i,r,l,e);!i&&h&&(n[m].providerFactory=u),M_(a,e,t.length,0),t.push(c),s.directiveStart++,s.directiveEnd++,i&&(s.providerIndexes+=1048576),n.push(u),o.push(u)}else{let t=N_(n[i?m:p],l,!i&&r);M_(a,e,p>-1?p:m,t)}!i&&r&&h&&n[m].componentProviders++}}}function M_(e,t,n,r){let i=Na(t),a=Pa(t);if(i||a){let o=(a?_i(t.useClass):t).prototype.ngOnDestroy;if(o){let a=e.destroyHooks||=[];if(!i&&t.multi){let e=a.indexOf(n);e===-1?a.push(n,[r,o]):a[e+1].push(r,o)}else a.push(n,o)}}}function N_(e,t,n){return n&&e.componentProviders++,e.multi.push(t)-1}function P_(e,t,n,r){for(let i=n;i{n.providersResolver=(t,n)=>A_(t,n?n(e):e,!1),t&&(n.viewProvidersResolver=(e,n)=>A_(e,n?n(t):t,!0))}}function L_(e,t){let n=qo()+e,r=Lo();return r[n]===Ou?lp(r,n,t()):up(r,n)}function R_(e,t,n){return V_(Lo(),qo(),e,t,n)}function z_(e,t,n,r){return H_(Lo(),qo(),e,t,n,r)}function dne(e,t,n,r,i,a,o){return fne(Lo(),qo(),e,t,n,r,i,a)}function B_(e,t){let n=e[t];return n===Ou?void 0:n}function V_(e,t,n,r,i,a){let o=t+n;return dp(e,o,i)?lp(e,o+1,a?r.call(a,i):r(i)):B_(e,o+1)}function H_(e,t,n,r,i,a,o){let s=t+n;return fp(e,s,i,a)?lp(e,s+2,o?r.call(o,i,a):r(i,a)):B_(e,s+2)}function fne(e,t,n,r,i,a,o,s,c){let l=t+n;return mp(e,l,i,a,o,s)?lp(e,l+4,c?r.call(c,i,a,o,s):r(i,a,o,s)):B_(e,l+4)}function U_(e,t){let n=Ro(),r,i=e+27;n.firstCreatePass?(r=pne(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=oa(r.type,!0)),o=Ji(Rp);try{let e=$c(!1),t=a();return $c(e),_o(n,Lo(),i,t),t}finally{Ji(o)}}function pne(e,t){if(t)for(let n=t.length-1;n>=0;n--){let r=t[n];if(e===r.name)return r}}function W_(e,t,n){let r=e+27,i=Lo(),a=go(i,r);return K_(i,r)?V_(i,qo(),t,a.transform,n,a):a.transform(n)}function G_(e,t,n,r){let i=e+27,a=Lo(),o=go(a,i);return K_(a,i)?H_(a,qo(),t,o.transform,n,r,o):o.transform(n,r)}function K_(e,t){return e[1].data[t].pure}function q_(e,t){return Wf(e,t)}var mne=(()=>{class e{applicationErrorHandler=x(Ws);appRef=x(Ph);taskService=x(Cs);ngZone=x(js);zonelessEnabled=x(tc);tracing=x(Ju,{optional:!0});zoneIsDefined=typeof Zone<`u`&&!!Zone.root.run;schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}];subscriptions=new or;angularZoneId=this.zoneIsDefined?this.ngZone._inner?.get(ks):null;scheduleInRootZone=!this.zonelessEnabled&&this.zoneIsDefined&&(x(nc,{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?Ds:Es;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=El({token:e,factory:e.ɵfac})}return e})();function hne(){return[{provide:ec,useExisting:mne},{provide:js,useClass:zs},{provide:tc,useValue:!0}]}function gne(){return typeof $localize<`u`&&$localize.locale||`en-US`}var J_=new Ei(``,{factory:()=>x(J_,{optional:!0,skipSelf:!0})||gne()}),Y_=class{destroyed=!1;listeners=null;errorHandler=x(Us,{optional:!0});isEmitting=!1;hasNullListeners=!1;destroyRef=x(ys);constructor(){this.destroyRef.onDestroy(()=>{this.destroyed=!0,this.listeners=null})}subscribe(e){if(this.destroyed)throw new di(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(fi(953,!1));return}if(this.listeners===null)return;this.isEmitting=!0;let t=tn(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&&_ne(this.listeners)),tn(t),this.isEmitting=!1}}};function _ne(e){let t=e.length-1;for(;t>-1;)e[t]===null&&e.splice(t,1),t--}function X(e,t){return Cn(e,t?.equal)}function Z(e){return Gn(e)}(class e extends Error{_brand;constructor(e){super(e)}static IDLE=new e(`IDLE`);static LOADING=new e(`LOADING`)});var vne=e=>e;function Q(e,t){return typeof e==`function`?X_(Vn(e,vne,t?.equal),t?.debugName,t?.set):X_(Vn(e.source,e.computation,e.equal),e.debugName,e.set)}function X_(e,t,n){let r=e[en],i=e;if(n!==void 0){let t=e=>Hn(r,e);i.set=e=>n(e,t),i.update=r=>n(r(Z(e)),t)}else i.set=e=>Hn(r,e),i.update=e=>Un(r,e);return i.asReadonly=Ks.bind(e),i}var Z_=!1;function yne(){return Z_}function Q_(e){Z_=e}function $_(e,t){let n=Object.create(hc);n.value=e,n.transformFn=t?.transform;function r(){if(an(n),n.value===mc)throw new di(-950,null);return n.value}return r[en]=n,r}function ev(e){return new Y_}function tv(e,t){return $_(e,t)}function bne(e){return $_(mc,e)}var $=(tv.required=bne,tv);function nv(e,t){let n=Object.create(hc),r=new Y_;n.value=e;function i(){return an(n),rv(n.value),n.value}return i[en]=n,i.asReadonly=Ks.bind(i),i.set=e=>{n.equal(n.value,e)||(An(n,e),r.emit(e))},i.update=e=>{rv(n.value),i.set(e(n.value))},i.subscribe=r.subscribe.bind(r),i.destroyRef=r.destroyRef,i}function rv(e){if(e===mc)throw new di(952,!1)}function iv(e,t){return nv(e,t)}function xne(e){return nv(mc,e)}var av=(iv.required=xne,iv);function ov(e,t){return Jm(t)}function Sne(e,t){return Ym(t)}var sv=(ov.required=Sne,ov),Cne=(()=>{class e{static __NG_ELEMENT_ID__=wne}return e})();function wne(e){return Tne(zo(),Lo(),(e&16)==16)}function Tne(e,t,n){if(io(e)&&!n){let n=vo(e.index,t);return new Vf(n,n)}if(e.type&175){let e=t[15];return new Vf(e,t)}return null}var cv=new Ei(``),Ene=new Ei(``);function lv(e){return!e.moduleRef}function Dne(e){let t=lv(e)?e.r3Injector:e.moduleRef.injector,n=t.get(js);return n.run(()=>{lv(e)?e.r3Injector.resolveInjectorInitializers():e.moduleRef.resolveInjectorInitializers();let r=t.get(Ws),i;if(n.runOutsideAngular(()=>{i=n.onError.subscribe({next:r})}),lv(e)){let n=()=>t.destroy(),r=e.platformInjector.get(cv);r.add(n),t.onDestroy(()=>{i.unsubscribe(),r.delete(n)})}else{let t=()=>e.moduleRef.destroy(),n=e.platformInjector.get(cv);n.add(t),e.moduleRef.onDestroy(()=>{Ih(e.allPlatformModules,e.moduleRef),i.unsubscribe(),n.delete(t)})}return kne(r,n,()=>{let n=t.get(Cs),r=n.add(),i=t.get(mh);return i.runInitializers(),i.donePromise.then(()=>{if(Sg(t.get(J_,xg)||`en-US`),!t.get(Ene,!0))return lv(e)?t.get(Ph):(e.allPlatformModules.push(e.moduleRef),e.moduleRef);if(lv(e)){let n=t.get(Ph);return e.rootComponent!==void 0&&n.bootstrap(e.rootComponent),n}return One?.(e.moduleRef,e.allPlatformModules),e.moduleRef}).finally(()=>void n.remove(r))})})}var One;function kne(e,t,n){try{let r=n();return Qm(r)?r.catch(n=>{throw t.runOutsideAngular(()=>e(n)),n}):r}catch(n){throw t.runOutsideAngular(()=>e(n)),n}}var uv=null;function Ane(e=[],t){return _s.create({name:t,providers:[{provide:Fa,useValue:`platform`},{provide:cv,useValue:new Set([()=>uv=null])},...e]})}function jne(e=[]){if(uv)return uv;let t=Ane(e);return uv=t,Mh(),Mne(t),t}function Mne(e){let t=e.get(Ys,null);Qa(e,()=>{t?.forEach(e=>e())})}function Nne(e){let{rootComponent:t,appProviders:n,platformProviders:r,platformRef:i}=e;Ac(_c.BootstrapApplicationStart);try{let e=i?.injector??jne(r);return Dne({r3Injector:new th({providers:[hne(),Gs,...n||[]],parent:e,debugName:``,runEnvironmentInitializers:!1}).injector,platformInjector:e,rootComponent:t})}catch(e){return Promise.reject(e)}finally{Ac(_c.BootstrapApplicationEnd)}}function dv(e){return typeof e==`boolean`?e:e!=null&&e!==`false`}var fv=Symbol(`NOT_SET`),pv=new Set,Pne={...Mn,kind:`afterRenderEffectPhase`,consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!0,value:fv,cleanup:null,consumerMarkedDirty(){if(this.sequence.impl.executing){if(this.sequence.lastPhase===null||this.sequence.lastPhase(an(r),r.value),r.signal[en]=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??pv)t()}finally{_n(e)}}};function mv(e,t){let n=t?.injector??x(_s),r=n.get(ec),i=n.get(Zu),a=n.get(Ju,null,{optional:!0});i.impl??=n.get($u);let o=e;typeof o==`function`&&(o={mixedReadWrite:e});let s=n.get(Qs,null,{optional:!0}),c=new Fne(i.impl,[o.earlyRead,o.write,o.mixedReadWrite,o.read],s?.view,r,n,a?.snapshot(null));return i.impl.register(c),c}var hv=null;function gv(){return hv}function Ine(e){hv??=e}var Lne=class{},_v=(function(e){return e[e.Format=0]=`Format`,e[e.Standalone=1]=`Standalone`,e})(_v||{}),vv=(function(e){return e[e.Narrow=0]=`Narrow`,e[e.Abbreviated=1]=`Abbreviated`,e[e.Wide=2]=`Wide`,e[e.Short=3]=`Short`,e})(vv||{}),yv=(function(e){return e[e.Short=0]=`Short`,e[e.Medium=1]=`Medium`,e[e.Long=2]=`Long`,e[e.Full=3]=`Full`,e})(yv||{}),bv={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 Rne(e){return _g(e)[yg.LocaleId]}function zne(e,t,n){let r=_g(e);return Ev(Ev([r[yg.DayPeriodsFormat],r[yg.DayPeriodsStandalone]],t),n)}function Bne(e,t,n){let r=_g(e);return Ev(Ev([r[yg.DaysFormat],r[yg.DaysStandalone]],t),n)}function Vne(e,t,n){let r=_g(e);return Ev(Ev([r[yg.MonthsFormat],r[yg.MonthsStandalone]],t),n)}function Hne(e,t){let n=_g(e)[yg.Eras];return Ev(n,t)}function xv(e,t){return Ev(_g(e)[yg.DateFormat],t)}function Sv(e,t){return Ev(_g(e)[yg.TimeFormat],t)}function Cv(e,t){let n=_g(e)[yg.DateTimeFormat];return Ev(n,t)}function wv(e,t){let n=_g(e),r=n[yg.NumberSymbols][t];if(r===void 0){if(t===bv.CurrencyDecimal)return n[yg.NumberSymbols][bv.Decimal];if(t===bv.CurrencyGroup)return n[yg.NumberSymbols][bv.Group]}return r}function Tv(e){if(!e[yg.ExtraData])throw new di(2303,!1)}function Une(e){let t=_g(e);return Tv(t),(t[yg.ExtraData][2]||[]).map(e=>typeof e==`string`?Dv(e):[Dv(e[0]),Dv(e[1])])}function Wne(e,t,n){let r=_g(e);return Tv(r),Ev(Ev([r[yg.ExtraData][0],r[yg.ExtraData][1]],t)||[],n)||[]}function Ev(e,t){for(let n=t;n>-1;n--)if(e[n]!==void 0)return e[n];throw new di(2304,!1)}function Dv(e){let[t,n]=e.split(`:`);return{hours:+t,minutes:+n}}var Gne=/^(\d{4,})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,Ov=Object.create(null),Kne=/((?:[^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]*)/,qne=256;function Jne(e,t,n,r){let i=ire(e);Yne(t),t=Av(n,t)||t;let a=[],o;for(;t;)if(o=Kne.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=Vv(r,s),i=rre(i,r));let c=``;return a.forEach(e=>{let t=tre(e);c+=t?t(i,n,s):e===`''`?`'`:e.replace(/(^'|'$)/g,``).replace(/''/g,`'`)}),c}function Yne(e){if(e.length>qne)throw new di(2300,!1)}function kv(e,t,n){let r=new Date(0);return r.setFullYear(e,t,n),r.setHours(0,0,0),r}function Av(e,t){let n=Rne(e);if(Ov[n]??=Object.create(null),Ov[n][t])return Ov[n][t];let r=``;switch(t){case`shortDate`:r=xv(e,yv.Short);break;case`mediumDate`:r=xv(e,yv.Medium);break;case`longDate`:r=xv(e,yv.Long);break;case`fullDate`:r=xv(e,yv.Full);break;case`shortTime`:r=Sv(e,yv.Short);break;case`mediumTime`:r=Sv(e,yv.Medium);break;case`longTime`:r=Sv(e,yv.Long);break;case`fullTime`:r=Sv(e,yv.Full);break;case`short`:let t=Av(e,`shortTime`),n=Av(e,`shortDate`);r=jv(Cv(e,yv.Short),[t,n]);break;case`medium`:let i=Av(e,`mediumTime`),a=Av(e,`mediumDate`);r=jv(Cv(e,yv.Medium),[i,a]);break;case`long`:let o=Av(e,`longTime`),s=Av(e,`longDate`);r=jv(Cv(e,yv.Long),[o,s]);break;case`full`:let c=Av(e,`fullTime`),l=Av(e,`fullDate`);r=jv(Cv(e,yv.Full),[c,l])}return r&&(Ov[n][t]=r),r}function jv(e,t){return t&&(e=e.replace(/\{([^}]+)}/g,function(e,n){return Object.hasOwn(t,n)?t[n]:e})),e}function Mv(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 Xne(s,t);let c=wv(o,bv.MinusSign);return Mv(s,t,c,r,i)}}function Zne(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 di(2301,!1)}}function Pv(e,t,n=_v.Format,r=!1){return function(i,a){return Qne(i,a,e,t,n,r)}}function Qne(e,t,n,r,i,a){switch(n){case 2:return Vne(t,i,r)[e.getMonth()];case 1:return Bne(t,i,r)[e.getDay()];case 0:let n=e.getHours(),o=e.getMinutes();if(a){let e=Une(t),a=Wne(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?`+`:``)+Mv(o,2,a)+Mv(Math.abs(i%60),2,a);case 1:return`GMT`+(i>=0?`+`:``)+Mv(o,1,a);case 2:return`GMT`+(i>=0?`+`:``)+Mv(o,2,a)+`:`+Mv(Math.abs(i%60),2,a);case 3:return r===0?`Z`:(i>=0?`+`:``)+Mv(o,2,a)+`:`+Mv(Math.abs(i%60),2,a);default:throw new di(2310,!1)}}}var $ne=0,Iv=4;function ere(e){let t=kv(e,$ne,1).getDay();return kv(e,0,1+(t<=Iv?Iv:11)-t)}function Lv(e){let t=e.getDay(),n=t===0?-3:Iv-t;return kv(e.getFullYear(),e.getMonth(),e.getDate()+n)}function Rv(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=Lv(n),t=ere(e.getFullYear()),r=e.getTime()-t.getTime();i=1+Math.round(r/6048e5)}return Mv(i,e,wv(r,bv.MinusSign))}}function zv(e,t=!1){return function(n,r){return Mv(Lv(n).getFullYear(),e,wv(r,bv.MinusSign),t)}}var Bv=Object.create(null);function tre(e){if(Bv[e])return Bv[e];let t;switch(e){case`G`:case`GG`:case`GGG`:t=Pv(3,vv.Abbreviated);break;case`GGGG`:t=Pv(3,vv.Wide);break;case`GGGGG`:t=Pv(3,vv.Narrow);break;case`y`:t=Nv(0,1,0,!1,!0);break;case`yy`:t=Nv(0,2,0,!0,!0);break;case`yyy`:t=Nv(0,3,0,!1,!0);break;case`yyyy`:t=Nv(0,4,0,!1,!0);break;case`Y`:t=zv(1);break;case`YY`:t=zv(2,!0);break;case`YYY`:t=zv(3);break;case`YYYY`:t=zv(4);break;case`M`:case`L`:t=Nv(1,1,1);break;case`MM`:case`LL`:t=Nv(1,2,1);break;case`MMM`:t=Pv(2,vv.Abbreviated);break;case`MMMM`:t=Pv(2,vv.Wide);break;case`MMMMM`:t=Pv(2,vv.Narrow);break;case`LLL`:t=Pv(2,vv.Abbreviated,_v.Standalone);break;case`LLLL`:t=Pv(2,vv.Wide,_v.Standalone);break;case`LLLLL`:t=Pv(2,vv.Narrow,_v.Standalone);break;case`w`:t=Rv(1);break;case`ww`:t=Rv(2);break;case`W`:t=Rv(1,!0);break;case`d`:t=Nv(2,1);break;case`dd`:t=Nv(2,2);break;case`c`:case`cc`:t=Nv(7,1);break;case`ccc`:t=Pv(1,vv.Abbreviated,_v.Standalone);break;case`cccc`:t=Pv(1,vv.Wide,_v.Standalone);break;case`ccccc`:t=Pv(1,vv.Narrow,_v.Standalone);break;case`cccccc`:t=Pv(1,vv.Short,_v.Standalone);break;case`E`:case`EE`:case`EEE`:t=Pv(1,vv.Abbreviated);break;case`EEEE`:t=Pv(1,vv.Wide);break;case`EEEEE`:t=Pv(1,vv.Narrow);break;case`EEEEEE`:t=Pv(1,vv.Short);break;case`a`:case`aa`:case`aaa`:t=Pv(0,vv.Abbreviated);break;case`aaaa`:t=Pv(0,vv.Wide);break;case`aaaaa`:t=Pv(0,vv.Narrow);break;case`b`:case`bb`:case`bbb`:t=Pv(0,vv.Abbreviated,_v.Standalone,!0);break;case`bbbb`:t=Pv(0,vv.Wide,_v.Standalone,!0);break;case`bbbbb`:t=Pv(0,vv.Narrow,_v.Standalone,!0);break;case`B`:case`BB`:case`BBB`:t=Pv(0,vv.Abbreviated,_v.Format,!0);break;case`BBBB`:t=Pv(0,vv.Wide,_v.Format,!0);break;case`BBBBB`:t=Pv(0,vv.Narrow,_v.Format,!0);break;case`h`:t=Nv(3,1,-12);break;case`hh`:t=Nv(3,2,-12);break;case`H`:t=Nv(3,1);break;case`HH`:t=Nv(3,2);break;case`m`:t=Nv(4,1);break;case`mm`:t=Nv(4,2);break;case`s`:t=Nv(5,1);break;case`ss`:t=Nv(5,2);break;case`S`:t=Nv(6,1);break;case`SS`:t=Nv(6,2);break;case`SSS`:t=Nv(6,3);break;case`Z`:case`ZZ`:case`ZZZ`:t=Fv(0);break;case`ZZZZZ`:t=Fv(3);break;case`O`:case`OO`:case`OOO`:case`z`:case`zz`:case`zzz`:t=Fv(1);break;case`OOOO`:case`ZZZZ`:case`zzzz`:t=Fv(2);break;default:return null}return Bv[e]=t,t}function Vv(e,t){e=e.replace(/:/g,``);let n=Date.parse(`Jan 01, 1970 00:00:00 `+e)/6e4;return isNaN(n)?t:n}function nre(e,t){return e=new Date(e.getTime()),e.setMinutes(e.getMinutes()+t),e}function rre(e,t,n){let r=e.getTimezoneOffset();return nre(e,-1*(Vv(t,r)-r))}function ire(e){if(Hv(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 kv(t,n-1,r)}let t=parseFloat(e);if(!isNaN(e-t))return new Date(t);let n;if(n=e.match(Gne))return are(n)}let t=new Date(e);if(!Hv(t))throw new di(2311,!1);return t}function are(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 Hv(e){return e instanceof Date&&!isNaN(e.valueOf())}var Uv=(()=>{class e{_viewContainerRef;_viewRef=null;ngTemplateOutletContext=null;ngTemplateOutlet=null;ngTemplateOutletInjector=null;injector=x(_s);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)(Rp(vm))};static ɵdir=sh({type:e,selectors:[[``,`ngTemplateOutlet`,``]],inputs:{ngTemplateOutletContext:`ngTemplateOutletContext`,ngTemplateOutlet:`ngTemplateOutlet`,ngTemplateOutletInjector:`ngTemplateOutletInjector`},features:[xc]})}return e})();function ore(e,t){return new di(2100,!1)}var sre=`mediumDate`,cre=new Ei(``),lre=new Ei(``),Wv=(()=>{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??sre,a=r??this.defaultOptions?.timezone??this.defaultTimezone??void 0;return Jne(t,e,i||this.locale,a)}catch(t){throw ore(e,t.message)}}static ɵfac=function(t){return new(t||e)(Rp(J_,16),Rp(cre,24),Rp(lre,24))};static ɵpipe=ch({name:`date`,type:e,pure:!0})}return e})(),Gv=(()=>{class e{transform(e){return JSON.stringify(e,null,2)}static ɵfac=function(t){return new(t||e)};static ɵpipe=ch({name:`json`,type:e,pure:!1})}return e})();function ure(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 dre=`browser`,Kv=class{_doc;constructor(e){this._doc=e}manager},qv=(()=>{class e extends Kv{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)(ta(vs))};static ɵprov=yi({token:e,factory:e.ɵfac})}return e})(),Jv=new Ei(``),Yv=(()=>{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 qv));this._plugins=n.slice().reverse();let r=e.find(e=>e instanceof qv);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 di(-5101,!1);return this._eventNameToPlugin.set(e,t),t}static ɵfac=function(t){return new(t||e)(ta(Jv),ta(js))};static ɵprov=yi({token:e,factory:e.ɵfac})}return e})(),Xv=`ng-app-id`;function Zv(e){for(let t of e)t.remove()}function Qv(e,t){let n=t.createElement(`style`);return n.textContent=e,n}function fre(e,t,n,r){let i=e.head?.querySelectorAll(`style[${Xv}="${t}"],link[${Xv}="${t}"]`);if(!i||i.length===0)return!1;for(let e of i)e.removeAttribute(Xv),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 $v(e,t){let n=t.createElement(`link`);return n.setAttribute(`rel`,`stylesheet`),n.setAttribute(`href`,e),n}var ey=(()=>{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,fre(e,t,this.inline,this.external)&&this.hosts.add(e.head)}addStyles(e,t){for(let t of e)this.addUsage(t,this.inline,Qv);t?.forEach(e=>this.addUsage(e,this.external,$v))}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&&(Zv(n.elements),t.delete(e)))}ngOnDestroy(){for(let[,{elements:e}]of[...this.inline,...this.external])Zv(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,Qv(t,this.doc)));for(let[t,{elements:n}]of this.external)n.push(this.addElement(e,$v(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)(ta(vs),ta(qs),ta(Zs,8),ta(Xs))};static ɵprov=yi({token:e,factory:e.ɵfac})}return e})(),ty={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`},ny=/%COMP%/g,ry=`%COMP%`,pre=`_nghost-${ry}`,mre=`_ngcontent-${ry}`,hre=!0,gre=new Ei(``,{factory:()=>hre}),_re=new Ei(``);function vre(e){return mre.replace(ny,e)}function yre(e){return pre.replace(ny,e)}function iy(e,t){return t.map(t=>t.replace(ny,e))}var ay=(()=>{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 oy(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 uy?n.applyToHost(e):n instanceof ly&&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 iu.Emulated:r=new uy(o,s,t,this.appId,c,i,a,l,this.cssVarNamespace);break;case iu.ShadowDom:return new cy(o,e,t,i,a,this.nonce,l,this.cssVarNamespace,s);case iu.ExperimentalIsolatedShadowDom:return new cy(o,e,t,i,a,this.nonce,l,this.cssVarNamespace);default:r=new ly(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)(ta(Yv),ta(Ip),ta(qs),ta(gre),ta(vs),ta(js),ta(Zs),ta(Ju,8),ta(_re,8))};static ɵprov=yi({token:e,factory:e.ɵfac})}return e})(),oy=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(ty[t]||t,e):this.doc.createElement(e)}createComment(e){return this.doc.createComment(e)}createText(e){return this.doc.createTextNode(e)}appendChild(e,t){(sy(e)?e.content:e).appendChild(t)}insertBefore(e,t,n){if(e){let r=sy(e)?e.content:e;if(n!=null&&n.parentNode!==r)throw new di(-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 di(-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=ty[r];i?e.setAttributeNS(i,t,n):e.setAttribute(t,n)}else e.setAttribute(t,n)}removeAttribute(e,t,n){if(n){let r=ty[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&(ku.DashCase|ku.Important)?e.style.setProperty(t,n,r&ku.Important?`important`:``):e.style[t]=n}removeStyle(e,t,n){let r=t.startsWith(`--`);r&&(t=t.replace(`%NS%`,this.cssVarNamespace)),r||n&ku.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=gv().getGlobalEventTarget(this.doc,e),!e))throw new di(-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 sy(e){return e.tagName===`TEMPLATE`&&e.content!==void 0}var cy=class extends oy{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=iy(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=$v(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)}},ly=class extends oy{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?iy(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&&Iu.size===0&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},uy=class extends ly{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=vre(l),this.hostAttr=yre(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}},bre=class e extends Lne{supportsDOMEvents=!0;static makeCurrent(){Ine(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=xre();return t==null?null:Sre(t)}resetBaseElement(){dy=null}getUserAgent(){return window.navigator.userAgent}getCookie(e){return ure(document.cookie,e)}},dy=null;function xre(){return dy||=document.head.querySelector(`base`),dy?dy.getAttribute(`href`):null}function Sre(e){return new URL(e,document.baseURI).pathname}var fy=[`alt`,`control`,`meta`,`shift`],Cre={"\b":`Backspace`," ":`Tab`,"":`Delete`,"\x1B":`Escape`,Del:`Delete`,Esc:`Escape`,Left:`ArrowLeft`,Right:`ArrowRight`,Up:`ArrowUp`,Down:`ArrowDown`,Menu:`ContextMenu`,Scroll:`ScrollLock`,Win:`OS`},wre={alt:e=>e.altKey,control:e=>e.ctrlKey,meta:e=>e.metaKey,shift:e=>e.shiftKey},Tre=(()=>{class e extends Kv{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(()=>gv().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.`),fy.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=Cre[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`),fy.forEach(t=>{if(t!==n){let n=wre[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)(ta(vs))};static ɵprov=yi({token:e,factory:e.ɵfac})}return e})();async function Ere(e,t,n){return Nne({rootComponent:e,...Dre(t,n)})}function Dre(e,t){return{platformRef:t?.platformRef,appProviders:[...my,...e?.providers??[]],platformProviders:py}}function Ore(){bre.makeCurrent()}function kre(){return new Us}function Are(){return Kl(document),document}var py=[{provide:Xs,useValue:dre},{provide:Ys,useValue:Ore,multi:!0},{provide:vs,useFactory:Are}],my=[{provide:Fa,useValue:`root`},{provide:Us,useFactory:kre},{provide:Jv,useClass:qv,multi:!0},{provide:Jv,useClass:Tre,multi:!0},ay,{provide:Ip,useClass:ey},{provide:ey,useExisting:Ip},Yv,{provide:np,useExisting:ay},[]];function hy(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 yy({code:i,why:_y(a.why,e),fix:_y(a.fix,e),docs:o,cause:e.cause,sources:e.sources,data:_y(a.data,e)},s);for(let e of t)e(r,n);return r};n[i]=s}return n}function Sy(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 Oy=Math.random.bind(Math),ky=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`;function Ay(e=21){let t=``,n=e;for(;n--;)t+=ky[Oy()*64|0];return t}var jy=6e4,My=e=>e,Ny=My,{clearTimeout:Py,setTimeout:Fy}=globalThis;function Iy(e,t){let{post:n,on:r,off:i=()=>{},eventNames:a=[],serialize:o=My,deserialize:s=Ny,resolver:c,bind:l=`rpc`,timeout:u=jy,proxify:d=!0}=t,f=!1,p=new Map,m,ee;async function h(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:h}=Dy(),g=Ay();s.i=g;let te;async function ne(n=s){return u>=0&&(te=Fy(()=>{try{if(t.onTimeoutError?.call(ee,e,r)!==!0)throw Error(`[birpc] timeout on calling "${e}"`)}catch(e){h(e)}p.delete(g)},u),typeof te==`object`&&(te=te.unref?.())),p.set(g,{resolve:d,reject:h,timeoutId:te,method:e}),await c(n),l}try{t.onRequest?await t.onRequest.call(ee,s,ne,d):await ne()}catch(e){if(t.onGeneralError?.call(ee,e)!==!0)throw e;return}finally{Py(te),p.delete(g)}return l}let g={$call:(e,...t)=>h(e,t,!1),$callOptional:(e,...t)=>h(e,t,!1,!0),$callEvent:(e,...t)=>h(e,t,!0),$callRaw:e=>h(e.method,e.args,e.event,e.optional),$rejectPendingCalls:ne,get $closed(){return f},get $meta(){return t.meta},$close:te,$functions:e};ee=d?new Proxy({},{get(t,n){if(Object.hasOwn(g,n))return g[n];if(n===`then`&&!a.includes(`then`)&&!(`then`in e))return;let r=(...e)=>h(n,e,!0);if(a.includes(n))return r.asEvent=r,r;let i=(...e)=>h(n,e,!1);return i.asEvent=r,i}}):g;function te(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(re)}function ne(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 re(r,...i){let a;try{a=s(r)}catch(e){if(t.onGeneralError?.call(ee,e)!==!0)throw e;return}if(a.t===`q`){let{m:r,a:s,o:u}=a,d,f,p=await(c?c.call(ee,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`?ee:e,s)}catch(e){f=e}if(a.i){if(f&&t.onFunctionError&&t.onFunctionError.call(ee,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(ee,e,r,s)!==!0)throw e}try{await n(o({t:`s`,i:a.i,e:f}),...i)}catch(e){if(t.onGeneralError?.call(ee,e,r,s)!==!0)throw e}}}else{let{i:e,r:t,e:n}=a,r=p.get(e);r&&(Py(r.timeoutId),n?r.reject(n):r.resolve(t)),p.delete(e)}}return m=r(re),ee}function Ly(e,t){return t.safety?t.safety:e===`static`||e===`query`||e==null?`read`:`action`}var Ry=Object.freeze({type:`object`,additionalProperties:!0});function zy(e){let t=e[`~standard`];if(t.jsonSchema)try{return t.jsonSchema.input({target:`draft-2020-12`})}catch{return Ry}return Ry}function By(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 Hy(e,t){return Vy(e,t)??[e]}function Uy(e){return typeof e==`string`?`'${e}'`:new qy().serialize(e)}var Wy=` _-,;:!?.'"()[]{}@*/\\&#%\`^+<=>|~$0123456789abcdefghijklmnopqrstuvwxyz`,Gy=(function(){let e=new Uint8Array(128);for(let t=0;t<69;t++)e[Wy.charCodeAt(t)]=t+1;for(let t=65;t<=90;t++)e[t]=e[t+32];return e})();function Ky(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})(),Jy=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225],Yy=[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],Xy=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_`,Zy=[],Qy=class{_data=new $y;_hash=new $y([...Jy]);_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)Zy[n]=e[t+n]|0;else{let e=Zy[n-15],t=(e<<25|e>>>7)^(e<<14|e>>>18)^e>>>3,r=Zy[n-2],i=(r<<15|r>>>17)^(r<<13|r>>>19)^r>>>10;Zy[n]=t+Zy[n-7]+i+Zy[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),ee=u+m+d+Yy[n]+Zy[n],h=p+f;u=l,l=c,c=s,s=o+ee|0,o=a,a=i,i=r,r=ee+h|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=$y.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 eb(e){return new Qy().finalize(e).toBase64()}function tb(e){return eb(Uy(e))}function nb(e){return tb(e)}function rb(){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 ib=/^[\w+.-]{2,}:\/\//;function ab(e){return e.endsWith(`/`)?e:`${e}/`}function ob(e){return(e.endsWith(`/`)?e.slice(0,-1):e)||`/`}function sb(e,...t){let n=e;for(let e of t)e&&e!==`/`&&(n=n?ab(n)+e.replace(/^\.?\//,``):e);return n}function cb(e,t){if(!t||t===`/`||ib.test(e))return e;let n=ob(t);return e.startsWith(n)?e:sb(n,e)}function lb(e,t){let n=e.match(ib);return t+(n?e.slice(n[0].length):e)}var ub=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`;function db(e=21){let t=``,n=e;for(;n--;)t+=ub[Math.random()*64|0];return t}var fb=Symbol.for(`immer-nothing`),pb=Symbol.for(`immer-draftable`),mb=Symbol.for(`immer-state`),hb=[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 gb(e,...t){{let n=hb[e],r=Bb(n)?n.apply(null,t):n;throw Error(`[Immer] ${r}`)}}var _b=Object,vb=_b.getPrototypeOf,yb=`constructor`,bb=`prototype`,xb=`configurable`,Sb=`enumerable`,Cb=`writable`,wb=`value`,Tb=e=>!!e&&!!e[mb];function Eb(e){return e?kb(e)||Ib(e)||!!e[pb]||!!e[yb]?.[pb]||Lb(e)||Rb(e):!1}var Db=_b[bb][yb].toString(),Ob=new WeakMap;function kb(e){if(!e||!zb(e))return!1;let t=vb(e);if(t===null||t===_b[bb])return!0;let n=_b.hasOwnProperty.call(t,yb)&&t[yb];if(n===Object)return!0;if(!Bb(n))return!1;let r=Ob.get(n);return r===void 0&&(r=Function.toString.call(n),Ob.set(n,r)),r===Db}function Ab(e,t,n=!0){jb(e)===0?(n?Reflect.ownKeys(e):_b.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function jb(e){let t=e[mb];return t?t.type_:Ib(e)?1:Lb(e)?2:Rb(e)?3:0}var Mb=(e,t,n=jb(e))=>n===2?e.has(t):_b[bb].hasOwnProperty.call(e,t),Nb=(e,t,n=jb(e))=>n===2?e.get(t):e[t],Pb=(e,t,n,r=jb(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n};function Fb(e,t){return e===t?e!==0||1/e==1/t:e!==e&&t!==t}var Ib=Array.isArray,Lb=e=>e instanceof Map,Rb=e=>e instanceof Set,zb=e=>typeof e==`object`,Bb=e=>typeof e==`function`,Vb=e=>typeof e==`boolean`;function Hb(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var Ub=e=>zb(e)?e?.[mb]:null,Wb=e=>e.copy_||e.base_,Gb=e=>e.modified_?e.copy_:e.base_;function Kb(e,t){if(Lb(e))return new Map(e);if(Rb(e))return new Set(e);if(Ib(e))return Array[bb].slice.call(e);let n=kb(e);if(t===!0||t===`class_only`&&!n){let t=_b.getOwnPropertyDescriptors(e);delete t[mb];let n=Reflect.ownKeys(t);for(let r=0;r1&&_b.defineProperties(e,{set:Yb,add:Yb,clear:Yb,delete:Yb}),_b.freeze(e),t&&Ab(e,(e,t)=>{qb(t,!0)},!1),e)}function Jb(){gb(2)}var Yb={[wb]:Jb};function Xb(e){return e===null||!zb(e)||_b.isFrozen(e)}var Zb=`MapSet`,Qb=`Patches`,$b=`ArrayMethods`,ex={};function tx(e){let t=ex[e];return t||gb(0,e),t}var nx=e=>!!ex[e];function rx(e,t){ex[e]||(ex[e]=t)}var ix,ax=()=>ix,ox=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:nx(Zb)?tx(Zb):void 0,arrayMethodsPlugin_:nx($b)?tx($b):void 0});function sx(e,t){t&&(e.patchPlugin_=tx(Qb),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function cx(e){lx(e),e.drafts_.forEach(dx),e.drafts_=null}function lx(e){e===ix&&(ix=e.parent_)}var ux=e=>ix=ox(ix,e);function dx(e){let t=e[mb];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function fx(e,t){t.unfinalizedDrafts_=t.drafts_.length;let n=t.drafts_[0];if(e!==void 0&&e!==n){n[mb].modified_&&(cx(t),gb(4)),Eb(e)&&(e=px(t,e));let{patchPlugin_:r}=t;r&&r.generateReplacementPatches_(n[mb].base_,e,t)}else e=px(t,n);return mx(t,e,!0),cx(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e===fb?void 0:e}function px(e,t){if(Xb(t))return t;let n=t[mb];if(!n)return Sx(t,e.handledSet_,e);if(!gx(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);bx(n,e)}return n.copy_}function mx(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&qb(t,n)}function hx(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var gx=(e,t)=>e.scope_===t,_x=[];function vx(e,t,n,r){let i=Wb(e),a=e.type_;if(r!==void 0&&Nb(i,r,a)===t){Pb(i,r,n,a);return}if(!e.draftLocations_){let t=e.draftLocations_=new Map;Ab(i,(e,n)=>{if(Tb(n)){let r=t.get(n)||[];r.push(e),t.set(n,r)}})}let o=e.draftLocations_.get(t)??_x;for(let e of o)Pb(i,e,n,a)}function yx(e,t,n){e.callbacks_.push(function(r){let i=t;if(!i||!gx(i,r))return;r.mapSetPlugin_?.fixSetContents(i);let a=Gb(i);vx(e,i.draft_??i,a,n),bx(i,r)})}function bx(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)}hx(e)}}function xx(e,t,n){let{scope_:r}=e;if(Tb(n)){let i=n[mb];gx(i,r)&&i.callbacks_.push(function(){jx(e),vx(e,n,Gb(i),t)})}else Eb(n)&&e.callbacks_.push(function(){let i=Wb(e);e.type_===3?i.has(n)&&Sx(n,r.handledSet_,r):Nb(i,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&Sx(Nb(e.copy_,t,e.type_),r.handledSet_,r)})}function Sx(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||Tb(e)||t.has(e)||!Eb(e)||Xb(e)?e:(t.add(e),Ab(e,(r,i)=>{if(Tb(i)){let t=i[mb];gx(t,n)&&(Pb(e,r,Gb(t),e.type_),hx(t))}else Eb(i)&&Sx(i,t,n)}),e)}function Cx(e,t){let n=Ib(e),r={type_:+!!n,scope_:t?t.scope_:ax(),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=wx;n&&(i=[r],a=Tx);let{revoke:o,proxy:s}=Proxy.revocable(i,a);return r.draft_=s,r.revoke_=o,[s,r]}var wx={get(e,t){if(t===mb)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=Wb(e);if(!Mb(i,t,e.type_))return Ox(e,i,t);let a=i[t];if(e.finalized_||!Eb(a)||r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&Hb(t))return a;if(a===Ex(e.base_,t)||Dx(e,t,a)){jx(e);let n=e.type_===1?+t:t,r=Nx(e.scope_,a,e,n);return e.copy_[n]=r}return a},has(e,t){return t in Wb(e)},ownKeys(e){return Reflect.ownKeys(Wb(e))},set(e,t,n){let r=kx(Wb(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){let r=Ex(Wb(e),t),i=r?.[mb];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_.delete(t),!0;if(Fb(n,r)&&(n!==void 0||Mb(e.base_,t,e.type_)))return!0;jx(e),Ax(e)}return e.copy_[t]===n&&(n!==void 0||Mb(e.copy_,t,e.type_))||Number.isNaN(n)&&Number.isNaN(e.copy_[t])?!0:(e.copy_[t]=n,e.assigned_.set(t,!0),xx(e,t,n),!0)},deleteProperty(e,t){return jx(e),Ex(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),Ax(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let n=Wb(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[Cb]:!0,[xb]:e.type_!==1||t!==`length`,[Sb]:r[Sb],[wb]:n[t]}},defineProperty(){gb(11)},getPrototypeOf(e){return vb(e.base_)},setPrototypeOf(){gb(12)}},Tx={};for(let e in wx){let t=wx[e];Tx[e]=function(){let e=arguments;return e[0]=e[0][0],t.apply(this,e)}}Tx.deleteProperty=function(e,t){return isNaN(parseInt(t))&&gb(13),Tx.set.call(this,e,t,void 0)},Tx.set=function(e,t,n){return t!==`length`&&isNaN(parseInt(t))&&gb(14),wx.set.call(this,e[0],t,n,e[0])};function Ex(e,t){let n=e[mb];return(n?Wb(n):e)[t]}function Dx(e,t,n){return e.type_!==1||!e.allIndicesReassigned_||e.assigned_?.get(t)||!Eb(n)||n[mb]?!1:e.baseRefs_.has(n)}function Ox(e,t,n){let r=kx(t,n);return r?wb in r?r[wb]:r.get?.call(e.draft_):void 0}function kx(e,t){if(!(t in e))return;let n=vb(e);for(;n;){let e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=vb(n)}}function Ax(e){e.modified_||(e.modified_=!0,e.parent_&&Ax(e.parent_))}function jx(e){e.copy_||=(e.assigned_=new Map,Kb(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Mx=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,n)=>{if(Bb(e)&&!Bb(t)){let n=t;t=e;let r=this;return function(e=n,...i){return r.produce(e,e=>t.call(this,e,...i))}}Bb(t)||gb(6),n!==void 0&&!Bb(n)&&gb(7);let r;if(Eb(e)){let i=ux(this),a=Nx(i,e,void 0),o=!0;try{r=t(a),o=!1}finally{o?cx(i):lx(i)}return sx(i,n),fx(r,i)}if(!e||!zb(e)){if(r=t(e),r===void 0&&(r=e),r===fb&&(r=void 0),this.autoFreeze_&&qb(r,!0),n){let t=[],i=[];tx(Qb).generateReplacementPatches_(e,r,{patches_:t,inversePatches_:i}),n(t,i)}return r}gb(1,e)},this.produceWithPatches=(e,t)=>{if(Bb(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]},Vb(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),Vb(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),Vb(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){Eb(e)||gb(8),Tb(e)&&(e=Px(e));let t=ux(this),n=Nx(t,e,void 0);return n[mb].isManual_=!0,lx(t),n}finishDraft(e,t){let n=e&&e[mb];(!n||!n.isManual_)&&gb(9);let{scope_:r}=n;return sx(r,t),fx(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=tx(Qb).applyPatches_;return Tb(e)?r(e,t):this.produce(e,e=>r(e,t))}};function Nx(e,t,n,r){let[i,a]=Lb(t)?tx(Zb).proxyMap_(t,n):Rb(t)?tx(Zb).proxySet_(t,n):Cx(t,n);return(n?.scope_??ax()).drafts_.push(i),a.callbacks_=n?.callbacks_??[],a.key_=r,n&&r!==void 0?yx(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 Px(e){return Tb(e)||gb(10,e),Fx(e)}function Fx(e){if(!Eb(e)||Xb(e))return e;let t=e[mb],n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Kb(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=Kb(e,!0);let i=n;return Rb(n)&&(n=new Set),Ab(i,(e,t)=>{Pb(n,e,Fx(t))},r),t&&(t.finalized_=!1),n}function Ix(){hb.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=Ub(Nb(e,n.key_)),i=Nb(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||Mb(e,o))||n.parent_.type_===1&&n.parent_.allIndicesReassigned_)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=Nb(o,e,c),f=Nb(s,e,c),p=l?Mb(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===fb?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(Rb(e))return new Set(Array.from(e).map(u));let t=Object.create(vb(e));for(let n in e)t[n]=u(e[n]);return Mb(e,pb)&&(t[pb]=e[pb]),t}function d(e){return Tb(e)?u(e):e}rx(Qb,{applyPatches_:l,generatePatches_:i,generateReplacementPatches_:c,getPath:e})}globalThis.Iterator?.from;var Lx=new Mx,Rx=Lx.produce,zx=Lx.produceWithPatches.bind(Lx),Bx=Lx.applyPatches.bind(Lx),Vx=1e3;function Hx(e,t){if(e.add(t),e.size>Vx){let t=e.values().next().value;t!==void 0&&e.delete(t)}}function Ux(e){let{enablePatches:t=!1}=e;t&&Ix();let n=rb(),r=e.initialValue,i=new Set;return{on:n.on,value:()=>r,patch:(e,t=db())=>{i.has(t)||(Ix(),r=Bx(r,e),Hx(i,t),n.emit(`updated`,r,void 0,t))},mutate:(e,a=db())=>{if(!i.has(a)){if(Hx(i,a),t){let[t,i]=zx(r,e);if(t===r)return;r=t,n.emit(`updated`,r,i,a)}else{let t=Rx(r,e);if(t===r)return;r=t,n.emit(`updated`,r,void 0,a)}}},syncIds:i}}var Wx=typeof self==`object`?self:globalThis,Gx=new Set([`Error`,`EvalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`,`AggregateError`]),Kx=new Set([`Boolean`,`Number`,`String`,`Int8Array`,`Uint8Array`,`Uint8ClampedArray`,`Int16Array`,`Uint16Array`,`Int32Array`,`Uint32Array`,`Float16Array`,`Float32Array`,`Float64Array`,`BigInt64Array`,`BigUint64Array`]);function qx(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=Gx.has(e)?Wx[e]:void 0;return n(new(r??Wx.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`&&Kx.has(a))return n(new Wx[a](o),i);throw TypeError(`unable to deserialize unsafe or unknown type: ${String(a)}`)};return r}function Jx(e){return qx(new Map,e)(0)}var Yx=``,{toString:Xx}={},{keys:Zx}=Object;function Qx(e){let t=typeof e;if(t!==`object`||!e)return[0,t];let n=Xx.call(e).slice(8,-1);switch(n){case`Array`:return[1,Yx];case`Object`:return[2,Yx];case`Date`:return[3,Yx];case`RegExp`:return[4,Yx];case`Map`:return[5,Yx];case`Set`:return[6,Yx];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:n.includes(`Error`)?[7,n]:[2,n]}function $x([e,t]){return e===0&&(t===`function`||t===`symbol`)}function eS(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]=Qx(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 Zx(r))(e||!$x(Qx(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||!($x(Qx(n))||$x(Qx(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!$x(Qx(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a}function tS(e,t={}){let n=[];return eS(!(t.json||t.lossy),!!t.json,new Map,n)(e),n}var{parse:nS,stringify:rS}=JSON,iS={json:!0,lossy:!0};function aS(e){return Jx(nS(e))}function oS(e){return rS(tS(e,iS))}function sS(e){return Jx(e)}function cS(e){return oS(e)}function lS(e){return aS(e)}var uS=256,dS=class extends Error{name=`StreamClosedError`};function fS(e={}){let t=e.id??db(),n=Math.max(0,e.replayWindow??0),r=rb(),i=new AbortController,a=[],o=!1,s=0;function c(e){if(o)throw new dS(`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=mS(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 pS(e={}){let t=e.id??db(),n=Math.max(1,e.highWaterMark??uS),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 ee(){o||a||(o=!0,e.onCancel?.(),m(void 0))}function h(){return u||(u=new ReadableStream({start(e){l=e,f()},cancel(){ee()}}),u)}return{id:t,get cancelled(){return o},get done(){return a},get lastSeenSeq(){return i},get readable(){return h()},cancel:ee,_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 ee(),Promise.resolve({value:void 0,done:!0})}}}}}function mS(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 hS=128;function gS(e){return e.replace(/[^\w-]+/g,`_`).slice(0,hS)}var _S=`modulepreload`,vS=function(e,t){return new URL(e,t).href},yS={},bS=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=vS(t,n),t=s(t),t in yS)return;yS[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`:_S,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)})},xS=`__connection.json`,SS=`__DEVFRAME_CONNECTION__`,CS=`x-birpc-session`,wS=`__rpc-dump/index.json`,TS=`devframe:services`,ES=`devframe_otp`,DS=`devframe_auth_token`;Cy.postMessage.remoteAssetsError;var OS=class{cacheMap=new Map;options;keySerializer;constructor(e){this.options=e,this.keySerializer=e.keySerializer||(e=>nb(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()}},kS=Ey({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 AS(e){if(e.agent&&e.jsonSerializable===!1)throw kS.DF0019({name:e.name});e.agent&&!e.jsonSerializable&&(e.jsonSerializable=!0)}async function jS(e,t){let n=e[`~standard`].validate(t);return n instanceof Promise?await n:n}function MS(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 NS(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 IS(e,t){let n=e.handler;if(!n){let r=await FS(e,t);if(!r.handler)throw kS.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 NS(e.name,r,t),o=await a(...n);return await PS(e.name,i,o)}}var LS=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 IS(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 kS.DF0021({name:e.name});AS(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 kS.DF0022({name:e.name});AS(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 IS(this.definitions.get(e),this.context)}getSchema(e){let t=this.definitions.get(e);if(!t)throw kS.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 RS(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 BS(t,`undefined`,r,e);return n}return i!==null&&zS(i,r,e,t),n})}function zS(e,t,n,r){if(typeof e==`bigint`)throw BS(r,`BigInt`,t,n);if(typeof e!=`object`)return;if(e instanceof Map)throw BS(r,`Map`,t,n);if(e instanceof Set)throw BS(r,`Set`,t,n);if(e instanceof Date)throw BS(r,`Date`,t,n);if(Array.isArray(e))return;let i=Object.getPrototypeOf(e);if(i!==null&&i!==Object.prototype)throw BS(r,e.constructor?.name??`class instance`,t,n)}function BS(e,t,n,r){let i=VS(n,r);return kS.DF0020({name:e||``,type:t,path:i})}function VS(e,t){return Array.isArray(e)?`[${t}]`:t===``?``:t}var HS=`__DEVFRAME_CONNECTION_META__`,US=`__DEVFRAME_CONNECTION_AUTH_TOKEN__`;function WS(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 GS(){return WS(SS)}function KS(){return WS(HS)}function qS(e){if(e)return e;try{let e=localStorage.getItem(US);if(e)return e}catch{}return WS(US)}function JS(e){globalThis[SS]=e,globalThis[HS]={...e.connectionMeta,baseUrl:e.metaBaseUrl},e.authToken&&YS(e.authToken)}function YS(e){try{localStorage.setItem(US,e)}catch{}globalThis[US]=e;let t=GS();t&&(globalThis[SS]={...t,authToken:e})}function XS(e){let t=cb(xS,e);try{return new URL(t,globalThis.location?.href).href}catch{return t}}function ZS(e,t){return t&&t!==e.authToken?{...e,authToken:t}:e}function QS(){let e=GS();if(e)return ZS(e,qS()??e.authToken??e.connectionMeta.authToken);let t=KS();if(t)return{connectionMeta:t,metaBaseUrl:t.baseUrl??XS(`./`),authToken:qS(t.authToken)}}async function $S(e={}){if(e.connection){let t=ZS(e.connection,qS(e.authToken??e.connection.authToken??e.connection.connectionMeta.authToken));return JS(t),t}let t=Array.isArray(e.baseURL)?e.baseURL:[e.baseURL??`./`];if(e.connectionMeta){let n={connectionMeta:e.connectionMeta,metaBaseUrl:XS(t[0]??`./`),authToken:qS(e.authToken??e.connectionMeta.authToken)};return JS(n),n}let n=QS();if(n){let t=ZS(n,qS(e.authToken??n.authToken??n.connectionMeta.authToken));return JS(t),t}let r=[];for(let n of t){let t=cb(xS,n),i=XS(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:qS(e.authToken??r.authToken)};return JS(o),o}catch(e){r.push(e)}}throw Error(`Failed to get connection meta from ${t.join(`, `)}`,{cause:r})}var eC=class extends Error{name=`DevframeConnectionError`;kind;constructor(e,t,n){super(t,n),this.kind=e}};function tC(e=ES){try{let t=globalThis.location?.hash?.replace(/^#/,``)??``;return new URLSearchParams(t).get(e)||void 0}catch{return}}function nC(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 rC(e=ES){let t=tC(e);return t&&nC(e),t}async function iC(e,t={}){let n=rC(t.param??`devframe_otp`);return n?e.isTrusted?!0:e.requestTrustWithCode(n):!1}function aC(e){let t={},n=new WeakMap,r,i=()=>(r??=e.sharedState.get(TS,{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 oC(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:Cy.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:Cy.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=Ux({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,n)=>{if(e.isTrusted)d().then(t,n);else{t(u);let n=!1;e.events.on(Cy.client.isTrustedUpdated,e=>{e&&!n&&(n=!0,d())})}})}}}var sC=new Map;function cC(e=sC){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?RS(n,r??``):`s:${cS(n)}`},deserialize:e=>{let n=e.startsWith(`s:`)?lS(e.slice(2)):JSON.parse(e);return n.t===`q`&&n.i&&n.m&&t.set(n.i,n.m),n}}}function lC(){}function uC(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 dC(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 fC(e){let{onConnected:t=lC,onError:n=lC,onDisconnected:r=lC,definitions:i,fetch:a=globalThis.fetch.bind(globalThis)}=e,o=e.url;e.authToken&&(o=`${o}${o.includes(`?`)?`&`:`?`}${DS}=${encodeURIComponent(e.authToken)}`);let s=cC(i),c=new AbortController,l=!1,u,d,f,p,m=new Promise((e,t)=>{f=e,p=t});m.catch(()=>{});function ee(e){l||(l=!0,p(e),n(e),r())}function h(){l||(l=!0,p(Error(`Devframe SSE stream closed`)),r())}function g(e,n){if(e===`session`){f(n),t();return}u?.(n)}async function te(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=uC(r);if(!e)break;r=e.rest;let{event:t,data:n}=dC(e.frame);n.length>0&&g(t,n.join(` -`))}}h()}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 te(e.body)}catch(e){if(c.signal.aborted){h();return}ee(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`,[CS]: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 pC(e,t){let{channel:n,rpcOptions:r={}}=t;return Iy(e,{...n,timeout:-1,...r,proxify:!1})}function mC(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(Cy.client.connectionStatus,e,n)}let p=new Set;function m(e){for(let t of[...p])t.reject(e)}function ee(){return l===`disconnected`||l===`error`?new eC(`connection`,`[devframe] Not connected to the devframe server`,{cause:u??void 0}):l===`unauthorized`?new eC(`auth`,`[devframe] Not authorized by the devframe server`,{cause:u??void 0}):null}function h(e,t){return new Promise((n,r)=>{let a=!1,o,c={reject(e){a||(l(),i.emit(Cy.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 eC(`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(Cy.client.error,n,t),r(n)})})}let g=new Map;for(let e of r.jsonSerializableMethods??[])g.set(e,{jsonSerializable:!0});let te=e.createChannel({definitions:g,onError(e){f(`error`,e),i.emit(Cy.client.connectionError,e),m(new eC(`connection`,`[devframe] Connection to the devframe server failed`,{cause:e}))},onDisconnected(){l!==`error`&&f(`disconnected`),m(new eC(`connection`,`[devframe] Disconnected from the devframe server`,{cause:u??void 0}))}}),ne=pC(a.functions,{channel:te,rpcOptions:o});a.register({name:Cy.broadcast.authRevoked,type:`event`,handler:()=>{c=!1;let e=new eC(`auth`,`[devframe] The devframe server revoked this client's trust`);f(`unauthorized`,e),i.emit(Cy.client.connectionError,e),m(e),i.emit(Cy.client.isTrustedUpdated,!1)}});let re=n;async function ie(e){re=e;let t=await ne.$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 eC(`auth`,`[devframe] The devframe server refused this client's credentials`);f(`unauthorized`,e),i.emit(Cy.client.connectionError,e)}return i.emit(Cy.client.isTrustedUpdated,c),t.isTrusted}async function ae(e){let t=(await ne.$call(`anonymous:devframe:auth:exchange`,{code:e,ua:navigator.userAgent,origin:location.origin}))?.authToken??null;return t&&(re=t,c=!0,d.resolve(!0),f(`connected`),i.emit(Cy.client.isTrustedUpdated,!0)),t}async function oe(e={}){await ne.$call(`anonymous:devframe:auth:request-code`,{ua:navigator.userAgent,origin:location.origin,...e.reissue?{reissue:!0}:{}})}async function se(){return c?!0:ie(re??``)}async function ce(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:se,requestTrustWithToken:ie,requestTrustWithCode:ae,requestAuthCode:oe,ensureTrusted:ce,call:(...e)=>{let t=String(e[0]),n=ee();return n?(i.emit(Cy.client.error,n,t),Promise.reject(n)):h(ne.$call(...e),t)},callEvent:(...e)=>{let t=ee();if(t){i.emit(Cy.client.error,t,String(e[0]));return}return ne.$callEvent(...e)},callOptional:(...e)=>{let t=String(e[0]),n=ee();return n?(i.emit(Cy.client.error,n,t),Promise.reject(n)):h(ne.$callOptional(...e),t)},close:()=>{te.close()}}}function hC(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 gC(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},sseOptions:s={},callTimeout:c=0}=e,l=hC(n.sse,r??`./`,location);return mC({transport:`sse`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>fC({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 _C(e){let{name:t,message:n,cause:r,...i}=e,a=r instanceof Error?r:vC(r)?_C(r):r,o=a===void 0?Error(n):Error(n,{cause:a});return o.name=t,Object.assign(o,i),o}function vC(e){return typeof e==`object`&&!!e&&typeof e.message==`string`&&typeof e.name==`string`}function yC(e){return typeof e==`object`&&!!e&&e.type===`static`&&typeof e.path==`string`}function bC(e){return typeof e==`object`&&!!e&&e.type===`query`&&typeof e.records==`object`&&e.records!==null}function xC(e){return typeof e==`object`&&!!e&&(`output`in e||`error`in e)}function SC(e){if(e.error)throw _C(e.error);return e.output}function CC(e){return e.some(e=>e!=null)}function wC(e){return typeof e==`object`&&e&&`serialization`in e&&`data`in e?e.data:e}function TC(e,t){let n=new Map,r=new Map;function i(e,t){return t===`structured-clone`&&Array.isArray(e)?sS(e):e}function a(e,t){return i(wC(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 xC(r)?SC(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(yC(r)){if(CC(n))throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`);return await o(r)}if(bC(r)){let e=nb(n),i=r.records[e];if(i)return SC(await s(i,r.serialization));if(r.fallback)return SC(await s(r.fallback,r.serialization));throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`)}if(!CC(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 EC(e){let t=TC(await e.fetchJsonFromBases(wS),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 DC=``;function OC(e,t){return`${e}${DC}${t}`}function kC(e){let t=new Map,n=new Map;e.client.register({name:Cy.broadcast.streamingChunk,type:`event`,handler(e,n,r,i){t.get(OC(e,n))?._push(r,i)}}),e.client.register({name:Cy.broadcast.streamingEnd,type:`event`,handler(e,n,r){let i=OC(e,n),a=t.get(i);a&&(a._end(r),t.delete(i))}}),e.client.register({name:Cy.broadcast.streamingUploadCancel,type:`event`,handler(e,t){let r=OC(e,t),i=n.get(r);i&&(i.abort(`server cancelled upload`),n.delete(r))}}),e.events.on(Cy.client.isTrustedUpdated,n=>{if(n)for(let[n,r]of t){if(r.cancelled||r.done)continue;let t=n.indexOf(DC);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=OC(n,r),o=t.get(a);if(o)return o;let s=pS({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(Cy.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=OC(t,r),a=n.get(i);if(a)return a;let o=fS({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 AC(){}var jC=new Map;function MC(e){let t=e.url;e.authToken&&(t=`${t}?${DS}=${encodeURIComponent(e.authToken)}`);let n=new WebSocket(t),{onConnected:r=AC,onError:i=AC,onDisconnected:a=AC,definitions:o=jC}=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=cC(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 NC(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 lb(a,/^https/i.test(a)?`wss://`:`ws://`);let o=new URL(a,r);return o.protocol=i,o.href}function PC(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},wsOptions:s={},callTimeout:c=0}=e,l=NC(n.websocket,r??`./`,location);return mC({transport:`websocket`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>MC({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 FC(e){return e.includes(`:`)}function IC(e,t){return FC(t)?t:`${e}:${t}`}function LC(e){return{async get(t){return(await e()).value()?.[t]},async set(t,n){(await e()).mutate(e=>{if(e===void 0)return{[t]:n};e[t]=n})},async delete(t){(await e()).mutate(e=>{e!==void 0&&delete e[t]})},async all(){return(await e()).value()??{}},async onChange(t){return(await e()).on(`updated`,e=>t(e??{}))}}}function RC(e,t,n){let r=`devframe:settings:${n}:${t}`,i;function a(){return i||=(async()=>(await e.ensureTrusted(),e.sharedState.get(r)))().catch(e=>{throw i=void 0,e}),i}return LC(a)}function zC(e,t){return{global:RC(e,t,`global`),project:RC(e,t,`project`)}}function BC(e,t){return{namespace:t,base:e,rpc:{namespace:t,register(n){if(FC(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(IC(t,n),...r)),callEvent:((n,...r)=>e.callEvent(IC(t,n),...r)),callOptional:((n,...r)=>e.callOptional(IC(t,n),...r)),sharedState:((n,r)=>e.sharedState.get(IC(t,n),r)),streaming:{subscribe:(n,r,i)=>e.streaming.subscribe(IC(t,n),r,i),upload:(n,r)=>e.streaming.upload(IC(t,n),r)}},settings:zC(e,t),scope:e.scope}}function VC(){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 HC(e,t={}){let n=t.modelContext??VC();if(!n)return()=>{};let r=n,i=new Map,a=new Map;function o(t,n){let o=gS(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=Ly(t.type,n),u=r.registerTool({name:o,description:n.description,inputSchema:By(t.args),annotations:{title:n.title??t.name,readOnlyHint:l===`read`,destructiveHint:l===`destructive`},execute:n=>UC(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 UC(e,t,n){try{let r=Hy(n,e.args?.length);return{content:[{type:`text`,text:WC(await(await IS(e,t))(...r))}]}}catch(e){return{isError:!0,content:[{type:`text`,text:GC(e)}]}}}function WC(e){return e===void 0?`undefined`:typeof e==`string`?e:JSON.stringify(e,null,2)}function GC(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 KC(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 qC(e={}){let{baseURL:t=`./`,rpcOptions:n={},cacheOptions:r=!1}=e,i=rb(),a=Array.isArray(t)?t:[t],o=await $S(e),{connectionMeta:s,metaBaseUrl:c,authToken:l}=o,u=a[0]??`./`;try{u=new URL(`.`,c).href}catch{}let d=new OS({functions:[],...typeof e.cacheOptions==`object`?e.cacheOptions:{}}),f={rpc:void 0},p=new LS(f),m=e.webmcp===!1?void 0:HC(p),ee,h=!1,g=0,te;function ne(){g++,te=void 0,d.clear(),r===!0&&d.updateOptions({functions:[]})}r&&(p.register({name:Cy.broadcast.cacheInvalidate,type:`event`,handler:ne}),i.on(Cy.client.connectionStatus,ne),i.on(Cy.client.isTrustedUpdated,ne));async function re(e){let t=[u,...a.filter(e=>e!==u)].filter(e=>e!=null),n=[];for(let r of t)try{return await fetch(cb(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 ie=e.callTimeout??0,ae=ie>0?ie:1/0,oe,se={authToken:l,connectionMeta:s,metaBaseUrl:c,events:i,clientRpc:p,callTimeout:e.callTimeout,rpcOptions:{...n,async onRequest(e,t,i){let a=performance.now()+ae;if(await n.onRequest?.call(this,e,t,i),r===!0&&e.i&&oe.isTrusted&&!e.m.startsWith(`anonymous:`)&&e.m!==`devframe:rpc:cacheable-functions`){function t(){if(performance.now()>=a)throw new eC(`timeout`,`[devframe] RPC call "${e.m}" timed out after ${ie}ms`)}for(;!te&&(t(),!(h||oe.status!==`connected`));){let e=g;te=oe.callOptional(`devframe:rpc:cacheable-functions`).then(t=>{e===g&&d.updateOptions({functions:t??[]})}).catch(t=>{throw e===g&&(te=void 0),t}),await te}await te,t()}let o=g;if(r&&e.i&&!h&&oe.isTrusted&&d.validate(e.m)){if(d.has(e.m,e.a))return i(d.cached(e.m,e.a));let n=await t(e);o===g&&!h&&d.apply(e,n)}else await t(e)}}},ce=KC(e.transport??`auto`,s);oe=ce===`static`?await EC({fetchJsonFromBases:re}):ce===`sse`?gC({...se,sseOptions:e.sseOptions}):PC({...se,wsOptions:e.wsOptions});let le;try{le=new BroadcastChannel(`devframe-auth`)}catch{}let ue,de=!1;function fe(e){return((...t)=>de||!ue?e(...t):ue.then(()=>e(...t)))}function pe(){h=!0,ne();try{ee?.(),m?.()}finally{try{le?.close()}finally{oe.close?.()}}}let me={events:i,get isTrusted(){return oe.isTrusted},get status(){return oe.status},get connectionError(){return oe.connectionError},get transport(){return oe.transport??ce},get connection(){return o},connectionMeta:s,ensureTrusted:oe.ensureTrusted,requestTrust:oe.requestTrust,requestTrustWithToken:async e=>(YS(e),o={...o,authToken:e},oe.requestTrustWithToken(e)),requestTrustWithCode:async e=>{let t=await oe.requestTrustWithCode(e);if(!t)return!1;YS(t),o={...o,authToken:t};try{le?.postMessage({type:`auth-update`,authToken:t})}catch{}return!0},requestAuthCode:e=>oe.requestAuthCode(e),call:fe(oe.call),callEvent:fe(oe.callEvent),callOptional:fe(oe.callOptional),client:p,sharedState:void 0,services:void 0,streaming:void 0,cacheManager:d,scope:void 0,close:pe};me.sharedState=oC(me),me.streaming=kC(me),me.services=aC(me);let he=new Map;me.scope=(e=>{if(!e)return me;let t=he.get(e);return t||(t=BC(me,e),he.set(e,t)),t}),f.rpc=me;function ge(){try{return typeof window<`u`&&window.self===window.top}catch{return!1}}async function _e(){if(e.simpleAuth!==!1&&ge()&&typeof globalThis.prompt==`function`)for(await me.requestAuthCode().catch(()=>{});!me.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 me.requestTrustWithCode(t))return}}async function ve(){let t=await oe.requestTrust(),n=e.otpParam??`devframe_otp`,r=n?await iC(me,{param:n}):!1;t||r||me.isTrusted||await _e()}return ue=ve().then(()=>{de=!0},()=>{de=!0}),s.mcp&&bS(async()=>{let{setupBrowserAgentRpcBridge:e}=await import(`./browser-agent-rpc-KH4HHvHf-aajacf2X.js`);return{setupBrowserAgentRpcBridge:e}},[],import.meta.url).then(({setupBrowserAgentRpcBridge:e})=>{h||(ee=e(me))}).catch(()=>{}),le&&(le.onmessage=e=>{e.data?.type===`auth-update`&&e.data.authToken&&me.requestTrustWithToken(e.data.authToken)}),me}var JC=qC,YC=[`components`,`injectors`,`signals`,`ngrx`,`tanstackQuery`,`forms`,`router`,`pipes`,`http`,`analog`,`capacitor`,`errors`,`plugins`],XC=[`angular`,`ngrx`,`analog`,`angular-native`,`nativescript`,`capacitor`];function ZC(e){return`pangular:${e}`}var QC=[`forms`,`router`,`ngrx`,`http`,`analog`,`components`,`tanstackQuery`,`plugins`],$C={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},cdSlowMs:{default:16,min:1,max:1e3},capacitorCalls:{default:200,min:10,max:2e3},idleAfterMs:{default:6e4,min:0,max:6e5}},ew={"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`,filter:`the transferCache filter passed to withPangular() left it out`,"cache-off-or-filter":`the transfer cache is off, or its filter (or another withHttpTransferCacheOptions setting) left it out`},tw=[[0,`Network error (offline)`],[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 nw(e){return tw.some(([t])=>t===e)}var rw=/^[a-z][a-z0-9-]{0,39}$/;function iw(e,t){let n=t.plugins?.[e],r=t.inspectors.plugins&&rw.test(e)&&(n?.enabled??!0);return{enabled:r,tools:r&&t.agent.tools.plugins&&(n?.tools??!0),actions:r&&t.actions.plugins&&(n?.actions??!0)}}var aw=`pangular`,ow={mod:`Mod`,ctrl:`Ctrl`,control:`Ctrl`,meta:`Meta`,cmd:`Meta`,command:`Meta`,alt:`Alt`,option:`Alt`,opt:`Alt`,shift:`Shift`},sw=[`Mod`,`Ctrl`,`Meta`,`Alt`,`Shift`];function cw(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=ow[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[...sw.filter(e=>n.has(e)),r].join(`+`)}function lw(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 uw(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 dw=[{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:`queries`,label:`Queries`,inspector:`tanstackQuery`},{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`},{id:`plugins`,label:`Plugins`,inspector:`plugins`}],fw=1e4;function pw(e){return dw.filter(t=>!(`inspector`in t)||e.inspectors[t.inspector])}var mw={components:`a component instance, by its id in the component tree`,injectors:`a component's element injector, by the component's id`,signals:`a component's signal graph, by the component's id`,forms:`a form, by its id`},hw=200;function gw(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 _w(e){let t=new URLSearchParams(e.replace(/^#/,``)),n=e=>{let n=t.get(e)?.trim();return n&&n.length<=hw?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 vw=[{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 yw(e){let t=pw(e).map(e=>({id:`tab:${e.id}`,title:`Go to ${e.label}`,group:`Go to`,keywords:`tab open`})),n=vw.filter(t=>!t.inspector||e.inspectors[t.inspector]).map(({inspector:e,...t})=>t);return[...t,...n]}function bw(e){return e&&typeof e==`object`&&!Array.isArray(e)?e:{}}var xw=Object.freeze({minLength:24,threshold:4.5}),Sw={min:16,max:512},Cw={min:2,max:6};function ww(e){return typeof e==`number`&&Number.isInteger(e)&&e>=Sw.min&&e<=Sw.max}function Tw(e){return typeof e==`number`&&Number.isFinite(e)&&e>=Cw.min&&e<=Cw.max}function Ew(e){if(e===!0)return{...xw};if(!e||typeof e!=`object`||Array.isArray(e))return;let{minLength:t,threshold:n}=e;return{minLength:ww(t)?t:xw.minLength,threshold:Tw(n)?n:xw.threshold}}function Dw(e){let t=Ew(e);return t?{entropy:t}:{}}function Ow(e,t){return typeof e==`boolean`?e:t}var kw=100,Aw=100;function jw(e){if(!Array.isArray(e))return[];let t=e.filter(e=>typeof e==`string`).map(e=>e.trim()).filter(e=>e&&e.length<=Aw);return[...new Set(t)].slice(0,kw)}function Mw(e,t){let{default:n,min:r,max:i}=$C[t];return typeof e!=`number`||!Number.isFinite(e)?n:Math.min(i,Math.max(r,Math.round(e)))}function Nw(e,t){return Object.fromEntries(e.map(e=>[e,t(e)]))}function Pw(e){let t=bw(e),n=bw(t.agent),r=bw(t.inspectors),i=bw(n.tools),a=bw(t.actions),o=Ow(t.actions,!0),s=bw(t.redaction),c=bw(t.limits),l=Nw(YC,e=>Ow(r[e],!0));return{inspectors:l,agent:{readOnly:Ow(n.readOnly,!1),tools:Nw(YC,e=>l[e]&&Ow(i[e],!0)),browserTools:Ow(n.browserTools,!1)},actions:Nw(QC,e=>l[e]&&Ow(a[e],o)),redaction:{secretNames:jw(s.secretNames),unmask:jw(s.unmask),...Dw(s.entropy)},limits:Object.fromEntries(Object.keys($C).map(e=>[e,Mw(c[e],e)])),popup:{hotkey:Vw(bw(t.popup).hotkey)},plugins:Bw(t.plugins),lint:{rules:Rw(t.lint)},analog:Iw(t.analog),ngrx:{trace:Ow(bw(t.ngrx).trace,!1)}}}var Fw=500;function Iw(e){let t=bw(e).contentSchema;return typeof t==`string`&&t.trim()&&t.length<=Fw?{contentSchema:t.trim()}:{}}var Lw=200;function Rw(e){let t=bw(bw(e).rules),n={};for(let[e,r]of Object.entries(t).slice(0,Lw))typeof r==`boolean`&&(n[e]=r);return n}var zw=100;function Bw(e){let t={};for(let[n,r]of Object.entries(bw(e)).slice(0,zw)){if(!rw.test(n))continue;if(typeof r==`boolean`){t[n]={enabled:r,tools:!0,actions:!0};continue}let e=bw(r);r!==void 0&&Object.keys(e).length&&(t[n]={enabled:Ow(e.enabled,!0),tools:Ow(e.tools,!0),actions:Ow(e.actions,!0)})}return t}function Vw(e){return e===!1?!1:cw(e)??`Alt+Shift+P`}function Hw(e){let t=e?.configs;return Pw(t?.[aw])}function Uw(e){return`${{forms:`Writing to forms`,router:`Navigating and clearing navigations`,ngrx:`Restoring NgRx state, dispatching actions and changing the Store DevTools history`,http:`Changing HTTP mock rules and SSR overrides, and clearing HTTP calls`,analog:`Calling API routes, clearing server calls, running Nitro tasks and purging the Nitro cache`,components:`Editing component properties and signals`,tanstackQuery:`Invalidating and refetching TanStack queries`,plugins:`Running plugin actions`}[e]} is turned off in the devtools config (actions.${e}).`}var Ww=[`pangular:build-meta`],Gw={components:`Components`,injectors:`Injectors`,signals:`Signals`,ngrx:`NgRx`,tanstackQuery:`TanStack Query`,forms:`Forms`,router:`Router`,pipes:`Pipes`,http:`HTTP`,analog:`Analog`,capacitor:`Capacitor`,errors:`Errors`,plugins:`Plugins`},Kw={forms:`Form writes`,router:`Navigation`,ngrx:`NgRx restore, dispatch and Store DevTools`,http:`HTTP mocking`,analog:`Analog API calls`,components:`Component edits`,tanstackQuery:`TanStack Query invalidate and refetch`,plugins:`Plugin actions`},qw={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`,cdSlowMs:e=>`slow cycles over ${e} ms`,capacitorCalls:e=>`${e} Capacitor plugin calls`,idleAfterMs:e=>e?`idle ${e/1e3} s after the last agent call`:`never idle`};function Jw(e){if(!e)return[];let t=[`On`];return e.minLength!==xw.minLength&&t.push(`${e.minLength} characters or more`),e.threshold!==xw.threshold&&t.push(`up to ${e.threshold} bits per character`),t}function Yw(e){let t=[],n=(e,n)=>{n.length&&t.push({label:e,value:n.join(`, `)})},r=YC.filter(t=>e.inspectors[t]);n(`Inspectors off`,YC.filter(t=>!e.inspectors[t]).map(e=>Gw[e])),n(`Agent`,e.agent.readOnly?[`Read-only`]:[]),n(`Hidden from the agent`,r.filter(t=>!e.agent.tools[t]).map(e=>Gw[e])),n(`Blocked actions`,QC.filter(t=>e.inspectors[t]&&!e.actions[t]).map(e=>Kw[e])),n(`Extra secret names`,e.redaction.secretNames),n(`Unmasked names`,e.redaction.unmask),n(`Entropy masking`,Jw(e.redaction.entropy)),n(`Limits`,Object.keys($C).filter(t=>e.limits[t]!==$C[t].default).map(t=>qw[t](e.limits[t]))),e.popup.hotkey!==`Alt+Shift+P`&&n(`Popup shortcut`,[e.popup.hotkey===!1?`Off`:e.popup.hotkey]);let i=Object.entries(e.plugins??{});return n(`Plugins off`,i.filter(([,e])=>!e.enabled).map(([e])=>e)),n(`Plugin tools or actions off`,i.filter(([,e])=>e.enabled&&(!e.tools||!e.actions)).map(([e,t])=>`${e} (${[!t.tools&&`tools`,!t.actions&&`actions`].filter(Boolean).join(`, `)})`)),n(`Lint rules off`,Object.entries(e.lint?.rules??{}).filter(([,e])=>!e).map(([e])=>e)),t}function Xw(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 Zw(e){return!e.tags.length&&!e.directives.length&&!e.text}function Qw(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 $w={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 eT(e){let t=/^(\d+)\.(\d+)/.exec(e.trim());return t?`${t[1]}.${t[2]}`:e.trim()}function tT(e){let t=/^(\d+)(?:\.(\d+))?/.exec(e.trim());return t?[Number(t[1]),Number(t[2]??0)]:null}function nT(e,t){let n=tT(e),r=tT(t);return!n||!r?!1:n[0]===r[0]?n[1]>=r[1]:n[0]>r[0]}function rT(e,t){return e?.capabilities?.[t]===!1}function iT(e,t){let n=$w[e],r=`${n.subject} needs Angular ${n.since} or later`;if(!t)return`${r}; this page's Angular version is unknown.`;let i=eT(t);return nT(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}.`}function aT(e){return e.hydration===`hydrated`&&e.hydratedAt===void 0?`hydrated before inspection`:e.hydration}var oT=/^on (viewport|interaction|hover)\b/;function sT(e){let t=e.filter(e=>!/^(prefetch|hydrate) /.test(e));return t.length>0&&t.every(e=>oT.test(e))}function cT(e,t){let n=[],r=e.since>0?Math.max(0,Math.round((t-e.since)/1e3)):0;return e.state===`error`&&n.push({kind:`failed`,text:`failed to load`,label:`failed`}),(e.state===`placeholder`||e.state===`initial`)&&r*1e3>=1e4&&n.push(sT(e.triggers)?{kind:`waiting`,text:`waiting for its trigger for ${r}s`,label:`waiting ${r}s`,seconds:r}:{kind:`stuck`,text:`on its placeholder for ${r}s`,label:`stuck ${r}s`,seconds:r}),e.hydrateNever?n.push({kind:`hydrate-never`,text:`hydrate never: the server HTML stays static`,label:`hydrate never`}):e.hydration===`dehydrated`&&n.push({kind:`dehydrated`,text:`still dehydrated`,label:`dehydrated`}),n}var lT=`pangular-page-id`,uT=null;function dT(e){uT=e}function fT(){if(uT)return uT;try{return new URLSearchParams(location.search).get(`pageId`)||(window.top===window?null:sessionStorage.getItem(lT)||null)}catch{return null}}function pT(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 mT(e,t){return e?t?e.pages?.[t]??null:e:null}function hT(e,t){return e?t?e.pages?.[t]??null:e.graph??null:null}function gT(){return{functions:[...Ww]}}function _T(e,t,n){return e?e.scope(`pangular`).rpc.call(t,...n===void 0?[]:[n]):Promise.resolve(null)}function vT(e,t,n){return _T(e,t,n).then(e=>e,()=>null)}function yT(e){return e?.connectionMeta.backend===`static`}function bT(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 xT(e=globalThis){delete e.__DEVFRAME_CONNECTION__,delete e.__DEVFRAME_CONNECTION_META__}function ST(e){return e.split(`@`)[1]??``}var CT={signal:`Signal Forms`,reactive:`Reactive`,template:`Template-driven`},wT={own:`validator`,directive:`template attribute`,tree:`cross-field rule`,async:`async`,parse:`parse`,submission:`server`,schema:`schema`,manual:`setErrors`},TT=vT,ET={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 DT(e){return ET[e]??e}var OT=`https://pangular-inspector.dev/security/#opt-fields-in-or-out`;async function kT(e,t){return await TT(e,`request-form-action`,t)??{ok:!1,error:`The devtools server did not answer.`}}function AT(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 jT=/"(?:[^"\\\n]|\\.)*"|`([^`\n]*)`|\*\*/g;function MT(e){return(e??``).replace(/^_Labels, paths.*_\n\n/,``).replace(jT,(e,t)=>t??(e===`**`?``:e))}function NT(e,t){let n=Math.max(0,e-t),r=Math.ceil(n/6e4);if(r<60)return`in ${r} min`;let i=Math.round(r/60);return i<48?`in ${i} ${i===1?`hour`:`hours`}`:`in ${Math.round(i/24)} days`}function PT(e,t){return e.length?e.join(`, `):t}function FT(e,t){let n=[];if(n.push({label:`One-time code`,value:e.auth?e.oneTimeCode.state===`locked`?`Locked after too many wrong codes: run pangular token --rotate or restart the server for a new code`:e.oneTimeCode.expiresAt?`On, current code expires ${NT(e.oneTimeCode.expiresAt,t)}`:`On`:`Off: every client is trusted`}),e.auth){let{count:r,nextExpiresAt:i,lastExpiresAt:a}=e.tokens;n.push({label:`Trusted clients`,value:r?r===1||i===a?`${r} ${r===1?`token`:`tokens`}, expires ${NT(i??t,t)}`:`${r} tokens, the first expires ${NT(i??t,t)}, the last ${NT(a??t,t)}`:`None`}),e.pairingTokens&&n.push({label:`Pairing tokens`,value:`${e.pairingTokens} accepted instead of the code`})}return e.reported?(n.push({label:`Reach`,value:e.network?`This machine and other machines`:`This machine only`}),n.push({label:`Allowed origins`,value:e.originCheck?`${PT(e.allowedOrigins,`This machine and the Chrome extension`)}${e.customOrigins?`, plus a custom origin check`:``}`:`Any: the origin check is off`}),(e.allowedHosts===`any`||e.allowedHosts.length)&&n.push({label:`Allowed hosts`,value:e.allowedHosts===`any`?`Any`:e.allowedHosts.join(`, `)}),n):n}function IT(e){return Hw(e?.connectionMeta)}function LT(e){return Array.isArray(e)&&e.every(e=>typeof e==`string`)?[...e]:void 0}function RT(e,t){if(!t||typeof t!=`object`)return e;let n=LT(t.secretNames),r=LT(t.unmask);if(!n||!r)return e;let i=Ew(t.entropy);return{...e,redaction:i?{secretNames:n,unmask:r,entropy:i}:{secretNames:n,unmask:r}}}function zT(e,t){return IT(e).actions[t]}var BT={components:`components`,routes:`router`,signals:`signals`,injectors:`injectors`,store:`ngrx`,queries:`tanstackQuery`,forms:`forms`,pipes:`pipes`,network:`http`,analog:`analog`,capacitor:`capacitor`,errors:`errors`,plugins:`plugins`};function VT(e){return BT[e]}var HT=`https://pangular-inspector.dev/getting-started/configuration/#inspectors-and-agent-tools`;function UT(e,t){let n=BT[e];return!n||t.inspectors[n]}function WT(e,t){e&1&&(w(),sg(0,`rect`,5)(1,`rect`,6)(2,`rect`,7)(3,`rect`,8))}function GT(e,t){e&1&&(w(),sg(0,`path`,9)(1,`circle`,10)(2,`circle`,11)(3,`path`,12))}function KT(e,t){e&1&&(w(),sg(0,`path`,13)(1,`path`,14))}function qT(e,t){e&1&&(w(),sg(0,`path`,15)(1,`path`,16)(2,`path`,17))}function JT(e,t){e&1&&(w(),sg(0,`circle`,18)(1,`path`,19)(2,`circle`,20))}function YT(e,t){e&1&&(w(),sg(0,`path`,1))}function XT(e,t){e&1&&(w(),sg(0,`path`,21)(1,`path`,22)(2,`path`,23)(3,`path`,24))}function ZT(e,t){e&1&&(w(),sg(0,`ellipse`,25)(1,`path`,26)(2,`path`,27))}function QT(e,t){e&1&&(w(),sg(0,`rect`,28)(1,`path`,29)(2,`path`,30)(3,`path`,31))}function $T(e,t){e&1&&(w(),sg(0,`circle`,32)(1,`path`,9)(2,`path`,33))}function eE(e,t){e&1&&(w(),sg(0,`path`,34)(1,`path`,35)(2,`path`,36)(3,`path`,37)(4,`circle`,38))}function tE(e,t){e&1&&(w(),sg(0,`circle`,39)(1,`path`,40))}function nE(e,t){e&1&&(w(),sg(0,`ellipse`,41)(1,`path`,42)(2,`path`,43)(3,`path`,44)(4,`path`,45))}function rE(e,t){e&1&&(w(),sg(0,`circle`,32)(1,`path`,46)(2,`path`,47))}function iE(e,t){e&1&&(w(),sg(0,`path`,2))}function aE(e,t){e&1&&(w(),sg(0,`path`,3))}function oE(e,t){e&1&&(w(),sg(0,`path`,4))}var sE=class e{name=$.required();static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-tab-icon`]],inputs:{name:[1,`name`]},decls:18,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`,`M10 3h4v3a2 2 0 1 0 4 0V5h1a2 2 0 0 1 2 2v4h-2a2 2 0 1 0 0 4h2v4a2 2 0 0 1-2 2h-4v-2a2 2 0 1 0-4 0v2H7a2 2 0 0 1-2-2v-4H4a2 2 0 1 1 0-4h1V7a2 2 0 0 1 2-2h3Z`],[`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`],[`cx`,`11`,`cy`,`5`,`rx`,`8`,`ry`,`3`],[`d`,`M3 5v6c0 1.66 3.58 3 8 3`],[`d`,`M3 11v6c0 1.66 3.58 3 8 3`],[`d`,`M21 14a4 4 0 1 1-1.2-2.85L21 12.3`],[`d`,`M21 9v3.3h-3.3`],[`d`,`M12 7v6`],[`d`,`M12 16.5v.01`]],template:function(e,t){if(e&1&&(w(),R(0,`svg`,0),A(1,WT,4,0)(2,GT,4,0)(3,KT,2,0)(4,qT,3,0)(5,JT,3,0)(6,YT,1,0,`:svg:path`,1)(7,XT,4,0)(8,ZT,3,0)(9,QT,4,0)(10,$T,3,0)(11,eE,5,0)(12,tE,2,0)(13,nE,5,0)(14,rE,3,0)(15,iE,1,0,`:svg:path`,2)(16,aE,1,0,`:svg:path`,3)(17,oE,1,0,`:svg:path`,4),z()),e&2){let e;D(),j((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===`queries`?13:e===`errors`?14:e===`plugins`?15:e===`analog`?16:e===`capacitor`?17:-1)}},styles:[`[_nghost-%COMP%] { +`))}}h()}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 te(e.body)}catch(e){if(c.signal.aborted){h();return}ee(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`,[CS]: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 pC(e,t){let{channel:n,rpcOptions:r={}}=t;return Iy(e,{...n,timeout:-1,...r,proxify:!1})}function mC(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(Cy.client.connectionStatus,e,n)}let p=new Set;function m(e){for(let t of[...p])t.reject(e)}function ee(){return l===`disconnected`||l===`error`?new eC(`connection`,`[devframe] Not connected to the devframe server`,{cause:u??void 0}):l===`unauthorized`?new eC(`auth`,`[devframe] Not authorized by the devframe server`,{cause:u??void 0}):null}function h(e,t){return new Promise((n,r)=>{let a=!1,o,c={reject(e){a||(l(),i.emit(Cy.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 eC(`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(Cy.client.error,n,t),r(n)})})}let g=new Map;for(let e of r.jsonSerializableMethods??[])g.set(e,{jsonSerializable:!0});let te=e.createChannel({definitions:g,onError(e){f(`error`,e),i.emit(Cy.client.connectionError,e),m(new eC(`connection`,`[devframe] Connection to the devframe server failed`,{cause:e}))},onDisconnected(){l!==`error`&&f(`disconnected`),m(new eC(`connection`,`[devframe] Disconnected from the devframe server`,{cause:u??void 0}))}}),ne=pC(a.functions,{channel:te,rpcOptions:o});a.register({name:Cy.broadcast.authRevoked,type:`event`,handler:()=>{c=!1;let e=new eC(`auth`,`[devframe] The devframe server revoked this client's trust`);f(`unauthorized`,e),i.emit(Cy.client.connectionError,e),m(e),i.emit(Cy.client.isTrustedUpdated,!1)}});let re=n;async function ie(e){re=e;let t=await ne.$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 eC(`auth`,`[devframe] The devframe server refused this client's credentials`);f(`unauthorized`,e),i.emit(Cy.client.connectionError,e)}return i.emit(Cy.client.isTrustedUpdated,c),t.isTrusted}async function ae(e){let t=(await ne.$call(`anonymous:devframe:auth:exchange`,{code:e,ua:navigator.userAgent,origin:location.origin}))?.authToken??null;return t&&(re=t,c=!0,d.resolve(!0),f(`connected`),i.emit(Cy.client.isTrustedUpdated,!0)),t}async function oe(e={}){await ne.$call(`anonymous:devframe:auth:request-code`,{ua:navigator.userAgent,origin:location.origin,...e.reissue?{reissue:!0}:{}})}async function se(){return c?!0:ie(re??``)}async function ce(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:se,requestTrustWithToken:ie,requestTrustWithCode:ae,requestAuthCode:oe,ensureTrusted:ce,call:(...e)=>{let t=String(e[0]),n=ee();return n?(i.emit(Cy.client.error,n,t),Promise.reject(n)):h(ne.$call(...e),t)},callEvent:(...e)=>{let t=ee();if(t){i.emit(Cy.client.error,t,String(e[0]));return}return ne.$callEvent(...e)},callOptional:(...e)=>{let t=String(e[0]),n=ee();return n?(i.emit(Cy.client.error,n,t),Promise.reject(n)):h(ne.$callOptional(...e),t)},close:()=>{te.close()}}}function hC(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 gC(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},sseOptions:s={},callTimeout:c=0}=e,l=hC(n.sse,r??`./`,location);return mC({transport:`sse`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>fC({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 _C(e){let{name:t,message:n,cause:r,...i}=e,a=r instanceof Error?r:vC(r)?_C(r):r,o=a===void 0?Error(n):Error(n,{cause:a});return o.name=t,Object.assign(o,i),o}function vC(e){return typeof e==`object`&&!!e&&typeof e.message==`string`&&typeof e.name==`string`}function yC(e){return typeof e==`object`&&!!e&&e.type===`static`&&typeof e.path==`string`}function bC(e){return typeof e==`object`&&!!e&&e.type===`query`&&typeof e.records==`object`&&e.records!==null}function xC(e){return typeof e==`object`&&!!e&&(`output`in e||`error`in e)}function SC(e){if(e.error)throw _C(e.error);return e.output}function CC(e){return e.some(e=>e!=null)}function wC(e){return typeof e==`object`&&e&&`serialization`in e&&`data`in e?e.data:e}function TC(e,t){let n=new Map,r=new Map;function i(e,t){return t===`structured-clone`&&Array.isArray(e)?sS(e):e}function a(e,t){return i(wC(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 xC(r)?SC(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(yC(r)){if(CC(n))throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`);return await o(r)}if(bC(r)){let e=nb(n),i=r.records[e];if(i)return SC(await s(i,r.serialization));if(r.fallback)return SC(await s(r.fallback,r.serialization));throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`)}if(!CC(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 EC(e){let t=TC(await e.fetchJsonFromBases(wS),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 DC=``;function OC(e,t){return`${e}${DC}${t}`}function kC(e){let t=new Map,n=new Map;e.client.register({name:Cy.broadcast.streamingChunk,type:`event`,handler(e,n,r,i){t.get(OC(e,n))?._push(r,i)}}),e.client.register({name:Cy.broadcast.streamingEnd,type:`event`,handler(e,n,r){let i=OC(e,n),a=t.get(i);a&&(a._end(r),t.delete(i))}}),e.client.register({name:Cy.broadcast.streamingUploadCancel,type:`event`,handler(e,t){let r=OC(e,t),i=n.get(r);i&&(i.abort(`server cancelled upload`),n.delete(r))}}),e.events.on(Cy.client.isTrustedUpdated,n=>{if(n)for(let[n,r]of t){if(r.cancelled||r.done)continue;let t=n.indexOf(DC);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=OC(n,r),o=t.get(a);if(o)return o;let s=pS({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(Cy.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=OC(t,r),a=n.get(i);if(a)return a;let o=fS({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 AC(){}var jC=new Map;function MC(e){let t=e.url;e.authToken&&(t=`${t}?${DS}=${encodeURIComponent(e.authToken)}`);let n=new WebSocket(t),{onConnected:r=AC,onError:i=AC,onDisconnected:a=AC,definitions:o=jC}=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=cC(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 NC(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 lb(a,/^https/i.test(a)?`wss://`:`ws://`);let o=new URL(a,r);return o.protocol=i,o.href}function PC(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},wsOptions:s={},callTimeout:c=0}=e,l=NC(n.websocket,r??`./`,location);return mC({transport:`websocket`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>MC({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 FC(e){return e.includes(`:`)}function IC(e,t){return FC(t)?t:`${e}:${t}`}function LC(e){return{async get(t){return(await e()).value()?.[t]},async set(t,n){(await e()).mutate(e=>{if(e===void 0)return{[t]:n};e[t]=n})},async delete(t){(await e()).mutate(e=>{e!==void 0&&delete e[t]})},async all(){return(await e()).value()??{}},async onChange(t){return(await e()).on(`updated`,e=>t(e??{}))}}}function RC(e,t,n){let r=`devframe:settings:${n}:${t}`,i;function a(){return i||=(async()=>(await e.ensureTrusted(),e.sharedState.get(r)))().catch(e=>{throw i=void 0,e}),i}return LC(a)}function zC(e,t){return{global:RC(e,t,`global`),project:RC(e,t,`project`)}}function BC(e,t){return{namespace:t,base:e,rpc:{namespace:t,register(n){if(FC(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(IC(t,n),...r)),callEvent:((n,...r)=>e.callEvent(IC(t,n),...r)),callOptional:((n,...r)=>e.callOptional(IC(t,n),...r)),sharedState:((n,r)=>e.sharedState.get(IC(t,n),r)),streaming:{subscribe:(n,r,i)=>e.streaming.subscribe(IC(t,n),r,i),upload:(n,r)=>e.streaming.upload(IC(t,n),r)}},settings:zC(e,t),scope:e.scope}}function VC(){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 HC(e,t={}){let n=t.modelContext??VC();if(!n)return()=>{};let r=n,i=new Map,a=new Map;function o(t,n){let o=gS(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=Ly(t.type,n),u=r.registerTool({name:o,description:n.description,inputSchema:By(t.args),annotations:{title:n.title??t.name,readOnlyHint:l===`read`,destructiveHint:l===`destructive`},execute:n=>UC(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 UC(e,t,n){try{let r=Hy(n,e.args?.length);return{content:[{type:`text`,text:WC(await(await IS(e,t))(...r))}]}}catch(e){return{isError:!0,content:[{type:`text`,text:GC(e)}]}}}function WC(e){return e===void 0?`undefined`:typeof e==`string`?e:JSON.stringify(e,null,2)}function GC(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 KC(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 qC(e={}){let{baseURL:t=`./`,rpcOptions:n={},cacheOptions:r=!1}=e,i=rb(),a=Array.isArray(t)?t:[t],o=await $S(e),{connectionMeta:s,metaBaseUrl:c,authToken:l}=o,u=a[0]??`./`;try{u=new URL(`.`,c).href}catch{}let d=new OS({functions:[],...typeof e.cacheOptions==`object`?e.cacheOptions:{}}),f={rpc:void 0},p=new LS(f),m=e.webmcp===!1?void 0:HC(p),ee,h=!1,g=0,te;function ne(){g++,te=void 0,d.clear(),r===!0&&d.updateOptions({functions:[]})}r&&(p.register({name:Cy.broadcast.cacheInvalidate,type:`event`,handler:ne}),i.on(Cy.client.connectionStatus,ne),i.on(Cy.client.isTrustedUpdated,ne));async function re(e){let t=[u,...a.filter(e=>e!==u)].filter(e=>e!=null),n=[];for(let r of t)try{return await fetch(cb(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 ie=e.callTimeout??0,ae=ie>0?ie:1/0,oe,se={authToken:l,connectionMeta:s,metaBaseUrl:c,events:i,clientRpc:p,callTimeout:e.callTimeout,rpcOptions:{...n,async onRequest(e,t,i){let a=performance.now()+ae;if(await n.onRequest?.call(this,e,t,i),r===!0&&e.i&&oe.isTrusted&&!e.m.startsWith(`anonymous:`)&&e.m!==`devframe:rpc:cacheable-functions`){function t(){if(performance.now()>=a)throw new eC(`timeout`,`[devframe] RPC call "${e.m}" timed out after ${ie}ms`)}for(;!te&&(t(),!(h||oe.status!==`connected`));){let e=g;te=oe.callOptional(`devframe:rpc:cacheable-functions`).then(t=>{e===g&&d.updateOptions({functions:t??[]})}).catch(t=>{throw e===g&&(te=void 0),t}),await te}await te,t()}let o=g;if(r&&e.i&&!h&&oe.isTrusted&&d.validate(e.m)){if(d.has(e.m,e.a))return i(d.cached(e.m,e.a));let n=await t(e);o===g&&!h&&d.apply(e,n)}else await t(e)}}},ce=KC(e.transport??`auto`,s);oe=ce===`static`?await EC({fetchJsonFromBases:re}):ce===`sse`?gC({...se,sseOptions:e.sseOptions}):PC({...se,wsOptions:e.wsOptions});let le;try{le=new BroadcastChannel(`devframe-auth`)}catch{}let ue,de=!1;function fe(e){return((...t)=>de||!ue?e(...t):ue.then(()=>e(...t)))}function pe(){h=!0,ne();try{ee?.(),m?.()}finally{try{le?.close()}finally{oe.close?.()}}}let me={events:i,get isTrusted(){return oe.isTrusted},get status(){return oe.status},get connectionError(){return oe.connectionError},get transport(){return oe.transport??ce},get connection(){return o},connectionMeta:s,ensureTrusted:oe.ensureTrusted,requestTrust:oe.requestTrust,requestTrustWithToken:async e=>(YS(e),o={...o,authToken:e},oe.requestTrustWithToken(e)),requestTrustWithCode:async e=>{let t=await oe.requestTrustWithCode(e);if(!t)return!1;YS(t),o={...o,authToken:t};try{le?.postMessage({type:`auth-update`,authToken:t})}catch{}return!0},requestAuthCode:e=>oe.requestAuthCode(e),call:fe(oe.call),callEvent:fe(oe.callEvent),callOptional:fe(oe.callOptional),client:p,sharedState:void 0,services:void 0,streaming:void 0,cacheManager:d,scope:void 0,close:pe};me.sharedState=oC(me),me.streaming=kC(me),me.services=aC(me);let he=new Map;me.scope=(e=>{if(!e)return me;let t=he.get(e);return t||(t=BC(me,e),he.set(e,t)),t}),f.rpc=me;function ge(){try{return typeof window<`u`&&window.self===window.top}catch{return!1}}async function _e(){if(e.simpleAuth!==!1&&ge()&&typeof globalThis.prompt==`function`)for(await me.requestAuthCode().catch(()=>{});!me.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 me.requestTrustWithCode(t))return}}async function ve(){let t=await oe.requestTrust(),n=e.otpParam??`devframe_otp`,r=n?await iC(me,{param:n}):!1;t||r||me.isTrusted||await _e()}return ue=ve().then(()=>{de=!0},()=>{de=!0}),s.mcp&&bS(async()=>{let{setupBrowserAgentRpcBridge:e}=await import(`./browser-agent-rpc-KH4HHvHf-Cxjx-Meu.js`);return{setupBrowserAgentRpcBridge:e}},[],import.meta.url).then(({setupBrowserAgentRpcBridge:e})=>{h||(ee=e(me))}).catch(()=>{}),le&&(le.onmessage=e=>{e.data?.type===`auth-update`&&e.data.authToken&&me.requestTrustWithToken(e.data.authToken)}),me}var JC=qC,YC=[`components`,`injectors`,`signals`,`ngrx`,`tanstackQuery`,`forms`,`router`,`pipes`,`http`,`analog`,`capacitor`,`errors`,`plugins`],XC=[`angular`,`ngrx`,`analog`,`angular-native`,`nativescript`,`capacitor`];function ZC(e){return`pangular:${e}`}var QC=[`forms`,`router`,`ngrx`,`http`,`analog`,`components`,`tanstackQuery`,`plugins`],$C={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},cdSlowMs:{default:16,min:1,max:1e3},capacitorCalls:{default:200,min:10,max:2e3},idleAfterMs:{default:6e4,min:0,max:6e5}},ew={"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`,filter:`the transferCache filter passed to withPangular() left it out`,"cache-off-or-filter":`the transfer cache is off, or its filter (or another withHttpTransferCacheOptions setting) left it out`},tw=[[0,`Network error (offline)`],[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 nw(e){return tw.some(([t])=>t===e)}var rw=/^[a-z][a-z0-9-]{0,39}$/;function iw(e,t){let n=t.plugins?.[e],r=t.inspectors.plugins&&rw.test(e)&&(n?.enabled??!0);return{enabled:r,tools:r&&t.agent.tools.plugins&&(n?.tools??!0),actions:r&&t.actions.plugins&&(n?.actions??!0)}}var aw=`pangular`,ow={mod:`Mod`,ctrl:`Ctrl`,control:`Ctrl`,meta:`Meta`,cmd:`Meta`,command:`Meta`,alt:`Alt`,option:`Alt`,opt:`Alt`,shift:`Shift`},sw=[`Mod`,`Ctrl`,`Meta`,`Alt`,`Shift`];function cw(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=ow[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[...sw.filter(e=>n.has(e)),r].join(`+`)}function lw(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 uw(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 dw=[{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:`queries`,label:`Queries`,inspector:`tanstackQuery`},{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`},{id:`plugins`,label:`Plugins`,inspector:`plugins`}],fw=1e4;function pw(e){return dw.filter(t=>!(`inspector`in t)||e.inspectors[t.inspector])}var mw={components:`a component instance, by its id in the component tree`,injectors:`a component's element injector, by the component's id`,signals:`a component's signal graph, by the component's id`,forms:`a form, by its id`},hw=200;function gw(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 _w(e){let t=new URLSearchParams(e.replace(/^#/,``)),n=e=>{let n=t.get(e)?.trim();return n&&n.length<=hw?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 vw=[{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 yw(e){let t=pw(e).map(e=>({id:`tab:${e.id}`,title:`Go to ${e.label}`,group:`Go to`,keywords:`tab open`})),n=vw.filter(t=>!t.inspector||e.inspectors[t.inspector]).map(({inspector:e,...t})=>t);return[...t,...n]}function bw(e){return e&&typeof e==`object`&&!Array.isArray(e)?e:{}}var xw=Object.freeze({minLength:24,threshold:4.5}),Sw={min:16,max:512},Cw={min:2,max:6};function ww(e){return typeof e==`number`&&Number.isInteger(e)&&e>=Sw.min&&e<=Sw.max}function Tw(e){return typeof e==`number`&&Number.isFinite(e)&&e>=Cw.min&&e<=Cw.max}function Ew(e){if(e===!0)return{...xw};if(!e||typeof e!=`object`||Array.isArray(e))return;let{minLength:t,threshold:n}=e;return{minLength:ww(t)?t:xw.minLength,threshold:Tw(n)?n:xw.threshold}}function Dw(e){let t=Ew(e);return t?{entropy:t}:{}}function Ow(e,t){return typeof e==`boolean`?e:t}var kw=100,Aw=100;function jw(e){if(!Array.isArray(e))return[];let t=e.filter(e=>typeof e==`string`).map(e=>e.trim()).filter(e=>e&&e.length<=Aw);return[...new Set(t)].slice(0,kw)}function Mw(e,t){let{default:n,min:r,max:i}=$C[t];return typeof e!=`number`||!Number.isFinite(e)?n:Math.min(i,Math.max(r,Math.round(e)))}function Nw(e,t){return Object.fromEntries(e.map(e=>[e,t(e)]))}function Pw(e){let t=bw(e),n=bw(t.agent),r=bw(t.inspectors),i=bw(n.tools),a=bw(t.actions),o=Ow(t.actions,!0),s=bw(t.redaction),c=bw(t.limits),l=Nw(YC,e=>Ow(r[e],!0));return{inspectors:l,agent:{readOnly:Ow(n.readOnly,!1),tools:Nw(YC,e=>l[e]&&Ow(i[e],!0)),browserTools:Ow(n.browserTools,!1)},actions:Nw(QC,e=>l[e]&&Ow(a[e],o)),redaction:{secretNames:jw(s.secretNames),unmask:jw(s.unmask),...Dw(s.entropy)},limits:Object.fromEntries(Object.keys($C).map(e=>[e,Mw(c[e],e)])),popup:{hotkey:Vw(bw(t.popup).hotkey)},plugins:Bw(t.plugins),lint:{rules:Rw(t.lint)},analog:Iw(t.analog),ngrx:{trace:Ow(bw(t.ngrx).trace,!1)}}}var Fw=500;function Iw(e){let t=bw(e).contentSchema;return typeof t==`string`&&t.trim()&&t.length<=Fw?{contentSchema:t.trim()}:{}}var Lw=200;function Rw(e){let t=bw(bw(e).rules),n={};for(let[e,r]of Object.entries(t).slice(0,Lw))typeof r==`boolean`&&(n[e]=r);return n}var zw=100;function Bw(e){let t={};for(let[n,r]of Object.entries(bw(e)).slice(0,zw)){if(!rw.test(n))continue;if(typeof r==`boolean`){t[n]={enabled:r,tools:!0,actions:!0};continue}let e=bw(r);r!==void 0&&Object.keys(e).length&&(t[n]={enabled:Ow(e.enabled,!0),tools:Ow(e.tools,!0),actions:Ow(e.actions,!0)})}return t}function Vw(e){return e===!1?!1:cw(e)??`Alt+Shift+P`}function Hw(e){let t=e?.configs;return Pw(t?.[aw])}function Uw(e){return`${{forms:`Writing to forms`,router:`Navigating and clearing navigations`,ngrx:`Restoring NgRx state, dispatching actions and changing the Store DevTools history`,http:`Changing HTTP mock rules and SSR overrides, and clearing HTTP calls`,analog:`Calling API routes, clearing server calls, running Nitro tasks and purging the Nitro cache`,components:`Editing component properties and signals`,tanstackQuery:`Invalidating and refetching TanStack queries`,plugins:`Running plugin actions`}[e]} is turned off in the devtools config (actions.${e}).`}var Ww=[`pangular:build-meta`],Gw={components:`Components`,injectors:`Injectors`,signals:`Signals`,ngrx:`NgRx`,tanstackQuery:`TanStack Query`,forms:`Forms`,router:`Router`,pipes:`Pipes`,http:`HTTP`,analog:`Analog`,capacitor:`Capacitor`,errors:`Errors`,plugins:`Plugins`},Kw={forms:`Form writes`,router:`Navigation`,ngrx:`NgRx restore, dispatch and Store DevTools`,http:`HTTP mocking`,analog:`Analog API calls`,components:`Component edits`,tanstackQuery:`TanStack Query invalidate and refetch`,plugins:`Plugin actions`},qw={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`,cdSlowMs:e=>`slow cycles over ${e} ms`,capacitorCalls:e=>`${e} Capacitor plugin calls`,idleAfterMs:e=>e?`idle ${e/1e3} s after the last agent call`:`never idle`};function Jw(e){if(!e)return[];let t=[`On`];return e.minLength!==xw.minLength&&t.push(`${e.minLength} characters or more`),e.threshold!==xw.threshold&&t.push(`up to ${e.threshold} bits per character`),t}function Yw(e){let t=[],n=(e,n)=>{n.length&&t.push({label:e,value:n.join(`, `)})},r=YC.filter(t=>e.inspectors[t]);n(`Inspectors off`,YC.filter(t=>!e.inspectors[t]).map(e=>Gw[e])),n(`Agent`,e.agent.readOnly?[`Read-only`]:[]),n(`Hidden from the agent`,r.filter(t=>!e.agent.tools[t]).map(e=>Gw[e])),n(`Blocked actions`,QC.filter(t=>e.inspectors[t]&&!e.actions[t]).map(e=>Kw[e])),n(`Extra secret names`,e.redaction.secretNames),n(`Unmasked names`,e.redaction.unmask),n(`Entropy masking`,Jw(e.redaction.entropy)),n(`Limits`,Object.keys($C).filter(t=>e.limits[t]!==$C[t].default).map(t=>qw[t](e.limits[t]))),e.popup.hotkey!==`Alt+Shift+P`&&n(`Popup shortcut`,[e.popup.hotkey===!1?`Off`:e.popup.hotkey]);let i=Object.entries(e.plugins??{});return n(`Plugins off`,i.filter(([,e])=>!e.enabled).map(([e])=>e)),n(`Plugin tools or actions off`,i.filter(([,e])=>e.enabled&&(!e.tools||!e.actions)).map(([e,t])=>`${e} (${[!t.tools&&`tools`,!t.actions&&`actions`].filter(Boolean).join(`, `)})`)),n(`Lint rules off`,Object.entries(e.lint?.rules??{}).filter(([,e])=>!e).map(([e])=>e)),t}function Xw(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 Zw(e){return!e.tags.length&&!e.directives.length&&!e.text}function Qw(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 $w={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 eT(e){let t=/^(\d+)\.(\d+)/.exec(e.trim());return t?`${t[1]}.${t[2]}`:e.trim()}function tT(e){let t=/^(\d+)(?:\.(\d+))?/.exec(e.trim());return t?[Number(t[1]),Number(t[2]??0)]:null}function nT(e,t){let n=tT(e),r=tT(t);return!n||!r?!1:n[0]===r[0]?n[1]>=r[1]:n[0]>r[0]}function rT(e,t){return e?.capabilities?.[t]===!1}function iT(e,t){let n=$w[e],r=`${n.subject} needs Angular ${n.since} or later`;if(!t)return`${r}; this page's Angular version is unknown.`;let i=eT(t);return nT(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}.`}function aT(e){return e.hydration===`hydrated`&&e.hydratedAt===void 0?`hydrated before inspection`:e.hydration}var oT=/^on (viewport|interaction|hover)\b/;function sT(e){let t=e.filter(e=>!/^(prefetch|hydrate) /.test(e));return t.length>0&&t.every(e=>oT.test(e))}function cT(e,t){let n=[],r=e.since>0?Math.max(0,Math.round((t-e.since)/1e3)):0;return e.state===`error`&&n.push({kind:`failed`,text:`failed to load`,label:`failed`}),(e.state===`placeholder`||e.state===`initial`)&&r*1e3>=1e4&&n.push(sT(e.triggers)?{kind:`waiting`,text:`waiting for its trigger for ${r}s`,label:`waiting ${r}s`,seconds:r}:{kind:`stuck`,text:`on its placeholder for ${r}s`,label:`stuck ${r}s`,seconds:r}),e.hydrateNever?n.push({kind:`hydrate-never`,text:`hydrate never: the server HTML stays static`,label:`hydrate never`}):e.hydration===`dehydrated`&&n.push({kind:`dehydrated`,text:`still dehydrated`,label:`dehydrated`}),n}var lT=`pangular-page-id`,uT=null;function dT(e){uT=e}function fT(){if(uT)return uT;try{return new URLSearchParams(location.search).get(`pageId`)||(window.top===window?null:sessionStorage.getItem(lT)||null)}catch{return null}}function pT(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 mT(e,t){return e?t?e.pages?.[t]??null:e:null}function hT(e,t){return e?t?e.pages?.[t]??null:e.graph??null:null}function gT(){return{functions:[...Ww]}}function _T(e,t,n){return e?e.scope(`pangular`).rpc.call(t,...n===void 0?[]:[n]):Promise.resolve(null)}function vT(e,t,n){return _T(e,t,n).then(e=>e,()=>null)}function yT(e){return e?.connectionMeta.backend===`static`}function bT(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 xT(e=globalThis){delete e.__DEVFRAME_CONNECTION__,delete e.__DEVFRAME_CONNECTION_META__}function ST(e){return e.split(`@`)[1]??``}var CT={signal:`Signal Forms`,reactive:`Reactive`,template:`Template-driven`},wT={own:`validator`,directive:`template attribute`,tree:`cross-field rule`,async:`async`,parse:`parse`,submission:`server`,schema:`schema`,manual:`setErrors`},TT=vT,ET={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 DT(e){return ET[e]??e}var OT=`https://pangular-inspector.dev/security/#opt-fields-in-or-out`;async function kT(e,t){return await TT(e,`request-form-action`,t)??{ok:!1,error:`The devtools server did not answer.`}}function AT(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 jT=/"(?:[^"\\\n]|\\.)*"|`([^`\n]*)`|\*\*/g;function MT(e){return(e??``).replace(/^_Labels, paths.*_\n\n/,``).replace(jT,(e,t)=>t??(e===`**`?``:e))}function NT(e,t){let n=Math.max(0,e-t),r=Math.ceil(n/6e4);if(r<60)return`in ${r} min`;let i=Math.round(r/60);return i<48?`in ${i} ${i===1?`hour`:`hours`}`:`in ${Math.round(i/24)} days`}function PT(e,t){return e.length?e.join(`, `):t}function FT(e,t){let n=[];if(n.push({label:`One-time code`,value:e.auth?e.oneTimeCode.state===`locked`?`Locked after too many wrong codes: run pangular token --rotate or restart the server for a new code`:e.oneTimeCode.expiresAt?`On, current code expires ${NT(e.oneTimeCode.expiresAt,t)}`:`On`:`Off: every client is trusted`}),e.auth){let{count:r,nextExpiresAt:i,lastExpiresAt:a}=e.tokens;n.push({label:`Trusted clients`,value:r?r===1||i===a?`${r} ${r===1?`token`:`tokens`}, expires ${NT(i??t,t)}`:`${r} tokens, the first expires ${NT(i??t,t)}, the last ${NT(a??t,t)}`:`None`}),e.pairingTokens&&n.push({label:`Pairing tokens`,value:`${e.pairingTokens} accepted instead of the code`})}return e.reported?(n.push({label:`Reach`,value:e.network?`This machine and other machines`:`This machine only`}),n.push({label:`Allowed origins`,value:e.originCheck?`${PT(e.allowedOrigins,`This machine and the Chrome extension`)}${e.customOrigins?`, plus a custom origin check`:``}`:`Any: the origin check is off`}),(e.allowedHosts===`any`||e.allowedHosts.length)&&n.push({label:`Allowed hosts`,value:e.allowedHosts===`any`?`Any`:e.allowedHosts.join(`, `)}),n):n}function IT(e){return Hw(e?.connectionMeta)}function LT(e){return Array.isArray(e)&&e.every(e=>typeof e==`string`)?[...e]:void 0}function RT(e,t){if(!t||typeof t!=`object`)return e;let n=LT(t.secretNames),r=LT(t.unmask);if(!n||!r)return e;let i=Ew(t.entropy);return{...e,redaction:i?{secretNames:n,unmask:r,entropy:i}:{secretNames:n,unmask:r}}}function zT(e,t){return IT(e).actions[t]}var BT={components:`components`,routes:`router`,signals:`signals`,injectors:`injectors`,store:`ngrx`,queries:`tanstackQuery`,forms:`forms`,pipes:`pipes`,network:`http`,analog:`analog`,capacitor:`capacitor`,errors:`errors`,plugins:`plugins`};function VT(e){return BT[e]}var HT=`https://pangular-inspector.dev/getting-started/configuration/#inspectors-and-agent-tools`;function UT(e,t){let n=BT[e];return!n||t.inspectors[n]}function WT(e,t){e&1&&(w(),sg(0,`rect`,5)(1,`rect`,6)(2,`rect`,7)(3,`rect`,8))}function GT(e,t){e&1&&(w(),sg(0,`path`,9)(1,`circle`,10)(2,`circle`,11)(3,`path`,12))}function KT(e,t){e&1&&(w(),sg(0,`path`,13)(1,`path`,14))}function qT(e,t){e&1&&(w(),sg(0,`path`,15)(1,`path`,16)(2,`path`,17))}function JT(e,t){e&1&&(w(),sg(0,`circle`,18)(1,`path`,19)(2,`circle`,20))}function YT(e,t){e&1&&(w(),sg(0,`path`,1))}function XT(e,t){e&1&&(w(),sg(0,`path`,21)(1,`path`,22)(2,`path`,23)(3,`path`,24))}function ZT(e,t){e&1&&(w(),sg(0,`ellipse`,25)(1,`path`,26)(2,`path`,27))}function QT(e,t){e&1&&(w(),sg(0,`rect`,28)(1,`path`,29)(2,`path`,30)(3,`path`,31))}function $T(e,t){e&1&&(w(),sg(0,`circle`,32)(1,`path`,9)(2,`path`,33))}function eE(e,t){e&1&&(w(),sg(0,`path`,34)(1,`path`,35)(2,`path`,36)(3,`path`,37)(4,`circle`,38))}function tE(e,t){e&1&&(w(),sg(0,`circle`,39)(1,`path`,40))}function nE(e,t){e&1&&(w(),sg(0,`ellipse`,41)(1,`path`,42)(2,`path`,43)(3,`path`,44)(4,`path`,45))}function rE(e,t){e&1&&(w(),sg(0,`circle`,32)(1,`path`,46)(2,`path`,47))}function iE(e,t){e&1&&(w(),sg(0,`path`,2))}function aE(e,t){e&1&&(w(),sg(0,`path`,3))}function oE(e,t){e&1&&(w(),sg(0,`path`,4))}var sE=class e{name=$.required();static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-tab-icon`]],inputs:{name:[1,`name`]},decls:18,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`,`M10 3h4v3a2 2 0 1 0 4 0V5h1a2 2 0 0 1 2 2v4h-2a2 2 0 1 0 0 4h2v4a2 2 0 0 1-2 2h-4v-2a2 2 0 1 0-4 0v2H7a2 2 0 0 1-2-2v-4H4a2 2 0 1 1 0-4h1V7a2 2 0 0 1 2-2h3Z`],[`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`],[`cx`,`11`,`cy`,`5`,`rx`,`8`,`ry`,`3`],[`d`,`M3 5v6c0 1.66 3.58 3 8 3`],[`d`,`M3 11v6c0 1.66 3.58 3 8 3`],[`d`,`M21 14a4 4 0 1 1-1.2-2.85L21 12.3`],[`d`,`M21 9v3.3h-3.3`],[`d`,`M12 7v6`],[`d`,`M12 16.5v.01`]],template:function(e,t){if(e&1&&(w(),R(0,`svg`,0),A(1,WT,4,0)(2,GT,4,0)(3,KT,2,0)(4,qT,3,0)(5,JT,3,0)(6,YT,1,0,`:svg:path`,1)(7,XT,4,0)(8,ZT,3,0)(9,QT,4,0)(10,$T,3,0)(11,eE,5,0)(12,tE,2,0)(13,nE,5,0)(14,rE,3,0)(15,iE,1,0,`:svg:path`,2)(16,aE,1,0,`:svg:path`,3)(17,oE,1,0,`:svg:path`,4),z()),e&2){let e;D(),j((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===`queries`?13:e===`errors`?14:e===`plugins`?15:e===`analog`?16:e===`capacitor`?17:-1)}},styles:[`[_nghost-%COMP%] { display: inline-flex; flex-shrink: 0; }`]})},cE=(e,t)=>t.tab,lE=(e,t)=>t.label;function uE(e,t){e&1&&K(0),e&2&&J(` `,W().meta()?.projectName,` `)}function dE(e,t){e&1&&K(0,` Project details unavailable `)}function fE(e,t){e&1&&K(0,` Loading… `)}function pE(e,t){e&1&&(K(0,` Run `),F(1,`code`),K(2,`pangular build`),I(),K(3,` again to rebuild the report. `))}function mE(e,t){e&1&&K(0,` Check that the dev server is running. `)}function hE(e,t){if(e&1){let e=B();F(0,`button`,13),H(`click`,function(){return S(e),C(W(2).loadMeta())}),K(1,`Try again`),I()}}function gE(e,t){if(e&1&&(F(0,`p`,11),A(1,pE,4,0)(2,mE,1,0),I(),A(3,hE,2,0,`button`,12)),e&2){let e=W();D(),j(e.staticReport()?1:2),D(2),j(e.staticReport()?-1:3)}}function _E(e,t){e&1&&(F(0,`li`,5)(1,`span`),K(2,`Analog`),I(),K(3),I()),e&2&&(D(3),q(t))}function vE(e,t){e&1&&(F(0,`li`)(1,`span`),K(2,`Change detection`),I(),K(3),I()),e&2&&(D(3),q(t))}function yE(e,t){if(e&1&&(F(0,`span`,20),K(1),I(),F(2,`span`,21),K(3),I()),e&2){let e=W().$implicit,t=W();D(),q(t.cards()[e.tab]?.value),D(2),q(t.cards()[e.tab]?.sub)}}function bE(e,t){e&1&&(F(0,`span`,22),K(1,`–`),I(),F(2,`span`,21),K(3,`Count unavailable`),I())}function xE(e,t){e&1&&(L(0,`span`,23),F(1,`span`,21),K(2,`Counting…`),I())}function SE(e,t){if(e&1){let e=B();F(0,`button`,14),H(`click`,function(){let t=S(e).$implicit;return C(W().navigate.emit(t.tab))}),F(1,`span`,15)(2,`span`,16),L(3,`app-tab-icon`,17),I(),F(4,`span`,18),K(5,`→`),I()(),F(6,`span`,19),K(7),I(),A(8,yE,4,2)(9,bE,4,0)(10,xE,3,0),I()}if(e&2){let e,n=t.$implicit,r=t.$index,i=W().stateOf(n.tab);Zg(`animation-delay`,60*r,`ms`),k(`aria-busy`,i===`loading`),D(3),P(`name`,n.tab),D(4),q(n.label),D(),j((e=i)===`ready`?8:e===`error`?9:10)}}function CE(e,t){e&1&&(F(0,`p`),K(1,`Loading…`),I())}function wE(e,t){if(e&1&&(F(0,`div`)(1,`dt`),K(2),I(),F(3,`dd`),K(4),I()()),e&2){let e=t.$implicit;D(2),q(e.label),D(2),q(e.value)}}function TE(e,t){if(e&1&&(F(0,`dl`),M(1,wE,5,2,`div`,null,lE),I()),e&2){let e=W();D(),N(e.configItems())}}function EE(e,t){e&1&&(F(0,`p`),K(1,`Defaults`),I())}function DE(e,t){if(e&1&&(F(0,`div`)(1,`dt`),K(2),I(),F(3,`dd`),K(4),I()()),e&2){let e=t.$implicit;D(2),q(e.label),D(2),q(e.value)}}function OE(e,t){e&1&&(F(0,`section`,10)(1,`h2`,24),K(2,`Security`),I(),F(3,`dl`),M(4,DE,5,2,`div`,null,lE),I()()),e&2&&(D(4),N(t))}var kE=[{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 AE(e){return kE.filter(t=>UT(t.tab,e))}var jE={zoneless:`Zoneless`,zone:`zone.js`,"zone-unused":`Zoneless, zone.js loaded`};function ME(e){return e&&Object.hasOwn(jE,e)?jE[e]:null}var NE=new Set([`signal`,`computed`,`linkedSignal`,`effect`]),PE={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 FE(e,t,n){return`${e} ${e===1?t:n}`}function IE(e,t){for(let n of e??[])t(n),IE(n.children,t)}function LE(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 · ${FE(t,`directive`,`directives`)}`}}function RE(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 · ${FE(t,`redirect`,`redirects`)}`}}function zE(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]=PE[e]??[e,e];return FE(t,n,r)});return{value:e.length,sub:n.join(` · `)}}function BE(e,t){let n=e?.forms??[],r=t?n.filter(e=>ST(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 VE(e){return e.cancelled||e.status===void 0?!1:e.status===0||e.status>=400}function HE(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(VE).length;return{value:o.length,sub:`${o.length===1?`call`:`calls`} · ${s} failed`}}var UE=class e{rpc=$(null);navigate=ev();staticReport=X(()=>yT(this.rpc()));meta=T(null);security=T(null);redaction=T(null);config=X(()=>RT(IT(this.rpc()),this.redaction()));stats=X(()=>this.rpc()?AE(this.config()):[]);configItems=X(()=>Yw(this.config()));metaState=T(`loading`);states=T({});rows=T({});injectorTree=T(null);signalGraph=T(null);formsState=T(null);httpState=T(null);pageId=fT();destroyRef=x(ys);stopLive=[];zone=X(()=>ME(mT(this.injectorTree(),this.pageId)?.zone));liveInjectors=X(()=>{let e=mT(this.injectorTree(),this.pageId);if(!e?.roots?.length)return null;let t=0,n=0,r=e=>{t++,n+=e.providers?.length??0};return IE(e.roots,r),IE(e.environment,r),{injectors:t,providers:n}});liveSignals=X(()=>{let e=hT(this.signalGraph(),this.pageId);return e?.nodes?.length?e.nodes.filter(e=>NE.has(e.kind??``)).length:null});cards=X(()=>{let e=this.rows(),t={};if(e.components&&(t.components=LE(e.components)),e.routes&&(t.routes=RE(e.routes)),e.store&&(t.store=zE(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 · ${FE(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=BE(i,this.pageId));let a=this.httpState();return a&&(t.network=HE(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`)}))}loadRedaction(e){this.redaction.set(null),!yT(e)&&_T(e,`redaction-config`).then(t=>{this.rpc()===e&&this.redaction.set(t)}).catch(()=>{})}loadSecurity(e){this.security.set(null),!yT(e)&&vT(e,`security-status`).then(t=>{this.rpc()===e&&t&&this.security.set(FT(t,Date.now()))})}constructor(){E(()=>{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),this.loadRedaction(e),this.loadSecurity(e);let n=IT(e),r=e=>UT(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)),UT(`forms`,t)&&r(`forms`,e=>this.formsState.set(e??{}),`forms`),UT(`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=O({type:e,selectors:[[`app-dashboard`]],inputs:{rpc:[1,`rpc`]},outputs:{navigate:`navigate`},decls:34,vars:15,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`],[`aria-labelledby`,`security-title`,1,`config`],[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`],[`id`,`security-title`]],template:function(e,t){if(e&1&&(F(0,`section`,0)(1,`div`,1)(2,`p`,2),K(3,`Project`),I(),F(4,`h2`,3),A(5,uE,1,1)(6,dE,1,0)(7,fE,1,0),I(),A(8,gE,4,2),I(),F(9,`ul`,4)(10,`li`)(11,`span`),K(12,`Angular`),I(),K(13),I(),F(14,`li`)(15,`span`),K(16,`TypeScript`),I(),K(17),I(),F(18,`li`)(19,`span`),K(20,`SSR`),I(),K(21),I(),A(22,_E,4,1,`li`,5),A(23,vE,4,1,`li`),I()(),F(24,`div`,6),M(25,SE,11,6,`button`,7,cE),I(),F(27,`section`,8)(28,`h2`,9),K(29,`Configuration`),I(),A(30,CE,2,0,`p`)(31,TE,3,0,`dl`)(32,EE,2,0,`p`),I(),A(33,OE,6,0,`section`,10)),e&2){let e,n,r,i;k(`aria-busy`,t.metaState()===`loading`),D(4),G(`muted`,t.metaState()!==`ready`),D(),j((e=t.metaState())===`ready`?5:e===`error`?6:7),D(3),j(t.metaState()===`error`?8:-1),D(),G(`pending`,t.metaState()===`loading`),D(4),q(t.meta()?.angularVersion??`…`),D(4),q(t.meta()?.typescript??`…`),D(4),q(t.meta()?t.meta()?.ssr?`On`:`Off`:`…`),D(),j((n=t.meta()?.analog)?22:-1,n),D(),j((r=t.zone())?23:-1,r),D(2),N(t.stats()),D(2),k(`aria-busy`,!t.rpc()),D(3),j(t.rpc()?t.configItems().length?31:32:30),D(3),j((i=t.security())?33:-1,i)}},dependencies:[sE],styles:[`[_nghost-%COMP%] { @@ -22860,7 +22860,7 @@ summary[_ngcontent-%COMP%]:hover .entry-key[_ngcontent-%COMP%] { .message[_ngcontent-%COMP%] { text-align: left; } -}`]})};function cce(e,t){e&1&&(w(),R(0,`svg`,9),sg(1,`path`,20),z())}function lce(e,t){e&1&&(w(),R(0,`svg`,10)(1,`defs`)(2,`linearGradient`,21),sg(3,`stop`,22)(4,`stop`,23),z()(),sg(5,`path`,24),R(6,`g`,25),sg(7,`path`,26)(8,`path`,27)(9,`path`,28)(10,`path`,29),z()())}function uce(e,t){e&1&&(w(),R(0,`svg`,11),sg(1,`path`,30)(2,`path`,31)(3,`path`,32)(4,`path`,33),z())}function dce(e,t){e&1&&(w(),R(0,`svg`,9),sg(1,`path`,34)(2,`path`,35)(3,`path`,36)(4,`path`,37)(5,`path`,38)(6,`path`,39),z())}function fce(e,t){if(e&1&&(R(0,`a`,16)(1,`span`,40)(2,`strong`),K(3),z()(),R(4,`span`,41),K(5,`→`),z(),R(6,`span`,42),K(7,`(opens in a new tab)`),z()()),e&2){let e=t;V(`href`,e.href,bu),D(3),q(e.label)}}function pce(e,t){if(e&1&&(R(0,`li`),K(1),z()),e&2){let e=t.$implicit,n=t.$index;Zg(`animation-delay`,200+n*120,`ms`),D(),q(e)}}var mce=class e{info=$.required();plansTitle=X(()=>{let e=this.info();return e.plansTitle??(e.link?`In an ${e.name} app`:`On the roadmap`)});static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-coming-soon`]],hostVars:2,hostBindings:function(e,t){e&2&&Zg(`--%NS%brand`,t.info().color)},inputs:{info:[1,`info`]},decls:29,vars:6,consts:[[`aria-labelledby`,`soon-title`,1,`soon`],[`aria-hidden`,`true`,1,`stage`],[1,`ring`,`r1`],[1,`ring`,`r2`],[1,`orbit`,`o1`],[1,`dot`],[1,`orbit`,`o2`],[1,`orbit`,`o3`],[1,`logo`],[`viewBox`,`0 0 256 256`,`width`,`96`,`height`,`96`],[`viewBox`,`0 0 32 32`,`width`,`88`,`height`,`88`],[`viewBox`,`0 0 256 182`,`width`,`104`,`height`,`74`],[1,`badge`],[`aria-hidden`,`true`,1,`spark`],[`id`,`soon-title`],[1,`summary`],[`target`,`_blank`,`rel`,`noopener noreferrer`,1,`author`,`cta`,3,`href`],[1,`plans-title`],[1,`plans`],[3,`animation-delay`],[`fill`,`#3c5afd`,`d`,`M237.248 18.752q18.061 18.06 18.748 45.247V192c-.457 18.12-6.707 33.207-18.748 45.247c-12.04 12.04-27.127 18.291-45.251 18.752H63.999q-27.187-.69-45.247-18.752C6.712 225.208.46 210.121 0 192.001V64q.69-27.187 18.752-45.247Q36.812.692 63.999 0h127.998c18.124.46 33.211 6.711 45.251 18.752m-17.655 103q-6.033-6.003-6.28-15.066V64q-.192-9.063-6.221-15.091c-4.02-4.023-9.054-6.093-15.095-6.22h-21.312v106.626L85.315 42.687H63.999c-6.042.128-11.072 2.198-15.091 6.221c-4.023 4.02-6.093 9.05-6.22 15.09v42.688q-.249 9.063-6.281 15.066q-6.03 5.996-15.091 6.246q9.062.255 15.09 6.25c4.024 4.002 6.115 9.024 6.281 15.066V192c.128 6.037 2.198 11.072 6.221 15.091q6.03 6.03 15.09 6.22h21.317V106.687l85.37 106.627h21.312c6.041-.128 11.076-2.202 15.095-6.221s6.093-9.054 6.22-15.09v-42.688q.249-9.063 6.281-15.066q6.03-5.995 15.091-6.25q-9.062-.25-15.09-6.246`],[`id`,`an-hero-grad`,`x1`,`0`,`y1`,`0`,`x2`,`1`,`y2`,`1`],[`offset`,`0`,`stop-color`,`#f0224f`],[`offset`,`1`,`stop-color`,`#c4002d`],[`d`,`M16 0C27.2 0 32 4.8 32 16S27.2 32 16 32 0 27.2 0 16 4.8 0 16 0Z`,`fill`,`url(#an-hero-grad)`],[`transform`,`translate(6.4 6.4) scale(0.8)`,`fill`,`#fff`],[`d`,`M14.8486 0L23.138 16.8551L23.9996 3.99892L14.8486 0Z`],[`d`,`M16.9875 17.7114H7.01272L5.73926 20.627L12.0001 24L18.261 20.627L16.9875 17.7114Z`],[`d`,`M8.72168 13.9298H15.2812L11.9997 6.39575L8.72168 13.9298Z`],[`d`,`M9.15103 0L0 3.99892L0.861556 16.8551L9.15103 0Z`],[`fill`,`#c30f2e`,`d`,`M152.228.001L48.455 181.046H256L152.228 0z`],[`fill`,`#dd0330`,`d`,`M88.314 26.967L0 181.52h176.628L88.315 26.967z`],[`fill`,`#fff`,`d`,`M18.167 135.294h220.236v-2.419H18.167z`],[`fill`,`#fff`,`d`,`M204.38 170.667c-.861 0-1.67-.358-2.348-1.034c-4.045-4.063-4.221-20.586-4.026-45.33c.11-13.521.257-32.043-1.9-33.504c-2.104.873-2.315 16.172-2.451 26.301c-.162 11.785-.327 23.98-2.242 30.189c-.57 1.84-1.306 3.525-2.786 3.39c-2.086-.185-2.76-3.48-4.317-16.478c-.647-5.4-1.317-10.98-2.101-13.14a11 11 0 0 0-.269-.66c-.835 1.889-1.8 7.079-2.47 10.682c-.927 4.976-1.803 9.676-2.9 11.726c-.847 1.575-2.19 3.63-4.067 3.231c-2.558-.537-3.323-5.693-3.552-8.719c0-25.455-3.33-28.417-3.997-28.753l-.107.081l-.162-.036c-2.377 1.038-2.506 9.294-2.627 17.276c-.096 5.856-.198 12.492-1.053 18.701c-1.108 8.05-2.448 9.603-4.115 9.507c-3.838-.262-3.95-13.482-3.95-14.987c0-.472.012-1.028.027-1.642c.074-3.076.205-8.8-1.687-10.604c-.25-.239-.603-.515-.879-.437c-1.347.339-2.745 4.714-3.209 6.153c-.147.457-.265.833-.364 1.09c-.078.214-.177.515-.294.88c-1.02 3.095-2.18 6.183-4.16 6.944c-.732.284-1.498.222-2.216-.183c-.953-.541-1.73-1.646-2.455-3.482c-.397-1.016-.735-2.046-1.082-3.081c-.419-1.263-.85-2.569-1.384-3.808c-.419-.965-1.464-1.4-2.796-1.164c-2.768.494-3.232 3.29-3.622 7.5c-.07.733-.137 1.452-.228 2.128c-.011.198-.501 6.38-.814 8.344c-.865 5.39-2.002 7.512-3.89 7.358c-4.66-.398-6.798-20.836-6.684-29.47c.088-6.592-1.104-9-1.818-9.382c-.074-.034-.189-.096-.46.095c-.843.571-1.594 2.348-1.363 4.215c2.566 20.32.674 43.592-3.96 48.833c-1.46 1.649-3.448 1.627-4.832.236c-4.049-4.064-4.218-20.586-4.026-45.33c.11-13.521.254-32.043-1.9-33.504c-2.105.873-2.311 16.172-2.45 26.301c-.163 11.785-.329 23.98-2.246 30.189c-.57 1.84-1.307 3.525-2.782 3.39c-2.091-.186-2.761-3.48-4.321-16.478c-.649-5.4-1.319-10.98-2.101-13.14c-.1-.273-.189-.49-.27-.66c-.832 1.889-1.796 7.079-2.466 10.682c-.927 4.976-1.803 9.676-2.904 11.726c-.846 1.575-2.19 3.63-4.063 3.231c-2.558-.537-3.324-5.693-3.552-8.719c-.003-25.455-3.33-28.417-3.997-28.753l-.106.081l-.166-.036c-2.374 1.038-2.503 9.293-2.629 17.276c-.091 5.856-.194 12.492-1.048 18.701c-1.107 8.05-2.437 9.618-4.111 9.507c-3.846-.262-3.958-13.482-3.958-14.987c0-.472.016-1.028.03-1.642c.074-3.076.207-8.8-1.685-10.604c-.25-.239-.603-.515-.88-.438c-1.347.34-2.75 4.715-3.206 6.155a47 47 0 0 1-.364 1.09q-.16.432-.298.875c-1.02 3.096-2.18 6.187-4.155 6.95c-.736.282-1.506.22-2.22-.185c-.953-.541-1.734-1.646-2.454-3.482c-.398-1.016-.74-2.046-1.083-3.081c-.42-1.263-.854-2.569-1.387-3.808c-.416-.965-1.465-1.4-2.797-1.164c-3.188.567-3.943 4.52-4.55 9.238l-.106.839l-2.411-.32l.114-.824c.527-4.137 1.328-10.39 6.53-11.31c2.446-.435 4.585.581 5.446 2.583c.578 1.34 1.031 2.695 1.466 4.008c.324.99.654 1.98 1.037 2.959c.674 1.708 1.197 2.15 1.392 2.257c1.218-.38 2.462-4.167 2.873-5.414c.13-.402.24-.732.328-.968c.085-.233.195-.571.328-.98c1.097-3.43 2.474-7.144 4.918-7.762c.747-.191 1.903-.166 3.157 1.035c2.665 2.544 2.525 8.48 2.433 12.41c-.014.59-.028 1.126-.028 1.583c0 6.272.93 10.655 1.64 12.16c.367-.77.998-2.63 1.598-7.007c.831-6.066.938-12.624 1.027-18.41c.161-10.24.275-17.663 3.982-19.408c.552-.339 1.469-.522 2.436-.033c3.586 1.803 5.326 11.885 5.326 30.817c.225 2.926 1.013 6.006 1.66 6.448c.004-.066.53-.39 1.394-2.01c.925-1.718 1.845-6.665 2.655-11.026c1.792-9.614 2.606-12.989 4.726-13.166c1.615-.158 2.362 1.896 2.676 2.76c.883 2.422 1.537 7.888 2.23 13.678c.54 4.49 1.31 10.902 2.094 13.497c.084-.228.18-.5.283-.836c1.815-5.878 1.98-17.887 2.14-29.507c.22-16.14.503-26.139 3.448-28.226a2.44 2.44 0 0 1 2.233-.316c3.448 1.144 3.714 11.254 3.519 35.8c-.14 17.799-.313 39.952 3.323 43.603c.317.32.542.32.622.32c.17 0 .413-.161.67-.452c3.681-4.162 6.01-26.022 3.372-46.927c-.328-2.602.677-5.337 2.392-6.514c.946-.652 2.036-.736 2.978-.232c2.145 1.14 3.187 5.024 3.102 11.546c-.15 11.387 2.584 24.714 4.37 26.842c.282-.471.842-1.763 1.379-5.145c.301-1.87.799-8.153.806-8.216c.09-.71.155-1.398.217-2.097c.369-3.924.82-8.804 5.613-9.654c2.444-.435 4.583.577 5.448 2.583c.577 1.34 1.027 2.695 1.46 4.008c.332.99.664 1.98 1.046 2.959c.67 1.708 1.197 2.15 1.387 2.257c1.218-.38 2.467-4.167 2.875-5.41c.132-.402.243-.737.328-.973c.088-.228.195-.57.324-.979c1.1-3.43 2.477-7.144 4.924-7.762c.74-.191 1.9-.166 3.154 1.035c2.665 2.543 2.526 8.48 2.437 12.41q-.029.792-.033 1.583c0 6.272.931 10.655 1.641 12.16c.365-.77.994-2.63 1.601-7.007c.832-6.066.931-12.624 1.027-18.41c.159-10.24.273-17.663 3.98-19.408c.55-.339 1.467-.522 2.44-.033c3.58 1.803 5.325 11.884 5.325 30.817c.224 2.926 1.012 6.006 1.656 6.448c.008-.066.526-.39 1.399-2.01c.923-1.718 1.84-6.665 2.653-11.026c1.786-9.614 2.602-12.989 4.722-13.166c1.62-.158 2.367 1.896 2.68 2.76c.88 2.422 1.535 7.888 2.233 13.678c.534 4.49 1.304 10.902 2.092 13.497c.08-.228.176-.5.28-.836c1.813-5.878 1.976-17.887 2.138-29.507c.216-16.14.504-26.139 3.448-28.226a2.45 2.45 0 0 1 2.234-.316c3.452 1.144 3.718 11.254 3.52 35.8c-.141 17.799-.314 39.952 3.319 43.603c.324.32.544.32.63.32c.165 0 .408-.161.662-.452c3.687-4.162 6.014-26.022 3.375-46.927c-.342-2.723.43-5.47 1.84-6.526c.71-.537 1.575-.647 2.37-.313c2.054.877 3.445 4.63 4.255 11.484c.339 2.87.641 5.974.931 9.036c.641 6.683 1.509 15.69 2.684 17.67c.36-.46 1.096-1.704 2.19-5.038l2.307.753c-1.696 5.157-3.026 7.1-4.755 6.902c-2.69-.299-3.468-5.734-4.84-20.055c-.29-3.048-.59-6.132-.928-8.989c-1.03-8.74-2.782-9.532-2.801-9.54c-.342.174-1.137 1.992-.842 4.31c2.558 20.32.673 43.597-3.964 48.834c-.747.842-1.587 1.27-2.485 1.27`],[`fill`,`#53b9ff`,`d`,`M39.863 54.115L.311 93.716l60.995 61.179L0 216.385l39.428 39.619l61.43-61.507l61.097 61.068l39.552-39.602z`],[`fill`,`#119eff`,`d`,`m140.517 154.896l-39.658 39.601l61.097 61.069l39.552-39.602z`],[`fill-opacity`,`.2`,`d`,`m140.517 154.896l-39.658 39.601l15.267 15.182z`],[`fill`,`#53b9ff`,`d`,`M194.57 100.985L256 39.478L216.431 0l-61.412 61.384L93.917.311L54.365 39.913L216.01 201.761l39.552-39.602z`],[`fill`,`#119eff`,`d`,`m115.36 100.987l39.659-39.602L93.917.313L54.365 39.914z`],[`fill-opacity`,`.2`,`d`,`m115.359 100.985l39.659-39.601l-15.271-15.186z`],[1,`who`],[`aria-hidden`,`true`,1,`go`],[1,`sr-only`]],template:function(e,t){if(e&1&&(R(0,`section`,0)(1,`div`,1),sg(2,`span`,2)(3,`span`,3),R(4,`span`,4),sg(5,`span`,5),z(),R(6,`span`,6),sg(7,`span`,5),z(),R(8,`span`,7),sg(9,`span`,5),z(),R(10,`div`,8),A(11,cce,2,0,`:svg:svg`,9)(12,lce,11,0,`:svg:svg`,10)(13,uce,5,0,`:svg:svg`,11)(14,dce,7,0,`:svg:svg`,9),z()(),R(15,`p`,12)(16,`span`,13),K(17,`✦`),z(),K(18),z(),R(19,`h2`,14),K(20),z(),R(21,`p`,15),K(22),z(),A(23,fce,8,2,`a`,16),R(24,`h3`,17),K(25),z(),R(26,`ul`,18),M(27,pce,2,3,`li`,19,Xh),z()()),e&2){let e,n;D(11),j((e=t.info().id)===`nativescript`?11:e===`angular-native`?12:e===`analog`?13:e===`capacitor`?14:-1),D(7),J(` `,t.info().badge),D(2),q(t.info().heading),D(2),q(t.info().summary),D(),j((n=t.info().link)?23:-1,n),D(2),J(` `,t.plansTitle(),` `),D(2),N(t.info().plans)}},styles:[`[_nghost-%COMP%] { +}`]})};function cce(e,t){e&1&&(w(),R(0,`svg`,9),sg(1,`path`,21),z())}function lce(e,t){e&1&&(w(),R(0,`svg`,10)(1,`defs`)(2,`linearGradient`,22),sg(3,`stop`,23)(4,`stop`,24),z()(),sg(5,`path`,25),R(6,`g`,26),sg(7,`path`,27)(8,`path`,28)(9,`path`,29)(10,`path`,30),z()())}function uce(e,t){e&1&&(w(),R(0,`svg`,11),sg(1,`path`,31)(2,`path`,32)(3,`path`,33)(4,`path`,34),z())}function dce(e,t){e&1&&(w(),R(0,`svg`,9),sg(1,`path`,35)(2,`path`,36)(3,`path`,37)(4,`path`,38)(5,`path`,39)(6,`path`,40),z())}function fce(e,t){if(e&1&&(R(0,`a`,16)(1,`span`,41)(2,`strong`),K(3),z()(),R(4,`span`,42),K(5,`→`),z(),R(6,`span`,43),K(7,`(opens in a new tab)`),z()()),e&2){let e=t;V(`href`,e.href,bu),D(3),q(e.label)}}function pce(e,t){if(e&1&&(R(0,`li`),K(1),z()),e&2){let e=t.$implicit,n=t.$index;Zg(`animation-delay`,200+n*120,`ms`),D(),q(e)}}function mce(e,t){if(e&1&&(R(0,`p`,20)(1,`a`,44),K(2,`Supported and planned platforms`),R(3,`span`,43),K(4,` (opens in a new tab)`),z()()()),e&2){let e=W();D(),V(`href`,e.platformsUrl,bu)}}var hce=`https://pangular-inspector.dev/getting-started/platforms/`,gce=class e{info=$.required();platformsUrl=hce;plansTitle=X(()=>{let e=this.info();return e.plansTitle??(e.link?`In an ${e.name} app`:`On the roadmap`)});static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-coming-soon`]],hostVars:2,hostBindings:function(e,t){e&2&&Zg(`--%NS%brand`,t.info().color)},inputs:{info:[1,`info`]},decls:30,vars:7,consts:[[`aria-labelledby`,`soon-title`,1,`soon`],[`aria-hidden`,`true`,1,`stage`],[1,`ring`,`r1`],[1,`ring`,`r2`],[1,`orbit`,`o1`],[1,`dot`],[1,`orbit`,`o2`],[1,`orbit`,`o3`],[1,`logo`],[`viewBox`,`0 0 256 256`,`width`,`96`,`height`,`96`],[`viewBox`,`0 0 32 32`,`width`,`88`,`height`,`88`],[`viewBox`,`0 0 256 182`,`width`,`104`,`height`,`74`],[1,`badge`],[`aria-hidden`,`true`,1,`spark`],[`id`,`soon-title`],[1,`summary`],[`target`,`_blank`,`rel`,`noopener noreferrer`,1,`author`,`cta`,3,`href`],[1,`plans-title`],[1,`plans`],[3,`animation-delay`],[1,`platforms`],[`fill`,`#3c5afd`,`d`,`M237.248 18.752q18.061 18.06 18.748 45.247V192c-.457 18.12-6.707 33.207-18.748 45.247c-12.04 12.04-27.127 18.291-45.251 18.752H63.999q-27.187-.69-45.247-18.752C6.712 225.208.46 210.121 0 192.001V64q.69-27.187 18.752-45.247Q36.812.692 63.999 0h127.998c18.124.46 33.211 6.711 45.251 18.752m-17.655 103q-6.033-6.003-6.28-15.066V64q-.192-9.063-6.221-15.091c-4.02-4.023-9.054-6.093-15.095-6.22h-21.312v106.626L85.315 42.687H63.999c-6.042.128-11.072 2.198-15.091 6.221c-4.023 4.02-6.093 9.05-6.22 15.09v42.688q-.249 9.063-6.281 15.066q-6.03 5.996-15.091 6.246q9.062.255 15.09 6.25c4.024 4.002 6.115 9.024 6.281 15.066V192c.128 6.037 2.198 11.072 6.221 15.091q6.03 6.03 15.09 6.22h21.317V106.687l85.37 106.627h21.312c6.041-.128 11.076-2.202 15.095-6.221s6.093-9.054 6.22-15.09v-42.688q.249-9.063 6.281-15.066q6.03-5.995 15.091-6.25q-9.062-.25-15.09-6.246`],[`id`,`an-hero-grad`,`x1`,`0`,`y1`,`0`,`x2`,`1`,`y2`,`1`],[`offset`,`0`,`stop-color`,`#f0224f`],[`offset`,`1`,`stop-color`,`#c4002d`],[`d`,`M16 0C27.2 0 32 4.8 32 16S27.2 32 16 32 0 27.2 0 16 4.8 0 16 0Z`,`fill`,`url(#an-hero-grad)`],[`transform`,`translate(6.4 6.4) scale(0.8)`,`fill`,`#fff`],[`d`,`M14.8486 0L23.138 16.8551L23.9996 3.99892L14.8486 0Z`],[`d`,`M16.9875 17.7114H7.01272L5.73926 20.627L12.0001 24L18.261 20.627L16.9875 17.7114Z`],[`d`,`M8.72168 13.9298H15.2812L11.9997 6.39575L8.72168 13.9298Z`],[`d`,`M9.15103 0L0 3.99892L0.861556 16.8551L9.15103 0Z`],[`fill`,`#c30f2e`,`d`,`M152.228.001L48.455 181.046H256L152.228 0z`],[`fill`,`#dd0330`,`d`,`M88.314 26.967L0 181.52h176.628L88.315 26.967z`],[`fill`,`#fff`,`d`,`M18.167 135.294h220.236v-2.419H18.167z`],[`fill`,`#fff`,`d`,`M204.38 170.667c-.861 0-1.67-.358-2.348-1.034c-4.045-4.063-4.221-20.586-4.026-45.33c.11-13.521.257-32.043-1.9-33.504c-2.104.873-2.315 16.172-2.451 26.301c-.162 11.785-.327 23.98-2.242 30.189c-.57 1.84-1.306 3.525-2.786 3.39c-2.086-.185-2.76-3.48-4.317-16.478c-.647-5.4-1.317-10.98-2.101-13.14a11 11 0 0 0-.269-.66c-.835 1.889-1.8 7.079-2.47 10.682c-.927 4.976-1.803 9.676-2.9 11.726c-.847 1.575-2.19 3.63-4.067 3.231c-2.558-.537-3.323-5.693-3.552-8.719c0-25.455-3.33-28.417-3.997-28.753l-.107.081l-.162-.036c-2.377 1.038-2.506 9.294-2.627 17.276c-.096 5.856-.198 12.492-1.053 18.701c-1.108 8.05-2.448 9.603-4.115 9.507c-3.838-.262-3.95-13.482-3.95-14.987c0-.472.012-1.028.027-1.642c.074-3.076.205-8.8-1.687-10.604c-.25-.239-.603-.515-.879-.437c-1.347.339-2.745 4.714-3.209 6.153c-.147.457-.265.833-.364 1.09c-.078.214-.177.515-.294.88c-1.02 3.095-2.18 6.183-4.16 6.944c-.732.284-1.498.222-2.216-.183c-.953-.541-1.73-1.646-2.455-3.482c-.397-1.016-.735-2.046-1.082-3.081c-.419-1.263-.85-2.569-1.384-3.808c-.419-.965-1.464-1.4-2.796-1.164c-2.768.494-3.232 3.29-3.622 7.5c-.07.733-.137 1.452-.228 2.128c-.011.198-.501 6.38-.814 8.344c-.865 5.39-2.002 7.512-3.89 7.358c-4.66-.398-6.798-20.836-6.684-29.47c.088-6.592-1.104-9-1.818-9.382c-.074-.034-.189-.096-.46.095c-.843.571-1.594 2.348-1.363 4.215c2.566 20.32.674 43.592-3.96 48.833c-1.46 1.649-3.448 1.627-4.832.236c-4.049-4.064-4.218-20.586-4.026-45.33c.11-13.521.254-32.043-1.9-33.504c-2.105.873-2.311 16.172-2.45 26.301c-.163 11.785-.329 23.98-2.246 30.189c-.57 1.84-1.307 3.525-2.782 3.39c-2.091-.186-2.761-3.48-4.321-16.478c-.649-5.4-1.319-10.98-2.101-13.14c-.1-.273-.189-.49-.27-.66c-.832 1.889-1.796 7.079-2.466 10.682c-.927 4.976-1.803 9.676-2.904 11.726c-.846 1.575-2.19 3.63-4.063 3.231c-2.558-.537-3.324-5.693-3.552-8.719c-.003-25.455-3.33-28.417-3.997-28.753l-.106.081l-.166-.036c-2.374 1.038-2.503 9.293-2.629 17.276c-.091 5.856-.194 12.492-1.048 18.701c-1.107 8.05-2.437 9.618-4.111 9.507c-3.846-.262-3.958-13.482-3.958-14.987c0-.472.016-1.028.03-1.642c.074-3.076.207-8.8-1.685-10.604c-.25-.239-.603-.515-.88-.438c-1.347.34-2.75 4.715-3.206 6.155a47 47 0 0 1-.364 1.09q-.16.432-.298.875c-1.02 3.096-2.18 6.187-4.155 6.95c-.736.282-1.506.22-2.22-.185c-.953-.541-1.734-1.646-2.454-3.482c-.398-1.016-.74-2.046-1.083-3.081c-.42-1.263-.854-2.569-1.387-3.808c-.416-.965-1.465-1.4-2.797-1.164c-3.188.567-3.943 4.52-4.55 9.238l-.106.839l-2.411-.32l.114-.824c.527-4.137 1.328-10.39 6.53-11.31c2.446-.435 4.585.581 5.446 2.583c.578 1.34 1.031 2.695 1.466 4.008c.324.99.654 1.98 1.037 2.959c.674 1.708 1.197 2.15 1.392 2.257c1.218-.38 2.462-4.167 2.873-5.414c.13-.402.24-.732.328-.968c.085-.233.195-.571.328-.98c1.097-3.43 2.474-7.144 4.918-7.762c.747-.191 1.903-.166 3.157 1.035c2.665 2.544 2.525 8.48 2.433 12.41c-.014.59-.028 1.126-.028 1.583c0 6.272.93 10.655 1.64 12.16c.367-.77.998-2.63 1.598-7.007c.831-6.066.938-12.624 1.027-18.41c.161-10.24.275-17.663 3.982-19.408c.552-.339 1.469-.522 2.436-.033c3.586 1.803 5.326 11.885 5.326 30.817c.225 2.926 1.013 6.006 1.66 6.448c.004-.066.53-.39 1.394-2.01c.925-1.718 1.845-6.665 2.655-11.026c1.792-9.614 2.606-12.989 4.726-13.166c1.615-.158 2.362 1.896 2.676 2.76c.883 2.422 1.537 7.888 2.23 13.678c.54 4.49 1.31 10.902 2.094 13.497c.084-.228.18-.5.283-.836c1.815-5.878 1.98-17.887 2.14-29.507c.22-16.14.503-26.139 3.448-28.226a2.44 2.44 0 0 1 2.233-.316c3.448 1.144 3.714 11.254 3.519 35.8c-.14 17.799-.313 39.952 3.323 43.603c.317.32.542.32.622.32c.17 0 .413-.161.67-.452c3.681-4.162 6.01-26.022 3.372-46.927c-.328-2.602.677-5.337 2.392-6.514c.946-.652 2.036-.736 2.978-.232c2.145 1.14 3.187 5.024 3.102 11.546c-.15 11.387 2.584 24.714 4.37 26.842c.282-.471.842-1.763 1.379-5.145c.301-1.87.799-8.153.806-8.216c.09-.71.155-1.398.217-2.097c.369-3.924.82-8.804 5.613-9.654c2.444-.435 4.583.577 5.448 2.583c.577 1.34 1.027 2.695 1.46 4.008c.332.99.664 1.98 1.046 2.959c.67 1.708 1.197 2.15 1.387 2.257c1.218-.38 2.467-4.167 2.875-5.41c.132-.402.243-.737.328-.973c.088-.228.195-.57.324-.979c1.1-3.43 2.477-7.144 4.924-7.762c.74-.191 1.9-.166 3.154 1.035c2.665 2.543 2.526 8.48 2.437 12.41q-.029.792-.033 1.583c0 6.272.931 10.655 1.641 12.16c.365-.77.994-2.63 1.601-7.007c.832-6.066.931-12.624 1.027-18.41c.159-10.24.273-17.663 3.98-19.408c.55-.339 1.467-.522 2.44-.033c3.58 1.803 5.325 11.884 5.325 30.817c.224 2.926 1.012 6.006 1.656 6.448c.008-.066.526-.39 1.399-2.01c.923-1.718 1.84-6.665 2.653-11.026c1.786-9.614 2.602-12.989 4.722-13.166c1.62-.158 2.367 1.896 2.68 2.76c.88 2.422 1.535 7.888 2.233 13.678c.534 4.49 1.304 10.902 2.092 13.497c.08-.228.176-.5.28-.836c1.813-5.878 1.976-17.887 2.138-29.507c.216-16.14.504-26.139 3.448-28.226a2.45 2.45 0 0 1 2.234-.316c3.452 1.144 3.718 11.254 3.52 35.8c-.141 17.799-.314 39.952 3.319 43.603c.324.32.544.32.63.32c.165 0 .408-.161.662-.452c3.687-4.162 6.014-26.022 3.375-46.927c-.342-2.723.43-5.47 1.84-6.526c.71-.537 1.575-.647 2.37-.313c2.054.877 3.445 4.63 4.255 11.484c.339 2.87.641 5.974.931 9.036c.641 6.683 1.509 15.69 2.684 17.67c.36-.46 1.096-1.704 2.19-5.038l2.307.753c-1.696 5.157-3.026 7.1-4.755 6.902c-2.69-.299-3.468-5.734-4.84-20.055c-.29-3.048-.59-6.132-.928-8.989c-1.03-8.74-2.782-9.532-2.801-9.54c-.342.174-1.137 1.992-.842 4.31c2.558 20.32.673 43.597-3.964 48.834c-.747.842-1.587 1.27-2.485 1.27`],[`fill`,`#53b9ff`,`d`,`M39.863 54.115L.311 93.716l60.995 61.179L0 216.385l39.428 39.619l61.43-61.507l61.097 61.068l39.552-39.602z`],[`fill`,`#119eff`,`d`,`m140.517 154.896l-39.658 39.601l61.097 61.069l39.552-39.602z`],[`fill-opacity`,`.2`,`d`,`m140.517 154.896l-39.658 39.601l15.267 15.182z`],[`fill`,`#53b9ff`,`d`,`M194.57 100.985L256 39.478L216.431 0l-61.412 61.384L93.917.311L54.365 39.913L216.01 201.761l39.552-39.602z`],[`fill`,`#119eff`,`d`,`m115.36 100.987l39.659-39.602L93.917.313L54.365 39.914z`],[`fill-opacity`,`.2`,`d`,`m115.359 100.985l39.659-39.601l-15.271-15.186z`],[1,`who`],[`aria-hidden`,`true`,1,`go`],[1,`sr-only`],[`target`,`_blank`,`rel`,`noopener noreferrer`,3,`href`]],template:function(e,t){if(e&1&&(R(0,`section`,0)(1,`div`,1),sg(2,`span`,2)(3,`span`,3),R(4,`span`,4),sg(5,`span`,5),z(),R(6,`span`,6),sg(7,`span`,5),z(),R(8,`span`,7),sg(9,`span`,5),z(),R(10,`div`,8),A(11,cce,2,0,`:svg:svg`,9)(12,lce,11,0,`:svg:svg`,10)(13,uce,5,0,`:svg:svg`,11)(14,dce,7,0,`:svg:svg`,9),z()(),R(15,`p`,12)(16,`span`,13),K(17,`✦`),z(),K(18),z(),R(19,`h2`,14),K(20),z(),R(21,`p`,15),K(22),z(),A(23,fce,8,2,`a`,16),R(24,`h3`,17),K(25),z(),R(26,`ul`,18),M(27,pce,2,3,`li`,19,Xh),z(),A(29,mce,5,1,`p`,20),z()),e&2){let e,n;D(11),j((e=t.info().id)===`nativescript`?11:e===`angular-native`?12:e===`analog`?13:e===`capacitor`?14:-1),D(7),J(` `,t.info().badge),D(2),q(t.info().heading),D(2),q(t.info().summary),D(),j((n=t.info().link)?23:-1,n),D(2),J(` `,t.plansTitle(),` `),D(2),N(t.info().plans),D(2),j(t.info().id===`analog`?-1:29)}},styles:[`[_nghost-%COMP%] { display: block; min-height: 100%; background: radial-gradient(60% 50% at 50% 18%, color-mix(in srgb, var(--%NS%brand) 22%, transparent), transparent 70%); @@ -23115,6 +23115,29 @@ h2[_ngcontent-%COMP%] { box-shadow: 0 0 0 3px color-mix(in srgb, var(--%NS%brand) 20%, transparent); } +.platforms[_ngcontent-%COMP%] { + width: 100%; + max-width: 440px; + margin: 16px auto 0; + font-size: 13px; + text-align: left; +} + +.platforms[_ngcontent-%COMP%] a[_ngcontent-%COMP%] { + color: var(--%NS%accent-text); + text-decoration: underline; + text-underline-offset: 2px; +} + +.platforms[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover { + color: var(--%NS%text-strong); +} + +.platforms[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:focus-visible { + outline: 2px solid var(--%NS%accent); + outline-offset: 2px; +} + @media (max-height: 640px) { .soon[_ngcontent-%COMP%] { padding-top: 12px; @@ -23206,9 +23229,9 @@ h2[_ngcontent-%COMP%] { .author[_ngcontent-%COMP%]:hover .go[_ngcontent-%COMP%] { transform: none; } -}`]})},hce=new Set([`CapacitorCookies`,`CapacitorHttp`,`SystemBars`,`WebView`]);function gce(e){return e==null?`Unknown`:e?`Yes`:`No`}function _ce(e,t){let n=t.size?Math.max(...t.values())+1:0;for(let r of e)t.has(r.pageId)||t.set(r.pageId,n++);let r=new Set(e.map(e=>e.pageId));for(let e of t.keys())r.has(e)||t.delete(e);return[...e].sort((e,n)=>t.get(e.pageId)-t.get(n.pageId))}function vce(e,t){let n=[...e].sort((e,t)=>t.reportedAt-e.reportedAt);return e.find(e=>e.pageId===t)?.pageId??n.find(e=>e.info.bridge)?.pageId??n[0]?.pageId??null}var Z8=new WeakMap;function yce(e){let t=e.calls;if(Array.isArray(t))return e;let n=Z8.get(e);if(!n){let r=Object.values(t??{}).filter(e=>!!e&&typeof e.id==`number`);n={...e,calls:r.sort((e,t)=>e.id-t.id)},Z8.set(e,n)}return n}function Q8(e){let t=e?.pages;return!t||typeof t!=`object`?[]:Object.values(t).filter(e=>e&&typeof e.pageId==`string`&&!!e.info).map(yce).sort((e,t)=>t.reportedAt-e.reportedAt)}function $8(e){let t=e.error;return!!t&&(t.code===`UNIMPLEMENTED`||/not implemented/i.test(t.message))}function e5(e,t){return e.durationMs===void 0?e.status===`pending`?Math.max(0,t-e.startedAt):0:e.durationMs}function t5(e,t,n){return t===`failed`?e.status===`error`:t===`pending`?e.status===`pending`:t!==`slow`||e5(e,n)>=500}function n5(e){if(e<1e3)return`${Math.max(0,Math.round(e))} ms`;let t=Math.round(e/1e3);if(t<60)return`${t} s`;let n=Math.round(t/60);return n<60?`${n} min`:`${Math.round(n/60)} h`}function bce(e,t){let n=t-e;return n<1e3?`just now`:`${n5(n)} ago`}function r5(e,t){return hce.has(e.name)?null:e.registered===!0&&!e.available?t===`android`||t===`ios`?{before:`Not available on ${t}. Run `,command:`npx cap sync ${t}`,after:`, then run the app again.`}:{before:`Not available here. Run `,command:`npx cap sync`,after:` if it should be native.`}:e.native&&e.registered===!1?{before:`Installed, not imported by the app.`}:null}function xce(e,t){let n=e.info,r=n=>e.calls.filter(e=>t5(e,n,t)).length,i=n.env.capacitorHttp;return{pageId:e.pageId,platform:n.platform,native:n.native,logsCalls:n.bridge||n.webCalls,calls:e.calls.length,failed:r(`failed`),slow:r(`slow`),pending:r(`pending`),capacitorHttp:i===null?`Unknown`:i?`On`:`Off`,hints:n.plugins.filter(e=>r5(e,n.platform)).length}}function Sce(e){let t=new Map;for(let n of e){if(n.removed)continue;let e=`${n.plugin} ${n.event}`;t.set(e,(t.get(e)??0)+1)}return t}var i5=/^[A-Za-z_$][\w$]*$/;function a5(e,t=``){if(e===void 0)return`undefined`;if(typeof e!=`object`||!e)return JSON.stringify(e)??String(e);let n=`${t} `;if(Array.isArray(e))return e.length?`[\n${e.map(e=>n+a5(e,n)).join(`, +}`]})},_ce=new Set([`CapacitorCookies`,`CapacitorHttp`,`SystemBars`,`WebView`]);function vce(e){return e==null?`Unknown`:e?`Yes`:`No`}function yce(e,t){let n=t.size?Math.max(...t.values())+1:0;for(let r of e)t.has(r.pageId)||t.set(r.pageId,n++);let r=new Set(e.map(e=>e.pageId));for(let e of t.keys())r.has(e)||t.delete(e);return[...e].sort((e,n)=>t.get(e.pageId)-t.get(n.pageId))}function bce(e,t){let n=[...e].sort((e,t)=>t.reportedAt-e.reportedAt);return e.find(e=>e.pageId===t)?.pageId??n.find(e=>e.info.bridge)?.pageId??n[0]?.pageId??null}var Z8=new WeakMap;function xce(e){let t=e.calls;if(Array.isArray(t))return e;let n=Z8.get(e);if(!n){let r=Object.values(t??{}).filter(e=>!!e&&typeof e.id==`number`);n={...e,calls:r.sort((e,t)=>e.id-t.id)},Z8.set(e,n)}return n}function Q8(e){let t=e?.pages;return!t||typeof t!=`object`?[]:Object.values(t).filter(e=>e&&typeof e.pageId==`string`&&!!e.info).map(xce).sort((e,t)=>t.reportedAt-e.reportedAt)}function $8(e){let t=e.error;return!!t&&(t.code===`UNIMPLEMENTED`||/not implemented/i.test(t.message))}function e5(e,t){return e.durationMs===void 0?e.status===`pending`?Math.max(0,t-e.startedAt):0:e.durationMs}function t5(e,t,n){return t===`failed`?e.status===`error`:t===`pending`?e.status===`pending`:t!==`slow`||e5(e,n)>=500}function n5(e){if(e<1e3)return`${Math.max(0,Math.round(e))} ms`;let t=Math.round(e/1e3);if(t<60)return`${t} s`;let n=Math.round(t/60);return n<60?`${n} min`:`${Math.round(n/60)} h`}function Sce(e,t){let n=t-e;return n<1e3?`just now`:`${n5(n)} ago`}function r5(e,t){return _ce.has(e.name)?null:e.registered===!0&&!e.available?t===`android`||t===`ios`?{before:`Not available on ${t}. Run `,command:`npx cap sync ${t}`,after:`, then run the app again.`}:{before:`Not available here. Run `,command:`npx cap sync`,after:` if it should be native.`}:e.native&&e.registered===!1?{before:`Installed, not imported by the app.`}:null}function Cce(e,t){let n=e.info,r=n=>e.calls.filter(e=>t5(e,n,t)).length,i=n.env.capacitorHttp;return{pageId:e.pageId,platform:n.platform,native:n.native,logsCalls:n.bridge||n.webCalls,calls:e.calls.length,failed:r(`failed`),slow:r(`slow`),pending:r(`pending`),capacitorHttp:i===null?`Unknown`:i?`On`:`Off`,hints:n.plugins.filter(e=>r5(e,n.platform)).length}}function wce(e){let t=new Map;for(let n of e){if(n.removed)continue;let e=`${n.plugin} ${n.event}`;t.set(e,(t.get(e)??0)+1)}return t}var i5=/^[A-Za-z_$][\w$]*$/;function a5(e,t=``){if(e===void 0)return`undefined`;if(typeof e!=`object`||!e)return JSON.stringify(e)??String(e);let n=`${t} `;if(Array.isArray(e))return e.length?`[\n${e.map(e=>n+a5(e,n)).join(`, `)},\n${t}]`:`[]`;let r=Object.entries(e);return r.length?`{\n${r.map(([e,t])=>`${n}${i5.test(e)?e:JSON.stringify(e)}: ${a5(t,n)}`).join(`, -`)},\n${t}}`:`{}`}function Cce(e){let t=i5.test(e.plugin)?e.plugin:`Capacitor.Plugins[${JSON.stringify(e.plugin)}]`,n=i5.test(e.method)?`.${e.method}`:`[${JSON.stringify(e.method)}]`,r=e.args===void 0?[]:[a5(e.args)];return e.kind===`callback`&&(r.length||r.push(`{}`),r.push(`(result, error) => {}`)),`await ${t}${n}(${r.join(`, `)});`}function o5(e){if(e===void 0)return`undefined`;try{return JSON.stringify(e,null,2)??`undefined`}catch{return String(e)}}function wce(e,t=120){let n;try{n=JSON.stringify(e)??`undefined`}catch{n=String(e)}return n.length>t?`${n.slice(0,t-1)}…`:n}function Tce(e,t){if(e&1){let e=B();R(0,`button`,8),U(`click`,function(){let t=S(e).$implicit;return C(W().tab.set(t))}),K(1),z()}if(e&2){let e=t.$implicit,n=W();V(`id`,`cap-tab-`+e),k(`aria-selected`,n.tab()===e)(`aria-controls`,`cap-panel-`+e)(`tabindex`,n.tab()===e?0:-1),D(),J(` `,n.tabLabel(e),` `)}}function Ece(e,t){e&1&&(R(0,`p`,9),K(1,`No arguments.`),z())}function Dce(e,t){if(e&1&&(R(0,`pre`,10),K(1),z()),e&2){let e=W(2),t=O_(0);D(),q(e.json(t.args))}}function Oce(e,t){e&1&&A(0,Ece,2,0,`p`,9)(1,Dce,2,1,`pre`,10),e&2&&(W(),j(O_(0).args===void 0?0:1))}function kce(e,t){if(e&1&&(R(0,`code`),K(1),z()),e&2){let e=W();D(),q(e.code)}}function Ace(e,t){if(e&1&&(R(0,`p`,11),A(1,kce,2,1,`code`),K(2),z()),e&2){let e=t;D(),j(e.code?1:-1),D(),J(` `,e.message,` `)}}function jce(e,t){e&1&&(R(0,`p`,9),K(1,`No answer yet.`),z())}function Mce(e,t){if(e&1&&(R(0,`p`,9),K(1),z()),e&2){W(3);let e=O_(0);D(),J(`The latest of `,e.callbacks,` callbacks.`)}}function Nce(e,t){e&1&&(R(0,`p`,9),K(1,`Resolved without a value.`),z())}function Pce(e,t){if(e&1&&(R(0,`pre`,12),K(1),z()),e&2){let e=W(3),t=O_(0);D(),q(e.json(t.result))}}function Fce(e,t){if(e&1&&(A(0,Mce,2,1,`p`,9),A(1,Nce,2,0,`p`,9)(2,Pce,2,1,`pre`,12)),e&2){W(2);let e=O_(0);j(e.callbacks&&e.callbacks>1?0:-1),D(),j(e.result===void 0?1:2)}}function Ice(e,t){if(e&1&&A(0,Ace,3,2,`p`,11)(1,jce,2,0,`p`,9)(2,Fce,3,2),e&2){let e;W();let t=O_(0);j((e=t.error)?0:t.status===`pending`?1:2,e)}}function Lce(e,t){if(e&1&&(R(0,`div`)(1,`dt`),K(2,`Callbacks`),z(),R(3,`dd`),K(4),z()()),e&2){W(2);let e=O_(0);D(4),q(e.callbacks??0)}}function Rce(e,t){if(e&1&&(R(0,`dl`)(1,`div`)(2,`dt`),K(3,`Started`),z(),R(4,`dd`),K(5),z()(),R(6,`div`)(7,`dt`),K(8,`Finished`),z(),R(9,`dd`),K(10),z()(),R(11,`div`)(12,`dt`),K(13),z(),R(14,`dd`),K(15),z()(),A(16,Lce,5,1,`div`),z()),e&2){let e=W(),t=O_(0);D(5),q(e.time(t.startedAt)),D(5),J(` `,t.durationMs===void 0?`Not yet`:e.time(t.startedAt+t.durationMs),` `),D(3),q(t.status===`pending`?`Waiting for`:`Duration`),D(2),q(e.span(e.took(t,e.now()))),D(),j(t.kind===`callback`?16:-1)}}var s5=[`args`,`outcome`,`timing`],zce=class e{call=$.required();now=$.required();announce=ev();host=x(kl);tab=T(`args`);tabOrder=s5;json=o5;time=XE;span=n5;took=e5;statusText=X(()=>{let e=this.call();return e.status===`pending`?`Pending`:e.status===`ok`?`OK`:$8(e)?`Not implemented`:`Error`});panelHasFocusable=X(()=>{let e=this.call();return this.tab()===`args`?e.args!==void 0:this.tab()===`outcome`&&!e.error&&e.status===`ok`&&e.result!==void 0});tabLabel(e){return e===`args`?`Arguments`:e===`timing`?`Timing`:this.call().status===`error`?`Error`:`Result`}onTabKey(e){let t=s5.indexOf(this.tab()),n;if(e.key===`ArrowRight`)n=(t+1)%s5.length;else if(e.key===`ArrowLeft`)n=(t-1+s5.length)%s5.length;else if(e.key===`Home`)n=0;else if(e.key===`End`)n=s5.length-1;else return;e.preventDefault();let r=s5[n];this.tab.set(r),this.host.nativeElement.querySelector(`#cap-tab-${r}`)?.focus()}async copy(e){let t=this.call(),n=`${t.plugin}.${t.method}()`,r=e===`json`?o5(t):Cce(t);try{await navigator.clipboard.writeText(r),this.announce.emit(`Copied ${n} as ${e===`json`?`JSON`:`code`}.`)}catch{this.announce.emit(`The clipboard is not available here.`)}}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-capacitor-call-detail`]],inputs:{call:[1,`call`],now:[1,`now`]},outputs:{announce:`announce`},decls:19,vars:10,consts:[[`id`,`cap-detail`,`aria-labelledby`,`cap-detail-title`,1,`detail`],[`id`,`cap-detail-title`],[1,`meta`],[1,`actions`],[`type`,`button`,1,`small`,3,`click`],[`role`,`tablist`,`aria-label`,`Call details`,1,`tabs`,3,`keydown`],[`type`,`button`,`role`,`tab`,3,`id`],[`role`,`tabpanel`,1,`panel`,3,`id`],[`type`,`button`,`role`,`tab`,3,`click`,`id`],[1,`muted`],[`tabindex`,`0`,`aria-label`,`Arguments`],[1,`error-text`],[`tabindex`,`0`,`aria-label`,`Result`]],template:function(e,t){if(e&1&&(E_(0),R(1,`section`,0)(2,`h3`,1)(3,`code`),K(4),z()(),R(5,`p`,2),K(6),z(),R(7,`div`,3)(8,`button`,4),U(`click`,function(){return t.copy(`json`)}),K(9,`Copy as JSON`),z(),R(10,`button`,4),U(`click`,function(){return t.copy(`code`)}),K(11,`Copy as code`),z()(),R(12,`div`,5),U(`keydown`,function(e){return t.onTabKey(e)}),M(13,Tce,2,5,`button`,6,Xh),z(),R(15,`div`,7),A(16,Oce,2,1)(17,Ice,3,1)(18,Rce,17,5,`dl`),z()()),e&2){let e,n=D_(t.call());D(4),Y(``,n.plugin,`.`,n.method,`()`),D(2),y_(` `,t.statusText(),`, `,n.via,`, `,n.kind===`callback`?`stream`:`promise`,` `),D(7),N(t.tabOrder),D(2),V(`id`,`cap-panel-`+t.tab()),k(`aria-labelledby`,`cap-tab-`+t.tab())(`tabindex`,t.panelHasFocusable()?null:0),D(),j((e=t.tab())===`args`?16:e===`outcome`?17:e===`timing`?18:-1)}},styles:[`.detail[_ngcontent-%COMP%] { +`)},\n${t}}`:`{}`}function Tce(e){let t=i5.test(e.plugin)?e.plugin:`Capacitor.Plugins[${JSON.stringify(e.plugin)}]`,n=i5.test(e.method)?`.${e.method}`:`[${JSON.stringify(e.method)}]`,r=e.args===void 0?[]:[a5(e.args)];return e.kind===`callback`&&(r.length||r.push(`{}`),r.push(`(result, error) => {}`)),`await ${t}${n}(${r.join(`, `)});`}function o5(e){if(e===void 0)return`undefined`;try{return JSON.stringify(e,null,2)??`undefined`}catch{return String(e)}}function Ece(e,t=120){let n;try{n=JSON.stringify(e)??`undefined`}catch{n=String(e)}return n.length>t?`${n.slice(0,t-1)}…`:n}function Dce(e,t){if(e&1){let e=B();R(0,`button`,8),U(`click`,function(){let t=S(e).$implicit;return C(W().tab.set(t))}),K(1),z()}if(e&2){let e=t.$implicit,n=W();V(`id`,`cap-tab-`+e),k(`aria-selected`,n.tab()===e)(`aria-controls`,`cap-panel-`+e)(`tabindex`,n.tab()===e?0:-1),D(),J(` `,n.tabLabel(e),` `)}}function Oce(e,t){e&1&&(R(0,`p`,9),K(1,`No arguments.`),z())}function kce(e,t){if(e&1&&(R(0,`pre`,10),K(1),z()),e&2){let e=W(2),t=O_(0);D(),q(e.json(t.args))}}function Ace(e,t){e&1&&A(0,Oce,2,0,`p`,9)(1,kce,2,1,`pre`,10),e&2&&(W(),j(O_(0).args===void 0?0:1))}function jce(e,t){if(e&1&&(R(0,`code`),K(1),z()),e&2){let e=W();D(),q(e.code)}}function Mce(e,t){if(e&1&&(R(0,`p`,11),A(1,jce,2,1,`code`),K(2),z()),e&2){let e=t;D(),j(e.code?1:-1),D(),J(` `,e.message,` `)}}function Nce(e,t){e&1&&(R(0,`p`,9),K(1,`No answer yet.`),z())}function Pce(e,t){if(e&1&&(R(0,`p`,9),K(1),z()),e&2){W(3);let e=O_(0);D(),J(`The latest of `,e.callbacks,` callbacks.`)}}function Fce(e,t){e&1&&(R(0,`p`,9),K(1,`Resolved without a value.`),z())}function Ice(e,t){if(e&1&&(R(0,`pre`,12),K(1),z()),e&2){let e=W(3),t=O_(0);D(),q(e.json(t.result))}}function Lce(e,t){if(e&1&&(A(0,Pce,2,1,`p`,9),A(1,Fce,2,0,`p`,9)(2,Ice,2,1,`pre`,12)),e&2){W(2);let e=O_(0);j(e.callbacks&&e.callbacks>1?0:-1),D(),j(e.result===void 0?1:2)}}function Rce(e,t){if(e&1&&A(0,Mce,3,2,`p`,11)(1,Nce,2,0,`p`,9)(2,Lce,3,2),e&2){let e;W();let t=O_(0);j((e=t.error)?0:t.status===`pending`?1:2,e)}}function zce(e,t){if(e&1&&(R(0,`div`)(1,`dt`),K(2,`Callbacks`),z(),R(3,`dd`),K(4),z()()),e&2){W(2);let e=O_(0);D(4),q(e.callbacks??0)}}function Bce(e,t){if(e&1&&(R(0,`dl`)(1,`div`)(2,`dt`),K(3,`Started`),z(),R(4,`dd`),K(5),z()(),R(6,`div`)(7,`dt`),K(8,`Finished`),z(),R(9,`dd`),K(10),z()(),R(11,`div`)(12,`dt`),K(13),z(),R(14,`dd`),K(15),z()(),A(16,zce,5,1,`div`),z()),e&2){let e=W(),t=O_(0);D(5),q(e.time(t.startedAt)),D(5),J(` `,t.durationMs===void 0?`Not yet`:e.time(t.startedAt+t.durationMs),` `),D(3),q(t.status===`pending`?`Waiting for`:`Duration`),D(2),q(e.span(e.took(t,e.now()))),D(),j(t.kind===`callback`?16:-1)}}var s5=[`args`,`outcome`,`timing`],Vce=class e{call=$.required();now=$.required();announce=ev();host=x(kl);tab=T(`args`);tabOrder=s5;json=o5;time=XE;span=n5;took=e5;statusText=X(()=>{let e=this.call();return e.status===`pending`?`Pending`:e.status===`ok`?`OK`:$8(e)?`Not implemented`:`Error`});panelHasFocusable=X(()=>{let e=this.call();return this.tab()===`args`?e.args!==void 0:this.tab()===`outcome`&&!e.error&&e.status===`ok`&&e.result!==void 0});tabLabel(e){return e===`args`?`Arguments`:e===`timing`?`Timing`:this.call().status===`error`?`Error`:`Result`}onTabKey(e){let t=s5.indexOf(this.tab()),n;if(e.key===`ArrowRight`)n=(t+1)%s5.length;else if(e.key===`ArrowLeft`)n=(t-1+s5.length)%s5.length;else if(e.key===`Home`)n=0;else if(e.key===`End`)n=s5.length-1;else return;e.preventDefault();let r=s5[n];this.tab.set(r),this.host.nativeElement.querySelector(`#cap-tab-${r}`)?.focus()}async copy(e){let t=this.call(),n=`${t.plugin}.${t.method}()`,r=e===`json`?o5(t):Tce(t);try{await navigator.clipboard.writeText(r),this.announce.emit(`Copied ${n} as ${e===`json`?`JSON`:`code`}.`)}catch{this.announce.emit(`The clipboard is not available here.`)}}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-capacitor-call-detail`]],inputs:{call:[1,`call`],now:[1,`now`]},outputs:{announce:`announce`},decls:19,vars:10,consts:[[`id`,`cap-detail`,`aria-labelledby`,`cap-detail-title`,1,`detail`],[`id`,`cap-detail-title`],[1,`meta`],[1,`actions`],[`type`,`button`,1,`small`,3,`click`],[`role`,`tablist`,`aria-label`,`Call details`,1,`tabs`,3,`keydown`],[`type`,`button`,`role`,`tab`,3,`id`],[`role`,`tabpanel`,1,`panel`,3,`id`],[`type`,`button`,`role`,`tab`,3,`click`,`id`],[1,`muted`],[`tabindex`,`0`,`aria-label`,`Arguments`],[1,`error-text`],[`tabindex`,`0`,`aria-label`,`Result`]],template:function(e,t){if(e&1&&(E_(0),R(1,`section`,0)(2,`h3`,1)(3,`code`),K(4),z()(),R(5,`p`,2),K(6),z(),R(7,`div`,3)(8,`button`,4),U(`click`,function(){return t.copy(`json`)}),K(9,`Copy as JSON`),z(),R(10,`button`,4),U(`click`,function(){return t.copy(`code`)}),K(11,`Copy as code`),z()(),R(12,`div`,5),U(`keydown`,function(e){return t.onTabKey(e)}),M(13,Dce,2,5,`button`,6,Xh),z(),R(15,`div`,7),A(16,Ace,2,1)(17,Rce,3,1)(18,Bce,17,5,`dl`),z()()),e&2){let e,n=D_(t.call());D(4),Y(``,n.plugin,`.`,n.method,`()`),D(2),y_(` `,t.statusText(),`, `,n.via,`, `,n.kind===`callback`?`stream`:`promise`,` `),D(7),N(t.tabOrder),D(2),V(`id`,`cap-panel-`+t.tab()),k(`aria-labelledby`,`cap-tab-`+t.tab())(`tabindex`,t.panelHasFocusable()?null:0),D(),j((e=t.tab())===`args`?16:e===`outcome`?17:e===`timing`?18:-1)}},styles:[`.detail[_ngcontent-%COMP%] { border: 1px solid var(--%NS%border); border-radius: var(--%NS%radius); background: var(--%NS%surface); @@ -23361,7 +23384,7 @@ dd[_ngcontent-%COMP%] { margin: 0; color: var(--%NS%text); font-variant-numeric: tabular-nums; -}`]})},Bce=(e,t)=>t.id,Vce=(e,t)=>t.elementId;function Hce(e,t){e&1&&(R(0,`p`,3),K(1,`This page has no `),R(2,`code`),K(3,`ion-router-outlet`),z(),K(4,`.`),z())}function Uce(e,t){if(e&1&&(R(0,`code`,8),K(1),z()),e&2){let e=W().$implicit;D(),q(e.name)}}function Wce(e,t){if(e&1&&(R(0,`span`,9),K(1,`in tabs `),R(2,`code`),K(3),z()()),e&2){let e=W().$implicit;D(3),q(e.tabs)}}function Gce(e,t){if(e&1&&(R(0,`div`)(1,`dt`),K(2,`Can go back`),z(),R(3,`dd`),K(4),z()()),e&2){let e=W().$implicit;D(4),q(e.canGoBack?`Yes`:`No`)}}function Kce(e,t){if(e&1&&(R(0,`code`,14),K(1),z()),e&2){let e=W().$implicit;D(),q(e.url)}}function qce(e,t){e&1&&(R(0,`span`,15),K(1,`Active`),z())}function Jce(e,t){if(e&1){let e=B();R(0,`li`)(1,`button`,11),U(`mouseenter`,function(){let t=S(e).$implicit;return C(W(5).highlight(t))})(`mouseleave`,function(){return S(e),C(W(5).highlight(null))})(`focus`,function(){let t=S(e).$implicit;return C(W(5).highlight(t))})(`blur`,function(){return S(e),C(W(5).highlight(null))})(`click`,function(){let t=S(e).$implicit;return C(W(5).highlight(t,!0))}),R(2,`span`,12),K(3),z(),R(4,`code`,13),K(5),z(),A(6,Kce,2,1,`code`,14),A(7,qce,2,0,`span`,15),z()()}if(e&2){let e=t.$implicit,n=t.$index;D(),G(`active`,e.active),k(`aria-current`,e.active?`page`:null),D(2),q(n+1),D(2),q(e.component),D(),j(e.url?6:-1),D(),j(e.active?7:-1)}}function Yce(e,t){if(e&1&&(R(0,`ol`,10),M(1,Jce,8,7,`li`,null,Vce),z()),e&2){let e=W().$implicit;k(`aria-label`,`Page stack of `+W(3).outletLabel(e)),D(),N(e.pages)}}function Xce(e,t){e&1&&(R(0,`p`,3),K(1,`No page in this outlet yet.`),z())}function Zce(e,t){if(e&1&&(R(0,`p`,6),K(1),z()),e&2){let e=W().$implicit;D(),J(``,e.truncated,` older pages are not listed.`)}}function Qce(e,t){e&1&&(R(0,`p`,6),K(1,` Read from the outlet's pages in the DOM, without URLs. The Angular directive was not found: the app may not use `),R(2,`code`),K(3,`@ionic/angular`),z(),K(4,`, or it is not a development build. `),z())}function $ce(e,t){if(e&1&&(R(0,`article`,5)(1,`h3`,7)(2,`code`),K(3,`ion-router-outlet`),z(),A(4,Uce,2,1,`code`,8),A(5,Wce,4,1,`span`,9),z(),R(6,`dl`)(7,`div`)(8,`dt`),K(9,`Pages`),z(),R(10,`dd`),K(11),z()(),R(12,`div`)(13,`dt`),K(14,`Last navigation`),z(),R(15,`dd`),K(16),z()(),A(17,Gce,5,1,`div`),z(),A(18,Yce,3,1,`ol`,10)(19,Xce,2,0,`p`,3),A(20,Zce,2,1,`p`,6),A(21,Qce,5,0,`p`,6),z()),e&2){let e=t.$implicit,n=W(3);k(`aria-labelledby`,`cap-ionic-`+e.id),D(),V(`id`,`cap-ionic-`+e.id),D(3),j(e.name===`primary`?-1:4),D(),j(e.tabs?5:-1),D(6),q(e.pages.length+(e.truncated??0)),D(5),q(n.directionText(e)),D(),j(e.canGoBack===void 0?-1:17),D(),j(e.pages.length?18:19),D(2),j(e.truncated?20:-1),D(),j(e.source===`dom`?21:-1)}}function ele(e,t){if(e&1&&(R(0,`p`,6),K(1),z()),e&2){let e=W(2);D(),J(``,e.truncatedOutlets,` more outlets are not listed.`)}}function tle(e,t){if(e&1&&(R(0,`div`,4),M(1,$ce,22,10,`article`,5,Bce),z(),A(3,ele,2,1,`p`,6)),e&2){let e=W();D(),N(e.outlets),D(2),j(e.truncatedOutlets?3:-1)}}function nle(e,t){if(e&1&&(R(0,`section`,0)(1,`h2`,1),K(2,`Ionic page stacks`),z(),R(3,`p`,2),K(4,` Each `),R(5,`code`),K(6,`ion-router-outlet`),z(),K(7,` keeps the pages it has shown in a stack, oldest first. Read through `),R(8,`code`),K(9),z(),K(10),z(),A(11,Hce,5,0,`p`,3)(12,tle,4,1),z()),e&2){let e=t;D(9),q(e.framework),D(),J(``,e.mode?` in `+e.mode+` mode`:``,`. The panel changes nothing in the app. `),D(),j(e.outlets.length?12:11)}}function rle(e){let t=e?.pages;return t&&typeof t==`object`?Object.values(t):[]}var ile={forward:`Forward`,back:`Back`,root:`Root`};function ale(e){if(!e.direction)return`Not seen yet`;let t=ile[e.direction];if(e.directionSource===`inferred`)return`${t} (from the stack)`;let n=[e.tabSwitch?`tab switch`:null,e.animated===!1?`no animation`:null].filter(Boolean);return n.length?`${t} (${n.join(`, `)})`:t}var ole=class e{rpc=$(null);pageId=$(null);pages=T([]);page=X(()=>{let e=this.pageId();return e?this.pages().find(t=>t.pageId===e)??null:null});directionText=ale;destroyRef=x(ys);unsubscribe=null;constructor(){E(()=>{let e=this.rpc();e&&this.load(e)}),this.destroyRef.onDestroy(()=>{this.unsubscribe?.(),this.highlight(null)})}async load(e){try{let t=await e.scope(`pangular`).rpc.sharedState(`ionic`);if(this.destroyRef.destroyed)return;let n=e=>this.pages.set(rle(e));n(t.value()),this.unsubscribe?.(),this.unsubscribe=t.on(`updated`,n)}catch{this.pages.set([])}}outletLabel(e){return e.name===`primary`?`the primary outlet`:`outlet ${e.name}`}highlight(e,t=!1){let n=this.rpc();if(!n)return;let r=e?{pageId:this.pageId(),id:e.elementId,reveal:t}:null;n.scope(`pangular`).rpc.call(`request-page-highlight`,r).catch(()=>{})}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-capacitor-ionic`]],inputs:{rpc:[1,`rpc`],pageId:[1,`pageId`]},decls:1,vars:1,consts:[[`aria-labelledby`,`cap-ionic-title`],[`id`,`cap-ionic-title`],[1,`lead`],[1,`empty`],[1,`cards`],[1,`card`],[1,`note`],[3,`id`],[1,`outlet-name`],[1,`tabs`],[1,`stack`],[`type`,`button`,1,`stack-page`,3,`mouseenter`,`mouseleave`,`focus`,`blur`,`click`],[`aria-hidden`,`true`,1,`index`],[1,`component`],[1,`url`],[1,`chip`]],template:function(e,t){if(e&1&&A(0,nle,13,3,`section`,0),e&2){let e;j((e=t.page())?0:-1,e)}},styles:[`[_nghost-%COMP%] { +}`]})},Hce=(e,t)=>t.id,Uce=(e,t)=>t.elementId;function Wce(e,t){e&1&&(R(0,`p`,3),K(1,`This page has no `),R(2,`code`),K(3,`ion-router-outlet`),z(),K(4,`.`),z())}function Gce(e,t){if(e&1&&(R(0,`code`,8),K(1),z()),e&2){let e=W().$implicit;D(),q(e.name)}}function Kce(e,t){if(e&1&&(R(0,`span`,9),K(1,`in tabs `),R(2,`code`),K(3),z()()),e&2){let e=W().$implicit;D(3),q(e.tabs)}}function qce(e,t){if(e&1&&(R(0,`div`)(1,`dt`),K(2,`Can go back`),z(),R(3,`dd`),K(4),z()()),e&2){let e=W().$implicit;D(4),q(e.canGoBack?`Yes`:`No`)}}function Jce(e,t){if(e&1&&(R(0,`code`,14),K(1),z()),e&2){let e=W().$implicit;D(),q(e.url)}}function Yce(e,t){e&1&&(R(0,`span`,15),K(1,`Active`),z())}function Xce(e,t){if(e&1){let e=B();R(0,`li`)(1,`button`,11),U(`mouseenter`,function(){let t=S(e).$implicit;return C(W(5).highlight(t))})(`mouseleave`,function(){return S(e),C(W(5).highlight(null))})(`focus`,function(){let t=S(e).$implicit;return C(W(5).highlight(t))})(`blur`,function(){return S(e),C(W(5).highlight(null))})(`click`,function(){let t=S(e).$implicit;return C(W(5).highlight(t,!0))}),R(2,`span`,12),K(3),z(),R(4,`code`,13),K(5),z(),A(6,Jce,2,1,`code`,14),A(7,Yce,2,0,`span`,15),z()()}if(e&2){let e=t.$implicit,n=t.$index;D(),G(`active`,e.active),k(`aria-current`,e.active?`page`:null),D(2),q(n+1),D(2),q(e.component),D(),j(e.url?6:-1),D(),j(e.active?7:-1)}}function Zce(e,t){if(e&1&&(R(0,`ol`,10),M(1,Xce,8,7,`li`,null,Uce),z()),e&2){let e=W().$implicit;k(`aria-label`,`Page stack of `+W(3).outletLabel(e)),D(),N(e.pages)}}function Qce(e,t){e&1&&(R(0,`p`,3),K(1,`No page in this outlet yet.`),z())}function $ce(e,t){if(e&1&&(R(0,`p`,6),K(1),z()),e&2){let e=W().$implicit;D(),J(``,e.truncated,` older pages are not listed.`)}}function ele(e,t){e&1&&(R(0,`p`,6),K(1,` Read from the outlet's pages in the DOM, without URLs. The Angular directive was not found: the app may not use `),R(2,`code`),K(3,`@ionic/angular`),z(),K(4,`, or it is not a development build. `),z())}function tle(e,t){if(e&1&&(R(0,`article`,5)(1,`h3`,7)(2,`code`),K(3,`ion-router-outlet`),z(),A(4,Gce,2,1,`code`,8),A(5,Kce,4,1,`span`,9),z(),R(6,`dl`)(7,`div`)(8,`dt`),K(9,`Pages`),z(),R(10,`dd`),K(11),z()(),R(12,`div`)(13,`dt`),K(14,`Last navigation`),z(),R(15,`dd`),K(16),z()(),A(17,qce,5,1,`div`),z(),A(18,Zce,3,1,`ol`,10)(19,Qce,2,0,`p`,3),A(20,$ce,2,1,`p`,6),A(21,ele,5,0,`p`,6),z()),e&2){let e=t.$implicit,n=W(3);k(`aria-labelledby`,`cap-ionic-`+e.id),D(),V(`id`,`cap-ionic-`+e.id),D(3),j(e.name===`primary`?-1:4),D(),j(e.tabs?5:-1),D(6),q(e.pages.length+(e.truncated??0)),D(5),q(n.directionText(e)),D(),j(e.canGoBack===void 0?-1:17),D(),j(e.pages.length?18:19),D(2),j(e.truncated?20:-1),D(),j(e.source===`dom`?21:-1)}}function nle(e,t){if(e&1&&(R(0,`p`,6),K(1),z()),e&2){let e=W(2);D(),J(``,e.truncatedOutlets,` more outlets are not listed.`)}}function rle(e,t){if(e&1&&(R(0,`div`,4),M(1,tle,22,10,`article`,5,Hce),z(),A(3,nle,2,1,`p`,6)),e&2){let e=W();D(),N(e.outlets),D(2),j(e.truncatedOutlets?3:-1)}}function ile(e,t){if(e&1&&(R(0,`section`,0)(1,`h2`,1),K(2,`Ionic page stacks`),z(),R(3,`p`,2),K(4,` Each `),R(5,`code`),K(6,`ion-router-outlet`),z(),K(7,` keeps the pages it has shown in a stack, oldest first. Read through `),R(8,`code`),K(9),z(),K(10),z(),A(11,Wce,5,0,`p`,3)(12,rle,4,1),z()),e&2){let e=t;D(9),q(e.framework),D(),J(``,e.mode?` in `+e.mode+` mode`:``,`. The panel changes nothing in the app. `),D(),j(e.outlets.length?12:11)}}function ale(e){let t=e?.pages;return t&&typeof t==`object`?Object.values(t):[]}var ole={forward:`Forward`,back:`Back`,root:`Root`};function sle(e){if(!e.direction)return`Not seen yet`;let t=ole[e.direction];if(e.directionSource===`inferred`)return`${t} (from the stack)`;let n=[e.tabSwitch?`tab switch`:null,e.animated===!1?`no animation`:null].filter(Boolean);return n.length?`${t} (${n.join(`, `)})`:t}var cle=class e{rpc=$(null);pageId=$(null);pages=T([]);page=X(()=>{let e=this.pageId();return e?this.pages().find(t=>t.pageId===e)??null:null});directionText=sle;destroyRef=x(ys);unsubscribe=null;constructor(){E(()=>{let e=this.rpc();e&&this.load(e)}),this.destroyRef.onDestroy(()=>{this.unsubscribe?.(),this.highlight(null)})}async load(e){try{let t=await e.scope(`pangular`).rpc.sharedState(`ionic`);if(this.destroyRef.destroyed)return;let n=e=>this.pages.set(ale(e));n(t.value()),this.unsubscribe?.(),this.unsubscribe=t.on(`updated`,n)}catch{this.pages.set([])}}outletLabel(e){return e.name===`primary`?`the primary outlet`:`outlet ${e.name}`}highlight(e,t=!1){let n=this.rpc();if(!n)return;let r=e?{pageId:this.pageId(),id:e.elementId,reveal:t}:null;n.scope(`pangular`).rpc.call(`request-page-highlight`,r).catch(()=>{})}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-capacitor-ionic`]],inputs:{rpc:[1,`rpc`],pageId:[1,`pageId`]},decls:1,vars:1,consts:[[`aria-labelledby`,`cap-ionic-title`],[`id`,`cap-ionic-title`],[1,`lead`],[1,`empty`],[1,`cards`],[1,`card`],[1,`note`],[3,`id`],[1,`outlet-name`],[1,`tabs`],[1,`stack`],[`type`,`button`,1,`stack-page`,3,`mouseenter`,`mouseleave`,`focus`,`blur`,`click`],[`aria-hidden`,`true`,1,`index`],[1,`component`],[1,`url`],[1,`chip`]],template:function(e,t){if(e&1&&A(0,ile,13,3,`section`,0),e&2){let e;j((e=t.page())?0:-1,e)}},styles:[`[_nghost-%COMP%] { display: block; } @@ -23522,7 +23545,7 @@ dd[_ngcontent-%COMP%] { .stack-page[_ngcontent-%COMP%] { transition: none; } -}`]})},sle=(e,t)=>t.plugin,cle=(e,t)=>t.label;function lle(e,t){if(e&1&&(R(0,`span`,5),K(1),z(),K(2,` `),R(3,`span`,6),K(4,`from `),R(5,`code`),K(6),z(),K(7),z()),e&2){let e=W().$implicit,t=W(2);D(),q(e.value),D(5),q(e.from),D(),J(`, `,t.ago(e.at,t.now()))}}function ule(e,t){e&1&&(R(0,`span`,4),K(1,`Not reported yet`),z())}function dle(e,t){if(e&1&&(R(0,`div`)(1,`dt`),K(2),z(),R(3,`dd`),A(4,lle,8,3)(5,ule,2,0,`span`,4),z()()),e&2){let e=t.$implicit;D(2),q(e.label),D(2),j(e.value===null?5:4)}}function fle(e,t){if(e&1&&(R(0,`article`,2)(1,`h3`,3)(2,`code`),K(3),z()(),R(4,`dl`),M(5,dle,6,2,`div`,null,cle),z()()),e&2){let e=t.$implicit;k(`aria-labelledby`,`cap-state-`+e.plugin),D(),V(`id`,`cap-state-`+e.plugin),D(2),q(e.plugin),D(2),N(e.fields)}}function ple(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function c5(e,t=e=>e){return n=>{let r=ple(n)?n[e]:void 0;return typeof r==`string`||typeof r==`number`||typeof r==`boolean`?t(String(r)):null}}function l5(e,t,n){return[...e.map(e=>({method:e,read:n})),...t.map(e=>({event:e,read:n}))]}var mle=[{plugin:`Foldable`,fields:[{label:`Fold state`,sources:l5([`getFoldState`],[`foldStateChange`],c5(`state`))},{label:`Posture`,sources:l5([`getFoldState`],[`foldStateChange`],c5(`posture`))},{label:`Hinge orientation`,sources:l5([`getFoldState`],[`foldStateChange`],c5(`hingeOrientation`))},{label:`Hinge angle`,sources:l5([`getHingeAngle`],[`hingeAngleChange`],c5(`angle`,e=>`${e}°`))},{label:`Active display`,sources:l5([`getFoldState`],[`foldStateChange`],c5(`activeDisplay`))},{label:`Size class`,sources:l5([`getSizeClass`],[`sizeClassChange`],e=>{let t=c5(`widthClass`)(e),n=c5(`heightClass`)(e);return!t&&!n?null:[t&&`width ${t}`,n&&`height ${n}`].filter(Boolean).join(`, `)})}]}];function hle(e,t,n){let r=null,i=(e,t,i)=>{if(r&&r.at>=i)return;let a=n.read(e);a!==null&&(r={value:a,from:t,at:i})};if(`method`in n)for(let r of e.calls)r.plugin===t&&r.method===n.method&&r.status===`ok`&&i(r.result,`${n.method}()`,r.startedAt+(r.durationMs??0));else for(let r of e.listeners)r.plugin===t&&r.event===n.event&&r.lastEventAt!==void 0&&r.last!==void 0&&i(r.last,n.event,r.lastEventAt);return r}function gle(e,t=mle){let n=new Set(e.info.plugins.map(e=>e.name));return t.filter(e=>n.has(e.plugin)).map(t=>({plugin:t.plugin,fields:t.fields.map(n=>{let r=null;for(let i of n.sources){let n=hle(e,t.plugin,i);n&&(!r||n.at>r.at)&&(r=n)}let i=r;return{label:n.label,value:i?.value??null,from:i?.from??null,at:i?.at??null}})}))}var _le=class e{cards=$.required();now=$.required();ago=bce;static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-capacitor-state`]],inputs:{cards:[1,`cards`],now:[1,`now`]},decls:5,vars:0,consts:[[1,`lead`],[1,`cards`],[1,`card`],[3,`id`],[1,`missing`],[1,`value`],[1,`source`]],template:function(e,t){e&1&&(R(0,`p`,0),K(1,` Read from the results and events the app already received. The panel calls nothing in the app. `),z(),R(2,`div`,1),M(3,fle,7,3,`article`,2,sle),z()),e&2&&(D(3),N(t.cards()))},styles:[`[_nghost-%COMP%] { +}`]})},lle=(e,t)=>t.plugin,ule=(e,t)=>t.label;function dle(e,t){if(e&1&&(R(0,`span`,5),K(1),z(),K(2,` `),R(3,`span`,6),K(4,`from `),R(5,`code`),K(6),z(),K(7),z()),e&2){let e=W().$implicit,t=W(2);D(),q(e.value),D(5),q(e.from),D(),J(`, `,t.ago(e.at,t.now()))}}function fle(e,t){e&1&&(R(0,`span`,4),K(1,`Not reported yet`),z())}function ple(e,t){if(e&1&&(R(0,`div`)(1,`dt`),K(2),z(),R(3,`dd`),A(4,dle,8,3)(5,fle,2,0,`span`,4),z()()),e&2){let e=t.$implicit;D(2),q(e.label),D(2),j(e.value===null?5:4)}}function mle(e,t){if(e&1&&(R(0,`article`,2)(1,`h3`,3)(2,`code`),K(3),z()(),R(4,`dl`),M(5,ple,6,2,`div`,null,ule),z()()),e&2){let e=t.$implicit;k(`aria-labelledby`,`cap-state-`+e.plugin),D(),V(`id`,`cap-state-`+e.plugin),D(2),q(e.plugin),D(2),N(e.fields)}}function hle(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function c5(e,t=e=>e){return n=>{let r=hle(n)?n[e]:void 0;return typeof r==`string`||typeof r==`number`||typeof r==`boolean`?t(String(r)):null}}function l5(e,t,n){return[...e.map(e=>({method:e,read:n})),...t.map(e=>({event:e,read:n}))]}var gle=[{plugin:`Foldable`,fields:[{label:`Fold state`,sources:l5([`getFoldState`],[`foldStateChange`],c5(`state`))},{label:`Posture`,sources:l5([`getFoldState`],[`foldStateChange`],c5(`posture`))},{label:`Hinge orientation`,sources:l5([`getFoldState`],[`foldStateChange`],c5(`hingeOrientation`))},{label:`Hinge angle`,sources:l5([`getHingeAngle`],[`hingeAngleChange`],c5(`angle`,e=>`${e}°`))},{label:`Active display`,sources:l5([`getFoldState`],[`foldStateChange`],c5(`activeDisplay`))},{label:`Size class`,sources:l5([`getSizeClass`],[`sizeClassChange`],e=>{let t=c5(`widthClass`)(e),n=c5(`heightClass`)(e);return!t&&!n?null:[t&&`width ${t}`,n&&`height ${n}`].filter(Boolean).join(`, `)})}]}];function _le(e,t,n){let r=null,i=(e,t,i)=>{if(r&&r.at>=i)return;let a=n.read(e);a!==null&&(r={value:a,from:t,at:i})};if(`method`in n)for(let r of e.calls)r.plugin===t&&r.method===n.method&&r.status===`ok`&&i(r.result,`${n.method}()`,r.startedAt+(r.durationMs??0));else for(let r of e.listeners)r.plugin===t&&r.event===n.event&&r.lastEventAt!==void 0&&r.last!==void 0&&i(r.last,n.event,r.lastEventAt);return r}function vle(e,t=gle){let n=new Set(e.info.plugins.map(e=>e.name));return t.filter(e=>n.has(e.plugin)).map(t=>({plugin:t.plugin,fields:t.fields.map(n=>{let r=null;for(let i of n.sources){let n=_le(e,t.plugin,i);n&&(!r||n.at>r.at)&&(r=n)}let i=r;return{label:n.label,value:i?.value??null,from:i?.from??null,at:i?.at??null}})}))}var yle=class e{cards=$.required();now=$.required();ago=Sce;static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-capacitor-state`]],inputs:{cards:[1,`cards`],now:[1,`now`]},decls:5,vars:0,consts:[[1,`lead`],[1,`cards`],[1,`card`],[3,`id`],[1,`missing`],[1,`value`],[1,`source`]],template:function(e,t){e&1&&(R(0,`p`,0),K(1,` Read from the results and events the app already received. The panel calls nothing in the app. `),z(),R(2,`div`,1),M(3,mle,7,3,`article`,2,lle),z()),e&2&&(D(3),N(t.cards()))},styles:[`[_nghost-%COMP%] { display: block; } @@ -23598,7 +23621,7 @@ dd[_ngcontent-%COMP%] { .missing[_ngcontent-%COMP%] { font-style: italic; -}`]})},vle=(e,t)=>t.filter,u5=(e,t)=>t.id,yle=(e,t)=>t.name;function ble(e,t){e&1&&(F(0,`p`,1),K(1,`Loading Capacitor data…`),I())}function xle(e,t){if(e&1){let e=B();F(0,`div`,2)(1,`p`),K(2,`Can't read the Capacitor data from the devtools server.`),I(),F(3,`button`,3),H(`click`,function(){return S(e),C(W().retry())}),K(4,`Retry`),I()()}}function Sle(e,t){if(e&1){let e=B();F(0,`button`,28),H(`click`,function(){let t=S(e).$implicit;return C(W(4).pickFilter(t.filter))}),F(1,`span`,25),K(2),I(),K(3,` `),F(4,`span`,26),K(5),I()()}if(e&2){let e=t.$implicit,n=W(4);k(`data-filter`,e.filter)(`aria-pressed`,n.callFilter()===e.filter),D(2),q(e.label),D(3),q(e.count)}}function Cle(e,t){if(e&1&&M(0,Sle,6,4,`button`,27,vle),e&2){let e=W();N(W(2).callStats(e))}}function wle(e,t){if(e&1&&(F(0,`span`,24)(1,`span`,25),K(2,`Platform`),I(),K(3,` `),F(4,`span`,26)(5,`code`),K(6),I(),K(7),I()(),A(8,Cle,2,0),F(9,`span`,24)(10,`span`,25),K(11,`CapacitorHttp`),I(),K(12,` `),F(13,`span`,26),K(14),I()(),F(15,`span`,24)(16,`span`,25),K(17,`Plugin hints`),I(),K(18,` `),F(19,`span`,26),K(20),I()()),e&2){let e=t;D(6),q(e.platform),D(),J(` `,e.native?`native`:`web`),D(),j(e.logsCalls?8:-1),D(6),q(e.capacitorHttp),D(6),q(e.hints)}}function Tle(e,t){if(e&1){let e=B();F(0,`div`,10)(1,`span`,29),K(2,`Page`),I(),F(3,`app-select`,30),H(`valueChange`,function(t){return S(e),C(W(2).selectedPageId.set(t))}),I()()}if(e&2){let e=W(),t=W();D(3),P(`options`,t.pageOptions())(`value`,e.pageId)}}function Ele(e,t){if(e&1&&(F(0,`section`,12)(1,`h2`,31),K(2,`Plugin state`),I(),L(3,`app-capacitor-state`,32),I()),e&2){let e=W(2);D(3),P(`cards`,e.stateCards())(`now`,e.now())}}function Dle(e,t){if(e&1&&(F(0,`p`,16),K(1,` Plugin calls aren't shown on this page. Native calls are logged on iOS and Android, where plugins go through the native bridge. To log calls a web implementation answers, load `),F(2,`code`),K(3,`@pangular-inspector/devtools/capacitor-hook`),I(),K(4,` before `),F(5,`code`),K(6,`@capacitor/core`),I(),K(7,`. `),F(8,`a`,33),K(9,`How to log web calls`),F(10,`span`,6),K(11,` (opens in a new tab)`),I()()()),e&2){let e=W(2);D(8),P(`href`,e.guideUrl,bu)}}function Ole(e,t){if(e&1&&(F(0,`p`,16),K(1,` Only native calls are logged. Calls a web implementation answers are left out. `),F(2,`a`,33),K(3,`How to log them too`),F(4,`span`,6),K(5,` (opens in a new tab)`),I()()()),e&2){let e=W(3);D(2),P(`href`,e.guideUrl,bu)}}function kle(e,t){e&1&&(F(0,`p`,19),K(1,`No plugin calls yet. Use the app and they show up here.`),I())}function Ale(e,t){if(e&1){let e=B();F(0,`div`,19)(1,`p`),K(2,`No call matches the filters.`),I(),F(3,`p`,40),K(4),I(),F(5,`button`,3),H(`click`,function(){S(e),W();let t=Ag(3);return W(2).clearFilters(),C(t.focus())}),K(6,` Clear filters `),I()()}if(e&2){let e=W(2),t=W();D(4),y_(` `,e.calls.length,` `,e.calls.length===1?`call is`:`calls are`,` hidden by `,t.hiddenBy(),`. `)}}function jle(e,t){e&1&&(w(),L(0,`path`,47))}function Mle(e,t){e&1&&(w(),L(0,`circle`,52)(1,`path`,53))}function Nle(e,t){e&1&&(w(),L(0,`circle`,52)(1,`path`,54))}function Ple(e,t){e&1&&(w(),L(0,`circle`,52)(1,`path`,55))}function Fle(e,t){e&1&&(F(0,`span`,48),K(1,`stream`),I())}function Ile(e,t){if(e&1){let e=B();F(0,`li`)(1,`button`,43),H(`focus`,function(){let t=S(e).$implicit;return C(W(4).focusedCallId.set(t.id))})(`click`,function(){let t=S(e).$implicit;return C(W(4).select(t.id))}),F(2,`code`,44),K(3),I(),F(4,`span`,45),w(),F(5,`svg`,46),A(6,jle,1,0,`:svg:path`,47)(7,Mle,2,0)(8,Nle,2,0)(9,Ple,2,0),I(),K(10),I(),A(11,Fle,2,0,`span`,48),ls(),F(12,`span`,49)(13,`span`,50),L(14,`span`),I(),K(15),I(),F(16,`span`,48),K(17),I(),F(18,`time`,51),K(19),I()()()}if(e&2){let e,n=t.$implicit,r=W(4);D(),G(`selected`,r.selected()?.id===n.id),k(`aria-pressed`,r.selected()?.id===n.id)(`tabindex`,r.tabStop()===n.id?0:-1),D(2),Y(``,n.plugin,`.`,n.method,`()`),D(),k(`data-tone`,r.tone(n)),D(2),j((e=r.tone(n))===`ok`?6:e===`danger`?7:e===`warn`?8:9),D(4),J(` `,r.statusLabel(n),` `),D(),j(n.kind===`callback`?11:-1),D(3),Zg(`width`,r.barWidth(n),`%`),D(),J(` `,r.durationText(n),` `),D(2),q(n.via),D(2),q(r.time(n.startedAt))}}function Lle(e,t){if(e&1){let e=B();F(0,`app-capacitor-call-detail`,56),H(`announce`,function(t){return S(e),C(W(4).announce(t))}),I()}if(e&2){let e=W(4);P(`call`,t)(`now`,e.now())}}function Rle(e,t){if(e&1){let e=B();F(0,`div`,39)(1,`ol`,41),H(`keydown`,function(t){return S(e),C(W(3).onListKey(t))}),M(2,Ile,20,15,`li`,null,u5),I(),A(4,Lle,1,2,`app-capacitor-call-detail`,42),I()}if(e&2){let e,t=W(3);D(2),N(t.shownCalls()),D(2),j((e=t.selected())?4:-1,e)}}function zle(e,t){if(e&1){let e=B();A(0,Ole,6,1,`p`,16),F(1,`div`,34)(2,`app-search-field`,35,0),H(`valueChange`,function(t){return S(e),C(W(2).setSearch(t))}),I(),F(4,`app-select`,36),H(`valueChange`,function(t){return S(e),C(W(2).setFilter(t))}),I(),F(5,`span`,37),K(6),I()(),L(7,`app-limit-note`,38),A(8,kle,2,0,`p`,19)(9,Ale,7,3,`div`,19)(10,Rle,5,1,`div`,39)}if(e&2){let e=W(),t=W();j(e.info.webCalls?-1:0),D(2),P(`value`,t.filter()),D(2),P(`options`,t.filterOptions)(`value`,t.callFilter()),D(2),Y(``,t.shownCalls().length,` of `,e.calls.length,` calls`),D(),P(`dropped`,e.dropped)(`max`,t.maxCalls()),D(),j(e.calls.length?t.shownCalls().length?10:9:8)}}function Ble(e,t){e&1&&(F(0,`p`,19),K(1,`No plugins are registered or installed.`),I())}function Vle(e,t){if(e&1&&(F(0,`code`),K(1),I()),e&2){let e=W();D(),q(e.command)}}function Hle(e,t){if(e&1){let e=B();F(0,`button`,62),H(`click`,function(){S(e);let t=W();return C(W(4).copyCommand(t.command))}),K(1,` Copy `),I()}e&2&&k(`aria-label`,`Copy `+W().command)}function Ule(e,t){if(e&1&&(F(0,`span`,60),K(1),A(2,Vle,2,1,`code`),K(3),I(),A(4,Hle,2,1,`button`,61)),e&2){let e=t;D(),q(e.before),D(),j(e.command?2:-1),D(),q(e.after),D(),j(e.command?4:-1)}}function Wle(e,t){if(e&1&&(F(0,`tr`)(1,`th`,58)(2,`code`),K(3),I()(),F(4,`td`),K(5),I(),F(6,`td`),K(7),I(),F(8,`td`),K(9),I(),F(10,`td`,59),A(11,Ule,5,4),I()()),e&2){let e,n=t.$implicit,r=W(2),i=W();D(3),q(n.name),D(2),q(n.available?`Yes`:`No`),D(2),q(i.yesNo(n.registered)),D(2),q(n.native?`Yes`:`No`),D(2),j((e=i.pluginHint(n,r.info.platform))?11:-1,e)}}function Gle(e,t){if(e&1&&(F(0,`div`,20)(1,`table`)(2,`thead`)(3,`tr`)(4,`th`,57),K(5,`Plugin`),I(),F(6,`th`,57),K(7,`Available`),I(),F(8,`th`,57),K(9,`Imported`),I(),F(10,`th`,57),K(11,`Native`),I(),F(12,`th`,57),K(13,`Note`),I()()(),F(14,`tbody`),M(15,Wle,12,5,`tr`,null,yle),I()()()),e&2){let e=W();D(15),N(e.info.plugins)}}function Kle(e,t){e&1&&(F(0,`p`,19),K(1,`No plugin listeners. They show up when the app calls addListener.`),I())}function qle(e,t){if(e&1&&(F(0,`code`,65),K(1),I()),e&2){let e=W(2).$implicit,t=W(3);D(),q(t.preview(e.last))}}function Jle(e,t){e&1&&(F(0,`span`,65),K(1,`No data`),I())}function Yle(e,t){if(e&1&&(A(0,qle,2,1,`code`,65)(1,Jle,2,0,`span`,65),F(2,`span`,40),K(3),I()),e&2){let e=W().$implicit,t=W(3);j(+(e.last===void 0)),D(3),J(`at `,t.time(e.lastEventAt))}}function Xle(e,t){e&1&&K(0,` None yet `)}function Zle(e,t){if(e&1&&(F(0,`span`,64),w(),F(1,`svg`,46),L(2,`path`,66)(3,`path`,67),I(),K(4),I()),e&2){let e=W().$implicit,t=W(3);D(4),J(` `,t.leakCount(e),` active listeners: possible leak `)}}function Qle(e,t){if(e&1&&(F(0,`tr`)(1,`th`,58)(2,`code`),K(3),I()(),F(4,`td`)(5,`code`),K(6),I()(),F(7,`td`),K(8),I(),F(9,`td`,63),A(10,Yle,4,2)(11,Xle,1,0),I(),F(12,`td`),K(13),A(14,Zle,5,1,`span`,64),I()()),e&2){let e=t.$implicit,n=W(3);D(3),q(e.plugin),D(3),q(e.event),D(2),q(e.events),D(2),j(e.lastEventAt?10:11),D(3),J(` `,e.removed?`Removed`:`Active`,` `),D(),j(!e.removed&&n.leakCount(e)>1?14:-1)}}function $le(e,t){if(e&1&&(F(0,`div`,23)(1,`table`)(2,`thead`)(3,`tr`)(4,`th`,57),K(5,`Plugin`),I(),F(6,`th`,57),K(7,`Event`),I(),F(8,`th`,57),K(9,`Events`),I(),F(10,`th`,57),K(11,`Last event`),I(),F(12,`th`,57),K(13,`State`),I()()(),F(14,`tbody`),M(15,Qle,15,6,`tr`,null,u5),I()()()),e&2){let e=W();D(15),N(e.listeners)}}function eue(e,t){if(e&1&&(F(0,`p`,4),K(1,` Plugin calls, plugins and listeners of a Capacitor app, as its WebView reports them. Values are masked like other live data. `),I(),F(2,`div`,5),A(3,wle,21,5),F(4,`span`,6),K(5),I()(),F(6,`section`,7)(7,`div`,8)(8,`h2`,9),K(9,`Environment`),I(),A(10,Tle,4,2,`div`,10),I(),F(11,`dl`)(12,`div`)(13,`dt`),K(14,`Platform`),I(),F(15,`dd`)(16,`code`),K(17),I(),K(18),I()(),F(19,`div`)(20,`dt`),K(21,`Server URL`),I(),F(22,`dd`)(23,`code`),K(24),I()()(),F(25,`div`)(26,`dt`),K(27,`CapacitorHttp`),I(),F(28,`dd`),K(29),I()(),F(30,`div`)(31,`dt`),K(32,`Calls logged`),I(),F(33,`dd`),K(34),I()(),F(35,`div`,11)(36,`dt`),K(37,`User agent`),I(),F(38,`dd`)(39,`code`),K(40),I()()()()(),A(41,Ele,4,2,`section`,12),L(42,`app-capacitor-ionic`,13),F(43,`section`,14)(44,`h2`,15),K(45,`Plugin calls`),I(),A(46,Dle,12,1,`p`,16)(47,zle,11,9),I(),F(48,`section`,17)(49,`h2`,18),K(50,`Plugins`),I(),A(51,Ble,2,0,`p`,19)(52,Gle,17,0,`div`,20),I(),F(53,`section`,21)(54,`h2`,22),K(55,`Listeners`),I(),A(56,Kle,2,0,`p`,19)(57,$le,17,0,`div`,23),I()),e&2){let e,n=t,r=W();D(3),j((e=r.summary())?3:-1,e),D(2),q(r.message()),D(5),j(r.pageOptions().length>1?10:-1),D(7),q(n.info.platform),D(),J(` (`,n.info.native?`native`:`web`,`) `),D(6),q(n.info.env.serverUrl||`none`),D(5),J(` `,n.info.env.capacitorHttp===null?`Unknown`:n.info.env.capacitorHttp?`On`:`Off`,` `),D(5),q(r.loggedLabel()),D(6),q(n.info.env.userAgent||`unknown`),D(),j(r.stateCards().length?41:-1),D(),P(`rpc`,r.rpc())(`pageId`,n.pageId),D(4),j(!n.info.bridge&&!n.info.webCalls?46:47),D(5),j(n.info.plugins.length?52:51),D(5),j(n.listeners.length?57:56)}}function tue(e,t){e&1&&(F(0,`p`,1),K(1,` No Capacitor app reports to this server. Start the overlay in the app, then use it. `),I())}var nue=`https://pangular-inspector.dev/inspectors/capacitor/#web-calls`,rue=2e3,d5={all:`All calls`,failed:`Failed`,slow:`Slow (500 ms or more)`,pending:`Pending`},iue=class e{rpc=$(null);destroyRef=x(ys);host=x(kl);injector=x(_s);seen=new Map;hostPageId=fT();unsubscribe;time=XE;preview=wce;pluginHint=r5;guideUrl=nue;yesNo=gce;filterOptions=Object.keys(d5).map(e=>({value:e,label:d5[e]}));pages=T([]);loaded=T(!1);failed=T(!1);selectedPageId=Q({source:()=>this.pages(),computation:(e,t)=>t?.value&&e.some(e=>e.pageId===t.value)?t.value:vce(e,this.hostPageId)});selectedCallId=T(null);focusedCallId=T(null);filter=T(``);callFilter=T(`all`);now=T(Date.now());message=T(``);page=X(()=>{let e=this.selectedPageId();return this.pages().find(t=>t.pageId===e)??null});pageOptions=X(()=>this.pages().map(e=>({value:e.pageId,label:e.title||e.url||e.pageId,hint:e.info.platform})));maxCalls=X(()=>IT(this.rpc()).limits.capacitorCalls);loggedLabel=X(()=>{let e=this.page()?.info;return e?e.bridge&&e.webCalls?`Native and web`:e.bridge?`Native only`:e.webCalls?`Web only`:`None on this platform`:``});shownCalls=X(()=>{let e=this.page();if(!e)return[];let t=this.filter().trim().toLowerCase(),n=this.callFilter(),r=n===`slow`?this.now():0;return[...e.calls].filter(e=>t5(e,n,r)).filter(e=>!t||`${e.plugin}.${e.method}`.toLowerCase().includes(t)).sort((e,t)=>t.startedAt-e.startedAt)});selected=X(()=>this.shownCalls().find(e=>e.id===this.selectedCallId())??null);tabStop=X(()=>{let e=this.shownCalls();for(let t of[this.focusedCallId(),this.selectedCallId()])if(t!==null&&e.some(e=>e.id===t))return t;return e[0]?.id??null});slowest=X(()=>{let e=this.now();return Math.max(1,...this.shownCalls().map(t=>e5(t,e)))});hiddenBy=X(()=>{let e=[],t=this.filter().trim();return t&&e.push(`the search “${t}”`),this.callFilter()!==`all`&&e.push(`the ${d5[this.callFilter()]} filter`),e.join(` and `)});stateCards=X(()=>{let e=this.page();return e?gle(e):[]});leaks=X(()=>Sce(this.page()?.listeners??[]));liveSummary=X(()=>{let e=this.page();return e?xce(e,this.now()):null});summary=T(null);summaryShownAt=0;summaryTimer;messageFlip=!1;constructor(){E(()=>{let e=this.rpc();e&&this.load(e)}),E(()=>{let e=this.liveSummary();Z(()=>this.queueSummary(e))});let e=setInterval(()=>this.now.set(Date.now()),1e3);this.destroyRef.onDestroy(()=>{clearInterval(e),clearTimeout(this.summaryTimer),this.unsubscribe?.()})}retry(){let e=this.rpc();e&&this.load(e)}callStats(e){return[{filter:`all`,label:`Calls`,count:e.calls},{filter:`failed`,label:`Failed`,count:e.failed},{filter:`slow`,label:`Slow, 500 ms+`,count:e.slow},{filter:`pending`,label:`Pending`,count:e.pending}]}select(e){this.selectedCallId.set(e),td(()=>{globalThis.matchMedia?.(`(max-width: 880px)`).matches&&this.host.nativeElement.querySelector(`#cap-detail`)?.scrollIntoView?.({block:`nearest`})},{injector:this.injector})}onListKey(e){if(![`ArrowDown`,`ArrowUp`,`Home`,`End`].includes(e.key))return;let t=Array.from(this.host.nativeElement.querySelectorAll(`[data-cap-call]`));if(!t.length)return;let n=t.indexOf(document.activeElement),r=n;r=e.key===`ArrowDown`?Math.min(n+1,t.length-1):e.key===`ArrowUp`?Math.max(n-1,0):e.key===`Home`?0:t.length-1,e.preventDefault(),t[r]?.focus()}setSearch(e){e!==this.filter()&&(this.filter.set(e),this.announceCount())}setFilter(e){e!==this.callFilter()&&(this.callFilter.set(e),this.announceCount())}pickFilter(e){this.setFilter(this.callFilter()===e?`all`:e)}clearFilters(){this.filter.set(``),this.callFilter.set(`all`),this.announceCount()}announce(e){this.messageFlip=!this.messageFlip,this.message.set(this.messageFlip?`${e} `:e)}async copyCommand(e){try{await navigator.clipboard.writeText(e),this.announce(`Copied ${e}.`)}catch{this.announce(`The clipboard is not available here.`)}}leakCount(e){return this.leaks().get(`${e.plugin} ${e.event}`)??0}tone(e){return e.status===`pending`?`accent`:e.status===`ok`?`ok`:$8(e)?`warn`:`danger`}statusLabel(e){return e.status===`pending`?`Pending`:e.status===`ok`?`OK`:$8(e)?`Not implemented`:`Error`}durationText(e){return e.status===`pending`?`waiting ${n5(e5(e,this.now()))}`:e.durationMs===void 0?``:`${Math.round(e.durationMs)} ms`}barWidth(e){return Math.min(100,e5(e,this.now())/this.slowest()*100)}announceCount(){let e=this.page();e&&this.announce(`${this.shownCalls().length} of ${e.calls.length} calls shown`)}queueSummary(e){let t=this.summary();if(JSON.stringify(e)===JSON.stringify(t))return;clearTimeout(this.summaryTimer),this.summaryTimer=void 0;let n=this.summaryShownAt+rue-Date.now();if(!t||!e||e.pageId!==t.pageId||n<=0){this.summary.set(e),this.summaryShownAt=Date.now();return}this.summaryTimer=setTimeout(()=>{this.summaryTimer=void 0,this.summary.set(this.liveSummary()),this.summaryShownAt=Date.now()},n)}async load(e){this.failed.set(!1);try{let t=await e.scope(`pangular`).rpc.sharedState(`capacitor`);if(this.destroyRef.destroyed)return;let n=e=>this.pages.set(_ce(Q8(e),this.seen));n(t.value()),this.unsubscribe?.(),this.unsubscribe=t.on(`updated`,n)}catch{this.failed.set(!0)}finally{this.loaded.set(!0)}}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-capacitor-inspector`]],inputs:{rpc:[1,`rpc`]},decls:4,vars:1,consts:[[`search`,``],[`role`,`status`,1,`state`],[`role`,`alert`,1,`state`],[`type`,`button`,1,`small`,3,`click`],[1,`intro`],[`role`,`status`,`aria-label`,`Capacitor summary`,`aria-atomic`,`false`,1,`strip`],[1,`sr-only`],[`aria-labelledby`,`cap-env-title`,1,`env`],[1,`env-head`],[`id`,`cap-env-title`],[1,`page-picker`],[1,`wide`],[`aria-labelledby`,`cap-state-title`],[3,`rpc`,`pageId`],[`aria-labelledby`,`cap-calls-title`],[`id`,`cap-calls-title`],[1,`notice`],[`aria-labelledby`,`cap-plugins-title`],[`id`,`cap-plugins-title`],[1,`empty`],[`tabindex`,`0`,`role`,`group`,`aria-label`,`Plugins table`,1,`table-wrap`],[`aria-labelledby`,`cap-listeners-title`],[`id`,`cap-listeners-title`],[`tabindex`,`0`,`role`,`group`,`aria-label`,`Listeners table`,1,`table-wrap`],[`aria-atomic`,`true`,1,`stat`],[1,`stat-label`],[1,`stat-value`],[`type`,`button`,`aria-atomic`,`true`,1,`stat`],[`type`,`button`,`aria-atomic`,`true`,1,`stat`,3,`click`],[`id`,`cap-page-label`,1,`label-key`],[`labelledBy`,`cap-page-label`,3,`valueChange`,`options`,`value`],[`id`,`cap-state-title`],[3,`cards`,`now`],[`target`,`_blank`,`rel`,`noopener noreferrer`,3,`href`],[1,`toolbar`],[`placeholder`,`Filter by plugin or method`,`saveKey`,`capacitor`,1,`search`,3,`valueChange`,`value`],[`ariaLabel`,`Show calls`,1,`show`,3,`valueChange`,`options`,`value`],[1,`count`],[`what`,`plugin calls`,`limit`,`capacitorCalls`,3,`dropped`,`max`],[1,`split`],[1,`muted`],[`aria-label`,`Plugin calls, newest first`,1,`calls`,3,`keydown`],[3,`call`,`now`],[`type`,`button`,`data-cap-call`,``,1,`call`,3,`focus`,`click`],[1,`name`],[1,`chip`,`status`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`],[`d`,`M20 6 9 17l-5-5`],[1,`chip`,`via`],[1,`duration`],[`aria-hidden`,`true`,1,`bar`],[1,`when`],[`cx`,`12`,`cy`,`12`,`r`,`9`],[`d`,`m15 9-6 6M9 9l6 6`],[`d`,`M5.6 5.6l12.8 12.8`],[`d`,`M12 7v5l3 2`],[3,`announce`,`call`,`now`],[`scope`,`col`],[`scope`,`row`],[1,`note`],[1,`hint`],[`type`,`button`,1,`copy`],[`type`,`button`,1,`copy`,3,`click`],[1,`last`],[`data-tone`,`warn`,1,`chip`,`leak`],[1,`payload`],[`d`,`M12 3 2 21h20z`],[`d`,`M12 10v4M12 17.5v.01`]],template:function(e,t){if(e&1&&A(0,ble,2,0,`p`,1)(1,xle,5,0,`div`,2)(2,eue,58,15)(3,tue,2,0,`p`,1),e&2){let e;j(t.loaded()?t.failed()?1:(e=t.page())?2:3:0,e)}},dependencies:[cP,aO,ND,zce,ole,_le],styles:[`[_nghost-%COMP%] { +}`]})},ble=(e,t)=>t.filter,u5=(e,t)=>t.id,xle=(e,t)=>t.name;function Sle(e,t){e&1&&(F(0,`p`,1),K(1,`Loading Capacitor data…`),I())}function Cle(e,t){if(e&1){let e=B();F(0,`div`,2)(1,`p`),K(2,`Can't read the Capacitor data from the devtools server.`),I(),F(3,`button`,3),H(`click`,function(){return S(e),C(W().retry())}),K(4,`Retry`),I()()}}function wle(e,t){if(e&1){let e=B();F(0,`button`,28),H(`click`,function(){let t=S(e).$implicit;return C(W(4).pickFilter(t.filter))}),F(1,`span`,25),K(2),I(),K(3,` `),F(4,`span`,26),K(5),I()()}if(e&2){let e=t.$implicit,n=W(4);k(`data-filter`,e.filter)(`aria-pressed`,n.callFilter()===e.filter),D(2),q(e.label),D(3),q(e.count)}}function Tle(e,t){if(e&1&&M(0,wle,6,4,`button`,27,ble),e&2){let e=W();N(W(2).callStats(e))}}function Ele(e,t){if(e&1&&(F(0,`span`,24)(1,`span`,25),K(2,`Platform`),I(),K(3,` `),F(4,`span`,26)(5,`code`),K(6),I(),K(7),I()(),A(8,Tle,2,0),F(9,`span`,24)(10,`span`,25),K(11,`CapacitorHttp`),I(),K(12,` `),F(13,`span`,26),K(14),I()(),F(15,`span`,24)(16,`span`,25),K(17,`Plugin hints`),I(),K(18,` `),F(19,`span`,26),K(20),I()()),e&2){let e=t;D(6),q(e.platform),D(),J(` `,e.native?`native`:`web`),D(),j(e.logsCalls?8:-1),D(6),q(e.capacitorHttp),D(6),q(e.hints)}}function Dle(e,t){if(e&1){let e=B();F(0,`div`,10)(1,`span`,29),K(2,`Page`),I(),F(3,`app-select`,30),H(`valueChange`,function(t){return S(e),C(W(2).selectedPageId.set(t))}),I()()}if(e&2){let e=W(),t=W();D(3),P(`options`,t.pageOptions())(`value`,e.pageId)}}function Ole(e,t){if(e&1&&(F(0,`section`,12)(1,`h2`,31),K(2,`Plugin state`),I(),L(3,`app-capacitor-state`,32),I()),e&2){let e=W(2);D(3),P(`cards`,e.stateCards())(`now`,e.now())}}function kle(e,t){if(e&1&&(F(0,`p`,16),K(1,` Plugin calls aren't shown on this page. Native calls are logged on iOS and Android, where plugins go through the native bridge. To log calls a web implementation answers, load `),F(2,`code`),K(3,`@pangular-inspector/devtools/capacitor-hook`),I(),K(4,` before `),F(5,`code`),K(6,`@capacitor/core`),I(),K(7,`. `),F(8,`a`,33),K(9,`How to log web calls`),F(10,`span`,6),K(11,` (opens in a new tab)`),I()()()),e&2){let e=W(2);D(8),P(`href`,e.guideUrl,bu)}}function Ale(e,t){if(e&1&&(F(0,`p`,16),K(1,` Only native calls are logged. Calls a web implementation answers are left out. `),F(2,`a`,33),K(3,`How to log them too`),F(4,`span`,6),K(5,` (opens in a new tab)`),I()()()),e&2){let e=W(3);D(2),P(`href`,e.guideUrl,bu)}}function jle(e,t){e&1&&(F(0,`p`,19),K(1,`No plugin calls yet. Use the app and they show up here.`),I())}function Mle(e,t){if(e&1){let e=B();F(0,`div`,19)(1,`p`),K(2,`No call matches the filters.`),I(),F(3,`p`,40),K(4),I(),F(5,`button`,3),H(`click`,function(){S(e),W();let t=Ag(3);return W(2).clearFilters(),C(t.focus())}),K(6,` Clear filters `),I()()}if(e&2){let e=W(2),t=W();D(4),y_(` `,e.calls.length,` `,e.calls.length===1?`call is`:`calls are`,` hidden by `,t.hiddenBy(),`. `)}}function Nle(e,t){e&1&&(w(),L(0,`path`,47))}function Ple(e,t){e&1&&(w(),L(0,`circle`,52)(1,`path`,53))}function Fle(e,t){e&1&&(w(),L(0,`circle`,52)(1,`path`,54))}function Ile(e,t){e&1&&(w(),L(0,`circle`,52)(1,`path`,55))}function Lle(e,t){e&1&&(F(0,`span`,48),K(1,`stream`),I())}function Rle(e,t){if(e&1){let e=B();F(0,`li`)(1,`button`,43),H(`focus`,function(){let t=S(e).$implicit;return C(W(4).focusedCallId.set(t.id))})(`click`,function(){let t=S(e).$implicit;return C(W(4).select(t.id))}),F(2,`code`,44),K(3),I(),F(4,`span`,45),w(),F(5,`svg`,46),A(6,Nle,1,0,`:svg:path`,47)(7,Ple,2,0)(8,Fle,2,0)(9,Ile,2,0),I(),K(10),I(),A(11,Lle,2,0,`span`,48),ls(),F(12,`span`,49)(13,`span`,50),L(14,`span`),I(),K(15),I(),F(16,`span`,48),K(17),I(),F(18,`time`,51),K(19),I()()()}if(e&2){let e,n=t.$implicit,r=W(4);D(),G(`selected`,r.selected()?.id===n.id),k(`aria-pressed`,r.selected()?.id===n.id)(`tabindex`,r.tabStop()===n.id?0:-1),D(2),Y(``,n.plugin,`.`,n.method,`()`),D(),k(`data-tone`,r.tone(n)),D(2),j((e=r.tone(n))===`ok`?6:e===`danger`?7:e===`warn`?8:9),D(4),J(` `,r.statusLabel(n),` `),D(),j(n.kind===`callback`?11:-1),D(3),Zg(`width`,r.barWidth(n),`%`),D(),J(` `,r.durationText(n),` `),D(2),q(n.via),D(2),q(r.time(n.startedAt))}}function zle(e,t){if(e&1){let e=B();F(0,`app-capacitor-call-detail`,56),H(`announce`,function(t){return S(e),C(W(4).announce(t))}),I()}if(e&2){let e=W(4);P(`call`,t)(`now`,e.now())}}function Ble(e,t){if(e&1){let e=B();F(0,`div`,39)(1,`ol`,41),H(`keydown`,function(t){return S(e),C(W(3).onListKey(t))}),M(2,Rle,20,15,`li`,null,u5),I(),A(4,zle,1,2,`app-capacitor-call-detail`,42),I()}if(e&2){let e,t=W(3);D(2),N(t.shownCalls()),D(2),j((e=t.selected())?4:-1,e)}}function Vle(e,t){if(e&1){let e=B();A(0,Ale,6,1,`p`,16),F(1,`div`,34)(2,`app-search-field`,35,0),H(`valueChange`,function(t){return S(e),C(W(2).setSearch(t))}),I(),F(4,`app-select`,36),H(`valueChange`,function(t){return S(e),C(W(2).setFilter(t))}),I(),F(5,`span`,37),K(6),I()(),L(7,`app-limit-note`,38),A(8,jle,2,0,`p`,19)(9,Mle,7,3,`div`,19)(10,Ble,5,1,`div`,39)}if(e&2){let e=W(),t=W();j(e.info.webCalls?-1:0),D(2),P(`value`,t.filter()),D(2),P(`options`,t.filterOptions)(`value`,t.callFilter()),D(2),Y(``,t.shownCalls().length,` of `,e.calls.length,` calls`),D(),P(`dropped`,e.dropped)(`max`,t.maxCalls()),D(),j(e.calls.length?t.shownCalls().length?10:9:8)}}function Hle(e,t){e&1&&(F(0,`p`,19),K(1,`No plugins are registered or installed.`),I())}function Ule(e,t){if(e&1&&(F(0,`code`),K(1),I()),e&2){let e=W();D(),q(e.command)}}function Wle(e,t){if(e&1){let e=B();F(0,`button`,62),H(`click`,function(){S(e);let t=W();return C(W(4).copyCommand(t.command))}),K(1,` Copy `),I()}e&2&&k(`aria-label`,`Copy `+W().command)}function Gle(e,t){if(e&1&&(F(0,`span`,60),K(1),A(2,Ule,2,1,`code`),K(3),I(),A(4,Wle,2,1,`button`,61)),e&2){let e=t;D(),q(e.before),D(),j(e.command?2:-1),D(),q(e.after),D(),j(e.command?4:-1)}}function Kle(e,t){if(e&1&&(F(0,`tr`)(1,`th`,58)(2,`code`),K(3),I()(),F(4,`td`),K(5),I(),F(6,`td`),K(7),I(),F(8,`td`),K(9),I(),F(10,`td`,59),A(11,Gle,5,4),I()()),e&2){let e,n=t.$implicit,r=W(2),i=W();D(3),q(n.name),D(2),q(n.available?`Yes`:`No`),D(2),q(i.yesNo(n.registered)),D(2),q(n.native?`Yes`:`No`),D(2),j((e=i.pluginHint(n,r.info.platform))?11:-1,e)}}function qle(e,t){if(e&1&&(F(0,`div`,20)(1,`table`)(2,`thead`)(3,`tr`)(4,`th`,57),K(5,`Plugin`),I(),F(6,`th`,57),K(7,`Available`),I(),F(8,`th`,57),K(9,`Imported`),I(),F(10,`th`,57),K(11,`Native`),I(),F(12,`th`,57),K(13,`Note`),I()()(),F(14,`tbody`),M(15,Kle,12,5,`tr`,null,xle),I()()()),e&2){let e=W();D(15),N(e.info.plugins)}}function Jle(e,t){e&1&&(F(0,`p`,19),K(1,`No plugin listeners. They show up when the app calls addListener.`),I())}function Yle(e,t){if(e&1&&(F(0,`code`,65),K(1),I()),e&2){let e=W(2).$implicit,t=W(3);D(),q(t.preview(e.last))}}function Xle(e,t){e&1&&(F(0,`span`,65),K(1,`No data`),I())}function Zle(e,t){if(e&1&&(A(0,Yle,2,1,`code`,65)(1,Xle,2,0,`span`,65),F(2,`span`,40),K(3),I()),e&2){let e=W().$implicit,t=W(3);j(+(e.last===void 0)),D(3),J(`at `,t.time(e.lastEventAt))}}function Qle(e,t){e&1&&K(0,` None yet `)}function $le(e,t){if(e&1&&(F(0,`span`,64),w(),F(1,`svg`,46),L(2,`path`,66)(3,`path`,67),I(),K(4),I()),e&2){let e=W().$implicit,t=W(3);D(4),J(` `,t.leakCount(e),` active listeners: possible leak `)}}function eue(e,t){if(e&1&&(F(0,`tr`)(1,`th`,58)(2,`code`),K(3),I()(),F(4,`td`)(5,`code`),K(6),I()(),F(7,`td`),K(8),I(),F(9,`td`,63),A(10,Zle,4,2)(11,Qle,1,0),I(),F(12,`td`),K(13),A(14,$le,5,1,`span`,64),I()()),e&2){let e=t.$implicit,n=W(3);D(3),q(e.plugin),D(3),q(e.event),D(2),q(e.events),D(2),j(e.lastEventAt?10:11),D(3),J(` `,e.removed?`Removed`:`Active`,` `),D(),j(!e.removed&&n.leakCount(e)>1?14:-1)}}function tue(e,t){if(e&1&&(F(0,`div`,23)(1,`table`)(2,`thead`)(3,`tr`)(4,`th`,57),K(5,`Plugin`),I(),F(6,`th`,57),K(7,`Event`),I(),F(8,`th`,57),K(9,`Events`),I(),F(10,`th`,57),K(11,`Last event`),I(),F(12,`th`,57),K(13,`State`),I()()(),F(14,`tbody`),M(15,eue,15,6,`tr`,null,u5),I()()()),e&2){let e=W();D(15),N(e.listeners)}}function nue(e,t){if(e&1&&(F(0,`p`,4),K(1,` Plugin calls, plugins and listeners of a Capacitor app, as its WebView reports them. Values are masked like other live data. `),I(),F(2,`div`,5),A(3,Ele,21,5),F(4,`span`,6),K(5),I()(),F(6,`section`,7)(7,`div`,8)(8,`h2`,9),K(9,`Environment`),I(),A(10,Dle,4,2,`div`,10),I(),F(11,`dl`)(12,`div`)(13,`dt`),K(14,`Platform`),I(),F(15,`dd`)(16,`code`),K(17),I(),K(18),I()(),F(19,`div`)(20,`dt`),K(21,`Server URL`),I(),F(22,`dd`)(23,`code`),K(24),I()()(),F(25,`div`)(26,`dt`),K(27,`CapacitorHttp`),I(),F(28,`dd`),K(29),I()(),F(30,`div`)(31,`dt`),K(32,`Calls logged`),I(),F(33,`dd`),K(34),I()(),F(35,`div`,11)(36,`dt`),K(37,`User agent`),I(),F(38,`dd`)(39,`code`),K(40),I()()()()(),A(41,Ole,4,2,`section`,12),L(42,`app-capacitor-ionic`,13),F(43,`section`,14)(44,`h2`,15),K(45,`Plugin calls`),I(),A(46,kle,12,1,`p`,16)(47,Vle,11,9),I(),F(48,`section`,17)(49,`h2`,18),K(50,`Plugins`),I(),A(51,Hle,2,0,`p`,19)(52,qle,17,0,`div`,20),I(),F(53,`section`,21)(54,`h2`,22),K(55,`Listeners`),I(),A(56,Jle,2,0,`p`,19)(57,tue,17,0,`div`,23),I()),e&2){let e,n=t,r=W();D(3),j((e=r.summary())?3:-1,e),D(2),q(r.message()),D(5),j(r.pageOptions().length>1?10:-1),D(7),q(n.info.platform),D(),J(` (`,n.info.native?`native`:`web`,`) `),D(6),q(n.info.env.serverUrl||`none`),D(5),J(` `,n.info.env.capacitorHttp===null?`Unknown`:n.info.env.capacitorHttp?`On`:`Off`,` `),D(5),q(r.loggedLabel()),D(6),q(n.info.env.userAgent||`unknown`),D(),j(r.stateCards().length?41:-1),D(),P(`rpc`,r.rpc())(`pageId`,n.pageId),D(4),j(!n.info.bridge&&!n.info.webCalls?46:47),D(5),j(n.info.plugins.length?52:51),D(5),j(n.listeners.length?57:56)}}function rue(e,t){e&1&&(F(0,`p`,1),K(1,` No Capacitor app reports to this server. Start the overlay in the app, then use it. `),I())}var iue=`https://pangular-inspector.dev/inspectors/capacitor/#web-calls`,aue=2e3,d5={all:`All calls`,failed:`Failed`,slow:`Slow (500 ms or more)`,pending:`Pending`},oue=class e{rpc=$(null);destroyRef=x(ys);host=x(kl);injector=x(_s);seen=new Map;hostPageId=fT();unsubscribe;time=XE;preview=Ece;pluginHint=r5;guideUrl=iue;yesNo=vce;filterOptions=Object.keys(d5).map(e=>({value:e,label:d5[e]}));pages=T([]);loaded=T(!1);failed=T(!1);selectedPageId=Q({source:()=>this.pages(),computation:(e,t)=>t?.value&&e.some(e=>e.pageId===t.value)?t.value:bce(e,this.hostPageId)});selectedCallId=T(null);focusedCallId=T(null);filter=T(``);callFilter=T(`all`);now=T(Date.now());message=T(``);page=X(()=>{let e=this.selectedPageId();return this.pages().find(t=>t.pageId===e)??null});pageOptions=X(()=>this.pages().map(e=>({value:e.pageId,label:e.title||e.url||e.pageId,hint:e.info.platform})));maxCalls=X(()=>IT(this.rpc()).limits.capacitorCalls);loggedLabel=X(()=>{let e=this.page()?.info;return e?e.bridge&&e.webCalls?`Native and web`:e.bridge?`Native only`:e.webCalls?`Web only`:`None on this platform`:``});shownCalls=X(()=>{let e=this.page();if(!e)return[];let t=this.filter().trim().toLowerCase(),n=this.callFilter(),r=n===`slow`?this.now():0;return[...e.calls].filter(e=>t5(e,n,r)).filter(e=>!t||`${e.plugin}.${e.method}`.toLowerCase().includes(t)).sort((e,t)=>t.startedAt-e.startedAt)});selected=X(()=>this.shownCalls().find(e=>e.id===this.selectedCallId())??null);tabStop=X(()=>{let e=this.shownCalls();for(let t of[this.focusedCallId(),this.selectedCallId()])if(t!==null&&e.some(e=>e.id===t))return t;return e[0]?.id??null});slowest=X(()=>{let e=this.now();return Math.max(1,...this.shownCalls().map(t=>e5(t,e)))});hiddenBy=X(()=>{let e=[],t=this.filter().trim();return t&&e.push(`the search “${t}”`),this.callFilter()!==`all`&&e.push(`the ${d5[this.callFilter()]} filter`),e.join(` and `)});stateCards=X(()=>{let e=this.page();return e?vle(e):[]});leaks=X(()=>wce(this.page()?.listeners??[]));liveSummary=X(()=>{let e=this.page();return e?Cce(e,this.now()):null});summary=T(null);summaryShownAt=0;summaryTimer;messageFlip=!1;constructor(){E(()=>{let e=this.rpc();e&&this.load(e)}),E(()=>{let e=this.liveSummary();Z(()=>this.queueSummary(e))});let e=setInterval(()=>this.now.set(Date.now()),1e3);this.destroyRef.onDestroy(()=>{clearInterval(e),clearTimeout(this.summaryTimer),this.unsubscribe?.()})}retry(){let e=this.rpc();e&&this.load(e)}callStats(e){return[{filter:`all`,label:`Calls`,count:e.calls},{filter:`failed`,label:`Failed`,count:e.failed},{filter:`slow`,label:`Slow, 500 ms+`,count:e.slow},{filter:`pending`,label:`Pending`,count:e.pending}]}select(e){this.selectedCallId.set(e),td(()=>{globalThis.matchMedia?.(`(max-width: 880px)`).matches&&this.host.nativeElement.querySelector(`#cap-detail`)?.scrollIntoView?.({block:`nearest`})},{injector:this.injector})}onListKey(e){if(![`ArrowDown`,`ArrowUp`,`Home`,`End`].includes(e.key))return;let t=Array.from(this.host.nativeElement.querySelectorAll(`[data-cap-call]`));if(!t.length)return;let n=t.indexOf(document.activeElement),r=n;r=e.key===`ArrowDown`?Math.min(n+1,t.length-1):e.key===`ArrowUp`?Math.max(n-1,0):e.key===`Home`?0:t.length-1,e.preventDefault(),t[r]?.focus()}setSearch(e){e!==this.filter()&&(this.filter.set(e),this.announceCount())}setFilter(e){e!==this.callFilter()&&(this.callFilter.set(e),this.announceCount())}pickFilter(e){this.setFilter(this.callFilter()===e?`all`:e)}clearFilters(){this.filter.set(``),this.callFilter.set(`all`),this.announceCount()}announce(e){this.messageFlip=!this.messageFlip,this.message.set(this.messageFlip?`${e} `:e)}async copyCommand(e){try{await navigator.clipboard.writeText(e),this.announce(`Copied ${e}.`)}catch{this.announce(`The clipboard is not available here.`)}}leakCount(e){return this.leaks().get(`${e.plugin} ${e.event}`)??0}tone(e){return e.status===`pending`?`accent`:e.status===`ok`?`ok`:$8(e)?`warn`:`danger`}statusLabel(e){return e.status===`pending`?`Pending`:e.status===`ok`?`OK`:$8(e)?`Not implemented`:`Error`}durationText(e){return e.status===`pending`?`waiting ${n5(e5(e,this.now()))}`:e.durationMs===void 0?``:`${Math.round(e.durationMs)} ms`}barWidth(e){return Math.min(100,e5(e,this.now())/this.slowest()*100)}announceCount(){let e=this.page();e&&this.announce(`${this.shownCalls().length} of ${e.calls.length} calls shown`)}queueSummary(e){let t=this.summary();if(JSON.stringify(e)===JSON.stringify(t))return;clearTimeout(this.summaryTimer),this.summaryTimer=void 0;let n=this.summaryShownAt+aue-Date.now();if(!t||!e||e.pageId!==t.pageId||n<=0){this.summary.set(e),this.summaryShownAt=Date.now();return}this.summaryTimer=setTimeout(()=>{this.summaryTimer=void 0,this.summary.set(this.liveSummary()),this.summaryShownAt=Date.now()},n)}async load(e){this.failed.set(!1);try{let t=await e.scope(`pangular`).rpc.sharedState(`capacitor`);if(this.destroyRef.destroyed)return;let n=e=>this.pages.set(yce(Q8(e),this.seen));n(t.value()),this.unsubscribe?.(),this.unsubscribe=t.on(`updated`,n)}catch{this.failed.set(!0)}finally{this.loaded.set(!0)}}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-capacitor-inspector`]],inputs:{rpc:[1,`rpc`]},decls:4,vars:1,consts:[[`search`,``],[`role`,`status`,1,`state`],[`role`,`alert`,1,`state`],[`type`,`button`,1,`small`,3,`click`],[1,`intro`],[`role`,`status`,`aria-label`,`Capacitor summary`,`aria-atomic`,`false`,1,`strip`],[1,`sr-only`],[`aria-labelledby`,`cap-env-title`,1,`env`],[1,`env-head`],[`id`,`cap-env-title`],[1,`page-picker`],[1,`wide`],[`aria-labelledby`,`cap-state-title`],[3,`rpc`,`pageId`],[`aria-labelledby`,`cap-calls-title`],[`id`,`cap-calls-title`],[1,`notice`],[`aria-labelledby`,`cap-plugins-title`],[`id`,`cap-plugins-title`],[1,`empty`],[`tabindex`,`0`,`role`,`group`,`aria-label`,`Plugins table`,1,`table-wrap`],[`aria-labelledby`,`cap-listeners-title`],[`id`,`cap-listeners-title`],[`tabindex`,`0`,`role`,`group`,`aria-label`,`Listeners table`,1,`table-wrap`],[`aria-atomic`,`true`,1,`stat`],[1,`stat-label`],[1,`stat-value`],[`type`,`button`,`aria-atomic`,`true`,1,`stat`],[`type`,`button`,`aria-atomic`,`true`,1,`stat`,3,`click`],[`id`,`cap-page-label`,1,`label-key`],[`labelledBy`,`cap-page-label`,3,`valueChange`,`options`,`value`],[`id`,`cap-state-title`],[3,`cards`,`now`],[`target`,`_blank`,`rel`,`noopener noreferrer`,3,`href`],[1,`toolbar`],[`placeholder`,`Filter by plugin or method`,`saveKey`,`capacitor`,1,`search`,3,`valueChange`,`value`],[`ariaLabel`,`Show calls`,1,`show`,3,`valueChange`,`options`,`value`],[1,`count`],[`what`,`plugin calls`,`limit`,`capacitorCalls`,3,`dropped`,`max`],[1,`split`],[1,`muted`],[`aria-label`,`Plugin calls, newest first`,1,`calls`,3,`keydown`],[3,`call`,`now`],[`type`,`button`,`data-cap-call`,``,1,`call`,3,`focus`,`click`],[1,`name`],[1,`chip`,`status`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`],[`d`,`M20 6 9 17l-5-5`],[1,`chip`,`via`],[1,`duration`],[`aria-hidden`,`true`,1,`bar`],[1,`when`],[`cx`,`12`,`cy`,`12`,`r`,`9`],[`d`,`m15 9-6 6M9 9l6 6`],[`d`,`M5.6 5.6l12.8 12.8`],[`d`,`M12 7v5l3 2`],[3,`announce`,`call`,`now`],[`scope`,`col`],[`scope`,`row`],[1,`note`],[1,`hint`],[`type`,`button`,1,`copy`],[`type`,`button`,1,`copy`,3,`click`],[1,`last`],[`data-tone`,`warn`,1,`chip`,`leak`],[1,`payload`],[`d`,`M12 3 2 21h20z`],[`d`,`M12 10v4M12 17.5v.01`]],template:function(e,t){if(e&1&&A(0,Sle,2,0,`p`,1)(1,Cle,5,0,`div`,2)(2,nue,58,15)(3,rue,2,0,`p`,1),e&2){let e;j(t.loaded()?t.failed()?1:(e=t.page())?2:3:0,e)}},dependencies:[cP,aO,ND,Vce,cle,yle],styles:[`[_nghost-%COMP%] { display: block; font-size: 13px; } @@ -24081,7 +24104,7 @@ td.last[_ngcontent-%COMP%] { .empty[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .state[_ngcontent-%COMP%] p[_ngcontent-%COMP%] { margin: 0 0 8px; -}`]})};function f5(e,t,n=600){let r=T(``),i=!0,a;return E(()=>{if(e(),i){i=!1;return}clearTimeout(a),a=setTimeout(()=>{let e=Z(t);r.update(t=>t===e?`${e} `:e)},n)}),x(ys).onDestroy(()=>clearTimeout(a)),r.asReadonly()}var aue=[`log`,`info`,`warn`,`error`,`debug`];function oue(e){return e.split("`").map((e,t)=>({code:t%2==1,text:e})).filter(e=>e.text)}var sue={handler:`ErrorHandler`,window:`Uncaught`,promise:`Unhandled rejection`};function p5(e){return!!e&&typeof e==`object`}function cue(e){let t=p5(e)?e.pages:void 0;return p5(t)?Object.values(t).filter(e=>p5(e)&&typeof e.pageId==`string`).map(e=>({pageId:e.pageId,url:typeof e.url==`string`?e.url:``,title:typeof e.title==`string`?e.title:``,reportedAt:typeof e.reportedAt==`number`?e.reportedAt:0,handler:e.handler===`wrapped`?`wrapped`:`none`,errors:p5(e.errors)?Object.values(e.errors):[],console:p5(e.console)?Object.values(e.console).sort((e,t)=>e.id-t.id):[],dropped:p5(e.dropped)?{errors:Number(e.dropped.errors)||0,console:Number(e.dropped.console)||0}:{errors:0,console:0}})).sort((e,t)=>t.reportedAt-e.reportedAt):[]}function lue(e,t){return t&&e.some(e=>e.pageId===t)?t:e.length>1?`all`:e[0]?.pageId??`all`}function uue(e,t){return e.filter(e=>t===`all`||e.pageId===t).flatMap(e=>e.errors.map(t=>({...t,pageId:e.pageId}))).sort((e,t)=>t.lastAt-e.lastAt)}function due(e,t){return e.filter(e=>t===`all`||e.pageId===t).flatMap(e=>e.console.map(t=>({...t,pageId:e.pageId}))).sort((e,t)=>t.at-e.at||t.id-e.id)}function fue(e,t){return t?.startsWith(`https://angular.dev/errors/`)?{code:e,href:t}:{code:e}}var pue=(e,t)=>t.signal+t.at,mue=(e,t)=>t.id+e;function hue(e,t){if(e&1&&(R(0,`code`),K(1),z()),e&2){let e=W();D(),q(e.binding)}}function gue(e,t){e&1&&(R(0,`span`,2),K(1,`A text interpolation (Angular doesn't name it)`),z())}function _ue(e,t){if(e&1&&(R(0,`span`,2),K(1,` in `),z(),R(2,`code`),K(3),z()),e&2){let e=W();D(3),q(e.template)}}function vue(e,t){if(e&1&&(R(0,`code`),K(1),z(),K(2)),e&2){let e=t.$implicit,n=t.$index,r=t.$count;D(),q(e),D(),J(``,n===r-1?``:`, `,` `)}}function yue(e,t){if(e&1&&(R(0,`dt`),K(1,`Held by`),z(),R(2,`dd`),M(3,vue,3,2,null,null,Xh),z()),e&2){let e=W();D(3),N(e.members)}}function bue(e,t){e&1&&(R(0,`p`,4),K(1,` Values are hidden: the binding or a field that holds them has a secret-looking name. `),z())}function xue(e,t){e&1&&(R(0,`p`,4),K(1,` Angular says this view was created after its parent was checked, so a change detection hook such as `),R(2,`code`),K(3,`ngAfterViewInit`),z(),K(4,` created it. `),z())}function Sue(e,t){if(e&1&&(R(0,`li`)(1,`code`),K(2),z()()),e&2){let e=t.$implicit;D(2),q(e)}}function Cue(e,t){if(e&1&&(R(0,`ol`,6),M(1,Sue,3,1,`li`,null,Yh),z()),e&2){let e=W().$implicit;D(),N(e.stack)}}function wue(e,t){e&1&&(R(0,`span`,2),K(1,` (turn on write stacks in the Signals tab and reproduce to see the code)`),z())}function Tue(e,t){if(e&1&&(R(0,`li`),K(1,` Signal `),R(2,`code`),K(3),z(),K(4),A(5,Cue,3,0,`ol`,6)(6,wue,2,0,`span`,2),z()),e&2){let e=t.$implicit,n=W(4);D(3),q(e.signal),D(),J(` at `,n.time(e.at),` `),D(),j(e.stack?.length?5:6)}}function Eue(e,t){if(e&1&&(R(0,`h4`,0),K(1,`Written by`),z(),R(2,`ul`,5),M(3,Tue,7,3,`li`,null,pue),z()),e&2){let e=W();D(3),N(e.writes)}}function Due(e,t){e&1&&(R(0,`p`,4),K(1,` No named signal was written with this value just before the check. Look for code that sets a field the template reads during change detection, such as `),R(2,`code`),K(3,`ngAfterViewInit`),z(),K(4,`, a getter that returns a new value each time, or a child that changes its parent. `),z())}function Oue(e,t){e&1&&(R(0,`p`,4),K(1,` Where it was written is unknown: the page doesn't report signal writes (the Signals inspector is off, or Angular is older than 17). `),z())}function kue(e,t){if(e&1&&(R(0,`h3`,0),K(1,`What changed`),z(),R(2,`dl`,1)(3,`dt`),K(4,`Binding`),z(),R(5,`dd`),A(6,hue,2,1,`code`)(7,gue,2,0,`span`,2),A(8,_ue,4,1),z(),R(9,`dt`),K(10,`Previous`),z(),R(11,`dd`)(12,`code`,3),K(13),z()(),R(14,`dt`),K(15,`Current`),z(),R(16,`dd`)(17,`code`,3),K(18),z()(),A(19,yue,5,0),z(),A(20,bue,2,0,`p`,4),A(21,xue,5,0,`p`,4),A(22,Eue,5,0)(23,Due,5,0,`p`,4)(24,Oue,2,0,`p`,4)),e&2){let e=t;D(6),j(e.binding?6:7),D(2),j(e.template?8:-1),D(5),q(e.previous),D(5),q(e.current),D(),j(e.members?.length?19:-1),D(),j(e.masked?20:-1),D(),j(e.creation?21:-1),D(),j(e.writes?.length?22:e.writesKnown?23:24)}}function Aue(e,t){if(e&1&&A(0,kue,25,8),e&2){let e;j((e=W().changed())?0:-1,e)}}function jue(e,t){if(e&1&&(R(0,`p`,7),K(1),z()),e&2){let e=W();D(),q(e.summary)}}function Mue(e,t){if(e&1&&(R(0,`span`,14),K(1),z()),e&2){let e=W().$implicit;D(),q(e.op===`expected`?`Server only:`:`Client only:`)}}function Nue(e,t){if(e&1&&(R(0,`li`)(1,`span`,13),K(2),z(),A(3,Mue,2,1,`span`,14),R(4,`code`),K(5),z()()),e&2){let e=t.$implicit,n=W(4);k(`data-op`,e.op),D(2),q(n.signOf(e.op)),D(),j(e.op===`same`?-1:3),D(2),q(e.text)}}function Pue(e,t){if(e&1&&(R(0,`p`,8)(1,`span`,9),K(2,`−`),z(),K(3,` server HTML Angular expected `),R(4,`span`,10),K(5,`+`),z(),K(6,` client DOM it found `),z(),R(7,`div`,11)(8,`ol`,12),M(9,Nue,6,4,`li`,null,Yh),z()()),e&2){let e=W();D(9),N(e.diff)}}function Fue(e,t){e&1&&(R(0,`p`,4),K(1,`Angular described neither side of the mismatch.`),z())}function Iue(e,t){e&1&&(R(0,`p`,4),K(1,` Angular thinks a browser extension or third-party script changed the DOM before hydration. Try a clean browser profile, or add `),R(2,`code`),K(3,`ngSkipHydration`),z(),K(4,` to the host. `),z())}function Lue(e,t){if(e&1&&(R(0,`h3`,0),K(1,`Server vs client DOM`),z(),A(2,jue,2,1,`p`,7),A(3,Pue,11,0)(4,Fue,2,0,`p`,4),A(5,Iue,5,0,`p`,4)),e&2){let e=t;D(2),j(e.summary?2:-1),D(),j(e.diff?.length?3:4),D(2),j(e.external?5:-1)}}function Rue(e,t){if(e&1&&A(0,Lue,6,3),e&2){let e;j((e=W().mismatch())?0:-1,e)}}function zue(e,t){if(e&1&&(R(0,`code`),K(1),z(),K(2)),e&2){let e=t.$implicit,n=t.$index,r=t.$count;D(),q(e),D(),J(``,n===r-1?``:` → `,` `)}}function Bue(e,t){if(e&1&&(R(0,`dt`),K(1,`Path`),z(),R(2,`dd`),M(3,zue,3,2,null,null,Yh),z()),e&2){let e=W();D(3),N(e.path)}}function Vue(e,t){if(e&1&&(R(0,`dt`),K(1,`Source`),z(),R(2,`dd`)(3,`code`),K(4),z()()),e&2){let e=W();D(4),q(e.source)}}function Hue(e,t){if(e&1){let e=B();R(0,`button`,18),U(`click`,function(){S(e);let t=W();return C(W(2).explainLookup(t.token))}),K(1),z()}if(e&2){let e=W(3);k(`aria-disabled`,e.loading()||null),D(),J(` `,e.lookup()?`Explain lookup again`:`Explain lookup`,` `)}}function Uue(e,t){e&1&&(R(0,`p`,4),K(1,` The component that asked for it wasn't found on the page, so the lookup can't be walked from here. `),z())}function Wue(e,t){e&1&&(R(0,`p`,4),K(1,`Walking the lookup…`),z())}function Gue(e,t){if(e&1&&(R(0,`code`),K(1),z()),e&2){let e=W().$implicit;D(),q(e.text)}}function Kue(e,t){if(e&1&&(R(0,`span`),K(1),z()),e&2){let e=W().$implicit;D(),q(e.text)}}function que(e,t){if(e&1&&A(0,Gue,2,1,`code`)(1,Kue,2,1,`span`),e&2){let e=t.$implicit;j(+!e.code)}}function Jue(e,t){if(e&1&&(R(0,`p`,17),M(1,que,2,1,null,null,Yh),z()),e&2){let e=W(3);D(),N(e.segments(t))}}function Yue(e,t){if(e&1&&(R(0,`code`),K(1),z()),e&2){let e=W().$implicit;D(),q(e.text)}}function Xue(e,t){if(e&1&&(R(0,`span`),K(1),z()),e&2){let e=W().$implicit;D(),q(e.text)}}function Zue(e,t){if(e&1&&A(0,Yue,2,1,`code`)(1,Xue,2,1,`span`),e&2){let e=t.$implicit;j(+!e.code)}}function Que(e,t){if(e&1&&(R(0,`p`,7),M(1,Zue,2,1,null,null,Yh),z()),e&2){let e=W(3);D(),N(e.segments(t.summary))}}function $ue(e,t){if(e&1&&(R(0,`code`,2),K(1),z()),e&2){let e=W().$implicit;D(),q(e.component)}}function ede(e,t){if(e&1&&(R(0,`code`),K(1),z()),e&2){let e=W().$implicit;D(),q(e.text)}}function tde(e,t){if(e&1&&(R(0,`span`),K(1),z()),e&2){let e=W().$implicit;D(),q(e.text)}}function nde(e,t){if(e&1&&A(0,ede,2,1,`code`)(1,tde,2,1,`span`),e&2){let e=t.$implicit;j(+!e.code)}}function rde(e,t){if(e&1&&(R(0,`li`)(1,`span`,20)(2,`code`),K(3),z(),A(4,$ue,2,1,`code`,2),z(),R(5,`span`,21),K(6),z(),R(7,`span`,22),M(8,nde,2,1,null,null,Yh),z()()),e&2){let e=t.$implicit,n=W(4);D(3),q(e.name),D(),j(e.component?4:-1),D(),k(`data-tone`,n.stepTone[e.status]),D(),q(n.stepLabel[e.status]),D(2),N(n.segments(e.reason))}}function ide(e,t){e&1&&K(0,` This Angular version has no resolution path, so the path follows the rendered tree. `)}function ade(e,t){if(e&1&&(R(0,`ol`,19),M(1,rde,10,4,`li`,null,mue),z(),R(3,`p`,4),K(4,` Read from the injector tree the page reported, assuming no `),R(5,`code`),K(6,`self`),z(),K(7,`, `),R(8,`code`),K(9,`skipSelf`),z(),K(10,`, `),R(11,`code`),K(12,`host`),z(),K(13,` or `),R(14,`code`),K(15,`optional`),z(),K(16,`. Agents can pass those to `),R(17,`code`),K(18,`explain-injection`),z(),K(19,`. `),A(20,ide,1,0),z()),e&2){let e=t;D(),N(e.steps),D(19),j(e.approximate?20:-1)}}function ode(e,t){if(e&1&&(R(0,`h3`,0),K(1,`Missing provider`),z(),R(2,`dl`,1)(3,`dt`),K(4,`Token`),z(),R(5,`dd`)(6,`code`),K(7),z()(),A(8,Bue,5,0),A(9,Vue,5,1),z(),A(10,Hue,2,2,`button`,15)(11,Uue,2,0,`p`,4),R(12,`div`,16),A(13,Wue,2,0,`p`,4)(14,Jue,3,0,`p`,17)(15,Que,3,0,`p`,7),z(),A(16,ade,21,1)),e&2){let e,n,r=t,i=W(2);D(7),q(r.token),D(),j(r.path?.length?8:-1),D(),j(r.source?9:-1),D(),j(i.canExplain()&&i.owner()?10:i.owner()?-1:11),D(3),j(i.loading()?13:(e=i.lookupError())?14:(e=i.lookup())?15:-1,e),D(3),j((n=!i.loading()&&!i.lookupError()&&i.lookup())?16:-1,n)}}function sde(e,t){if(e&1&&A(0,ode,17,6),e&2){let e;j((e=W().missing())?0:-1,e)}}var cde={provides:`Provides it`,missing:`Not provided`,hidden:`Hidden`,skipped:`Skipped`,"not-asked":`Not asked`,unknown:`Unknown`},lde={provides:`ok`,missing:`plain`,hidden:`warn`,skipped:`plain`,"not-asked":`plain`,unknown:`warn`},ude=class e{explain=$.required();owner=$(void 0);pageId=$(``);rpc=$(null);canExplain=$(!1);time=XE;segments=oue;stepLabel=cde;stepTone=lde;changed=X(()=>{let e=this.explain();return e.kind===`expression-changed`?e:null});mismatch=X(()=>{let e=this.explain();return e.kind===`hydration-mismatch`?e:null});missing=X(()=>{let e=this.explain();return e.kind===`missing-provider`?e:null});loading=T(!1);lookup=T(null);lookupError=T(null);signOf(e){return e===`expected`?`−`:e===`actual`?`+`:` `}async explainLookup(e){let t=this.rpc(),n=this.owner();if(t&&n&&!this.loading()){this.loading.set(!0),this.lookupError.set(null);try{let r=await t.scope(`pangular`).rpc.call(`explain-injection`,{selector:n.id,token:e,pageId:this.pageId()});!r||`error`in r?(this.lookup.set(null),this.lookupError.set(r?.error??`The server didn't answer.`)):this.lookup.set(r)}catch{this.lookup.set(null),this.lookupError.set(`Can't reach the devtools server. Try again.`)}finally{this.loading.set(!1)}}}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-error-explain`]],inputs:{explain:[1,`explain`],owner:[1,`owner`],pageId:[1,`pageId`],rpc:[1,`rpc`],canExplain:[1,`canExplain`]},decls:3,vars:1,consts:[[1,`label`],[1,`facts`],[1,`muted`],[1,`value`],[1,`note`],[1,`writes`],[`aria-label`,`App frames that wrote it`,1,`frames`],[1,`summary`],[1,`legend`],[`aria-hidden`,`true`,1,`sign`,`expected`],[`aria-hidden`,`true`,1,`sign`,`actual`],[`tabindex`,`0`,`role`,`region`,`aria-label`,`Server vs client DOM diff`,1,`diff-wrap`],[1,`diff`],[`aria-hidden`,`true`,1,`sign`],[1,`sr-only`],[`type`,`button`,1,`small`],[`aria-live`,`polite`],[`role`,`alert`,1,`note`],[`type`,`button`,1,`small`,3,`click`],[`aria-label`,`Injectors Angular asks, in order`,1,`steps`],[1,`step-name`],[1,`chip`],[1,`reason`]],template:function(e,t){if(e&1&&A(0,Aue,1,1)(1,Rue,1,1)(2,sde,1,1),e&2){let e;j((e=t.explain().kind)===`expression-changed`?0:e===`hydration-mismatch`?1:e===`missing-provider`?2:-1)}},styles:[`[_nghost-%COMP%] { +}`]})};function f5(e,t,n=600){let r=T(``),i=!0,a;return E(()=>{if(e(),i){i=!1;return}clearTimeout(a),a=setTimeout(()=>{let e=Z(t);r.update(t=>t===e?`${e} `:e)},n)}),x(ys).onDestroy(()=>clearTimeout(a)),r.asReadonly()}var sue=[`log`,`info`,`warn`,`error`,`debug`];function cue(e){return e.split("`").map((e,t)=>({code:t%2==1,text:e})).filter(e=>e.text)}var lue={handler:`ErrorHandler`,window:`Uncaught`,promise:`Unhandled rejection`};function p5(e){return!!e&&typeof e==`object`}function uue(e){let t=p5(e)?e.pages:void 0;return p5(t)?Object.values(t).filter(e=>p5(e)&&typeof e.pageId==`string`).map(e=>({pageId:e.pageId,url:typeof e.url==`string`?e.url:``,title:typeof e.title==`string`?e.title:``,reportedAt:typeof e.reportedAt==`number`?e.reportedAt:0,handler:e.handler===`wrapped`?`wrapped`:`none`,errors:p5(e.errors)?Object.values(e.errors):[],console:p5(e.console)?Object.values(e.console).sort((e,t)=>e.id-t.id):[],dropped:p5(e.dropped)?{errors:Number(e.dropped.errors)||0,console:Number(e.dropped.console)||0}:{errors:0,console:0}})).sort((e,t)=>t.reportedAt-e.reportedAt):[]}function due(e,t){return t&&e.some(e=>e.pageId===t)?t:e.length>1?`all`:e[0]?.pageId??`all`}function fue(e,t){return e.filter(e=>t===`all`||e.pageId===t).flatMap(e=>e.errors.map(t=>({...t,pageId:e.pageId}))).sort((e,t)=>t.lastAt-e.lastAt)}function pue(e,t){return e.filter(e=>t===`all`||e.pageId===t).flatMap(e=>e.console.map(t=>({...t,pageId:e.pageId}))).sort((e,t)=>t.at-e.at||t.id-e.id)}function mue(e,t){return t?.startsWith(`https://angular.dev/errors/`)?{code:e,href:t}:{code:e}}var hue=(e,t)=>t.signal+t.at,gue=(e,t)=>t.id+e;function _ue(e,t){if(e&1&&(R(0,`code`),K(1),z()),e&2){let e=W();D(),q(e.binding)}}function vue(e,t){e&1&&(R(0,`span`,2),K(1,`A text interpolation (Angular doesn't name it)`),z())}function yue(e,t){if(e&1&&(R(0,`span`,2),K(1,` in `),z(),R(2,`code`),K(3),z()),e&2){let e=W();D(3),q(e.template)}}function bue(e,t){if(e&1&&(R(0,`code`),K(1),z(),K(2)),e&2){let e=t.$implicit,n=t.$index,r=t.$count;D(),q(e),D(),J(``,n===r-1?``:`, `,` `)}}function xue(e,t){if(e&1&&(R(0,`dt`),K(1,`Held by`),z(),R(2,`dd`),M(3,bue,3,2,null,null,Xh),z()),e&2){let e=W();D(3),N(e.members)}}function Sue(e,t){e&1&&(R(0,`p`,4),K(1,` Values are hidden: the binding or a field that holds them has a secret-looking name. `),z())}function Cue(e,t){e&1&&(R(0,`p`,4),K(1,` Angular says this view was created after its parent was checked, so a change detection hook such as `),R(2,`code`),K(3,`ngAfterViewInit`),z(),K(4,` created it. `),z())}function wue(e,t){if(e&1&&(R(0,`li`)(1,`code`),K(2),z()()),e&2){let e=t.$implicit;D(2),q(e)}}function Tue(e,t){if(e&1&&(R(0,`ol`,6),M(1,wue,3,1,`li`,null,Yh),z()),e&2){let e=W().$implicit;D(),N(e.stack)}}function Eue(e,t){e&1&&(R(0,`span`,2),K(1,` (turn on write stacks in the Signals tab and reproduce to see the code)`),z())}function Due(e,t){if(e&1&&(R(0,`li`),K(1,` Signal `),R(2,`code`),K(3),z(),K(4),A(5,Tue,3,0,`ol`,6)(6,Eue,2,0,`span`,2),z()),e&2){let e=t.$implicit,n=W(4);D(3),q(e.signal),D(),J(` at `,n.time(e.at),` `),D(),j(e.stack?.length?5:6)}}function Oue(e,t){if(e&1&&(R(0,`h4`,0),K(1,`Written by`),z(),R(2,`ul`,5),M(3,Due,7,3,`li`,null,hue),z()),e&2){let e=W();D(3),N(e.writes)}}function kue(e,t){e&1&&(R(0,`p`,4),K(1,` No named signal was written with this value just before the check. Look for code that sets a field the template reads during change detection, such as `),R(2,`code`),K(3,`ngAfterViewInit`),z(),K(4,`, a getter that returns a new value each time, or a child that changes its parent. `),z())}function Aue(e,t){e&1&&(R(0,`p`,4),K(1,` Where it was written is unknown: the page doesn't report signal writes (the Signals inspector is off, or Angular is older than 17). `),z())}function jue(e,t){if(e&1&&(R(0,`h3`,0),K(1,`What changed`),z(),R(2,`dl`,1)(3,`dt`),K(4,`Binding`),z(),R(5,`dd`),A(6,_ue,2,1,`code`)(7,vue,2,0,`span`,2),A(8,yue,4,1),z(),R(9,`dt`),K(10,`Previous`),z(),R(11,`dd`)(12,`code`,3),K(13),z()(),R(14,`dt`),K(15,`Current`),z(),R(16,`dd`)(17,`code`,3),K(18),z()(),A(19,xue,5,0),z(),A(20,Sue,2,0,`p`,4),A(21,Cue,5,0,`p`,4),A(22,Oue,5,0)(23,kue,5,0,`p`,4)(24,Aue,2,0,`p`,4)),e&2){let e=t;D(6),j(e.binding?6:7),D(2),j(e.template?8:-1),D(5),q(e.previous),D(5),q(e.current),D(),j(e.members?.length?19:-1),D(),j(e.masked?20:-1),D(),j(e.creation?21:-1),D(),j(e.writes?.length?22:e.writesKnown?23:24)}}function Mue(e,t){if(e&1&&A(0,jue,25,8),e&2){let e;j((e=W().changed())?0:-1,e)}}function Nue(e,t){if(e&1&&(R(0,`p`,7),K(1),z()),e&2){let e=W();D(),q(e.summary)}}function Pue(e,t){if(e&1&&(R(0,`span`,14),K(1),z()),e&2){let e=W().$implicit;D(),q(e.op===`expected`?`Server only:`:`Client only:`)}}function Fue(e,t){if(e&1&&(R(0,`li`)(1,`span`,13),K(2),z(),A(3,Pue,2,1,`span`,14),R(4,`code`),K(5),z()()),e&2){let e=t.$implicit,n=W(4);k(`data-op`,e.op),D(2),q(n.signOf(e.op)),D(),j(e.op===`same`?-1:3),D(2),q(e.text)}}function Iue(e,t){if(e&1&&(R(0,`p`,8)(1,`span`,9),K(2,`−`),z(),K(3,` server HTML Angular expected `),R(4,`span`,10),K(5,`+`),z(),K(6,` client DOM it found `),z(),R(7,`div`,11)(8,`ol`,12),M(9,Fue,6,4,`li`,null,Yh),z()()),e&2){let e=W();D(9),N(e.diff)}}function Lue(e,t){e&1&&(R(0,`p`,4),K(1,`Angular described neither side of the mismatch.`),z())}function Rue(e,t){e&1&&(R(0,`p`,4),K(1,` Angular thinks a browser extension or third-party script changed the DOM before hydration. Try a clean browser profile, or add `),R(2,`code`),K(3,`ngSkipHydration`),z(),K(4,` to the host. `),z())}function zue(e,t){if(e&1&&(R(0,`h3`,0),K(1,`Server vs client DOM`),z(),A(2,Nue,2,1,`p`,7),A(3,Iue,11,0)(4,Lue,2,0,`p`,4),A(5,Rue,5,0,`p`,4)),e&2){let e=t;D(2),j(e.summary?2:-1),D(),j(e.diff?.length?3:4),D(2),j(e.external?5:-1)}}function Bue(e,t){if(e&1&&A(0,zue,6,3),e&2){let e;j((e=W().mismatch())?0:-1,e)}}function Vue(e,t){if(e&1&&(R(0,`code`),K(1),z(),K(2)),e&2){let e=t.$implicit,n=t.$index,r=t.$count;D(),q(e),D(),J(``,n===r-1?``:` → `,` `)}}function Hue(e,t){if(e&1&&(R(0,`dt`),K(1,`Path`),z(),R(2,`dd`),M(3,Vue,3,2,null,null,Yh),z()),e&2){let e=W();D(3),N(e.path)}}function Uue(e,t){if(e&1&&(R(0,`dt`),K(1,`Source`),z(),R(2,`dd`)(3,`code`),K(4),z()()),e&2){let e=W();D(4),q(e.source)}}function Wue(e,t){if(e&1){let e=B();R(0,`button`,18),U(`click`,function(){S(e);let t=W();return C(W(2).explainLookup(t.token))}),K(1),z()}if(e&2){let e=W(3);k(`aria-disabled`,e.loading()||null),D(),J(` `,e.lookup()?`Explain lookup again`:`Explain lookup`,` `)}}function Gue(e,t){e&1&&(R(0,`p`,4),K(1,` The component that asked for it wasn't found on the page, so the lookup can't be walked from here. `),z())}function Kue(e,t){e&1&&(R(0,`p`,4),K(1,`Walking the lookup…`),z())}function que(e,t){if(e&1&&(R(0,`code`),K(1),z()),e&2){let e=W().$implicit;D(),q(e.text)}}function Jue(e,t){if(e&1&&(R(0,`span`),K(1),z()),e&2){let e=W().$implicit;D(),q(e.text)}}function Yue(e,t){if(e&1&&A(0,que,2,1,`code`)(1,Jue,2,1,`span`),e&2){let e=t.$implicit;j(+!e.code)}}function Xue(e,t){if(e&1&&(R(0,`p`,17),M(1,Yue,2,1,null,null,Yh),z()),e&2){let e=W(3);D(),N(e.segments(t))}}function Zue(e,t){if(e&1&&(R(0,`code`),K(1),z()),e&2){let e=W().$implicit;D(),q(e.text)}}function Que(e,t){if(e&1&&(R(0,`span`),K(1),z()),e&2){let e=W().$implicit;D(),q(e.text)}}function $ue(e,t){if(e&1&&A(0,Zue,2,1,`code`)(1,Que,2,1,`span`),e&2){let e=t.$implicit;j(+!e.code)}}function ede(e,t){if(e&1&&(R(0,`p`,7),M(1,$ue,2,1,null,null,Yh),z()),e&2){let e=W(3);D(),N(e.segments(t.summary))}}function tde(e,t){if(e&1&&(R(0,`code`,2),K(1),z()),e&2){let e=W().$implicit;D(),q(e.component)}}function nde(e,t){if(e&1&&(R(0,`code`),K(1),z()),e&2){let e=W().$implicit;D(),q(e.text)}}function rde(e,t){if(e&1&&(R(0,`span`),K(1),z()),e&2){let e=W().$implicit;D(),q(e.text)}}function ide(e,t){if(e&1&&A(0,nde,2,1,`code`)(1,rde,2,1,`span`),e&2){let e=t.$implicit;j(+!e.code)}}function ade(e,t){if(e&1&&(R(0,`li`)(1,`span`,20)(2,`code`),K(3),z(),A(4,tde,2,1,`code`,2),z(),R(5,`span`,21),K(6),z(),R(7,`span`,22),M(8,ide,2,1,null,null,Yh),z()()),e&2){let e=t.$implicit,n=W(4);D(3),q(e.name),D(),j(e.component?4:-1),D(),k(`data-tone`,n.stepTone[e.status]),D(),q(n.stepLabel[e.status]),D(2),N(n.segments(e.reason))}}function ode(e,t){e&1&&K(0,` This Angular version has no resolution path, so the path follows the rendered tree. `)}function sde(e,t){if(e&1&&(R(0,`ol`,19),M(1,ade,10,4,`li`,null,gue),z(),R(3,`p`,4),K(4,` Read from the injector tree the page reported, assuming no `),R(5,`code`),K(6,`self`),z(),K(7,`, `),R(8,`code`),K(9,`skipSelf`),z(),K(10,`, `),R(11,`code`),K(12,`host`),z(),K(13,` or `),R(14,`code`),K(15,`optional`),z(),K(16,`. Agents can pass those to `),R(17,`code`),K(18,`explain-injection`),z(),K(19,`. `),A(20,ode,1,0),z()),e&2){let e=t;D(),N(e.steps),D(19),j(e.approximate?20:-1)}}function cde(e,t){if(e&1&&(R(0,`h3`,0),K(1,`Missing provider`),z(),R(2,`dl`,1)(3,`dt`),K(4,`Token`),z(),R(5,`dd`)(6,`code`),K(7),z()(),A(8,Hue,5,0),A(9,Uue,5,1),z(),A(10,Wue,2,2,`button`,15)(11,Gue,2,0,`p`,4),R(12,`div`,16),A(13,Kue,2,0,`p`,4)(14,Xue,3,0,`p`,17)(15,ede,3,0,`p`,7),z(),A(16,sde,21,1)),e&2){let e,n,r=t,i=W(2);D(7),q(r.token),D(),j(r.path?.length?8:-1),D(),j(r.source?9:-1),D(),j(i.canExplain()&&i.owner()?10:i.owner()?-1:11),D(3),j(i.loading()?13:(e=i.lookupError())?14:(e=i.lookup())?15:-1,e),D(3),j((n=!i.loading()&&!i.lookupError()&&i.lookup())?16:-1,n)}}function lde(e,t){if(e&1&&A(0,cde,17,6),e&2){let e;j((e=W().missing())?0:-1,e)}}var ude={provides:`Provides it`,missing:`Not provided`,hidden:`Hidden`,skipped:`Skipped`,"not-asked":`Not asked`,unknown:`Unknown`},dde={provides:`ok`,missing:`plain`,hidden:`warn`,skipped:`plain`,"not-asked":`plain`,unknown:`warn`},fde=class e{explain=$.required();owner=$(void 0);pageId=$(``);rpc=$(null);canExplain=$(!1);time=XE;segments=cue;stepLabel=ude;stepTone=dde;changed=X(()=>{let e=this.explain();return e.kind===`expression-changed`?e:null});mismatch=X(()=>{let e=this.explain();return e.kind===`hydration-mismatch`?e:null});missing=X(()=>{let e=this.explain();return e.kind===`missing-provider`?e:null});loading=T(!1);lookup=T(null);lookupError=T(null);signOf(e){return e===`expected`?`−`:e===`actual`?`+`:` `}async explainLookup(e){let t=this.rpc(),n=this.owner();if(t&&n&&!this.loading()){this.loading.set(!0),this.lookupError.set(null);try{let r=await t.scope(`pangular`).rpc.call(`explain-injection`,{selector:n.id,token:e,pageId:this.pageId()});!r||`error`in r?(this.lookup.set(null),this.lookupError.set(r?.error??`The server didn't answer.`)):this.lookup.set(r)}catch{this.lookup.set(null),this.lookupError.set(`Can't reach the devtools server. Try again.`)}finally{this.loading.set(!1)}}}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-error-explain`]],inputs:{explain:[1,`explain`],owner:[1,`owner`],pageId:[1,`pageId`],rpc:[1,`rpc`],canExplain:[1,`canExplain`]},decls:3,vars:1,consts:[[1,`label`],[1,`facts`],[1,`muted`],[1,`value`],[1,`note`],[1,`writes`],[`aria-label`,`App frames that wrote it`,1,`frames`],[1,`summary`],[1,`legend`],[`aria-hidden`,`true`,1,`sign`,`expected`],[`aria-hidden`,`true`,1,`sign`,`actual`],[`tabindex`,`0`,`role`,`region`,`aria-label`,`Server vs client DOM diff`,1,`diff-wrap`],[1,`diff`],[`aria-hidden`,`true`,1,`sign`],[1,`sr-only`],[`type`,`button`,1,`small`],[`aria-live`,`polite`],[`role`,`alert`,1,`note`],[`type`,`button`,1,`small`,3,`click`],[`aria-label`,`Injectors Angular asks, in order`,1,`steps`],[1,`step-name`],[1,`chip`],[1,`reason`]],template:function(e,t){if(e&1&&A(0,Mue,1,1)(1,Bue,1,1)(2,lde,1,1),e&2){let e;j((e=t.explain().kind)===`expression-changed`?0:e===`hydration-mismatch`?1:e===`missing-provider`?2:-1)}},styles:[`[_nghost-%COMP%] { display: grid; gap: 6px; min-width: 0; @@ -24286,7 +24309,7 @@ dd[_ngcontent-%COMP%] { border-color: var(--%NS%border); background: var(--%NS%surface-2); color: var(--%NS%text-2); -}`]})},m5=(e,t)=>t.pageId+t.id;function dde(e,t){e&1&&(F(0,`p`,1),K(1,`Loading errors…`),I())}function fde(e,t){if(e&1){let e=B();F(0,`div`,2)(1,`p`),K(2,`Can't read the errors from the devtools server.`),I(),F(3,`button`,3),H(`click`,function(){return S(e),C(W().retry())}),K(4,`Retry`),I()()}}function pde(e,t){e&1&&(F(0,`div`,1)(1,`p`),K(2,`No page reports errors yet.`),I(),F(3,`p`,4),K(4,` Open the app with the overlay loaded. Errors and console calls show up here as they happen. `),I()())}function mde(e,t){if(e&1){let e=B();F(0,`app-select`,17),H(`valueChange`,function(t){return S(e),C(W(2).level.set(t))}),I()}if(e&2){let e=W(2);P(`options`,e.levelOptions)(`value`,e.level())}}function hde(e,t){if(e&1){let e=B();F(0,`app-select`,18),H(`valueChange`,function(t){S(e);let n=W(2);return C(n.pageId.set(t??n.allPages))}),I()}if(e&2){let e=W(2);P(`options`,e.pageOptions())(`value`,e.pageId())}}function gde(e,t){e&1&&(F(0,`p`,20),K(1,` Angular's ErrorHandler isn't wrapped on this page yet, so errors Angular catches show up only when the default handler logs them. `),I())}function _de(e,t){if(e&1&&(F(0,`p`,20),K(1),I()),e&2){let e=W(3);D(),Y(` `,e.droppedErrors(),` older error `,e.droppedErrors()===1?`group was`:`groups were`,` dropped. Each page keeps its last 100. `)}}function vde(e,t){e&1&&(F(0,`p`,21),K(1,` No errors since the page loaded. Errors show up here as the app hits them. `),I())}function yde(e,t){if(e&1){let e=B();F(0,`div`,21)(1,`p`),K(2),I(),F(3,`button`,3),H(`click`,function(){S(e),W(2);let t=Ag(13);return W().filter.set(``),C(t.focus())}),K(4,` Clear filters `),I()()}if(e&2){let e=W(3);D(2),J(`No error matches “`,e.filter(),`”.`)}}function bde(e,t){if(e&1&&(F(0,`a`,30),K(1),F(2,`span`,32),K(3,` reference (opens in a new tab)`),I()()),e&2){let e=W();P(`href`,t,bu),D(),q(e)}}function xde(e,t){if(e&1&&(F(0,`span`,31),K(1),I()),e&2){let e=W();D(),q(e)}}function Sde(e,t){if(e&1&&A(0,bde,4,2,`a`,30)(1,xde,2,1,`span`,31),e&2){let e,n=W().$implicit;j((e=W(4).codeLink(t,n.docUrl).href)?0:1,e)}}function Cde(e,t){if(e&1&&(F(0,`span`,28),K(1),I()),e&2){let e=t.$implicit,n=W(5);D(),q(n.sourceLabels[e])}}function wde(e,t){if(e&1&&(F(0,`span`,4),K(1),I()),e&2){let e=W().$implicit,t=W(4);D(),q(t.pageLabel(e.pageId))}}function Tde(e,t){if(e&1){let e=B();F(0,`button`,34),H(`click`,function(){S(e);let t=W(),n=W().$implicit;return C(W(4).showComponent.emit({id:t.id,pageId:n.pageId}))}),K(1,` Show component `),F(2,`code`),K(3),I()()}if(e&2){let e=W();D(3),q(e.name)}}function Ede(e,t){if(e&1&&(F(0,`span`,4),K(1,`In `),F(2,`code`),K(3),I()()),e&2){let e=W();D(3),q(e.name)}}function Dde(e,t){e&1&&A(0,Tde,4,1,`button`,33)(1,Ede,4,1,`span`,4),e&2&&j(+!W(5).canShowComponent())}function Ode(e,t){if(e&1&&L(0,`app-error-explain`,29),e&2){let e=W().$implicit,n=W(4);P(`explain`,t)(`owner`,e.owner)(`pageId`,e.pageId)(`rpc`,n.rpc())(`canExplain`,n.canExplainInjection())}}function kde(e,t){if(e&1&&(F(0,`details`)(1,`summary`),K(2,`Stack`),I(),F(3,`pre`,35),K(4),I()()),e&2){let e=W().$implicit;D(4),q(e.stack)}}function Ade(e,t){if(e&1&&(F(0,`li`,23)(1,`div`,24)(2,`span`,25),K(3),I(),F(4,`code`,26),K(5),I()(),F(6,`div`,27),A(7,Sde,2,1),M(8,Cde,2,1,`span`,28,Xh),F(10,`span`,4),K(11),I(),A(12,wde,2,1,`span`,4),A(13,Dde,2,1),I(),A(14,Ode,1,5,`app-error-explain`,29),A(15,kde,5,1,`details`),I()),e&2){let e,n,r,i=t.$implicit,a=W(4);D(2),k(`aria-label`,a.timesLabel(i.count)),D(),J(` `,i.count,`× `),D(2),q(i.message),D(2),j((e=i.code)?7:-1,e),D(),N(i.sources),D(3),J(`Last at `,a.time(i.lastAt)),D(),j(a.showPage()?12:-1),D(),j((n=i.owner)?13:-1,n),D(),j((r=i.explain)?14:-1,r),D(),j(i.stack?15:-1)}}function jde(e,t){if(e&1&&(F(0,`ol`,22),M(1,Ade,16,9,`li`,23,m5),I()),e&2){let e=W(3);D(),N(e.shownErrors())}}function Mde(e,t){if(e&1&&(F(0,`section`,15)(1,`h2`,19),K(2,`Errors`),I(),A(3,gde,2,0,`p`,20),A(4,_de,2,2,`p`,20),A(5,vde,2,0,`p`,21)(6,yde,5,1,`div`,21)(7,jde,3,0,`ol`,22),I()),e&2){let e=W(2);D(3),j(e.unwrapped()?3:-1),D(),j(e.droppedErrors()?4:-1),D(),j(e.errors().length?e.shownErrors().length?7:6:5)}}function Nde(e,t){if(e&1&&(F(0,`p`,20),K(1),I()),e&2){let e=W(3);D(),Y(` `,e.droppedConsole(),` older `,e.droppedConsole()===1?`call was`:`calls were`,` dropped. Each page keeps its last 200. `)}}function Pde(e,t){e&1&&(F(0,`p`,21),K(1,` No console calls since the overlay connected. They show up here as the app logs. `),I())}function Fde(e,t){if(e&1){let e=B();F(0,`div`,21)(1,`p`),K(2,`No console call matches the filters.`),I(),F(3,`button`,3),H(`click`,function(){S(e),W(2);let t=Ag(13);return W().clearFilters(),C(t.focus())}),K(4,` Clear filters `),I()()}}function Ide(e,t){if(e&1&&(F(0,`span`,25),K(1),I()),e&2){let e=W().$implicit;k(`aria-label`,W(4).timesLabel(e.count)),D(),J(``,e.count,`×`)}}function Lde(e,t){if(e&1&&(F(0,`a`,30),K(1),F(2,`span`,32),K(3,` reference (opens in a new tab)`),I()()),e&2){let e=W();P(`href`,t,bu),D(),q(e)}}function Rde(e,t){if(e&1&&(F(0,`span`,42),K(1),I()),e&2){let e=W();D(),q(e)}}function zde(e,t){if(e&1&&A(0,Lde,4,2,`a`,30)(1,Rde,2,1,`span`,42),e&2){let e,n=W().$implicit;j((e=W(4).codeLink(t,n.docUrl).href)?0:1,e)}}function Bde(e,t){if(e&1&&(F(0,`li`,38)(1,`span`,39),K(2),I(),F(3,`code`,40),K(4),I(),A(5,Ide,2,2,`span`,25),A(6,zde,2,1),F(7,`time`,41),K(8),I()()),e&2){let e,n=t.$implicit,r=W(4);D(),k(`data-tone`,r.levelTone[n.level]),D(),q(n.level),D(2),q(n.text),D(),j(n.count>1?5:-1),D(),j((e=n.code)?6:-1,e),D(2),q(r.time(n.at))}}function Vde(e,t){if(e&1&&(F(0,`ol`,37),M(1,Bde,9,6,`li`,38,m5),I()),e&2){let e=W(3);D(),N(e.shownEntries())}}function Hde(e,t){if(e&1&&(F(0,`section`,16)(1,`h2`,36),K(2,`Console`),I(),A(3,Nde,2,2,`p`,20),A(4,Pde,2,0,`p`,21)(5,Fde,5,0,`div`,21)(6,Vde,3,0,`ol`,37),I()),e&2){let e=W(2);D(3),j(e.droppedConsole()?3:-1),D(),j(e.entries().length?e.shownEntries().length?6:5:4)}}function Ude(e,t){if(e&1){let e=B();F(0,`p`,5),K(1,` Errors from Angular's ErrorHandler, uncaught errors and unhandled promise rejections on the live page, grouped by message, and the page's console calls. Messages and values are masked like other live data. `),I(),F(2,`div`,6)(3,`div`,7)(4,`button`,8),H(`click`,function(){return S(e),C(W().view.set(`errors`))}),K(5,` Errors `),F(6,`span`,9),K(7),I()(),F(8,`button`,8),H(`click`,function(){return S(e),C(W().view.set(`console`))}),K(9,` Console `),F(10,`span`,9),K(11),I()()(),F(12,`app-search-field`,10,0),w_(`valueChange`,function(t){S(e);let n=W();return C_(n.filter,t)||(n.filter=t),C(t)}),I(),A(14,mde,1,2,`app-select`,11),A(15,hde,1,2,`app-select`,12),F(16,`span`,13),K(17),I(),F(18,`p`,14),K(19),I()(),A(20,Mde,8,3,`section`,15)(21,Hde,7,2,`section`,16)}if(e&2){let e=W();D(4),k(`aria-pressed`,e.view()===`errors`),D(3),q(e.errors().length),D(),k(`aria-pressed`,e.view()===`console`),D(3),q(e.entries().length),D(),P(`placeholder`,e.view()===`errors`?`Filter by message or code`:`Filter by text`)(`saveKey`,`errors-`+e.view()),S_(`value`,e.filter),D(2),j(e.view()===`console`?14:-1),D(),j(e.pageOptions().length>2?15:-1),D(2),q(e.countText()),D(2),q(e.countStatus()),D(),j(e.view()===`errors`?20:21)}}var Wde={error:`danger`,warn:`warn`,info:`accent`,log:`plain`,debug:`plain`},Gde=class e{rpc=$(null);canShowComponent=$(!0);canExplainInjection=$(!1);showComponent=ev();destroyRef=x(ys);hostPageId=fT();unsubscribe;time=XE;codeLink=fue;sourceLabels=sue;levelTone=Wde;allPages=`all`;levelOptions=[{value:`all`,label:`All levels`},...aue.map(e=>({value:e,label:e}))];pages=T([]);loaded=T(!1);failed=T(!1);view=T(`errors`);filter=T(``);level=T(`all`);pageId=Q({source:()=>this.pages(),computation:(e,t)=>t?.value&&(t.value===`all`||e.some(e=>e.pageId===t.value))?t.value:lue(e,this.hostPageId)});pageOptions=X(()=>[{value:`all`,label:`All pages`},...this.pages().map(e=>({value:e.pageId,label:e.title||e.url||e.pageId,hint:e.url}))]);showPage=X(()=>this.pageId()===`all`&&this.pages().length>1);picked=X(()=>this.pages().filter(e=>this.pageId()===`all`||e.pageId===this.pageId()));unwrapped=X(()=>this.picked().some(e=>e.handler!==`wrapped`));droppedErrors=X(()=>this.picked().reduce((e,t)=>e+t.dropped.errors,0));droppedConsole=X(()=>this.picked().reduce((e,t)=>e+t.dropped.console,0));errors=X(()=>uue(this.pages(),this.pageId()));entries=X(()=>due(this.pages(),this.pageId()));shownErrors=X(()=>{let e=this.filter().trim().toLowerCase();return e?this.errors().filter(t=>t.message.toLowerCase().includes(e)||(t.code??``).toLowerCase().includes(e)||(t.owner?.name??``).toLowerCase().includes(e)):this.errors()});shownEntries=X(()=>{let e=this.filter().trim().toLowerCase(),t=this.level();return this.entries().filter(n=>(t===`all`||n.level===t)&&(!e||n.text.toLowerCase().includes(e)))});countText=X(()=>{let[e,t,n]=this.view()===`errors`?[this.shownErrors().length,this.errors().length,`error`]:[this.shownEntries().length,this.entries().length,`call`];return`${e} of ${t} ${t===1?n:`${n}s`}`});countStatus=f5(()=>[this.view(),this.filter(),this.level(),this.pageId()],()=>this.countText());constructor(){E(()=>{let e=this.rpc();e&&this.load(e)}),this.destroyRef.onDestroy(()=>this.unsubscribe?.())}retry(){let e=this.rpc();e&&this.load(e)}clearFilters(){this.filter.set(``),this.level.set(`all`)}timesLabel(e){return e===1?`Once`:`${e} times`}pageLabel(e){let t=this.pages().find(t=>t.pageId===e);return t?.title||t?.url||e}async load(e){this.failed.set(!1);try{let t=await e.scope(`pangular`).rpc.sharedState(`errors`);if(this.destroyRef.destroyed)return;let n=e=>this.pages.set(cue(e));n(t.value()),this.unsubscribe?.(),this.unsubscribe=t.on(`updated`,n)}catch{this.failed.set(!0)}finally{this.loaded.set(!0)}}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-errors-inspector`]],inputs:{rpc:[1,`rpc`],canShowComponent:[1,`canShowComponent`],canExplainInjection:[1,`canExplainInjection`]},outputs:{showComponent:`showComponent`},decls:4,vars:1,consts:[[`search`,``],[`role`,`status`,1,`state`],[`role`,`alert`,1,`state`],[`type`,`button`,1,`small`,3,`click`],[1,`muted`],[1,`intro`],[1,`toolbar`],[`role`,`group`,`aria-label`,`Show`,1,`views`],[`type`,`button`,1,`view`,3,`click`],[1,`badge`],[1,`search`,3,`valueChange`,`placeholder`,`saveKey`,`value`],[`ariaLabel`,`Console level`,1,`level-select`,3,`options`,`value`],[`ariaLabel`,`Page`,1,`page-select`,3,`options`,`value`],[1,`count`],[`role`,`status`,1,`sr-only`],[`aria-labelledby`,`errors-title`],[`aria-labelledby`,`console-title`],[`ariaLabel`,`Console level`,1,`level-select`,3,`valueChange`,`options`,`value`],[`ariaLabel`,`Page`,1,`page-select`,3,`valueChange`,`options`,`value`],[`id`,`errors-title`,1,`sr-only`],[1,`notice`],[1,`empty`],[`aria-label`,`Errors, most recent first`,1,`errors`],[1,`error`],[1,`head`],[1,`times`],[1,`message`],[1,`meta`],[1,`chip`,`source`],[3,`explain`,`owner`,`pageId`,`rpc`,`canExplain`],[`target`,`_blank`,`rel`,`noopener noreferrer`,1,`chip`,`code`,3,`href`],[`title`,`No page in Angular's error reference`,1,`chip`,`code`,`plain`],[1,`sr-only`],[`type`,`button`,1,`link`],[`type`,`button`,1,`link`,3,`click`],[`tabindex`,`0`,`aria-label`,`Stack trace`],[`id`,`console-title`,1,`sr-only`],[`aria-label`,`Console calls, newest first`,1,`console`],[1,`entry`],[1,`chip`,`level`],[1,`text`],[1,`when`],[1,`chip`,`code`,`plain`]],template:function(e,t){e&1&&A(0,dde,2,0,`p`,1)(1,fde,5,0,`div`,2)(2,pde,5,0,`div`,1)(3,Ude,22,12),e&2&&j(t.loaded()?t.failed()?1:t.pages().length?3:2:0)},dependencies:[cP,ND,ude],styles:[`[_nghost-%COMP%] { +}`]})},m5=(e,t)=>t.pageId+t.id;function pde(e,t){e&1&&(F(0,`p`,1),K(1,`Loading errors…`),I())}function mde(e,t){if(e&1){let e=B();F(0,`div`,2)(1,`p`),K(2,`Can't read the errors from the devtools server.`),I(),F(3,`button`,3),H(`click`,function(){return S(e),C(W().retry())}),K(4,`Retry`),I()()}}function hde(e,t){e&1&&(F(0,`div`,1)(1,`p`),K(2,`No page reports errors yet.`),I(),F(3,`p`,4),K(4,` Open the app with the overlay loaded. Errors and console calls show up here as they happen. `),I()())}function gde(e,t){if(e&1){let e=B();F(0,`app-select`,17),H(`valueChange`,function(t){return S(e),C(W(2).level.set(t))}),I()}if(e&2){let e=W(2);P(`options`,e.levelOptions)(`value`,e.level())}}function _de(e,t){if(e&1){let e=B();F(0,`app-select`,18),H(`valueChange`,function(t){S(e);let n=W(2);return C(n.pageId.set(t??n.allPages))}),I()}if(e&2){let e=W(2);P(`options`,e.pageOptions())(`value`,e.pageId())}}function vde(e,t){e&1&&(F(0,`p`,20),K(1,` Angular's ErrorHandler isn't wrapped on this page yet, so errors Angular catches show up only when the default handler logs them. `),I())}function yde(e,t){if(e&1&&(F(0,`p`,20),K(1),I()),e&2){let e=W(3);D(),Y(` `,e.droppedErrors(),` older error `,e.droppedErrors()===1?`group was`:`groups were`,` dropped. Each page keeps its last 100. `)}}function bde(e,t){e&1&&(F(0,`p`,21),K(1,` No errors since the page loaded. Errors show up here as the app hits them. `),I())}function xde(e,t){if(e&1){let e=B();F(0,`div`,21)(1,`p`),K(2),I(),F(3,`button`,3),H(`click`,function(){S(e),W(2);let t=Ag(13);return W().filter.set(``),C(t.focus())}),K(4,` Clear filters `),I()()}if(e&2){let e=W(3);D(2),J(`No error matches “`,e.filter(),`”.`)}}function Sde(e,t){if(e&1&&(F(0,`a`,30),K(1),F(2,`span`,32),K(3,` reference (opens in a new tab)`),I()()),e&2){let e=W();P(`href`,t,bu),D(),q(e)}}function Cde(e,t){if(e&1&&(F(0,`span`,31),K(1),I()),e&2){let e=W();D(),q(e)}}function wde(e,t){if(e&1&&A(0,Sde,4,2,`a`,30)(1,Cde,2,1,`span`,31),e&2){let e,n=W().$implicit;j((e=W(4).codeLink(t,n.docUrl).href)?0:1,e)}}function Tde(e,t){if(e&1&&(F(0,`span`,28),K(1),I()),e&2){let e=t.$implicit,n=W(5);D(),q(n.sourceLabels[e])}}function Ede(e,t){if(e&1&&(F(0,`span`,4),K(1),I()),e&2){let e=W().$implicit,t=W(4);D(),q(t.pageLabel(e.pageId))}}function Dde(e,t){if(e&1){let e=B();F(0,`button`,34),H(`click`,function(){S(e);let t=W(),n=W().$implicit;return C(W(4).showComponent.emit({id:t.id,pageId:n.pageId}))}),K(1,` Show component `),F(2,`code`),K(3),I()()}if(e&2){let e=W();D(3),q(e.name)}}function Ode(e,t){if(e&1&&(F(0,`span`,4),K(1,`In `),F(2,`code`),K(3),I()()),e&2){let e=W();D(3),q(e.name)}}function kde(e,t){e&1&&A(0,Dde,4,1,`button`,33)(1,Ode,4,1,`span`,4),e&2&&j(+!W(5).canShowComponent())}function Ade(e,t){if(e&1&&L(0,`app-error-explain`,29),e&2){let e=W().$implicit,n=W(4);P(`explain`,t)(`owner`,e.owner)(`pageId`,e.pageId)(`rpc`,n.rpc())(`canExplain`,n.canExplainInjection())}}function jde(e,t){if(e&1&&(F(0,`details`)(1,`summary`),K(2,`Stack`),I(),F(3,`pre`,35),K(4),I()()),e&2){let e=W().$implicit;D(4),q(e.stack)}}function Mde(e,t){if(e&1&&(F(0,`li`,23)(1,`div`,24)(2,`span`,25),K(3),I(),F(4,`code`,26),K(5),I()(),F(6,`div`,27),A(7,wde,2,1),M(8,Tde,2,1,`span`,28,Xh),F(10,`span`,4),K(11),I(),A(12,Ede,2,1,`span`,4),A(13,kde,2,1),I(),A(14,Ade,1,5,`app-error-explain`,29),A(15,jde,5,1,`details`),I()),e&2){let e,n,r,i=t.$implicit,a=W(4);D(2),k(`aria-label`,a.timesLabel(i.count)),D(),J(` `,i.count,`× `),D(2),q(i.message),D(2),j((e=i.code)?7:-1,e),D(),N(i.sources),D(3),J(`Last at `,a.time(i.lastAt)),D(),j(a.showPage()?12:-1),D(),j((n=i.owner)?13:-1,n),D(),j((r=i.explain)?14:-1,r),D(),j(i.stack?15:-1)}}function Nde(e,t){if(e&1&&(F(0,`ol`,22),M(1,Mde,16,9,`li`,23,m5),I()),e&2){let e=W(3);D(),N(e.shownErrors())}}function Pde(e,t){if(e&1&&(F(0,`section`,15)(1,`h2`,19),K(2,`Errors`),I(),A(3,vde,2,0,`p`,20),A(4,yde,2,2,`p`,20),A(5,bde,2,0,`p`,21)(6,xde,5,1,`div`,21)(7,Nde,3,0,`ol`,22),I()),e&2){let e=W(2);D(3),j(e.unwrapped()?3:-1),D(),j(e.droppedErrors()?4:-1),D(),j(e.errors().length?e.shownErrors().length?7:6:5)}}function Fde(e,t){if(e&1&&(F(0,`p`,20),K(1),I()),e&2){let e=W(3);D(),Y(` `,e.droppedConsole(),` older `,e.droppedConsole()===1?`call was`:`calls were`,` dropped. Each page keeps its last 200. `)}}function Ide(e,t){e&1&&(F(0,`p`,21),K(1,` No console calls since the overlay connected. They show up here as the app logs. `),I())}function Lde(e,t){if(e&1){let e=B();F(0,`div`,21)(1,`p`),K(2,`No console call matches the filters.`),I(),F(3,`button`,3),H(`click`,function(){S(e),W(2);let t=Ag(13);return W().clearFilters(),C(t.focus())}),K(4,` Clear filters `),I()()}}function Rde(e,t){if(e&1&&(F(0,`span`,25),K(1),I()),e&2){let e=W().$implicit;k(`aria-label`,W(4).timesLabel(e.count)),D(),J(``,e.count,`×`)}}function zde(e,t){if(e&1&&(F(0,`a`,30),K(1),F(2,`span`,32),K(3,` reference (opens in a new tab)`),I()()),e&2){let e=W();P(`href`,t,bu),D(),q(e)}}function Bde(e,t){if(e&1&&(F(0,`span`,42),K(1),I()),e&2){let e=W();D(),q(e)}}function Vde(e,t){if(e&1&&A(0,zde,4,2,`a`,30)(1,Bde,2,1,`span`,42),e&2){let e,n=W().$implicit;j((e=W(4).codeLink(t,n.docUrl).href)?0:1,e)}}function Hde(e,t){if(e&1&&(F(0,`li`,38)(1,`span`,39),K(2),I(),F(3,`code`,40),K(4),I(),A(5,Rde,2,2,`span`,25),A(6,Vde,2,1),F(7,`time`,41),K(8),I()()),e&2){let e,n=t.$implicit,r=W(4);D(),k(`data-tone`,r.levelTone[n.level]),D(),q(n.level),D(2),q(n.text),D(),j(n.count>1?5:-1),D(),j((e=n.code)?6:-1,e),D(2),q(r.time(n.at))}}function Ude(e,t){if(e&1&&(F(0,`ol`,37),M(1,Hde,9,6,`li`,38,m5),I()),e&2){let e=W(3);D(),N(e.shownEntries())}}function Wde(e,t){if(e&1&&(F(0,`section`,16)(1,`h2`,36),K(2,`Console`),I(),A(3,Fde,2,2,`p`,20),A(4,Ide,2,0,`p`,21)(5,Lde,5,0,`div`,21)(6,Ude,3,0,`ol`,37),I()),e&2){let e=W(2);D(3),j(e.droppedConsole()?3:-1),D(),j(e.entries().length?e.shownEntries().length?6:5:4)}}function Gde(e,t){if(e&1){let e=B();F(0,`p`,5),K(1,` Errors from Angular's ErrorHandler, uncaught errors and unhandled promise rejections on the live page, grouped by message, and the page's console calls. Messages and values are masked like other live data. `),I(),F(2,`div`,6)(3,`div`,7)(4,`button`,8),H(`click`,function(){return S(e),C(W().view.set(`errors`))}),K(5,` Errors `),F(6,`span`,9),K(7),I()(),F(8,`button`,8),H(`click`,function(){return S(e),C(W().view.set(`console`))}),K(9,` Console `),F(10,`span`,9),K(11),I()()(),F(12,`app-search-field`,10,0),w_(`valueChange`,function(t){S(e);let n=W();return C_(n.filter,t)||(n.filter=t),C(t)}),I(),A(14,gde,1,2,`app-select`,11),A(15,_de,1,2,`app-select`,12),F(16,`span`,13),K(17),I(),F(18,`p`,14),K(19),I()(),A(20,Pde,8,3,`section`,15)(21,Wde,7,2,`section`,16)}if(e&2){let e=W();D(4),k(`aria-pressed`,e.view()===`errors`),D(3),q(e.errors().length),D(),k(`aria-pressed`,e.view()===`console`),D(3),q(e.entries().length),D(),P(`placeholder`,e.view()===`errors`?`Filter by message or code`:`Filter by text`)(`saveKey`,`errors-`+e.view()),S_(`value`,e.filter),D(2),j(e.view()===`console`?14:-1),D(),j(e.pageOptions().length>2?15:-1),D(2),q(e.countText()),D(2),q(e.countStatus()),D(),j(e.view()===`errors`?20:21)}}var Kde={error:`danger`,warn:`warn`,info:`accent`,log:`plain`,debug:`plain`},qde=class e{rpc=$(null);canShowComponent=$(!0);canExplainInjection=$(!1);showComponent=ev();destroyRef=x(ys);hostPageId=fT();unsubscribe;time=XE;codeLink=mue;sourceLabels=lue;levelTone=Kde;allPages=`all`;levelOptions=[{value:`all`,label:`All levels`},...sue.map(e=>({value:e,label:e}))];pages=T([]);loaded=T(!1);failed=T(!1);view=T(`errors`);filter=T(``);level=T(`all`);pageId=Q({source:()=>this.pages(),computation:(e,t)=>t?.value&&(t.value===`all`||e.some(e=>e.pageId===t.value))?t.value:due(e,this.hostPageId)});pageOptions=X(()=>[{value:`all`,label:`All pages`},...this.pages().map(e=>({value:e.pageId,label:e.title||e.url||e.pageId,hint:e.url}))]);showPage=X(()=>this.pageId()===`all`&&this.pages().length>1);picked=X(()=>this.pages().filter(e=>this.pageId()===`all`||e.pageId===this.pageId()));unwrapped=X(()=>this.picked().some(e=>e.handler!==`wrapped`));droppedErrors=X(()=>this.picked().reduce((e,t)=>e+t.dropped.errors,0));droppedConsole=X(()=>this.picked().reduce((e,t)=>e+t.dropped.console,0));errors=X(()=>fue(this.pages(),this.pageId()));entries=X(()=>pue(this.pages(),this.pageId()));shownErrors=X(()=>{let e=this.filter().trim().toLowerCase();return e?this.errors().filter(t=>t.message.toLowerCase().includes(e)||(t.code??``).toLowerCase().includes(e)||(t.owner?.name??``).toLowerCase().includes(e)):this.errors()});shownEntries=X(()=>{let e=this.filter().trim().toLowerCase(),t=this.level();return this.entries().filter(n=>(t===`all`||n.level===t)&&(!e||n.text.toLowerCase().includes(e)))});countText=X(()=>{let[e,t,n]=this.view()===`errors`?[this.shownErrors().length,this.errors().length,`error`]:[this.shownEntries().length,this.entries().length,`call`];return`${e} of ${t} ${t===1?n:`${n}s`}`});countStatus=f5(()=>[this.view(),this.filter(),this.level(),this.pageId()],()=>this.countText());constructor(){E(()=>{let e=this.rpc();e&&this.load(e)}),this.destroyRef.onDestroy(()=>this.unsubscribe?.())}retry(){let e=this.rpc();e&&this.load(e)}clearFilters(){this.filter.set(``),this.level.set(`all`)}timesLabel(e){return e===1?`Once`:`${e} times`}pageLabel(e){let t=this.pages().find(t=>t.pageId===e);return t?.title||t?.url||e}async load(e){this.failed.set(!1);try{let t=await e.scope(`pangular`).rpc.sharedState(`errors`);if(this.destroyRef.destroyed)return;let n=e=>this.pages.set(uue(e));n(t.value()),this.unsubscribe?.(),this.unsubscribe=t.on(`updated`,n)}catch{this.failed.set(!0)}finally{this.loaded.set(!0)}}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-errors-inspector`]],inputs:{rpc:[1,`rpc`],canShowComponent:[1,`canShowComponent`],canExplainInjection:[1,`canExplainInjection`]},outputs:{showComponent:`showComponent`},decls:4,vars:1,consts:[[`search`,``],[`role`,`status`,1,`state`],[`role`,`alert`,1,`state`],[`type`,`button`,1,`small`,3,`click`],[1,`muted`],[1,`intro`],[1,`toolbar`],[`role`,`group`,`aria-label`,`Show`,1,`views`],[`type`,`button`,1,`view`,3,`click`],[1,`badge`],[1,`search`,3,`valueChange`,`placeholder`,`saveKey`,`value`],[`ariaLabel`,`Console level`,1,`level-select`,3,`options`,`value`],[`ariaLabel`,`Page`,1,`page-select`,3,`options`,`value`],[1,`count`],[`role`,`status`,1,`sr-only`],[`aria-labelledby`,`errors-title`],[`aria-labelledby`,`console-title`],[`ariaLabel`,`Console level`,1,`level-select`,3,`valueChange`,`options`,`value`],[`ariaLabel`,`Page`,1,`page-select`,3,`valueChange`,`options`,`value`],[`id`,`errors-title`,1,`sr-only`],[1,`notice`],[1,`empty`],[`aria-label`,`Errors, most recent first`,1,`errors`],[1,`error`],[1,`head`],[1,`times`],[1,`message`],[1,`meta`],[1,`chip`,`source`],[3,`explain`,`owner`,`pageId`,`rpc`,`canExplain`],[`target`,`_blank`,`rel`,`noopener noreferrer`,1,`chip`,`code`,3,`href`],[`title`,`No page in Angular's error reference`,1,`chip`,`code`,`plain`],[1,`sr-only`],[`type`,`button`,1,`link`],[`type`,`button`,1,`link`,3,`click`],[`tabindex`,`0`,`aria-label`,`Stack trace`],[`id`,`console-title`,1,`sr-only`],[`aria-label`,`Console calls, newest first`,1,`console`],[1,`entry`],[1,`chip`,`level`],[1,`text`],[1,`when`],[1,`chip`,`code`,`plain`]],template:function(e,t){e&1&&A(0,pde,2,0,`p`,1)(1,mde,5,0,`div`,2)(2,hde,5,0,`div`,1)(3,Gde,22,12),e&2&&j(t.loaded()?t.failed()?1:t.pages().length?3:2:0)},dependencies:[cP,ND,fde],styles:[`[_nghost-%COMP%] { display: block; font-size: 13px; } @@ -24619,7 +24642,7 @@ pre[_ngcontent-%COMP%]:focus-visible { .empty[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .state[_ngcontent-%COMP%] p[_ngcontent-%COMP%] { margin: 0 0 8px; -}`]})},Kde=e=>({$implicit:e,depth:0}),qde=(e,t)=>({$implicit:e,depth:t}),h5=(e,t)=>t.key;function Jde(e,t){if(e&1&&(F(0,`div`,6)(1,`dt`),K(2),I(),F(3,`dd`),K(4),I()()),e&2){let e=t.$implicit;k(`data-tone`,e.tone??null),D(2),q(e.label),D(2),q(e.value)}}function Yde(e,t){if(e&1&&(F(0,`dl`,3),M(1,Jde,5,3,`div`,6,Yh),I()),e&2){W();let e=O_(0);D(),N(e.items)}}function Xde(e,t){if(e&1&&(F(0,`p`,4),K(1),I()),e&2){W();let e=O_(0);D(),q(e.text)}}function Zde(e,t){if(e&1&&(F(0,`p`,7),K(1),I()),e&2){W(2);let e=O_(0);D(),q(e.empty??`No rows.`)}}function Qde(e,t){e&1&&(F(0,`p`,7),K(1,`No row matches the filter.`),I())}function $de(e,t){if(e&1&&(F(0,`th`,9),K(1),I()),e&2){let e=t.$implicit;D(),q(e.label)}}function efe(e,t){if(e&1&&(F(0,`span`,10),K(1),I()),e&2){W();let e=O_(0),n=W(4);k(`data-tone`,t),D(),q(n.cellText(e))}}function tfe(e,t){if(e&1&&K(0),e&2){W();let e=O_(0);J(` `,W(4).cellText(e),` `)}}function nfe(e,t){if(e&1&&(E_(0),F(1,`td`),A(2,efe,2,2,`span`,10)(3,tfe,1,1),I()),e&2){let e,n=t.$implicit,r=W().$implicit,i=W(3),a=D_(r[n.key]);D(2),j((e=i.toneOf(a))?2:3,e)}}function rfe(e,t){if(e&1&&(F(0,`tr`),M(1,nfe,4,2,`td`,null,h5),I()),e&2){W(3);let e=O_(0);D(),N(e.columns)}}function ife(e,t){if(e&1&&(F(0,`div`,8)(1,`table`)(2,`thead`)(3,`tr`),M(4,$de,2,1,`th`,9,h5),I()(),F(6,`tbody`),M(7,rfe,3,0,`tr`,null,Yh),I()()()),e&2){let e=W(2),t=O_(0);k(`aria-labelledby`,e.headingId()),D(4),N(t.columns),D(3),N(e.rows())}}function afe(e,t){if(e&1&&A(0,Zde,2,1,`p`,7)(1,Qde,2,0,`p`,7)(2,ife,9,1,`div`,8),e&2){let e=W();j(O_(0).rows.length?e.rows().length?2:1:0)}}function ofe(e,t){if(e&1&&(F(0,`p`,7),K(1),I()),e&2){W(2);let e=O_(0);D(),q(e.empty??`Nothing listed.`)}}function sfe(e,t){e&1&&(F(0,`p`,7),K(1,`No item matches the filter.`),I())}function cfe(e,t){if(e&1&&(F(0,`span`,10),K(1),I()),e&2){let e=t;k(`data-tone`,e.tone??`neutral`),D(),q(e.label)}}function lfe(e,t){if(e&1&&(F(0,`span`,13),K(1),I()),e&2){let e=W().$implicit;D(),q(e.detail)}}function ufe(e,t){if(e&1&&(F(0,`li`)(1,`span`,12),K(2),I(),A(3,cfe,2,2,`span`,10),A(4,lfe,2,1,`span`,13),I()),e&2){let e,n=t.$implicit;D(2),q(n.label),D(),j((e=n.badge)?3:-1,e),D(),j(n.detail?4:-1)}}function dfe(e,t){if(e&1&&(F(0,`ul`,11),M(1,ufe,5,3,`li`,null,Yh),I()),e&2){let e=W(2);D(),N(e.items())}}function ffe(e,t){if(e&1&&A(0,ofe,2,1,`p`,7)(1,sfe,2,0,`p`,7)(2,dfe,3,0,`ul`,11),e&2){let e=W();j(O_(0).items.length?e.items().length?2:1:0)}}function pfe(e,t){if(e&1&&dg(0,5),e&2){W();let e=Ag(10),t=O_(0);P(`ngTemplateOutlet`,e)(`ngTemplateOutletContext`,R_(2,Kde,t.value))}}function mfe(e,t){if(e&1&&(F(0,`code`,14),K(1),I()),e&2){let e=W().$implicit,t=W();D(),q(t.leafText(e))}}function hfe(e,t){if(e&1&&(F(0,`details`,17)(1,`summary`)(2,`span`,18),K(3),I(),F(4,`span`,19),K(5),I()(),dg(6,5),I()),e&2){let e=W().$implicit,t=W(2).depth,n=O_(0);W();let r=Ag(10);P(`open`,t===0&&n.length<=8),D(3),q(e.key),D(2),q(e.summary),D(),P(`ngTemplateOutlet`,r)(`ngTemplateOutletContext`,z_(5,qde,e.value,t+1))}}function gfe(e,t){if(e&1&&(F(0,`span`,18),K(1),I(),F(2,`code`,14),K(3),I()),e&2){let e=W().$implicit;D(),q(e.key),D(2),q(e.summary)}}function _fe(e,t){if(e&1&&(F(0,`li`),A(1,hfe,7,8,`details`,17)(2,gfe,4,2),I()),e&2){let e=t.$implicit,n=W(2).depth,r=W();D(),j(e.nested&&ne.columns.some(e=>_5(g5(t[e.key]),n))).length,total:e.rows.length}:e.kind===`list`?{shown:e.items.filter(e=>_5(`${e.label} ${e.detail??``} ${e.badge?.label??``}`,n)).length,total:e.items.length}:{shown:0,total:0}}var xfe=8,Sfe=200;function Cfe(e){return!e||typeof e!=`object`?[]:(Array.isArray(e)?e.map((e,t)=>[String(t),e]):Object.entries(e)).slice(0,Sfe).map(([e,t])=>{let n=!!t&&typeof t==`object`;return{key:e,value:t,nested:n,summary:Array.isArray(t)?`Array(${t.length})`:n?`{${Object.keys(t).length}}`:t===null?`null`:typeof t==`string`?JSON.stringify(t):String(t)}})}var wfe=class e{section=$.required();filter=$(``);index=$(0);maxDepth=xfe;cellText=g5;entriesOf=Cfe;headingId=X(()=>`plugin-section-${this.index()}`);text=X(()=>this.filter().trim().toLowerCase());rows=X(()=>{let e=this.section();if(e.kind!==`table`)return[];let t=this.text();return e.rows.filter(n=>e.columns.some(e=>_5(g5(n[e.key]),t)))});items=X(()=>{let e=this.section();if(e.kind!==`list`)return[];let t=this.text();return e.items.filter(e=>_5(`${e.label} ${e.detail??``} ${e.badge?.label??``}`,t))});toneOf(e){return e&&typeof e==`object`&&e.tone?e.tone:null}leafText(e){return e==null?String(e):Array.isArray(e)?`[]`:typeof e==`object`?`{}`:typeof e==`string`?JSON.stringify(e):String(e)}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-plugin-section`]],inputs:{section:[1,`section`],filter:[1,`filter`],index:[1,`index`]},decls:11,vars:5,consts:[[`tree`,``],[1,`section`],[1,`title`,3,`id`],[1,`stats`],[1,`text`],[3,`ngTemplateOutlet`,`ngTemplateOutletContext`],[1,`stat`],[1,`empty`],[`tabindex`,`0`,`role`,`region`,1,`table-wrap`],[`scope`,`col`],[1,`chip`],[1,`list`],[1,`label`],[1,`detail`],[1,`leaf`],[1,`tree`,3,`root`],[1,`tree`],[3,`open`],[1,`key`],[1,`summary`]],template:function(e,t){if(e&1&&(E_(0),F(1,`section`,1)(2,`h3`,2),K(3),I(),A(4,Yde,3,0,`dl`,3)(5,Xde,2,1,`p`,4)(6,afe,3,1)(7,ffe,3,1)(8,pfe,1,4,`ng-container`,5),I(),Dh(9,yfe,3,2,`ng-template`,null,0,q_)),e&2){let e,n=D_(t.section());D(),k(`aria-labelledby`,t.headingId()),D(),P(`id`,t.headingId()),D(),q(n.title),D(),j((e=n.kind)===`stats`?4:e===`text`?5:e===`table`?6:e===`list`?7:e===`tree`?8:-1)}},dependencies:[Uv],styles:[`[_nghost-%COMP%] { +}`]})},Jde=e=>({$implicit:e,depth:0}),Yde=(e,t)=>({$implicit:e,depth:t}),h5=(e,t)=>t.key;function Xde(e,t){if(e&1&&(F(0,`div`,6)(1,`dt`),K(2),I(),F(3,`dd`),K(4),I()()),e&2){let e=t.$implicit;k(`data-tone`,e.tone??null),D(2),q(e.label),D(2),q(e.value)}}function Zde(e,t){if(e&1&&(F(0,`dl`,3),M(1,Xde,5,3,`div`,6,Yh),I()),e&2){W();let e=O_(0);D(),N(e.items)}}function Qde(e,t){if(e&1&&(F(0,`p`,4),K(1),I()),e&2){W();let e=O_(0);D(),q(e.text)}}function $de(e,t){if(e&1&&(F(0,`p`,7),K(1),I()),e&2){W(2);let e=O_(0);D(),q(e.empty??`No rows.`)}}function efe(e,t){e&1&&(F(0,`p`,7),K(1,`No row matches the filter.`),I())}function tfe(e,t){if(e&1&&(F(0,`th`,9),K(1),I()),e&2){let e=t.$implicit;D(),q(e.label)}}function nfe(e,t){if(e&1&&(F(0,`span`,10),K(1),I()),e&2){W();let e=O_(0),n=W(4);k(`data-tone`,t),D(),q(n.cellText(e))}}function rfe(e,t){if(e&1&&K(0),e&2){W();let e=O_(0);J(` `,W(4).cellText(e),` `)}}function ife(e,t){if(e&1&&(E_(0),F(1,`td`),A(2,nfe,2,2,`span`,10)(3,rfe,1,1),I()),e&2){let e,n=t.$implicit,r=W().$implicit,i=W(3),a=D_(r[n.key]);D(2),j((e=i.toneOf(a))?2:3,e)}}function afe(e,t){if(e&1&&(F(0,`tr`),M(1,ife,4,2,`td`,null,h5),I()),e&2){W(3);let e=O_(0);D(),N(e.columns)}}function ofe(e,t){if(e&1&&(F(0,`div`,8)(1,`table`)(2,`thead`)(3,`tr`),M(4,tfe,2,1,`th`,9,h5),I()(),F(6,`tbody`),M(7,afe,3,0,`tr`,null,Yh),I()()()),e&2){let e=W(2),t=O_(0);k(`aria-labelledby`,e.headingId()),D(4),N(t.columns),D(3),N(e.rows())}}function sfe(e,t){if(e&1&&A(0,$de,2,1,`p`,7)(1,efe,2,0,`p`,7)(2,ofe,9,1,`div`,8),e&2){let e=W();j(O_(0).rows.length?e.rows().length?2:1:0)}}function cfe(e,t){if(e&1&&(F(0,`p`,7),K(1),I()),e&2){W(2);let e=O_(0);D(),q(e.empty??`Nothing listed.`)}}function lfe(e,t){e&1&&(F(0,`p`,7),K(1,`No item matches the filter.`),I())}function ufe(e,t){if(e&1&&(F(0,`span`,10),K(1),I()),e&2){let e=t;k(`data-tone`,e.tone??`neutral`),D(),q(e.label)}}function dfe(e,t){if(e&1&&(F(0,`span`,13),K(1),I()),e&2){let e=W().$implicit;D(),q(e.detail)}}function ffe(e,t){if(e&1&&(F(0,`li`)(1,`span`,12),K(2),I(),A(3,ufe,2,2,`span`,10),A(4,dfe,2,1,`span`,13),I()),e&2){let e,n=t.$implicit;D(2),q(n.label),D(),j((e=n.badge)?3:-1,e),D(),j(n.detail?4:-1)}}function pfe(e,t){if(e&1&&(F(0,`ul`,11),M(1,ffe,5,3,`li`,null,Yh),I()),e&2){let e=W(2);D(),N(e.items())}}function mfe(e,t){if(e&1&&A(0,cfe,2,1,`p`,7)(1,lfe,2,0,`p`,7)(2,pfe,3,0,`ul`,11),e&2){let e=W();j(O_(0).items.length?e.items().length?2:1:0)}}function hfe(e,t){if(e&1&&dg(0,5),e&2){W();let e=Ag(10),t=O_(0);P(`ngTemplateOutlet`,e)(`ngTemplateOutletContext`,R_(2,Jde,t.value))}}function gfe(e,t){if(e&1&&(F(0,`code`,14),K(1),I()),e&2){let e=W().$implicit,t=W();D(),q(t.leafText(e))}}function _fe(e,t){if(e&1&&(F(0,`details`,17)(1,`summary`)(2,`span`,18),K(3),I(),F(4,`span`,19),K(5),I()(),dg(6,5),I()),e&2){let e=W().$implicit,t=W(2).depth,n=O_(0);W();let r=Ag(10);P(`open`,t===0&&n.length<=8),D(3),q(e.key),D(2),q(e.summary),D(),P(`ngTemplateOutlet`,r)(`ngTemplateOutletContext`,z_(5,Yde,e.value,t+1))}}function vfe(e,t){if(e&1&&(F(0,`span`,18),K(1),I(),F(2,`code`,14),K(3),I()),e&2){let e=W().$implicit;D(),q(e.key),D(2),q(e.summary)}}function yfe(e,t){if(e&1&&(F(0,`li`),A(1,_fe,7,8,`details`,17)(2,vfe,4,2),I()),e&2){let e=t.$implicit,n=W(2).depth,r=W();D(),j(e.nested&&ne.columns.some(e=>_5(g5(t[e.key]),n))).length,total:e.rows.length}:e.kind===`list`?{shown:e.items.filter(e=>_5(`${e.label} ${e.detail??``} ${e.badge?.label??``}`,n)).length,total:e.items.length}:{shown:0,total:0}}var Cfe=8,wfe=200;function Tfe(e){return!e||typeof e!=`object`?[]:(Array.isArray(e)?e.map((e,t)=>[String(t),e]):Object.entries(e)).slice(0,wfe).map(([e,t])=>{let n=!!t&&typeof t==`object`;return{key:e,value:t,nested:n,summary:Array.isArray(t)?`Array(${t.length})`:n?`{${Object.keys(t).length}}`:t===null?`null`:typeof t==`string`?JSON.stringify(t):String(t)}})}var Efe=class e{section=$.required();filter=$(``);index=$(0);maxDepth=Cfe;cellText=g5;entriesOf=Tfe;headingId=X(()=>`plugin-section-${this.index()}`);text=X(()=>this.filter().trim().toLowerCase());rows=X(()=>{let e=this.section();if(e.kind!==`table`)return[];let t=this.text();return e.rows.filter(n=>e.columns.some(e=>_5(g5(n[e.key]),t)))});items=X(()=>{let e=this.section();if(e.kind!==`list`)return[];let t=this.text();return e.items.filter(e=>_5(`${e.label} ${e.detail??``} ${e.badge?.label??``}`,t))});toneOf(e){return e&&typeof e==`object`&&e.tone?e.tone:null}leafText(e){return e==null?String(e):Array.isArray(e)?`[]`:typeof e==`object`?`{}`:typeof e==`string`?JSON.stringify(e):String(e)}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-plugin-section`]],inputs:{section:[1,`section`],filter:[1,`filter`],index:[1,`index`]},decls:11,vars:5,consts:[[`tree`,``],[1,`section`],[1,`title`,3,`id`],[1,`stats`],[1,`text`],[3,`ngTemplateOutlet`,`ngTemplateOutletContext`],[1,`stat`],[1,`empty`],[`tabindex`,`0`,`role`,`region`,1,`table-wrap`],[`scope`,`col`],[1,`chip`],[1,`list`],[1,`label`],[1,`detail`],[1,`leaf`],[1,`tree`,3,`root`],[1,`tree`],[3,`open`],[1,`key`],[1,`summary`]],template:function(e,t){if(e&1&&(E_(0),F(1,`section`,1)(2,`h3`,2),K(3),I(),A(4,Zde,3,0,`dl`,3)(5,Qde,2,1,`p`,4)(6,sfe,3,1)(7,mfe,3,1)(8,hfe,1,4,`ng-container`,5),I(),Dh(9,xfe,3,2,`ng-template`,null,0,q_)),e&2){let e,n=D_(t.section());D(),k(`aria-labelledby`,t.headingId()),D(),P(`id`,t.headingId()),D(),q(n.title),D(),j((e=n.kind)===`stats`?4:e===`text`?5:e===`table`?6:e===`list`?7:e===`tree`?8:-1)}},dependencies:[Uv],styles:[`[_nghost-%COMP%] { display: block; } @@ -24847,7 +24870,7 @@ summary[_ngcontent-%COMP%]:focus-visible { color: var(--%NS%text); font-family: var(--%NS%font-mono); font-size: 12px; -}`]})},Tfe=()=>[],Efe=(e,t)=>t.name,Dfe=(e,t)=>t.id;function Ofe(e,t){e&1&&(F(0,`p`,1),K(1,`Loading plugins…`),I())}function kfe(e,t){if(e&1){let e=B();F(0,`div`,2)(1,`p`),K(2,`Can't read the plugins from the devtools server.`),I(),F(3,`button`,3),H(`click`,function(){return S(e),C(W().retry())}),K(4,`Retry`),I()()}}function Afe(e,t){e&1&&(F(0,`div`,1)(1,`p`),K(2,`No plugin reports yet.`),I(),F(3,`p`,4),K(4,` A library adds a tab here with `),F(5,`code`),K(6,`registerPangularPlugin()`),I(),K(7,` from `),F(8,`code`),K(9,`@pangular-inspector/devtools/plugin`),I(),K(10,`. Its view shows up once the app runs with the overlay loaded. `),I()())}function jfe(e,t){if(e&1){let e=B();F(0,`button`,15),H(`click`,function(){let t=S(e).$implicit;return C(W(2).pluginId.set(t))}),K(1),I()}if(e&2){let e=t.$implicit,n=W(2);k(`aria-pressed`,n.pluginId()===e),D(),J(` `,n.titleOf(e),` `)}}function Mfe(e,t){if(e&1){let e=B();F(0,`app-select`,16),H(`valueChange`,function(t){return S(e),C(W(2).pageId.set(t||null))}),I()}if(e&2){let e=W(2);P(`options`,e.pageOptions())(`value`,e.pageId()??``)}}function Nfe(e,t){if(e&1&&(F(0,`span`,19),K(1),I()),e&2){let e=W();D(),q(e.version)}}function Pfe(e,t){if(e&1&&(F(0,`span`,20),K(1),I()),e&2){let e=t.$implicit;k(`data-tone`,e.tone??`plain`),D(),q(e.label)}}function Ffe(e,t){e&1&&(F(0,`p`,21),K(1),I()),e&2&&(D(),q(t))}function Ife(e,t){if(e&1&&(F(0,`p`,4),K(1),I()),e&2){let e=W();D(),q(e.description)}}function Lfe(e,t){if(e&1&&(F(0,`p`,22),K(1),I()),e&2){let e=W();D(),q(e.error)}}function Rfe(e,t){if(e&1&&(F(0,`p`,4),K(1,` Actions of this plugin are turned off in the devtools config (`),F(2,`code`),K(3,`actions.plugins`),I(),K(4,` or `),F(5,`code`),K(6),I(),K(7,`). `),I()),e&2){let e=W(2);D(6),J(`plugins.`,e.id,`.actions`)}}function zfe(e,t){if(e&1){let e=B();F(0,`p`,27),K(1),I(),F(2,`button`,28),H(`click`,function(){let t=S(e);return C(W(4).run(t.name))}),K(3),I(),F(4,`button`,3),H(`click`,function(){return S(e),C(W(4).confirming.set(null))}),K(5,`Cancel`),I()}if(e&2){let e=t;D(),q(e.confirm),D(2),J(` `,e.label,` `)}}function Bfe(e,t){if(e&1){let e=B();F(0,`button`,3),H(`click`,function(){let t=S(e).$implicit;return C(W(5).ask(t))}),K(1),I()}if(e&2){let e=t.$implicit;k(`aria-disabled`,W(5).running()||null),D(),J(` `,e.label,` `)}}function Vfe(e,t){e&1&&M(0,Bfe,2,2,`button`,29,Efe),e&2&&N(W(4).actions())}function Hfe(e,t){if(e&1&&(F(0,`div`,23),A(1,Rfe,8,1,`p`,4)(2,zfe,6,2)(3,Vfe,2,0),I()),e&2){let e,t=W(3);D(),j(t.actionsAllowed()?(e=t.confirming())?2:3:1,e)}}function Ufe(e,t){e&1&&(F(0,`p`,25),K(1,` The plugin has not reported a view yet. It reports while this panel is open. `),I())}function Wfe(e,t){e&1&&(F(0,`p`,25),K(1,`The plugin reported no sections.`),I())}function Gfe(e,t){if(e&1){let e=B();F(0,`div`,25)(1,`p`),K(2),I(),F(3,`button`,3),H(`click`,function(){S(e),W(2);let t=Ag(7);return W().filter.set(``),C(t.focus())}),K(4,` Clear filters `),I()()}if(e&2){let e=W(3);D(2),J(`No row or item matches “`,e.filter().trim(),`”.`)}}function Kfe(e,t){if(e&1&&L(0,`app-plugin-section`,30),e&2){let e=t.$implicit,n=t.$index,r=W(4);P(`section`,e)(`filter`,r.filter())(`index`,n)}}function qfe(e,t){if(e&1&&(F(0,`div`,26),M(1,Kfe,1,3,`app-plugin-section`,30,Yh),I()),e&2){let e=W();D(),N(e.view.sections)}}function Jfe(e,t){if(e&1&&(F(0,`section`,12)(1,`div`,17)(2,`h2`,18),K(3),I(),A(4,Nfe,2,1,`span`,19),F(5,`span`,20),K(6),I(),M(7,Pfe,2,2,`span`,20,Yh),I(),A(9,Ffe,2,1,`p`,21),A(10,Ife,2,1,`p`,4),A(11,Lfe,2,1,`p`,22),A(12,Hfe,4,1,`div`,23),F(13,`p`,24),K(14),I(),A(15,Ufe,2,0,`p`,25)(16,Wfe,2,0,`p`,25)(17,Gfe,5,1,`div`,25)(18,qfe,3,0,`div`,26),I()),e&2){let e,n=t,r=W(2);D(3),q(n.title),D(),j(n.version?4:-1),D(),k(`data-tone`,r.statusTone[n.status]),D(),q(r.statusLabel[n.status]),D(),N(n.view?.badges??L_(10,Tfe)),D(2),j((e=n.view?.summary)?9:-1,e),D(),j(n.description?10:-1),D(),j(n.error?11:-1),D(),j(r.actions().length?12:-1),D(2),q(r.result()),D(),j(n.view?n.view.sections.length?r.filter().trim()&&!r.filterMatches()?17:18:16:15)}}function Yfe(e,t){if(e&1&&(F(0,`p`,13),K(1),I()),e&2){let e=W(2);D(),J(` No page reports the `,e.titleOf(e.pluginId()??``),` plugin. Open the app with the plugin registered and the overlay loaded. `)}}function Xfe(e,t){e&1&&(F(0,`span`,4),K(1,`Hidden from agents by the config`),I())}function Zfe(e,t){if(e&1&&(F(0,`li`)(1,`code`),K(2),I(),F(3,`span`,20),K(4),I(),A(5,Xfe,2,0,`span`,4),F(6,`p`,4),K(7),I()()),e&2){let e=t.$implicit;D(2),q(e.id),D(),k(`data-tone`,e.safety===`read`?`plain`:`warn`),D(),q(e.safety),D(),j(e.registered?-1:5),D(2),q(e.description)}}function Qfe(e,t){e&1&&(F(0,`li`,4),K(1,`This plugin has no agent tools.`),I())}function $fe(e,t){e&1&&(F(0,`section`,14)(1,`h2`,31),K(2,`Agent tools`),I(),F(3,`ul`),M(4,Zfe,8,5,`li`,null,Dfe,!1,Qfe,2,0,`li`,4),I()()),e&2&&(D(4),N(t.tools))}function epe(e,t){if(e&1){let e=B();F(0,`p`,5),K(1,` Views that libraries report from the live page through the plugin API. The values come from each plugin's code on the page and are masked like other live data. `),I(),F(2,`div`,6)(3,`div`,7),M(4,jfe,2,2,`button`,8,Xh),I(),F(6,`app-search-field`,9,0),w_(`valueChange`,function(t){S(e);let n=W();return C_(n.filter,t)||(n.filter=t),C(t)}),I(),A(8,Mfe,1,2,`app-select`,10),F(9,`span`,11),K(10),I()(),A(11,Jfe,19,11,`section`,12)(12,Yfe,2,1,`p`,13),A(13,$fe,7,1,`section`,14)}if(e&2){let e,t,n=W();D(4),N(n.pluginIds()),D(2),S_(`value`,n.filter),D(2),j(n.pageOptions().length>1?8:-1),D(2),q(n.countText()),D(),j((e=n.entry())?11:12,e),D(2),j((t=n.server())?13:-1,t)}}function v5(e){let t=e??{};return{pages:(t.pages&&typeof t.pages==`object`?Object.values(t.pages).filter(e=>e&&typeof e.pageId==`string`&&Array.isArray(e.plugins)):[]).sort((e,t)=>t.reportedAt-e.reportedAt),server:Array.isArray(t.server)?t.server:[]}}function tpe(e){let t=v5(e);return t.server.length>0||t.pages.some(e=>e.plugins.length>0)}var npe={running:`Running`,error:`Failed`,unsupported:`Needs a newer Pangular`},rpe={running:`ok`,error:`danger`,unsupported:`warn`},ipe=class e{rpc=$(null);destroyRef=x(ys);hostPageId=fT();unsubscribe;statusLabel=npe;statusTone=rpe;state=T({pages:[],server:[]});loaded=T(!1);failed=T(!1);filter=T(``);running=T(!1);pluginIds=X(()=>{let e=new Set;for(let t of this.state().pages)for(let n of t.plugins)e.add(n.id);for(let t of this.state().server)e.add(t.id);return[...e].sort((e,t)=>this.titleOf(e).localeCompare(this.titleOf(t)))});pluginId=Q({source:()=>this.pluginIds(),computation:(e,t)=>t?.value&&e.includes(t.value)?t.value:e[0]??null});pages=X(()=>this.state().pages.filter(e=>e.plugins.some(e=>e.id===this.pluginId())));pageId=Q({source:()=>this.pages(),computation:(e,t)=>t?.value&&e.some(e=>e.pageId===t.value)?t.value:e.find(e=>e.pageId===this.hostPageId)?.pageId??e[0]?.pageId??null});target=X(()=>`${this.pluginId()}\n${this.pageId()}`);result=Q({source:this.target,computation:()=>``});confirming=Q({source:this.target,computation:()=>null});pageOptions=X(()=>this.pages().map(e=>({value:e.pageId,label:e.title||e.url||e.pageId,hint:e.url})));entry=X(()=>this.pages().find(e=>e.pageId===this.pageId())?.plugins.find(e=>e.id===this.pluginId())??null);server=X(()=>this.state().server.find(e=>e.id===this.pluginId())??null);actions=X(()=>{let e=this.entry();return(e?.view?.actions??[]).filter(t=>e.actions.includes(t.name))});actionsAllowed=X(()=>{let e=this.pluginId();return!!e&&iw(e,IT(this.rpc())).actions});counts=X(()=>(this.entry()?.view?.sections??[]).reduce((e,t)=>{let{shown:n,total:r}=bfe(t,this.filter());return{shown:e.shown+n,total:e.total+r}},{shown:0,total:0}));filterMatches=X(()=>this.counts().shown>0);countText=X(()=>{let{shown:e,total:t}=this.counts();return t?`${e} of ${t} rows and items`:``});constructor(){E(()=>{let e=this.rpc();e&&this.load(e)}),this.destroyRef.onDestroy(()=>this.unsubscribe?.())}titleOf(e){for(let t of this.state().pages){let n=t.plugins.find(t=>t.id===e);if(n)return n.title||e}return this.state().server.find(t=>t.id===e)?.title||e}retry(){let e=this.rpc();e&&this.load(e)}ask(e){if(!this.running()){if(e.confirm){this.confirming.set({name:e.name,label:e.label,confirm:e.confirm});return}this.run(e.name)}}async run(e){let t=this.rpc(),n=this.pluginId(),r=this.pageId();if(this.confirming.set(null),t&&n&&r&&!this.running()&&this.actions().some(t=>t.name===e)){this.running.set(!0),this.result.set(``);try{let i=await t.scope(`pangular`).rpc.call(`request-plugin-action`,{pageId:r,pluginId:n,action:e});this.result.set(i?.ok?`Done.`:i?.error??`The action failed.`)}catch{this.result.set(`The devtools server did not answer. Check that it's still running.`)}finally{this.running.set(!1)}}}async load(e){this.failed.set(!1);try{let t=await e.scope(`pangular`).rpc.sharedState(`plugins`);if(this.destroyRef.destroyed)return;let n=e=>this.state.set(v5(e));n(t.value()),this.unsubscribe?.(),this.unsubscribe=t.on(`updated`,n)}catch{this.failed.set(!0)}finally{this.loaded.set(!0)}}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-plugins-inspector`]],inputs:{rpc:[1,`rpc`]},decls:4,vars:1,consts:[[`search`,``],[`role`,`status`,1,`state`],[`role`,`alert`,1,`state`],[`type`,`button`,1,`small`,3,`click`],[1,`muted`],[1,`intro`],[1,`toolbar`],[`role`,`group`,`aria-label`,`Plugin`,1,`plugins`],[`type`,`button`,1,`view`],[`placeholder`,`Filter rows and items`,`saveKey`,`plugins`,1,`search`,3,`valueChange`,`value`],[`ariaLabel`,`Page`,1,`page-select`,3,`options`,`value`],[`role`,`status`,1,`count`],[`aria-labelledby`,`plugin-title`,1,`plugin`],[1,`notice`],[`aria-labelledby`,`plugin-tools-title`,1,`tools`],[`type`,`button`,1,`view`,3,`click`],[`ariaLabel`,`Page`,1,`page-select`,3,`valueChange`,`options`,`value`],[1,`head`],[`id`,`plugin-title`],[1,`chip`,`plain`],[1,`chip`],[1,`summary`],[`role`,`alert`,1,`notice`],[`role`,`group`,`aria-label`,`Plugin actions`,1,`actions`],[`role`,`status`,1,`result`],[1,`empty`],[1,`sections`],[1,`confirm`],[`type`,`button`,1,`small`,`primary`,3,`click`],[`type`,`button`,1,`small`],[3,`section`,`filter`,`index`],[`id`,`plugin-tools-title`,1,`label`]],template:function(e,t){e&1&&A(0,Ofe,2,0,`p`,1)(1,kfe,5,0,`div`,2)(2,Afe,11,0,`div`,1)(3,epe,14,5),e&2&&j(t.loaded()?t.failed()?1:t.pluginIds().length?3:2:0)},dependencies:[cP,ND,wfe],styles:[`[_nghost-%COMP%] { +}`]})},Dfe=()=>[],Ofe=(e,t)=>t.name,kfe=(e,t)=>t.id;function Afe(e,t){e&1&&(F(0,`p`,1),K(1,`Loading plugins…`),I())}function jfe(e,t){if(e&1){let e=B();F(0,`div`,2)(1,`p`),K(2,`Can't read the plugins from the devtools server.`),I(),F(3,`button`,3),H(`click`,function(){return S(e),C(W().retry())}),K(4,`Retry`),I()()}}function Mfe(e,t){e&1&&(F(0,`div`,1)(1,`p`),K(2,`No plugin reports yet.`),I(),F(3,`p`,4),K(4,` A library adds a tab here with `),F(5,`code`),K(6,`registerPangularPlugin()`),I(),K(7,` from `),F(8,`code`),K(9,`@pangular-inspector/devtools/plugin`),I(),K(10,`. Its view shows up once the app runs with the overlay loaded. `),I()())}function Nfe(e,t){if(e&1){let e=B();F(0,`button`,15),H(`click`,function(){let t=S(e).$implicit;return C(W(2).pluginId.set(t))}),K(1),I()}if(e&2){let e=t.$implicit,n=W(2);k(`aria-pressed`,n.pluginId()===e),D(),J(` `,n.titleOf(e),` `)}}function Pfe(e,t){if(e&1){let e=B();F(0,`app-select`,16),H(`valueChange`,function(t){return S(e),C(W(2).pageId.set(t||null))}),I()}if(e&2){let e=W(2);P(`options`,e.pageOptions())(`value`,e.pageId()??``)}}function Ffe(e,t){if(e&1&&(F(0,`span`,19),K(1),I()),e&2){let e=W();D(),q(e.version)}}function Ife(e,t){if(e&1&&(F(0,`span`,20),K(1),I()),e&2){let e=t.$implicit;k(`data-tone`,e.tone??`plain`),D(),q(e.label)}}function Lfe(e,t){e&1&&(F(0,`p`,21),K(1),I()),e&2&&(D(),q(t))}function Rfe(e,t){if(e&1&&(F(0,`p`,4),K(1),I()),e&2){let e=W();D(),q(e.description)}}function zfe(e,t){if(e&1&&(F(0,`p`,22),K(1),I()),e&2){let e=W();D(),q(e.error)}}function Bfe(e,t){if(e&1&&(F(0,`p`,4),K(1,` Actions of this plugin are turned off in the devtools config (`),F(2,`code`),K(3,`actions.plugins`),I(),K(4,` or `),F(5,`code`),K(6),I(),K(7,`). `),I()),e&2){let e=W(2);D(6),J(`plugins.`,e.id,`.actions`)}}function Vfe(e,t){if(e&1){let e=B();F(0,`p`,27),K(1),I(),F(2,`button`,28),H(`click`,function(){let t=S(e);return C(W(4).run(t.name))}),K(3),I(),F(4,`button`,3),H(`click`,function(){return S(e),C(W(4).confirming.set(null))}),K(5,`Cancel`),I()}if(e&2){let e=t;D(),q(e.confirm),D(2),J(` `,e.label,` `)}}function Hfe(e,t){if(e&1){let e=B();F(0,`button`,3),H(`click`,function(){let t=S(e).$implicit;return C(W(5).ask(t))}),K(1),I()}if(e&2){let e=t.$implicit;k(`aria-disabled`,W(5).running()||null),D(),J(` `,e.label,` `)}}function Ufe(e,t){e&1&&M(0,Hfe,2,2,`button`,29,Ofe),e&2&&N(W(4).actions())}function Wfe(e,t){if(e&1&&(F(0,`div`,23),A(1,Bfe,8,1,`p`,4)(2,Vfe,6,2)(3,Ufe,2,0),I()),e&2){let e,t=W(3);D(),j(t.actionsAllowed()?(e=t.confirming())?2:3:1,e)}}function Gfe(e,t){e&1&&(F(0,`p`,25),K(1,` The plugin has not reported a view yet. It reports while this panel is open. `),I())}function Kfe(e,t){e&1&&(F(0,`p`,25),K(1,`The plugin reported no sections.`),I())}function qfe(e,t){if(e&1){let e=B();F(0,`div`,25)(1,`p`),K(2),I(),F(3,`button`,3),H(`click`,function(){S(e),W(2);let t=Ag(7);return W().filter.set(``),C(t.focus())}),K(4,` Clear filters `),I()()}if(e&2){let e=W(3);D(2),J(`No row or item matches “`,e.filter().trim(),`”.`)}}function Jfe(e,t){if(e&1&&L(0,`app-plugin-section`,30),e&2){let e=t.$implicit,n=t.$index,r=W(4);P(`section`,e)(`filter`,r.filter())(`index`,n)}}function Yfe(e,t){if(e&1&&(F(0,`div`,26),M(1,Jfe,1,3,`app-plugin-section`,30,Yh),I()),e&2){let e=W();D(),N(e.view.sections)}}function Xfe(e,t){if(e&1&&(F(0,`section`,12)(1,`div`,17)(2,`h2`,18),K(3),I(),A(4,Ffe,2,1,`span`,19),F(5,`span`,20),K(6),I(),M(7,Ife,2,2,`span`,20,Yh),I(),A(9,Lfe,2,1,`p`,21),A(10,Rfe,2,1,`p`,4),A(11,zfe,2,1,`p`,22),A(12,Wfe,4,1,`div`,23),F(13,`p`,24),K(14),I(),A(15,Gfe,2,0,`p`,25)(16,Kfe,2,0,`p`,25)(17,qfe,5,1,`div`,25)(18,Yfe,3,0,`div`,26),I()),e&2){let e,n=t,r=W(2);D(3),q(n.title),D(),j(n.version?4:-1),D(),k(`data-tone`,r.statusTone[n.status]),D(),q(r.statusLabel[n.status]),D(),N(n.view?.badges??L_(10,Dfe)),D(2),j((e=n.view?.summary)?9:-1,e),D(),j(n.description?10:-1),D(),j(n.error?11:-1),D(),j(r.actions().length?12:-1),D(2),q(r.result()),D(),j(n.view?n.view.sections.length?r.filter().trim()&&!r.filterMatches()?17:18:16:15)}}function Zfe(e,t){if(e&1&&(F(0,`p`,13),K(1),I()),e&2){let e=W(2);D(),J(` No page reports the `,e.titleOf(e.pluginId()??``),` plugin. Open the app with the plugin registered and the overlay loaded. `)}}function Qfe(e,t){e&1&&(F(0,`span`,4),K(1,`Hidden from agents by the config`),I())}function $fe(e,t){if(e&1&&(F(0,`li`)(1,`code`),K(2),I(),F(3,`span`,20),K(4),I(),A(5,Qfe,2,0,`span`,4),F(6,`p`,4),K(7),I()()),e&2){let e=t.$implicit;D(2),q(e.id),D(),k(`data-tone`,e.safety===`read`?`plain`:`warn`),D(),q(e.safety),D(),j(e.registered?-1:5),D(2),q(e.description)}}function epe(e,t){e&1&&(F(0,`li`,4),K(1,`This plugin has no agent tools.`),I())}function tpe(e,t){e&1&&(F(0,`section`,14)(1,`h2`,31),K(2,`Agent tools`),I(),F(3,`ul`),M(4,$fe,8,5,`li`,null,kfe,!1,epe,2,0,`li`,4),I()()),e&2&&(D(4),N(t.tools))}function npe(e,t){if(e&1){let e=B();F(0,`p`,5),K(1,` Views that libraries report from the live page through the plugin API. The values come from each plugin's code on the page and are masked like other live data. `),I(),F(2,`div`,6)(3,`div`,7),M(4,Nfe,2,2,`button`,8,Xh),I(),F(6,`app-search-field`,9,0),w_(`valueChange`,function(t){S(e);let n=W();return C_(n.filter,t)||(n.filter=t),C(t)}),I(),A(8,Pfe,1,2,`app-select`,10),F(9,`span`,11),K(10),I()(),A(11,Xfe,19,11,`section`,12)(12,Zfe,2,1,`p`,13),A(13,tpe,7,1,`section`,14)}if(e&2){let e,t,n=W();D(4),N(n.pluginIds()),D(2),S_(`value`,n.filter),D(2),j(n.pageOptions().length>1?8:-1),D(2),q(n.countText()),D(),j((e=n.entry())?11:12,e),D(2),j((t=n.server())?13:-1,t)}}function v5(e){let t=e??{};return{pages:(t.pages&&typeof t.pages==`object`?Object.values(t.pages).filter(e=>e&&typeof e.pageId==`string`&&Array.isArray(e.plugins)):[]).sort((e,t)=>t.reportedAt-e.reportedAt),server:Array.isArray(t.server)?t.server:[]}}function rpe(e){let t=v5(e);return t.server.length>0||t.pages.some(e=>e.plugins.length>0)}var ipe={running:`Running`,error:`Failed`,unsupported:`Needs a newer Pangular`},ape={running:`ok`,error:`danger`,unsupported:`warn`},ope=class e{rpc=$(null);destroyRef=x(ys);hostPageId=fT();unsubscribe;statusLabel=ipe;statusTone=ape;state=T({pages:[],server:[]});loaded=T(!1);failed=T(!1);filter=T(``);running=T(!1);pluginIds=X(()=>{let e=new Set;for(let t of this.state().pages)for(let n of t.plugins)e.add(n.id);for(let t of this.state().server)e.add(t.id);return[...e].sort((e,t)=>this.titleOf(e).localeCompare(this.titleOf(t)))});pluginId=Q({source:()=>this.pluginIds(),computation:(e,t)=>t?.value&&e.includes(t.value)?t.value:e[0]??null});pages=X(()=>this.state().pages.filter(e=>e.plugins.some(e=>e.id===this.pluginId())));pageId=Q({source:()=>this.pages(),computation:(e,t)=>t?.value&&e.some(e=>e.pageId===t.value)?t.value:e.find(e=>e.pageId===this.hostPageId)?.pageId??e[0]?.pageId??null});target=X(()=>`${this.pluginId()}\n${this.pageId()}`);result=Q({source:this.target,computation:()=>``});confirming=Q({source:this.target,computation:()=>null});pageOptions=X(()=>this.pages().map(e=>({value:e.pageId,label:e.title||e.url||e.pageId,hint:e.url})));entry=X(()=>this.pages().find(e=>e.pageId===this.pageId())?.plugins.find(e=>e.id===this.pluginId())??null);server=X(()=>this.state().server.find(e=>e.id===this.pluginId())??null);actions=X(()=>{let e=this.entry();return(e?.view?.actions??[]).filter(t=>e.actions.includes(t.name))});actionsAllowed=X(()=>{let e=this.pluginId();return!!e&&iw(e,IT(this.rpc())).actions});counts=X(()=>(this.entry()?.view?.sections??[]).reduce((e,t)=>{let{shown:n,total:r}=Sfe(t,this.filter());return{shown:e.shown+n,total:e.total+r}},{shown:0,total:0}));filterMatches=X(()=>this.counts().shown>0);countText=X(()=>{let{shown:e,total:t}=this.counts();return t?`${e} of ${t} rows and items`:``});constructor(){E(()=>{let e=this.rpc();e&&this.load(e)}),this.destroyRef.onDestroy(()=>this.unsubscribe?.())}titleOf(e){for(let t of this.state().pages){let n=t.plugins.find(t=>t.id===e);if(n)return n.title||e}return this.state().server.find(t=>t.id===e)?.title||e}retry(){let e=this.rpc();e&&this.load(e)}ask(e){if(!this.running()){if(e.confirm){this.confirming.set({name:e.name,label:e.label,confirm:e.confirm});return}this.run(e.name)}}async run(e){let t=this.rpc(),n=this.pluginId(),r=this.pageId();if(this.confirming.set(null),t&&n&&r&&!this.running()&&this.actions().some(t=>t.name===e)){this.running.set(!0),this.result.set(``);try{let i=await t.scope(`pangular`).rpc.call(`request-plugin-action`,{pageId:r,pluginId:n,action:e});this.result.set(i?.ok?`Done.`:i?.error??`The action failed.`)}catch{this.result.set(`The devtools server did not answer. Check that it's still running.`)}finally{this.running.set(!1)}}}async load(e){this.failed.set(!1);try{let t=await e.scope(`pangular`).rpc.sharedState(`plugins`);if(this.destroyRef.destroyed)return;let n=e=>this.state.set(v5(e));n(t.value()),this.unsubscribe?.(),this.unsubscribe=t.on(`updated`,n)}catch{this.failed.set(!0)}finally{this.loaded.set(!0)}}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-plugins-inspector`]],inputs:{rpc:[1,`rpc`]},decls:4,vars:1,consts:[[`search`,``],[`role`,`status`,1,`state`],[`role`,`alert`,1,`state`],[`type`,`button`,1,`small`,3,`click`],[1,`muted`],[1,`intro`],[1,`toolbar`],[`role`,`group`,`aria-label`,`Plugin`,1,`plugins`],[`type`,`button`,1,`view`],[`placeholder`,`Filter rows and items`,`saveKey`,`plugins`,1,`search`,3,`valueChange`,`value`],[`ariaLabel`,`Page`,1,`page-select`,3,`options`,`value`],[`role`,`status`,1,`count`],[`aria-labelledby`,`plugin-title`,1,`plugin`],[1,`notice`],[`aria-labelledby`,`plugin-tools-title`,1,`tools`],[`type`,`button`,1,`view`,3,`click`],[`ariaLabel`,`Page`,1,`page-select`,3,`valueChange`,`options`,`value`],[1,`head`],[`id`,`plugin-title`],[1,`chip`,`plain`],[1,`chip`],[1,`summary`],[`role`,`alert`,1,`notice`],[`role`,`group`,`aria-label`,`Plugin actions`,1,`actions`],[`role`,`status`,1,`result`],[1,`empty`],[1,`sections`],[1,`confirm`],[`type`,`button`,1,`small`,`primary`,3,`click`],[`type`,`button`,1,`small`],[3,`section`,`filter`,`index`],[`id`,`plugin-tools-title`,1,`label`]],template:function(e,t){e&1&&A(0,Afe,2,0,`p`,1)(1,jfe,5,0,`div`,2)(2,Mfe,11,0,`div`,1)(3,npe,14,5),e&2&&j(t.loaded()?t.failed()?1:t.pluginIds().length?3:2:0)},dependencies:[cP,ND,Efe],styles:[`[_nghost-%COMP%] { display: block; font-size: 13px; } @@ -25150,7 +25173,7 @@ h2[_ngcontent-%COMP%] { .tools[_ngcontent-%COMP%] li[_ngcontent-%COMP%] p[_ngcontent-%COMP%] { flex-basis: 100%; -}`]})},ape=[`accessibility`,`errors`,`hydration`,`change-detection`,`leaks`,`router`,`forms`,`http`,`pipes`],y5={accessibility:`Accessibility`,"change-detection":`Change detection`,leaks:`Leaks`,errors:`Errors`,router:`Router`,forms:`Forms`,hydration:`Hydration`,http:`HTTP`,pipes:`Pipes`},b5=[{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`}];function ope(e){let t=Object.entries(e.args??{}).filter(([e])=>e!==`page`).map(([e,t])=>`${e}: ${JSON.stringify(t)}`).join(`, `);return`${e.tool.replace(/^pangular:/,``)}${t?` { ${t} }`:``}`}function spe(e){let t=e??{};return{pages:Array.isArray(t.pages)?t.pages.filter(e=>typeof e?.pageId==`string`):[],report:t.report&&Array.isArray(t.report.findings)&&Array.isArray(t.report.sources)?t.report:null,session:t.session??{before:null,after:null,diff:null},axe:t.axe??null}}var cpe=(e,t)=>t.label,x5=(e,t)=>t.key;function lpe(e,t){if(e&1&&(R(0,`p`,0),K(1),z()),e&2){let e=t.$implicit;D(),q(e)}}function upe(e,t){if(e&1&&(R(0,`tr`)(1,`th`,12),K(2),z(),R(3,`td`),K(4),z(),R(5,`td`),K(6),z(),R(7,`td`)(8,`span`,13),K(9),z()()()),e&2){let e=t.$implicit;D(2),q(e.label),D(2),q(e.before),D(2),q(e.after),D(2),k(`data-tone`,e.tone),D(),q(e.change)}}function dpe(e,t){if(e&1&&(R(0,`li`)(1,`span`,14),K(2),z(),K(3),z()),e&2){let e=t.$implicit,n=W(2);D(2),q(n.areaLabel[e.area]),D(),J(` `,n.label(e),` `)}}function fpe(e,t){if(e&1&&(R(0,`ul`),M(1,dpe,4,2,`li`,null,x5),z()),e&2){let e=W();D(),N(e.diff().resolved)}}function ppe(e,t){e&1&&(R(0,`p`,7),K(1,`None.`),z())}function mpe(e,t){if(e&1&&(R(0,`li`)(1,`span`,14),K(2),z(),K(3),z()),e&2){let e=t.$implicit,n=W(2);D(2),q(n.areaLabel[e.area]),D(),J(` `,n.label(e),` `)}}function hpe(e,t){if(e&1&&(R(0,`ul`),M(1,mpe,4,2,`li`,null,x5),z()),e&2){let e=W();D(),N(e.diff().added)}}function gpe(e,t){e&1&&(R(0,`p`,7),K(1,`None.`),z())}function _pe(e,t){if(e&1&&(R(0,`li`)(1,`span`,14),K(2),z(),K(3),z()),e&2){let e=t.$implicit,n=W(2);D(2),q(n.areaLabel[e.area]),D(),y_(` `,n.label(e),`: `,e.countBefore,`× → `,e.count??1,`× `)}}function vpe(e,t){if(e&1&&(R(0,`ul`),M(1,_pe,4,4,`li`,null,x5),z()),e&2){let e=W();D(),N(e.changed())}}function ype(e,t){if(e&1&&(R(0,`p`,7),K(1),z()),e&2){let e=W();D(),J(``,e.diff().remaining.length,` still there with the same count.`)}}var bpe=class e{diff=$.required();areaLabel=y5;changed=X(()=>this.diff().remaining.filter(e=>e.countBefore!==void 0&&e.countBefore!==e.count));rows=X(()=>{let e=new Map(this.diff().metrics.map(e=>[e.metric,e]));return b5.filter(t=>e.has(t.key)).map(t=>{let n=e.get(t.key),r=t.unit?` ${t.unit}`:``,i=e=>e===void 0?`Not measured`:`${e}${r}`,a=n.delta;return{label:t.unit===`%`?`${t.label} (%)`:t.label,before:i(n.before),after:i(n.after),change:a===void 0?`Not compared`:a===0?`Same`:`${a>0?`+`:`−`}${Math.abs(a)}${r}, ${a<0?`better`:`worse`}`,tone:a===void 0||a===0?`plain`:a<0?`ok`:`danger`}})});label(e){return`${e.rule}${e.subject?` in ${e.subject}`:``}`}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-audit-diff`]],inputs:{diff:[1,`diff`]},decls:35,vars:6,consts:[[1,`notice`],[`tabindex`,`0`,`role`,`region`,`aria-label`,`Numbers before and after`,1,`table-wrap`],[1,`sr-only`],[`scope`,`col`],[1,`lists`],[`aria-labelledby`,`audit-resolved`],[`id`,`audit-resolved`],[1,`muted`],[`aria-labelledby`,`audit-added`],[`id`,`audit-added`],[`aria-labelledby`,`audit-changed`],[`id`,`audit-changed`],[`scope`,`row`],[1,`chip`],[1,`area`]],template:function(e,t){e&1&&(M(0,lpe,2,1,`p`,0,Xh),R(2,`div`,1)(3,`table`)(4,`caption`,2),K(5,` Numbers before and after. Lower is better for each. `),z(),R(6,`thead`)(7,`tr`)(8,`th`,3),K(9,`Number`),z(),R(10,`th`,3),K(11,`Before`),z(),R(12,`th`,3),K(13,`After`),z(),R(14,`th`,3),K(15,`Change`),z()()(),R(16,`tbody`),M(17,upe,10,5,`tr`,null,cpe),z()()(),R(19,`div`,4)(20,`section`,5)(21,`h3`,6),K(22),z(),A(23,fpe,3,0,`ul`)(24,ppe,2,0,`p`,7),z(),R(25,`section`,8)(26,`h3`,9),K(27),z(),A(28,hpe,3,0,`ul`)(29,gpe,2,0,`p`,7),z(),R(30,`section`,10)(31,`h3`,11),K(32),z(),A(33,vpe,3,0,`ul`)(34,ype,2,1,`p`,7),z()()),e&2&&(N(t.diff().notes),D(17),N(t.rows()),D(5),J(`Resolved (`,t.diff().resolved.length,`)`),D(),j(t.diff().resolved.length?23:24),D(4),J(`New (`,t.diff().added.length,`)`),D(),j(t.diff().added.length?28:29),D(4),J(`Changed count (`,t.changed().length,`)`),D(),j(t.changed().length?33:34))},styles:[`[_nghost-%COMP%] { +}`]})},spe=[`accessibility`,`errors`,`hydration`,`change-detection`,`leaks`,`router`,`forms`,`http`,`pipes`],y5={accessibility:`Accessibility`,"change-detection":`Change detection`,leaks:`Leaks`,errors:`Errors`,router:`Router`,forms:`Forms`,hydration:`Hydration`,http:`HTTP`,pipes:`Pipes`},b5=[{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`}];function cpe(e){let t=Object.entries(e.args??{}).filter(([e])=>e!==`page`).map(([e,t])=>`${e}: ${JSON.stringify(t)}`).join(`, `);return`${e.tool.replace(/^pangular:/,``)}${t?` { ${t} }`:``}`}function lpe(e){let t=e??{};return{pages:Array.isArray(t.pages)?t.pages.filter(e=>typeof e?.pageId==`string`):[],report:t.report&&Array.isArray(t.report.findings)&&Array.isArray(t.report.sources)?t.report:null,session:t.session??{before:null,after:null,diff:null},axe:t.axe??null}}var upe=(e,t)=>t.label,x5=(e,t)=>t.key;function dpe(e,t){if(e&1&&(R(0,`p`,0),K(1),z()),e&2){let e=t.$implicit;D(),q(e)}}function fpe(e,t){if(e&1&&(R(0,`tr`)(1,`th`,12),K(2),z(),R(3,`td`),K(4),z(),R(5,`td`),K(6),z(),R(7,`td`)(8,`span`,13),K(9),z()()()),e&2){let e=t.$implicit;D(2),q(e.label),D(2),q(e.before),D(2),q(e.after),D(2),k(`data-tone`,e.tone),D(),q(e.change)}}function ppe(e,t){if(e&1&&(R(0,`li`)(1,`span`,14),K(2),z(),K(3),z()),e&2){let e=t.$implicit,n=W(2);D(2),q(n.areaLabel[e.area]),D(),J(` `,n.label(e),` `)}}function mpe(e,t){if(e&1&&(R(0,`ul`),M(1,ppe,4,2,`li`,null,x5),z()),e&2){let e=W();D(),N(e.diff().resolved)}}function hpe(e,t){e&1&&(R(0,`p`,7),K(1,`None.`),z())}function gpe(e,t){if(e&1&&(R(0,`li`)(1,`span`,14),K(2),z(),K(3),z()),e&2){let e=t.$implicit,n=W(2);D(2),q(n.areaLabel[e.area]),D(),J(` `,n.label(e),` `)}}function _pe(e,t){if(e&1&&(R(0,`ul`),M(1,gpe,4,2,`li`,null,x5),z()),e&2){let e=W();D(),N(e.diff().added)}}function vpe(e,t){e&1&&(R(0,`p`,7),K(1,`None.`),z())}function ype(e,t){if(e&1&&(R(0,`li`)(1,`span`,14),K(2),z(),K(3),z()),e&2){let e=t.$implicit,n=W(2);D(2),q(n.areaLabel[e.area]),D(),y_(` `,n.label(e),`: `,e.countBefore,`× → `,e.count??1,`× `)}}function bpe(e,t){if(e&1&&(R(0,`ul`),M(1,ype,4,4,`li`,null,x5),z()),e&2){let e=W();D(),N(e.changed())}}function xpe(e,t){if(e&1&&(R(0,`p`,7),K(1),z()),e&2){let e=W();D(),J(``,e.diff().remaining.length,` still there with the same count.`)}}var Spe=class e{diff=$.required();areaLabel=y5;changed=X(()=>this.diff().remaining.filter(e=>e.countBefore!==void 0&&e.countBefore!==e.count));rows=X(()=>{let e=new Map(this.diff().metrics.map(e=>[e.metric,e]));return b5.filter(t=>e.has(t.key)).map(t=>{let n=e.get(t.key),r=t.unit?` ${t.unit}`:``,i=e=>e===void 0?`Not measured`:`${e}${r}`,a=n.delta;return{label:t.unit===`%`?`${t.label} (%)`:t.label,before:i(n.before),after:i(n.after),change:a===void 0?`Not compared`:a===0?`Same`:`${a>0?`+`:`−`}${Math.abs(a)}${r}, ${a<0?`better`:`worse`}`,tone:a===void 0||a===0?`plain`:a<0?`ok`:`danger`}})});label(e){return`${e.rule}${e.subject?` in ${e.subject}`:``}`}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-audit-diff`]],inputs:{diff:[1,`diff`]},decls:35,vars:6,consts:[[1,`notice`],[`tabindex`,`0`,`role`,`region`,`aria-label`,`Numbers before and after`,1,`table-wrap`],[1,`sr-only`],[`scope`,`col`],[1,`lists`],[`aria-labelledby`,`audit-resolved`],[`id`,`audit-resolved`],[1,`muted`],[`aria-labelledby`,`audit-added`],[`id`,`audit-added`],[`aria-labelledby`,`audit-changed`],[`id`,`audit-changed`],[`scope`,`row`],[1,`chip`],[1,`area`]],template:function(e,t){e&1&&(M(0,dpe,2,1,`p`,0,Xh),R(2,`div`,1)(3,`table`)(4,`caption`,2),K(5,` Numbers before and after. Lower is better for each. `),z(),R(6,`thead`)(7,`tr`)(8,`th`,3),K(9,`Number`),z(),R(10,`th`,3),K(11,`Before`),z(),R(12,`th`,3),K(13,`After`),z(),R(14,`th`,3),K(15,`Change`),z()()(),R(16,`tbody`),M(17,fpe,10,5,`tr`,null,upe),z()()(),R(19,`div`,4)(20,`section`,5)(21,`h3`,6),K(22),z(),A(23,mpe,3,0,`ul`)(24,hpe,2,0,`p`,7),z(),R(25,`section`,8)(26,`h3`,9),K(27),z(),A(28,_pe,3,0,`ul`)(29,vpe,2,0,`p`,7),z(),R(30,`section`,10)(31,`h3`,11),K(32),z(),A(33,bpe,3,0,`ul`)(34,xpe,2,1,`p`,7),z()()),e&2&&(N(t.diff().notes),D(17),N(t.rows()),D(5),J(`Resolved (`,t.diff().resolved.length,`)`),D(),j(t.diff().resolved.length?23:24),D(4),J(`New (`,t.diff().added.length,`)`),D(),j(t.diff().added.length?28:29),D(4),J(`Changed count (`,t.changed().length,`)`),D(),j(t.changed().length?33:34))},styles:[`[_nghost-%COMP%] { display: grid; gap: 12px; } @@ -25271,7 +25294,7 @@ ul[_ngcontent-%COMP%] { margin: 0; color: var(--%NS%text-2); font-size: 12px; -}`]})},xpe=(e,t)=>t.label,Spe=(e,t)=>t.key,Cpe=(e,t)=>t.area;function wpe(e,t){e&1&&(F(0,`div`,1)(1,`p`),K(2,`The audit reads a live page, and a static report has none.`),I(),F(3,`p`,3),K(4,`Open the panel from the server that runs the app to audit it.`),I()())}function Tpe(e,t){e&1&&(F(0,`p`,1),K(1,`Loading the audit…`),I())}function Epe(e,t){if(e&1){let e=B();F(0,`div`,2)(1,`p`),K(2,`Can't read the audit from the devtools server.`),I(),F(3,`button`,4),H(`click`,function(){return S(e),C(W().refresh())}),K(4,`Retry`),I()()}}function Dpe(e,t){e&1&&(F(0,`div`,1)(1,`p`),K(2,`No page reports live data yet.`),I(),F(3,`p`,3),K(4,` Open the app with the overlay loaded. The audit reads what the other inspectors collect from it. `),I()())}function Ope(e,t){if(e&1){let e=B();F(0,`app-select`,30),H(`valueChange`,function(t){return S(e),C(W(2).pickPage(t))}),I()}if(e&2){let e=W(2);P(`options`,e.pageOptions())(`value`,e.pageId())}}function kpe(e,t){e&1&&(F(0,`p`,15),K(1),I()),e&2&&(D(),q(t))}function Ape(e,t){if(e&1){let e=B();F(0,`button`,13),H(`click`,function(){return S(e),C(W(2).mark(`clear`))}),K(1,` Clear `),I()}e&2&&P(`disabled`,W(2).busy())}function jpe(e,t){e&1&&(F(0,`p`,15),K(1),I()),e&2&&(D(),q(t))}function Mpe(e,t){e&1&&L(0,`app-audit-diff`,21),e&2&&P(`diff`,t)}function Npe(e,t){e&1&&(F(0,`p`,24),K(1,` No finding on this page. Run axe, or record change detection, to check more. `),I())}function Ppe(e,t){if(e&1){let e=B();F(0,`div`,24)(1,`p`),K(2,`No finding matches the filters.`),I(),F(3,`button`,4),H(`click`,function(){S(e),W();let t=Ag(7);return W().clearFilters(),C(t.focus())}),K(4,` Clear filters `),I()()}}function Fpe(e,t){if(e&1&&(F(0,`code`,36),K(1),I()),e&2){let e=W().$implicit;D(),q(e.subject)}}function Ipe(e,t){if(e&1&&(F(0,`span`,37),K(1),I()),e&2){let e=W().$implicit;k(`aria-label`,e.count+` times`),D(),J(``,e.count,`×`)}}function Lpe(e,t){if(e&1){let e=B();F(0,`button`,41),H(`focus`,function(){S(e);let t=W(2).$implicit;return C(W(3).highlight(t))})(`blur`,function(){return S(e),C(W(5).highlight(null))})(`click`,function(){S(e);let t=W(2).$implicit,n=W(3);return C(n.showComponent.emit({id:t.elementId,pageId:n.pageId()}))}),K(1,` Show component `),I()}}function Rpe(e,t){if(e&1){let e=B();F(0,`button`,41),H(`focus`,function(){S(e);let t=W(2).$implicit;return C(W(3).highlight(t))})(`blur`,function(){return S(e),C(W(5).highlight(null))})(`click`,function(){S(e);let t=W(2).$implicit;return C(W(3).highlight(t,!0))}),K(1,` Show in page `),I()}}function zpe(e,t){if(e&1&&A(0,Lpe,2,0,`button`,40)(1,Rpe,2,0,`button`,40),e&2){let e=W().$implicit;j(+!W(3).isComponentArea(e.area))}}function Bpe(e,t){if(e&1){let e=B();F(0,`li`,32),H(`mouseenter`,function(){let t=S(e).$implicit;return C(W(3).highlight(t))})(`mouseleave`,function(){return S(e),C(W(3).highlight(null))}),F(1,`div`,33)(2,`span`,34),K(3),I(),F(4,`span`,35),K(5),I(),A(6,Fpe,2,1,`code`,36),A(7,Ipe,2,2,`span`,37),I(),F(8,`p`,38),K(9),I(),F(10,`div`,39)(11,`span`,3),K(12,`Rule `),F(13,`code`),K(14),I()(),F(15,`span`,3),K(16,`Agent tool `),F(17,`code`),K(18),I()(),A(19,zpe,2,1),I()()}if(e&2){let e=t.$implicit,n=W(3);D(2),k(`data-tone`,n.tone[e.severity]),D(),q(e.severity),D(2),q(n.areaLabel[e.area]),D(),j(e.subject?6:-1),D(),j((e.count??1)>1?7:-1),D(2),q(e.why),D(5),q(e.rule),D(4),q(n.toolCall(e)),D(),j(e.elementId&&n.canShowComponent()?19:-1)}}function Vpe(e,t){if(e&1&&(F(0,`ol`,25),M(1,Bpe,20,9,`li`,31,Spe),I()),e&2){let e=W(2);D(),N(e.shown())}}function Hpe(e,t){if(e&1&&(F(0,`div`)(1,`dt`),K(2),I(),F(3,`dd`),K(4),I()()),e&2){let e=t.$implicit;D(2),q(e.label),D(2),q(e.value)}}function Upe(e,t){if(e&1&&(F(0,`li`)(1,`strong`),K(2),I(),K(3),I()),e&2){let e=t.$implicit,n=W(3);D(2),q(n.areaLabel[e.area]),D(),J(` `,e.state===`off`?`Its inspector is turned off.`:e.note??`Nothing to read yet.`,` `)}}function Wpe(e,t){if(e&1&&(F(0,`section`,29)(1,`h2`,42),K(2,`Not checked`),I(),F(3,`ul`,43),M(4,Upe,4,2,`li`,null,Cpe),I()()),e&2){let e=W(2);D(4),N(e.coverage())}}function Gpe(e,t){if(e&1){let e=B();F(0,`p`,5),K(1,` 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 `),F(2,`code`),K(3,`audit`),I(),K(4,` tool. `),I(),F(5,`div`,6)(6,`app-search-field`,7,0),w_(`valueChange`,function(t){S(e);let n=W();return C_(n.filter,t)||(n.filter=t),C(t)}),I(),F(8,`app-select`,8),H(`valueChange`,function(t){return S(e),C(W().area.set(t??`all`))}),I(),F(9,`app-select`,9),H(`valueChange`,function(t){return S(e),C(W().severity.set(t??`all`))}),I(),A(10,Ope,1,2,`app-select`,10),F(11,`span`,11),K(12),I(),F(13,`p`,12),K(14),I(),F(15,`button`,13),H(`click`,function(){return S(e),C(W().runAxe())}),K(16),I(),F(17,`button`,13),H(`click`,function(){return S(e),C(W().refresh())}),K(18,`Refresh`),I()(),F(19,`p`,14),K(20),I(),A(21,kpe,2,1,`p`,15),F(22,`section`,16)(23,`div`,17)(24,`h2`,18),K(25,`Before and after`),I(),F(26,`div`,19)(27,`button`,13),H(`click`,function(){return S(e),C(W().mark(`before`))}),K(28,` Take baseline `),I(),F(29,`button`,13),H(`click`,function(){return S(e),C(W().mark(`after`))}),K(30,` Take after audit `),I(),A(31,Ape,2,1,`button`,20),I()(),F(32,`p`,3),K(33),I(),A(34,jpe,2,1,`p`,15),A(35,Mpe,1,1,`app-audit-diff`,21),I(),F(36,`section`,22)(37,`h2`,23),K(38,`Findings`),I(),A(39,Npe,2,0,`p`,24)(40,Ppe,5,0,`div`,24)(41,Vpe,3,0,`ol`,25),I(),F(42,`section`,26)(43,`h2`,27),K(44,`Key numbers`),I(),F(45,`dl`,28),M(46,Hpe,5,2,`div`,null,xpe),I()(),A(48,Wpe,6,0,`section`,29)}if(e&2){let e,t,n,r=W();D(6),S_(`value`,r.filter),D(2),P(`options`,r.areaOptions())(`value`,r.area()),D(),P(`options`,r.severityOptions)(`value`,r.severity()),D(),j(r.pageOptions().length>1?10:-1),D(2),q(r.countText()),D(2),q(r.countStatus()),D(),P(`disabled`,r.axeRunning()),D(),J(` `,r.axeRunning()?`Running axe…`:`Run axe`,` `),D(),P(`disabled`,r.busy()),D(3),q(r.axeStatus()),D(),j((e=r.axeError())?21:-1,e),D(6),P(`disabled`,r.busy()),D(2),P(`disabled`,r.busy()||!r.before()),D(2),j(r.before()?31:-1),D(2),q(r.sessionText()),D(),j((t=r.sessionError())?34:-1,t),D(),j((n=r.diff())?35:-1,n),D(4),j(r.findings().length?r.shown().length?41:40:39),D(7),N(r.numbers()),D(2),j(r.coverage().length?48:-1)}}var Kpe={error:`danger`,warning:`warn`,info:`accent`},S5={error:0,warning:1,info:2},qpe=[`errors`,`hydration`],Jpe=class e{rpc=$(null);canShowComponent=$(!0);showComponent=ev();destroyRef=x(ys);hostPageId=fT();unsubscribe;seq=0;highlighted=!1;queued;time=XE;toolCall=ope;areaLabel=y5;tone=Kpe;severityOptions=[{value:`all`,label:`All severities`},{value:`error`,label:`Errors`},{value:`warning`,label:`Warnings and errors`}];data=T(null);loaded=T(!1);failed=T(!1);busy=T(!1);axeRunning=T(!1);axeError=T(null);sessionError=T(null);filter=T(``);area=T(`all`);severity=T(`all`);pageId=Q({source:()=>this.data(),computation:(e,t)=>t?.value&&e?.pages.some(e=>e.pageId===t.value)?t.value:e?.report?.pageId??this.hostPageId??``});staticReport=X(()=>yT(this.rpc()));report=X(()=>this.data()?.report??null);findings=X(()=>this.report()?.findings??[]);before=X(()=>this.data()?.session?.before??null);after=X(()=>this.data()?.session?.after??null);diff=X(()=>this.data()?.session?.diff??null);pageOptions=X(()=>(this.data()?.pages??[]).map(e=>({value:e.pageId,label:e.title||e.url||e.pageId,...e.url&&e.url!==(e.title||e.url)?{hint:e.url}:{}})));areaOptions=X(()=>[{value:`all`,label:`All areas`},...ape.map(e=>({value:e,label:y5[e],hint:String(this.findings().filter(t=>t.area===e).length)}))]);shown=X(()=>{let e=this.filter().trim().toLowerCase(),t=this.area(),n=this.severity()===`all`?2:S5[this.severity()];return this.findings().filter(r=>(t===`all`||r.area===t)&&S5[r.severity]<=n&&(!e||`${r.subject??``} ${r.rule} ${r.why}`.toLowerCase().includes(e)))});countText=X(()=>{let e=this.findings().length;return`${this.shown().length} of ${e} ${e===1?`finding`:`findings`}`});countStatus=f5(()=>[this.filter(),this.area(),this.severity(),this.pageId()],()=>this.countText());numbers=X(()=>{let e=this.report()?.metrics??{};return b5.filter(t=>e[t.key]!==void 0).map(t=>({label:t.unit===`%`?`${t.label} (%)`:t.label,value:`${e[t.key]}${t.unit===`ms`?` ms`:``}`}))});coverage=X(()=>(this.report()?.sources??[]).filter(e=>e.state!==`ok`));axeStatus=X(()=>{if(this.axeRunning())return`Running axe on the page…`;let e=this.data()?.axe;return e?`Last axe pass at ${XE(e.at)}: ${e.violations.length} ${e.violations.length===1?`rule`:`rules`} broken.`:`No axe pass on this page yet. Run axe to check accessibility.`});sessionText=X(()=>{let e=this.before(),t=this.after();if(!e)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.`;let n=`Baseline at ${XE(e.at)} with ${e.findings.length} findings.`;return t?`${n} After audit at ${XE(t.at)} with ${t.findings.length} findings.`:`${n} Make your change, then take an after audit.`});constructor(){E(()=>{let e=this.rpc();e&&!yT(e)&&Z(()=>void this.subscribe(e))}),this.destroyRef.onDestroy(()=>{this.unsubscribe?.(),clearTimeout(this.queued),this.highlight(null)})}isComponentArea(e){return qpe.includes(e)}clearFilters(){this.filter.set(``),this.area.set(`all`),this.severity.set(`all`)}pickPage(e){e&&(this.pageId.set(e),this.refresh())}async refresh(){let e=this.rpc();if(!e)return;let t=++this.seq;this.failed.set(!1);try{let n=await _T(e,`get-audit`,{pageId:this.pageId()||void 0});if(t!==this.seq||this.destroyRef.destroyed)return;let r=spe(n);if(!r.report&&r.pages.length&&this.pageId())return this.pageId.set(``),this.refresh();this.data.set(r)}catch{t===this.seq&&this.failed.set(!0)}finally{t===this.seq&&this.loaded.set(!0)}}async runAxe(){let e=this.rpc();if(e&&!this.axeRunning()){this.axeRunning.set(!0),this.axeError.set(null);try{let t=await _T(e,`request-axe-run`,{pageId:this.pageId()||void 0});t?.ok||this.axeError.set(t?.error??`The axe pass did not run.`)}catch{this.axeError.set(`Can't reach the devtools server to run axe.`)}finally{this.axeRunning.set(!1)}await this.refresh()}}async mark(e){let t=this.rpc();if(t){this.busy.set(!0),this.sessionError.set(null);try{let n=await _T(t,`audit-session`,{pageId:this.pageId()||void 0,action:e});n?.ok||this.sessionError.set(n?.error??`The session did not change.`)}catch{this.sessionError.set(`Can't reach the devtools server.`)}finally{this.busy.set(!1)}await this.refresh()}}highlight(e,t=!1){let n=this.rpc();if(!n||!this.canShowComponent())return;let r=this.pageId(),i=e?.elementId&&r?{pageId:r,id:e.elementId,...t?{reveal:!0}:{}}:null;(i||this.highlighted)&&(this.highlighted=!!i,_T(n,`request-page-highlight`,i).catch(()=>{}))}refreshSoon(){this.queued===void 0&&(this.queued=setTimeout(()=>{this.queued=void 0,!(this.destroyRef.destroyed||this.axeRunning()||this.busy())&&this.refresh()},150))}async subscribe(e){await this.refresh();try{let t=await e.scope(`pangular`).rpc.sharedState(`audit`);if(this.destroyRef.destroyed)return;this.unsubscribe?.(),this.unsubscribe=t.on(`updated`,()=>this.refreshSoon())}catch{}}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-audit-inspector`]],inputs:{rpc:[1,`rpc`],canShowComponent:[1,`canShowComponent`]},outputs:{showComponent:`showComponent`},decls:5,vars:1,consts:[[`search`,``],[`role`,`status`,1,`state`],[`role`,`alert`,1,`state`],[1,`muted`],[`type`,`button`,1,`small`,3,`click`],[1,`intro`],[1,`toolbar`],[`placeholder`,`Filter by component, rule or text`,`saveKey`,`audit`,1,`search`,3,`valueChange`,`value`],[`ariaLabel`,`Area`,1,`filter-select`,3,`valueChange`,`options`,`value`],[`ariaLabel`,`Severity`,1,`filter-select`,3,`valueChange`,`options`,`value`],[`ariaLabel`,`Page`,1,`filter-select`,3,`options`,`value`],[1,`count`],[`role`,`status`,1,`sr-only`],[`type`,`button`,1,`small`,3,`click`,`disabled`],[`role`,`status`,1,`axe-status`],[`role`,`alert`,1,`notice`,`error`],[`aria-labelledby`,`audit-session-title`,1,`session`],[1,`session-head`],[`id`,`audit-session-title`],[1,`actions`],[`type`,`button`,1,`small`,3,`disabled`],[3,`diff`],[`aria-labelledby`,`audit-findings-title`],[`id`,`audit-findings-title`,1,`section-title`],[1,`empty`],[`aria-label`,`Findings, most severe first`,1,`findings`],[`aria-labelledby`,`audit-numbers-title`],[`id`,`audit-numbers-title`,1,`section-title`],[1,`numbers`],[`aria-labelledby`,`audit-coverage-title`],[`ariaLabel`,`Page`,1,`filter-select`,3,`valueChange`,`options`,`value`],[1,`finding`],[1,`finding`,3,`mouseenter`,`mouseleave`],[1,`head`],[1,`chip`],[1,`chip`,`plain`],[1,`subject`],[1,`times`],[1,`why`],[1,`meta`],[`type`,`button`,1,`link`],[`type`,`button`,1,`link`,3,`focus`,`blur`,`click`],[`id`,`audit-coverage-title`,1,`section-title`],[1,`coverage`]],template:function(e,t){e&1&&A(0,wpe,5,0,`div`,1)(1,Tpe,2,0,`p`,1)(2,Epe,5,0,`div`,2)(3,Dpe,5,0,`div`,1)(4,Gpe,49,21),e&2&&j(t.staticReport()?0:t.loaded()?t.failed()?2:t.report()?4:3:1)},dependencies:[cP,ND,bpe],styles:[`[_nghost-%COMP%] { +}`]})},Cpe=(e,t)=>t.label,wpe=(e,t)=>t.key,Tpe=(e,t)=>t.area;function Epe(e,t){e&1&&(F(0,`div`,1)(1,`p`),K(2,`The audit reads a live page, and a static report has none.`),I(),F(3,`p`,3),K(4,`Open the panel from the server that runs the app to audit it.`),I()())}function Dpe(e,t){e&1&&(F(0,`p`,1),K(1,`Loading the audit…`),I())}function Ope(e,t){if(e&1){let e=B();F(0,`div`,2)(1,`p`),K(2,`Can't read the audit from the devtools server.`),I(),F(3,`button`,4),H(`click`,function(){return S(e),C(W().refresh())}),K(4,`Retry`),I()()}}function kpe(e,t){e&1&&(F(0,`div`,1)(1,`p`),K(2,`No page reports live data yet.`),I(),F(3,`p`,3),K(4,` Open the app with the overlay loaded. The audit reads what the other inspectors collect from it. `),I()())}function Ape(e,t){if(e&1){let e=B();F(0,`app-select`,30),H(`valueChange`,function(t){return S(e),C(W(2).pickPage(t))}),I()}if(e&2){let e=W(2);P(`options`,e.pageOptions())(`value`,e.pageId())}}function jpe(e,t){e&1&&(F(0,`p`,15),K(1),I()),e&2&&(D(),q(t))}function Mpe(e,t){if(e&1){let e=B();F(0,`button`,13),H(`click`,function(){return S(e),C(W(2).mark(`clear`))}),K(1,` Clear `),I()}e&2&&P(`disabled`,W(2).busy())}function Npe(e,t){e&1&&(F(0,`p`,15),K(1),I()),e&2&&(D(),q(t))}function Ppe(e,t){e&1&&L(0,`app-audit-diff`,21),e&2&&P(`diff`,t)}function Fpe(e,t){e&1&&(F(0,`p`,24),K(1,` No finding on this page. Run axe, or record change detection, to check more. `),I())}function Ipe(e,t){if(e&1){let e=B();F(0,`div`,24)(1,`p`),K(2,`No finding matches the filters.`),I(),F(3,`button`,4),H(`click`,function(){S(e),W();let t=Ag(7);return W().clearFilters(),C(t.focus())}),K(4,` Clear filters `),I()()}}function Lpe(e,t){if(e&1&&(F(0,`code`,36),K(1),I()),e&2){let e=W().$implicit;D(),q(e.subject)}}function Rpe(e,t){if(e&1&&(F(0,`span`,37),K(1),I()),e&2){let e=W().$implicit;k(`aria-label`,e.count+` times`),D(),J(``,e.count,`×`)}}function zpe(e,t){if(e&1){let e=B();F(0,`button`,41),H(`focus`,function(){S(e);let t=W(2).$implicit;return C(W(3).highlight(t))})(`blur`,function(){return S(e),C(W(5).highlight(null))})(`click`,function(){S(e);let t=W(2).$implicit,n=W(3);return C(n.showComponent.emit({id:t.elementId,pageId:n.pageId()}))}),K(1,` Show component `),I()}}function Bpe(e,t){if(e&1){let e=B();F(0,`button`,41),H(`focus`,function(){S(e);let t=W(2).$implicit;return C(W(3).highlight(t))})(`blur`,function(){return S(e),C(W(5).highlight(null))})(`click`,function(){S(e);let t=W(2).$implicit;return C(W(3).highlight(t,!0))}),K(1,` Show in page `),I()}}function Vpe(e,t){if(e&1&&A(0,zpe,2,0,`button`,40)(1,Bpe,2,0,`button`,40),e&2){let e=W().$implicit;j(+!W(3).isComponentArea(e.area))}}function Hpe(e,t){if(e&1){let e=B();F(0,`li`,32),H(`mouseenter`,function(){let t=S(e).$implicit;return C(W(3).highlight(t))})(`mouseleave`,function(){return S(e),C(W(3).highlight(null))}),F(1,`div`,33)(2,`span`,34),K(3),I(),F(4,`span`,35),K(5),I(),A(6,Lpe,2,1,`code`,36),A(7,Rpe,2,2,`span`,37),I(),F(8,`p`,38),K(9),I(),F(10,`div`,39)(11,`span`,3),K(12,`Rule `),F(13,`code`),K(14),I()(),F(15,`span`,3),K(16,`Agent tool `),F(17,`code`),K(18),I()(),A(19,Vpe,2,1),I()()}if(e&2){let e=t.$implicit,n=W(3);D(2),k(`data-tone`,n.tone[e.severity]),D(),q(e.severity),D(2),q(n.areaLabel[e.area]),D(),j(e.subject?6:-1),D(),j((e.count??1)>1?7:-1),D(2),q(e.why),D(5),q(e.rule),D(4),q(n.toolCall(e)),D(),j(e.elementId&&n.canShowComponent()?19:-1)}}function Upe(e,t){if(e&1&&(F(0,`ol`,25),M(1,Hpe,20,9,`li`,31,wpe),I()),e&2){let e=W(2);D(),N(e.shown())}}function Wpe(e,t){if(e&1&&(F(0,`div`)(1,`dt`),K(2),I(),F(3,`dd`),K(4),I()()),e&2){let e=t.$implicit;D(2),q(e.label),D(2),q(e.value)}}function Gpe(e,t){if(e&1&&(F(0,`li`)(1,`strong`),K(2),I(),K(3),I()),e&2){let e=t.$implicit,n=W(3);D(2),q(n.areaLabel[e.area]),D(),J(` `,e.state===`off`?`Its inspector is turned off.`:e.note??`Nothing to read yet.`,` `)}}function Kpe(e,t){if(e&1&&(F(0,`section`,29)(1,`h2`,42),K(2,`Not checked`),I(),F(3,`ul`,43),M(4,Gpe,4,2,`li`,null,Tpe),I()()),e&2){let e=W(2);D(4),N(e.coverage())}}function qpe(e,t){if(e&1){let e=B();F(0,`p`,5),K(1,` 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 `),F(2,`code`),K(3,`audit`),I(),K(4,` tool. `),I(),F(5,`div`,6)(6,`app-search-field`,7,0),w_(`valueChange`,function(t){S(e);let n=W();return C_(n.filter,t)||(n.filter=t),C(t)}),I(),F(8,`app-select`,8),H(`valueChange`,function(t){return S(e),C(W().area.set(t??`all`))}),I(),F(9,`app-select`,9),H(`valueChange`,function(t){return S(e),C(W().severity.set(t??`all`))}),I(),A(10,Ape,1,2,`app-select`,10),F(11,`span`,11),K(12),I(),F(13,`p`,12),K(14),I(),F(15,`button`,13),H(`click`,function(){return S(e),C(W().runAxe())}),K(16),I(),F(17,`button`,13),H(`click`,function(){return S(e),C(W().refresh())}),K(18,`Refresh`),I()(),F(19,`p`,14),K(20),I(),A(21,jpe,2,1,`p`,15),F(22,`section`,16)(23,`div`,17)(24,`h2`,18),K(25,`Before and after`),I(),F(26,`div`,19)(27,`button`,13),H(`click`,function(){return S(e),C(W().mark(`before`))}),K(28,` Take baseline `),I(),F(29,`button`,13),H(`click`,function(){return S(e),C(W().mark(`after`))}),K(30,` Take after audit `),I(),A(31,Mpe,2,1,`button`,20),I()(),F(32,`p`,3),K(33),I(),A(34,Npe,2,1,`p`,15),A(35,Ppe,1,1,`app-audit-diff`,21),I(),F(36,`section`,22)(37,`h2`,23),K(38,`Findings`),I(),A(39,Fpe,2,0,`p`,24)(40,Ipe,5,0,`div`,24)(41,Upe,3,0,`ol`,25),I(),F(42,`section`,26)(43,`h2`,27),K(44,`Key numbers`),I(),F(45,`dl`,28),M(46,Wpe,5,2,`div`,null,Cpe),I()(),A(48,Kpe,6,0,`section`,29)}if(e&2){let e,t,n,r=W();D(6),S_(`value`,r.filter),D(2),P(`options`,r.areaOptions())(`value`,r.area()),D(),P(`options`,r.severityOptions)(`value`,r.severity()),D(),j(r.pageOptions().length>1?10:-1),D(2),q(r.countText()),D(2),q(r.countStatus()),D(),P(`disabled`,r.axeRunning()),D(),J(` `,r.axeRunning()?`Running axe…`:`Run axe`,` `),D(),P(`disabled`,r.busy()),D(3),q(r.axeStatus()),D(),j((e=r.axeError())?21:-1,e),D(6),P(`disabled`,r.busy()),D(2),P(`disabled`,r.busy()||!r.before()),D(2),j(r.before()?31:-1),D(2),q(r.sessionText()),D(),j((t=r.sessionError())?34:-1,t),D(),j((n=r.diff())?35:-1,n),D(4),j(r.findings().length?r.shown().length?41:40:39),D(7),N(r.numbers()),D(2),j(r.coverage().length?48:-1)}}var Jpe={error:`danger`,warning:`warn`,info:`accent`},S5={error:0,warning:1,info:2},Ype=[`errors`,`hydration`],Xpe=class e{rpc=$(null);canShowComponent=$(!0);showComponent=ev();destroyRef=x(ys);hostPageId=fT();unsubscribe;seq=0;highlighted=!1;queued;time=XE;toolCall=cpe;areaLabel=y5;tone=Jpe;severityOptions=[{value:`all`,label:`All severities`},{value:`error`,label:`Errors`},{value:`warning`,label:`Warnings and errors`}];data=T(null);loaded=T(!1);failed=T(!1);busy=T(!1);axeRunning=T(!1);axeError=T(null);sessionError=T(null);filter=T(``);area=T(`all`);severity=T(`all`);pageId=Q({source:()=>this.data(),computation:(e,t)=>t?.value&&e?.pages.some(e=>e.pageId===t.value)?t.value:e?.report?.pageId??this.hostPageId??``});staticReport=X(()=>yT(this.rpc()));report=X(()=>this.data()?.report??null);findings=X(()=>this.report()?.findings??[]);before=X(()=>this.data()?.session?.before??null);after=X(()=>this.data()?.session?.after??null);diff=X(()=>this.data()?.session?.diff??null);pageOptions=X(()=>(this.data()?.pages??[]).map(e=>({value:e.pageId,label:e.title||e.url||e.pageId,...e.url&&e.url!==(e.title||e.url)?{hint:e.url}:{}})));areaOptions=X(()=>[{value:`all`,label:`All areas`},...spe.map(e=>({value:e,label:y5[e],hint:String(this.findings().filter(t=>t.area===e).length)}))]);shown=X(()=>{let e=this.filter().trim().toLowerCase(),t=this.area(),n=this.severity()===`all`?2:S5[this.severity()];return this.findings().filter(r=>(t===`all`||r.area===t)&&S5[r.severity]<=n&&(!e||`${r.subject??``} ${r.rule} ${r.why}`.toLowerCase().includes(e)))});countText=X(()=>{let e=this.findings().length;return`${this.shown().length} of ${e} ${e===1?`finding`:`findings`}`});countStatus=f5(()=>[this.filter(),this.area(),this.severity(),this.pageId()],()=>this.countText());numbers=X(()=>{let e=this.report()?.metrics??{};return b5.filter(t=>e[t.key]!==void 0).map(t=>({label:t.unit===`%`?`${t.label} (%)`:t.label,value:`${e[t.key]}${t.unit===`ms`?` ms`:``}`}))});coverage=X(()=>(this.report()?.sources??[]).filter(e=>e.state!==`ok`));axeStatus=X(()=>{if(this.axeRunning())return`Running axe on the page…`;let e=this.data()?.axe;return e?`Last axe pass at ${XE(e.at)}: ${e.violations.length} ${e.violations.length===1?`rule`:`rules`} broken.`:`No axe pass on this page yet. Run axe to check accessibility.`});sessionText=X(()=>{let e=this.before(),t=this.after();if(!e)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.`;let n=`Baseline at ${XE(e.at)} with ${e.findings.length} findings.`;return t?`${n} After audit at ${XE(t.at)} with ${t.findings.length} findings.`:`${n} Make your change, then take an after audit.`});constructor(){E(()=>{let e=this.rpc();e&&!yT(e)&&Z(()=>void this.subscribe(e))}),this.destroyRef.onDestroy(()=>{this.unsubscribe?.(),clearTimeout(this.queued),this.highlight(null)})}isComponentArea(e){return Ype.includes(e)}clearFilters(){this.filter.set(``),this.area.set(`all`),this.severity.set(`all`)}pickPage(e){e&&(this.pageId.set(e),this.refresh())}async refresh(){let e=this.rpc();if(!e)return;let t=++this.seq;this.failed.set(!1);try{let n=await _T(e,`get-audit`,{pageId:this.pageId()||void 0});if(t!==this.seq||this.destroyRef.destroyed)return;let r=lpe(n);if(!r.report&&r.pages.length&&this.pageId())return this.pageId.set(``),this.refresh();this.data.set(r)}catch{t===this.seq&&this.failed.set(!0)}finally{t===this.seq&&this.loaded.set(!0)}}async runAxe(){let e=this.rpc();if(e&&!this.axeRunning()){this.axeRunning.set(!0),this.axeError.set(null);try{let t=await _T(e,`request-axe-run`,{pageId:this.pageId()||void 0});t?.ok||this.axeError.set(t?.error??`The axe pass did not run.`)}catch{this.axeError.set(`Can't reach the devtools server to run axe.`)}finally{this.axeRunning.set(!1)}await this.refresh()}}async mark(e){let t=this.rpc();if(t){this.busy.set(!0),this.sessionError.set(null);try{let n=await _T(t,`audit-session`,{pageId:this.pageId()||void 0,action:e});n?.ok||this.sessionError.set(n?.error??`The session did not change.`)}catch{this.sessionError.set(`Can't reach the devtools server.`)}finally{this.busy.set(!1)}await this.refresh()}}highlight(e,t=!1){let n=this.rpc();if(!n||!this.canShowComponent())return;let r=this.pageId(),i=e?.elementId&&r?{pageId:r,id:e.elementId,...t?{reveal:!0}:{}}:null;(i||this.highlighted)&&(this.highlighted=!!i,_T(n,`request-page-highlight`,i).catch(()=>{}))}refreshSoon(){this.queued===void 0&&(this.queued=setTimeout(()=>{this.queued=void 0,!(this.destroyRef.destroyed||this.axeRunning()||this.busy())&&this.refresh()},150))}async subscribe(e){await this.refresh();try{let t=await e.scope(`pangular`).rpc.sharedState(`audit`);if(this.destroyRef.destroyed)return;this.unsubscribe?.(),this.unsubscribe=t.on(`updated`,()=>this.refreshSoon())}catch{}}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-audit-inspector`]],inputs:{rpc:[1,`rpc`],canShowComponent:[1,`canShowComponent`]},outputs:{showComponent:`showComponent`},decls:5,vars:1,consts:[[`search`,``],[`role`,`status`,1,`state`],[`role`,`alert`,1,`state`],[1,`muted`],[`type`,`button`,1,`small`,3,`click`],[1,`intro`],[1,`toolbar`],[`placeholder`,`Filter by component, rule or text`,`saveKey`,`audit`,1,`search`,3,`valueChange`,`value`],[`ariaLabel`,`Area`,1,`filter-select`,3,`valueChange`,`options`,`value`],[`ariaLabel`,`Severity`,1,`filter-select`,3,`valueChange`,`options`,`value`],[`ariaLabel`,`Page`,1,`filter-select`,3,`options`,`value`],[1,`count`],[`role`,`status`,1,`sr-only`],[`type`,`button`,1,`small`,3,`click`,`disabled`],[`role`,`status`,1,`axe-status`],[`role`,`alert`,1,`notice`,`error`],[`aria-labelledby`,`audit-session-title`,1,`session`],[1,`session-head`],[`id`,`audit-session-title`],[1,`actions`],[`type`,`button`,1,`small`,3,`disabled`],[3,`diff`],[`aria-labelledby`,`audit-findings-title`],[`id`,`audit-findings-title`,1,`section-title`],[1,`empty`],[`aria-label`,`Findings, most severe first`,1,`findings`],[`aria-labelledby`,`audit-numbers-title`],[`id`,`audit-numbers-title`,1,`section-title`],[1,`numbers`],[`aria-labelledby`,`audit-coverage-title`],[`ariaLabel`,`Page`,1,`filter-select`,3,`valueChange`,`options`,`value`],[1,`finding`],[1,`finding`,3,`mouseenter`,`mouseleave`],[1,`head`],[1,`chip`],[1,`chip`,`plain`],[1,`subject`],[1,`times`],[1,`why`],[1,`meta`],[`type`,`button`,1,`link`],[`type`,`button`,1,`link`,3,`focus`,`blur`,`click`],[`id`,`audit-coverage-title`,1,`section-title`],[1,`coverage`]],template:function(e,t){e&1&&A(0,Epe,5,0,`div`,1)(1,Dpe,2,0,`p`,1)(2,Ope,5,0,`div`,2)(3,kpe,5,0,`div`,1)(4,qpe,49,21),e&2&&j(t.staticReport()?0:t.loaded()?t.failed()?2:t.report()?4:3:1)},dependencies:[cP,ND,Spe],styles:[`[_nghost-%COMP%] { display: block; font-size: 13px; } @@ -25596,7 +25619,7 @@ h2[_ngcontent-%COMP%] { .empty[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .state[_ngcontent-%COMP%] p[_ngcontent-%COMP%] { margin: 0 0 8px; -}`]})},C5=[{id:`router`,label:`Router`,tab:`routes`,tabLabel:`Routes`,inspector:`router`,state:`router`},{id:`http`,label:`HTTP`,tab:`network`,tabLabel:`SSR & HTTP`,inspector:`http`,state:`http`},{id:`ngrx`,label:`NgRx`,tab:`store`,tabLabel:`Store`,inspector:`ngrx`,state:`ngrx-store`},{id:`cd`,label:`Change detection`,tab:`components`,tabLabel:`Components`,inspector:`components`,state:`change-detection`},{id:`forms`,label:`Forms`,tab:`forms`,tabLabel:`Forms`,inspector:`forms`,state:`forms`},{id:`signals`,label:`Signals`,tab:`signals`,tabLabel:`Signals`,inspector:`signals`,state:`signal-graph`}],w5=Object.fromEntries(C5.map(e=>[e.id,e]));function Ype(e){return C5.filter(t=>e.inspectors[t.inspector])}function T5(e){return Array.isArray(e)?e:[]}function E5(e){return e&&typeof e==`object`&&!Array.isArray(e)?e:{}}function D5(e){let t=E5(e).pages;return Array.isArray(t)?t:Object.values(E5(t))}function O5(e){return typeof e==`number`&&Number.isFinite(e)}function Xpe(e){try{let t=new URL(e,`http://x`);return e.startsWith(`/`)||t.host===`x`?`${t.pathname}${t.search}`:e.replace(/^[a-z]+:\/\/[^/]+/i,``)||e}catch{return e}}function k5(e){return e<10?`${Math.round(e*10)/10} ms`:`${Math.round(e)} ms`}function Zpe(e){let t;try{t=typeof e==`string`?JSON.stringify(e):JSON.stringify(e)??``}catch{t=String(e)}return t.length>80?`${t.slice(0,79)}…`:t}function Qpe(e){let t=[];for(let n of D5(e)){let e=typeof n?.pageId==`string`?n.pageId:``;for(let r of T5(n?.navigations)){if(!O5(r?.startedAt)||r.probe||r.beforeConnect)continue;let n=O5(r.endedAt)?Math.max(0,r.endedAt-r.startedAt):void 0,i=r.finalUrl&&r.finalUrl!==r.url?` to ${r.finalUrl}`:``;t.push({key:`router:${e}:${r.id}`,layer:`router`,pageId:e,at:r.startedAt,...n===void 0?{}:{ms:n},title:`Navigation to ${r.url}`,detail:[`${r.outcome}${i}`,r.trigger,n===void 0?``:k5(n)].filter(Boolean).join(` · `),...r.outcome===`failed`?{tone:`danger`}:r.outcome===`cancelled`||r.outcome===`redirected`?{tone:`warn`}:{},link:{tab:`routes`,...e?{page:e}:{}}})}}return t}function $pe(e){let t=e.status??0;if(e.error||t>=500||t===0&&!e.cancelled)return`danger`;if(t>=400||e.faulted||e.cancelled)return`warn`}function A5(e,t){if(!O5(e?.at))return null;let n=e.side===`server`?`SSR`:`client`,r=e.status?String(e.status):e.cancelled?`cancelled`:`no response`,i=O5(e.durationMs)?e.durationMs:void 0,a=$pe(e);return{key:`http:${e.side===`server`?`server`:t}:${e.id??e.at}`,layer:`http`,pageId:t,at:e.at,...i===void 0?{}:{ms:i},title:`${e.method??`GET`} ${Xpe(e.url??``)}`,detail:[r,n,i===void 0?``:k5(i),e.cacheHit?`from cache`:``,e.mocked?`mocked`:e.faulted?`fault rule`:``].filter(Boolean).join(` · `),...a?{tone:a}:{},link:{tab:`network`,...t?{page:t}:{}}}}function eme(e){let t=[],n=D5(e);for(let e of n){let n=typeof e?.pageId==`string`?e.pageId:``;for(let r of T5(e?.calls)){let e=A5(r,n);e&&t.push(e)}}for(let r of T5(E5(e).serverCalls)){let e=r?.pageUrl?n.find(e=>e?.initialUrl&&e.initialUrl===r.pageUrl):void 0,i=A5({...r,side:`server`},e?.pageId??``);i&&t.push(i)}return t}function tme(e){let t=[];for(let n of D5(e)){let e=typeof n?.pageId==`string`?n.pageId:``;for(let r of T5(n?.log)){if(!O5(r?.timestamp))continue;let n=T5(r.diff).length+(r.diffTruncated??0),i=O5(r.durationMs)?r.durationMs:void 0;t.push({key:`ngrx:${e}:${r.seq}`,layer:`ngrx`,pageId:e,at:r.timestamp,...i===void 0?{}:{ms:i},title:r.source===`event`?r.eventType??r.type:r.type,detail:[r.storeId,r.source===`event`?`event`:n?`${n} ${n===1?`change`:`changes`}`:`no change`,i===void 0?``:k5(i)].filter(Boolean).join(` · `),link:{tab:`store`,...e?{page:e}:{}}})}}return t}var nme=16;function rme(e){let t=[];for(let n of D5(e)){let e=typeof n?.pageId==`string`?n.pageId:``;for(let r of T5(n?.cycles)){if(!O5(r?.at))continue;let n=O5(r.ms)?r.ms:0;t.push({key:`cd:${e}:${r.id}`,layer:`cd`,pageId:e,at:r.at,ms:n,title:`Change detection cycle ${r.id}`,detail:[k5(n),`${r.checks} ${r.checks===1?`check`:`checks`}`,r.trigger?`after ${r.trigger}`:``].filter(Boolean).join(` · `),...n>nme?{tone:`warn`}:{},link:{tab:`components`,...e?{page:e}:{}}})}}return t}function ime(e){return T5(E5(e).events).flatMap((e,t)=>{if(!O5(e?.timestamp)||typeof e.formId!=`string`)return[];let n=ST(e.formId),r=[e.detail,e.origin,e.outcome].filter(Boolean).join(` · `);return[{key:`forms:${e.formId}:${e.seq??`i${t}`}`,layer:`forms`,pageId:n,at:e.timestamp,...O5(e.ms)?{ms:e.ms}:{},title:`${e.type} ${e.path||`form`}`,detail:r,...e.type===`submit`&&e.outcome===`invalid`?{tone:`warn`}:{},link:{tab:`forms`,id:e.formId,...n?{page:n}:{}}}]})}var ame={write:`set`,sample:`sampled`};function ome(e){let t=[],n=E5(E5(e).pages),r=Object.keys(n).length?Object.entries(n):[[``,E5(e).graph]];for(let[e,n]of r){let r=E5(n),i=typeof r.pageId==`string`?r.pageId:String(e),a=new Map(T5(r.nodes).map(e=>[e?.id,e?.label||e?.kind||`signal`]));for(let[e,n]of Object.entries(E5(r.history)))for(let r of T5(n)){if(!O5(r?.at)||r.source===`initial`)continue;let n=a.get(e)??e;t.push({key:`signals:${i}:${e}:${r.epoch??r.at}`,layer:`signals`,pageId:i,at:r.at,title:`${n} ${ame[r.source??``]??`changed`}`,detail:Zpe(r.value),link:{tab:`signals`,...i?{page:i}:{}}})}}return t}var sme={router:Qpe,http:eme,ngrx:tme,cd:rme,forms:ime,signals:ome};function cme(e){let t=[];for(let n of C5){let r=e[n.id];r!=null&&t.push(...sme[n.id](r))}let n=new Map(C5.map((e,t)=>[e.id,t]));t.sort((e,t)=>e.at-t.at||n.get(e.layer)-n.get(t.layer)||(e.keyt.key)));let r=new Set;for(let e of t){let t=e.key;for(let n=2;r.has(t);n++)t=`${e.key}#${n}`;e.key=t,r.add(t)}return t}function lme(e,t){let n=new Map,r=(e,t)=>{typeof e==`string`&&e&&(typeof t==`string`&&t&&!n.get(e)?n.set(e,t):n.has(e)||n.set(e,``))};for(let t of D5(e.http))r(t?.pageId,t?.title||t?.url);for(let t of D5(e.router))r(t?.pageId,t?.snapshot?.url);for(let t of D5(e.ngrx))r(t?.pageId,t?.title||t?.url);for(let e of t)r(e.pageId,``);return[...n].map(([e,t])=>({pageId:e,label:t||e}))}function ume(e,t){let n=t.query.trim().toLowerCase();return e.filter(e=>t.layers.has(e.layer)&&(t.pageId===`all`||e.pageId===t.pageId)&&(!n||e.title.toLowerCase().includes(n)||e.detail.toLowerCase().includes(n)))}function j5(e,t){return t?e.filter(e=>e.at>=t.start&&e.at<=t.end):e}function dme(e){if(!e.length)return null;let t=1/0,n=-1/0;for(let r of e)t=Math.min(t,r.at),n=Math.max(n,r.at+(r.ms??0));return n-t<20?{start:t-10,end:t+10}:{start:t,end:n}}function fme(e,t,n){let r=Math.max(20,(e.end-e.start)*t);if(r>=n.end-n.start)return null;let i=(e.start+e.end)/2;return M5({start:i-r/2,end:i+r/2},n)}function pme(e,t,n){let r=(e.end-e.start)*t;return M5({start:e.start+r,end:e.end+r},n)}function M5(e,t){let n=e.end-e.start;return e.startt.end?{start:t.end-n,end:t.end}:e}function mme(e,t,n){let[r,i]=tMath.min(1,Math.max(0,e)),o=e.end-e.start,s=e.start+a(r)*o,c=e.start+a(i)*o;return c-s<20?null:{start:s,end:c}}function hme(e,t,n){let r=Math.max(1,t.end-t.start),i=new Map;for(let a of e){if(a.att.end)continue;let e=Math.min(n-1,Math.floor((a.at-t.start)/r*n)),o=`${a.layer}:${e}`,s=i.get(o);s||(s={layer:a.layer,slot:e,count:0},i.set(o,s)),s.count++,(a.tone===`danger`||a.tone===`warn`&&s.tone!==`danger`)&&(s.tone=a.tone)}return[...i.values()]}function gme(e,t,n){let r=null;for(let i of e)i.layer===t&&(!r||Math.abs(i.at-n)C5.some(t=>t.id===e)):[]}catch{return[]}}function P5(e){try{localStorage.setItem(N5,JSON.stringify(e))}catch{}}function F5(e){let t=new Date(e),n=(e,t=2)=>String(e).padStart(t,`0`);return`${n(t.getHours())}:${n(t.getMinutes())}:${n(t.getSeconds())}.${n(t.getMilliseconds(),3)}`}function I5(e){if(e<1e3)return`${Math.round(e)} ms`;if(e<6e4)return`${Math.round(e/100)/10} s`;let t=Math.floor(e/6e4),n=Math.round(e%6e4/1e3);return n?`${t} min ${n} s`:`${t} min`}var vme=[`tracks`],L5=(e,t)=>t.id,yme=(e,t)=>t.layer+t.slot,bme=(e,t)=>t.key;function xme(e,t){e&1&&(F(0,`p`,3),K(1,`Loading the timeline…`),I())}function Sme(e,t){if(e&1){let e=B();F(0,`div`,4)(1,`p`),K(2,`Can't read the timeline from the devtools server.`),I(),F(3,`button`,5),H(`click`,function(){return S(e),C(W().retry())}),K(4,`Retry`),I()()}}function Cme(e,t){if(e&1){let e=B();F(0,`app-select`,16),H(`valueChange`,function(t){S(e);let n=W(2);return C(n.pageId.set(t??n.allPages))}),I()}if(e&2){let e=W(2);P(`options`,e.pageOptions())(`value`,e.pageId())}}function wme(e,t){if(e&1){let e=B();F(0,`button`,17),H(`click`,function(){let t=S(e).$implicit;return C(W(2).toggleLayer(t.id))}),L(1,`span`,18),K(2),F(3,`span`,19),K(4),I()()}if(e&2){let e=t.$implicit,n=W(2);k(`aria-pressed`,!n.hidden().includes(e.id)),D(2),J(` `,e.label,` `),D(2),q(n.layerCounts()[e.id])}}function Tme(e,t){e&1&&(F(0,`div`,3)(1,`p`),K(2,`Nothing on the timeline yet.`),I(),F(3,`p`,20),K(4,` Use the app with the overlay loaded. Navigations, HTTP calls, NgRx actions and form events show up as they happen. Record change detection on the Components tab, and pick a component on the Signals tab to follow its signals. `),I()())}function Eme(e,t){if(e&1){let e=B();F(0,`div`,3)(1,`p`),K(2),I(),F(3,`button`,5),H(`click`,function(){S(e),W();let t=Ag(2);return W().clearFilters(),C(t.focus())}),K(4,` Clear filters `),I()()}if(e&2){let e=W(2);D(2),J(`No event matches the filters`,e.range()?` in this range`:``,`.`)}}function Dme(e,t){if(e&1&&(F(0,`li`),K(1),I()),e&2){let e=t.$implicit;D(),q(e.label)}}function Ome(e,t){if(e&1&&(w(),L(0,`line`,28)),e&2){let e=t.$index,n=W(3);k(`x2`,n.chartWidth)(`y1`,e*n.laneHeight+n.laneHeight/2)(`y2`,e*n.laneHeight+n.laneHeight/2)}}function kme(e,t){if(e&1&&(w(),L(0,`rect`,29)),e&2){let e=t.$implicit,n=W(3);k(`data-tone`,e.tone??null)(`x`,e.slot*n.slotWidth)(`y`,n.laneIndex()[e.layer]*n.laneHeight+4)(`width`,n.slotWidth-1)(`height`,n.laneHeight-8)(`opacity`,n.binOpacity(e.count))}}function Ame(e,t){if(e&1&&(w(),L(0,`rect`,30)),e&2){let e=t,n=W(3);k(`x`,e.x-2)(`y`,e.y+1)(`width`,n.slotWidth+3)(`height`,n.laneHeight-2)}}function jme(e,t){if(e&1&&L(0,`div`,41),e&2){let e=t;Zg(`left`,e.left,`%`)(`width`,e.width,`%`)}}function Mme(e,t){if(e&1&&(F(0,`p`,37),K(1),I()),e&2){let e=W(3);D(),Y(` Showing the newest `,e.listed().length,` of `,e.shown().length,` events. Zoom in or filter to see older ones. `)}}function Nme(e,t){if(e&1&&(F(0,`span`,46),K(1),I()),e&2){let e=W().$implicit;D(),q(e.detail)}}function Pme(e,t){if(e&1&&(F(0,`span`,47),K(1),I()),e&2){let e=W().$implicit,t=W(3);D(),q(t.pageLabel(e.pageId))}}function Fme(e,t){if(e&1){let e=B();F(0,`li`)(1,`button`,42),H(`click`,function(){let t=S(e).$implicit;return C(W(3).select(t))})(`dblclick`,function(){let t=S(e).$implicit;return C(W(3).openEvent(t))}),F(2,`time`,43),K(3),I(),F(4,`span`,44),K(5),I(),F(6,`span`,45),K(7),I(),A(8,Nme,2,1,`span`,46),A(9,Pme,2,1,`span`,47),I()()}if(e&2){let e=t.$implicit,n=W(3);D(),G(`selected`,e.key===n.selectedKey()),k(`aria-current`,e.key===n.selectedKey()?`true`:null)(`data-key`,e.key),D(2),q(n.clock(e.at)),D(),k(`data-tone`,e.tone??null),D(),q(n.layerLabel(e.layer)),D(2),q(e.title),D(),j(e.detail?8:-1),D(),j(n.showPage()?9:-1)}}function Ime(e,t){if(e&1&&(F(0,`dt`),K(1,`Took`),I(),F(2,`dd`),K(3),I()),e&2){let e=W(),t=W(3);D(3),q(t.span(e.ms))}}function Lme(e,t){if(e&1&&(F(0,`dt`),K(1,`Detail`),I(),F(2,`dd`,50),K(3),I()),e&2){let e=W();D(3),q(e.detail)}}function Rme(e,t){if(e&1){let e=B();F(0,`p`,48),K(1),I(),F(2,`dl`)(3,`dt`),K(4,`Layer`),I(),F(5,`dd`),K(6),I(),F(7,`dt`),K(8,`Time`),I(),F(9,`dd`),K(10),I(),A(11,Ime,4,1),A(12,Lme,4,1),F(13,`dt`),K(14,`Page`),I(),F(15,`dd`),K(16),I()(),F(17,`button`,49),H(`click`,function(){let t=S(e);return C(W(3).openEvent(t))}),K(18),I()}if(e&2){let e=t,n=W(3);D(),q(e.title),D(5),q(n.layerLabel(e.layer)),D(4),q(n.clock(e.at)),D(),j(e.ms===void 0?-1:11),D(),j(e.detail?12:-1),D(4),q(e.pageId?n.pageLabel(e.pageId):`Server, no page`),D(2),J(` Open in `,n.tabLabel(e.layer),` `)}}function zme(e,t){e&1&&(F(0,`p`,20),K(1,` Select an event in the list or on the chart to see it here. Double click a row to open it in its own tab. `),I())}function Bme(e,t){if(e&1){let e=B();F(0,`section`,21)(1,`div`,22)(2,`h2`,23),K(3,`Time axis`),I(),F(4,`span`,20),K(5),I()(),F(6,`div`,24)(7,`ul`,25),M(8,Dme,2,1,`li`,null,L5),I(),F(10,`div`,26,1),H(`pointerdown`,function(t){return S(e),C(W(2).onPointerDown(t))})(`pointermove`,function(t){return S(e),C(W(2).onPointerMove(t))})(`pointerup`,function(t){return S(e),C(W(2).onPointerUp(t))})(`pointercancel`,function(){return S(e),C(W(2).brush.set(null))}),w(),F(12,`svg`,27),M(13,Ome,1,3,`:svg:line`,28,L5),M(15,kme,1,6,`:svg:rect`,29,yme),A(17,Ame,1,4,`:svg:rect`,30),I(),A(18,jme,1,4,`div`,31),I()(),ls(),F(19,`div`,32)(20,`span`),K(21),I(),F(22,`span`),K(23),I()(),F(24,`p`,33),K(25,` Drag across the chart to look at a range, and click a mark to select the nearest event. The list below holds the same events. `),I()(),F(26,`div`,34)(27,`section`,35)(28,`h2`,36),K(29,`Events`),I(),A(30,Mme,2,2,`p`,37),F(31,`ol`,38),M(32,Fme,10,10,`li`,null,bme),I()(),F(34,`aside`,39)(35,`h2`,40),K(36,`Selected event`),I(),A(37,Rme,19,7)(38,zme,2,0,`p`,20),I()()}if(e&2){let e,t,n,r=W(2);D(5),q(r.viewText()),D(3),N(r.lanes()),D(2),Zg(`height`,r.lanes().length*r.laneHeight,`px`),k(`aria-label`,r.chartLabel()),D(2),k(`viewBox`,`0 0 `+r.chartWidth+` `+r.lanes().length*r.laneHeight),D(),N(r.lanes()),D(2),N(r.bins()),D(2),j((e=r.selectedMark())?17:-1,e),D(),j((t=r.brushBox())?18:-1,t),D(3),q(r.clock(r.view().start)),D(2),q(r.clock(r.view().end)),D(7),j(r.shown().length>r.listed().length?30:-1),D(2),N(r.listed()),D(5),j((n=r.selected())?37:38,n)}}function Vme(e,t){if(e&1){let e=B();F(0,`div`,6)(1,`app-search-field`,7,0),w_(`valueChange`,function(t){S(e);let n=W();return C_(n.query,t)||(n.query=t),C(t)}),I(),A(3,Cme,1,2,`app-select`,8),F(4,`span`,9),K(5),I(),F(6,`p`,10),K(7),I()(),F(8,`div`,11)(9,`div`,12),M(10,wme,5,3,`button`,13,L5),I(),F(12,`div`,14)(13,`button`,15),H(`click`,function(){return S(e),C(W().zoom(.5))}),K(14,` Zoom in `),I(),F(15,`button`,15),H(`click`,function(){return S(e),C(W().zoom(2))}),K(16,` Zoom out `),I(),F(17,`button`,15),H(`click`,function(){return S(e),C(W().pan(-1))}),K(18,` Earlier `),I(),F(19,`button`,15),H(`click`,function(){return S(e),C(W().pan(1))}),K(20,` Later `),I(),F(21,`button`,15),H(`click`,function(){return S(e),C(W().range.set(null))}),K(22,` Show all `),I()()(),A(23,Tme,5,0,`div`,3)(24,Eme,5,1,`div`,3)(25,Bme,39,11)}if(e&2){let e=W();D(),S_(`value`,e.query),D(2),j(e.pageOptions().length>2?3:-1),D(2),q(e.countText()),D(2),q(e.countStatus()),D(3),N(e.layers()),D(3),P(`disabled`,!e.canZoomIn()),D(2),P(`disabled`,!e.range()),D(2),P(`disabled`,!e.canPan(-1)),D(2),P(`disabled`,!e.canPan(1)),D(2),P(`disabled`,!e.range()),D(2),j(e.events().length?e.shown().length?25:24:23)}}var R5=240,z5=1e3,Hme=4,Ume=class e{rpc=$(null);open=ev();destroyRef=x(ys);tracks=sv(`tracks`);host=x(kl);hostPageId=fT();cleanups=[];loads=0;allPages=`all`;clock=F5;span=I5;laneHeight=24;chartWidth=z5;slotWidth=z5/R5;loading=T(!0);failed=T(!1);sources=T({});query=T(``);hidden=T(_me());range=T(null);selectedKey=T(null);brush=T(null);layers=X(()=>Ype(IT(this.rpc())));events=X(()=>{let e=new Set(this.layers().map(e=>e.id));return cme(this.sources()).filter(t=>e.has(t.layer))});pages=X(()=>lme(this.sources(),this.events()));pageId=Q({source:()=>this.pages().map(e=>e.pageId),computation:(e,t)=>t&&(t.value===`all`||e.includes(t.value))?t.value:this.hostPageId&&e.includes(this.hostPageId)?this.hostPageId:`all`});pageOptions=X(()=>[{value:`all`,label:`All pages`},...this.pages().map(e=>({value:e.pageId,label:e.label,...e.label===e.pageId?{}:{hint:e.pageId}}))]);showPage=X(()=>this.pageId()===`all`&&this.pages().length>1);matching=X(()=>ume(this.events(),{layers:new Set(C5.map(e=>e.id)),pageId:this.pageId(),query:this.query()}));layerCounts=X(()=>{let e=Object.fromEntries(C5.map(e=>[e.id,0]));for(let t of j5(this.matching(),this.range()))e[t.layer]++;return e});visible=X(()=>{let e=new Set(this.hidden());return this.matching().filter(t=>!e.has(t.layer))});lanes=X(()=>{let e=new Set(this.hidden());return this.layers().filter(t=>!e.has(t.id))});laneIndex=X(()=>Object.fromEntries(this.lanes().map((e,t)=>[e.id,t])));bounds=X(()=>dme(this.visible()));view=X(()=>this.range()??this.bounds());shown=X(()=>j5(this.visible(),this.range()));listed=X(()=>this.shown().slice(-200).reverse());bins=X(()=>{let e=this.view();return e?hme(this.shown(),e,R5):[]});maxBin=X(()=>this.bins().reduce((e,t)=>Math.max(e,t.count),1));selected=X(()=>this.events().find(e=>e.key===this.selectedKey())??null);selectedMark=X(()=>{let e=this.selected(),t=this.view(),n=e?this.laneIndex()[e.layer]:void 0;if(!e||!t||n===void 0||e.att.end)return null;let r=Math.max(1,t.end-t.start);return{x:Math.min(239,Math.floor((e.at-t.start)/r*R5))*this.slotWidth,y:n*this.laneHeight}});brushBox=X(()=>{let e=this.brush();if(!e)return null;let t=Math.min(e.from,e.to),n=Math.max(e.from,e.to);return{left:t*100,width:(n-t)*100}});countText=X(()=>{let e=this.events().length;return`${this.shown().length} of ${e} ${e===1?`event`:`events`}`});countStatus=f5(()=>[this.query(),this.hidden(),this.pageId(),this.range()],()=>this.countText());viewText=X(()=>{let e=this.view();if(!e)return``;let t=I5(e.end-e.start);return this.range()?`Range of ${t}`:`All ${t}`});chartLabel=X(()=>{let e=this.view();if(!e)return`Timeline`;let t=this.layerCounts(),n=this.lanes().map(e=>`${e.label} ${t[e.id]}`);return`Timeline from ${F5(e.start)} to ${F5(e.end)}: ${n.join(`, `)}. The Events list holds the same events.`});canZoomIn=X(()=>{let e=this.view();return!!e&&e.end-e.start>40});constructor(){E(()=>{let e=this.rpc();e&&this.load(e)}),this.destroyRef.onDestroy(()=>this.stop())}layerLabel(e){return w5[e].label}tabLabel(e){return w5[e].tabLabel}pageLabel(e){return e?this.pages().find(t=>t.pageId===e)?.label??e:`Server`}binOpacity(e){return Math.round((.55+.45*Math.min(1,Math.log2(e+1)/Math.log2(this.maxBin()+1)))*100)/100}toggleLayer(e){let t=this.hidden().includes(e)?this.hidden().filter(t=>t!==e):[...this.hidden(),e];this.hidden.set(t),P5(t)}clearFilters(){this.query.set(``),this.range.set(null),this.hidden.set([]),P5([]),this.pageId.set(`all`)}zoom(e){let t=this.view(),n=this.bounds();t&&n&&this.range.set(fme(t,e,n))}canPan(e){let t=this.range(),n=this.bounds();return!t||!n?!1:e<0?t.start>n.start:t.end{this.host.nativeElement.querySelector(`button.row[data-key="${CSS.escape(o.key)}"]`)?.scrollIntoView?.({block:`nearest`})}))}retry(){let e=this.rpc();e&&this.load(e)}stop(){for(let e of this.cleanups.splice(0))e()}async load(e){this.stop();let t=++this.loads;this.loading.set(!0),this.failed.set(!1);let n=e.scope(`pangular`).rpc,r=await Promise.allSettled(C5.map(async e=>{let r=await n.sharedState(e.state);if(this.destroyRef.destroyed||t!==this.loads)return;let i=t=>this.sources.update(n=>({...n,[e.id]:t}));i(r.value()),this.cleanups.push(r.on(`updated`,i))}));this.destroyRef.destroyed||t!==this.loads||(this.failed.set(r.every(e=>e.status===`rejected`)),this.loading.set(!1))}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-timeline`]],viewQuery:function(e,t){e&1&&Og(t.tracks,vme,5),e&2&&kg()},inputs:{rpc:[1,`rpc`]},outputs:{open:`open`},decls:5,vars:1,consts:[[`search`,``],[`tracks`,``],[1,`intro`],[`role`,`status`,1,`state`],[`role`,`alert`,1,`state`],[`type`,`button`,1,`small`,3,`click`],[1,`toolbar`],[`placeholder`,`Filter by name, URL or detail`,`saveKey`,`timeline`,1,`search`,3,`valueChange`,`value`],[`ariaLabel`,`Page`,1,`page-select`,3,`options`,`value`],[1,`count`],[`role`,`status`,1,`sr-only`],[1,`controls`],[`role`,`group`,`aria-label`,`Layers`,1,`layers`],[`type`,`button`,1,`layer`],[`role`,`group`,`aria-label`,`Time range`,1,`zoom`],[`type`,`button`,1,`small`,3,`click`,`disabled`],[`ariaLabel`,`Page`,1,`page-select`,3,`valueChange`,`options`,`value`],[`type`,`button`,1,`layer`,3,`click`],[`aria-hidden`,`true`,1,`check`],[1,`badge`],[1,`muted`],[`aria-labelledby`,`timeline-chart-heading`,1,`chart-card`],[1,`chart-head`],[`id`,`timeline-chart-heading`],[1,`chart`],[`aria-hidden`,`true`,1,`lane-labels`],[`role`,`img`,1,`tracks`,3,`pointerdown`,`pointermove`,`pointerup`,`pointercancel`],[`preserveAspectRatio`,`none`,`aria-hidden`,`true`],[`x1`,`0`,1,`lane-line`],[1,`mark`],[1,`selected-mark`],[1,`brush`,3,`left`,`width`],[`aria-hidden`,`true`,1,`axis`],[1,`hint`],[1,`split`],[`aria-labelledby`,`timeline-events-heading`,1,`events`],[`id`,`timeline-events-heading`],[1,`note`],[`appRovingList`,`button.row`,`aria-label`,`Events, newest first`,1,`rows`],[`aria-labelledby`,`timeline-detail-heading`,1,`detail-panel`],[`id`,`timeline-detail-heading`],[1,`brush`],[`type`,`button`,1,`row`,3,`click`,`dblclick`],[1,`when`],[1,`chip`],[1,`title`],[1,`detail`],[1,`page`],[1,`detail-title`],[`type`,`button`,1,`primary`,3,`click`],[1,`mono`]],template:function(e,t){e&1&&(F(0,`p`,2),K(1,` Navigations, HTTP calls, NgRx actions, change detection cycles, form events and signal changes from the live page on one time axis. Turn layers on and off, drag across the chart to look at a range, and open an event in its own tab. `),I(),A(2,xme,2,0,`p`,3)(3,Sme,5,0,`div`,4)(4,Vme,26,10)),e&2&&(D(2),j(t.loading()?2:t.failed()?3:4))},dependencies:[ND,mV,cP],styles:[`[_nghost-%COMP%] { +}`]})},C5=[{id:`router`,label:`Router`,tab:`routes`,tabLabel:`Routes`,inspector:`router`,state:`router`},{id:`http`,label:`HTTP`,tab:`network`,tabLabel:`SSR & HTTP`,inspector:`http`,state:`http`},{id:`ngrx`,label:`NgRx`,tab:`store`,tabLabel:`Store`,inspector:`ngrx`,state:`ngrx-store`},{id:`cd`,label:`Change detection`,tab:`components`,tabLabel:`Components`,inspector:`components`,state:`change-detection`},{id:`forms`,label:`Forms`,tab:`forms`,tabLabel:`Forms`,inspector:`forms`,state:`forms`},{id:`signals`,label:`Signals`,tab:`signals`,tabLabel:`Signals`,inspector:`signals`,state:`signal-graph`}],w5=Object.fromEntries(C5.map(e=>[e.id,e]));function Zpe(e){return C5.filter(t=>e.inspectors[t.inspector])}function T5(e){return Array.isArray(e)?e:[]}function E5(e){return e&&typeof e==`object`&&!Array.isArray(e)?e:{}}function D5(e){let t=E5(e).pages;return Array.isArray(t)?t:Object.values(E5(t))}function O5(e){return typeof e==`number`&&Number.isFinite(e)}function Qpe(e){try{let t=new URL(e,`http://x`);return e.startsWith(`/`)||t.host===`x`?`${t.pathname}${t.search}`:e.replace(/^[a-z]+:\/\/[^/]+/i,``)||e}catch{return e}}function k5(e){return e<10?`${Math.round(e*10)/10} ms`:`${Math.round(e)} ms`}function $pe(e){let t;try{t=typeof e==`string`?JSON.stringify(e):JSON.stringify(e)??``}catch{t=String(e)}return t.length>80?`${t.slice(0,79)}…`:t}function eme(e){let t=[];for(let n of D5(e)){let e=typeof n?.pageId==`string`?n.pageId:``;for(let r of T5(n?.navigations)){if(!O5(r?.startedAt)||r.probe||r.beforeConnect)continue;let n=O5(r.endedAt)?Math.max(0,r.endedAt-r.startedAt):void 0,i=r.finalUrl&&r.finalUrl!==r.url?` to ${r.finalUrl}`:``;t.push({key:`router:${e}:${r.id}`,layer:`router`,pageId:e,at:r.startedAt,...n===void 0?{}:{ms:n},title:`Navigation to ${r.url}`,detail:[`${r.outcome}${i}`,r.trigger,n===void 0?``:k5(n)].filter(Boolean).join(` · `),...r.outcome===`failed`?{tone:`danger`}:r.outcome===`cancelled`||r.outcome===`redirected`?{tone:`warn`}:{},link:{tab:`routes`,...e?{page:e}:{}}})}}return t}function tme(e){let t=e.status??0;if(e.error||t>=500||t===0&&!e.cancelled)return`danger`;if(t>=400||e.faulted||e.cancelled)return`warn`}function A5(e,t){if(!O5(e?.at))return null;let n=e.side===`server`?`SSR`:`client`,r=e.status?String(e.status):e.cancelled?`cancelled`:`no response`,i=O5(e.durationMs)?e.durationMs:void 0,a=tme(e);return{key:`http:${e.side===`server`?`server`:t}:${e.id??e.at}`,layer:`http`,pageId:t,at:e.at,...i===void 0?{}:{ms:i},title:`${e.method??`GET`} ${Qpe(e.url??``)}`,detail:[r,n,i===void 0?``:k5(i),e.cacheHit?`from cache`:``,e.mocked?`mocked`:e.faulted?`fault rule`:``].filter(Boolean).join(` · `),...a?{tone:a}:{},link:{tab:`network`,...t?{page:t}:{}}}}function nme(e){let t=[],n=D5(e);for(let e of n){let n=typeof e?.pageId==`string`?e.pageId:``;for(let r of T5(e?.calls)){let e=A5(r,n);e&&t.push(e)}}for(let r of T5(E5(e).serverCalls)){let e=r?.pageUrl?n.find(e=>e?.initialUrl&&e.initialUrl===r.pageUrl):void 0,i=A5({...r,side:`server`},e?.pageId??``);i&&t.push(i)}return t}function rme(e){let t=[];for(let n of D5(e)){let e=typeof n?.pageId==`string`?n.pageId:``;for(let r of T5(n?.log)){if(!O5(r?.timestamp))continue;let n=T5(r.diff).length+(r.diffTruncated??0),i=O5(r.durationMs)?r.durationMs:void 0;t.push({key:`ngrx:${e}:${r.seq}`,layer:`ngrx`,pageId:e,at:r.timestamp,...i===void 0?{}:{ms:i},title:r.source===`event`?r.eventType??r.type:r.type,detail:[r.storeId,r.source===`event`?`event`:n?`${n} ${n===1?`change`:`changes`}`:`no change`,i===void 0?``:k5(i)].filter(Boolean).join(` · `),link:{tab:`store`,...e?{page:e}:{}}})}}return t}var ime=16;function ame(e){let t=[];for(let n of D5(e)){let e=typeof n?.pageId==`string`?n.pageId:``;for(let r of T5(n?.cycles)){if(!O5(r?.at))continue;let n=O5(r.ms)?r.ms:0;t.push({key:`cd:${e}:${r.id}`,layer:`cd`,pageId:e,at:r.at,ms:n,title:`Change detection cycle ${r.id}`,detail:[k5(n),`${r.checks} ${r.checks===1?`check`:`checks`}`,r.trigger?`after ${r.trigger}`:``].filter(Boolean).join(` · `),...n>ime?{tone:`warn`}:{},link:{tab:`components`,...e?{page:e}:{}}})}}return t}function ome(e){return T5(E5(e).events).flatMap((e,t)=>{if(!O5(e?.timestamp)||typeof e.formId!=`string`)return[];let n=ST(e.formId),r=[e.detail,e.origin,e.outcome].filter(Boolean).join(` · `);return[{key:`forms:${e.formId}:${e.seq??`i${t}`}`,layer:`forms`,pageId:n,at:e.timestamp,...O5(e.ms)?{ms:e.ms}:{},title:`${e.type} ${e.path||`form`}`,detail:r,...e.type===`submit`&&e.outcome===`invalid`?{tone:`warn`}:{},link:{tab:`forms`,id:e.formId,...n?{page:n}:{}}}]})}var sme={write:`set`,sample:`sampled`};function cme(e){let t=[],n=E5(E5(e).pages),r=Object.keys(n).length?Object.entries(n):[[``,E5(e).graph]];for(let[e,n]of r){let r=E5(n),i=typeof r.pageId==`string`?r.pageId:String(e),a=new Map(T5(r.nodes).map(e=>[e?.id,e?.label||e?.kind||`signal`]));for(let[e,n]of Object.entries(E5(r.history)))for(let r of T5(n)){if(!O5(r?.at)||r.source===`initial`)continue;let n=a.get(e)??e;t.push({key:`signals:${i}:${e}:${r.epoch??r.at}`,layer:`signals`,pageId:i,at:r.at,title:`${n} ${sme[r.source??``]??`changed`}`,detail:$pe(r.value),link:{tab:`signals`,...i?{page:i}:{}}})}}return t}var lme={router:eme,http:nme,ngrx:rme,cd:ame,forms:ome,signals:cme};function ume(e){let t=[];for(let n of C5){let r=e[n.id];r!=null&&t.push(...lme[n.id](r))}let n=new Map(C5.map((e,t)=>[e.id,t]));t.sort((e,t)=>e.at-t.at||n.get(e.layer)-n.get(t.layer)||(e.keyt.key)));let r=new Set;for(let e of t){let t=e.key;for(let n=2;r.has(t);n++)t=`${e.key}#${n}`;e.key=t,r.add(t)}return t}function dme(e,t){let n=new Map,r=(e,t)=>{typeof e==`string`&&e&&(typeof t==`string`&&t&&!n.get(e)?n.set(e,t):n.has(e)||n.set(e,``))};for(let t of D5(e.http))r(t?.pageId,t?.title||t?.url);for(let t of D5(e.router))r(t?.pageId,t?.snapshot?.url);for(let t of D5(e.ngrx))r(t?.pageId,t?.title||t?.url);for(let e of t)r(e.pageId,``);return[...n].map(([e,t])=>({pageId:e,label:t||e}))}function fme(e,t){let n=t.query.trim().toLowerCase();return e.filter(e=>t.layers.has(e.layer)&&(t.pageId===`all`||e.pageId===t.pageId)&&(!n||e.title.toLowerCase().includes(n)||e.detail.toLowerCase().includes(n)))}function j5(e,t){return t?e.filter(e=>e.at>=t.start&&e.at<=t.end):e}function pme(e){if(!e.length)return null;let t=1/0,n=-1/0;for(let r of e)t=Math.min(t,r.at),n=Math.max(n,r.at+(r.ms??0));return n-t<20?{start:t-10,end:t+10}:{start:t,end:n}}function mme(e,t,n){let r=Math.max(20,(e.end-e.start)*t);if(r>=n.end-n.start)return null;let i=(e.start+e.end)/2;return M5({start:i-r/2,end:i+r/2},n)}function hme(e,t,n){let r=(e.end-e.start)*t;return M5({start:e.start+r,end:e.end+r},n)}function M5(e,t){let n=e.end-e.start;return e.startt.end?{start:t.end-n,end:t.end}:e}function gme(e,t,n){let[r,i]=tMath.min(1,Math.max(0,e)),o=e.end-e.start,s=e.start+a(r)*o,c=e.start+a(i)*o;return c-s<20?null:{start:s,end:c}}function _me(e,t,n){let r=Math.max(1,t.end-t.start),i=new Map;for(let a of e){if(a.att.end)continue;let e=Math.min(n-1,Math.floor((a.at-t.start)/r*n)),o=`${a.layer}:${e}`,s=i.get(o);s||(s={layer:a.layer,slot:e,count:0},i.set(o,s)),s.count++,(a.tone===`danger`||a.tone===`warn`&&s.tone!==`danger`)&&(s.tone=a.tone)}return[...i.values()]}function vme(e,t,n){let r=null;for(let i of e)i.layer===t&&(!r||Math.abs(i.at-n)C5.some(t=>t.id===e)):[]}catch{return[]}}function P5(e){try{localStorage.setItem(N5,JSON.stringify(e))}catch{}}function F5(e){let t=new Date(e),n=(e,t=2)=>String(e).padStart(t,`0`);return`${n(t.getHours())}:${n(t.getMinutes())}:${n(t.getSeconds())}.${n(t.getMilliseconds(),3)}`}function I5(e){if(e<1e3)return`${Math.round(e)} ms`;if(e<6e4)return`${Math.round(e/100)/10} s`;let t=Math.floor(e/6e4),n=Math.round(e%6e4/1e3);return n?`${t} min ${n} s`:`${t} min`}var bme=[`tracks`],L5=(e,t)=>t.id,xme=(e,t)=>t.layer+t.slot,Sme=(e,t)=>t.key;function Cme(e,t){e&1&&(F(0,`p`,3),K(1,`Loading the timeline…`),I())}function wme(e,t){if(e&1){let e=B();F(0,`div`,4)(1,`p`),K(2,`Can't read the timeline from the devtools server.`),I(),F(3,`button`,5),H(`click`,function(){return S(e),C(W().retry())}),K(4,`Retry`),I()()}}function Tme(e,t){if(e&1){let e=B();F(0,`app-select`,16),H(`valueChange`,function(t){S(e);let n=W(2);return C(n.pageId.set(t??n.allPages))}),I()}if(e&2){let e=W(2);P(`options`,e.pageOptions())(`value`,e.pageId())}}function Eme(e,t){if(e&1){let e=B();F(0,`button`,17),H(`click`,function(){let t=S(e).$implicit;return C(W(2).toggleLayer(t.id))}),L(1,`span`,18),K(2),F(3,`span`,19),K(4),I()()}if(e&2){let e=t.$implicit,n=W(2);k(`aria-pressed`,!n.hidden().includes(e.id)),D(2),J(` `,e.label,` `),D(2),q(n.layerCounts()[e.id])}}function Dme(e,t){e&1&&(F(0,`div`,3)(1,`p`),K(2,`Nothing on the timeline yet.`),I(),F(3,`p`,20),K(4,` Use the app with the overlay loaded. Navigations, HTTP calls, NgRx actions and form events show up as they happen. Record change detection on the Components tab, and pick a component on the Signals tab to follow its signals. `),I()())}function Ome(e,t){if(e&1){let e=B();F(0,`div`,3)(1,`p`),K(2),I(),F(3,`button`,5),H(`click`,function(){S(e),W();let t=Ag(2);return W().clearFilters(),C(t.focus())}),K(4,` Clear filters `),I()()}if(e&2){let e=W(2);D(2),J(`No event matches the filters`,e.range()?` in this range`:``,`.`)}}function kme(e,t){if(e&1&&(F(0,`li`),K(1),I()),e&2){let e=t.$implicit;D(),q(e.label)}}function Ame(e,t){if(e&1&&(w(),L(0,`line`,28)),e&2){let e=t.$index,n=W(3);k(`x2`,n.chartWidth)(`y1`,e*n.laneHeight+n.laneHeight/2)(`y2`,e*n.laneHeight+n.laneHeight/2)}}function jme(e,t){if(e&1&&(w(),L(0,`rect`,29)),e&2){let e=t.$implicit,n=W(3);k(`data-tone`,e.tone??null)(`x`,e.slot*n.slotWidth)(`y`,n.laneIndex()[e.layer]*n.laneHeight+4)(`width`,n.slotWidth-1)(`height`,n.laneHeight-8)(`opacity`,n.binOpacity(e.count))}}function Mme(e,t){if(e&1&&(w(),L(0,`rect`,30)),e&2){let e=t,n=W(3);k(`x`,e.x-2)(`y`,e.y+1)(`width`,n.slotWidth+3)(`height`,n.laneHeight-2)}}function Nme(e,t){if(e&1&&L(0,`div`,41),e&2){let e=t;Zg(`left`,e.left,`%`)(`width`,e.width,`%`)}}function Pme(e,t){if(e&1&&(F(0,`p`,37),K(1),I()),e&2){let e=W(3);D(),Y(` Showing the newest `,e.listed().length,` of `,e.shown().length,` events. Zoom in or filter to see older ones. `)}}function Fme(e,t){if(e&1&&(F(0,`span`,46),K(1),I()),e&2){let e=W().$implicit;D(),q(e.detail)}}function Ime(e,t){if(e&1&&(F(0,`span`,47),K(1),I()),e&2){let e=W().$implicit,t=W(3);D(),q(t.pageLabel(e.pageId))}}function Lme(e,t){if(e&1){let e=B();F(0,`li`)(1,`button`,42),H(`click`,function(){let t=S(e).$implicit;return C(W(3).select(t))})(`dblclick`,function(){let t=S(e).$implicit;return C(W(3).openEvent(t))}),F(2,`time`,43),K(3),I(),F(4,`span`,44),K(5),I(),F(6,`span`,45),K(7),I(),A(8,Fme,2,1,`span`,46),A(9,Ime,2,1,`span`,47),I()()}if(e&2){let e=t.$implicit,n=W(3);D(),G(`selected`,e.key===n.selectedKey()),k(`aria-current`,e.key===n.selectedKey()?`true`:null)(`data-key`,e.key),D(2),q(n.clock(e.at)),D(),k(`data-tone`,e.tone??null),D(),q(n.layerLabel(e.layer)),D(2),q(e.title),D(),j(e.detail?8:-1),D(),j(n.showPage()?9:-1)}}function Rme(e,t){if(e&1&&(F(0,`dt`),K(1,`Took`),I(),F(2,`dd`),K(3),I()),e&2){let e=W(),t=W(3);D(3),q(t.span(e.ms))}}function zme(e,t){if(e&1&&(F(0,`dt`),K(1,`Detail`),I(),F(2,`dd`,50),K(3),I()),e&2){let e=W();D(3),q(e.detail)}}function Bme(e,t){if(e&1){let e=B();F(0,`p`,48),K(1),I(),F(2,`dl`)(3,`dt`),K(4,`Layer`),I(),F(5,`dd`),K(6),I(),F(7,`dt`),K(8,`Time`),I(),F(9,`dd`),K(10),I(),A(11,Rme,4,1),A(12,zme,4,1),F(13,`dt`),K(14,`Page`),I(),F(15,`dd`),K(16),I()(),F(17,`button`,49),H(`click`,function(){let t=S(e);return C(W(3).openEvent(t))}),K(18),I()}if(e&2){let e=t,n=W(3);D(),q(e.title),D(5),q(n.layerLabel(e.layer)),D(4),q(n.clock(e.at)),D(),j(e.ms===void 0?-1:11),D(),j(e.detail?12:-1),D(4),q(e.pageId?n.pageLabel(e.pageId):`Server, no page`),D(2),J(` Open in `,n.tabLabel(e.layer),` `)}}function Vme(e,t){e&1&&(F(0,`p`,20),K(1,` Select an event in the list or on the chart to see it here. Double click a row to open it in its own tab. `),I())}function Hme(e,t){if(e&1){let e=B();F(0,`section`,21)(1,`div`,22)(2,`h2`,23),K(3,`Time axis`),I(),F(4,`span`,20),K(5),I()(),F(6,`div`,24)(7,`ul`,25),M(8,kme,2,1,`li`,null,L5),I(),F(10,`div`,26,1),H(`pointerdown`,function(t){return S(e),C(W(2).onPointerDown(t))})(`pointermove`,function(t){return S(e),C(W(2).onPointerMove(t))})(`pointerup`,function(t){return S(e),C(W(2).onPointerUp(t))})(`pointercancel`,function(){return S(e),C(W(2).brush.set(null))}),w(),F(12,`svg`,27),M(13,Ame,1,3,`:svg:line`,28,L5),M(15,jme,1,6,`:svg:rect`,29,xme),A(17,Mme,1,4,`:svg:rect`,30),I(),A(18,Nme,1,4,`div`,31),I()(),ls(),F(19,`div`,32)(20,`span`),K(21),I(),F(22,`span`),K(23),I()(),F(24,`p`,33),K(25,` Drag across the chart to look at a range, and click a mark to select the nearest event. The list below holds the same events. `),I()(),F(26,`div`,34)(27,`section`,35)(28,`h2`,36),K(29,`Events`),I(),A(30,Pme,2,2,`p`,37),F(31,`ol`,38),M(32,Lme,10,10,`li`,null,Sme),I()(),F(34,`aside`,39)(35,`h2`,40),K(36,`Selected event`),I(),A(37,Bme,19,7)(38,Vme,2,0,`p`,20),I()()}if(e&2){let e,t,n,r=W(2);D(5),q(r.viewText()),D(3),N(r.lanes()),D(2),Zg(`height`,r.lanes().length*r.laneHeight,`px`),k(`aria-label`,r.chartLabel()),D(2),k(`viewBox`,`0 0 `+r.chartWidth+` `+r.lanes().length*r.laneHeight),D(),N(r.lanes()),D(2),N(r.bins()),D(2),j((e=r.selectedMark())?17:-1,e),D(),j((t=r.brushBox())?18:-1,t),D(3),q(r.clock(r.view().start)),D(2),q(r.clock(r.view().end)),D(7),j(r.shown().length>r.listed().length?30:-1),D(2),N(r.listed()),D(5),j((n=r.selected())?37:38,n)}}function Ume(e,t){if(e&1){let e=B();F(0,`div`,6)(1,`app-search-field`,7,0),w_(`valueChange`,function(t){S(e);let n=W();return C_(n.query,t)||(n.query=t),C(t)}),I(),A(3,Tme,1,2,`app-select`,8),F(4,`span`,9),K(5),I(),F(6,`p`,10),K(7),I()(),F(8,`div`,11)(9,`div`,12),M(10,Eme,5,3,`button`,13,L5),I(),F(12,`div`,14)(13,`button`,15),H(`click`,function(){return S(e),C(W().zoom(.5))}),K(14,` Zoom in `),I(),F(15,`button`,15),H(`click`,function(){return S(e),C(W().zoom(2))}),K(16,` Zoom out `),I(),F(17,`button`,15),H(`click`,function(){return S(e),C(W().pan(-1))}),K(18,` Earlier `),I(),F(19,`button`,15),H(`click`,function(){return S(e),C(W().pan(1))}),K(20,` Later `),I(),F(21,`button`,15),H(`click`,function(){return S(e),C(W().range.set(null))}),K(22,` Show all `),I()()(),A(23,Dme,5,0,`div`,3)(24,Ome,5,1,`div`,3)(25,Hme,39,11)}if(e&2){let e=W();D(),S_(`value`,e.query),D(2),j(e.pageOptions().length>2?3:-1),D(2),q(e.countText()),D(2),q(e.countStatus()),D(3),N(e.layers()),D(3),P(`disabled`,!e.canZoomIn()),D(2),P(`disabled`,!e.range()),D(2),P(`disabled`,!e.canPan(-1)),D(2),P(`disabled`,!e.canPan(1)),D(2),P(`disabled`,!e.range()),D(2),j(e.events().length?e.shown().length?25:24:23)}}var R5=240,z5=1e3,Wme=4,Gme=class e{rpc=$(null);open=ev();destroyRef=x(ys);tracks=sv(`tracks`);host=x(kl);hostPageId=fT();cleanups=[];loads=0;allPages=`all`;clock=F5;span=I5;laneHeight=24;chartWidth=z5;slotWidth=z5/R5;loading=T(!0);failed=T(!1);sources=T({});query=T(``);hidden=T(yme());range=T(null);selectedKey=T(null);brush=T(null);layers=X(()=>Zpe(IT(this.rpc())));events=X(()=>{let e=new Set(this.layers().map(e=>e.id));return ume(this.sources()).filter(t=>e.has(t.layer))});pages=X(()=>dme(this.sources(),this.events()));pageId=Q({source:()=>this.pages().map(e=>e.pageId),computation:(e,t)=>t&&(t.value===`all`||e.includes(t.value))?t.value:this.hostPageId&&e.includes(this.hostPageId)?this.hostPageId:`all`});pageOptions=X(()=>[{value:`all`,label:`All pages`},...this.pages().map(e=>({value:e.pageId,label:e.label,...e.label===e.pageId?{}:{hint:e.pageId}}))]);showPage=X(()=>this.pageId()===`all`&&this.pages().length>1);matching=X(()=>fme(this.events(),{layers:new Set(C5.map(e=>e.id)),pageId:this.pageId(),query:this.query()}));layerCounts=X(()=>{let e=Object.fromEntries(C5.map(e=>[e.id,0]));for(let t of j5(this.matching(),this.range()))e[t.layer]++;return e});visible=X(()=>{let e=new Set(this.hidden());return this.matching().filter(t=>!e.has(t.layer))});lanes=X(()=>{let e=new Set(this.hidden());return this.layers().filter(t=>!e.has(t.id))});laneIndex=X(()=>Object.fromEntries(this.lanes().map((e,t)=>[e.id,t])));bounds=X(()=>pme(this.visible()));view=X(()=>this.range()??this.bounds());shown=X(()=>j5(this.visible(),this.range()));listed=X(()=>this.shown().slice(-200).reverse());bins=X(()=>{let e=this.view();return e?_me(this.shown(),e,R5):[]});maxBin=X(()=>this.bins().reduce((e,t)=>Math.max(e,t.count),1));selected=X(()=>this.events().find(e=>e.key===this.selectedKey())??null);selectedMark=X(()=>{let e=this.selected(),t=this.view(),n=e?this.laneIndex()[e.layer]:void 0;if(!e||!t||n===void 0||e.att.end)return null;let r=Math.max(1,t.end-t.start);return{x:Math.min(239,Math.floor((e.at-t.start)/r*R5))*this.slotWidth,y:n*this.laneHeight}});brushBox=X(()=>{let e=this.brush();if(!e)return null;let t=Math.min(e.from,e.to),n=Math.max(e.from,e.to);return{left:t*100,width:(n-t)*100}});countText=X(()=>{let e=this.events().length;return`${this.shown().length} of ${e} ${e===1?`event`:`events`}`});countStatus=f5(()=>[this.query(),this.hidden(),this.pageId(),this.range()],()=>this.countText());viewText=X(()=>{let e=this.view();if(!e)return``;let t=I5(e.end-e.start);return this.range()?`Range of ${t}`:`All ${t}`});chartLabel=X(()=>{let e=this.view();if(!e)return`Timeline`;let t=this.layerCounts(),n=this.lanes().map(e=>`${e.label} ${t[e.id]}`);return`Timeline from ${F5(e.start)} to ${F5(e.end)}: ${n.join(`, `)}. The Events list holds the same events.`});canZoomIn=X(()=>{let e=this.view();return!!e&&e.end-e.start>40});constructor(){E(()=>{let e=this.rpc();e&&this.load(e)}),this.destroyRef.onDestroy(()=>this.stop())}layerLabel(e){return w5[e].label}tabLabel(e){return w5[e].tabLabel}pageLabel(e){return e?this.pages().find(t=>t.pageId===e)?.label??e:`Server`}binOpacity(e){return Math.round((.55+.45*Math.min(1,Math.log2(e+1)/Math.log2(this.maxBin()+1)))*100)/100}toggleLayer(e){let t=this.hidden().includes(e)?this.hidden().filter(t=>t!==e):[...this.hidden(),e];this.hidden.set(t),P5(t)}clearFilters(){this.query.set(``),this.range.set(null),this.hidden.set([]),P5([]),this.pageId.set(`all`)}zoom(e){let t=this.view(),n=this.bounds();t&&n&&this.range.set(mme(t,e,n))}canPan(e){let t=this.range(),n=this.bounds();return!t||!n?!1:e<0?t.start>n.start:t.end{this.host.nativeElement.querySelector(`button.row[data-key="${CSS.escape(o.key)}"]`)?.scrollIntoView?.({block:`nearest`})}))}retry(){let e=this.rpc();e&&this.load(e)}stop(){for(let e of this.cleanups.splice(0))e()}async load(e){this.stop();let t=++this.loads;this.loading.set(!0),this.failed.set(!1);let n=e.scope(`pangular`).rpc,r=await Promise.allSettled(C5.map(async e=>{let r=await n.sharedState(e.state);if(this.destroyRef.destroyed||t!==this.loads)return;let i=t=>this.sources.update(n=>({...n,[e.id]:t}));i(r.value()),this.cleanups.push(r.on(`updated`,i))}));this.destroyRef.destroyed||t!==this.loads||(this.failed.set(r.every(e=>e.status===`rejected`)),this.loading.set(!1))}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-timeline`]],viewQuery:function(e,t){e&1&&Og(t.tracks,bme,5),e&2&&kg()},inputs:{rpc:[1,`rpc`]},outputs:{open:`open`},decls:5,vars:1,consts:[[`search`,``],[`tracks`,``],[1,`intro`],[`role`,`status`,1,`state`],[`role`,`alert`,1,`state`],[`type`,`button`,1,`small`,3,`click`],[1,`toolbar`],[`placeholder`,`Filter by name, URL or detail`,`saveKey`,`timeline`,1,`search`,3,`valueChange`,`value`],[`ariaLabel`,`Page`,1,`page-select`,3,`options`,`value`],[1,`count`],[`role`,`status`,1,`sr-only`],[1,`controls`],[`role`,`group`,`aria-label`,`Layers`,1,`layers`],[`type`,`button`,1,`layer`],[`role`,`group`,`aria-label`,`Time range`,1,`zoom`],[`type`,`button`,1,`small`,3,`click`,`disabled`],[`ariaLabel`,`Page`,1,`page-select`,3,`valueChange`,`options`,`value`],[`type`,`button`,1,`layer`,3,`click`],[`aria-hidden`,`true`,1,`check`],[1,`badge`],[1,`muted`],[`aria-labelledby`,`timeline-chart-heading`,1,`chart-card`],[1,`chart-head`],[`id`,`timeline-chart-heading`],[1,`chart`],[`aria-hidden`,`true`,1,`lane-labels`],[`role`,`img`,1,`tracks`,3,`pointerdown`,`pointermove`,`pointerup`,`pointercancel`],[`preserveAspectRatio`,`none`,`aria-hidden`,`true`],[`x1`,`0`,1,`lane-line`],[1,`mark`],[1,`selected-mark`],[1,`brush`,3,`left`,`width`],[`aria-hidden`,`true`,1,`axis`],[1,`hint`],[1,`split`],[`aria-labelledby`,`timeline-events-heading`,1,`events`],[`id`,`timeline-events-heading`],[1,`note`],[`appRovingList`,`button.row`,`aria-label`,`Events, newest first`,1,`rows`],[`aria-labelledby`,`timeline-detail-heading`,1,`detail-panel`],[`id`,`timeline-detail-heading`],[1,`brush`],[`type`,`button`,1,`row`,3,`click`,`dblclick`],[1,`when`],[1,`chip`],[1,`title`],[1,`detail`],[1,`page`],[1,`detail-title`],[`type`,`button`,1,`primary`,3,`click`],[1,`mono`]],template:function(e,t){e&1&&(F(0,`p`,2),K(1,` Navigations, HTTP calls, NgRx actions, change detection cycles, form events and signal changes from the live page on one time axis. Turn layers on and off, drag across the chart to look at a range, and open an event in its own tab. `),I(),A(2,Cme,2,0,`p`,3)(3,wme,5,0,`div`,4)(4,Ume,26,10)),e&2&&(D(2),j(t.loading()?2:t.failed()?3:4))},dependencies:[ND,mV,cP],styles:[`[_nghost-%COMP%] { display: block; font-size: 13px; } @@ -26063,7 +26086,7 @@ dd[_ngcontent-%COMP%] { .layer[_ngcontent-%COMP%] { transition: none; } -}`]})};function Wme(e){let t=e===`light`?`#ffffff`:`#0b0b0e`,n=e===`light`?`#92400e`:`#f5a524`;return` +}`]})};function Kme(e){let t=e===`light`?`#ffffff`:`#0b0b0e`,n=e===`light`?`#92400e`:`#f5a524`;return` .devframes-dock-entry button { transition: background-color 0.2s, transform 0.3s; } @@ -26154,7 +26177,7 @@ dd[_ngcontent-%COMP%] { transition: none; } } -`}var B5=new Map;function V5(e,t=`dark`,n=50){let r=e?.querySelector(`devframes-dock-standalone`)?.shadowRoot;if(r){if(e){let t=B5.get(e);t!==void 0&&(clearTimeout(t),B5.delete(e))}let n=r.querySelector(`style[data-pangular]`);n||(n=e.createElement(`style`),n.dataset.pangular=``,r.append(n)),n.textContent=Wme(t);return}if(n>0&&e){let r=B5.get(e);r!==void 0&&clearTimeout(r);let i=setTimeout(()=>{B5.delete(e),V5(e,t,n-1)},100);B5.set(e,i)}}var H5=`pangular-pref`,U5={order:[],hidden:[],pinned:[]};function W5(e){try{return localStorage.getItem(`${H5}:${e}`)}catch{return null}}function G5(e,t){try{t===null?localStorage.removeItem(`${H5}:${e}`):localStorage.setItem(`${H5}:${e}`,t)}catch{}}function Gme(){let e=W5(`theme`);return e===`light`||e===`dark`?e:`system`}function Kme(e){G5(`theme`,e===`system`?null:e)}function K5(e){if(!Array.isArray(e))return[];let t=e.filter(e=>typeof e==`string`&&e.length>0&&e.length<=40);return[...new Set(t)].slice(0,50)}function qme(){let e=W5(`tabs`);if(!e)return U5;try{let t=JSON.parse(e);if(!t||typeof t!=`object`||Array.isArray(t))return U5;let n=t;return{order:K5(n.order),hidden:K5(n.hidden),pinned:K5(n.pinned)}}catch{return U5}}function Jme(e){G5(`tabs`,!e.order.length&&!e.hidden.length&&!e.pinned.length?null:JSON.stringify(e))}function Yme(){return W5(`passive`)===`true`}function Xme(e){G5(`passive`,e?`true`:null)}function Zme(){return W5(`pill`)===`true`}function Qme(e){G5(`pill`,e?`true`:null)}function q5(e,t){let n=n=>{let r=t.order.indexOf(n);return r<0?t.order.length+e.indexOf(n):r},r=[...e].sort((e,t)=>n(e)-n(t));return[...r.filter(e=>t.pinned.includes(e)),...r.filter(e=>!t.pinned.includes(e))]}function $me(e,t,n){let r=new Map(e.map(e=>[e.id,e]));return q5(e.map(e=>e.id),t).filter(e=>e===n||t.pinned.includes(e)||!t.hidden.includes(e)).map(e=>r.get(e))}function J5(e,t,n,r){let i=q5(e,t),a=i.indexOf(n),o=a+r;if(a<0||o<0||o>=i.length)return t;let s=t.pinned.includes(n);if(t.pinned.includes(i[o])!==s)return t;let c=[...i];return[c[a],c[o]]=[c[o],c[a]],{...t,order:c}}function ehe(e,t,n){let r=e.hidden.filter(e=>e!==t);return{...e,hidden:n?[...r,t]:r,pinned:n?e.pinned.filter(e=>e!==t):e.pinned}}function the(e,t,n,r){let i=t.pinned.filter(e=>e!==n);return{order:q5(e,t),pinned:r?[...i,n]:i,hidden:r?t.hidden.filter(e=>e!==n):t.hidden}}function Y5(){try{let e=navigator;return/mac|iphone|ipad|ipod/i.test(e.userAgentData?.platform??e.platform??``)}catch{return!1}}function nhe(e=window){try{for(let t=e;t!==t.parent;t=t.parent){let e=t.frameElement?.getRootNode();if(e&&`host`in e&&e.host?.id===`pangular-popup-root`)return!0}}catch{}return!1}var rhe=`pangular-inspector-`;function X5(e=window){try{let t=e.top??e;return t.name.startsWith(rhe)&&t.opener&&t.opener!==t?t.opener:null}catch{return null}}function ihe(e=window){let t=X5(e);if(!t)return!1;let n;try{n=t.location.origin}catch{try{n=new URL(e.document.referrer).origin}catch{n=void 0}}if(!n||n===`null`)return!1;try{return t.postMessage({type:`pangular:popup-return`},n),!0}catch{return!1}}var ahe=class e{current=T(`dark`);preference=T(Gme());source=`dark`;sourceAttr=!1;constructor(){let e=x(ys),t=she(),n=document.documentElement.dataset.theme,r=n===`light`||n===`dark`;if(n===`light`||n===`dark`)this.fromSource(n,!0);else if(t)r=!0,this.fromSource(Z5(t),!0);else{let t=ohe();if(t){this.fromSource(t.matches?`light`:`dark`,!1);let n=e=>{r||this.fromSource(e.matches?`light`:`dark`,!1)};t.addEventListener(`change`,n),e.onDestroy(()=>t.removeEventListener(`change`,n))}else this.resolve()}let i;try{i=new BroadcastChannel(`pangular:theme`)}catch{}E(()=>{let e=this.current();try{i?.postMessage(e)}catch{}for(let{win:t,origin:n}of Q5())try{t.postMessage({type:`pangular:theme-change`,theme:e},n)}catch{}});let a=e=>{if(e.source!==window.parent)return;let t=e.data;t?.type===`pangular:theme-change`&&(r=!0,this.fromSource(t.theme===`dark`?`dark`:`light`,!0))};window.addEventListener(`message`,a);let o;t&&(o=new MutationObserver(()=>this.fromSource(Z5(t),!0)),o.observe(t,{attributes:!0,attributeFilter:[`class`]})),e.onDestroy(()=>{window.removeEventListener(`message`,a),o?.disconnect(),i?.close()})}setPreference(e){this.preference.set(e),Kme(e),this.resolve()}fromSource(e,t){this.source=e,this.sourceAttr=t,this.resolve()}resolve(){let e=this.preference(),t=e===`system`?this.source:e;this.current.set(t);let n=document.documentElement;e!==`system`||this.sourceAttr?n.dataset.theme=t:delete n.dataset.theme}static ɵfac=function(t){return new(t||e)};static ɵprov=El({token:e,factory:e.ɵfac})};function ohe(){try{return window.matchMedia?.(`(prefers-color-scheme: light)`)??null}catch{return null}}function Z5(e){return e.classList.contains(`dark`)?`dark`:`light`}function she(){try{return window.frameElement?.closest(`.devframes-color-root`)??null}catch{return null}}function Q5(e=window){let t=[],n;try{n=e.location.ancestorOrigins}catch{}let r=e;try{for(let i=0;r!==r.parent;i++){r=r.parent;let a=che(e,r,i,n);a&&t.push({win:r,origin:a})}}catch{}return t}function che(e,t,n,r){let i=e=>e&&e!==`null`?e:void 0,a=i(r?.item(n));if(a)return a;try{let e=i(t.location.origin);if(e)return e}catch{}if(!(n>0))try{return i(new URL(e.document.referrer).origin)}catch{return}}var lhe=`__DEVFRAME_HUB_CLIENT_CONTEXT__`;function $5(){try{return window.parent===window?void 0:window.parent[lhe]}catch{return}}function e7(e,t,n=50){let r=$5();if(!r){if(n<=0||window.parent===window)return()=>{};let r=()=>{},i=setTimeout(()=>r=e7(e,t,n-1),100);return()=>{clearTimeout(i),r()}}let i=e.map(e=>r.docks.getStateById(ZC(e))?.events.on(`entry:activated`,()=>t(e))??(()=>{})),a=r.docks.selectedId,o=e.find(e=>ZC(e)===a);return o&&t(o),()=>i.forEach(e=>e())}function t7(){return!!$5()}async function n7(e){let t=$5();if(!t)return!1;try{return await t.docks.switchEntry(ZC(e))}catch{return!1}}function uhe(){let e=$5()?.commands?.openPalette;if(typeof e!=`function`)return!1;try{return e(),!0}catch{return!1}}function dhe(e,t){let n=new URL(e);return n.searchParams.delete(`view`),n.hash=t?`tab=${t}`:``,n.pathname+n.search+n.hash}function fhe(e){return e.button===0&&!e.metaKey&&!e.ctrlKey&&!e.shiftKey&&!e.altKey}var r7=`pangular-tab`;function i7(e,t,n){let r=new URLSearchParams(e.replace(/^#/,``)).get(`tab`)||t;return n.find(e=>e===r)}function a7(e){try{return sessionStorage.getItem(`${r7}:${e}`)}catch{return null}}function phe(e,t){try{sessionStorage.setItem(`${r7}:${e}`,t)}catch{}}function mhe(e,t){try{return new URL(e,t.href).origin===t.origin}catch{return!1}}function hhe(e,t){if(t.protocol!==`chrome-extension:`)return!1;try{let{protocol:t}=new URL(e);return t===`http:`||t===`https:`}catch{return!1}}function ghe(e=location){let t=new URLSearchParams(e.search).get(`baseURL`);if(t&&(mhe(t,e)||hhe(t,e)))return t;if(!(e.pathname.includes(`__pangular`)||e.pathname.includes(`__devframes/`)))return[`/__pangular/`,`./`]}var o7=`__DEVFRAME_CONNECTION_AUTH_TOKEN__`,_he=`pangular-auth-token:`,vhe=`devframe-auth`,yhe={token:void 0,remember:()=>{}};function bhe(e,t=location){if(typeof e!=`string`)return null;try{let n=new URL(e,t.href).origin;return n===t.origin||n===`null`?null:n}catch{return null}}function xhe(e,t=location,n=Che(),r=globalThis){let i=bhe(e,t);if(!i||(She(r),!n))return yhe;let a=_he+i;try{n.removeItem(o7)}catch{}delete globalThis[o7];let o;try{o=n.getItem(a)||void 0}catch{o=void 0}return{get token(){return o},remember(e){try{if(n.removeItem(o7),!e||e===o)return;o=e,n.setItem(a,e)}catch{}}}}var s7=new WeakSet;function She(e=globalThis){let t=e.BroadcastChannel;if(typeof t==`function`&&!s7.has(t)){let n=class extends t{constructor(e){if(String(e)===vhe)throw Error(`The devframe-auth channel is off in a panel on another origin.`);super(e)}};s7.add(n),e.BroadcastChannel=n}let n=e.Storage?.prototype;if(n&&!s7.has(n)){s7.add(n);let{getItem:e,setItem:t}=n;n.getItem=function(t){return String(t)===o7?null:e.call(this,t)},n.setItem=function(e,n){String(e)!==o7&&t.call(this,e,n)}}}function Che(){try{return typeof localStorage>`u`?null:localStorage}catch{return null}}var c7=(()=>{class e{_renderer;_elementRef;onChange=e=>{};onTouched=()=>{};constructor(e,t){this._renderer=e,this._elementRef=t}setProperty(e,t){this._renderer.setProperty(this._elementRef.nativeElement,e,t)}registerOnTouched(e){this.onTouched=e}registerOnChange(e){this.onChange=e}setDisabledState(e){this.setProperty(`disabled`,e)}static ɵfac=function(t){return new(t||e)(Rp(rp),Rp(kl))};static ɵdir=sh({type:e})}return e})(),whe=(()=>{class e extends c7{static ɵfac=(()=>{let t;return function(n){return(t||=Sl(e))(n||e)}})();static ɵdir=sh({type:e,features:[_h]})}return e})(),l7=new Ei(``),The={provide:l7,useExisting:gi(()=>u7),multi:!0};function Ehe(){let e=gv()?gv().getUserAgent():``;return/android (\d+)/.test(e.toLowerCase())}var Dhe=new Ei(``),u7=(()=>{class e extends c7{_compositionMode;_composing=!1;constructor(e,t,n){super(e,t),this._compositionMode=n,this._compositionMode??=!Ehe()}writeValue(e){let t=e??``;this.setProperty(`value`,t)}_handleInput(e){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e)}_compositionStart(){this._composing=!0}_compositionEnd(e){this._composing=!1,this._compositionMode&&this.onChange(e)}static ɵfac=function(t){return new(t||e)(Rp(rp),Rp(kl),Rp(Dhe,8))};static ɵdir=sh({type:e,selectors:[[`input`,`formControlName`,``,3,`type`,`checkbox`,3,`ngNoCva`,``],[`textarea`,`formControlName`,``,3,`ngNoCva`,``],[`input`,`formControl`,``,3,`type`,`checkbox`,3,`ngNoCva`,``],[`textarea`,`formControl`,``,3,`ngNoCva`,``],[`input`,`ngModel`,``,3,`type`,`checkbox`,3,`ngNoCva`,``],[`textarea`,`ngModel`,``,3,`ngNoCva`,``],[``,`ngDefaultControl`,``]],hostBindings:function(e,t){e&1&&H(`input`,function(e){return t._handleInput(e.target.value)})(`blur`,function(){return t.onTouched()})(`compositionstart`,function(){return t._compositionStart()})(`compositionend`,function(e){return t._compositionEnd(e.target.value)})},standalone:!1,features:[I_([The]),_h]})}return e})();function d7(e){return e==null||f7(e)===0}function f7(e){return e==null?null:Array.isArray(e)||typeof e==`string`?e.length:e instanceof Set?e.size:null}var p7=new Ei(``),Ohe=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,m7=class{static min(e){return khe(e)}static max(e){return Ahe(e)}static required(e){return h7(e)}static requiredTrue(e){return jhe(e)}static email(e){return Mhe(e)}static minLength(e){return Nhe(e)}static maxLength(e){return Phe(e)}static pattern(e){return Fhe(e)}static nullValidator(e){return g7()}static compose(e){return S7(e)}static composeAsync(e){return w7(e)}};function khe(e){return t=>{if(t.value==null||e==null)return null;let n=parseFloat(t.value);return!isNaN(n)&&n{if(t.value==null||e==null)return null;let n=parseFloat(t.value);return!isNaN(n)&&n>e?{max:{max:e,actual:t.value}}:null}}function h7(e){return d7(e.value)?{required:!0}:null}function jhe(e){return e.value===!0?null:{required:!0}}function Mhe(e){return d7(e.value)||Ohe.test(e.value)?null:{email:!0}}function Nhe(e){return t=>{let n=t.value?.length??f7(t.value);return n===null||n===0?null:n{let n=t.value?.length??f7(t.value);return n!==null&&n>e?{maxlength:{requiredLength:e,actualLength:n}}:null}}function Fhe(e){if(!e)return g7;let t,n;return typeof e==`string`?(n=``,e.charAt(0)!==`^`&&(n+=`^`),n+=e,e.charAt(e.length-1)!==`$`&&(n+=`$`),t=new RegExp(n)):(n=e.toString(),t=e),e=>{if(d7(e.value))return null;let r=e.value;return t.test(r)?null:{pattern:{requiredPattern:n,actualValue:r}}}}function g7(e){return null}function _7(e){return e!=null}function v7(e){return Qm(e)?Aee(e):e}function y7(e){let t={};return e.forEach(e=>{t=e==null?t:{...t,...e}}),Object.keys(t).length===0?null:t}function b7(e,t){return t.map(t=>t(e))}function Ihe(e){return!e.validate}function x7(e){return e.map(e=>Ihe(e)?e:t=>e.validate(t))}function S7(e){if(!e)return null;let t=e.filter(_7);return t.length==0?null:function(e){return y7(b7(e,t))}}function C7(e){return e==null?null:S7(x7(e))}function w7(e){if(!e)return null;let t=e.filter(_7);return t.length==0?null:function(e){return Vee(b7(e,t).map(v7)).pipe(li(y7))}}function T7(e){return e==null?null:w7(x7(e))}function E7(e){return e?Array.isArray(e)?e:[e]:[]}function D7(e,t){return Array.isArray(e)?e.includes(t):e===t}function O7(e,t){let n=E7(t);return E7(e).forEach(e=>{D7(n,e)||n.push(e)}),n}function k7(e,t){return E7(t).filter(t=>!D7(e,t))}var Lhe=class{get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators=[];_rawAsyncValidators=[];_setValidators(e){this._rawValidators=e||[],this._composedValidatorFn=C7(this._rawValidators)}_setAsyncValidators(e){this._rawAsyncValidators=e||[],this._composedAsyncValidatorFn=T7(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_onDestroyCallbacks=[];_registerOnDestroy(e){this._onDestroyCallbacks.push(e)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(e=>e()),this._onDestroyCallbacks=[]}reset(e=void 0){this.control?.reset(e)}hasError(e,t){return this.control?this.control.hasError(e,t):!1}getError(e,t){return this.control?this.control.getError(e,t):null}},A7=`VALID`,j7=`INVALID`,M7=`PENDING`,N7=`DISABLED`,P7=class{},F7=class extends P7{value;source;constructor(e,t){super(),this.value=e,this.source=t}},I7=class extends P7{pristine;source;constructor(e,t){super(),this.pristine=e,this.source=t}},L7=class extends P7{touched;source;constructor(e,t){super(),this.touched=e,this.source=t}},R7=class extends P7{status;source;constructor(e,t){super(),this.status=e,this.source=t}},z7=class extends P7{source;constructor(e){super(),this.source=e}};function Rhe(e){return Array.isArray(e)?C7(e):e||null}function zhe(e){return Array.isArray(e)?T7(e):e||null}function Bhe(e){return e!=null&&!Array.isArray(e)&&typeof e==`object`}var Vhe=class{_pendingDirty=!1;_hasOwnPendingAsyncValidator=null;_pendingTouched=!1;_onCollectionChange=()=>{};_updateOn;_hasRequired=T(!1);_parent=null;_asyncValidationSubscription;_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators;_rawAsyncValidators;value;constructor(e,t){this._assignValidators(e),this._assignAsyncValidators(t)}get validator(){return this._composedValidatorFn}set validator(e){this._rawValidators=this._composedValidatorFn=e,this._updateHasRequiredValidator()}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(e){this._rawAsyncValidators=this._composedAsyncValidatorFn=e}get parent(){return this._parent}get status(){return Z(this.statusReactive)}set status(e){Z(()=>this.statusReactive.set(e))}_status=X(()=>this.statusReactive());statusReactive=T(void 0);get valid(){return this.status===A7}get invalid(){return this.status===j7}get pending(){return this.status===M7}get disabled(){return this.status===N7}get enabled(){return this.status!==N7}errors;get pristine(){return Z(this.pristineReactive)}set pristine(e){Z(()=>this.pristineReactive.set(e))}_pristine=X(()=>this.pristineReactive());pristineReactive=T(!0);get dirty(){return!this.pristine}get touched(){return Z(this.touchedReactive)}set touched(e){Z(()=>this.touchedReactive.set(e))}_touched=X(()=>this.touchedReactive());touchedReactive=T(!1);get untouched(){return!this.touched}_events=new Hr;events=this._events.asObservable();valueChanges;statusChanges;get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:`change`}setValidators(e){this._assignValidators(e)}setAsyncValidators(e){this._assignAsyncValidators(e)}addValidators(e){this.setValidators(O7(e,this._rawValidators))}addAsyncValidators(e){this.setAsyncValidators(O7(e,this._rawAsyncValidators))}removeValidators(e){this.setValidators(k7(e,this._rawValidators))}removeAsyncValidators(e){this.setAsyncValidators(k7(e,this._rawAsyncValidators))}hasValidator(e){return D7(this._rawValidators,e)}hasAsyncValidator(e){return D7(this._rawAsyncValidators,e)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(e={}){let t=this.touched===!1;this.touched=!0;let n=e.sourceControl??this;e.onlySelf||this._parent?.markAsTouched({...e,sourceControl:n}),t&&e.emitEvent!==!1&&this._events.next(new L7(!0,n))}markAllAsDirty(e={}){this.markAsDirty({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:this}),this._forEachChild(t=>t.markAllAsDirty(e))}markAllAsTouched(e={}){this.markAsTouched({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:this}),this._forEachChild(t=>t.markAllAsTouched(e))}markAsUntouched(e={}){let t=this.touched===!0;this.touched=!1,this._pendingTouched=!1;let n=e.sourceControl??this;this._forEachChild(t=>{t.markAsUntouched({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:n})}),e.onlySelf||this._parent?._updateTouched(e,n),t&&e.emitEvent!==!1&&this._events.next(new L7(!1,n))}markAsDirty(e={}){let t=this.pristine===!0;this.pristine=!1;let n=e.sourceControl??this;e.onlySelf||this._parent?.markAsDirty({...e,sourceControl:n}),t&&e.emitEvent!==!1&&this._events.next(new I7(!1,n))}markAsPristine(e={}){let t=this.pristine===!1;this.pristine=!0,this._pendingDirty=!1;let n=e.sourceControl??this;this._forEachChild(t=>{t.markAsPristine({onlySelf:!0,emitEvent:e.emitEvent})}),e.onlySelf||this._parent?._updatePristine(e,n),t&&e.emitEvent!==!1&&this._events.next(new I7(!0,n))}markAsPending(e={}){this.status=M7;let t=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new R7(this.status,t)),this.statusChanges.emit(this.status)),e.onlySelf||this._parent?.markAsPending({...e,sourceControl:t})}disable(e={}){let t=this._parentMarkedDirty(e.onlySelf);this.status=N7,this.errors=null,this._forEachChild(t=>{t.disable({...e,onlySelf:!0})}),this._updateValue();let n=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new F7(this.value,n)),this._events.next(new R7(this.status,n)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors({...e,skipPristineCheck:t},this),this._onDisabledChange.forEach(e=>e(!0))}enable(e={}){let t=this._parentMarkedDirty(e.onlySelf);this.status=A7,this._forEachChild(t=>{t.enable({...e,onlySelf:!0})}),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent}),this._updateAncestors({...e,skipPristineCheck:t},this),this._onDisabledChange.forEach(e=>e(!1))}_updateAncestors(e,t){e.onlySelf||(this._parent?.updateValueAndValidity(e),e.skipPristineCheck||this._parent?._updatePristine({},t),this._parent?._updateTouched({},t))}setParent(e){this._parent=e}getRawValue(){return this.value}updateValueAndValidity(e={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let t=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===A7||this.status===M7)&&this._runAsyncValidator(t,e.emitEvent)}let t=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new F7(this.value,t)),this._events.next(new R7(this.status,t)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),e.onlySelf||this._parent?.updateValueAndValidity({...e,sourceControl:t})}_updateTreeValidity(e={emitEvent:!0}){this._forEachChild(t=>t._updateTreeValidity(e)),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?N7:A7}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(e,t){if(this.asyncValidator){this.status=M7,this._hasOwnPendingAsyncValidator={emitEvent:t!==!1,shouldHaveEmitted:e!==!1};let n=v7(this.asyncValidator(this));this._asyncValidationSubscription=n.subscribe(n=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(n,{emitEvent:t,shouldHaveEmitted:e})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let e=(this._hasOwnPendingAsyncValidator?.emitEvent||this._hasOwnPendingAsyncValidator?.shouldHaveEmitted)??!1;return this._hasOwnPendingAsyncValidator=null,e}return!1}setErrors(e,t={}){this.errors=e,this._updateControlsErrors(t.emitEvent!==!1,this,t.shouldHaveEmitted)}get(e){let t=e;return t==null||(Array.isArray(t)||(t=t.split(`.`)),t.length===0)?null:t.reduce((e,t)=>e&&e._find(t),this)}getError(e,t){let n=t?this.get(t):this;return n?.errors?n.errors[e]:null}hasError(e,t){return!!this.getError(e,t)}get root(){let e=this;for(;e._parent;)e=e._parent;return e}_updateControlsErrors(e,t,n){this.status=this._calculateStatus(),e&&this.statusChanges.emit(this.status),(e||n)&&this._events.next(new R7(this.status,t)),this._parent&&this._parent._updateControlsErrors(e,t,n)}_initObservables(){this.valueChanges=new ws,this.statusChanges=new ws}_calculateStatus(){return this._allControlsDisabled()?N7:this.errors?j7:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(M7)?M7:this._anyControlsHaveStatus(j7)?j7:A7}_anyControlsHaveStatus(e){return this._anyControls(t=>t.status===e)}_anyControlsDirty(){return this._anyControls(e=>e.dirty)}_anyControlsTouched(){return this._anyControls(e=>e.touched)}_updatePristine(e,t){let n=!this._anyControlsDirty(),r=this.pristine!==n;this.pristine=n,e.onlySelf||this._parent?._updatePristine(e,t),r&&this._events.next(new I7(this.pristine,t))}_updateTouched(e={},t){this.touched=this._anyControlsTouched(),this._events.next(new L7(this.touched,t)),e.onlySelf||this._parent?._updateTouched(e,t)}_onDisabledChange=[];_registerOnCollectionChange(e){this._onCollectionChange=e}_setUpdateStrategy(e){Bhe(e)&&e.updateOn!=null&&(this._updateOn=e.updateOn)}_parentMarkedDirty(e){return!e&&!!this._parent?.dirty&&!this._parent._anyControlsDirty()}_find(e){return null}_assignValidators(e){this._rawValidators=Array.isArray(e)?e.slice():e,this._composedValidatorFn=Rhe(this._rawValidators),this._updateHasRequiredValidator()}_assignAsyncValidators(e){this._rawAsyncValidators=Array.isArray(e)?e.slice():e,this._composedAsyncValidatorFn=zhe(this._rawAsyncValidators)}_updateHasRequiredValidator(){Z(()=>this._hasRequired.set(this.hasValidator(m7.required)))}};function B7(e){return e.tagName===`INPUT`||e.tagName===`SELECT`||e.tagName===`TEXTAREA`}function Hhe(e){if(e.tagName!==`INPUT`)return!1;let t=e.type;return t===`number`||t===`range`||t===`date`||t===`month`}function Uhe(e){return e.tagName===`INPUT`||e.tagName===`TEXTAREA`}function V7(e,t,n,r){switch(n){case`name`:e.setAttribute(t,n,r);break;case`disabled`:case`readonly`:case`required`:r?e.setAttribute(t,n,``):e.removeAttribute(t,n);break;case`max`:case`min`:case`minLength`:case`maxLength`:r===void 0?e.removeAttribute(t,n):e.setAttribute(t,n,r.toString())}}var Whe=class{kind;context;control;message;constructor({kind:e,context:t,control:n}){this.kind=e,this.context=t,this.control=n}},Ghe=(()=>{class e{_validator=g7;_onChange;_enabled;ngOnChanges(e){if(this.inputName in e){let t=this.normalizeInput(e[this.inputName].currentValue);this._enabled=this.enabled(t),this._validator=this._enabled?this.createValidator(t):g7,this._onChange?.()}}validate(e){return this._validator(e)}registerOnValidatorChange(e){this._onChange=e}enabled(e){return e!=null}static ɵfac=function(t){return new(t||e)};static ɵdir=sh({type:e,features:[xc]})}return e})(),Khe={provide:p7,useExisting:gi(()=>H7),multi:!0},H7=(()=>{class e extends Ghe{required;inputName=`required`;normalizeInput=dv;createValidator=e=>h7;enabled(e){return e}static ɵfac=(()=>{let t;return function(n){return(t||=Sl(e))(n||e)}})();static ɵdir=sh({type:e,selectors:[[``,`required`,``,`formControlName`,``,3,`type`,`checkbox`],[``,`required`,``,`formControl`,``,3,`type`,`checkbox`],[``,`required`,``,`ngModel`,``,3,`type`,`checkbox`]],hostVars:1,hostBindings:function(e,t){e&2&&k(`required`,t._enabled?``:null)},inputs:{required:`required`},standalone:!1,features:[I_([Khe]),_h]})}return e})(),qhe=new Ei(``);function Jhe(e){return Object.getPrototypeOf(e.constructor)===whe}function U7(e,t){if(!t)return null;let n,r,i;return t.forEach(e=>{e.constructor===u7?n=e:Jhe(e)?r=e:i=e}),i||r||n||null}var Yhe=class extends Lhe{_parent=null;name=null;valueAccessor=null;isCustomControlBased=!1;userOnReset;resetSubscription;set onReset(e){this.userOnReset=e,this.resetSubscription?.unsubscribe(),this.resetSubscription=void 0,this.control&&(this.resetSubscription=this.control.events.subscribe(e=>{e instanceof z7&&this.control&&this.userOnReset?.(this.control.value)}),this.subscription?.add(this.resetSubscription))}isNativeFormElement=!1;rawValueAccessors;_selectedValueAccessor=null;get selectedValueAccessor(){return this._selectedValueAccessor??=U7(this,this.rawValueAccessors)}parseErrorsValidator=null;renderer;injector;requiredValidatorViaDi;subscription;customControlBindings=null;constructor(e,t,n){super(),this.injector=e,this.renderer=t,this.rawValueAccessors=n,this.injector?.get(ys)?.onDestroy(()=>{this.removeParseErrorsValidator(this.control),this.subscription?.unsubscribe()})}setupCustomControl(){this.subscription?.unsubscribe();let e=this.injector?.get(Cne);if(!this.control||!e)return;let t=e.markForCheck.bind(e);this.subscription=new or,this.subscription.add(this.control.valueChanges.subscribe(t)),this.subscription.add(this.control.statusChanges.subscribe(t)),this.resetSubscription?.unsubscribe(),this.resetSubscription=void 0,this.userOnReset&&(this.resetSubscription=this.control.events.subscribe(e=>{e instanceof z7&&this.control&&this.userOnReset?.(this.control.value)}),this.subscription.add(this.resetSubscription)),this.parseErrorsValidator&&this.control.addValidators(this.parseErrorsValidator)}ngControlCreate(e){!e.nativeElement.hasAttribute?.(`ngNoCva`)&&(this.rawValueAccessors&&this.rawValueAccessors.length>0||this.valueAccessor!==null)||!e.customControl||(this.isCustomControlBased=!0,e.listenToCustomControlModel(e=>{this.control?.markAsDirty(),this.control?.setValue(e,{emitModelToViewChange:!1}),this.viewToModelUpdate(e)}),e.listenToCustomControlOutput(`touch`,()=>{this.control?.markAsTouched()}),this.customControlBindings={},this.isNativeFormElement=B7(e.nativeElement),this.requiredValidatorViaDi=this._rawValidators.find(e=>e instanceof H7))}ngControlUpdate(e,t){if(!this.isCustomControlBased)return;let n=this.control,r=this.customControlBindings;Object.is(r.value,n.value)||(r.value=n.value,e.setCustomControlModelInput(n.value)),this.bindControlProperty(e,r,`touched`,n.touched),this.bindControlProperty(e,r,`dirty`,n.dirty),this.bindControlProperty(e,r,`valid`,n.valid),this.bindControlProperty(e,r,`invalid`,n.invalid),this.bindControlProperty(e,r,`pending`,n.pending),this.bindControlProperty(e,r,`disabled`,n.disabled),this.shouldBindRequired&&this.bindControlProperty(e,r,`required`,this.isRequired);let i=n.errors;if(r.errors!==i){r.errors=i;let t=this._convertErrors(i);e.setInputOnDirectives(`errors`,t)}}get isRequired(){return(this.requiredValidatorViaDi?._enabled||this.control?._hasRequired())??!1}get shouldBindRequired(){return!0}bindControlProperty(e,t,n,r){if(t[n]===r)return;t[n]=r;let i=e.setInputOnDirectives(n,r);this.isNativeFormElement&&!i&&(n===`disabled`||n===`required`)&&this.renderer&&V7(this.renderer,e.nativeElement,n,r)}_convertErrors(e){if(e===null)return[];let t=this.control;return Object.entries(e).map(([e,n])=>new Whe({context:n,kind:e,control:t}))}setParseErrorSource(e){if(e===void 0)return;let t=null,n=X(()=>{let t=e();return t.length===0?null:t.reduce((e,t)=>(e[t.kind]=t,e),{})});this.parseErrorsValidator=(()=>t).bind(this),E(()=>{t=n(),this.control?.updateValueAndValidity({emitEvent:!1})},{injector:this.injector})}removeParseErrorsValidator(e){this.parseErrorsValidator&&(e?.removeValidators(this.parseErrorsValidator),e?.updateValueAndValidity({emitEvent:!1}))}},Xhe=Symbol(`FIELD_TREE`),W7=0;function Zhe(){return W7}function G7(e,t){return(...n)=>{try{return W7=t,e(...n)}finally{W7=0}}}function Qhe(e){return!e}function K7(e){return e}function q7(e){return Array.isArray(e)}function J7(e){return(typeof e==`object`||typeof e==`function`)&&e!=null}var Y7=Symbol(),X7=Symbol(),Z7=class{predicates;fns=[];constructor(e){this.predicates=e}push(e){this.fns.push(e9(this.predicates,e))}mergeIn(e){let t=this.predicates?e.fns.map(e=>e9(this.predicates,e)):e.fns;this.fns.push(...t)}hasRules(){return this.fns.length>0}},Q7=class extends Z7{get defaultValue(){return!1}compute(e){return this.fns.some(t=>{let n=t(e);return n&&n!==X7})}},$7=class e extends Z7{ignore;static ignoreNull(t){return new e(t,e=>e===null)}constructor(e,t){super(e),this.ignore=t}get defaultValue(){return[]}compute(e){return this.fns.reduce((t,n)=>{let r=n(e);return r===void 0||r===X7?t:q7(r)?[...t,...this.ignore?r.filter(e=>!this.ignore(e)):r]:this.ignore&&this.ignore(r)?t:[...t,r]},[])}},$he=class extends $7{constructor(e){super(e,void 0)}},ege=class extends Z7{key;get defaultValue(){return this.key.reducer.getInitial()}constructor(e,t){super(e),this.key=t}compute(e){if(this.fns.length===0)return this.key.reducer.getInitial();let t=this.key.reducer.getInitial();for(let n=0;n{for(let t of e){let e=n.stateOf(t.path),r=Z(e.structure.pathKeys).length-t.depth;for(let t=0;t0}hasMetadata(e){return this.metadata.has(e)}hasMetadataKeys(){return this.metadata.size>0}getMetadataKeys(){return this.metadata.keys()}getMetadata(e){return this.metadata.has(e)||this.metadata.set(e,new ege(this.predicates,e)),this.metadata.get(e)}mergeIn(e){this.hidden.mergeIn(e.hidden),this.disabledReasons.mergeIn(e.disabledReasons),this.readonly.mergeIn(e.readonly),this.syncErrors.mergeIn(e.syncErrors),this.syncTreeErrors.mergeIn(e.syncTreeErrors),this.asyncErrors.mergeIn(e.asyncErrors);for(let t of e.getMetadataKeys()){let n=e.metadata.get(t);this.getMetadata(t).mergeIn(n)}}},n9=class{depth;constructor(e){this.depth=e}build(){return new a9(this,[],0)}},r9=class e extends n9{constructor(e){super(e)}current;all=[];addHiddenRule(e){this.getCurrent().addHiddenRule(e)}addDisabledReasonRule(e){this.getCurrent().addDisabledReasonRule(e)}addReadonlyRule(e){this.getCurrent().addReadonlyRule(e)}addSyncErrorRule(e){this.getCurrent().addSyncErrorRule(e)}addSyncTreeErrorRule(e){this.getCurrent().addSyncTreeErrorRule(e)}addAsyncErrorRule(e){this.getCurrent().addAsyncErrorRule(e)}addMetadataRule(e,t){this.getCurrent().addMetadataRule(e,t)}getChild(e){if(e===Y7){let e=this.getCurrent().children;e.size>+!!e.has(Y7)&&(this.current=void 0)}return this.getCurrent().getChild(e)}hasLogic(e){return this===e||this.all.some(({builder:t})=>t.hasLogic(e))}hasRules(){return this.all.length>0}anyChildHasLogic(){return this.all.some(({builder:e})=>e.anyChildHasLogic())}mergeIn(e,t){t?this.all.push({builder:e,predicate:{fn:G7(t.fn,this.depth),path:t.path}}):this.all.push({builder:e}),this.current=void 0}getCurrent(){return this.current===void 0&&(this.current=new i9(this.depth),this.all.push({builder:this.current})),this.current}static newRoot(){return new e(0)}},i9=class extends n9{logic=new t9([]);children=new Map;constructor(e){super(e)}addHiddenRule(e){this.logic.hidden.push(G7(e,this.depth))}addDisabledReasonRule(e){this.logic.disabledReasons.push(G7(e,this.depth))}addReadonlyRule(e){this.logic.readonly.push(G7(e,this.depth))}addSyncErrorRule(e){this.logic.syncErrors.push(G7(e,this.depth))}addSyncTreeErrorRule(e){this.logic.syncTreeErrors.push(G7(e,this.depth))}addAsyncErrorRule(e){this.logic.asyncErrors.push(G7(e,this.depth))}addMetadataRule(e,t){this.logic.getMetadata(e).push(G7(t,this.depth))}getChild(e){return this.children.has(e)||this.children.set(e,new r9(this.depth+1)),this.children.get(e)}hasLogic(e){return this===e}hasRules(){return this.logic.hasAnyLogic()||this.children.size>0}anyChildHasLogic(){for(let e of this.children.values())if(e.hasRules())return!0;return!1}},a9=class e{builder;predicates;depth;logic;constructor(e,t,n){this.builder=e,this.predicates=t,this.depth=n,this.logic=e?nge(e,t,n):new t9([])}getChild(t){let n=this.builder?o9(this.builder,t):[];if(n.length===0)return new e(void 0,[],this.depth+1);if(n.length===1){let{builder:t,predicates:r}=n[0];return new e(t,[...this.predicates,...r.map(e=>s9(e,this.depth))],this.depth+1)}return new tge(n.map(({builder:t,predicates:n})=>new e(t,[...this.predicates,...n.map(e=>s9(e,this.depth))],this.depth+1)))}hasLogic(e){return this.builder?this.builder.hasLogic(e):!1}hasRules(){return this.builder?this.builder.hasRules():!1}anyChildHasLogic(){return this.builder?this.builder.anyChildHasLogic():!1}},tge=class e{all;logic;constructor(e){this.all=e,this.logic=new t9([]);for(let t of e)this.logic.mergeIn(t.logic)}getChild(t){return new e(this.all.flatMap(e=>e.getChild(t)))}hasLogic(e){return this.all.some(t=>t.hasLogic(e))}hasRules(){return this.all.some(e=>e.hasRules())}anyChildHasLogic(){return this.all.some(e=>e.anyChildHasLogic())}};function o9(e,t){if(e instanceof r9)return e.all.flatMap(({builder:e,predicate:n})=>{let r=o9(e,t);return n?r.map(({builder:e,predicates:t})=>({builder:e,predicates:[...t,n]})):r});if(e instanceof i9)return[...t!==Y7&&e.children.has(Y7)?[{builder:e.getChild(Y7),predicates:[]}]:[],...e.children.has(t)?[{builder:e.getChild(t),predicates:[]}]:[]];throw new di(1909,!1)}function nge(e,t,n){let r=new t9(t);if(e instanceof r9){let i=e.all.map(({builder:e,predicate:r})=>new a9(e,r?[...t,s9(r,n)]:t,n));for(let e of i)r.mergeIn(e.logic)}else if(e instanceof i9)r.mergeIn(e.logic);else throw new di(1909,!1);return r}function s9(e,t){return{...e,depth:t}}var c9=Symbol(`PATH`),l9=class e{keys;parent;keyInParent;root;children=new Map;fieldPathProxy=new Proxy(this,rge);logicBuilder;constructor(e,t,n,r){this.keys=e,this.parent=n,this.keyInParent=r,this.root=t??this,n||(this.logicBuilder=r9.newRoot())}get builder(){return this.logicBuilder?this.logicBuilder:this.parent.builder.getChild(this.keyInParent)}getChild(t){return this.children.has(t)||this.children.set(t,new e([...this.keys,t],this.root,this,t)),this.children.get(t)}mergeIn(e,t){let n=e.compile();this.builder.mergeIn(n.builder,t)}static unwrapFieldPath(e){return e[c9]}static newRoot(){return new e([],void 0,void 0,void 0)}},rge={get(e,t){return t===c9?e:e.getChild(t).fieldPathProxy}},u9=void 0,d9=new Map,f9=class e{schemaFn;constructor(e){this.schemaFn=e}compile(){if(d9.has(this))return d9.get(this);let e=l9.newRoot();d9.set(this,e);let t=u9;try{u9=e,this.schemaFn(e.fieldPathProxy)}finally{u9=t}return e}static create(t){return t instanceof e?t:new e(t)}static rootCompile(t){try{return d9.clear(),t===void 0?l9.newRoot():t instanceof e?t.compile():new e(t).compile()}finally{d9.clear()}}};function ige(e){return e instanceof f9||typeof e==`function`}function p9(e){if(u9!==l9.unwrapFieldPath(e).root)throw new di(1908,!1)}function m9(e,t,n){return p9(e),l9.unwrapFieldPath(e).builder.addMetadataRule(t,n),t}var h9={list(){return{reduce:(e,t)=>t===void 0?e:[...e,t],getInitial:()=>[]}},min(){return{reduce:(e,t)=>e===void 0||t===void 0?e??t:tvoid 0}},max(){return{reduce:(e,t)=>e===void 0||t===void 0?e??t:t>e?t:e,getInitial:()=>void 0}},or(){return{reduce:(e,t)=>e||t,getInitial:()=>!1}},and(){return{reduce:(e,t)=>e&&t,getInitial:()=>!0}},override:age};function age(e){return{reduce:(e,t)=>t,getInitial:()=>e?.()}}var g9=Symbol(`IS_ASYNC_VALIDATION_RESOURCE`),oge=class{reducer;create;brand;[g9];constructor(e,t){this.reducer=e,this.create=t}};function _9(e){return new oge(e??h9.override())}function v9(){return _9()}var y9=_9(h9.or()),sge=v9(),cge=v9(),lge=_9(h9.max()),uge=_9(h9.min()),dge=_9(h9.list());function b9(e,t){if(e===t)return!0;if(!e||!t||e.length!==t.length)return!1;for(let n=0;n0?`invalid`:e.pending()?`unknown`:`valid`}var pge=class{node;constructor(e){this.node=e}rawSyncTreeErrors=X(()=>this.shouldSkipValidation()?[]:[...this.node.logicNode.logic.syncTreeErrors.compute(this.node.context),...this.node.structure.parent?.validationState.rawSyncTreeErrors()??[]],{equal:b9});syncErrors=X(()=>this.shouldSkipValidation()?[]:[...this.node.logicNode.logic.syncErrors.compute(this.node.context),...this.syncTreeErrors(),...mge(this.node.submitState.submissionErrors())],{equal:b9});syncValid=X(()=>this.shouldSkipValidation()?!0:this.node.structure.reduceChildren(this.syncErrors().length===0,(e,t)=>t&&e.validationState.syncValid(),Qhe));syncTreeErrors=X(()=>this.rawSyncTreeErrors().filter(e=>e.fieldTree===this.node.fieldTree),{equal:b9});rawAsyncErrors=X(()=>this.shouldSkipValidation()?[]:[...this.node.logicNode.logic.asyncErrors.compute(this.node.context),...this.node.structure.parent?.validationState.rawAsyncErrors()??[]],{equal:b9});asyncErrors=X(()=>this.shouldSkipValidation()?[]:this.rawAsyncErrors().filter(e=>e===`pending`||e.fieldTree===this.node.fieldTree),{equal:b9});parseErrors=X(()=>this.node.formFieldBindings().flatMap(e=>e.parseErrors()),{equal:b9});errors=X(()=>[...this.parseErrors(),...this.syncErrors(),...this.asyncErrors().filter(e=>e!==`pending`)],{equal:b9});errorSummary=X(()=>{let e=this.node.structure.reduceChildren(this.errors(),(e,t)=>[...t,...e.errorSummary()]);return Z(()=>e.sort(hge)),e},{equal:b9});pending=X(()=>this.node.structure.reduceChildren(this.asyncErrors().includes(`pending`),(e,t)=>t||e.validationState.pending()));status=X(()=>{if(this.shouldSkipValidation())return`valid`;let e=fge(this);return this.node.structure.reduceChildren(e,(e,t)=>t===`invalid`||e.validationState.status()===`invalid`?`invalid`:t===`unknown`||e.validationState.status()===`unknown`?`unknown`:`valid`,e=>e===`invalid`)});valid=X(()=>this.status()===`valid`);invalid=X(()=>this.status()===`invalid`);shouldSkipValidation=X(()=>this.node.hidden()||this.node.disabled()||this.node.readonly()||this.node.structure.isOrphaned())};function mge(e){return e===void 0?[]:q7(e)?e:[e]}function x9(e,t){if(q7(e))for(let n of e)n.fieldTree??=t;else e&&(e.fieldTree??=t);return e}function S9(e){return e.formField?e.formField.element:e.fieldTree().formFieldBindings().reduce((e,t)=>!e||!t.element?e??t.element:e.compareDocumentPosition(t.element)&Node.DOCUMENT_POSITION_PRECEDING?t.element:e,void 0)}function hge(e,t){let n=S9(e),r=S9(t);return n===r?0:n===void 0||r===void 0?n===void 0?1:-1:n.compareDocumentPosition(r)&Node.DOCUMENT_POSITION_PRECEDING?1:-1}var C9=_9(),gge=class{node;cache=new WeakMap;constructor(e){this.node=e,this.fieldTreeOf=this.fieldTreeOf.bind(this),this.stateOf=this.stateOf.bind(this)}resolve(e){if(!this.cache.has(e)){let t=X(()=>{let t=l9.unwrapFieldPath(e),n=this.node,r=Zhe();for(;r>0||!n.structure.logic.hasLogic(t.root.builder);)if(r--,n=n.structure.parent,n===void 0)throw new di(1900,!1);for(let e of t.keys)if(n=n.structure.getChild(e),n===void 0)throw new di(1901,!1);return n.fieldTree});this.cache.set(e,t)}return this.cache.get(e)()}get fieldTree(){return this.node.fieldProxy}get state(){return this.node}get value(){return this.node.structure.value}get key(){return this.node.structure.keyInParent}get pathKeys(){return this.node.structure.pathKeys}index=X(()=>{let e=this.key();if(!q7(Z(this.node.structure.parent.value)))throw new di(1906,!1);return Number(e)});fieldTreeOf(e){return this.resolve(e)}stateOf(e){return this.resolve(e)()}valueOf=e=>{let t=this.resolve(e)().value();if(t instanceof Vhe)throw new di(1907,!1);return t}},_ge=class{node;metadata=new Map;constructor(e){this.node=e}runMetadataCreateLifecycle(){if(!this.node.logicNode.logic.hasMetadataKeys())return;let e=yne();e&&Q_(!1);try{Z(()=>Qa(this.node.structure.injector,()=>{for(let e of this.node.logicNode.logic.getMetadataKeys())if(e.create){let t=this.node.logicNode.logic.getMetadata(e),n=e.create(this.node,X(()=>t.compute(this.node.context)));this.metadata.set(e,n)}}))}finally{e&&Q_(!0)}}get(e){if(this.has(e)&&!this.metadata.has(e)){if(e.create)throw new di(1912,!1);let t=this.node.logicNode.logic.getMetadata(e);this.metadata.set(e,X(()=>t.compute(this.node.context)))}return this.metadata.get(e)}has(e){return this.node.logicNode.logic.hasMetadata(e)}},vge={get(e,t,n){if(t===Xhe)return!0;let r=e(),i=r.structure.getChild(t);if(i!==void 0)return i.fieldTree;let a=Z(r.value);if(q7(a)){if(t===`length`)return r.value().length;if(t===Symbol.iterator)return()=>(r.value(),Array.prototype[Symbol.iterator].apply(r.fieldTree))}if(J7(a)&&t===Symbol.iterator)return function*(){for(let e in n)yield[e,n[e]]}},getOwnPropertyDescriptor(e,t){let n=Z(e().value),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&!r.configurable&&(r.configurable=!0),r},ownKeys(e){let t=Z(e().value);return typeof t==`object`&&t?Reflect.ownKeys(t):[]}};function yge(e,t){let n=X(()=>e()[t()]);return n[en]=e[en],n.set=r=>{Object.is(Z(n),r)||e.update(e=>bge(e,r,t()))},n.update=e=>{n.set(e(Z(n)))},n.asReadonly=()=>n,n}function bge(e,t,n){if(q7(e)){let r=[...e];return r[n]=t,r}return{...e,[n]:t}}var w9=Symbol(``),T9=X(()=>!1),E9=class{logic;node;createChildNode;identitySymbol=Symbol();_injector=void 0;_anyChildHasLogic;get injector(){return this._injector??=_s.create({providers:[],parent:this.fieldManager.injector}),this._injector}constructor(e,t,n){this.logic=e,this.node=t,this.createChildNode=n}children(){this.ensureChildrenMap();let e=this.childrenMap();return e===void 0?[]:Array.from(e.byPropertyKey.values()).map(e=>Z(e.reader))}materializedChildren(){let e=this.childrenMap();return e===void 0?[]:Array.from(e.byPropertyKey.values()).map(e=>e.node)}_areChildrenMaterialized(){return Z(this.childrenMap)!==void 0}ensureChildrenMap(){this._areChildrenMaterialized()||Z(()=>{this.childrenMap.update(e=>this.computeChildrenMap(this.value(),e,!0))})}getChild(e){this.ensureChildrenMap();let t=e.toString(),n=Z(this.childrenMap)?.byPropertyKey.get(t)?.reader;return n||=this.createReader(t),n()}reduceChildren(e,t,n){let r=this.childrenMap();if(!r)return e;let i=e;for(let e of r.byPropertyKey.values()){if(n?.(i))break;i=t(Z(e.reader),i)}return i}destroy(){this.injector.destroy()}createKeyOrOrphanSignals(e,t,n){if(e===`root`)return{keyInParent:D9,isOrphaned:T9};let r=this.parent,i=n,a=X(()=>{if(r.structure.isOrphaned())return w9;let e=r.structure.childrenMap();if(!e)return w9;let n=e.byPropertyKey.get(i);if(n&&n.node===this.node)return i;if(t===void 0)return w9;for(let[t,n]of e.byPropertyKey)if(n.node===this.node)return i=t;return w9}),o=X(()=>a()===w9);return{keyInParent:X(()=>{let e=a();if(e===w9)throw t===void 0?new di(-1902,!1):new di(1904,!1);return e}),isOrphaned:o}}createChildrenMap(){return Q({source:this.value,computation:(e,t)=>this.computeChildrenMap(e,t?.value,!1)})}computeChildrenMap(e,t,n){if(!J7(e)||!n&&t===void 0&&!(this._anyChildHasLogic??=this.logic.anyChildHasLogic()))return;t??={byPropertyKey:new Map};let r,i=q7(e);t!==void 0&&(r=i?wge(t,e,this.identitySymbol):Tge(t,e));for(let n of Object.keys(e)){let a,o=e[n];if(o===void 0){t.byPropertyKey.has(n)&&(r??={...t},r.byPropertyKey.delete(n));continue}i&&J7(o)&&!q7(o)&&(a=o[this.identitySymbol]??=Symbol(``));let s;a&&(t.byTrackingKey?.has(a)||(r??={...t},r.byTrackingKey??=new Map,r.byTrackingKey.set(a,this.createChildNode(n,a,i))),s=(r??t).byTrackingKey.get(a));let c=t.byPropertyKey.get(n);c===void 0?(r??={...t},r.byPropertyKey.set(n,{reader:this.createReader(n),node:s??this.createChildNode(n,a,i)})):s&&s!==c.node&&(r??={...t},c.node=s)}return r??t}createReader(e){return X(()=>this.childrenMap()?.byPropertyKey.get(e)?.node)}},xge=class extends E9{fieldManager;value;get parent(){}get root(){return this.node}get pathKeys(){return Cge}get keyInParent(){return D9}isOrphaned=T9;childrenMap;constructor(e,t,n,r,i){super(t,e,i),this.fieldManager=n,this.value=r,this.childrenMap=this.createChildrenMap()}},Sge=class extends E9{logic;parent;root;pathKeys;keyInParent;value;childrenMap;isOrphaned;get fieldManager(){return this.root.structure.fieldManager}constructor(e,t,n,r,i,a){super(t,e,a),this.logic=t,this.parent=n,this.root=this.parent.structure.root;let o=this.createKeyOrOrphanSignals(`child`,r,i);this.isOrphaned=o.isOrphaned,this.keyInParent=o.keyInParent,this.pathKeys=X(()=>[...n.structure.pathKeys(),this.keyInParent()]),this.value=yge(this.parent.structure.value,this.keyInParent),this.childrenMap=this.createChildrenMap(),this.fieldManager.structures.add(this)}},Cge=X(()=>[]),D9=X(()=>{throw new di(1905,!1)});function wge(e,t,n){let r,i=new Set(e.byPropertyKey.keys()),a=e.byTrackingKey&&new Set(e.byTrackingKey.keys());for(let e=0;e0){r??={...e};for(let e of i)r.byPropertyKey.delete(e)}if(a&&a.size>0){r??={...e};for(let e of a)r.byTrackingKey.delete(e)}return r}function Tge(e,t){let n;for(let r of e.byPropertyKey.keys())Object.hasOwn(t,r)||(n??={...e},n.byPropertyKey.delete(r));return n}var Ege=class{node;selfSubmitting=T(!1);submissionErrors;constructor(e){this.node=e,this.submissionErrors=Q({source:this.node.structure.value,computation:()=>[]})}submitting=X(()=>this.selfSubmitting()||(this.node.structure.parent?.submitting()??!1))},O9=class{structure;validationState;metadataState;nodeState;submitState;fieldAdapter;controlValue;_context=void 0;get context(){return this._context??=new gge(this)}fieldProxy=new Proxy(()=>this,vge);pathNode;constructor(e){this.pathNode=e.pathNode,this.fieldAdapter=e.fieldAdapter,this.structure=this.fieldAdapter.createStructure(this,e),this.validationState=this.fieldAdapter.createValidationState(this,e),this.nodeState=this.fieldAdapter.createNodeState(this,e),this.metadataState=new _ge(this),this.submitState=new Ege(this),this.controlValue=this.controlValueSignal(),this.metadataState.runMetadataCreateLifecycle()}focusBoundControl(e){this.getBindingForFocus()?.focus(e)}getBindingForFocus(){return this.formFieldBindings().filter(e=>e.focus!==void 0).reduce(k9,void 0)||this.structure.children().map(e=>e.getBindingForFocus()).reduce(k9,void 0)}pendingSync=Q({source:()=>this.value(),computation:(e,t)=>{t?.value?.abort()}});get fieldTree(){return this.fieldProxy}get logicNode(){return this.structure.logic}get value(){return this.structure.value}get keyInParent(){return this.structure.keyInParent}get errors(){return this.validationState.errors}get parseErrors(){return this.validationState.parseErrors}get errorSummary(){return this.validationState.errorSummary}get pending(){return this.validationState.pending}get valid(){return this.validationState.valid}get invalid(){return this.validationState.invalid}get dirty(){return this.nodeState.dirty}get touched(){return this.nodeState.touched}get disabled(){return this.nodeState.disabled}get disabledReasons(){return this.nodeState.disabledReasons}get hidden(){return this.nodeState.hidden}get readonly(){return this.nodeState.readonly}get formFieldBindings(){return this.nodeState.formFieldBindings}get submitting(){return this.submitState.submitting}get name(){return this.nodeState.name}get max(){let e=this.metadata(cge)?.();return e?this.metadata(e):void 0}get maxLength(){return this.metadata(uge)}get min(){let e=this.metadata(sge)?.();return e?this.metadata(e):void 0}get minLength(){return this.metadata(lge)}get pattern(){return this.metadata(dge)??Dge}get required(){return this.metadata(y9)??Oge}metadata(e){return this.metadataState.get(e)}getError(e){return this.errors().find(t=>t.kind===e)}hasMetadata(e){return this.metadataState.has(e)}markAsTouched(e){this.structure.isOrphaned()||Z(()=>{this.markAsTouchedInternal(e),this.flushSync()})}markAsTouchedInternal(e){if(!this.structure.isOrphaned()&&!this.validationState.shouldSkipValidation()&&(this.nodeState.markAsTouched(),!e?.skipDescendants))for(let e of this.structure.children())e.markAsTouchedInternal()}markAsDirty(){this.nodeState.markAsDirty()}markAsPristine(){this.nodeState.markAsPristine()}markAsUntouched(){this.nodeState.markAsUntouched()}reset(e){Z(()=>this._reset(e))}_reset(e){this.pendingSync()?.abort(),e!==void 0&&this.value.set(e),this.controlValue.rawSet(this.value()),this.nodeState.markAsUntouched(),this.nodeState.markAsPristine();for(let e of this.formFieldBindings())e.reset();for(let e of this.structure.materializedChildren())e._reset()}reloadValidation(){Z(()=>this._reloadValidation())}_reloadValidation(){let e=this.logicNode.logic.getMetadataKeys();for(let t of e)t[g9]&&this.metadata(t).reload?.();for(let e of this.structure.children())e._reloadValidation()}controlValueSignal(){let e=Q(this.value);e.rawSet=e.set,e.set=t=>{e.rawSet(t),this.markAsDirty(),this.debounceSync()};let t=e.update;return e.update=e=>{t(e),this.markAsDirty(),this.debounceSync()},e}sync(){this.value.set(this.controlValue())}flushSync(){let e=this.pendingSync();e&&!e.signal.aborted&&(e.abort(),this.sync())}async debounceSync(){let e=Z(()=>(this.pendingSync()?.abort(),this.nodeState.debouncer()));if(e){let t=new AbortController,n=e(t.signal);if(n&&(this.pendingSync.set(t),await n,t.signal.aborted))return}this.structure.isOrphaned()||this.sync()}static newRoot(e,t,n,r){return r.newRoot(e,t,n,r)}createStructure(e){return e.kind===`root`?new xge(this,e.logic,e.fieldManager,e.value,this.newChild.bind(this)):new Sge(this,e.logic,e.parent,e.identityInParent,e.initialKeyInParent,this.newChild.bind(this))}newChild(e,t,n){let r,i;return n?(r=this.pathNode.getChild(Y7),i=this.structure.logic.getChild(Y7)):(r=this.pathNode.getChild(e),i=this.structure.logic.getChild(e)),this.fieldAdapter.newChild({kind:`child`,parent:this,pathNode:r,logic:i,initialKeyInParent:e,identityInParent:t,fieldAdapter:this.fieldAdapter})}},Dge=X(()=>[]),Oge=X(()=>!1);function k9(e,t){return e?t&&e.element.compareDocumentPosition(t.element)&Node.DOCUMENT_POSITION_PRECEDING?t:e:t}var kge=class{node;selfTouched=T(!1);selfDirty=T(!1);markAsTouched(){this.selfTouched.set(!0)}markAsDirty(){this.selfDirty.set(!0)}markAsPristine(){this.selfDirty.set(!1)}markAsUntouched(){this.selfTouched.set(!1)}formFieldBindings=T([]);constructor(e){this.node=e}dirty=X(()=>{let e=this.selfDirty()&&!this.isNonInteractive();return this.node.structure.reduceChildren(e,(e,t)=>t||e.nodeState.dirty(),K7)});touched=X(()=>{let e=this.selfTouched()&&!this.isNonInteractive();return this.node.structure.reduceChildren(e,(e,t)=>t||e.nodeState.touched(),K7)});disabledReasons=X(()=>[...this.node.structure.parent?.nodeState.disabledReasons()??[],...this.node.logicNode.logic.disabledReasons.compute(this.node.context)],{equal:b9});disabled=X(()=>!!this.disabledReasons().length);readonly=X(()=>(this.node.structure.parent?.nodeState.readonly()||this.node.logicNode.logic.readonly.compute(this.node.context))??!1);hidden=X(()=>(this.node.structure.parent?.nodeState.hidden()||this.node.logicNode.logic.hidden.compute(this.node.context))??!1);name=X(()=>{let e=this.node.structure.parent;return e?`${e.name()}.${this.node.structure.keyInParent()}`:this.node.structure.fieldManager.rootName});debouncer=X(()=>{if(this.node.logicNode.logic.hasMetadata(C9)){let e=this.node.logicNode.logic.getMetadata(C9).compute(this.node.context);if(e)return t=>e(this.node.context,t)}return this.node.structure.parent?.nodeState.debouncer?.()});isNonInteractive=X(()=>this.hidden()||this.disabled()||this.readonly())},Age=class{newRoot(e,t,n,r){return new O9({kind:`root`,fieldManager:e,value:t,pathNode:n,logic:n.builder.build(),fieldAdapter:r})}newChild(e){return new O9(e)}createNodeState(e){return new kge(e)}createValidationState(e){return new pge(e)}createStructure(e,t){return e.createStructure(t)}},jge=class{injector;rootName;submitOptions;constructor(e,t,n){this.injector=e,this.rootName=t??`${this.injector.get(qs)}.form${Mge++}`,this.submitOptions=n}structures=new Set;createFieldManagementEffect(e){E(()=>{let t=new Set;this.markStructuresLive(e,t);for(let e of this.structures)t.has(e)||(this.structures.delete(e),Z(()=>e.destroy()))},{injector:this.injector})}markStructuresLive(e,t){t.add(e);for(let n of e.children())this.markStructuresLive(n.structure,t)}},Mge=0,Nge=new Ei(``);function Pge(e){let t,n,r;return e.length===3?[t,n,r]=e:e.length===2?ige(e[1])?[t,n]=e:[t,r]=e:[t]=e,[t,n,r]}function Fge(...e){let[t,n,r]=Pge(e),i=r?.injector??x(_s),a=Qa(i,()=>f9.rootCompile(n)),o=new jge(i,r?.name,r?.submission),s=r?.adapter??new Age,c=O9.newRoot(o,t,a,s);o.createFieldManagementEffect(c.structure);let{experimentalWebMcpTool:l}=r??{};if(l){let e=Qa(i,()=>x(Nge,{optional:!0}));e&&Qa(i,()=>e(c.fieldTree,{name:l.name,description:l.description}))}return c.fieldTree}async function Ige(e,t){let n=Z(e);if(Z(n.submitState.submitting))return!1;let r=t===void 0?n.structure.root.fieldProxy:e,i={root:n.structure.root.fieldProxy,submitted:e};t=typeof t==`function`?{action:t}:t??n.structure.fieldManager.submitOptions;let a=t?.action;if(!a)throw new di(1915,!1);n.markAsTouched();let o=t?.onInvalid,s=Lge(n,t?.ignoreValidators);try{if(s){n.submitState.selfSubmitting.set(!0);let e=await Z(()=>a?.(r,i));return e&&Rge(n,e),!e||q7(e)&&e.length===0}return Z(()=>o?.(r,i)),!1}finally{n.submitState.selfSubmitting.set(!1)}}function Lge(e,t){switch(t){case`all`:return!0;case`none`:return Z(e.valid);default:return!Z(e.invalid)}}function Rge(e,t){q7(t)||(t=[t]);let n=new Map;for(let r of t){let t=x9(r,e.fieldTree),i=t.fieldTree(),a=n.get(i);a||(a=[],n.set(i,a)),a.push(t)}for(let[e,t]of n)e.submitState.submissionErrors.set(t)}var A9=class{kind=`compat`;control;fieldTree;context;message;constructor({context:e,kind:t,control:n}){this.context=e,this.kind=t,this.control=n}};function zge(e){if(e.length===0)return null;let t={};for(let n of e)t[n.kind]=n instanceof A9?n.context:n;return t}function Bge(e,t){return e===null?[]:Object.entries(e).map(([e,n])=>new A9({context:n,kind:e,control:t}))}var Vge=new Ei(``);function j9(e,t){return e instanceof Function?e(t):e}function Hge(e){return typeof e==`number`?isNaN(e):e===``||e===!1||e==null}function M9(e){return e===void 0?[]:Array.isArray(e)?e:[e]}function Uge(e,t){p9(e),l9.unwrapFieldPath(e).builder.addSyncErrorRule(e=>x9(t(e),e.fieldTree))}function Wge(e){return new Gge(e)}var N9=class{__brand=void 0;kind=``;fieldTree;message;constructor(e){e&&Object.assign(this,e)}},Gge=class extends N9{kind=`required`},P9=class extends N9{kind=`parse`};function Kge(e,t){let n=m9(e,_9(),e=>!t?.when||t.when(e));m9(e,y9,({state:e})=>e.metadata(n)()),Uge(e,e=>{if(e.state.metadata(n)()&&Hge(e.value()))return t?.error?j9(t.error,e):Wge({message:j9(t?.message,e)})})}function qge(e,t,n){let r=Q({source:e,computation:()=>[],equal:b9});return{errors:r.asReadonly(),setRawValue:e=>{let i=n(e);r.set(M9(i.error)),i.value!==void 0&&t(i.value),r.set(M9(i.error))},reset:()=>{r.set([])}}}var Jge=class{field;constructor(e){this.field=e}control=this;get value(){return this.field().controlValue()}get valid(){return this.field().valid()}get invalid(){return this.field().invalid()}get pending(){return this.field().pending()}get disabled(){return this.field().disabled()}get enabled(){return!this.field().disabled()}get errors(){return zge(this.field().errors())}get pristine(){return!this.field().dirty()}get dirty(){return this.field().dirty()}get touched(){return this.field().touched()}get untouched(){return!this.field().touched()}get status(){if(this.field().disabled())return`DISABLED`;if(this.field().valid())return`VALID`;if(this.field().invalid())return`INVALID`;if(this.field().pending())return`PENDING`;throw new di(1910,!1)}valueAccessor=null;hasValidator(e){return e===m7.required&&this.field().required()}updateValueAndValidity(){}},F9={disabled:`disabled`,disabledReasons:`disabledReasons`,dirty:`dirty`,errors:`errors`,hidden:`hidden`,invalid:`invalid`,max:`max`,maxLength:`maxLength`,min:`min`,minLength:`minLength`,name:`name`,pattern:`pattern`,pending:`pending`,readonly:`readonly`,required:`required`,touched:`touched`},Yge=(()=>{let e={};for(let t of Object.keys(F9))e[F9[t]]=t;return e})();function I9(e,t){return e[Yge[t]]?.()}var L9=Object.values(F9);function R9(){return{}}function z9(e,t,n){return e[t]!==n&&(e[t]=n,!0)}function Xge(e,t,n){let r;if(H9(e)&&n.isBadInput(e))return{error:new P9};switch(e.type){case`checkbox`:return{value:e.checked};case`number`:case`range`:case`datetime-local`:if(r=Z(t),typeof r==`number`||r===null)return{value:e.value===``?null:e.valueAsNumber};break;case`date`:case`month`:case`time`:case`week`:if(r=Z(t),r===null||r instanceof Date)return{value:e.valueAsDate};if(typeof r==`number`)return{value:e.valueAsNumber}}if(e.tagName===`INPUT`&&e.type===`text`&&(r??=Z(t),typeof r==`number`||r===null)){if(e.value===``)return{value:null};let t=Number(e.value);return Number.isNaN(t)?{error:new P9}:{value:t}}return{value:e.value}}function B9(e,t){switch(e.type){case`checkbox`:e.checked=t;return;case`radio`:e.checked=t===e.value;return;case`number`:case`range`:case`datetime-local`:if(typeof t==`number`){V9(e,t);return}if(t===null){e.value=``;return}break;case`date`:case`month`:case`time`:case`week`:if(t===null||t instanceof Date){e.valueAsDate=t;return}if(typeof t==`number`){V9(e,t);return}}if(e.tagName===`INPUT`&&e.type===`text`){if(typeof t==`number`){e.value=isNaN(t)?``:String(t);return}if(t===null){e.value=``;return}}e.value=t}function V9(e,t){isNaN(t)?e.value=``:e.valueAsNumber=t}function H9(e){return e.tagName===`INPUT`}function Zge(e){return e.type===`date`||e.type===`datetime-local`||e.type===`month`||e.type===`time`||e.type===`week`}function Qge(e,t){let n=e.getUTCFullYear(),r=String(e.getUTCMonth()+1).padStart(2,`0`);return t===`month`?`${n}-${r}`:`${n}-${r}-${String(e.getUTCDate()).padStart(2,`0`)}`}function U9(e,t,n){return t instanceof Date&&(e===`min`||e===`max`)&&(n===`date`||n===`month`)?Qge(t,n):t}function $ge(e,t){e.listenToCustomControlModel(e=>t.state().controlValue.set(e)),e.listenToCustomControlOutput(`touch`,()=>t.state().markAsTouched()),t.registerAsBinding(e.customControl);let n=R9();return()=>{let r=t.state(),i=r.controlValue();z9(n,`controlValue`,i)&&e.setCustomControlModelInput(i);for(let i of L9){let a;if(a=i===`errors`?t.errors():I9(r,i),z9(n,i,a)&&(e.setInputOnDirectives(i,a),t.elementAcceptsNativeProperty(i)&&!e.customControlHasInput(i))){let e=U9(i,a,t.nativeFormElement.type);V7(t.renderer,t.nativeFormElement,i,e)}}}}function e_e(e){return typeof e==`object`&&!!e}function t_e(e,t){let n=R9();t.controlValueAccessor.registerOnChange(e=>{n.controlValue=e,t.state().controlValue.set(e)}),t.controlValueAccessor.registerOnTouched(()=>t.state().markAsTouched());let r=t.injector.get(p7,null,{optional:!0,self:!0});if(r){let e;for(let t of r)e_e(t)&&t.registerOnValidatorChange&&(e??=T(0),t.registerOnValidatorChange(()=>{e.update(e=>e+1)}));let n=r.map(e=>typeof e==`function`?e:e.validate.bind(e)),i=m7.compose(n),a=X(()=>(e?.(),Bge(i?i(t.interopNgControl.control):null,t.interopNgControl.control)));t.parseErrorsSource.set(a)}return t.registerAsBinding({reset:()=>{let e=t.state().value();n.controlValue=e,Z(()=>t.controlValueAccessor.writeValue(e))}}),()=>{let r=t.state(),i=r.controlValue();z9(n,`controlValue`,i)&&Z(()=>t.controlValueAccessor.writeValue(i));for(let i of L9){let a=I9(r,i);if(z9(n,i,a)){let n=e.setInputOnDirectives(i,a,i===`name`?n_e:void 0);i===`disabled`&&t.controlValueAccessor.setDisabledState?Z(()=>t.controlValueAccessor.setDisabledState(a)):!n&&t.elementAcceptsNativeProperty(i)&&V7(t.renderer,t.nativeFormElement,i,a)}}}}function n_e(e){return e==null}function r_e(e,t,n){if(typeof MutationObserver!=`function`)return;let r=new MutationObserver(e=>{e.some(e=>i_e(e))&&t()});r.observe(e,{attributes:!0,attributeFilter:[`value`],characterData:!0,childList:!0,subtree:!0}),n.onDestroy(()=>r.disconnect())}function i_e(e){if(e.type===`childList`||e.type===`characterData`){if(e.target instanceof Comment)return!1;for(let t of e.addedNodes)if(!(t instanceof Comment))return!0;for(let t of e.removedNodes)if(!(t instanceof Comment))return!0;return!1}return e.type===`attributes`&&e.target instanceof HTMLOptionElement}function a_e(e,t,n,r){let i=!1,a=t.nativeFormElement,o=qge(()=>t.state().value(),e=>t.state().controlValue.set(e),e=>Xge(a,t.state().value,r));n.set(o.errors),t.onReset=()=>{o.reset();let e=t.state().value();s.controlValue=e,B9(a,e)},e.listenToDom(`input`,()=>o.setRawValue(void 0)),e.listenToDom(`blur`,()=>t.state().markAsTouched()),H9(a)&&Zge(a)&&r.watchValidity(t.destroyRef,a,()=>o.setRawValue(void 0)),t.registerAsBinding(),a.tagName===`SELECT`&&r_e(a,()=>{i&&(a.value=t.state().controlValue())},t.destroyRef);let s=R9();return()=>{let n=t.state();for(let r of L9){let i=I9(n,r);if(z9(s,r,i)&&(e.setInputOnDirectives(r,i),t.elementAcceptsNativeProperty(r))){let e=U9(r,i,a.type);V7(t.renderer,a,r,e)}}let r=n.controlValue(),o=z9(s,`controlValue`,r),c=a.type===`radio`&&z9(s,`radioValue`,a.value);(o||c)&&B9(a,r),i=!0}}var W9=(()=>{class e{static ɵfac=function(t){return new(t||e)};static ɵprov=yi({token:e,factory:e=>o_e.ɵfac(e),providedIn:`root`})}return e})(),o_e=(()=>{class e extends W9{document=x(vs);cspNonce=x(Zs,{optional:!0});injectedStyles=new WeakMap;watchValidity(e,t,n){let r=t.getRootNode();this.injectedStyles.has(r)||this.injectedStyles.set(r,this.createTransitionStyle(r));let i=e=>{let t=e;(t.animationName===`ng-valid`||t.animationName===`ng-invalid`)&&n()};t.addEventListener(`animationstart`,i),e.onDestroy(()=>{t.removeEventListener(`animationstart`,i)})}isBadInput(e){return e.validity?.badInput??!1}createTransitionStyle(e){let t=this.document.createElement(`style`);return this.cspNonce&&(t.nonce=this.cspNonce),t.textContent=` +`}var B5=new Map;function V5(e,t=`dark`,n=50){let r=e?.querySelector(`devframes-dock-standalone`)?.shadowRoot;if(r){if(e){let t=B5.get(e);t!==void 0&&(clearTimeout(t),B5.delete(e))}let n=r.querySelector(`style[data-pangular]`);n||(n=e.createElement(`style`),n.dataset.pangular=``,r.append(n)),n.textContent=Kme(t);return}if(n>0&&e){let r=B5.get(e);r!==void 0&&clearTimeout(r);let i=setTimeout(()=>{B5.delete(e),V5(e,t,n-1)},100);B5.set(e,i)}}var H5=`pangular-pref`,U5={order:[],hidden:[],pinned:[]};function W5(e){try{return localStorage.getItem(`${H5}:${e}`)}catch{return null}}function G5(e,t){try{t===null?localStorage.removeItem(`${H5}:${e}`):localStorage.setItem(`${H5}:${e}`,t)}catch{}}function qme(){let e=W5(`theme`);return e===`light`||e===`dark`?e:`system`}function Jme(e){G5(`theme`,e===`system`?null:e)}function K5(e){if(!Array.isArray(e))return[];let t=e.filter(e=>typeof e==`string`&&e.length>0&&e.length<=40);return[...new Set(t)].slice(0,50)}function Yme(){let e=W5(`tabs`);if(!e)return U5;try{let t=JSON.parse(e);if(!t||typeof t!=`object`||Array.isArray(t))return U5;let n=t;return{order:K5(n.order),hidden:K5(n.hidden),pinned:K5(n.pinned)}}catch{return U5}}function Xme(e){G5(`tabs`,!e.order.length&&!e.hidden.length&&!e.pinned.length?null:JSON.stringify(e))}function Zme(){return W5(`passive`)===`true`}function Qme(e){G5(`passive`,e?`true`:null)}function $me(){return W5(`pill`)===`true`}function ehe(e){G5(`pill`,e?`true`:null)}function q5(e,t){let n=n=>{let r=t.order.indexOf(n);return r<0?t.order.length+e.indexOf(n):r},r=[...e].sort((e,t)=>n(e)-n(t));return[...r.filter(e=>t.pinned.includes(e)),...r.filter(e=>!t.pinned.includes(e))]}function the(e,t,n){let r=new Map(e.map(e=>[e.id,e]));return q5(e.map(e=>e.id),t).filter(e=>e===n||t.pinned.includes(e)||!t.hidden.includes(e)).map(e=>r.get(e))}function J5(e,t,n,r){let i=q5(e,t),a=i.indexOf(n),o=a+r;if(a<0||o<0||o>=i.length)return t;let s=t.pinned.includes(n);if(t.pinned.includes(i[o])!==s)return t;let c=[...i];return[c[a],c[o]]=[c[o],c[a]],{...t,order:c}}function nhe(e,t,n){let r=e.hidden.filter(e=>e!==t);return{...e,hidden:n?[...r,t]:r,pinned:n?e.pinned.filter(e=>e!==t):e.pinned}}function rhe(e,t,n,r){let i=t.pinned.filter(e=>e!==n);return{order:q5(e,t),pinned:r?[...i,n]:i,hidden:r?t.hidden.filter(e=>e!==n):t.hidden}}function Y5(){try{let e=navigator;return/mac|iphone|ipad|ipod/i.test(e.userAgentData?.platform??e.platform??``)}catch{return!1}}function ihe(e=window){try{for(let t=e;t!==t.parent;t=t.parent){let e=t.frameElement?.getRootNode();if(e&&`host`in e&&e.host?.id===`pangular-popup-root`)return!0}}catch{}return!1}var ahe=`pangular-inspector-`;function X5(e=window){try{let t=e.top??e;return t.name.startsWith(ahe)&&t.opener&&t.opener!==t?t.opener:null}catch{return null}}function ohe(e=window){let t=X5(e);if(!t)return!1;let n;try{n=t.location.origin}catch{try{n=new URL(e.document.referrer).origin}catch{n=void 0}}if(!n||n===`null`)return!1;try{return t.postMessage({type:`pangular:popup-return`},n),!0}catch{return!1}}var she=class e{current=T(`dark`);preference=T(qme());source=`dark`;sourceAttr=!1;constructor(){let e=x(ys),t=lhe(),n=document.documentElement.dataset.theme,r=n===`light`||n===`dark`;if(n===`light`||n===`dark`)this.fromSource(n,!0);else if(t)r=!0,this.fromSource(Z5(t),!0);else{let t=che();if(t){this.fromSource(t.matches?`light`:`dark`,!1);let n=e=>{r||this.fromSource(e.matches?`light`:`dark`,!1)};t.addEventListener(`change`,n),e.onDestroy(()=>t.removeEventListener(`change`,n))}else this.resolve()}let i;try{i=new BroadcastChannel(`pangular:theme`)}catch{}E(()=>{let e=this.current();try{i?.postMessage(e)}catch{}for(let{win:t,origin:n}of Q5())try{t.postMessage({type:`pangular:theme-change`,theme:e},n)}catch{}});let a=e=>{if(e.source!==window.parent)return;let t=e.data;t?.type===`pangular:theme-change`&&(r=!0,this.fromSource(t.theme===`dark`?`dark`:`light`,!0))};window.addEventListener(`message`,a);let o;t&&(o=new MutationObserver(()=>this.fromSource(Z5(t),!0)),o.observe(t,{attributes:!0,attributeFilter:[`class`]})),e.onDestroy(()=>{window.removeEventListener(`message`,a),o?.disconnect(),i?.close()})}setPreference(e){this.preference.set(e),Jme(e),this.resolve()}fromSource(e,t){this.source=e,this.sourceAttr=t,this.resolve()}resolve(){let e=this.preference(),t=e===`system`?this.source:e;this.current.set(t);let n=document.documentElement;e!==`system`||this.sourceAttr?n.dataset.theme=t:delete n.dataset.theme}static ɵfac=function(t){return new(t||e)};static ɵprov=El({token:e,factory:e.ɵfac})};function che(){try{return window.matchMedia?.(`(prefers-color-scheme: light)`)??null}catch{return null}}function Z5(e){return e.classList.contains(`dark`)?`dark`:`light`}function lhe(){try{return window.frameElement?.closest(`.devframes-color-root`)??null}catch{return null}}function Q5(e=window){let t=[],n;try{n=e.location.ancestorOrigins}catch{}let r=e;try{for(let i=0;r!==r.parent;i++){r=r.parent;let a=uhe(e,r,i,n);a&&t.push({win:r,origin:a})}}catch{}return t}function uhe(e,t,n,r){let i=e=>e&&e!==`null`?e:void 0,a=i(r?.item(n));if(a)return a;try{let e=i(t.location.origin);if(e)return e}catch{}if(!(n>0))try{return i(new URL(e.document.referrer).origin)}catch{return}}var dhe=`__DEVFRAME_HUB_CLIENT_CONTEXT__`;function $5(){try{return window.parent===window?void 0:window.parent[dhe]}catch{return}}function e7(e,t,n=50){let r=$5();if(!r){if(n<=0||window.parent===window)return()=>{};let r=()=>{},i=setTimeout(()=>r=e7(e,t,n-1),100);return()=>{clearTimeout(i),r()}}let i=e.map(e=>r.docks.getStateById(ZC(e))?.events.on(`entry:activated`,()=>t(e))??(()=>{})),a=r.docks.selectedId,o=e.find(e=>ZC(e)===a);return o&&t(o),()=>i.forEach(e=>e())}function t7(){return!!$5()}async function n7(e){let t=$5();if(!t)return!1;try{return await t.docks.switchEntry(ZC(e))}catch{return!1}}function fhe(){let e=$5()?.commands?.openPalette;if(typeof e!=`function`)return!1;try{return e(),!0}catch{return!1}}function phe(e,t){let n=new URL(e);return n.searchParams.delete(`view`),n.hash=t?`tab=${t}`:``,n.pathname+n.search+n.hash}function mhe(e){return e.button===0&&!e.metaKey&&!e.ctrlKey&&!e.shiftKey&&!e.altKey}var r7=`pangular-tab`;function i7(e,t,n){let r=new URLSearchParams(e.replace(/^#/,``)).get(`tab`)||t;return n.find(e=>e===r)}function a7(e){try{return sessionStorage.getItem(`${r7}:${e}`)}catch{return null}}function hhe(e,t){try{sessionStorage.setItem(`${r7}:${e}`,t)}catch{}}function ghe(e,t){try{return new URL(e,t.href).origin===t.origin}catch{return!1}}function _he(e,t){if(t.protocol!==`chrome-extension:`)return!1;try{let{protocol:t}=new URL(e);return t===`http:`||t===`https:`}catch{return!1}}function vhe(e=location){let t=new URLSearchParams(e.search).get(`baseURL`);if(t&&(ghe(t,e)||_he(t,e)))return t;if(!(e.pathname.includes(`__pangular`)||e.pathname.includes(`__devframes/`)))return[`/__pangular/`,`./`]}var o7=`__DEVFRAME_CONNECTION_AUTH_TOKEN__`,yhe=`pangular-auth-token:`,bhe=`devframe-auth`,xhe={token:void 0,remember:()=>{}};function She(e,t=location){if(typeof e!=`string`)return null;try{let n=new URL(e,t.href).origin;return n===t.origin||n===`null`?null:n}catch{return null}}function Che(e,t=location,n=The(),r=globalThis){let i=She(e,t);if(!i||(whe(r),!n))return xhe;let a=yhe+i;try{n.removeItem(o7)}catch{}delete globalThis[o7];let o;try{o=n.getItem(a)||void 0}catch{o=void 0}return{get token(){return o},remember(e){try{if(n.removeItem(o7),!e||e===o)return;o=e,n.setItem(a,e)}catch{}}}}var s7=new WeakSet;function whe(e=globalThis){let t=e.BroadcastChannel;if(typeof t==`function`&&!s7.has(t)){let n=class extends t{constructor(e){if(String(e)===bhe)throw Error(`The devframe-auth channel is off in a panel on another origin.`);super(e)}};s7.add(n),e.BroadcastChannel=n}let n=e.Storage?.prototype;if(n&&!s7.has(n)){s7.add(n);let{getItem:e,setItem:t}=n;n.getItem=function(t){return String(t)===o7?null:e.call(this,t)},n.setItem=function(e,n){String(e)!==o7&&t.call(this,e,n)}}}function The(){try{return typeof localStorage>`u`?null:localStorage}catch{return null}}var c7=(()=>{class e{_renderer;_elementRef;onChange=e=>{};onTouched=()=>{};constructor(e,t){this._renderer=e,this._elementRef=t}setProperty(e,t){this._renderer.setProperty(this._elementRef.nativeElement,e,t)}registerOnTouched(e){this.onTouched=e}registerOnChange(e){this.onChange=e}setDisabledState(e){this.setProperty(`disabled`,e)}static ɵfac=function(t){return new(t||e)(Rp(rp),Rp(kl))};static ɵdir=sh({type:e})}return e})(),Ehe=(()=>{class e extends c7{static ɵfac=(()=>{let t;return function(n){return(t||=Sl(e))(n||e)}})();static ɵdir=sh({type:e,features:[_h]})}return e})(),l7=new Ei(``),Dhe={provide:l7,useExisting:gi(()=>u7),multi:!0};function Ohe(){let e=gv()?gv().getUserAgent():``;return/android (\d+)/.test(e.toLowerCase())}var khe=new Ei(``),u7=(()=>{class e extends c7{_compositionMode;_composing=!1;constructor(e,t,n){super(e,t),this._compositionMode=n,this._compositionMode??=!Ohe()}writeValue(e){let t=e??``;this.setProperty(`value`,t)}_handleInput(e){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e)}_compositionStart(){this._composing=!0}_compositionEnd(e){this._composing=!1,this._compositionMode&&this.onChange(e)}static ɵfac=function(t){return new(t||e)(Rp(rp),Rp(kl),Rp(khe,8))};static ɵdir=sh({type:e,selectors:[[`input`,`formControlName`,``,3,`type`,`checkbox`,3,`ngNoCva`,``],[`textarea`,`formControlName`,``,3,`ngNoCva`,``],[`input`,`formControl`,``,3,`type`,`checkbox`,3,`ngNoCva`,``],[`textarea`,`formControl`,``,3,`ngNoCva`,``],[`input`,`ngModel`,``,3,`type`,`checkbox`,3,`ngNoCva`,``],[`textarea`,`ngModel`,``,3,`ngNoCva`,``],[``,`ngDefaultControl`,``]],hostBindings:function(e,t){e&1&&H(`input`,function(e){return t._handleInput(e.target.value)})(`blur`,function(){return t.onTouched()})(`compositionstart`,function(){return t._compositionStart()})(`compositionend`,function(e){return t._compositionEnd(e.target.value)})},standalone:!1,features:[I_([Dhe]),_h]})}return e})();function d7(e){return e==null||f7(e)===0}function f7(e){return e==null?null:Array.isArray(e)||typeof e==`string`?e.length:e instanceof Set?e.size:null}var p7=new Ei(``),Ahe=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,m7=class{static min(e){return jhe(e)}static max(e){return Mhe(e)}static required(e){return h7(e)}static requiredTrue(e){return Nhe(e)}static email(e){return Phe(e)}static minLength(e){return Fhe(e)}static maxLength(e){return Ihe(e)}static pattern(e){return Lhe(e)}static nullValidator(e){return g7()}static compose(e){return S7(e)}static composeAsync(e){return w7(e)}};function jhe(e){return t=>{if(t.value==null||e==null)return null;let n=parseFloat(t.value);return!isNaN(n)&&n{if(t.value==null||e==null)return null;let n=parseFloat(t.value);return!isNaN(n)&&n>e?{max:{max:e,actual:t.value}}:null}}function h7(e){return d7(e.value)?{required:!0}:null}function Nhe(e){return e.value===!0?null:{required:!0}}function Phe(e){return d7(e.value)||Ahe.test(e.value)?null:{email:!0}}function Fhe(e){return t=>{let n=t.value?.length??f7(t.value);return n===null||n===0?null:n{let n=t.value?.length??f7(t.value);return n!==null&&n>e?{maxlength:{requiredLength:e,actualLength:n}}:null}}function Lhe(e){if(!e)return g7;let t,n;return typeof e==`string`?(n=``,e.charAt(0)!==`^`&&(n+=`^`),n+=e,e.charAt(e.length-1)!==`$`&&(n+=`$`),t=new RegExp(n)):(n=e.toString(),t=e),e=>{if(d7(e.value))return null;let r=e.value;return t.test(r)?null:{pattern:{requiredPattern:n,actualValue:r}}}}function g7(e){return null}function _7(e){return e!=null}function v7(e){return Qm(e)?Aee(e):e}function y7(e){let t={};return e.forEach(e=>{t=e==null?t:{...t,...e}}),Object.keys(t).length===0?null:t}function b7(e,t){return t.map(t=>t(e))}function Rhe(e){return!e.validate}function x7(e){return e.map(e=>Rhe(e)?e:t=>e.validate(t))}function S7(e){if(!e)return null;let t=e.filter(_7);return t.length==0?null:function(e){return y7(b7(e,t))}}function C7(e){return e==null?null:S7(x7(e))}function w7(e){if(!e)return null;let t=e.filter(_7);return t.length==0?null:function(e){return Vee(b7(e,t).map(v7)).pipe(li(y7))}}function T7(e){return e==null?null:w7(x7(e))}function E7(e){return e?Array.isArray(e)?e:[e]:[]}function D7(e,t){return Array.isArray(e)?e.includes(t):e===t}function O7(e,t){let n=E7(t);return E7(e).forEach(e=>{D7(n,e)||n.push(e)}),n}function k7(e,t){return E7(t).filter(t=>!D7(e,t))}var zhe=class{get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators=[];_rawAsyncValidators=[];_setValidators(e){this._rawValidators=e||[],this._composedValidatorFn=C7(this._rawValidators)}_setAsyncValidators(e){this._rawAsyncValidators=e||[],this._composedAsyncValidatorFn=T7(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_onDestroyCallbacks=[];_registerOnDestroy(e){this._onDestroyCallbacks.push(e)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(e=>e()),this._onDestroyCallbacks=[]}reset(e=void 0){this.control?.reset(e)}hasError(e,t){return this.control?this.control.hasError(e,t):!1}getError(e,t){return this.control?this.control.getError(e,t):null}},A7=`VALID`,j7=`INVALID`,M7=`PENDING`,N7=`DISABLED`,P7=class{},F7=class extends P7{value;source;constructor(e,t){super(),this.value=e,this.source=t}},I7=class extends P7{pristine;source;constructor(e,t){super(),this.pristine=e,this.source=t}},L7=class extends P7{touched;source;constructor(e,t){super(),this.touched=e,this.source=t}},R7=class extends P7{status;source;constructor(e,t){super(),this.status=e,this.source=t}},z7=class extends P7{source;constructor(e){super(),this.source=e}};function Bhe(e){return Array.isArray(e)?C7(e):e||null}function Vhe(e){return Array.isArray(e)?T7(e):e||null}function Hhe(e){return e!=null&&!Array.isArray(e)&&typeof e==`object`}var Uhe=class{_pendingDirty=!1;_hasOwnPendingAsyncValidator=null;_pendingTouched=!1;_onCollectionChange=()=>{};_updateOn;_hasRequired=T(!1);_parent=null;_asyncValidationSubscription;_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators;_rawAsyncValidators;value;constructor(e,t){this._assignValidators(e),this._assignAsyncValidators(t)}get validator(){return this._composedValidatorFn}set validator(e){this._rawValidators=this._composedValidatorFn=e,this._updateHasRequiredValidator()}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(e){this._rawAsyncValidators=this._composedAsyncValidatorFn=e}get parent(){return this._parent}get status(){return Z(this.statusReactive)}set status(e){Z(()=>this.statusReactive.set(e))}_status=X(()=>this.statusReactive());statusReactive=T(void 0);get valid(){return this.status===A7}get invalid(){return this.status===j7}get pending(){return this.status===M7}get disabled(){return this.status===N7}get enabled(){return this.status!==N7}errors;get pristine(){return Z(this.pristineReactive)}set pristine(e){Z(()=>this.pristineReactive.set(e))}_pristine=X(()=>this.pristineReactive());pristineReactive=T(!0);get dirty(){return!this.pristine}get touched(){return Z(this.touchedReactive)}set touched(e){Z(()=>this.touchedReactive.set(e))}_touched=X(()=>this.touchedReactive());touchedReactive=T(!1);get untouched(){return!this.touched}_events=new Hr;events=this._events.asObservable();valueChanges;statusChanges;get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:`change`}setValidators(e){this._assignValidators(e)}setAsyncValidators(e){this._assignAsyncValidators(e)}addValidators(e){this.setValidators(O7(e,this._rawValidators))}addAsyncValidators(e){this.setAsyncValidators(O7(e,this._rawAsyncValidators))}removeValidators(e){this.setValidators(k7(e,this._rawValidators))}removeAsyncValidators(e){this.setAsyncValidators(k7(e,this._rawAsyncValidators))}hasValidator(e){return D7(this._rawValidators,e)}hasAsyncValidator(e){return D7(this._rawAsyncValidators,e)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(e={}){let t=this.touched===!1;this.touched=!0;let n=e.sourceControl??this;e.onlySelf||this._parent?.markAsTouched({...e,sourceControl:n}),t&&e.emitEvent!==!1&&this._events.next(new L7(!0,n))}markAllAsDirty(e={}){this.markAsDirty({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:this}),this._forEachChild(t=>t.markAllAsDirty(e))}markAllAsTouched(e={}){this.markAsTouched({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:this}),this._forEachChild(t=>t.markAllAsTouched(e))}markAsUntouched(e={}){let t=this.touched===!0;this.touched=!1,this._pendingTouched=!1;let n=e.sourceControl??this;this._forEachChild(t=>{t.markAsUntouched({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:n})}),e.onlySelf||this._parent?._updateTouched(e,n),t&&e.emitEvent!==!1&&this._events.next(new L7(!1,n))}markAsDirty(e={}){let t=this.pristine===!0;this.pristine=!1;let n=e.sourceControl??this;e.onlySelf||this._parent?.markAsDirty({...e,sourceControl:n}),t&&e.emitEvent!==!1&&this._events.next(new I7(!1,n))}markAsPristine(e={}){let t=this.pristine===!1;this.pristine=!0,this._pendingDirty=!1;let n=e.sourceControl??this;this._forEachChild(t=>{t.markAsPristine({onlySelf:!0,emitEvent:e.emitEvent})}),e.onlySelf||this._parent?._updatePristine(e,n),t&&e.emitEvent!==!1&&this._events.next(new I7(!0,n))}markAsPending(e={}){this.status=M7;let t=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new R7(this.status,t)),this.statusChanges.emit(this.status)),e.onlySelf||this._parent?.markAsPending({...e,sourceControl:t})}disable(e={}){let t=this._parentMarkedDirty(e.onlySelf);this.status=N7,this.errors=null,this._forEachChild(t=>{t.disable({...e,onlySelf:!0})}),this._updateValue();let n=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new F7(this.value,n)),this._events.next(new R7(this.status,n)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors({...e,skipPristineCheck:t},this),this._onDisabledChange.forEach(e=>e(!0))}enable(e={}){let t=this._parentMarkedDirty(e.onlySelf);this.status=A7,this._forEachChild(t=>{t.enable({...e,onlySelf:!0})}),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent}),this._updateAncestors({...e,skipPristineCheck:t},this),this._onDisabledChange.forEach(e=>e(!1))}_updateAncestors(e,t){e.onlySelf||(this._parent?.updateValueAndValidity(e),e.skipPristineCheck||this._parent?._updatePristine({},t),this._parent?._updateTouched({},t))}setParent(e){this._parent=e}getRawValue(){return this.value}updateValueAndValidity(e={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let t=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===A7||this.status===M7)&&this._runAsyncValidator(t,e.emitEvent)}let t=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new F7(this.value,t)),this._events.next(new R7(this.status,t)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),e.onlySelf||this._parent?.updateValueAndValidity({...e,sourceControl:t})}_updateTreeValidity(e={emitEvent:!0}){this._forEachChild(t=>t._updateTreeValidity(e)),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?N7:A7}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(e,t){if(this.asyncValidator){this.status=M7,this._hasOwnPendingAsyncValidator={emitEvent:t!==!1,shouldHaveEmitted:e!==!1};let n=v7(this.asyncValidator(this));this._asyncValidationSubscription=n.subscribe(n=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(n,{emitEvent:t,shouldHaveEmitted:e})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let e=(this._hasOwnPendingAsyncValidator?.emitEvent||this._hasOwnPendingAsyncValidator?.shouldHaveEmitted)??!1;return this._hasOwnPendingAsyncValidator=null,e}return!1}setErrors(e,t={}){this.errors=e,this._updateControlsErrors(t.emitEvent!==!1,this,t.shouldHaveEmitted)}get(e){let t=e;return t==null||(Array.isArray(t)||(t=t.split(`.`)),t.length===0)?null:t.reduce((e,t)=>e&&e._find(t),this)}getError(e,t){let n=t?this.get(t):this;return n?.errors?n.errors[e]:null}hasError(e,t){return!!this.getError(e,t)}get root(){let e=this;for(;e._parent;)e=e._parent;return e}_updateControlsErrors(e,t,n){this.status=this._calculateStatus(),e&&this.statusChanges.emit(this.status),(e||n)&&this._events.next(new R7(this.status,t)),this._parent&&this._parent._updateControlsErrors(e,t,n)}_initObservables(){this.valueChanges=new ws,this.statusChanges=new ws}_calculateStatus(){return this._allControlsDisabled()?N7:this.errors?j7:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(M7)?M7:this._anyControlsHaveStatus(j7)?j7:A7}_anyControlsHaveStatus(e){return this._anyControls(t=>t.status===e)}_anyControlsDirty(){return this._anyControls(e=>e.dirty)}_anyControlsTouched(){return this._anyControls(e=>e.touched)}_updatePristine(e,t){let n=!this._anyControlsDirty(),r=this.pristine!==n;this.pristine=n,e.onlySelf||this._parent?._updatePristine(e,t),r&&this._events.next(new I7(this.pristine,t))}_updateTouched(e={},t){this.touched=this._anyControlsTouched(),this._events.next(new L7(this.touched,t)),e.onlySelf||this._parent?._updateTouched(e,t)}_onDisabledChange=[];_registerOnCollectionChange(e){this._onCollectionChange=e}_setUpdateStrategy(e){Hhe(e)&&e.updateOn!=null&&(this._updateOn=e.updateOn)}_parentMarkedDirty(e){return!e&&!!this._parent?.dirty&&!this._parent._anyControlsDirty()}_find(e){return null}_assignValidators(e){this._rawValidators=Array.isArray(e)?e.slice():e,this._composedValidatorFn=Bhe(this._rawValidators),this._updateHasRequiredValidator()}_assignAsyncValidators(e){this._rawAsyncValidators=Array.isArray(e)?e.slice():e,this._composedAsyncValidatorFn=Vhe(this._rawAsyncValidators)}_updateHasRequiredValidator(){Z(()=>this._hasRequired.set(this.hasValidator(m7.required)))}};function B7(e){return e.tagName===`INPUT`||e.tagName===`SELECT`||e.tagName===`TEXTAREA`}function Whe(e){if(e.tagName!==`INPUT`)return!1;let t=e.type;return t===`number`||t===`range`||t===`date`||t===`month`}function Ghe(e){return e.tagName===`INPUT`||e.tagName===`TEXTAREA`}function V7(e,t,n,r){switch(n){case`name`:e.setAttribute(t,n,r);break;case`disabled`:case`readonly`:case`required`:r?e.setAttribute(t,n,``):e.removeAttribute(t,n);break;case`max`:case`min`:case`minLength`:case`maxLength`:r===void 0?e.removeAttribute(t,n):e.setAttribute(t,n,r.toString())}}var Khe=class{kind;context;control;message;constructor({kind:e,context:t,control:n}){this.kind=e,this.context=t,this.control=n}},qhe=(()=>{class e{_validator=g7;_onChange;_enabled;ngOnChanges(e){if(this.inputName in e){let t=this.normalizeInput(e[this.inputName].currentValue);this._enabled=this.enabled(t),this._validator=this._enabled?this.createValidator(t):g7,this._onChange?.()}}validate(e){return this._validator(e)}registerOnValidatorChange(e){this._onChange=e}enabled(e){return e!=null}static ɵfac=function(t){return new(t||e)};static ɵdir=sh({type:e,features:[xc]})}return e})(),Jhe={provide:p7,useExisting:gi(()=>H7),multi:!0},H7=(()=>{class e extends qhe{required;inputName=`required`;normalizeInput=dv;createValidator=e=>h7;enabled(e){return e}static ɵfac=(()=>{let t;return function(n){return(t||=Sl(e))(n||e)}})();static ɵdir=sh({type:e,selectors:[[``,`required`,``,`formControlName`,``,3,`type`,`checkbox`],[``,`required`,``,`formControl`,``,3,`type`,`checkbox`],[``,`required`,``,`ngModel`,``,3,`type`,`checkbox`]],hostVars:1,hostBindings:function(e,t){e&2&&k(`required`,t._enabled?``:null)},inputs:{required:`required`},standalone:!1,features:[I_([Jhe]),_h]})}return e})(),Yhe=new Ei(``);function Xhe(e){return Object.getPrototypeOf(e.constructor)===Ehe}function U7(e,t){if(!t)return null;let n,r,i;return t.forEach(e=>{e.constructor===u7?n=e:Xhe(e)?r=e:i=e}),i||r||n||null}var Zhe=class extends zhe{_parent=null;name=null;valueAccessor=null;isCustomControlBased=!1;userOnReset;resetSubscription;set onReset(e){this.userOnReset=e,this.resetSubscription?.unsubscribe(),this.resetSubscription=void 0,this.control&&(this.resetSubscription=this.control.events.subscribe(e=>{e instanceof z7&&this.control&&this.userOnReset?.(this.control.value)}),this.subscription?.add(this.resetSubscription))}isNativeFormElement=!1;rawValueAccessors;_selectedValueAccessor=null;get selectedValueAccessor(){return this._selectedValueAccessor??=U7(this,this.rawValueAccessors)}parseErrorsValidator=null;renderer;injector;requiredValidatorViaDi;subscription;customControlBindings=null;constructor(e,t,n){super(),this.injector=e,this.renderer=t,this.rawValueAccessors=n,this.injector?.get(ys)?.onDestroy(()=>{this.removeParseErrorsValidator(this.control),this.subscription?.unsubscribe()})}setupCustomControl(){this.subscription?.unsubscribe();let e=this.injector?.get(Cne);if(!this.control||!e)return;let t=e.markForCheck.bind(e);this.subscription=new or,this.subscription.add(this.control.valueChanges.subscribe(t)),this.subscription.add(this.control.statusChanges.subscribe(t)),this.resetSubscription?.unsubscribe(),this.resetSubscription=void 0,this.userOnReset&&(this.resetSubscription=this.control.events.subscribe(e=>{e instanceof z7&&this.control&&this.userOnReset?.(this.control.value)}),this.subscription.add(this.resetSubscription)),this.parseErrorsValidator&&this.control.addValidators(this.parseErrorsValidator)}ngControlCreate(e){!e.nativeElement.hasAttribute?.(`ngNoCva`)&&(this.rawValueAccessors&&this.rawValueAccessors.length>0||this.valueAccessor!==null)||!e.customControl||(this.isCustomControlBased=!0,e.listenToCustomControlModel(e=>{this.control?.markAsDirty(),this.control?.setValue(e,{emitModelToViewChange:!1}),this.viewToModelUpdate(e)}),e.listenToCustomControlOutput(`touch`,()=>{this.control?.markAsTouched()}),this.customControlBindings={},this.isNativeFormElement=B7(e.nativeElement),this.requiredValidatorViaDi=this._rawValidators.find(e=>e instanceof H7))}ngControlUpdate(e,t){if(!this.isCustomControlBased)return;let n=this.control,r=this.customControlBindings;Object.is(r.value,n.value)||(r.value=n.value,e.setCustomControlModelInput(n.value)),this.bindControlProperty(e,r,`touched`,n.touched),this.bindControlProperty(e,r,`dirty`,n.dirty),this.bindControlProperty(e,r,`valid`,n.valid),this.bindControlProperty(e,r,`invalid`,n.invalid),this.bindControlProperty(e,r,`pending`,n.pending),this.bindControlProperty(e,r,`disabled`,n.disabled),this.shouldBindRequired&&this.bindControlProperty(e,r,`required`,this.isRequired);let i=n.errors;if(r.errors!==i){r.errors=i;let t=this._convertErrors(i);e.setInputOnDirectives(`errors`,t)}}get isRequired(){return(this.requiredValidatorViaDi?._enabled||this.control?._hasRequired())??!1}get shouldBindRequired(){return!0}bindControlProperty(e,t,n,r){if(t[n]===r)return;t[n]=r;let i=e.setInputOnDirectives(n,r);this.isNativeFormElement&&!i&&(n===`disabled`||n===`required`)&&this.renderer&&V7(this.renderer,e.nativeElement,n,r)}_convertErrors(e){if(e===null)return[];let t=this.control;return Object.entries(e).map(([e,n])=>new Khe({context:n,kind:e,control:t}))}setParseErrorSource(e){if(e===void 0)return;let t=null,n=X(()=>{let t=e();return t.length===0?null:t.reduce((e,t)=>(e[t.kind]=t,e),{})});this.parseErrorsValidator=(()=>t).bind(this),E(()=>{t=n(),this.control?.updateValueAndValidity({emitEvent:!1})},{injector:this.injector})}removeParseErrorsValidator(e){this.parseErrorsValidator&&(e?.removeValidators(this.parseErrorsValidator),e?.updateValueAndValidity({emitEvent:!1}))}},Qhe=Symbol(`FIELD_TREE`),W7=0;function $he(){return W7}function G7(e,t){return(...n)=>{try{return W7=t,e(...n)}finally{W7=0}}}function ege(e){return!e}function K7(e){return e}function q7(e){return Array.isArray(e)}function J7(e){return(typeof e==`object`||typeof e==`function`)&&e!=null}var Y7=Symbol(),X7=Symbol(),Z7=class{predicates;fns=[];constructor(e){this.predicates=e}push(e){this.fns.push(e9(this.predicates,e))}mergeIn(e){let t=this.predicates?e.fns.map(e=>e9(this.predicates,e)):e.fns;this.fns.push(...t)}hasRules(){return this.fns.length>0}},Q7=class extends Z7{get defaultValue(){return!1}compute(e){return this.fns.some(t=>{let n=t(e);return n&&n!==X7})}},$7=class e extends Z7{ignore;static ignoreNull(t){return new e(t,e=>e===null)}constructor(e,t){super(e),this.ignore=t}get defaultValue(){return[]}compute(e){return this.fns.reduce((t,n)=>{let r=n(e);return r===void 0||r===X7?t:q7(r)?[...t,...this.ignore?r.filter(e=>!this.ignore(e)):r]:this.ignore&&this.ignore(r)?t:[...t,r]},[])}},tge=class extends $7{constructor(e){super(e,void 0)}},nge=class extends Z7{key;get defaultValue(){return this.key.reducer.getInitial()}constructor(e,t){super(e),this.key=t}compute(e){if(this.fns.length===0)return this.key.reducer.getInitial();let t=this.key.reducer.getInitial();for(let n=0;n{for(let t of e){let e=n.stateOf(t.path),r=Z(e.structure.pathKeys).length-t.depth;for(let t=0;t0}hasMetadata(e){return this.metadata.has(e)}hasMetadataKeys(){return this.metadata.size>0}getMetadataKeys(){return this.metadata.keys()}getMetadata(e){return this.metadata.has(e)||this.metadata.set(e,new nge(this.predicates,e)),this.metadata.get(e)}mergeIn(e){this.hidden.mergeIn(e.hidden),this.disabledReasons.mergeIn(e.disabledReasons),this.readonly.mergeIn(e.readonly),this.syncErrors.mergeIn(e.syncErrors),this.syncTreeErrors.mergeIn(e.syncTreeErrors),this.asyncErrors.mergeIn(e.asyncErrors);for(let t of e.getMetadataKeys()){let n=e.metadata.get(t);this.getMetadata(t).mergeIn(n)}}},n9=class{depth;constructor(e){this.depth=e}build(){return new a9(this,[],0)}},r9=class e extends n9{constructor(e){super(e)}current;all=[];addHiddenRule(e){this.getCurrent().addHiddenRule(e)}addDisabledReasonRule(e){this.getCurrent().addDisabledReasonRule(e)}addReadonlyRule(e){this.getCurrent().addReadonlyRule(e)}addSyncErrorRule(e){this.getCurrent().addSyncErrorRule(e)}addSyncTreeErrorRule(e){this.getCurrent().addSyncTreeErrorRule(e)}addAsyncErrorRule(e){this.getCurrent().addAsyncErrorRule(e)}addMetadataRule(e,t){this.getCurrent().addMetadataRule(e,t)}getChild(e){if(e===Y7){let e=this.getCurrent().children;e.size>+!!e.has(Y7)&&(this.current=void 0)}return this.getCurrent().getChild(e)}hasLogic(e){return this===e||this.all.some(({builder:t})=>t.hasLogic(e))}hasRules(){return this.all.length>0}anyChildHasLogic(){return this.all.some(({builder:e})=>e.anyChildHasLogic())}mergeIn(e,t){t?this.all.push({builder:e,predicate:{fn:G7(t.fn,this.depth),path:t.path}}):this.all.push({builder:e}),this.current=void 0}getCurrent(){return this.current===void 0&&(this.current=new i9(this.depth),this.all.push({builder:this.current})),this.current}static newRoot(){return new e(0)}},i9=class extends n9{logic=new t9([]);children=new Map;constructor(e){super(e)}addHiddenRule(e){this.logic.hidden.push(G7(e,this.depth))}addDisabledReasonRule(e){this.logic.disabledReasons.push(G7(e,this.depth))}addReadonlyRule(e){this.logic.readonly.push(G7(e,this.depth))}addSyncErrorRule(e){this.logic.syncErrors.push(G7(e,this.depth))}addSyncTreeErrorRule(e){this.logic.syncTreeErrors.push(G7(e,this.depth))}addAsyncErrorRule(e){this.logic.asyncErrors.push(G7(e,this.depth))}addMetadataRule(e,t){this.logic.getMetadata(e).push(G7(t,this.depth))}getChild(e){return this.children.has(e)||this.children.set(e,new r9(this.depth+1)),this.children.get(e)}hasLogic(e){return this===e}hasRules(){return this.logic.hasAnyLogic()||this.children.size>0}anyChildHasLogic(){for(let e of this.children.values())if(e.hasRules())return!0;return!1}},a9=class e{builder;predicates;depth;logic;constructor(e,t,n){this.builder=e,this.predicates=t,this.depth=n,this.logic=e?ige(e,t,n):new t9([])}getChild(t){let n=this.builder?o9(this.builder,t):[];if(n.length===0)return new e(void 0,[],this.depth+1);if(n.length===1){let{builder:t,predicates:r}=n[0];return new e(t,[...this.predicates,...r.map(e=>s9(e,this.depth))],this.depth+1)}return new rge(n.map(({builder:t,predicates:n})=>new e(t,[...this.predicates,...n.map(e=>s9(e,this.depth))],this.depth+1)))}hasLogic(e){return this.builder?this.builder.hasLogic(e):!1}hasRules(){return this.builder?this.builder.hasRules():!1}anyChildHasLogic(){return this.builder?this.builder.anyChildHasLogic():!1}},rge=class e{all;logic;constructor(e){this.all=e,this.logic=new t9([]);for(let t of e)this.logic.mergeIn(t.logic)}getChild(t){return new e(this.all.flatMap(e=>e.getChild(t)))}hasLogic(e){return this.all.some(t=>t.hasLogic(e))}hasRules(){return this.all.some(e=>e.hasRules())}anyChildHasLogic(){return this.all.some(e=>e.anyChildHasLogic())}};function o9(e,t){if(e instanceof r9)return e.all.flatMap(({builder:e,predicate:n})=>{let r=o9(e,t);return n?r.map(({builder:e,predicates:t})=>({builder:e,predicates:[...t,n]})):r});if(e instanceof i9)return[...t!==Y7&&e.children.has(Y7)?[{builder:e.getChild(Y7),predicates:[]}]:[],...e.children.has(t)?[{builder:e.getChild(t),predicates:[]}]:[]];throw new di(1909,!1)}function ige(e,t,n){let r=new t9(t);if(e instanceof r9){let i=e.all.map(({builder:e,predicate:r})=>new a9(e,r?[...t,s9(r,n)]:t,n));for(let e of i)r.mergeIn(e.logic)}else if(e instanceof i9)r.mergeIn(e.logic);else throw new di(1909,!1);return r}function s9(e,t){return{...e,depth:t}}var c9=Symbol(`PATH`),l9=class e{keys;parent;keyInParent;root;children=new Map;fieldPathProxy=new Proxy(this,age);logicBuilder;constructor(e,t,n,r){this.keys=e,this.parent=n,this.keyInParent=r,this.root=t??this,n||(this.logicBuilder=r9.newRoot())}get builder(){return this.logicBuilder?this.logicBuilder:this.parent.builder.getChild(this.keyInParent)}getChild(t){return this.children.has(t)||this.children.set(t,new e([...this.keys,t],this.root,this,t)),this.children.get(t)}mergeIn(e,t){let n=e.compile();this.builder.mergeIn(n.builder,t)}static unwrapFieldPath(e){return e[c9]}static newRoot(){return new e([],void 0,void 0,void 0)}},age={get(e,t){return t===c9?e:e.getChild(t).fieldPathProxy}},u9=void 0,d9=new Map,f9=class e{schemaFn;constructor(e){this.schemaFn=e}compile(){if(d9.has(this))return d9.get(this);let e=l9.newRoot();d9.set(this,e);let t=u9;try{u9=e,this.schemaFn(e.fieldPathProxy)}finally{u9=t}return e}static create(t){return t instanceof e?t:new e(t)}static rootCompile(t){try{return d9.clear(),t===void 0?l9.newRoot():t instanceof e?t.compile():new e(t).compile()}finally{d9.clear()}}};function oge(e){return e instanceof f9||typeof e==`function`}function p9(e){if(u9!==l9.unwrapFieldPath(e).root)throw new di(1908,!1)}function m9(e,t,n){return p9(e),l9.unwrapFieldPath(e).builder.addMetadataRule(t,n),t}var h9={list(){return{reduce:(e,t)=>t===void 0?e:[...e,t],getInitial:()=>[]}},min(){return{reduce:(e,t)=>e===void 0||t===void 0?e??t:tvoid 0}},max(){return{reduce:(e,t)=>e===void 0||t===void 0?e??t:t>e?t:e,getInitial:()=>void 0}},or(){return{reduce:(e,t)=>e||t,getInitial:()=>!1}},and(){return{reduce:(e,t)=>e&&t,getInitial:()=>!0}},override:sge};function sge(e){return{reduce:(e,t)=>t,getInitial:()=>e?.()}}var g9=Symbol(`IS_ASYNC_VALIDATION_RESOURCE`),cge=class{reducer;create;brand;[g9];constructor(e,t){this.reducer=e,this.create=t}};function _9(e){return new cge(e??h9.override())}function v9(){return _9()}var y9=_9(h9.or()),lge=v9(),uge=v9(),dge=_9(h9.max()),fge=_9(h9.min()),pge=_9(h9.list());function b9(e,t){if(e===t)return!0;if(!e||!t||e.length!==t.length)return!1;for(let n=0;n0?`invalid`:e.pending()?`unknown`:`valid`}var hge=class{node;constructor(e){this.node=e}rawSyncTreeErrors=X(()=>this.shouldSkipValidation()?[]:[...this.node.logicNode.logic.syncTreeErrors.compute(this.node.context),...this.node.structure.parent?.validationState.rawSyncTreeErrors()??[]],{equal:b9});syncErrors=X(()=>this.shouldSkipValidation()?[]:[...this.node.logicNode.logic.syncErrors.compute(this.node.context),...this.syncTreeErrors(),...gge(this.node.submitState.submissionErrors())],{equal:b9});syncValid=X(()=>this.shouldSkipValidation()?!0:this.node.structure.reduceChildren(this.syncErrors().length===0,(e,t)=>t&&e.validationState.syncValid(),ege));syncTreeErrors=X(()=>this.rawSyncTreeErrors().filter(e=>e.fieldTree===this.node.fieldTree),{equal:b9});rawAsyncErrors=X(()=>this.shouldSkipValidation()?[]:[...this.node.logicNode.logic.asyncErrors.compute(this.node.context),...this.node.structure.parent?.validationState.rawAsyncErrors()??[]],{equal:b9});asyncErrors=X(()=>this.shouldSkipValidation()?[]:this.rawAsyncErrors().filter(e=>e===`pending`||e.fieldTree===this.node.fieldTree),{equal:b9});parseErrors=X(()=>this.node.formFieldBindings().flatMap(e=>e.parseErrors()),{equal:b9});errors=X(()=>[...this.parseErrors(),...this.syncErrors(),...this.asyncErrors().filter(e=>e!==`pending`)],{equal:b9});errorSummary=X(()=>{let e=this.node.structure.reduceChildren(this.errors(),(e,t)=>[...t,...e.errorSummary()]);return Z(()=>e.sort(_ge)),e},{equal:b9});pending=X(()=>this.node.structure.reduceChildren(this.asyncErrors().includes(`pending`),(e,t)=>t||e.validationState.pending()));status=X(()=>{if(this.shouldSkipValidation())return`valid`;let e=mge(this);return this.node.structure.reduceChildren(e,(e,t)=>t===`invalid`||e.validationState.status()===`invalid`?`invalid`:t===`unknown`||e.validationState.status()===`unknown`?`unknown`:`valid`,e=>e===`invalid`)});valid=X(()=>this.status()===`valid`);invalid=X(()=>this.status()===`invalid`);shouldSkipValidation=X(()=>this.node.hidden()||this.node.disabled()||this.node.readonly()||this.node.structure.isOrphaned())};function gge(e){return e===void 0?[]:q7(e)?e:[e]}function x9(e,t){if(q7(e))for(let n of e)n.fieldTree??=t;else e&&(e.fieldTree??=t);return e}function S9(e){return e.formField?e.formField.element:e.fieldTree().formFieldBindings().reduce((e,t)=>!e||!t.element?e??t.element:e.compareDocumentPosition(t.element)&Node.DOCUMENT_POSITION_PRECEDING?t.element:e,void 0)}function _ge(e,t){let n=S9(e),r=S9(t);return n===r?0:n===void 0||r===void 0?n===void 0?1:-1:n.compareDocumentPosition(r)&Node.DOCUMENT_POSITION_PRECEDING?1:-1}var C9=_9(),vge=class{node;cache=new WeakMap;constructor(e){this.node=e,this.fieldTreeOf=this.fieldTreeOf.bind(this),this.stateOf=this.stateOf.bind(this)}resolve(e){if(!this.cache.has(e)){let t=X(()=>{let t=l9.unwrapFieldPath(e),n=this.node,r=$he();for(;r>0||!n.structure.logic.hasLogic(t.root.builder);)if(r--,n=n.structure.parent,n===void 0)throw new di(1900,!1);for(let e of t.keys)if(n=n.structure.getChild(e),n===void 0)throw new di(1901,!1);return n.fieldTree});this.cache.set(e,t)}return this.cache.get(e)()}get fieldTree(){return this.node.fieldProxy}get state(){return this.node}get value(){return this.node.structure.value}get key(){return this.node.structure.keyInParent}get pathKeys(){return this.node.structure.pathKeys}index=X(()=>{let e=this.key();if(!q7(Z(this.node.structure.parent.value)))throw new di(1906,!1);return Number(e)});fieldTreeOf(e){return this.resolve(e)}stateOf(e){return this.resolve(e)()}valueOf=e=>{let t=this.resolve(e)().value();if(t instanceof Uhe)throw new di(1907,!1);return t}},yge=class{node;metadata=new Map;constructor(e){this.node=e}runMetadataCreateLifecycle(){if(!this.node.logicNode.logic.hasMetadataKeys())return;let e=yne();e&&Q_(!1);try{Z(()=>Qa(this.node.structure.injector,()=>{for(let e of this.node.logicNode.logic.getMetadataKeys())if(e.create){let t=this.node.logicNode.logic.getMetadata(e),n=e.create(this.node,X(()=>t.compute(this.node.context)));this.metadata.set(e,n)}}))}finally{e&&Q_(!0)}}get(e){if(this.has(e)&&!this.metadata.has(e)){if(e.create)throw new di(1912,!1);let t=this.node.logicNode.logic.getMetadata(e);this.metadata.set(e,X(()=>t.compute(this.node.context)))}return this.metadata.get(e)}has(e){return this.node.logicNode.logic.hasMetadata(e)}},bge={get(e,t,n){if(t===Qhe)return!0;let r=e(),i=r.structure.getChild(t);if(i!==void 0)return i.fieldTree;let a=Z(r.value);if(q7(a)){if(t===`length`)return r.value().length;if(t===Symbol.iterator)return()=>(r.value(),Array.prototype[Symbol.iterator].apply(r.fieldTree))}if(J7(a)&&t===Symbol.iterator)return function*(){for(let e in n)yield[e,n[e]]}},getOwnPropertyDescriptor(e,t){let n=Z(e().value),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&!r.configurable&&(r.configurable=!0),r},ownKeys(e){let t=Z(e().value);return typeof t==`object`&&t?Reflect.ownKeys(t):[]}};function xge(e,t){let n=X(()=>e()[t()]);return n[en]=e[en],n.set=r=>{Object.is(Z(n),r)||e.update(e=>Sge(e,r,t()))},n.update=e=>{n.set(e(Z(n)))},n.asReadonly=()=>n,n}function Sge(e,t,n){if(q7(e)){let r=[...e];return r[n]=t,r}return{...e,[n]:t}}var w9=Symbol(``),T9=X(()=>!1),E9=class{logic;node;createChildNode;identitySymbol=Symbol();_injector=void 0;_anyChildHasLogic;get injector(){return this._injector??=_s.create({providers:[],parent:this.fieldManager.injector}),this._injector}constructor(e,t,n){this.logic=e,this.node=t,this.createChildNode=n}children(){this.ensureChildrenMap();let e=this.childrenMap();return e===void 0?[]:Array.from(e.byPropertyKey.values()).map(e=>Z(e.reader))}materializedChildren(){let e=this.childrenMap();return e===void 0?[]:Array.from(e.byPropertyKey.values()).map(e=>e.node)}_areChildrenMaterialized(){return Z(this.childrenMap)!==void 0}ensureChildrenMap(){this._areChildrenMaterialized()||Z(()=>{this.childrenMap.update(e=>this.computeChildrenMap(this.value(),e,!0))})}getChild(e){this.ensureChildrenMap();let t=e.toString(),n=Z(this.childrenMap)?.byPropertyKey.get(t)?.reader;return n||=this.createReader(t),n()}reduceChildren(e,t,n){let r=this.childrenMap();if(!r)return e;let i=e;for(let e of r.byPropertyKey.values()){if(n?.(i))break;i=t(Z(e.reader),i)}return i}destroy(){this.injector.destroy()}createKeyOrOrphanSignals(e,t,n){if(e===`root`)return{keyInParent:D9,isOrphaned:T9};let r=this.parent,i=n,a=X(()=>{if(r.structure.isOrphaned())return w9;let e=r.structure.childrenMap();if(!e)return w9;let n=e.byPropertyKey.get(i);if(n&&n.node===this.node)return i;if(t===void 0)return w9;for(let[t,n]of e.byPropertyKey)if(n.node===this.node)return i=t;return w9}),o=X(()=>a()===w9);return{keyInParent:X(()=>{let e=a();if(e===w9)throw t===void 0?new di(-1902,!1):new di(1904,!1);return e}),isOrphaned:o}}createChildrenMap(){return Q({source:this.value,computation:(e,t)=>this.computeChildrenMap(e,t?.value,!1)})}computeChildrenMap(e,t,n){if(!J7(e)||!n&&t===void 0&&!(this._anyChildHasLogic??=this.logic.anyChildHasLogic()))return;t??={byPropertyKey:new Map};let r,i=q7(e);t!==void 0&&(r=i?Ege(t,e,this.identitySymbol):Dge(t,e));for(let n of Object.keys(e)){let a,o=e[n];if(o===void 0){t.byPropertyKey.has(n)&&(r??={...t},r.byPropertyKey.delete(n));continue}i&&J7(o)&&!q7(o)&&(a=o[this.identitySymbol]??=Symbol(``));let s;a&&(t.byTrackingKey?.has(a)||(r??={...t},r.byTrackingKey??=new Map,r.byTrackingKey.set(a,this.createChildNode(n,a,i))),s=(r??t).byTrackingKey.get(a));let c=t.byPropertyKey.get(n);c===void 0?(r??={...t},r.byPropertyKey.set(n,{reader:this.createReader(n),node:s??this.createChildNode(n,a,i)})):s&&s!==c.node&&(r??={...t},c.node=s)}return r??t}createReader(e){return X(()=>this.childrenMap()?.byPropertyKey.get(e)?.node)}},Cge=class extends E9{fieldManager;value;get parent(){}get root(){return this.node}get pathKeys(){return Tge}get keyInParent(){return D9}isOrphaned=T9;childrenMap;constructor(e,t,n,r,i){super(t,e,i),this.fieldManager=n,this.value=r,this.childrenMap=this.createChildrenMap()}},wge=class extends E9{logic;parent;root;pathKeys;keyInParent;value;childrenMap;isOrphaned;get fieldManager(){return this.root.structure.fieldManager}constructor(e,t,n,r,i,a){super(t,e,a),this.logic=t,this.parent=n,this.root=this.parent.structure.root;let o=this.createKeyOrOrphanSignals(`child`,r,i);this.isOrphaned=o.isOrphaned,this.keyInParent=o.keyInParent,this.pathKeys=X(()=>[...n.structure.pathKeys(),this.keyInParent()]),this.value=xge(this.parent.structure.value,this.keyInParent),this.childrenMap=this.createChildrenMap(),this.fieldManager.structures.add(this)}},Tge=X(()=>[]),D9=X(()=>{throw new di(1905,!1)});function Ege(e,t,n){let r,i=new Set(e.byPropertyKey.keys()),a=e.byTrackingKey&&new Set(e.byTrackingKey.keys());for(let e=0;e0){r??={...e};for(let e of i)r.byPropertyKey.delete(e)}if(a&&a.size>0){r??={...e};for(let e of a)r.byTrackingKey.delete(e)}return r}function Dge(e,t){let n;for(let r of e.byPropertyKey.keys())Object.hasOwn(t,r)||(n??={...e},n.byPropertyKey.delete(r));return n}var Oge=class{node;selfSubmitting=T(!1);submissionErrors;constructor(e){this.node=e,this.submissionErrors=Q({source:this.node.structure.value,computation:()=>[]})}submitting=X(()=>this.selfSubmitting()||(this.node.structure.parent?.submitting()??!1))},O9=class{structure;validationState;metadataState;nodeState;submitState;fieldAdapter;controlValue;_context=void 0;get context(){return this._context??=new vge(this)}fieldProxy=new Proxy(()=>this,bge);pathNode;constructor(e){this.pathNode=e.pathNode,this.fieldAdapter=e.fieldAdapter,this.structure=this.fieldAdapter.createStructure(this,e),this.validationState=this.fieldAdapter.createValidationState(this,e),this.nodeState=this.fieldAdapter.createNodeState(this,e),this.metadataState=new yge(this),this.submitState=new Oge(this),this.controlValue=this.controlValueSignal(),this.metadataState.runMetadataCreateLifecycle()}focusBoundControl(e){this.getBindingForFocus()?.focus(e)}getBindingForFocus(){return this.formFieldBindings().filter(e=>e.focus!==void 0).reduce(k9,void 0)||this.structure.children().map(e=>e.getBindingForFocus()).reduce(k9,void 0)}pendingSync=Q({source:()=>this.value(),computation:(e,t)=>{t?.value?.abort()}});get fieldTree(){return this.fieldProxy}get logicNode(){return this.structure.logic}get value(){return this.structure.value}get keyInParent(){return this.structure.keyInParent}get errors(){return this.validationState.errors}get parseErrors(){return this.validationState.parseErrors}get errorSummary(){return this.validationState.errorSummary}get pending(){return this.validationState.pending}get valid(){return this.validationState.valid}get invalid(){return this.validationState.invalid}get dirty(){return this.nodeState.dirty}get touched(){return this.nodeState.touched}get disabled(){return this.nodeState.disabled}get disabledReasons(){return this.nodeState.disabledReasons}get hidden(){return this.nodeState.hidden}get readonly(){return this.nodeState.readonly}get formFieldBindings(){return this.nodeState.formFieldBindings}get submitting(){return this.submitState.submitting}get name(){return this.nodeState.name}get max(){let e=this.metadata(uge)?.();return e?this.metadata(e):void 0}get maxLength(){return this.metadata(fge)}get min(){let e=this.metadata(lge)?.();return e?this.metadata(e):void 0}get minLength(){return this.metadata(dge)}get pattern(){return this.metadata(pge)??kge}get required(){return this.metadata(y9)??Age}metadata(e){return this.metadataState.get(e)}getError(e){return this.errors().find(t=>t.kind===e)}hasMetadata(e){return this.metadataState.has(e)}markAsTouched(e){this.structure.isOrphaned()||Z(()=>{this.markAsTouchedInternal(e),this.flushSync()})}markAsTouchedInternal(e){if(!this.structure.isOrphaned()&&!this.validationState.shouldSkipValidation()&&(this.nodeState.markAsTouched(),!e?.skipDescendants))for(let e of this.structure.children())e.markAsTouchedInternal()}markAsDirty(){this.nodeState.markAsDirty()}markAsPristine(){this.nodeState.markAsPristine()}markAsUntouched(){this.nodeState.markAsUntouched()}reset(e){Z(()=>this._reset(e))}_reset(e){this.pendingSync()?.abort(),e!==void 0&&this.value.set(e),this.controlValue.rawSet(this.value()),this.nodeState.markAsUntouched(),this.nodeState.markAsPristine();for(let e of this.formFieldBindings())e.reset();for(let e of this.structure.materializedChildren())e._reset()}reloadValidation(){Z(()=>this._reloadValidation())}_reloadValidation(){let e=this.logicNode.logic.getMetadataKeys();for(let t of e)t[g9]&&this.metadata(t).reload?.();for(let e of this.structure.children())e._reloadValidation()}controlValueSignal(){let e=Q(this.value);e.rawSet=e.set,e.set=t=>{e.rawSet(t),this.markAsDirty(),this.debounceSync()};let t=e.update;return e.update=e=>{t(e),this.markAsDirty(),this.debounceSync()},e}sync(){this.value.set(this.controlValue())}flushSync(){let e=this.pendingSync();e&&!e.signal.aborted&&(e.abort(),this.sync())}async debounceSync(){let e=Z(()=>(this.pendingSync()?.abort(),this.nodeState.debouncer()));if(e){let t=new AbortController,n=e(t.signal);if(n&&(this.pendingSync.set(t),await n,t.signal.aborted))return}this.structure.isOrphaned()||this.sync()}static newRoot(e,t,n,r){return r.newRoot(e,t,n,r)}createStructure(e){return e.kind===`root`?new Cge(this,e.logic,e.fieldManager,e.value,this.newChild.bind(this)):new wge(this,e.logic,e.parent,e.identityInParent,e.initialKeyInParent,this.newChild.bind(this))}newChild(e,t,n){let r,i;return n?(r=this.pathNode.getChild(Y7),i=this.structure.logic.getChild(Y7)):(r=this.pathNode.getChild(e),i=this.structure.logic.getChild(e)),this.fieldAdapter.newChild({kind:`child`,parent:this,pathNode:r,logic:i,initialKeyInParent:e,identityInParent:t,fieldAdapter:this.fieldAdapter})}},kge=X(()=>[]),Age=X(()=>!1);function k9(e,t){return e?t&&e.element.compareDocumentPosition(t.element)&Node.DOCUMENT_POSITION_PRECEDING?t:e:t}var jge=class{node;selfTouched=T(!1);selfDirty=T(!1);markAsTouched(){this.selfTouched.set(!0)}markAsDirty(){this.selfDirty.set(!0)}markAsPristine(){this.selfDirty.set(!1)}markAsUntouched(){this.selfTouched.set(!1)}formFieldBindings=T([]);constructor(e){this.node=e}dirty=X(()=>{let e=this.selfDirty()&&!this.isNonInteractive();return this.node.structure.reduceChildren(e,(e,t)=>t||e.nodeState.dirty(),K7)});touched=X(()=>{let e=this.selfTouched()&&!this.isNonInteractive();return this.node.structure.reduceChildren(e,(e,t)=>t||e.nodeState.touched(),K7)});disabledReasons=X(()=>[...this.node.structure.parent?.nodeState.disabledReasons()??[],...this.node.logicNode.logic.disabledReasons.compute(this.node.context)],{equal:b9});disabled=X(()=>!!this.disabledReasons().length);readonly=X(()=>(this.node.structure.parent?.nodeState.readonly()||this.node.logicNode.logic.readonly.compute(this.node.context))??!1);hidden=X(()=>(this.node.structure.parent?.nodeState.hidden()||this.node.logicNode.logic.hidden.compute(this.node.context))??!1);name=X(()=>{let e=this.node.structure.parent;return e?`${e.name()}.${this.node.structure.keyInParent()}`:this.node.structure.fieldManager.rootName});debouncer=X(()=>{if(this.node.logicNode.logic.hasMetadata(C9)){let e=this.node.logicNode.logic.getMetadata(C9).compute(this.node.context);if(e)return t=>e(this.node.context,t)}return this.node.structure.parent?.nodeState.debouncer?.()});isNonInteractive=X(()=>this.hidden()||this.disabled()||this.readonly())},Mge=class{newRoot(e,t,n,r){return new O9({kind:`root`,fieldManager:e,value:t,pathNode:n,logic:n.builder.build(),fieldAdapter:r})}newChild(e){return new O9(e)}createNodeState(e){return new jge(e)}createValidationState(e){return new hge(e)}createStructure(e,t){return e.createStructure(t)}},Nge=class{injector;rootName;submitOptions;constructor(e,t,n){this.injector=e,this.rootName=t??`${this.injector.get(qs)}.form${Pge++}`,this.submitOptions=n}structures=new Set;createFieldManagementEffect(e){E(()=>{let t=new Set;this.markStructuresLive(e,t);for(let e of this.structures)t.has(e)||(this.structures.delete(e),Z(()=>e.destroy()))},{injector:this.injector})}markStructuresLive(e,t){t.add(e);for(let n of e.children())this.markStructuresLive(n.structure,t)}},Pge=0,Fge=new Ei(``);function Ige(e){let t,n,r;return e.length===3?[t,n,r]=e:e.length===2?oge(e[1])?[t,n]=e:[t,r]=e:[t]=e,[t,n,r]}function Lge(...e){let[t,n,r]=Ige(e),i=r?.injector??x(_s),a=Qa(i,()=>f9.rootCompile(n)),o=new Nge(i,r?.name,r?.submission),s=r?.adapter??new Mge,c=O9.newRoot(o,t,a,s);o.createFieldManagementEffect(c.structure);let{experimentalWebMcpTool:l}=r??{};if(l){let e=Qa(i,()=>x(Fge,{optional:!0}));e&&Qa(i,()=>e(c.fieldTree,{name:l.name,description:l.description}))}return c.fieldTree}async function Rge(e,t){let n=Z(e);if(Z(n.submitState.submitting))return!1;let r=t===void 0?n.structure.root.fieldProxy:e,i={root:n.structure.root.fieldProxy,submitted:e};t=typeof t==`function`?{action:t}:t??n.structure.fieldManager.submitOptions;let a=t?.action;if(!a)throw new di(1915,!1);n.markAsTouched();let o=t?.onInvalid,s=zge(n,t?.ignoreValidators);try{if(s){n.submitState.selfSubmitting.set(!0);let e=await Z(()=>a?.(r,i));return e&&Bge(n,e),!e||q7(e)&&e.length===0}return Z(()=>o?.(r,i)),!1}finally{n.submitState.selfSubmitting.set(!1)}}function zge(e,t){switch(t){case`all`:return!0;case`none`:return Z(e.valid);default:return!Z(e.invalid)}}function Bge(e,t){q7(t)||(t=[t]);let n=new Map;for(let r of t){let t=x9(r,e.fieldTree),i=t.fieldTree(),a=n.get(i);a||(a=[],n.set(i,a)),a.push(t)}for(let[e,t]of n)e.submitState.submissionErrors.set(t)}var A9=class{kind=`compat`;control;fieldTree;context;message;constructor({context:e,kind:t,control:n}){this.context=e,this.kind=t,this.control=n}};function Vge(e){if(e.length===0)return null;let t={};for(let n of e)t[n.kind]=n instanceof A9?n.context:n;return t}function Hge(e,t){return e===null?[]:Object.entries(e).map(([e,n])=>new A9({context:n,kind:e,control:t}))}var Uge=new Ei(``);function j9(e,t){return e instanceof Function?e(t):e}function Wge(e){return typeof e==`number`?isNaN(e):e===``||e===!1||e==null}function M9(e){return e===void 0?[]:Array.isArray(e)?e:[e]}function Gge(e,t){p9(e),l9.unwrapFieldPath(e).builder.addSyncErrorRule(e=>x9(t(e),e.fieldTree))}function Kge(e){return new qge(e)}var N9=class{__brand=void 0;kind=``;fieldTree;message;constructor(e){e&&Object.assign(this,e)}},qge=class extends N9{kind=`required`},P9=class extends N9{kind=`parse`};function Jge(e,t){let n=m9(e,_9(),e=>!t?.when||t.when(e));m9(e,y9,({state:e})=>e.metadata(n)()),Gge(e,e=>{if(e.state.metadata(n)()&&Wge(e.value()))return t?.error?j9(t.error,e):Kge({message:j9(t?.message,e)})})}function Yge(e,t,n){let r=Q({source:e,computation:()=>[],equal:b9});return{errors:r.asReadonly(),setRawValue:e=>{let i=n(e);r.set(M9(i.error)),i.value!==void 0&&t(i.value),r.set(M9(i.error))},reset:()=>{r.set([])}}}var Xge=class{field;constructor(e){this.field=e}control=this;get value(){return this.field().controlValue()}get valid(){return this.field().valid()}get invalid(){return this.field().invalid()}get pending(){return this.field().pending()}get disabled(){return this.field().disabled()}get enabled(){return!this.field().disabled()}get errors(){return Vge(this.field().errors())}get pristine(){return!this.field().dirty()}get dirty(){return this.field().dirty()}get touched(){return this.field().touched()}get untouched(){return!this.field().touched()}get status(){if(this.field().disabled())return`DISABLED`;if(this.field().valid())return`VALID`;if(this.field().invalid())return`INVALID`;if(this.field().pending())return`PENDING`;throw new di(1910,!1)}valueAccessor=null;hasValidator(e){return e===m7.required&&this.field().required()}updateValueAndValidity(){}},F9={disabled:`disabled`,disabledReasons:`disabledReasons`,dirty:`dirty`,errors:`errors`,hidden:`hidden`,invalid:`invalid`,max:`max`,maxLength:`maxLength`,min:`min`,minLength:`minLength`,name:`name`,pattern:`pattern`,pending:`pending`,readonly:`readonly`,required:`required`,touched:`touched`},Zge=(()=>{let e={};for(let t of Object.keys(F9))e[F9[t]]=t;return e})();function I9(e,t){return e[Zge[t]]?.()}var L9=Object.values(F9);function R9(){return{}}function z9(e,t,n){return e[t]!==n&&(e[t]=n,!0)}function Qge(e,t,n){let r;if(H9(e)&&n.isBadInput(e))return{error:new P9};switch(e.type){case`checkbox`:return{value:e.checked};case`number`:case`range`:case`datetime-local`:if(r=Z(t),typeof r==`number`||r===null)return{value:e.value===``?null:e.valueAsNumber};break;case`date`:case`month`:case`time`:case`week`:if(r=Z(t),r===null||r instanceof Date)return{value:e.valueAsDate};if(typeof r==`number`)return{value:e.valueAsNumber}}if(e.tagName===`INPUT`&&e.type===`text`&&(r??=Z(t),typeof r==`number`||r===null)){if(e.value===``)return{value:null};let t=Number(e.value);return Number.isNaN(t)?{error:new P9}:{value:t}}return{value:e.value}}function B9(e,t){switch(e.type){case`checkbox`:e.checked=t;return;case`radio`:e.checked=t===e.value;return;case`number`:case`range`:case`datetime-local`:if(typeof t==`number`){V9(e,t);return}if(t===null){e.value=``;return}break;case`date`:case`month`:case`time`:case`week`:if(t===null||t instanceof Date){e.valueAsDate=t;return}if(typeof t==`number`){V9(e,t);return}}if(e.tagName===`INPUT`&&e.type===`text`){if(typeof t==`number`){e.value=isNaN(t)?``:String(t);return}if(t===null){e.value=``;return}}e.value=t}function V9(e,t){isNaN(t)?e.value=``:e.valueAsNumber=t}function H9(e){return e.tagName===`INPUT`}function $ge(e){return e.type===`date`||e.type===`datetime-local`||e.type===`month`||e.type===`time`||e.type===`week`}function e_e(e,t){let n=e.getUTCFullYear(),r=String(e.getUTCMonth()+1).padStart(2,`0`);return t===`month`?`${n}-${r}`:`${n}-${r}-${String(e.getUTCDate()).padStart(2,`0`)}`}function U9(e,t,n){return t instanceof Date&&(e===`min`||e===`max`)&&(n===`date`||n===`month`)?e_e(t,n):t}function t_e(e,t){e.listenToCustomControlModel(e=>t.state().controlValue.set(e)),e.listenToCustomControlOutput(`touch`,()=>t.state().markAsTouched()),t.registerAsBinding(e.customControl);let n=R9();return()=>{let r=t.state(),i=r.controlValue();z9(n,`controlValue`,i)&&e.setCustomControlModelInput(i);for(let i of L9){let a;if(a=i===`errors`?t.errors():I9(r,i),z9(n,i,a)&&(e.setInputOnDirectives(i,a),t.elementAcceptsNativeProperty(i)&&!e.customControlHasInput(i))){let e=U9(i,a,t.nativeFormElement.type);V7(t.renderer,t.nativeFormElement,i,e)}}}}function n_e(e){return typeof e==`object`&&!!e}function r_e(e,t){let n=R9();t.controlValueAccessor.registerOnChange(e=>{n.controlValue=e,t.state().controlValue.set(e)}),t.controlValueAccessor.registerOnTouched(()=>t.state().markAsTouched());let r=t.injector.get(p7,null,{optional:!0,self:!0});if(r){let e;for(let t of r)n_e(t)&&t.registerOnValidatorChange&&(e??=T(0),t.registerOnValidatorChange(()=>{e.update(e=>e+1)}));let n=r.map(e=>typeof e==`function`?e:e.validate.bind(e)),i=m7.compose(n),a=X(()=>(e?.(),Hge(i?i(t.interopNgControl.control):null,t.interopNgControl.control)));t.parseErrorsSource.set(a)}return t.registerAsBinding({reset:()=>{let e=t.state().value();n.controlValue=e,Z(()=>t.controlValueAccessor.writeValue(e))}}),()=>{let r=t.state(),i=r.controlValue();z9(n,`controlValue`,i)&&Z(()=>t.controlValueAccessor.writeValue(i));for(let i of L9){let a=I9(r,i);if(z9(n,i,a)){let n=e.setInputOnDirectives(i,a,i===`name`?i_e:void 0);i===`disabled`&&t.controlValueAccessor.setDisabledState?Z(()=>t.controlValueAccessor.setDisabledState(a)):!n&&t.elementAcceptsNativeProperty(i)&&V7(t.renderer,t.nativeFormElement,i,a)}}}}function i_e(e){return e==null}function a_e(e,t,n){if(typeof MutationObserver!=`function`)return;let r=new MutationObserver(e=>{e.some(e=>o_e(e))&&t()});r.observe(e,{attributes:!0,attributeFilter:[`value`],characterData:!0,childList:!0,subtree:!0}),n.onDestroy(()=>r.disconnect())}function o_e(e){if(e.type===`childList`||e.type===`characterData`){if(e.target instanceof Comment)return!1;for(let t of e.addedNodes)if(!(t instanceof Comment))return!0;for(let t of e.removedNodes)if(!(t instanceof Comment))return!0;return!1}return e.type===`attributes`&&e.target instanceof HTMLOptionElement}function s_e(e,t,n,r){let i=!1,a=t.nativeFormElement,o=Yge(()=>t.state().value(),e=>t.state().controlValue.set(e),e=>Qge(a,t.state().value,r));n.set(o.errors),t.onReset=()=>{o.reset();let e=t.state().value();s.controlValue=e,B9(a,e)},e.listenToDom(`input`,()=>o.setRawValue(void 0)),e.listenToDom(`blur`,()=>t.state().markAsTouched()),H9(a)&&$ge(a)&&r.watchValidity(t.destroyRef,a,()=>o.setRawValue(void 0)),t.registerAsBinding(),a.tagName===`SELECT`&&a_e(a,()=>{i&&(a.value=t.state().controlValue())},t.destroyRef);let s=R9();return()=>{let n=t.state();for(let r of L9){let i=I9(n,r);if(z9(s,r,i)&&(e.setInputOnDirectives(r,i),t.elementAcceptsNativeProperty(r))){let e=U9(r,i,a.type);V7(t.renderer,a,r,e)}}let r=n.controlValue(),o=z9(s,`controlValue`,r),c=a.type===`radio`&&z9(s,`radioValue`,a.value);(o||c)&&B9(a,r),i=!0}}var W9=(()=>{class e{static ɵfac=function(t){return new(t||e)};static ɵprov=yi({token:e,factory:e=>c_e.ɵfac(e),providedIn:`root`})}return e})(),c_e=(()=>{class e extends W9{document=x(vs);cspNonce=x(Zs,{optional:!0});injectedStyles=new WeakMap;watchValidity(e,t,n){let r=t.getRootNode();this.injectedStyles.has(r)||this.injectedStyles.set(r,this.createTransitionStyle(r));let i=e=>{let t=e;(t.animationName===`ng-valid`||t.animationName===`ng-invalid`)&&n()};t.addEventListener(`animationstart`,i),e.onDestroy(()=>{t.removeEventListener(`animationstart`,i)})}isBadInput(e){return e.validity?.badInput??!1}createTransitionStyle(e){let t=this.document.createElement(`style`);return this.cspNonce&&(t.nonce=this.cspNonce),t.textContent=` @keyframes ng-valid {} @keyframes ng-invalid {} input:valid, textarea:valid { @@ -26163,7 +26186,7 @@ dd[_ngcontent-%COMP%] { input:invalid, textarea:invalid { animation: ng-invalid 0.001s; } - `,e.nodeType===9?e.head?.appendChild(t):e.appendChild(t),t}ngOnDestroy(){this.injectedStyles.get(this.document)?.remove()}static ɵfac=(()=>{let t;return function(n){return(t||=Sl(e))(n||e)}})();static ɵprov=yi({token:e,factory:e.ɵfac})}return e})(),s_e=Symbol(),G9=new Ei(``),c_e=(()=>{class e{field=$.required({alias:`formField`});state=X(()=>this.field()());renderer=x(rp);destroyRef=x(ys);injector=x(_s);element=x(kl).nativeElement;elementIsNativeFormElement=B7(this.element);elementAcceptsTextualValues=Uhe(this.element);_elementAcceptsMinMax;nativeFormElement=this.elementIsNativeFormElement?this.element:void 0;focuser=e=>this.element.focus(e);controlValueAccessors=x(l7,{optional:!0,self:!0});config=x(Vge,{optional:!0});validityMonitor=x(W9);parseErrorsSource=T(void 0);_interopNgControl;get interopNgControl(){return this._interopNgControl??=new Jge(this.state)}parseErrors=X(()=>this.parseErrorsSource()?.().map(e=>({...e,fieldTree:Z(this.state).fieldTree,formField:this}))??[],{equal:b9});errors=X(()=>this.state().errors().filter(e=>!e.formField||e.formField===this),{equal:b9});isFieldBinding=!1;resetter=()=>{};parseErrorsResetCallback;setParseErrors(e){this.parseErrorsSource.set(e)}set onReset(e){this.parseErrorsResetCallback=e}get onReset(){return this.parseErrorsResetCallback}get controlValueAccessor(){return!this.controlValueAccessors||this.controlValueAccessors.length===0?this.interopNgControl?.valueAccessor??void 0:U7(this.interopNgControl,this.controlValueAccessors)??void 0}installClassBindingEffect(){let e=Object.entries(this.config?.classes??{}).map(([e,t])=>[e,X(()=>t(this))]);if(e.length===0)return;let t=R9();mv({write:()=>{for(let[n,r]of e){let e=r();z9(t,n,e)&&(e?this.renderer.addClass(this.element,n):this.renderer.removeClass(this.element,n))}}},{injector:this.injector})}focus(e){this.focuser(e)}reset(){this.resetter(),this.parseErrorsResetCallback?.(this.state().value())}registerAsBinding(e){if(this.isFieldBinding)throw new di(1913,!1);this.isFieldBinding=!0,this.installClassBindingEffect(),e?.focus&&(this.focuser=t=>e.focus(t)),e?.reset&&(this.resetter=()=>e.reset()),E(e=>{let t=this.state();t.nodeState.formFieldBindings.update(e=>[...e,this]),e(()=>{t.nodeState.formFieldBindings.update(e=>e.filter(e=>e!==this))})},{injector:this.injector})}[s_e];ɵngControlCreate(e){if(!e.hasPassThrough){if(this.controlValueAccessor)this.ɵngControlUpdate=t_e(e,this);else if(e.customControl)this.ɵngControlUpdate=$ge(e,this);else if(this.elementIsNativeFormElement)this.ɵngControlUpdate=a_e(e,this,this.parseErrorsSource,this.validityMonitor);else throw new di(1914,!1)}}ɵngControlUpdate;elementAcceptsNativeProperty(e){if(!this.elementIsNativeFormElement)return!1;switch(e){case`min`:case`max`:return this._elementAcceptsMinMax??=Hhe(this.element);case`minLength`:case`maxLength`:return this.elementAcceptsTextualValues;case`disabled`:case`required`:case`readonly`:case`name`:return!0;default:return!1}}static ɵfac=function(t){return new(t||e)};static ɵdir=sh({type:e,selectors:[[``,`formField`,``]],inputs:{field:[1,`formField`,`field`]},exportAs:[`formField`],features:[I_([{provide:G9,useExisting:e},{provide:Yhe,useFactory:()=>x(e).interopNgControl},{provide:qhe,useFactory:()=>x(G9,{self:!0})}]),hh(`formField`)]})}return e})(),l_e=(()=>{class e{fieldTree=$.required({alias:`formRoot`});onSubmit(e){e.preventDefault(),Z(()=>{let e=this.fieldTree();e().structure.fieldManager.submitOptions&&Ige(e)})}static ɵfac=function(t){return new(t||e)};static ɵdir=sh({type:e,selectors:[[`form`,`formRoot`,``]],hostAttrs:[`novalidate`,``],hostBindings:function(e,t){e&1&&H(`submit`,function(e){return t.onSubmit(e)})},inputs:{fieldTree:[1,`formRoot`,`fieldTree`]}})}return e})(),u_e=[`codeInput`],d_e=`https://pangular-inspector.dev/security/#one-time-code`,f_e=class e{client=$.required();docsUrl=d_e;busy=T(!1);error=T(``);notice=T(``);model=T({code:``});codeForm=Fge(this.model,e=>Kge(e.code),{submission:{action:async()=>{await this.send()},onInvalid:()=>this.fail(`Enter the code from the terminal.`)}});codeInput=sv(`codeInput`);constructor(){E(()=>{let e=this.client();Z(()=>void e.requestAuthCode().catch(()=>{}))}),td(()=>this.codeInput()?.nativeElement.focus())}async send(){let e=this.model().code.replace(/\s+/g,``);if(!/^\d{6}$/.test(e)){this.fail(`Enter the 6-digit code from the terminal.`);return}this.busy.set(!0),this.notice.set(``);try{await this.client().requestTrustWithCode(e)?this.error.set(``):this.fail(`That code didn't match. Check the terminal and try again.`)}catch{this.fail(`Can't reach the devtools server. Check that the dev server is running.`)}finally{this.busy.set(!1)}}async newCode(){this.busy.set(!0);try{await this.client().requestAuthCode({reissue:!0}),this.error.set(``),this.model.set({code:``}),this.notice.set(`A new code was printed in the terminal.`)}catch{this.notice.set(`Couldn't ask for a new code. Try again.`)}finally{this.busy.set(!1),this.codeInput()?.nativeElement.focus()}}fail(e){this.error.update(t=>t===e?`${e} `:e),this.codeInput()?.nativeElement.focus()}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-auth-code`]],viewQuery:function(e,t){e&1&&Og(t.codeInput,u_e,5),e&2&&kg()},inputs:{client:[1,`client`]},decls:24,vars:10,consts:[[`codeInput`,``],[`aria-labelledby`,`auth-code-title`,1,`pairing`],[`id`,`auth-code-title`],[3,`formRoot`],[`for`,`auth-code-input`],[1,`row`],[`id`,`auth-code-input`,`autocomplete`,`one-time-code`,`inputmode`,`numeric`,`spellcheck`,`false`,3,`formField`],[`type`,`submit`,1,`primary`,3,`disabled`],[`id`,`auth-code-error`,`role`,`alert`,1,`error`],[1,`more`],[`type`,`button`,3,`click`,`disabled`],[`role`,`status`,1,`notice`],[`target`,`_blank`,`rel`,`noopener noreferrer`,3,`href`],[1,`sr-only`]],template:function(e,t){e&1&&(F(0,`section`,1)(1,`h2`,2),K(2,`Enter the one-time code`),I(),F(3,`p`),K(4,` The devtools server asks for a one-time code before it shares data from your app. Find the 6-digit code in the terminal that runs the dev server. `),I(),F(5,`form`,3)(6,`label`,4),K(7,`One-time code`),I(),F(8,`div`,5),L(9,`input`,6,0),Cp(),F(11,`button`,7),K(12),I()()(),F(13,`p`,8),K(14),I(),F(15,`div`,9)(16,`button`,10),H(`click`,function(){return t.newCode()}),K(17,`Print a new code`),I(),F(18,`p`,11),K(19),I()(),F(20,`a`,12),K(21,`About the one-time code`),F(22,`span`,13),K(23,` (opens in a new tab)`),I()()()),e&2&&(D(5),P(`formRoot`,t.codeForm),D(4),P(`formField`,t.codeForm.code),k(`aria-invalid`,t.error()?!0:null)(`aria-describedby`,t.error()?`auth-code-error`:null),Tp(),D(2),P(`disabled`,t.busy()),D(),J(` `,t.busy()?`Checking…`:`Connect`,` `),D(2),q(t.error()),D(2),P(`disabled`,t.busy()),D(3),q(t.notice()),D(),P(`href`,t.docsUrl,bu))},dependencies:[c_e,l_e],styles:[`[_nghost-%COMP%] { + `,e.nodeType===9?e.head?.appendChild(t):e.appendChild(t),t}ngOnDestroy(){this.injectedStyles.get(this.document)?.remove()}static ɵfac=(()=>{let t;return function(n){return(t||=Sl(e))(n||e)}})();static ɵprov=yi({token:e,factory:e.ɵfac})}return e})(),l_e=Symbol(),G9=new Ei(``),u_e=(()=>{class e{field=$.required({alias:`formField`});state=X(()=>this.field()());renderer=x(rp);destroyRef=x(ys);injector=x(_s);element=x(kl).nativeElement;elementIsNativeFormElement=B7(this.element);elementAcceptsTextualValues=Ghe(this.element);_elementAcceptsMinMax;nativeFormElement=this.elementIsNativeFormElement?this.element:void 0;focuser=e=>this.element.focus(e);controlValueAccessors=x(l7,{optional:!0,self:!0});config=x(Uge,{optional:!0});validityMonitor=x(W9);parseErrorsSource=T(void 0);_interopNgControl;get interopNgControl(){return this._interopNgControl??=new Xge(this.state)}parseErrors=X(()=>this.parseErrorsSource()?.().map(e=>({...e,fieldTree:Z(this.state).fieldTree,formField:this}))??[],{equal:b9});errors=X(()=>this.state().errors().filter(e=>!e.formField||e.formField===this),{equal:b9});isFieldBinding=!1;resetter=()=>{};parseErrorsResetCallback;setParseErrors(e){this.parseErrorsSource.set(e)}set onReset(e){this.parseErrorsResetCallback=e}get onReset(){return this.parseErrorsResetCallback}get controlValueAccessor(){return!this.controlValueAccessors||this.controlValueAccessors.length===0?this.interopNgControl?.valueAccessor??void 0:U7(this.interopNgControl,this.controlValueAccessors)??void 0}installClassBindingEffect(){let e=Object.entries(this.config?.classes??{}).map(([e,t])=>[e,X(()=>t(this))]);if(e.length===0)return;let t=R9();mv({write:()=>{for(let[n,r]of e){let e=r();z9(t,n,e)&&(e?this.renderer.addClass(this.element,n):this.renderer.removeClass(this.element,n))}}},{injector:this.injector})}focus(e){this.focuser(e)}reset(){this.resetter(),this.parseErrorsResetCallback?.(this.state().value())}registerAsBinding(e){if(this.isFieldBinding)throw new di(1913,!1);this.isFieldBinding=!0,this.installClassBindingEffect(),e?.focus&&(this.focuser=t=>e.focus(t)),e?.reset&&(this.resetter=()=>e.reset()),E(e=>{let t=this.state();t.nodeState.formFieldBindings.update(e=>[...e,this]),e(()=>{t.nodeState.formFieldBindings.update(e=>e.filter(e=>e!==this))})},{injector:this.injector})}[l_e];ɵngControlCreate(e){if(!e.hasPassThrough){if(this.controlValueAccessor)this.ɵngControlUpdate=r_e(e,this);else if(e.customControl)this.ɵngControlUpdate=t_e(e,this);else if(this.elementIsNativeFormElement)this.ɵngControlUpdate=s_e(e,this,this.parseErrorsSource,this.validityMonitor);else throw new di(1914,!1)}}ɵngControlUpdate;elementAcceptsNativeProperty(e){if(!this.elementIsNativeFormElement)return!1;switch(e){case`min`:case`max`:return this._elementAcceptsMinMax??=Whe(this.element);case`minLength`:case`maxLength`:return this.elementAcceptsTextualValues;case`disabled`:case`required`:case`readonly`:case`name`:return!0;default:return!1}}static ɵfac=function(t){return new(t||e)};static ɵdir=sh({type:e,selectors:[[``,`formField`,``]],inputs:{field:[1,`formField`,`field`]},exportAs:[`formField`],features:[I_([{provide:G9,useExisting:e},{provide:Zhe,useFactory:()=>x(e).interopNgControl},{provide:Yhe,useFactory:()=>x(G9,{self:!0})}]),hh(`formField`)]})}return e})(),d_e=(()=>{class e{fieldTree=$.required({alias:`formRoot`});onSubmit(e){e.preventDefault(),Z(()=>{let e=this.fieldTree();e().structure.fieldManager.submitOptions&&Rge(e)})}static ɵfac=function(t){return new(t||e)};static ɵdir=sh({type:e,selectors:[[`form`,`formRoot`,``]],hostAttrs:[`novalidate`,``],hostBindings:function(e,t){e&1&&H(`submit`,function(e){return t.onSubmit(e)})},inputs:{fieldTree:[1,`formRoot`,`fieldTree`]}})}return e})(),f_e=[`codeInput`],p_e=`https://pangular-inspector.dev/security/#one-time-code`,m_e=class e{client=$.required();docsUrl=p_e;busy=T(!1);error=T(``);notice=T(``);model=T({code:``});codeForm=Lge(this.model,e=>Jge(e.code),{submission:{action:async()=>{await this.send()},onInvalid:()=>this.fail(`Enter the code from the terminal.`)}});codeInput=sv(`codeInput`);constructor(){E(()=>{let e=this.client();Z(()=>void e.requestAuthCode().catch(()=>{}))}),td(()=>this.codeInput()?.nativeElement.focus())}async send(){let e=this.model().code.replace(/\s+/g,``);if(!/^\d{6}$/.test(e)){this.fail(`Enter the 6-digit code from the terminal.`);return}this.busy.set(!0),this.notice.set(``);try{await this.client().requestTrustWithCode(e)?this.error.set(``):this.fail(`That code didn't match. Check the terminal and try again.`)}catch{this.fail(`Can't reach the devtools server. Check that the dev server is running.`)}finally{this.busy.set(!1)}}async newCode(){this.busy.set(!0);try{await this.client().requestAuthCode({reissue:!0}),this.error.set(``),this.model.set({code:``}),this.notice.set(`A new code was printed in the terminal.`)}catch{this.notice.set(`Couldn't ask for a new code. Try again.`)}finally{this.busy.set(!1),this.codeInput()?.nativeElement.focus()}}fail(e){this.error.update(t=>t===e?`${e} `:e),this.codeInput()?.nativeElement.focus()}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-auth-code`]],viewQuery:function(e,t){e&1&&Og(t.codeInput,f_e,5),e&2&&kg()},inputs:{client:[1,`client`]},decls:24,vars:10,consts:[[`codeInput`,``],[`aria-labelledby`,`auth-code-title`,1,`pairing`],[`id`,`auth-code-title`],[3,`formRoot`],[`for`,`auth-code-input`],[1,`row`],[`id`,`auth-code-input`,`autocomplete`,`one-time-code`,`inputmode`,`numeric`,`spellcheck`,`false`,3,`formField`],[`type`,`submit`,1,`primary`,3,`disabled`],[`id`,`auth-code-error`,`role`,`alert`,1,`error`],[1,`more`],[`type`,`button`,3,`click`,`disabled`],[`role`,`status`,1,`notice`],[`target`,`_blank`,`rel`,`noopener noreferrer`,3,`href`],[1,`sr-only`]],template:function(e,t){e&1&&(F(0,`section`,1)(1,`h2`,2),K(2,`Enter the one-time code`),I(),F(3,`p`),K(4,` The devtools server asks for a one-time code before it shares data from your app. Find the 6-digit code in the terminal that runs the dev server. `),I(),F(5,`form`,3)(6,`label`,4),K(7,`One-time code`),I(),F(8,`div`,5),L(9,`input`,6,0),Cp(),F(11,`button`,7),K(12),I()()(),F(13,`p`,8),K(14),I(),F(15,`div`,9)(16,`button`,10),H(`click`,function(){return t.newCode()}),K(17,`Print a new code`),I(),F(18,`p`,11),K(19),I()(),F(20,`a`,12),K(21,`About the one-time code`),F(22,`span`,13),K(23,` (opens in a new tab)`),I()()()),e&2&&(D(5),P(`formRoot`,t.codeForm),D(4),P(`formField`,t.codeForm.code),k(`aria-invalid`,t.error()?!0:null)(`aria-describedby`,t.error()?`auth-code-error`:null),Tp(),D(2),P(`disabled`,t.busy()),D(),J(` `,t.busy()?`Checking…`:`Connect`,` `),D(2),q(t.error()),D(2),P(`disabled`,t.busy()),D(3),q(t.notice()),D(),P(`href`,t.docsUrl,bu))},dependencies:[u_e,d_e],styles:[`[_nghost-%COMP%] { display: block; } @@ -26289,7 +26312,7 @@ a[_ngcontent-%COMP%] { a[_ngcontent-%COMP%]:focus-visible { outline: 2px solid var(--%NS%accent); outline-offset: 2px; -}`]})},p_e={dark:{ngrx:{accent:`#d770e8`,text:`#f0abfc`},analog:{accent:`#ff5470`,text:`#fda4af`},"angular-native":{accent:`#ff4d6d`,text:`#fda4af`},nativescript:{accent:`#8196ff`,text:`#a5b4fc`},capacitor:{accent:`#53b9ff`,text:`#7dd3fc`}},light:{ngrx:{accent:`#a21caf`,text:`#701a75`},analog:{accent:`#be123c`,text:`#881337`},"angular-native":{accent:`#be123c`,text:`#881337`},nativescript:{accent:`#3448c5`,text:`#3730a3`},capacitor:{accent:`#0369a1`,text:`#0c4a6e`}}};function m_e(e,t){let n=p_e[t];return e&&n[e]||null}var h_e=[`toggle`];function g_e(e,t){e&1&&K(0,` Waiting for the devtools server. `)}function __e(e,t){e&1&&K(0,` Loading the current setting. `)}function v_e(e,t){e&1&&K(0,` This is a saved report, so there is no page to change. The switch works with a running dev server. `)}function y_e(e,t){e&1&&(K(0,` This devtools server can't change it from the panel. Set `),R(1,`code`),K(2),z(),K(3,` in the devtools config. `)),e&2&&(D(2),Y(`agent: `,`{`,` browserTools: true `,`}`))}function b_e(e,t){e&1&&A(0,v_e,1,0)(1,y_e,4,2),e&2&&j(+!W().staticReport())}function x_e(e,t){e&1&&K(0,` The devtools server didn't answer. `)}function S_e(e,t){if(e&1&&(K(0,` Applies right away to every page connected to this dev server, with no reload. It lasts until the server restarts, then `),R(1,`code`),K(2,`agent.browserTools`),z(),K(3)),e&2){let e=W();D(3),J(` in the devtools config decides again (`,e.configLabel(),`). `)}}function C_e(e,t){if(e&1){let e=B();R(0,`div`,8)(1,`span`),K(2),z(),R(3,`button`,10),U(`click`,function(){return S(e),C(W().retry())}),K(4,`Retry`),z()()}e&2&&(D(2),q(t))}function K9(e){if(!e||typeof e!=`object`)return null;let{enabled:t,config:n}=e;return typeof t==`boolean`?{enabled:t,config:n===!0}:null}var w_e=class e{rpc=$(null);state=T(null);status=T(`connecting`);saving=T(!1);error=T(``);announcement=T(``);staticReport=X(()=>yT(this.rpc()));enabled=X(()=>this.state()?.enabled??!1);canChange=X(()=>this.status()===`ready`&&!this.staticReport());configLabel=X(()=>this.state()?.config?`on in this project`:`off in this project`);toggle=sv(`toggle`);destroyRef=x(ys);unsubscribe=null;attached=null;pending=null;constructor(){E(()=>{let e=this.rpc();e&&e!==this.attached&&this.load(e)}),this.destroyRef.onDestroy(()=>this.unsubscribe?.())}async set(e){let t=this.rpc();if(!t||!this.canChange()||this.saving()){this.syncBox();return}this.saving.set(!0),this.error.set(``);try{let n=K9(await _T(t,`set-browser-tools`,{enabled:e}));if(!n)throw Error(`no answer`);this.pending=null,this.state.set(n),this.say(n.enabled?`Browser agent tools on. Connected pages register them.`:`Browser agent tools off. Connected pages unregister them.`)}catch{this.pending=e,this.error.set(`Couldn't turn the browser agent tools ${e?`on`:`off`}. Check that the dev server is running.`)}finally{this.saving.set(!1),this.syncBox()}}retry(){let e=this.rpc();if(e){if(this.status()===`ready`&&this.pending!==null){this.set(this.pending);return}this.error.set(``),this.load(e)}}async load(e){this.attached=e,this.pending=null,this.status.set(`loading`),this.error.set(``),this.unsubscribe?.(),this.unsubscribe=null;try{let t=await e.scope(`pangular`).rpc.sharedState(`browser-tools`);if(this.destroyRef.destroyed||this.attached!==e)return;let n=t=>{let n=K9(t);this.state.set(n),this.status.set(n&&!yT(e)?`ready`:`unsupported`)};n(t.value()),this.unsubscribe=t.on(`updated`,n)}catch{if(this.attached!==e)return;this.status.set(`failed`),this.error.set(`Couldn't read the browser agent tools setting.`)}}syncBox(){let e=this.toggle()?.nativeElement;e&&(e.checked=this.enabled())}say(e){this.announcement.update(t=>t===e?`${e} `:e)}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-browser-tools-setting`]],viewQuery:function(e,t){e&1&&Og(t.toggle,h_e,5),e&2&&kg()},inputs:{rpc:[1,`rpc`]},decls:20,vars:7,consts:[[`toggle`,``],[`id`,`settings-browser-agents`],[`id`,`settings-browser-agents-hint`,1,`hint`],[1,`switch-row`],[`type`,`checkbox`,`role`,`switch`,`aria-describedby`,`settings-browser-agents-hint settings-browser-agents-status`,1,`switch`,3,`change`,`checked`,`disabled`],[1,`switch-label`],[`aria-hidden`,`true`,1,`state`],[`id`,`settings-browser-agents-status`,1,`hint`],[`role`,`alert`,1,`error`],[`role`,`status`,1,`sr-only`],[`type`,`button`,1,`action`,3,`click`]],template:function(e,t){if(e&1&&(R(0,`h2`,1),K(1,`Browser agents`),z(),R(2,`p`,2),K(3,` Registers the read-only agent tools on your app's page, so an agent that drives the browser finds them through WebMCP or Chrome DevTools for agents. Any script on the page can call them, so leave this off if the page loads scripts you don't trust. `),z(),R(4,`label`,3)(5,`input`,4,0),U(`change`,function(e){return t.set(e.target.checked)}),z(),R(7,`span`,5),K(8,`Browser agent tools`),z(),R(9,`span`,6),K(10),z()(),R(11,`p`,7),A(12,g_e,1,0)(13,__e,1,0)(14,b_e,2,1)(15,x_e,1,0)(16,S_e,4,1),z(),A(17,C_e,5,1,`div`,8),R(18,`p`,9),K(19),z()),e&2){let e,n;D(5),V(`checked`,t.enabled())(`disabled`,!t.canChange()),k(`aria-busy`,t.saving()?`true`:null),D(5),q(t.enabled()?`On`:`Off`),D(2),j((e=t.status())===`connecting`?12:e===`loading`?13:e===`unsupported`?14:e===`failed`?15:16),D(5),j((n=t.error())?17:-1,n),D(2),q(t.announcement())}},styles:[`[_nghost-%COMP%] { +}`]})},h_e={dark:{ngrx:{accent:`#d770e8`,text:`#f0abfc`},analog:{accent:`#ff5470`,text:`#fda4af`},"angular-native":{accent:`#ff4d6d`,text:`#fda4af`},nativescript:{accent:`#8196ff`,text:`#a5b4fc`},capacitor:{accent:`#53b9ff`,text:`#7dd3fc`}},light:{ngrx:{accent:`#a21caf`,text:`#701a75`},analog:{accent:`#be123c`,text:`#881337`},"angular-native":{accent:`#be123c`,text:`#881337`},nativescript:{accent:`#3448c5`,text:`#3730a3`},capacitor:{accent:`#0369a1`,text:`#0c4a6e`}}};function g_e(e,t){let n=h_e[t];return e&&n[e]||null}var __e=[`toggle`];function v_e(e,t){e&1&&K(0,` Waiting for the devtools server. `)}function y_e(e,t){e&1&&K(0,` Loading the current setting. `)}function b_e(e,t){e&1&&K(0,` This is a saved report, so there is no page to change. The switch works with a running dev server. `)}function x_e(e,t){e&1&&(K(0,` This devtools server can't change it from the panel. Set `),R(1,`code`),K(2),z(),K(3,` in the devtools config. `)),e&2&&(D(2),Y(`agent: `,`{`,` browserTools: true `,`}`))}function S_e(e,t){e&1&&A(0,b_e,1,0)(1,x_e,4,2),e&2&&j(+!W().staticReport())}function C_e(e,t){e&1&&K(0,` The devtools server didn't answer. `)}function w_e(e,t){if(e&1&&(K(0,` Applies right away to every page connected to this dev server, with no reload. It lasts until the server restarts, then `),R(1,`code`),K(2,`agent.browserTools`),z(),K(3)),e&2){let e=W();D(3),J(` in the devtools config decides again (`,e.configLabel(),`). `)}}function T_e(e,t){if(e&1){let e=B();R(0,`div`,8)(1,`span`),K(2),z(),R(3,`button`,10),U(`click`,function(){return S(e),C(W().retry())}),K(4,`Retry`),z()()}e&2&&(D(2),q(t))}function K9(e){if(!e||typeof e!=`object`)return null;let{enabled:t,config:n}=e;return typeof t==`boolean`?{enabled:t,config:n===!0}:null}var E_e=class e{rpc=$(null);state=T(null);status=T(`connecting`);saving=T(!1);error=T(``);announcement=T(``);staticReport=X(()=>yT(this.rpc()));enabled=X(()=>this.state()?.enabled??!1);canChange=X(()=>this.status()===`ready`&&!this.staticReport());configLabel=X(()=>this.state()?.config?`on in this project`:`off in this project`);toggle=sv(`toggle`);destroyRef=x(ys);unsubscribe=null;attached=null;pending=null;constructor(){E(()=>{let e=this.rpc();e&&e!==this.attached&&this.load(e)}),this.destroyRef.onDestroy(()=>this.unsubscribe?.())}async set(e){let t=this.rpc();if(!t||!this.canChange()||this.saving()){this.syncBox();return}this.saving.set(!0),this.error.set(``);try{let n=K9(await _T(t,`set-browser-tools`,{enabled:e}));if(!n)throw Error(`no answer`);this.pending=null,this.state.set(n),this.say(n.enabled?`Browser agent tools on. Connected pages register them.`:`Browser agent tools off. Connected pages unregister them.`)}catch{this.pending=e,this.error.set(`Couldn't turn the browser agent tools ${e?`on`:`off`}. Check that the dev server is running.`)}finally{this.saving.set(!1),this.syncBox()}}retry(){let e=this.rpc();if(e){if(this.status()===`ready`&&this.pending!==null){this.set(this.pending);return}this.error.set(``),this.load(e)}}async load(e){this.attached=e,this.pending=null,this.status.set(`loading`),this.error.set(``),this.unsubscribe?.(),this.unsubscribe=null;try{let t=await e.scope(`pangular`).rpc.sharedState(`browser-tools`);if(this.destroyRef.destroyed||this.attached!==e)return;let n=t=>{let n=K9(t);this.state.set(n),this.status.set(n&&!yT(e)?`ready`:`unsupported`)};n(t.value()),this.unsubscribe=t.on(`updated`,n)}catch{if(this.attached!==e)return;this.status.set(`failed`),this.error.set(`Couldn't read the browser agent tools setting.`)}}syncBox(){let e=this.toggle()?.nativeElement;e&&(e.checked=this.enabled())}say(e){this.announcement.update(t=>t===e?`${e} `:e)}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-browser-tools-setting`]],viewQuery:function(e,t){e&1&&Og(t.toggle,__e,5),e&2&&kg()},inputs:{rpc:[1,`rpc`]},decls:20,vars:7,consts:[[`toggle`,``],[`id`,`settings-browser-agents`],[`id`,`settings-browser-agents-hint`,1,`hint`],[1,`switch-row`],[`type`,`checkbox`,`role`,`switch`,`aria-describedby`,`settings-browser-agents-hint settings-browser-agents-status`,1,`switch`,3,`change`,`checked`,`disabled`],[1,`switch-label`],[`aria-hidden`,`true`,1,`state`],[`id`,`settings-browser-agents-status`,1,`hint`],[`role`,`alert`,1,`error`],[`role`,`status`,1,`sr-only`],[`type`,`button`,1,`action`,3,`click`]],template:function(e,t){if(e&1&&(R(0,`h2`,1),K(1,`Browser agents`),z(),R(2,`p`,2),K(3,` Registers the read-only agent tools on your app's page, so an agent that drives the browser finds them through WebMCP or Chrome DevTools for agents. Any script on the page can call them, so leave this off if the page loads scripts you don't trust. `),z(),R(4,`label`,3)(5,`input`,4,0),U(`change`,function(e){return t.set(e.target.checked)}),z(),R(7,`span`,5),K(8,`Browser agent tools`),z(),R(9,`span`,6),K(10),z()(),R(11,`p`,7),A(12,v_e,1,0)(13,y_e,1,0)(14,S_e,2,1)(15,C_e,1,0)(16,w_e,4,1),z(),A(17,T_e,5,1,`div`,8),R(18,`p`,9),K(19),z()),e&2){let e,n;D(5),V(`checked`,t.enabled())(`disabled`,!t.canChange()),k(`aria-busy`,t.saving()?`true`:null),D(5),q(t.enabled()?`On`:`Off`),D(2),j((e=t.status())===`connecting`?12:e===`loading`?13:e===`unsupported`?14:e===`failed`?15:16),D(5),j((n=t.error())?17:-1,n),D(2),q(t.announcement())}},styles:[`[_nghost-%COMP%] { display: block; } @@ -26413,7 +26436,7 @@ code[_ngcontent-%COMP%] { .action[_ngcontent-%COMP%]:focus-visible { outline: 2px solid var(--%NS%accent); outline-offset: 2px; -}`]})},T_e=(e,t)=>t.value,E_e=(e,t)=>t.id;function D_e(e,t){if(e&1){let e=B();F(0,`label`,27)(1,`input`,28),H(`change`,function(){let t=S(e).$implicit;return C(W().theme.set(t.value))}),I(),F(2,`span`,29),K(3),I(),F(4,`span`,30),K(5),I()()}if(e&2){let e=t.$implicit,n=W();G(`checked`,n.theme()===e.value),D(),P(`value`,e.value)(`checked`,n.theme()===e.value),D(2),q(e.label),D(2),q(e.hint)}}function O_e(e,t){e&1&&(F(0,`span`,34),K(1,`Pinned`),I())}function k_e(e,t){if(e&1){let e=B();F(0,`li`,31),H(`keydown`,function(t){let n=S(e).$implicit;return C(W().onRowKey(t,n.id))}),L(1,`app-tab-icon`,32),F(2,`span`,33),K(3),A(4,O_e,2,0,`span`,34),I(),F(5,`button`,35),H(`click`,function(){let t=S(e).$implicit;return C(W().togglePinned(t.id))}),K(6,` Pin `),I(),F(7,`label`,36)(8,`input`,37),H(`change`,function(t){let n=S(e).$implicit;return C(W().setShown(n.id,t.target.checked))}),I(),F(9,`span`),K(10,`Shown`),I()(),F(11,`span`,38)(12,`button`,39),H(`click`,function(){let t=S(e).$implicit;return C(W().move(t.id,-1))}),w(),F(13,`svg`,40),L(14,`path`,41),I()(),ls(),F(15,`button`,42),H(`click`,function(){let t=S(e).$implicit;return C(W().move(t.id,1))}),w(),F(16,`svg`,40),L(17,`path`,43),I()()()()}if(e&2){let e=t.$implicit,n=W();G(`hidden-tab`,n.isHidden(e.id)),k(`data-tab`,e.id),D(),P(`name`,e.id),D(2),J(` `,e.label,` `),D(),j(n.isPinned(e.id)?4:-1),D(),k(`aria-pressed`,n.isPinned(e.id))(`aria-label`,`Pin `+e.label),D(3),P(`checked`,!n.isHidden(e.id)),k(`aria-label`,e.label+` shown in the tab bar`),D(4),P(`disabled`,!n.canMove(e.id,-1)),k(`aria-label`,`Move `+e.label+` up`),D(3),P(`disabled`,!n.canMove(e.id,1)),k(`aria-label`,`Move `+e.label+` down`)}}function A_e(e,t){e&1&&(K(0,` Press `),F(1,`kbd`),K(2),I(),K(3,` on your app's page to open or close the panel. The button shows while the panel is open. The popup on the page saves this setting. `)),e&2&&(D(2),q(t))}function j_e(e,t){e&1&&(K(0,` The popup shortcut is turned off in the devtools config (`),F(1,`code`),K(2,`popup.hotkey`),I(),K(3,`), so the button always shows. `))}function M_e(e,t){e&1&&(F(0,`kbd`),K(1),I()),e&2&&(D(),q(t))}function N_e(e,t){e&1&&K(0,` Off `)}var P_e=[{value:`system`,label:`System`,hint:`Follows the hub, or your system without it`},{value:`light`,label:`Light`,hint:`Always light`},{value:`dark`,label:`Dark`,hint:`Always dark`}],F_e=class e{tabs=$([]);layout=av(U5);theme=av(`system`);passive=av(!1);pill=av(!1);hotkey=$(!1);paletteShortcut=$(`Ctrl+K`);rpc=$(null);themes=P_e;announcement=T(``);host=x(kl);injector=x(_s);ids=X(()=>this.tabs().map(e=>e.id));orderedTabs=X(()=>{let e=new Map(this.tabs().map(e=>[e.id,e]));return q5(this.ids(),this.layout()).map(t=>e.get(t))});isDefaultLayout=X(()=>{let{order:e,hidden:t,pinned:n}=this.layout(),r=q5(this.ids(),this.layout());return!t.length&&!n.length&&(!e.length||r.every((e,t)=>e===this.ids()[t]))});isPinned(e){return this.layout().pinned.includes(e)}isHidden(e){return this.layout().hidden.includes(e)&&!this.isPinned(e)}canMove(e,t){return J5(this.ids(),this.layout(),e,t)!==this.layout()}move(e,t){let n=J5(this.ids(),this.layout(),e,t);if(n===this.layout())return;this.layout.set(n);let r=q5(this.ids(),n),i=this.label(e);this.say(`${i} moved to position ${r.indexOf(e)+1} of ${r.length}.`),td(()=>{let n=[...this.host.nativeElement.querySelectorAll(`.tab-row`)].find(t=>t.dataset.tab===e),r=n?.querySelector(`[data-move="${t<0?`up`:`down`}"]`),i=n?.querySelector(`[data-move="${t<0?`down`:`up`}"]`);(r&&!r.disabled?r:i)?.focus()},{injector:this.injector})}onRowKey(e,t){!e.altKey||e.key!==`ArrowUp`&&e.key!==`ArrowDown`||(e.preventDefault(),this.move(t,e.key===`ArrowUp`?-1:1))}togglePinned(e){let t=!this.isPinned(e);this.layout.set(the(this.ids(),this.layout(),e,t)),this.say(t?`${this.label(e)} pinned.`:`${this.label(e)} unpinned.`)}setShown(e,t){this.layout.set(ehe(this.layout(),e,!t)),this.say(t?`${this.label(e)} shown.`:`${this.label(e)} hidden.`)}resetTabs(){this.layout.set(U5),this.say(`Tabs reset to the default order.`)}label(e){return this.tabs().find(t=>t.id===e)?.label??e}say(e){this.announcement.update(t=>t===e?`${e} `:e)}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-settings`]],inputs:{tabs:[1,`tabs`],layout:[1,`layout`],theme:[1,`theme`],passive:[1,`passive`],pill:[1,`pill`],hotkey:[1,`hotkey`],paletteShortcut:[1,`paletteShortcut`],rpc:[1,`rpc`]},outputs:{layout:`layoutChange`,theme:`themeChange`,passive:`passiveChange`,pill:`pillChange`},decls:73,vars:9,consts:[[1,`intro`],[`aria-labelledby`,`settings-theme`,1,`card`],[`id`,`settings-theme`],[`role`,`radiogroup`,`aria-labelledby`,`settings-theme`,1,`themes`],[1,`theme`,3,`checked`],[`aria-labelledby`,`settings-tabs`,1,`card`],[1,`card-head`],[`id`,`settings-tabs`],[`type`,`button`,1,`action`,3,`click`,`disabled`],[`id`,`settings-tabs-hint`,1,`hint`],[`aria-labelledby`,`settings-tabs`,`aria-describedby`,`settings-tabs-hint`,1,`tab-list`],[1,`tab-row`,3,`hidden-tab`],[`aria-labelledby`,`settings-popup`,1,`card`],[`id`,`settings-popup`],[1,`check`,`wide`],[`type`,`checkbox`,`aria-describedby`,`settings-passive-hint`,3,`change`,`checked`,`disabled`],[`id`,`settings-passive-hint`,1,`hint`],[`type`,`checkbox`,`aria-describedby`,`settings-pill-hint`,3,`change`,`checked`],[`id`,`settings-pill-hint`,1,`hint`],[`aria-labelledby`,`settings-browser-agents`,1,`card`],[3,`rpc`],[`aria-labelledby`,`settings-keys`,1,`card`],[`id`,`settings-keys`],[1,`keys`],[1,`sr-only`],[`scope`,`col`],[`role`,`status`,1,`sr-only`],[1,`theme`],[`type`,`radio`,`name`,`settings-theme`,3,`change`,`value`,`checked`],[1,`theme-label`],[1,`hint`],[1,`tab-row`,3,`keydown`],[3,`name`],[1,`tab-label`],[1,`tag`],[`type`,`button`,1,`action`,`small`,3,`click`],[1,`check`],[`type`,`checkbox`,3,`change`,`checked`],[1,`moves`],[`type`,`button`,`data-move`,`up`,1,`icon`,3,`click`,`disabled`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`],[`d`,`m6 15 6-6 6 6`],[`type`,`button`,`data-move`,`down`,1,`icon`,3,`click`,`disabled`],[`d`,`m6 9 6 6 6-6`]],template:function(e,t){if(e&1&&(F(0,`p`,0),K(1,` Settings for this panel in this browser. They are saved in the browser's local storage, so every panel on this address uses them. Browser agents is the exception: the dev server keeps it for every page and panel. `),I(),F(2,`section`,1)(3,`h2`,2),K(4,`Theme`),I(),F(5,`div`,3),M(6,D_e,6,6,`label`,4,T_e),I()(),F(8,`section`,5)(9,`div`,6)(10,`h2`,7),K(11,`Tabs`),I(),F(12,`button`,8),H(`click`,function(){return t.resetTabs()}),K(13,` Reset tabs `),I()(),F(14,`p`,9),K(15,` Pinned tabs come first in the tab bar. Hidden tabs stay reachable from the command palette and from links. Use the arrow buttons, or `),F(16,`kbd`),K(17,`Alt`),I(),K(18,` with `),F(19,`kbd`),K(20,`↑`),I(),K(21,` and `),F(22,`kbd`),K(23,`↓`),I(),K(24,` on a row, to change the order. `),I(),F(25,`ol`,10),M(26,k_e,18,14,`li`,11,E_e),I()(),F(28,`section`,12)(29,`h2`,13),K(30,`Popup on the page`),I(),F(31,`label`,14)(32,`input`,15),H(`change`,function(e){return t.passive.set(e.target.checked)}),I(),F(33,`span`),K(34,`Passive mode: hide the floating button until the shortcut is pressed`),I()(),F(35,`p`,16),A(36,A_e,4,1)(37,j_e,4,0),I(),F(38,`label`,14)(39,`input`,17),H(`change`,function(e){return t.pill.set(e.target.checked)}),I(),F(40,`span`),K(41,`Counts launcher: show render and error counts on the floating button`),I()(),F(42,`p`,18),K(43,` While the panel is closed, the button becomes a pill with the number of component renders and errors on the page since it loaded. Off by default. The popup on the page saves this setting. `),I()(),F(44,`section`,19),L(45,`app-browser-tools-setting`,20),I(),F(46,`section`,21)(47,`h2`,22),K(48,`Keyboard shortcuts`),I(),F(49,`table`,23)(50,`caption`,24),K(51,` Keyboard shortcuts `),I(),F(52,`thead`)(53,`tr`)(54,`th`,25),K(55,`Shortcut`),I(),F(56,`th`,25),K(57,`Action`),I()()(),F(58,`tbody`)(59,`tr`)(60,`td`)(61,`kbd`),K(62),I()(),F(63,`td`),K(64,`Open the command palette in the panel`),I()(),F(65,`tr`)(66,`td`),A(67,M_e,2,1,`kbd`)(68,N_e,1,0),I(),F(69,`td`),K(70,`Open or close the popup on your app's page`),I()()()()(),F(71,`p`,26),K(72),I()),e&2){let e,n;D(6),N(t.themes),D(6),P(`disabled`,t.isDefaultLayout()),D(14),N(t.orderedTabs()),D(6),P(`checked`,t.passive())(`disabled`,t.hotkey()===!1),D(4),j((e=t.hotkey())?36:37,e),D(3),P(`checked`,t.pill()),D(6),P(`rpc`,t.rpc()),D(17),q(t.paletteShortcut()),D(5),j((n=t.hotkey())?67:68,n),D(5),q(t.announcement())}},dependencies:[w_e,sE],styles:[`[_nghost-%COMP%] { +}`]})},D_e=(e,t)=>t.value,O_e=(e,t)=>t.id;function k_e(e,t){if(e&1){let e=B();F(0,`label`,27)(1,`input`,28),H(`change`,function(){let t=S(e).$implicit;return C(W().theme.set(t.value))}),I(),F(2,`span`,29),K(3),I(),F(4,`span`,30),K(5),I()()}if(e&2){let e=t.$implicit,n=W();G(`checked`,n.theme()===e.value),D(),P(`value`,e.value)(`checked`,n.theme()===e.value),D(2),q(e.label),D(2),q(e.hint)}}function A_e(e,t){e&1&&(F(0,`span`,34),K(1,`Pinned`),I())}function j_e(e,t){if(e&1){let e=B();F(0,`li`,31),H(`keydown`,function(t){let n=S(e).$implicit;return C(W().onRowKey(t,n.id))}),L(1,`app-tab-icon`,32),F(2,`span`,33),K(3),A(4,A_e,2,0,`span`,34),I(),F(5,`button`,35),H(`click`,function(){let t=S(e).$implicit;return C(W().togglePinned(t.id))}),K(6,` Pin `),I(),F(7,`label`,36)(8,`input`,37),H(`change`,function(t){let n=S(e).$implicit;return C(W().setShown(n.id,t.target.checked))}),I(),F(9,`span`),K(10,`Shown`),I()(),F(11,`span`,38)(12,`button`,39),H(`click`,function(){let t=S(e).$implicit;return C(W().move(t.id,-1))}),w(),F(13,`svg`,40),L(14,`path`,41),I()(),ls(),F(15,`button`,42),H(`click`,function(){let t=S(e).$implicit;return C(W().move(t.id,1))}),w(),F(16,`svg`,40),L(17,`path`,43),I()()()()}if(e&2){let e=t.$implicit,n=W();G(`hidden-tab`,n.isHidden(e.id)),k(`data-tab`,e.id),D(),P(`name`,e.id),D(2),J(` `,e.label,` `),D(),j(n.isPinned(e.id)?4:-1),D(),k(`aria-pressed`,n.isPinned(e.id))(`aria-label`,`Pin `+e.label),D(3),P(`checked`,!n.isHidden(e.id)),k(`aria-label`,e.label+` shown in the tab bar`),D(4),P(`disabled`,!n.canMove(e.id,-1)),k(`aria-label`,`Move `+e.label+` up`),D(3),P(`disabled`,!n.canMove(e.id,1)),k(`aria-label`,`Move `+e.label+` down`)}}function M_e(e,t){e&1&&(K(0,` Press `),F(1,`kbd`),K(2),I(),K(3,` on your app's page to open or close the panel. The button shows while the panel is open. The popup on the page saves this setting. `)),e&2&&(D(2),q(t))}function N_e(e,t){e&1&&(K(0,` The popup shortcut is turned off in the devtools config (`),F(1,`code`),K(2,`popup.hotkey`),I(),K(3,`), so the button always shows. `))}function P_e(e,t){e&1&&(F(0,`kbd`),K(1),I()),e&2&&(D(),q(t))}function F_e(e,t){e&1&&K(0,` Off `)}var I_e=[{value:`system`,label:`System`,hint:`Follows the hub, or your system without it`},{value:`light`,label:`Light`,hint:`Always light`},{value:`dark`,label:`Dark`,hint:`Always dark`}],L_e=class e{tabs=$([]);layout=av(U5);theme=av(`system`);passive=av(!1);pill=av(!1);hotkey=$(!1);paletteShortcut=$(`Ctrl+K`);rpc=$(null);themes=I_e;announcement=T(``);host=x(kl);injector=x(_s);ids=X(()=>this.tabs().map(e=>e.id));orderedTabs=X(()=>{let e=new Map(this.tabs().map(e=>[e.id,e]));return q5(this.ids(),this.layout()).map(t=>e.get(t))});isDefaultLayout=X(()=>{let{order:e,hidden:t,pinned:n}=this.layout(),r=q5(this.ids(),this.layout());return!t.length&&!n.length&&(!e.length||r.every((e,t)=>e===this.ids()[t]))});isPinned(e){return this.layout().pinned.includes(e)}isHidden(e){return this.layout().hidden.includes(e)&&!this.isPinned(e)}canMove(e,t){return J5(this.ids(),this.layout(),e,t)!==this.layout()}move(e,t){let n=J5(this.ids(),this.layout(),e,t);if(n===this.layout())return;this.layout.set(n);let r=q5(this.ids(),n),i=this.label(e);this.say(`${i} moved to position ${r.indexOf(e)+1} of ${r.length}.`),td(()=>{let n=[...this.host.nativeElement.querySelectorAll(`.tab-row`)].find(t=>t.dataset.tab===e),r=n?.querySelector(`[data-move="${t<0?`up`:`down`}"]`),i=n?.querySelector(`[data-move="${t<0?`down`:`up`}"]`);(r&&!r.disabled?r:i)?.focus()},{injector:this.injector})}onRowKey(e,t){!e.altKey||e.key!==`ArrowUp`&&e.key!==`ArrowDown`||(e.preventDefault(),this.move(t,e.key===`ArrowUp`?-1:1))}togglePinned(e){let t=!this.isPinned(e);this.layout.set(rhe(this.ids(),this.layout(),e,t)),this.say(t?`${this.label(e)} pinned.`:`${this.label(e)} unpinned.`)}setShown(e,t){this.layout.set(nhe(this.layout(),e,!t)),this.say(t?`${this.label(e)} shown.`:`${this.label(e)} hidden.`)}resetTabs(){this.layout.set(U5),this.say(`Tabs reset to the default order.`)}label(e){return this.tabs().find(t=>t.id===e)?.label??e}say(e){this.announcement.update(t=>t===e?`${e} `:e)}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-settings`]],inputs:{tabs:[1,`tabs`],layout:[1,`layout`],theme:[1,`theme`],passive:[1,`passive`],pill:[1,`pill`],hotkey:[1,`hotkey`],paletteShortcut:[1,`paletteShortcut`],rpc:[1,`rpc`]},outputs:{layout:`layoutChange`,theme:`themeChange`,passive:`passiveChange`,pill:`pillChange`},decls:73,vars:9,consts:[[1,`intro`],[`aria-labelledby`,`settings-theme`,1,`card`],[`id`,`settings-theme`],[`role`,`radiogroup`,`aria-labelledby`,`settings-theme`,1,`themes`],[1,`theme`,3,`checked`],[`aria-labelledby`,`settings-tabs`,1,`card`],[1,`card-head`],[`id`,`settings-tabs`],[`type`,`button`,1,`action`,3,`click`,`disabled`],[`id`,`settings-tabs-hint`,1,`hint`],[`aria-labelledby`,`settings-tabs`,`aria-describedby`,`settings-tabs-hint`,1,`tab-list`],[1,`tab-row`,3,`hidden-tab`],[`aria-labelledby`,`settings-popup`,1,`card`],[`id`,`settings-popup`],[1,`check`,`wide`],[`type`,`checkbox`,`aria-describedby`,`settings-passive-hint`,3,`change`,`checked`,`disabled`],[`id`,`settings-passive-hint`,1,`hint`],[`type`,`checkbox`,`aria-describedby`,`settings-pill-hint`,3,`change`,`checked`],[`id`,`settings-pill-hint`,1,`hint`],[`aria-labelledby`,`settings-browser-agents`,1,`card`],[3,`rpc`],[`aria-labelledby`,`settings-keys`,1,`card`],[`id`,`settings-keys`],[1,`keys`],[1,`sr-only`],[`scope`,`col`],[`role`,`status`,1,`sr-only`],[1,`theme`],[`type`,`radio`,`name`,`settings-theme`,3,`change`,`value`,`checked`],[1,`theme-label`],[1,`hint`],[1,`tab-row`,3,`keydown`],[3,`name`],[1,`tab-label`],[1,`tag`],[`type`,`button`,1,`action`,`small`,3,`click`],[1,`check`],[`type`,`checkbox`,3,`change`,`checked`],[1,`moves`],[`type`,`button`,`data-move`,`up`,1,`icon`,3,`click`,`disabled`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`],[`d`,`m6 15 6-6 6 6`],[`type`,`button`,`data-move`,`down`,1,`icon`,3,`click`,`disabled`],[`d`,`m6 9 6 6 6-6`]],template:function(e,t){if(e&1&&(F(0,`p`,0),K(1,` Settings for this panel in this browser. They are saved in the browser's local storage, so every panel on this address uses them. Browser agents is the exception: the dev server keeps it for every page and panel. `),I(),F(2,`section`,1)(3,`h2`,2),K(4,`Theme`),I(),F(5,`div`,3),M(6,k_e,6,6,`label`,4,D_e),I()(),F(8,`section`,5)(9,`div`,6)(10,`h2`,7),K(11,`Tabs`),I(),F(12,`button`,8),H(`click`,function(){return t.resetTabs()}),K(13,` Reset tabs `),I()(),F(14,`p`,9),K(15,` Pinned tabs come first in the tab bar. Hidden tabs stay reachable from the command palette and from links. Use the arrow buttons, or `),F(16,`kbd`),K(17,`Alt`),I(),K(18,` with `),F(19,`kbd`),K(20,`↑`),I(),K(21,` and `),F(22,`kbd`),K(23,`↓`),I(),K(24,` on a row, to change the order. `),I(),F(25,`ol`,10),M(26,j_e,18,14,`li`,11,O_e),I()(),F(28,`section`,12)(29,`h2`,13),K(30,`Popup on the page`),I(),F(31,`label`,14)(32,`input`,15),H(`change`,function(e){return t.passive.set(e.target.checked)}),I(),F(33,`span`),K(34,`Passive mode: hide the floating button until the shortcut is pressed`),I()(),F(35,`p`,16),A(36,M_e,4,1)(37,N_e,4,0),I(),F(38,`label`,14)(39,`input`,17),H(`change`,function(e){return t.pill.set(e.target.checked)}),I(),F(40,`span`),K(41,`Counts launcher: show render and error counts on the floating button`),I()(),F(42,`p`,18),K(43,` While the panel is closed, the button becomes a pill with the number of component renders and errors on the page since it loaded. Off by default. The popup on the page saves this setting. `),I()(),F(44,`section`,19),L(45,`app-browser-tools-setting`,20),I(),F(46,`section`,21)(47,`h2`,22),K(48,`Keyboard shortcuts`),I(),F(49,`table`,23)(50,`caption`,24),K(51,` Keyboard shortcuts `),I(),F(52,`thead`)(53,`tr`)(54,`th`,25),K(55,`Shortcut`),I(),F(56,`th`,25),K(57,`Action`),I()()(),F(58,`tbody`)(59,`tr`)(60,`td`)(61,`kbd`),K(62),I()(),F(63,`td`),K(64,`Open the command palette in the panel`),I()(),F(65,`tr`)(66,`td`),A(67,P_e,2,1,`kbd`)(68,F_e,1,0),I(),F(69,`td`),K(70,`Open or close the popup on your app's page`),I()()()()(),F(71,`p`,26),K(72),I()),e&2){let e,n;D(6),N(t.themes),D(6),P(`disabled`,t.isDefaultLayout()),D(14),N(t.orderedTabs()),D(6),P(`checked`,t.passive())(`disabled`,t.hotkey()===!1),D(4),j((e=t.hotkey())?36:37,e),D(3),P(`checked`,t.pill()),D(6),P(`rpc`,t.rpc()),D(17),q(t.paletteShortcut()),D(5),j((n=t.hotkey())?67:68,n),D(5),q(t.announcement())}},dependencies:[E_e,sE],styles:[`[_nghost-%COMP%] { display: block; max-width: 760px; } @@ -26673,7 +26696,7 @@ code[_ngcontent-%COMP%] { padding: 8px; border-top: 1px solid var(--%NS%border); color: var(--%NS%text); -}`]})};function q9(e,t){let n=e.toLowerCase(),r=t.toLowerCase().replace(/\s+/g,``);if(!r)return 0;let i=0,a=0,o=-2;for(let e of r){let t=n.indexOf(e,a);if(t<0)return-1;let r=t===0||/[\s:&/-]/.test(n[t-1]);i+=1,t===o+1&&(i+=3),r&&(i+=4),o=t,a=t+1}return i-n.length/100}function I_e(e,t){let n=t.trim();return n?e.map((e,t)=>{let r=q9(e.title,n),i=q9(`${e.group} ${e.keywords??``}`,n);return{command:e,index:t,score:Math.max(r>=0?r+10:-1,i)}}).filter(e=>e.score>=0).sort((e,t)=>t.score-e.score||e.index-t.index).map(e=>e.command):[...e]}var L_e=[`input`],R_e=(e,t)=>t.id;function z_e(e,t){if(e&1&&(R(0,`kbd`),K(1),z()),e&2){let e=W().$implicit;D(),q(e.shortcut)}}function B_e(e,t){if(e&1){let e=B();R(0,`li`,14),U(`pointermove`,function(){let t=S(e).$index;return C(W(2).active.set(t))})(`click`,function(){let t=S(e).$implicit;return C(W(2).run(t))}),R(1,`span`,15),K(2),z(),A(3,z_e,2,1,`kbd`),R(4,`span`,16),K(5),z()()}if(e&2){let e=t.$implicit,n=t.$index,r=W(2);G(`active`,n===r.active()),k(`id`,r.uid+`-opt-`+n)(`aria-selected`,n===r.active()),D(2),q(e.title),D(),j(e.shortcut?3:-1),D(2),q(e.group)}}function V_e(e,t){if(e&1&&(R(0,`p`,11),K(1),z()),e&2){let e=W(2);D(),J(`No commands match “`,e.query().trim(),`”.`)}}function H_e(e,t){if(e&1){let e=B();R(0,`div`,1),U(`pointerdown`,function(){return S(e),C(W().close())}),z(),R(1,`div`,2),U(`keydown`,function(t){return S(e),C(W().onKey(t))}),R(2,`h2`,3),K(3,`Command palette`),z(),R(4,`div`,4),w(),R(5,`svg`,5),sg(6,`circle`,6)(7,`path`,7),z(),ls(),R(8,`input`,8,0),U(`input`,function(t){return S(e),C(W().query.set(t.target.value))}),z()(),R(10,`ul`,9),U(`pointerdown`,function(e){return e.preventDefault()}),M(11,B_e,6,7,`li`,10,R_e),z(),A(13,V_e,2,1,`p`,11),R(14,`p`,12)(15,`kbd`),K(16,`↑`),z(),R(17,`kbd`),K(18,`↓`),z(),K(19,` to move, `),R(20,`kbd`),K(21,`Enter`),z(),K(22,` to run, `),R(23,`kbd`),K(24,`Esc`),z(),K(25,` to close `),z(),R(26,`p`,13),K(27),z()()}if(e&2){let e=W();D(),k(`aria-labelledby`,e.uid+`-title`),D(),k(`id`,e.uid+`-title`),D(6),V(`value`,e.query()),k(`aria-controls`,e.uid+`-list`)(`aria-activedescendant`,e.activeId())(`aria-describedby`,e.uid+`-help`),D(2),V(`hidden`,!e.results().length),k(`id`,e.uid+`-list`),D(),N(e.results()),D(2),j(e.results().length?-1:13),D(),k(`id`,e.uid+`-help`),D(13),q(e.status())}}var U_e=0,W_e=class e{commands=$([]);open=av(!1);picked=ev();uid=`cp${U_e++}`;query=T(``);results=X(()=>I_e(this.commands(),this.query()));active=Q(()=>this.results().length?0:-1);activeId=X(()=>this.active()>=0?`${this.uid}-opt-${this.active()}`:null);status=X(()=>{let e=this.results().length;return e?`${e} ${e===1?`command`:`commands`}.`:`No commands match.`});input=sv(`input`);injector=x(_s);returnFocus=null;constructor(){E(()=>{this.open()&&Z(()=>{let e=document.activeElement;this.returnFocus=e instanceof HTMLElement&&e!==document.body?e:null,this.query.set(``),td(()=>this.input()?.nativeElement.focus(),{injector:this.injector})})})}close(e){if(!this.open())return;this.open.set(!1);let t=this.returnFocus;this.returnFocus=null,td(()=>{t?.isConnected&&t.focus(),e?.()},{injector:this.injector})}run(e){this.close(()=>this.picked.emit(e.id))}onKey(e){let t=this.results().length;switch(e.key){case`ArrowDown`:case`ArrowUp`:{if(e.preventDefault(),!t)return;let n=e.key===`ArrowDown`?1:-1;this.active.set((this.active()+n+t)%t),this.reveal();return}case`PageDown`:case`PageUp`:if(e.preventDefault(),!t)return;this.active.set(e.key===`PageDown`?t-1:0),this.reveal();return;case`Enter`:{e.preventDefault();let t=this.results()[this.active()];t&&this.run(t);return}case`Escape`:e.preventDefault(),e.stopPropagation(),this.close();return;case`Tab`:e.preventDefault();return}}reveal(){td(()=>{let e=this.activeId();e&&document.getElementById(e)?.scrollIntoView?.({block:`nearest`})},{injector:this.injector})}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-command-palette`]],viewQuery:function(e,t){e&1&&Og(t.input,L_e,5),e&2&&kg()},inputs:{commands:[1,`commands`],open:[1,`open`]},outputs:{open:`openChange`,picked:`picked`},decls:1,vars:1,consts:[[`input`,``],[`aria-hidden`,`true`,1,`backdrop`,3,`pointerdown`],[`role`,`dialog`,`aria-modal`,`true`,1,`palette`,3,`keydown`],[1,`sr-only`],[1,`field`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`,1,`search-icon`],[`cx`,`11`,`cy`,`11`,`r`,`7`],[`d`,`m20 20-3.5-3.5`],[`type`,`text`,`role`,`combobox`,`aria-autocomplete`,`list`,`aria-expanded`,`true`,`autocomplete`,`off`,`spellcheck`,`false`,`placeholder`,`Type a command or a tab…`,`aria-label`,`Command`,3,`input`,`value`],[`role`,`listbox`,`aria-label`,`Commands`,1,`list`,3,`pointerdown`,`hidden`],[`role`,`option`,3,`active`],[1,`empty`],[1,`help`],[`role`,`status`,1,`sr-only`],[`role`,`option`,3,`pointermove`,`click`],[1,`title`],[1,`group`]],template:function(e,t){e&1&&A(0,H_e,28,11),e&2&&j(t.open()?0:-1)},styles:[`.backdrop[_ngcontent-%COMP%] { +}`]})};function q9(e,t){let n=e.toLowerCase(),r=t.toLowerCase().replace(/\s+/g,``);if(!r)return 0;let i=0,a=0,o=-2;for(let e of r){let t=n.indexOf(e,a);if(t<0)return-1;let r=t===0||/[\s:&/-]/.test(n[t-1]);i+=1,t===o+1&&(i+=3),r&&(i+=4),o=t,a=t+1}return i-n.length/100}function R_e(e,t){let n=t.trim();return n?e.map((e,t)=>{let r=q9(e.title,n),i=q9(`${e.group} ${e.keywords??``}`,n);return{command:e,index:t,score:Math.max(r>=0?r+10:-1,i)}}).filter(e=>e.score>=0).sort((e,t)=>t.score-e.score||e.index-t.index).map(e=>e.command):[...e]}var z_e=[`input`],B_e=(e,t)=>t.id;function V_e(e,t){if(e&1&&(R(0,`kbd`),K(1),z()),e&2){let e=W().$implicit;D(),q(e.shortcut)}}function H_e(e,t){if(e&1){let e=B();R(0,`li`,14),U(`pointermove`,function(){let t=S(e).$index;return C(W(2).active.set(t))})(`click`,function(){let t=S(e).$implicit;return C(W(2).run(t))}),R(1,`span`,15),K(2),z(),A(3,V_e,2,1,`kbd`),R(4,`span`,16),K(5),z()()}if(e&2){let e=t.$implicit,n=t.$index,r=W(2);G(`active`,n===r.active()),k(`id`,r.uid+`-opt-`+n)(`aria-selected`,n===r.active()),D(2),q(e.title),D(),j(e.shortcut?3:-1),D(2),q(e.group)}}function U_e(e,t){if(e&1&&(R(0,`p`,11),K(1),z()),e&2){let e=W(2);D(),J(`No commands match “`,e.query().trim(),`”.`)}}function W_e(e,t){if(e&1){let e=B();R(0,`div`,1),U(`pointerdown`,function(){return S(e),C(W().close())}),z(),R(1,`div`,2),U(`keydown`,function(t){return S(e),C(W().onKey(t))}),R(2,`h2`,3),K(3,`Command palette`),z(),R(4,`div`,4),w(),R(5,`svg`,5),sg(6,`circle`,6)(7,`path`,7),z(),ls(),R(8,`input`,8,0),U(`input`,function(t){return S(e),C(W().query.set(t.target.value))}),z()(),R(10,`ul`,9),U(`pointerdown`,function(e){return e.preventDefault()}),M(11,H_e,6,7,`li`,10,B_e),z(),A(13,U_e,2,1,`p`,11),R(14,`p`,12)(15,`kbd`),K(16,`↑`),z(),R(17,`kbd`),K(18,`↓`),z(),K(19,` to move, `),R(20,`kbd`),K(21,`Enter`),z(),K(22,` to run, `),R(23,`kbd`),K(24,`Esc`),z(),K(25,` to close `),z(),R(26,`p`,13),K(27),z()()}if(e&2){let e=W();D(),k(`aria-labelledby`,e.uid+`-title`),D(),k(`id`,e.uid+`-title`),D(6),V(`value`,e.query()),k(`aria-controls`,e.uid+`-list`)(`aria-activedescendant`,e.activeId())(`aria-describedby`,e.uid+`-help`),D(2),V(`hidden`,!e.results().length),k(`id`,e.uid+`-list`),D(),N(e.results()),D(2),j(e.results().length?-1:13),D(),k(`id`,e.uid+`-help`),D(13),q(e.status())}}var G_e=0,K_e=class e{commands=$([]);open=av(!1);picked=ev();uid=`cp${G_e++}`;query=T(``);results=X(()=>R_e(this.commands(),this.query()));active=Q(()=>this.results().length?0:-1);activeId=X(()=>this.active()>=0?`${this.uid}-opt-${this.active()}`:null);status=X(()=>{let e=this.results().length;return e?`${e} ${e===1?`command`:`commands`}.`:`No commands match.`});input=sv(`input`);injector=x(_s);returnFocus=null;constructor(){E(()=>{this.open()&&Z(()=>{let e=document.activeElement;this.returnFocus=e instanceof HTMLElement&&e!==document.body?e:null,this.query.set(``),td(()=>this.input()?.nativeElement.focus(),{injector:this.injector})})})}close(e){if(!this.open())return;this.open.set(!1);let t=this.returnFocus;this.returnFocus=null,td(()=>{t?.isConnected&&t.focus(),e?.()},{injector:this.injector})}run(e){this.close(()=>this.picked.emit(e.id))}onKey(e){let t=this.results().length;switch(e.key){case`ArrowDown`:case`ArrowUp`:{if(e.preventDefault(),!t)return;let n=e.key===`ArrowDown`?1:-1;this.active.set((this.active()+n+t)%t),this.reveal();return}case`PageDown`:case`PageUp`:if(e.preventDefault(),!t)return;this.active.set(e.key===`PageDown`?t-1:0),this.reveal();return;case`Enter`:{e.preventDefault();let t=this.results()[this.active()];t&&this.run(t);return}case`Escape`:e.preventDefault(),e.stopPropagation(),this.close();return;case`Tab`:e.preventDefault();return}}reveal(){td(()=>{let e=this.activeId();e&&document.getElementById(e)?.scrollIntoView?.({block:`nearest`})},{injector:this.injector})}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-command-palette`]],viewQuery:function(e,t){e&1&&Og(t.input,z_e,5),e&2&&kg()},inputs:{commands:[1,`commands`],open:[1,`open`]},outputs:{open:`openChange`,picked:`picked`},decls:1,vars:1,consts:[[`input`,``],[`aria-hidden`,`true`,1,`backdrop`,3,`pointerdown`],[`role`,`dialog`,`aria-modal`,`true`,1,`palette`,3,`keydown`],[1,`sr-only`],[1,`field`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`,1,`search-icon`],[`cx`,`11`,`cy`,`11`,`r`,`7`],[`d`,`m20 20-3.5-3.5`],[`type`,`text`,`role`,`combobox`,`aria-autocomplete`,`list`,`aria-expanded`,`true`,`autocomplete`,`off`,`spellcheck`,`false`,`placeholder`,`Type a command or a tab…`,`aria-label`,`Command`,3,`input`,`value`],[`role`,`listbox`,`aria-label`,`Commands`,1,`list`,3,`pointerdown`,`hidden`],[`role`,`option`,3,`active`],[1,`empty`],[1,`help`],[`role`,`status`,1,`sr-only`],[`role`,`option`,3,`pointermove`,`click`],[1,`title`],[1,`group`]],template:function(e,t){e&1&&A(0,W_e,28,11),e&2&&j(t.open()?0:-1)},styles:[`.backdrop[_ngcontent-%COMP%] { position: fixed; inset: 0; z-index: 100; @@ -26814,7 +26837,7 @@ kbd[_ngcontent-%COMP%] { .help[_ngcontent-%COMP%] { display: none; } -}`]})},G_e=[`nav`],K_e=[`main`],q_e=e=>[e],J_e=(e,t)=>t.id;function Y_e(e,t){e&1&&(w(),F(0,`svg`,4),L(1,`path`,32),I())}function X_e(e,t){e&1&&(w(),F(0,`svg`,4),L(1,`path`,33)(2,`path`,34)(3,`path`,35)(4,`path`,36)(5,`path`,37)(6,`path`,38),I())}function Z_e(e,t){e&1&&(w(),F(0,`svg`,5)(1,`defs`)(2,`linearGradient`,39),L(3,`stop`,40)(4,`stop`,41),I()(),L(5,`path`,42),F(6,`g`,43),L(7,`path`,44)(8,`path`,45)(9,`path`,46)(10,`path`,47),I()())}function Q_e(e,t){e&1&&(w(),F(0,`svg`,6),L(1,`path`,48)(2,`path`,49)(3,`path`,50)(4,`path`,51),I())}function $_e(e,t){e&1&&(w(),F(0,`svg`,7),L(1,`path`,52),I())}function eve(e,t){e&1&&(w(),F(0,`svg`,8)(1,`defs`)(2,`linearGradient`,53),L(3,`stop`,54)(4,`stop`,55)(5,`stop`,56)(6,`stop`,57)(7,`stop`,58)(8,`stop`,59),I()(),L(9,`path`,60),I())}function J9(e,t){e&1&&(w(),F(0,`svg`,9),L(1,`rect`,61),F(2,`g`,62)(3,`defs`)(4,`mask`,63),L(5,`rect`,64),F(6,`g`,65),L(7,`path`,66)(8,`path`,67),I()(),F(9,`clipPath`,68),L(10,`rect`,69),I()(),F(11,`g`,70),L(12,`ellipse`,71),I(),F(13,`g`,72),L(14,`path`,73)(15,`path`,74),I(),F(16,`g`,70),L(17,`ellipse`,75)(18,`ellipse`,76),F(19,`g`,77),L(20,`line`,78)(21,`circle`,79)(22,`line`,80)(23,`circle`,81),I()()()())}function tve(e,t){if(e&1){let e=B();F(0,`button`,83),H(`click`,function(){let t=S(e).$implicit;return C(W(2).switchTab(t.id))}),L(1,`app-tab-icon`,84),F(2,`span`),K(3),I()()}if(e&2){let e=t.$implicit,n=W(2);G(`active`,n.tab()===e.id),k(`aria-current`,n.tab()===e.id?`page`:null)(`tabindex`,n.rovingTab()===e.id?0:-1),D(),P(`name`,e.id),D(2),q(e.label)}}function nve(e,t){if(e&1&&(F(0,`div`,12),M(1,tve,4,6,`button`,82,J_e),I()),e&2){let e=W();D(),N(e.tabs())}}function rve(e,t){if(e&1){let e=B();F(0,`a`,85),H(`click`,function(t){let n=S(e);return C(W().openFullPanel(t,n.tab))}),w(),F(1,`svg`,86),L(2,`rect`,87)(3,`rect`,88)(4,`rect`,89)(5,`rect`,90),I(),K(6,` Open full panel `),I()}e&2&&P(`href`,t.href,bu)}function ive(e,t){if(e&1){let e=B();F(0,`app-settings`,91),H(`layoutChange`,function(t){return S(e),C(W().setTabLayout(t))})(`themeChange`,function(t){return S(e),C(W().setTheme(t))})(`passiveChange`,function(t){return S(e),C(W().setPassive(t))})(`pillChange`,function(t){return S(e),C(W().setPill(t))}),I()}if(e&2){let e=W();P(`tabs`,e.settingsTabs())(`layout`,e.tabLayout())(`theme`,e.themePreference())(`passive`,e.passive())(`pill`,e.pill())(`hotkey`,e.popupHotkey())(`paletteShortcut`,e.paletteShortcut)(`rpc`,e.rpc())}}function ave(e,t){e&1&&L(0,`app-auth-code`,26),e&2&&P(`client`,t)}function ove(e,t){if(e&1){let e=B();F(0,`div`,27)(1,`p`),K(2,` Can't reach the devtools server. Check that the dev server is running. The panel keeps trying to connect. `),I(),F(3,`button`,83),H(`click`,function(){return S(e),C(W().retryConnection())}),K(4,`Retry now`),I()()}}function sve(e,t){e&1&&(F(0,`p`,28),K(1,`Connecting to the devtools server…`),I())}function cve(e,t){e&1&&L(0,`app-coming-soon`,29),e&2&&P(`info`,t)}function lve(e,t){e&1&&(F(0,`p`,28),K(1,`Looking for an Angular Native app…`),I())}function uve(e,t){e&1&&(K(0,` To turn it on, set `),F(1,`code`),K(2),I(),K(3,` in the devtools options. `)),e&2&&(D(2),q(t))}function dve(e,t){if(e&1&&(F(0,`p`,30),K(1,` This inspector is turned off in the devtools config (`),F(2,`code`),K(3,`inspectors`),I(),K(4,`). `),A(5,uve,4,1),F(6,`a`,92),K(7,`About inspectors`),F(8,`span`,93),K(9,` (opens in a new tab)`),I()()()),e&2){let e,t=W();D(5),j((e=t.turnOnSnippet())?5:-1,e),D(),P(`href`,t.inspectorsDocsUrl,bu)}}function fve(e,t){if(e&1){let e=B();F(0,`app-dashboard`,100),H(`navigate`,function(t){return S(e),C(W(3).switchTab(t))}),I()}e&2&&P(`rpc`,W(3).rpc())}function pve(e,t){if(e&1){let e=B();F(0,`app-timeline`,101),H(`open`,function(t){return S(e),C(W(3).openLink(t))}),I()}e&2&&P(`rpc`,W(3).rpc())}function mve(e,t){if(e&1){let e=B();F(0,`app-audit-inspector`,102),H(`showComponent`,function(t){return S(e),C(W(3).showComponent(t))}),I()}if(e&2){let e=W(3);P(`rpc`,e.rpc())(`canShowComponent`,e.config().inspectors.components)}}function hve(e,t){if(e&1){let e=B();F(0,`app-component-tree`,103),H(`focusHandled`,function(){return S(e),C(W(3).componentFocus.set(null))})(`commandHandled`,function(){return S(e),C(W(3).componentCommand.set(null))})(`showForm`,function(t){return S(e),C(W(3).showForm(t))})(`showInjector`,function(t){return S(e),C(W(3).showInjector(t))})(`showSignals`,function(t){return S(e),C(W(3).showSignals(t))})(`showPipe`,function(t){return S(e),C(W(3).showPipe(t))}),I()}if(e&2){let e=W(3);P(`rpc`,e.rpc())(`focus`,e.componentFocus())(`command`,e.componentCommand())(`canShowInjector`,e.config().inspectors.injectors)(`canShowSignals`,e.config().inspectors.signals)(`canShowPipes`,e.config().inspectors.pipes)}}function gve(e,t){if(e&1){let e=B();F(0,`app-route-inspector`,104),H(`showComponent`,function(t){return S(e),C(W(3).showComponent(t))}),I()}e&2&&P(`rpc`,W(3).rpc())}function _ve(e,t){if(e&1&&L(0,`app-signal-inspector`,97),e&2){let e=W(3);P(`rpc`,e.rpc())(`focus`,e.signalFocus())}}function vve(e,t){if(e&1){let e=B();F(0,`app-di-inspector`,105),H(`focusHandled`,function(){return S(e),C(W(3).injectorFocus.set(null))})(`showComponent`,function(t){return S(e),C(W(3).showComponent(t))}),I()}if(e&2){let e=W(3);P(`rpc`,e.rpc())(`focus`,e.injectorFocus())(`canShowComponent`,e.config().inspectors.components)}}function yve(e,t){e&1&&L(0,`app-store-inspector`,94),e&2&&P(`rpc`,W(3).rpc())}function bve(e,t){e&1&&L(0,`app-query-inspector`,94),e&2&&P(`rpc`,W(3).rpc())}function xve(e,t){e&1&&L(0,`app-network-inspector`,94),e&2&&P(`rpc`,W(3).rpc())}function Sve(e,t){if(e&1){let e=B();F(0,`app-forms-inspector`,106),H(`focusHandled`,function(){return S(e),C(W(3).formFocus.set(null))}),I()}if(e&2){let e=W(3);P(`rpc`,e.rpc())(`focus`,e.formFocus())}}function Cve(e,t){if(e&1){let e=B();F(0,`app-pipes-inspector`,106),H(`focusHandled`,function(){return S(e),C(W(3).pipeFocus.set(null))}),I()}if(e&2){let e=W(3);P(`rpc`,e.rpc())(`focus`,e.pipeFocus())}}function wve(e,t){e&1&&L(0,`app-analog-inspector`,94),e&2&&P(`rpc`,W(3).rpc())}function Tve(e,t){e&1&&L(0,`app-capacitor-inspector`,94),e&2&&P(`rpc`,W(3).rpc())}function Eve(e,t){e&1&&L(0,`app-plugins-inspector`,94),e&2&&P(`rpc`,W(3).rpc())}function Dve(e,t){if(e&1){let e=B();F(0,`app-errors-inspector`,107),H(`showComponent`,function(t){return S(e),C(W(3).showComponent(t))}),I()}if(e&2){let e=W(3);P(`rpc`,e.rpc())(`canShowComponent`,e.config().inspectors.components)(`canExplainInjection`,e.config().inspectors.injectors)}}function Ove(e,t){if(e&1&&A(0,fve,1,1,`app-dashboard`,94)(1,pve,1,1,`app-timeline`,94)(2,mve,1,2,`app-audit-inspector`,95)(3,hve,1,6,`app-component-tree`,96)(4,gve,1,1,`app-route-inspector`,94)(5,_ve,1,2,`app-signal-inspector`,97)(6,vve,1,3,`app-di-inspector`,98)(7,yve,1,1,`app-store-inspector`,94)(8,bve,1,1,`app-query-inspector`,94)(9,xve,1,1,`app-network-inspector`,94)(10,Sve,1,2,`app-forms-inspector`,97)(11,Cve,1,2,`app-pipes-inspector`,97)(12,wve,1,1,`app-analog-inspector`,94)(13,Tve,1,1,`app-capacitor-inspector`,94)(14,Eve,1,1,`app-plugins-inspector`,94)(15,Dve,1,3,`app-errors-inspector`,99),e&2){let e;j((e=W(2).tab())===`dashboard`?0:e===`timeline`?1:e===`audit`?2:e===`components`?3:e===`routes`?4:e===`signals`?5:e===`injectors`?6:e===`store`?7:e===`queries`?8:e===`network`?9:e===`forms`?10:e===`pipes`?11:e===`analog`?12:e===`capacitor`?13:e===`plugins`?14:e===`errors`?15:-1)}}function kve(e,t){e&1&&M(0,Ove,16,1,null,null,Xh),e&2&&N(R_(0,q_e,W().scopeKey()))}var Y9=`all`,Ave=[Y9,...XC],jve={angular:`Angular`,ngrx:`NgRx Store`,analog:`Analog`,"angular-native":`Angular Native`,nativescript:`NativeScript`,capacitor:`Capacitor`},X9={ngrx:`store`,analog:`analog`,capacitor:`capacitor`},Z9={store:`ngrx`,analog:`analog`,capacitor:`capacitor`},Q9={"angular-native":[`components`,`signals`,`injectors`,`store`,`queries`,`pipes`,`errors`]},Mve={id:`nativescript`,name:`NativeScript`,badge:`Available`,heading:`Inspect NativeScript apps`,summary:`A NativeScript Angular app reports from the simulator or device to this server, and its components, signals, injectors and NgRx stores show up in the Angular dock.`,color:`#3c5afd`,plansTitle:`Set up an app`,plans:[`Install @pangular-inspector/devtools and @valor/nativescript-websockets`,`Call initNativeScriptOverlay() in main.ts, before the app bootstraps`,`Run npx pangular dev --no-auth in the app, then open the Angular dock`],link:{label:`NativeScript setup guide`,href:`https://pangular-inspector.dev/guides/nativescript/`}},Nve={id:`capacitor`,name:`Capacitor`,badge:`Available`,heading:`Inspect Capacitor apps`,summary:`An Ionic or Capacitor app runs the browser overlay in its WebView and reports to this server, so it shows up in the Angular dock like a browser tab.`,color:`#119eff`,plansTitle:`Set up an app`,plans:[`With live reload on localhost, load @pangular-inspector/devtools/overlay as in a browser`,`In a bundled build, call initOverlay() from @pangular-inspector/devtools/overlay-manual with this server’s address and connectionMeta`,`Run the app, then come back here for its plugin calls, or open the Angular dock`],link:{label:`Capacitor setup guide`,href:`https://pangular-inspector.dev/guides/capacitor/`}},Pve={id:`analog`,name:`Analog`,badge:`Not in this app`,heading:`This app doesn’t use Analog`,summary:`In an Analog app this dock shows your file routes, server load() and API calls, render modes and route lint.`,color:`#dd0330`,plans:[`Which page, layout and .server.ts files render a URL`,`Every load(), server function and API call with timing`,`SSR, prerendered or client only, per page`],link:{label:`Get started with Analog`,href:`https://analogjs.org/docs/getting-started`}},Fve={id:`angular-native`,name:`Angular Native`,badge:`Not connected`,heading:`No Angular Native app is connected`,summary:`Start the overlay in your Angular Native app and run this server with --no-auth. The tabs fill as soon as the app reports.`,color:`#e11d48`,plans:[`The component tree, with the view outlined on the device`,`Signals and injectors of the running app`,`Live @ngrx/signals and @ngrx/store state`],link:{label:`Set up Angular Native`,href:`https://pangular-inspector.dev/guides/angular-native/`}},$9=[1e3,2e3,5e3,1e4];function Ive(){let e=new URLSearchParams(location.search).get(`view`);return XC.find(t=>t===e)??null}Ere(class e{analog=T(!1);allTabs=dw.map(({id:e,label:t})=>({id:e,label:t}));view=T(Ive());viewAccent=X(()=>m_e(this.view(),this.themeService.current()));title=X(()=>{let e=this.view();return e?jve[e]:`Pangular Inspector`});mainLabel=X(()=>this.tab()===`settings`?`Settings`:this.availableTabs().find(e=>e.id===this.tab())?.label??this.title());analogKnown=T(!1);capacitorReporting=T(!1);pluginsReporting=T(!1);capacitorKnown=T(!1);nativePageId=T(null);nativeKnown=T(!1);scopeKey=X(()=>this.view()===`angular-native`?this.nativePageId()??``:``);comingSoon=X(()=>{let e=this.view();if(e===`analog`)return this.analogKnown()&&!this.analog()?Pve:void 0;if(e===`nativescript`)return Mve;if(e===`capacitor`)return this.config().inspectors.capacitor&&this.capacitorKnown()&&!this.capacitorReporting()?Nve:void 0;if(e===`angular-native`)return this.nativeKnown()&&!this.nativePageId()?Fve:void 0});config=X(()=>IT(this.rpc()));tabEnabled=UT;inspectorsDocsUrl=HT;turnOnSnippet=X(()=>{let e=VT(this.tab());return e?`inspectors: {${e}: true}`:null});availableTabs=X(()=>{if(this.comingSoon())return[];let e=this.view(),t=e?X9[e]:void 0,n=this.allTabs.filter(e=>UT(e.id,this.config()));if(t)return n.filter(e=>e.id===t);let r=e?Q9[e]:void 0;return r?n.filter(e=>r.includes(e.id)):n.filter(t=>(t.id!==`analog`||this.analog())&&(t.id!==`capacitor`||this.capacitorReporting())&&(t.id!==`plugins`||this.pluginsReporting())&&!(e===`angular`&&Z9[t.id]))});tabLayout=T(qme());tabs=X(()=>{let e=this.tab(),t=$me(this.availableTabs(),this.tabLayout(),e);return this.rpc()?t:t.filter(t=>t.id===`dashboard`||t.id===e)});settingsTabs=X(()=>this.availableTabs());rovingTab=X(()=>{let e=this.tabs(),t=this.tab();return e.some(e=>e.id===t)?t:e[0]?.id});onNavKey(e){let t=this.nav()?.nativeElement;if(!t||e.altKey||e.ctrlKey||e.metaKey)return;let n=[...t.querySelectorAll(`button`)],r=n.indexOf(document.activeElement);if(r<0)return;let i=n.length-1,a={ArrowRight:r===i?0:r+1,ArrowLeft:r===0?i:r-1,Home:0,End:i},o=Object.hasOwn(a,e.key)?a[e.key]:-1;o<0||(e.preventDefault(),n[o].focus())}fullPanelLink=X(()=>{let e=this.view();if(!e||location.protocol===`chrome-extension:`)return null;let t=this.comingSoon()?`dashboard`:X9[e]??this.tab();return{tab:t,href:dhe(location.href,t)}});tab=Q(()=>{let e=this.view();return e&&(X9[e]??Q9[e]?.[0])||`dashboard`});rpc=T(null);openedDock=T(null);connected=T(!1);connectionFailed=T(!1);pairing=T(null);connectedNote=T(``);hiddenPages=T([]);pageId=fT();backgroundNote=X(()=>{let e=this.hiddenPages();return this.pageId?e.includes(this.pageId)?`Page in background, showing the last data.`:``:e.length?e.length===1?`A page is in the background, showing its last data.`:`${e.length} pages are in the background, showing their last data.`:``});stopVisibility=()=>{};stopNative=()=>{};stopCapacitor=()=>{};stopPlugins=()=>{};stopFollowing=()=>{};stopHighlights=()=>{};nav=sv(`nav`);main=sv(`main`);injector=x(_s);themeService=x(ahe);navObserver;navFade=T({start:!1,end:!1});constructor(){x(Dj).use(this.rpc),td(()=>{let e=this.nav()?.nativeElement;e&&typeof ResizeObserver<`u`&&(this.navObserver=new ResizeObserver(()=>this.measureNav()),this.navObserver.observe(e))}),mv(()=>{this.tab(),this.tabs(),Z(()=>{this.revealActiveTab(),this.measureNav()})}),E(()=>{this.connected()&&Z(()=>this.postToPopup({type:`pangular:popup-pill`,pill:this.pill()}))}),E(()=>{let e=this.openedDock(),t=this.rpc();e&&t&&Z(()=>void vT(t,`hub-dock-seen`,ZC(e.dock)))}),E(()=>{let e=this.themeService.current();Z(()=>{try{window.parent!==window&&V5(window.parent.document,e)}catch{}})})}measureNav(){let e=this.nav()?.nativeElement;if(!e)return;let t=e.scrollWidth-e.clientWidth,n=e.scrollLeft>1,r=t>1&&e.scrollLeftn?e.scrollLeft=Math.max(0,n):e.scrollLeft{this.openedDock.set({dock:e}),e===Y9?this.showFullPanel():this.showView(e)});let e=i7(location.hash,a7(this.tabScope()),[...this.availableTabs().map(e=>e.id),`settings`]);e?(this.tab.set(e),this.restoreLinkItem()):!this.view()&&i7(location.hash,a7(this.tabScope()),[`capacitor`])===`capacitor`?this.restoreCapacitor=!0:!this.view()&&i7(location.hash,a7(this.tabScope()),[`analog`])===`analog`&&(this.restoreAnalog=!0),this.stopHighlights=bT(()=>this.rpc()),this.connect()}connecting=!1;pendingClient=null;retries=0;retryTimer;connect(){if(this.connecting||this.pendingClient||this.rpc()||this.pairing())return;this.connecting=!0,clearTimeout(this.retryTimer);let e=ghe();this.dropped&&xT();let t=xhe(e);JC({...e?{baseURL:e}:{},...t.token?{authToken:t.token}:{},cacheOptions:gT(),simpleAuth:!1}).then(e=>{if(this.connecting=!1,this.destroyed){e.close?.();return}this.pendingClient=e;let n=n=>{if(e===this.pendingClient||e===this.rpc()||e===this.pairing()){if(this.pendingClient===e&&n!==`connecting`&&(this.pendingClient=null),n===`connected`){let n=this.pairing()===e;this.pairing.set(null),setTimeout(()=>t.remember(e.connection?.authToken)),this.ready(e),this.connected.set(this.rpc()===e),n&&(this.connectedNote.update(e=>e===`Connected.`?`Connected.\xA0`:`Connected.`),this.focusCurrentTab())}else n===`unauthorized`?(this.connected.set(!1),this.rpc()===e&&this.rpc.set(null),this.pairing.set(e)):(n===`disconnected`||n===`error`)&&(this.connected.set(!1),this.rpc()===e&&this.rpc.set(null),this.pairing()===e&&this.pairing.set(null),e.close?.(),this.retryLater())}};e.events.on(`connection:status`,n),e.status!==`connecting`&&n(e.status)},()=>{this.connecting=!1,!this.destroyed&&(this.analogKnown.set(!0),this.nativeKnown.set(!0),this.retryLater())})}ready(e){this.rpc()===e||this.destroyed||(this.retries=0,this.connectionFailed.set(!1),this.refocusOnConnect&&this.focusCurrentTab(),this.refocusOnConnect=!1,this.rpc.set(e),this.listenForServer(e),this.watchVisibility(e),this.watchAngularNative(e),this.watchCapacitor(e),this.watchPlugins(e),e.scope(`pangular`).rpc.call(`analog-project`).then(e=>{let t=!!e?.analog;this.analog.set(t),this.analogKnown.set(!0),t&&this.restoreAnalog&&UT(`analog`,this.config())&&this.tab.set(`analog`),this.restoreAnalog=!1,!t&&this.tab()===`analog`&&!this.view()&&this.tab.set(`dashboard`)},()=>{this.analogKnown.set(!0),this.restoreAnalog=!1,this.tab()===`analog`&&!this.view()&&this.tab.set(`dashboard`)}))}dropped=!1;retryLater(){if(this.destroyed)return;this.dropped=!0,this.connectionFailed.set(!0);let e=$9[Math.min(this.retries++,$9.length-1)];clearTimeout(this.retryTimer),this.retryTimer=setTimeout(()=>this.connect(),e)}retryConnection(){this.retries=0,this.refocusOnConnect=!0,this.connect()}refocusOnConnect=!1;destroyed=!1;ngOnDestroy(){this.destroyed=!0,clearTimeout(this.retryTimer),this.stopNative(),this.stopCapacitor(),this.stopPlugins(),this.stopFollowing(),this.stopVisibility(),this.stopHighlights(),this.navObserver?.disconnect()}showView(e){if(e===this.view())return;dT(e===`angular-native`?this.nativePageId():null),this.view.set(e);let t=new URL(location.href);t.searchParams.set(`view`,e),t.hash=``,history.replaceState(history.state,``,t)}showFullPanel(e){if(!this.view())return;dT(null),this.view.set(null);let t=new URL(location.href);t.searchParams.delete(`view`),t.hash=e?`tab=${e}`:``,history.replaceState(history.state,``,t);let n=e??a7(this.tabScope()),r=this.availableTabs().map(e=>e.id),i=i7(t.hash,n,r);i?this.setTab(i):n===`capacitor`&&(this.restoreCapacitor=!0)}openFullPanel(e,t){fhe(e)&&t7()&&(e.preventDefault(),this.showFullPanel(t),this.focusCurrentTab(),n7(Y9))}paletteOpen=T(!1);paletteShortcut=Y5()?`⌘K`:`Ctrl+K`;themePreference=X(()=>this.themeService.preference());passive=T(Yme());pill=T(Zme());popupHotkey=X(()=>{let e=this.config().popup.hotkey;return e!==!1&&uw(e,Y5())});popup=nhe();poppedOut=!!X5();tabBeforeSettings=null;componentCommand=Q({source:this.tab,computation:()=>null});paletteCommands=X(()=>{let e=new Set(this.availableTabs().map(e=>e.id)),t=e.has(`components`)&&!!this.rpc();return yw(this.config()).filter(n=>n.id.startsWith(`tab:`)?e.has(n.id.slice(4)):n.id===`popout:return`?this.poppedOut:n.popupOnly?this.popup:n.id===`pick-component`||n.id.startsWith(`cd-`)?t:!0)});onGlobalKey(e){if(e.defaultPrevented)return;let t=Y5(),n=this.config().popup.hotkey;if(this.popup&&n&&!e.repeat&&lw(e,n,t)){e.preventDefault(),this.postToPopup({type:`pangular:popup-close`});return}!(t?e.metaKey&&!e.ctrlKey:e.ctrlKey&&!e.metaKey)||e.altKey||e.shiftKey||e.key.toLowerCase()!==`k`||e.repeat||(e.preventDefault(),!this.paletteOpen()&&this.openPalette())}openPalette(){t7()&&uhe()||this.paletteOpen.set(!0)}runCommand(e){if(e.startsWith(`tab:`)){let t=e.slice(4);this.availableTabs().some(e=>e.id===t)&&this.switchTab(t);return}if(e.startsWith(`theme:`)){let t=e.slice(6);(t===`system`||t===`light`||t===`dark`)&&this.setTheme(t);return}if(e===`dock:reset-size`){this.postToPopup({type:`pangular:popup-dock-size`});return}if(e.startsWith(`dock:`)){this.postToPopup({type:`pangular:popup-dock`,mode:e.slice(5)});return}if(e===`popout`){this.postToPopup({type:`pangular:popup-popout`});return}if(e===`popout:return`){ihe();return}let t={"pick-component":`pick`,"cd-record-start":`cd-start`,"cd-record-stop":`cd-stop`,"cd-clear":`cd-clear`};e===`settings`?this.tab()!==`settings`&&this.toggleSettings():t[e]&&this.availableTabs().some(e=>e.id===`components`)&&(this.tab()!==`components`&&this.switchTab(`components`),this.componentCommand.set({kind:t[e]}))}toggleSettings(){if(this.tab()===`settings`){let e=this.tabBeforeSettings,t=this.availableTabs().map(e=>e.id);this.switchTab(e&&t.includes(e)?e:t[0]??`dashboard`);return}this.tabBeforeSettings=this.tab(),this.switchTab(`settings`)}setTabLayout(e){this.tabLayout.set(e),Jme(e)}setTheme(e){this.themeService.setPreference(e)}setPassive(e){this.passive.set(e),Xme(e),this.postToPopup({type:`pangular:popup-passive`,passive:e})}setPill(e){this.pill.set(e),Qme(e),this.postToPopup({type:`pangular:popup-pill`,pill:e})}postToPopup(e){for(let{win:t,origin:n}of Q5())try{t.postMessage(e,n)}catch{}}openLink(e){let t=e.tab;if(!this.availableTabs().some(e=>e.id===t))return!1;if(this.tab()!==t&&this.switchTab(t),e.id&&Object.hasOwn(mw,t)){let n=e.page;t===`components`?this.componentFocus.set({id:e.id,pageId:n}):t===`injectors`?this.injectorFocus.set({componentId:e.id,pageId:n}):t===`signals`?this.signalFocus.set({componentId:e.id,pageId:n}):t===`forms`&&this.formFocus.set({id:e.id})}return history.replaceState(history.state,``,gw(e)),!0}followHash(){let e=_w(location.hash);if(e){if(e.tab===`settings`){this.tab()!==`settings`&&this.toggleSettings();return}this.openLink(e)}}listenForServer(e){let t=e.scope(`pangular`).rpc,n=()=>typeof document>`u`||document.visibilityState!==`hidden`;try{t.register({name:`panel-command`,type:`event`,jsonSerializable:!0,handler:e=>{let t=e?.command;typeof t==`string`&&n()&&this.runCommand(t)}}),t.register({name:`open-in-panel`,type:`event`,jsonSerializable:!0,handler:e=>{let t=e;n()&&typeof t?.tab==`string`&&this.openLink({tab:t.tab,...typeof t.id==`string`?{id:t.id}:{},...typeof t.page==`string`?{page:t.page}:{}})}})}catch{}}restoreLinkItem(){let e=_w(location.hash);if(!e?.id||e.tab!==this.tab())return;let t=e.tab;t===`components`?this.componentFocus.set({id:e.id,pageId:e.page}):t===`injectors`?this.injectorFocus.set({componentId:e.id,pageId:e.page}):t===`signals`?this.signalFocus.set({componentId:e.id,pageId:e.page}):t===`forms`&&this.formFocus.set({id:e.id})}formFocus=T(null);componentFocus=Q({source:this.tab,computation:()=>null});pipeFocus=Q({source:this.tab,computation:()=>null});showPipe(e){this.config().inspectors.pipes&&(this.switchTab(`pipes`),this.pipeFocus.set(e))}showForm(e){this.formFocus.set({id:e}),this.switchTab(`forms`)}injectorFocus=Q({source:this.tab,computation:()=>null});signalFocus=Q({source:this.tab,computation:()=>null});showSignals(e){if(!this.config().inspectors.signals)return;let t=e.pageId?{page:e.pageId}:{};this.openLink({tab:`signals`,id:e.componentId,...t})&&this.signalFocus.set(e)}showInjector(e){this.config().inspectors.injectors&&(this.switchTab(`injectors`),this.injectorFocus.set(e))}showComponent(e){this.config().inspectors.components&&(this.switchTab(`components`),this.componentFocus.set(e))}inspectFromPanel({source:e,origin:t,data:n}){if(e!==window.parent||t!==location.origin)return;let r=n;r?.type===`pangular:inspect-component`&&typeof r.id==`string`&&this.tab()===`components`&&this.config().inspectors.components&&this.componentFocus.set({id:r.id})}switchTab(e){let t=Z9[e];if(this.view()===`angular`&&t){this.activateDock(t,e);return}this.setTab(e),history.replaceState(history.state,``,`#tab=${e}`)}restoreAnalog=!1;restoreCapacitor=!1;setTab(e){this.restoreAnalog=!1,this.restoreCapacitor=!1,this.keepFocus(),this.tab.set(e),phe(this.tabScope(),e)}tabScope(){return this.view()??`panel`}async watchAngularNative(e){try{let t=await e.scope(`pangular`).rpc.sharedState(`component-tree`),n=e=>{let t=e?.pages,n=CD(t,this.nativePageId());this.view()===`angular-native`&&dT(n),this.nativePageId.set(n),this.nativeKnown.set(!0)};n(t.value()),this.stopNative(),this.stopNative=t.on(`updated`,n)}catch{this.nativeKnown.set(!0)}}async watchPlugins(e){let t=!this.view()&&i7(location.hash,a7(this.tabScope()),[`plugins`])===`plugins`;try{let n=await e.scope(`pangular`).rpc.sharedState(`plugins`),r=e=>{if(e===void 0)return;let n=tpe(e);this.pluginsReporting.set(n),n&&t&&UT(`plugins`,this.config())&&this.tab.set(`plugins`),n&&(t=!1),!n&&this.tab()===`plugins`&&!this.view()&&this.tab.set(`dashboard`)};r(n.value()),this.stopPlugins(),this.stopPlugins=n.on(`updated`,r)}catch{this.pluginsReporting.set(!1)}}async watchCapacitor(e){try{let t=await e.scope(`pangular`).rpc.sharedState(`capacitor`),n=e=>{if(e===void 0)return;let t=Q8(e).length>0;this.capacitorReporting.set(t),this.capacitorKnown.set(!0),t&&this.restoreCapacitor&&UT(`capacitor`,this.config())&&(this.restoreCapacitor=!1,this.tab.set(`capacitor`)),!t&&this.tab()===`capacitor`&&!this.view()&&this.tab.set(`dashboard`)};n(t.value()),this.stopCapacitor(),this.stopCapacitor=t.on(`updated`,n)}catch{this.capacitorReporting.set(!1),this.capacitorKnown.set(!0)}}async watchVisibility(e){try{let t=await e.scope(`pangular`).rpc.sharedState(`page-visibility`),n=e=>{let t=e?.hidden;this.hiddenPages.set(Array.isArray(t)?t.filter(e=>typeof e==`string`):[])};n(t.value()),this.stopVisibility(),this.stopVisibility=t.on(`updated`,n)}catch{}}keepFocus(){let e=document.activeElement,t=this.main()?.nativeElement;(!e||e===document.body||t?.contains(e))&&this.focusCurrentTab()}focusCurrentTab(){td(()=>{let e=document.activeElement;e&&e!==document.body||(this.nav()?.nativeElement.querySelector(`button.active`)??this.main()?.nativeElement)?.focus()},{injector:this.injector})}async activateDock(e,t){if(await n7(e))return;if(window.parent===window){this.keepFocus(),this.showView(e);return}let n=this.rpc();if(!n?.call){this.setTab(t);return}try{await n.call(`hub:docks:activate`,{dockId:ZC(e)}),this.keepFocus(),this.showView(e)}catch{this.setTab(t)}}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-root`]],viewQuery:function(e,t){e&1&&Og(t.nav,G_e,5)(t.main,K_e,5),e&2&&kg(2)},hostVars:4,hostBindings:function(e,t){e&1&&H(`message`,function(e){return t.inspectFromPanel(e)},xu)(`hashchange`,function(){return t.followHash()},xu)(`keydown`,function(e){return t.onGlobalKey(e)},Su),e&2&&Zg(`--%NS%accent`,t.viewAccent()?.accent??null)(`--%NS%accent-text`,t.viewAccent()?.text??null)},decls:41,vars:30,consts:[[`nav`,``],[`main`,``],[1,`brand`],[1,`mark`],[`width`,`22`,`height`,`22`,`viewBox`,`0 0 256 256`,`aria-hidden`,`true`],[`width`,`22`,`height`,`22`,`viewBox`,`0 0 32 32`,`aria-hidden`,`true`],[`width`,`24`,`height`,`17`,`viewBox`,`0 0 256 182`,`aria-hidden`,`true`],[`width`,`22`,`height`,`22`,`viewBox`,`0 0 24 24`,`fill`,`currentColor`,`aria-hidden`,`true`],[`width`,`20`,`height`,`22`,`viewBox`,`0 0 223 236`,`aria-hidden`,`true`],[`width`,`30`,`height`,`30`,`viewBox`,`0 0 500 500`,`aria-hidden`,`true`],[1,`title`],[`aria-label`,`Inspectors`,3,`scroll`,`keydown`],[`role`,`toolbar`,`aria-label`,`Inspectors`,`aria-orientation`,`horizontal`,1,`tab-bar`],[1,`full-panel`,3,`href`],[1,`shell-actions`],[`type`,`button`,`aria-haspopup`,`dialog`,1,`shell-btn`,3,`click`],[`width`,`16`,`height`,`16`,`viewBox`,`0 0 24 24`,`aria-hidden`,`true`],[`d`,`M18 3a3 3 0 0 0-3 3v12a3 3 0 0 0 3 3 3 3 0 0 0 3-3 3 3 0 0 0-3-3H6a3 3 0 0 0-3 3 3 3 0 0 0 3 3 3 3 0 0 0 3-3V6a3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3h12a3 3 0 0 0 3-3 3 3 0 0 0-3-3z`],[`type`,`button`,`aria-label`,`Settings`,`title`,`Settings`,1,`shell-btn`,3,`click`],[`name`,`settings`],[`role`,`status`,1,`status`],[`aria-hidden`,`true`,1,`dot`],[`tabindex`,`0`],[`role`,`status`,1,`background-note`],[`role`,`status`,1,`sr-only`],[3,`tabs`,`layout`,`theme`,`passive`,`pill`,`hotkey`,`paletteShortcut`,`rpc`],[3,`client`],[`role`,`alert`,1,`connection-error`],[`role`,`status`,1,`turned-off`],[3,`info`],[1,`turned-off`],[3,`openChange`,`picked`,`commands`,`open`],[`fill`,`#3c5afd`,`d`,`M237.248 18.752q18.061 18.06 18.748 45.247V192c-.457 18.12-6.707 33.207-18.748 45.247c-12.04 12.04-27.127 18.291-45.251 18.752H63.999q-27.187-.69-45.247-18.752C6.712 225.208.46 210.121 0 192.001V64q.69-27.187 18.752-45.247Q36.812.692 63.999 0h127.998c18.124.46 33.211 6.711 45.251 18.752m-17.655 103q-6.033-6.003-6.28-15.066V64q-.192-9.063-6.221-15.091c-4.02-4.023-9.054-6.093-15.095-6.22h-21.312v106.626L85.315 42.687H63.999c-6.042.128-11.072 2.198-15.091 6.221c-4.023 4.02-6.093 9.05-6.22 15.09v42.688q-.249 9.063-6.281 15.066q-6.03 5.996-15.091 6.246q9.062.255 15.09 6.25c4.024 4.002 6.115 9.024 6.281 15.066V192c.128 6.037 2.198 11.072 6.221 15.091q6.03 6.03 15.09 6.22h21.317V106.687l85.37 106.627h21.312c6.041-.128 11.076-2.202 15.095-6.221s6.093-9.054 6.22-15.09v-42.688q.249-9.063 6.281-15.066q6.03-5.995 15.091-6.25q-9.062-.25-15.09-6.246`],[`fill`,`#53b9ff`,`d`,`M39.863 54.115L.311 93.716l60.995 61.179L0 216.385l39.428 39.619l61.43-61.507l61.097 61.068l39.552-39.602z`],[`fill`,`#119eff`,`d`,`m140.517 154.896l-39.658 39.601l61.097 61.069l39.552-39.602z`],[`fill-opacity`,`.2`,`d`,`m140.517 154.896l-39.658 39.601l15.267 15.182z`],[`fill`,`#53b9ff`,`d`,`M194.57 100.985L256 39.478L216.431 0l-61.412 61.384L93.917.311L54.365 39.913L216.01 201.761l39.552-39.602z`],[`fill`,`#119eff`,`d`,`m115.36 100.987l39.659-39.602L93.917.313L54.365 39.914z`],[`fill-opacity`,`.2`,`d`,`m115.359 100.985l39.659-39.601l-15.271-15.186z`],[`id`,`an-mark-grad`,`x1`,`0`,`y1`,`0`,`x2`,`1`,`y2`,`1`],[`offset`,`0`,`stop-color`,`#f0224f`],[`offset`,`1`,`stop-color`,`#c4002d`],[`d`,`M16 0C27.2 0 32 4.8 32 16S27.2 32 16 32 0 27.2 0 16 4.8 0 16 0Z`,`fill`,`url(#an-mark-grad)`],[`transform`,`translate(6.4 6.4) scale(0.8)`,`fill`,`#fff`],[`d`,`M14.8486 0L23.138 16.8551L23.9996 3.99892L14.8486 0Z`],[`d`,`M16.9875 17.7114H7.01272L5.73926 20.627L12.0001 24L18.261 20.627L16.9875 17.7114Z`],[`d`,`M8.72168 13.9298H15.2812L11.9997 6.39575L8.72168 13.9298Z`],[`d`,`M9.15103 0L0 3.99892L0.861556 16.8551L9.15103 0Z`],[`fill`,`#c30f2e`,`d`,`M152.228.001L48.455 181.046H256L152.228 0z`],[`fill`,`#dd0330`,`d`,`M88.314 26.967L0 181.52h176.628L88.315 26.967z`],[`fill`,`#fff`,`d`,`M18.167 135.294h220.236v-2.419H18.167z`],[`fill`,`#fff`,`d`,`M204.38 170.667c-.861 0-1.67-.358-2.348-1.034c-4.045-4.063-4.221-20.586-4.026-45.33c.11-13.521.257-32.043-1.9-33.504c-2.104.873-2.315 16.172-2.451 26.301c-.162 11.785-.327 23.98-2.242 30.189c-.57 1.84-1.306 3.525-2.786 3.39c-2.086-.185-2.76-3.48-4.317-16.478c-.647-5.4-1.317-10.98-2.101-13.14a11 11 0 0 0-.269-.66c-.835 1.889-1.8 7.079-2.47 10.682c-.927 4.976-1.803 9.676-2.9 11.726c-.847 1.575-2.19 3.63-4.067 3.231c-2.558-.537-3.323-5.693-3.552-8.719c0-25.455-3.33-28.417-3.997-28.753l-.107.081l-.162-.036c-2.377 1.038-2.506 9.294-2.627 17.276c-.096 5.856-.198 12.492-1.053 18.701c-1.108 8.05-2.448 9.603-4.115 9.507c-3.838-.262-3.95-13.482-3.95-14.987c0-.472.012-1.028.027-1.642c.074-3.076.205-8.8-1.687-10.604c-.25-.239-.603-.515-.879-.437c-1.347.339-2.745 4.714-3.209 6.153c-.147.457-.265.833-.364 1.09c-.078.214-.177.515-.294.88c-1.02 3.095-2.18 6.183-4.16 6.944c-.732.284-1.498.222-2.216-.183c-.953-.541-1.73-1.646-2.455-3.482c-.397-1.016-.735-2.046-1.082-3.081c-.419-1.263-.85-2.569-1.384-3.808c-.419-.965-1.464-1.4-2.796-1.164c-2.768.494-3.232 3.29-3.622 7.5c-.07.733-.137 1.452-.228 2.128c-.011.198-.501 6.38-.814 8.344c-.865 5.39-2.002 7.512-3.89 7.358c-4.66-.398-6.798-20.836-6.684-29.47c.088-6.592-1.104-9-1.818-9.382c-.074-.034-.189-.096-.46.095c-.843.571-1.594 2.348-1.363 4.215c2.566 20.32.674 43.592-3.96 48.833c-1.46 1.649-3.448 1.627-4.832.236c-4.049-4.064-4.218-20.586-4.026-45.33c.11-13.521.254-32.043-1.9-33.504c-2.105.873-2.311 16.172-2.45 26.301c-.163 11.785-.329 23.98-2.246 30.189c-.57 1.84-1.307 3.525-2.782 3.39c-2.091-.186-2.761-3.48-4.321-16.478c-.649-5.4-1.319-10.98-2.101-13.14c-.1-.273-.189-.49-.27-.66c-.832 1.889-1.796 7.079-2.466 10.682c-.927 4.976-1.803 9.676-2.904 11.726c-.846 1.575-2.19 3.63-4.063 3.231c-2.558-.537-3.324-5.693-3.552-8.719c-.003-25.455-3.33-28.417-3.997-28.753l-.106.081l-.166-.036c-2.374 1.038-2.503 9.293-2.629 17.276c-.091 5.856-.194 12.492-1.048 18.701c-1.107 8.05-2.437 9.618-4.111 9.507c-3.846-.262-3.958-13.482-3.958-14.987c0-.472.016-1.028.03-1.642c.074-3.076.207-8.8-1.685-10.604c-.25-.239-.603-.515-.88-.438c-1.347.34-2.75 4.715-3.206 6.155a47 47 0 0 1-.364 1.09q-.16.432-.298.875c-1.02 3.096-2.18 6.187-4.155 6.95c-.736.282-1.506.22-2.22-.185c-.953-.541-1.734-1.646-2.454-3.482c-.398-1.016-.74-2.046-1.083-3.081c-.42-1.263-.854-2.569-1.387-3.808c-.416-.965-1.465-1.4-2.797-1.164c-3.188.567-3.943 4.52-4.55 9.238l-.106.839l-2.411-.32l.114-.824c.527-4.137 1.328-10.39 6.53-11.31c2.446-.435 4.585.581 5.446 2.583c.578 1.34 1.031 2.695 1.466 4.008c.324.99.654 1.98 1.037 2.959c.674 1.708 1.197 2.15 1.392 2.257c1.218-.38 2.462-4.167 2.873-5.414c.13-.402.24-.732.328-.968c.085-.233.195-.571.328-.98c1.097-3.43 2.474-7.144 4.918-7.762c.747-.191 1.903-.166 3.157 1.035c2.665 2.544 2.525 8.48 2.433 12.41c-.014.59-.028 1.126-.028 1.583c0 6.272.93 10.655 1.64 12.16c.367-.77.998-2.63 1.598-7.007c.831-6.066.938-12.624 1.027-18.41c.161-10.24.275-17.663 3.982-19.408c.552-.339 1.469-.522 2.436-.033c3.586 1.803 5.326 11.885 5.326 30.817c.225 2.926 1.013 6.006 1.66 6.448c.004-.066.53-.39 1.394-2.01c.925-1.718 1.845-6.665 2.655-11.026c1.792-9.614 2.606-12.989 4.726-13.166c1.615-.158 2.362 1.896 2.676 2.76c.883 2.422 1.537 7.888 2.23 13.678c.54 4.49 1.31 10.902 2.094 13.497c.084-.228.18-.5.283-.836c1.815-5.878 1.98-17.887 2.14-29.507c.22-16.14.503-26.139 3.448-28.226a2.44 2.44 0 0 1 2.233-.316c3.448 1.144 3.714 11.254 3.519 35.8c-.14 17.799-.313 39.952 3.323 43.603c.317.32.542.32.622.32c.17 0 .413-.161.67-.452c3.681-4.162 6.01-26.022 3.372-46.927c-.328-2.602.677-5.337 2.392-6.514c.946-.652 2.036-.736 2.978-.232c2.145 1.14 3.187 5.024 3.102 11.546c-.15 11.387 2.584 24.714 4.37 26.842c.282-.471.842-1.763 1.379-5.145c.301-1.87.799-8.153.806-8.216c.09-.71.155-1.398.217-2.097c.369-3.924.82-8.804 5.613-9.654c2.444-.435 4.583.577 5.448 2.583c.577 1.34 1.027 2.695 1.46 4.008c.332.99.664 1.98 1.046 2.959c.67 1.708 1.197 2.15 1.387 2.257c1.218-.38 2.467-4.167 2.875-5.41c.132-.402.243-.737.328-.973c.088-.228.195-.57.324-.979c1.1-3.43 2.477-7.144 4.924-7.762c.74-.191 1.9-.166 3.154 1.035c2.665 2.543 2.526 8.48 2.437 12.41q-.029.792-.033 1.583c0 6.272.931 10.655 1.641 12.16c.365-.77.994-2.63 1.601-7.007c.832-6.066.931-12.624 1.027-18.41c.159-10.24.273-17.663 3.98-19.408c.55-.339 1.467-.522 2.44-.033c3.58 1.803 5.325 11.884 5.325 30.817c.224 2.926 1.012 6.006 1.656 6.448c.008-.066.526-.39 1.399-2.01c.923-1.718 1.84-6.665 2.653-11.026c1.786-9.614 2.602-12.989 4.722-13.166c1.62-.158 2.367 1.896 2.68 2.76c.88 2.422 1.535 7.888 2.233 13.678c.534 4.49 1.304 10.902 2.092 13.497c.08-.228.176-.5.28-.836c1.813-5.878 1.976-17.887 2.138-29.507c.216-16.14.504-26.139 3.448-28.226a2.45 2.45 0 0 1 2.234-.316c3.452 1.144 3.718 11.254 3.52 35.8c-.141 17.799-.314 39.952 3.319 43.603c.324.32.544.32.63.32c.165 0 .408-.161.662-.452c3.687-4.162 6.014-26.022 3.375-46.927c-.342-2.723.43-5.47 1.84-6.526c.71-.537 1.575-.647 2.37-.313c2.054.877 3.445 4.63 4.255 11.484c.339 2.87.641 5.974.931 9.036c.641 6.683 1.509 15.69 2.684 17.67c.36-.46 1.096-1.704 2.19-5.038l2.307.753c-1.696 5.157-3.026 7.1-4.755 6.902c-2.69-.299-3.468-5.734-4.84-20.055c-.29-3.048-.59-6.132-.928-8.989c-1.03-8.74-2.782-9.532-2.801-9.54c-.342.174-1.137 1.992-.842 4.31c2.558 20.32.673 43.597-3.964 48.834c-.747.842-1.587 1.27-2.485 1.27`],[`d`,`M12.024.017V0L12 .008L11.976 0v.017L.812 3.892l1.605 14.875l9.559 5.207V24l.024-.013l.024.013v-.026l9.559-5.207l1.605-14.875zm6.868 14.244q-1.64 3.948-6.031 4.166c-2.829 0-4.661-1.7-4.66-1.7q-1.745-1.359-2.398-3.417c-.695-.76-.702-.841-.774-1.145c-.072-.303.045-.388.249-.685q.204-.298.098-.85q-.26-.36-.3-1.128q0-.37.496-.783q.495-.413.607-.632q.083-.119.065-1.031q-.006-.897.995-.975c1-.08 1.565-.832 1.879-1.174c.21-.228.52-.339.91-.341c.551-.026 1.052.185 1.484.62c1.075-.055 2.176.235 3.292.863q2.379 1.414 2.596 3.055q-.257 2.158-5.788-.113q-2.895.819-2.846 3.552q0 2.508 2.422 3.643c-.787-.772-1.122-1.422-1.01-1.959q2.456 2.906 5.588 2.173c-.92.032-1.65-.264-2.198-.893q2.116-.05 3.998-1.972c-.724.576-1.482.794-2.284.657q3.26-2.563 2.307-5.98l-.002-.006a3.02 3.02 0 0 1 .788 2.03q.023 1.175-.795 2.477q.613-.478 1.413-2.047c.23 2.117-.625 3.724-2.574 4.825q.934-.085 2.473-1.23m-5.567-6.63a.319.319 0 1 1 .638 0a.319.319 0 0 1-.638 0`],[`id`,`ng-grad`,`x1`,`49`,`x2`,`226`,`y1`,`214`,`y2`,`130`,`gradientUnits`,`userSpaceOnUse`],[`stop-color`,`#E40035`],[`offset`,`.24`,`stop-color`,`#F60A48`],[`offset`,`.352`,`stop-color`,`#F20755`],[`offset`,`.494`,`stop-color`,`#DC087D`],[`offset`,`.745`,`stop-color`,`#9717E7`],[`offset`,`1`,`stop-color`,`#6C00F5`],[`fill`,`url(#ng-grad)`,`d`,`m222.077 39.192-8.019 125.923L137.387 0l84.69 39.192Zm-53.105 162.825-57.933 33.056-57.934-33.056 11.783-28.556h92.301l11.783 28.556ZM111.039 62.675l30.357 73.803H80.681l30.358-73.803ZM7.937 165.115 0 39.192 84.69 0 7.937 165.115Z`],[`width`,`500`,`height`,`500`,`rx`,`112`,`fill`,`#1c1a17`],[`transform`,`translate(250 252) scale(1.38) translate(-120 -129)`],[`id`,`pi-mark-mask`],[`x`,`-60`,`y`,`-60`,`width`,`360`,`height`,`380`,`fill`,`#fff`],[`fill`,`none`,`stroke`,`#000`,`stroke-width`,`30`,`stroke-linejoin`,`miter`],[`d`,`M88 66 V196`],[`d`,`M88 66 H143 L170 98 L143 130 H88 Z`],[`id`,`pi-mark-clip`],[`x`,`-40`,`y`,`129`,`width`,`320`,`height`,`200`],[`transform`,`rotate(-10 120 129)`],[`cx`,`120`,`cy`,`129`,`rx`,`128`,`ry`,`34`,`fill`,`none`,`stroke`,`#78350f`,`stroke-width`,`10`],[`mask`,`url(#pi-mark-mask)`],[`fill`,`#fbbf24`,`d`,`M120 5 L2 46 L22 198 L120 253 Z`],[`fill`,`#f59e0b`,`d`,`M120 5 L238 46 L218 198 L120 253 Z`],[`clip-path`,`url(#pi-mark-clip)`,`cx`,`120`,`cy`,`129`,`rx`,`128`,`ry`,`34`,`fill`,`none`,`stroke`,`#1c1a17`,`stroke-width`,`22`],[`clip-path`,`url(#pi-mark-clip)`,`cx`,`120`,`cy`,`129`,`rx`,`128`,`ry`,`34`,`fill`,`none`,`stroke`,`#fde68a`,`stroke-width`,`10`],[`transform`,`translate(230.9 146.0) rotate(10) scale(1.5) translate(-4 -4)`],[`x1`,`9`,`y1`,`9`,`x2`,`21`,`y2`,`21`,`stroke`,`#1c1a17`,`stroke-width`,`14`,`stroke-linecap`,`round`],[`r`,`16`,`fill`,`#1c1a17`],[`x1`,`9`,`y1`,`9`,`x2`,`21`,`y2`,`21`,`stroke`,`#fde68a`,`stroke-width`,`7`,`stroke-linecap`,`round`],[`r`,`12`,`fill`,`#1c1a17`,`stroke`,`#fde68a`,`stroke-width`,`5`],[`type`,`button`,3,`active`],[`type`,`button`,3,`click`],[3,`name`],[1,`full-panel`,3,`click`,`href`],[`width`,`14`,`height`,`14`,`viewBox`,`0 0 24 24`,`aria-hidden`,`true`],[`x`,`3`,`y`,`3`,`width`,`7`,`height`,`7`,`rx`,`1.5`],[`x`,`14`,`y`,`3`,`width`,`7`,`height`,`7`,`rx`,`1.5`],[`x`,`3`,`y`,`14`,`width`,`7`,`height`,`7`,`rx`,`1.5`],[`x`,`14`,`y`,`14`,`width`,`7`,`height`,`7`,`rx`,`1.5`],[3,`layoutChange`,`themeChange`,`passiveChange`,`pillChange`,`tabs`,`layout`,`theme`,`passive`,`pill`,`hotkey`,`paletteShortcut`,`rpc`],[`target`,`_blank`,`rel`,`noopener noreferrer`,3,`href`],[1,`sr-only`],[3,`rpc`],[3,`rpc`,`canShowComponent`],[3,`rpc`,`focus`,`command`,`canShowInjector`,`canShowSignals`,`canShowPipes`],[3,`rpc`,`focus`],[3,`rpc`,`focus`,`canShowComponent`],[3,`rpc`,`canShowComponent`,`canExplainInjection`],[3,`navigate`,`rpc`],[3,`open`,`rpc`],[3,`showComponent`,`rpc`,`canShowComponent`],[3,`focusHandled`,`commandHandled`,`showForm`,`showInjector`,`showSignals`,`showPipe`,`rpc`,`focus`,`command`,`canShowInjector`,`canShowSignals`,`canShowPipes`],[3,`showComponent`,`rpc`],[3,`focusHandled`,`showComponent`,`rpc`,`focus`,`canShowComponent`],[3,`focusHandled`,`rpc`,`focus`],[3,`showComponent`,`rpc`,`canShowComponent`,`canExplainInjection`]],template:function(e,t){if(e&1){let e=B();F(0,`header`)(1,`h1`,2)(2,`span`,3),A(3,Y_e,2,0,`:svg:svg`,4)(4,X_e,7,0,`:svg:svg`,4)(5,Z_e,11,0,`:svg:svg`,5)(6,Q_e,5,0,`:svg:svg`,6)(7,$_e,2,0,`:svg:svg`,7)(8,eve,10,0,`:svg:svg`,8)(9,J9,24,0,`:svg:svg`,9),I(),F(10,`span`,10),K(11),I()(),F(12,`nav`,11,0),H(`scroll`,function(){return t.measureNav()})(`keydown`,function(e){return t.onNavKey(e)}),A(14,nve,3,0,`div`,12),I(),A(15,rve,7,1,`a`,13),F(16,`span`,14)(17,`button`,15),H(`click`,function(){return t.openPalette()}),w(),F(18,`svg`,16),L(19,`path`,17),I()(),ls(),F(20,`button`,18),H(`click`,function(){return t.toggleSettings()}),L(21,`app-tab-icon`,19),I()(),F(22,`span`,20)(23,`span`,21),L(24,`span`),I(),K(25),I()(),F(26,`main`,22,1)(28,`p`,23),K(29),I(),F(30,`p`,24),K(31),I(),A(32,ive,1,8,`app-settings`,25)(33,ave,1,1,`app-auth-code`,26)(34,ove,5,0,`div`,27)(35,sve,2,0,`p`,28)(36,cve,1,1,`app-coming-soon`,29)(37,lve,2,0,`p`,28)(38,dve,10,2,`p`,30)(39,kve,2,2),I(),F(40,`app-command-palette`,31),w_(`openChange`,function(n){return S(e),C_(t.paletteOpen,n)||(t.paletteOpen=n),C(n)}),H(`picked`,function(e){return t.runCommand(e)}),I()}if(e&2){let e,n;D(2),G(`ng-mark`,t.view()===`angular`)(`pi-mark`,!t.view()),D(),j(t.view()===`nativescript`?3:t.view()===`capacitor`?4:t.view()===`angular-native`?5:t.view()===`analog`?6:t.view()===`ngrx`?7:t.view()===`angular`?8:9),D(7),G(`ng-text`,t.view()===`angular`),D(),q(t.title()),D(),G(`fade-start`,t.navFade().start)(`fade-end`,t.navFade().end),D(2),j(t.availableTabs().length>1?14:-1),D(),j((e=t.fullPanelLink())?15:-1,e),D(2),k(`aria-label`,`Command palette (`+t.paletteShortcut+`)`)(`title`,`Command palette (`+t.paletteShortcut+`)`),D(3),G(`active`,t.tab()===`settings`),k(`aria-pressed`,t.tab()===`settings`),D(2),G(`connected`,t.connected())(`failed`,t.connectionFailed()),D(3),J(` `,t.connected()?`Live`:t.connectionFailed()?`Disconnected`:t.pairing()?`Code needed`:`Connecting…`,` `),D(),k(`aria-label`,t.mainLabel()),D(3),q(t.backgroundNote()),D(2),q(t.connectedNote()),D(),j(t.tab()===`settings`?32:(n=t.pairing())?33:t.connectionFailed()?34:t.rpc()?(n=t.comingSoon())?36:t.view()===`angular-native`&&!t.nativePageId()?37:t.tabEnabled(t.tab(),t.config())?39:38:35,n),D(8),P(`commands`,t.paletteCommands()),S_(`open`,t.paletteOpen)}},dependencies:[UE,DI,dV,HU,CK,kX,CZ,O1,n2,$ie,sce,iue,Gde,ipe,Jpe,Ume,mce,sE,F_e,W_e,f_e],styles:[`[_nghost-%COMP%] { +}`]})},q_e=[`nav`],J_e=[`main`],Y_e=e=>[e],X_e=(e,t)=>t.id;function Z_e(e,t){e&1&&(w(),F(0,`svg`,4),L(1,`path`,32),I())}function Q_e(e,t){e&1&&(w(),F(0,`svg`,4),L(1,`path`,33)(2,`path`,34)(3,`path`,35)(4,`path`,36)(5,`path`,37)(6,`path`,38),I())}function $_e(e,t){e&1&&(w(),F(0,`svg`,5)(1,`defs`)(2,`linearGradient`,39),L(3,`stop`,40)(4,`stop`,41),I()(),L(5,`path`,42),F(6,`g`,43),L(7,`path`,44)(8,`path`,45)(9,`path`,46)(10,`path`,47),I()())}function eve(e,t){e&1&&(w(),F(0,`svg`,6),L(1,`path`,48)(2,`path`,49)(3,`path`,50)(4,`path`,51),I())}function J9(e,t){e&1&&(w(),F(0,`svg`,7),L(1,`path`,52),I())}function tve(e,t){e&1&&(w(),F(0,`svg`,8)(1,`defs`)(2,`linearGradient`,53),L(3,`stop`,54)(4,`stop`,55)(5,`stop`,56)(6,`stop`,57)(7,`stop`,58)(8,`stop`,59),I()(),L(9,`path`,60),I())}function nve(e,t){e&1&&(w(),F(0,`svg`,9),L(1,`rect`,61),F(2,`g`,62)(3,`defs`)(4,`mask`,63),L(5,`rect`,64),F(6,`g`,65),L(7,`path`,66)(8,`path`,67),I()(),F(9,`clipPath`,68),L(10,`rect`,69),I()(),F(11,`g`,70),L(12,`ellipse`,71),I(),F(13,`g`,72),L(14,`path`,73)(15,`path`,74),I(),F(16,`g`,70),L(17,`ellipse`,75)(18,`ellipse`,76),F(19,`g`,77),L(20,`line`,78)(21,`circle`,79)(22,`line`,80)(23,`circle`,81),I()()()())}function rve(e,t){if(e&1){let e=B();F(0,`button`,83),H(`click`,function(){let t=S(e).$implicit;return C(W(2).switchTab(t.id))}),L(1,`app-tab-icon`,84),F(2,`span`),K(3),I()()}if(e&2){let e=t.$implicit,n=W(2);G(`active`,n.tab()===e.id),k(`aria-current`,n.tab()===e.id?`page`:null)(`tabindex`,n.rovingTab()===e.id?0:-1),D(),P(`name`,e.id),D(2),q(e.label)}}function ive(e,t){if(e&1&&(F(0,`div`,12),M(1,rve,4,6,`button`,82,X_e),I()),e&2){let e=W();D(),N(e.tabs())}}function ave(e,t){if(e&1){let e=B();F(0,`a`,85),H(`click`,function(t){let n=S(e);return C(W().openFullPanel(t,n.tab))}),w(),F(1,`svg`,86),L(2,`rect`,87)(3,`rect`,88)(4,`rect`,89)(5,`rect`,90),I(),K(6,` Open full panel `),I()}e&2&&P(`href`,t.href,bu)}function ove(e,t){if(e&1){let e=B();F(0,`app-settings`,91),H(`layoutChange`,function(t){return S(e),C(W().setTabLayout(t))})(`themeChange`,function(t){return S(e),C(W().setTheme(t))})(`passiveChange`,function(t){return S(e),C(W().setPassive(t))})(`pillChange`,function(t){return S(e),C(W().setPill(t))}),I()}if(e&2){let e=W();P(`tabs`,e.settingsTabs())(`layout`,e.tabLayout())(`theme`,e.themePreference())(`passive`,e.passive())(`pill`,e.pill())(`hotkey`,e.popupHotkey())(`paletteShortcut`,e.paletteShortcut)(`rpc`,e.rpc())}}function sve(e,t){e&1&&L(0,`app-auth-code`,26),e&2&&P(`client`,t)}function cve(e,t){if(e&1){let e=B();F(0,`div`,27)(1,`p`),K(2,` Can't reach the devtools server. Check that the dev server is running. The panel keeps trying to connect. `),I(),F(3,`button`,83),H(`click`,function(){return S(e),C(W().retryConnection())}),K(4,`Retry now`),I()()}}function lve(e,t){e&1&&(F(0,`p`,28),K(1,`Connecting to the devtools server…`),I())}function uve(e,t){e&1&&L(0,`app-coming-soon`,29),e&2&&P(`info`,t)}function dve(e,t){e&1&&(F(0,`p`,28),K(1,`Looking for an Angular Native app…`),I())}function fve(e,t){e&1&&(K(0,` To turn it on, set `),F(1,`code`),K(2),I(),K(3,` in the devtools options. `)),e&2&&(D(2),q(t))}function pve(e,t){if(e&1&&(F(0,`p`,30),K(1,` This inspector is turned off in the devtools config (`),F(2,`code`),K(3,`inspectors`),I(),K(4,`). `),A(5,fve,4,1),F(6,`a`,92),K(7,`About inspectors`),F(8,`span`,93),K(9,` (opens in a new tab)`),I()()()),e&2){let e,t=W();D(5),j((e=t.turnOnSnippet())?5:-1,e),D(),P(`href`,t.inspectorsDocsUrl,bu)}}function mve(e,t){if(e&1){let e=B();F(0,`app-dashboard`,100),H(`navigate`,function(t){return S(e),C(W(3).switchTab(t))}),I()}e&2&&P(`rpc`,W(3).rpc())}function hve(e,t){if(e&1){let e=B();F(0,`app-timeline`,101),H(`open`,function(t){return S(e),C(W(3).openLink(t))}),I()}e&2&&P(`rpc`,W(3).rpc())}function gve(e,t){if(e&1){let e=B();F(0,`app-audit-inspector`,102),H(`showComponent`,function(t){return S(e),C(W(3).showComponent(t))}),I()}if(e&2){let e=W(3);P(`rpc`,e.rpc())(`canShowComponent`,e.config().inspectors.components)}}function _ve(e,t){if(e&1){let e=B();F(0,`app-component-tree`,103),H(`focusHandled`,function(){return S(e),C(W(3).componentFocus.set(null))})(`commandHandled`,function(){return S(e),C(W(3).componentCommand.set(null))})(`showForm`,function(t){return S(e),C(W(3).showForm(t))})(`showInjector`,function(t){return S(e),C(W(3).showInjector(t))})(`showSignals`,function(t){return S(e),C(W(3).showSignals(t))})(`showPipe`,function(t){return S(e),C(W(3).showPipe(t))}),I()}if(e&2){let e=W(3);P(`rpc`,e.rpc())(`focus`,e.componentFocus())(`command`,e.componentCommand())(`canShowInjector`,e.config().inspectors.injectors)(`canShowSignals`,e.config().inspectors.signals)(`canShowPipes`,e.config().inspectors.pipes)}}function vve(e,t){if(e&1){let e=B();F(0,`app-route-inspector`,104),H(`showComponent`,function(t){return S(e),C(W(3).showComponent(t))}),I()}e&2&&P(`rpc`,W(3).rpc())}function yve(e,t){if(e&1&&L(0,`app-signal-inspector`,97),e&2){let e=W(3);P(`rpc`,e.rpc())(`focus`,e.signalFocus())}}function bve(e,t){if(e&1){let e=B();F(0,`app-di-inspector`,105),H(`focusHandled`,function(){return S(e),C(W(3).injectorFocus.set(null))})(`showComponent`,function(t){return S(e),C(W(3).showComponent(t))}),I()}if(e&2){let e=W(3);P(`rpc`,e.rpc())(`focus`,e.injectorFocus())(`canShowComponent`,e.config().inspectors.components)}}function xve(e,t){e&1&&L(0,`app-store-inspector`,94),e&2&&P(`rpc`,W(3).rpc())}function Sve(e,t){e&1&&L(0,`app-query-inspector`,94),e&2&&P(`rpc`,W(3).rpc())}function Cve(e,t){e&1&&L(0,`app-network-inspector`,94),e&2&&P(`rpc`,W(3).rpc())}function wve(e,t){if(e&1){let e=B();F(0,`app-forms-inspector`,106),H(`focusHandled`,function(){return S(e),C(W(3).formFocus.set(null))}),I()}if(e&2){let e=W(3);P(`rpc`,e.rpc())(`focus`,e.formFocus())}}function Tve(e,t){if(e&1){let e=B();F(0,`app-pipes-inspector`,106),H(`focusHandled`,function(){return S(e),C(W(3).pipeFocus.set(null))}),I()}if(e&2){let e=W(3);P(`rpc`,e.rpc())(`focus`,e.pipeFocus())}}function Eve(e,t){e&1&&L(0,`app-analog-inspector`,94),e&2&&P(`rpc`,W(3).rpc())}function Dve(e,t){e&1&&L(0,`app-capacitor-inspector`,94),e&2&&P(`rpc`,W(3).rpc())}function Ove(e,t){e&1&&L(0,`app-plugins-inspector`,94),e&2&&P(`rpc`,W(3).rpc())}function kve(e,t){if(e&1){let e=B();F(0,`app-errors-inspector`,107),H(`showComponent`,function(t){return S(e),C(W(3).showComponent(t))}),I()}if(e&2){let e=W(3);P(`rpc`,e.rpc())(`canShowComponent`,e.config().inspectors.components)(`canExplainInjection`,e.config().inspectors.injectors)}}function Ave(e,t){if(e&1&&A(0,mve,1,1,`app-dashboard`,94)(1,hve,1,1,`app-timeline`,94)(2,gve,1,2,`app-audit-inspector`,95)(3,_ve,1,6,`app-component-tree`,96)(4,vve,1,1,`app-route-inspector`,94)(5,yve,1,2,`app-signal-inspector`,97)(6,bve,1,3,`app-di-inspector`,98)(7,xve,1,1,`app-store-inspector`,94)(8,Sve,1,1,`app-query-inspector`,94)(9,Cve,1,1,`app-network-inspector`,94)(10,wve,1,2,`app-forms-inspector`,97)(11,Tve,1,2,`app-pipes-inspector`,97)(12,Eve,1,1,`app-analog-inspector`,94)(13,Dve,1,1,`app-capacitor-inspector`,94)(14,Ove,1,1,`app-plugins-inspector`,94)(15,kve,1,3,`app-errors-inspector`,99),e&2){let e;j((e=W(2).tab())===`dashboard`?0:e===`timeline`?1:e===`audit`?2:e===`components`?3:e===`routes`?4:e===`signals`?5:e===`injectors`?6:e===`store`?7:e===`queries`?8:e===`network`?9:e===`forms`?10:e===`pipes`?11:e===`analog`?12:e===`capacitor`?13:e===`plugins`?14:e===`errors`?15:-1)}}function jve(e,t){e&1&&M(0,Ave,16,1,null,null,Xh),e&2&&N(R_(0,Y_e,W().scopeKey()))}var Y9=`all`,Mve=[Y9,...XC],Nve={angular:`Angular`,ngrx:`NgRx Store`,analog:`Analog`,"angular-native":`Angular Native`,nativescript:`NativeScript`,capacitor:`Capacitor`},X9={ngrx:`store`,analog:`analog`,capacitor:`capacitor`},Z9={store:`ngrx`,analog:`analog`,capacitor:`capacitor`},Q9={"angular-native":[`components`,`signals`,`injectors`,`store`,`queries`,`pipes`,`errors`]},Pve={id:`nativescript`,name:`NativeScript`,badge:`Available`,heading:`Inspect NativeScript apps`,summary:`A NativeScript Angular app reports from the simulator or device to this server, and its components, signals, injectors and NgRx stores show up in the Angular dock.`,color:`#3c5afd`,plansTitle:`Set up an app`,plans:[`Install @pangular-inspector/devtools and @valor/nativescript-websockets`,`Call initNativeScriptOverlay() in main.ts, before the app bootstraps`,`Run npx pangular dev --no-auth in the app, then open the Angular dock`],link:{label:`NativeScript setup guide`,href:`https://pangular-inspector.dev/getting-started/nativescript/`}},Fve={id:`capacitor`,name:`Capacitor`,badge:`Available`,heading:`Inspect Capacitor apps`,summary:`An Ionic or Capacitor app runs the browser overlay in its WebView and reports to this server, so it shows up in the Angular dock like a browser tab.`,color:`#119eff`,plansTitle:`Set up an app`,plans:[`With live reload on localhost, load @pangular-inspector/devtools/overlay as in a browser`,`In a bundled build, call initOverlay() from @pangular-inspector/devtools/overlay-manual with this server’s address and connectionMeta`,`Run the app, then come back here for its plugin calls, or open the Angular dock`],link:{label:`Capacitor setup guide`,href:`https://pangular-inspector.dev/guides/capacitor/`}},Ive={id:`analog`,name:`Analog`,badge:`Not in this app`,heading:`This app doesn’t use Analog`,summary:`In an Analog app this dock shows your file routes, server load() and API calls, render modes and route lint.`,color:`#dd0330`,plans:[`Which page, layout and .server.ts files render a URL`,`Every load(), server function and API call with timing`,`SSR, prerendered or client only, per page`],link:{label:`Get started with Analog`,href:`https://analogjs.org/docs/getting-started`}},Lve={id:`angular-native`,name:`Angular Native`,badge:`Not connected`,heading:`No Angular Native app is connected`,summary:`Start the overlay in your Angular Native app and run this server with --no-auth. The tabs fill as soon as the app reports.`,color:`#e11d48`,plans:[`The component tree, with the view outlined on the device`,`Signals and injectors of the running app`,`Live @ngrx/signals and @ngrx/store state`],link:{label:`Set up Angular Native`,href:`https://pangular-inspector.dev/getting-started/angular-native/`}},$9=[1e3,2e3,5e3,1e4];function Rve(){let e=new URLSearchParams(location.search).get(`view`);return XC.find(t=>t===e)??null}Ere(class e{analog=T(!1);allTabs=dw.map(({id:e,label:t})=>({id:e,label:t}));view=T(Rve());viewAccent=X(()=>g_e(this.view(),this.themeService.current()));title=X(()=>{let e=this.view();return e?Nve[e]:`Pangular Inspector`});mainLabel=X(()=>this.tab()===`settings`?`Settings`:this.availableTabs().find(e=>e.id===this.tab())?.label??this.title());analogKnown=T(!1);capacitorReporting=T(!1);pluginsReporting=T(!1);capacitorKnown=T(!1);nativePageId=T(null);nativeKnown=T(!1);scopeKey=X(()=>this.view()===`angular-native`?this.nativePageId()??``:``);comingSoon=X(()=>{let e=this.view();if(e===`analog`)return this.analogKnown()&&!this.analog()?Ive:void 0;if(e===`nativescript`)return Pve;if(e===`capacitor`)return this.config().inspectors.capacitor&&this.capacitorKnown()&&!this.capacitorReporting()?Fve:void 0;if(e===`angular-native`)return this.nativeKnown()&&!this.nativePageId()?Lve:void 0});config=X(()=>IT(this.rpc()));tabEnabled=UT;inspectorsDocsUrl=HT;turnOnSnippet=X(()=>{let e=VT(this.tab());return e?`inspectors: {${e}: true}`:null});availableTabs=X(()=>{if(this.comingSoon())return[];let e=this.view(),t=e?X9[e]:void 0,n=this.allTabs.filter(e=>UT(e.id,this.config()));if(t)return n.filter(e=>e.id===t);let r=e?Q9[e]:void 0;return r?n.filter(e=>r.includes(e.id)):n.filter(t=>(t.id!==`analog`||this.analog())&&(t.id!==`capacitor`||this.capacitorReporting())&&(t.id!==`plugins`||this.pluginsReporting())&&!(e===`angular`&&Z9[t.id]))});tabLayout=T(Yme());tabs=X(()=>{let e=this.tab(),t=the(this.availableTabs(),this.tabLayout(),e);return this.rpc()?t:t.filter(t=>t.id===`dashboard`||t.id===e)});settingsTabs=X(()=>this.availableTabs());rovingTab=X(()=>{let e=this.tabs(),t=this.tab();return e.some(e=>e.id===t)?t:e[0]?.id});onNavKey(e){let t=this.nav()?.nativeElement;if(!t||e.altKey||e.ctrlKey||e.metaKey)return;let n=[...t.querySelectorAll(`button`)],r=n.indexOf(document.activeElement);if(r<0)return;let i=n.length-1,a={ArrowRight:r===i?0:r+1,ArrowLeft:r===0?i:r-1,Home:0,End:i},o=Object.hasOwn(a,e.key)?a[e.key]:-1;o<0||(e.preventDefault(),n[o].focus())}fullPanelLink=X(()=>{let e=this.view();if(!e||location.protocol===`chrome-extension:`)return null;let t=this.comingSoon()?`dashboard`:X9[e]??this.tab();return{tab:t,href:phe(location.href,t)}});tab=Q(()=>{let e=this.view();return e&&(X9[e]??Q9[e]?.[0])||`dashboard`});rpc=T(null);openedDock=T(null);connected=T(!1);connectionFailed=T(!1);pairing=T(null);connectedNote=T(``);hiddenPages=T([]);pageId=fT();backgroundNote=X(()=>{let e=this.hiddenPages();return this.pageId?e.includes(this.pageId)?`Page in background, showing the last data.`:``:e.length?e.length===1?`A page is in the background, showing its last data.`:`${e.length} pages are in the background, showing their last data.`:``});stopVisibility=()=>{};stopNative=()=>{};stopCapacitor=()=>{};stopPlugins=()=>{};stopFollowing=()=>{};stopHighlights=()=>{};nav=sv(`nav`);main=sv(`main`);injector=x(_s);themeService=x(she);navObserver;navFade=T({start:!1,end:!1});constructor(){x(Dj).use(this.rpc),td(()=>{let e=this.nav()?.nativeElement;e&&typeof ResizeObserver<`u`&&(this.navObserver=new ResizeObserver(()=>this.measureNav()),this.navObserver.observe(e))}),mv(()=>{this.tab(),this.tabs(),Z(()=>{this.revealActiveTab(),this.measureNav()})}),E(()=>{this.connected()&&Z(()=>this.postToPopup({type:`pangular:popup-pill`,pill:this.pill()}))}),E(()=>{let e=this.openedDock(),t=this.rpc();e&&t&&Z(()=>void vT(t,`hub-dock-seen`,ZC(e.dock)))}),E(()=>{let e=this.themeService.current();Z(()=>{try{window.parent!==window&&V5(window.parent.document,e)}catch{}})})}measureNav(){let e=this.nav()?.nativeElement;if(!e)return;let t=e.scrollWidth-e.clientWidth,n=e.scrollLeft>1,r=t>1&&e.scrollLeftn?e.scrollLeft=Math.max(0,n):e.scrollLeft{this.openedDock.set({dock:e}),e===Y9?this.showFullPanel():this.showView(e)});let e=i7(location.hash,a7(this.tabScope()),[...this.availableTabs().map(e=>e.id),`settings`]);e?(this.tab.set(e),this.restoreLinkItem()):!this.view()&&i7(location.hash,a7(this.tabScope()),[`capacitor`])===`capacitor`?this.restoreCapacitor=!0:!this.view()&&i7(location.hash,a7(this.tabScope()),[`analog`])===`analog`&&(this.restoreAnalog=!0),this.stopHighlights=bT(()=>this.rpc()),this.connect()}connecting=!1;pendingClient=null;retries=0;retryTimer;connect(){if(this.connecting||this.pendingClient||this.rpc()||this.pairing())return;this.connecting=!0,clearTimeout(this.retryTimer);let e=vhe();this.dropped&&xT();let t=Che(e);JC({...e?{baseURL:e}:{},...t.token?{authToken:t.token}:{},cacheOptions:gT(),simpleAuth:!1}).then(e=>{if(this.connecting=!1,this.destroyed){e.close?.();return}this.pendingClient=e;let n=n=>{if(e===this.pendingClient||e===this.rpc()||e===this.pairing()){if(this.pendingClient===e&&n!==`connecting`&&(this.pendingClient=null),n===`connected`){let n=this.pairing()===e;this.pairing.set(null),setTimeout(()=>t.remember(e.connection?.authToken)),this.ready(e),this.connected.set(this.rpc()===e),n&&(this.connectedNote.update(e=>e===`Connected.`?`Connected.\xA0`:`Connected.`),this.focusCurrentTab())}else n===`unauthorized`?(this.connected.set(!1),this.rpc()===e&&this.rpc.set(null),this.pairing.set(e)):(n===`disconnected`||n===`error`)&&(this.connected.set(!1),this.rpc()===e&&this.rpc.set(null),this.pairing()===e&&this.pairing.set(null),e.close?.(),this.retryLater())}};e.events.on(`connection:status`,n),e.status!==`connecting`&&n(e.status)},()=>{this.connecting=!1,!this.destroyed&&(this.analogKnown.set(!0),this.nativeKnown.set(!0),this.retryLater())})}ready(e){this.rpc()===e||this.destroyed||(this.retries=0,this.connectionFailed.set(!1),this.refocusOnConnect&&this.focusCurrentTab(),this.refocusOnConnect=!1,this.rpc.set(e),this.listenForServer(e),this.watchVisibility(e),this.watchAngularNative(e),this.watchCapacitor(e),this.watchPlugins(e),e.scope(`pangular`).rpc.call(`analog-project`).then(e=>{let t=!!e?.analog;this.analog.set(t),this.analogKnown.set(!0),t&&this.restoreAnalog&&UT(`analog`,this.config())&&this.tab.set(`analog`),this.restoreAnalog=!1,!t&&this.tab()===`analog`&&!this.view()&&this.tab.set(`dashboard`)},()=>{this.analogKnown.set(!0),this.restoreAnalog=!1,this.tab()===`analog`&&!this.view()&&this.tab.set(`dashboard`)}))}dropped=!1;retryLater(){if(this.destroyed)return;this.dropped=!0,this.connectionFailed.set(!0);let e=$9[Math.min(this.retries++,$9.length-1)];clearTimeout(this.retryTimer),this.retryTimer=setTimeout(()=>this.connect(),e)}retryConnection(){this.retries=0,this.refocusOnConnect=!0,this.connect()}refocusOnConnect=!1;destroyed=!1;ngOnDestroy(){this.destroyed=!0,clearTimeout(this.retryTimer),this.stopNative(),this.stopCapacitor(),this.stopPlugins(),this.stopFollowing(),this.stopVisibility(),this.stopHighlights(),this.navObserver?.disconnect()}showView(e){if(e===this.view())return;dT(e===`angular-native`?this.nativePageId():null),this.view.set(e);let t=new URL(location.href);t.searchParams.set(`view`,e),t.hash=``,history.replaceState(history.state,``,t)}showFullPanel(e){if(!this.view())return;dT(null),this.view.set(null);let t=new URL(location.href);t.searchParams.delete(`view`),t.hash=e?`tab=${e}`:``,history.replaceState(history.state,``,t);let n=e??a7(this.tabScope()),r=this.availableTabs().map(e=>e.id),i=i7(t.hash,n,r);i?this.setTab(i):n===`capacitor`&&(this.restoreCapacitor=!0)}openFullPanel(e,t){mhe(e)&&t7()&&(e.preventDefault(),this.showFullPanel(t),this.focusCurrentTab(),n7(Y9))}paletteOpen=T(!1);paletteShortcut=Y5()?`⌘K`:`Ctrl+K`;themePreference=X(()=>this.themeService.preference());passive=T(Zme());pill=T($me());popupHotkey=X(()=>{let e=this.config().popup.hotkey;return e!==!1&&uw(e,Y5())});popup=ihe();poppedOut=!!X5();tabBeforeSettings=null;componentCommand=Q({source:this.tab,computation:()=>null});paletteCommands=X(()=>{let e=new Set(this.availableTabs().map(e=>e.id)),t=e.has(`components`)&&!!this.rpc();return yw(this.config()).filter(n=>n.id.startsWith(`tab:`)?e.has(n.id.slice(4)):n.id===`popout:return`?this.poppedOut:n.popupOnly?this.popup:n.id===`pick-component`||n.id.startsWith(`cd-`)?t:!0)});onGlobalKey(e){if(e.defaultPrevented)return;let t=Y5(),n=this.config().popup.hotkey;if(this.popup&&n&&!e.repeat&&lw(e,n,t)){e.preventDefault(),this.postToPopup({type:`pangular:popup-close`});return}!(t?e.metaKey&&!e.ctrlKey:e.ctrlKey&&!e.metaKey)||e.altKey||e.shiftKey||e.key.toLowerCase()!==`k`||e.repeat||(e.preventDefault(),!this.paletteOpen()&&this.openPalette())}openPalette(){t7()&&fhe()||this.paletteOpen.set(!0)}runCommand(e){if(e.startsWith(`tab:`)){let t=e.slice(4);this.availableTabs().some(e=>e.id===t)&&this.switchTab(t);return}if(e.startsWith(`theme:`)){let t=e.slice(6);(t===`system`||t===`light`||t===`dark`)&&this.setTheme(t);return}if(e===`dock:reset-size`){this.postToPopup({type:`pangular:popup-dock-size`});return}if(e.startsWith(`dock:`)){this.postToPopup({type:`pangular:popup-dock`,mode:e.slice(5)});return}if(e===`popout`){this.postToPopup({type:`pangular:popup-popout`});return}if(e===`popout:return`){ohe();return}let t={"pick-component":`pick`,"cd-record-start":`cd-start`,"cd-record-stop":`cd-stop`,"cd-clear":`cd-clear`};e===`settings`?this.tab()!==`settings`&&this.toggleSettings():t[e]&&this.availableTabs().some(e=>e.id===`components`)&&(this.tab()!==`components`&&this.switchTab(`components`),this.componentCommand.set({kind:t[e]}))}toggleSettings(){if(this.tab()===`settings`){let e=this.tabBeforeSettings,t=this.availableTabs().map(e=>e.id);this.switchTab(e&&t.includes(e)?e:t[0]??`dashboard`);return}this.tabBeforeSettings=this.tab(),this.switchTab(`settings`)}setTabLayout(e){this.tabLayout.set(e),Xme(e)}setTheme(e){this.themeService.setPreference(e)}setPassive(e){this.passive.set(e),Qme(e),this.postToPopup({type:`pangular:popup-passive`,passive:e})}setPill(e){this.pill.set(e),ehe(e),this.postToPopup({type:`pangular:popup-pill`,pill:e})}postToPopup(e){for(let{win:t,origin:n}of Q5())try{t.postMessage(e,n)}catch{}}openLink(e){let t=e.tab;if(!this.availableTabs().some(e=>e.id===t))return!1;if(this.tab()!==t&&this.switchTab(t),e.id&&Object.hasOwn(mw,t)){let n=e.page;t===`components`?this.componentFocus.set({id:e.id,pageId:n}):t===`injectors`?this.injectorFocus.set({componentId:e.id,pageId:n}):t===`signals`?this.signalFocus.set({componentId:e.id,pageId:n}):t===`forms`&&this.formFocus.set({id:e.id})}return history.replaceState(history.state,``,gw(e)),!0}followHash(){let e=_w(location.hash);if(e){if(e.tab===`settings`){this.tab()!==`settings`&&this.toggleSettings();return}this.openLink(e)}}listenForServer(e){let t=e.scope(`pangular`).rpc,n=()=>typeof document>`u`||document.visibilityState!==`hidden`;try{t.register({name:`panel-command`,type:`event`,jsonSerializable:!0,handler:e=>{let t=e?.command;typeof t==`string`&&n()&&this.runCommand(t)}}),t.register({name:`open-in-panel`,type:`event`,jsonSerializable:!0,handler:e=>{let t=e;n()&&typeof t?.tab==`string`&&this.openLink({tab:t.tab,...typeof t.id==`string`?{id:t.id}:{},...typeof t.page==`string`?{page:t.page}:{}})}})}catch{}}restoreLinkItem(){let e=_w(location.hash);if(!e?.id||e.tab!==this.tab())return;let t=e.tab;t===`components`?this.componentFocus.set({id:e.id,pageId:e.page}):t===`injectors`?this.injectorFocus.set({componentId:e.id,pageId:e.page}):t===`signals`?this.signalFocus.set({componentId:e.id,pageId:e.page}):t===`forms`&&this.formFocus.set({id:e.id})}formFocus=T(null);componentFocus=Q({source:this.tab,computation:()=>null});pipeFocus=Q({source:this.tab,computation:()=>null});showPipe(e){this.config().inspectors.pipes&&(this.switchTab(`pipes`),this.pipeFocus.set(e))}showForm(e){this.formFocus.set({id:e}),this.switchTab(`forms`)}injectorFocus=Q({source:this.tab,computation:()=>null});signalFocus=Q({source:this.tab,computation:()=>null});showSignals(e){if(!this.config().inspectors.signals)return;let t=e.pageId?{page:e.pageId}:{};this.openLink({tab:`signals`,id:e.componentId,...t})&&this.signalFocus.set(e)}showInjector(e){this.config().inspectors.injectors&&(this.switchTab(`injectors`),this.injectorFocus.set(e))}showComponent(e){this.config().inspectors.components&&(this.switchTab(`components`),this.componentFocus.set(e))}inspectFromPanel({source:e,origin:t,data:n}){if(e!==window.parent||t!==location.origin)return;let r=n;r?.type===`pangular:inspect-component`&&typeof r.id==`string`&&this.tab()===`components`&&this.config().inspectors.components&&this.componentFocus.set({id:r.id})}switchTab(e){let t=Z9[e];if(this.view()===`angular`&&t){this.activateDock(t,e);return}this.setTab(e),history.replaceState(history.state,``,`#tab=${e}`)}restoreAnalog=!1;restoreCapacitor=!1;setTab(e){this.restoreAnalog=!1,this.restoreCapacitor=!1,this.keepFocus(),this.tab.set(e),hhe(this.tabScope(),e)}tabScope(){return this.view()??`panel`}async watchAngularNative(e){try{let t=await e.scope(`pangular`).rpc.sharedState(`component-tree`),n=e=>{let t=e?.pages,n=CD(t,this.nativePageId());this.view()===`angular-native`&&dT(n),this.nativePageId.set(n),this.nativeKnown.set(!0)};n(t.value()),this.stopNative(),this.stopNative=t.on(`updated`,n)}catch{this.nativeKnown.set(!0)}}async watchPlugins(e){let t=!this.view()&&i7(location.hash,a7(this.tabScope()),[`plugins`])===`plugins`;try{let n=await e.scope(`pangular`).rpc.sharedState(`plugins`),r=e=>{if(e===void 0)return;let n=rpe(e);this.pluginsReporting.set(n),n&&t&&UT(`plugins`,this.config())&&this.tab.set(`plugins`),n&&(t=!1),!n&&this.tab()===`plugins`&&!this.view()&&this.tab.set(`dashboard`)};r(n.value()),this.stopPlugins(),this.stopPlugins=n.on(`updated`,r)}catch{this.pluginsReporting.set(!1)}}async watchCapacitor(e){try{let t=await e.scope(`pangular`).rpc.sharedState(`capacitor`),n=e=>{if(e===void 0)return;let t=Q8(e).length>0;this.capacitorReporting.set(t),this.capacitorKnown.set(!0),t&&this.restoreCapacitor&&UT(`capacitor`,this.config())&&(this.restoreCapacitor=!1,this.tab.set(`capacitor`)),!t&&this.tab()===`capacitor`&&!this.view()&&this.tab.set(`dashboard`)};n(t.value()),this.stopCapacitor(),this.stopCapacitor=t.on(`updated`,n)}catch{this.capacitorReporting.set(!1),this.capacitorKnown.set(!0)}}async watchVisibility(e){try{let t=await e.scope(`pangular`).rpc.sharedState(`page-visibility`),n=e=>{let t=e?.hidden;this.hiddenPages.set(Array.isArray(t)?t.filter(e=>typeof e==`string`):[])};n(t.value()),this.stopVisibility(),this.stopVisibility=t.on(`updated`,n)}catch{}}keepFocus(){let e=document.activeElement,t=this.main()?.nativeElement;(!e||e===document.body||t?.contains(e))&&this.focusCurrentTab()}focusCurrentTab(){td(()=>{let e=document.activeElement;e&&e!==document.body||(this.nav()?.nativeElement.querySelector(`button.active`)??this.main()?.nativeElement)?.focus()},{injector:this.injector})}async activateDock(e,t){if(await n7(e))return;if(window.parent===window){this.keepFocus(),this.showView(e);return}let n=this.rpc();if(!n?.call){this.setTab(t);return}try{await n.call(`hub:docks:activate`,{dockId:ZC(e)}),this.keepFocus(),this.showView(e)}catch{this.setTab(t)}}static ɵfac=function(t){return new(t||e)};static ɵcmp=O({type:e,selectors:[[`app-root`]],viewQuery:function(e,t){e&1&&Og(t.nav,q_e,5)(t.main,J_e,5),e&2&&kg(2)},hostVars:4,hostBindings:function(e,t){e&1&&H(`message`,function(e){return t.inspectFromPanel(e)},xu)(`hashchange`,function(){return t.followHash()},xu)(`keydown`,function(e){return t.onGlobalKey(e)},Su),e&2&&Zg(`--%NS%accent`,t.viewAccent()?.accent??null)(`--%NS%accent-text`,t.viewAccent()?.text??null)},decls:41,vars:30,consts:[[`nav`,``],[`main`,``],[1,`brand`],[1,`mark`],[`width`,`22`,`height`,`22`,`viewBox`,`0 0 256 256`,`aria-hidden`,`true`],[`width`,`22`,`height`,`22`,`viewBox`,`0 0 32 32`,`aria-hidden`,`true`],[`width`,`24`,`height`,`17`,`viewBox`,`0 0 256 182`,`aria-hidden`,`true`],[`width`,`22`,`height`,`22`,`viewBox`,`0 0 24 24`,`fill`,`currentColor`,`aria-hidden`,`true`],[`width`,`20`,`height`,`22`,`viewBox`,`0 0 223 236`,`aria-hidden`,`true`],[`width`,`30`,`height`,`30`,`viewBox`,`0 0 500 500`,`aria-hidden`,`true`],[1,`title`],[`aria-label`,`Inspectors`,3,`scroll`,`keydown`],[`role`,`toolbar`,`aria-label`,`Inspectors`,`aria-orientation`,`horizontal`,1,`tab-bar`],[1,`full-panel`,3,`href`],[1,`shell-actions`],[`type`,`button`,`aria-haspopup`,`dialog`,1,`shell-btn`,3,`click`],[`width`,`16`,`height`,`16`,`viewBox`,`0 0 24 24`,`aria-hidden`,`true`],[`d`,`M18 3a3 3 0 0 0-3 3v12a3 3 0 0 0 3 3 3 3 0 0 0 3-3 3 3 0 0 0-3-3H6a3 3 0 0 0-3 3 3 3 0 0 0 3 3 3 3 0 0 0 3-3V6a3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3h12a3 3 0 0 0 3-3 3 3 0 0 0-3-3z`],[`type`,`button`,`aria-label`,`Settings`,`title`,`Settings`,1,`shell-btn`,3,`click`],[`name`,`settings`],[`role`,`status`,1,`status`],[`aria-hidden`,`true`,1,`dot`],[`tabindex`,`0`],[`role`,`status`,1,`background-note`],[`role`,`status`,1,`sr-only`],[3,`tabs`,`layout`,`theme`,`passive`,`pill`,`hotkey`,`paletteShortcut`,`rpc`],[3,`client`],[`role`,`alert`,1,`connection-error`],[`role`,`status`,1,`turned-off`],[3,`info`],[1,`turned-off`],[3,`openChange`,`picked`,`commands`,`open`],[`fill`,`#3c5afd`,`d`,`M237.248 18.752q18.061 18.06 18.748 45.247V192c-.457 18.12-6.707 33.207-18.748 45.247c-12.04 12.04-27.127 18.291-45.251 18.752H63.999q-27.187-.69-45.247-18.752C6.712 225.208.46 210.121 0 192.001V64q.69-27.187 18.752-45.247Q36.812.692 63.999 0h127.998c18.124.46 33.211 6.711 45.251 18.752m-17.655 103q-6.033-6.003-6.28-15.066V64q-.192-9.063-6.221-15.091c-4.02-4.023-9.054-6.093-15.095-6.22h-21.312v106.626L85.315 42.687H63.999c-6.042.128-11.072 2.198-15.091 6.221c-4.023 4.02-6.093 9.05-6.22 15.09v42.688q-.249 9.063-6.281 15.066q-6.03 5.996-15.091 6.246q9.062.255 15.09 6.25c4.024 4.002 6.115 9.024 6.281 15.066V192c.128 6.037 2.198 11.072 6.221 15.091q6.03 6.03 15.09 6.22h21.317V106.687l85.37 106.627h21.312c6.041-.128 11.076-2.202 15.095-6.221s6.093-9.054 6.22-15.09v-42.688q.249-9.063 6.281-15.066q6.03-5.995 15.091-6.25q-9.062-.25-15.09-6.246`],[`fill`,`#53b9ff`,`d`,`M39.863 54.115L.311 93.716l60.995 61.179L0 216.385l39.428 39.619l61.43-61.507l61.097 61.068l39.552-39.602z`],[`fill`,`#119eff`,`d`,`m140.517 154.896l-39.658 39.601l61.097 61.069l39.552-39.602z`],[`fill-opacity`,`.2`,`d`,`m140.517 154.896l-39.658 39.601l15.267 15.182z`],[`fill`,`#53b9ff`,`d`,`M194.57 100.985L256 39.478L216.431 0l-61.412 61.384L93.917.311L54.365 39.913L216.01 201.761l39.552-39.602z`],[`fill`,`#119eff`,`d`,`m115.36 100.987l39.659-39.602L93.917.313L54.365 39.914z`],[`fill-opacity`,`.2`,`d`,`m115.359 100.985l39.659-39.601l-15.271-15.186z`],[`id`,`an-mark-grad`,`x1`,`0`,`y1`,`0`,`x2`,`1`,`y2`,`1`],[`offset`,`0`,`stop-color`,`#f0224f`],[`offset`,`1`,`stop-color`,`#c4002d`],[`d`,`M16 0C27.2 0 32 4.8 32 16S27.2 32 16 32 0 27.2 0 16 4.8 0 16 0Z`,`fill`,`url(#an-mark-grad)`],[`transform`,`translate(6.4 6.4) scale(0.8)`,`fill`,`#fff`],[`d`,`M14.8486 0L23.138 16.8551L23.9996 3.99892L14.8486 0Z`],[`d`,`M16.9875 17.7114H7.01272L5.73926 20.627L12.0001 24L18.261 20.627L16.9875 17.7114Z`],[`d`,`M8.72168 13.9298H15.2812L11.9997 6.39575L8.72168 13.9298Z`],[`d`,`M9.15103 0L0 3.99892L0.861556 16.8551L9.15103 0Z`],[`fill`,`#c30f2e`,`d`,`M152.228.001L48.455 181.046H256L152.228 0z`],[`fill`,`#dd0330`,`d`,`M88.314 26.967L0 181.52h176.628L88.315 26.967z`],[`fill`,`#fff`,`d`,`M18.167 135.294h220.236v-2.419H18.167z`],[`fill`,`#fff`,`d`,`M204.38 170.667c-.861 0-1.67-.358-2.348-1.034c-4.045-4.063-4.221-20.586-4.026-45.33c.11-13.521.257-32.043-1.9-33.504c-2.104.873-2.315 16.172-2.451 26.301c-.162 11.785-.327 23.98-2.242 30.189c-.57 1.84-1.306 3.525-2.786 3.39c-2.086-.185-2.76-3.48-4.317-16.478c-.647-5.4-1.317-10.98-2.101-13.14a11 11 0 0 0-.269-.66c-.835 1.889-1.8 7.079-2.47 10.682c-.927 4.976-1.803 9.676-2.9 11.726c-.847 1.575-2.19 3.63-4.067 3.231c-2.558-.537-3.323-5.693-3.552-8.719c0-25.455-3.33-28.417-3.997-28.753l-.107.081l-.162-.036c-2.377 1.038-2.506 9.294-2.627 17.276c-.096 5.856-.198 12.492-1.053 18.701c-1.108 8.05-2.448 9.603-4.115 9.507c-3.838-.262-3.95-13.482-3.95-14.987c0-.472.012-1.028.027-1.642c.074-3.076.205-8.8-1.687-10.604c-.25-.239-.603-.515-.879-.437c-1.347.339-2.745 4.714-3.209 6.153c-.147.457-.265.833-.364 1.09c-.078.214-.177.515-.294.88c-1.02 3.095-2.18 6.183-4.16 6.944c-.732.284-1.498.222-2.216-.183c-.953-.541-1.73-1.646-2.455-3.482c-.397-1.016-.735-2.046-1.082-3.081c-.419-1.263-.85-2.569-1.384-3.808c-.419-.965-1.464-1.4-2.796-1.164c-2.768.494-3.232 3.29-3.622 7.5c-.07.733-.137 1.452-.228 2.128c-.011.198-.501 6.38-.814 8.344c-.865 5.39-2.002 7.512-3.89 7.358c-4.66-.398-6.798-20.836-6.684-29.47c.088-6.592-1.104-9-1.818-9.382c-.074-.034-.189-.096-.46.095c-.843.571-1.594 2.348-1.363 4.215c2.566 20.32.674 43.592-3.96 48.833c-1.46 1.649-3.448 1.627-4.832.236c-4.049-4.064-4.218-20.586-4.026-45.33c.11-13.521.254-32.043-1.9-33.504c-2.105.873-2.311 16.172-2.45 26.301c-.163 11.785-.329 23.98-2.246 30.189c-.57 1.84-1.307 3.525-2.782 3.39c-2.091-.186-2.761-3.48-4.321-16.478c-.649-5.4-1.319-10.98-2.101-13.14c-.1-.273-.189-.49-.27-.66c-.832 1.889-1.796 7.079-2.466 10.682c-.927 4.976-1.803 9.676-2.904 11.726c-.846 1.575-2.19 3.63-4.063 3.231c-2.558-.537-3.324-5.693-3.552-8.719c-.003-25.455-3.33-28.417-3.997-28.753l-.106.081l-.166-.036c-2.374 1.038-2.503 9.293-2.629 17.276c-.091 5.856-.194 12.492-1.048 18.701c-1.107 8.05-2.437 9.618-4.111 9.507c-3.846-.262-3.958-13.482-3.958-14.987c0-.472.016-1.028.03-1.642c.074-3.076.207-8.8-1.685-10.604c-.25-.239-.603-.515-.88-.438c-1.347.34-2.75 4.715-3.206 6.155a47 47 0 0 1-.364 1.09q-.16.432-.298.875c-1.02 3.096-2.18 6.187-4.155 6.95c-.736.282-1.506.22-2.22-.185c-.953-.541-1.734-1.646-2.454-3.482c-.398-1.016-.74-2.046-1.083-3.081c-.42-1.263-.854-2.569-1.387-3.808c-.416-.965-1.465-1.4-2.797-1.164c-3.188.567-3.943 4.52-4.55 9.238l-.106.839l-2.411-.32l.114-.824c.527-4.137 1.328-10.39 6.53-11.31c2.446-.435 4.585.581 5.446 2.583c.578 1.34 1.031 2.695 1.466 4.008c.324.99.654 1.98 1.037 2.959c.674 1.708 1.197 2.15 1.392 2.257c1.218-.38 2.462-4.167 2.873-5.414c.13-.402.24-.732.328-.968c.085-.233.195-.571.328-.98c1.097-3.43 2.474-7.144 4.918-7.762c.747-.191 1.903-.166 3.157 1.035c2.665 2.544 2.525 8.48 2.433 12.41c-.014.59-.028 1.126-.028 1.583c0 6.272.93 10.655 1.64 12.16c.367-.77.998-2.63 1.598-7.007c.831-6.066.938-12.624 1.027-18.41c.161-10.24.275-17.663 3.982-19.408c.552-.339 1.469-.522 2.436-.033c3.586 1.803 5.326 11.885 5.326 30.817c.225 2.926 1.013 6.006 1.66 6.448c.004-.066.53-.39 1.394-2.01c.925-1.718 1.845-6.665 2.655-11.026c1.792-9.614 2.606-12.989 4.726-13.166c1.615-.158 2.362 1.896 2.676 2.76c.883 2.422 1.537 7.888 2.23 13.678c.54 4.49 1.31 10.902 2.094 13.497c.084-.228.18-.5.283-.836c1.815-5.878 1.98-17.887 2.14-29.507c.22-16.14.503-26.139 3.448-28.226a2.44 2.44 0 0 1 2.233-.316c3.448 1.144 3.714 11.254 3.519 35.8c-.14 17.799-.313 39.952 3.323 43.603c.317.32.542.32.622.32c.17 0 .413-.161.67-.452c3.681-4.162 6.01-26.022 3.372-46.927c-.328-2.602.677-5.337 2.392-6.514c.946-.652 2.036-.736 2.978-.232c2.145 1.14 3.187 5.024 3.102 11.546c-.15 11.387 2.584 24.714 4.37 26.842c.282-.471.842-1.763 1.379-5.145c.301-1.87.799-8.153.806-8.216c.09-.71.155-1.398.217-2.097c.369-3.924.82-8.804 5.613-9.654c2.444-.435 4.583.577 5.448 2.583c.577 1.34 1.027 2.695 1.46 4.008c.332.99.664 1.98 1.046 2.959c.67 1.708 1.197 2.15 1.387 2.257c1.218-.38 2.467-4.167 2.875-5.41c.132-.402.243-.737.328-.973c.088-.228.195-.57.324-.979c1.1-3.43 2.477-7.144 4.924-7.762c.74-.191 1.9-.166 3.154 1.035c2.665 2.543 2.526 8.48 2.437 12.41q-.029.792-.033 1.583c0 6.272.931 10.655 1.641 12.16c.365-.77.994-2.63 1.601-7.007c.832-6.066.931-12.624 1.027-18.41c.159-10.24.273-17.663 3.98-19.408c.55-.339 1.467-.522 2.44-.033c3.58 1.803 5.325 11.884 5.325 30.817c.224 2.926 1.012 6.006 1.656 6.448c.008-.066.526-.39 1.399-2.01c.923-1.718 1.84-6.665 2.653-11.026c1.786-9.614 2.602-12.989 4.722-13.166c1.62-.158 2.367 1.896 2.68 2.76c.88 2.422 1.535 7.888 2.233 13.678c.534 4.49 1.304 10.902 2.092 13.497c.08-.228.176-.5.28-.836c1.813-5.878 1.976-17.887 2.138-29.507c.216-16.14.504-26.139 3.448-28.226a2.45 2.45 0 0 1 2.234-.316c3.452 1.144 3.718 11.254 3.52 35.8c-.141 17.799-.314 39.952 3.319 43.603c.324.32.544.32.63.32c.165 0 .408-.161.662-.452c3.687-4.162 6.014-26.022 3.375-46.927c-.342-2.723.43-5.47 1.84-6.526c.71-.537 1.575-.647 2.37-.313c2.054.877 3.445 4.63 4.255 11.484c.339 2.87.641 5.974.931 9.036c.641 6.683 1.509 15.69 2.684 17.67c.36-.46 1.096-1.704 2.19-5.038l2.307.753c-1.696 5.157-3.026 7.1-4.755 6.902c-2.69-.299-3.468-5.734-4.84-20.055c-.29-3.048-.59-6.132-.928-8.989c-1.03-8.74-2.782-9.532-2.801-9.54c-.342.174-1.137 1.992-.842 4.31c2.558 20.32.673 43.597-3.964 48.834c-.747.842-1.587 1.27-2.485 1.27`],[`d`,`M12.024.017V0L12 .008L11.976 0v.017L.812 3.892l1.605 14.875l9.559 5.207V24l.024-.013l.024.013v-.026l9.559-5.207l1.605-14.875zm6.868 14.244q-1.64 3.948-6.031 4.166c-2.829 0-4.661-1.7-4.66-1.7q-1.745-1.359-2.398-3.417c-.695-.76-.702-.841-.774-1.145c-.072-.303.045-.388.249-.685q.204-.298.098-.85q-.26-.36-.3-1.128q0-.37.496-.783q.495-.413.607-.632q.083-.119.065-1.031q-.006-.897.995-.975c1-.08 1.565-.832 1.879-1.174c.21-.228.52-.339.91-.341c.551-.026 1.052.185 1.484.62c1.075-.055 2.176.235 3.292.863q2.379 1.414 2.596 3.055q-.257 2.158-5.788-.113q-2.895.819-2.846 3.552q0 2.508 2.422 3.643c-.787-.772-1.122-1.422-1.01-1.959q2.456 2.906 5.588 2.173c-.92.032-1.65-.264-2.198-.893q2.116-.05 3.998-1.972c-.724.576-1.482.794-2.284.657q3.26-2.563 2.307-5.98l-.002-.006a3.02 3.02 0 0 1 .788 2.03q.023 1.175-.795 2.477q.613-.478 1.413-2.047c.23 2.117-.625 3.724-2.574 4.825q.934-.085 2.473-1.23m-5.567-6.63a.319.319 0 1 1 .638 0a.319.319 0 0 1-.638 0`],[`id`,`ng-grad`,`x1`,`49`,`x2`,`226`,`y1`,`214`,`y2`,`130`,`gradientUnits`,`userSpaceOnUse`],[`stop-color`,`#E40035`],[`offset`,`.24`,`stop-color`,`#F60A48`],[`offset`,`.352`,`stop-color`,`#F20755`],[`offset`,`.494`,`stop-color`,`#DC087D`],[`offset`,`.745`,`stop-color`,`#9717E7`],[`offset`,`1`,`stop-color`,`#6C00F5`],[`fill`,`url(#ng-grad)`,`d`,`m222.077 39.192-8.019 125.923L137.387 0l84.69 39.192Zm-53.105 162.825-57.933 33.056-57.934-33.056 11.783-28.556h92.301l11.783 28.556ZM111.039 62.675l30.357 73.803H80.681l30.358-73.803ZM7.937 165.115 0 39.192 84.69 0 7.937 165.115Z`],[`width`,`500`,`height`,`500`,`rx`,`112`,`fill`,`#1c1a17`],[`transform`,`translate(250 252) scale(1.38) translate(-120 -129)`],[`id`,`pi-mark-mask`],[`x`,`-60`,`y`,`-60`,`width`,`360`,`height`,`380`,`fill`,`#fff`],[`fill`,`none`,`stroke`,`#000`,`stroke-width`,`30`,`stroke-linejoin`,`miter`],[`d`,`M88 66 V196`],[`d`,`M88 66 H143 L170 98 L143 130 H88 Z`],[`id`,`pi-mark-clip`],[`x`,`-40`,`y`,`129`,`width`,`320`,`height`,`200`],[`transform`,`rotate(-10 120 129)`],[`cx`,`120`,`cy`,`129`,`rx`,`128`,`ry`,`34`,`fill`,`none`,`stroke`,`#78350f`,`stroke-width`,`10`],[`mask`,`url(#pi-mark-mask)`],[`fill`,`#fbbf24`,`d`,`M120 5 L2 46 L22 198 L120 253 Z`],[`fill`,`#f59e0b`,`d`,`M120 5 L238 46 L218 198 L120 253 Z`],[`clip-path`,`url(#pi-mark-clip)`,`cx`,`120`,`cy`,`129`,`rx`,`128`,`ry`,`34`,`fill`,`none`,`stroke`,`#1c1a17`,`stroke-width`,`22`],[`clip-path`,`url(#pi-mark-clip)`,`cx`,`120`,`cy`,`129`,`rx`,`128`,`ry`,`34`,`fill`,`none`,`stroke`,`#fde68a`,`stroke-width`,`10`],[`transform`,`translate(230.9 146.0) rotate(10) scale(1.5) translate(-4 -4)`],[`x1`,`9`,`y1`,`9`,`x2`,`21`,`y2`,`21`,`stroke`,`#1c1a17`,`stroke-width`,`14`,`stroke-linecap`,`round`],[`r`,`16`,`fill`,`#1c1a17`],[`x1`,`9`,`y1`,`9`,`x2`,`21`,`y2`,`21`,`stroke`,`#fde68a`,`stroke-width`,`7`,`stroke-linecap`,`round`],[`r`,`12`,`fill`,`#1c1a17`,`stroke`,`#fde68a`,`stroke-width`,`5`],[`type`,`button`,3,`active`],[`type`,`button`,3,`click`],[3,`name`],[1,`full-panel`,3,`click`,`href`],[`width`,`14`,`height`,`14`,`viewBox`,`0 0 24 24`,`aria-hidden`,`true`],[`x`,`3`,`y`,`3`,`width`,`7`,`height`,`7`,`rx`,`1.5`],[`x`,`14`,`y`,`3`,`width`,`7`,`height`,`7`,`rx`,`1.5`],[`x`,`3`,`y`,`14`,`width`,`7`,`height`,`7`,`rx`,`1.5`],[`x`,`14`,`y`,`14`,`width`,`7`,`height`,`7`,`rx`,`1.5`],[3,`layoutChange`,`themeChange`,`passiveChange`,`pillChange`,`tabs`,`layout`,`theme`,`passive`,`pill`,`hotkey`,`paletteShortcut`,`rpc`],[`target`,`_blank`,`rel`,`noopener noreferrer`,3,`href`],[1,`sr-only`],[3,`rpc`],[3,`rpc`,`canShowComponent`],[3,`rpc`,`focus`,`command`,`canShowInjector`,`canShowSignals`,`canShowPipes`],[3,`rpc`,`focus`],[3,`rpc`,`focus`,`canShowComponent`],[3,`rpc`,`canShowComponent`,`canExplainInjection`],[3,`navigate`,`rpc`],[3,`open`,`rpc`],[3,`showComponent`,`rpc`,`canShowComponent`],[3,`focusHandled`,`commandHandled`,`showForm`,`showInjector`,`showSignals`,`showPipe`,`rpc`,`focus`,`command`,`canShowInjector`,`canShowSignals`,`canShowPipes`],[3,`showComponent`,`rpc`],[3,`focusHandled`,`showComponent`,`rpc`,`focus`,`canShowComponent`],[3,`focusHandled`,`rpc`,`focus`],[3,`showComponent`,`rpc`,`canShowComponent`,`canExplainInjection`]],template:function(e,t){if(e&1){let e=B();F(0,`header`)(1,`h1`,2)(2,`span`,3),A(3,Z_e,2,0,`:svg:svg`,4)(4,Q_e,7,0,`:svg:svg`,4)(5,$_e,11,0,`:svg:svg`,5)(6,eve,5,0,`:svg:svg`,6)(7,J9,2,0,`:svg:svg`,7)(8,tve,10,0,`:svg:svg`,8)(9,nve,24,0,`:svg:svg`,9),I(),F(10,`span`,10),K(11),I()(),F(12,`nav`,11,0),H(`scroll`,function(){return t.measureNav()})(`keydown`,function(e){return t.onNavKey(e)}),A(14,ive,3,0,`div`,12),I(),A(15,ave,7,1,`a`,13),F(16,`span`,14)(17,`button`,15),H(`click`,function(){return t.openPalette()}),w(),F(18,`svg`,16),L(19,`path`,17),I()(),ls(),F(20,`button`,18),H(`click`,function(){return t.toggleSettings()}),L(21,`app-tab-icon`,19),I()(),F(22,`span`,20)(23,`span`,21),L(24,`span`),I(),K(25),I()(),F(26,`main`,22,1)(28,`p`,23),K(29),I(),F(30,`p`,24),K(31),I(),A(32,ove,1,8,`app-settings`,25)(33,sve,1,1,`app-auth-code`,26)(34,cve,5,0,`div`,27)(35,lve,2,0,`p`,28)(36,uve,1,1,`app-coming-soon`,29)(37,dve,2,0,`p`,28)(38,pve,10,2,`p`,30)(39,jve,2,2),I(),F(40,`app-command-palette`,31),w_(`openChange`,function(n){return S(e),C_(t.paletteOpen,n)||(t.paletteOpen=n),C(n)}),H(`picked`,function(e){return t.runCommand(e)}),I()}if(e&2){let e,n;D(2),G(`ng-mark`,t.view()===`angular`)(`pi-mark`,!t.view()),D(),j(t.view()===`nativescript`?3:t.view()===`capacitor`?4:t.view()===`angular-native`?5:t.view()===`analog`?6:t.view()===`ngrx`?7:t.view()===`angular`?8:9),D(7),G(`ng-text`,t.view()===`angular`),D(),q(t.title()),D(),G(`fade-start`,t.navFade().start)(`fade-end`,t.navFade().end),D(2),j(t.availableTabs().length>1?14:-1),D(),j((e=t.fullPanelLink())?15:-1,e),D(2),k(`aria-label`,`Command palette (`+t.paletteShortcut+`)`)(`title`,`Command palette (`+t.paletteShortcut+`)`),D(3),G(`active`,t.tab()===`settings`),k(`aria-pressed`,t.tab()===`settings`),D(2),G(`connected`,t.connected())(`failed`,t.connectionFailed()),D(3),J(` `,t.connected()?`Live`:t.connectionFailed()?`Disconnected`:t.pairing()?`Code needed`:`Connecting…`,` `),D(),k(`aria-label`,t.mainLabel()),D(3),q(t.backgroundNote()),D(2),q(t.connectedNote()),D(),j(t.tab()===`settings`?32:(n=t.pairing())?33:t.connectionFailed()?34:t.rpc()?(n=t.comingSoon())?36:t.view()===`angular-native`&&!t.nativePageId()?37:t.tabEnabled(t.tab(),t.config())?39:38:35,n),D(8),P(`commands`,t.paletteCommands()),S_(`open`,t.paletteOpen)}},dependencies:[UE,DI,dV,HU,CK,kX,CZ,O1,n2,$ie,sce,oue,qde,ope,Xpe,Gme,gce,sE,L_e,K_e,m_e],styles:[`[_nghost-%COMP%] { --%NS%accent-soft: color-mix(in srgb, var(--%NS%accent) 12%, transparent); --%NS%accent-line: color-mix(in srgb, var(--%NS%accent) var(--%NS%accent-line-amount), transparent); display: flex; diff --git a/extension/ui/index.html b/extension/ui/index.html index b1a7666d..8206310c 100644 --- a/extension/ui/index.html +++ b/extension/ui/index.html @@ -9,7 +9,7 @@ Pangular Inspector - + diff --git a/package.json b/package.json index 9a295751..439f1a2a 100644 --- a/package.json +++ b/package.json @@ -45,6 +45,8 @@ "docs:dev": "nx serve pangular-inspector-docs", "docs:build": "nx build pangular-inspector-docs", "docs:test": "nx test pangular-inspector-docs", + "docs:agent-tools": "node scripts/docs-agent-tools.mjs", + "docs:api": "node scripts/docs-api.mjs", "docs:deploy": "nx deploy pangular-inspector-docs" }, "private": true, diff --git a/scripts/docs-agent-tools.mjs b/scripts/docs-agent-tools.mjs new file mode 100644 index 00000000..1f711697 --- /dev/null +++ b/scripts/docs-agent-tools.mjs @@ -0,0 +1,27 @@ +#!/usr/bin/env node +/** + * Writes apps/docs/src/content/agents/tool-index.md from AGENT_ENTRIES in + * packages/devtools/src/config.ts. `pnpm docs:test` fails when the page in the repository is + * stale, so run this after adding or changing an agent tool or resource. + * + * Usage: node scripts/docs-agent-tools.mjs + */ +import { execFileSync } from 'node:child_process'; +import { writeFileSync } from 'node:fs'; +import path from 'node:path'; +import { renderToolIndex, TOOL_INDEX_PATH } from '../apps/docs/agent-tool-index.ts'; + +const docsRoot = path.resolve(import.meta.dirname, '../apps/docs'); +const { markdown, problems } = renderToolIndex(docsRoot); +if (problems.length > 0) { + for (const { name, problem } of problems) console.error(`${name}: ${problem}`); + console.error('Describe each entry in tools.md or resources.md first.'); + process.exit(1); +} +const file = path.join(docsRoot, TOOL_INDEX_PATH); +writeFileSync(file, markdown); +execFileSync('pnpm', ['exec', 'prettier', '--write', file], { + cwd: path.resolve(import.meta.dirname, '..'), + stdio: 'inherit', +}); +console.log(`Wrote ${path.relative(process.cwd(), file)}`); diff --git a/scripts/docs-api.mjs b/scripts/docs-api.mjs new file mode 100644 index 00000000..f4d4f3fb --- /dev/null +++ b/scripts/docs-api.mjs @@ -0,0 +1,23 @@ +#!/usr/bin/env node +/** + * Writes the API reference pages in apps/docs/src/content/api/ from the entry points of + * packages/devtools/package.json. `pnpm docs:test` fails when a page in the repository is + * stale, so run this after changing an exported symbol or its JSDoc. + * + * Usage: node scripts/docs-api.mjs + */ +import { execFileSync } from 'node:child_process'; +import { mkdirSync, readdirSync, rmSync, writeFileSync } from 'node:fs'; +import path from 'node:path'; +import { API_DIR, renderApiReference } from '../apps/docs/api-reference.ts'; + +const repoRoot = path.resolve(import.meta.dirname, '..'); +const dir = path.join(repoRoot, 'apps/docs', API_DIR); +const pages = renderApiReference(repoRoot, 'https://github.com/pangular-inspector/devtools'); +mkdirSync(dir, { recursive: true }); +for (const file of readdirSync(dir)) { + if (file.endsWith('.md') && !pages.has(file)) rmSync(path.join(dir, file)); +} +for (const [file, markdown] of pages) writeFileSync(path.join(dir, file), markdown); +execFileSync('pnpm', ['exec', 'prettier', '--write', dir], { cwd: repoRoot, stdio: 'inherit' }); +console.log(`Wrote ${pages.size} pages to ${path.relative(process.cwd(), dir)}`);