diff --git a/app/src/__tests__/cd-views.test.ts b/app/src/__tests__/cd-views.test.ts new file mode 100644 index 00000000..75405f0c --- /dev/null +++ b/app/src/__tests__/cd-views.test.ts @@ -0,0 +1,148 @@ +import { TestBed, type ComponentFixture } from '@angular/core/testing'; +import type { DevframeRpcClient } from 'devframe/client'; +import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'; +import { CdRecording, type CdPage } from '../pages/cd-recording'; + +let fixture: ComponentFixture; +let rpcCall: ReturnType; + +function page(options?: CdPage['options'], supported = true): CdPage { + return { + pageId: 'p1', + supported, + recording: false, + startedAt: null, + dropped: 0, + cycles: [], + components: [], + hosts: {}, + ...(options ? { options } : {}), + }; +} + +const host = () => fixture.nativeElement as HTMLElement; +const live = () => host().querySelector('[role="status"]')!.textContent!; +const toggle = (text: string) => + [...host().querySelectorAll('.views button')].find( + (b) => b.textContent?.trim() === text, + )!; +const pressed = (text: string) => toggle(text).getAttribute('aria-pressed'); + +async function show(value: CdPage | null) { + fixture.componentRef.setInput('page', value); + await fixture.whenStable(); +} + +async function click(text: string) { + toggle(text).click(); + await fixture.whenStable(); + await new Promise((resolve) => setTimeout(resolve)); + await fixture.whenStable(); +} + +describe('CdRecording live views', () => { + beforeEach(async () => { + rpcCall = vi.fn(() => Promise.resolve({ ok: true })); + const client = { scope: () => ({ rpc: { call: rpcCall } }) }; + fixture = TestBed.createComponent(CdRecording); + fixture.componentRef.setInput('pageId', 'p1'); + fixture.componentRef.setInput('rpc', client as unknown as DevframeRpcClient); + await show(null); + }); + + afterEach(() => { + fixture?.destroy(); + TestBed.resetTestingModule(); + }); + + it('shows the three toggles off in a labelled group', () => { + const group = host().querySelector('.views')!; + expect(group.getAttribute('role')).toBe('group'); + expect(host().querySelector(`#${group.getAttribute('aria-labelledby')}`)!.textContent).toBe( + 'Live views', + ); + expect(pressed('Flash checks')).toBe('false'); + expect(pressed('Performance track')).toBe('false'); + expect(pressed('Angular profiling')).toBe('false'); + for (const button of host().querySelectorAll('.views button')) { + expect(button.type).toBe('button'); + expect(button.disabled).toBe(false); + } + }); + + it('turns flash checks on and off for the page and announces it', async () => { + await click('Flash checks'); + expect(rpcCall).toHaveBeenLastCalledWith('request-change-detection-options', { + pageId: 'p1', + flash: true, + }); + expect(pressed('Flash checks')).toBe('true'); + expect(live()).toBe('Flash checks on.'); + + await show( + page({ flash: true, track: false, angularProfiling: false, angularProfilingAvailable: true }), + ); + await click('Flash checks'); + expect(rpcCall).toHaveBeenLastCalledWith('request-change-detection-options', { + pageId: 'p1', + flash: false, + }); + expect(pressed('Flash checks')).toBe('false'); + }); + + it('turns the Performance track on', async () => { + await click('Performance track'); + expect(rpcCall).toHaveBeenLastCalledWith('request-change-detection-options', { + pageId: 'p1', + track: true, + }); + expect(live()).toContain('Performance track on.'); + }); + + it('turns Angular profiling on once and says it stays on', async () => { + await click('Angular profiling'); + expect(rpcCall).toHaveBeenLastCalledWith('request-change-detection-options', { + pageId: 'p1', + angularProfiling: true, + }); + expect(pressed('Angular profiling')).toBe('true'); + expect(toggle('Angular profiling').disabled).toBe(true); + expect(host().textContent).toContain('Angular profiling stays on until the page reloads.'); + }); + + it('shows the state the page reports', async () => { + await show( + page({ flash: false, track: true, angularProfiling: true, angularProfilingAvailable: true }), + ); + expect(pressed('Performance track')).toBe('true'); + expect(pressed('Angular profiling')).toBe('true'); + expect(toggle('Angular profiling').disabled).toBe(true); + }); + + it('explains when the page has no ng.enableProfiling', async () => { + await show( + page({ + flash: false, + track: false, + angularProfiling: false, + angularProfilingAvailable: false, + }), + ); + expect(toggle('Angular profiling').disabled).toBe(true); + expect(host().textContent).toContain('It needs Angular 20 or later in a development build.'); + }); + + it('puts a toggle back when the page cannot be reached', async () => { + rpcCall.mockImplementation(() => Promise.reject(new Error('offline'))); + await click('Flash checks'); + expect(pressed('Flash checks')).toBe('false'); + expect(live()).toBe('Could not reach the page.'); + }); + + it('disables the toggles on a page that cannot record', async () => { + await show(page(undefined, false)); + for (const button of host().querySelectorAll('.views button')) { + expect(button.disabled).toBe(true); + } + }); +}); diff --git a/app/src/pages/cd-recording.ts b/app/src/pages/cd-recording.ts index b19c498c..c1ed6dd5 100644 --- a/app/src/pages/cd-recording.ts +++ b/app/src/pages/cd-recording.ts @@ -1,5 +1,5 @@ -import { Component, computed, input, output, signal } from '@angular/core'; -import type { CdReport } from '@pangular-inspector/devtools/config'; +import { Component, computed, input, linkedSignal, output, signal } from '@angular/core'; +import type { CdOptions, CdReport } from '@pangular-inspector/devtools/config'; import type { DevframeRpcClient } from 'devframe/client'; import { panelConfig } from '../devtools-config'; import { time } from '../format'; @@ -59,6 +59,57 @@ const SHOWN_CYCLES = 30; @if (page()?.supported === false) {

This page can't record change detection. It needs Angular 20 or later.

} + @if (!imported()) { +
+ Live views + + + +
+

+ Flash checks draws a box over each component on the page as Angular checks it, with its + name and how often it was checked, fading over a second. Performance track adds a Pangular + track to the Chrome Performance panel with every component check, hook and output. Angular + profiling turns on Angular's own track there. +

+ @if (views().angularProfiling) { +

Angular profiling stays on until the page reloads.

+ } @else if (!views().angularProfilingAvailable) { +

+ This page has no ng.enableProfiling. It needs Angular 20 or + later in a development build. +

+ } + } this.imported()?.page ?? this.livePage()); + /** The views the page has on, set ahead of the page's next report when a toggle is used. */ + readonly views = linkedSignal( + () => + this.livePage()?.options ?? { + flash: false, + track: false, + angularProfiling: false, + angularProfilingAvailable: true, + }, + ); + readonly canShowViews = computed(() => !!this.pageId() && this.livePage()?.supported !== false); + protected readonly message = signal(''); /** * What a screen reader hears. It changes only when Record, Stop or Clear finishes or fails. @@ -426,24 +505,47 @@ export class CdRecording { await this.send({ clear: true }, '', () => 'Cleared the recorded cycles.'); } + /** Turns a live view on or off on the page. Angular profiling only turns on. */ + async setView(view: 'flash' | 'track' | 'angularProfiling', on: boolean) { + const before = this.views(); + this.views.set({ ...before, [view]: on }); + const done = { + flash: on ? 'Flash checks on.' : 'Flash checks off.', + track: on + ? 'Performance track on. Record in the Chrome Performance panel to see it.' + : 'Performance track off.', + angularProfiling: 'Angular profiling on. It stays on until the page reloads.', + }[view]; + const sent = await this.send( + { [view]: on }, + '', + () => done, + 'request-change-detection-options', + ); + if (!sent) this.views.set(before); + } + private async send( - request: { on?: boolean; clear?: boolean }, + request: { on?: boolean; clear?: boolean; flash?: boolean; track?: boolean }, pending: string, done: () => string, - ) { + rpc = 'request-change-detection-record', + ): Promise { this.message.set(pending); try { if (!this.rpc()) throw new Error('no client'); - await call(this.rpc(), 'request-change-detection-record', { + await call(this.rpc(), rpc, { pageId: this.pageId(), ...request, }); this.message.set(''); this.announce(done()); + return true; } catch { const failed = 'Could not reach the page.'; this.message.set(failed); this.announce(failed); + return false; } } diff --git a/apps/docs/src/content/agents/tools.md b/apps/docs/src/content/agents/tools.md index e918fad2..54cb1ecf 100644 --- a/apps/docs/src/content/agents/tools.md +++ b/apps/docs/src/content/agents/tools.md @@ -59,11 +59,11 @@ Every tool has one of three safety tiers. The server sends the tier to your clie The twelve action and destructive tools act on the app. Your client can ask you before it runs them. -When the hub is mounted, each finished call of an `action` or `destructive` tool posts an `Agent ran ` message to the hub, so you can see what the agent changed. `change-detection` posts only when it starts, stops or clears a recording. See [Messages and badges](../getting-started/popup-and-hub.md#messages-and-badges). +When the hub is mounted, each finished call of an `action` or `destructive` tool posts an `Agent ran ` message to the hub, so you can see what the agent changed. `change-detection` posts only when it starts, stops or clears a recording, or turns a live view on or off. See [Messages and badges](../getting-started/popup-and-hub.md#messages-and-badges). ### Turn tools off -The server decides which tools exist. Set `agent.readOnly` to keep only the `read` tools. `change-detection` stays as a `read` tool without its `record` argument, so it reads a recording the panel started. Set `agent.tools.` to `false` to hide one inspector's tools and resources, and keep its tab. Turning an inspector off with `inspectors`, or blocking an action with `actions`, drops the matching tools too. `actions.router` is the exception: `navigate` stays for `instrument` and `resolve-lazy`, and refuses `navigate`, `abort`, `replay` and `probe`. See [Inspectors and agent tools](../getting-started/configuration.md#inspectors-and-agent-tools). +The server decides which tools exist. Set `agent.readOnly` to keep only the `read` tools. `change-detection` stays as a `read` tool without its `record`, `flash`, `track` and `angularProfiling` arguments, so it reads a recording the panel started. Set `agent.tools.` to `false` to hide one inspector's tools and resources, and keep its tab. Turning an inspector off with `inspectors`, or blocking an action with `actions`, drops the matching tools too. `actions.router` is the exception: `navigate` stays for `instrument` and `resolve-lazy`, and refuses `navigate`, `abort`, `replay` and `probe`. See [Inspectors and agent tools](../getting-started/configuration.md#inspectors-and-agent-tools). ## Source scan @@ -160,14 +160,19 @@ Each page lists at most 50 blocks, with a note on how many more are not shown, a Change detection cycles recorded with Angular's profiler: the slowest components by self time, the most often checked components, lifecycle hook time per class and hook, output listener time, `afterRender` callback time, and the latest cycles with their duration, component checks, sync passes, hook and afterRender time and the output that ran before each one. Reads: page. Needs Angular 20 or later. -| Argument | Required | Value | -| -------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `record` | no | `start` starts a fresh recording on a page that is not recording and leaves a running one as it is, `stop` stops it and keeps the cycles, `clear` empties it. Leave out to read. | -| `limit` | no | Rows per list. Default 10, at most 50. | -| `export` | no | `json` returns the recording as the file the panel's **Import** reads. `trace` returns it in the Trace Event Format for Perfetto. Can't be combined with `record`. | +| Argument | Required | Value | +| ------------------ | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `record` | no | `start` starts a fresh recording on a page that is not recording and leaves a running one as it is, `stop` stops it and keeps the cycles, `clear` empties it. Leave out to read. | +| `limit` | no | Rows per list. Default 10, at most 50. | +| `export` | no | `json` returns the recording as the file the panel's **Import** reads. `trace` returns it in the Trace Event Format for Perfetto. Can't be combined with `record`. | +| `flash` | no | `true` turns the flash overlay on: a fading box with the class name and check count over each component Angular checks. `false` turns it off. | +| `track` | no | `true` writes each component check, lifecycle hook and output listener to a **Pangular** track in the Chrome Performance panel. `false` turns it off. | +| `angularProfiling` | no | `true` calls `ng.enableProfiling()` for Angular's own Performance panel track. It stays on until the page reloads, so `false` is refused. | Without `page`, it reads the page that is recording, and `record` goes to every connected page. A `page` that names no connected tab gets the list of connected tabs. A connected tab that has not recorded yet gets a hint to start a recording there. The answer starts with the change detection mode of the page it reports on: zoneless, zone.js, or zoneless with zone.js still loaded. Recording is off until the panel or this tool starts it. Call it with `record: "start"`, use the app, then call it again without `record`. With `agent.readOnly`, the tool has no `record` argument and is marked read-only, so start the recording from the panel. When older cycles were dropped at [`limits.cdCycles`](../getting-started/configuration.md#limits), the answer says how many. A recording lists at most 100 component classes and counts checks for up to 2000 instances. When it checked more, the answer says how many were left out. +`flash`, `track` and `angularProfiling` go to the page in `page`, or to every connected page, and can be combined with `record`, but not with `export`. They are the **Live views** toggles of the panel; see [Watch checks live](../inspectors/components.md#watch-checks-live). Once a page reports them, the answer ends with a line that says which views are on. With `agent.readOnly`, the tool has none of these three arguments. + `export` only reads, so it stays available with `agent.readOnly`. The file is masked like other answers (JWTs, bearer tokens and secret names), has no instance check counts, and comes in a `json` code block to save as a `.json` file. An export over 100,000 characters is not returned, because cut JSON doesn't parse. The answer gives its size and the counts of cycles, timed spans, component classes, hook rows and output rows instead. Export it from the panel then, or clear the recording and record a shorter session. See [Export and import a recording](../inspectors/components.md#export-and-import-a-recording). ### Edit a component Action diff --git a/apps/docs/src/content/inspectors/components.md b/apps/docs/src/content/inspectors/components.md index 1edeac6f..7f3b066f 100644 --- a/apps/docs/src/content/inspectors/components.md +++ b/apps/docs/src/content/inspectors/components.md @@ -153,6 +153,18 @@ An import goes through the same checks as a report from the page: unknown fields The trace has one complete event per cycle on a **Change detection** thread, with the component checks, lifecycle hooks and `afterRender` callbacks nested inside it, and the output listener that started each cycle on an **Outputs** thread. Times are in microseconds from the start of the recording. Each cycle keeps its 40 longest timed spans, so a large app's trace shows the slowest checks of each cycle, not all of them. +#### Watch checks live + +The **Live views** toggles below **Record** show change detection as it happens, without a recording. Each one is per page, off by default, and registers no profiler while it is off. They need Angular 20 or later. + +| Toggle | What it does | +| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| **Flash checks** | Draws a box over the host of each component Angular checks, labeled with its class name and `×N`, the number of checks since the box appeared. The box fades out over about a second. With reduced motion, it shows a still outline for 0.4 seconds instead. | +| **Performance track** | Adds a **Pangular** track to the Chrome DevTools Performance panel, with one entry per component check, lifecycle hook and output listener. Record a profile in the Performance panel to see it. Browsers without `console.timeStamp` show nothing. | +| **Angular profiling** | Calls `ng.enableProfiling()`, so Angular adds its own track to the Performance panel. Angular has no way to turn it off, so it stays on until the page reloads and the toggle stays pressed. If the page has no `ng.enableProfiling`, such as a production build, the toggle does nothing and the section says so. | + +The flash boxes are drawn on a canvas in a shadow root that the overlay adds to the page. It doesn't take clicks, and the overlay never changes the app's own elements. The page measures the checked hosts once per animation frame and draws at most 150 boxes at a time. + ### Source mode Without live data, the tab lists the `@Component` and `@Directive` classes in your source. Expand a row to see its class, file, standalone flag, change detection, inputs and outputs. Click **Refresh** to scan again. @@ -302,18 +314,18 @@ Press Escape in the filter box to clear it. When the filter matches nothing, **C ## Agent tools -| Tool or resource | Kind | What it does | -| --------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `pangular:get-components` | tool | Lists components and directives from source, with selector, kind, inputs, outputs, change detection, file and line. | -| `pangular:highlight` | tool | Highlights a component in the page and selects it. Takes an instance id, class name, host tag or CSS selector. Also retargets the Signals graph. Lists every instance a name matches. | -| `pangular:inspect-component` | tool | Selects one instance and returns its live detail: inputs, outputs, properties, listeners, directives and injected services. | -| `pangular:list-components` | tool | Returns the live tree of one page as an indented outline with routed and directive markers. Takes a `filter` and a `depth`. | -| `pangular:defer-blocks` | tool | Lists the `@defer` blocks of each page, and flags blocks that failed, blocks stuck on their placeholder and blocks still dehydrated. | -| `pangular:for-blocks` | tool | Lists the `@for` blocks of each page with their item count, track kind and `@empty` block. | -| `pangular:change-detection` | tool | Starts, stops or clears a change detection recording, and returns the slowest and most often checked components, hook, output and afterRender time, the latest cycles, or an export. | -| `pangular:set-component-property` | tool | Writes an input or property of one instance and runs change detection. An action. | -| `pangular:set-signal` | tool | Sets a writable signal that one instance holds as a property. An action. | -| `pangular:component-tree` | resource | The live tree per page, with the detail of the selected instance and the defer blocks. | +| Tool or resource | Kind | What it does | +| --------------------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `pangular:get-components` | tool | Lists components and directives from source, with selector, kind, inputs, outputs, change detection, file and line. | +| `pangular:highlight` | tool | Highlights a component in the page and selects it. Takes an instance id, class name, host tag or CSS selector. Also retargets the Signals graph. Lists every instance a name matches. | +| `pangular:inspect-component` | tool | Selects one instance and returns its live detail: inputs, outputs, properties, listeners, directives and injected services. | +| `pangular:list-components` | tool | Returns the live tree of one page as an indented outline with routed and directive markers. Takes a `filter` and a `depth`. | +| `pangular:defer-blocks` | tool | Lists the `@defer` blocks of each page, and flags blocks that failed, blocks stuck on their placeholder and blocks still dehydrated. | +| `pangular:for-blocks` | tool | Lists the `@for` blocks of each page with their item count, track kind and `@empty` block. | +| `pangular:change-detection` | tool | Starts, stops or clears a change detection recording, turns the live views on or off, and returns the slowest and most often checked components, hook, output and afterRender time, the latest cycles, or an export. | +| `pangular:set-component-property` | tool | Writes an input or property of one instance and runs change detection. An action. | +| `pangular:set-signal` | tool | Sets a writable signal that one instance holds as a property. An action. | +| `pangular:component-tree` | resource | The live tree per page, with the detail of the selected instance and the defer blocks. | See [Tools](../agents/tools.md) and [Resources](../agents/resources.md). diff --git a/extension/ui/assets/browser-agent-rpc-BXhoSh1z-BytShXFb.js b/extension/ui/assets/browser-agent-rpc-BXhoSh1z-B1xMNaze.js similarity index 93% rename from extension/ui/assets/browser-agent-rpc-BXhoSh1z-BytShXFb.js rename to extension/ui/assets/browser-agent-rpc-BXhoSh1z-B1xMNaze.js index cef311d7..0cf86246 100644 --- a/extension/ui/assets/browser-agent-rpc-BXhoSh1z-BytShXFb.js +++ b/extension/ui/assets/browser-agent-rpc-BXhoSh1z-B1xMNaze.js @@ -1 +1 @@ -import{t as e}from"./index-DTPGIzjx.js";var t=Symbol.for(`devframe:browser-agent-registry`),{tools:n,listeners:r}=globalThis[t]??={tools:new Map,listeners:new Set};function i(){return[...n.values()]}function a(e){return r.add(e),()=>r.delete(e)}var o=`devframe:client-id`,s;function c(t=globalThis.window){try{let n=t?.sessionStorage;if(n){let t=n.getItem(o);return t||(t=e(),n.setItem(o,t)),t}}catch{}return s??=e(),s}function l(e){e.client.register({name:`devframe:agent:invoke-client-tool`,type:`action`,jsonSerializable:!0,handler:async(e,t)=>{let n=i().find(t=>t.id===e);if(!n)throw Error(`[devframe/agent] browser tool "${e}" not found`);return await n.invoke(t)}});let t=!1,n=!1,r=0,o=()=>{t||n||(t=!0,queueMicrotask(async()=>{if(t=!1,n)return;let a=i().map(({invoke:e,...t})=>t);(a.length!==0||r!==0)&&(r=a.length,await e.callOptional(`devframe:agent:sync-client-tools`,c(),a).catch(()=>{}))}))},s=a(o),l=e.events.on(`connection:status`,e=>{e===`connected`&&o()});return o(),()=>{n=!0,s(),l()}}export{l as setupBrowserAgentRpcBridge}; \ No newline at end of file +import{t as e}from"./index-Cs1iD7Iz.js";var t=Symbol.for(`devframe:browser-agent-registry`),{tools:n,listeners:r}=globalThis[t]??={tools:new Map,listeners:new Set};function i(){return[...n.values()]}function a(e){return r.add(e),()=>r.delete(e)}var o=`devframe:client-id`,s;function c(t=globalThis.window){try{let n=t?.sessionStorage;if(n){let t=n.getItem(o);return t||(t=e(),n.setItem(o,t)),t}}catch{}return s??=e(),s}function l(e){e.client.register({name:`devframe:agent:invoke-client-tool`,type:`action`,jsonSerializable:!0,handler:async(e,t)=>{let n=i().find(t=>t.id===e);if(!n)throw Error(`[devframe/agent] browser tool "${e}" not found`);return await n.invoke(t)}});let t=!1,n=!1,r=0,o=()=>{t||n||(t=!0,queueMicrotask(async()=>{if(t=!1,n)return;let a=i().map(({invoke:e,...t})=>t);(a.length!==0||r!==0)&&(r=a.length,await e.callOptional(`devframe:agent:sync-client-tools`,c(),a).catch(()=>{}))}))},s=a(o),l=e.events.on(`connection:status`,e=>{e===`connected`&&o()});return o(),()=>{n=!0,s(),l()}}export{l as setupBrowserAgentRpcBridge}; \ No newline at end of file diff --git a/extension/ui/assets/index-DTPGIzjx.js b/extension/ui/assets/index-Cs1iD7Iz.js similarity index 89% rename from extension/ui/assets/index-DTPGIzjx.js rename to extension/ui/assets/index-Cs1iD7Iz.js index c25f093f..28185a61 100644 --- a/extension/ui/assets/index-DTPGIzjx.js +++ b/extension/ui/assets/index-Cs1iD7Iz.js @@ -5,7 +5,7 @@ `):``,this.name=`UnsubscriptionError`,this.errors=t}});function hr(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var gr=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=lr(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(fr(c))try{c()}catch(e){i=e instanceof mr?e.errors:[e]}var l=this._finalizers;if(l){this._finalizers=null;try{for(var u=lr(l),d=u.next();!d.done;d=u.next()){var f=d.value;try{yr(f)}catch(e){i??=[],e instanceof mr?i=dr(dr([],ur(i)),ur(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 mr(i)}},e.prototype.add=function(t){if(t&&t!==this){if(this.closed)yr(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)&&hr(t,e)},e.prototype.remove=function(t){var n=this._finalizers;n&&hr(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=(function(){var t=new e;return t.closed=!0,t})(),e}(),_r=gr.EMPTY;function vr(e){return e instanceof gr||e&&`closed`in e&&fr(e.remove)&&fr(e.add)&&fr(e.unsubscribe)}function yr(e){fr(e)?e():e.unsubscribe()}var br={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},xr={setTimeout:function(e,t){var n=[...arguments].slice(2),r=xr.delegate;return r?.setTimeout?r.setTimeout.apply(r,dr([e,t],ur(n))):setTimeout.apply(void 0,dr([e,t],ur(n)))},clearTimeout:function(e){return(xr.delegate?.clearTimeout||clearTimeout)(e)},delegate:void 0};function Sr(e){xr.setTimeout(function(){var t=br.onUnhandledError;if(t)t(e);else throw e})}function Cr(){}var wr=(function(){return Dr(`C`,void 0,void 0)})();function Tr(e){return Dr(`E`,void 0,e)}function Er(e){return Dr(`N`,e,void 0)}function Dr(e,t,n){return{kind:e,value:t,error:n}}var Or=null;function kr(e){if(br.useDeprecatedSynchronousErrorHandling){var t=!Or;if(t&&(Or={errorThrown:!1,error:null}),e(),t){var n=Or,r=n.errorThrown,i=n.error;if(Or=null,r)throw i}}else e()}function Ar(e){br.useDeprecatedSynchronousErrorHandling&&Or&&(Or.errorThrown=!0,Or.error=e)}var jr=function(e){cr(t,e);function t(t){var n=e.call(this)||this;return n.isStopped=!1,t?(n.destination=t,vr(t)&&t.add(n)):n.destination=zr,n}return t.create=function(e,t,n){return new Fr(e,t,n)},t.prototype.next=function(e){this.isStopped?Rr(Er(e),this):this._next(e)},t.prototype.error=function(e){this.isStopped?Rr(Tr(e),this):(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped?Rr(wr,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}(gr),Mr=Function.prototype.bind;function Nr(e,t){return Mr.call(e,t)}var Pr=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){Ir(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){Ir(e)}else Ir(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){Ir(e)}},e}(),Fr=function(e){cr(t,e);function t(t,n,r){var i=e.call(this)||this,a;if(fr(t)||!t)a={next:t??void 0,error:n??void 0,complete:r??void 0};else{var o;i&&br.useDeprecatedNextContext?(o=Object.create(t),o.unsubscribe=function(){return i.unsubscribe()},a={next:t.next&&Nr(t.next,o),error:t.error&&Nr(t.error,o),complete:t.complete&&Nr(t.complete,o)}):a=t}return i.destination=new Pr(a),i}return t}(jr);function Ir(e){br.useDeprecatedSynchronousErrorHandling?Ar(e):Sr(e)}function Lr(e){throw e}function Rr(e,t){var n=br.onStoppedNotification;n&&xr.setTimeout(function(){return n(e,t)})}var zr={closed:!0,next:Cr,error:Lr,complete:Cr},Br=(function(){return typeof Symbol==`function`&&Symbol.observable||`@@observable`})();function Vr(e){return e}function Hr(e){return e.length===0?Vr:e.length===1?e[0]:function(t){return e.reduce(function(e,t){return t(e)},t)}}var Ur=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=Kr(e)?e:new Fr(e,t,n);return kr(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=Wr(t),new t(function(t,r){var i=new Fr({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[Br]=function(){return this},e.prototype.pipe=function(){return Hr([...arguments])(this)},e.prototype.toPromise=function(e){var t=this;return e=Wr(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 Wr(e){return e??br.Promise??Promise}function Gr(e){return e&&fr(e.next)&&fr(e.error)&&fr(e.complete)}function Kr(e){return e&&e instanceof jr||Gr(e)&&vr(e)}function qr(e){return fr(e?.lift)}function Jr(e){return function(t){if(qr(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 Yr(e,t,n,r,i){return new Xr(e,t,n,r,i)}var Xr=function(e){cr(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}(jr),Zr=pr(function(e){return function(){e(this),this.name=`ObjectUnsubscribedError`,this.message=`object unsubscribed`}}),Qr=function(e){cr(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 $r(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new Zr},t.prototype.next=function(e){var t=this;kr(function(){var n,r;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||=Array.from(t.observers);try{for(var i=lr(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;kr(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;kr(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?_r:(this.currentObservers=null,a.push(e),new gr(function(){t.currentObservers=null,hr(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 Ur;return e.source=this,e},t.create=function(e,t){return new $r(e,t)},t}(Ur),$r=function(e){cr(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)??_r},t}(Qr),ei=function(e){cr(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}(Qr);function ti(e,t){return Jr(function(n,r){var i=0;n.subscribe(Yr(r,function(n){r.next(e.call(t,n,i++))}))})}var ni=`https://angular.dev/best-practices/security#preventing-cross-site-scripting-xss`,w=class extends Error{code;constructor(e,t){super(ii(e,t)),this.code=e}};function ri(e){return`NG0${Math.abs(e)}`}function ii(e,t){return`${ri(e)}${t?`: `+t:``}`}function ai(e){for(let t in e)if(e[t]===ai)return t;throw Error(``)}function oi(e){if(typeof e==`string`)return e;if(Array.isArray(e))return`[${e.map(oi).join(`, `)}]`;if(e==null)return``+e;let t=e.overriddenName||e.name;if(t)return`${t}`;let n=e.toString();if(n==null)return``+n;let r=n.indexOf(` `);return r>=0?n.slice(0,r):n}function si(e,t){return e?t?`${e} ${t}`:e:t||``}var ci=ai({__forward_ref__:ai});function li(e){return e.__forward_ref__=li,e}function ui(e){return di(e)?e():e}function di(e){return typeof e==`function`&&Object.hasOwn(e,ci)&&e.__forward_ref__===li}function fi(e){return{token:e.token,providedIn:e.providedIn||null,factory:e.factory,value:void 0}}function pi(e){return mi(e,_i)}function mi(e,t){return Object.hasOwn(e,t)&&e[t]||null}function hi(e){return(e?.[_i]??null)||null}function gi(e){return e&&Object.hasOwn(e,vi)?e[vi]:null}var _i=ai({ɵprov:ai}),vi=ai({ɵinj:ai}),yi=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=fi({token:this,providedIn:t.providedIn||`root`,factory:t.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}};function bi(e){return e&&!!e.ɵproviders}var xi=ai({ɵcmp:ai}),Si=ai({ɵdir:ai}),Ci=ai({ɵpipe:ai}),wi=ai({ɵfac:ai}),Ti=ai({__NG_ELEMENT_ID__:ai}),Ei=ai({__NG_ENV_ID__:ai});function Di(e){return Ai(e,`@Component`),e[xi]||null}function Oi(e){return Ai(e,`@Directive`),e[Si]||null}function ki(e){return Ai(e,`@Pipe`),e[Ci]||null}function Ai(e,t){if(e==null)throw new w(-919,!1)}function ji(e){return typeof e==`string`?e:e==null?``:String(e)}var Mi=ai({ngErrorCode:ai}),Ni=ai({ngErrorMessage:ai}),Pi=ai({ngTokenPath:ai});function Fi(e,t){return Li(``,-200,t)}function Ii(e,t){throw new w(-201,!1)}function Li(e,t,n){let r=new w(t,e);return r[Mi]=t,r[Ni]=e,n&&(r[Pi]=n),r}function Ri(e){return e[Mi]}var zi;function Bi(){return zi}function Vi(e){let t=zi;return zi=e,t}function Hi(e,t,n){let r=pi(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;Ii(e,``)}var Ui=globalThis,Wi={},Gi=`__NG_DI_FLAG__`,Ki=class{injector;constructor(e){this.injector=e}retrieve(e,t){let n=Yi(t)||0;try{return this.injector.get(e,n&8?null:Wi,n)}catch(e){if(tr(e))return e;throw e}}};function qi(e,t=0){let n=Qn();if(n===void 0)throw new w(-203,!1);if(n===null)return Hi(e,void 0,t);{let r=Xi(t),i=n.retrieve(e,r);if(tr(i)){if(r.optional)return null;throw i}return i}}function Ji(e,t=0){return(Bi()||qi)(ui(e),t)}function T(e,t){return Ji(e,Yi(t))}function Yi(e){return e===void 0||typeof e==`number`?e:0|(e.optional&&8)|(e.host&&1)|(e.self&&2)|(e.skipSelf&&4)}function Xi(e){return{optional:!!(e&8),host:!!(e&1),self:!!(e&2),skipSelf:!!(e&4)}}function Zi(e){let t=[];for(let n=0;nArray.isArray(e)?na(e,t):t(e))}function ra(e,t,n){t>=e.length?e.push(n):e.splice(t,0,n)}function ia(e,t){return t>=e.length-1?e.pop():e.splice(t,1)[0]}function aa(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 sa(e,t,n){let r=la(e,t);return r>=0?e[r|1]=n:(r=~r,oa(e,r,t,n)),r}function ca(e,t){let n=la(e,t);if(n>=0)return e[n|1]}function la(e,t){return ua(e,t,1)}function ua(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 na(t,e=>{let t=e;ba(t,a,[],r)&&(i||=[],i.push(t))}),i!==void 0&&ya(i,a),n}function ya(e,t){for(let n=0;n{t(e,r)})}}function ba(e,t,n,r){if(e=ui(e),!e)return!1;let i=null,a=gi(e),o=!a&&Di(e);if(!a&&!o){let t=e.ngModule;if(a=gi(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)ba(i,t,n,r)}}else if(a){if(a.imports!=null&&!s){r.add(i);let e;try{na(a.imports,i=>{ba(i,t,n,r)&&(e||=[],e.push(i))})}finally{}e!==void 0&&ya(e,t)}if(!s){let e=$i(i)||(()=>new i);t({provide:i,useFactory:e,deps:fa},i),t({provide:ha,useValue:i,multi:!0},i),t({provide:pa,useValue:()=>Ji(i),multi:!0},i)}let o=a.providers;if(o!=null&&!s){let n=e;xa(o,e=>{t(e,n)})}}else return!1;return i!==e&&e.providers!==void 0}function xa(e,t){for(let n of e)bi(n)&&(n=n.ɵproviders),Array.isArray(n)?xa(n,t):t(n)}var Sa=ai({provide:String,useValue:ai});function Ca(e){return typeof e==`object`&&!!e&&Sa in e}function wa(e){return!!(e&&e.useExisting)}function Ta(e){return!!(e&&e.useFactory)}function Ea(e){return typeof e==`function`}var Da=new yi(``),Oa={},ka={},Aa=void 0;function ja(){return Aa===void 0&&(Aa=new ga),Aa}var Ma=class{},Na=class extends Ma{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,Ua(e,e=>this.processProvider(e)),this.records.set(ma,za(void 0,this)),r.has(`environment`)&&this.records.set(Ma,za(void 0,this));let i=this.records.get(Da);i!=null&&typeof i.value==`string`&&this.scopes.add(i.value),this.injectorDefTypes=new Set(this.get(ha,fa,{self:!0}))}retrieve(e,t){let n=Yi(t)||0;try{return this.get(e,Wi,n)}catch(e){if(tr(e))return e;throw e}}destroy(){Ra(this),this._destroyed=!0;let e=C(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(),C(e)}}onDestroy(e){return Ra(this),this._onDestroyHooks.push(e),()=>this.removeOnDestroy(e)}runInContext(e){Ra(this);let t=$n(this),n=Vi(void 0);try{return e()}finally{$n(t),Vi(n)}}get(e,t=Wi,n){if(Ra(this),Object.hasOwn(e,Ei))return e[Ei](this);let r=Yi(n),i=$n(this),a=Vi(void 0);try{if(!(r&4)){let t=this.records.get(e);if(t===void 0){let n=Ha(e)&&pi(e);t=n&&this.injectableDefInScope(n)?za(Pa(e),Oa):null,this.records.set(e,t)}if(t!=null)return this.hydrate(e,t,r)}let n=r&2?ja():this.parent;return t=r&8&&t===Wi?null:t,n.get(e,t)}catch(e){let t=Ri(e);throw t===-200||t===-201?new w(t,null):e}finally{Vi(a),$n(i)}}resolveInjectorInitializers(){let e=C(null),t=$n(this),n=Vi(void 0);try{let e=this.get(pa,fa,{self:!0});for(let t of e)t()}finally{$n(t),Vi(n),C(e)}}toString(){return`R3Injector[...]`}processProvider(e){e=ui(e);let t=Ea(e)?e:ui(e&&e.provide),n=Ia(e);if(!Ea(e)&&e.multi===!0){let n=this.records.get(t);n||(n=za(void 0,Oa,!0),n.factory=()=>Zi(n.multi),this.records.set(t,n)),t=e,n.multi.push(e)}this.records.set(t,n)}hydrate(e,t,n){let r=C(null);try{if(t.value===ka)throw Fi(``);return t.value===Oa&&(t.value=ka,t.value=t.factory(void 0,n)),typeof t.value==`object`&&t.value&&Va(t.value)&&this._ngOnDestroyHooks.add(t.value),t.value}finally{C(r)}}injectableDefInScope(e){if(!e.providedIn)return!1;let t=ui(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 Pa(e){let t=pi(e),n=t===null?$i(e):t.factory;if(n!==null)return n;if(e instanceof yi)throw new w(-204,!1);if(e instanceof Function)return Fa(e);throw new w(-204,!1)}function Fa(e){if(e.length>0)throw new w(-204,!1);let t=hi(e);return t===null?()=>new e:()=>t.factory(e)}function Ia(e){return Ca(e)?za(void 0,e.useValue):za(La(e),Oa)}function La(e,t,n){let r;if(Ea(e)){let t=ui(e);return $i(t)||Pa(t)}if(Ca(e))r=()=>ui(e.useValue);else if(Ta(e))r=()=>e.useFactory(...Zi(e.deps||[]));else if(wa(e))r=(t,n)=>Ji(ui(e.useExisting),n!==void 0&&n&8?8:void 0);else{let t=ui(e&&(e.useClass||e.provide));if(Ba(e))r=()=>new t(...Zi(e.deps));else return $i(t)||Pa(t)}return r}function Ra(e){if(e.destroyed)throw new w(-205,!1)}function za(e,t,n=!1){return{factory:e,value:t,multi:n?[]:void 0}}function Ba(e){return!!e.deps}function Va(e){return typeof e==`object`&&!!e&&typeof e.ngOnDestroy==`function`}function Ha(e){return typeof e==`function`||typeof e==`object`&&e.ngMetadataName===`InjectionToken`}function Ua(e,t){for(let n of e)Array.isArray(n)?Ua(n,t):n&&bi(n)?Ua(n.ɵproviders,t):t(n)}function Wa(e,t){let n;e instanceof Na?(Ra(e),n=e):n=new Ki(e);let r=$n(n),i=Vi(void 0);try{return t()}finally{$n(r),Vi(i)}}function Ga(){return Bi()!==void 0||Qn()!=null}var Ka=1;function qa(e){return Array.isArray(e)&&typeof e[Ka]==`object`}function Ja(e){return Array.isArray(e)&&e[Ka]===!0}function Ya(e){return!!(e.flags&4)}function Xa(e){return e.componentOffset>-1}function Za(e){return(e.flags&1)==1}function Qa(e){return!!e.template}function $a(e){return!!(e[2]&512)}function eo(e){return(e[2]&256)==256}var to=(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})(to||{}),no=`math`;function ro(e){for(;Array.isArray(e);)e=e[0];return e}function io(e,t){return ro(t[e])}function ao(e,t){return ro(t[e.index])}function oo(e,t){return e.data[t]}function so(e,t){return e[t]}function co(e,t,n,r){n>=e.data.length&&(e.data[n]=null,e.blueprint[n]=null),t[n]=r}function lo(e,t){let n=t[e];return qa(n)?n:n[0]}function uo(e){return(e[2]&128)==128}function fo(e){return Ja(e[3])}function po(e,t){return t==null?null:e[t]}function mo(e){e[17]=0}function ho(e){e[2]&1024||(e[2]|=1024,uo(e)&&yo(e))}function go(e,t){for(;e>0;)t=t[14],e--;return t}function _o(e){return!!(e[2]&9216||e[24]?.dirty)}function vo(e){e[10].changeDetectionScheduler?.notify(8),e[2]&64&&(e[2]|=1024),_o(e)&&yo(e)}function yo(e){e[10].changeDetectionScheduler?.notify(0);let t=So(e);for(;t!==null&&!(t[2]&8192||(t[2]|=8192,!uo(t)));)t=So(t)}function bo(e,t){if(eo(e))throw new w(911,!1);e[21]===null&&(e[21]=[]),e[21].push(t)}function xo(e,t){if(e[21]===null)return;let n=e[21].indexOf(t);n!==-1&&e[21].splice(n,1)}function So(e){let t=e[3];return Ja(t)?t[3]:t}function Co(e){return e[7]??=[]}function wo(e){return e.cleanup??=[]}function To(e,t,n,r){let i=Co(t);i.push(n),e.firstCreatePass&&wo(e).push(r,i.length-1)}var Eo={lFrame:ss(null),bindingsEnabled:!0,skipHydrationRootTNode:null},Do=!1;function Oo(){return Eo.lFrame.elementDepthCount}function ko(){Eo.lFrame.elementDepthCount++}function Ao(){Eo.lFrame.elementDepthCount--}function jo(){return Eo.bindingsEnabled}function Mo(){return Eo.skipHydrationRootTNode!==null}function No(e){return Eo.skipHydrationRootTNode===e}function Po(){Eo.skipHydrationRootTNode=null}function E(){return Eo.lFrame.lView}function Fo(){return Eo.lFrame.tView}function D(e){return Eo.lFrame.contextLView=e,e[8]}function O(e){return Eo.lFrame.contextLView=null,e}function Io(){let e=Lo();for(;e!==null&&e.type===64;)e=e.parent;return e}function Lo(){return Eo.lFrame.currentTNode}function Ro(){let e=Eo.lFrame,t=e.currentTNode;return e.isParent?t:t.parent}function zo(e,t){let n=Eo.lFrame;n.currentTNode=e,n.isParent=t}function Bo(){return Eo.lFrame.isParent}function Vo(){Eo.lFrame.isParent=!1}function Ho(){return Eo.lFrame.contextLView}function Uo(){return Do}function Wo(e){let t=Do;return Do=e,t}function Go(){let e=Eo.lFrame,t=e.bindingRootIndex;return t===-1&&(t=e.bindingRootIndex=e.tView.bindingStartIndex),t}function Ko(){return Eo.lFrame.bindingIndex}function qo(e){return Eo.lFrame.bindingIndex=e}function Jo(){return Eo.lFrame.bindingIndex++}function Yo(e){let t=Eo.lFrame,n=t.bindingIndex;return t.bindingIndex+=e,n}function Xo(){return Eo.lFrame.inI18n}function Zo(e,t){let n=Eo.lFrame;n.bindingIndex=n.bindingRootIndex=e,$o(t)}function Qo(){return Eo.lFrame.currentDirectiveIndex}function $o(e){Eo.lFrame.currentDirectiveIndex=e}function es(e){let t=Eo.lFrame.currentDirectiveIndex;return t===-1?null:e[t]}function ts(){return Eo.lFrame.currentQueryIndex}function ns(e){Eo.lFrame.currentQueryIndex=e}function rs(e){let t=e[1];return t.type===2?t.declTNode:t.type===1?e[5]:null}function is(e,t,n){if(n&4){let r=t,i=e;for(;r=r.parent,r===null&&!(n&1)&&(r=rs(i),!(r===null||(i=i[14],r.type&10))););if(r===null)return!1;t=r,e=i}let r=Eo.lFrame=os();return r.currentTNode=t,r.lView=e,!0}function as(e){let t=os(),n=e[1];Eo.lFrame=t,t.currentTNode=n.firstChild,t.lView=e,t.tView=n,t.contextLView=e,t.bindingIndex=n.bindingStartIndex,t.inI18n=!1}function os(){let e=Eo.lFrame,t=e===null?null:e.child;return t===null?ss(e):t}function ss(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 cs(){let e=Eo.lFrame;return Eo.lFrame=e.parent,e.currentTNode=null,e.lView=null,e}var ls=cs;function us(){let e=cs();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 ds(e){return(Eo.lFrame.contextLView=go(e,Eo.lFrame.contextLView))[8]}function fs(){return Eo.lFrame.selectedIndex}function ps(e){Eo.lFrame.selectedIndex=e}function ms(){let e=Eo.lFrame;return oo(e.tView,e.selectedIndex)}function k(){Eo.lFrame.currentNamespace=`svg`}function hs(){gs()}function gs(){Eo.lFrame.currentNamespace=null}function _s(){return Eo.lFrame.currentNamespace}var vs=!0;function ys(){return vs}function bs(e){vs=e}function xs(e,t=null,n=null,r){let i=Ss(e,t,n,r);return i.resolveInjectorInitializers(),i}function Ss(e,t=null,n=null,r,i=new Set){return new Na([n||fa,_a(e)],t||ja(),null,i)}var Cs=class e{static THROW_IF_NOT_FOUND=Wi;static NULL=new ga;static create(e,t){if(Array.isArray(e))return xs({name:``},t,e,``);{let t=e.name??``;return xs({name:t},e.parent,e.providers,t)}}static ɵprov=fi({token:e,providedIn:`any`,factory:()=>Ji(ma)});static __NG_ELEMENT_ID__=-1},ws=new yi(``),Ts=class{static __NG_ELEMENT_ID__=Ds;static __NG_ENV_ID__=e=>e},Es=class extends Ts{_lView;constructor(e){super(),this._lView=e}get destroyed(){return eo(this._lView)}onDestroy(e){let t=this._lView;return bo(t,e),()=>xo(t,e)}};function Ds(){return new Es(E())}var Os=new yi(``),ks=(()=>{class e{taskId=0;pendingTasks=new Set;destroyed=!1;pendingTask=new ei(!1);debugTaskTracker=T(Os,{optional:!0});get hasPendingTasks(){return!this.destroyed&&this.pendingTask.value}get hasPendingTasksObservable(){return this.destroyed?new Ur(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=fi({token:e,providedIn:`root`,factory:()=>new e})}return e})(),As=class extends Qr{__isAsync;destroyRef=void 0;pendingTasks=void 0;constructor(e=!1){super(),this.__isAsync=e,Ga()&&(this.destroyRef=T(Ts,{optional:!0})??void 0,this.pendingTasks=T(ks,{optional:!0})??void 0)}emit(e){let t=C(null);try{super.next(e)}finally{C(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 gr&&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 js(...e){}function Ms(e){let t,n;function r(){e=js;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 Ns(e){return queueMicrotask(()=>e()),()=>{e=js}}var Ps=`isAngularZone`,Fs=`isAngularZone_ID`,Is=0,Ls=class e{hasPendingMacrotasks=!1;hasPendingMicrotasks=!1;isStable=!0;onUnstable=new As(!1);onMicrotaskEmpty=new As(!1);onStable=new As(!1);onError=new As(!1);constructor(e){let{enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:n=!1,shouldCoalesceRunChangeDetection:r=!1,scheduleInRootZone:i=!1}=e;if(typeof Zone>`u`)throw new w(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,Vs(a)}static isInAngularZone(){return typeof Zone<`u`&&Zone.current.get(Ps)===!0}static assertInAngularZone(){if(!e.isInAngularZone())throw new w(909,!1)}static assertNotInAngularZone(){if(e.isInAngularZone())throw new w(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,Rs,js,js);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)}},Rs={};function zs(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 Bs(e){if(e.isCheckStableRunning||e.callbackScheduled)return;e.callbackScheduled=!0;function t(){Ms(()=>{e.callbackScheduled=!1,Hs(e),e.isCheckStableRunning=!0,zs(e),e.isCheckStableRunning=!1})}e.scheduleInRootZone?Zone.root.run(()=>{t()}):e._outer.run(()=>{t()}),Hs(e)}function Vs(e){let t=()=>{Bs(e)},n=Is++;e._inner=e._inner.fork({name:`angular`,properties:{[Ps]:!0,[Fs]:n,[Fs+n]:!0},onInvokeTask:(n,r,i,a,o,s)=>{if(Ks(s))return n.invokeTask(i,a,o,s);try{return Us(e),n.invokeTask(i,a,o,s)}finally{(e.shouldCoalesceEventChangeDetection&&a.type===`eventTask`||e.shouldCoalesceRunChangeDetection)&&t(),Ws(e)}},onInvoke:(n,r,i,a,o,s,c)=>{try{return Us(e),n.invoke(i,a,o,s,c)}finally{e.shouldCoalesceRunChangeDetection&&!e.callbackScheduled&&!qs(s)&&t(),Ws(e)}},onHasTask:(t,n,r,i)=>{t.hasTask(r,i),n===r&&(i.change==`microTask`?(e._hasPendingMicrotasks=i.microTask,Hs(e),zs(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 Hs(e){e.hasPendingMicrotasks=!!(e._hasPendingMicrotasks||(e.shouldCoalesceEventChangeDetection||e.shouldCoalesceRunChangeDetection)&&e.callbackScheduled===!0)}function Us(e){e._nesting++,e.isStable&&(e.isStable=!1,e.onUnstable.emit(null))}function Ws(e){e._nesting--,zs(e)}var Gs=class{hasPendingMicrotasks=!1;hasPendingMacrotasks=!1;isStable=!0;onUnstable=new As;onMicrotaskEmpty=new As;onStable=new As;onError=new As;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 Ks(e){return Js(e,`__ignore_ng_zone__`)}function qs(e){return Js(e,`__scheduler_tick__`)}function Js(e,t){return!Array.isArray(e)||e.length!==1?!1:e[0]?.data?.[t]===!0}var Ys=class{_console=console;handleError(e){this._console.error(`ERROR`,e)}},Xs=new yi(``,{factory:()=>{let e=T(Ls),t=T(Ma),n;return r=>{e.runOutsideAngular(()=>{t.destroyed&&!n?setTimeout(()=>{throw r}):(n??=t.get(Ys),n.handleError(r))})}}}),Zs={provide:pa,useValue:()=>{T(Ys,{optional:!0})},multi:!0};function A(e,t){let[n,r,i]=Un(e,t?.equal),a=n;return a[fn],a.set=r,a.update=i,a.asReadonly=Qs.bind(a),a}function Qs(){let e=this[fn];if(e.readonlyFn===void 0){let t=()=>this();t[fn]=e,e.readonlyFn=t}return e.readonlyFn}var $s=new yi(``,{factory:()=>ec}),ec=`ng`,tc=new yi(``),nc=new yi(``,{providedIn:`platform`,factory:()=>`unknown`}),rc=new yi(``,{factory:()=>T(ws).body?.querySelector(`[ngCspNonce]`)?.getAttribute(`ngCspNonce`)||null}),ic=(()=>{class e{view;node;constructor(e,t){this.view=e,this.node=t}static __NG_ELEMENT_ID__=ac}return e})();function ac(){return new ic(E(),Io())}var oc=class{},sc=new yi(``,{factory:()=>!0}),cc=new yi(``),lc=(()=>{class e{static ɵprov=fi({token:e,providedIn:`root`,factory:()=>new uc})}return e})(),uc=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}},dc=class{[fn];constructor(e){this[fn]=e}destroy(){this[fn].destroy()}};function fc(e,t){let n=t?.injector??T(Cs),r=t?.manualCleanup===!0?null:n.get(Ts),i,a=n.get(ic,null,{optional:!0}),o=n.get(oc);return a===null?i=_c(e,n.get(lc),o):(i=gc(a.view,o,e),r instanceof Es&&r._lView===a.view&&(r=null)),i.injector=n,r!==null&&(i.onDestroyFns=[r.onDestroy(()=>i.destroy())]),new dc(i)}var pc={...Yn,cleanupFns:void 0,zone:null,onDestroyFns:null,run(){let e=Wo(!1);try{Xn(this)}finally{Wo(e)}},cleanup(){if(!this.cleanupFns?.length)return;let e=C(null);try{for(;this.cleanupFns.length;)this.cleanupFns.pop()()}finally{this.cleanupFns=[],C(e)}}},mc={...pc,consumerMarkedDirty(){this.scheduler.schedule(this),this.notifier.notify(12)},destroy(){if(Dn(this),this.onDestroyFns!==null)for(let e of this.onDestroyFns)e();this.cleanup(),this.scheduler.remove(this)}},hc={...pc,consumerMarkedDirty(){this.view[2]|=8192,yo(this.view),this.notifier.notify(13)},destroy(){if(Dn(this),this.onDestroyFns!==null)for(let e of this.onDestroyFns)e();this.cleanup(),this.view[23]?.delete(this)}};function gc(e,t,n){let r=Object.create(hc);return r.view=e,r.zone=typeof Zone<`u`?Zone.current:null,r.notifier=t,r.fn=vc(r,n),e[23]??=new Set,e[23].add(r),r.consumerMarkedDirty(r),r}function _c(e,t,n){let r=Object.create(mc);return r.fn=vc(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 vc(e,t){return()=>{t(t=>(e.cleanupFns??=[]).push(t))}}function yc(e){return typeof e==`function`&&e[fn]!==void 0}function bc(e){return yc(e)&&typeof e.set==`function`}var xc=Symbol(`InputSignalNode#UNSET`),Sc={...qn,transformFn:void 0,applyValueToInputSignal(e,t){Gn(e,t)}};function Cc(e){return{toString:e}.toString()}var wc=(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})(wc||{}),Tc=class{previousValue;currentValue;firstChange;constructor(e,t,n){this.previousValue=e,this.currentValue=t,this.firstChange=n}isFirstChange(){return this.firstChange}};function Ec(e,t,n,r){t===null?e[n]=r:t.applyValueToInputSignal(t,r)}var Dc=null,Oc=(()=>{Dc=Ac;let e=()=>Ac;return e.ngInherit=!0,e})();function kc(){return Dc}function Ac(e){return e.type.prototype.ngOnChanges&&(e.setInput=Mc),jc}function jc(){let e=Pc(this),t=e?.current;if(t){let n=e.previous;if(n===da)e.previous=t;else for(let e in t)n[e]=t[e];e.current=null,this.ngOnChanges(t)}}function Mc(e,t,n,r,i){let a=this.declaredInputs[r],o=Pc(e)||Fc(e,{previous:da,current:null}),s=o.current||={},c=o.previous,l=c[a];s[a]=new Tc(l&&l.currentValue,n,c===da),Ec(e,t,i,n)}var Nc=`__ngSimpleChanges__`;function Pc(e){return Object.hasOwn(e,Nc)&&e[Nc]||null}function Fc(e,t){return e[Nc]=t}var Ic=[],Lc=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,Wc(o,a)):Wc(o,a)}var Kc=-1,qc=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 Jc(e){return!!(e.flags&8)}function Yc(e){return!!(e.flags&16)}function Xc(e,t,n){let r=0;for(;rt){o=a-1;break}}}for(;a>16}function il(e,t){let n=rl(e),r=t;for(;n>0;)r=r[14],n--;return r}var al=!0;function ol(e){let t=al;return al=e,t}var sl=255,cl=5,ll=0,ul={};function dl(e,t,n){let r;typeof n==`string`?r=n.charCodeAt(0)||0:Object.hasOwn(n,Ti)&&(r=n[Ti]),r??=n[Ti]=ll++;let i=r&sl,a=1<>cl)]|=a}function fl(e,t){let n=ml(e,t);if(n!==-1)return n;let r=t[1];r.firstCreatePass&&(e.injectorIndex=t.length,pl(r.data,e),pl(t,null),pl(r.blueprint,null));let i=hl(e,t),a=e.injectorIndex;if(tl(i)){let e=nl(i),n=il(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 pl(e,t){e.push(0,0,0,0,0,0,0,0,t)}function ml(e,t){return e.injectorIndex===-1||e.parent&&e.parent.injectorIndex===e.injectorIndex||t[e.injectorIndex+8]===null?-1:e.injectorIndex}function hl(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=Al(i),r===null)return Kc;if(n++,i=i[14],r.injectorIndex!==-1)return r.injectorIndex|n<<16}return Kc}function gl(e,t,n){dl(e,t,n)}function _l(e,t,n){if(n&8||e!==void 0)return e;Ii(t,`NodeInjector`)}function vl(e,t,n,r){if(n&8&&r===void 0&&(r=null),!(n&3)){let i=e[9],a=Vi(void 0);try{return i?i.get(t,r,n&8):Hi(t,r,n&8)}finally{Vi(a)}}return _l(r,t,n)}function yl(e,t,n,r=0,i){if(e!==null){if(t[2]&2048&&!(r&2)){let i=kl(e,t,n,r,ul);if(i!==ul)return i}let i=bl(e,t,n,r,ul);if(i!==ul)return i}return vl(t,n,r,i)}function bl(e,t,n,r,i){let a=wl(n);if(typeof a==`function`){if(!is(t,e,r))return r&1?_l(i,n,r):vl(t,n,r,i);try{let e;if(e=a(r),e==null&&!(r&8))Ii(n);else return e}finally{ls()}}else if(typeof a==`number`){let i=null,o=ml(e,t),s=Kc,c=r&1?t[15][5]:null;for((o===-1||r&4)&&(s=o===-1?hl(e,t):t[o+8],s===Kc||!El(r,!1)?o=-1:(i=t[1],o=nl(s),t=il(s,t)));o!==-1;){let e=t[1];if(Tl(a,o,e.data)){let e=xl(o,t,n,i,r,c);if(e!==ul)return e}s=t[o+8],s!==Kc&&El(r,t[1].data[o+8]===c)&&Tl(a,o,t)?(i=e,o=nl(s),t=il(s,t)):o=-1}}return i}function xl(e,t,n,r,i,a){let o=t[1],s=o.data[e+8],c=Sl(s,o,n,r==null?Xa(s)&&al:r!=o&&!!(s.type&3),i&1&&a===s);return c===null?ul:Cl(t,o,c,s,i)}function Sl(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&&Qa(e)&&e.type===n)return c}return null}function Cl(e,t,n,r,i){let a=e[n],o=t.data;if(a instanceof qc){let s=a;if(s.resolving)throw Fi(``);let c=ol(s.canSeeViewProviders);s.resolving=!0,o[n].type||o[n];let l=s.injectImpl?Vi(s.injectImpl):null;is(e,r,0);try{a=e[n]=s.factory(void 0,i,o,e,r),t.firstCreatePass&&n>=r.directiveStart&&Rc(n,o[n],t)}finally{l!==null&&Vi(l),ol(c),s.resolving=!1,ls()}}return a}function wl(e){if(typeof e==`string`)return e.charCodeAt(0)||0;let t=Object.hasOwn(e,Ti)?e[Ti]:void 0;return typeof t==`number`?t>=0?t&sl:Ol:t}function Tl(e,t,n){let r=1<>cl)]&r)}function El(e,t){return!(e&2)&&!(e&1&&t)}var Dl=class{_tNode;_lView;constructor(e,t){this._tNode=e,this._lView=t}get(e,t,n){return yl(this._tNode,this._lView,e,Yi(n),t)}};function Ol(){return new Dl(Io(),E())}function kl(e,t,n,r,i){let a=e,o=t;for(;a!==null&&o!==null&&o[2]&2048&&!$a(o);){let e=bl(a,o,n,r|2,ul);if(e!==ul)return e;r&=-5;let t=a.parent;if(!t){let e=o[20];if(e){let t=e.get(n,ul,r);if(t!==ul)return t}t=Al(o),o=o[14]}a=t}return i}function Al(e){let t=e[1],n=t.type;return n===2?t.declTNode:n===1?e[5]:null}function jl(e){return{token:e.token,providedIn:e.autoProvided===!1?null:`root`,factory:e.factory,value:void 0}}function Ml(){return Nl(Io(),E())}function Nl(e,t){return new Pl(ao(e,t))}var Pl=(()=>{class e{nativeElement;constructor(e){this.nativeElement=e}static __NG_ELEMENT_ID__=Ml}return e})();function Fl(e){return e instanceof Pl?e.nativeElement:e}function Il(){return this._results[Symbol.iterator]()}var Ll=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 Qr}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=ta(e);(this._changesDetected=!ea(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]=Il};function Rl(e){return(e.flags&128)==128}var zl=(function(e){return e[e.OnPush=0]=`OnPush`,e[e.Eager=1]=`Eager`,e[e.Default=1]=`Default`,e})(zl||{}),Bl=new Map,Vl=0;function Hl(){return Vl++}function Ul(e){Bl.set(e[19],e)}function Wl(e){Bl.delete(e[19])}var Gl=`__ngContext__`;function Kl(e,t){qa(t)?(e[Gl]=t[19],Ul(t)):e[Gl]=t}function ql(e){return Yl(e[12])}function Jl(e){return Yl(e[4])}function Yl(e){for(;e!==null&&!Ja(e);)e=e[4];return e}var Xl=void 0;function Zl(e){Xl=e}function Ql(){if(Xl!==void 0)return Xl;if(typeof document<`u`)return document;throw new w(210,!1)}var $l=!1,eu=new yi(``,{factory:()=>$l}),tu=new WeakMap;function nu(e,t){if(typeof e!=`object`||!e)return;let n=tu.get(e);n||(n=new WeakSet,tu.set(e,n)),n.add(t)}function ru(e){return(e.flags&32)==32}var iu=()=>null;function au(e,t,n=!1){return iu(e,t,n)}function ou(e,t){let n=e.contentQueries;if(n!==null){let r=C(null);try{for(let r=0;r|^->||--!>|)/g,vu=`​$1​`;function yu(e){return e.replace(gu,e=>e.replace(_u,vu))}function bu(e,t){return e.createText(t)}function xu(e,t,n){e.setValue(t,n)}function Su(e,t){return e.createComment(yu(t))}function Cu(e,t,n){return e.createElement(t,n)}function wu(e,t,n,r,i){e.insertBefore(t,n,r,i)}function Tu(e,t,n){e.appendChild(t,n)}function Eu(e,t,n,r,i){r===null?Tu(e,t,n):wu(e,t,n,r,i)}function Du(e,t,n,r){e.removeChild(null,t,n,r)}function Ou(e,t,n){e.setAttribute(t,`style`,n)}function ku(e,t,n){n===``?e.removeAttribute(t,`class`):e.setAttribute(t,`class`,n)}function Au(e,t,n){let{mergedAttrs:r,classes:i,styles:a}=n;r!==null&&Xc(e,t,r),i!==null&&ku(e,t,i),a!==null&&Ou(e,t,a)}function ju(e){let t=Mu();return t?t.sanitize(to.URL,e)||``:fu(e,`URL`)?du(e):hu(ji(e))}function Mu(){let e=E();return e&&e[10].sanitizer}function Nu(e){return e.ownerDocument.defaultView}function Pu(e){return e.ownerDocument}function Fu(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 Iu=`ng-template`;function Lu(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(Vu(r))return!1;o=!0}}}}}return Vu(r)||o}function Vu(e){return!(e&1)}function Hu(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!==``&&!Vu(o)&&(t+=Ju(a,i),i=``),r=o,a||=!Vu(r);n++}return i!==``&&(t+=Ju(a,i)),t}function Xu(e){return e.map(Yu).join(`,`)}function Zu(e){let t=[],n=[],r=1,i=2;for(;r!1});function rd(e){if(!e)return 0;let t=e.toLowerCase().indexOf(`ms`)>-1?1:1e3;return parseFloat(e)*t}function id(e,t){return e.getPropertyValue(t).split(`,`).map(e=>e.trim())}function ad(e){let t=id(e,`transition-property`),n=id(e,`transition-duration`),r=id(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 od(e){let t=id(e,`animation-name`),n=id(e,`animation-delay`),r=id(e,`animation-duration`),i=id(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 sd(e,t){return e!==void 0&&e.duration>t.duration}function cd(e){return(e.animationName!=null||e.propertyName!=null)&&e.duration>0}function ld(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 ud(e,t){let n=getComputedStyle(e),r=od(n),i=ad(n),a=r.duration>i.duration?r:i;sd(t.get(e),a)||cd(a)&&t.set(e,a)}function dd(e,t,n){if(!n)return;let r=e.getAnimations();return r.length===0?ud(e,t):fd(e,t,r)}function fd(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=ld(e)??0,n,i;e.animationName?i=e.animationName:n=e.transitionProperty,t>=r.duration&&(r={animationName:i,propertyName:n,duration:t})}sd(t.get(e),r)||cd(r)&&t.set(e,r)}var pd=new Set,md=!1,hd=1,gd=typeof document<`u`&&typeof document?.documentElement?.getAnimations==`function`;function _d(e){return e[9].get(nd,md)}function vd(e,t,n){let r=bd.get(e);if(r){for(let e of t)r.classList.push(e);for(let e of n)r.cleanupFns.push(e)}else bd.set(e,{classList:t,cleanupFns:n})}function yd(e){let t=bd.get(e);if(t){for(let e of t.cleanupFns)e();bd.delete(e)}xd.delete(e)}var bd=new WeakMap,xd=new WeakMap,Sd=new WeakMap;function Cd(e){return e?e[14]??e:null}var wd=new WeakSet;function Td(e,t,n){let r=Sd.get(e);if(!r||r.length===0)return;let i=t.parentNode,a=t.previousSibling,o=Cd(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),wd.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 Ed(e,t,n){let r=Cd(n),i=Sd.get(e);i?i.some(e=>e.el===t)||i.push({el:t,declarationView:r}):Sd.set(e,[{el:t,declarationView:r}])}function Dd(e){let t=e[26]??={};return t.enter??=new Map}function Od(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 kd(e){return e.composedPath?e.composedPath()[0]:e.target}function Ad(e,t){let n=xd.get(t);if(n===void 0)return!0;if(t!==kd(e))return!1;let r=e.animation;if(r){let e=ld(r);if(e!==void 0&&e+hd{class e{impl=null;execute(){this.impl?.execute()}static ɵprov=fi({token:e,providedIn:`root`,factory:()=>new e})}return e})(),Ld=[0,1,2,3],Rd=(()=>{class e{ngZone=T(Ls);scheduler=T(oc);errorHandler=T(Ys,{optional:!0});sequences=new Set;deferredRegistrations=new Set;executing=!1;constructor(){T(Nd,{optional:!0})}execute(){let e=this.sequences.size>0;e&&Lc(wc.AfterRenderHooksStart),this.executing=!0;for(let e of Ld)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&&Lc(wc.AfterRenderHooksEnd)}register(e){let{view:t}=e;t===void 0?this.executing?this.deferredRegistrations.add(e):this.addSequence(e):((t[25]??=[]).push(e),yo(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(Md.AFTER_NEXT_RENDER,e):e()}static ɵprov=fi({token:e,providedIn:`root`,factory:()=>new e})}return e})(),zd=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 Bd(e,t){let n=t?.injector??T(Cs);return Fd(`NgAfterNextRender`),Hd(e,n,t,!0)}function Vd(e){return e instanceof Function?[void 0,void 0,e,void 0]:[e.earlyRead,e.write,e.mixedReadWrite,e.read]}function Hd(e,t,n,r){let i=t.get(Id);i.impl??=t.get(Rd);let a=t.get(Nd,null,{optional:!0}),o=n?.manualCleanup===!0?null:t.get(Ts),s=t.get(ic,null,{optional:!0}),c=new zd(i.impl,Vd(e),s?.view,r,o,a?.snapshot(null));return i.impl.register(c),c}var Ud=new yi(``,{factory:()=>{let e=T(Ma),t=new Set;return e.onDestroy(()=>t.clear()),{queue:t,isScheduled:!1,scheduler:null,injector:e}}});function Wd(e,t,n){let r=e.get(Ud);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 Gd(e,t){let n=e.get(Ud);if(Array.isArray(t))for(let e of t)n.queue.delete(e);else n.queue.delete(t)}function Kd(e,t){let n=e.get(Ud);if(t.detachedLeaveAnimationFns){for(let e of t.detachedLeaveAnimationFns)n.queue.delete(e);t.detachedLeaveAnimationFns=void 0}}function qd(e){let t=e.get(Ud);t.isScheduled||=(Bd(()=>{t.isScheduled=!1;for(let e of t.queue)e();t.queue.clear()},{injector:t.injector}),!0)}function Jd(e){let t=e.get(Ud);t.scheduler=qd,t.scheduler(e)}function Yd(e,t){for(let[n,r]of t)Wd(e,r.animateFns)}function Xd(e,t,n,r){let i=e?.[26]?.enter;t!==null&&i&&i.has(n.index)&&Yd(r,i)}function Zd(e,t,n,r){try{n.get(ma)}catch{return r(!1)}let i=e?.[26];i?.enter?.has(t.index)&&Gd(n,i.enter.get(t.index).animateFns);let a=Qd(e,t,i);if(a.size===0){let n=!1;if(e){let r=[];ef(e,t,r),n=r.length>0}if(!n)return r(!1)}e&&pd.add(e[19]),Wd(n,()=>$d(e,t,i||void 0,a,r),i||void 0)}function Qd(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 $d(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&&ef(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),nf(e,t.running,i)}else Promise.allSettled(a).then(()=>{e&&pd.delete(e[19]),i(!0)})}else e&&pd.delete(e[19]),i(!1)}function ef(e,t,n){if(t.type&12){let r=e[t.index];if(Ja(r))for(let e=10;e{e[26]?.running===t&&(e[26].running=void 0,pd.delete(e[19])),n(!0)})}function rf(e,t,n,r,i,a,o,s){if(i!=null){let c,l=!1;Ja(i)?c=i:qa(i)&&(l=!0,i=i[0]);let u=ro(i);e===0&&r!==null?(Xd(s,r,a,n),o==null?Tu(t,r,u):wu(t,r,u,o||null,!0)):e===1&&r!==null?(Xd(s,r,a,n),wu(t,r,u,o||null,!0),Td(a,u,s)):e===2?(s?.[26]?.leave?.has(a.index)&&Ed(a,u,s),wd.delete(u),Zd(s,a,n,e=>{if(wd.has(u)){wd.delete(u);return}Du(t,u,l,e)})):e===3&&(wd.delete(u),Zd(s,a,n,()=>{t.destroyNode(u)})),c!=null&&Of(t,e,n,c,a,r,o)}}function af(e,t){sf(e,t),t[0]=null,t[5]=null}function of(e,t,n,r,i,a){r[0]=i,r[5]=t,wf(e,r,n,1,i,a)}function sf(e,t){t[10].changeDetectionScheduler?.notify(9),wf(e,t,t[11],2,null,null)}function cf(e){let t=e[12];if(!t)return df(e[1],e);for(;t;){let n=null;if(qa(t))n=t[12];else{let e=t[10];e&&(n=e)}if(!n){for(;t&&!t[4]&&t!==e;)qa(t)&&df(t[1],t),t=t[3];t===null&&(t=e),qa(t)&&df(t[1],t),n=t&&t[4]}t=n}}function lf(e,t){let n=e[9],r=n.indexOf(t);n.splice(r,1)}function uf(e,t){if(eo(t))return;let n=t[11];n.destroyNode&&wf(e,t,n,3,null,null),cf(t)}function df(e,t){if(eo(t))return;let n=C(null);try{t[2]&=-129,t[2]|=256,t[24]&&Dn(t[24]),pf(e,t),ff(e,t),t[1].type===1&&t[11].destroy();let n=t[16];if(n!==null&&Ja(t[3])){n!==t[3]&&lf(n,t);let r=t[18];r!==null&&r.detachView(e)}Wl(t)}finally{C(n)}}function ff(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&&Rf(e,t,27,!1),Lc(o?wc.TemplateUpdateStart:wc.TemplateCreateStart,i,n),n(r,i)}finally{ps(a),Lc(o?wc.TemplateUpdateEnd:wc.TemplateCreateEnd,i,n)}}function Hf(e,t,n){Yf(e,t,n),(n.flags&64)==64&&Xf(e,t,n)}function Uf(e,t,n=ao){let r=t.localNames;if(r!==null){let i=t.index+1;for(let a=0;a{yo(e.lView)},consumerOnSignalRead(){this.lView[24]=this}};function bp(e){let t=e[24]??Object.create(xp);return t.lView=e,t}var xp={...mn,consumerIsAlwaysLive:!0,kind:`template`,consumerMarkedDirty:e=>{let t=So(e.lView);for(;t&&!Sp(t[1]);)t=So(t);t&&ho(t)},consumerOnSignalRead(){this.lView[24]=this}};function Sp(e){return e.type!==2}function Cp(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 wp=100;function Tp(e,t=0){let n=e[10].rendererFactory;n.begin?.();try{Ep(e,t)}finally{n.end?.()}}function Ep(e,t){let n=Uo();try{Wo(!0),Mp(e,t);let n=0;for(;_o(e);){if(n===wp)throw new w(103,!1);n++,Mp(e,1)}}finally{Wo(n)}}function Dp(e,t,n,r){if(eo(t))return;let i=t[2];as(t);let a=!0,o=null,s=null;Sp(e)?(s=gp(t),o=Sn(s)):pn()===null?(a=!1,s=bp(t),o=Sn(s)):t[24]&&=(Dn(t[24]),null);try{mo(t),qo(e.bindingStartIndex),n!==null&&Vf(e,t,n,2,r);let a=(i&3)==3;if(a){let n=e.preOrderCheckHooks;n!==null&&Bc(t,n,null)}else{let n=e.preOrderHooks;n!==null&&Vc(t,n,0,null),Hc(t,0)}if(kp(t),Cp(t),Op(t,0),e.contentQueries!==null&&ou(e,t),a){let n=e.contentCheckHooks;n!==null&&Bc(t,n)}else{let n=e.contentHooks;n!==null&&Vc(t,n,1),Hc(t,1)}Pp(e,t);let o=e.components;o!==null&&Np(t,o,0);let s=e.viewQuery;if(s!==null&&su(2,s,r),a){let n=e.viewCheckHooks;n!==null&&Bc(t,n)}else{let n=e.viewHooks;n!==null&&Vc(t,n,2),Hc(t,2)}if(e.firstUpdatePass===!0&&(e.firstUpdatePass=!1),t[22]){for(let e of t[22])e();t[22]=null}mp(t),t[2]&=-73}catch(e){throw yo(t),e}finally{s!==null&&(wn(s,o),a&&vp(s)),us()}}function Op(e,t){for(let n=ql(e);n!==null;n=Jl(n))for(let e=10;e0&&(e[n-1][4]=r[4]);let a=ia(e,10+t);af(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 Vp(e,t,n,r){let i=10+r,a=n.length;r>0&&(n[i-1][4]=t),r-1&&(Bp(e,n),ia(t,n))}this._attachedToViewContainer=!1}uf(this._lView[1],this._lView)}onDestroy(e){bo(this._lView,e)}markForCheck(){Fp(this._cdRefInjectingView||this._lView,4)}detach(){this._lView[2]&=-129}reattach(){vo(this._lView),this._lView[2]|=128}detectChanges(){this._lView[2]|=1024,Tp(this._lView)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new w(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;let e=$a(this._lView),t=this._lView[16];t!==null&&!e&&lf(t,this._lView),sf(this._lView[1],this._lView)}attachToAppRef(e){if(this._attachedToViewContainer)throw new w(902,!1);this._appRef=e;let t=$a(this._lView),n=this._lView[16];n!==null&&!t&&Hp(n,this._lView),vo(this._lView)}},Wp=(()=>{class e{_declarationLView;_declarationTContainer;elementRef;static __NG_ELEMENT_ID__=Gp;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 Up(up(this._declarationLView,this._declarationTContainer,e,{embeddedViewInjector:t,dehydratedView:n}))}}return e})();function Gp(){return Kp(Io(),E())}function Kp(e,t){return e.type&4?new Wp(t,e,Nl(e,t)):null}function qp(e,t,n,r,i){let a=e.data[t];if(a===null)a=Jp(e,t,n,r,i),Xo()&&(a.flags|=32);else if(a.type&64){a.type=n,a.value=r,a.attrs=i;let e=Ro();a.injectorIndex=e===null?-1:e.injectorIndex}return zo(a,!0),a}function Jp(e,t,n,r,i){let a=Lo(),o=Bo(),s=o?a:a&&a.parent,c=e.data[t]=Xp(e,s,n,t,r,i);return Yp(e,c,a,o),c}function Yp(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 Xp(e,t,n,r,i,a){let o=t?t.injectorIndex:-1,s=0;return Mo()&&(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:_s(),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 Zp(e){let t=e[6]??[],n=e[3][11],r=[];for(let e of t)e.data.di===void 0?Qp(e,n):r.push(e);e[6]=r}function Qp(e,t){let n=0,r=e.firstChild;if(r){let i=e.data.r;for(;nnull,em=()=>null;function tm(e,t){return $p(e,t)}function nm(e,t,n){return em(e,t,n)}var rm=class{},im=class{},am=(()=>{class e{static ɵprov=fi({token:e,providedIn:`root`,factory:()=>null})}return e})();function om(e){return e.debugInfo?.className||e.type.name||null}var sm={},cm=class{injector;parentInjector;constructor(e,t){this.injector=e,this.parentInjector=t}get(e,t,n){let r=this.injector.get(e,sm,n);return r!==sm||t===sm?r:this.parentInjector.get(e,t,n)}};function lm(e,t,n){return e[t]=n}function um(e,t){return e[t]}function dm(e,t,n){if(n===Qu)return!1;let r=e[t];return!Object.is(r,n)&&(e[t]=n,!0)}function fm(e,t,n,r){let i=dm(e,t,n);return dm(e,t+1,r)||i}function pm(e,t,n,r,i){let a=fm(e,t,n,r);return dm(e,t+2,i)||a}function mm(e,t,n,r,i,a){let o=fm(e,t,n,r);return fm(e,t+2,i,a)||o}function hm(e,t,n){return function r(i){let a=r.__ngNativeEl__;a!==void 0&&nu(i,a),Fp(Xa(e)?lo(e.index,t):t,5);let o=t[8],s=gm(t,o,n,i),c=r.__ngNextListenerFn__;for(;c;)s=gm(t,o,c,i)&&s,c=c.__ngNextListenerFn__;return s}}function gm(e,t,n,r){let i=C(null);try{return Lc(wc.OutputStart,t,n),n(r)!==!1}catch(t){return ip(e,t),!1}finally{Lc(wc.OutputEnd,t,n),C(i)}}function _m(e,t,n,r,i,a,o,s){let c=Za(e),l=!1,u=null;if(!r&&c&&(u=ym(t,n,a,e.index)),u!==null){let e=u.__ngLastListenerFn__||u;e.__ngNextListenerFn__=o,u.__ngLastListenerFn__=o,l=!0}else{let o=ao(e,n),c=r?r(o):o;r||(s.__ngNativeEl__=o);let l=i.listen(c,a,s);vm(a)||bm(r?t=>r(ro(t[e.index])):e.index,t,n,a,s,l,!1)}return l}function vm(e){return e.startsWith(`animation`)||e.startsWith(`transition`)}function ym(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 bm(e,t,n,r,i,a,o){let s=t.firstCreatePass?wo(t):null,c=Co(n),l=c.length;c.push(i,a),s&&s.push(r,e,l,(l+1)*(o?-1:1))}function xm(e,t,n,r,i,a){let o=t[n],s=t[1],c=o[s.data[n].outputs[r]].subscribe(a);bm(e.index,s,t,i,a,c,!0)}var Sm=Symbol(`BINDING`),Cm=new yi(``);function wm(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 Rm(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&zf.SignalBased)!==0};return i&&(a.transform=i),a})}function Km(e){return Object.keys(e).map(t=>({propName:e[t],templateName:t}))}function qm(e,t,n){let r=t instanceof Ma?t:t?.injector;return r&&e.getStandaloneInjector!==null&&(r=e.getStandaloneInjector(r)||r),r?new cm(n,r):n}function Jm(e){let t=e.get(im,null);if(t===null)throw new w(407,!1);return{rendererFactory:t,sanitizer:e.get(am,null),changeDetectionScheduler:e.get(oc,null),ngReflect:!1,tracingService:e.get(Nd,null,{optional:!0})}}function Ym(e,t,n){let r=Zm(e);return Cu(t,r,r===`svg`?`svg`:r===`math`?no:n)}function Xm(e){if((e&&`localName`in e&&typeof e.localName==`string`?e.localName:e?.tagName)?.toLowerCase()===`script`)throw new w(905,!1)}function Zm(e){return(e.selectors[0][0]||`div`).toLowerCase()}var Qm=class{componentDef;ngModule;selector;componentType;ngContentSelectors;isBoundToModule;cachedInputs=null;cachedOutputs=null;get inputs(){return this.cachedInputs??=Gm(this.componentDef.inputs),this.cachedInputs}get outputs(){return this.cachedOutputs??=Km(this.componentDef.outputs),this.cachedOutputs}constructor(e,t){this.componentDef=e,this.ngModule=t,this.componentType=e.type,this.selector=Xu(e.selectors),this.ngContentSelectors=e.ngContentSelectors??[],this.isBoundToModule=!!t}create(e,t,n,r,i,a,o){Lc(wc.DynamicComponentStart);let s=C(null);try{let s=this.componentDef,c=qm(s,r||this.ngModule,e),l=Jm(c),u=l.tracingService;return u&&u.componentCreate?u.componentCreate(om(s),()=>this.createComponentRef(l,c,t,n,i,a,o)):this.createComponentRef(l,c,t,n,i,a,o)}finally{C(s)}}createComponentRef(e,t,n,r,i,a,o){let s=this.componentDef,c=$m(r,s,a,i),l=e.rendererFactory.createRenderer(null,s),u=r?Wf(l,r,s.encapsulation,t):Ym(s,l,o??null);Xm(u);let d=t.get(Cm,null),f=eh(u,()=>t.get(ws,null)??Ql());d&&d.addHost(f);let p=a?.some(nh)||i?.some(e=>typeof e!=`function`&&e.bindings.some(nh)),m=Nf(null,c,null,512|Ff(s),null,null,e,l,t,null,au(u,t,!0));d&&Um&&f instanceof ShadowRoot&&bo(m,()=>{d.removeHost(f)}),m[27]=u,as(m);let h=null;try{let e=Bm(27,m,2,`#host`,()=>c.directiveRegistry,!0,0);Au(l,u,e),Kl(u,m),Hf(c,m,e),cu(c,e,m),Vm(c,e),n!==void 0&&ih(e,this.ngContentSelectors,n),h=lo(e.index,m),m[8]=h[8],cp(c,m,null)}catch(e){throw h!==null&&Wl(h),Wl(m),e}finally{Lc(wc.DynamicComponentEnd),us()}return new rh(this.componentType,m,!!p)}};function $m(e,t,n,r){let i=e?[`ng-version`,`22.1.7`]:Zu(t.selectors[0]),a=null,o=null,s=0;if(n)for(let e of n)s+=e[Sm].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 nh(e){let t=e[Sm].kind;return t===`input`||t===`twoWay`}var rh=class extends rm{_rootLView;_hasInputBindings;instance;hostView;changeDetectorRef;componentType;location;previousInputValues=null;_tNode;constructor(e,t,n){super(),this._rootLView=t,this._hasInputBindings=n,this._tNode=oo(t[1],27),this.location=Nl(this._tNode,t),this.instance=lo(this._tNode.index,t)[8],this.hostView=this.changeDetectorRef=new Up(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;ap(n,r[1],r,e,t),this.previousInputValues.set(e,t),Fp(lo(n.index,r),1)}get injector(){return new Dl(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(e){this.hostView.onDestroy(e)}};function ih(e,t,n){let r=e.projection=[];for(let e=0;e{class e{static __NG_ELEMENT_ID__=oh}return e})();function oh(){return uh(Io(),E())}var sh=class e extends ah{_lContainer;_hostTNode;_hostLView;constructor(e,t,n){super(),this._lContainer=e,this._hostTNode=t,this._hostLView=n}get element(){return Nl(this._hostTNode,this._hostLView)}get injector(){return new Dl(this._hostTNode,this._hostLView)}get parentInjector(){let e=hl(this._hostTNode,this._hostLView);if(tl(e)){let t=il(e,this._hostLView),n=nl(e),r=t[1].data[n+8];return new Dl(r,t)}return new Dl(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(e){let t=ch(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=tm(this._lContainer,e.ssrId),o=e.createEmbeddedViewImpl(t||{},i,a);return this.insertImpl(o,r,dp(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 Qm(Di(e)),u=n||this.parentInjector;if(!i&&l.ngModule==null){let e=this.parentInjector.get(Ma,null);e&&(i=e)}let d=Di(l.componentType??{}),f=tm(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,dp(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(fo(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 Rp(o,i,a,r),t.attachToViewContainerRef(),ra(lh(o),a,t),t}move(e,t){return this.insert(e,t)}indexOf(e){let t=ch(this._lContainer);return t===null?-1:t.indexOf(e)}remove(e){let t=this._adjustIndex(e,-1),n=Bp(this._lContainer,t);n&&(ia(lh(this._lContainer),t),uf(n[1],n))}detach(e){let t=this._adjustIndex(e,-1),n=Bp(this._lContainer,t);return n&&ia(lh(this._lContainer),t)!=null?new Up(n):null}_adjustIndex(e,t=0){return e??this.length+t}};function ch(e){return e[8]}function lh(e){return e[8]||=[]}function uh(e,t){let n,r=t[e.index];return Ja(r)?n=r:(n=Ip(r,t,null,e),t[e.index]=n,Lf(t,n)),fh(n,t,e,r),new sh(n,e,t)}function dh(e,t){let n=e[11],r=n.createComment(``),i=ao(t,e);return wu(n,n.parentNode(i),r,n.nextSibling(i),!1),r}var fh=hh,ph=()=>!1;function mh(e,t,n){return ph(e,t,n)}function hh(e,t,n,r){if(e[7])return;let i;i=n.type&8?ro(r):dh(t,n),e[7]=i}var gh=class e{queryList;matches=null;constructor(e){this.queryList=e}clone(){return new e(this.queryList)}setDirty(){this.queryList.setDirty()}},_h=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 jh(e,t,n){e.queries===null&&(e.queries=new yh),e.queries.track(new bh(t,n))}function Mh(e,t){return e.queries.getByIndex(t)}function Nh(e,t){let n=e[1],r=Mh(n,t);return r.crossesNgTemplate?Eh(n,e,t,[]):Th(n,e,r,t)}function Ph(e,t,n){let r,i=Nn(()=>{r._dirtyCounter();let n=Rh(r,e);if(t&&n===void 0)throw new w(-951,!1);return n});return r=i[fn],r._dirtyCounter=A(0),r._flatValue=void 0,i}function Fh(e){return Ph(!0,!1,e)}function Ih(e){return Ph(!0,!0,e)}function Lh(e,t){let n=e[fn];n._lView=E(),n._queryIndex=t,n._queryList=Dh(n._lView,t),n._queryList.onDirty(()=>n._dirtyCounter.update(e=>e+1))}function Rh(e,t){let n=e._lView,r=e._queryIndex;if(n===void 0||r===void 0||n[2]&4)return t?void 0:fa;let i=Dh(n,r),a=Nh(n,r);return i.reset(a,Fl),t?i.first:i._changesDetected||e._flatValue===void 0?e._flatValue=i.toArray():e._flatValue}function zh(e){return!!e&&typeof e.then==`function`}function Bh(e){return!!e&&typeof e.subscribe==`function`}var Vh=class{},Hh=class extends Vh{injector;instance=null;constructor(e){super();let t=new Na([...e.providers,{provide:Vh,useValue:this}],e.parent||ja(),e.debugName,new Set([`environment`]));this.injector=t,e.runEnvironmentInitializers&&t.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(e){this.injector.onDestroy(e)}};function Uh(e,t,n=null){return new Hh({providers:e,parent:t,debugName:n,runEnvironmentInitializers:!0}).injector}var Wh=(()=>{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=va(!1,e.type),n=t.length>0?Uh([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=fi({token:e,providedIn:`environment`,factory:()=>new e(Ji(Ma))})}return e})();function Gh(e){return Cc(()=>{let t=Zh(e),n={...t,decls:e.decls,vars:e.vars,template:e.template,consts:e.consts||null,ngContentSelectors:e.ngContentSelectors,onPush:e.changeDetection!==zl.Eager,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&e.dependencies||null,getStandaloneInjector:t.standalone?e=>e.get(Wh).getOrCreateStandaloneInjector(n):null,getExternalStyles:null,signals:e.signals??!1,data:e.data||{},encapsulation:e.encapsulation||lu.Emulated,styles:e.styles||fa,_:null,schemas:e.schemas||null,tView:null,id:``};t.standalone&&Fd(`NgStandalone`),Qh(n);let r=e.dependencies;return n.directiveDefs=$h(r,Kh),n.pipeDefs=$h(r,ki),n.id=eg(n),n})}function Kh(e){return Di(e)||Oi(e)}function qh(e,t){if(e==null)return da;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=zf.None,c=null),n[a]=[r,s,c],t[a]=o}return n}function Jh(e){if(e==null)return da;let t={};for(let n in e)Object.hasOwn(e,n)&&(t[e[n]]=n);return t}function Yh(e){return Cc(()=>{let t=Zh(e);return Qh(t),t})}function Xh(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 Zh(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||da,exportAs:e.exportAs||null,standalone:e.standalone??!0,signals:e.signals===!0,selectors:e.selectors||fa,viewQuery:e.viewQuery||null,features:e.features||null,setInput:null,resolveHostDirectives:null,hostDirectives:null,controlDef:null,signalFormsInputPresence:null,inputs:qh(e.inputs,t),outputs:Jh(e.outputs),debugInfo:null}}function Qh(e){e.features?.forEach(t=>t(e))}function $h(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 eg(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 tg=new yi(``),ng=(()=>{class e{resolve;reject;initialized=!1;done=!1;donePromise=new Promise((e,t)=>{this.resolve=e,this.reject=t});appInits=T(tg,{optional:!0})??[];injector=T(Cs);constructor(){}runInitializers(){if(this.initialized)return;let e=[];for(let t of this.appInits){let n=Wa(this.injector,t);if(zh(n))e.push(n);else if(Bh(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=jl({token:e,factory:e.ɵfac})}return e})();function rg(e,t,n,r,i,a,o,s){if(n.firstCreatePass){e.mergedAttrs=$c(e.mergedAttrs,e.attrs);let t=e.tView=Af(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),zo(e,!1);let c=sg(n,t,e,r);ys()&&yf(n,t,c,e),Kl(c,t);let l=Ip(c,t,c,e);t[r+27]=l,Lf(t,l),mh(l,e,t)}function ig(e,t,n,r,i,a,o,s,c,l,u){let d=n+27,f;return t.firstCreatePass?(f=qp(t,d,4,o||null,s||null),jo()&&Em(t,e,f,po(t.consts,l),Qf),zc(t,f)):f=t.data[d],rg(f,e,t,n,r,i,a,c),Za(f)&&Hf(t,e,f),l!=null&&Uf(e,f,u),f}function ag(e,t,n,r,i,a,o,s,c,l,u){let d=n+27,f;if(t.firstCreatePass){if(f=qp(t,d,4,o||null,s||null),l!=null){let e=po(t.consts,l);f.localNames=[];for(let t=0;t{throw new w(600,``)})}var fg=10,pg=(()=>{class e{_runningTick=!1;_destroyed=!1;_destroyListeners=[];_views=[];internalErrorHandler=T(Xs);afterRenderManager=T(Id);zonelessEnabled=T(sc);rootEffectScheduler=T(lc);dirtyFlags=0;tracingSnapshot=null;allTestViews=new Set;autoDetectTestViews=new Set;includeAllTestViews=!1;afterTick=new Qr;get allViews(){return[...(this.includeAllTestViews?this.allTestViews:this.autoDetectTestViews).keys(),...this._views]}get destroyed(){return this._destroyed}componentTypes=[];components=[];internalPendingTask=T(ks);get isStable(){return this.internalPendingTask.hasPendingTasksObservable.pipe(ti(e=>!e))}constructor(){T(Nd,{optional:!0})}whenStable(){let e;return new Promise(t=>{e=this.isStable.subscribe({next:e=>{e&&t()}})}).finally(()=>{e.unsubscribe()})}_injector=T(Ma);_rendererFactory=null;get injector(){return this._injector}bootstrap(e,t){return this.bootstrapImpl(e,t)}bootstrapImpl(e,t,n=Cs.NULL){return this._injector.get(Ls).run(()=>{if(Lc(wc.BootstrapComponentStart),!this._injector.get(ng).done)throw new w(405,``);let r=Di(e),i=this._injector.get(Vh),a=new Qm(r,i);this.componentTypes.push(e);let{hostElement:o,directives:s,bindings:c}=mg(t),l=o||a.selector,u=a.create(n,[],l,i.injector,s,c),d=u.location.nativeElement,f=u.injector.get(lg,null);return f?.registerApplication(d),u.onDestroy(()=>{this.detachView(u.hostView),hg(this.components,u),f?.unregisterApplication(d)}),this._loadComponent(u),Lc(wc.BootstrapComponentEnd,u),u})}tick(){this.zonelessEnabled||(this.dirtyFlags|=1),this._tick()}_tick(){Lc(wc.ChangeDetectionStart),this.tracingSnapshot===null?this.tickImpl():this.tracingSnapshot.run(Md.CHANGE_DETECTION,this.tickImpl)}tickImpl=()=>{if(this._runningTick)throw Lc(wc.ChangeDetectionEnd),new w(101,!1);let e=C(null);try{this._runningTick=!0,this.synchronize()}finally{this._runningTick=!1,this.tracingSnapshot?.dispose(),this.tracingSnapshot=null,C(e),this.afterTick.next(),Lc(wc.ChangeDetectionEnd)}};synchronize(){this._rendererFactory===null&&!this._injector.destroyed&&(this._rendererFactory=this._injector.get(im,null,{optional:!0}));let e=0;for(;this.dirtyFlags!==0&&e++_o(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;hg(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(ug,[]).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),()=>hg(this._destroyListeners,e)}destroy(){if(this._destroyed)throw new w(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=jl({token:e,factory:e.ɵfac})}return e})();function mg(e){return e===void 0||typeof e==`string`||e instanceof Element?{hostElement:e}:e}function hg(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}function M(e,t,n,r){let i=E();return dm(i,Jo(),t)&&(Fo(),$f(ms(),i,e,t,n,r)),M}function gg(e){if(Fd(`NgAnimateEnter`),!gd)return gg;let t=E();if(_d(t))return gg;let n=Io(),r=t[9].get(Ls);return jd(Dd(t),n,()=>_g(t,n,e,r)),Jd(t[9]),Yd(t[9],Dd(t)),gg}function _g(e,t,n,r){let i=ao(t,e),a=e[11],o=Od(n),s=[],c=!1,l=e=>{if(kd(e)!==i)return;let t=e instanceof AnimationEvent?`animationend`:`transitionend`;r.runOutsideAngular(()=>{a.listen(i,t,u)})},u=e=>{kd(e)===i&&(Ad(e,i)&&(c=!0),vg(e,i,a))};if(o&&o.length>0){r.runOutsideAngular(()=>{s.push(a.listen(i,`animationstart`,l)),s.push(a.listen(i,`transitionstart`,l))}),vd(i,o,s);for(let e of o)a.addClass(i,e);r.runOutsideAngular(()=>{requestAnimationFrame(()=>{if(!c&&(dd(i,xd,gd),!xd.has(i))){for(let e of o)a.removeClass(i,e);yd(i)}})})}}function vg(e,t,n){let r=bd.get(t);if(kd(e)===t&&r&&Ad(e,t)){e.stopPropagation();for(let e of r.classList)n.removeClass(t,e);yd(t)}}var yg=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 bg(e,t,n,r,i){return e===n&&Object.is(t,r)?1:Object.is(i(e,t),i(n,r))?-1:0}function xg(e,t,n,r){let i,a,o=0,s=e.length-1;if(Array.isArray(t)){C(r);let c=t.length-1;for(C(null);o<=s&&o<=c;){let r=e.at(o),l=t[o],u=bg(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=bg(s,d,c,f,n);if(p!==0){p<0&&e.updateValue(s,f),s--,c--;continue}let m=n(o,r),h=n(s,d),g=n(o,l);if(Object.is(g,h)){let t=n(c,f);Object.is(t,m)?(e.swap(o,s),e.updateValue(s,f),c--,s--):e.move(s,o),e.updateValue(o,l),o++;continue}if(i??=new Tg,a??=wg(e,o,s,n),Sg(e,i,o,g))e.updateValue(o,l),o++,s++;else if(a.has(g))i.set(m,e.detach(o)),s--;else{let n=e.create(o,t[o]);e.attach(o,n),o++,s++}}for(;o<=c;)Cg(e,i,n,o,t[o]),o++}else if(t!=null){C(r);let c=t[Symbol.iterator]();C(null);let l=c.next();for(;!l.done&&o<=s;){let t=e.at(o),r=l.value,u=bg(o,t,o,r,n);if(u!==0)u<0&&e.updateValue(o,r),o++,l=c.next();else{i??=new Tg,a??=wg(e,o,s,n);let u=n(o,r);if(Sg(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;)Cg(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 Sg(e,t,n,r){return t!==void 0&&t.has(r)?(e.attach(n,t.get(r)),t.delete(r),!0):!1}function Cg(e,t,n,r,i){if(Sg(e,t,r,n(r,i)))e.updateValue(r,i);else{let t=e.create(r,i);e.attach(r,t)}}function wg(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 Tg=class{kvMap=new Map;_vMap=void 0;has(e){return this.kvMap.has(e)}delete(e){if(!this.has(e))return!1;let t=this.kvMap.get(e);return this._vMap!==void 0&&this._vMap.has(t)?(this.kvMap.set(e,this._vMap.get(t)),this._vMap.delete(t)):this.kvMap.delete(e),!0}get(e){return this.kvMap.get(e)}set(e,t){if(this.kvMap.has(e)){let n=this.kvMap.get(e);this._vMap===void 0&&(this._vMap=new Map);let r=this._vMap;for(;r.has(n);)n=r.get(n);r.set(n,t)}else this.kvMap.set(e,t)}forEach(e){for(let[t,n]of this.kvMap)if(e(n,t),this._vMap!==void 0){let r=this._vMap;for(;r.has(n);)n=r.get(n),e(n,t)}}};function N(e,t,n,r,i,a,o,s){Fd(`NgControlFlow`);let c=E(),l=Fo();return ag(c,l,e,t,n,r,i,po(l.consts,a),256,o,s),Eg}function Eg(e,t,n,r,i,a,o,s){Fd(`NgControlFlow`);let c=E(),l=Fo();return ag(c,l,e,t,n,r,i,po(l.consts,a),512,o,s),Eg}function P(e,t){Fd(`NgControlFlow`);let n=E(),r=Jo(),i=n[r]===Qu?-1:n[r],a=i===-1?void 0:Mg(n,27+i);if(dm(n,r,e)){let r=C(null);try{if(a!==void 0&&zp(a,0),e!==-1){let r=27+e,i=Mg(n,r),a=Lg(n[1],r),o=nm(i,a,n);Rp(i,up(n,a,t,{dehydratedView:o}),0,dp(a,o))}}finally{C(r)}}else if(a!==void 0){let e=Lp(a,0);e!==void 0&&(e[8]=t)}}var Dg=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 Og(e){return e}function kg(e,t){return t}var Ag=class{hasEmptyBlock;trackByFn;liveCollection;constructor(e,t,n){this.hasEmptyBlock=e,this.trackByFn=t,this.liveCollection=n}};function F(e,t,n,r,i,a,o,s,c,l,u,d,f){Fd(`NgControlFlow`);let p=E(),m=Fo(),h=c!==void 0,g=E(),_=new Ag(h,s?o.bind(g[15][8]):o);g[27+e]=_,ag(p,m,e+1,t,n,r,i,po(m.consts,a),256),h&&ag(p,m,e+2,c,l,u,d,po(m.consts,f),512)}var jg=class extends yg{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,Rp(this.lContainer,t,e,dp(this.templateTNode,n)),Ng(this.lContainer,e)}detach(e){return this.needsIndexUpdate||=e!==this.length-1,Pg(this.lContainer,e),Fg(this.lContainer,e)}create(e,t){let n=tm(this.lContainer,this.templateTNode.tView.ssrId);return up(this.hostLView,this.templateTNode,new Dg(this.lContainer,t,e),{dehydratedView:n})}destroy(e){uf(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];Kd(e,r),pd.delete(n[19]),r.detachedLeaveAnimationFns=void 0}}function Pg(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 Fg(e,t){return Bp(e,t)}function Ig(e,t){return Lp(e,t)}function Lg(e,t){return oo(e,t)}function L(e,t,n){let r=E();return dm(r,Jo(),t)&&(Fo(),Kf(ms(),r,e,t,r[11],n)),L}function Rg(e,t,n,r,i){ap(t,e,n,i?`class`:`style`,r)}function R(e,t,n,r){let i=E(),a=i[1],o=e+27,s=a.firstCreatePass?Bm(o,i,2,t,Qf,jo(),n,r):a.data[o];if(Xa(s)){let n=i[10].tracingService;if(n&&n.componentCreate){let o=a.data[s.directiveStart+s.componentOffset];return n.componentCreate(om(o),()=>(zg(e,t,i,s,r),R))}}return zg(e,t,i,s,r),R}function zg(e,t,n,r,i){if(np(r,n,e,t,Vg),Za(r)){let e=n[1];Hf(e,n,r),cu(e,r,n)}i!=null&&Uf(n,r)}function z(){let e=Fo(),t=rp(Io());return e.firstCreatePass&&Vm(e,t),No(t)&&Po(),Ao(),t.classesWithoutHost!=null&&Jc(t)&&Rg(e,t,E(),t.classesWithoutHost,!0),t.stylesWithoutHost!=null&&Yc(t)&&Rg(e,t,E(),t.stylesWithoutHost,!1),z}function B(e,t,n,r){return R(e,t,n,r),z(),B}function V(e,t,n,r){let i=E(),a=i[1],o=e+27,s=a.firstCreatePass?Hm(o,a,2,t,n,r):a.data[o];return np(s,i,e,t,Vg),r!=null&&Uf(i,s),V}function H(){return No(rp(Io()))&&Po(),Ao(),H}function Bg(e,t,n,r){return V(e,t,n,r),H(),Bg}var Vg=(e,t,n,r,i)=>(bs(!0),Cu(t[11],r,_s()));function Hg(e,t,n){let r=E(),i=r[1],a=e+27,o=i.firstCreatePass?Bm(a,r,8,`ng-container`,Qf,jo(),t,n):i.data[a];if(np(o,r,e,`ng-container`,Gg),Za(o)){let e=r[1];Hf(e,r,o),cu(e,o,r)}return n!=null&&Uf(r,o),Hg}function Ug(){let e=Fo(),t=rp(Io());return e.firstCreatePass&&Vm(e,t),Ug}function Wg(e,t,n){return Hg(e,t,n),Ug(),Wg}var Gg=(e,t,n,r,i)=>(bs(!0),Su(t[11],``));function U(){return E()}function Kg(e,t,n){let r=E();return dm(r,Jo(),t)&&(Fo(),qf(ms(),r,e,t,r[11],n)),Kg}var qg=void 0;function Jg(e){let t=Math.floor(Math.abs(e)),n=e.toString().replace(/^[^.]*\.?/,``).length;return t===1&&n===0?1:5}var Yg=[`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`]],qg,[[`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`]],qg,[[`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}`,qg,qg,qg],[`.`,`,`,`;`,`%`,`+`,`-`,`E`,`×`,`‰`,`∞`,`NaN`,`:`],[`#,##0.###`,`#,##0%`,`¤#,##0.00`,`#E0`],`USD`,`$`,`US Dollar`,{},`ltr`,Jg],Xg=Object.create(null);function Zg(e){let t=e_(e),n=Qg(t);if(n)return n;let r=t.split(`-`)[0];if(n=Qg(r),n)return n;if(r===`en`)return Yg;throw new w(701,!1)}function Qg(e){if(!(e in Xg)){let t=Ui.ng&&Ui.ng.common&&Ui.ng.common.locales&&Ui.ng.common.locales[e];return t!==void 0&&(Xg[e]=t),t}return Xg[e]}var $g={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 e_(e){return e.toLowerCase().replace(/_/g,`-`)}var t_=`en-US`;function n_(e){typeof e==`string`&&e.toLowerCase().replace(/_/g,`-`)}function W(e,t,n){let r=E(),i=Fo(),a=Io();return i_(i,r,r[11],a,e,t,n),W}function r_(e,t,n){let r=E(),i=Fo(),a=Io();return(a.type&3||n)&&_m(a,i,r,n,r[11],e,t,hm(a,r,t)),r_}function i_(e,t,n,r,i,a,o){let s=!0,c=null;if((r.type&3||o)&&(c??=hm(r,t,a),_m(r,e,t,o,n,i,a,c)&&(s=!1)),s){let e=r.outputs?.[i],n=r.hostDirectiveOutputs?.[i];if(n&&n.length)for(let e=0;e>17&32767}function m_(e){return(e&2)==2}function h_(e,t){return e&131071|t<<17}function g_(e){return e|2}function __(e){return(e&131068)>>2}function v_(e,t){return e&-131069|t<<2}function y_(e){return(e&1)==1}function b_(e){return e|1}function x_(e,t,n,r,i,a){let o=a?t.classBindings:t.styleBindings,s=p_(o),c=__(o);e[r]=n;let l=!1,u;if(Array.isArray(n)){let e=n;u=e[1],(u===null||la(e,u)>0)&&(l=!0)}else u=n;if(i){if(c!==0){let t=p_(e[s+1]);e[r+1]=f_(t,s),t!==0&&(e[t+1]=v_(e[t+1],r)),e[s+1]=h_(e[s+1],r)}else e[r+1]=f_(s,0),s!==0&&(e[s+1]=v_(e[s+1],r)),s=r}else e[r+1]=f_(c,0),s===0?s=r:e[c+1]=v_(e[c+1],r),c=r;l&&(e[r+1]=g_(e[r+1])),C_(e,u,r,!0),C_(e,u,r,!1),S_(t,u,e,r,a),o=f_(s,c),a?t.classBindings=o:t.styleBindings=o}function S_(e,t,n,r,i){let a=i?e.residualClasses:e.residualStyles;a!=null&&typeof t==`string`&&la(a,t)>=0&&(n[r+1]=b_(n[r+1]))}function C_(e,t,n,r){let i=e[n+1],a=t===null,o=r?p_(i):__(i),s=!1;for(;o!==0&&(s===!1||a);){let n=e[o],i=e[o+1];w_(n,t)&&(s=!0,e[o+1]=r?b_(i):g_(i)),o=r?p_(i):__(i)}s&&(e[n+1]=r?g_(i):b_(i))}function w_(e,t){return e===null||t==null||(Array.isArray(e)?e[1]:e)===t?!0:Array.isArray(e)&&typeof t==`string`?la(e,t)>=0:!1}var T_={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function E_(e){return e.substring(T_.key,T_.keyEnd)}function D_(e){return k_(e),O_(e,A_(e,0,T_.textEnd))}function O_(e,t){let n=T_.textEnd;return n===t?-1:(t=T_.keyEnd=j_(e,T_.key=t,n),A_(e,t,n))}function k_(e){T_.key=0,T_.keyEnd=0,T_.value=0,T_.valueEnd=0,T_.textEnd=e.length}function A_(e,t,n){for(;t32;)t++;return t}function K(e,t,n){return P_(e,t,n,!1),K}function q(e,t){return P_(e,t,null,!0),q}function M_(e){F_(G_,N_,e,!0)}function N_(e,t){for(let n=D_(t);n>=0;n=O_(t,n))sa(e,E_(t),!0)}function P_(e,t,n,r){let i=E(),a=Fo(),o=Yo(2);if(a.firstUpdatePass&&L_(a,e,o,r),t!==Qu&&dm(i,o,t)){let s=a.data[fs()];q_(a,s,i,i[11],e,i[o+1]=X_(t,n),r,o)}}function F_(e,t,n,r){let i=Fo(),a=Yo(2);i.firstUpdatePass&&L_(i,null,a,r);let o=E();if(n!==Qu&&dm(o,a,n)){let s=i.data[fs()];if(Z_(s,r)&&!I_(i,a)){let e=r?s.classesWithoutHost:s.stylesWithoutHost;e!==null&&(n=si(e,n||``)),Rg(i,s,o,n,r)}else K_(i,s,o,o[11],o[a+1],o[a+1]=W_(e,t,n),r,a)}}function I_(e,t){return t>=e.expandoStartIndex}function L_(e,t,n,r){let i=e.data;if(i[n+1]===null){let a=i[fs()],o=I_(e,n);Z_(a,r)&&t===null&&!o&&(t=!1),t=R_(i,a,t,r),x_(i,a,t,n,o,r)}}function R_(e,t,n,r){let i=es(e),a=r?t.residualClasses:t.residualStyles;if(i===null)(r?t.classBindings:t.styleBindings)===0&&(n=H_(null,e,t,n,r),n=U_(n,t.attrs,r),a=null);else{let o=t.directiveStylingLast;if(o===-1||e[o]!==i){if(n=H_(i,e,t,n,r),a===null){let n=z_(e,t,r);n!==void 0&&Array.isArray(n)&&(n=H_(null,e,t,n[1],r),n=U_(n,t.attrs,r),B_(e,t,r,n))}else a=V_(e,t,r)}}return a!==void 0&&(r?t.residualClasses=a:t.residualStyles=a),n}function z_(e,t,n){let r=n?t.classBindings:t.styleBindings;if(__(r)!==0)return e[p_(r)]}function B_(e,t,n,r){let i=n?t.classBindings:t.styleBindings;e[p_(i)]=r}function V_(e,t,n){let r,i=t.directiveEnd;for(let a=1+t.directiveStylingLast;a0;){let t=e[i],a=Array.isArray(t),c=a?t[1]:t,l=c===null,u=n[i+1];u===Qu&&(u=l?fa:void 0);let d=l?ca(u,r):c===r?u:void 0;if(a&&!Y_(d)&&(d=ca(t,r)),Y_(d)&&(s=d,o))return s;let f=e[i+1];i=o?p_(f):__(f)}if(t!==null){let e=a?t.residualClasses:t.residualStyles;e!=null&&(s=ca(e,r))}return s}function Y_(e){return e!==void 0}function X_(e,t){return e==null||e===``||(typeof t==`string`?e=du(e)+t:typeof e==`object`&&(e=oi(du(e)))),e}function Z_(e,t){return!!(e.flags&(t?8:16))}function J(e,t=``){let n=E(),r=Fo(),i=e+27,a=r.firstCreatePass?qp(r,i,1,t,null):r.data[i],o=Q_(r,n,a,t);n[i]=o,ys()&&yf(r,n,o,a),zo(a,!1)}var Q_=(e,t,n,r)=>(bs(!0),bu(t[11],r));function $_(e,t,n,r=``){return dm(e,Jo(),n)?t+ji(n)+r:Qu}function ev(e,t,n,r,i,a=``){let o=fm(e,Ko(),n,i);return Yo(2),o?t+ji(n)+r+ji(i)+a:Qu}function tv(e,t,n,r,i,a,o,s=``){let c=pm(e,Ko(),n,i,o);return Yo(3),c?t+ji(n)+r+ji(i)+a+ji(o)+s:Qu}function nv(e,t,n,r,i,a,o,s,c,l=``){let u=mm(e,Ko(),n,i,o,c);return Yo(4),u?t+ji(n)+r+ji(i)+a+ji(o)+s+ji(c)+l:Qu}function Y(e){return X(``,e),Y}function X(e,t,n){let r=E(),i=$_(r,e,t,n);return i!==Qu&&av(r,fs(),i),X}function Z(e,t,n,r,i){let a=E(),o=ev(a,e,t,n,r,i);return o!==Qu&&av(a,fs(),o),Z}function rv(e,t,n,r,i,a,o){let s=E(),c=tv(s,e,t,n,r,i,a,o);return c!==Qu&&av(s,fs(),c),rv}function iv(e,t,n,r,i,a,o,s,c){let l=E(),u=nv(l,e,t,n,r,i,a,o,s,c);return u!==Qu&&av(l,fs(),u),iv}function av(e,t,n){let r=io(t,e);xu(e[11],r,n)}function ov(e,t,n){bc(t)&&(t=t());let r=E();return dm(r,Jo(),t)&&(Fo(),Kf(ms(),r,e,t,r[11],n)),ov}function sv(e,t){let n=bc(e);return n&&e.set(t),n}function cv(e,t){let n=E(),r=Fo(),i=Io();return i_(r,n,n[11],i,e,t),cv}var lv={};function uv(e){Fd(`NgLet`);let t=Fo(),n=E(),r=e+27;return zo(qp(t,r,128,null,null),!1),co(t,n,r,lv),uv}function dv(e){return co(Fo(),E(),fs(),e),e}function fv(e){let t=so(Ho(),27+e);if(t===lv)throw new w(314,!1);return t}function pv(e,t,n=``){return $_(E(),e,t,n)}function mv(e,t){let n=Go()+e,r=E();return r[n]===Qu?lm(r,n,t()):um(r,n)}function hv(e,t,n){return vv(E(),Go(),e,t,n)}function gv(e,t,n,r,i){return bv(E(),Go(),e,t,n,r,i)}function _v(e,t){let n=e[t];return n===Qu?void 0:n}function vv(e,t,n,r,i,a){let o=t+n;return dm(e,o,i)?lm(e,o+1,a?r.call(a,i):r(i)):_v(e,o+1)}function yv(e,t,n,r,i,a,o){let s=t+n;return fm(e,s,i,a)?lm(e,s+2,o?r.call(o,i,a):r(i,a)):_v(e,s+2)}function bv(e,t,n,r,i,a,o,s){let c=t+n;return pm(e,c,i,a,o)?lm(e,c+3,s?r.call(s,i,a,o):r(i,a,o)):_v(e,c+3)}function xv(e,t){let n=Fo(),r,i=e+27;n.firstCreatePass?(r=Sv(t,n.pipeRegistry),n.data[i]=r,r.onDestroy&&(n.destroyHooks??=[]).push(i,r.onDestroy)):r=n.data[i];let a=r.factory||(r.factory=$i(r.type,!0)),o=Vi(Tm);try{let e=ol(!1),t=a();return ol(e),co(n,E(),i,t),t}finally{Vi(o)}}function Sv(e,t){if(t)for(let n=t.length-1;n>=0;n--){let r=t[n];if(e===r.name)return r}}function Cv(e,t,n){let r=e+27,i=E(),a=so(i,r);return Tv(i,r)?vv(i,Go(),t,a.transform,n,a):a.transform(n)}function wv(e,t,n,r){let i=e+27,a=E(),o=so(a,i);return Tv(a,i)?yv(a,Go(),t,o.transform,n,r,o):o.transform(n,r)}function Tv(e,t){return e[1].data[t].pure}function Ev(e,t){return Kp(e,t)}var Dv=(()=>{class e{applicationErrorHandler=T(Xs);appRef=T(pg);taskService=T(ks);ngZone=T(Ls);zonelessEnabled=T(sc);tracing=T(Nd,{optional:!0});zoneIsDefined=typeof Zone<`u`&&!!Zone.root.run;schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}];subscriptions=new gr;angularZoneId=this.zoneIsDefined?this.ngZone._inner?.get(Fs):null;scheduleInRootZone=!this.zonelessEnabled&&this.zoneIsDefined&&(T(cc,{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?Ns:Ms;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=jl({token:e,factory:e.ɵfac})}return e})();function Ov(){return[{provide:oc,useExisting:Dv},{provide:Ls,useClass:Gs},{provide:sc,useValue:!0}]}function kv(){return typeof $localize<`u`&&$localize.locale||`en-US`}var Av=new yi(``,{factory:()=>T(Av,{optional:!0,skipSelf:!0})||kv()}),jv=class{destroyed=!1;listeners=null;errorHandler=T(Ys,{optional:!0});isEmitting=!1;hasNullListeners=!1;destroyRef=T(Ts);constructor(){this.destroyRef.onDestroy(()=>{this.destroyed=!0,this.listeners=null})}subscribe(e){if(this.destroyed)throw new w(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(ii(953,!1));return}if(this.listeners===null)return;this.isEmitting=!0;let t=C(null);try{for(let t of this.listeners)try{t!==null&&t(e)}catch(e){this.errorHandler?.handleError(e)}}finally{this.hasNullListeners&&(this.hasNullListeners=!1,this.listeners&&Mv(this.listeners)),C(t),this.isEmitting=!1}}};function Mv(e){let t=e.length-1;for(;t>-1;)e[t]===null&&e.splice(t,1),t--}function Q(e,t){return Nn(e,t?.equal)}function Nv(e){return or(e)}(class e extends Error{_brand;constructor(e){super(e)}static IDLE=new e(`IDLE`);static LOADING=new e(`LOADING`)});var Pv=e=>e;function Fv(e,t){return typeof e==`function`?Iv(nr(e,Pv,t?.equal),t?.debugName,t?.set):Iv(nr(e.source,e.computation,e.equal),e.debugName,e.set)}function Iv(e,t,n){let r=e[fn],i=e;if(n!==void 0){let t=e=>rr(r,e);i.set=e=>n(e,t),i.update=r=>n(r(Nv(e)),t)}else i.set=e=>rr(r,e),i.update=e=>ir(r,e);return i.asReadonly=Qs.bind(e),i}function Lv(e,t){let n=Object.create(Sc);n.value=e,n.transformFn=t?.transform;function r(){if(hn(n),n.value===xc)throw new w(-950,null);return n.value}return r[fn]=n,r}function Rv(e){return new jv}function zv(e,t){return Lv(e,t)}function Bv(e){return Lv(xc,e)}var $=(zv.required=Bv,zv);function Vv(e,t){let n=Object.create(Sc),r=new jv;n.value=e;function i(){return hn(n),Hv(n.value),n.value}return i[fn]=n,i.asReadonly=Qs.bind(i),i.set=e=>{n.equal(n.value,e)||(Gn(n,e),r.emit(e))},i.update=e=>{Hv(n.value),i.set(e(n.value))},i.subscribe=r.subscribe.bind(r),i.destroyRef=r.destroyRef,i}function Hv(e){if(e===xc)throw new w(952,!1)}function Uv(e,t){return Vv(e,t)}function Wv(e){return Vv(xc,e)}var Gv=(Uv.required=Wv,Uv);function Kv(e,t){return Fh(t)}function qv(e,t){return Ih(t)}var Jv=(Kv.required=qv,Kv),Yv=new yi(``),Xv=new yi(``);function Zv(e){return!e.moduleRef}function Qv(e){let t=Zv(e)?e.r3Injector:e.moduleRef.injector,n=t.get(Ls);return n.run(()=>{Zv(e)?e.r3Injector.resolveInjectorInitializers():e.moduleRef.resolveInjectorInitializers();let r=t.get(Xs),i;if(n.runOutsideAngular(()=>{i=n.onError.subscribe({next:r})}),Zv(e)){let n=()=>t.destroy(),r=e.platformInjector.get(Yv);r.add(n),t.onDestroy(()=>{i.unsubscribe(),r.delete(n)})}else{let t=()=>e.moduleRef.destroy(),n=e.platformInjector.get(Yv);n.add(t),e.moduleRef.onDestroy(()=>{hg(e.allPlatformModules,e.moduleRef),i.unsubscribe(),n.delete(t)})}return ey(r,n,()=>{let n=t.get(ks),r=n.add(),i=t.get(ng);return i.runInitializers(),i.donePromise.then(()=>{if(n_(t.get(Av,t_)||`en-US`),!t.get(Xv,!0))return Zv(e)?t.get(pg):(e.allPlatformModules.push(e.moduleRef),e.moduleRef);if(Zv(e)){let n=t.get(pg);return e.rootComponent!==void 0&&n.bootstrap(e.rootComponent),n}return $v?.(e.moduleRef,e.allPlatformModules),e.moduleRef}).finally(()=>void n.remove(r))})})}var $v;function ey(e,t,n){try{let r=n();return zh(r)?r.catch(n=>{throw t.runOutsideAngular(()=>e(n)),n}):r}catch(n){throw t.runOutsideAngular(()=>e(n)),n}}var ty=null;function ny(e=[],t){return Cs.create({name:t,providers:[{provide:Da,useValue:`platform`},{provide:Yv,useValue:new Set([()=>ty=null])},...e]})}function ry(e=[]){if(ty)return ty;let t=ny(e);return ty=t,dg(),iy(t),t}function iy(e){let t=e.get(tc,null);Wa(e,()=>{t?.forEach(e=>e())})}function ay(e){let{rootComponent:t,appProviders:n,platformProviders:r,platformRef:i}=e;Lc(wc.BootstrapApplicationStart);try{let e=i?.injector??ry(r);return Qv({r3Injector:new Hh({providers:[Ov(),Zs,...n||[]],parent:e,debugName:``,runEnvironmentInitializers:!1}).injector,platformInjector:e,rootComponent:t})}catch(e){return Promise.reject(e)}finally{Lc(wc.BootstrapApplicationEnd)}}var oy=Symbol(`NOT_SET`),sy=new Set,cy={...qn,kind:`afterRenderEffectPhase`,consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!0,value:oy,cleanup:null,consumerMarkedDirty(){if(this.sequence.impl.executing){if(this.sequence.lastPhase===null||this.sequence.lastPhase(hn(r),r.value),r.signal[fn]=r,r.registerCleanupFn=e=>(r.cleanup??=new Set).add(e),this.nodes[e]=r,this.hooks[e]=e=>r.phaseFn(e)}}afterRun(){super.afterRun(),this.lastPhase=null}destroy(){if(this.onDestroyFns!==null)for(let e of this.onDestroyFns)e();super.destroy();for(let e of this.nodes)if(e)try{for(let t of e.cleanup??sy)t()}finally{Dn(e)}}};function uy(e,t){let n=t?.injector??T(Cs),r=n.get(oc),i=n.get(Id),a=n.get(Nd,null,{optional:!0});i.impl??=n.get(Rd);let o=e;typeof o==`function`&&(o={mixedReadWrite:e});let s=n.get(ic,null,{optional:!0}),c=new ly(i.impl,[o.earlyRead,o.write,o.mixedReadWrite,o.read],s?.view,r,n,a?.snapshot(null));return i.impl.register(c),c}var dy=null;function fy(){return dy}function py(e){dy??=e}var my=class{},hy=(function(e){return e[e.Format=0]=`Format`,e[e.Standalone=1]=`Standalone`,e})(hy||{}),gy=(function(e){return e[e.Narrow=0]=`Narrow`,e[e.Abbreviated=1]=`Abbreviated`,e[e.Wide=2]=`Wide`,e[e.Short=3]=`Short`,e})(gy||{}),_y=(function(e){return e[e.Short=0]=`Short`,e[e.Medium=1]=`Medium`,e[e.Long=2]=`Long`,e[e.Full=3]=`Full`,e})(_y||{}),vy={Decimal:0,Group:1,List:2,PercentSign:3,PlusSign:4,MinusSign:5,Exponential:6,SuperscriptingExponent:7,PerMille:8,Infinity:9,NaN:10,TimeSeparator:11,CurrencyDecimal:12,CurrencyGroup:13};function yy(e){return Zg(e)[$g.LocaleId]}function by(e,t,n){let r=Zg(e);return jy(jy([r[$g.DayPeriodsFormat],r[$g.DayPeriodsStandalone]],t),n)}function xy(e,t,n){let r=Zg(e);return jy(jy([r[$g.DaysFormat],r[$g.DaysStandalone]],t),n)}function Sy(e,t,n){let r=Zg(e);return jy(jy([r[$g.MonthsFormat],r[$g.MonthsStandalone]],t),n)}function Cy(e,t){let n=Zg(e)[$g.Eras];return jy(n,t)}function wy(e,t){return jy(Zg(e)[$g.DateFormat],t)}function Ty(e,t){return jy(Zg(e)[$g.TimeFormat],t)}function Ey(e,t){let n=Zg(e)[$g.DateTimeFormat];return jy(n,t)}function Dy(e,t){let n=Zg(e),r=n[$g.NumberSymbols][t];if(r===void 0){if(t===vy.CurrencyDecimal)return n[$g.NumberSymbols][vy.Decimal];if(t===vy.CurrencyGroup)return n[$g.NumberSymbols][vy.Group]}return r}function Oy(e){if(!e[$g.ExtraData])throw new w(2303,!1)}function ky(e){let t=Zg(e);return Oy(t),(t[$g.ExtraData][2]||[]).map(e=>typeof e==`string`?My(e):[My(e[0]),My(e[1])])}function Ay(e,t,n){let r=Zg(e);return Oy(r),jy(jy([r[$g.ExtraData][0],r[$g.ExtraData][1]],t)||[],n)||[]}function jy(e,t){for(let n=t;n>-1;n--)if(e[n]!==void 0)return e[n];throw new w(2304,!1)}function My(e){let[t,n]=e.split(`:`);return{hours:+t,minutes:+n}}var Ny=/^(\d{4,})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,Py=Object.create(null),Fy=/((?:[^BEGHLMOSWYZabcdhmswyz']+)|(?:'(?:[^']|'')*')|(?:G{1,5}|y{1,4}|Y{1,4}|M{1,5}|L{1,5}|w{1,2}|W{1}|d{1,2}|E{1,6}|c{1,6}|a{1,5}|b{1,5}|B{1,5}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|S{1,3}|z{1,4}|Z{1,5}|O{1,4}))([\s\S]*)/,Iy=256;function Ly(e,t,n,r){let i=ob(e);Ry(t),t=By(n,t)||t;let a=[],o;for(;t;)if(o=Fy.exec(t),o){a=a.concat(o.slice(1));let e=a.pop();if(!e)break;t=e}else{a.push(t);break}let s=i.getTimezoneOffset();r&&(s=rb(r,s),i=ab(i,r));let c=``;return a.forEach(e=>{let t=nb(e);c+=t?t(i,n,s):e===`''`?`'`:e.replace(/(^'|'$)/g,``).replace(/''/g,`'`)}),c}function Ry(e){if(e.length>Iy)throw new w(2300,!1)}function zy(e,t,n){let r=new Date(0);return r.setFullYear(e,t,n),r.setHours(0,0,0),r}function By(e,t){let n=yy(e);if(Py[n]??=Object.create(null),Py[n][t])return Py[n][t];let r=``;switch(t){case`shortDate`:r=wy(e,_y.Short);break;case`mediumDate`:r=wy(e,_y.Medium);break;case`longDate`:r=wy(e,_y.Long);break;case`fullDate`:r=wy(e,_y.Full);break;case`shortTime`:r=Ty(e,_y.Short);break;case`mediumTime`:r=Ty(e,_y.Medium);break;case`longTime`:r=Ty(e,_y.Long);break;case`fullTime`:r=Ty(e,_y.Full);break;case`short`:let t=By(e,`shortTime`),n=By(e,`shortDate`);r=Vy(Ey(e,_y.Short),[t,n]);break;case`medium`:let i=By(e,`mediumTime`),a=By(e,`mediumDate`);r=Vy(Ey(e,_y.Medium),[i,a]);break;case`long`:let o=By(e,`longTime`),s=By(e,`longDate`);r=Vy(Ey(e,_y.Long),[o,s]);break;case`full`:let c=By(e,`fullTime`),l=By(e,`fullDate`);r=Vy(Ey(e,_y.Full),[c,l])}return r&&(Py[n][t]=r),r}function Vy(e,t){return t&&(e=e.replace(/\{([^}]+)}/g,function(e,n){return Object.hasOwn(t,n)?t[n]:e})),e}function Hy(e,t,n=`-`,r,i){let a=``;(e<0||i&&e<=0)&&(i?e=-e+1:(e=-e,a=n));let o=String(e);for(;o.length0||s>-n)&&(s+=n),e===3)s===0&&n===-12&&(s=12);else if(e===6)return Uy(s,t);let c=Dy(o,vy.MinusSign);return Hy(s,t,c,r,i)}}function Gy(e,t){switch(e){case 0:return t.getFullYear();case 1:return t.getMonth();case 2:return t.getDate();case 3:return t.getHours();case 4:return t.getMinutes();case 5:return t.getSeconds();case 6:return t.getMilliseconds();case 7:return t.getDay();default:throw new w(2301,!1)}}function Ky(e,t,n=hy.Format,r=!1){return function(i,a){return qy(i,a,e,t,n,r)}}function qy(e,t,n,r,i,a){switch(n){case 2:return Sy(t,i,r)[e.getMonth()];case 1:return xy(t,i,r)[e.getDay()];case 0:let n=e.getHours(),o=e.getMinutes();if(a){let e=ky(t),a=Ay(t,i,r),s=e.findIndex(e=>{if(Array.isArray(e)){let[t,r]=e,i=n>=t.hours&&o>=t.minutes,a=n0?Math.floor(i/60):Math.ceil(i/60);switch(e){case 0:return(i>=0?`+`:``)+Hy(o,2,a)+Hy(Math.abs(i%60),2,a);case 1:return`GMT`+(i>=0?`+`:``)+Hy(o,1,a);case 2:return`GMT`+(i>=0?`+`:``)+Hy(o,2,a)+`:`+Hy(Math.abs(i%60),2,a);case 3:return r===0?`Z`:(i>=0?`+`:``)+Hy(o,2,a)+`:`+Hy(Math.abs(i%60),2,a);default:throw new w(2310,!1)}}}var Yy=0,Xy=4;function Zy(e){let t=zy(e,Yy,1).getDay();return zy(e,0,1+(t<=Xy?Xy:11)-t)}function Qy(e){let t=e.getDay(),n=t===0?-3:Xy-t;return zy(e.getFullYear(),e.getMonth(),e.getDate()+n)}function $y(e,t=!1){return function(n,r){let i;if(t){let e=new Date(n.getFullYear(),n.getMonth(),1).getDay()-1,t=n.getDate();i=1+Math.floor((t+e)/7)}else{let e=Qy(n),t=Zy(e.getFullYear()),r=e.getTime()-t.getTime();i=1+Math.round(r/6048e5)}return Hy(i,e,Dy(r,vy.MinusSign))}}function eb(e,t=!1){return function(n,r){return Hy(Qy(n).getFullYear(),e,Dy(r,vy.MinusSign),t)}}var tb=Object.create(null);function nb(e){if(tb[e])return tb[e];let t;switch(e){case`G`:case`GG`:case`GGG`:t=Ky(3,gy.Abbreviated);break;case`GGGG`:t=Ky(3,gy.Wide);break;case`GGGGG`:t=Ky(3,gy.Narrow);break;case`y`:t=Wy(0,1,0,!1,!0);break;case`yy`:t=Wy(0,2,0,!0,!0);break;case`yyy`:t=Wy(0,3,0,!1,!0);break;case`yyyy`:t=Wy(0,4,0,!1,!0);break;case`Y`:t=eb(1);break;case`YY`:t=eb(2,!0);break;case`YYY`:t=eb(3);break;case`YYYY`:t=eb(4);break;case`M`:case`L`:t=Wy(1,1,1);break;case`MM`:case`LL`:t=Wy(1,2,1);break;case`MMM`:t=Ky(2,gy.Abbreviated);break;case`MMMM`:t=Ky(2,gy.Wide);break;case`MMMMM`:t=Ky(2,gy.Narrow);break;case`LLL`:t=Ky(2,gy.Abbreviated,hy.Standalone);break;case`LLLL`:t=Ky(2,gy.Wide,hy.Standalone);break;case`LLLLL`:t=Ky(2,gy.Narrow,hy.Standalone);break;case`w`:t=$y(1);break;case`ww`:t=$y(2);break;case`W`:t=$y(1,!0);break;case`d`:t=Wy(2,1);break;case`dd`:t=Wy(2,2);break;case`c`:case`cc`:t=Wy(7,1);break;case`ccc`:t=Ky(1,gy.Abbreviated,hy.Standalone);break;case`cccc`:t=Ky(1,gy.Wide,hy.Standalone);break;case`ccccc`:t=Ky(1,gy.Narrow,hy.Standalone);break;case`cccccc`:t=Ky(1,gy.Short,hy.Standalone);break;case`E`:case`EE`:case`EEE`:t=Ky(1,gy.Abbreviated);break;case`EEEE`:t=Ky(1,gy.Wide);break;case`EEEEE`:t=Ky(1,gy.Narrow);break;case`EEEEEE`:t=Ky(1,gy.Short);break;case`a`:case`aa`:case`aaa`:t=Ky(0,gy.Abbreviated);break;case`aaaa`:t=Ky(0,gy.Wide);break;case`aaaaa`:t=Ky(0,gy.Narrow);break;case`b`:case`bb`:case`bbb`:t=Ky(0,gy.Abbreviated,hy.Standalone,!0);break;case`bbbb`:t=Ky(0,gy.Wide,hy.Standalone,!0);break;case`bbbbb`:t=Ky(0,gy.Narrow,hy.Standalone,!0);break;case`B`:case`BB`:case`BBB`:t=Ky(0,gy.Abbreviated,hy.Format,!0);break;case`BBBB`:t=Ky(0,gy.Wide,hy.Format,!0);break;case`BBBBB`:t=Ky(0,gy.Narrow,hy.Format,!0);break;case`h`:t=Wy(3,1,-12);break;case`hh`:t=Wy(3,2,-12);break;case`H`:t=Wy(3,1);break;case`HH`:t=Wy(3,2);break;case`m`:t=Wy(4,1);break;case`mm`:t=Wy(4,2);break;case`s`:t=Wy(5,1);break;case`ss`:t=Wy(5,2);break;case`S`:t=Wy(6,1);break;case`SS`:t=Wy(6,2);break;case`SSS`:t=Wy(6,3);break;case`Z`:case`ZZ`:case`ZZZ`:t=Jy(0);break;case`ZZZZZ`:t=Jy(3);break;case`O`:case`OO`:case`OOO`:case`z`:case`zz`:case`zzz`:t=Jy(1);break;case`OOOO`:case`ZZZZ`:case`zzzz`:t=Jy(2);break;default:return null}return tb[e]=t,t}function rb(e,t){e=e.replace(/:/g,``);let n=Date.parse(`Jan 01, 1970 00:00:00 `+e)/6e4;return isNaN(n)?t:n}function ib(e,t){return e=new Date(e.getTime()),e.setMinutes(e.getMinutes()+t),e}function ab(e,t,n){let r=e.getTimezoneOffset();return ib(e,-1*(rb(t,r)-r))}function ob(e){if(cb(e))return e;if(typeof e==`number`&&!isNaN(e))return new Date(e);if(typeof e==`string`){if(e=e.trim(),/^(\d{4}(-\d{1,2}(-\d{1,2})?)?)$/.test(e)){let[t,n=1,r=1]=e.split(`-`).map(e=>+e);return zy(t,n-1,r)}let t=parseFloat(e);if(!isNaN(e-t))return new Date(t);let n;if(n=e.match(Ny))return sb(n)}let t=new Date(e);if(!cb(t))throw new w(2311,!1);return t}function sb(e){let t=new Date(0),n=0,r=0,i=e[8]?t.setUTCFullYear:t.setFullYear,a=e[8]?t.setUTCHours:t.setHours;e[9]&&(n=Number(e[9]+e[10]),r=Number(e[9]+e[11])),i.call(t,Number(e[1]),Number(e[2])-1,Number(e[3]));let o=Number(e[4]||0)-n,s=Number(e[5]||0)-r,c=Number(e[6]||0),l=Math.floor(parseFloat(`0.`+(e[7]||0))*1e3);return a.call(t,o,s,c,l),t}function cb(e){return e instanceof Date&&!isNaN(e.valueOf())}var lb=(()=>{class e{_viewContainerRef;_viewRef=null;ngTemplateOutletContext=null;ngTemplateOutlet=null;ngTemplateOutletInjector=null;injector=T(Cs);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)(Tm(ah))};static ɵdir=Yh({type:e,selectors:[[``,`ngTemplateOutlet`,``]],inputs:{ngTemplateOutletContext:`ngTemplateOutletContext`,ngTemplateOutlet:`ngTemplateOutlet`,ngTemplateOutletInjector:`ngTemplateOutletInjector`},features:[Oc]})}return e})();function ub(e,t){return new w(2100,!1)}var db=`mediumDate`,fb=new yi(``),pb=new yi(``),mb=(()=>{class e{locale;defaultTimezone;defaultOptions;constructor(e,t,n){this.locale=e,this.defaultTimezone=t,this.defaultOptions=n}transform(t,n,r,i){if(t==null||t===``||t!==t)return null;try{let e=n??this.defaultOptions?.dateFormat??db,a=r??this.defaultOptions?.timezone??this.defaultTimezone??void 0;return Ly(t,e,i||this.locale,a)}catch(t){throw ub(e,t.message)}}static ɵfac=function(t){return new(t||e)(Tm(Av,16),Tm(fb,24),Tm(pb,24))};static ɵpipe=Xh({name:`date`,type:e,pure:!0})}return e})(),hb=(()=>{class e{transform(e){return JSON.stringify(e,null,2)}static ɵfac=function(t){return new(t||e)};static ɵpipe=Xh({name:`json`,type:e,pure:!1})}return e})();function gb(e,t){t=encodeURIComponent(t);for(let n of e.split(`;`)){let e=n.indexOf(`=`),[r,i]=e==-1?[n,``]:[n.slice(0,e),n.slice(e+1)];if(r.trim()!==t)continue;let a=i;try{a=decodeURIComponent(i)}catch{}return a.length>1&&a[0]===`"`&&a[a.length-1]===`"`&&(a=a.slice(1,-1)),a}return null}var _b=`browser`,vb=class{_doc;constructor(e){this._doc=e}manager},yb=(()=>{class e extends vb{constructor(e){super(e)}supports(e){return!0}addEventListener(e,t,n,r){return e.addEventListener(t,n,r),()=>this.removeEventListener(e,t,n,r)}removeEventListener(e,t,n,r){return e.removeEventListener(t,n,r)}static ɵfac=function(t){return new(t||e)(Ji(ws))};static ɵprov=fi({token:e,factory:e.ɵfac})}return e})(),bb=new yi(``),xb=(()=>{class e{_zone;_plugins;_eventNameToPlugin=new Map;constructor(e,t){this._zone=t,e.forEach(e=>{e.manager=this});let n=e.filter(e=>!(e instanceof yb));this._plugins=n.slice().reverse();let r=e.find(e=>e instanceof yb);r&&this._plugins.push(r)}addEventListener(e,t,n,r){return this._findPluginFor(t).addEventListener(e,t,n,r)}getZone(){return this._zone}_findPluginFor(e){let t=this._eventNameToPlugin.get(e);if(t)return t;if(t=this._plugins.find(t=>t.supports(e)),!t)throw new w(-5101,!1);return this._eventNameToPlugin.set(e,t),t}static ɵfac=function(t){return new(t||e)(Ji(bb),Ji(Ls))};static ɵprov=fi({token:e,factory:e.ɵfac})}return e})(),Sb=`ng-app-id`;function Cb(e){for(let t of e)t.remove()}function wb(e,t){let n=t.createElement(`style`);return n.textContent=e,n}function Tb(e,t,n,r){let i=e.head?.querySelectorAll(`style[${Sb}="${t}"],link[${Sb}="${t}"]`);if(!i||i.length===0)return!1;for(let e of i)e.removeAttribute(Sb),e instanceof HTMLLinkElement?r.set(e.href.slice(e.href.lastIndexOf(`/`)+1),{usage:0,elements:[e]}):e.textContent&&n.set(e.textContent,{usage:0,elements:[e]});return!0}function Eb(e,t){let n=t.createElement(`link`);return n.setAttribute(`rel`,`stylesheet`),n.setAttribute(`href`,e),n}var Db=(()=>{class e{doc;appId;nonce;inline=new Map;external=new Map;hosts=new Set;constructor(e,t,n,r={}){this.doc=e,this.appId=t,this.nonce=n,Tb(e,t,this.inline,this.external)&&this.hosts.add(e.head)}addStyles(e,t){for(let t of e)this.addUsage(t,this.inline,wb);t?.forEach(e=>this.addUsage(e,this.external,Eb))}removeStyles(e,t){for(let t of e)this.removeUsage(t,this.inline);t?.forEach(e=>this.removeUsage(e,this.external))}addUsage(e,t,n){let r=t.get(e);r?r.usage++:t.set(e,{usage:1,elements:[...this.hosts].map(t=>this.addElement(t,n(e,this.doc)))})}removeUsage(e,t){let n=t.get(e);n&&(n.usage--,n.usage<=0&&(Cb(n.elements),t.delete(e)))}ngOnDestroy(){for(let[,{elements:e}]of[...this.inline,...this.external])Cb(e);this.hosts.clear()}addHost(e){if(!this.hosts.has(e)){this.hosts.add(e);for(let[t,{elements:n}]of this.inline)n.push(this.addElement(e,wb(t,this.doc)));for(let[t,{elements:n}]of this.external)n.push(this.addElement(e,Eb(t,this.doc)))}}removeHost(e){this.hosts.delete(e);for(let t of[...this.inline.values(),...this.external.values()]){let n=[];for(let r of t.elements)r.parentNode===e?r.remove():n.push(r);t.elements=n}}addElement(e,t){return this.nonce&&t.setAttribute(`nonce`,this.nonce),e.appendChild(t)}static ɵfac=function(t){return new(t||e)(Ji(ws),Ji($s),Ji(rc,8),Ji(nc))};static ɵprov=fi({token:e,factory:e.ɵfac})}return e})(),Ob={svg:`http://www.w3.org/2000/svg`,xhtml:`http://www.w3.org/1999/xhtml`,xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`,xmlns:`http://www.w3.org/2000/xmlns/`,math:`http://www.w3.org/1998/Math/MathML`},kb=/%COMP%/g,Ab=`%COMP%`,jb=`_nghost-${Ab}`,Mb=`_ngcontent-${Ab}`,Nb=!0,Pb=new yi(``,{factory:()=>Nb}),Fb=new yi(``);function Ib(e){return Mb.replace(kb,e)}function Lb(e){return jb.replace(kb,e)}function Rb(e,t){return t.map(t=>t.replace(kb,e))}var zb=(()=>{class e{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;ngZone;nonce;tracingService;rendererByCompId=new Map;defaultRenderer;cssVarNamespace;constructor(e,t,n,r,i,a,o=null,s=null,c=null){this.eventManager=e,this.sharedStylesHost=t,this.appId=n,this.removeStylesOnCompDestroy=r,this.doc=i,this.ngZone=a,this.nonce=o,this.tracingService=s,this.cssVarNamespace=c??``,this.defaultRenderer=new Bb(e,i,a,this.tracingService,this.cssVarNamespace)}createRenderer(e,t){if(!e||!t)return this.defaultRenderer;let n=this.getOrCreateRenderer(e,t);return n instanceof Wb?n.applyToHost(e):n instanceof Ub&&n.applyStyles(),n}getOrCreateRenderer(e,t){let n=this.rendererByCompId,r=n.get(t.id);if(!r){let i=this.doc,a=this.ngZone,o=this.eventManager,s=this.sharedStylesHost,c=this.removeStylesOnCompDestroy,l=this.tracingService;switch(t.encapsulation){case lu.Emulated:r=new Wb(o,s,t,this.appId,c,i,a,l,this.cssVarNamespace);break;case lu.ShadowDom:return new Hb(o,e,t,i,a,this.nonce,l,this.cssVarNamespace,s);case lu.ExperimentalIsolatedShadowDom:return new Hb(o,e,t,i,a,this.nonce,l,this.cssVarNamespace);default:r=new Ub(o,s,t,c,i,a,l,this.cssVarNamespace)}n.set(t.id,r)}return r}ngOnDestroy(){this.rendererByCompId.clear()}componentReplaced(e){this.rendererByCompId.delete(e)}static ɵfac=function(t){return new(t||e)(Ji(xb),Ji(Cm),Ji($s),Ji(Pb),Ji(ws),Ji(Ls),Ji(rc),Ji(Nd,8),Ji(Fb,8))};static ɵprov=fi({token:e,factory:e.ɵfac})}return e})(),Bb=class{eventManager;doc;ngZone;tracingService;cssVarNamespace;data=Object.create(null);throwOnSyntheticProps=!0;constructor(e,t,n,r,i=``){this.eventManager=e,this.doc=t,this.ngZone=n,this.tracingService=r,this.cssVarNamespace=i}destroy(){}destroyNode=null;createElement(e,t){return t?this.doc.createElementNS(Ob[t]||t,e):this.doc.createElement(e)}createComment(e){return this.doc.createComment(e)}createText(e){return this.doc.createTextNode(e)}appendChild(e,t){(Vb(e)?e.content:e).appendChild(t)}insertBefore(e,t,n){if(e){let r=Vb(e)?e.content:e;if(n!=null&&n.parentNode!==r)throw new w(-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 w(-5104,!1);return t||(n.textContent=``),n}parentNode(e){return e.parentNode}nextSibling(e){return e.nextSibling}setAttribute(e,t,n,r){if(r){t=r+`:`+t;let i=Ob[r];i?e.setAttributeNS(i,t,n):e.setAttribute(t,n)}else e.setAttribute(t,n)}removeAttribute(e,t,n){if(n){let r=Ob[n];r?e.removeAttributeNS(r,t):e.removeAttribute(`${n}:${t}`)}else e.removeAttribute(t)}addClass(e,t){e.classList.add(t)}removeClass(e,t){e.classList.remove(t)}setStyle(e,t,n,r){let i=t.startsWith(`--`);i&&(t=t.replace(`%NS%`,this.cssVarNamespace)),i||r&($u.DashCase|$u.Important)?e.style.setProperty(t,n,r&$u.Important?`important`:``):e.style[t]=n}removeStyle(e,t,n){let r=t.startsWith(`--`);r&&(t=t.replace(`%NS%`,this.cssVarNamespace)),r||n&$u.DashCase?e.style.removeProperty(t):e.style[t]=``}setProperty(e,t,n){e!=null&&(e[t]=n)}setValue(e,t){e.nodeValue=t}listen(e,t,n,r){if(typeof e==`string`&&(e=fy().getGlobalEventTarget(this.doc,e),!e))throw new w(-5102,!1);let i=this.decoratePreventDefault(n);return this.tracingService?.wrapEventListener&&(i=this.tracingService.wrapEventListener(e,t,i)),this.eventManager.addEventListener(e,t,i,r)}decoratePreventDefault(e){return t=>{if(t===`__ngUnwrap__`)return e;e(t)===!1&&t.preventDefault()}}};function Vb(e){return e.tagName===`TEMPLATE`&&e.content!==void 0}var Hb=class extends Bb{hostEl;sharedStylesHost;shadowRoot;constructor(e,t,n,r,i,a,o,s,c){super(e,r,i,o,s),this.hostEl=t,this.sharedStylesHost=c,this.shadowRoot=t.attachShadow({mode:`open`}),this.sharedStylesHost&&this.sharedStylesHost.addHost(this.shadowRoot);let l=n.styles;l=Rb(n.id,l).map(e=>e.replace(/%NS%/g,s));for(let e of l){let t=document.createElement(`style`);a&&t.setAttribute(`nonce`,a),t.textContent=e,this.shadowRoot.appendChild(t)}let u=n.getExternalStyles?.();if(u)for(let e of u){let t=Eb(e,r);a&&t.setAttribute(`nonce`,a),this.shadowRoot.appendChild(t)}}nodeOrShadowRoot(e){return e===this.hostEl?this.shadowRoot:e}appendChild(e,t){return super.appendChild(this.nodeOrShadowRoot(e),t)}insertBefore(e,t,n){return super.insertBefore(this.nodeOrShadowRoot(e),t,n)}removeChild(e,t){return super.removeChild(null,t)}parentNode(e){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(e)))}destroy(){this.sharedStylesHost&&this.sharedStylesHost.removeHost(this.shadowRoot)}},Ub=class extends Bb{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;constructor(e,t,n,r,i,a,o,s,c){super(e,i,a,o,s),this.sharedStylesHost=t,this.removeStylesOnCompDestroy=r;let l=n.styles,u=c?Rb(c,l):l;this.styles=u.map(e=>e.replace(/%NS%/g,s)),this.styleUrls=n.getExternalStyles?.(c)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&pd.size===0&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},Wb=class extends Ub{contentAttr;hostAttr;constructor(e,t,n,r,i,a,o,s,c){let l=r+`-`+n.id;super(e,t,n,i,a,o,s,c,l),this.contentAttr=Ib(l),this.hostAttr=Lb(l)}applyToHost(e){this.applyStyles(),this.setAttribute(e,this.hostAttr,``)}createElement(e,t){let n=super.createElement(e,t);return super.setAttribute(n,this.contentAttr,``),n}},Gb=class e extends my{supportsDOMEvents=!0;static makeCurrent(){py(new e)}onAndCancel(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}dispatchEvent(e,t){e.dispatchEvent(t)}remove(e){e.remove()}createElement(e,t){return t||=this.getDefaultDocument(),t.createElement(e)}createHtmlDocument(){return document.implementation.createHTMLDocument(`fakeTitle`)}getDefaultDocument(){return document}isElementNode(e){return e.nodeType===Node.ELEMENT_NODE}isShadowRoot(e){return e instanceof DocumentFragment}getGlobalEventTarget(e,t){return t===`window`?window:t===`document`?e:t===`body`?e.body:null}getBaseHref(e){let t=qb();return t==null?null:Jb(t)}resetBaseElement(){Kb=null}getUserAgent(){return window.navigator.userAgent}getCookie(e){return gb(document.cookie,e)}},Kb=null;function qb(){return Kb||=document.head.querySelector(`base`),Kb?Kb.getAttribute(`href`):null}function Jb(e){return new URL(e,document.baseURI).pathname}var Yb=[`alt`,`control`,`meta`,`shift`],Xb={"\b":`Backspace`," ":`Tab`,"":`Delete`,"\x1B":`Escape`,Del:`Delete`,Esc:`Escape`,Left:`ArrowLeft`,Right:`ArrowRight`,Up:`ArrowUp`,Down:`ArrowDown`,Menu:`ContextMenu`,Scroll:`ScrollLock`,Win:`OS`},Zb={alt:e=>e.altKey,control:e=>e.ctrlKey,meta:e=>e.metaKey,shift:e=>e.shiftKey},Qb=(()=>{class e extends vb{constructor(e){super(e)}supports(t){return e.parseEventName(t)!=null}addEventListener(t,n,r,i){let a=e.parseEventName(n),o=e.eventCallback(a.fullKey,r,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>fy().onAndCancel(t,a.domEventName,o,i))}static parseEventName(t){let n=t.toLowerCase().split(`.`),r=n.shift();if(n.length===0||r!==`keydown`&&r!==`keyup`)return null;let i=e._normalizeKey(n.pop()),a=``,o=n.indexOf(`code`);if(o>-1&&(n.splice(o,1),a=`code.`),Yb.forEach(e=>{let t=n.indexOf(e);t>-1&&(n.splice(t,1),a+=e+`.`)}),a+=i,n.length!=0||i.length===0)return null;let s={};return s.domEventName=r,s.fullKey=a,s}static matchEventFullKeyCode(e,t){let n=Xb[e.key]||e.key,r=``;return t.indexOf(`code.`)>-1&&(n=e.code,r=`code.`),n==null||!n?!1:(n=n.toLowerCase(),n===` `?n=`space`:n===`.`&&(n=`dot`),Yb.forEach(t=>{if(t!==n){let n=Zb[t];n(e)&&(r+=t+`.`)}}),r+=n,r===t)}static eventCallback(t,n,r){return i=>{e.matchEventFullKeyCode(i,t)&&r.runGuarded(()=>n(i))}}static _normalizeKey(e){return e===`esc`?`escape`:e}static ɵfac=function(t){return new(t||e)(Ji(ws))};static ɵprov=fi({token:e,factory:e.ɵfac})}return e})();async function $b(e,t,n){return ay({rootComponent:e,...ex(t,n)})}function ex(e,t){return{platformRef:t?.platformRef,appProviders:[...ax,...e?.providers??[]],platformProviders:ix}}function tx(){Gb.makeCurrent()}function nx(){return new Ys}function rx(){return Zl(document),document}var ix=[{provide:nc,useValue:_b},{provide:tc,useValue:tx,multi:!0},{provide:ws,useFactory:rx}],ax=[{provide:Da,useValue:`root`},{provide:Ys,useFactory:nx},{provide:bb,useClass:yb,multi:!0},{provide:bb,useClass:Qb,multi:!0},zb,{provide:Cm,useClass:Db},{provide:Db,useExisting:Cm},xb,{provide:im,useExisting:zb},[]];function ox(e,t){let n=`\x1B[${e}m`,r=`\x1B[${t}m`;return((e,...t)=>{if(Array.isArray(e)&&`raw`in e){let i=e,a=``;for(let e=0;e{let r=new ux({code:i,why:cx(a.why,e),fix:cx(a.fix,e),docs:o,cause:e.cause,sources:e.sources,data:cx(a.data,e)},s);for(let e of t)e(r,n);return r};n[i]=s}return n}function px(e){return t=>{let n=`${e.bold(e.red(`[${t.name}]`))} ${t.message}`,r=[];return t.fix&&r.push(`${e.dim(`fix:`)} ${t.fix}`),t.sources?.length&&r.push(`${e.dim(`sources:`)} ${t.sources.join(`, `)}`),t.docs&&r.push(`${e.dim(`see:`)} ${e.cyan(t.docs)}`),r.length===0?n:[n,...r.map((t,n)=>`${e.dim(n{e=n,t=r}),resolve:e,reject:t}}var yx=Math.random.bind(Math),bx=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`;function xx(e=21){let t=``,n=e;for(;n--;)t+=bx[yx()*64|0];return t}var Sx=6e4,Cx=e=>e,wx=Cx,{clearTimeout:Tx,setTimeout:Ex}=globalThis;function Dx(e,t){let{post:n,on:r,off:i=()=>{},eventNames:a=[],serialize:o=Cx,deserialize:s=wx,resolver:c,bind:l=`rpc`,timeout:u=Sx,proxify:d=!0}=t,f=!1,p=new Map,m,h;async function g(e,r,i,a){if(f)throw Error(`[birpc] rpc is closed, cannot call "${e}"`);let s={m:e,a:r,t:`q`};a&&(s.o=!0);let c=async e=>n(o(e));if(i){await c(s);return}if(m)try{await m}finally{m=void 0}let{promise:l,resolve:d,reject:g}=vx(),_=xx();s.i=_;let ee;async function te(n=s){return u>=0&&(ee=Ex(()=>{try{if(t.onTimeoutError?.call(h,e,r)!==!0)throw Error(`[birpc] timeout on calling "${e}"`)}catch(e){g(e)}p.delete(_)},u),typeof ee==`object`&&(ee=ee.unref?.())),p.set(_,{resolve:d,reject:g,timeoutId:ee,method:e}),await c(n),l}try{t.onRequest?await t.onRequest.call(h,s,te,d):await te()}catch(e){if(t.onGeneralError?.call(h,e)!==!0)throw e;return}finally{Tx(ee),p.delete(_)}return l}let _={$call:(e,...t)=>g(e,t,!1),$callOptional:(e,...t)=>g(e,t,!1,!0),$callEvent:(e,...t)=>g(e,t,!0),$callRaw:e=>g(e.method,e.args,e.event,e.optional),$rejectPendingCalls:te,get $closed(){return f},get $meta(){return t.meta},$close:ee,$functions:e};h=d?new Proxy({},{get(t,n){if(Object.hasOwn(_,n))return _[n];if(n===`then`&&!a.includes(`then`)&&!(`then`in e))return;let r=(...e)=>g(n,e,!0);if(a.includes(n))return r.asEvent=r,r;let i=(...e)=>g(n,e,!1);return i.asEvent=r,i}}):_;function ee(e){f=!0,p.forEach(({reject:t,method:n})=>{let r=Error(`[birpc] rpc is closed, cannot call "${n}"`);if(e)return e.cause??=r,t(e);t(r)}),p.clear(),i(ne)}function te(e){let t=Array.from(p.values()).map(({method:t,reject:n})=>e?e({method:t,reject:n}):n(Error(`[birpc]: rejected pending call "${t}".`)));return p.clear(),t}async function ne(r,...i){let a;try{a=s(r)}catch(e){if(t.onGeneralError?.call(h,e)!==!0)throw e;return}if(a.t===`q`){let{m:r,a:s,o:u}=a,d,f,p=await(c?c.call(h,r,e[r]):e[r]);if(u&&(p||=()=>void 0),!p)f=Error(`[birpc] function "${r}" not found`);else try{d=await p.apply(l===`rpc`?h:e,s)}catch(e){f=e}if(a.i){if(f&&t.onFunctionError&&t.onFunctionError.call(h,f,r,s)===!0)return;if(!f)try{await n(o({t:`s`,i:a.i,r:d}),...i);return}catch(e){if(f=e,t.onGeneralError?.call(h,e,r,s)!==!0)throw e}try{await n(o({t:`s`,i:a.i,e:f}),...i)}catch(e){if(t.onGeneralError?.call(h,e,r,s)!==!0)throw e}}}else{let{i:e,r:t,e:n}=a,r=p.get(e);r&&(Tx(r.timeoutId),n?r.reject(n):r.resolve(t)),p.delete(e)}}return m=r(ne),h}function Ox(e,t){return t.safety?t.safety:e===`static`||e===`query`||e==null?`read`:`action`}var kx=Object.freeze({type:`object`,additionalProperties:!0});function Ax(e){let t=e[`~standard`];if(t.jsonSchema)try{return t.jsonSchema.input({target:`draft-2020-12`})}catch{return kx}return kx}function jx(e){if(!e||e.length===0)return{type:`object`,properties:{}};let t={},n=[];for(let r=0;rn[`arg${t}`]);if(`arg0`in n){let e=[];for(;`arg${e.length}`in n;)e.push(n[`arg${e.length}`]);return e}return Object.keys(n).length===0?[]:void 0}function Nx(e,t){return Mx(e,t)??[e]}function Px(e){return typeof e==`string`?`'${e}'`:new Rx().serialize(e)}var Fx=` _-,;:!?.'"()[]{}@*/\\&#%\`^+<=>|~$0123456789abcdefghijklmnopqrstuvwxyz`,Ix=(function(){let e=new Uint8Array(128);for(let t=0;t<69;t++)e[Fx.charCodeAt(t)]=t+1;for(let t=65;t<=90;t++)e[t]=e[t+32];return e})();function Lx(e,t){if(e===t)return 0;let n=Math.min(e.length,t.length),r=0;for(let i=0;ia?-1:1)}return e.length===t.length?r:e.lengththis.compare(e[0],t[0])),r=`${e}{`;for(let e=0;ethis.compare(e,t)))}`}$Map(e){return this.serializeObjectEntries(`Map`,e.entries())}}for(let t of[`Error`,`RegExp`,`URL`])e.prototype[`$`+t]=function(e){return`${t}(${e})`};for(let t of[`Int8Array`,`Uint8Array`,`Uint8ClampedArray`,`Int16Array`,`Uint16Array`,`Int32Array`,`Uint32Array`,`Float32Array`,`Float64Array`])e.prototype[`$`+t]=function(e){return`${t}[${e.join(`,`)}]`};for(let t of[`BigInt64Array`,`BigUint64Array`])e.prototype[`$`+t]=function(e){return`${t}[${e.join(`n,`)}${e.length>0?`n`:``}]`};return e})(),zx=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225],Bx=[1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998],Vx=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_`,Hx=[],Ux=class{_data=new Wx;_hash=new Wx([...zx]);_nDataBytes=0;_minBufferSize=0;finalize(e){e&&this._append(e);let t=this._nDataBytes*8,n=this._data.sigBytes*8;return this._data.words[n>>>5]|=128<<24-n%32,this._data.words[(n+64>>>9<<4)+14]=Math.floor(t/4294967296),this._data.words[(n+64>>>9<<4)+15]=t,this._data.sigBytes=this._data.words.length*4,this._process(),this._hash}_doProcessBlock(e,t){let n=this._hash.words,r=n[0],i=n[1],a=n[2],o=n[3],s=n[4],c=n[5],l=n[6],u=n[7];for(let n=0;n<64;n++){if(n<16)Hx[n]=e[t+n]|0;else{let e=Hx[n-15],t=(e<<25|e>>>7)^(e<<14|e>>>18)^e>>>3,r=Hx[n-2],i=(r<<15|r>>>17)^(r<<13|r>>>19)^r>>>10;Hx[n]=t+Hx[n-7]+i+Hx[n-16]}let d=s&c^~s&l,f=r&i^r&a^i&a,p=(r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22),m=(s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25),h=u+m+d+Bx[n]+Hx[n],g=p+f;u=l,l=c,c=s,s=o+h|0,o=a,a=i,i=r,r=h+g|0}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+a|0,n[3]=n[3]+o|0,n[4]=n[4]+s|0,n[5]=n[5]+c|0,n[6]=n[6]+l|0,n[7]=n[7]+u|0}_append(e){typeof e==`string`&&(e=Wx.fromUtf8(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes}_process(e){let t,n=this._data.sigBytes/64;n=e?Math.ceil(n):Math.max((n|0)-this._minBufferSize,0);let r=n*16,i=Math.min(r*4,this._data.sigBytes);if(r){for(let e=0;e>>2]|=(n.charCodeAt(e)&255)<<24-e%4*8;return new e(i,r)}toBase64(){let e=[];for(let t=0;t>>2]>>>24-t%4*8&255,r=this.words[t+1>>>2]>>>24-(t+1)%4*8&255,i=this.words[t+2>>>2]>>>24-(t+2)%4*8&255,a=n<<16|r<<8|i;for(let n=0;n<4&&t*8+n*6>>6*(3-n)&63))}return e.join(``)}concat(e){if(this.words[this.sigBytes>>>2]&=4294967295<<32-this.sigBytes%4*8,this.words.length=Math.ceil(this.sigBytes/4),this.sigBytes%4)for(let t=0;t>>2]>>>24-t%4*8&255;this.words[this.sigBytes+t>>>2]|=n<<24-(this.sigBytes+t)%4*8}else for(let t=0;t>>2]=e.words[t>>>2];this.sigBytes+=e.sigBytes}};function Gx(e){return new Ux().finalize(e).toBase64()}function Kx(e){return Gx(Px(e))}function qx(e){return Kx(e)}function Jx(){let e={};function t(t,...n){let r=e[t]||[];for(let e=0,t=r.length;e{e[t]=e[t]?.filter(e=>n!==e)}}function i(e,t){let n=r(e,((...e)=>(n(),t(...e))));return n}return{_listeners:e,emit:t,emitOnce:n,on:r,once:i}}var Yx=/^[\w+.-]{2,}:\/\//;function Xx(e){return e.endsWith(`/`)?e:`${e}/`}function Zx(e){return(e.endsWith(`/`)?e.slice(0,-1):e)||`/`}function Qx(e,...t){let n=e;for(let e of t)e&&e!==`/`&&(n=n?Xx(n)+e.replace(/^\.?\//,``):e);return n}function $x(e,t){if(!t||t===`/`||Yx.test(e))return e;let n=Zx(t);return e.startsWith(n)?e:Qx(n,e)}function eS(e,t){let n=e.match(Yx);return t+(n?e.slice(n[0].length):e)}var tS=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`;function nS(e=21){let t=``,n=e;for(;n--;)t+=tS[Math.random()*64|0];return t}var rS=Symbol.for(`immer-nothing`),iS=Symbol.for(`immer-draftable`),aS=Symbol.for(`immer-state`),oS=[function(e){return`The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`},function(e){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${e}'`},`This object has been frozen and should not be mutated`,function(e){return`Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? `+e},`An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.`,`Immer forbids circular references`,"The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(e){return`'current' expects a draft, got: ${e}`},`Object.defineProperty() cannot be used on an Immer draft`,`Object.setPrototypeOf() cannot be used on an Immer draft`,`Immer only supports deleting array indices`,`Immer only supports setting array indices and the 'length' property`,function(e){return`'original' expects a draft, got: ${e}`}];function sS(e,...t){{let n=oS[e],r=jS(n)?n.apply(null,t):n;throw Error(`[Immer] ${r}`)}}var cS=Object,lS=cS.getPrototypeOf,uS=`constructor`,dS=`prototype`,fS=`configurable`,pS=`enumerable`,mS=`writable`,hS=`value`,gS=e=>!!e&&!!e[aS];function _S(e){return e?bS(e)||DS(e)||!!e[iS]||!!e[uS]?.[iS]||OS(e)||kS(e):!1}var vS=cS[dS][uS].toString(),yS=new WeakMap;function bS(e){if(!e||!AS(e))return!1;let t=lS(e);if(t===null||t===cS[dS])return!0;let n=cS.hasOwnProperty.call(t,uS)&&t[uS];if(n===Object)return!0;if(!jS(n))return!1;let r=yS.get(n);return r===void 0&&(r=Function.toString.call(n),yS.set(n,r)),r===vS}function xS(e,t,n=!0){SS(e)===0?(n?Reflect.ownKeys(e):cS.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function SS(e){let t=e[aS];return t?t.type_:DS(e)?1:OS(e)?2:kS(e)?3:0}var CS=(e,t,n=SS(e))=>n===2?e.has(t):cS[dS].hasOwnProperty.call(e,t),wS=(e,t,n=SS(e))=>n===2?e.get(t):e[t],TS=(e,t,n,r=SS(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n};function ES(e,t){return e===t?e!==0||1/e==1/t:e!==e&&t!==t}var DS=Array.isArray,OS=e=>e instanceof Map,kS=e=>e instanceof Set,AS=e=>typeof e==`object`,jS=e=>typeof e==`function`,MS=e=>typeof e==`boolean`;function NS(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var PS=e=>AS(e)?e?.[aS]:null,FS=e=>e.copy_||e.base_,IS=e=>e.modified_?e.copy_:e.base_;function LS(e,t){if(OS(e))return new Map(e);if(kS(e))return new Set(e);if(DS(e))return Array[dS].slice.call(e);let n=bS(e);if(t===!0||t===`class_only`&&!n){let t=cS.getOwnPropertyDescriptors(e);delete t[aS];let n=Reflect.ownKeys(t);for(let r=0;r1&&cS.defineProperties(e,{set:BS,add:BS,clear:BS,delete:BS}),cS.freeze(e),t&&xS(e,(e,t)=>{RS(t,!0)},!1),e)}function zS(){sS(2)}var BS={[hS]:zS};function VS(e){return e===null||!AS(e)||cS.isFrozen(e)}var HS=`MapSet`,US=`Patches`,WS=`ArrayMethods`,GS={};function KS(e){let t=GS[e];return t||sS(0,e),t}var qS=e=>!!GS[e];function JS(e,t){GS[e]||(GS[e]=t)}var YS,XS=()=>YS,ZS=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:qS(HS)?KS(HS):void 0,arrayMethodsPlugin_:qS(WS)?KS(WS):void 0});function QS(e,t){t&&(e.patchPlugin_=KS(US),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function $S(e){eC(e),e.drafts_.forEach(nC),e.drafts_=null}function eC(e){e===YS&&(YS=e.parent_)}var tC=e=>YS=ZS(YS,e);function nC(e){let t=e[aS];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function rC(e,t){t.unfinalizedDrafts_=t.drafts_.length;let n=t.drafts_[0];if(e!==void 0&&e!==n){n[aS].modified_&&($S(t),sS(4)),_S(e)&&(e=iC(t,e));let{patchPlugin_:r}=t;r&&r.generateReplacementPatches_(n[aS].base_,e,t)}else e=iC(t,n);return aC(t,e,!0),$S(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e===rS?void 0:e}function iC(e,t){if(VS(t))return t;let n=t[aS];if(!n)return pC(t,e.handledSet_,e);if(!sC(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){let{callbacks_:t}=n;if(t)for(;t.length>0;)t.pop()(e);dC(n,e)}return n.copy_}function aC(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&RS(t,n)}function oC(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var sC=(e,t)=>e.scope_===t,cC=[];function lC(e,t,n,r){let i=FS(e),a=e.type_;if(r!==void 0&&wS(i,r,a)===t){TS(i,r,n,a);return}if(!e.draftLocations_){let t=e.draftLocations_=new Map;xS(i,(e,n)=>{if(gS(n)){let r=t.get(n)||[];r.push(e),t.set(n,r)}})}let o=e.draftLocations_.get(t)??cC;for(let e of o)TS(i,e,n,a)}function uC(e,t,n){e.callbacks_.push(function(r){let i=t;if(!i||!sC(i,r))return;r.mapSetPlugin_?.fixSetContents(i);let a=IS(i);lC(e,i.draft_??i,a,n),dC(i,r)})}function dC(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){let{patchPlugin_:n}=t;if(n){let r=n.getPath(e);r&&n.generatePatches_(e,r,t)}oC(e)}}function fC(e,t,n){let{scope_:r}=e;if(gS(n)){let i=n[aS];sC(i,r)&&i.callbacks_.push(function(){SC(e),lC(e,n,IS(i),t)})}else _S(n)&&e.callbacks_.push(function(){let i=FS(e);e.type_===3?i.has(n)&&pC(n,r.handledSet_,r):wS(i,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&pC(wS(e.copy_,t,e.type_),r.handledSet_,r)})}function pC(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||gS(e)||t.has(e)||!_S(e)||VS(e)?e:(t.add(e),xS(e,(r,i)=>{if(gS(i)){let t=i[aS];sC(t,n)&&(TS(e,r,IS(t),e.type_),oC(t))}else _S(i)&&pC(i,t,n)}),e)}function mC(e,t){let n=DS(e),r={type_:+!!n,scope_:t?t.scope_:XS(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},i=r,a=hC;n&&(i=[r],a=gC);let{revoke:o,proxy:s}=Proxy.revocable(i,a);return r.draft_=s,r.revoke_=o,[s,r]}var hC={get(e,t){if(t===aS)return e;let n=e.scope_.arrayMethodsPlugin_,r=e.type_===1&&typeof t==`string`;if(r&&n?.isArrayOperationMethod(t))return n.createMethodInterceptor(e,t);let i=FS(e);if(!CS(i,t,e.type_))return yC(e,i,t);let a=i[t];if(e.finalized_||!_S(a)||r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&NS(t))return a;if(a===_C(e.base_,t)||vC(e,t,a)){SC(e);let n=e.type_===1?+t:t,r=wC(e.scope_,a,e,n);return e.copy_[n]=r}return a},has(e,t){return t in FS(e)},ownKeys(e){return Reflect.ownKeys(FS(e))},set(e,t,n){let r=bC(FS(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){let r=_C(FS(e),t),i=r?.[aS];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_.delete(t),!0;if(ES(n,r)&&(n!==void 0||CS(e.base_,t,e.type_)))return!0;SC(e),xC(e)}return e.copy_[t]===n&&(n!==void 0||CS(e.copy_,t,e.type_))||Number.isNaN(n)&&Number.isNaN(e.copy_[t])?!0:(e.copy_[t]=n,e.assigned_.set(t,!0),fC(e,t,n),!0)},deleteProperty(e,t){return SC(e),_C(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),xC(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let n=FS(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[mS]:!0,[fS]:e.type_!==1||t!==`length`,[pS]:r[pS],[hS]:n[t]}},defineProperty(){sS(11)},getPrototypeOf(e){return lS(e.base_)},setPrototypeOf(){sS(12)}},gC={};for(let e in hC){let t=hC[e];gC[e]=function(){let e=arguments;return e[0]=e[0][0],t.apply(this,e)}}gC.deleteProperty=function(e,t){return isNaN(parseInt(t))&&sS(13),gC.set.call(this,e,t,void 0)},gC.set=function(e,t,n){return t!==`length`&&isNaN(parseInt(t))&&sS(14),hC.set.call(this,e[0],t,n,e[0])};function _C(e,t){let n=e[aS];return(n?FS(n):e)[t]}function vC(e,t,n){return e.type_!==1||!e.allIndicesReassigned_||e.assigned_?.get(t)||!_S(n)||n[aS]?!1:e.baseRefs_.has(n)}function yC(e,t,n){let r=bC(t,n);return r?hS in r?r[hS]:r.get?.call(e.draft_):void 0}function bC(e,t){if(!(t in e))return;let n=lS(e);for(;n;){let e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=lS(n)}}function xC(e){e.modified_||(e.modified_=!0,e.parent_&&xC(e.parent_))}function SC(e){e.copy_||=(e.assigned_=new Map,LS(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var CC=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,n)=>{if(jS(e)&&!jS(t)){let n=t;t=e;let r=this;return function(e=n,...i){return r.produce(e,e=>t.call(this,e,...i))}}jS(t)||sS(6),n!==void 0&&!jS(n)&&sS(7);let r;if(_S(e)){let i=tC(this),a=wC(i,e,void 0),o=!0;try{r=t(a),o=!1}finally{o?$S(i):eC(i)}return QS(i,n),rC(r,i)}if(!e||!AS(e)){if(r=t(e),r===void 0&&(r=e),r===rS&&(r=void 0),this.autoFreeze_&&RS(r,!0),n){let t=[],i=[];KS(US).generateReplacementPatches_(e,r,{patches_:t,inversePatches_:i}),n(t,i)}return r}sS(1,e)},this.produceWithPatches=(e,t)=>{if(jS(e))return(t,...n)=>this.produceWithPatches(t,t=>e(t,...n));let n,r;return[this.produce(e,t,(e,t)=>{n=e,r=t}),n,r]},MS(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),MS(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),MS(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){_S(e)||sS(8),gS(e)&&(e=TC(e));let t=tC(this),n=wC(t,e,void 0);return n[aS].isManual_=!0,eC(t),n}finishDraft(e,t){let n=e&&e[aS];(!n||!n.isManual_)&&sS(9);let{scope_:r}=n;return QS(r,t),rC(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){let r=t[n];if(r.path.length===0&&r.op===`replace`){e=r.value;break}}n>-1&&(t=t.slice(n+1));let r=KS(US).applyPatches_;return gS(e)?r(e,t):this.produce(e,e=>r(e,t))}};function wC(e,t,n,r){let[i,a]=OS(t)?KS(HS).proxyMap_(t,n):kS(t)?KS(HS).proxySet_(t,n):mC(t,n);return(n?.scope_??XS()).drafts_.push(i),a.callbacks_=n?.callbacks_??[],a.key_=r,n&&r!==void 0?uC(n,a,r):a.callbacks_.push(function(e){e.mapSetPlugin_?.fixSetContents(a);let{patchPlugin_:t}=e;a.modified_&&t&&t.generatePatches_(a,[],e)}),i}function TC(e){return gS(e)||sS(10,e),EC(e)}function EC(e){if(!_S(e)||VS(e))return e;let t=e[aS],n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=LS(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=LS(e,!0);return xS(n,(e,t)=>{TS(n,e,EC(t))},r),t&&(t.finalized_=!1),n}function DC(){oS.push(`Sets cannot have "replace" patches.`,function(e){return`Unsupported patch operation: `+e},function(e){return`Cannot apply patch, path doesn't resolve: `+e},`Patching reserved attributes like __proto__, prototype and constructor is not allowed`);function e(n,r=[]){if(n.key_!==void 0){let e=n.parent_.copy_??n.parent_.base_,t=PS(wS(e,n.key_)),i=wS(e,n.key_);if(i===void 0||i!==n.draft_&&i!==n.base_&&i!==n.copy_||t!=null&&t.base_!==n.base_)return null;let a=n.parent_.type_===3,o;if(a){let e=n.parent_;o=Array.from(e.drafts_.keys()).indexOf(n.key_)}else o=n.key_;if(!(a&&e.size>o||CS(e,o)))return null;r.push(o)}if(n.parent_)return e(n.parent_,r);r.reverse();try{t(n.copy_,r)}catch{return null}return r}function t(e,t){let n=e;for(let e=0;e{let u=wS(o,e,c),f=wS(s,e,c),p=l?CS(o,e)?n:`add`:r;if(u===f&&p===n)return;let m=t.concat(e);i.push(p===r?{op:p,path:m}:{op:p,path:m,value:d(f)}),a.push(p===`add`?{op:r,path:m}:p===r?{op:`add`,path:m,value:d(u)}:{op:n,path:m,value:d(u)})})}function s(e,t,n,i){let{base_:a,copy_:o}=e,s=0;a.forEach(e=>{if(!o.has(e)){let a=t.concat([s]);n.push({op:r,path:a,value:e}),i.unshift({op:`add`,path:a,value:e})}s++}),s=0,o.forEach(e=>{if(!a.has(e)){let a=t.concat([s]);n.push({op:`add`,path:a,value:e}),i.unshift({op:r,path:a,value:e})}s++})}function c(e,t,r){let{patches_:i,inversePatches_:a}=r;i.push({op:n,path:[],value:t===rS?void 0:t}),a.push({op:n,path:[],value:e})}function l(e,t){return t.forEach(t=>{let{path:i,op:a}=t,o=e;for(let e=0;e[e,u(t)]));if(kS(e))return new Set(Array.from(e).map(u));let t=Object.create(lS(e));for(let n in e)t[n]=u(e[n]);return CS(e,iS)&&(t[iS]=e[iS]),t}function d(e){return gS(e)?u(e):e}JS(US,{applyPatches_:l,generatePatches_:i,generateReplacementPatches_:c,getPath:e})}globalThis.Iterator?.from;var OC=new CC,kC=OC.produce,AC=OC.produceWithPatches.bind(OC),jC=OC.applyPatches.bind(OC),MC=1e3;function NC(e,t){if(e.add(t),e.size>MC){let t=e.values().next().value;t!==void 0&&e.delete(t)}}function PC(e){let{enablePatches:t=!1}=e;t&&DC();let n=Jx(),r=e.initialValue,i=new Set;return{on:n.on,value:()=>r,patch:(e,t=nS())=>{i.has(t)||(DC(),r=jC(r,e),NC(i,t),n.emit(`updated`,r,void 0,t))},mutate:(e,a=nS())=>{if(!i.has(a)){if(NC(i,a),t){let[t,i]=AC(r,e);if(t===r)return;r=t,n.emit(`updated`,r,i,a)}else{let t=kC(r,e);if(t===r)return;r=t,n.emit(`updated`,r,void 0,a)}}},syncIds:i}}var FC=typeof self==`object`?self:globalThis,IC=new Set([`Error`,`EvalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`,`AggregateError`]),LC=new Set([`Boolean`,`Number`,`String`,`Int8Array`,`Uint8Array`,`Uint8ClampedArray`,`Int16Array`,`Uint16Array`,`Int32Array`,`Uint32Array`,`Float16Array`,`Float32Array`,`Float64Array`,`BigInt64Array`,`BigUint64Array`]);function RC(e,t){let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o)e[r(t)]=r(n);return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o,r=IC.has(e)?FC[e]:void 0;return n(new(r??FC.Error)(t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}}if(typeof a==`string`&&LC.has(a))return n(new FC[a](o),i);throw TypeError(`unable to deserialize unsafe or unknown type: ${String(a)}`)};return r}function zC(e){return RC(new Map,e)(0)}var BC=``,{toString:VC}={},{keys:HC}=Object;function UC(e){let t=typeof e;if(t!==`object`||!e)return[0,t];let n=VC.call(e).slice(8,-1);switch(n){case`Array`:return[1,BC];case`Object`:return[2,BC];case`Date`:return[3,BC];case`RegExp`:return[4,BC];case`Map`:return[5,BC];case`Set`:return[6,BC];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:n.includes(`Error`)?[7,n]:[2,n]}function WC([e,t]){return e===0&&(t===`function`||t===`symbol`)}function GC(e,t,n,r){let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=r=>{if(n.has(r))return n.get(r);let[o,s]=UC(r);switch(o){case 0:{let t=r;switch(s){case`bigint`:o=8,t=r.toString();break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize ${s}`);t=null;break;case`undefined`:return i([-1],r)}return i([o,t],r)}case 1:{if(s){let e=r;return s===`DataView`?e=new Uint8Array(r.buffer):s===`ArrayBuffer`&&(e=new Uint8Array(r)),i([s,[...e]],r)}let e=[],t=i([o,e],r);for(let t of r)e.push(a(t));return t}case 2:{if(s)switch(s){case`BigInt`:return i([s,r.toString()],r);case`Boolean`:case`Number`:case`String`:return i([s,r.valueOf()],r)}if(t&&`toJSON`in r)return a(r.toJSON());let n=[],c=i([o,n],r);for(let t of HC(r))(e||!WC(UC(r[t])))&&n.push([a(t),a(r[t])]);return c}case 3:return i([o,r.toISOString()],r);case 4:{let{source:e,flags:t}=r;return i([o,{source:e,flags:t}],r)}case 5:{let t=[],n=i([o,t],r);for(let[n,i]of r)(e||!(WC(UC(n))||WC(UC(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!WC(UC(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a}function KC(e,t={}){let n=[];return GC(!(t.json||t.lossy),!!t.json,new Map,n)(e),n}var{parse:qC,stringify:JC}=JSON,YC={json:!0,lossy:!0};function XC(e){return zC(qC(e))}function ZC(e){return JC(KC(e,YC))}function QC(e){return zC(e)}function $C(e){return ZC(e)}function ew(e){return XC(e)}var tw=256,nw=class extends Error{name=`StreamClosedError`};function rw(e={}){let t=e.id??nS(),n=Math.max(0,e.replayWindow??0),r=Jx(),i=new AbortController,a=[],o=!1,s=0;function c(e){if(o)throw new nw(`Cannot write to a closed stream "${t}"`);s+=1,n>0&&(a.push({seq:s,chunk:e}),a.length>n&&(a.length-n===1?a.shift():a.splice(0,a.length-n))),r.emit(`chunk`,s,e)}function l(e){if(o)return;o=!0;let t=aw(e);i.abort(e),r.emit(`end`,t)}function u(){o||(o=!0,i.signal.aborted||i.abort(`stream closed`),r.emit(`end`,void 0))}function d(e){o||i.signal.aborted||i.abort(e??`aborted`)}let f=new WritableStream({write(e){c(e)},close(){u()},abort(e){l(e)}});return{id:t,signal:i.signal,get closed(){return o},get lastSeq(){return s},write:c,error:l,close:u,abort:d,writable:f,events:r,buffer:a}}function iw(e={}){let t=e.id??nS(),n=Math.max(1,e.highWaterMark??tw),r=[],i=0,a=!1,o=!1,s,c,l,u;function d(){if(c){if(r.length>0){let e=r.shift(),t=c;c=void 0,t.resolve({value:e,done:!1});return}if(a){let e=c;if(c=void 0,s){let t=Error(s.message);t.name=s.name,e.reject(t)}else e.resolve({value:void 0,done:!0})}}}function f(){if(l){for(;r.length>0;){let e=r.shift();try{l.enqueue(e)}catch{break}}if(a&&l){try{if(s){let e=Error(s.message);e.name=s.name,l.error(e)}else l.close()}catch{}l=void 0}}}function p(t,s){if(!(a||o)&&!(t<=i)){if(i=t,r.push(s),r.length>n){let t=r.length-n;r.splice(0,t),e.onOverflow?.(t)}d(),u&&f()}}function m(e){a||(a=!0,s=e,d(),u&&f())}function h(){o||a||(o=!0,e.onCancel?.(),m(void 0))}function g(){return u||(u=new ReadableStream({start(e){l=e,f()},cancel(){h()}}),u)}return{id:t,get cancelled(){return o},get done(){return a},get lastSeenSeq(){return i},get readable(){return g()},cancel:h,_push:p,_end:m,[Symbol.asyncIterator](){return{next(){if(r.length>0)return Promise.resolve({value:r.shift(),done:!1});if(a){if(s){let e=Error(s.message);return e.name=s.name,Promise.reject(e)}return Promise.resolve({value:void 0,done:!0})}return new Promise((e,t)=>{c={resolve:e,reject:t}})},return(){return h(),Promise.resolve({value:void 0,done:!0})}}}}}function aw(e){if(e instanceof Error)return{name:e.name||`Error`,message:e.message};if(typeof e==`string`)return{name:`Error`,message:e};try{return{name:`Error`,message:JSON.stringify(e)}}catch{return{name:`Error`,message:String(e)}}}var ow=128;function sw(e){return e.replace(/[^\w-]+/g,`_`).slice(0,ow)}var cw=`modulepreload`,lw=function(e,t){return new URL(e,t).href},uw={},dw=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=lw(t,n),t=s(t),t in uw)return;uw[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:cw,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}).filter(e=>e!==void 0))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},fw=`__connection.json`,pw=`__DEVFRAME_CONNECTION__`,mw=`x-birpc-session`,hw=`__rpc-dump/index.json`,gw=`devframe:services`,_w=`devframe_otp`,vw=`devframe_auth_token`;mx.postMessage.remoteAssetsError;var yw=class{cacheMap=new Map;options;keySerializer;constructor(e){this.options=e,this.keySerializer=e.keySerializer||(e=>qx(e))}updateOptions(e){this.options={...this.options,...e}}cached(e,t){let n=this.cacheMap.get(e);if(n)return n.get(this.keySerializer(t))}has(e,t){return this.cacheMap.get(e)?.has(this.keySerializer(t))??!1}apply(e,t){let n=this.cacheMap.get(e.m)||new Map;n.set(this.keySerializer(e.a),t),this.cacheMap.set(e.m,n)}validate(e){return this.options.functions.includes(e)}clear(e){e?this.cacheMap.delete(e):this.cacheMap.clear()}},bw=_x({docsBase:`https://devfra.me/errors`,codes:{DF0019:{why:e=>`RPC function "${e.name}" has \`agent\` set but \`jsonSerializable\` is \`false\`; MCP requires JSON-serializable data.`,fix:"Remove `jsonSerializable: false`, or remove `agent` to keep it RPC-only."},DF0020:{why:e=>`RPC function "${e.name}" declares \`jsonSerializable: true\` but the value at "${e.path}" is a ${e.type}.`,fix:"Either drop `jsonSerializable: true` (falls back to structured-clone) or change the value to a JSON-safe shape."},DF0021:{why:e=>`RPC function "${e.name}" is already registered`,fix:"Use the `force` parameter to overwrite an existing registration."},DF0022:{why:e=>`RPC function "${e.name}" is not registered. Use register() to add new functions.`},DF0023:{why:e=>`RPC function "${e.name}" is not registered`},DF0024:{why:e=>`Either handler or setup function must be provided for RPC function "${e.name}"`},DF0025:{why:e=>`Function "${e.name}" not found in dump store`},DF0026:{why:e=>`No dump match for "${e.name}" with args: ${e.args}`},DF0027:{why:e=>`Function "${e.name}" with type "${e.type}" cannot have dump configuration. Only "static" and "query" types support dumps.`},DF0028:{why:e=>`Function "${e.name}" with type "${e.type}" cannot use \`snapshot: true\`. Only "query" functions support this sugar; "static" functions have equivalent default behavior already.`,fix:"Remove `snapshot: true`, or change the function type to `query`."},DF0043:{why:e=>`RPC function "${e.name}" received an invalid argument at position ${e.index}: ${e.issues}`,fix:"Pass a value that satisfies the `args` schema declared for this function."},DF0044:{why:e=>`RPC function "${e.name}" returned a value that failed its \`returns\` schema: ${e.issues}`,fix:"Make the handler return a value that satisfies the `returns` schema, or relax the schema."}}});function xw(e){if(e.agent&&e.jsonSerializable===!1)throw bw.DF0019({name:e.name});e.agent&&!e.jsonSerializable&&(e.jsonSerializable=!0)}async function Sw(e,t){let n=e[`~standard`].validate(t);return n instanceof Promise?await n:n}function Cw(e){return e.map(e=>{let t=e.path?.map(e=>typeof e==`object`?e.key:e).join(`.`);return t?`${t}: ${e.message}`:e.message}).join(`; `)}async function ww(e,t,n){let r=n.slice();if(!t||t.length===0)return r;for(let r=0;r{n.get(t)===r&&n.delete(t)}),n.set(t,r)),await r}if(!e.__promise){let n=Promise.resolve(e.setup(t));n.catch(()=>{e.__promise===n&&(e.__promise=void 0)}),e.__promise=n}return await e.__promise}async function Dw(e,t){let n=e.handler;if(!n){let r=await Ew(e,t);if(!r.handler)throw bw.DF0024({name:e.name});n=r.handler}let r=e.args,i=e.returns;if(!r&&!i)return n;let a=n;return async(...t)=>{let n=await ww(e.name,r,t),o=await a(...n);return await Tw(e.name,i,o)}}var Ow=class{context;definitions=new Map;functions;_onChanged=[];constructor(e){this.context=e;let t=this.definitions,n=this;this.functions=new Proxy({},{get(e,r){let i=t.get(r);if(i)return Dw(i,n.context)},has(e,n){return t.has(n)},getOwnPropertyDescriptor(e,n){return{value:t.get(n)?.handler,configurable:!0,enumerable:!0}},ownKeys(){return Array.from(t.keys())}})}register(e,t=!1){if(this.definitions.has(e.name)&&!t)throw bw.DF0021({name:e.name});xw(e),this.definitions.set(e.name,e),this._onChanged.forEach(t=>t(e.name))}update(e,t=!1){if(!this.definitions.has(e.name)&&!t)throw bw.DF0022({name:e.name});xw(e),this.definitions.set(e.name,e),this._onChanged.forEach(t=>t(e.name))}onChanged(e){return this._onChanged.push(e),()=>{let t=this._onChanged.indexOf(e);t!==-1&&this._onChanged.splice(t,1)}}async getHandler(e){return await Dw(this.definitions.get(e),this.context)}getSchema(e){let t=this.definitions.get(e);if(!t)throw bw.DF0023({name:String(e)});return{args:t.args,returns:t.returns}}has(e){return this.definitions.has(e)}get(e){return this.definitions.get(e)}list(){return Array.from(this.definitions.keys())}};function kw(e,t=``){return JSON.stringify(e,function(e,n){let r=this,i=r==null?n:r[e];if(i===void 0){if(Array.isArray(r))throw jw(t,`undefined`,r,e);return n}return i!==null&&Aw(i,r,e,t),n})}function Aw(e,t,n,r){if(typeof e==`bigint`)throw jw(r,`BigInt`,t,n);if(typeof e!=`object`)return;if(e instanceof Map)throw jw(r,`Map`,t,n);if(e instanceof Set)throw jw(r,`Set`,t,n);if(e instanceof Date)throw jw(r,`Date`,t,n);if(Array.isArray(e))return;let i=Object.getPrototypeOf(e);if(i!==null&&i!==Object.prototype)throw jw(r,e.constructor?.name??`class instance`,t,n)}function jw(e,t,n,r){let i=Mw(n,r);return bw.DF0020({name:e||``,type:t,path:i})}function Mw(e,t){return Array.isArray(e)?`[${t}]`:t===``?``:t}var Nw=`__DEVFRAME_CONNECTION_META__`,Pw=`__DEVFRAME_CONNECTION_AUTH_TOKEN__`;function Fw(e){let t=[()=>window?.[e],()=>globalThis?.[e],()=>parent.window?.[e]];for(let e of t)try{let t=e();if(t)return t}catch{}}function Iw(){return Fw(pw)}function Lw(){return Fw(Nw)}function Rw(e){if(e)return e;try{let e=localStorage.getItem(Pw);if(e)return e}catch{}return Fw(Pw)}function zw(e){globalThis[pw]=e,globalThis[Nw]={...e.connectionMeta,baseUrl:e.metaBaseUrl},e.authToken&&Bw(e.authToken)}function Bw(e){try{localStorage.setItem(Pw,e)}catch{}globalThis[Pw]=e;let t=Iw();t&&(globalThis[pw]={...t,authToken:e})}function Vw(e){let t=$x(fw,e);try{return new URL(t,globalThis.location?.href).href}catch{return t}}function Hw(e,t){return t&&t!==e.authToken?{...e,authToken:t}:e}function Uw(){let e=Iw();if(e)return Hw(e,Rw()??e.authToken??e.connectionMeta.authToken);let t=Lw();if(t)return{connectionMeta:t,metaBaseUrl:t.baseUrl??Vw(`./`),authToken:Rw(t.authToken)}}async function Ww(e={}){if(e.connection){let t=Hw(e.connection,Rw(e.authToken??e.connection.authToken??e.connection.connectionMeta.authToken));return zw(t),t}let t=Array.isArray(e.baseURL)?e.baseURL:[e.baseURL??`./`];if(e.connectionMeta){let n={connectionMeta:e.connectionMeta,metaBaseUrl:Vw(t[0]??`./`),authToken:Rw(e.authToken??e.connectionMeta.authToken)};return zw(n),n}let n=Uw();if(n){let t=Hw(n,Rw(e.authToken??n.authToken??n.connectionMeta.authToken));return zw(t),t}let r=[];for(let n of t){let t=$x(fw,n),i=Vw(n);try{let n=await fetch(t);if(!n.ok)throw Error(`Failed to fetch connection meta from ${i}: ${n.status}`);let r=await n.json(),a=n.url||i,o={connectionMeta:r,metaBaseUrl:r.baseUrl?new URL(r.baseUrl,a).href:a,authToken:Rw(e.authToken??r.authToken)};return zw(o),o}catch(e){r.push(e)}}throw Error(`Failed to get connection meta from ${t.join(`, `)}`,{cause:r})}var Gw=class extends Error{name=`DevframeConnectionError`;kind;constructor(e,t,n){super(t,n),this.kind=e}};function Kw(e=_w){try{let t=globalThis.location?.hash?.replace(/^#/,``)??``;return new URLSearchParams(t).get(e)||void 0}catch{return}}function qw(e){try{let t=new URL(globalThis.location.href),n=new URLSearchParams(t.hash.replace(/^#/,``));if(!n.has(e))return;n.delete(e),t.hash=n.toString(),globalThis.history?.replaceState(globalThis.history.state,``,t.href)}catch{}}function Jw(e=_w){let t=Kw(e);return t&&qw(e),t}async function Yw(e,t={}){let n=Jw(t.param??`devframe_otp`);return n?e.isTrusted?!0:e.requestTrustWithCode(n):!1}function Xw(e){let t={},n=new WeakMap,r,i=()=>(r??=e.sharedState.get(gw,{initialValue:{}}).then(e=>(t=e.value(),e.on(`updated`,e=>{t=e}),e)),r);return i(),{state:i,has:e=>e in t,keys:()=>Object.keys(t),get:r=>{let i=t[r];if(!i)return;let a=n.get(i);return a||(a={...i,rpc:e.scope(i.scope).rpc},n.set(i,a)),a}}}function Zw(e){let t=new Map,n=new Map,r=new Map,i=new Set,a=e.connectionMeta.backend===`static`;function o(e,t){let n=r.get(e);return n&&typeof n==`object`&&!Array.isArray(n)&&typeof t==`object`&&!Array.isArray(t)?{...n,...t}:t}e.client.register({name:mx.broadcast.clientStateUpdated,type:`event`,handler:(e,n,r)=>{let i=t.get(e);i&&!i.syncIds.has(r)&&i.mutate(()=>o(e,n),r)}}),e.client.register({name:mx.broadcast.clientStatePatch,type:`event`,handler:(e,n,r)=>{let i=t.get(e);i&&!i.syncIds.has(r)&&i.patch(n,r)}});function s(t,n){let r=[];return r.push(n.on(`updated`,(n,r,i)=>{a||(r?e.callEvent(`devframe:rpc:server-state:patch`,t,r,i):e.callEvent(`devframe:rpc:server-state:set`,t,n,i))})),()=>{for(let e of r)e()}}return{keys:()=>Array.from(t.keys()),onKeyAdded(e){return i.add(e),()=>{i.delete(e)}},delete(e){let i=n.get(e);n.delete(e);let a=t.delete(e);return r.delete(e),i?.(),a},get:async(c,l)=>{if(l?.initialValue!==void 0&&r.set(c,l.initialValue),t.has(c))return t.get(c);let u=PC({initialValue:l?.initialValue,enablePatches:!1});async function d(){if(a||e.callEvent(`devframe:rpc:server-state:subscribe`,c),l?.initialValue!==void 0){t.set(c,u);for(let e of i)e(c);return e.call(`devframe:rpc:server-state:get`,c).then(e=>{e!==void 0&&u.mutate(()=>o(c,e))}).catch(e=>{console.error(`Error getting server state`,e)}),n.set(c,s(c,u)),u}{let r=await e.call(`devframe:rpc:server-state:get`,c);u.mutate(()=>o(c,r)),t.set(c,u);for(let e of i)e(c);return n.set(c,s(c,u)),u}}return new Promise(t=>{if(e.isTrusted)d().then(t);else{t(u);let n=!1;e.events.on(mx.client.isTrustedUpdated,e=>{e&&!n&&(n=!0,d())})}})}}}var Qw=new Map;function $w(e=Qw){let t=new Map;return{serialize:n=>{let r;return n.t===`q`?r=n.m:(r=t.get(n.i),t.delete(n.i)),!(n.t===`s`&&`e`in n)&&r&&e.get(r)?.jsonSerializable===!0?kw(n,r??``):`s:${$C(n)}`},deserialize:e=>{let n=e.startsWith(`s:`)?ew(e.slice(2)):JSON.parse(e);return n.t===`q`&&n.i&&n.m&&t.set(n.i,n.m),n}}}function eT(){}function tT(e){let t=e.search(/\n\n|\r\n\r\n/);if(!(t<0))return{frame:e.slice(0,t),rest:e.slice(t+(e[t]===`\r`?4:2))}}function nT(e){let t=`message`,n=[];for(let r of e.split(/\r?\n/))r.startsWith(`:`)||(r.startsWith(`event:`)?t=r.slice(6).trimStart():r.startsWith(`data:`)&&n.push(r.slice(5).replace(/^ /,``)));return{event:t,data:n}}function rT(e){let{onConnected:t=eT,onError:n=eT,onDisconnected:r=eT,definitions:i,fetch:a=globalThis.fetch.bind(globalThis)}=e,o=e.url;e.authToken&&(o=`${o}${o.includes(`?`)?`&`:`?`}${vw}=${encodeURIComponent(e.authToken)}`);let s=$w(i),c=new AbortController,l=!1,u,d,f,p,m=new Promise((e,t)=>{f=e,p=t});m.catch(()=>{});function h(e){l||(l=!0,p(e),n(e),r())}function g(){l||(l=!0,p(Error(`Devframe SSE stream closed`)),r())}function _(e,n){if(e===`session`){f(n),t();return}u?.(n)}async function ee(e){let t=e.getReader();d=t;let n=new TextDecoder,r=``;for(;;){let{done:e,value:i}=await t.read();if(e)break;for(r+=n.decode(i,{stream:!0});;){let e=tT(r);if(!e)break;r=e.rest;let{event:t,data:n}=nT(e.frame);n.length>0&&_(t,n.join(` -`))}}g()}return(async()=>{try{let e=await a(o,{headers:{accept:`text/event-stream`},signal:c.signal});if(!e.ok||!e.body)throw Error(`Devframe SSE stream request failed: ${e.status}`);await ee(e.body)}catch(e){if(c.signal.aborted){g();return}h(e instanceof Error?e:Error(String(e)))}})(),{close:()=>{l=!0,c.abort(),d?.cancel().catch(()=>{})},on:e=>{u=e},post:async e=>{let t;try{t=await m}catch{return}if(l){n(Error(`Devframe SSE channel is closed; message dropped`));return}try{let n=await a(o,{method:`POST`,headers:{"content-type":`text/plain; charset=utf-8`,[mw]:t},body:e});if(n.status===200){let e=await n.text();e&&u?.(e);return}if(!n.ok)throw Error(`Devframe SSE POST failed: ${n.status}`)}catch(e){n(e instanceof Error?e:Error(String(e)))}},serialize:s.serialize,deserialize:s.deserialize}}function iT(e,t){let{channel:n,rpcOptions:r={}}=t;return Dx(e,{...n,timeout:-1,...r,proxify:!1})}function aT(e){let{transport:t,authToken:n,connectionMeta:r,events:i,clientRpc:a,rpcOptions:o={},callTimeout:s=0}=e,c=!1,l=`connecting`,u=null,d=Promise.withResolvers();function f(e,t=null){if(t?u=t:e===`connected`&&(u=null),e===l)return;let n=l;l=e,i.emit(mx.client.connectionStatus,e,n)}let p=new Set;function m(e){for(let t of[...p])t.reject(e)}function h(){return l===`disconnected`||l===`error`?new Gw(`connection`,`[devframe] Not connected to the devframe server`,{cause:u??void 0}):l===`unauthorized`?new Gw(`auth`,`[devframe] Not authorized by the devframe server`,{cause:u??void 0}):null}function g(e,t){return new Promise((n,r)=>{let a=!1,o,c={reject(e){a||(l(),i.emit(mx.client.error,e,t),r(e))}};function l(){a=!0,p.delete(c),o&&clearTimeout(o)}p.add(c),s>0&&(o=setTimeout(()=>{c.reject(new Gw(`timeout`,`[devframe] RPC call "${t}" timed out after ${s}ms`))},s)),e.then(e=>{a||(l(),n(e))},e=>{if(a)return;l();let n=e instanceof Error?e:Error(String(e));i.emit(mx.client.error,n,t),r(n)})})}let _=new Map;for(let e of r.jsonSerializableMethods??[])_.set(e,{jsonSerializable:!0});let ee=e.createChannel({definitions:_,onError(e){f(`error`,e),i.emit(mx.client.connectionError,e),m(new Gw(`connection`,`[devframe] Connection to the devframe server failed`,{cause:e}))},onDisconnected(){l!==`error`&&f(`disconnected`),m(new Gw(`connection`,`[devframe] Disconnected from the devframe server`,{cause:u??void 0}))}}),te=iT(a.functions,{channel:ee,rpcOptions:o});a.register({name:mx.broadcast.authRevoked,type:`event`,handler:()=>{c=!1;let e=new Gw(`auth`,`[devframe] The devframe server revoked this client's trust`);f(`unauthorized`,e),i.emit(mx.client.connectionError,e),m(e),i.emit(mx.client.isTrustedUpdated,!1)}});let ne=n;async function re(e){ne=e;let t=await te.$call(`anonymous:devframe:auth`,{authToken:e,ua:navigator.userAgent,origin:location.origin});if(c=t.isTrusted,c)d.resolve(!0),f(`connected`);else{let e=new Gw(`auth`,`[devframe] The devframe server refused this client's credentials`);f(`unauthorized`,e),i.emit(mx.client.connectionError,e)}return i.emit(mx.client.isTrustedUpdated,c),t.isTrusted}async function ie(e){let t=(await te.$call(`anonymous:devframe:auth:exchange`,{code:e,ua:navigator.userAgent,origin:location.origin}))?.authToken??null;return t&&(ne=t,c=!0,d.resolve(!0),f(`connected`),i.emit(mx.client.isTrustedUpdated,!0)),t}async function ae(e={}){await te.$call(`anonymous:devframe:auth:request-code`,{ua:navigator.userAgent,origin:location.origin,...e.reissue?{reissue:!0}:{}})}async function oe(){return c?!0:re(ne??``)}async function se(e=6e4){if(c&&d.resolve(!0),e<=0)return d.promise;let t;try{return await Promise.race([d.promise,new Promise((n,r)=>{t=setTimeout(()=>{r(Error(`[devframe] Timeout waiting for rpc to be trusted`))},e)})]),c}finally{clearTimeout(t)}}return{transport:t,get isTrusted(){return c},get status(){return l},get connectionError(){return u},requestTrust:oe,requestTrustWithToken:re,requestTrustWithCode:ie,requestAuthCode:ae,ensureTrusted:se,call:(...e)=>{let t=String(e[0]),n=h();return n?(i.emit(mx.client.error,n,t),Promise.reject(n)):g(te.$call(...e),t)},callEvent:(...e)=>{let t=h();if(t){i.emit(mx.client.error,t,String(e[0]));return}return te.$callEvent(...e)},callOptional:(...e)=>{let t=String(e[0]),n=h();return n?(i.emit(mx.client.error,n,t),Promise.reject(n)):g(te.$callOptional(...e),t)},close:()=>{ee.close()}}}function oT(e,t,n){let r=(()=>{try{return new URL(t,n.href)}catch{return new URL(n.href)}})();if(e&&typeof e==`object`){if(e.host!=null||e.port!=null){let t=e.host??`${r.hostname}:${e.port}`;return new URL(e.path??`/`,`${r.protocol}//${t}`).href}return new URL(e.path??``,r).href}let i=e??``;return/^https?:\/\//i.test(i)?i:new URL(i,r).href}function sT(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},sseOptions:s={},callTimeout:c=0}=e,l=oT(n.sse,r??`./`,location);return aT({transport:`sse`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>rT({url:l,authToken:t,definitions:e.definitions,...s,onConnected(){s.onConnected?.()},onError(t){e.onError(t),s.onError?.(t)},onDisconnected(){e.onDisconnected(),s.onDisconnected?.()}})})}function cT(e){let{name:t,message:n,cause:r,...i}=e,a=r instanceof Error?r:lT(r)?cT(r):r,o=a===void 0?Error(n):Error(n,{cause:a});return o.name=t,Object.assign(o,i),o}function lT(e){return typeof e==`object`&&!!e&&typeof e.message==`string`&&typeof e.name==`string`}function uT(e){return typeof e==`object`&&!!e&&e.type===`static`&&typeof e.path==`string`}function dT(e){return typeof e==`object`&&!!e&&e.type===`query`&&typeof e.records==`object`&&e.records!==null}function fT(e){return typeof e==`object`&&!!e&&(`output`in e||`error`in e)}function pT(e){if(e.error)throw cT(e.error);return e.output}function mT(e){return e.some(e=>e!=null)}function hT(e){return typeof e==`object`&&e&&`serialization`in e&&`data`in e?e.data:e}function gT(e,t){let n=new Map,r=new Map;function i(e,t){return t===`structured-clone`&&Array.isArray(e)?QC(e):e}function a(e,t){return i(hT(e),t)}async function o(e){n.has(e.path)||n.set(e.path,t(e.path).then(t=>a(t,e.serialization)));let r=await n.get(e.path);return fT(r)?pT(r):r}async function s(e,n){return r.has(e)||r.set(e,t(e).then(e=>a(e,n))),await r.get(e)}async function c(t,n){if(!(t in e))throw Error(`[devframe-rpc] Function "${t}" not found in dump store`);let r=e[t];if(uT(r)){if(mT(n))throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`);return await o(r)}if(dT(r)){let e=qx(n),i=r.records[e];if(i)return pT(await s(i,r.serialization));if(r.fallback)return pT(await s(r.fallback,r.serialization));throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`)}if(!mT(n))return r;throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`)}return{call:async(e,t)=>await c(e,t),callOptional:async(t,n)=>{if(t in e)return await c(t,n)},callEvent:async(e,t)=>{}}}async function _T(e){let t=gT(await e.fetchJsonFromBases(hw),e.fetchJsonFromBases);return{transport:`static`,isTrusted:!0,status:`connected`,connectionError:null,requestTrust:async()=>!0,requestTrustWithToken:async()=>!0,requestTrustWithCode:async()=>null,requestAuthCode:async()=>{},ensureTrusted:async()=>!0,call:(...e)=>t.call(e[0],e.slice(1)),callEvent:(...e)=>t.callEvent(e[0],e.slice(1)),callOptional:(...e)=>t.callOptional(e[0],e.slice(1)),close:()=>{}}}var vT=``;function yT(e,t){return`${e}${vT}${t}`}function bT(e){let t=new Map,n=new Map;e.client.register({name:mx.broadcast.streamingChunk,type:`event`,handler(e,n,r,i){t.get(yT(e,n))?._push(r,i)}}),e.client.register({name:mx.broadcast.streamingEnd,type:`event`,handler(e,n,r){let i=yT(e,n),a=t.get(i);a&&(a._end(r),t.delete(i))}}),e.client.register({name:mx.broadcast.streamingUploadCancel,type:`event`,handler(e,t){let r=yT(e,t),i=n.get(r);i&&(i.abort(`server cancelled upload`),n.delete(r))}}),e.events.on(mx.client.isTrustedUpdated,n=>{if(n)for(let[n,r]of t){if(r.cancelled||r.done)continue;let t=n.indexOf(vT);if(t<0)continue;let i=n.slice(0,t),a=n.slice(t+1);e.callEvent(`devframe:streaming:subscribe`,i,a,{afterSeq:r.lastSeenSeq})}});function r(n,r,i={}){let a=yT(n,r),o=t.get(a);if(o)return o;let s=iw({id:r,highWaterMark:i.highWaterMark,onOverflow(e){console.warn(`[devframe] DF0029: Stream "${n}#${r}" dropped ${e} chunk(s) after exceeding the client high-water mark.`)},onCancel(){e.callEvent(`devframe:streaming:cancel`,n,r),t.delete(a)}});if(t.set(a,s),e.isTrusted)e.callEvent(`devframe:streaming:subscribe`,n,r,{afterSeq:0});else{let i=e.events.on(mx.client.isTrustedUpdated,o=>{o&&(i(),t.has(a)&&!s.cancelled&&!s.done&&e.callEvent(`devframe:streaming:subscribe`,n,r,{afterSeq:s.lastSeenSeq}))})}return s}function i(t,r){let i=yT(t,r),a=n.get(i);if(a)return a;let o=rw({id:r});return o.events.on(`chunk`,(n,i)=>{e.callEvent(`devframe:streaming:upload-chunk`,t,r,n,i)}),o.events.on(`end`,a=>{e.callEvent(`devframe:streaming:upload-end`,t,r,a),n.delete(i)}),n.set(i,o),o}return{subscribe:r,upload:i}}function xT(){}var ST=new Map;function CT(e){let t=e.url;e.authToken&&(t=`${t}?${vw}=${encodeURIComponent(e.authToken)}`);let n=new WebSocket(t),{onConnected:r=xT,onError:i=xT,onDisconnected:a=xT,definitions:o=ST}=e;n.addEventListener(`open`,e=>{r(e)}),n.addEventListener(`error`,e=>{let t=e instanceof Error?e:Error(e.type);i(t)}),n.addEventListener(`close`,e=>{a(e)});let s=$w(o);return{close:()=>{n.close()},on:e=>{n.addEventListener(`message`,t=>{e(t.data)})},post:e=>{if(n.readyState===WebSocket.OPEN){n.send(e);return}if(n.readyState===WebSocket.CONNECTING){let t=()=>{i(),n.readyState===WebSocket.OPEN&&n.send(e)},r=()=>i();function i(){n.removeEventListener(`open`,t),n.removeEventListener(`close`,r)}n.addEventListener(`open`,t),n.addEventListener(`close`,r);return}i(Error(`Devframe WebSocket is not open; message dropped`))},serialize:s.serialize,deserialize:s.deserialize}}function wT(e,t,n){let r=(()=>{try{return new URL(t,n.href)}catch{return new URL(n.href)}})(),i=r.protocol===`https:`?`wss:`:`ws:`;if(e&&typeof e==`object`){if(e.host!=null||e.port!=null){let t=e.host??`${r.hostname}:${e.port}`,n=new URL(e.path??`/`,`${i}//${t}`);return n.protocol=i,n.href}let t=new URL(e.path??``,r);return t.protocol=i,t.href}if(typeof e==`number`)return`${i}//${r.hostname}:${e}`;let a=e??``;if(/^wss?:\/\//i.test(a))return a;if(/^https?:\/\//i.test(a))return eS(a,/^https/i.test(a)?`wss://`:`ws://`);let o=new URL(a,r);return o.protocol=i,o.href}function TT(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},wsOptions:s={},callTimeout:c=0}=e,l=wT(n.websocket,r??`./`,location);return aT({transport:`websocket`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>CT({url:l,authToken:t,definitions:e.definitions,...s,onConnected(e){s.onConnected?.(e)},onError(t){e.onError(t),s.onError?.(t)},onDisconnected(t){e.onDisconnected(),s.onDisconnected?.(t)}})})}function ET(e){return e.includes(`:`)}function DT(e,t){return ET(t)?t:`${e}:${t}`}function OT(e){return{async get(t){return(await e()).value()[t]},async set(t,n){(await e()).mutate(e=>{e[t]=n})},async delete(t){(await e()).mutate(e=>{delete e[t]})},async all(){return(await e()).value()},async onChange(t){return(await e()).on(`updated`,e=>t(e))}}}function kT(e,t,n){let r=`devframe:settings:${n}:${t}`,i;function a(){return i||=e.sharedState.get(r,{initialValue:{}}),i}return OT(a)}function AT(e,t){return{global:kT(e,t,`global`),project:kT(e,t,`project`)}}function jT(e,t){return{namespace:t,base:e,rpc:{namespace:t,register(n){if(ET(n.name))throw Error(`[devframe] Scoped client RPC registration for namespace "${t}" received an already-namespaced function name "${n.name}". Pass a bare name without a ":" separator.`);e.client.register({...n,name:`${t}:${n.name}`})},call:((n,...r)=>e.call(DT(t,n),...r)),callEvent:((n,...r)=>e.callEvent(DT(t,n),...r)),callOptional:((n,...r)=>e.callOptional(DT(t,n),...r)),sharedState:((n,r)=>e.sharedState.get(DT(t,n),r)),streaming:{subscribe:(n,r,i)=>e.streaming.subscribe(DT(t,n),r,i),upload:(n,r)=>e.streaming.upload(DT(t,n),r)}},settings:AT(e,t),scope:e.scope}}function MT(){if(typeof document<`u`){let e=document.modelContext;if(e)return e}if(typeof navigator<`u`){let e=navigator.modelContext;if(e)return e}}function NT(e,t={}){let n=t.modelContext??MT();if(!n)return()=>{};let r=n,i=new Map,a=new Map;function o(t,n){let o=sw(t.name),s=a.get(o);if(s&&s!==t.name){console.warn(`[devframe] WebMCP tool name "${o}" (from "${t.name}") collides with "${s}"; keeping the first registration.`);return}let c=new AbortController,l=Ox(t.type,n),u=r.registerTool({name:o,description:n.description,inputSchema:jx(t.args),annotations:{title:n.title??t.name,readOnlyHint:l===`read`,destructiveHint:l===`destructive`},execute:n=>PT(t,e.context,n)},{signal:c.signal});u&&`then`in u&&u.then(()=>{},()=>{}),a.set(o,t.name),i.set(t.name,()=>{c.abort(),u&&`unregister`in u&&typeof u.unregister==`function`&&u.unregister(),a.delete(o)})}function s(t){let n=t?[t]:[...e.definitions.keys()];for(let t of n){i.get(t)?.(),i.delete(t);let n=e.definitions.get(t),r=n?.agent;n&&r&&o(n,r)}}s();let c=e.onChanged(e=>s(e));return()=>{c();for(let e of i.values())e();i.clear()}}async function PT(e,t,n){try{let r=Nx(n,e.args?.length);return{content:[{type:`text`,text:FT(await(await Dw(e,t))(...r))}]}}catch(e){return{isError:!0,content:[{type:`text`,text:IT(e)}]}}}function FT(e){return e===void 0?`undefined`:typeof e==`string`?e:JSON.stringify(e,null,2)}function IT(e){if(!(e instanceof Error))return String(e);let t=e.cause instanceof Error?` (cause: ${e.cause.message})`:``;return`${e.name}: ${e.message}${t}`}function LT(e,t){if(t.backend===`static`)return`static`;let n=t.websocket!==void 0,r=t.sse!==void 0;if(e===`websocket`){if(!n)throw Error(`[devframe] transport: 'websocket' was requested, but this server does not advertise a WebSocket endpoint`);return`websocket`}if(e===`sse`){if(!r)throw Error(`[devframe] transport: 'sse' was requested, but this server does not advertise an SSE endpoint`);return`sse`}if(t.backend===`sse`&&r)return`sse`;if(n)return`websocket`;if(r)return`sse`;throw Error(`[devframe] This server advertises no RPC transport (backend "none"), so there is nothing to connect to. Enable the WebSocket or SSE endpoint on the server, or use its static/MCP surfaces instead.`)}async function RT(e={}){let{baseURL:t=`./`,rpcOptions:n={},cacheOptions:r=!1}=e,i=Jx(),a=Array.isArray(t)?t:[t],o=await Ww(e),{connectionMeta:s,metaBaseUrl:c,authToken:l}=o,u=a[0]??`./`;try{u=new URL(`.`,c).href}catch{}let d=new yw({functions:[],...typeof e.cacheOptions==`object`?e.cacheOptions:{}}),f={rpc:void 0},p=new Ow(f),m=e.webmcp===!1?void 0:NT(p),h,g=!1;async function _(e){let t=[u,...a.filter(e=>e!==u)].filter(e=>e!=null),n=[];for(let r of t)try{return await fetch($x(e,r)).then(t=>{if(!t.ok)throw Error(`Failed to fetch ${e} from ${r}: ${t.status}`);return t.json()})}catch(e){n.push(e)}throw Error(`Failed to load ${e} from ${t.join(`, `)}`,{cause:n})}let ee={authToken:l,connectionMeta:s,metaBaseUrl:c,events:i,clientRpc:p,callTimeout:e.callTimeout,rpcOptions:{...n,async onRequest(e,t,i){if(await n.onRequest?.call(this,e,t,i),r&&d?.validate(e.m)){if(d.has(e.m,e.a))return i(d.cached(e.m,e.a));let n=await t(e);d.apply(e,n)}else await t(e)}}},te=LT(e.transport??`auto`,s),ne=te===`static`?await _T({fetchJsonFromBases:_}):te===`sse`?sT({...ee,sseOptions:e.sseOptions}):TT({...ee,wsOptions:e.wsOptions}),re;try{re=new BroadcastChannel(`devframe-auth`)}catch{}let ie,ae=!1;function oe(e){return((...t)=>ae||!ie?e(...t):ie.then(()=>e(...t)))}function se(){g=!0;try{h?.(),m?.()}finally{try{re?.close()}finally{ne.close?.()}}}let ce={events:i,get isTrusted(){return ne.isTrusted},get status(){return ne.status},get connectionError(){return ne.connectionError},get transport(){return ne.transport??te},get connection(){return o},connectionMeta:s,ensureTrusted:ne.ensureTrusted,requestTrust:ne.requestTrust,requestTrustWithToken:async e=>(Bw(e),o={...o,authToken:e},ne.requestTrustWithToken(e)),requestTrustWithCode:async e=>{let t=await ne.requestTrustWithCode(e);if(!t)return!1;Bw(t),o={...o,authToken:t};try{re?.postMessage({type:`auth-update`,authToken:t})}catch{}return!0},requestAuthCode:e=>ne.requestAuthCode(e),call:oe(ne.call),callEvent:oe(ne.callEvent),callOptional:oe(ne.callOptional),client:p,sharedState:void 0,services:void 0,streaming:void 0,cacheManager:d,scope:void 0,close:se};ce.sharedState=Zw(ce),ce.streaming=bT(ce),ce.services=Xw(ce);let le=new Map;ce.scope=(e=>{if(!e)return ce;let t=le.get(e);return t||(t=jT(ce,e),le.set(e,t)),t}),f.rpc=ce;function ue(){try{return typeof window<`u`&&window.self===window.top}catch{return!1}}async function de(){if(e.simpleAuth!==!1&&ue()&&typeof globalThis.prompt==`function`)for(await ce.requestAuthCode().catch(()=>{});!ce.isTrusted;){let e=globalThis.prompt(`devframe: enter the authentication code shown in your terminal`);if(e==null)return;let t=e.trim();if(t&&await ce.requestTrustWithCode(t))return}}async function fe(){let t=await ne.requestTrust(),n=e.otpParam??`devframe_otp`,r=n?await Yw(ce,{param:n}):!1;t||r||ce.isTrusted||await de()}return ie=fe().then(()=>{ae=!0},()=>{ae=!0}),s.mcp&&dw(async()=>{let{setupBrowserAgentRpcBridge:e}=await import(`./browser-agent-rpc-BXhoSh1z-BytShXFb.js`);return{setupBrowserAgentRpcBridge:e}},[],import.meta.url).then(({setupBrowserAgentRpcBridge:e})=>{g||(h=e(ce))}).catch(()=>{}),re&&(re.onmessage=e=>{e.data?.type===`auth-update`&&e.data.authToken&&ce.requestTrustWithToken(e.data.authToken)}),ce}var zT=RT,BT=[`components`,`injectors`,`signals`,`ngrx`,`forms`,`router`,`pipes`,`http`,`analog`,`capacitor`],VT=[`angular`,`ngrx`,`analog`,`angular-native`,`nativescript`,`capacitor`];function HT(e){return`pangular:${e}`}var UT=[`forms`,`router`,`ngrx`,`http`,`analog`,`components`],WT={refreshMs:{default:3e3,min:500,max:8e3},navigations:{default:50,min:5,max:500},formTimeline:{default:200,min:10,max:2e3},httpCalls:{default:200,min:10,max:2e3},changeLog:{default:200,min:10,max:2e3},cdCycles:{default:200,min:10,max:2e3},capacitorCalls:{default:200,min:10,max:2e3}},GT={"opted-out":`the request sets transferCache: false`,post:`POST requests are left out unless includePostRequests is set`,method:`only GET, HEAD and POST requests are cached`,"auth-headers":`it sends an Authorization, Proxy-Authorization or Cookie header`,credentials:`it sends credentials (withCredentials or credentials: include/same-origin)`,"no-cache-request":`the request asks for no-store, no-cache or private`,"no-cache-response":`the response has Cache-Control no-store, no-cache or private`,"set-cookie":`the response sets a cookie`,error:`failed responses are not stored`,mocked:`a fault rule answered before the transfer cache ran`,"cache-off-or-filter":`the transfer cache is off, or its filter (or another withHttpTransferCacheOptions setting) left it out`},KT=[[200,`OK`],[201,`Created`],[202,`Accepted`],[203,`Non-Authoritative Information`],[204,`No Content`],[205,`Reset Content`],[206,`Partial Content`],[207,`Multi-Status`],[208,`Already Reported`],[226,`IM Used`],[300,`Multiple Choices`],[301,`Moved Permanently`],[302,`Found`],[303,`See Other`],[304,`Not Modified`],[307,`Temporary Redirect`],[308,`Permanent Redirect`],[400,`Bad Request`],[401,`Unauthorized`],[402,`Payment Required`],[403,`Forbidden`],[404,`Not Found`],[405,`Method Not Allowed`],[406,`Not Acceptable`],[407,`Proxy Authentication Required`],[408,`Request Timeout`],[409,`Conflict`],[410,`Gone`],[411,`Length Required`],[412,`Precondition Failed`],[413,`Content Too Large`],[414,`URI Too Long`],[415,`Unsupported Media Type`],[416,`Range Not Satisfiable`],[417,`Expectation Failed`],[418,`I'm a Teapot`],[421,`Misdirected Request`],[422,`Unprocessable Content`],[423,`Locked`],[424,`Failed Dependency`],[425,`Too Early`],[426,`Upgrade Required`],[428,`Precondition Required`],[429,`Too Many Requests`],[431,`Request Header Fields Too Large`],[451,`Unavailable For Legal Reasons`],[499,`Client Closed Request`],[500,`Internal Server Error`],[501,`Not Implemented`],[502,`Bad Gateway`],[503,`Service Unavailable`],[504,`Gateway Timeout`],[505,`HTTP Version Not Supported`],[506,`Variant Also Negotiates`],[507,`Insufficient Storage`],[508,`Loop Detected`],[510,`Not Extended`],[511,`Network Authentication Required`],[520,`Web Server Returned an Unknown Error`],[521,`Web Server Is Down`],[522,`Connection Timed Out`],[523,`Origin Is Unreachable`],[524,`A Timeout Occurred`]];function qT(e){return KT.some(([t])=>t===e)}var JT=`pangular`;function YT(e){return e&&typeof e==`object`&&!Array.isArray(e)?e:{}}function XT(e,t){return typeof e==`boolean`?e:t}var ZT=100,QT=100;function $T(e){if(!Array.isArray(e))return[];let t=e.filter(e=>typeof e==`string`).map(e=>e.trim()).filter(e=>e&&e.length<=QT);return[...new Set(t)].slice(0,ZT)}function eE(e,t){let{default:n,min:r,max:i}=WT[t];return typeof e!=`number`||!Number.isFinite(e)?n:Math.min(i,Math.max(r,Math.round(e)))}function tE(e,t){return Object.fromEntries(e.map(e=>[e,t(e)]))}function nE(e){let t=YT(e),n=YT(t.agent),r=YT(t.inspectors),i=YT(n.tools),a=YT(t.actions),o=XT(t.actions,!0),s=YT(t.redaction),c=YT(t.limits),l=tE(BT,e=>XT(r[e],!0));return{inspectors:l,agent:{readOnly:XT(n.readOnly,!1),tools:tE(BT,e=>l[e]&&XT(i[e],!0))},actions:tE(UT,e=>l[e]&&XT(a[e],o)),redaction:{secretNames:$T(s.secretNames),unmask:$T(s.unmask)},limits:Object.fromEntries(Object.keys(WT).map(e=>[e,eE(c[e],e)]))}}function rE(e){let t=e?.configs;return nE(t?.[JT])}function iE(e){return`${{forms:`Writing to forms`,router:`Navigating and clearing navigations`,ngrx:`Restoring NgRx state and dispatching actions`,http:`Changing HTTP mock rules and clearing HTTP calls`,analog:`Calling API routes and clearing server calls`,components:`Editing component properties and signals`}[e]} is turned off in the devtools config (actions.${e}).`}var aE={components:`Components`,injectors:`Injectors`,signals:`Signals`,ngrx:`NgRx`,forms:`Forms`,router:`Router`,pipes:`Pipes`,http:`HTTP`,analog:`Analog`,capacitor:`Capacitor`},oE={forms:`Form writes`,router:`Navigation`,ngrx:`NgRx restore and dispatch`,http:`HTTP mocking`,analog:`Analog API calls`,components:`Component edits`},sE={refreshMs:e=>`poll every ${e} ms`,navigations:e=>`${e} navigations`,formTimeline:e=>`${e} form events`,httpCalls:e=>`${e} HTTP calls`,changeLog:e=>`${e} NgRx changes`,cdCycles:e=>`${e} change detection cycles`,capacitorCalls:e=>`${e} Capacitor plugin calls`};function cE(e){let t=[],n=(e,n)=>{n.length&&t.push({label:e,value:n.join(`, `)})},r=BT.filter(t=>e.inspectors[t]);return n(`Inspectors off`,BT.filter(t=>!e.inspectors[t]).map(e=>aE[e])),n(`Agent`,e.agent.readOnly?[`Read-only`]:[]),n(`Hidden from the agent`,r.filter(t=>!e.agent.tools[t]).map(e=>aE[e])),n(`Blocked actions`,UT.filter(t=>e.inspectors[t]&&!e.actions[t]).map(e=>oE[e])),n(`Extra secret names`,e.redaction.secretNames),n(`Unmasked names`,e.redaction.unmask),n(`Limits`,Object.keys(WT).filter(t=>e.limits[t]!==WT[t].default).map(t=>sE[t](e.limits[t]))),t}var lE=`pangular-page-id`,uE=null;function dE(e){uE=e}function fE(){if(uE)return uE;try{return new URLSearchParams(location.search).get(`pageId`)||(window.top===window?null:sessionStorage.getItem(lE)||null)}catch{return null}}function pE(e,t){if(t.chosen&&e[t.chosen])return t.chosen;if(t.host)return t.host;if(t.previous&&e[t.previous])return t.previous;let n=null;for(let t of Object.values(e))(!n||t.reportedAt>n.reportedAt)&&(n=t);return n?.pageId??null}function mE(e,t){return e?t?e.pages?.[t]??null:e:null}function hE(e,t){return e?t?e.pages?.[t]??null:e.graph??null:null}function gE(e,t,n){return e?e.scope(`pangular`).rpc.call(t,...n===void 0?[]:[n]):Promise.resolve(null)}function _E(e,t,n){return gE(e,t,n).then(e=>e,()=>null)}function vE(e){return e?.connectionMeta.backend===`static`}function yE(e){let t=()=>{let t=e()?.scope(`pangular`).rpc;t&&(t.callEvent(`request-page-highlight`,null),t.callEvent(`request-form-highlight`,null))};return addEventListener(`pagehide`,t),()=>{removeEventListener(`pagehide`,t),t()}}function bE(e){return e.split(`@`)[1]??``}var xE={signal:`Signal Forms`,reactive:`Reactive`,template:`Template-driven`},SE={own:`validator`,directive:`template attribute`,tree:`cross-field rule`,async:`async`,parse:`parse`,submission:`server`,schema:`schema`,manual:`setErrors`},CE=_E,wE={key:`name looks secret`,"input-type":`password input`,autocomplete:`autocomplete is a secret kind`,marker:`marked as mask`,parent:`inside a secret group`,config:`listed in mask`};function TE(e){return wE[e]??e}var EE=`https://pangular-inspector.dev/security/#opt-fields-in-or-out`;async function DE(e,t){return await CE(e,`request-form-action`,t)??{ok:!1,error:`The devtools server did not answer.`}}function OE(e){return`${e.ok?e.message??`Done.`:e.error??`Failed.`}${e.skipped?.length?` Skipped: ${e.skipped.map(e=>`${e.path} (${e.reason})`).join(`, `)}.`:``}${e.status?` Status: ${e.status}.`:``}`}var kE=/"(?:[^"\\\n]|\\.)*"|`([^`\n]*)`|\*\*/g;function AE(e){return(e??``).replace(/^_Labels, paths.*_\n\n/,``).replace(kE,(e,t)=>t??(e===`**`?``:e))}function jE(e){return rE(e?.connectionMeta)}function ME(e,t){return jE(e).actions[t]}var NE={components:`components`,routes:`router`,signals:`signals`,injectors:`injectors`,store:`ngrx`,forms:`forms`,pipes:`pipes`,network:`http`,analog:`analog`,capacitor:`capacitor`};function PE(e){return NE[e]}var FE=`https://pangular-inspector.dev/getting-started/configuration/#inspectors-and-agent-tools`;function IE(e,t){let n=NE[e];return!n||t.inspectors[n]}function LE(e,t){e&1&&(k(),Bg(0,`rect`,4)(1,`rect`,5)(2,`rect`,6)(3,`rect`,7))}function RE(e,t){e&1&&(k(),Bg(0,`path`,8)(1,`path`,9)(2,`path`,10))}function zE(e,t){e&1&&(k(),Bg(0,`circle`,11)(1,`path`,12)(2,`circle`,13))}function BE(e,t){e&1&&(k(),Bg(0,`path`,1))}function VE(e,t){e&1&&(k(),Bg(0,`path`,14)(1,`path`,15)(2,`path`,16)(3,`path`,17))}function HE(e,t){e&1&&(k(),Bg(0,`ellipse`,18)(1,`path`,19)(2,`path`,20))}function UE(e,t){e&1&&(k(),Bg(0,`rect`,21)(1,`path`,22)(2,`path`,23)(3,`path`,24))}function WE(e,t){e&1&&(k(),Bg(0,`circle`,25)(1,`path`,26)(2,`path`,27))}function GE(e,t){e&1&&(k(),Bg(0,`path`,28)(1,`path`,29)(2,`path`,30)(3,`path`,31)(4,`circle`,32))}function KE(e,t){e&1&&(k(),Bg(0,`path`,2))}function qE(e,t){e&1&&(k(),Bg(0,`path`,3))}var JE=class e{name=$.required();static ɵfac=function(t){return new(t||e)};static ɵcmp=Gh({type:e,selectors:[[`app-tab-icon`]],inputs:{name:[1,`name`]},decls:12,vars:1,consts:[[`viewBox`,`0 0 24 24`,`width`,`16`,`height`,`16`,`fill`,`none`,`stroke`,`currentColor`,`stroke-width`,`1.8`,`stroke-linecap`,`round`,`stroke-linejoin`,`round`,`aria-hidden`,`true`],[`d`,`M22 12h-4l-3 9L9 3l-3 9H2`],[`d`,`m8 3 4 8 5-5 5 15H2L8 3z`],[`fill`,`currentColor`,`stroke`,`none`,`transform`,`translate(1.8 1.8) scale(0.85)`,`d`,`M24 3.7l-5.766 5.766 5.725 5.736-3.713 3.712L5.073 3.742 8.786.03l5.736 5.726L20.284 0 24 3.7zM.029 8.785l3.713-3.713 15.173 15.173-3.713 3.714-5.732-5.726L3.7 24 0 20.285l5.754-5.764L.029 8.785z`],[`x`,`3`,`y`,`3`,`width`,`7`,`height`,`9`,`rx`,`1.5`],[`x`,`14`,`y`,`3`,`width`,`7`,`height`,`5`,`rx`,`1.5`],[`x`,`14`,`y`,`12`,`width`,`7`,`height`,`9`,`rx`,`1.5`],[`x`,`3`,`y`,`16`,`width`,`7`,`height`,`5`,`rx`,`1.5`],[`d`,`M12 2 3 7l9 5 9-5-9-5Z`],[`d`,`m3 12 9 5 9-5`],[`d`,`m3 17 9 5 9-5`],[`cx`,`6`,`cy`,`19`,`r`,`3`],[`d`,`M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15`],[`cx`,`18`,`cy`,`5`,`r`,`3`],[`d`,`M12 22v-5`],[`d`,`M9 8V2`],[`d`,`M15 8V2`],[`d`,`M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z`],[`cx`,`12`,`cy`,`5`,`rx`,`9`,`ry`,`3`],[`d`,`M3 5v14a9 3 0 0 0 18 0V5`],[`d`,`M3 12a9 3 0 0 0 18 0`],[`x`,`3`,`y`,`4`,`width`,`18`,`height`,`16`,`rx`,`2`],[`d`,`M7 9h10`],[`d`,`M7 13h6`],[`d`,`M7 17h8`],[`cx`,`12`,`cy`,`12`,`r`,`9`],[`d`,`M3 12h18`],[`d`,`M12 3a14 14 0 0 1 0 18a14 14 0 0 1 0-18Z`],[`d`,`M4 7h10`],[`d`,`M4 17h6`],[`d`,`m14 13 4 4-4 4`],[`d`,`M10 17h8`],[`cx`,`18`,`cy`,`7`,`r`,`3`]],template:function(e,t){if(e&1&&(k(),V(0,`svg`,0),N(1,LE,4,0)(2,RE,3,0)(3,zE,3,0)(4,BE,1,0,`:svg:path`,1)(5,VE,4,0)(6,HE,3,0)(7,UE,4,0)(8,WE,3,0)(9,GE,5,0)(10,KE,1,0,`:svg:path`,2)(11,qE,1,0,`:svg:path`,3),H()),e&2){let e;j(),P((e=t.name())===`dashboard`?1:e===`components`?2:e===`routes`?3:e===`signals`?4:e===`injectors`?5:e===`store`?6:e===`forms`?7:e===`network`?8:e===`pipes`?9:e===`analog`?10:e===`capacitor`?11:-1)}},styles:[`[_nghost-%COMP%] { +`))}}g()}return(async()=>{try{let e=await a(o,{headers:{accept:`text/event-stream`},signal:c.signal});if(!e.ok||!e.body)throw Error(`Devframe SSE stream request failed: ${e.status}`);await ee(e.body)}catch(e){if(c.signal.aborted){g();return}h(e instanceof Error?e:Error(String(e)))}})(),{close:()=>{l=!0,c.abort(),d?.cancel().catch(()=>{})},on:e=>{u=e},post:async e=>{let t;try{t=await m}catch{return}if(l){n(Error(`Devframe SSE channel is closed; message dropped`));return}try{let n=await a(o,{method:`POST`,headers:{"content-type":`text/plain; charset=utf-8`,[mw]:t},body:e});if(n.status===200){let e=await n.text();e&&u?.(e);return}if(!n.ok)throw Error(`Devframe SSE POST failed: ${n.status}`)}catch(e){n(e instanceof Error?e:Error(String(e)))}},serialize:s.serialize,deserialize:s.deserialize}}function iT(e,t){let{channel:n,rpcOptions:r={}}=t;return Dx(e,{...n,timeout:-1,...r,proxify:!1})}function aT(e){let{transport:t,authToken:n,connectionMeta:r,events:i,clientRpc:a,rpcOptions:o={},callTimeout:s=0}=e,c=!1,l=`connecting`,u=null,d=Promise.withResolvers();function f(e,t=null){if(t?u=t:e===`connected`&&(u=null),e===l)return;let n=l;l=e,i.emit(mx.client.connectionStatus,e,n)}let p=new Set;function m(e){for(let t of[...p])t.reject(e)}function h(){return l===`disconnected`||l===`error`?new Gw(`connection`,`[devframe] Not connected to the devframe server`,{cause:u??void 0}):l===`unauthorized`?new Gw(`auth`,`[devframe] Not authorized by the devframe server`,{cause:u??void 0}):null}function g(e,t){return new Promise((n,r)=>{let a=!1,o,c={reject(e){a||(l(),i.emit(mx.client.error,e,t),r(e))}};function l(){a=!0,p.delete(c),o&&clearTimeout(o)}p.add(c),s>0&&(o=setTimeout(()=>{c.reject(new Gw(`timeout`,`[devframe] RPC call "${t}" timed out after ${s}ms`))},s)),e.then(e=>{a||(l(),n(e))},e=>{if(a)return;l();let n=e instanceof Error?e:Error(String(e));i.emit(mx.client.error,n,t),r(n)})})}let _=new Map;for(let e of r.jsonSerializableMethods??[])_.set(e,{jsonSerializable:!0});let ee=e.createChannel({definitions:_,onError(e){f(`error`,e),i.emit(mx.client.connectionError,e),m(new Gw(`connection`,`[devframe] Connection to the devframe server failed`,{cause:e}))},onDisconnected(){l!==`error`&&f(`disconnected`),m(new Gw(`connection`,`[devframe] Disconnected from the devframe server`,{cause:u??void 0}))}}),te=iT(a.functions,{channel:ee,rpcOptions:o});a.register({name:mx.broadcast.authRevoked,type:`event`,handler:()=>{c=!1;let e=new Gw(`auth`,`[devframe] The devframe server revoked this client's trust`);f(`unauthorized`,e),i.emit(mx.client.connectionError,e),m(e),i.emit(mx.client.isTrustedUpdated,!1)}});let ne=n;async function re(e){ne=e;let t=await te.$call(`anonymous:devframe:auth`,{authToken:e,ua:navigator.userAgent,origin:location.origin});if(c=t.isTrusted,c)d.resolve(!0),f(`connected`);else{let e=new Gw(`auth`,`[devframe] The devframe server refused this client's credentials`);f(`unauthorized`,e),i.emit(mx.client.connectionError,e)}return i.emit(mx.client.isTrustedUpdated,c),t.isTrusted}async function ie(e){let t=(await te.$call(`anonymous:devframe:auth:exchange`,{code:e,ua:navigator.userAgent,origin:location.origin}))?.authToken??null;return t&&(ne=t,c=!0,d.resolve(!0),f(`connected`),i.emit(mx.client.isTrustedUpdated,!0)),t}async function ae(e={}){await te.$call(`anonymous:devframe:auth:request-code`,{ua:navigator.userAgent,origin:location.origin,...e.reissue?{reissue:!0}:{}})}async function oe(){return c?!0:re(ne??``)}async function se(e=6e4){if(c&&d.resolve(!0),e<=0)return d.promise;let t;try{return await Promise.race([d.promise,new Promise((n,r)=>{t=setTimeout(()=>{r(Error(`[devframe] Timeout waiting for rpc to be trusted`))},e)})]),c}finally{clearTimeout(t)}}return{transport:t,get isTrusted(){return c},get status(){return l},get connectionError(){return u},requestTrust:oe,requestTrustWithToken:re,requestTrustWithCode:ie,requestAuthCode:ae,ensureTrusted:se,call:(...e)=>{let t=String(e[0]),n=h();return n?(i.emit(mx.client.error,n,t),Promise.reject(n)):g(te.$call(...e),t)},callEvent:(...e)=>{let t=h();if(t){i.emit(mx.client.error,t,String(e[0]));return}return te.$callEvent(...e)},callOptional:(...e)=>{let t=String(e[0]),n=h();return n?(i.emit(mx.client.error,n,t),Promise.reject(n)):g(te.$callOptional(...e),t)},close:()=>{ee.close()}}}function oT(e,t,n){let r=(()=>{try{return new URL(t,n.href)}catch{return new URL(n.href)}})();if(e&&typeof e==`object`){if(e.host!=null||e.port!=null){let t=e.host??`${r.hostname}:${e.port}`;return new URL(e.path??`/`,`${r.protocol}//${t}`).href}return new URL(e.path??``,r).href}let i=e??``;return/^https?:\/\//i.test(i)?i:new URL(i,r).href}function sT(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},sseOptions:s={},callTimeout:c=0}=e,l=oT(n.sse,r??`./`,location);return aT({transport:`sse`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>rT({url:l,authToken:t,definitions:e.definitions,...s,onConnected(){s.onConnected?.()},onError(t){e.onError(t),s.onError?.(t)},onDisconnected(){e.onDisconnected(),s.onDisconnected?.()}})})}function cT(e){let{name:t,message:n,cause:r,...i}=e,a=r instanceof Error?r:lT(r)?cT(r):r,o=a===void 0?Error(n):Error(n,{cause:a});return o.name=t,Object.assign(o,i),o}function lT(e){return typeof e==`object`&&!!e&&typeof e.message==`string`&&typeof e.name==`string`}function uT(e){return typeof e==`object`&&!!e&&e.type===`static`&&typeof e.path==`string`}function dT(e){return typeof e==`object`&&!!e&&e.type===`query`&&typeof e.records==`object`&&e.records!==null}function fT(e){return typeof e==`object`&&!!e&&(`output`in e||`error`in e)}function pT(e){if(e.error)throw cT(e.error);return e.output}function mT(e){return e.some(e=>e!=null)}function hT(e){return typeof e==`object`&&e&&`serialization`in e&&`data`in e?e.data:e}function gT(e,t){let n=new Map,r=new Map;function i(e,t){return t===`structured-clone`&&Array.isArray(e)?QC(e):e}function a(e,t){return i(hT(e),t)}async function o(e){n.has(e.path)||n.set(e.path,t(e.path).then(t=>a(t,e.serialization)));let r=await n.get(e.path);return fT(r)?pT(r):r}async function s(e,n){return r.has(e)||r.set(e,t(e).then(e=>a(e,n))),await r.get(e)}async function c(t,n){if(!(t in e))throw Error(`[devframe-rpc] Function "${t}" not found in dump store`);let r=e[t];if(uT(r)){if(mT(n))throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`);return await o(r)}if(dT(r)){let e=qx(n),i=r.records[e];if(i)return pT(await s(i,r.serialization));if(r.fallback)return pT(await s(r.fallback,r.serialization));throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`)}if(!mT(n))return r;throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`)}return{call:async(e,t)=>await c(e,t),callOptional:async(t,n)=>{if(t in e)return await c(t,n)},callEvent:async(e,t)=>{}}}async function _T(e){let t=gT(await e.fetchJsonFromBases(hw),e.fetchJsonFromBases);return{transport:`static`,isTrusted:!0,status:`connected`,connectionError:null,requestTrust:async()=>!0,requestTrustWithToken:async()=>!0,requestTrustWithCode:async()=>null,requestAuthCode:async()=>{},ensureTrusted:async()=>!0,call:(...e)=>t.call(e[0],e.slice(1)),callEvent:(...e)=>t.callEvent(e[0],e.slice(1)),callOptional:(...e)=>t.callOptional(e[0],e.slice(1)),close:()=>{}}}var vT=``;function yT(e,t){return`${e}${vT}${t}`}function bT(e){let t=new Map,n=new Map;e.client.register({name:mx.broadcast.streamingChunk,type:`event`,handler(e,n,r,i){t.get(yT(e,n))?._push(r,i)}}),e.client.register({name:mx.broadcast.streamingEnd,type:`event`,handler(e,n,r){let i=yT(e,n),a=t.get(i);a&&(a._end(r),t.delete(i))}}),e.client.register({name:mx.broadcast.streamingUploadCancel,type:`event`,handler(e,t){let r=yT(e,t),i=n.get(r);i&&(i.abort(`server cancelled upload`),n.delete(r))}}),e.events.on(mx.client.isTrustedUpdated,n=>{if(n)for(let[n,r]of t){if(r.cancelled||r.done)continue;let t=n.indexOf(vT);if(t<0)continue;let i=n.slice(0,t),a=n.slice(t+1);e.callEvent(`devframe:streaming:subscribe`,i,a,{afterSeq:r.lastSeenSeq})}});function r(n,r,i={}){let a=yT(n,r),o=t.get(a);if(o)return o;let s=iw({id:r,highWaterMark:i.highWaterMark,onOverflow(e){console.warn(`[devframe] DF0029: Stream "${n}#${r}" dropped ${e} chunk(s) after exceeding the client high-water mark.`)},onCancel(){e.callEvent(`devframe:streaming:cancel`,n,r),t.delete(a)}});if(t.set(a,s),e.isTrusted)e.callEvent(`devframe:streaming:subscribe`,n,r,{afterSeq:0});else{let i=e.events.on(mx.client.isTrustedUpdated,o=>{o&&(i(),t.has(a)&&!s.cancelled&&!s.done&&e.callEvent(`devframe:streaming:subscribe`,n,r,{afterSeq:s.lastSeenSeq}))})}return s}function i(t,r){let i=yT(t,r),a=n.get(i);if(a)return a;let o=rw({id:r});return o.events.on(`chunk`,(n,i)=>{e.callEvent(`devframe:streaming:upload-chunk`,t,r,n,i)}),o.events.on(`end`,a=>{e.callEvent(`devframe:streaming:upload-end`,t,r,a),n.delete(i)}),n.set(i,o),o}return{subscribe:r,upload:i}}function xT(){}var ST=new Map;function CT(e){let t=e.url;e.authToken&&(t=`${t}?${vw}=${encodeURIComponent(e.authToken)}`);let n=new WebSocket(t),{onConnected:r=xT,onError:i=xT,onDisconnected:a=xT,definitions:o=ST}=e;n.addEventListener(`open`,e=>{r(e)}),n.addEventListener(`error`,e=>{let t=e instanceof Error?e:Error(e.type);i(t)}),n.addEventListener(`close`,e=>{a(e)});let s=$w(o);return{close:()=>{n.close()},on:e=>{n.addEventListener(`message`,t=>{e(t.data)})},post:e=>{if(n.readyState===WebSocket.OPEN){n.send(e);return}if(n.readyState===WebSocket.CONNECTING){let t=()=>{i(),n.readyState===WebSocket.OPEN&&n.send(e)},r=()=>i();function i(){n.removeEventListener(`open`,t),n.removeEventListener(`close`,r)}n.addEventListener(`open`,t),n.addEventListener(`close`,r);return}i(Error(`Devframe WebSocket is not open; message dropped`))},serialize:s.serialize,deserialize:s.deserialize}}function wT(e,t,n){let r=(()=>{try{return new URL(t,n.href)}catch{return new URL(n.href)}})(),i=r.protocol===`https:`?`wss:`:`ws:`;if(e&&typeof e==`object`){if(e.host!=null||e.port!=null){let t=e.host??`${r.hostname}:${e.port}`,n=new URL(e.path??`/`,`${i}//${t}`);return n.protocol=i,n.href}let t=new URL(e.path??``,r);return t.protocol=i,t.href}if(typeof e==`number`)return`${i}//${r.hostname}:${e}`;let a=e??``;if(/^wss?:\/\//i.test(a))return a;if(/^https?:\/\//i.test(a))return eS(a,/^https/i.test(a)?`wss://`:`ws://`);let o=new URL(a,r);return o.protocol=i,o.href}function TT(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},wsOptions:s={},callTimeout:c=0}=e,l=wT(n.websocket,r??`./`,location);return aT({transport:`websocket`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>CT({url:l,authToken:t,definitions:e.definitions,...s,onConnected(e){s.onConnected?.(e)},onError(t){e.onError(t),s.onError?.(t)},onDisconnected(t){e.onDisconnected(),s.onDisconnected?.(t)}})})}function ET(e){return e.includes(`:`)}function DT(e,t){return ET(t)?t:`${e}:${t}`}function OT(e){return{async get(t){return(await e()).value()[t]},async set(t,n){(await e()).mutate(e=>{e[t]=n})},async delete(t){(await e()).mutate(e=>{delete e[t]})},async all(){return(await e()).value()},async onChange(t){return(await e()).on(`updated`,e=>t(e))}}}function kT(e,t,n){let r=`devframe:settings:${n}:${t}`,i;function a(){return i||=e.sharedState.get(r,{initialValue:{}}),i}return OT(a)}function AT(e,t){return{global:kT(e,t,`global`),project:kT(e,t,`project`)}}function jT(e,t){return{namespace:t,base:e,rpc:{namespace:t,register(n){if(ET(n.name))throw Error(`[devframe] Scoped client RPC registration for namespace "${t}" received an already-namespaced function name "${n.name}". Pass a bare name without a ":" separator.`);e.client.register({...n,name:`${t}:${n.name}`})},call:((n,...r)=>e.call(DT(t,n),...r)),callEvent:((n,...r)=>e.callEvent(DT(t,n),...r)),callOptional:((n,...r)=>e.callOptional(DT(t,n),...r)),sharedState:((n,r)=>e.sharedState.get(DT(t,n),r)),streaming:{subscribe:(n,r,i)=>e.streaming.subscribe(DT(t,n),r,i),upload:(n,r)=>e.streaming.upload(DT(t,n),r)}},settings:AT(e,t),scope:e.scope}}function MT(){if(typeof document<`u`){let e=document.modelContext;if(e)return e}if(typeof navigator<`u`){let e=navigator.modelContext;if(e)return e}}function NT(e,t={}){let n=t.modelContext??MT();if(!n)return()=>{};let r=n,i=new Map,a=new Map;function o(t,n){let o=sw(t.name),s=a.get(o);if(s&&s!==t.name){console.warn(`[devframe] WebMCP tool name "${o}" (from "${t.name}") collides with "${s}"; keeping the first registration.`);return}let c=new AbortController,l=Ox(t.type,n),u=r.registerTool({name:o,description:n.description,inputSchema:jx(t.args),annotations:{title:n.title??t.name,readOnlyHint:l===`read`,destructiveHint:l===`destructive`},execute:n=>PT(t,e.context,n)},{signal:c.signal});u&&`then`in u&&u.then(()=>{},()=>{}),a.set(o,t.name),i.set(t.name,()=>{c.abort(),u&&`unregister`in u&&typeof u.unregister==`function`&&u.unregister(),a.delete(o)})}function s(t){let n=t?[t]:[...e.definitions.keys()];for(let t of n){i.get(t)?.(),i.delete(t);let n=e.definitions.get(t),r=n?.agent;n&&r&&o(n,r)}}s();let c=e.onChanged(e=>s(e));return()=>{c();for(let e of i.values())e();i.clear()}}async function PT(e,t,n){try{let r=Nx(n,e.args?.length);return{content:[{type:`text`,text:FT(await(await Dw(e,t))(...r))}]}}catch(e){return{isError:!0,content:[{type:`text`,text:IT(e)}]}}}function FT(e){return e===void 0?`undefined`:typeof e==`string`?e:JSON.stringify(e,null,2)}function IT(e){if(!(e instanceof Error))return String(e);let t=e.cause instanceof Error?` (cause: ${e.cause.message})`:``;return`${e.name}: ${e.message}${t}`}function LT(e,t){if(t.backend===`static`)return`static`;let n=t.websocket!==void 0,r=t.sse!==void 0;if(e===`websocket`){if(!n)throw Error(`[devframe] transport: 'websocket' was requested, but this server does not advertise a WebSocket endpoint`);return`websocket`}if(e===`sse`){if(!r)throw Error(`[devframe] transport: 'sse' was requested, but this server does not advertise an SSE endpoint`);return`sse`}if(t.backend===`sse`&&r)return`sse`;if(n)return`websocket`;if(r)return`sse`;throw Error(`[devframe] This server advertises no RPC transport (backend "none"), so there is nothing to connect to. Enable the WebSocket or SSE endpoint on the server, or use its static/MCP surfaces instead.`)}async function RT(e={}){let{baseURL:t=`./`,rpcOptions:n={},cacheOptions:r=!1}=e,i=Jx(),a=Array.isArray(t)?t:[t],o=await Ww(e),{connectionMeta:s,metaBaseUrl:c,authToken:l}=o,u=a[0]??`./`;try{u=new URL(`.`,c).href}catch{}let d=new yw({functions:[],...typeof e.cacheOptions==`object`?e.cacheOptions:{}}),f={rpc:void 0},p=new Ow(f),m=e.webmcp===!1?void 0:NT(p),h,g=!1;async function _(e){let t=[u,...a.filter(e=>e!==u)].filter(e=>e!=null),n=[];for(let r of t)try{return await fetch($x(e,r)).then(t=>{if(!t.ok)throw Error(`Failed to fetch ${e} from ${r}: ${t.status}`);return t.json()})}catch(e){n.push(e)}throw Error(`Failed to load ${e} from ${t.join(`, `)}`,{cause:n})}let ee={authToken:l,connectionMeta:s,metaBaseUrl:c,events:i,clientRpc:p,callTimeout:e.callTimeout,rpcOptions:{...n,async onRequest(e,t,i){if(await n.onRequest?.call(this,e,t,i),r&&d?.validate(e.m)){if(d.has(e.m,e.a))return i(d.cached(e.m,e.a));let n=await t(e);d.apply(e,n)}else await t(e)}}},te=LT(e.transport??`auto`,s),ne=te===`static`?await _T({fetchJsonFromBases:_}):te===`sse`?sT({...ee,sseOptions:e.sseOptions}):TT({...ee,wsOptions:e.wsOptions}),re;try{re=new BroadcastChannel(`devframe-auth`)}catch{}let ie,ae=!1;function oe(e){return((...t)=>ae||!ie?e(...t):ie.then(()=>e(...t)))}function se(){g=!0;try{h?.(),m?.()}finally{try{re?.close()}finally{ne.close?.()}}}let ce={events:i,get isTrusted(){return ne.isTrusted},get status(){return ne.status},get connectionError(){return ne.connectionError},get transport(){return ne.transport??te},get connection(){return o},connectionMeta:s,ensureTrusted:ne.ensureTrusted,requestTrust:ne.requestTrust,requestTrustWithToken:async e=>(Bw(e),o={...o,authToken:e},ne.requestTrustWithToken(e)),requestTrustWithCode:async e=>{let t=await ne.requestTrustWithCode(e);if(!t)return!1;Bw(t),o={...o,authToken:t};try{re?.postMessage({type:`auth-update`,authToken:t})}catch{}return!0},requestAuthCode:e=>ne.requestAuthCode(e),call:oe(ne.call),callEvent:oe(ne.callEvent),callOptional:oe(ne.callOptional),client:p,sharedState:void 0,services:void 0,streaming:void 0,cacheManager:d,scope:void 0,close:se};ce.sharedState=Zw(ce),ce.streaming=bT(ce),ce.services=Xw(ce);let le=new Map;ce.scope=(e=>{if(!e)return ce;let t=le.get(e);return t||(t=jT(ce,e),le.set(e,t)),t}),f.rpc=ce;function ue(){try{return typeof window<`u`&&window.self===window.top}catch{return!1}}async function de(){if(e.simpleAuth!==!1&&ue()&&typeof globalThis.prompt==`function`)for(await ce.requestAuthCode().catch(()=>{});!ce.isTrusted;){let e=globalThis.prompt(`devframe: enter the authentication code shown in your terminal`);if(e==null)return;let t=e.trim();if(t&&await ce.requestTrustWithCode(t))return}}async function fe(){let t=await ne.requestTrust(),n=e.otpParam??`devframe_otp`,r=n?await Yw(ce,{param:n}):!1;t||r||ce.isTrusted||await de()}return ie=fe().then(()=>{ae=!0},()=>{ae=!0}),s.mcp&&dw(async()=>{let{setupBrowserAgentRpcBridge:e}=await import(`./browser-agent-rpc-BXhoSh1z-B1xMNaze.js`);return{setupBrowserAgentRpcBridge:e}},[],import.meta.url).then(({setupBrowserAgentRpcBridge:e})=>{g||(h=e(ce))}).catch(()=>{}),re&&(re.onmessage=e=>{e.data?.type===`auth-update`&&e.data.authToken&&ce.requestTrustWithToken(e.data.authToken)}),ce}var zT=RT,BT=[`components`,`injectors`,`signals`,`ngrx`,`forms`,`router`,`pipes`,`http`,`analog`,`capacitor`],VT=[`angular`,`ngrx`,`analog`,`angular-native`,`nativescript`,`capacitor`];function HT(e){return`pangular:${e}`}var UT=[`forms`,`router`,`ngrx`,`http`,`analog`,`components`],WT={refreshMs:{default:3e3,min:500,max:8e3},navigations:{default:50,min:5,max:500},formTimeline:{default:200,min:10,max:2e3},httpCalls:{default:200,min:10,max:2e3},changeLog:{default:200,min:10,max:2e3},cdCycles:{default:200,min:10,max:2e3},capacitorCalls:{default:200,min:10,max:2e3}},GT={"opted-out":`the request sets transferCache: false`,post:`POST requests are left out unless includePostRequests is set`,method:`only GET, HEAD and POST requests are cached`,"auth-headers":`it sends an Authorization, Proxy-Authorization or Cookie header`,credentials:`it sends credentials (withCredentials or credentials: include/same-origin)`,"no-cache-request":`the request asks for no-store, no-cache or private`,"no-cache-response":`the response has Cache-Control no-store, no-cache or private`,"set-cookie":`the response sets a cookie`,error:`failed responses are not stored`,mocked:`a fault rule answered before the transfer cache ran`,"cache-off-or-filter":`the transfer cache is off, or its filter (or another withHttpTransferCacheOptions setting) left it out`},KT=[[200,`OK`],[201,`Created`],[202,`Accepted`],[203,`Non-Authoritative Information`],[204,`No Content`],[205,`Reset Content`],[206,`Partial Content`],[207,`Multi-Status`],[208,`Already Reported`],[226,`IM Used`],[300,`Multiple Choices`],[301,`Moved Permanently`],[302,`Found`],[303,`See Other`],[304,`Not Modified`],[307,`Temporary Redirect`],[308,`Permanent Redirect`],[400,`Bad Request`],[401,`Unauthorized`],[402,`Payment Required`],[403,`Forbidden`],[404,`Not Found`],[405,`Method Not Allowed`],[406,`Not Acceptable`],[407,`Proxy Authentication Required`],[408,`Request Timeout`],[409,`Conflict`],[410,`Gone`],[411,`Length Required`],[412,`Precondition Failed`],[413,`Content Too Large`],[414,`URI Too Long`],[415,`Unsupported Media Type`],[416,`Range Not Satisfiable`],[417,`Expectation Failed`],[418,`I'm a Teapot`],[421,`Misdirected Request`],[422,`Unprocessable Content`],[423,`Locked`],[424,`Failed Dependency`],[425,`Too Early`],[426,`Upgrade Required`],[428,`Precondition Required`],[429,`Too Many Requests`],[431,`Request Header Fields Too Large`],[451,`Unavailable For Legal Reasons`],[499,`Client Closed Request`],[500,`Internal Server Error`],[501,`Not Implemented`],[502,`Bad Gateway`],[503,`Service Unavailable`],[504,`Gateway Timeout`],[505,`HTTP Version Not Supported`],[506,`Variant Also Negotiates`],[507,`Insufficient Storage`],[508,`Loop Detected`],[510,`Not Extended`],[511,`Network Authentication Required`],[520,`Web Server Returned an Unknown Error`],[521,`Web Server Is Down`],[522,`Connection Timed Out`],[523,`Origin Is Unreachable`],[524,`A Timeout Occurred`]];function qT(e){return KT.some(([t])=>t===e)}var JT=`pangular`;function YT(e){return e&&typeof e==`object`&&!Array.isArray(e)?e:{}}function XT(e,t){return typeof e==`boolean`?e:t}var ZT=100,QT=100;function $T(e){if(!Array.isArray(e))return[];let t=e.filter(e=>typeof e==`string`).map(e=>e.trim()).filter(e=>e&&e.length<=QT);return[...new Set(t)].slice(0,ZT)}function eE(e,t){let{default:n,min:r,max:i}=WT[t];return typeof e!=`number`||!Number.isFinite(e)?n:Math.min(i,Math.max(r,Math.round(e)))}function tE(e,t){return Object.fromEntries(e.map(e=>[e,t(e)]))}function nE(e){let t=YT(e),n=YT(t.agent),r=YT(t.inspectors),i=YT(n.tools),a=YT(t.actions),o=XT(t.actions,!0),s=YT(t.redaction),c=YT(t.limits),l=tE(BT,e=>XT(r[e],!0));return{inspectors:l,agent:{readOnly:XT(n.readOnly,!1),tools:tE(BT,e=>l[e]&&XT(i[e],!0))},actions:tE(UT,e=>l[e]&&XT(a[e],o)),redaction:{secretNames:$T(s.secretNames),unmask:$T(s.unmask)},limits:Object.fromEntries(Object.keys(WT).map(e=>[e,eE(c[e],e)]))}}function rE(e){let t=e?.configs;return nE(t?.[JT])}function iE(e){return`${{forms:`Writing to forms`,router:`Navigating and clearing navigations`,ngrx:`Restoring NgRx state and dispatching actions`,http:`Changing HTTP mock rules and clearing HTTP calls`,analog:`Calling API routes and clearing server calls`,components:`Editing component properties and signals`}[e]} is turned off in the devtools config (actions.${e}).`}var aE={components:`Components`,injectors:`Injectors`,signals:`Signals`,ngrx:`NgRx`,forms:`Forms`,router:`Router`,pipes:`Pipes`,http:`HTTP`,analog:`Analog`,capacitor:`Capacitor`},oE={forms:`Form writes`,router:`Navigation`,ngrx:`NgRx restore and dispatch`,http:`HTTP mocking`,analog:`Analog API calls`,components:`Component edits`},sE={refreshMs:e=>`poll every ${e} ms`,navigations:e=>`${e} navigations`,formTimeline:e=>`${e} form events`,httpCalls:e=>`${e} HTTP calls`,changeLog:e=>`${e} NgRx changes`,cdCycles:e=>`${e} change detection cycles`,capacitorCalls:e=>`${e} Capacitor plugin calls`};function cE(e){let t=[],n=(e,n)=>{n.length&&t.push({label:e,value:n.join(`, `)})},r=BT.filter(t=>e.inspectors[t]);return n(`Inspectors off`,BT.filter(t=>!e.inspectors[t]).map(e=>aE[e])),n(`Agent`,e.agent.readOnly?[`Read-only`]:[]),n(`Hidden from the agent`,r.filter(t=>!e.agent.tools[t]).map(e=>aE[e])),n(`Blocked actions`,UT.filter(t=>e.inspectors[t]&&!e.actions[t]).map(e=>oE[e])),n(`Extra secret names`,e.redaction.secretNames),n(`Unmasked names`,e.redaction.unmask),n(`Limits`,Object.keys(WT).filter(t=>e.limits[t]!==WT[t].default).map(t=>sE[t](e.limits[t]))),t}var lE=`pangular-page-id`,uE=null;function dE(e){uE=e}function fE(){if(uE)return uE;try{return new URLSearchParams(location.search).get(`pageId`)||(window.top===window?null:sessionStorage.getItem(lE)||null)}catch{return null}}function pE(e,t){if(t.chosen&&e[t.chosen])return t.chosen;if(t.host)return t.host;if(t.previous&&e[t.previous])return t.previous;let n=null;for(let t of Object.values(e))(!n||t.reportedAt>n.reportedAt)&&(n=t);return n?.pageId??null}function mE(e,t){return e?t?e.pages?.[t]??null:e:null}function hE(e,t){return e?t?e.pages?.[t]??null:e.graph??null:null}function gE(e,t,n){return e?e.scope(`pangular`).rpc.call(t,...n===void 0?[]:[n]):Promise.resolve(null)}function _E(e,t,n){return gE(e,t,n).then(e=>e,()=>null)}function vE(e){return e?.connectionMeta.backend===`static`}function yE(e){let t=()=>{let t=e()?.scope(`pangular`).rpc;t&&(t.callEvent(`request-page-highlight`,null),t.callEvent(`request-form-highlight`,null))};return addEventListener(`pagehide`,t),()=>{removeEventListener(`pagehide`,t),t()}}function bE(e){return e.split(`@`)[1]??``}var xE={signal:`Signal Forms`,reactive:`Reactive`,template:`Template-driven`},SE={own:`validator`,directive:`template attribute`,tree:`cross-field rule`,async:`async`,parse:`parse`,submission:`server`,schema:`schema`,manual:`setErrors`},CE=_E,wE={key:`name looks secret`,"input-type":`password input`,autocomplete:`autocomplete is a secret kind`,marker:`marked as mask`,parent:`inside a secret group`,config:`listed in mask`};function TE(e){return wE[e]??e}var EE=`https://pangular-inspector.dev/security/#opt-fields-in-or-out`;async function DE(e,t){return await CE(e,`request-form-action`,t)??{ok:!1,error:`The devtools server did not answer.`}}function OE(e){return`${e.ok?e.message??`Done.`:e.error??`Failed.`}${e.skipped?.length?` Skipped: ${e.skipped.map(e=>`${e.path} (${e.reason})`).join(`, `)}.`:``}${e.status?` Status: ${e.status}.`:``}`}var kE=/"(?:[^"\\\n]|\\.)*"|`([^`\n]*)`|\*\*/g;function AE(e){return(e??``).replace(/^_Labels, paths.*_\n\n/,``).replace(kE,(e,t)=>t??(e===`**`?``:e))}function jE(e){return rE(e?.connectionMeta)}function ME(e,t){return jE(e).actions[t]}var NE={components:`components`,routes:`router`,signals:`signals`,injectors:`injectors`,store:`ngrx`,forms:`forms`,pipes:`pipes`,network:`http`,analog:`analog`,capacitor:`capacitor`};function PE(e){return NE[e]}var FE=`https://pangular-inspector.dev/getting-started/configuration/#inspectors-and-agent-tools`;function IE(e,t){let n=NE[e];return!n||t.inspectors[n]}function LE(e,t){e&1&&(k(),Bg(0,`rect`,4)(1,`rect`,5)(2,`rect`,6)(3,`rect`,7))}function RE(e,t){e&1&&(k(),Bg(0,`path`,8)(1,`path`,9)(2,`path`,10))}function zE(e,t){e&1&&(k(),Bg(0,`circle`,11)(1,`path`,12)(2,`circle`,13))}function BE(e,t){e&1&&(k(),Bg(0,`path`,1))}function VE(e,t){e&1&&(k(),Bg(0,`path`,14)(1,`path`,15)(2,`path`,16)(3,`path`,17))}function HE(e,t){e&1&&(k(),Bg(0,`ellipse`,18)(1,`path`,19)(2,`path`,20))}function UE(e,t){e&1&&(k(),Bg(0,`rect`,21)(1,`path`,22)(2,`path`,23)(3,`path`,24))}function WE(e,t){e&1&&(k(),Bg(0,`circle`,25)(1,`path`,26)(2,`path`,27))}function GE(e,t){e&1&&(k(),Bg(0,`path`,28)(1,`path`,29)(2,`path`,30)(3,`path`,31)(4,`circle`,32))}function KE(e,t){e&1&&(k(),Bg(0,`path`,2))}function qE(e,t){e&1&&(k(),Bg(0,`path`,3))}var JE=class e{name=$.required();static ɵfac=function(t){return new(t||e)};static ɵcmp=Gh({type:e,selectors:[[`app-tab-icon`]],inputs:{name:[1,`name`]},decls:12,vars:1,consts:[[`viewBox`,`0 0 24 24`,`width`,`16`,`height`,`16`,`fill`,`none`,`stroke`,`currentColor`,`stroke-width`,`1.8`,`stroke-linecap`,`round`,`stroke-linejoin`,`round`,`aria-hidden`,`true`],[`d`,`M22 12h-4l-3 9L9 3l-3 9H2`],[`d`,`m8 3 4 8 5-5 5 15H2L8 3z`],[`fill`,`currentColor`,`stroke`,`none`,`transform`,`translate(1.8 1.8) scale(0.85)`,`d`,`M24 3.7l-5.766 5.766 5.725 5.736-3.713 3.712L5.073 3.742 8.786.03l5.736 5.726L20.284 0 24 3.7zM.029 8.785l3.713-3.713 15.173 15.173-3.713 3.714-5.732-5.726L3.7 24 0 20.285l5.754-5.764L.029 8.785z`],[`x`,`3`,`y`,`3`,`width`,`7`,`height`,`9`,`rx`,`1.5`],[`x`,`14`,`y`,`3`,`width`,`7`,`height`,`5`,`rx`,`1.5`],[`x`,`14`,`y`,`12`,`width`,`7`,`height`,`9`,`rx`,`1.5`],[`x`,`3`,`y`,`16`,`width`,`7`,`height`,`5`,`rx`,`1.5`],[`d`,`M12 2 3 7l9 5 9-5-9-5Z`],[`d`,`m3 12 9 5 9-5`],[`d`,`m3 17 9 5 9-5`],[`cx`,`6`,`cy`,`19`,`r`,`3`],[`d`,`M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15`],[`cx`,`18`,`cy`,`5`,`r`,`3`],[`d`,`M12 22v-5`],[`d`,`M9 8V2`],[`d`,`M15 8V2`],[`d`,`M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z`],[`cx`,`12`,`cy`,`5`,`rx`,`9`,`ry`,`3`],[`d`,`M3 5v14a9 3 0 0 0 18 0V5`],[`d`,`M3 12a9 3 0 0 0 18 0`],[`x`,`3`,`y`,`4`,`width`,`18`,`height`,`16`,`rx`,`2`],[`d`,`M7 9h10`],[`d`,`M7 13h6`],[`d`,`M7 17h8`],[`cx`,`12`,`cy`,`12`,`r`,`9`],[`d`,`M3 12h18`],[`d`,`M12 3a14 14 0 0 1 0 18a14 14 0 0 1 0-18Z`],[`d`,`M4 7h10`],[`d`,`M4 17h6`],[`d`,`m14 13 4 4-4 4`],[`d`,`M10 17h8`],[`cx`,`18`,`cy`,`7`,`r`,`3`]],template:function(e,t){if(e&1&&(k(),V(0,`svg`,0),N(1,LE,4,0)(2,RE,3,0)(3,zE,3,0)(4,BE,1,0,`:svg:path`,1)(5,VE,4,0)(6,HE,3,0)(7,UE,4,0)(8,WE,3,0)(9,GE,5,0)(10,KE,1,0,`:svg:path`,2)(11,qE,1,0,`:svg:path`,3),H()),e&2){let e;j(),P((e=t.name())===`dashboard`?1:e===`components`?2:e===`routes`?3:e===`signals`?4:e===`injectors`?5:e===`store`?6:e===`forms`?7:e===`network`?8:e===`pipes`?9:e===`analog`?10:e===`capacitor`?11:-1)}},styles:[`[_nghost-%COMP%] { display: inline-flex; flex-shrink: 0; }`]})},YE=(e,t)=>t.tab,XE=(e,t)=>t.label;function ZE(e,t){e&1&&J(0),e&2&&X(` `,G().meta()?.projectName,` `)}function QE(e,t){e&1&&J(0,` Project details unavailable `)}function $E(e,t){e&1&&J(0,` Loading… `)}function eD(e,t){e&1&&(J(0,` Run `),R(1,`code`),J(2,`pangular build`),z(),J(3,` again to rebuild the report. `))}function tD(e,t){e&1&&J(0,` Check that the dev server is running. `)}function nD(e,t){if(e&1){let e=U();R(0,`button`,12),W(`click`,function(){return D(e),O(G(2).loadMeta())}),J(1,`Try again`),z()}}function rD(e,t){if(e&1&&(R(0,`p`,10),N(1,eD,4,0)(2,tD,1,0),z(),N(3,nD,2,0,`button`,11)),e&2){let e=G();j(),P(e.staticReport()?1:2),j(2),P(e.staticReport()?-1:3)}}function iD(e,t){e&1&&(R(0,`li`,5)(1,`span`),J(2,`Analog`),z(),J(3),z()),e&2&&(j(3),Y(t))}function aD(e,t){e&1&&(R(0,`li`)(1,`span`),J(2,`Change detection`),z(),J(3),z()),e&2&&(j(3),Y(t))}function oD(e,t){if(e&1&&(R(0,`span`,19),J(1),z(),R(2,`span`,20),J(3),z()),e&2){let e=G().$implicit,t=G();j(),Y(t.cards()[e.tab]?.value),j(2),Y(t.cards()[e.tab]?.sub)}}function sD(e,t){e&1&&(R(0,`span`,21),J(1,`–`),z(),R(2,`span`,20),J(3,`Count unavailable`),z())}function cD(e,t){e&1&&(B(0,`span`,22),R(1,`span`,20),J(2,`Counting…`),z())}function lD(e,t){if(e&1){let e=U();R(0,`button`,13),W(`click`,function(){let t=D(e).$implicit;return O(G().navigate.emit(t.tab))}),R(1,`span`,14)(2,`span`,15),B(3,`app-tab-icon`,16),z(),R(4,`span`,17),J(5,`→`),z()(),R(6,`span`,18),J(7),z(),N(8,oD,4,2)(9,sD,4,0)(10,cD,3,0),z()}if(e&2){let e,n=t.$implicit,r=t.$index,i=G().stateOf(n.tab);K(`animation-delay`,60*r,`ms`),M(`aria-busy`,i===`loading`),j(3),L(`name`,n.tab),j(4),Y(n.label),j(),P((e=i)===`ready`?8:e===`error`?9:10)}}function uD(e,t){e&1&&(R(0,`p`),J(1,`Loading…`),z())}function dD(e,t){if(e&1&&(R(0,`div`)(1,`dt`),J(2),z(),R(3,`dd`),J(4),z()()),e&2){let e=t.$implicit;j(2),Y(e.label),j(2),Y(e.value)}}function fD(e,t){if(e&1&&(R(0,`dl`),F(1,dD,5,2,`div`,null,XE),z()),e&2){let e=G();j(),I(e.configItems())}}function pD(e,t){e&1&&(R(0,`p`),J(1,`Defaults`),z())}var mD=[{tab:`components`,label:`Components`},{tab:`routes`,label:`Routes`},{tab:`signals`,label:`Signals`},{tab:`injectors`,label:`Injectors`},{tab:`store`,label:`NgRx declarations`},{tab:`pipes`,label:`Pipes`},{tab:`forms`,label:`Forms`},{tab:`network`,label:`SSR & HTTP`}];function hD(e){return mD.filter(t=>IE(t.tab,e))}var gD={zoneless:`Zoneless`,zone:`zone.js`,"zone-unused":`Zoneless, zone.js loaded`};function _D(e){return e&&Object.hasOwn(gD,e)?gD[e]:null}var vD=new Set([`signal`,`computed`,`linkedSignal`,`effect`]),yD={action:[`action`,`actions`],reducer:[`reducer`,`reducers`],effect:[`effect`,`effects`],selector:[`selector`,`selectors`],feature:[`feature`,`features`],"store-setup":[`setup call`,`setup calls`],"signal-store":[`signal store`,`signal stores`],"signal-state":[`signal state`,`signal states`],"signal-method":[`signal method`,`signal methods`]};function bD(e,t,n){return`${e} ${e===1?t:n}`}function xD(e,t){for(let n of e??[])t(n),xD(n.children,t)}function SD(e){if(!e.some(e=>e.kind))return{value:e.length,sub:`discovered in source`};let t=e.filter(e=>e.kind===`directive`).length;return{value:e.length-t,sub:`components · ${bD(t,`directive`,`directives`)}`}}function CD(e){if(!e.some(e=>e.kind))return{value:e.length,sub:`route entries in source`};let t=e.filter(e=>e.kind===`redirect`).length;return{value:new Set(e.filter(e=>e.kind===`page`).map(e=>e.fullPath??e.path??``)).size,sub:`navigable paths · ${bD(t,`redirect`,`redirects`)}`}}function wD(e){let t=new Map;for(let n of e)n.kind&&t.set(n.kind,(t.get(n.kind)??0)+1);if(!t.size)return{value:e.length,sub:`declarations in source`};let n=[...t].sort((e,t)=>t[1]-e[1]).map(([e,t])=>{let[n,r]=yD[e]??[e,e];return bD(t,n,r)});return{value:e.length,sub:n.join(` · `)}}function TD(e,t){let n=e?.forms??[],r=t?n.filter(e=>bE(e.id)===t):n;if(!r.length)return{value:0,sub:`no forms on the page yet`};let i=r.filter(e=>e.root?.status===`INVALID`).length;return{value:r.length,sub:`${r.length===1?`form`:`forms`} · ${i} invalid`}}function ED(e){return e.cancelled||e.status===void 0?!1:e.status===0||e.status>=400}function DD(e,t){let n=e?.pages??[],r=t?n.find(e=>e.pageId===t)??null:n.reduce((e,t)=>!e||t.reportedAt>e.reportedAt?t:e,null),i=t&&!r?[]:e?.serverCalls??[],a=r?.initialUrl,o=[...a?i.filter(e=>!e.pageUrl||e.pageUrl===a):i,...r?.calls??[]];if(!o.length)return{value:0,sub:`no calls recorded yet`};let s=o.filter(ED).length;return{value:o.length,sub:`${o.length===1?`call`:`calls`} · ${s} failed`}}var OD=class e{rpc=$(null);navigate=Rv();staticReport=Q(()=>vE(this.rpc()));meta=A(null);config=Q(()=>jE(this.rpc()));stats=Q(()=>this.rpc()?hD(this.config()):[]);configItems=Q(()=>cE(this.config()));metaState=A(`loading`);states=A({});rows=A({});injectorTree=A(null);signalGraph=A(null);formsState=A(null);httpState=A(null);pageId=fE();destroyRef=T(Ts);stopLive=[];zone=Q(()=>_D(mE(this.injectorTree(),this.pageId)?.zone));liveInjectors=Q(()=>{let e=mE(this.injectorTree(),this.pageId);if(!e?.roots?.length)return null;let t=0,n=0,r=e=>{t++,n+=e.providers?.length??0};return xD(e.roots,r),xD(e.environment,r),{injectors:t,providers:n}});liveSignals=Q(()=>{let e=hE(this.signalGraph(),this.pageId);return e?.nodes?.length?e.nodes.filter(e=>vD.has(e.kind??``)).length:null});cards=Q(()=>{let e=this.rows(),t={};if(e.components&&(t.components=SD(e.components)),e.routes&&(t.routes=CD(e.routes)),e.store&&(t.store=wD(e.store)),e.pipes){let n=e.pipes.filter(e=>e.builtin).length;t.pipes={value:e.pipes.length-n,sub:n?`custom pipes · ${n} built-in in use`:`custom pipes in source`}}let n=this.liveSignals();n===null?e.signals&&(t.signals={value:e.signals.length,sub:`signal declarations in source`}):t.signals={value:n,sub:e.signals?`live on the page · ${e.signals.length} declared in source`:`live on the page`};let r=this.liveInjectors();r?t.injectors={value:r.injectors,sub:`live injectors · ${bD(r.providers,`provider`,`providers`)}`}:e.injectors&&(t.injectors={value:e.injectors.filter(e=>e.type!==`injection`).length,sub:`provider declarations in source`});let i=this.formsState();i&&(t.forms=TD(i,this.pageId));let a=this.httpState();return a&&(t.network=DD(a,this.pageId)),t});loadMeta(e=this.rpc()){e&&(this.metaState.set(`loading`),e.scope(`pangular`).rpc.call(`build-meta`).then(t=>{this.rpc()===e&&(this.meta.set(t),this.metaState.set(`ready`))}).catch(()=>{this.rpc()===e&&this.metaState.set(`error`)}))}constructor(){fc(()=>{let e=this.rpc();if(!e)return;let t=e.scope(`pangular`);this.states.set({}),this.rows.set({}),this.formsState.set(null),this.httpState.set(null),this.loadMeta(e);let n=jE(e),r=e=>IE(e,n);r(`components`)&&this.load(t.rpc.call(`get-components`),`components`),r(`routes`)&&this.load(t.rpc.call(`get-routes`),`routes`),r(`signals`)&&this.load(t.rpc.call(`get-signals`),`signals`),r(`injectors`)&&this.load(t.rpc.call(`get-providers`),`injectors`),r(`store`)&&this.load(t.rpc.call(`get-ngrx-store`),`store`),r(`pipes`)&&this.load(t.rpc.call(`get-pipes`),`pipes`),this.watchLive(e,n)}),this.destroyRef.onDestroy(()=>this.unwatch())}stateOf(e){return(e===`signals`?this.liveSignals():e===`injectors`?this.liveInjectors():null)===null?this.states()[e]??`loading`:`ready`}load(e,t){let n=e=>this.states.update(n=>({...n,[t]:e}));e.then(e=>{this.rows.update(n=>({...n,[t]:Array.isArray(e)?e:[]})),n(`ready`)}).catch(()=>n(`error`))}async watchLive(e,t){this.unwatch();let n=e.scope(`pangular`).rpc,r=async(t,r,i)=>{let a=e=>i&&this.states.update(t=>({...t,[i]:e}));try{let i=await n.sharedState(t);if(this.destroyRef.destroyed||this.rpc()!==e)return;r(i.value()),a(`ready`),this.stopLive.push(i.on(`updated`,e=>r(e)))}catch{if(this.destroyRef.destroyed||this.rpc()!==e)return;r(null),a(`error`)}};await Promise.all([t.inspectors.injectors&&r(`injector-tree`,e=>this.injectorTree.set(e)),t.inspectors.signals&&r(`signal-graph`,e=>this.signalGraph.set(e)),IE(`forms`,t)&&r(`forms`,e=>this.formsState.set(e??{}),`forms`),IE(`network`,t)&&r(`http`,e=>this.httpState.set(e??{}),`network`)])}unwatch(){for(let e of this.stopLive.splice(0))e()}static ɵfac=function(t){return new(t||e)};static ɵcmp=Gh({type:e,selectors:[[`app-dashboard`]],inputs:{rpc:[1,`rpc`]},outputs:{navigate:`navigate`},decls:33,vars:14,consts:[[`aria-labelledby`,`project-title`,1,`project`],[1,`project-head`],[1,`eyebrow`],[`id`,`project-title`],[1,`chips`],[1,`analog`],[1,`grid`],[`type`,`button`,1,`stat`,3,`animation-delay`],[`aria-labelledby`,`config-title`,1,`config`],[`id`,`config-title`],[1,`hint`],[`type`,`button`,1,`retry`],[`type`,`button`,1,`retry`,3,`click`],[`type`,`button`,1,`stat`,3,`click`],[1,`top`],[1,`icon`],[3,`name`],[`aria-hidden`,`true`,1,`go`],[1,`label`],[1,`big`],[1,`sub`],[1,`big`,`muted`],[`aria-hidden`,`true`,1,`big`,`skeleton`]],template:function(e,t){if(e&1&&(R(0,`section`,0)(1,`div`,1)(2,`p`,2),J(3,`Project`),z(),R(4,`h2`,3),N(5,ZE,1,1)(6,QE,1,0)(7,$E,1,0),z(),N(8,rD,4,2),z(),R(9,`ul`,4)(10,`li`)(11,`span`),J(12,`Angular`),z(),J(13),z(),R(14,`li`)(15,`span`),J(16,`TypeScript`),z(),J(17),z(),R(18,`li`)(19,`span`),J(20,`SSR`),z(),J(21),z(),N(22,iD,4,1,`li`,5),N(23,aD,4,1,`li`),z()(),R(24,`div`,6),F(25,lD,11,6,`button`,7,YE),z(),R(27,`section`,8)(28,`h2`,9),J(29,`Configuration`),z(),N(30,uD,2,0,`p`)(31,fD,3,0,`dl`)(32,pD,2,0,`p`),z()),e&2){let e,n,r;M(`aria-busy`,t.metaState()===`loading`),j(4),q(`muted`,t.metaState()!==`ready`),j(),P((e=t.metaState())===`ready`?5:e===`error`?6:7),j(3),P(t.metaState()===`error`?8:-1),j(),q(`pending`,t.metaState()===`loading`),j(4),Y(t.meta()?.angularVersion??`…`),j(4),Y(t.meta()?.typescript??`…`),j(4),Y(t.meta()?t.meta()?.ssr?`On`:`Off`:`…`),j(),P((n=t.meta()?.analog)?22:-1,n),j(),P((r=t.zone())?23:-1,r),j(2),I(t.stats()),j(2),M(`aria-busy`,!t.rpc()),j(3),P(t.rpc()?t.configItems().length?31:32:30)}},dependencies:[JE],styles:[`[_nghost-%COMP%] { @@ -1312,7 +1312,7 @@ button.cell[_ngcontent-%COMP%]:focus-visible { .empty[_ngcontent-%COMP%] { margin: 8px 0; color: var(--%NS%text-2); -}`]})},eA=(e,t)=>t.id;function tA(e,t){if(e&1){let e=U();R(0,`button`,14),W(`click`,function(){return D(e),O(G(2).clear())}),J(1,`Clear`),z()}}function nA(e,t){if(e&1){let e=U();R(0,`button`,11),W(`click`,function(){return D(e),O(G().toggle())}),B(1,`span`,12),J(2),z(),N(3,tA,2,0,`button`,13)}if(e&2){let e=G();q(`on`,e.recording()),L(`disabled`,!e.pageId()),j(2),X(` `,e.recording()?`Stop recording`:`Record`,` `),j(),P(e.cycles().length?3:-1)}}function rA(e,t){if(e&1){let e=U();R(0,`p`,6)(1,`span`,15),J(2,`Imported recording`),z(),R(3,`span`,16),J(4),z(),R(5,`button`,14),W(`click`,function(){return D(e),O(G().closeImport())}),J(6,`Back to live recording`),z()()}e&2&&(j(4),Y(t.fileName))}function iA(e,t){e&1&&(R(0,`p`,8),J(1,`This page can't record change detection. It needs Angular 20 or later.`),z())}function aA(e,t){if(e&1&&(R(0,`p`,8),J(1),z()),e&2){let e=t.$implicit;j(),Y(e)}}function oA(e,t){if(e&1&&(R(0,`p`,19),J(1),z()),e&2){let e=G(2);j(),X(` `,e.range()?`The picked cycles have no timed spans, so there is no flame graph for them.`:`This recording has no timed spans, so there is no flame graph. A recording from an older version, or a file saved without spans, has none.`,` `)}}function sA(e,t){e&1&&(R(0,`p`,8),J(1,` For picked cycles, totals come from the 10 slowest components each cycle lists. `),z())}function cA(e,t){if(e&1){let e=U();R(0,`h3`),J(1,`Cycles`),z(),R(2,`app-cd-cycle-chart`,17),cv(`rangeChange`,function(t){D(e);let n=G();return sv(n.range,t)||(n.range=t),O(t)}),z(),R(3,`app-cd-flame-graph`,18),W(`pick`,function(t){return D(e),O(G().showComponent.emit(t))}),z(),N(4,oA,2,1,`p`,19),R(5,`h3`),J(6,`Self time by component`),z(),N(7,sA,2,0,`p`,8),R(8,`app-cd-treemap`,20),W(`pick`,function(t){return D(e),O(G().showComponent.emit(t))}),z()}if(e&2){let e=G();j(2),L(`cycles`,e.cycles()),ov(`range`,e.range),j(),L(`cycles`,e.picked())(`names`,e.spanNames())(`scope`,e.scope()),j(),P(e.hasSpans()?-1:4),j(3),P(e.range()?7:-1),j(),L(`stats`,e.stats())(`scope`,e.scope())}}function lA(e,t){if(e&1&&(R(0,`tr`)(1,`td`,16),J(2),z(),R(3,`td`,26),J(4),z(),R(5,`td`,26),J(6),z(),R(7,`td`,26),J(8),z()()),e&2){let e=t.$implicit,n=G(2);j(2),Y(e.name),j(2),Y(e.checks),j(2),Y(n.ms(e.ms)),j(2),Y(n.ms(e.maxMs))}}function uA(e,t){e&1&&(R(0,`tr`)(1,`td`,27),J(2,`No component time in the picked cycles.`),z()())}function dA(e,t){if(e&1&&(R(0,`span`,29),J(1,`after `),R(2,`span`,16),J(3),z()()),e&2){let e=G().$implicit;j(3),Y(e.trigger)}}function fA(e,t){if(e&1&&(R(0,`span`,30),J(1),z()),e&2){let e=G().$implicit,t=G(2);j(),X(`hooks `,t.ms(e.hookMs))}}function pA(e,t){if(e&1&&(R(0,`span`,30),J(1),z()),e&2){let e=G().$implicit,t=G(2);j(),X(`afterRender `,t.ms(e.afterRenderMs))}}function mA(e,t){if(e&1&&(R(0,`span`,31),J(1,` slowest `),R(2,`span`,16),J(3),z(),J(4),z()),e&2){let e=t,n=G(3);j(3),Y(e.name),j(),X(` `,n.ms(e.ms),` `)}}function hA(e,t){if(e&1&&(R(0,`li`)(1,`span`,28),J(2),z(),R(3,`span`,16),J(4),z(),R(5,`span`),J(6),z(),N(7,dA,4,1,`span`,29),N(8,fA,2,1,`span`,30),N(9,pA,2,1,`span`,30),N(10,mA,5,2,`span`,31),z()),e&2){let e,n=t.$implicit,r=G(2);j(2),Y(r.clock(n.at)),j(2),Y(r.ms(n.ms)),j(2),iv(` `,n.checks,` `,n.checks===1?`check`:`checks`,`, `,n.passes,` `,n.passes===1?`pass`:`passes`,` `),j(),P(n.trigger?7:-1),j(),P(n.hookMs?8:-1),j(),P(n.afterRenderMs?9:-1),j(),P((e=n.components[0])?10:-1,e)}}function gA(e,t){if(e&1&&(R(0,`div`,21)(1,`div`)(2,`h3`),J(3),z(),R(4,`table`)(5,`thead`)(6,`tr`)(7,`th`,22),J(8,`Component`),z(),R(9,`th`,23),J(10,`Checks`),z(),R(11,`th`,23),J(12,`Self time`),z(),R(13,`th`,23),J(14,`Slowest`),z()()(),R(15,`tbody`),F(16,lA,9,4,`tr`,null,Og,!1,uA,3,0,`tr`),z()()(),R(19,`div`)(20,`h3`),J(21,`Latest cycles`),z(),R(22,`ol`,24),F(23,hA,11,10,`li`,null,eA),z()()(),B(25,`app-cd-timing`,25)),e&2){let e=G();j(3),X(` `,e.range()?`Slowest components in the picked cycles`:`Slowest components`,` `),j(13),I(e.slowest()),j(7),I(e.latest()),j(2),L(`page`,e.page())}}function _A(e,t){e&1&&(R(0,`p`,10),J(1,`Use the app. Cycles show up here as Angular runs change detection.`),z())}var vA=10,yA=class e{livePage=$(null,{alias:`page`});pageId=$(null);rpc=$(null);showComponent=Rv();range=A(null);imported=A(null);page=Q(()=>this.imported()?.page??this.livePage());message=A(``);announcement=A(``);recording=Q(()=>this.page()?.recording===!0);cycles=Q(()=>this.page()?.cycles??[]);maxCycles=Q(()=>jE(this.rpc()).limits.cdCycles);picked=Q(()=>uO(this.cycles(),this.range()));hasSpans=Q(()=>this.picked().some(e=>e.spans?.length));spanNames=Q(()=>this.page()?.spanNames??[]);stats=Q(()=>this.range()?dO(this.picked()):[...this.page()?.components??[]].sort((e,t)=>t.ms-e.ms));scope=Q(()=>{let e=this.range()?this.picked():[];return e.length?e.length===1?`cycle ${e[0].id}`:`cycles ${e[0].id} to ${e.at(-1).id}`:`the recording`});slowest=Q(()=>this.stats().slice(0,vA));latest=Q(()=>this.cycles().slice(-30).reverse());capNotes=Q(()=>{let e=this.page()?.droppedClasses??0,t=this.page()?.droppedHosts??0,n=[];return e>0&&n.push(`${e} more component ${e===1?`class was`:`classes were`} checked than a recording keeps, so ${e===1?`it is`:`they are`} left out of these totals.`),t>0&&n.push(`${t} component ${t===1?`instance was`:`instances were`} checked past the 2000 a recording counts, so ${t===1?`its tree row shows`:`their tree rows show`} no check count.`),n});status=Q(()=>{if(this.message())return this.message();let e=this.cycles().length;return this.imported()?`${e} ${e===1?`cycle`:`cycles`} imported.`:this.recording()?`Recording. ${e} ${e===1?`cycle`:`cycles`} so far.`:e?`${e} ${e===1?`cycle`:`cycles`} recorded.`:``});ms(e){return`${e<10?e.toFixed(2):Math.round(e)} ms`}clock(e){return tO(e)}async toggle(){this.recording()?await this.send({on:!1},``,()=>{let e=this.cycles().length;return`Recording stopped. ${e} ${e===1?`cycle`:`cycles`} recorded.`}):await this.send({on:!0},`Starting…`,()=>`Recording started.`)}showImport(e){this.message.set(``),this.range.set(null),this.imported.set(e);let t=e.page.cycles.length;this.announce(`Imported ${e.fileName}: ${t} ${t===1?`cycle`:`cycles`}. Showing the imported recording.`)}closeImport(){this.imported.set(null),this.range.set(null),this.announce(`Showing the live recording.`)}async clear(){this.range.set(null),await this.send({clear:!0},``,()=>`Cleared the recorded cycles.`)}async send(e,t,n){this.message.set(t);try{if(!this.rpc())throw Error(`no client`);await gE(this.rpc(),`request-change-detection-record`,{pageId:this.pageId(),...e}),this.message.set(``),this.announce(n())}catch{let e=`Could not reach the page.`;this.message.set(e),this.announce(e)}}announce(e){this.announcement.update(t=>t===e?`${e} `:e)}static ɵfac=function(t){return new(t||e)};static ɵcmp=Gh({type:e,selectors:[[`app-cd-recording`]],inputs:{livePage:[1,`page`,`livePage`],pageId:[1,`pageId`],rpc:[1,`rpc`]},outputs:{showComponent:`showComponent`},decls:20,vars:11,consts:[[`aria-labelledby`,`cd-heading`,1,`cd`],[1,`cd-head`],[`id`,`cd-heading`],[3,`imported`,`page`,`maxCycles`],[1,`status`],[`role`,`status`,1,`sr-only`],[1,`imported`],[1,`hint`],[1,`note`],[`what`,`cycles`,`limit`,`cdCycles`,3,`dropped`,`max`],[1,`empty`],[`type`,`button`,3,`click`,`disabled`],[`aria-hidden`,`true`,1,`dot`],[`type`,`button`],[`type`,`button`,3,`click`],[1,`badge`],[1,`mono`],[3,`rangeChange`,`cycles`,`range`],[3,`pick`,`cycles`,`names`,`scope`],[1,`spans-note`],[3,`pick`,`stats`,`scope`],[1,`cd-grid`],[`scope`,`col`],[`scope`,`col`,1,`num`],[`aria-label`,`Latest change detection cycles, newest first`,1,`cycles`],[3,`page`],[1,`num`],[`colspan`,`4`],[1,`when`],[1,`trigger`],[1,`timing`],[1,`top`]],template:function(e,t){if(e&1&&(R(0,`section`,0)(1,`div`,1)(2,`h2`,2),J(3,`Change detection`),z(),N(4,nA,4,5),R(5,`app-cd-transfer`,3),W(`imported`,function(e){return t.showImport(e)}),z(),R(6,`p`,4),J(7),z(),R(8,`p`,5),J(9),z()(),N(10,rA,7,1,`p`,6),R(11,`p`,7),J(12,` Records each change detection cycle with Angular's profiler: how long it took, how many components it checked and the output that ran before it. Tree rows show how often each instance was checked. Times come from a development build. `),z(),N(13,iA,2,0,`p`,8),B(14,`app-limit-note`,9),F(15,aA,2,1,`p`,8,kg),N(17,cA,9,9),N(18,gA,26,3)(19,_A,2,0,`p`,10),z()),e&2){let e;j(4),P(t.imported()?-1:4),j(),L(`page`,t.page())(`maxCycles`,t.maxCycles()),j(2),Y(t.status()),j(2),Y(t.announcement()),j(),P((e=t.imported())?10:-1,e),j(3),P(t.page()?.supported===!1?13:-1),j(),L(`dropped`,t.page()?.dropped??0)(`max`,t.maxCycles()),j(),I(t.capNotes()),j(2),P(t.cycles().length?17:-1),j(),P(t.page()?.components?.length?18:t.recording()?19:-1)}},dependencies:[oO,ik,Hk,MO,qO,$k],styles:[`[_nghost-%COMP%] { +}`]})},eA=(e,t)=>t.id;function tA(e,t){if(e&1){let e=U();R(0,`button`,14),W(`click`,function(){return D(e),O(G(2).clear())}),J(1,`Clear`),z()}}function nA(e,t){if(e&1){let e=U();R(0,`button`,11),W(`click`,function(){return D(e),O(G().toggle())}),B(1,`span`,12),J(2),z(),N(3,tA,2,0,`button`,13)}if(e&2){let e=G();q(`on`,e.recording()),L(`disabled`,!e.pageId()),j(2),X(` `,e.recording()?`Stop recording`:`Record`,` `),j(),P(e.cycles().length?3:-1)}}function rA(e,t){if(e&1){let e=U();R(0,`p`,6)(1,`span`,15),J(2,`Imported recording`),z(),R(3,`span`,16),J(4),z(),R(5,`button`,14),W(`click`,function(){return D(e),O(G().closeImport())}),J(6,`Back to live recording`),z()()}e&2&&(j(4),Y(t.fileName))}function iA(e,t){e&1&&(R(0,`p`,8),J(1,`This page can't record change detection. It needs Angular 20 or later.`),z())}function aA(e,t){e&1&&(R(0,`p`,8),J(1,`Angular profiling stays on until the page reloads.`),z())}function oA(e,t){e&1&&(R(0,`p`,8),J(1,` This page has no `),R(2,`span`,16),J(3,`ng.enableProfiling`),z(),J(4,`. It needs Angular 20 or later in a development build. `),z())}function sA(e,t){if(e&1){let e=U();R(0,`div`,17)(1,`span`,18),J(2,`Live views`),z(),R(3,`button`,19),W(`click`,function(){D(e);let t=G();return O(t.setView(`flash`,!t.views().flash))}),B(4,`span`,12),J(5,` Flash checks `),z(),R(6,`button`,19),W(`click`,function(){D(e);let t=G();return O(t.setView(`track`,!t.views().track))}),B(7,`span`,12),J(8,` Performance track `),z(),R(9,`button`,19),W(`click`,function(){return D(e),O(G().setView(`angularProfiling`,!0))}),B(10,`span`,12),J(11,` Angular profiling `),z()(),R(12,`p`,7),J(13,` Flash checks draws a box over each component on the page as Angular checks it, with its name and how often it was checked, fading over a second. Performance track adds a Pangular track to the Chrome Performance panel with every component check, hook and output. Angular profiling turns on Angular's own track there. `),z(),N(14,aA,2,0,`p`,8)(15,oA,5,0,`p`,8)}if(e&2){let e=G();j(3),L(`disabled`,!e.canShowViews()),M(`aria-pressed`,e.views().flash),j(3),L(`disabled`,!e.canShowViews()),M(`aria-pressed`,e.views().track),j(3),L(`disabled`,!e.canShowViews()||e.views().angularProfiling||!e.views().angularProfilingAvailable),M(`aria-pressed`,e.views().angularProfiling),j(5),P(e.views().angularProfiling?14:e.views().angularProfilingAvailable?-1:15)}}function cA(e,t){if(e&1&&(R(0,`p`,8),J(1),z()),e&2){let e=t.$implicit;j(),Y(e)}}function lA(e,t){if(e&1&&(R(0,`p`,22),J(1),z()),e&2){let e=G(2);j(),X(` `,e.range()?`The picked cycles have no timed spans, so there is no flame graph for them.`:`This recording has no timed spans, so there is no flame graph. A recording from an older version, or a file saved without spans, has none.`,` `)}}function uA(e,t){e&1&&(R(0,`p`,8),J(1,` For picked cycles, totals come from the 10 slowest components each cycle lists. `),z())}function dA(e,t){if(e&1){let e=U();R(0,`h3`),J(1,`Cycles`),z(),R(2,`app-cd-cycle-chart`,20),cv(`rangeChange`,function(t){D(e);let n=G();return sv(n.range,t)||(n.range=t),O(t)}),z(),R(3,`app-cd-flame-graph`,21),W(`pick`,function(t){return D(e),O(G().showComponent.emit(t))}),z(),N(4,lA,2,1,`p`,22),R(5,`h3`),J(6,`Self time by component`),z(),N(7,uA,2,0,`p`,8),R(8,`app-cd-treemap`,23),W(`pick`,function(t){return D(e),O(G().showComponent.emit(t))}),z()}if(e&2){let e=G();j(2),L(`cycles`,e.cycles()),ov(`range`,e.range),j(),L(`cycles`,e.picked())(`names`,e.spanNames())(`scope`,e.scope()),j(),P(e.hasSpans()?-1:4),j(3),P(e.range()?7:-1),j(),L(`stats`,e.stats())(`scope`,e.scope())}}function fA(e,t){if(e&1&&(R(0,`tr`)(1,`td`,16),J(2),z(),R(3,`td`,29),J(4),z(),R(5,`td`,29),J(6),z(),R(7,`td`,29),J(8),z()()),e&2){let e=t.$implicit,n=G(2);j(2),Y(e.name),j(2),Y(e.checks),j(2),Y(n.ms(e.ms)),j(2),Y(n.ms(e.maxMs))}}function pA(e,t){e&1&&(R(0,`tr`)(1,`td`,30),J(2,`No component time in the picked cycles.`),z()())}function mA(e,t){if(e&1&&(R(0,`span`,32),J(1,`after `),R(2,`span`,16),J(3),z()()),e&2){let e=G().$implicit;j(3),Y(e.trigger)}}function hA(e,t){if(e&1&&(R(0,`span`,33),J(1),z()),e&2){let e=G().$implicit,t=G(2);j(),X(`hooks `,t.ms(e.hookMs))}}function gA(e,t){if(e&1&&(R(0,`span`,33),J(1),z()),e&2){let e=G().$implicit,t=G(2);j(),X(`afterRender `,t.ms(e.afterRenderMs))}}function _A(e,t){if(e&1&&(R(0,`span`,34),J(1,` slowest `),R(2,`span`,16),J(3),z(),J(4),z()),e&2){let e=t,n=G(3);j(3),Y(e.name),j(),X(` `,n.ms(e.ms),` `)}}function vA(e,t){if(e&1&&(R(0,`li`)(1,`span`,31),J(2),z(),R(3,`span`,16),J(4),z(),R(5,`span`),J(6),z(),N(7,mA,4,1,`span`,32),N(8,hA,2,1,`span`,33),N(9,gA,2,1,`span`,33),N(10,_A,5,2,`span`,34),z()),e&2){let e,n=t.$implicit,r=G(2);j(2),Y(r.clock(n.at)),j(2),Y(r.ms(n.ms)),j(2),iv(` `,n.checks,` `,n.checks===1?`check`:`checks`,`, `,n.passes,` `,n.passes===1?`pass`:`passes`,` `),j(),P(n.trigger?7:-1),j(),P(n.hookMs?8:-1),j(),P(n.afterRenderMs?9:-1),j(),P((e=n.components[0])?10:-1,e)}}function yA(e,t){if(e&1&&(R(0,`div`,24)(1,`div`)(2,`h3`),J(3),z(),R(4,`table`)(5,`thead`)(6,`tr`)(7,`th`,25),J(8,`Component`),z(),R(9,`th`,26),J(10,`Checks`),z(),R(11,`th`,26),J(12,`Self time`),z(),R(13,`th`,26),J(14,`Slowest`),z()()(),R(15,`tbody`),F(16,fA,9,4,`tr`,null,Og,!1,pA,3,0,`tr`),z()()(),R(19,`div`)(20,`h3`),J(21,`Latest cycles`),z(),R(22,`ol`,27),F(23,vA,11,10,`li`,null,eA),z()()(),B(25,`app-cd-timing`,28)),e&2){let e=G();j(3),X(` `,e.range()?`Slowest components in the picked cycles`:`Slowest components`,` `),j(13),I(e.slowest()),j(7),I(e.latest()),j(2),L(`page`,e.page())}}function bA(e,t){e&1&&(R(0,`p`,10),J(1,`Use the app. Cycles show up here as Angular runs change detection.`),z())}var xA=10,SA=class e{livePage=$(null,{alias:`page`});pageId=$(null);rpc=$(null);showComponent=Rv();range=A(null);imported=A(null);page=Q(()=>this.imported()?.page??this.livePage());views=Fv(()=>this.livePage()?.options??{flash:!1,track:!1,angularProfiling:!1,angularProfilingAvailable:!0});canShowViews=Q(()=>!!this.pageId()&&this.livePage()?.supported!==!1);message=A(``);announcement=A(``);recording=Q(()=>this.page()?.recording===!0);cycles=Q(()=>this.page()?.cycles??[]);maxCycles=Q(()=>jE(this.rpc()).limits.cdCycles);picked=Q(()=>uO(this.cycles(),this.range()));hasSpans=Q(()=>this.picked().some(e=>e.spans?.length));spanNames=Q(()=>this.page()?.spanNames??[]);stats=Q(()=>this.range()?dO(this.picked()):[...this.page()?.components??[]].sort((e,t)=>t.ms-e.ms));scope=Q(()=>{let e=this.range()?this.picked():[];return e.length?e.length===1?`cycle ${e[0].id}`:`cycles ${e[0].id} to ${e.at(-1).id}`:`the recording`});slowest=Q(()=>this.stats().slice(0,xA));latest=Q(()=>this.cycles().slice(-30).reverse());capNotes=Q(()=>{let e=this.page()?.droppedClasses??0,t=this.page()?.droppedHosts??0,n=[];return e>0&&n.push(`${e} more component ${e===1?`class was`:`classes were`} checked than a recording keeps, so ${e===1?`it is`:`they are`} left out of these totals.`),t>0&&n.push(`${t} component ${t===1?`instance was`:`instances were`} checked past the 2000 a recording counts, so ${t===1?`its tree row shows`:`their tree rows show`} no check count.`),n});status=Q(()=>{if(this.message())return this.message();let e=this.cycles().length;return this.imported()?`${e} ${e===1?`cycle`:`cycles`} imported.`:this.recording()?`Recording. ${e} ${e===1?`cycle`:`cycles`} so far.`:e?`${e} ${e===1?`cycle`:`cycles`} recorded.`:``});ms(e){return`${e<10?e.toFixed(2):Math.round(e)} ms`}clock(e){return tO(e)}async toggle(){this.recording()?await this.send({on:!1},``,()=>{let e=this.cycles().length;return`Recording stopped. ${e} ${e===1?`cycle`:`cycles`} recorded.`}):await this.send({on:!0},`Starting…`,()=>`Recording started.`)}showImport(e){this.message.set(``),this.range.set(null),this.imported.set(e);let t=e.page.cycles.length;this.announce(`Imported ${e.fileName}: ${t} ${t===1?`cycle`:`cycles`}. Showing the imported recording.`)}closeImport(){this.imported.set(null),this.range.set(null),this.announce(`Showing the live recording.`)}async clear(){this.range.set(null),await this.send({clear:!0},``,()=>`Cleared the recorded cycles.`)}async setView(e,t){let n=this.views();this.views.set({...n,[e]:t});let r={flash:t?`Flash checks on.`:`Flash checks off.`,track:t?`Performance track on. Record in the Chrome Performance panel to see it.`:`Performance track off.`,angularProfiling:`Angular profiling on. It stays on until the page reloads.`}[e];await this.send({[e]:t},``,()=>r,`request-change-detection-options`)||this.views.set(n)}async send(e,t,n,r=`request-change-detection-record`){this.message.set(t);try{if(!this.rpc())throw Error(`no client`);return await gE(this.rpc(),r,{pageId:this.pageId(),...e}),this.message.set(``),this.announce(n()),!0}catch{let e=`Could not reach the page.`;return this.message.set(e),this.announce(e),!1}}announce(e){this.announcement.update(t=>t===e?`${e} `:e)}static ɵfac=function(t){return new(t||e)};static ɵcmp=Gh({type:e,selectors:[[`app-cd-recording`]],inputs:{livePage:[1,`page`,`livePage`],pageId:[1,`pageId`],rpc:[1,`rpc`]},outputs:{showComponent:`showComponent`},decls:21,vars:12,consts:[[`aria-labelledby`,`cd-heading`,1,`cd`],[1,`cd-head`],[`id`,`cd-heading`],[3,`imported`,`page`,`maxCycles`],[1,`status`],[`role`,`status`,1,`sr-only`],[1,`imported`],[1,`hint`],[1,`note`],[`what`,`cycles`,`limit`,`cdCycles`,3,`dropped`,`max`],[1,`empty`],[`type`,`button`,3,`click`,`disabled`],[`aria-hidden`,`true`,1,`dot`],[`type`,`button`],[`type`,`button`,3,`click`],[1,`badge`],[1,`mono`],[`role`,`group`,`aria-labelledby`,`cd-views-label`,1,`views`],[`id`,`cd-views-label`,1,`views-label`],[`type`,`button`,1,`view`,3,`click`,`disabled`],[3,`rangeChange`,`cycles`,`range`],[3,`pick`,`cycles`,`names`,`scope`],[1,`spans-note`],[3,`pick`,`stats`,`scope`],[1,`cd-grid`],[`scope`,`col`],[`scope`,`col`,1,`num`],[`aria-label`,`Latest change detection cycles, newest first`,1,`cycles`],[3,`page`],[1,`num`],[`colspan`,`4`],[1,`when`],[1,`trigger`],[1,`timing`],[1,`top`]],template:function(e,t){if(e&1&&(R(0,`section`,0)(1,`div`,1)(2,`h2`,2),J(3,`Change detection`),z(),N(4,nA,4,5),R(5,`app-cd-transfer`,3),W(`imported`,function(e){return t.showImport(e)}),z(),R(6,`p`,4),J(7),z(),R(8,`p`,5),J(9),z()(),N(10,rA,7,1,`p`,6),R(11,`p`,7),J(12,` Records each change detection cycle with Angular's profiler: how long it took, how many components it checked and the output that ran before it. Tree rows show how often each instance was checked. Times come from a development build. `),z(),N(13,iA,2,0,`p`,8),N(14,sA,16,7),B(15,`app-limit-note`,9),F(16,cA,2,1,`p`,8,kg),N(18,dA,9,9),N(19,yA,26,3)(20,bA,2,0,`p`,10),z()),e&2){let e;j(4),P(t.imported()?-1:4),j(),L(`page`,t.page())(`maxCycles`,t.maxCycles()),j(2),Y(t.status()),j(2),Y(t.announcement()),j(),P((e=t.imported())?10:-1,e),j(3),P(t.page()?.supported===!1?13:-1),j(),P(t.imported()?-1:14),j(),L(`dropped`,t.page()?.dropped??0)(`max`,t.maxCycles()),j(),I(t.capNotes()),j(2),P(t.cycles().length?18:-1),j(),P(t.page()?.components?.length?19:t.recording()?20:-1)}},dependencies:[oO,ik,Hk,MO,qO,$k],styles:[`[_nghost-%COMP%] { display: block; margin-top: 16px; } @@ -1376,6 +1376,30 @@ button[_ngcontent-%COMP%]:disabled { opacity: 0.6; } +.views[_ngcontent-%COMP%] { + display: flex; + flex-wrap: wrap; + align-items: center; + gap: 8px; + margin-top: 8px; +} + +.views-label[_ngcontent-%COMP%] { + color: var(--%NS%text-3); + font-size: 11px; + font-weight: 600; + letter-spacing: 0.08em; + text-transform: uppercase; +} + +button.view[aria-pressed=true][_ngcontent-%COMP%] { + border-color: var(--%NS%accent-line); +} + +button.view[aria-pressed=true][_ngcontent-%COMP%] .dot[_ngcontent-%COMP%] { + background: var(--%NS%accent); +} + .dot[_ngcontent-%COMP%] { width: 8px; height: 8px; @@ -1490,7 +1514,7 @@ td.mono[_ngcontent-%COMP%] { .trigger[_ngcontent-%COMP%] .mono[_ngcontent-%COMP%], .top[_ngcontent-%COMP%] .mono[_ngcontent-%COMP%] { overflow-wrap: anywhere; -}`]})},bA=[`*`];function xA(e,t){e&1&&J(0),e&2&&Y(G(2).label())}function SA(e,t){e&1&&s_(0,0,null,xA,1,1)}function CA(e,t){if(e&1&&(R(0,`span`,4),J(1),z()),e&2){let e=G(2);j(),Y(e.message())}}function wA(e,t){if(e&1){let e=U();R(0,`button`,2),W(`click`,function(){return D(e),O(G().open())}),Wg(1,3),z(),N(2,CA,2,1,`span`,4)}if(e&2){let e=G(),t=d_(1);L(`title`,`Open `+e.label()+` in your editor`),M(`aria-label`,`Open `+e.label()+` in your editor`),j(),L(`ngTemplateOutlet`,t),j(),P(e.message()?2:-1)}}function TA(e,t){if(e&1&&(R(0,`span`,1),Wg(1,3),z()),e&2){let e=G(),t=d_(1);L(`title`,e.label()),j(),L(`ngTemplateOutlet`,t)}}var EA=class e{source=A(A(null));client=Q(()=>this.source()());available=Q(()=>{let e=this.client();return!!e&&!vE(e)});use(e){this.source.set(e)}async open(e,t){if(!this.available())return{ok:!1,error:`No server is connected.`};try{let n=await gE(this.client(),`open-in-editor`,{file:e,...t?{line:t}:{}});return n?.ok?{ok:!0}:{ok:!1,error:n?.error??`The server did not open it.`}}catch{return{ok:!1,error:`The server did not open it.`}}}static ɵfac=function(t){return new(t||e)};static ɵprov=jl({token:e,factory:e.ɵfac})};function DA(e,t){return t?`${e}:${t}`:e}var OA=class e{editor=T(EA);file=$.required();line=$(void 0);label=Q(()=>DA(this.file(),this.line()));message=A(``);async open(){this.message.set(``);let e=await this.editor.open(this.file(),this.line()??void 0);e.ok||this.message.set(`Not opened: ${e.error}`)}static ɵfac=function(t){return new(t||e)};static ɵcmp=Gh({type:e,selectors:[[`app-source-link`]],inputs:{file:[1,`file`],line:[1,`line`]},ngContentSelectors:bA,decls:4,vars:1,consts:[[`text`,``],[1,`source-text`,3,`title`],[`type`,`button`,1,`source-link`,3,`click`,`title`],[3,`ngTemplateOutlet`],[`role`,`alert`,1,`message`]],template:function(e,t){e&1&&(o_(),og(0,SA,2,0,`ng-template`,null,0,Ev),N(2,wA,3,4)(3,TA,2,2,`span`,1)),e&2&&(j(2),P(t.editor.available()?2:3))},dependencies:[lb],styles:[`[_nghost-%COMP%] { +}`]})},CA=[`*`];function wA(e,t){e&1&&J(0),e&2&&Y(G(2).label())}function TA(e,t){e&1&&s_(0,0,null,wA,1,1)}function EA(e,t){if(e&1&&(R(0,`span`,4),J(1),z()),e&2){let e=G(2);j(),Y(e.message())}}function DA(e,t){if(e&1){let e=U();R(0,`button`,2),W(`click`,function(){return D(e),O(G().open())}),Wg(1,3),z(),N(2,EA,2,1,`span`,4)}if(e&2){let e=G(),t=d_(1);L(`title`,`Open `+e.label()+` in your editor`),M(`aria-label`,`Open `+e.label()+` in your editor`),j(),L(`ngTemplateOutlet`,t),j(),P(e.message()?2:-1)}}function OA(e,t){if(e&1&&(R(0,`span`,1),Wg(1,3),z()),e&2){let e=G(),t=d_(1);L(`title`,e.label()),j(),L(`ngTemplateOutlet`,t)}}var kA=class e{source=A(A(null));client=Q(()=>this.source()());available=Q(()=>{let e=this.client();return!!e&&!vE(e)});use(e){this.source.set(e)}async open(e,t){if(!this.available())return{ok:!1,error:`No server is connected.`};try{let n=await gE(this.client(),`open-in-editor`,{file:e,...t?{line:t}:{}});return n?.ok?{ok:!0}:{ok:!1,error:n?.error??`The server did not open it.`}}catch{return{ok:!1,error:`The server did not open it.`}}}static ɵfac=function(t){return new(t||e)};static ɵprov=jl({token:e,factory:e.ɵfac})};function AA(e,t){return t?`${e}:${t}`:e}var jA=class e{editor=T(kA);file=$.required();line=$(void 0);label=Q(()=>AA(this.file(),this.line()));message=A(``);async open(){this.message.set(``);let e=await this.editor.open(this.file(),this.line()??void 0);e.ok||this.message.set(`Not opened: ${e.error}`)}static ɵfac=function(t){return new(t||e)};static ɵcmp=Gh({type:e,selectors:[[`app-source-link`]],inputs:{file:[1,`file`],line:[1,`line`]},ngContentSelectors:CA,decls:4,vars:1,consts:[[`text`,``],[1,`source-text`,3,`title`],[`type`,`button`,1,`source-link`,3,`click`,`title`],[3,`ngTemplateOutlet`],[`role`,`alert`,1,`message`]],template:function(e,t){e&1&&(o_(),og(0,TA,2,0,`ng-template`,null,0,Ev),N(2,DA,3,4)(3,OA,2,2,`span`,1)),e&2&&(j(2),P(t.editor.available()?2:3))},dependencies:[lb],styles:[`[_nghost-%COMP%] { display: inline; min-width: 0; } @@ -1525,7 +1549,7 @@ td.mono[_ngcontent-%COMP%] { color: var(--%NS%danger-text); font-family: var(--%NS%font-sans); font-size: 0.92em; -}`]})},kA=[`field`],AA=[`editButton`],jA=[`valueBox`];function MA(e,t){if(e&1){let e=U();V(0,`div`,5)(1,`label`,6),J(2),H(),V(3,`input`,7,0),r_(`input`,function(t){return D(e),O(G().draft.set(t.target.value))})(`keydown.enter`,function(t){D(e);let n=G();return t.preventDefault(),O(n.apply())})(`keydown.escape`,function(t){D(e);let n=G();return t.preventDefault(),t.stopPropagation(),O(n.cancel())}),H(),V(5,`button`,8),r_(`click`,function(){return D(e),O(G().apply())}),J(6,`Apply`),H(),V(7,`button`,9),r_(`click`,function(){return D(e),O(G().cancel())}),J(8,`Cancel`),H()(),V(9,`p`,10),J(10),H()}if(e&2){let e=G();j(),Kg(`htmlFor`,e.fieldId),j(),X(`New value of `,e.prop().name,`, as JSON`),j(),Kg(`id`,e.fieldId)(`value`,e.draft())(`readOnly`,e.busy()),M(`aria-busy`,e.busy()?`true`:null)(`aria-invalid`,e.error()?`true`:null)(`aria-describedby`,e.hintId+(e.error()?` `+e.errorId:``)),j(2),Kg(`disabled`,e.busy()),j(4),Kg(`id`,e.hintId),j(),X(` JSON, such as "text", 42, true or `,e.objectSample,`. Enter applies, Escape cancels. `)}}function NA(e,t){if(e&1){let e=U();V(0,`button`,14,2),r_(`click`,function(){return D(e),O(G(2).start())}),J(2,` Edit `),H()}e&2&&M(`aria-label`,`Edit `+G(2).prop().name)}function PA(e,t){if(e&1&&(V(0,`p`,13),J(1),H()),e&2){let e=G(2);j(),Y(e.prop().locked)}}function FA(e,t){if(e&1&&(V(0,`div`,11)(1,`pre`,null,1),J(3),xv(4,`json`),H(),N(5,NA,3,1,`button`,12),H(),N(6,PA,2,1,`p`,13)),e&2){let e=G();j(),M(`tabindex`,e.scrollable()?0:null)(`role`,e.scrollable()?`region`:null)(`aria-label`,e.scrollable()?`Value of `+e.prop().name:null),j(2),Y(Cv(4,6,e.prop().value)),j(2),P(e.editable()?5:-1),j(),P(e.writes()&&e.prop().locked?6:-1)}}function IA(e,t){if(e&1&&(V(0,`p`,3),J(1),H()),e&2){let e=G();Kg(`id`,e.errorId),j(),Y(e.error())}}var LA=0;function RA(e){let t=e.trim();if(!t)return{error:`Type a JSON value, such as "text", 42, true, null or [1, 2].`};try{return{value:JSON.parse(t)}}catch{return{error:`Not valid JSON. Put text in double quotes, such as "Paris".`}}}var zA=class e{prop=$.required();componentId=$.required();pageId=$(null);rpc=$(null);writes=$(!1);fieldId=`prop-edit-${++LA}`;hintId=`${this.fieldId}-hint`;errorId=`${this.fieldId}-error`;objectSample=`{"a": 1}`;editing=A(!1);draft=A(``);busy=A(!1);error=A(``);done=A(``);editable=Q(()=>this.writes()&&!!this.prop().edit&&!!this.pageId()&&!!this.rpc());field=Jv(`field`);editButton=Jv(`editButton`);valueBox=Jv(`valueBox`);injector=T(Cs);scrollable=A(!1);constructor(){uy(()=>{this.prop();let e=this.valueBox()?.nativeElement;this.scrollable.set(!!e&&e.scrollHeight>e.clientHeight+1)})}start(){let e=this.prop().value;this.draft.set(e===void 0?``:JSON.stringify(e)),this.error.set(``),this.done.set(``),this.editing.set(!0),Bd(()=>{let e=this.field()?.nativeElement;e?.focus(),e?.select()},{injector:this.injector})}cancel(){this.editing()&&(this.editing.set(!1),this.busy.set(!1),this.error.set(``),this.focusEdit())}async apply(){if(this.busy())return;let e=RA(this.draft());if(`error`in e){this.error.set(e.error);return}let t=this.prop(),n=this.rpc(),r=this.pageId();if(!n||!r||!t.edit)return;this.busy.set(!0),this.error.set(``);let i;try{i=await n.scope(`pangular`).rpc.call(`request-component-edit`,{pageId:r,request:{id:this.componentId(),path:t.prop,value:e.value,kind:t.edit}})??{}}catch{i={error:`The devtools server did not answer. Try again.`}}this.busy.set(!1),this.editing()&&(i.ok?(this.editing.set(!1),this.done.set(`Set ${t.name}.`),this.focusEdit()):(this.error.set(i.error??`The page did not write it.`),this.field()?.nativeElement.focus()))}focusEdit(){Bd(()=>this.editButton()?.nativeElement.focus(),{injector:this.injector})}static ɵfac=function(t){return new(t||e)};static ɵcmp=Gh({type:e,selectors:[[`app-prop-value`]],viewQuery:function(e,t){e&1&&l_(t.field,kA,5)(t.editButton,AA,5)(t.valueBox,jA,5),e&2&&u_(3)},inputs:{prop:[1,`prop`],componentId:[1,`componentId`],pageId:[1,`pageId`],rpc:[1,`rpc`],writes:[1,`writes`]},decls:5,vars:3,consts:[[`field`,``],[`valueBox`,``],[`editButton`,``],[`role`,`alert`,1,`error`,3,`id`],[`role`,`status`,1,`sr-only`],[1,`editor`],[1,`sr-only`,3,`for`],[`type`,`text`,`autocomplete`,`off`,`spellcheck`,`false`,1,`field`,`mono`,3,`input`,`keydown.enter`,`keydown.escape`,`id`,`value`,`readOnly`],[`type`,`button`,1,`primary`,3,`click`,`disabled`],[`type`,`button`,3,`click`],[1,`hint`,3,`id`],[1,`view`],[`type`,`button`,1,`edit`],[1,`locked`],[`type`,`button`,1,`edit`,3,`click`]],template:function(e,t){e&1&&(N(0,MA,11,11)(1,FA,7,8),N(2,IA,2,2,`p`,3),V(3,`p`,4),J(4),H()),e&2&&(P(+!t.editing()),j(2),P(t.error()?2:-1),j(2),Y(t.done()))},dependencies:[hb],styles:[`[_nghost-%COMP%] { +}`]})},MA=[`field`],NA=[`editButton`],PA=[`valueBox`];function FA(e,t){if(e&1){let e=U();V(0,`div`,5)(1,`label`,6),J(2),H(),V(3,`input`,7,0),r_(`input`,function(t){return D(e),O(G().draft.set(t.target.value))})(`keydown.enter`,function(t){D(e);let n=G();return t.preventDefault(),O(n.apply())})(`keydown.escape`,function(t){D(e);let n=G();return t.preventDefault(),t.stopPropagation(),O(n.cancel())}),H(),V(5,`button`,8),r_(`click`,function(){return D(e),O(G().apply())}),J(6,`Apply`),H(),V(7,`button`,9),r_(`click`,function(){return D(e),O(G().cancel())}),J(8,`Cancel`),H()(),V(9,`p`,10),J(10),H()}if(e&2){let e=G();j(),Kg(`htmlFor`,e.fieldId),j(),X(`New value of `,e.prop().name,`, as JSON`),j(),Kg(`id`,e.fieldId)(`value`,e.draft())(`readOnly`,e.busy()),M(`aria-busy`,e.busy()?`true`:null)(`aria-invalid`,e.error()?`true`:null)(`aria-describedby`,e.hintId+(e.error()?` `+e.errorId:``)),j(2),Kg(`disabled`,e.busy()),j(4),Kg(`id`,e.hintId),j(),X(` JSON, such as "text", 42, true or `,e.objectSample,`. Enter applies, Escape cancels. `)}}function IA(e,t){if(e&1){let e=U();V(0,`button`,14,2),r_(`click`,function(){return D(e),O(G(2).start())}),J(2,` Edit `),H()}e&2&&M(`aria-label`,`Edit `+G(2).prop().name)}function LA(e,t){if(e&1&&(V(0,`p`,13),J(1),H()),e&2){let e=G(2);j(),Y(e.prop().locked)}}function RA(e,t){if(e&1&&(V(0,`div`,11)(1,`pre`,null,1),J(3),xv(4,`json`),H(),N(5,IA,3,1,`button`,12),H(),N(6,LA,2,1,`p`,13)),e&2){let e=G();j(),M(`tabindex`,e.scrollable()?0:null)(`role`,e.scrollable()?`region`:null)(`aria-label`,e.scrollable()?`Value of `+e.prop().name:null),j(2),Y(Cv(4,6,e.prop().value)),j(2),P(e.editable()?5:-1),j(),P(e.writes()&&e.prop().locked?6:-1)}}function zA(e,t){if(e&1&&(V(0,`p`,3),J(1),H()),e&2){let e=G();Kg(`id`,e.errorId),j(),Y(e.error())}}var BA=0;function VA(e){let t=e.trim();if(!t)return{error:`Type a JSON value, such as "text", 42, true, null or [1, 2].`};try{return{value:JSON.parse(t)}}catch{return{error:`Not valid JSON. Put text in double quotes, such as "Paris".`}}}var HA=class e{prop=$.required();componentId=$.required();pageId=$(null);rpc=$(null);writes=$(!1);fieldId=`prop-edit-${++BA}`;hintId=`${this.fieldId}-hint`;errorId=`${this.fieldId}-error`;objectSample=`{"a": 1}`;editing=A(!1);draft=A(``);busy=A(!1);error=A(``);done=A(``);editable=Q(()=>this.writes()&&!!this.prop().edit&&!!this.pageId()&&!!this.rpc());field=Jv(`field`);editButton=Jv(`editButton`);valueBox=Jv(`valueBox`);injector=T(Cs);scrollable=A(!1);constructor(){uy(()=>{this.prop();let e=this.valueBox()?.nativeElement;this.scrollable.set(!!e&&e.scrollHeight>e.clientHeight+1)})}start(){let e=this.prop().value;this.draft.set(e===void 0?``:JSON.stringify(e)),this.error.set(``),this.done.set(``),this.editing.set(!0),Bd(()=>{let e=this.field()?.nativeElement;e?.focus(),e?.select()},{injector:this.injector})}cancel(){this.editing()&&(this.editing.set(!1),this.busy.set(!1),this.error.set(``),this.focusEdit())}async apply(){if(this.busy())return;let e=VA(this.draft());if(`error`in e){this.error.set(e.error);return}let t=this.prop(),n=this.rpc(),r=this.pageId();if(!n||!r||!t.edit)return;this.busy.set(!0),this.error.set(``);let i;try{i=await n.scope(`pangular`).rpc.call(`request-component-edit`,{pageId:r,request:{id:this.componentId(),path:t.prop,value:e.value,kind:t.edit}})??{}}catch{i={error:`The devtools server did not answer. Try again.`}}this.busy.set(!1),this.editing()&&(i.ok?(this.editing.set(!1),this.done.set(`Set ${t.name}.`),this.focusEdit()):(this.error.set(i.error??`The page did not write it.`),this.field()?.nativeElement.focus()))}focusEdit(){Bd(()=>this.editButton()?.nativeElement.focus(),{injector:this.injector})}static ɵfac=function(t){return new(t||e)};static ɵcmp=Gh({type:e,selectors:[[`app-prop-value`]],viewQuery:function(e,t){e&1&&l_(t.field,MA,5)(t.editButton,NA,5)(t.valueBox,PA,5),e&2&&u_(3)},inputs:{prop:[1,`prop`],componentId:[1,`componentId`],pageId:[1,`pageId`],rpc:[1,`rpc`],writes:[1,`writes`]},decls:5,vars:3,consts:[[`field`,``],[`valueBox`,``],[`editButton`,``],[`role`,`alert`,1,`error`,3,`id`],[`role`,`status`,1,`sr-only`],[1,`editor`],[1,`sr-only`,3,`for`],[`type`,`text`,`autocomplete`,`off`,`spellcheck`,`false`,1,`field`,`mono`,3,`input`,`keydown.enter`,`keydown.escape`,`id`,`value`,`readOnly`],[`type`,`button`,1,`primary`,3,`click`,`disabled`],[`type`,`button`,3,`click`],[1,`hint`,3,`id`],[1,`view`],[`type`,`button`,1,`edit`],[1,`locked`],[`type`,`button`,1,`edit`,3,`click`]],template:function(e,t){e&1&&(N(0,FA,11,11)(1,RA,7,8),N(2,zA,2,2,`p`,3),V(3,`p`,4),J(4),H()),e&2&&(P(+!t.editing()),j(2),P(t.error()?2:-1),j(2),Y(t.done()))},dependencies:[hb],styles:[`[_nghost-%COMP%] { display: block; min-width: 0; } @@ -1648,7 +1672,7 @@ button.edit[_ngcontent-%COMP%] { .error[_ngcontent-%COMP%] { color: var(--%NS%danger-text); -}`]})};function BA(e,t){if(e&1&&(V(0,`span`,1),J(1),H()),e&2){let e=G(2);j(),X(`: `,e.label())}}function VA(e,t){if(e&1){let e=U();V(0,`button`,0),r_(`click`,function(){return D(e),O(G().store())}),J(1,` Store as global `),N(2,BA,2,1,`span`,1),H(),V(3,`span`,2),J(4),H()}if(e&2){let e=G();Kg(`disabled`,e.busy()||!e.rpc()||!e.pageId()),j(2),P(e.label()?2:-1),j(2),Y(e.message())}}var HA=class e{rpc=$(null);pageId=$(null);target=$.required();label=$(``);staticReport=Q(()=>vE(this.rpc()));busy=A(!1);message=A(``);async store(){let e=this.rpc(),t=this.pageId();if(e&&t){this.busy.set(!0),this.message.set(``);try{let n=await e.scope(`pangular`).rpc.call(`request-console-global`,{pageId:t,target:this.target()});this.message.set(n?.message||(n?.ok&&n.name?`Stored as ${n.name}.`:`Not stored.`))}catch{this.message.set(`Could not reach the page.`)}finally{this.busy.set(!1)}}}static ɵfac=function(t){return new(t||e)};static ɵcmp=Gh({type:e,selectors:[[`app-store-global`]],inputs:{rpc:[1,`rpc`],pageId:[1,`pageId`],target:[1,`target`],label:[1,`label`]},decls:1,vars:1,consts:[[`type`,`button`,1,`store`,3,`click`,`disabled`],[1,`sr-only`],[`role`,`status`,1,`status`]],template:function(e,t){e&1&&N(0,VA,5,3),e&2&&P(t.staticReport()?-1:0)},styles:[`[_nghost-%COMP%] { +}`]})};function UA(e,t){if(e&1&&(V(0,`span`,1),J(1),H()),e&2){let e=G(2);j(),X(`: `,e.label())}}function WA(e,t){if(e&1){let e=U();V(0,`button`,0),r_(`click`,function(){return D(e),O(G().store())}),J(1,` Store as global `),N(2,UA,2,1,`span`,1),H(),V(3,`span`,2),J(4),H()}if(e&2){let e=G();Kg(`disabled`,e.busy()||!e.rpc()||!e.pageId()),j(2),P(e.label()?2:-1),j(2),Y(e.message())}}var GA=class e{rpc=$(null);pageId=$(null);target=$.required();label=$(``);staticReport=Q(()=>vE(this.rpc()));busy=A(!1);message=A(``);async store(){let e=this.rpc(),t=this.pageId();if(e&&t){this.busy.set(!0),this.message.set(``);try{let n=await e.scope(`pangular`).rpc.call(`request-console-global`,{pageId:t,target:this.target()});this.message.set(n?.message||(n?.ok&&n.name?`Stored as ${n.name}.`:`Not stored.`))}catch{this.message.set(`Could not reach the page.`)}finally{this.busy.set(!1)}}}static ɵfac=function(t){return new(t||e)};static ɵcmp=Gh({type:e,selectors:[[`app-store-global`]],inputs:{rpc:[1,`rpc`],pageId:[1,`pageId`],target:[1,`target`],label:[1,`label`]},decls:1,vars:1,consts:[[`type`,`button`,1,`store`,3,`click`,`disabled`],[1,`sr-only`],[`role`,`status`,1,`status`]],template:function(e,t){e&1&&N(0,WA,5,3),e&2&&P(t.staticReport()?-1:0)},styles:[`[_nghost-%COMP%] { display: inline-flex; flex-wrap: wrap; align-items: center; @@ -1668,7 +1692,7 @@ button.edit[_ngcontent-%COMP%] { .status[_ngcontent-%COMP%]:empty { display: none; -}`]})},UA=(e,t)=>t.id;function WA(e,t){if(e&1&&(V(0,`p`,4),J(1),H()),e&2){let e=G(2);j(),X(`The page has more @for blocks than the `,e.length,` listed.`)}}function GA(e,t){e&1&&(V(0,`span`,9),J(1,`@empty showing`),H())}function KA(e,t){e&1&&(V(0,`span`,10),J(1,`@empty`),H())}function qA(e,t){e&1&&(V(0,`span`,10),J(1,`renders nothing`),H())}function JA(e,t){if(e&1){let e=U();V(0,`li`)(1,`button`,6),r_(`click`,function(){let t=D(e).$implicit;return O(G(3).showOwner.emit(t))})(`focus`,function(){let t=D(e).$implicit,n=G(3);return O(n.highlight.emit(n.target(t)))})(`blur`,function(){return D(e),O(G(3).highlight.emit(null))})(`mouseenter`,function(){let t=D(e).$implicit,n=G(3);return O(n.highlight.emit(n.target(t)))})(`mouseleave`,function(){return D(e),O(G(3).highlight.emit(null))}),V(2,`span`,7),J(3),H(),V(4,`span`,8),J(5),H(),N(6,GA,2,0,`span`,9)(7,KA,2,0,`span`,10)(8,qA,2,0,`span`,10),V(9,`span`,11),J(10),H()()()}if(e&2){let e=t.$implicit,n=G(3);j(),M(`aria-disabled`,e.owner?null:`true`),j(2),Y(e.owner?.name??`Unknown component`),j(2),Z(` `,e.count,` `,e.count===1?`item`:`items`,` `),j(),P(e.showingEmpty?6:e.hasEmptyBlock?7:e.count===0?8:-1),j(4),Y(n.trackLabel(e))}}function YA(e,t){if(e&1&&(V(0,`section`,1)(1,`h2`,2),J(2,` @for blocks `),V(3,`span`,3),J(4),H()(),N(5,WA,2,1,`p`,4),V(6,`ul`,5),F(7,JA,11,6,`li`,null,UA),H()()),e&2){let e=G(),t=G();j(4),Y(t.truncated()?e.length+`+`:e.length),j(),P(t.truncated()?5:-1),j(2),I(e)}}function XA(e,t){e&1&&N(0,YA,9,2,`section`,1),e&2&&P(t.length?0:-1)}function ZA(e,t){e&1&&(V(0,`p`,0),J(1,` @for blocks are listed from Angular 22.0 in development builds. This page's Angular does not report them. `),H())}var QA={$index:`track $index`,item:`track item`,function:`track expression`},$A=class e{blocks=$(void 0);truncated=$(!1);supported=$(null);showOwner=Rv();highlight=Rv();target(e){return e.rootIds[0]??e.owner?.id??null}trackLabel(e){return e.track?QA[e.track]:`track unknown`}static ɵfac=function(t){return new(t||e)};static ɵcmp=Gh({type:e,selectors:[[`app-for-blocks`]],inputs:{blocks:[1,`blocks`],truncated:[1,`truncated`],supported:[1,`supported`]},outputs:{showOwner:`showOwner`,highlight:`highlight`},decls:2,vars:1,consts:[[1,`note`,`for`],[`aria-labelledby`,`ct-for-title`,1,`for`],[`id`,`ct-for-title`,1,`for-title`],[1,`pill`],[1,`note`],[1,`for-list`],[`type`,`button`,1,`for-row`,3,`click`,`focus`,`blur`,`mouseenter`,`mouseleave`],[1,`name`,`mono`],[1,`count`],[1,`flag`,`empty`],[1,`flag`],[1,`track`,`mono`]],template:function(e,t){if(e&1&&N(0,XA,1,1)(1,ZA,2,0,`p`,0),e&2){let e;P((e=t.blocks())?0:t.supported()===!1?1:-1,e)}},styles:[`[_nghost-%COMP%] { +}`]})},KA=(e,t)=>t.id;function qA(e,t){if(e&1&&(V(0,`p`,4),J(1),H()),e&2){let e=G(2);j(),X(`The page has more @for blocks than the `,e.length,` listed.`)}}function JA(e,t){e&1&&(V(0,`span`,9),J(1,`@empty showing`),H())}function YA(e,t){e&1&&(V(0,`span`,10),J(1,`@empty`),H())}function XA(e,t){e&1&&(V(0,`span`,10),J(1,`renders nothing`),H())}function ZA(e,t){if(e&1){let e=U();V(0,`li`)(1,`button`,6),r_(`click`,function(){let t=D(e).$implicit;return O(G(3).showOwner.emit(t))})(`focus`,function(){let t=D(e).$implicit,n=G(3);return O(n.highlight.emit(n.target(t)))})(`blur`,function(){return D(e),O(G(3).highlight.emit(null))})(`mouseenter`,function(){let t=D(e).$implicit,n=G(3);return O(n.highlight.emit(n.target(t)))})(`mouseleave`,function(){return D(e),O(G(3).highlight.emit(null))}),V(2,`span`,7),J(3),H(),V(4,`span`,8),J(5),H(),N(6,JA,2,0,`span`,9)(7,YA,2,0,`span`,10)(8,XA,2,0,`span`,10),V(9,`span`,11),J(10),H()()()}if(e&2){let e=t.$implicit,n=G(3);j(),M(`aria-disabled`,e.owner?null:`true`),j(2),Y(e.owner?.name??`Unknown component`),j(2),Z(` `,e.count,` `,e.count===1?`item`:`items`,` `),j(),P(e.showingEmpty?6:e.hasEmptyBlock?7:e.count===0?8:-1),j(4),Y(n.trackLabel(e))}}function QA(e,t){if(e&1&&(V(0,`section`,1)(1,`h2`,2),J(2,` @for blocks `),V(3,`span`,3),J(4),H()(),N(5,qA,2,1,`p`,4),V(6,`ul`,5),F(7,ZA,11,6,`li`,null,KA),H()()),e&2){let e=G(),t=G();j(4),Y(t.truncated()?e.length+`+`:e.length),j(),P(t.truncated()?5:-1),j(2),I(e)}}function $A(e,t){e&1&&N(0,QA,9,2,`section`,1),e&2&&P(t.length?0:-1)}function ej(e,t){e&1&&(V(0,`p`,0),J(1,` @for blocks are listed from Angular 22.0 in development builds. This page's Angular does not report them. `),H())}var tj={$index:`track $index`,item:`track item`,function:`track expression`},nj=class e{blocks=$(void 0);truncated=$(!1);supported=$(null);showOwner=Rv();highlight=Rv();target(e){return e.rootIds[0]??e.owner?.id??null}trackLabel(e){return e.track?tj[e.track]:`track unknown`}static ɵfac=function(t){return new(t||e)};static ɵcmp=Gh({type:e,selectors:[[`app-for-blocks`]],inputs:{blocks:[1,`blocks`],truncated:[1,`truncated`],supported:[1,`supported`]},outputs:{showOwner:`showOwner`,highlight:`highlight`},decls:2,vars:1,consts:[[1,`note`,`for`],[`aria-labelledby`,`ct-for-title`,1,`for`],[`id`,`ct-for-title`,1,`for-title`],[1,`pill`],[1,`note`],[1,`for-list`],[`type`,`button`,1,`for-row`,3,`click`,`focus`,`blur`,`mouseenter`,`mouseleave`],[1,`name`,`mono`],[1,`count`],[1,`flag`,`empty`],[1,`flag`],[1,`track`,`mono`]],template:function(e,t){if(e&1&&N(0,$A,1,1)(1,ej,2,0,`p`,0),e&2){let e;P((e=t.blocks())?0:t.supported()===!1?1:-1,e)}},styles:[`[_nghost-%COMP%] { display: block; } @@ -1786,7 +1810,7 @@ button.edit[_ngcontent-%COMP%] { min-width: 0; text-overflow: ellipsis; white-space: nowrap; -}`]})},ej=[`filterInput`],tj=()=>[],nj=e=>({kind:`component`,id:e}),rj=(e,t)=>t.node.id,ij=(e,t)=>t.outlet+t.route,aj=(e,t)=>t.formId,oj=(e,t)=>t.name+e,sj=(e,t)=>t.name,cj=(e,t)=>t.token+e,lj=(e,t)=>t.id;function uj(e,t){return this.sourceKey(t)}function dj(e,t){if(e&1){let e=U();R(0,`span`,29),J(1,`Page`),z(),R(2,`app-select`,30),W(`valueChange`,function(t){return D(e),O(G(2).selectPage(t))}),z()}if(e&2){let e=G(2);j(2),L(`options`,e.pageOptions())(`value`,e.page()?.pageId??null)}}function fj(e,t){if(e&1){let e=U();R(0,`button`,31),W(`click`,function(){D(e);let t=G(2);return O(t.picking()?t.cancelPick():t.pick())}),k(),R(1,`svg`,10),B(2,`path`,32),z(),J(3),z()}if(e&2){let e=G(2);q(`on`,e.picking()),j(3),X(` `,e.picking()?`Cancel pick`:`Pick component on page`,` `)}}function pj(e,t){if(e&1&&(R(0,`p`,17),J(1),z()),e&2){let e=G(2);j(),Y(e.pickMessage())}}function mj(e,t){if(e&1&&(R(0,`p`,18),J(1),z()),e&2){let e=G(2);j(),Y(e.truncationText())}}function hj(e,t){e&1&&(R(0,`p`,34),J(1,`The filter only searches the components the tree lists.`),z())}function gj(e,t){if(e&1){let e=U();R(0,`div`,21)(1,`p`,33),J(2),z(),N(3,hj,2,0,`p`,34),R(4,`button`,35),W(`click`,function(){return D(e),O(G(2).clearFilter())}),J(5,`Clear filter`),z()()}if(e&2){let e=G(2);j(2),X(`No components match “`,e.filter().trim(),`”`),j(),P(e.page().truncated?3:-1)}}function _j(e,t){if(e&1){let e=U();R(0,`span`,44),W(`click`,function(t){D(e);let n=G().$implicit;return O(G(2).toggle(n.node.id,t))}),k(),R(1,`svg`,45),B(2,`path`,46),z()()}if(e&2){let e=G().$implicit;q(`open`,e.expanded)}}function vj(e,t){e&1&&B(0,`span`,38)}function yj(e,t){if(e&1&&(R(0,`span`,41),J(1),z()),e&2){let e=t.$implicit;j(),Y(e.route||`/`)}}function bj(e,t){if(e&1&&(R(0,`span`,42),J(1),R(2,`span`,20),J(3),z()()),e&2){let e=t;j(),X(` `,e),j(2),X(` `,e===1?`check`:`checks`,` while recording`)}}function xj(e,t){if(e&1&&(R(0,`span`,43),J(1),R(2,`span`,20),J(3),z()()),e&2){let e=G().$implicit;M(`title`,e.node.directives.join(`, `)),j(),X(` +`,e.node.directives.length,` `),j(2),X(` `,e.node.directives.length===1?`directive`:`directives`,` `)}}function Sj(e,t){if(e&1){let e=U();R(0,`div`,36),W(`click`,function(){let t=D(e).$implicit;return O(G(2).select(t.node.id))})(`focus`,function(){let t=D(e).$implicit,n=G(2);return n.focusId.set(t.node.id),O(n.highlight(t.node.id))})(`blur`,function(){return D(e),O(G(2).highlight(null))})(`mouseenter`,function(){let t=D(e).$implicit;return O(G(2).highlight(t.node.id))})(`mouseleave`,function(){return D(e),O(G(2).highlight(null))}),N(1,_j,3,2,`span`,37)(2,vj,1,0,`span`,38),R(3,`span`,39),J(4),z(),R(5,`span`,40),J(6),z(),F(7,yj,2,1,`span`,41,ij),N(9,bj,4,2,`span`,42),N(10,xj,4,3,`span`,43),z()}if(e&2){let e,n=t.$implicit,r=G(2);K(`--%NS%depth`,n.depth),q(`selected`,r.selectedId()===n.node.id),M(`aria-level`,n.depth+1)(`aria-expanded`,n.hasChildren?n.expanded:null)(`aria-selected`,r.selectedId()===n.node.id)(`tabindex`,r.rovingId()===n.node.id?0:-1)(`data-id`,n.node.id),j(),P(n.hasChildren?1:2),j(3),Y(n.node.name),j(2),X(`<`,n.node.tag,`>`),j(),I(r.routedById().get(n.node.id)??mv(14,tj)),j(2),P((e=r.cdHosts()[n.node.id])?9:-1,e),j(),P(n.node.directives?.length?10:-1)}}function Cj(e,t){if(e&1&&(R(0,`p`,51),B(1,`app-source-link`,54),z()),e&2){let e=t;j(),L(`file`,e.file)(`line`,e.line)}}function wj(e,t){if(e&1){let e=U();R(0,`div`,55)(1,`button`,35),W(`click`,function(){D(e);let t=G();return O(G(2).revealInElements(t))}),J(2,`Reveal in Elements`),z(),R(3,`button`,35),W(`click`,function(){D(e);let t=G();return O(G(2).openSource(t))}),J(4,`Open source`),z()(),R(5,`p`,56),J(6),z()}if(e&2){let e=G(3);j(6),Y(e.actionMessage())}}function Tj(e,t){if(e&1){let e=U();R(0,`button`,59),W(`click`,function(){let t=D(e).$implicit;return O(G(5).showForm.emit(t.formId))}),J(1),z()}if(e&2){let e=t.$implicit;j(),X(` Show `,e.label,` in Forms `)}}function Ej(e,t){if(e&1&&(R(0,`div`,57),F(1,Tj,2,1,`button`,58,aj),z()),e&2){let e=G(),t=G(3);j(),I(t.formsIn(e.file))}}function Dj(e,t){e&1&&N(0,Ej,3,0,`div`,57),e&2&&P(G(3).formsIn(t.file).length?0:-1)}function Oj(e,t){if(e&1&&B(0,`app-store-global`,52),e&2){let e=G(),t=G(2);L(`rpc`,t.rpc())(`pageId`,t.page()?.pageId)(`target`,hv(4,nj,e.id))(`label`,e.name)}}function kj(e,t){if(e&1&&(R(0,`dt`),J(1,`Routed`),z(),R(2,`dd`,61),J(3),z()),e&2){let e=t.$implicit;j(3),Z(``,e.route||`/`,` in outlet `,e.outlet)}}function Aj(e,t){if(e&1&&(R(0,`span`,70),J(1),z()),e&2){let e=G().$implicit;j(),X(`(`,e.prop,`)`)}}function jj(e,t){if(e&1&&(R(0,`li`,68)(1,`span`,69),J(2),N(3,Aj,2,1,`span`,70),z(),B(4,`app-prop-value`,71),z()),e&2){let e=t.$implicit,n=G(2),r=G(3);j(2),X(` `,e.name,` `),j(),P(e.prop===e.name?-1:3),j(),L(`prop`,e)(`componentId`,n.id)(`pageId`,r.page()?.pageId??null)(`rpc`,r.rpc())(`writes`,r.canEdit())}}function Mj(e,t){if(e&1&&(R(0,`ul`,64),F(1,jj,5,7,`li`,68,sj),z()),e&2){let e=G();j(),I(e.inputs)}}function Nj(e,t){e&1&&(R(0,`p`,65),J(1,`No inputs.`),z())}function Pj(e,t){if(e&1&&(R(0,`li`,73)(1,`span`,61),J(2),z(),R(3,`span`,74),J(4),z()()),e&2){let e=t.$implicit;q(`on`,e.listened),j(2),Y(e.name),j(2),Y(e.listened?`listened`:`no listener`)}}function Fj(e,t){if(e&1&&(R(0,`ul`,66),F(1,Pj,5,4,`li`,72,sj),z()),e&2){let e=G();j(),I(e.outputs)}}function Ij(e,t){e&1&&(R(0,`p`,65),J(1,`No outputs.`),z())}function Lj(e,t){if(e&1&&(R(0,`span`,75),J(1),z()),e&2){let e=G().$implicit;j(),Y(e.kind)}}function Rj(e,t){if(e&1&&(R(0,`li`,68)(1,`span`,69),J(2),N(3,Lj,2,1,`span`,75),z(),B(4,`app-prop-value`,71),z()),e&2){let e=t.$implicit,n=G(2),r=G(3);j(2),X(` `,e.name,` `),j(),P(e.kind?3:-1),j(),L(`prop`,e)(`componentId`,n.id)(`pageId`,r.page()?.pageId??null)(`rpc`,r.rpc())(`writes`,r.canEdit())}}function zj(e,t){if(e&1&&(R(0,`ul`,64),F(1,Rj,5,7,`li`,68,sj),z()),e&2){let e=G();j(),I(e.properties)}}function Bj(e,t){e&1&&(R(0,`p`,65),J(1,`No other properties.`),z())}function Vj(e,t){if(e&1&&(R(0,`li`,76),J(1),z()),e&2){let e=t.$implicit;j(),Y(e)}}function Hj(e,t){if(e&1&&(R(0,`div`,62)(1,`h3`),J(2,` DOM listeners `),R(3,`span`,63),J(4),z()(),R(5,`ul`,66),F(6,Vj,2,1,`li`,76,kg),z()()),e&2){let e=G();j(4),Y(e.listeners.length),j(2),I(e.listeners)}}function Uj(e,t){if(e&1&&(R(0,`li`,68)(1,`span`,69),J(2),z(),R(3,`pre`),J(4),xv(5,`json`),z()()),e&2){let e=t.$implicit;j(2),Y(e.name),j(2),Y(Cv(5,2,e.value))}}function Wj(e,t){if(e&1&&(R(0,`ul`,64),F(1,Uj,6,4,`li`,68,sj),z()),e&2){let e=G().$implicit;j(),I(e.inputs)}}function Gj(e,t){if(e&1&&(R(0,`li`,73)(1,`span`,61),J(2),z(),R(3,`span`,74),J(4),z()()),e&2){let e=t.$implicit;q(`on`,e.listened),j(2),Y(e.name),j(2),Y(e.listened?`listened`:`no listener`)}}function Kj(e,t){if(e&1&&(R(0,`ul`,66),F(1,Gj,5,4,`li`,72,sj),z()),e&2){let e=G().$implicit;j(),I(e.outputs)}}function qj(e,t){e&1&&(R(0,`p`,65),J(1,`No inputs or outputs.`),z())}function Jj(e,t){if(e&1&&(R(0,`div`,62)(1,`h3`)(2,`span`,61),J(3),z(),R(4,`span`,75),J(5,`directive on host`),z()(),N(6,Wj,3,0,`ul`,64),N(7,Kj,3,0,`ul`,66),N(8,qj,2,0,`p`,65),z()),e&2){let e=t.$implicit;j(3),Y(e.name),j(3),P(e.inputs.length?6:-1),j(),P(e.outputs.length?7:-1),j(),P(!e.inputs.length&&!e.outputs.length?8:-1)}}function Yj(e,t){if(e&1&&(R(0,`span`,75),J(1),z()),e&2){let e=t.$implicit;j(),Y(e)}}function Xj(e,t){if(e&1&&(R(0,`span`,79),J(1,`from `),R(2,`span`,61),J(3),z()()),e&2){let e=G().$implicit;j(3),Y(e.providedByName??`an injector`)}}function Zj(e,t){e&1&&(R(0,`span`,80),J(1,`not provided`),z())}function Qj(e,t){if(e&1&&(R(0,`li`,77)(1,`span`,78),J(2),z(),F(3,Yj,2,1,`span`,75,kg),N(5,Xj,4,1,`span`,79)(6,Zj,2,0,`span`,80),z()),e&2){let e=t.$implicit;j(2),Y(e.token),j(),I(e.flags),j(2),P(e.providedBy?5:6)}}function $j(e,t){if(e&1&&(R(0,`ul`,67),F(1,Qj,7,2,`li`,77,cj),z()),e&2){let e=G();j(),I(e.dependencies)}}function eM(e,t){e&1&&(R(0,`p`,65),J(1,`Nothing is injected through the constructor or inject().`),z())}function tM(e,t){if(e&1&&(R(0,`dl`,60)(1,`dt`),J(2,`Change detection`),z(),R(3,`dd`),J(4),z(),R(5,`dt`),J(6,`Encapsulation`),z(),R(7,`dd`),J(8),z(),R(9,`dt`),J(10,`Host path`),z(),R(11,`dd`,61),J(12),z(),F(13,kj,4,2,null,null,ij),z(),R(15,`div`,62)(16,`h3`),J(17,` Inputs `),R(18,`span`,63),J(19),z()(),N(20,Mj,3,0,`ul`,64)(21,Nj,2,0,`p`,65),z(),R(22,`div`,62)(23,`h3`),J(24,` Outputs `),R(25,`span`,63),J(26),z()(),N(27,Fj,3,0,`ul`,66)(28,Ij,2,0,`p`,65),z(),R(29,`div`,62)(30,`h3`),J(31,` Properties `),R(32,`span`,63),J(33),z()(),N(34,zj,3,0,`ul`,64)(35,Bj,2,0,`p`,65),z(),N(36,Hj,8,1,`div`,62),F(37,Jj,9,4,`div`,62,oj),R(39,`div`,62)(40,`h3`),J(41,` Injected `),R(42,`span`,63),J(43),z()(),N(44,$j,3,0,`ul`,67)(45,eM,2,0,`p`,65),z()),e&2){let e=t,n=G(),r=G(2);j(4),Y(e.changeDetection??`Unknown`),j(4),Y(e.encapsulation??`Unknown`),j(4),Y(e.path),j(),I(r.routedById().get(n.id)??mv(12,tj)),j(6),Y(e.inputs.length),j(),P(e.inputs.length?20:21),j(6),Y(e.outputs.length),j(),P(e.outputs.length?27:28),j(6),Y(e.properties?.length??0),j(),P(e.properties?.length?34:35),j(2),P(e.listeners.length?36:-1),j(),I(e.directives),j(6),Y(e.dependencies.length),j(),P(e.dependencies.length?44:45)}}function nM(e,t){e&1&&(R(0,`div`,53),B(1,`span`,81),R(2,`p`,34),J(3,`Reading live values from the page…`),z()())}function rM(e,t){if(e&1&&(R(0,`section`,24)(1,`header`,47)(2,`span`,48),J(3,`component`),z(),R(4,`h2`,49),J(5),z(),R(6,`span`,50),J(7),z(),N(8,Cj,2,2,`p`,51),N(9,wj,7,1),N(10,Dj,1,1),N(11,Oj,1,6,`app-store-global`,52),z(),N(12,tM,46,13)(13,nM,4,0,`div`,53),z()),e&2){let e,n,r,i=t,a=G(2);j(5),Y(i.name),j(2),X(`<`,i.tag,`>`),j(),P((e=a.whereOf(i))?8:-1,e),j(),P(a.devtoolsActions()?9:-1),j(),P((n=a.sourceFor(i))?10:-1,n),j(),P(!a.staticReport()&&!a.native()?11:-1),j(),P((r=a.detail())?12:13,r)}}function iM(e,t){e&1&&(R(0,`p`,33),J(1,`The selected component was destroyed`),z(),R(2,`p`,34)(3,`span`,61),J(4),z(),J(5,` is no longer on the page. Select another component to see its live values. `),z()),e&2&&(j(4),Y(t))}function aM(e,t){e&1&&(R(0,`p`,34),J(1,` Select a component to see its live inputs, properties, outputs, change detection and injected services. `),z())}function oM(e,t){if(e&1&&(R(0,`div`,25),N(1,iM,6,1)(2,aM,2,0,`p`,34),z()),e&2){let e,t=G(2);j(),P((e=t.destroyed())?1:2,e)}}function sM(e,t){e&1&&(R(0,`span`,75),J(1,`hydrate never`),z())}function cM(e,t){if(e&1&&(R(0,`span`,75),J(1),z()),e&2){let e=G().$implicit;j(),Y(e.hydration)}}function lM(e,t){if(e&1){let e=U();R(0,`li`)(1,`button`,84),W(`click`,function(){let t=D(e).$implicit;return O(G(3).showOwner(t))})(`focus`,function(){let t=D(e).$implicit;return O(G(3).highlightBlock(t))})(`blur`,function(){return D(e),O(G(3).highlight(null))})(`mouseenter`,function(){let t=D(e).$implicit;return O(G(3).highlightBlock(t))})(`mouseleave`,function(){return D(e),O(G(3).highlight(null))}),R(2,`span`,39),J(3),z(),R(4,`span`,85),J(5),z(),N(6,sM,2,0,`span`,75)(7,cM,2,1,`span`,75),R(8,`span`,86),J(9),z()()()}if(e&2){let e=t.$implicit;j(),M(`aria-disabled`,e.owner?null:`true`),j(2),Y(e.owner?.name??`Unknown component`),j(),M_(`defer-state-`+e.state),j(),Y(e.state),j(),P(e.hydrateNever?6:e.hydration===`not-configured`?-1:7),j(3),Y(e.triggers.join(`, `)||`no triggers`)}}function uM(e,t){if(e&1&&(R(0,`section`,26)(1,`h2`,82),J(2,` Defer blocks `),R(3,`span`,63),J(4),z()(),R(5,`ul`,83),F(6,lM,10,7,`li`,null,lj),z()()),e&2){let e=G(2);j(4),Y(e.deferCount()),j(2),I(e.deferBlocks())}}function dM(e,t){if(e&1){let e=U();R(0,`app-cd-recording`,87),W(`showComponent`,function(t){return D(e),O(G(2).showCdComponent(t))}),z()}if(e&2){let e=G(2);L(`page`,e.cdPage())(`pageId`,e.page().pageId)(`rpc`,e.rpc())}}function fM(e,t){if(e&1){let e=U();R(0,`p`,1),J(1,` Every component instance on the page, in the order Angular rendered them. Hover a row to highlight its host in the page, and select it to read its live inputs, properties, outputs and injected services. `),z(),R(2,`div`,2)(3,`div`,3),k(),R(4,`svg`,4),B(5,`circle`,5)(6,`path`,6),z(),hs(),R(7,`input`,7,0),W(`input`,function(t){return D(e),O(G().setFilter(t.target.value))})(`keydown.escape`,function(){return D(e),O(G().setFilter(``))}),z()(),N(9,dj,3,2),R(10,`span`,8),J(11),z(),R(12,`button`,9),W(`click`,function(){return D(e),O(G().expandAll())}),k(),R(13,`svg`,10),B(14,`path`,11)(15,`path`,12),z(),J(16,` Expand all `),z(),hs(),R(17,`button`,9),W(`click`,function(){return D(e),O(G().collapseAll())}),k(),R(18,`svg`,10),B(19,`path`,13)(20,`path`,14),z(),J(21,` Collapse all `),z(),N(22,fj,4,3,`button`,15),z(),hs(),R(23,`p`,16),J(24),z(),N(25,pj,2,1,`p`,17),N(26,mj,2,1,`p`,18),R(27,`div`,19)(28,`div`)(29,`h2`,20),J(30,`Component tree`),z(),N(31,gj,6,2,`div`,21),R(32,`div`,22),W(`keydown`,function(t){return D(e),O(G().onTreeKey(t))}),F(33,Sj,11,15,`div`,23,rj),z()(),N(35,rM,14,7,`section`,24)(36,oM,3,1,`div`,25),z(),N(37,uM,8,1,`section`,26),R(38,`app-for-blocks`,27),W(`showOwner`,function(t){return D(e),O(G().showForOwner(t))})(`highlight`,function(t){return D(e),O(G().highlight(t))}),z(),N(39,dM,1,3,`app-cd-recording`,28)}if(e&2){let e,t=G();j(7),L(`value`,t.filter()),j(2),P(t.pageOptions().length>1?9:-1),j(2),Y(t.countLabel()),j(),L(`disabled`,!!t.filter().trim()),j(5),L(`disabled`,!!t.filter().trim()),j(5),P(t.native()?-1:22),j(2),Y(t.announcement()),j(),P(t.pickMessage()?25:-1),j(),P(t.page().truncated?26:-1),j(5),P(t.rows().length?-1:31),j(),L(`hidden`,!t.rows().length),j(),I(t.rows()),j(2),P((e=t.selectedNode())?35:36,e),j(2),P(t.deferBlocks().length?37:-1),j(),L(`blocks`,t.page()?.forBlocks)(`truncated`,t.page()?.forBlocksTruncated===!0)(`supported`,t.page()?.deferBlocks&&!t.page()?.forBlocks?!1:null),j(),P(!t.staticReport()&&!t.native()?39:-1)}}function pM(e,t){e&1&&(R(0,`p`,18),J(1,` The page reported no component instances. The live tree needs a development build with Angular's debug API. Showing what the source declares instead. `),z())}function mM(e,t){e&1&&(R(0,`p`,88),J(1,` No page is connected, so this lists what the source declares. Open the app in a browser with the devtools connected to see each rendered instance. `),z())}function hM(e,t){if(e&1&&J(0),e&2){let e=G(3);Z(` `,e.filteredSource().length,` of `,e.source().length,` `)}}function gM(e,t){if(e&1&&J(0),e&2){let e=G(3);iv(` `,e.sourceCounts().components,` `,e.sourceCounts().components===1?`component`:`components`,` · `,e.sourceCounts().directives,` `,e.sourceCounts().directives===1?`directive`:`directives`,` `)}}function _M(e,t){if(e&1&&(R(0,`span`,90),N(1,hM,1,2)(2,gM,1,4),z()),e&2){let e=G(2);j(),P(e.filter().trim()?1:2)}}function vM(e,t){e&1&&(R(0,`div`,94),B(1,`span`,81),R(2,`p`,33),J(3,`Scanning components…`),z()())}function yM(e,t){e&1&&(J(0,` Run `),R(1,`code`),J(2,`pangular build`),z(),J(3,` again to rebuild the report. `))}function bM(e,t){e&1&&J(0,` Check that the dev server is running, then try again. `)}function xM(e,t){if(e&1){let e=U();R(0,`div`,95)(1,`p`,33),J(2,`Could not load components`),z(),R(3,`p`,34),N(4,yM,4,0)(5,bM,1,0),z(),R(6,`button`,35),W(`click`,function(){return D(e),O(G(2).refresh())}),J(7,`Retry`),z()()}if(e&2){let e=G(2);j(4),P(e.staticReport()?4:5)}}function SM(e,t){e&1&&(R(0,`div`,96)(1,`p`,33),J(2,`No components found`),z(),R(3,`p`,34),J(4,`No @Component or @Directive was found in the source.`),z()())}function CM(e,t){if(e&1){let e=U();R(0,`div`,96)(1,`p`,33),J(2),z(),R(3,`button`,35),W(`click`,function(){return D(e),O(G(2).clearFilter())}),J(4,`Clear filter`),z()()}if(e&2){let e=G(2);j(2),X(`No components match “`,e.filter().trim(),`”`)}}function wM(e,t){if(e&1&&J(0),e&2){let e=G().$implicit;X(` `,G(3).bareName(e.className),` · `)}}function TM(e,t){if(e&1&&(R(0,`dt`),J(1,`Change detection`),z(),R(2,`dd`),J(3),z()),e&2){let e=G(2).$implicit;j(3),Y(e.changeDetection??`Unknown`)}}function EM(e,t){if(e&1){let e=U();R(0,`button`,59),W(`click`,function(){let t=D(e).$implicit;return O(G(5).showForm.emit(t.formId))}),J(1),z()}if(e&2){let e=t.$implicit;j(),X(` Show `,e.label,` in Forms `)}}function DM(e,t){if(e&1&&(R(0,`div`,106)(1,`dl`,60)(2,`dt`),J(3,`Class`),z(),R(4,`dd`,61),J(5),z(),R(6,`dt`),J(7,`File`),z(),R(8,`dd`,61),B(9,`app-source-link`,54),z(),R(10,`dt`),J(11,`Standalone`),z(),R(12,`dd`),J(13),z(),N(14,TM,4,1),R(15,`dt`),J(16,`Inputs`),z(),R(17,`dd`,61),J(18),z(),R(19,`dt`),J(20,`Outputs`),z(),R(21,`dd`,61),J(22),z()(),F(23,EM,2,1,`button`,58,aj),z()),e&2){let e=G(),t=e.$implicit,n=e.$index,r=G(3);L(`id`,`ct-source-`+n),j(5),Y(r.bareName(t.className)),j(4),L(`file`,t.file)(`line`,t.line),j(4),Y(t.isStandalone?`Yes`:`No`),j(),P(t.kind===`component`?14:-1),j(4),Y(t.inputs.join(`, `)||`None`),j(4),Y(t.outputs.join(`, `)||`None`),j(),I(r.formsIn(t.file))}}function OM(e,t){if(e&1){let e=U();R(0,`li`,99)(1,`button`,100),W(`click`,function(){let t=D(e).$implicit,n=G(3);return O(n.openKey.set(n.openKey()===n.sourceKey(t)?null:n.sourceKey(t)))}),R(2,`span`,101),J(3),z(),R(4,`span`,102)(5,`span`,103),J(6),z(),R(7,`span`,104),N(8,wM,1,1),J(9),z()(),k(),R(10,`svg`,105),B(11,`path`,46),z()(),N(12,DM,25,8,`div`,106),z()}if(e&2){let e=t.$implicit,n=t.$index,r=G(3);q(`expanded`,r.openKey()===r.sourceKey(e)),j(),M(`aria-expanded`,r.openKey()===r.sourceKey(e))(`aria-controls`,r.openKey()===r.sourceKey(e)?`ct-source-`+n:null),j(),q(`directive`,e.kind===`directive`),j(),Y(e.kind),j(3),Y(r.sourceLabel(e)),j(2),P(e.selector?8:-1),j(),Z(` `,e.file,`:`,e.line,` `),j(3),P(r.openKey()===r.sourceKey(e)?12:-1)}}function kM(e,t){if(e&1&&(R(0,`ul`,97),F(1,OM,13,12,`li`,98,uj,!0),z()),e&2){let e=G(2);j(),I(e.filteredSource())}}function AM(e,t){if(e&1){let e=U();N(0,pM,2,0,`p`,18)(1,mM,2,0,`p`,88),R(2,`div`,2)(3,`div`,3),k(),R(4,`svg`,4),B(5,`circle`,5)(6,`path`,6),z(),hs(),R(7,`input`,89,0),W(`input`,function(t){return D(e),O(G().filter.set(t.target.value))})(`keydown.escape`,function(){return D(e),O(G().filter.set(``))}),z()(),N(9,_M,3,1,`span`,90),R(10,`button`,91),W(`click`,function(){return D(e),O(G().refresh())}),k(),R(11,`svg`,10),B(12,`path`,92)(13,`path`,93),z(),J(14,` Refresh `),z()(),N(15,vM,4,0,`div`,94)(16,xM,8,1,`div`,95)(17,SM,5,0,`div`,96)(18,CM,5,1,`div`,96)(19,kM,3,0,`ul`,97)}if(e&2){let e=G();P(+!e.page()),j(7),L(`value`,e.filter()),j(2),P(e.source().length?9:-1),j(),q(`spinning`,e.loading()),M(`aria-busy`,e.loading()),j(5),P(e.loading()&&!e.source().length?15:e.error()&&!e.source().length?16:e.source().length?e.filteredSource().length?19:18:17)}}function jM(e){return e.replace(/^_(?=[A-Z])/,``)}var MM=class e{rpc=$(null);staticReport=Q(()=>vE(this.rpc()));focus=$(null);showForm=Rv();focusHandled=Rv();filter=A(``);loading=A(!1);error=A(!1);source=A([]);formOwners=A([]);pages=A({});chosenPageId=A(null);selectedId=A(null);destroyed=A(null);announcement=A(``);picking=A(!1);pickMessage=A(``);pickPageId=null;pickSeq=0;focusId=A(null);bridge=T(PD);actionMessage=Fv({source:this.selectedId,computation:()=>``});collapsed=A(new Set);openKey=A(null);routerPages=A([]);pageId=fE();destroyRef=T(Ts);injector=T(Cs);host=T(Pl);filterInput=Jv(`filterInput`);cleanups=[];selection={pageId:null,detailId:null};shownPageId=Fv({source:()=>({pages:this.pages(),chosen:this.chosenPageId()}),computation:({pages:e,chosen:t},n)=>pE(e,{chosen:t,host:this.pageId,previous:n?.value??null})});page=Q(()=>{let e=this.shownPageId();return e?this.pages()[e]??null:null});pageOptions=Q(()=>Object.values(this.pages()).map(e=>({value:e.pageId,label:e.title||e.url||`Page ${e.pageId}`,hint:e.url})));live=Q(()=>(this.page()?.roots.length??0)>0);native=Q(()=>ID(this.page()));canEdit=Q(()=>this.live()&&!this.native()&&!this.staticReport()&&ME(this.rpc(),`components`));devtoolsActions=Q(()=>this.bridge.available&&!!this.page()&&!this.native()&&!this.staticReport());cdPages=A({});cdPage=Q(()=>{let e=this.page()?.pageId;return e?this.cdPages()[e]??null:null});cdHosts=Q(()=>this.cdPage()?.hosts??{});index=Q(()=>{let e=new Map,t=new Map,n=(r,i)=>{for(let a of r)e.set(a.id,a),i&&t.set(a.id,i),n(a.children,a.id)};return n(this.page()?.roots??[],null),{map:e,parents:t}});query=Q(()=>this.filter().trim().toLowerCase());filtered=Q(()=>JD(this.page()?.roots??[],this.query()));deferBlocks=Q(()=>this.page()?.deferBlocks??[]);deferCount=Q(()=>`${this.deferBlocks().length}${this.page()?.deferTruncated?`+`:``}`);countLabel=Q(()=>YD(this.page()?.count??0,this.filtered().matches,!!this.query(),!!this.page()?.truncated));truncationText=Q(()=>ZD(this.page()?.truncatedBy));rows=Q(()=>{let e=[],t=this.collapsed(),n=!!this.query(),r=(i,a)=>{for(let o of i){let i=n||!t.has(o.id);e.push({node:o,depth:a,hasChildren:o.children.length>0,expanded:i}),i&&r(o.children,a+1)}};return r(this.filtered().nodes,0),e});selectedNode=Q(()=>{let e=this.selectedId();return e?this.index().map.get(e)??null:null});detail=Q(()=>{let e=this.page()?.detail;return e&&e.id===this.selectedId()?e:null});rovingId=Q(()=>{let e=this.rows(),t=new Set(e.map(e=>e.node.id)),n=this.focusId();if(n&&t.has(n))return n;let r=this.selectedId();return r&&t.has(r)?r:e[0]?.node.id??null});outlets=Q(()=>{let e=this.page()?.pageId;return this.routerPages().find(t=>t.pageId===e)?.outlets??[]});routedById=Q(()=>{let e=new Map,t=n=>{for(let r of n){if(r.activated&&r.devtoolsId){let t=e.get(r.devtoolsId)??[];t.push({route:r.route??``,outlet:r.outlet}),e.set(r.devtoolsId,t)}r.children&&t(r.children)}};return t(this.outlets()),e});sourceByClass=Q(()=>{let e=new Map;for(let t of this.source()){let n=jM(t.className);e.set(n,[...e.get(n)??[],t])}return e});filteredSource=Q(()=>{let e=this.query(),t=this.source();return e?t.filter(t=>t.selector.toLowerCase().includes(e)||t.className.toLowerCase().includes(e)||t.file.toLowerCase().includes(e)):t});sourceCounts=Q(()=>{let e=this.source().filter(e=>e.kind===`component`).length;return{components:e,directives:this.source().length-e}});constructor(){fc(()=>{let e=this.page()?.pageId??null;Nv(()=>{this.picking()&&e!==this.pickPageId&&this.dropPick()})}),fc(()=>{let e=this.rpc();e&&(this.refresh(),this.watch(e))}),fc(()=>{let e=this.focus();if(!e)return;let t=this.page()?.pageId??null;if(e.pageId&&t!==e.pageId&&this.pages()[e.pageId]){Nv(()=>this.selectPage(e.pageId));return}this.live()&&Nv(()=>{(!e.pageId||t===e.pageId)&&this.index().map.has(e.id)?this.reveal(e.id):this.announcement.set(`That component is no longer on the page.`),this.focusHandled.emit()})}),this.destroyRef.onDestroy(()=>{this.highlight(null);for(let e of this.cleanups.splice(0))e()})}async watch(e){for(let e of this.cleanups.splice(0))e();let t=e.scope(`pangular`);try{let e=await t.rpc.sharedState(`component-tree`);if(this.destroyRef.destroyed)return;let n=e=>{let t=e?.pages;this.applyPages(t&&typeof t==`object`?t:{})};n(e.value()),this.cleanups.push(e.on(`updated`,n))}catch{this.applyPages({})}try{let e=await t.rpc.sharedState(`change-detection`);if(this.destroyRef.destroyed)return;let n=e=>{let t=e?.pages;this.cdPages.set(t&&typeof t==`object`?t:{})};n(e.value()),this.cleanups.push(e.on(`updated`,n))}catch{this.cdPages.set({})}try{let e=await t.rpc.sharedState(`router`);if(this.destroyRef.destroyed)return;let n=e=>{let t=e?.pages;this.routerPages.set(Array.isArray(t)?t:[])};n(e.value()),this.cleanups.push(e.on(`updated`,n))}catch{this.routerPages.set([])}}async refresh(){let e=this.rpc();if(!e)return;this.loading.set(!0);let t=e.scope(`pangular`);try{this.source.set(await t.rpc.call(`get-components`)),this.error.set(!1)}catch{this.error.set(!0)}finally{this.loading.set(!1)}let n=await t.rpc.call(`forms-owners`).catch(()=>[]);this.formOwners.set(n??[])}formsIn(e){return this.formOwners().filter(t=>t.file===e)}whereOf(e){return this.detail()?.source??this.sourceFor(e)}async revealInElements(e){let t=this.page()?.pageId;if(!t)return;this.actionMessage.set(``);let n=await this.bridge.reveal(t,e.id);this.selectedId()===e.id&&this.actionMessage.set(n.ok?``:`Could not reveal it. The component must be rendered in the tab these DevTools inspect.`)}async openSource(e){let t=this.page()?.pageId;if(!t)return;let n=this.whereOf(e);this.actionMessage.set(``);let r=await this.bridge.openSource(t,e.id,n);this.selectedId()===e.id&&(r.ok||this.actionMessage.set(n?`Not found in Sources. Open ${n.file}:${n.line} in your editor.`:`Could not open the source. The component must be rendered in the tab these DevTools inspect.`))}sourceFor(e){let t=(this.sourceByClass().get(jM(e.name))??[]).filter(e=>e.kind===`component`);return t.find(t=>t.selector===e.tag)??t[0]??null}sourceKey(e){return`${e.file}#${e.className}`}sourceLabel(e){return e.selector?e.kind===`component`&&/^[a-z][\w-]*$/i.test(e.selector)?`<${e.selector}>`:e.selector:jM(e.className)}bareName(e){return jM(e)}applyPages(e){let t=document.activeElement,n=t instanceof HTMLElement&&this.host.nativeElement.contains(t)?t.closest(`.row`)?.dataset.id??null:null,r=n?this.rows().map(e=>e.node.id):[],i=this.index().map;if(this.pages.set(e),this.syncSelection(i),!n)return;let a=new Set(this.rows().map(e=>e.node.id));if(a.has(n))return;let o=eO(r,a,n);o&&(this.focusId.set(o),Bd(()=>this.rowElement(o)?.focus(),{injector:this.injector}))}syncSelection(e=this.index().map){let t=this.page(),n=QD({...this.selection,selectedId:this.selectedId()},t?{pageId:t.pageId,roots:t.roots,detail:t.detail,truncated:t.truncated}:null),r=n.destroyed?e.get(n.destroyed)?.name:void 0;this.selection={pageId:n.pageId,detailId:n.detailId},n.selectedId!==this.selectedId()&&this.selectedId.set(n.selectedId),n.selectedId&&this.destroyed.set(null),n.destroyed&&(this.destroyed.set(r??`The component`),this.announcement.set(`The selected component was destroyed.`),this.sendSelection(null))}selectPage(e){e&&(this.chosenPageId.set(e),this.destroyed.set(null),this.syncSelection())}setFilter(e){this.filter.set(e);let{matches:t}=this.filtered();this.announcement.set(XD(this.page()?.count??0,t,e,!!this.page()?.truncated))}clearFilter(){this.live()?this.setFilter(``):this.filter.set(``),this.filterInput()?.nativeElement.focus()}async pick(){let e=this.rpc();if(!e||this.picking())return;let t=++this.pickSeq;this.pickPageId=this.page()?.pageId??null,this.picking.set(!0),this.say(`Click a component in the app. Press Escape to cancel.`);let n=await e.scope(`pangular`).rpc.call(`request-component-pick`,{pageId:this.pickPageId??void 0}).catch(()=>({ok:!1,error:`Could not reach the devtools server.`}));if(t===this.pickSeq){if(this.picking.set(!1),!n?.ok||!n.id){this.say(n?.error??`No component was picked.`);return}n.pageId&&n.pageId!==this.page()?.pageId&&this.selectPage(n.pageId),this.say(`Picked ${n.name??`a component`}.`),this.destroyed.set(null),this.index().map.has(n.id)?this.reveal(n.id):this.selectedId.set(n.id)}}cancelPick(){let e=this.rpc();e&&this.picking()&&e.scope(`pangular`).rpc.call(`cancel-component-pick`,{pageId:this.pickPageId??void 0}).catch(()=>{})}dropPick(){this.cancelPick(),this.pickSeq++,this.picking.set(!1),this.say(`Picking stopped because the page changed.`)}say(e){this.pickMessage.set(e),this.announcement.set(e)}sendSelection(e){let t=this.rpc();t&&t.scope(`pangular`).rpc.call(`select-component`,{pageId:this.page()?.pageId,id:e,console:!0}).catch(()=>{})}rowElement(e){return this.host.nativeElement.querySelector(`.row[data-id="${CSS.escape(e)}"]`)}select(e){let t=this.selectedId()===e?null:e;this.selectedId.set(t),this.destroyed.set(null),this.focusId.set(e),this.sendSelection(t)}reveal(e){let{parents:t}=this.index();this.collapsed.update(n=>{let r=new Set(n);for(let n=t.get(e);n;n=t.get(n))r.delete(n);return r}),this.rows().some(t=>t.node.id===e)||this.setFilter(``),this.selectedId()!==e&&this.select(e),Bd(()=>document.querySelector(`.row[data-id="${CSS.escape(e)}"]`)?.scrollIntoView({block:`nearest`}),{injector:this.injector})}toggle(e,t){t?.stopPropagation(),!this.query()&&this.collapsed.update(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})}expandAll(){this.query()||(this.collapsed.set(new Set),this.announce(`Expanded every component.`))}collapseAll(){if(this.query())return;let{map:e,parents:t}=this.index(),n=this.rovingId(),r=new Set;for(let t of e.values())t.children.length&&r.add(t.id);if(this.collapsed.set(r),n){let e=new Set(this.rows().map(e=>e.node.id)),r=n;for(;r&&!e.has(r);)r=t.get(r);r&&this.focusId.set(r)}this.announce(`Collapsed every component. Only the top level is shown.`)}announce(e){this.announcement.update(t=>t===e?`${e}\u00a0`:e)}expandSiblings(e){if(this.query())return;let t=this.index().parents.get(e),n=t?this.index().map.get(t)?.children??[]:this.page()?.roots??[];this.collapsed.update(e=>{let t=new Set(e);for(let e of n)t.delete(e.id);return t})}highlight(e){let t=this.rpc();if(!t)return;let n=e?{pageId:this.page()?.pageId,id:e}:null;t.scope(`pangular`).rpc.call(`request-page-highlight`,n).catch(()=>{})}highlightBlock(e){this.highlight(e.rootIds[0]??e.owner?.id??null)}showOwner(e){e.owner&&this.index().map.has(e.owner.id)&&this.reveal(e.owner.id)}showCdComponent(e){let t=this.cdHosts(),n=null;for(let r of this.index().map.values())r.name===e&&(!n||(t[r.id]??0)>(t[n.id]??0))&&(n=r);if(!n){this.say(`No ${e} is in the tree now.`);return}this.say(`Showing ${e} in the tree.`),this.reveal(n.id)}showForOwner(e){e.owner&&this.index().map.has(e.owner.id)&&this.reveal(e.owner.id)}onTreeKey(e){let t=this.rows();if(!t.length)return;let n=t.findIndex(e=>e.node.id===this.rovingId()),r=Math.max(n,0),i=t[r],a=-1;switch(e.key){case`ArrowDown`:a=Math.min(r+1,t.length-1);break;case`ArrowUp`:a=Math.max(r-1,0);break;case`Home`:a=0;break;case`End`:a=t.length-1;break;case`ArrowRight`:i.hasChildren&&!i.expanded?this.toggle(i.node.id):i.hasChildren&&(a=r+1);break;case`ArrowLeft`:if(i.hasChildren&&i.expanded&&!this.query())this.toggle(i.node.id);else{let e=this.index().parents.get(i.node.id);a=t.findIndex(t=>t.node.id===e)}break;case`Enter`:case` `:this.select(i.node.id);break;case`*`:this.expandSiblings(i.node.id);break;default:return}if(e.preventDefault(),a>=0){let e=t[a].node.id;this.focusId.set(e),queueMicrotask(()=>{let t=document.querySelector(`.row[data-id="${CSS.escape(e)}"]`);t?.focus(),t?.scrollIntoView({block:`nearest`})})}}static ɵfac=function(t){return new(t||e)};static ɵcmp=Gh({type:e,selectors:[[`app-component-tree`]],viewQuery:function(e,t){e&1&&l_(t.filterInput,ej,5),e&2&&u_()},hostBindings:function(e,t){e&1&&W(`keydown.escape`,function(){return t.cancelPick()})},inputs:{rpc:[1,`rpc`],focus:[1,`focus`]},outputs:{showForm:`showForm`,focusHandled:`focusHandled`},decls:2,vars:1,consts:[[`filterInput`,``],[1,`intro`],[1,`toolbar`],[1,`search`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`,1,`search-icon`],[`cx`,`11`,`cy`,`11`,`r`,`7`],[`d`,`m20 20-3.5-3.5`],[`type`,`search`,`placeholder`,`Filter by class, tag or directive…`,`aria-label`,`Filter components by class, tag or directive`,`autocomplete`,`off`,`spellcheck`,`false`,3,`input`,`keydown.escape`,`value`],[1,`count`],[`type`,`button`,1,`tree-action`,3,`click`,`disabled`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`],[`d`,`m7 15 5 5 5-5`],[`d`,`m7 9 5-5 5 5`],[`d`,`m7 20 5-5 5 5`],[`d`,`m7 4 5 5 5-5`],[`type`,`button`,1,`pick`,3,`on`],[`role`,`status`,1,`sr-only`],[1,`pick-message`],[`role`,`status`,1,`notice`],[1,`layout`],[1,`sr-only`],[1,`state`,`compact`,`tree`],[`role`,`tree`,`aria-label`,`Component instances`,1,`tree`,3,`keydown`,`hidden`],[`role`,`treeitem`,1,`row`,3,`selected`,`--%NS%depth`],[`aria-labelledby`,`ct-detail-title`,1,`detail`],[1,`detail`,`placeholder`],[`aria-labelledby`,`ct-defer-title`,1,`defer`],[3,`showOwner`,`highlight`,`blocks`,`truncated`,`supported`],[3,`page`,`pageId`,`rpc`],[`id`,`ct-page-label`,1,`sr-only`],[`labelledBy`,`ct-page-label`,1,`page-select`,3,`valueChange`,`options`,`value`],[`type`,`button`,1,`pick`,3,`click`],[`d`,`M4 4l6.5 16 2.3-6.7L19.5 11z`],[1,`state-title`],[1,`state-hint`],[`type`,`button`,3,`click`],[`role`,`treeitem`,1,`row`,3,`click`,`focus`,`blur`,`mouseenter`,`mouseleave`],[`aria-hidden`,`true`,1,`twisty`,3,`open`],[`aria-hidden`,`true`,1,`twisty-space`],[1,`name`,`mono`],[1,`tag`,`mono`],[1,`routed`],[1,`checks`],[1,`dirs`],[`aria-hidden`,`true`,1,`twisty`,3,`click`],[`viewBox`,`0 0 24 24`],[`d`,`m9 6 6 6-6 6`],[1,`detail-head`],[1,`badge`],[`id`,`ct-detail-title`,1,`mono`],[1,`mono`,`muted`],[1,`where`,`mono`],[1,`console-global`,3,`rpc`,`pageId`,`target`,`label`],[`role`,`status`,1,`state`,`compact`],[3,`file`,`line`],[`role`,`group`,`aria-label`,`Chrome DevTools`,1,`actions`],[`role`,`status`,1,`where`,`action-message`],[1,`actions`],[`type`,`button`,1,`show-form`],[`type`,`button`,1,`show-form`,3,`click`],[1,`facts`],[1,`mono`],[1,`block`],[1,`pill`],[1,`props`],[1,`empty-line`],[1,`chips`],[1,`deps`],[1,`prop`],[1,`prop-name`,`mono`],[1,`muted`],[3,`prop`,`componentId`,`pageId`,`rpc`,`writes`],[1,`chip`,3,`on`],[1,`chip`],[1,`chip-note`],[1,`flag`],[1,`chip`,`mono`],[1,`dep`],[1,`token`,`mono`],[1,`from`],[1,`from`,`missing`],[`aria-hidden`,`true`,1,`spinner`],[`id`,`ct-defer-title`,1,`defer-title`],[1,`defer-list`],[`type`,`button`,1,`defer-row`,3,`click`,`focus`,`blur`,`mouseenter`,`mouseleave`],[1,`defer-state`],[1,`triggers`,`mono`],[3,`showComponent`,`page`,`pageId`,`rpc`],[1,`notice`],[`type`,`search`,`placeholder`,`Filter by selector, class or file…`,`aria-label`,`Filter components by selector, class or file`,`autocomplete`,`off`,`spellcheck`,`false`,3,`input`,`keydown.escape`,`value`],[`aria-live`,`polite`,1,`count`],[`type`,`button`,1,`refresh`,3,`click`],[`d`,`M20 12a8 8 0 1 1-2.34-5.66`],[`d`,`M20 4v5h-5`],[`role`,`status`,1,`state`],[`role`,`alert`,1,`state`],[1,`state`],[`role`,`list`,1,`source-list`],[1,`source-item`,3,`expanded`],[1,`source-item`],[`type`,`button`,1,`source-toggle`,3,`click`],[1,`kind-flag`],[1,`row-main`],[1,`selector`,`mono`],[1,`file`,`mono`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`,1,`chevron`],[1,`inline-detail`,3,`id`]],template:function(e,t){e&1&&N(0,fM,40,17)(1,AM,20,7),e&2&&P(+!t.live())},dependencies:[qD,yA,OA,zA,HA,$A,hb],styles:[`[_nghost-%COMP%] { +}`]})},rj=[`filterInput`],ij=()=>[],aj=e=>({kind:`component`,id:e}),oj=(e,t)=>t.node.id,sj=(e,t)=>t.outlet+t.route,cj=(e,t)=>t.formId,lj=(e,t)=>t.name+e,uj=(e,t)=>t.name,dj=(e,t)=>t.token+e,fj=(e,t)=>t.id;function pj(e,t){return this.sourceKey(t)}function mj(e,t){if(e&1){let e=U();R(0,`span`,29),J(1,`Page`),z(),R(2,`app-select`,30),W(`valueChange`,function(t){return D(e),O(G(2).selectPage(t))}),z()}if(e&2){let e=G(2);j(2),L(`options`,e.pageOptions())(`value`,e.page()?.pageId??null)}}function hj(e,t){if(e&1){let e=U();R(0,`button`,31),W(`click`,function(){D(e);let t=G(2);return O(t.picking()?t.cancelPick():t.pick())}),k(),R(1,`svg`,10),B(2,`path`,32),z(),J(3),z()}if(e&2){let e=G(2);q(`on`,e.picking()),j(3),X(` `,e.picking()?`Cancel pick`:`Pick component on page`,` `)}}function gj(e,t){if(e&1&&(R(0,`p`,17),J(1),z()),e&2){let e=G(2);j(),Y(e.pickMessage())}}function _j(e,t){if(e&1&&(R(0,`p`,18),J(1),z()),e&2){let e=G(2);j(),Y(e.truncationText())}}function vj(e,t){e&1&&(R(0,`p`,34),J(1,`The filter only searches the components the tree lists.`),z())}function yj(e,t){if(e&1){let e=U();R(0,`div`,21)(1,`p`,33),J(2),z(),N(3,vj,2,0,`p`,34),R(4,`button`,35),W(`click`,function(){return D(e),O(G(2).clearFilter())}),J(5,`Clear filter`),z()()}if(e&2){let e=G(2);j(2),X(`No components match “`,e.filter().trim(),`”`),j(),P(e.page().truncated?3:-1)}}function bj(e,t){if(e&1){let e=U();R(0,`span`,44),W(`click`,function(t){D(e);let n=G().$implicit;return O(G(2).toggle(n.node.id,t))}),k(),R(1,`svg`,45),B(2,`path`,46),z()()}if(e&2){let e=G().$implicit;q(`open`,e.expanded)}}function xj(e,t){e&1&&B(0,`span`,38)}function Sj(e,t){if(e&1&&(R(0,`span`,41),J(1),z()),e&2){let e=t.$implicit;j(),Y(e.route||`/`)}}function Cj(e,t){if(e&1&&(R(0,`span`,42),J(1),R(2,`span`,20),J(3),z()()),e&2){let e=t;j(),X(` `,e),j(2),X(` `,e===1?`check`:`checks`,` while recording`)}}function wj(e,t){if(e&1&&(R(0,`span`,43),J(1),R(2,`span`,20),J(3),z()()),e&2){let e=G().$implicit;M(`title`,e.node.directives.join(`, `)),j(),X(` +`,e.node.directives.length,` `),j(2),X(` `,e.node.directives.length===1?`directive`:`directives`,` `)}}function Tj(e,t){if(e&1){let e=U();R(0,`div`,36),W(`click`,function(){let t=D(e).$implicit;return O(G(2).select(t.node.id))})(`focus`,function(){let t=D(e).$implicit,n=G(2);return n.focusId.set(t.node.id),O(n.highlight(t.node.id))})(`blur`,function(){return D(e),O(G(2).highlight(null))})(`mouseenter`,function(){let t=D(e).$implicit;return O(G(2).highlight(t.node.id))})(`mouseleave`,function(){return D(e),O(G(2).highlight(null))}),N(1,bj,3,2,`span`,37)(2,xj,1,0,`span`,38),R(3,`span`,39),J(4),z(),R(5,`span`,40),J(6),z(),F(7,Sj,2,1,`span`,41,sj),N(9,Cj,4,2,`span`,42),N(10,wj,4,3,`span`,43),z()}if(e&2){let e,n=t.$implicit,r=G(2);K(`--%NS%depth`,n.depth),q(`selected`,r.selectedId()===n.node.id),M(`aria-level`,n.depth+1)(`aria-expanded`,n.hasChildren?n.expanded:null)(`aria-selected`,r.selectedId()===n.node.id)(`tabindex`,r.rovingId()===n.node.id?0:-1)(`data-id`,n.node.id),j(),P(n.hasChildren?1:2),j(3),Y(n.node.name),j(2),X(`<`,n.node.tag,`>`),j(),I(r.routedById().get(n.node.id)??mv(14,ij)),j(2),P((e=r.cdHosts()[n.node.id])?9:-1,e),j(),P(n.node.directives?.length?10:-1)}}function Ej(e,t){if(e&1&&(R(0,`p`,51),B(1,`app-source-link`,54),z()),e&2){let e=t;j(),L(`file`,e.file)(`line`,e.line)}}function Dj(e,t){if(e&1){let e=U();R(0,`div`,55)(1,`button`,35),W(`click`,function(){D(e);let t=G();return O(G(2).revealInElements(t))}),J(2,`Reveal in Elements`),z(),R(3,`button`,35),W(`click`,function(){D(e);let t=G();return O(G(2).openSource(t))}),J(4,`Open source`),z()(),R(5,`p`,56),J(6),z()}if(e&2){let e=G(3);j(6),Y(e.actionMessage())}}function Oj(e,t){if(e&1){let e=U();R(0,`button`,59),W(`click`,function(){let t=D(e).$implicit;return O(G(5).showForm.emit(t.formId))}),J(1),z()}if(e&2){let e=t.$implicit;j(),X(` Show `,e.label,` in Forms `)}}function kj(e,t){if(e&1&&(R(0,`div`,57),F(1,Oj,2,1,`button`,58,cj),z()),e&2){let e=G(),t=G(3);j(),I(t.formsIn(e.file))}}function Aj(e,t){e&1&&N(0,kj,3,0,`div`,57),e&2&&P(G(3).formsIn(t.file).length?0:-1)}function jj(e,t){if(e&1&&B(0,`app-store-global`,52),e&2){let e=G(),t=G(2);L(`rpc`,t.rpc())(`pageId`,t.page()?.pageId)(`target`,hv(4,aj,e.id))(`label`,e.name)}}function Mj(e,t){if(e&1&&(R(0,`dt`),J(1,`Routed`),z(),R(2,`dd`,61),J(3),z()),e&2){let e=t.$implicit;j(3),Z(``,e.route||`/`,` in outlet `,e.outlet)}}function Nj(e,t){if(e&1&&(R(0,`span`,70),J(1),z()),e&2){let e=G().$implicit;j(),X(`(`,e.prop,`)`)}}function Pj(e,t){if(e&1&&(R(0,`li`,68)(1,`span`,69),J(2),N(3,Nj,2,1,`span`,70),z(),B(4,`app-prop-value`,71),z()),e&2){let e=t.$implicit,n=G(2),r=G(3);j(2),X(` `,e.name,` `),j(),P(e.prop===e.name?-1:3),j(),L(`prop`,e)(`componentId`,n.id)(`pageId`,r.page()?.pageId??null)(`rpc`,r.rpc())(`writes`,r.canEdit())}}function Fj(e,t){if(e&1&&(R(0,`ul`,64),F(1,Pj,5,7,`li`,68,uj),z()),e&2){let e=G();j(),I(e.inputs)}}function Ij(e,t){e&1&&(R(0,`p`,65),J(1,`No inputs.`),z())}function Lj(e,t){if(e&1&&(R(0,`li`,73)(1,`span`,61),J(2),z(),R(3,`span`,74),J(4),z()()),e&2){let e=t.$implicit;q(`on`,e.listened),j(2),Y(e.name),j(2),Y(e.listened?`listened`:`no listener`)}}function Rj(e,t){if(e&1&&(R(0,`ul`,66),F(1,Lj,5,4,`li`,72,uj),z()),e&2){let e=G();j(),I(e.outputs)}}function zj(e,t){e&1&&(R(0,`p`,65),J(1,`No outputs.`),z())}function Bj(e,t){if(e&1&&(R(0,`span`,75),J(1),z()),e&2){let e=G().$implicit;j(),Y(e.kind)}}function Vj(e,t){if(e&1&&(R(0,`li`,68)(1,`span`,69),J(2),N(3,Bj,2,1,`span`,75),z(),B(4,`app-prop-value`,71),z()),e&2){let e=t.$implicit,n=G(2),r=G(3);j(2),X(` `,e.name,` `),j(),P(e.kind?3:-1),j(),L(`prop`,e)(`componentId`,n.id)(`pageId`,r.page()?.pageId??null)(`rpc`,r.rpc())(`writes`,r.canEdit())}}function Hj(e,t){if(e&1&&(R(0,`ul`,64),F(1,Vj,5,7,`li`,68,uj),z()),e&2){let e=G();j(),I(e.properties)}}function Uj(e,t){e&1&&(R(0,`p`,65),J(1,`No other properties.`),z())}function Wj(e,t){if(e&1&&(R(0,`li`,76),J(1),z()),e&2){let e=t.$implicit;j(),Y(e)}}function Gj(e,t){if(e&1&&(R(0,`div`,62)(1,`h3`),J(2,` DOM listeners `),R(3,`span`,63),J(4),z()(),R(5,`ul`,66),F(6,Wj,2,1,`li`,76,kg),z()()),e&2){let e=G();j(4),Y(e.listeners.length),j(2),I(e.listeners)}}function Kj(e,t){if(e&1&&(R(0,`li`,68)(1,`span`,69),J(2),z(),R(3,`pre`),J(4),xv(5,`json`),z()()),e&2){let e=t.$implicit;j(2),Y(e.name),j(2),Y(Cv(5,2,e.value))}}function qj(e,t){if(e&1&&(R(0,`ul`,64),F(1,Kj,6,4,`li`,68,uj),z()),e&2){let e=G().$implicit;j(),I(e.inputs)}}function Jj(e,t){if(e&1&&(R(0,`li`,73)(1,`span`,61),J(2),z(),R(3,`span`,74),J(4),z()()),e&2){let e=t.$implicit;q(`on`,e.listened),j(2),Y(e.name),j(2),Y(e.listened?`listened`:`no listener`)}}function Yj(e,t){if(e&1&&(R(0,`ul`,66),F(1,Jj,5,4,`li`,72,uj),z()),e&2){let e=G().$implicit;j(),I(e.outputs)}}function Xj(e,t){e&1&&(R(0,`p`,65),J(1,`No inputs or outputs.`),z())}function Zj(e,t){if(e&1&&(R(0,`div`,62)(1,`h3`)(2,`span`,61),J(3),z(),R(4,`span`,75),J(5,`directive on host`),z()(),N(6,qj,3,0,`ul`,64),N(7,Yj,3,0,`ul`,66),N(8,Xj,2,0,`p`,65),z()),e&2){let e=t.$implicit;j(3),Y(e.name),j(3),P(e.inputs.length?6:-1),j(),P(e.outputs.length?7:-1),j(),P(!e.inputs.length&&!e.outputs.length?8:-1)}}function Qj(e,t){if(e&1&&(R(0,`span`,75),J(1),z()),e&2){let e=t.$implicit;j(),Y(e)}}function $j(e,t){if(e&1&&(R(0,`span`,79),J(1,`from `),R(2,`span`,61),J(3),z()()),e&2){let e=G().$implicit;j(3),Y(e.providedByName??`an injector`)}}function eM(e,t){e&1&&(R(0,`span`,80),J(1,`not provided`),z())}function tM(e,t){if(e&1&&(R(0,`li`,77)(1,`span`,78),J(2),z(),F(3,Qj,2,1,`span`,75,kg),N(5,$j,4,1,`span`,79)(6,eM,2,0,`span`,80),z()),e&2){let e=t.$implicit;j(2),Y(e.token),j(),I(e.flags),j(2),P(e.providedBy?5:6)}}function nM(e,t){if(e&1&&(R(0,`ul`,67),F(1,tM,7,2,`li`,77,dj),z()),e&2){let e=G();j(),I(e.dependencies)}}function rM(e,t){e&1&&(R(0,`p`,65),J(1,`Nothing is injected through the constructor or inject().`),z())}function iM(e,t){if(e&1&&(R(0,`dl`,60)(1,`dt`),J(2,`Change detection`),z(),R(3,`dd`),J(4),z(),R(5,`dt`),J(6,`Encapsulation`),z(),R(7,`dd`),J(8),z(),R(9,`dt`),J(10,`Host path`),z(),R(11,`dd`,61),J(12),z(),F(13,Mj,4,2,null,null,sj),z(),R(15,`div`,62)(16,`h3`),J(17,` Inputs `),R(18,`span`,63),J(19),z()(),N(20,Fj,3,0,`ul`,64)(21,Ij,2,0,`p`,65),z(),R(22,`div`,62)(23,`h3`),J(24,` Outputs `),R(25,`span`,63),J(26),z()(),N(27,Rj,3,0,`ul`,66)(28,zj,2,0,`p`,65),z(),R(29,`div`,62)(30,`h3`),J(31,` Properties `),R(32,`span`,63),J(33),z()(),N(34,Hj,3,0,`ul`,64)(35,Uj,2,0,`p`,65),z(),N(36,Gj,8,1,`div`,62),F(37,Zj,9,4,`div`,62,lj),R(39,`div`,62)(40,`h3`),J(41,` Injected `),R(42,`span`,63),J(43),z()(),N(44,nM,3,0,`ul`,67)(45,rM,2,0,`p`,65),z()),e&2){let e=t,n=G(),r=G(2);j(4),Y(e.changeDetection??`Unknown`),j(4),Y(e.encapsulation??`Unknown`),j(4),Y(e.path),j(),I(r.routedById().get(n.id)??mv(12,ij)),j(6),Y(e.inputs.length),j(),P(e.inputs.length?20:21),j(6),Y(e.outputs.length),j(),P(e.outputs.length?27:28),j(6),Y(e.properties?.length??0),j(),P(e.properties?.length?34:35),j(2),P(e.listeners.length?36:-1),j(),I(e.directives),j(6),Y(e.dependencies.length),j(),P(e.dependencies.length?44:45)}}function aM(e,t){e&1&&(R(0,`div`,53),B(1,`span`,81),R(2,`p`,34),J(3,`Reading live values from the page…`),z()())}function oM(e,t){if(e&1&&(R(0,`section`,24)(1,`header`,47)(2,`span`,48),J(3,`component`),z(),R(4,`h2`,49),J(5),z(),R(6,`span`,50),J(7),z(),N(8,Ej,2,2,`p`,51),N(9,Dj,7,1),N(10,Aj,1,1),N(11,jj,1,6,`app-store-global`,52),z(),N(12,iM,46,13)(13,aM,4,0,`div`,53),z()),e&2){let e,n,r,i=t,a=G(2);j(5),Y(i.name),j(2),X(`<`,i.tag,`>`),j(),P((e=a.whereOf(i))?8:-1,e),j(),P(a.devtoolsActions()?9:-1),j(),P((n=a.sourceFor(i))?10:-1,n),j(),P(!a.staticReport()&&!a.native()?11:-1),j(),P((r=a.detail())?12:13,r)}}function sM(e,t){e&1&&(R(0,`p`,33),J(1,`The selected component was destroyed`),z(),R(2,`p`,34)(3,`span`,61),J(4),z(),J(5,` is no longer on the page. Select another component to see its live values. `),z()),e&2&&(j(4),Y(t))}function cM(e,t){e&1&&(R(0,`p`,34),J(1,` Select a component to see its live inputs, properties, outputs, change detection and injected services. `),z())}function lM(e,t){if(e&1&&(R(0,`div`,25),N(1,sM,6,1)(2,cM,2,0,`p`,34),z()),e&2){let e,t=G(2);j(),P((e=t.destroyed())?1:2,e)}}function uM(e,t){e&1&&(R(0,`span`,75),J(1,`hydrate never`),z())}function dM(e,t){if(e&1&&(R(0,`span`,75),J(1),z()),e&2){let e=G().$implicit;j(),Y(e.hydration)}}function fM(e,t){if(e&1){let e=U();R(0,`li`)(1,`button`,84),W(`click`,function(){let t=D(e).$implicit;return O(G(3).showOwner(t))})(`focus`,function(){let t=D(e).$implicit;return O(G(3).highlightBlock(t))})(`blur`,function(){return D(e),O(G(3).highlight(null))})(`mouseenter`,function(){let t=D(e).$implicit;return O(G(3).highlightBlock(t))})(`mouseleave`,function(){return D(e),O(G(3).highlight(null))}),R(2,`span`,39),J(3),z(),R(4,`span`,85),J(5),z(),N(6,uM,2,0,`span`,75)(7,dM,2,1,`span`,75),R(8,`span`,86),J(9),z()()()}if(e&2){let e=t.$implicit;j(),M(`aria-disabled`,e.owner?null:`true`),j(2),Y(e.owner?.name??`Unknown component`),j(),M_(`defer-state-`+e.state),j(),Y(e.state),j(),P(e.hydrateNever?6:e.hydration===`not-configured`?-1:7),j(3),Y(e.triggers.join(`, `)||`no triggers`)}}function pM(e,t){if(e&1&&(R(0,`section`,26)(1,`h2`,82),J(2,` Defer blocks `),R(3,`span`,63),J(4),z()(),R(5,`ul`,83),F(6,fM,10,7,`li`,null,fj),z()()),e&2){let e=G(2);j(4),Y(e.deferCount()),j(2),I(e.deferBlocks())}}function mM(e,t){if(e&1){let e=U();R(0,`app-cd-recording`,87),W(`showComponent`,function(t){return D(e),O(G(2).showCdComponent(t))}),z()}if(e&2){let e=G(2);L(`page`,e.cdPage())(`pageId`,e.page().pageId)(`rpc`,e.rpc())}}function hM(e,t){if(e&1){let e=U();R(0,`p`,1),J(1,` Every component instance on the page, in the order Angular rendered them. Hover a row to highlight its host in the page, and select it to read its live inputs, properties, outputs and injected services. `),z(),R(2,`div`,2)(3,`div`,3),k(),R(4,`svg`,4),B(5,`circle`,5)(6,`path`,6),z(),hs(),R(7,`input`,7,0),W(`input`,function(t){return D(e),O(G().setFilter(t.target.value))})(`keydown.escape`,function(){return D(e),O(G().setFilter(``))}),z()(),N(9,mj,3,2),R(10,`span`,8),J(11),z(),R(12,`button`,9),W(`click`,function(){return D(e),O(G().expandAll())}),k(),R(13,`svg`,10),B(14,`path`,11)(15,`path`,12),z(),J(16,` Expand all `),z(),hs(),R(17,`button`,9),W(`click`,function(){return D(e),O(G().collapseAll())}),k(),R(18,`svg`,10),B(19,`path`,13)(20,`path`,14),z(),J(21,` Collapse all `),z(),N(22,hj,4,3,`button`,15),z(),hs(),R(23,`p`,16),J(24),z(),N(25,gj,2,1,`p`,17),N(26,_j,2,1,`p`,18),R(27,`div`,19)(28,`div`)(29,`h2`,20),J(30,`Component tree`),z(),N(31,yj,6,2,`div`,21),R(32,`div`,22),W(`keydown`,function(t){return D(e),O(G().onTreeKey(t))}),F(33,Tj,11,15,`div`,23,oj),z()(),N(35,oM,14,7,`section`,24)(36,lM,3,1,`div`,25),z(),N(37,pM,8,1,`section`,26),R(38,`app-for-blocks`,27),W(`showOwner`,function(t){return D(e),O(G().showForOwner(t))})(`highlight`,function(t){return D(e),O(G().highlight(t))}),z(),N(39,mM,1,3,`app-cd-recording`,28)}if(e&2){let e,t=G();j(7),L(`value`,t.filter()),j(2),P(t.pageOptions().length>1?9:-1),j(2),Y(t.countLabel()),j(),L(`disabled`,!!t.filter().trim()),j(5),L(`disabled`,!!t.filter().trim()),j(5),P(t.native()?-1:22),j(2),Y(t.announcement()),j(),P(t.pickMessage()?25:-1),j(),P(t.page().truncated?26:-1),j(5),P(t.rows().length?-1:31),j(),L(`hidden`,!t.rows().length),j(),I(t.rows()),j(2),P((e=t.selectedNode())?35:36,e),j(2),P(t.deferBlocks().length?37:-1),j(),L(`blocks`,t.page()?.forBlocks)(`truncated`,t.page()?.forBlocksTruncated===!0)(`supported`,t.page()?.deferBlocks&&!t.page()?.forBlocks?!1:null),j(),P(!t.staticReport()&&!t.native()?39:-1)}}function gM(e,t){e&1&&(R(0,`p`,18),J(1,` The page reported no component instances. The live tree needs a development build with Angular's debug API. Showing what the source declares instead. `),z())}function _M(e,t){e&1&&(R(0,`p`,88),J(1,` No page is connected, so this lists what the source declares. Open the app in a browser with the devtools connected to see each rendered instance. `),z())}function vM(e,t){if(e&1&&J(0),e&2){let e=G(3);Z(` `,e.filteredSource().length,` of `,e.source().length,` `)}}function yM(e,t){if(e&1&&J(0),e&2){let e=G(3);iv(` `,e.sourceCounts().components,` `,e.sourceCounts().components===1?`component`:`components`,` · `,e.sourceCounts().directives,` `,e.sourceCounts().directives===1?`directive`:`directives`,` `)}}function bM(e,t){if(e&1&&(R(0,`span`,90),N(1,vM,1,2)(2,yM,1,4),z()),e&2){let e=G(2);j(),P(e.filter().trim()?1:2)}}function xM(e,t){e&1&&(R(0,`div`,94),B(1,`span`,81),R(2,`p`,33),J(3,`Scanning components…`),z()())}function SM(e,t){e&1&&(J(0,` Run `),R(1,`code`),J(2,`pangular build`),z(),J(3,` again to rebuild the report. `))}function CM(e,t){e&1&&J(0,` Check that the dev server is running, then try again. `)}function wM(e,t){if(e&1){let e=U();R(0,`div`,95)(1,`p`,33),J(2,`Could not load components`),z(),R(3,`p`,34),N(4,SM,4,0)(5,CM,1,0),z(),R(6,`button`,35),W(`click`,function(){return D(e),O(G(2).refresh())}),J(7,`Retry`),z()()}if(e&2){let e=G(2);j(4),P(e.staticReport()?4:5)}}function TM(e,t){e&1&&(R(0,`div`,96)(1,`p`,33),J(2,`No components found`),z(),R(3,`p`,34),J(4,`No @Component or @Directive was found in the source.`),z()())}function EM(e,t){if(e&1){let e=U();R(0,`div`,96)(1,`p`,33),J(2),z(),R(3,`button`,35),W(`click`,function(){return D(e),O(G(2).clearFilter())}),J(4,`Clear filter`),z()()}if(e&2){let e=G(2);j(2),X(`No components match “`,e.filter().trim(),`”`)}}function DM(e,t){if(e&1&&J(0),e&2){let e=G().$implicit;X(` `,G(3).bareName(e.className),` · `)}}function OM(e,t){if(e&1&&(R(0,`dt`),J(1,`Change detection`),z(),R(2,`dd`),J(3),z()),e&2){let e=G(2).$implicit;j(3),Y(e.changeDetection??`Unknown`)}}function kM(e,t){if(e&1){let e=U();R(0,`button`,59),W(`click`,function(){let t=D(e).$implicit;return O(G(5).showForm.emit(t.formId))}),J(1),z()}if(e&2){let e=t.$implicit;j(),X(` Show `,e.label,` in Forms `)}}function AM(e,t){if(e&1&&(R(0,`div`,106)(1,`dl`,60)(2,`dt`),J(3,`Class`),z(),R(4,`dd`,61),J(5),z(),R(6,`dt`),J(7,`File`),z(),R(8,`dd`,61),B(9,`app-source-link`,54),z(),R(10,`dt`),J(11,`Standalone`),z(),R(12,`dd`),J(13),z(),N(14,OM,4,1),R(15,`dt`),J(16,`Inputs`),z(),R(17,`dd`,61),J(18),z(),R(19,`dt`),J(20,`Outputs`),z(),R(21,`dd`,61),J(22),z()(),F(23,kM,2,1,`button`,58,cj),z()),e&2){let e=G(),t=e.$implicit,n=e.$index,r=G(3);L(`id`,`ct-source-`+n),j(5),Y(r.bareName(t.className)),j(4),L(`file`,t.file)(`line`,t.line),j(4),Y(t.isStandalone?`Yes`:`No`),j(),P(t.kind===`component`?14:-1),j(4),Y(t.inputs.join(`, `)||`None`),j(4),Y(t.outputs.join(`, `)||`None`),j(),I(r.formsIn(t.file))}}function jM(e,t){if(e&1){let e=U();R(0,`li`,99)(1,`button`,100),W(`click`,function(){let t=D(e).$implicit,n=G(3);return O(n.openKey.set(n.openKey()===n.sourceKey(t)?null:n.sourceKey(t)))}),R(2,`span`,101),J(3),z(),R(4,`span`,102)(5,`span`,103),J(6),z(),R(7,`span`,104),N(8,DM,1,1),J(9),z()(),k(),R(10,`svg`,105),B(11,`path`,46),z()(),N(12,AM,25,8,`div`,106),z()}if(e&2){let e=t.$implicit,n=t.$index,r=G(3);q(`expanded`,r.openKey()===r.sourceKey(e)),j(),M(`aria-expanded`,r.openKey()===r.sourceKey(e))(`aria-controls`,r.openKey()===r.sourceKey(e)?`ct-source-`+n:null),j(),q(`directive`,e.kind===`directive`),j(),Y(e.kind),j(3),Y(r.sourceLabel(e)),j(2),P(e.selector?8:-1),j(),Z(` `,e.file,`:`,e.line,` `),j(3),P(r.openKey()===r.sourceKey(e)?12:-1)}}function MM(e,t){if(e&1&&(R(0,`ul`,97),F(1,jM,13,12,`li`,98,pj,!0),z()),e&2){let e=G(2);j(),I(e.filteredSource())}}function NM(e,t){if(e&1){let e=U();N(0,gM,2,0,`p`,18)(1,_M,2,0,`p`,88),R(2,`div`,2)(3,`div`,3),k(),R(4,`svg`,4),B(5,`circle`,5)(6,`path`,6),z(),hs(),R(7,`input`,89,0),W(`input`,function(t){return D(e),O(G().filter.set(t.target.value))})(`keydown.escape`,function(){return D(e),O(G().filter.set(``))}),z()(),N(9,bM,3,1,`span`,90),R(10,`button`,91),W(`click`,function(){return D(e),O(G().refresh())}),k(),R(11,`svg`,10),B(12,`path`,92)(13,`path`,93),z(),J(14,` Refresh `),z()(),N(15,xM,4,0,`div`,94)(16,wM,8,1,`div`,95)(17,TM,5,0,`div`,96)(18,EM,5,1,`div`,96)(19,MM,3,0,`ul`,97)}if(e&2){let e=G();P(+!e.page()),j(7),L(`value`,e.filter()),j(2),P(e.source().length?9:-1),j(),q(`spinning`,e.loading()),M(`aria-busy`,e.loading()),j(5),P(e.loading()&&!e.source().length?15:e.error()&&!e.source().length?16:e.source().length?e.filteredSource().length?19:18:17)}}function PM(e){return e.replace(/^_(?=[A-Z])/,``)}var FM=class e{rpc=$(null);staticReport=Q(()=>vE(this.rpc()));focus=$(null);showForm=Rv();focusHandled=Rv();filter=A(``);loading=A(!1);error=A(!1);source=A([]);formOwners=A([]);pages=A({});chosenPageId=A(null);selectedId=A(null);destroyed=A(null);announcement=A(``);picking=A(!1);pickMessage=A(``);pickPageId=null;pickSeq=0;focusId=A(null);bridge=T(PD);actionMessage=Fv({source:this.selectedId,computation:()=>``});collapsed=A(new Set);openKey=A(null);routerPages=A([]);pageId=fE();destroyRef=T(Ts);injector=T(Cs);host=T(Pl);filterInput=Jv(`filterInput`);cleanups=[];selection={pageId:null,detailId:null};shownPageId=Fv({source:()=>({pages:this.pages(),chosen:this.chosenPageId()}),computation:({pages:e,chosen:t},n)=>pE(e,{chosen:t,host:this.pageId,previous:n?.value??null})});page=Q(()=>{let e=this.shownPageId();return e?this.pages()[e]??null:null});pageOptions=Q(()=>Object.values(this.pages()).map(e=>({value:e.pageId,label:e.title||e.url||`Page ${e.pageId}`,hint:e.url})));live=Q(()=>(this.page()?.roots.length??0)>0);native=Q(()=>ID(this.page()));canEdit=Q(()=>this.live()&&!this.native()&&!this.staticReport()&&ME(this.rpc(),`components`));devtoolsActions=Q(()=>this.bridge.available&&!!this.page()&&!this.native()&&!this.staticReport());cdPages=A({});cdPage=Q(()=>{let e=this.page()?.pageId;return e?this.cdPages()[e]??null:null});cdHosts=Q(()=>this.cdPage()?.hosts??{});index=Q(()=>{let e=new Map,t=new Map,n=(r,i)=>{for(let a of r)e.set(a.id,a),i&&t.set(a.id,i),n(a.children,a.id)};return n(this.page()?.roots??[],null),{map:e,parents:t}});query=Q(()=>this.filter().trim().toLowerCase());filtered=Q(()=>JD(this.page()?.roots??[],this.query()));deferBlocks=Q(()=>this.page()?.deferBlocks??[]);deferCount=Q(()=>`${this.deferBlocks().length}${this.page()?.deferTruncated?`+`:``}`);countLabel=Q(()=>YD(this.page()?.count??0,this.filtered().matches,!!this.query(),!!this.page()?.truncated));truncationText=Q(()=>ZD(this.page()?.truncatedBy));rows=Q(()=>{let e=[],t=this.collapsed(),n=!!this.query(),r=(i,a)=>{for(let o of i){let i=n||!t.has(o.id);e.push({node:o,depth:a,hasChildren:o.children.length>0,expanded:i}),i&&r(o.children,a+1)}};return r(this.filtered().nodes,0),e});selectedNode=Q(()=>{let e=this.selectedId();return e?this.index().map.get(e)??null:null});detail=Q(()=>{let e=this.page()?.detail;return e&&e.id===this.selectedId()?e:null});rovingId=Q(()=>{let e=this.rows(),t=new Set(e.map(e=>e.node.id)),n=this.focusId();if(n&&t.has(n))return n;let r=this.selectedId();return r&&t.has(r)?r:e[0]?.node.id??null});outlets=Q(()=>{let e=this.page()?.pageId;return this.routerPages().find(t=>t.pageId===e)?.outlets??[]});routedById=Q(()=>{let e=new Map,t=n=>{for(let r of n){if(r.activated&&r.devtoolsId){let t=e.get(r.devtoolsId)??[];t.push({route:r.route??``,outlet:r.outlet}),e.set(r.devtoolsId,t)}r.children&&t(r.children)}};return t(this.outlets()),e});sourceByClass=Q(()=>{let e=new Map;for(let t of this.source()){let n=PM(t.className);e.set(n,[...e.get(n)??[],t])}return e});filteredSource=Q(()=>{let e=this.query(),t=this.source();return e?t.filter(t=>t.selector.toLowerCase().includes(e)||t.className.toLowerCase().includes(e)||t.file.toLowerCase().includes(e)):t});sourceCounts=Q(()=>{let e=this.source().filter(e=>e.kind===`component`).length;return{components:e,directives:this.source().length-e}});constructor(){fc(()=>{let e=this.page()?.pageId??null;Nv(()=>{this.picking()&&e!==this.pickPageId&&this.dropPick()})}),fc(()=>{let e=this.rpc();e&&(this.refresh(),this.watch(e))}),fc(()=>{let e=this.focus();if(!e)return;let t=this.page()?.pageId??null;if(e.pageId&&t!==e.pageId&&this.pages()[e.pageId]){Nv(()=>this.selectPage(e.pageId));return}this.live()&&Nv(()=>{(!e.pageId||t===e.pageId)&&this.index().map.has(e.id)?this.reveal(e.id):this.announcement.set(`That component is no longer on the page.`),this.focusHandled.emit()})}),this.destroyRef.onDestroy(()=>{this.highlight(null);for(let e of this.cleanups.splice(0))e()})}async watch(e){for(let e of this.cleanups.splice(0))e();let t=e.scope(`pangular`);try{let e=await t.rpc.sharedState(`component-tree`);if(this.destroyRef.destroyed)return;let n=e=>{let t=e?.pages;this.applyPages(t&&typeof t==`object`?t:{})};n(e.value()),this.cleanups.push(e.on(`updated`,n))}catch{this.applyPages({})}try{let e=await t.rpc.sharedState(`change-detection`);if(this.destroyRef.destroyed)return;let n=e=>{let t=e?.pages;this.cdPages.set(t&&typeof t==`object`?t:{})};n(e.value()),this.cleanups.push(e.on(`updated`,n))}catch{this.cdPages.set({})}try{let e=await t.rpc.sharedState(`router`);if(this.destroyRef.destroyed)return;let n=e=>{let t=e?.pages;this.routerPages.set(Array.isArray(t)?t:[])};n(e.value()),this.cleanups.push(e.on(`updated`,n))}catch{this.routerPages.set([])}}async refresh(){let e=this.rpc();if(!e)return;this.loading.set(!0);let t=e.scope(`pangular`);try{this.source.set(await t.rpc.call(`get-components`)),this.error.set(!1)}catch{this.error.set(!0)}finally{this.loading.set(!1)}let n=await t.rpc.call(`forms-owners`).catch(()=>[]);this.formOwners.set(n??[])}formsIn(e){return this.formOwners().filter(t=>t.file===e)}whereOf(e){return this.detail()?.source??this.sourceFor(e)}async revealInElements(e){let t=this.page()?.pageId;if(!t)return;this.actionMessage.set(``);let n=await this.bridge.reveal(t,e.id);this.selectedId()===e.id&&this.actionMessage.set(n.ok?``:`Could not reveal it. The component must be rendered in the tab these DevTools inspect.`)}async openSource(e){let t=this.page()?.pageId;if(!t)return;let n=this.whereOf(e);this.actionMessage.set(``);let r=await this.bridge.openSource(t,e.id,n);this.selectedId()===e.id&&(r.ok||this.actionMessage.set(n?`Not found in Sources. Open ${n.file}:${n.line} in your editor.`:`Could not open the source. The component must be rendered in the tab these DevTools inspect.`))}sourceFor(e){let t=(this.sourceByClass().get(PM(e.name))??[]).filter(e=>e.kind===`component`);return t.find(t=>t.selector===e.tag)??t[0]??null}sourceKey(e){return`${e.file}#${e.className}`}sourceLabel(e){return e.selector?e.kind===`component`&&/^[a-z][\w-]*$/i.test(e.selector)?`<${e.selector}>`:e.selector:PM(e.className)}bareName(e){return PM(e)}applyPages(e){let t=document.activeElement,n=t instanceof HTMLElement&&this.host.nativeElement.contains(t)?t.closest(`.row`)?.dataset.id??null:null,r=n?this.rows().map(e=>e.node.id):[],i=this.index().map;if(this.pages.set(e),this.syncSelection(i),!n)return;let a=new Set(this.rows().map(e=>e.node.id));if(a.has(n))return;let o=eO(r,a,n);o&&(this.focusId.set(o),Bd(()=>this.rowElement(o)?.focus(),{injector:this.injector}))}syncSelection(e=this.index().map){let t=this.page(),n=QD({...this.selection,selectedId:this.selectedId()},t?{pageId:t.pageId,roots:t.roots,detail:t.detail,truncated:t.truncated}:null),r=n.destroyed?e.get(n.destroyed)?.name:void 0;this.selection={pageId:n.pageId,detailId:n.detailId},n.selectedId!==this.selectedId()&&this.selectedId.set(n.selectedId),n.selectedId&&this.destroyed.set(null),n.destroyed&&(this.destroyed.set(r??`The component`),this.announcement.set(`The selected component was destroyed.`),this.sendSelection(null))}selectPage(e){e&&(this.chosenPageId.set(e),this.destroyed.set(null),this.syncSelection())}setFilter(e){this.filter.set(e);let{matches:t}=this.filtered();this.announcement.set(XD(this.page()?.count??0,t,e,!!this.page()?.truncated))}clearFilter(){this.live()?this.setFilter(``):this.filter.set(``),this.filterInput()?.nativeElement.focus()}async pick(){let e=this.rpc();if(!e||this.picking())return;let t=++this.pickSeq;this.pickPageId=this.page()?.pageId??null,this.picking.set(!0),this.say(`Click a component in the app. Press Escape to cancel.`);let n=await e.scope(`pangular`).rpc.call(`request-component-pick`,{pageId:this.pickPageId??void 0}).catch(()=>({ok:!1,error:`Could not reach the devtools server.`}));if(t===this.pickSeq){if(this.picking.set(!1),!n?.ok||!n.id){this.say(n?.error??`No component was picked.`);return}n.pageId&&n.pageId!==this.page()?.pageId&&this.selectPage(n.pageId),this.say(`Picked ${n.name??`a component`}.`),this.destroyed.set(null),this.index().map.has(n.id)?this.reveal(n.id):this.selectedId.set(n.id)}}cancelPick(){let e=this.rpc();e&&this.picking()&&e.scope(`pangular`).rpc.call(`cancel-component-pick`,{pageId:this.pickPageId??void 0}).catch(()=>{})}dropPick(){this.cancelPick(),this.pickSeq++,this.picking.set(!1),this.say(`Picking stopped because the page changed.`)}say(e){this.pickMessage.set(e),this.announcement.set(e)}sendSelection(e){let t=this.rpc();t&&t.scope(`pangular`).rpc.call(`select-component`,{pageId:this.page()?.pageId,id:e,console:!0}).catch(()=>{})}rowElement(e){return this.host.nativeElement.querySelector(`.row[data-id="${CSS.escape(e)}"]`)}select(e){let t=this.selectedId()===e?null:e;this.selectedId.set(t),this.destroyed.set(null),this.focusId.set(e),this.sendSelection(t)}reveal(e){let{parents:t}=this.index();this.collapsed.update(n=>{let r=new Set(n);for(let n=t.get(e);n;n=t.get(n))r.delete(n);return r}),this.rows().some(t=>t.node.id===e)||this.setFilter(``),this.selectedId()!==e&&this.select(e),Bd(()=>document.querySelector(`.row[data-id="${CSS.escape(e)}"]`)?.scrollIntoView({block:`nearest`}),{injector:this.injector})}toggle(e,t){t?.stopPropagation(),!this.query()&&this.collapsed.update(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})}expandAll(){this.query()||(this.collapsed.set(new Set),this.announce(`Expanded every component.`))}collapseAll(){if(this.query())return;let{map:e,parents:t}=this.index(),n=this.rovingId(),r=new Set;for(let t of e.values())t.children.length&&r.add(t.id);if(this.collapsed.set(r),n){let e=new Set(this.rows().map(e=>e.node.id)),r=n;for(;r&&!e.has(r);)r=t.get(r);r&&this.focusId.set(r)}this.announce(`Collapsed every component. Only the top level is shown.`)}announce(e){this.announcement.update(t=>t===e?`${e}\u00a0`:e)}expandSiblings(e){if(this.query())return;let t=this.index().parents.get(e),n=t?this.index().map.get(t)?.children??[]:this.page()?.roots??[];this.collapsed.update(e=>{let t=new Set(e);for(let e of n)t.delete(e.id);return t})}highlight(e){let t=this.rpc();if(!t)return;let n=e?{pageId:this.page()?.pageId,id:e}:null;t.scope(`pangular`).rpc.call(`request-page-highlight`,n).catch(()=>{})}highlightBlock(e){this.highlight(e.rootIds[0]??e.owner?.id??null)}showOwner(e){e.owner&&this.index().map.has(e.owner.id)&&this.reveal(e.owner.id)}showCdComponent(e){let t=this.cdHosts(),n=null;for(let r of this.index().map.values())r.name===e&&(!n||(t[r.id]??0)>(t[n.id]??0))&&(n=r);if(!n){this.say(`No ${e} is in the tree now.`);return}this.say(`Showing ${e} in the tree.`),this.reveal(n.id)}showForOwner(e){e.owner&&this.index().map.has(e.owner.id)&&this.reveal(e.owner.id)}onTreeKey(e){let t=this.rows();if(!t.length)return;let n=t.findIndex(e=>e.node.id===this.rovingId()),r=Math.max(n,0),i=t[r],a=-1;switch(e.key){case`ArrowDown`:a=Math.min(r+1,t.length-1);break;case`ArrowUp`:a=Math.max(r-1,0);break;case`Home`:a=0;break;case`End`:a=t.length-1;break;case`ArrowRight`:i.hasChildren&&!i.expanded?this.toggle(i.node.id):i.hasChildren&&(a=r+1);break;case`ArrowLeft`:if(i.hasChildren&&i.expanded&&!this.query())this.toggle(i.node.id);else{let e=this.index().parents.get(i.node.id);a=t.findIndex(t=>t.node.id===e)}break;case`Enter`:case` `:this.select(i.node.id);break;case`*`:this.expandSiblings(i.node.id);break;default:return}if(e.preventDefault(),a>=0){let e=t[a].node.id;this.focusId.set(e),queueMicrotask(()=>{let t=document.querySelector(`.row[data-id="${CSS.escape(e)}"]`);t?.focus(),t?.scrollIntoView({block:`nearest`})})}}static ɵfac=function(t){return new(t||e)};static ɵcmp=Gh({type:e,selectors:[[`app-component-tree`]],viewQuery:function(e,t){e&1&&l_(t.filterInput,rj,5),e&2&&u_()},hostBindings:function(e,t){e&1&&W(`keydown.escape`,function(){return t.cancelPick()})},inputs:{rpc:[1,`rpc`],focus:[1,`focus`]},outputs:{showForm:`showForm`,focusHandled:`focusHandled`},decls:2,vars:1,consts:[[`filterInput`,``],[1,`intro`],[1,`toolbar`],[1,`search`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`,1,`search-icon`],[`cx`,`11`,`cy`,`11`,`r`,`7`],[`d`,`m20 20-3.5-3.5`],[`type`,`search`,`placeholder`,`Filter by class, tag or directive…`,`aria-label`,`Filter components by class, tag or directive`,`autocomplete`,`off`,`spellcheck`,`false`,3,`input`,`keydown.escape`,`value`],[1,`count`],[`type`,`button`,1,`tree-action`,3,`click`,`disabled`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`],[`d`,`m7 15 5 5 5-5`],[`d`,`m7 9 5-5 5 5`],[`d`,`m7 20 5-5 5 5`],[`d`,`m7 4 5 5 5-5`],[`type`,`button`,1,`pick`,3,`on`],[`role`,`status`,1,`sr-only`],[1,`pick-message`],[`role`,`status`,1,`notice`],[1,`layout`],[1,`sr-only`],[1,`state`,`compact`,`tree`],[`role`,`tree`,`aria-label`,`Component instances`,1,`tree`,3,`keydown`,`hidden`],[`role`,`treeitem`,1,`row`,3,`selected`,`--%NS%depth`],[`aria-labelledby`,`ct-detail-title`,1,`detail`],[1,`detail`,`placeholder`],[`aria-labelledby`,`ct-defer-title`,1,`defer`],[3,`showOwner`,`highlight`,`blocks`,`truncated`,`supported`],[3,`page`,`pageId`,`rpc`],[`id`,`ct-page-label`,1,`sr-only`],[`labelledBy`,`ct-page-label`,1,`page-select`,3,`valueChange`,`options`,`value`],[`type`,`button`,1,`pick`,3,`click`],[`d`,`M4 4l6.5 16 2.3-6.7L19.5 11z`],[1,`state-title`],[1,`state-hint`],[`type`,`button`,3,`click`],[`role`,`treeitem`,1,`row`,3,`click`,`focus`,`blur`,`mouseenter`,`mouseleave`],[`aria-hidden`,`true`,1,`twisty`,3,`open`],[`aria-hidden`,`true`,1,`twisty-space`],[1,`name`,`mono`],[1,`tag`,`mono`],[1,`routed`],[1,`checks`],[1,`dirs`],[`aria-hidden`,`true`,1,`twisty`,3,`click`],[`viewBox`,`0 0 24 24`],[`d`,`m9 6 6 6-6 6`],[1,`detail-head`],[1,`badge`],[`id`,`ct-detail-title`,1,`mono`],[1,`mono`,`muted`],[1,`where`,`mono`],[1,`console-global`,3,`rpc`,`pageId`,`target`,`label`],[`role`,`status`,1,`state`,`compact`],[3,`file`,`line`],[`role`,`group`,`aria-label`,`Chrome DevTools`,1,`actions`],[`role`,`status`,1,`where`,`action-message`],[1,`actions`],[`type`,`button`,1,`show-form`],[`type`,`button`,1,`show-form`,3,`click`],[1,`facts`],[1,`mono`],[1,`block`],[1,`pill`],[1,`props`],[1,`empty-line`],[1,`chips`],[1,`deps`],[1,`prop`],[1,`prop-name`,`mono`],[1,`muted`],[3,`prop`,`componentId`,`pageId`,`rpc`,`writes`],[1,`chip`,3,`on`],[1,`chip`],[1,`chip-note`],[1,`flag`],[1,`chip`,`mono`],[1,`dep`],[1,`token`,`mono`],[1,`from`],[1,`from`,`missing`],[`aria-hidden`,`true`,1,`spinner`],[`id`,`ct-defer-title`,1,`defer-title`],[1,`defer-list`],[`type`,`button`,1,`defer-row`,3,`click`,`focus`,`blur`,`mouseenter`,`mouseleave`],[1,`defer-state`],[1,`triggers`,`mono`],[3,`showComponent`,`page`,`pageId`,`rpc`],[1,`notice`],[`type`,`search`,`placeholder`,`Filter by selector, class or file…`,`aria-label`,`Filter components by selector, class or file`,`autocomplete`,`off`,`spellcheck`,`false`,3,`input`,`keydown.escape`,`value`],[`aria-live`,`polite`,1,`count`],[`type`,`button`,1,`refresh`,3,`click`],[`d`,`M20 12a8 8 0 1 1-2.34-5.66`],[`d`,`M20 4v5h-5`],[`role`,`status`,1,`state`],[`role`,`alert`,1,`state`],[1,`state`],[`role`,`list`,1,`source-list`],[1,`source-item`,3,`expanded`],[1,`source-item`],[`type`,`button`,1,`source-toggle`,3,`click`],[1,`kind-flag`],[1,`row-main`],[1,`selector`,`mono`],[1,`file`,`mono`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`,1,`chevron`],[1,`inline-detail`,3,`id`]],template:function(e,t){e&1&&N(0,hM,40,17)(1,NM,20,7),e&2&&P(+!t.live())},dependencies:[qD,SA,jA,HA,GA,nj,hb],styles:[`[_nghost-%COMP%] { display: block; color: var(--%NS%text); font-size: 13px; @@ -2606,7 +2630,7 @@ pre[_ngcontent-%COMP%] { .inline-detail[_ngcontent-%COMP%] .show-form[_ngcontent-%COMP%] { margin: 0 16px; -}`]})};function NM(e){return e.line?`${e.file}:${e.line}`:e.file}function PM(e,t){let n=t.filter(t=>t.fullPath===e.fullPath&&t.redirectTo!==void 0==(e.redirectTo!==void 0));return n.find(t=>!!e.component&&t.component===e.component)??n.find(t=>!t.component||!e.component)}var FM=_E;function IM(e){return e.startsWith(`/`)&&!e.startsWith(`//`)&&!/^\/*[a-z][a-z0-9+.-]*:/i.test(e)&&!e.includes(`[redacted]`)&&e.length<=2e3}var LM=`Could not reach the page.`;async function RM(e,t,n){return await FM(e,`request-router-action`,{pageId:t,request:n})??{error:`Could not reach the page.`}}function zM(e){return e===`succeeded`?`good`:e===`redirected`||e===`pending`||e===`skipped`?`warn`:e===`cancelled`||e===`failed`?`bad`:``}var BM=()=>[],VM=(e,t)=>t[0],HM=(e,t)=>t.input;function UM(e,t){if(e&1&&(V(0,`p`,3),J(1,` The browser shows `),V(2,`code`),J(3),H(),J(4,`, not the router URL (skipLocationChange, browserUrl, a failed navigation or code that changed history). `),H()),e&2){let e=G();j(3),Y(e.browserUrl)}}function WM(e,t){if(e&1&&(V(0,`p`,12),J(1),H()),e&2){let e=G(3);j(),Y(e.navigationOff)}}function GM(e,t){if(e&1){let e=U();V(0,`div`,8),Bg(1,`span`,9),V(2,`span`,10),J(3,`Navigating to `),V(4,`code`),J(5),H(),J(6),H(),V(7,`button`,11),r_(`click`,function(){return D(e),O(G(2).abort())}),J(8,` Abort `),H()(),N(9,WM,2,1,`p`,12)}if(e&2){let e=t,n=G(2);j(5),Y(e.url),j(),X(` (#`,e.id,`)`),j(),Kg(`disabled`,!n.navigationAllowed()),M(`aria-describedby`,n.navigationAllowed()?null:`route-current-writes-off`),j(2),P(n.navigationAllowed()?-1:9)}}function KM(e,t){if(e&1&&(V(0,`p`,4),J(1),H()),e&2){let e=G(2);j(),Y(e.message())}}function qM(e,t){if(e&1&&(V(0,`dt`),J(1,`Document title`),H(),V(2,`dd`),J(3),H()),e&2){let e=G();j(3),Y(e.title)}}function JM(e,t){if(e&1&&(V(0,`dt`),J(1,`Query params`),H(),V(2,`dd`)(3,`code`),J(4),xv(5,`json`),H()()),e&2){let e=G();j(4),Y(Cv(5,1,e.queryParams))}}function YM(e,t){if(e&1&&(V(0,`dt`),J(1,`Fragment`),H(),V(2,`dd`)(3,`code`),J(4),H()()),e&2){let e=G();j(4),Y(e.fragment)}}function XM(e,t){if(e&1&&(V(0,`span`,14),J(1),H()),e&2){let e=G().$implicit;j(),X(`, `,e.nesting)}}function ZM(e,t){if(e&1&&(V(0,`span`,15),J(1),H()),e&2){let e=G().$implicit;j(),Y(e.route.outlet)}}function QM(e,t){e&1&&(V(0,`span`,15),J(1,`lazy`),H())}function $M(e,t){if(e&1&&(V(0,`div`,16),J(1),H()),e&2){let e=G().$implicit;j(),Z(` title `,e.route.title,``,e.route.ownTitle===!1?` (inherited)`:``,` `)}}function eN(e,t){if(e&1&&(V(0,`code`,17),J(1),H()),e&2){let e=G().$implicit;j(),Y(e.route.component)}}function tN(e,t){e&1&&(V(0,`span`,20),J(1,`–`),H(),V(2,`span`,14),J(3,`none`),H())}function nN(e,t){e&1&&(V(0,`span`,15),J(1,`inherited`),H())}function rN(e,t){if(e&1&&(V(0,`div`,18)(1,`code`),J(2),xv(3,`json`),H(),N(4,nN,2,0,`span`,15),H()),e&2){let e=t.$implicit,n=G().$implicit;j(2),Z(``,e[0],`: `,Cv(3,3,e[1])),j(2),P(n.route.paramSources?.[e[0]]===`inherited`?4:-1)}}function iN(e,t){e&1&&(V(0,`span`,20),J(1,`–`),H(),V(2,`span`,14),J(3,`none`),H())}function aN(e,t){e&1&&(V(0,`span`,15),J(1),H()),e&2&&(j(),Y(t))}function oN(e,t){if(e&1&&(V(0,`div`,19)(1,`code`),J(2),xv(3,`json`),H(),N(4,aN,2,1,`span`,15),H()),e&2){let e,n=t.$implicit,r=G().$implicit;j(2),Z(``,n[0],`: `,Cv(3,3,n[1])),j(2),P((e=r.route.dataSources?.[n[0]])?4:-1,e)}}function sN(e,t){e&1&&(V(0,`span`,20),J(1,`–`),H(),V(2,`span`,14),J(3,`none`),H())}function cN(e,t){if(e&1&&(V(0,`span`,15),J(1),H()),e&2){let e=t.$implicit;j(),Y(e)}}function lN(e,t){if(e&1&&(V(0,`span`,15),J(1),H()),e&2){let e=t.$implicit;j(),X(`resolve `,e)}}function uN(e,t){e&1&&(V(0,`span`,20),J(1,`–`),H(),V(2,`span`,14),J(3,`none`),H())}function dN(e,t){if(e&1&&(V(0,`tr`)(1,`td`,13),J(2),N(3,XM,2,1,`span`,14),N(4,ZM,2,1,`span`,15),N(5,QM,2,0,`span`,15),N(6,$M,2,2,`div`,16),H(),V(7,`td`),N(8,eN,2,1,`code`,17)(9,tN,4,0),H(),V(10,`td`),F(11,rN,5,5,`div`,18,VM,!1,iN,4,0),H(),V(14,`td`),F(15,oN,5,5,`div`,19,VM,!1,sN,4,0),H(),V(18,`td`),F(19,cN,2,1,`span`,15,kg),F(21,lN,2,1,`span`,15,kg),N(23,uN,4,0),H()()),e&2){let e=t.$implicit,n=G(2);j(),K(`padding-left`,14+e.depth*16,`px`),j(),X(` `,e.label,` `),j(),P(e.nesting?3:-1),j(),P(e.route.outlet===`primary`?-1:4),j(),P(e.route.lazy?5:-1),j(),P(e.route.title?6:-1),j(2),P(e.route.component?8:9),j(3),I(n.entries(e.route.params)),j(4),I(n.entries(e.route.data)),j(4),I(n.guardList(e.route)),j(2),I(e.route.resolvers??mv(11,BM)),j(2),P(!n.guardList(e.route).length&&!e.route.resolvers?.length?23:-1)}}function fN(e,t){if(e&1){let e=U();V(0,`button`,26),r_(`click`,function(){D(e);let t=G(2).$implicit,n=G(3);return O(n.showComponent.emit({pageId:n.page().pageId,id:t.outlet.devtoolsId}))}),J(1,` Show in Components`),V(2,`span`,14),J(3),H()()}if(e&2){let e=G(2).$implicit;j(3),X(`: `,e.outlet.component??e.outlet.element??`routed component`)}}function pN(e,t){if(e&1&&(V(0,`code`),J(1),H(),J(2,` for `),V(3,`code`),J(4),H(),N(5,fN,4,1,`button`,25)),e&2){let e=G().$implicit,t=G(3);j(),Y(e.outlet.component??`?`),j(3),Y(e.outlet.route??`?`),j(),P(e.outlet.devtoolsId&&t.componentsOn()?5:-1)}}function mN(e,t){e&1&&(V(0,`span`,23),J(1,`not activated`),H())}function hN(e,t){e&1&&(V(0,`span`,15),J(1,`detached by reuse strategy`),H())}function gN(e,t){if(e&1&&(V(0,`span`,15),J(1),H()),e&2){let e=t.$implicit;j(),Z(`input `,e.input,` ← `,e.source)}}function _N(e,t){if(e&1&&(V(0,`span`,24),J(1,`routerOutletData `),V(2,`code`),J(3),H()()),e&2){let e=G().$implicit;j(3),Y(e.outlet.data)}}function vN(e,t){if(e&1&&(V(0,`li`)(1,`span`,15),J(2),H(),N(3,pN,6,3)(4,mN,2,0,`span`,23),N(5,hN,2,0,`span`,15),F(6,gN,2,2,`span`,15,HM),N(8,_N,4,1,`span`,24),H()),e&2){let e=t.$implicit,n=G(3);K(`padding-left`,10+e.depth*16,`px`),j(2),Y(e.outlet.outlet),j(),P(e.outlet.activated?3:4),j(2),P(e.outlet.detached?5:-1),j(),I(n.boundInputs(e.outlet)),j(2),P(e.outlet.data===void 0?-1:8)}}function yN(e,t){if(e&1&&(V(0,`h3`),J(1,`Outlets`),H(),V(2,`ul`,21),F(3,vN,9,6,`li`,22,Og),H()),e&2){let e=G(2);j(3),I(e.outletRows())}}function bN(e,t){if(e&1&&(V(0,`p`,1)(1,`span`,2),J(2,`URL`),H(),V(3,`code`),J(4),H()(),N(5,UM,5,1,`p`,3),N(6,GM,10,5),N(7,KM,2,1,`p`,4),V(8,`dl`,5),N(9,qM,4,1),N(10,JM,6,3),N(11,YM,5,1),H(),V(12,`h3`),J(13,`Active routes`),H(),V(14,`div`,6)(15,`table`)(16,`thead`)(17,`tr`)(18,`th`,7),J(19,`Route`),H(),V(20,`th`,7),J(21,`Component`),H(),V(22,`th`,7),J(23,`Params`),H(),V(24,`th`,7),J(25,`Data`),H(),V(26,`th`,7),J(27,`Guards and resolvers`),H()()(),V(28,`tbody`),F(29,dN,24,12,`tr`,null,Og),H()()(),N(31,yN,5,0)),e&2){let e,n=t,r=G();j(4),Y(n.url),j(),P(n.urlDrift&&n.browserUrl?5:-1),j(),P((e=n.pending)?6:-1,e),j(),P(r.message()?7:-1),j(2),P(n.title?9:-1),j(),P(r.hasKeys(n.queryParams)?10:-1),j(),P(n.fragment?11:-1),j(18),I(r.rows()),j(2),P(r.outletRows().length?31:-1)}}function xN(e,t){e&1&&(V(0,`div`,0)(1,`p`,27),J(2,`This page reports no Router.`),H(),V(3,`p`,23),J(4,` Add `),V(5,`code`),J(6,`provideRouter()`),H(),J(7,` to the app config and navigate once to see the active routes here. `),H()())}var SN=class e{page=$.required();rpc=$(null);navigationAllowed=Q(()=>ME(this.rpc(),`router`));navigationOff=iE(`router`);componentsOn=Q(()=>jE(this.rpc()).inspectors.components);showComponent=Rv();pageId=Q(()=>this.page().pageId);message=Fv({source:this.pageId,computation:()=>``});rows=Q(()=>{let e=[],t=(n,r,i)=>{let a=r===0&&!n.path?`(root)`:`/`+n.path,o=i===void 0?void 0:`level ${r+1}, child of ${i}`;e.push({route:n,depth:r,label:a,nesting:o});for(let e of n.children)t(e,r+1,a)},n=this.page().snapshot?.root;return n&&t(n,0),e});outletRows=Q(()=>{let e=[],t=(n,r)=>{for(let i of n)e.push({outlet:i,depth:r}),i.children&&t(i.children,r+1)};return t(this.page().outlets??[],0),e});hasKeys(e){return Object.keys(e).length>0}entries(e){return Object.entries(e)}guardList(e){return Object.entries(e.guards??{}).flatMap(([e,t])=>t.map(t=>`${e} ${t}`))}boundInputs(e){return(e.inputs??[]).filter(e=>e.source!==`unset`)}async abort(){let e=this.pageId(),t=await RM(this.rpc(),e,{action:`abort`});e===this.pageId()&&this.message.set(t.error?String(t.error):`Aborted navigation #${t.aborted}.`)}static ɵfac=function(t){return new(t||e)};static ɵcmp=Gh({type:e,selectors:[[`app-route-current`]],inputs:{page:[1,`page`],rpc:[1,`rpc`]},outputs:{showComponent:`showComponent`},decls:2,vars:1,consts:[[1,`empty`],[1,`url`],[1,`url-label`],[`role`,`note`,1,`note`],[`role`,`status`,1,`muted`],[1,`facts`],[`role`,`region`,`aria-label`,`Active routes`,`tabindex`,`0`,1,`table-scroll`],[`scope`,`col`],[`role`,`status`,1,`pending`],[`aria-hidden`,`true`,1,`pulse`],[1,`pending-text`],[`type`,`button`,1,`small`,3,`click`,`disabled`],[`id`,`route-current-writes-off`,1,`muted`],[1,`path`],[1,`visually-hidden`],[1,`tag`],[1,`sub`],[1,`component`],[1,`entry`],[1,`entry`,`data`],[`aria-hidden`,`true`,1,`nil`],[1,`outlets`],[3,`padding-left`],[1,`muted`],[1,`outlet-data`],[`type`,`button`,1,`small`,`show-component`],[`type`,`button`,1,`small`,`show-component`,3,`click`],[1,`empty-title`]],template:function(e,t){if(e&1&&N(0,bN,32,8)(1,xN,8,0,`div`,0),e&2){let e;P((e=t.page().snapshot)?0:1,e)}},dependencies:[hb],styles:[`.muted[_ngcontent-%COMP%] { +}`]})};function IM(e){return e.line?`${e.file}:${e.line}`:e.file}function LM(e,t){let n=t.filter(t=>t.fullPath===e.fullPath&&t.redirectTo!==void 0==(e.redirectTo!==void 0));return n.find(t=>!!e.component&&t.component===e.component)??n.find(t=>!t.component||!e.component)}var RM=_E;function zM(e){return e.startsWith(`/`)&&!e.startsWith(`//`)&&!/^\/*[a-z][a-z0-9+.-]*:/i.test(e)&&!e.includes(`[redacted]`)&&e.length<=2e3}var BM=`Could not reach the page.`;async function VM(e,t,n){return await RM(e,`request-router-action`,{pageId:t,request:n})??{error:`Could not reach the page.`}}function HM(e){return e===`succeeded`?`good`:e===`redirected`||e===`pending`||e===`skipped`?`warn`:e===`cancelled`||e===`failed`?`bad`:``}var UM=()=>[],WM=(e,t)=>t[0],GM=(e,t)=>t.input;function KM(e,t){if(e&1&&(V(0,`p`,3),J(1,` The browser shows `),V(2,`code`),J(3),H(),J(4,`, not the router URL (skipLocationChange, browserUrl, a failed navigation or code that changed history). `),H()),e&2){let e=G();j(3),Y(e.browserUrl)}}function qM(e,t){if(e&1&&(V(0,`p`,12),J(1),H()),e&2){let e=G(3);j(),Y(e.navigationOff)}}function JM(e,t){if(e&1){let e=U();V(0,`div`,8),Bg(1,`span`,9),V(2,`span`,10),J(3,`Navigating to `),V(4,`code`),J(5),H(),J(6),H(),V(7,`button`,11),r_(`click`,function(){return D(e),O(G(2).abort())}),J(8,` Abort `),H()(),N(9,qM,2,1,`p`,12)}if(e&2){let e=t,n=G(2);j(5),Y(e.url),j(),X(` (#`,e.id,`)`),j(),Kg(`disabled`,!n.navigationAllowed()),M(`aria-describedby`,n.navigationAllowed()?null:`route-current-writes-off`),j(2),P(n.navigationAllowed()?-1:9)}}function YM(e,t){if(e&1&&(V(0,`p`,4),J(1),H()),e&2){let e=G(2);j(),Y(e.message())}}function XM(e,t){if(e&1&&(V(0,`dt`),J(1,`Document title`),H(),V(2,`dd`),J(3),H()),e&2){let e=G();j(3),Y(e.title)}}function ZM(e,t){if(e&1&&(V(0,`dt`),J(1,`Query params`),H(),V(2,`dd`)(3,`code`),J(4),xv(5,`json`),H()()),e&2){let e=G();j(4),Y(Cv(5,1,e.queryParams))}}function QM(e,t){if(e&1&&(V(0,`dt`),J(1,`Fragment`),H(),V(2,`dd`)(3,`code`),J(4),H()()),e&2){let e=G();j(4),Y(e.fragment)}}function $M(e,t){if(e&1&&(V(0,`span`,14),J(1),H()),e&2){let e=G().$implicit;j(),X(`, `,e.nesting)}}function eN(e,t){if(e&1&&(V(0,`span`,15),J(1),H()),e&2){let e=G().$implicit;j(),Y(e.route.outlet)}}function tN(e,t){e&1&&(V(0,`span`,15),J(1,`lazy`),H())}function nN(e,t){if(e&1&&(V(0,`div`,16),J(1),H()),e&2){let e=G().$implicit;j(),Z(` title `,e.route.title,``,e.route.ownTitle===!1?` (inherited)`:``,` `)}}function rN(e,t){if(e&1&&(V(0,`code`,17),J(1),H()),e&2){let e=G().$implicit;j(),Y(e.route.component)}}function iN(e,t){e&1&&(V(0,`span`,20),J(1,`–`),H(),V(2,`span`,14),J(3,`none`),H())}function aN(e,t){e&1&&(V(0,`span`,15),J(1,`inherited`),H())}function oN(e,t){if(e&1&&(V(0,`div`,18)(1,`code`),J(2),xv(3,`json`),H(),N(4,aN,2,0,`span`,15),H()),e&2){let e=t.$implicit,n=G().$implicit;j(2),Z(``,e[0],`: `,Cv(3,3,e[1])),j(2),P(n.route.paramSources?.[e[0]]===`inherited`?4:-1)}}function sN(e,t){e&1&&(V(0,`span`,20),J(1,`–`),H(),V(2,`span`,14),J(3,`none`),H())}function cN(e,t){e&1&&(V(0,`span`,15),J(1),H()),e&2&&(j(),Y(t))}function lN(e,t){if(e&1&&(V(0,`div`,19)(1,`code`),J(2),xv(3,`json`),H(),N(4,cN,2,1,`span`,15),H()),e&2){let e,n=t.$implicit,r=G().$implicit;j(2),Z(``,n[0],`: `,Cv(3,3,n[1])),j(2),P((e=r.route.dataSources?.[n[0]])?4:-1,e)}}function uN(e,t){e&1&&(V(0,`span`,20),J(1,`–`),H(),V(2,`span`,14),J(3,`none`),H())}function dN(e,t){if(e&1&&(V(0,`span`,15),J(1),H()),e&2){let e=t.$implicit;j(),Y(e)}}function fN(e,t){if(e&1&&(V(0,`span`,15),J(1),H()),e&2){let e=t.$implicit;j(),X(`resolve `,e)}}function pN(e,t){e&1&&(V(0,`span`,20),J(1,`–`),H(),V(2,`span`,14),J(3,`none`),H())}function mN(e,t){if(e&1&&(V(0,`tr`)(1,`td`,13),J(2),N(3,$M,2,1,`span`,14),N(4,eN,2,1,`span`,15),N(5,tN,2,0,`span`,15),N(6,nN,2,2,`div`,16),H(),V(7,`td`),N(8,rN,2,1,`code`,17)(9,iN,4,0),H(),V(10,`td`),F(11,oN,5,5,`div`,18,WM,!1,sN,4,0),H(),V(14,`td`),F(15,lN,5,5,`div`,19,WM,!1,uN,4,0),H(),V(18,`td`),F(19,dN,2,1,`span`,15,kg),F(21,fN,2,1,`span`,15,kg),N(23,pN,4,0),H()()),e&2){let e=t.$implicit,n=G(2);j(),K(`padding-left`,14+e.depth*16,`px`),j(),X(` `,e.label,` `),j(),P(e.nesting?3:-1),j(),P(e.route.outlet===`primary`?-1:4),j(),P(e.route.lazy?5:-1),j(),P(e.route.title?6:-1),j(2),P(e.route.component?8:9),j(3),I(n.entries(e.route.params)),j(4),I(n.entries(e.route.data)),j(4),I(n.guardList(e.route)),j(2),I(e.route.resolvers??mv(11,UM)),j(2),P(!n.guardList(e.route).length&&!e.route.resolvers?.length?23:-1)}}function hN(e,t){if(e&1){let e=U();V(0,`button`,26),r_(`click`,function(){D(e);let t=G(2).$implicit,n=G(3);return O(n.showComponent.emit({pageId:n.page().pageId,id:t.outlet.devtoolsId}))}),J(1,` Show in Components`),V(2,`span`,14),J(3),H()()}if(e&2){let e=G(2).$implicit;j(3),X(`: `,e.outlet.component??e.outlet.element??`routed component`)}}function gN(e,t){if(e&1&&(V(0,`code`),J(1),H(),J(2,` for `),V(3,`code`),J(4),H(),N(5,hN,4,1,`button`,25)),e&2){let e=G().$implicit,t=G(3);j(),Y(e.outlet.component??`?`),j(3),Y(e.outlet.route??`?`),j(),P(e.outlet.devtoolsId&&t.componentsOn()?5:-1)}}function _N(e,t){e&1&&(V(0,`span`,23),J(1,`not activated`),H())}function vN(e,t){e&1&&(V(0,`span`,15),J(1,`detached by reuse strategy`),H())}function yN(e,t){if(e&1&&(V(0,`span`,15),J(1),H()),e&2){let e=t.$implicit;j(),Z(`input `,e.input,` ← `,e.source)}}function bN(e,t){if(e&1&&(V(0,`span`,24),J(1,`routerOutletData `),V(2,`code`),J(3),H()()),e&2){let e=G().$implicit;j(3),Y(e.outlet.data)}}function xN(e,t){if(e&1&&(V(0,`li`)(1,`span`,15),J(2),H(),N(3,gN,6,3)(4,_N,2,0,`span`,23),N(5,vN,2,0,`span`,15),F(6,yN,2,2,`span`,15,GM),N(8,bN,4,1,`span`,24),H()),e&2){let e=t.$implicit,n=G(3);K(`padding-left`,10+e.depth*16,`px`),j(2),Y(e.outlet.outlet),j(),P(e.outlet.activated?3:4),j(2),P(e.outlet.detached?5:-1),j(),I(n.boundInputs(e.outlet)),j(2),P(e.outlet.data===void 0?-1:8)}}function SN(e,t){if(e&1&&(V(0,`h3`),J(1,`Outlets`),H(),V(2,`ul`,21),F(3,xN,9,6,`li`,22,Og),H()),e&2){let e=G(2);j(3),I(e.outletRows())}}function CN(e,t){if(e&1&&(V(0,`p`,1)(1,`span`,2),J(2,`URL`),H(),V(3,`code`),J(4),H()(),N(5,KM,5,1,`p`,3),N(6,JM,10,5),N(7,YM,2,1,`p`,4),V(8,`dl`,5),N(9,XM,4,1),N(10,ZM,6,3),N(11,QM,5,1),H(),V(12,`h3`),J(13,`Active routes`),H(),V(14,`div`,6)(15,`table`)(16,`thead`)(17,`tr`)(18,`th`,7),J(19,`Route`),H(),V(20,`th`,7),J(21,`Component`),H(),V(22,`th`,7),J(23,`Params`),H(),V(24,`th`,7),J(25,`Data`),H(),V(26,`th`,7),J(27,`Guards and resolvers`),H()()(),V(28,`tbody`),F(29,mN,24,12,`tr`,null,Og),H()()(),N(31,SN,5,0)),e&2){let e,n=t,r=G();j(4),Y(n.url),j(),P(n.urlDrift&&n.browserUrl?5:-1),j(),P((e=n.pending)?6:-1,e),j(),P(r.message()?7:-1),j(2),P(n.title?9:-1),j(),P(r.hasKeys(n.queryParams)?10:-1),j(),P(n.fragment?11:-1),j(18),I(r.rows()),j(2),P(r.outletRows().length?31:-1)}}function wN(e,t){e&1&&(V(0,`div`,0)(1,`p`,27),J(2,`This page reports no Router.`),H(),V(3,`p`,23),J(4,` Add `),V(5,`code`),J(6,`provideRouter()`),H(),J(7,` to the app config and navigate once to see the active routes here. `),H()())}var TN=class e{page=$.required();rpc=$(null);navigationAllowed=Q(()=>ME(this.rpc(),`router`));navigationOff=iE(`router`);componentsOn=Q(()=>jE(this.rpc()).inspectors.components);showComponent=Rv();pageId=Q(()=>this.page().pageId);message=Fv({source:this.pageId,computation:()=>``});rows=Q(()=>{let e=[],t=(n,r,i)=>{let a=r===0&&!n.path?`(root)`:`/`+n.path,o=i===void 0?void 0:`level ${r+1}, child of ${i}`;e.push({route:n,depth:r,label:a,nesting:o});for(let e of n.children)t(e,r+1,a)},n=this.page().snapshot?.root;return n&&t(n,0),e});outletRows=Q(()=>{let e=[],t=(n,r)=>{for(let i of n)e.push({outlet:i,depth:r}),i.children&&t(i.children,r+1)};return t(this.page().outlets??[],0),e});hasKeys(e){return Object.keys(e).length>0}entries(e){return Object.entries(e)}guardList(e){return Object.entries(e.guards??{}).flatMap(([e,t])=>t.map(t=>`${e} ${t}`))}boundInputs(e){return(e.inputs??[]).filter(e=>e.source!==`unset`)}async abort(){let e=this.pageId(),t=await VM(this.rpc(),e,{action:`abort`});e===this.pageId()&&this.message.set(t.error?String(t.error):`Aborted navigation #${t.aborted}.`)}static ɵfac=function(t){return new(t||e)};static ɵcmp=Gh({type:e,selectors:[[`app-route-current`]],inputs:{page:[1,`page`],rpc:[1,`rpc`]},outputs:{showComponent:`showComponent`},decls:2,vars:1,consts:[[1,`empty`],[1,`url`],[1,`url-label`],[`role`,`note`,1,`note`],[`role`,`status`,1,`muted`],[1,`facts`],[`role`,`region`,`aria-label`,`Active routes`,`tabindex`,`0`,1,`table-scroll`],[`scope`,`col`],[`role`,`status`,1,`pending`],[`aria-hidden`,`true`,1,`pulse`],[1,`pending-text`],[`type`,`button`,1,`small`,3,`click`,`disabled`],[`id`,`route-current-writes-off`,1,`muted`],[1,`path`],[1,`visually-hidden`],[1,`tag`],[1,`sub`],[1,`component`],[1,`entry`],[1,`entry`,`data`],[`aria-hidden`,`true`,1,`nil`],[1,`outlets`],[3,`padding-left`],[1,`muted`],[1,`outlet-data`],[`type`,`button`,1,`small`,`show-component`],[`type`,`button`,1,`small`,`show-component`,3,`click`],[1,`empty-title`]],template:function(e,t){if(e&1&&N(0,CN,32,8)(1,wN,8,0,`div`,0),e&2){let e;P((e=t.page().snapshot)?0:1,e)}},dependencies:[hb],styles:[`.muted[_ngcontent-%COMP%] { color: var(--%NS%text-2); font-size: 13px; line-height: 1.5; @@ -3039,7 +3063,7 @@ h3[_ngcontent-%COMP%] { display: block; color: var(--%NS%text-2); font-size: 12px; -}`]})};function CN(e,t){if(e&1&&(V(0,`span`,8),J(1),H()),e&2){let e=G(2);j(),X(``,e.counts().error,` error(s)`)}}function wN(e,t){if(e&1&&(V(0,`span`,9),J(1),H()),e&2){let e=G(2);j(),X(``,e.counts().warning,` warning(s)`)}}function TN(e,t){if(e&1&&(V(0,`span`,10),J(1),H()),e&2){let e=G(2);j(),X(``,e.counts().info,` info`)}}function EN(e,t){if(e&1&&(V(0,`span`,3),N(1,CN,2,1,`span`,8),N(2,wN,2,1,`span`,9),N(3,TN,2,1,`span`,10),H()),e&2){let e=G();j(),P(e.counts().error?1:-1),j(),P(e.counts().warning?2:-1),j(),P(e.counts().info?3:-1)}}function DN(e,t){if(e&1){let e=U();V(0,`div`,4)(1,`p`,11),J(2,`The route checks could not run.`),H(),V(3,`p`,2),J(4,`The devtools server did not answer. Check that it is still running.`),H(),V(5,`button`,1),r_(`click`,function(){return D(e),O(G().run())}),J(6,`Retry`),H()()}}function ON(e,t){e&1&&(V(0,`p`,5),J(1,`Checking…`),H())}function kN(e,t){e&1&&J(0,` This page runs in events-only mode: it has no debug utils (a production build or an unusual setup), so it cannot report its route config. `)}function AN(e,t){e&1&&J(0,` The page has not reported its route config yet. It appears after the app finishes bootstrapping. `)}function jN(e,t){e&1&&J(0,` No page with a router is connected. `)}function MN(e,t){if(e&1&&(V(0,`div`,6)(1,`p`,11),J(2,`No checks ran.`),H(),V(3,`p`,2),N(4,kN,1,0)(5,AN,1,0)(6,jN,1,0),H()()),e&2){let e;j(4),P((e=t)===`events-only`?4:e===`no-config`?5:6)}}function NN(e,t){if(e&1&&(V(0,`li`)(1,`div`,12)(2,`span`,10),J(3),H(),V(4,`code`,13),J(5),H(),V(6,`code`,14),J(7),H()(),V(8,`p`,15),J(9),H(),V(10,`p`,16)(11,`span`,17),J(12,`Fix`),H(),V(13,`span`,18),J(14),V(15,`span`,2),J(16),H()()()()),e&2){let e=t.$implicit,n=G(2);M(`data-severity`,e.severity),j(2),M(`data-tone`,n.severityTone(e.severity)),j(),Y(e.severity),j(2),Y(e.rule),j(2),Y(e.route),j(2),Y(e.message),j(5),X(``,e.fix,` `),j(2),X(`(Angular `,e.angular===`throws`?`throws`:e.angular===`warns`?`warns`:`does not warn`,`)`)}}function PN(e,t){if(e&1&&(V(0,`ul`,7),F(1,NN,17,8,`li`,null,Og),H()),e&2){let e=G();M(`aria-busy`,e.checking()),j(),I(e.findings())}}function FN(e,t){e&1&&(V(0,`div`,6)(1,`span`,19),k(),V(2,`svg`,20),Bg(3,`path`,21),H()(),hs(),V(4,`p`,11),J(5,`No route config problems found.`),H(),V(6,`p`,2),J(7,`The check runs again after each navigation or config change.`),H()())}var IN=class e{page=$.required();rpc=$(null);result=A(null);failed=A(!1);checking=A(!1);findings=Q(()=>{let e=this.result();return e?.checked?e.findings:[]});notChecked=Q(()=>{let e=this.result();return e&&!e.checked?e.reason:null});counts=Q(()=>{let e={error:0,warning:0,info:0};for(let t of this.findings())e[t.severity]++;return e});key=Q(()=>{let e=this.page(),t=e.navigations[e.navigations.length-1],n=JSON.stringify((e.links??[]).map(e=>[e.text,e.href,e.linkActive!==void 0,e.ariaCurrent===void 0])),r=`${e.setup?.mode}/${e.setup?.features?.componentInputBinding}`;return`${e.pageId}:${e.generation}:${t?.id}:${t?.outcome}:${n}:${r}`});seq=0;checkedPage=null;constructor(){fc(()=>{this.key(),Nv(()=>void this.run())})}severityTone(e){return e===`error`?`bad`:e===`warning`?`warn`:``}async run(){let e=++this.seq,t=this.page().pageId;t!==this.checkedPage&&this.result.set(null),this.checking.set(!0);let n=await FM(this.rpc(),`router-lint`,t);e===this.seq&&(this.checking.set(!1),this.failed.set(!n),n&&(this.result.set(n),this.checkedPage=t))}static ɵfac=function(t){return new(t||e)};static ɵcmp=Gh({type:e,selectors:[[`app-route-lint`]],inputs:{page:[1,`page`],rpc:[1,`rpc`]},decls:11,vars:4,consts:[[1,`toolbar`],[`type`,`button`,1,`small`,3,`click`],[1,`muted`],[1,`summary`],[`role`,`alert`,1,`empty`],[`role`,`status`,1,`muted`,`empty`],[1,`empty`],[1,`findings`],[`data-tone`,`bad`,1,`badge`],[`data-tone`,`warn`,1,`badge`],[1,`badge`],[1,`empty-title`],[1,`head`],[1,`rule`],[1,`route`],[1,`message`],[1,`fix`],[1,`fix-label`],[1,`fix-text`],[`aria-hidden`,`true`,1,`ok-mark`],[`width`,`16`,`height`,`16`,`viewBox`,`0 0 24 24`,`fill`,`none`,`stroke`,`currentColor`,`stroke-width`,`2.5`,`stroke-linecap`,`round`,`stroke-linejoin`,`round`],[`d`,`M20 6 9 17l-5-5`]],template:function(e,t){if(e&1&&(V(0,`div`,0)(1,`button`,1),r_(`click`,function(){return t.run()}),J(2),H(),V(3,`span`,2),J(4,`Checks the live config, links and recent navigations. Lazy routes that have not loaded are skipped.`),H(),N(5,EN,4,3,`span`,3),H(),N(6,DN,7,0,`div`,4)(7,ON,2,0,`p`,5)(8,MN,7,1,`div`,6)(9,PN,3,1,`ul`,7)(10,FN,8,0,`div`,6)),e&2){let e;j(),M(`aria-busy`,t.checking()),j(),X(` `,t.checking()?`Checking…`:`Check again`,` `),j(3),P(t.result()?.checked&&t.findings().length?5:-1),j(),P(t.failed()?6:t.result()?(e=t.notChecked())?8:t.findings().length?9:10:7,e)}},styles:[`.muted[_ngcontent-%COMP%] { +}`]})};function EN(e,t){if(e&1&&(V(0,`span`,8),J(1),H()),e&2){let e=G(2);j(),X(``,e.counts().error,` error(s)`)}}function DN(e,t){if(e&1&&(V(0,`span`,9),J(1),H()),e&2){let e=G(2);j(),X(``,e.counts().warning,` warning(s)`)}}function ON(e,t){if(e&1&&(V(0,`span`,10),J(1),H()),e&2){let e=G(2);j(),X(``,e.counts().info,` info`)}}function kN(e,t){if(e&1&&(V(0,`span`,3),N(1,EN,2,1,`span`,8),N(2,DN,2,1,`span`,9),N(3,ON,2,1,`span`,10),H()),e&2){let e=G();j(),P(e.counts().error?1:-1),j(),P(e.counts().warning?2:-1),j(),P(e.counts().info?3:-1)}}function AN(e,t){if(e&1){let e=U();V(0,`div`,4)(1,`p`,11),J(2,`The route checks could not run.`),H(),V(3,`p`,2),J(4,`The devtools server did not answer. Check that it is still running.`),H(),V(5,`button`,1),r_(`click`,function(){return D(e),O(G().run())}),J(6,`Retry`),H()()}}function jN(e,t){e&1&&(V(0,`p`,5),J(1,`Checking…`),H())}function MN(e,t){e&1&&J(0,` This page runs in events-only mode: it has no debug utils (a production build or an unusual setup), so it cannot report its route config. `)}function NN(e,t){e&1&&J(0,` The page has not reported its route config yet. It appears after the app finishes bootstrapping. `)}function PN(e,t){e&1&&J(0,` No page with a router is connected. `)}function FN(e,t){if(e&1&&(V(0,`div`,6)(1,`p`,11),J(2,`No checks ran.`),H(),V(3,`p`,2),N(4,MN,1,0)(5,NN,1,0)(6,PN,1,0),H()()),e&2){let e;j(4),P((e=t)===`events-only`?4:e===`no-config`?5:6)}}function IN(e,t){if(e&1&&(V(0,`li`)(1,`div`,12)(2,`span`,10),J(3),H(),V(4,`code`,13),J(5),H(),V(6,`code`,14),J(7),H()(),V(8,`p`,15),J(9),H(),V(10,`p`,16)(11,`span`,17),J(12,`Fix`),H(),V(13,`span`,18),J(14),V(15,`span`,2),J(16),H()()()()),e&2){let e=t.$implicit,n=G(2);M(`data-severity`,e.severity),j(2),M(`data-tone`,n.severityTone(e.severity)),j(),Y(e.severity),j(2),Y(e.rule),j(2),Y(e.route),j(2),Y(e.message),j(5),X(``,e.fix,` `),j(2),X(`(Angular `,e.angular===`throws`?`throws`:e.angular===`warns`?`warns`:`does not warn`,`)`)}}function LN(e,t){if(e&1&&(V(0,`ul`,7),F(1,IN,17,8,`li`,null,Og),H()),e&2){let e=G();M(`aria-busy`,e.checking()),j(),I(e.findings())}}function RN(e,t){e&1&&(V(0,`div`,6)(1,`span`,19),k(),V(2,`svg`,20),Bg(3,`path`,21),H()(),hs(),V(4,`p`,11),J(5,`No route config problems found.`),H(),V(6,`p`,2),J(7,`The check runs again after each navigation or config change.`),H()())}var zN=class e{page=$.required();rpc=$(null);result=A(null);failed=A(!1);checking=A(!1);findings=Q(()=>{let e=this.result();return e?.checked?e.findings:[]});notChecked=Q(()=>{let e=this.result();return e&&!e.checked?e.reason:null});counts=Q(()=>{let e={error:0,warning:0,info:0};for(let t of this.findings())e[t.severity]++;return e});key=Q(()=>{let e=this.page(),t=e.navigations[e.navigations.length-1],n=JSON.stringify((e.links??[]).map(e=>[e.text,e.href,e.linkActive!==void 0,e.ariaCurrent===void 0])),r=`${e.setup?.mode}/${e.setup?.features?.componentInputBinding}`;return`${e.pageId}:${e.generation}:${t?.id}:${t?.outcome}:${n}:${r}`});seq=0;checkedPage=null;constructor(){fc(()=>{this.key(),Nv(()=>void this.run())})}severityTone(e){return e===`error`?`bad`:e===`warning`?`warn`:``}async run(){let e=++this.seq,t=this.page().pageId;t!==this.checkedPage&&this.result.set(null),this.checking.set(!0);let n=await RM(this.rpc(),`router-lint`,t);e===this.seq&&(this.checking.set(!1),this.failed.set(!n),n&&(this.result.set(n),this.checkedPage=t))}static ɵfac=function(t){return new(t||e)};static ɵcmp=Gh({type:e,selectors:[[`app-route-lint`]],inputs:{page:[1,`page`],rpc:[1,`rpc`]},decls:11,vars:4,consts:[[1,`toolbar`],[`type`,`button`,1,`small`,3,`click`],[1,`muted`],[1,`summary`],[`role`,`alert`,1,`empty`],[`role`,`status`,1,`muted`,`empty`],[1,`empty`],[1,`findings`],[`data-tone`,`bad`,1,`badge`],[`data-tone`,`warn`,1,`badge`],[1,`badge`],[1,`empty-title`],[1,`head`],[1,`rule`],[1,`route`],[1,`message`],[1,`fix`],[1,`fix-label`],[1,`fix-text`],[`aria-hidden`,`true`,1,`ok-mark`],[`width`,`16`,`height`,`16`,`viewBox`,`0 0 24 24`,`fill`,`none`,`stroke`,`currentColor`,`stroke-width`,`2.5`,`stroke-linecap`,`round`,`stroke-linejoin`,`round`],[`d`,`M20 6 9 17l-5-5`]],template:function(e,t){if(e&1&&(V(0,`div`,0)(1,`button`,1),r_(`click`,function(){return t.run()}),J(2),H(),V(3,`span`,2),J(4,`Checks the live config, links and recent navigations. Lazy routes that have not loaded are skipped.`),H(),N(5,kN,4,3,`span`,3),H(),N(6,AN,7,0,`div`,4)(7,jN,2,0,`p`,5)(8,FN,7,1,`div`,6)(9,LN,3,1,`ul`,7)(10,RN,8,0,`div`,6)),e&2){let e;j(),M(`aria-busy`,t.checking()),j(),X(` `,t.checking()?`Checking…`:`Check again`,` `),j(3),P(t.result()?.checked&&t.findings().length?5:-1),j(),P(t.failed()?6:t.result()?(e=t.notChecked())?8:t.findings().length?9:10:7,e)}},styles:[`.muted[_ngcontent-%COMP%] { color: var(--%NS%text-2); font-size: 13px; line-height: 1.5; @@ -3461,7 +3485,7 @@ h3[_ngcontent-%COMP%] { .fix[_ngcontent-%COMP%] .muted[_ngcontent-%COMP%] { font-size: 12px; -}`]})},LN=(e,t)=>t.name,RN=(e,t)=>t[0];function zN(e,t){e&1&&(V(0,`p`,1),J(1,` Events-only mode: this build lacks the injector provider debug helper, so setup detection is limited. The preloader, the scroller and the router providers can't be found, and the features and options below can show defaults. `),H())}function BN(e,t){if(e&1&&(V(0,`dt`),J(1,`Angular`),H(),V(2,`dd`),J(3),H()),e&2){let e=G();j(3),Y(e.angularVersion)}}function VN(e,t){if(e&1&&(V(0,`dt`),J(1,`Base href`),H(),V(2,`dd`)(3,`code`),J(4),H()()),e&2){let e=G();j(4),Y(e.baseHref)}}function HN(e,t){if(e&1&&(V(0,`dt`),J(1,`Hydration`),H(),V(2,`dd`),J(3),H()),e&2){let e=G();j(3),X(``,e.hydrated,` component(s) hydrated from server HTML`)}}function UN(e,t){if(e&1&&(V(0,`tr`)(1,`td`,5)(2,`code`),J(3),H()(),V(4,`td`)(5,`code`),J(6),H()(),V(7,`td`,6)(8,`span`,7),J(9),H()()()),e&2){let e=t.$implicit;j(3),Y(e.name),j(3),Y(e.value),j(2),M(`data-tone`,e.set?`warn`:``),j(),Y(e.set?`set`:`default`)}}function WN(e,t){if(e&1&&(V(0,`li`)(1,`span`,7),J(2),H()()),e&2){let e=t.$implicit;j(),M(`data-tone`,e[1]===`off`?``:`good`),j(),Z(``,e[0],`: `,e[1])}}function GN(e,t){if(e&1&&(V(0,`h3`),J(1,`Features`),H(),V(2,`ul`,8),F(3,WN,3,3,`li`,null,RN),H()),e&2){let e=G(),t=G();j(3),I(t.entries(e.features))}}function KN(e,t){if(e&1&&(V(0,`dt`),J(1),H(),V(2,`dd`)(3,`code`),J(4),H()()),e&2){let e=t.$implicit;j(),Y(e[0]),j(3),Y(e[1])}}function qN(e,t){if(e&1&&(V(0,`h3`),J(1,`Strategies`),H(),V(2,`dl`,2),F(3,KN,5,2,null,null,RN),H()),e&2){let e=G(),t=G();j(3),I(t.entries(e.strategies))}}function JN(e,t){if(e&1&&(N(0,zN,2,0,`p`,1),V(1,`dl`,2)(2,`dt`),J(3,`Set up with`),H(),V(4,`dd`),J(5),H(),N(6,BN,4,1),N(7,VN,5,1),N(8,HN,4,1),H(),V(9,`h3`),J(10,`Options`),H(),V(11,`div`,3)(12,`table`)(13,`thead`)(14,`tr`)(15,`th`,4),J(16,`Option`),H(),V(17,`th`,4),J(18,`Value`),H(),V(19,`th`,4),J(20,`Source`),H()()(),V(21,`tbody`),F(22,UN,10,4,`tr`,null,LN),H()()(),N(24,GN,5,0),N(25,qN,5,0)),e&2){let e=t,n=G();P(e.mode===`events-only`?0:-1),j(5),Z(` `,e.setupKind,``,e.routers>1?`, `+e.routers+` routers on the page`:``,` `),j(),P(e.angularVersion?6:-1),j(),P(e.baseHref?7:-1),j(),P(e.hydrated?8:-1),j(14),I(e.options),j(2),P(n.entries(e.features).length?24:-1),j(),P(n.entries(e.strategies).length?25:-1)}}function YN(e,t){e&1&&(V(0,`div`,0)(1,`p`,9),J(2,`The page has not reported its router setup yet.`),H(),V(3,`p`,10),J(4,` It appears after the app finishes bootstrapping. Reload the app if it stays empty. `),H()())}var XN=class e{page=$.required();entries(e){return Object.entries(e)}static ɵfac=function(t){return new(t||e)};static ɵcmp=Gh({type:e,selectors:[[`app-route-setup`]],inputs:{page:[1,`page`]},decls:2,vars:1,consts:[[1,`empty`],[`role`,`note`,1,`note`],[1,`facts`],[`role`,`region`,`aria-label`,`Router options`,`tabindex`,`0`,1,`table-scroll`],[`scope`,`col`],[1,`name`],[1,`source`],[1,`badge`],[1,`chips`],[1,`empty-title`],[1,`muted`]],template:function(e,t){if(e&1&&N(0,JN,26,8)(1,YN,5,0,`div`,0),e&2){let e;P((e=t.page().setup)?0:1,e)}},styles:[`.muted[_ngcontent-%COMP%] { +}`]})},BN=(e,t)=>t.name,VN=(e,t)=>t[0];function HN(e,t){e&1&&(V(0,`p`,1),J(1,` Events-only mode: this build lacks the injector provider debug helper, so setup detection is limited. The preloader, the scroller and the router providers can't be found, and the features and options below can show defaults. `),H())}function UN(e,t){if(e&1&&(V(0,`dt`),J(1,`Angular`),H(),V(2,`dd`),J(3),H()),e&2){let e=G();j(3),Y(e.angularVersion)}}function WN(e,t){if(e&1&&(V(0,`dt`),J(1,`Base href`),H(),V(2,`dd`)(3,`code`),J(4),H()()),e&2){let e=G();j(4),Y(e.baseHref)}}function GN(e,t){if(e&1&&(V(0,`dt`),J(1,`Hydration`),H(),V(2,`dd`),J(3),H()),e&2){let e=G();j(3),X(``,e.hydrated,` component(s) hydrated from server HTML`)}}function KN(e,t){if(e&1&&(V(0,`tr`)(1,`td`,5)(2,`code`),J(3),H()(),V(4,`td`)(5,`code`),J(6),H()(),V(7,`td`,6)(8,`span`,7),J(9),H()()()),e&2){let e=t.$implicit;j(3),Y(e.name),j(3),Y(e.value),j(2),M(`data-tone`,e.set?`warn`:``),j(),Y(e.set?`set`:`default`)}}function qN(e,t){if(e&1&&(V(0,`li`)(1,`span`,7),J(2),H()()),e&2){let e=t.$implicit;j(),M(`data-tone`,e[1]===`off`?``:`good`),j(),Z(``,e[0],`: `,e[1])}}function JN(e,t){if(e&1&&(V(0,`h3`),J(1,`Features`),H(),V(2,`ul`,8),F(3,qN,3,3,`li`,null,VN),H()),e&2){let e=G(),t=G();j(3),I(t.entries(e.features))}}function YN(e,t){if(e&1&&(V(0,`dt`),J(1),H(),V(2,`dd`)(3,`code`),J(4),H()()),e&2){let e=t.$implicit;j(),Y(e[0]),j(3),Y(e[1])}}function XN(e,t){if(e&1&&(V(0,`h3`),J(1,`Strategies`),H(),V(2,`dl`,2),F(3,YN,5,2,null,null,VN),H()),e&2){let e=G(),t=G();j(3),I(t.entries(e.strategies))}}function ZN(e,t){if(e&1&&(N(0,HN,2,0,`p`,1),V(1,`dl`,2)(2,`dt`),J(3,`Set up with`),H(),V(4,`dd`),J(5),H(),N(6,UN,4,1),N(7,WN,5,1),N(8,GN,4,1),H(),V(9,`h3`),J(10,`Options`),H(),V(11,`div`,3)(12,`table`)(13,`thead`)(14,`tr`)(15,`th`,4),J(16,`Option`),H(),V(17,`th`,4),J(18,`Value`),H(),V(19,`th`,4),J(20,`Source`),H()()(),V(21,`tbody`),F(22,KN,10,4,`tr`,null,BN),H()()(),N(24,JN,5,0),N(25,XN,5,0)),e&2){let e=t,n=G();P(e.mode===`events-only`?0:-1),j(5),Z(` `,e.setupKind,``,e.routers>1?`, `+e.routers+` routers on the page`:``,` `),j(),P(e.angularVersion?6:-1),j(),P(e.baseHref?7:-1),j(),P(e.hydrated?8:-1),j(14),I(e.options),j(2),P(n.entries(e.features).length?24:-1),j(),P(n.entries(e.strategies).length?25:-1)}}function QN(e,t){e&1&&(V(0,`div`,0)(1,`p`,9),J(2,`The page has not reported its router setup yet.`),H(),V(3,`p`,10),J(4,` It appears after the app finishes bootstrapping. Reload the app if it stays empty. `),H()())}var $N=class e{page=$.required();entries(e){return Object.entries(e)}static ɵfac=function(t){return new(t||e)};static ɵcmp=Gh({type:e,selectors:[[`app-route-setup`]],inputs:{page:[1,`page`]},decls:2,vars:1,consts:[[1,`empty`],[`role`,`note`,1,`note`],[1,`facts`],[`role`,`region`,`aria-label`,`Router options`,`tabindex`,`0`,1,`table-scroll`],[`scope`,`col`],[1,`name`],[1,`source`],[1,`badge`],[1,`chips`],[1,`empty-title`],[1,`muted`]],template:function(e,t){if(e&1&&N(0,ZN,26,8)(1,QN,5,0,`div`,0),e&2){let e;P((e=t.page().setup)?0:1,e)}},styles:[`.muted[_ngcontent-%COMP%] { color: var(--%NS%text-2); font-size: 13px; line-height: 1.5; @@ -3792,7 +3816,7 @@ h3[_ngcontent-%COMP%] { .facts[_ngcontent-%COMP%] code[_ngcontent-%COMP%] { color: var(--%NS%text-strong); -}`]})},ZN=(e,t)=>t.id,QN=(e,t)=>t.phase;function $N(e,t){if(e&1&&(R(0,`p`,8),J(1),z()),e&2){let e=G();j(),Y(e.message())}}function eP(e,t){if(e&1&&(R(0,`p`,9),J(1),z()),e&2){let e=G();j(),Y(e.navigationOff)}}function tP(e,t){e&1&&(R(0,`span`,18),J(1,`→`),z(),R(2,`span`,19),J(3,`then`),z())}function nP(e,t){if(e&1&&(N(0,tP,4,0),R(1,`code`),J(2),z()),e&2){let e=t.$implicit,n=t.$index;P(n===0?-1:0),j(2),Y(e)}}function rP(e,t){if(e&1&&(R(0,`li`)(1,`code`),J(2),z(),R(3,`span`,18),J(4,` → `),z(),R(5,`span`,19),J(6,` to `),z(),R(7,`code`),J(8),z(),J(9),z()),e&2){let e=t.$implicit,n=G(3);j(2),Y(e.from),j(6),Y(e.to),j(),X(`: `,n.hopCause(e),` `)}}function iP(e,t){if(e&1&&(R(0,`div`,13)(1,`p`,14)(2,`span`,15),J(3),z(),F(4,nP,3,2,null,null,Og),z(),R(6,`ol`,16),F(7,rP,10,3,`li`,null,Og),z(),R(9,`p`,17),J(10),z()()),e&2){let e=t.$implicit,n=G(2);j(3),Y(n.loopTitle(e)),j(),I(e.cycle),j(3),I(e.hops),j(3),Y(n.loopMeta(e))}}function aP(e,t){if(e&1&&(R(0,`section`,11)(1,`h3`,12),J(2),z(),F(3,iP,11,2,`div`,13,Og),z()),e&2){let e=G();j(2),X(` `,e.loops().length===1?`Loop detected`:e.loops().length+` loops detected`,` `),j(),I(e.loops())}}function oP(e,t){if(e&1&&(R(0,`span`),B(1,`i`),J(2),z()),e&2){let e=t.$implicit,n=G(2);j(),K(`background`,n.color(e)),j(),Y(e)}}function sP(e,t){if(e&1&&(R(0,`time`),J(1),z()),e&2){let e=G().$implicit,t=G(2);j(),Y(t.time(e.startedAt))}}function cP(e,t){if(e&1&&(R(0,`span`,18),J(1,`→`),z(),R(2,`span`,19),J(3,`redirected to`),z(),R(4,`code`,27),J(5),z()),e&2){let e=G().$implicit;j(5),Y(e.finalUrl)}}function lP(e,t){if(e&1&&(R(0,`span`,30),J(1),z()),e&2){let e=G().$implicit;j(),Y(e.endedAt===void 0&&e.outcome!==`pending`?`before Pangular Inspector connected`:`started before Pangular Inspector connected`)}}function uP(e,t){if(e&1&&(R(0,`span`,31),J(1),z()),e&2){let e=G().$implicit;j(),X(``,e.phases?.total,`ms`)}}function dP(e,t){if(e&1&&(R(0,`span`,31),J(1),z()),e&2){let e=G().$implicit;j(),X(``,e.endedAt-e.startedAt,`ms`)}}function fP(e,t){e&1&&(R(0,`span`,32),J(1,`probe`),z())}function pP(e,t){if(e&1&&(R(0,`span`,15),J(1,`loop`),R(2,`span`,19),J(3),z()()),e&2){let e=t,n=G(3);j(3),Z(`: part of `,n.loopTitle(e),` `,e.cycle.join(` then `))}}function mP(e,t){if(e&1&&B(0,`span`),e&2){let e=t.$implicit,n=G(4);K(`width`,e.width,`%`)(`background`,n.color(e.phase)),M(`title`,e.phase+` `+e.ms+`ms`)}}function hP(e,t){if(e&1&&(R(0,`div`,33),F(1,mP,1,5,`span`,39,QN),z()),e&2){let e=G().$implicit,t=G(2);M(`aria-label`,t.barLabel(e)),j(),I(t.bars(e))}}function gP(e,t){if(e&1&&(R(0,`dt`),J(1,`From`),z(),R(2,`dd`)(3,`code`),J(4),z()()),e&2){let e=G().$implicit;j(4),Y(e.from)}}function _P(e,t){if(e&1&&(R(0,`dt`),J(1,`Started by`),z(),R(2,`dd`),J(3),z()),e&2){let e=G().$implicit;j(3),Z(``,e.caller,` (`,e.trigger,`)`)}}function vP(e,t){if(e&1&&(R(0,`dt`),J(1,`Extras`),z(),R(2,`dd`),J(3),z()),e&2){let e=G().$implicit;j(3),Y(e.extras?.join(`, `))}}function yP(e,t){if(e&1&&(R(0,`dt`),J(1,`Redirect of`),z(),R(2,`dd`),J(3),z()),e&2){let e=G().$implicit;j(3),X(`#`,e.redirectedFrom)}}function bP(e,t){if(e&1&&(R(0,`div`),J(1,` This navigation: `),R(2,`code`),J(3),z(),J(4,` to `),R(5,`code`),J(6),z(),J(7),z()),e&2){let e=t.$implicit,n=G(4);j(3),Y(e.from),j(3),Y(e.to),j(),X(`, `,n.hopCause(e),` `)}}function xP(e,t){if(e&1&&(R(0,`dt`),J(1,`Loop`),z(),R(2,`dd`,40),J(3),F(4,bP,8,3,`div`,null,Og),z()),e&2){let e=t,n=G().$implicit,r=G(2);j(3),X(` `,e.cycle.join(` → `),` `),j(),I(r.hopsOf(e,n))}}function SP(e,t){if(e&1&&(R(0,`dt`),J(1,`Redirects to`),z(),R(2,`dd`)(3,`code`),J(4),z(),J(5),z()),e&2){let e=G().$implicit;j(4),Y(e.redirectTo),j(),X(` (`,e.redirectKind,`) `)}}function CP(e,t){if(e&1&&(R(0,`dt`),J(1,`Guards`),z(),R(2,`dd`),J(3),z()),e&2){let e=G().$implicit,t=G(2);j(3),Z(``,e.guards.names.join(`, `)||`none`,`: `,t.guardResult(e))}}function wP(e,t){if(e&1&&(R(0,`div`)(1,`code`),J(2),z(),J(3),R(4,`code`),J(5),z(),J(6,`: `),R(7,`strong`),J(8),z(),J(9),z()),e&2){let e=t.$implicit,n=G(4);j(2),Y(e.guard),j(),X(` `,e.kind,` on `),j(2),Y(e.route),j(2),q(`bad`,n.isBad(e.result)),j(),Y(e.result),j(),X(` (`,e.ms,`ms) `)}}function TP(e,t){if(e&1&&(R(0,`dt`),J(1,`Runs`),z(),R(2,`dd`),F(3,wP,10,7,`div`,null,Og),z()),e&2){let e=G().$implicit;j(3),I(e.runs)}}function EP(e,t){if(e&1&&J(0),e&2){let e=G(2).$implicit;X(` leaving `,e.checked.deactivate.join(`, `),`; `)}}function DP(e,t){if(e&1&&(R(0,`dt`),J(1,`Checked`),z(),R(2,`dd`),N(3,EP,1,1),J(4),z()),e&2){let e=G().$implicit;j(3),P(e.checked.deactivate.length?3:-1),j(),X(` entering `,e.checked.activate.join(`, `)||`nothing new`,` `)}}function OP(e,t){if(e&1&&(R(0,`dt`),J(1,`Resolvers`),z(),R(2,`dd`),J(3),z()),e&2){let e=G().$implicit;j(3),Y(e.resolvers?.names?.join(`, `))}}function kP(e,t){if(e&1&&(R(0,`dt`),J(1,`Lazy loaded`),z(),R(2,`dd`),J(3),z()),e&2){let e=G().$implicit;j(3),Y(e.lazyLoaded?.join(`, `))}}function AP(e,t){if(e&1&&(R(0,`dt`),J(1,`Reused`),z(),R(2,`dd`),J(3),z()),e&2){let e=G().$implicit;j(3),X(` `,e.reused?.join(`, `),` (component kept, only inputs and params change) `)}}function jP(e,t){if(e&1&&(R(0,`dt`),J(1,`HTTP`),z(),R(2,`dd`),J(3),z()),e&2){let e=G().$implicit;j(3),Z(``,e.requests.count,` request(s): `,e.requests.urls.join(`, `))}}function MP(e,t){if(e&1&&(R(0,`dt`),J(1,`Scroll`),z(),R(2,`dd`),J(3),z()),e&2){let e=G().$implicit;j(3),Y(e.scroll)}}function NP(e,t){if(e&1&&(R(0,`dt`),J(1,`Title after`),z(),R(2,`dd`),J(3),z()),e&2){let e=G().$implicit;j(3),Y(e.title)}}function PP(e,t){if(e&1&&(R(0,`dt`),J(1,`Warnings`),z(),R(2,`dd`),J(3),z()),e&2){let e=G().$implicit;j(3),Y(e.warnings?.join(` · `))}}function FP(e,t){if(e&1&&(R(0,`dt`),J(1,`Reason`),z(),R(2,`dd`,40),J(3),z()),e&2){let e=G().$implicit,t=G(2);j(3),Y(t.reasonText(e))}}function IP(e,t){if(e&1&&(R(0,`dt`),J(1,`Error`),z(),R(2,`dd`,40),J(3),z()),e&2){let e=G().$implicit;j(3),Y(e.errorCode)}}function LP(e,t){if(e&1&&(R(0,`dt`),J(1,`Error handler`),z(),R(2,`dd`),J(3),z()),e&2){let e=G().$implicit;j(3),Y(e.errorHandler)}}function RP(e,t){if(e&1&&(R(0,`dt`),J(1,`Earlier`),z(),R(2,`dd`),J(3),z()),e&2){let e=G().$implicit;j(3),X(``,e.earlier,` navigation(s) before Pangular Inspector connected`)}}function zP(e,t){if(e&1&&(R(0,`p`,38),J(1,` Replay is off: the URL is redacted or not relative. `),z()),e&2){let e=G().$implicit;L(`id`,pv(`replay-note-`,e.id))}}function BP(e,t){if(e&1){let e=U();R(0,`li`)(1,`div`,25),N(2,sP,2,1,`time`),R(3,`span`,26),J(4),z(),R(5,`code`,27),J(6),z(),N(7,cP,6,1),R(8,`span`,28)(9,`span`,29),J(10),z(),N(11,lP,2,1,`span`,30)(12,uP,2,1,`span`,31)(13,dP,2,1,`span`,31),N(14,fP,2,0,`span`,32),N(15,pP,4,2,`span`,15),z()(),N(16,hP,3,1,`div`,33),R(17,`dl`,34),N(18,gP,5,1),N(19,_P,4,2),N(20,vP,4,1),N(21,yP,4,1),N(22,xP,6,1),N(23,SP,6,2),N(24,CP,4,2),N(25,TP,5,0),N(26,DP,5,2),N(27,OP,4,1),N(28,kP,4,1),N(29,AP,4,1),N(30,jP,4,2),N(31,MP,4,1),N(32,NP,4,1),N(33,PP,4,1),N(34,FP,4,1),N(35,IP,4,1),N(36,LP,4,1),N(37,RP,4,1),z(),R(38,`div`,35)(39,`button`,36),W(`click`,function(){let t=D(e).$implicit;return O(G(2).replay(t))}),J(40,` Replay `),z(),R(41,`button`,37),W(`click`,function(){let t=D(e).$implicit;return O(G(2).copy(t))}),J(42,` Copy repro `),z(),N(43,zP,2,2,`p`,38),z()()}if(e&2){let e,n,r=t.$implicit,i=G(2);q(`in-loop`,!!i.loopOf(r)),j(2),P(r.beforeConnect?-1:2),j(2),X(`#`,r.id),j(2),Y(r.url),j(),P(r.finalUrl&&r.finalUrl!==r.url?7:-1),j(2),M(`data-tone`,i.tone(r.outcome)),j(),Y(r.outcome),j(),P(r.beforeConnect?11:r.phases?.total===void 0?r.endedAt===void 0?-1:13:12),j(3),P(r.probe?14:-1),j(),P((e=i.loopOf(r))?15:-1,e),j(),P(i.bars(r).length?16:-1),j(2),P(r.from?18:-1),j(),P(r.caller?19:-1),j(),P(r.extras?.length?20:-1),j(),P(r.redirectedFrom===void 0?-1:21),j(),P((n=i.loopOf(r))?22:-1,n),j(),P(r.redirectTo?23:-1),j(),P(r.guards&&(r.guards.names.length||r.guards.passed===!1)?24:-1),j(),P(r.runs?.length?25:-1),j(),P(r.checked&&(r.checked.activate.length||r.checked.deactivate.length)?26:-1),j(),P(r.resolvers?.names?.length?27:-1),j(),P(r.lazyLoaded?.length?28:-1),j(),P(r.reused?.length?29:-1),j(),P(r.requests?30:-1),j(),P(r.scroll?31:-1),j(),P(r.title?32:-1),j(),P(r.warnings?.length?33:-1),j(),P(r.reason||r.code?34:-1),j(),P(r.errorCode?35:-1),j(),P(r.errorHandler?36:-1),j(),P(r.earlier?37:-1),j(2),L(`disabled`,!i.navigationAllowed()||!i.replayable(r)),M(`aria-describedby`,i.replayNote(r))(`aria-label`,`Replay navigation `+r.id),j(2),M(`aria-label`,`Copy repro for navigation `+r.id),j(2),P(i.replayable(r)?-1:43)}}function VP(e,t){if(e&1&&(R(0,`div`,20)(1,`span`,21),J(2),z(),R(3,`div`,22),F(4,oP,3,3,`span`,null,kg),z()(),R(6,`ol`,23),F(7,BP,44,37,`li`,24,ZN),z()),e&2){let e=G();j(2),Z(``,e.items().length,` of `,e.page().navigations.length,` navigation(s)`),j(2),I(e.phases),j(3),I(e.items())}}function HP(e,t){if(e&1){let e=U();R(0,`div`,41)(1,`p`,42),J(2,`No navigations match the current filters.`),z(),R(3,`p`,30),J(4),z(),R(5,`button`,37),W(`click`,function(){D(e);let t=G(2),n=d_(2);return t.clearFilters(),O(n.focus())}),J(6,` Clear filters `),z()()}if(e&2){let e=G(2);j(4),X(` `,e.page().navigations.length,` navigation(s) are hidden. Clear the filters to see them. `)}}function UP(e,t){e&1&&(R(0,`div`,41)(1,`p`,42),J(2,`No navigations since Pangular Inspector connected.`),z(),R(3,`p`,30),J(4,`Earlier ones are not visible. Click a link in the app to record one.`),z()())}function WP(e,t){e&1&&N(0,HP,7,1,`div`,41)(1,UP,5,0,`div`,41),e&2&&P(+!G().page().navigations.length)}var GP=[`recognize`,`guards`,`resolve`,`activate`],KP={recognize:`#60a5fa`,guards:`#f59e0b`,resolve:`#2dd4bf`,activate:`#34d399`},qP=class e{page=$.required();rpc=$(null);maxNavigations=Q(()=>jE(this.rpc()).limits.navigations);navigationAllowed=Q(()=>ME(this.rpc(),`router`));navigationOff=iE(`router`);phases=GP;pageId=Q(()=>this.page().pageId);filter=Fv({source:this.pageId,computation:()=>``});onlyProblems=Fv({source:this.pageId,computation:()=>!1});message=Fv({source:this.pageId,computation:()=>``});loops=Q(()=>this.page().loops??[]);loopById=Q(()=>{let e=new Map;for(let t of this.loops())for(let n of t.ids)e.set(n,t);return e});items=Q(()=>{let e=this.filter().toLowerCase();return[...this.page().navigations].reverse().filter(t=>(!e||t.url.toLowerCase().includes(e)||!!t.finalUrl?.toLowerCase().includes(e))&&(!this.onlyProblems()||this.isProblem(t)))});isProblem(e){return e.probe?!1:![`succeeded`,`pending`].includes(e.outcome)||this.loopById().has(e.id)}loopOf(e){return this.loopById().get(e.id)}loopTitle(e){return e.kind===`burst`?`navigation loop`:`redirect loop`}hopsOf(e,t){return e.hops.filter(e=>e.id===t.id)}hopCause(e){return e.via===`navigate`?`#${e.id} started by ${e.by??`code`}`:`${e.via===`redirectTo`?`config`:`${e.via} redirect`}${e.by?` ${e.by}`:e.via===`redirectTo`?` redirectTo`:``} in #${e.id}`}loopMeta(e){let t=e.ids.length>1?`Navigations #${e.ids[0]} to #${e.ids[e.ids.length-1]}`:`Navigation #${e.ids[0]}`,n=e.bounces>1?`, came back ${e.bounces} times`:``,r=e.guards.length?` Guards involved: ${e.guards.join(`, `)}.`:``;return`${t}${n}; ${e.end}.${r}`}reasonText(e){return[e.code,e.reason].filter(Boolean).join(`: `)}clearFilters(){this.filter.set(``),this.onlyProblems.set(!1)}tone(e){return zM(e)}color(e){return KP[e]}bars(e){let t=e.phases?.total;return t?GP.filter(t=>(e.phases?.[t]??0)>0).map(n=>({phase:n,ms:e.phases[n],width:Math.max(1,e.phases[n]/t*100)})):[]}barLabel(e){return`Phases: ${this.bars(e).map(e=>`${e.phase} ${e.ms}ms`).join(`, `)}`}guardResult(e){let t=e.guards?.passed;return t===!0?`passed`:t===!1?e.outcome===`redirected`?`redirected`:`blocked`:e.outcome===`pending`?`running`:`did not finish, navigation ${e.outcome}`}isBad(e){return e===`false`||/^(UrlTree|RedirectCommand|threw)/.test(e)}time=tO;instrumentSeq=0;async toggleInstrument(e){let t=e.target,n=t.checked,r=this.pageId(),i=++this.instrumentSeq,a=await RM(this.rpc(),r,{action:`instrument`,on:n});if(i===this.instrumentSeq){if(r!==this.pageId()){t.checked=!!this.page().instrumented;return}if(a.error){t.checked=!!this.page().instrumented,this.message.set(String(a.error));return}this.message.set(n?`Recording each guard and resolver.`:`Stopped recording guards and resolvers.`)}}replayable(e){return IM(e.url)}replayNote(e){return this.navigationAllowed()?this.replayable(e)?null:`replay-note-${e.id}`:`route-timeline-writes-off`}async replay(e){this.message.set(`Replaying #${e.id}…`);let t=this.pageId(),n=await RM(this.rpc(),t,{action:`replay`,id:e.id});if(t!==this.pageId())return;if(n.error){this.message.set(String(n.error));return}let r=n.replay;this.message.set(`Replay of #${e.id}: ${r?.outcome??`unknown`}${n.same?` (same as before)`:` (different from before)`}.`)}async copy(e){let t=this.pageId(),n=await FM(this.rpc(),`router-export`,{pageId:t,id:e.id});if(t===this.pageId()){if(!n){this.message.set(`Could not build the repro.`);return}try{await navigator.clipboard.writeText(n),t===this.pageId()&&this.message.set(`Copied a markdown repro of #${e.id}.`)}catch{t===this.pageId()&&this.message.set(`The clipboard is not available here.`)}}}async clearNavigations(){let e=this.rpc(),t=this.pageId(),n=`Clearing navigations…`;this.message.set(n);let r;try{if(!e)throw Error(`No connection`);await gE(e,`clear-router-navigations`,t),r=`Navigations cleared.`}catch{r=`Could not clear the navigations.`}t===this.pageId()?this.message.set(r):this.message()===n&&this.message.set(``)}exportJson(){let e=new Blob([JSON.stringify(this.page().navigations,null,2)],{type:`application/json`}),t=URL.createObjectURL(e),n=document.createElement(`a`);n.href=t,n.download=`navigations-${this.page().pageId}.json`,n.click(),URL.revokeObjectURL(t)}static ɵfac=function(t){return new(t||e)};static ɵcmp=Gh({type:e,selectors:[[`app-route-timeline`]],inputs:{page:[1,`page`],rpc:[1,`rpc`]},decls:21,vars:12,consts:[[`filterInput`,``],[1,`toolbar`],[`type`,`search`,`aria-label`,`Filter navigations by URL`,`placeholder`,`Filter by URL`,1,`field`,3,`input`,`keydown.escape`,`value`],[1,`check`],[`type`,`checkbox`,3,`change`,`checked`],[`type`,`button`,1,`small`,`export`,3,`click`],[`type`,`button`,`aria-label`,`Clear navigations`,1,`small`,3,`click`,`disabled`],[`role`,`status`,1,`visually-hidden`],[`aria-hidden`,`true`,1,`message`],[`id`,`route-timeline-writes-off`,1,`message`],[`what`,`navigations`,`limit`,`navigations`,3,`dropped`,`max`],[`aria-labelledby`,`loops-heading`,1,`loops`],[`id`,`loops-heading`],[1,`loop`],[1,`chain`],[`data-tone`,`bad`,1,`badge`],[1,`hops`],[1,`muted`,`loop-meta`],[`aria-hidden`,`true`,1,`arrow`],[1,`visually-hidden`],[1,`meta-row`],[1,`muted`,`count`],[`aria-hidden`,`true`,1,`legend`],[1,`navs`],[3,`in-loop`],[1,`head`],[1,`id`],[1,`url`],[1,`meta`],[1,`badge`],[1,`muted`],[1,`muted`,`ms`],[1,`tag`],[`role`,`img`,1,`bar`],[1,`details`],[1,`actions`],[`type`,`button`,1,`small`,3,`click`,`disabled`],[`type`,`button`,1,`small`,3,`click`],[1,`muted`,`replay-note`,3,`id`],[3,`width`,`background`],[1,`reason`],[1,`empty`],[1,`empty-title`]],template:function(e,t){e&1&&(R(0,`div`,1)(1,`input`,2,0),W(`input`,function(e){return t.filter.set(e.target.value)})(`keydown.escape`,function(){return t.filter.set(``)}),z(),R(3,`label`,3)(4,`input`,4),W(`change`,function(e){return t.onlyProblems.set(e.target.checked)}),z(),J(5,` Only problems `),z(),R(6,`label`,3)(7,`input`,4),W(`change`,function(e){return t.toggleInstrument(e)}),z(),J(8,` Record each guard and resolver `),z(),R(9,`button`,5),W(`click`,function(){return t.exportJson()}),J(10,`Export JSON`),z(),R(11,`button`,6),W(`click`,function(){return t.clearNavigations()}),J(12,` Clear `),z()(),R(13,`p`,7),J(14),z(),N(15,$N,2,1,`p`,8),N(16,eP,2,1,`p`,9),B(17,`app-limit-note`,10),N(18,aP,5,1,`section`,11),N(19,VP,9,2)(20,WP,2,1)),e&2&&(j(),L(`value`,t.filter()),j(3),L(`checked`,t.onlyProblems()),j(3),L(`checked`,t.page().instrumented),j(4),L(`disabled`,!t.navigationAllowed()),M(`aria-describedby`,t.navigationAllowed()?null:`route-timeline-writes-off`),j(3),Y(t.message()),j(),P(t.message()?15:-1),j(),P(t.navigationAllowed()?-1:16),j(),L(`dropped`,t.page().dropped??0)(`max`,t.maxNavigations()),j(),P(t.loops().length?18:-1),j(),P(t.items().length?19:20))},dependencies:[oO],styles:[`.muted[_ngcontent-%COMP%] { +}`]})},eP=(e,t)=>t.id,tP=(e,t)=>t.phase;function nP(e,t){if(e&1&&(R(0,`p`,8),J(1),z()),e&2){let e=G();j(),Y(e.message())}}function rP(e,t){if(e&1&&(R(0,`p`,9),J(1),z()),e&2){let e=G();j(),Y(e.navigationOff)}}function iP(e,t){e&1&&(R(0,`span`,18),J(1,`→`),z(),R(2,`span`,19),J(3,`then`),z())}function aP(e,t){if(e&1&&(N(0,iP,4,0),R(1,`code`),J(2),z()),e&2){let e=t.$implicit,n=t.$index;P(n===0?-1:0),j(2),Y(e)}}function oP(e,t){if(e&1&&(R(0,`li`)(1,`code`),J(2),z(),R(3,`span`,18),J(4,` → `),z(),R(5,`span`,19),J(6,` to `),z(),R(7,`code`),J(8),z(),J(9),z()),e&2){let e=t.$implicit,n=G(3);j(2),Y(e.from),j(6),Y(e.to),j(),X(`: `,n.hopCause(e),` `)}}function sP(e,t){if(e&1&&(R(0,`div`,13)(1,`p`,14)(2,`span`,15),J(3),z(),F(4,aP,3,2,null,null,Og),z(),R(6,`ol`,16),F(7,oP,10,3,`li`,null,Og),z(),R(9,`p`,17),J(10),z()()),e&2){let e=t.$implicit,n=G(2);j(3),Y(n.loopTitle(e)),j(),I(e.cycle),j(3),I(e.hops),j(3),Y(n.loopMeta(e))}}function cP(e,t){if(e&1&&(R(0,`section`,11)(1,`h3`,12),J(2),z(),F(3,sP,11,2,`div`,13,Og),z()),e&2){let e=G();j(2),X(` `,e.loops().length===1?`Loop detected`:e.loops().length+` loops detected`,` `),j(),I(e.loops())}}function lP(e,t){if(e&1&&(R(0,`span`),B(1,`i`),J(2),z()),e&2){let e=t.$implicit,n=G(2);j(),K(`background`,n.color(e)),j(),Y(e)}}function uP(e,t){if(e&1&&(R(0,`time`),J(1),z()),e&2){let e=G().$implicit,t=G(2);j(),Y(t.time(e.startedAt))}}function dP(e,t){if(e&1&&(R(0,`span`,18),J(1,`→`),z(),R(2,`span`,19),J(3,`redirected to`),z(),R(4,`code`,27),J(5),z()),e&2){let e=G().$implicit;j(5),Y(e.finalUrl)}}function fP(e,t){if(e&1&&(R(0,`span`,30),J(1),z()),e&2){let e=G().$implicit;j(),Y(e.endedAt===void 0&&e.outcome!==`pending`?`before Pangular Inspector connected`:`started before Pangular Inspector connected`)}}function pP(e,t){if(e&1&&(R(0,`span`,31),J(1),z()),e&2){let e=G().$implicit;j(),X(``,e.phases?.total,`ms`)}}function mP(e,t){if(e&1&&(R(0,`span`,31),J(1),z()),e&2){let e=G().$implicit;j(),X(``,e.endedAt-e.startedAt,`ms`)}}function hP(e,t){e&1&&(R(0,`span`,32),J(1,`probe`),z())}function gP(e,t){if(e&1&&(R(0,`span`,15),J(1,`loop`),R(2,`span`,19),J(3),z()()),e&2){let e=t,n=G(3);j(3),Z(`: part of `,n.loopTitle(e),` `,e.cycle.join(` then `))}}function _P(e,t){if(e&1&&B(0,`span`),e&2){let e=t.$implicit,n=G(4);K(`width`,e.width,`%`)(`background`,n.color(e.phase)),M(`title`,e.phase+` `+e.ms+`ms`)}}function vP(e,t){if(e&1&&(R(0,`div`,33),F(1,_P,1,5,`span`,39,tP),z()),e&2){let e=G().$implicit,t=G(2);M(`aria-label`,t.barLabel(e)),j(),I(t.bars(e))}}function yP(e,t){if(e&1&&(R(0,`dt`),J(1,`From`),z(),R(2,`dd`)(3,`code`),J(4),z()()),e&2){let e=G().$implicit;j(4),Y(e.from)}}function bP(e,t){if(e&1&&(R(0,`dt`),J(1,`Started by`),z(),R(2,`dd`),J(3),z()),e&2){let e=G().$implicit;j(3),Z(``,e.caller,` (`,e.trigger,`)`)}}function xP(e,t){if(e&1&&(R(0,`dt`),J(1,`Extras`),z(),R(2,`dd`),J(3),z()),e&2){let e=G().$implicit;j(3),Y(e.extras?.join(`, `))}}function SP(e,t){if(e&1&&(R(0,`dt`),J(1,`Redirect of`),z(),R(2,`dd`),J(3),z()),e&2){let e=G().$implicit;j(3),X(`#`,e.redirectedFrom)}}function CP(e,t){if(e&1&&(R(0,`div`),J(1,` This navigation: `),R(2,`code`),J(3),z(),J(4,` to `),R(5,`code`),J(6),z(),J(7),z()),e&2){let e=t.$implicit,n=G(4);j(3),Y(e.from),j(3),Y(e.to),j(),X(`, `,n.hopCause(e),` `)}}function wP(e,t){if(e&1&&(R(0,`dt`),J(1,`Loop`),z(),R(2,`dd`,40),J(3),F(4,CP,8,3,`div`,null,Og),z()),e&2){let e=t,n=G().$implicit,r=G(2);j(3),X(` `,e.cycle.join(` → `),` `),j(),I(r.hopsOf(e,n))}}function TP(e,t){if(e&1&&(R(0,`dt`),J(1,`Redirects to`),z(),R(2,`dd`)(3,`code`),J(4),z(),J(5),z()),e&2){let e=G().$implicit;j(4),Y(e.redirectTo),j(),X(` (`,e.redirectKind,`) `)}}function EP(e,t){if(e&1&&(R(0,`dt`),J(1,`Guards`),z(),R(2,`dd`),J(3),z()),e&2){let e=G().$implicit,t=G(2);j(3),Z(``,e.guards.names.join(`, `)||`none`,`: `,t.guardResult(e))}}function DP(e,t){if(e&1&&(R(0,`div`)(1,`code`),J(2),z(),J(3),R(4,`code`),J(5),z(),J(6,`: `),R(7,`strong`),J(8),z(),J(9),z()),e&2){let e=t.$implicit,n=G(4);j(2),Y(e.guard),j(),X(` `,e.kind,` on `),j(2),Y(e.route),j(2),q(`bad`,n.isBad(e.result)),j(),Y(e.result),j(),X(` (`,e.ms,`ms) `)}}function OP(e,t){if(e&1&&(R(0,`dt`),J(1,`Runs`),z(),R(2,`dd`),F(3,DP,10,7,`div`,null,Og),z()),e&2){let e=G().$implicit;j(3),I(e.runs)}}function kP(e,t){if(e&1&&J(0),e&2){let e=G(2).$implicit;X(` leaving `,e.checked.deactivate.join(`, `),`; `)}}function AP(e,t){if(e&1&&(R(0,`dt`),J(1,`Checked`),z(),R(2,`dd`),N(3,kP,1,1),J(4),z()),e&2){let e=G().$implicit;j(3),P(e.checked.deactivate.length?3:-1),j(),X(` entering `,e.checked.activate.join(`, `)||`nothing new`,` `)}}function jP(e,t){if(e&1&&(R(0,`dt`),J(1,`Resolvers`),z(),R(2,`dd`),J(3),z()),e&2){let e=G().$implicit;j(3),Y(e.resolvers?.names?.join(`, `))}}function MP(e,t){if(e&1&&(R(0,`dt`),J(1,`Lazy loaded`),z(),R(2,`dd`),J(3),z()),e&2){let e=G().$implicit;j(3),Y(e.lazyLoaded?.join(`, `))}}function NP(e,t){if(e&1&&(R(0,`dt`),J(1,`Reused`),z(),R(2,`dd`),J(3),z()),e&2){let e=G().$implicit;j(3),X(` `,e.reused?.join(`, `),` (component kept, only inputs and params change) `)}}function PP(e,t){if(e&1&&(R(0,`dt`),J(1,`HTTP`),z(),R(2,`dd`),J(3),z()),e&2){let e=G().$implicit;j(3),Z(``,e.requests.count,` request(s): `,e.requests.urls.join(`, `))}}function FP(e,t){if(e&1&&(R(0,`dt`),J(1,`Scroll`),z(),R(2,`dd`),J(3),z()),e&2){let e=G().$implicit;j(3),Y(e.scroll)}}function IP(e,t){if(e&1&&(R(0,`dt`),J(1,`Title after`),z(),R(2,`dd`),J(3),z()),e&2){let e=G().$implicit;j(3),Y(e.title)}}function LP(e,t){if(e&1&&(R(0,`dt`),J(1,`Warnings`),z(),R(2,`dd`),J(3),z()),e&2){let e=G().$implicit;j(3),Y(e.warnings?.join(` · `))}}function RP(e,t){if(e&1&&(R(0,`dt`),J(1,`Reason`),z(),R(2,`dd`,40),J(3),z()),e&2){let e=G().$implicit,t=G(2);j(3),Y(t.reasonText(e))}}function zP(e,t){if(e&1&&(R(0,`dt`),J(1,`Error`),z(),R(2,`dd`,40),J(3),z()),e&2){let e=G().$implicit;j(3),Y(e.errorCode)}}function BP(e,t){if(e&1&&(R(0,`dt`),J(1,`Error handler`),z(),R(2,`dd`),J(3),z()),e&2){let e=G().$implicit;j(3),Y(e.errorHandler)}}function VP(e,t){if(e&1&&(R(0,`dt`),J(1,`Earlier`),z(),R(2,`dd`),J(3),z()),e&2){let e=G().$implicit;j(3),X(``,e.earlier,` navigation(s) before Pangular Inspector connected`)}}function HP(e,t){if(e&1&&(R(0,`p`,38),J(1,` Replay is off: the URL is redacted or not relative. `),z()),e&2){let e=G().$implicit;L(`id`,pv(`replay-note-`,e.id))}}function UP(e,t){if(e&1){let e=U();R(0,`li`)(1,`div`,25),N(2,uP,2,1,`time`),R(3,`span`,26),J(4),z(),R(5,`code`,27),J(6),z(),N(7,dP,6,1),R(8,`span`,28)(9,`span`,29),J(10),z(),N(11,fP,2,1,`span`,30)(12,pP,2,1,`span`,31)(13,mP,2,1,`span`,31),N(14,hP,2,0,`span`,32),N(15,gP,4,2,`span`,15),z()(),N(16,vP,3,1,`div`,33),R(17,`dl`,34),N(18,yP,5,1),N(19,bP,4,2),N(20,xP,4,1),N(21,SP,4,1),N(22,wP,6,1),N(23,TP,6,2),N(24,EP,4,2),N(25,OP,5,0),N(26,AP,5,2),N(27,jP,4,1),N(28,MP,4,1),N(29,NP,4,1),N(30,PP,4,2),N(31,FP,4,1),N(32,IP,4,1),N(33,LP,4,1),N(34,RP,4,1),N(35,zP,4,1),N(36,BP,4,1),N(37,VP,4,1),z(),R(38,`div`,35)(39,`button`,36),W(`click`,function(){let t=D(e).$implicit;return O(G(2).replay(t))}),J(40,` Replay `),z(),R(41,`button`,37),W(`click`,function(){let t=D(e).$implicit;return O(G(2).copy(t))}),J(42,` Copy repro `),z(),N(43,HP,2,2,`p`,38),z()()}if(e&2){let e,n,r=t.$implicit,i=G(2);q(`in-loop`,!!i.loopOf(r)),j(2),P(r.beforeConnect?-1:2),j(2),X(`#`,r.id),j(2),Y(r.url),j(),P(r.finalUrl&&r.finalUrl!==r.url?7:-1),j(2),M(`data-tone`,i.tone(r.outcome)),j(),Y(r.outcome),j(),P(r.beforeConnect?11:r.phases?.total===void 0?r.endedAt===void 0?-1:13:12),j(3),P(r.probe?14:-1),j(),P((e=i.loopOf(r))?15:-1,e),j(),P(i.bars(r).length?16:-1),j(2),P(r.from?18:-1),j(),P(r.caller?19:-1),j(),P(r.extras?.length?20:-1),j(),P(r.redirectedFrom===void 0?-1:21),j(),P((n=i.loopOf(r))?22:-1,n),j(),P(r.redirectTo?23:-1),j(),P(r.guards&&(r.guards.names.length||r.guards.passed===!1)?24:-1),j(),P(r.runs?.length?25:-1),j(),P(r.checked&&(r.checked.activate.length||r.checked.deactivate.length)?26:-1),j(),P(r.resolvers?.names?.length?27:-1),j(),P(r.lazyLoaded?.length?28:-1),j(),P(r.reused?.length?29:-1),j(),P(r.requests?30:-1),j(),P(r.scroll?31:-1),j(),P(r.title?32:-1),j(),P(r.warnings?.length?33:-1),j(),P(r.reason||r.code?34:-1),j(),P(r.errorCode?35:-1),j(),P(r.errorHandler?36:-1),j(),P(r.earlier?37:-1),j(2),L(`disabled`,!i.navigationAllowed()||!i.replayable(r)),M(`aria-describedby`,i.replayNote(r))(`aria-label`,`Replay navigation `+r.id),j(2),M(`aria-label`,`Copy repro for navigation `+r.id),j(2),P(i.replayable(r)?-1:43)}}function WP(e,t){if(e&1&&(R(0,`div`,20)(1,`span`,21),J(2),z(),R(3,`div`,22),F(4,lP,3,3,`span`,null,kg),z()(),R(6,`ol`,23),F(7,UP,44,37,`li`,24,eP),z()),e&2){let e=G();j(2),Z(``,e.items().length,` of `,e.page().navigations.length,` navigation(s)`),j(2),I(e.phases),j(3),I(e.items())}}function GP(e,t){if(e&1){let e=U();R(0,`div`,41)(1,`p`,42),J(2,`No navigations match the current filters.`),z(),R(3,`p`,30),J(4),z(),R(5,`button`,37),W(`click`,function(){D(e);let t=G(2),n=d_(2);return t.clearFilters(),O(n.focus())}),J(6,` Clear filters `),z()()}if(e&2){let e=G(2);j(4),X(` `,e.page().navigations.length,` navigation(s) are hidden. Clear the filters to see them. `)}}function KP(e,t){e&1&&(R(0,`div`,41)(1,`p`,42),J(2,`No navigations since Pangular Inspector connected.`),z(),R(3,`p`,30),J(4,`Earlier ones are not visible. Click a link in the app to record one.`),z()())}function qP(e,t){e&1&&N(0,GP,7,1,`div`,41)(1,KP,5,0,`div`,41),e&2&&P(+!G().page().navigations.length)}var JP=[`recognize`,`guards`,`resolve`,`activate`],YP={recognize:`#60a5fa`,guards:`#f59e0b`,resolve:`#2dd4bf`,activate:`#34d399`},XP=class e{page=$.required();rpc=$(null);maxNavigations=Q(()=>jE(this.rpc()).limits.navigations);navigationAllowed=Q(()=>ME(this.rpc(),`router`));navigationOff=iE(`router`);phases=JP;pageId=Q(()=>this.page().pageId);filter=Fv({source:this.pageId,computation:()=>``});onlyProblems=Fv({source:this.pageId,computation:()=>!1});message=Fv({source:this.pageId,computation:()=>``});loops=Q(()=>this.page().loops??[]);loopById=Q(()=>{let e=new Map;for(let t of this.loops())for(let n of t.ids)e.set(n,t);return e});items=Q(()=>{let e=this.filter().toLowerCase();return[...this.page().navigations].reverse().filter(t=>(!e||t.url.toLowerCase().includes(e)||!!t.finalUrl?.toLowerCase().includes(e))&&(!this.onlyProblems()||this.isProblem(t)))});isProblem(e){return e.probe?!1:![`succeeded`,`pending`].includes(e.outcome)||this.loopById().has(e.id)}loopOf(e){return this.loopById().get(e.id)}loopTitle(e){return e.kind===`burst`?`navigation loop`:`redirect loop`}hopsOf(e,t){return e.hops.filter(e=>e.id===t.id)}hopCause(e){return e.via===`navigate`?`#${e.id} started by ${e.by??`code`}`:`${e.via===`redirectTo`?`config`:`${e.via} redirect`}${e.by?` ${e.by}`:e.via===`redirectTo`?` redirectTo`:``} in #${e.id}`}loopMeta(e){let t=e.ids.length>1?`Navigations #${e.ids[0]} to #${e.ids[e.ids.length-1]}`:`Navigation #${e.ids[0]}`,n=e.bounces>1?`, came back ${e.bounces} times`:``,r=e.guards.length?` Guards involved: ${e.guards.join(`, `)}.`:``;return`${t}${n}; ${e.end}.${r}`}reasonText(e){return[e.code,e.reason].filter(Boolean).join(`: `)}clearFilters(){this.filter.set(``),this.onlyProblems.set(!1)}tone(e){return HM(e)}color(e){return YP[e]}bars(e){let t=e.phases?.total;return t?JP.filter(t=>(e.phases?.[t]??0)>0).map(n=>({phase:n,ms:e.phases[n],width:Math.max(1,e.phases[n]/t*100)})):[]}barLabel(e){return`Phases: ${this.bars(e).map(e=>`${e.phase} ${e.ms}ms`).join(`, `)}`}guardResult(e){let t=e.guards?.passed;return t===!0?`passed`:t===!1?e.outcome===`redirected`?`redirected`:`blocked`:e.outcome===`pending`?`running`:`did not finish, navigation ${e.outcome}`}isBad(e){return e===`false`||/^(UrlTree|RedirectCommand|threw)/.test(e)}time=tO;instrumentSeq=0;async toggleInstrument(e){let t=e.target,n=t.checked,r=this.pageId(),i=++this.instrumentSeq,a=await VM(this.rpc(),r,{action:`instrument`,on:n});if(i===this.instrumentSeq){if(r!==this.pageId()){t.checked=!!this.page().instrumented;return}if(a.error){t.checked=!!this.page().instrumented,this.message.set(String(a.error));return}this.message.set(n?`Recording each guard and resolver.`:`Stopped recording guards and resolvers.`)}}replayable(e){return zM(e.url)}replayNote(e){return this.navigationAllowed()?this.replayable(e)?null:`replay-note-${e.id}`:`route-timeline-writes-off`}async replay(e){this.message.set(`Replaying #${e.id}…`);let t=this.pageId(),n=await VM(this.rpc(),t,{action:`replay`,id:e.id});if(t!==this.pageId())return;if(n.error){this.message.set(String(n.error));return}let r=n.replay;this.message.set(`Replay of #${e.id}: ${r?.outcome??`unknown`}${n.same?` (same as before)`:` (different from before)`}.`)}async copy(e){let t=this.pageId(),n=await RM(this.rpc(),`router-export`,{pageId:t,id:e.id});if(t===this.pageId()){if(!n){this.message.set(`Could not build the repro.`);return}try{await navigator.clipboard.writeText(n),t===this.pageId()&&this.message.set(`Copied a markdown repro of #${e.id}.`)}catch{t===this.pageId()&&this.message.set(`The clipboard is not available here.`)}}}async clearNavigations(){let e=this.rpc(),t=this.pageId(),n=`Clearing navigations…`;this.message.set(n);let r;try{if(!e)throw Error(`No connection`);await gE(e,`clear-router-navigations`,t),r=`Navigations cleared.`}catch{r=`Could not clear the navigations.`}t===this.pageId()?this.message.set(r):this.message()===n&&this.message.set(``)}exportJson(){let e=new Blob([JSON.stringify(this.page().navigations,null,2)],{type:`application/json`}),t=URL.createObjectURL(e),n=document.createElement(`a`);n.href=t,n.download=`navigations-${this.page().pageId}.json`,n.click(),URL.revokeObjectURL(t)}static ɵfac=function(t){return new(t||e)};static ɵcmp=Gh({type:e,selectors:[[`app-route-timeline`]],inputs:{page:[1,`page`],rpc:[1,`rpc`]},decls:21,vars:12,consts:[[`filterInput`,``],[1,`toolbar`],[`type`,`search`,`aria-label`,`Filter navigations by URL`,`placeholder`,`Filter by URL`,1,`field`,3,`input`,`keydown.escape`,`value`],[1,`check`],[`type`,`checkbox`,3,`change`,`checked`],[`type`,`button`,1,`small`,`export`,3,`click`],[`type`,`button`,`aria-label`,`Clear navigations`,1,`small`,3,`click`,`disabled`],[`role`,`status`,1,`visually-hidden`],[`aria-hidden`,`true`,1,`message`],[`id`,`route-timeline-writes-off`,1,`message`],[`what`,`navigations`,`limit`,`navigations`,3,`dropped`,`max`],[`aria-labelledby`,`loops-heading`,1,`loops`],[`id`,`loops-heading`],[1,`loop`],[1,`chain`],[`data-tone`,`bad`,1,`badge`],[1,`hops`],[1,`muted`,`loop-meta`],[`aria-hidden`,`true`,1,`arrow`],[1,`visually-hidden`],[1,`meta-row`],[1,`muted`,`count`],[`aria-hidden`,`true`,1,`legend`],[1,`navs`],[3,`in-loop`],[1,`head`],[1,`id`],[1,`url`],[1,`meta`],[1,`badge`],[1,`muted`],[1,`muted`,`ms`],[1,`tag`],[`role`,`img`,1,`bar`],[1,`details`],[1,`actions`],[`type`,`button`,1,`small`,3,`click`,`disabled`],[`type`,`button`,1,`small`,3,`click`],[1,`muted`,`replay-note`,3,`id`],[3,`width`,`background`],[1,`reason`],[1,`empty`],[1,`empty-title`]],template:function(e,t){e&1&&(R(0,`div`,1)(1,`input`,2,0),W(`input`,function(e){return t.filter.set(e.target.value)})(`keydown.escape`,function(){return t.filter.set(``)}),z(),R(3,`label`,3)(4,`input`,4),W(`change`,function(e){return t.onlyProblems.set(e.target.checked)}),z(),J(5,` Only problems `),z(),R(6,`label`,3)(7,`input`,4),W(`change`,function(e){return t.toggleInstrument(e)}),z(),J(8,` Record each guard and resolver `),z(),R(9,`button`,5),W(`click`,function(){return t.exportJson()}),J(10,`Export JSON`),z(),R(11,`button`,6),W(`click`,function(){return t.clearNavigations()}),J(12,` Clear `),z()(),R(13,`p`,7),J(14),z(),N(15,nP,2,1,`p`,8),N(16,rP,2,1,`p`,9),B(17,`app-limit-note`,10),N(18,cP,5,1,`section`,11),N(19,WP,9,2)(20,qP,2,1)),e&2&&(j(),L(`value`,t.filter()),j(3),L(`checked`,t.onlyProblems()),j(3),L(`checked`,t.page().instrumented),j(4),L(`disabled`,!t.navigationAllowed()),M(`aria-describedby`,t.navigationAllowed()?null:`route-timeline-writes-off`),j(3),Y(t.message()),j(),P(t.message()?15:-1),j(),P(t.navigationAllowed()?-1:16),j(),L(`dropped`,t.page().dropped??0)(`max`,t.maxNavigations()),j(),P(t.loops().length?18:-1),j(),P(t.items().length?19:20))},dependencies:[oO],styles:[`.muted[_ngcontent-%COMP%] { color: var(--%NS%text-2); font-size: 13px; line-height: 1.5; @@ -4376,7 +4400,7 @@ time[_ngcontent-%COMP%] { .export[_ngcontent-%COMP%] { margin-left: 0; } -}`]})},JP=[`urlInput`],YP=()=>[],XP=(e,t)=>t.node.id;function ZP(e,t){if(e&1&&(J(0,` with `),R(1,`code`),J(2),xv(3,`json`),z()),e&2){G(2);let e=fv(0);j(2),Y(Cv(3,1,e.params))}}function QP(e,t){if(e&1&&(R(0,`span`,19),J(1,`match`),z(),J(2,` Matches `),R(3,`code`,20),J(4),z(),N(5,ZP,4,3)),e&2){G();let e=fv(0),t=G();j(4),Y(t.chainText(e)),j(),P(t.hasKeys(e.params)?5:-1)}}function $P(e,t){if(e&1&&(J(0,` Nearest: `),R(1,`code`),J(2),z()),e&2){G(2);let e=fv(0);j(2),Y(e.nearest.join(`, `))}}function eF(e,t){if(e&1&&(R(0,`span`,21),J(1,`no match`),z(),J(2,` Matches no route (NG04002). `),N(3,$P,3,1)),e&2){G();let e=fv(0);j(3),P(e.nearest.length?3:-1)}}function tF(e,t){if(e&1&&(R(0,`div`,18),J(1),z()),e&2){let e=t.$implicit;j(),Y(e)}}function nF(e,t){if(e&1&&(uv(0),R(1,`div`,8)(2,`span`,17),J(3,`Result for `),R(4,`code`),J(5),z(),J(6,`:`),z(),N(7,QP,6,2)(8,eF,4,1),F(9,tF,2,1,`div`,18,kg),z()),e&2){let e=t,n=dv(e.result);j(),M(`data-matched`,n.matched),j(4),Y(e.url),j(2),P(n.matched?7:8),j(2),I(n.notes)}}function rF(e,t){if(e&1&&(R(0,`p`,9),J(1),z()),e&2){let e=G();j(),Y(e.message())}}function iF(e,t){if(e&1&&(R(0,`p`,11),J(1),z()),e&2){let e=G();j(),Y(e.navigationOff)}}function aF(e,t){if(e&1&&(R(0,`span`,22),J(1),z(),J(2,`. `)),e&2){let e=G(2);j(),Y(e.countText())}}function oF(e,t){e&1&&J(0),e&2&&X(` `,G(2).rows().length,` route(s). `)}function sF(e,t){e&1&&J(0),e&2&&X(` `,t,` route(s) left out: the page lists at most 200 routes per level and 1000 in total. `)}function cF(e,t){if(e&1&&(R(0,`p`,14),J(1),N(2,aF,3,1)(3,oF,1,1),J(4,` Lazy routes show their children once loaded. `),N(5,sF,1,1),z()),e&2){let e,t=G();j(),X(` Generation `,t.page().generation,` · `),j(),P(t.filter()?2:3),j(3),P((e=t.page().configTruncated)?5:-1,e)}}function lF(e,t){if(e&1&&(R(0,`div`,15)(1,`p`,23),J(2),z(),R(3,`p`,18),J(4),z()()),e&2){let e=G();j(2),X(` `,e.page().setup?.mode===`events-only`?`This build has no debug utils, so the live config cannot be read.`:`The page has not reported its route config yet.`,` `),j(2),X(` `,e.page().setup?.mode===`events-only`?`Run the app with the development build to inspect the live config.`:`It appears once the router initializes. Navigate in the app if it stays empty.`,` `)}}function uF(e,t){if(e&1){let e=U();R(0,`div`,15)(1,`p`,23),J(2,`No routes match the filter.`),z(),R(3,`p`,18),J(4,`Try a shorter path or a component name.`),z(),R(5,`button`,24),W(`click`,function(){D(e);let t=G(),n=d_(16);return t.setFilter(``),O(n.focus())}),J(6,` Clear filter `),z()()}}function dF(e,t){e&1&&(R(0,`span`,28),J(1,`active`),z())}function fF(e,t){if(e&1&&(R(0,`span`,28),J(1),z()),e&2){let e=G().$implicit;j(),X(`lazy `,e.node.lazy)}}function pF(e,t){if(e&1&&(R(0,`span`,28),J(1),z()),e&2){let e=G().$implicit;j(),X(`outlet `,e.node.outlet)}}function mF(e,t){if(e&1&&(R(0,`span`,29)(1,`span`,26),J(2,`declared in `),z(),B(3,`app-source-link`,35),z()),e&2){let e=G().$implicit;j(3),L(`file`,e.at.file)(`line`,e.at.line)}}function hF(e,t){if(e&1&&(R(0,`span`,30),J(1,`redirect `),R(2,`span`,36),J(3,`→`),z(),R(4,`code`),J(5),z()()),e&2){let e=G().$implicit;j(5),Y(e.node.redirectTo)}}function gF(e,t){if(e&1&&J(0),e&2){let e=G().$implicit;X(` `,e.node.component??(e.node.lazy===`unloaded`?`lazy, not loaded yet`:e.node.kind),` `)}}function _F(e,t){if(e&1&&(R(0,`span`,28),J(1),z()),e&2){let e=t.$implicit;j(),Y(e)}}function vF(e,t){if(e&1&&(R(0,`span`,28),J(1),z()),e&2){let e=t.$implicit;j(),X(`resolve `,e)}}function yF(e,t){e&1&&(R(0,`span`,37),J(1,`–`),z(),R(2,`span`,26),J(3,`none`),z())}function bF(e,t){if(e&1&&J(0),e&2){let e=G().$implicit;X(` `,e.node.title,` `)}}function xF(e,t){e&1&&(R(0,`span`,37),J(1,`–`),z(),R(2,`span`,26),J(3,`none`),z())}function SF(e,t){if(e&1){let e=U();R(0,`input`,39),W(`input`,function(t){let n=D(e).$implicit,r=G(2).$implicit;return O(G(2).setParam(r.node.id,n,t.target.value))}),z()}if(e&2){let e=t.$implicit,n=G(2).$implicit,r=G(2);L(`placeholder`,e)(`value`,r.paramValues()[n.node.id]?.[e]??``),M(`aria-label`,e+` for `+n.node.fullPath)(`aria-invalid`,r.isInvalid(n.node,e)?`true`:null)(`aria-describedby`,r.isInvalid(n.node,e)?`route-tree-row-result`:null)}}function CF(e,t){if(e&1){let e=U();F(0,SF,1,5,`input`,38,kg),R(2,`button`,7),W(`click`,function(){D(e);let t=G().$implicit,n=d_(1);return O(G(2).navigate(t.node,n))}),J(3,` Go `),z()}if(e&2){let e=G().$implicit,t=G(2);I(t.params(e.node)),j(2),L(`disabled`,!t.navigationAllowed()),M(`aria-describedby`,t.navigationAllowed()?null:`route-tree-writes-off`)(`aria-label`,`Navigate to `+e.node.fullPath)}}function wF(e,t){if(e&1){let e=U();R(0,`button`,24),W(`click`,function(){D(e);let t=G().$implicit;return O(G(2).resolveLazy(t.node))}),J(1,` Read lazy `),z()}if(e&2){let e=G().$implicit;M(`aria-label`,`Read lazy routes of `+e.node.fullPath)}}function TF(e,t){if(e&1&&(R(0,`tr`,34)(1,`td`,40)(2,`p`,41),J(3),z()()()),e&2){let e=G(3);j(3),Y(e.rowResult()?.text)}}function EF(e,t){if(e&1&&(R(0,`tr`,null,2)(2,`td`,27),J(3),N(4,dF,2,0,`span`,28),N(5,fF,2,1,`span`,28),N(6,pF,2,1,`span`,28),N(7,mF,4,2,`span`,29),z(),R(8,`td`),N(9,hF,6,1,`span`,30)(10,gF,1,1),z(),R(11,`td`),F(12,_F,2,1,`span`,28,Og),F(14,vF,2,1,`span`,28,kg),N(16,yF,4,0),z(),R(17,`td`),N(18,bF,1,1)(19,xF,4,0),z(),R(20,`td`,31)(21,`div`,32),N(22,CF,4,3),N(23,wF,2,1,`button`,33),z()()(),N(24,TF,4,1,`tr`,34)),e&2){let e=t.$implicit,n=G(2);q(`active`,n.isActive(e.node)),j(2),K(`padding-left`,14+e.depth*16,`px`),j(),X(` `,e.node.fullPath,` `),j(),P(n.isActive(e.node)?4:-1),j(),P(e.node.lazy?5:-1),j(),P(e.node.outlet?6:-1),j(),P(e.at?7:-1),j(2),P(e.node.redirectTo===void 0?10:9),j(3),I(n.guardList(e.node)),j(2),I(e.node.resolvers??mv(15,YP)),j(2),P(!n.guardList(e.node).length&&!e.node.resolvers?.length?16:-1),j(2),P(e.node.title?18:19),j(4),P(n.canNavigate(e.node)?22:-1),j(),P(e.node.kind===`lazy`&&e.node.lazy===`unloaded`?23:-1),j(),P(n.rowResult()?.id===e.node.id?24:-1)}}function DF(e,t){if(e&1&&(R(0,`div`,16)(1,`table`)(2,`thead`)(3,`tr`)(4,`th`,25),J(5,`Path`),z(),R(6,`th`,25),J(7,`Target`),z(),R(8,`th`,25),J(9,`Guards and resolvers`),z(),R(10,`th`,25),J(11,`Title`),z(),R(12,`th`,25)(13,`span`,26),J(14,`Actions`),z()()()(),R(15,`tbody`),F(16,EF,25,16,null,null,XP),z()()()),e&2){let e=G();j(16),I(e.rows())}}function OF(e,t){return`${e} of ${t} ${t===1?`route`:`routes`}`}var kF=class e{page=$.required();rpc=$(null);navigationAllowed=Q(()=>ME(this.rpc(),`router`));navigationOff=iE(`router`);sources=$([]);filter=A(``);testUrl=A(``);pageId=Q(()=>this.page().pageId);match=Fv({source:this.pageId,computation:()=>null});message=Fv({source:this.pageId,computation:()=>``});rowResult=Fv({source:this.pageId,computation:()=>null});paramValues=Fv({source:this.pageId,computation:()=>({})});checkedRow=Fv({source:this.pageId,computation:()=>null});filterAnnouncement=Fv({source:this.pageId,computation:()=>``});predictSeq=0;announceFlip=!1;probeSeq=0;urlInput=Jv(`urlInput`);active=Q(()=>new Set(this.page().activeIds??[]));rows=Q(()=>{let e=this.filter().toLowerCase(),t=this.sources(),n=[],r=(i,a)=>{for(let o of i){let i=PM(o,t),s=i&&NM(i);(!e||o.fullPath.toLowerCase().includes(e)||o.component?.toLowerCase().includes(e)||s?.toLowerCase().includes(e))&&n.push({node:o,depth:a,source:s,at:i}),o.children&&r(o.children,a+1)}};return r(this.page().config??[],0),n});total=Q(()=>{let e=t=>t.reduce((t,n)=>t+1+e(n.children??[]),0);return e(this.page().config??[])});countText=Q(()=>OF(this.rows().length,this.total()));setFilter(e){this.filter.set(e);let t=this.rows().length,n=e?t?`${OF(t,this.total())} match.`:`No routes match.`:``;this.announceFlip=!this.announceFlip,this.filterAnnouncement.set(n&&(this.announceFlip?`${n}\u00a0`:n))}hasKeys(e){return Object.keys(e).length>0}isActive(e){return this.active().has(e.id)}guardList(e){return Object.entries(e.guards??{}).flatMap(([e,t])=>t.map(t=>`${e} ${t}`))}params(e){return(e.fullPath.match(/:([A-Za-z0-9_]+)/g)??[]).map(e=>e.slice(1))}canNavigate(e){return e.redirectTo===void 0&&!e.matcher&&!e.outlet&&!e.fullPath.includes(`**`)&&(!!e.component||e.kind===`component`||e.kind===`lazy`)}setParam(e,t,n){this.paramValues.update(r=>({...r,[e]:{...r[e],[t]:n}}))}missingParams(e){let t=this.paramValues()[e.id]??{};return this.params(e).filter(e=>!t[e])}isInvalid(e,t){return this.checkedRow()===e.id&&!this.paramValues()[e.id]?.[t]}chainText(e){return e.chain.map(e=>e.fullPath).join(` → `)}editUrl(e){this.testUrl.set(e),this.predictSeq++,this.probeSeq++,this.match.set(null),this.message.set(``)}askForUrl(e){this.match.set(null),this.message.set(`Type a URL to ${e}, for example /users/42.`),this.urlInput()?.nativeElement.focus()}async predict(){let e=this.testUrl().trim(),t=++this.predictSeq;if(!e){this.askForUrl(`predict`);return}let n=this.pageId(),r=await FM(this.rpc(),`router-match`,{pageId:n,url:e});t===this.predictSeq&&n===this.pageId()&&(this.match.set(r&&{url:e,result:r}),r?this.message()===`Could not reach the page.`&&this.message.set(``):this.message.set(LM))}async probe(){let e=this.testUrl().trim(),t=++this.probeSeq;if(!e){this.askForUrl(`probe`);return}this.message.set(`Running the real matcher in the app…`);let n=this.pageId(),r=await RM(this.rpc(),n,{action:`probe`,url:e});if(t===this.probeSeq&&n===this.pageId()){if(r.error){this.message.set(String(r.error));return}this.message.set(r.matched?`The app recognized ${e} and its canMatch guards passed. The probe stopped before canActivate guards and resolvers, so those did not run. See the probe entry in Navigations.`:typeof r.redirectedTo==`string`?`A canMatch guard or the navigation error handler redirected ${e} to ${r.redirectedTo}. The probe stopped that navigation before it rendered anything.`:`The app could not recognize ${e}: ${String(r.reason??``)}`)}}async navigate(e,t){let n=this.missingParams(e);if(n.length){this.checkedRow.set(e.id),this.rowResult.set({id:e.id,text:`Fill in ${n.map(e=>`:${e}`).join(`, `)} to navigate.`}),Array.from(t?.querySelectorAll(`input.param`)??[]).find(e=>!e.value)?.focus();return}this.checkedRow.set(null),this.rowResult.set({id:e.id,text:`Navigating to ${e.fullPath}…`});let r=this.pageId(),i=await RM(this.rpc(),r,{action:`navigate`,pattern:e.fullPath,params:this.paramValues()[e.id]??{}});r===this.pageId()&&this.rowResult.set({id:e.id,text:i.error?String(i.error):`Navigation #${i.id}: ${i.outcome}${i.finalUrl?` at ${i.finalUrl}`:``}.`})}async resolveLazy(e){let t=this.pageId(),n=await RM(this.rpc(),t,{action:`resolve-lazy`,id:e.id});if(t!==this.pageId())return;if(n.error){this.rowResult.set({id:e.id,text:String(n.error)});return}let r=n.routes??[];this.rowResult.set({id:e.id,text:`${e.fullPath} declares ${r.length} route(s): ${r.map(e=>`/${e.path}`).join(`, `)}. The router loads them for real on the first navigation that needs them.`})}static ɵfac=function(t){return new(t||e)};static ɵcmp=Gh({type:e,selectors:[[`app-route-tree`]],viewQuery:function(e,t){e&1&&l_(t.urlInput,JP,5),e&2&&u_()},inputs:{page:[1,`page`],rpc:[1,`rpc`],sources:[1,`sources`]},decls:23,vars:11,consts:[[`urlInput`,``],[`filterInput`,``],[`rowEl`,``],[1,`test`,3,`submit`],[`for`,`test-url`],[`id`,`test-url`,`type`,`text`,`placeholder`,`/users/42`,1,`field`,3,`input`,`value`],[`type`,`submit`,1,`small`,`primary`],[`type`,`button`,1,`small`,3,`click`,`disabled`],[`role`,`status`,1,`result`],[`role`,`status`,1,`message`],[`role`,`status`,1,`visually-hidden`],[`id`,`route-tree-writes-off`,1,`message`],[1,`filter-row`],[`type`,`search`,`aria-label`,`Filter routes`,`placeholder`,`Filter by path, component or file`,1,`field`,`filter`,3,`input`,`keydown.escape`,`value`],[1,`muted`,`summary`],[1,`empty`],[`role`,`region`,`aria-label`,`Live route config`,`tabindex`,`0`,1,`table-scroll`],[1,`for`],[1,`muted`],[`data-tone`,`good`,1,`badge`],[1,`chain`],[`data-tone`,`bad`,1,`badge`],[1,`count`],[1,`empty-title`],[`type`,`button`,1,`small`,3,`click`],[`scope`,`col`],[1,`visually-hidden`],[1,`path`],[1,`tag`],[1,`src`],[1,`redirect`],[1,`actions`],[1,`actions-inner`],[`type`,`button`,1,`small`],[1,`row-result`],[3,`file`,`line`],[`aria-hidden`,`true`],[`aria-hidden`,`true`,1,`nil`],[`type`,`text`,1,`field`,`param`,3,`placeholder`,`value`],[`type`,`text`,1,`field`,`param`,3,`input`,`placeholder`,`value`],[`colspan`,`5`],[`id`,`route-tree-row-result`]],template:function(e,t){if(e&1){let e=U();R(0,`form`,3),W(`submit`,function(n){return D(e),n.preventDefault(),O(t.predict())}),R(1,`label`,4),J(2,`Test a URL`),z(),R(3,`input`,5,0),W(`input`,function(e){return t.editUrl(e.target.value)}),z(),R(5,`button`,6),J(6,`Predict`),z(),R(7,`button`,7),W(`click`,function(){return t.probe()}),J(8,` Probe in app `),z()(),N(9,nF,11,4,`div`,8),N(10,rF,2,1,`p`,9),R(11,`p`,10),J(12),z(),N(13,iF,2,1,`p`,11),R(14,`div`,12)(15,`input`,13,1),W(`input`,function(e){return t.setFilter(e.target.value)})(`keydown.escape`,function(){return t.setFilter(``)}),z(),N(17,cF,6,3,`p`,14),z(),R(18,`p`,10),J(19),z(),N(20,lF,5,2,`div`,15)(21,uF,7,0,`div`,15)(22,DF,18,0,`div`,16)}if(e&2){let e;j(3),L(`value`,t.testUrl()),j(4),L(`disabled`,!t.navigationAllowed()),M(`aria-describedby`,t.navigationAllowed()?null:`route-tree-writes-off`),j(2),P((e=t.match())?9:-1,e),j(),P(t.message()?10:-1),j(2),Y(t.rowResult()?.text),j(),P(t.navigationAllowed()?-1:13),j(2),L(`value`,t.filter()),j(2),P(t.page().config?17:-1),j(2),Y(t.filterAnnouncement()),j(),P(t.page().config?t.rows().length?22:21:20)}},dependencies:[OA,hb],styles:[`.muted[_ngcontent-%COMP%] { +}`]})},ZP=[`urlInput`],QP=()=>[],$P=(e,t)=>t.node.id;function eF(e,t){if(e&1&&(J(0,` with `),R(1,`code`),J(2),xv(3,`json`),z()),e&2){G(2);let e=fv(0);j(2),Y(Cv(3,1,e.params))}}function tF(e,t){if(e&1&&(R(0,`span`,19),J(1,`match`),z(),J(2,` Matches `),R(3,`code`,20),J(4),z(),N(5,eF,4,3)),e&2){G();let e=fv(0),t=G();j(4),Y(t.chainText(e)),j(),P(t.hasKeys(e.params)?5:-1)}}function nF(e,t){if(e&1&&(J(0,` Nearest: `),R(1,`code`),J(2),z()),e&2){G(2);let e=fv(0);j(2),Y(e.nearest.join(`, `))}}function rF(e,t){if(e&1&&(R(0,`span`,21),J(1,`no match`),z(),J(2,` Matches no route (NG04002). `),N(3,nF,3,1)),e&2){G();let e=fv(0);j(3),P(e.nearest.length?3:-1)}}function iF(e,t){if(e&1&&(R(0,`div`,18),J(1),z()),e&2){let e=t.$implicit;j(),Y(e)}}function aF(e,t){if(e&1&&(uv(0),R(1,`div`,8)(2,`span`,17),J(3,`Result for `),R(4,`code`),J(5),z(),J(6,`:`),z(),N(7,tF,6,2)(8,rF,4,1),F(9,iF,2,1,`div`,18,kg),z()),e&2){let e=t,n=dv(e.result);j(),M(`data-matched`,n.matched),j(4),Y(e.url),j(2),P(n.matched?7:8),j(2),I(n.notes)}}function oF(e,t){if(e&1&&(R(0,`p`,9),J(1),z()),e&2){let e=G();j(),Y(e.message())}}function sF(e,t){if(e&1&&(R(0,`p`,11),J(1),z()),e&2){let e=G();j(),Y(e.navigationOff)}}function cF(e,t){if(e&1&&(R(0,`span`,22),J(1),z(),J(2,`. `)),e&2){let e=G(2);j(),Y(e.countText())}}function lF(e,t){e&1&&J(0),e&2&&X(` `,G(2).rows().length,` route(s). `)}function uF(e,t){e&1&&J(0),e&2&&X(` `,t,` route(s) left out: the page lists at most 200 routes per level and 1000 in total. `)}function dF(e,t){if(e&1&&(R(0,`p`,14),J(1),N(2,cF,3,1)(3,lF,1,1),J(4,` Lazy routes show their children once loaded. `),N(5,uF,1,1),z()),e&2){let e,t=G();j(),X(` Generation `,t.page().generation,` · `),j(),P(t.filter()?2:3),j(3),P((e=t.page().configTruncated)?5:-1,e)}}function fF(e,t){if(e&1&&(R(0,`div`,15)(1,`p`,23),J(2),z(),R(3,`p`,18),J(4),z()()),e&2){let e=G();j(2),X(` `,e.page().setup?.mode===`events-only`?`This build has no debug utils, so the live config cannot be read.`:`The page has not reported its route config yet.`,` `),j(2),X(` `,e.page().setup?.mode===`events-only`?`Run the app with the development build to inspect the live config.`:`It appears once the router initializes. Navigate in the app if it stays empty.`,` `)}}function pF(e,t){if(e&1){let e=U();R(0,`div`,15)(1,`p`,23),J(2,`No routes match the filter.`),z(),R(3,`p`,18),J(4,`Try a shorter path or a component name.`),z(),R(5,`button`,24),W(`click`,function(){D(e);let t=G(),n=d_(16);return t.setFilter(``),O(n.focus())}),J(6,` Clear filter `),z()()}}function mF(e,t){e&1&&(R(0,`span`,28),J(1,`active`),z())}function hF(e,t){if(e&1&&(R(0,`span`,28),J(1),z()),e&2){let e=G().$implicit;j(),X(`lazy `,e.node.lazy)}}function gF(e,t){if(e&1&&(R(0,`span`,28),J(1),z()),e&2){let e=G().$implicit;j(),X(`outlet `,e.node.outlet)}}function _F(e,t){if(e&1&&(R(0,`span`,29)(1,`span`,26),J(2,`declared in `),z(),B(3,`app-source-link`,35),z()),e&2){let e=G().$implicit;j(3),L(`file`,e.at.file)(`line`,e.at.line)}}function vF(e,t){if(e&1&&(R(0,`span`,30),J(1,`redirect `),R(2,`span`,36),J(3,`→`),z(),R(4,`code`),J(5),z()()),e&2){let e=G().$implicit;j(5),Y(e.node.redirectTo)}}function yF(e,t){if(e&1&&J(0),e&2){let e=G().$implicit;X(` `,e.node.component??(e.node.lazy===`unloaded`?`lazy, not loaded yet`:e.node.kind),` `)}}function bF(e,t){if(e&1&&(R(0,`span`,28),J(1),z()),e&2){let e=t.$implicit;j(),Y(e)}}function xF(e,t){if(e&1&&(R(0,`span`,28),J(1),z()),e&2){let e=t.$implicit;j(),X(`resolve `,e)}}function SF(e,t){e&1&&(R(0,`span`,37),J(1,`–`),z(),R(2,`span`,26),J(3,`none`),z())}function CF(e,t){if(e&1&&J(0),e&2){let e=G().$implicit;X(` `,e.node.title,` `)}}function wF(e,t){e&1&&(R(0,`span`,37),J(1,`–`),z(),R(2,`span`,26),J(3,`none`),z())}function TF(e,t){if(e&1){let e=U();R(0,`input`,39),W(`input`,function(t){let n=D(e).$implicit,r=G(2).$implicit;return O(G(2).setParam(r.node.id,n,t.target.value))}),z()}if(e&2){let e=t.$implicit,n=G(2).$implicit,r=G(2);L(`placeholder`,e)(`value`,r.paramValues()[n.node.id]?.[e]??``),M(`aria-label`,e+` for `+n.node.fullPath)(`aria-invalid`,r.isInvalid(n.node,e)?`true`:null)(`aria-describedby`,r.isInvalid(n.node,e)?`route-tree-row-result`:null)}}function EF(e,t){if(e&1){let e=U();F(0,TF,1,5,`input`,38,kg),R(2,`button`,7),W(`click`,function(){D(e);let t=G().$implicit,n=d_(1);return O(G(2).navigate(t.node,n))}),J(3,` Go `),z()}if(e&2){let e=G().$implicit,t=G(2);I(t.params(e.node)),j(2),L(`disabled`,!t.navigationAllowed()),M(`aria-describedby`,t.navigationAllowed()?null:`route-tree-writes-off`)(`aria-label`,`Navigate to `+e.node.fullPath)}}function DF(e,t){if(e&1){let e=U();R(0,`button`,24),W(`click`,function(){D(e);let t=G().$implicit;return O(G(2).resolveLazy(t.node))}),J(1,` Read lazy `),z()}if(e&2){let e=G().$implicit;M(`aria-label`,`Read lazy routes of `+e.node.fullPath)}}function OF(e,t){if(e&1&&(R(0,`tr`,34)(1,`td`,40)(2,`p`,41),J(3),z()()()),e&2){let e=G(3);j(3),Y(e.rowResult()?.text)}}function kF(e,t){if(e&1&&(R(0,`tr`,null,2)(2,`td`,27),J(3),N(4,mF,2,0,`span`,28),N(5,hF,2,1,`span`,28),N(6,gF,2,1,`span`,28),N(7,_F,4,2,`span`,29),z(),R(8,`td`),N(9,vF,6,1,`span`,30)(10,yF,1,1),z(),R(11,`td`),F(12,bF,2,1,`span`,28,Og),F(14,xF,2,1,`span`,28,kg),N(16,SF,4,0),z(),R(17,`td`),N(18,CF,1,1)(19,wF,4,0),z(),R(20,`td`,31)(21,`div`,32),N(22,EF,4,3),N(23,DF,2,1,`button`,33),z()()(),N(24,OF,4,1,`tr`,34)),e&2){let e=t.$implicit,n=G(2);q(`active`,n.isActive(e.node)),j(2),K(`padding-left`,14+e.depth*16,`px`),j(),X(` `,e.node.fullPath,` `),j(),P(n.isActive(e.node)?4:-1),j(),P(e.node.lazy?5:-1),j(),P(e.node.outlet?6:-1),j(),P(e.at?7:-1),j(2),P(e.node.redirectTo===void 0?10:9),j(3),I(n.guardList(e.node)),j(2),I(e.node.resolvers??mv(15,QP)),j(2),P(!n.guardList(e.node).length&&!e.node.resolvers?.length?16:-1),j(2),P(e.node.title?18:19),j(4),P(n.canNavigate(e.node)?22:-1),j(),P(e.node.kind===`lazy`&&e.node.lazy===`unloaded`?23:-1),j(),P(n.rowResult()?.id===e.node.id?24:-1)}}function AF(e,t){if(e&1&&(R(0,`div`,16)(1,`table`)(2,`thead`)(3,`tr`)(4,`th`,25),J(5,`Path`),z(),R(6,`th`,25),J(7,`Target`),z(),R(8,`th`,25),J(9,`Guards and resolvers`),z(),R(10,`th`,25),J(11,`Title`),z(),R(12,`th`,25)(13,`span`,26),J(14,`Actions`),z()()()(),R(15,`tbody`),F(16,kF,25,16,null,null,$P),z()()()),e&2){let e=G();j(16),I(e.rows())}}function jF(e,t){return`${e} of ${t} ${t===1?`route`:`routes`}`}var MF=class e{page=$.required();rpc=$(null);navigationAllowed=Q(()=>ME(this.rpc(),`router`));navigationOff=iE(`router`);sources=$([]);filter=A(``);testUrl=A(``);pageId=Q(()=>this.page().pageId);match=Fv({source:this.pageId,computation:()=>null});message=Fv({source:this.pageId,computation:()=>``});rowResult=Fv({source:this.pageId,computation:()=>null});paramValues=Fv({source:this.pageId,computation:()=>({})});checkedRow=Fv({source:this.pageId,computation:()=>null});filterAnnouncement=Fv({source:this.pageId,computation:()=>``});predictSeq=0;announceFlip=!1;probeSeq=0;urlInput=Jv(`urlInput`);active=Q(()=>new Set(this.page().activeIds??[]));rows=Q(()=>{let e=this.filter().toLowerCase(),t=this.sources(),n=[],r=(i,a)=>{for(let o of i){let i=LM(o,t),s=i&&IM(i);(!e||o.fullPath.toLowerCase().includes(e)||o.component?.toLowerCase().includes(e)||s?.toLowerCase().includes(e))&&n.push({node:o,depth:a,source:s,at:i}),o.children&&r(o.children,a+1)}};return r(this.page().config??[],0),n});total=Q(()=>{let e=t=>t.reduce((t,n)=>t+1+e(n.children??[]),0);return e(this.page().config??[])});countText=Q(()=>jF(this.rows().length,this.total()));setFilter(e){this.filter.set(e);let t=this.rows().length,n=e?t?`${jF(t,this.total())} match.`:`No routes match.`:``;this.announceFlip=!this.announceFlip,this.filterAnnouncement.set(n&&(this.announceFlip?`${n}\u00a0`:n))}hasKeys(e){return Object.keys(e).length>0}isActive(e){return this.active().has(e.id)}guardList(e){return Object.entries(e.guards??{}).flatMap(([e,t])=>t.map(t=>`${e} ${t}`))}params(e){return(e.fullPath.match(/:([A-Za-z0-9_]+)/g)??[]).map(e=>e.slice(1))}canNavigate(e){return e.redirectTo===void 0&&!e.matcher&&!e.outlet&&!e.fullPath.includes(`**`)&&(!!e.component||e.kind===`component`||e.kind===`lazy`)}setParam(e,t,n){this.paramValues.update(r=>({...r,[e]:{...r[e],[t]:n}}))}missingParams(e){let t=this.paramValues()[e.id]??{};return this.params(e).filter(e=>!t[e])}isInvalid(e,t){return this.checkedRow()===e.id&&!this.paramValues()[e.id]?.[t]}chainText(e){return e.chain.map(e=>e.fullPath).join(` → `)}editUrl(e){this.testUrl.set(e),this.predictSeq++,this.probeSeq++,this.match.set(null),this.message.set(``)}askForUrl(e){this.match.set(null),this.message.set(`Type a URL to ${e}, for example /users/42.`),this.urlInput()?.nativeElement.focus()}async predict(){let e=this.testUrl().trim(),t=++this.predictSeq;if(!e){this.askForUrl(`predict`);return}let n=this.pageId(),r=await RM(this.rpc(),`router-match`,{pageId:n,url:e});t===this.predictSeq&&n===this.pageId()&&(this.match.set(r&&{url:e,result:r}),r?this.message()===`Could not reach the page.`&&this.message.set(``):this.message.set(BM))}async probe(){let e=this.testUrl().trim(),t=++this.probeSeq;if(!e){this.askForUrl(`probe`);return}this.message.set(`Running the real matcher in the app…`);let n=this.pageId(),r=await VM(this.rpc(),n,{action:`probe`,url:e});if(t===this.probeSeq&&n===this.pageId()){if(r.error){this.message.set(String(r.error));return}this.message.set(r.matched?`The app recognized ${e} and its canMatch guards passed. The probe stopped before canActivate guards and resolvers, so those did not run. See the probe entry in Navigations.`:typeof r.redirectedTo==`string`?`A canMatch guard or the navigation error handler redirected ${e} to ${r.redirectedTo}. The probe stopped that navigation before it rendered anything.`:`The app could not recognize ${e}: ${String(r.reason??``)}`)}}async navigate(e,t){let n=this.missingParams(e);if(n.length){this.checkedRow.set(e.id),this.rowResult.set({id:e.id,text:`Fill in ${n.map(e=>`:${e}`).join(`, `)} to navigate.`}),Array.from(t?.querySelectorAll(`input.param`)??[]).find(e=>!e.value)?.focus();return}this.checkedRow.set(null),this.rowResult.set({id:e.id,text:`Navigating to ${e.fullPath}…`});let r=this.pageId(),i=await VM(this.rpc(),r,{action:`navigate`,pattern:e.fullPath,params:this.paramValues()[e.id]??{}});r===this.pageId()&&this.rowResult.set({id:e.id,text:i.error?String(i.error):`Navigation #${i.id}: ${i.outcome}${i.finalUrl?` at ${i.finalUrl}`:``}.`})}async resolveLazy(e){let t=this.pageId(),n=await VM(this.rpc(),t,{action:`resolve-lazy`,id:e.id});if(t!==this.pageId())return;if(n.error){this.rowResult.set({id:e.id,text:String(n.error)});return}let r=n.routes??[];this.rowResult.set({id:e.id,text:`${e.fullPath} declares ${r.length} route(s): ${r.map(e=>`/${e.path}`).join(`, `)}. The router loads them for real on the first navigation that needs them.`})}static ɵfac=function(t){return new(t||e)};static ɵcmp=Gh({type:e,selectors:[[`app-route-tree`]],viewQuery:function(e,t){e&1&&l_(t.urlInput,ZP,5),e&2&&u_()},inputs:{page:[1,`page`],rpc:[1,`rpc`],sources:[1,`sources`]},decls:23,vars:11,consts:[[`urlInput`,``],[`filterInput`,``],[`rowEl`,``],[1,`test`,3,`submit`],[`for`,`test-url`],[`id`,`test-url`,`type`,`text`,`placeholder`,`/users/42`,1,`field`,3,`input`,`value`],[`type`,`submit`,1,`small`,`primary`],[`type`,`button`,1,`small`,3,`click`,`disabled`],[`role`,`status`,1,`result`],[`role`,`status`,1,`message`],[`role`,`status`,1,`visually-hidden`],[`id`,`route-tree-writes-off`,1,`message`],[1,`filter-row`],[`type`,`search`,`aria-label`,`Filter routes`,`placeholder`,`Filter by path, component or file`,1,`field`,`filter`,3,`input`,`keydown.escape`,`value`],[1,`muted`,`summary`],[1,`empty`],[`role`,`region`,`aria-label`,`Live route config`,`tabindex`,`0`,1,`table-scroll`],[1,`for`],[1,`muted`],[`data-tone`,`good`,1,`badge`],[1,`chain`],[`data-tone`,`bad`,1,`badge`],[1,`count`],[1,`empty-title`],[`type`,`button`,1,`small`,3,`click`],[`scope`,`col`],[1,`visually-hidden`],[1,`path`],[1,`tag`],[1,`src`],[1,`redirect`],[1,`actions`],[1,`actions-inner`],[`type`,`button`,1,`small`],[1,`row-result`],[3,`file`,`line`],[`aria-hidden`,`true`],[`aria-hidden`,`true`,1,`nil`],[`type`,`text`,1,`field`,`param`,3,`placeholder`,`value`],[`type`,`text`,1,`field`,`param`,3,`input`,`placeholder`,`value`],[`colspan`,`5`],[`id`,`route-tree-row-result`]],template:function(e,t){if(e&1){let e=U();R(0,`form`,3),W(`submit`,function(n){return D(e),n.preventDefault(),O(t.predict())}),R(1,`label`,4),J(2,`Test a URL`),z(),R(3,`input`,5,0),W(`input`,function(e){return t.editUrl(e.target.value)}),z(),R(5,`button`,6),J(6,`Predict`),z(),R(7,`button`,7),W(`click`,function(){return t.probe()}),J(8,` Probe in app `),z()(),N(9,aF,11,4,`div`,8),N(10,oF,2,1,`p`,9),R(11,`p`,10),J(12),z(),N(13,sF,2,1,`p`,11),R(14,`div`,12)(15,`input`,13,1),W(`input`,function(e){return t.setFilter(e.target.value)})(`keydown.escape`,function(){return t.setFilter(``)}),z(),N(17,dF,6,3,`p`,14),z(),R(18,`p`,10),J(19),z(),N(20,fF,5,2,`div`,15)(21,pF,7,0,`div`,15)(22,AF,18,0,`div`,16)}if(e&2){let e;j(3),L(`value`,t.testUrl()),j(4),L(`disabled`,!t.navigationAllowed()),M(`aria-describedby`,t.navigationAllowed()?null:`route-tree-writes-off`),j(2),P((e=t.match())?9:-1,e),j(),P(t.message()?10:-1),j(2),Y(t.rowResult()?.text),j(),P(t.navigationAllowed()?-1:13),j(2),L(`value`,t.filter()),j(2),P(t.page().config?17:-1),j(2),Y(t.filterAnnouncement()),j(),P(t.page().config?t.rows().length?22:21:20)}},dependencies:[jA,hb],styles:[`.muted[_ngcontent-%COMP%] { color: var(--%NS%text-2); font-size: 13px; line-height: 1.5; @@ -4859,7 +4883,7 @@ tr.active[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:first-child { .filter[_ngcontent-%COMP%] { flex-basis: 100%; } -}`]})},AF=(e,t)=>t.id;function jF(e,t){if(e&1){let e=U();R(0,`div`,4)(1,`span`,5),J(2,`Page`),z(),R(3,`app-select`,6),W(`valueChange`,function(t){return D(e),O(G(2).pageId.set(t))}),z()()}if(e&2){let e=G(),t=G();j(3),L(`options`,t.pageOptions())(`value`,e.pageId)}}function MF(e,t){e&1&&N(0,jF,4,2,`div`,4),e&2&&P(G().pages().length>1?0:-1)}function NF(e,t){if(e&1){let e=U();R(0,`div`,1)(1,`p`,7),J(2,`Could not load the live router state.`),z(),R(3,`p`,8),J(4,` Check that the dev server with Pangular Inspector is still running, then retry. `),z(),R(5,`button`,9),W(`click`,function(){return D(e),O(G().retry())}),J(6,`Retry`),z()()}}function PF(e,t){e&1&&(R(0,`p`,2),J(1,`Loading the live router state…`),z())}function FF(e,t){if(e&1&&(R(0,`span`,17),J(1),z(),R(2,`span`,18),J(3),z()),e&2){let e=G(3);j(),Y(e.problems()),j(2),X(`, `,e.problems(),` problem navigations`)}}function IF(e,t){if(e&1){let e=U();R(0,`button`,16),W(`click`,function(){let t=D(e).$implicit;return O(G(2).selected.set(t.id))}),J(1),N(2,FF,4,2),z()}if(e&2){let e=t.$implicit,n=G(2);L(`id`,`router-tab-`+e.id),M(`aria-selected`,e.id===n.selected())(`aria-controls`,`router-panel-`+e.id)(`tabindex`,e.id===n.selected()?0:-1),j(),X(` `,e.label,` `),j(),P(e.id===`navigations`&&n.problems()>0?2:-1)}}function LF(e,t){if(e&1){let e=U();R(0,`app-route-current`,19),W(`showComponent`,function(t){return D(e),O(G(2).showComponent.emit(t))}),z()}if(e&2){let e=G(),t=G();L(`page`,e)(`rpc`,t.rpc())}}function RF(e,t){if(e&1&&B(0,`app-route-timeline`,13),e&2){let e=G(),t=G();L(`page`,e)(`rpc`,t.rpc())}}function zF(e,t){if(e&1&&B(0,`app-route-tree`,14),e&2){let e=G(),t=G();L(`page`,e)(`rpc`,t.rpc())(`sources`,t.sources())}}function BF(e,t){e&1&&B(0,`app-route-setup`,15),e&2&&L(`page`,G())}function VF(e,t){if(e&1&&B(0,`app-route-lint`,13),e&2){let e=G(),t=G();L(`page`,e)(`rpc`,t.rpc())}}function HF(e,t){if(e&1){let e=U();R(0,`div`,10),W(`keydown`,function(t){return D(e),O(G().onKey(t))}),F(1,IF,3,6,`button`,11,AF),z(),R(3,`div`,12),N(4,LF,1,2,`app-route-current`,13)(5,RF,1,2,`app-route-timeline`,13)(6,zF,1,3,`app-route-tree`,14)(7,BF,1,1,`app-route-setup`,15)(8,VF,1,2,`app-route-lint`,13),z()}if(e&2){let e,t=G();j(),I(t.tabs),j(2),L(`id`,`router-panel-`+t.selected()),M(`aria-labelledby`,`router-tab-`+t.selected()),j(),P((e=t.selected())===`current`?4:e===`navigations`?5:e===`routes`?6:e===`setup`?7:e===`lint`?8:-1)}}function UF(e,t){e&1&&(R(0,`div`,3)(1,`p`,7),J(2,`No page is reporting router state yet.`),z(),R(3,`p`,8),J(4,` Open the app in a browser. This view updates as soon as a page connects. `),z()())}var WF=[{id:`current`,label:`Current`},{id:`navigations`,label:`Navigations`},{id:`routes`,label:`Routes`},{id:`setup`,label:`Setup`},{id:`lint`,label:`Lint`}],GF=class e{rpc=$(null);sources=$([]);showComponent=Rv();tabs=WF;selected=A(`current`);pages=A([]);hostPageId=fE();loading=A(!0);failed=A(!1);pageId=Fv({source:this.pages,computation:(e,t)=>t?.value&&e.some(e=>e.pageId===t.value)?t.value:this.hostPageId?e.find(e=>e.pageId===this.hostPageId)?.pageId??null:e.find(e=>e.snapshot)?.pageId??e[0]?.pageId??null});unsubscribe=null;destroyRef=T(Ts);page=Q(()=>{let e=this.pages();return e.find(e=>e.pageId===this.pageId())??(this.hostPageId?null:e[0])??null});problems=Q(()=>(this.page()?.navigations??[]).filter(e=>!e.probe&&[`failed`,`cancelled`,`redirected`].includes(e.outcome)).length);constructor(){fc(()=>{let e=this.rpc();e&&this.load(e)}),this.destroyRef.onDestroy(()=>this.unsubscribe?.())}async load(e){this.loading.set(!0),this.failed.set(!1);try{let t=await e.scope(`pangular`).rpc.sharedState(`router`);if(this.destroyRef.destroyed)return;let n=e=>{this.pages.set(e?.pages??[])};n(t.value()),this.unsubscribe?.(),this.unsubscribe=t.on(`updated`,n)}catch{this.failed.set(!0)}finally{this.loading.set(!1)}}retry(){let e=this.rpc();e&&this.load(e)}pageOptions=Q(()=>this.pages().map(e=>({value:e.pageId,label:e.snapshot?.url??e.pageId,hint:e.pageId})));onKey(e){let t=this.tabs.map(e=>e.id),n=t.indexOf(this.selected()),r=n;if(e.key===`ArrowRight`)r=(n+1)%t.length;else if(e.key===`ArrowLeft`)r=(n-1+t.length)%t.length;else if(e.key===`Home`)r=0;else if(e.key===`End`)r=t.length-1;else return;e.preventDefault(),this.selected.set(t[r]);let i=e.currentTarget;queueMicrotask(()=>i.querySelector(`#router-tab-${t[r]}`)?.focus())}static ɵfac=function(t){return new(t||e)};static ɵcmp=Gh({type:e,selectors:[[`app-live-route`]],inputs:{rpc:[1,`rpc`],sources:[1,`sources`]},outputs:{showComponent:`showComponent`},decls:8,vars:2,consts:[[1,`section-head`],[`role`,`alert`,1,`empty`],[`role`,`status`,1,`muted`,`empty`],[1,`empty`],[1,`page-pick`],[`id`,`live-route-page-label`,1,`page-label`],[`labelledBy`,`live-route-page-label`,3,`valueChange`,`options`,`value`],[1,`empty-title`],[1,`muted`],[`type`,`button`,1,`retry`,3,`click`],[`role`,`tablist`,`aria-label`,`Router views`,1,`tabs`,3,`keydown`],[`type`,`button`,`role`,`tab`,3,`id`],[`role`,`tabpanel`,1,`panel`,3,`id`],[3,`page`,`rpc`],[3,`page`,`rpc`,`sources`],[3,`page`],[`type`,`button`,`role`,`tab`,3,`click`,`id`],[`aria-hidden`,`true`,1,`count`],[1,`visually-hidden`],[3,`showComponent`,`page`,`rpc`]],template:function(e,t){if(e&1&&(R(0,`div`,0)(1,`h2`),J(2,`Live router`),z(),N(3,MF,1,1),z(),N(4,NF,7,0,`div`,1)(5,PF,2,0,`p`,2)(6,HF,9,3)(7,UF,5,0,`div`,3)),e&2){let e,n;j(3),P((e=t.page())?3:-1,e),j(),P(t.failed()?4:t.loading()?5:(n=t.page())?6:7,n)}},dependencies:[SN,IN,XN,qP,kF,qD],styles:[`[_nghost-%COMP%] { +}`]})},NF=(e,t)=>t.id;function PF(e,t){if(e&1){let e=U();R(0,`div`,4)(1,`span`,5),J(2,`Page`),z(),R(3,`app-select`,6),W(`valueChange`,function(t){return D(e),O(G(2).pageId.set(t))}),z()()}if(e&2){let e=G(),t=G();j(3),L(`options`,t.pageOptions())(`value`,e.pageId)}}function FF(e,t){e&1&&N(0,PF,4,2,`div`,4),e&2&&P(G().pages().length>1?0:-1)}function IF(e,t){if(e&1){let e=U();R(0,`div`,1)(1,`p`,7),J(2,`Could not load the live router state.`),z(),R(3,`p`,8),J(4,` Check that the dev server with Pangular Inspector is still running, then retry. `),z(),R(5,`button`,9),W(`click`,function(){return D(e),O(G().retry())}),J(6,`Retry`),z()()}}function LF(e,t){e&1&&(R(0,`p`,2),J(1,`Loading the live router state…`),z())}function RF(e,t){if(e&1&&(R(0,`span`,17),J(1),z(),R(2,`span`,18),J(3),z()),e&2){let e=G(3);j(),Y(e.problems()),j(2),X(`, `,e.problems(),` problem navigations`)}}function zF(e,t){if(e&1){let e=U();R(0,`button`,16),W(`click`,function(){let t=D(e).$implicit;return O(G(2).selected.set(t.id))}),J(1),N(2,RF,4,2),z()}if(e&2){let e=t.$implicit,n=G(2);L(`id`,`router-tab-`+e.id),M(`aria-selected`,e.id===n.selected())(`aria-controls`,`router-panel-`+e.id)(`tabindex`,e.id===n.selected()?0:-1),j(),X(` `,e.label,` `),j(),P(e.id===`navigations`&&n.problems()>0?2:-1)}}function BF(e,t){if(e&1){let e=U();R(0,`app-route-current`,19),W(`showComponent`,function(t){return D(e),O(G(2).showComponent.emit(t))}),z()}if(e&2){let e=G(),t=G();L(`page`,e)(`rpc`,t.rpc())}}function VF(e,t){if(e&1&&B(0,`app-route-timeline`,13),e&2){let e=G(),t=G();L(`page`,e)(`rpc`,t.rpc())}}function HF(e,t){if(e&1&&B(0,`app-route-tree`,14),e&2){let e=G(),t=G();L(`page`,e)(`rpc`,t.rpc())(`sources`,t.sources())}}function UF(e,t){e&1&&B(0,`app-route-setup`,15),e&2&&L(`page`,G())}function WF(e,t){if(e&1&&B(0,`app-route-lint`,13),e&2){let e=G(),t=G();L(`page`,e)(`rpc`,t.rpc())}}function GF(e,t){if(e&1){let e=U();R(0,`div`,10),W(`keydown`,function(t){return D(e),O(G().onKey(t))}),F(1,zF,3,6,`button`,11,NF),z(),R(3,`div`,12),N(4,BF,1,2,`app-route-current`,13)(5,VF,1,2,`app-route-timeline`,13)(6,HF,1,3,`app-route-tree`,14)(7,UF,1,1,`app-route-setup`,15)(8,WF,1,2,`app-route-lint`,13),z()}if(e&2){let e,t=G();j(),I(t.tabs),j(2),L(`id`,`router-panel-`+t.selected()),M(`aria-labelledby`,`router-tab-`+t.selected()),j(),P((e=t.selected())===`current`?4:e===`navigations`?5:e===`routes`?6:e===`setup`?7:e===`lint`?8:-1)}}function KF(e,t){e&1&&(R(0,`div`,3)(1,`p`,7),J(2,`No page is reporting router state yet.`),z(),R(3,`p`,8),J(4,` Open the app in a browser. This view updates as soon as a page connects. `),z()())}var qF=[{id:`current`,label:`Current`},{id:`navigations`,label:`Navigations`},{id:`routes`,label:`Routes`},{id:`setup`,label:`Setup`},{id:`lint`,label:`Lint`}],JF=class e{rpc=$(null);sources=$([]);showComponent=Rv();tabs=qF;selected=A(`current`);pages=A([]);hostPageId=fE();loading=A(!0);failed=A(!1);pageId=Fv({source:this.pages,computation:(e,t)=>t?.value&&e.some(e=>e.pageId===t.value)?t.value:this.hostPageId?e.find(e=>e.pageId===this.hostPageId)?.pageId??null:e.find(e=>e.snapshot)?.pageId??e[0]?.pageId??null});unsubscribe=null;destroyRef=T(Ts);page=Q(()=>{let e=this.pages();return e.find(e=>e.pageId===this.pageId())??(this.hostPageId?null:e[0])??null});problems=Q(()=>(this.page()?.navigations??[]).filter(e=>!e.probe&&[`failed`,`cancelled`,`redirected`].includes(e.outcome)).length);constructor(){fc(()=>{let e=this.rpc();e&&this.load(e)}),this.destroyRef.onDestroy(()=>this.unsubscribe?.())}async load(e){this.loading.set(!0),this.failed.set(!1);try{let t=await e.scope(`pangular`).rpc.sharedState(`router`);if(this.destroyRef.destroyed)return;let n=e=>{this.pages.set(e?.pages??[])};n(t.value()),this.unsubscribe?.(),this.unsubscribe=t.on(`updated`,n)}catch{this.failed.set(!0)}finally{this.loading.set(!1)}}retry(){let e=this.rpc();e&&this.load(e)}pageOptions=Q(()=>this.pages().map(e=>({value:e.pageId,label:e.snapshot?.url??e.pageId,hint:e.pageId})));onKey(e){let t=this.tabs.map(e=>e.id),n=t.indexOf(this.selected()),r=n;if(e.key===`ArrowRight`)r=(n+1)%t.length;else if(e.key===`ArrowLeft`)r=(n-1+t.length)%t.length;else if(e.key===`Home`)r=0;else if(e.key===`End`)r=t.length-1;else return;e.preventDefault(),this.selected.set(t[r]);let i=e.currentTarget;queueMicrotask(()=>i.querySelector(`#router-tab-${t[r]}`)?.focus())}static ɵfac=function(t){return new(t||e)};static ɵcmp=Gh({type:e,selectors:[[`app-live-route`]],inputs:{rpc:[1,`rpc`],sources:[1,`sources`]},outputs:{showComponent:`showComponent`},decls:8,vars:2,consts:[[1,`section-head`],[`role`,`alert`,1,`empty`],[`role`,`status`,1,`muted`,`empty`],[1,`empty`],[1,`page-pick`],[`id`,`live-route-page-label`,1,`page-label`],[`labelledBy`,`live-route-page-label`,3,`valueChange`,`options`,`value`],[1,`empty-title`],[1,`muted`],[`type`,`button`,1,`retry`,3,`click`],[`role`,`tablist`,`aria-label`,`Router views`,1,`tabs`,3,`keydown`],[`type`,`button`,`role`,`tab`,3,`id`],[`role`,`tabpanel`,1,`panel`,3,`id`],[3,`page`,`rpc`],[3,`page`,`rpc`,`sources`],[3,`page`],[`type`,`button`,`role`,`tab`,3,`click`,`id`],[`aria-hidden`,`true`,1,`count`],[1,`visually-hidden`],[3,`showComponent`,`page`,`rpc`]],template:function(e,t){if(e&1&&(R(0,`div`,0)(1,`h2`),J(2,`Live router`),z(),N(3,FF,1,1),z(),N(4,IF,7,0,`div`,1)(5,LF,2,0,`p`,2)(6,GF,9,3)(7,KF,5,0,`div`,3)),e&2){let e,n;j(3),P((e=t.page())?3:-1,e),j(),P(t.failed()?4:t.loading()?5:(n=t.page())?6:7,n)}},dependencies:[TN,zN,$N,XP,MF,qD],styles:[`[_nghost-%COMP%] { display: grid; gap: 16px; min-width: 0; @@ -5024,7 +5048,7 @@ h2[_ngcontent-%COMP%] { line-height: 16px; text-align: center; font-variant-numeric: tabular-nums; -}`]})};function KF(e,t){e&1&&J(0,` The Routes tab above shows what the router uses. `)}function qF(e,t){if(e&1){let e=U();R(0,`button`,13),W(`click`,function(){D(e);let t=G();return O(t.expanded.set(!t.expanded()))}),J(1),z()}if(e&2){let e=G();M(`aria-expanded`,e.expanded()),j(),X(` `,e.expanded()?`Hide table`:`Show table`,` `)}}function JF(e,t){e&1&&(J(0,` Run `),R(1,`code`),J(2,`pangular build`),z(),J(3,` again to rebuild the report. `))}function YF(e,t){e&1&&J(0,` Check that the dev server is running, then refresh. `)}function XF(e,t){if(e&1&&(R(0,`div`,11)(1,`p`,14),J(2,`Could not scan the route files.`),z(),R(3,`p`,15),N(4,JF,4,0)(5,YF,1,0),z()()),e&2){let e=G();j(4),P(e.staticReport()?4:5)}}function ZF(e,t){e&1&&(R(0,`p`,12),J(1,`Scanning routes…`),z())}function QF(e,t){if(e&1){let e=U();R(0,`div`,16)(1,`p`,14),J(2,`No routes match the filter.`),z(),R(3,`p`,15),J(4,`Search by path, component, guard, title or file name.`),z(),R(5,`button`,10),W(`click`,function(){D(e);let t=G(2),n=d_(12);return t.filter.set(``),O(n.focus())}),J(6,` Clear filter `),z()()}}function $F(e,t){e&1&&(R(0,`div`,16)(1,`p`,14),J(2,`No routes found.`),z(),R(3,`p`,15),J(4,` Routes are read from `),R(5,`code`),J(6,`*.routes.ts`),z(),J(7,` and `),R(8,`code`),J(9,`*routing.module.ts`),z(),J(10,` files, the files they lazy load, plus Analog pages. Add one and refresh. `),z()())}function eI(e,t){e&1&&N(0,QF,7,0,`div`,16)(1,$F,11,0,`div`,16),e&2&&P(+!G().routes().length)}function tI(e,t){if(e&1&&(R(0,`span`,21),J(1),z()),e&2){let e=G().$implicit;j(),Y(e.kind)}}function nI(e,t){if(e&1&&(R(0,`span`,22)(1,`span`,26),J(2,`→`),z(),R(3,`span`,27),J(4,`redirects to`),z(),J(5),z()),e&2){let e=G().$implicit;j(5),X(` `,e.redirectTo)}}function rI(e,t){if(e&1&&(R(0,`code`,23),J(1),z()),e&2){let e=G().$implicit;j(),Y(e.component)}}function iI(e,t){e&1&&(R(0,`span`,28),J(1,`–`),z(),R(2,`span`,27),J(3,`none`),z())}function aI(e,t){if(e&1&&(R(0,`span`,21),J(1),z()),e&2){let e=t.$implicit;j(),Y(e)}}function oI(e,t){e&1&&(R(0,`span`,28),J(1,`–`),z(),R(2,`span`,27),J(3,`none`),z())}function sI(e,t){if(e&1&&J(0),e&2){let e=G().$implicit;X(` `,e.title,` `)}}function cI(e,t){e&1&&(R(0,`span`,28),J(1,`–`),z(),R(2,`span`,27),J(3,`none`),z())}function lI(e,t){if(e&1&&(R(0,`tr`)(1,`td`,20),J(2),N(3,tI,2,1,`span`,21),z(),R(4,`td`),N(5,nI,6,1,`span`,22)(6,rI,2,1,`code`,23)(7,iI,4,0),z(),R(8,`td`),F(9,aI,2,1,`span`,21,Og,!1,oI,4,0),z(),R(12,`td`),N(13,sI,1,1)(14,cI,4,0),z(),R(15,`td`,24),B(16,`app-source-link`,25),z()()),e&2){let e=t.$implicit,n=G(2);j(2),X(` `,e.fullPath,` `),j(),P(e.kind===`page`?-1:3),j(2),P(e.redirectTo===void 0?e.component?6:7:5),j(4),I(n.checks(e)),j(4),P(e.title?13:14),j(3),L(`file`,e.file)(`line`,e.line)}}function uI(e,t){if(e&1&&(R(0,`p`,17),J(1),z(),R(2,`div`,18)(3,`table`)(4,`thead`)(5,`tr`)(6,`th`,19),J(7,`Path`),z(),R(8,`th`,19),J(9,`Component / Target`),z(),R(10,`th`,19),J(11,`Guards and resolvers`),z(),R(12,`th`,19),J(13,`Title`),z(),R(14,`th`,19),J(15,`Declared in`),z()()(),R(16,`tbody`),F(17,lI,17,7,`tr`,null,Og),z()()()),e&2){let e=G();j(),rv(` `,e.filtered().length,` of `,e.routes().length,` route entries, `,e.navigable(),` navigable `),j(16),I(e.filtered())}}var dI=class e{rpc=$(null);showComponent=Rv();staticReport=Q(()=>vE(this.rpc()));routes=A([]);filter=A(``);loading=A(!1);error=A(!1);live=Jv(GF);liveHasConfig=Q(()=>!!this.live()?.page()?.config);expanded=Fv(()=>!this.liveHasConfig());navigable=Q(()=>this.filtered().filter(e=>e.kind===`page`).length);filtered=Q(()=>{let e=this.filter().toLowerCase().trim(),t=this.routes();return e?t.filter(t=>t.fullPath.toLowerCase().includes(e)||t.component&&t.component.toLowerCase().includes(e)||t.redirectTo&&t.redirectTo.toLowerCase().includes(e)||t.title&&t.title.toLowerCase().includes(e)||this.checks(t).some(t=>t.toLowerCase().includes(e))||t.file.toLowerCase().includes(e)):t});constructor(){fc(()=>{this.rpc()&&this.refresh()})}checks(e){return[...Object.entries(e.guards??{}).flatMap(([e,t])=>t.map(t=>`${e} ${t}`)),...(e.resolvers??[]).map(e=>`resolve ${e}`)]}onFilterInput(e){let t=e.target;this.filter.set(t?.value??``)}async refresh(){let e=this.rpc();if(e){this.loading.set(!0),this.error.set(!1);try{let t=await e.scope(`pangular`).rpc.call(`get-routes`);this.routes.set(t)}catch{this.error.set(!0)}finally{this.loading.set(!1)}}}static ɵfac=function(t){return new(t||e)};static ɵcmp=Gh({type:e,selectors:[[`app-route-inspector`]],viewQuery:function(e,t){e&1&&l_(t.live,GF,5),e&2&&u_()},inputs:{rpc:[1,`rpc`]},outputs:{showComponent:`showComponent`},decls:19,vars:9,consts:[[`filterInput`,``],[3,`showComponent`,`rpc`,`sources`],[`aria-labelledby`,`config-heading`,1,`config`],[1,`section-head`],[`id`,`config-heading`],[1,`muted`,`hint`],[`type`,`button`,`aria-controls`,`config-body`,1,`small`,`toggle`],[`id`,`config-body`,1,`config-body`,3,`hidden`],[1,`toolbar`],[`type`,`search`,`aria-label`,`Filter source routes`,`placeholder`,`Filter routes…`,1,`field`,3,`input`,`keydown.escape`,`value`],[`type`,`button`,1,`small`,3,`click`],[`role`,`alert`,1,`empty`],[`role`,`status`,1,`muted`,`empty`],[`type`,`button`,`aria-controls`,`config-body`,1,`small`,`toggle`,3,`click`],[1,`empty-title`],[1,`muted`],[1,`empty`],[1,`muted`,`count`],[`role`,`region`,`aria-label`,`Source route config table`,`tabindex`,`0`,1,`table-scroll`],[`scope`,`col`],[1,`path`],[1,`tag`],[1,`redirect`],[1,`component`],[1,`file`],[3,`file`,`line`],[`aria-hidden`,`true`],[1,`visually-hidden`],[`aria-hidden`,`true`,1,`nil`]],template:function(e,t){e&1&&(R(0,`app-live-route`,1),W(`showComponent`,function(e){return t.showComponent.emit(e)}),z(),R(1,`section`,2)(2,`div`,3)(3,`h2`,4),J(4,`Source route config`),z(),R(5,`span`,5),J(6,` Read from your source files. `),N(7,KF,1,0),z(),N(8,qF,2,2,`button`,6),z(),R(9,`div`,7)(10,`div`,8)(11,`input`,9,0),W(`input`,function(e){return t.onFilterInput(e)})(`keydown.escape`,function(){return t.filter.set(``)}),z(),R(13,`button`,10),W(`click`,function(){return t.refresh()}),J(14),z()(),N(15,XF,6,1,`div`,11)(16,ZF,2,0,`p`,12)(17,eI,2,1)(18,uI,19,3),z()()),e&2&&(L(`rpc`,t.rpc())(`sources`,t.routes()),j(7),P(t.liveHasConfig()?7:-1),j(),P(t.liveHasConfig()?8:-1),j(),L(`hidden`,!t.expanded()),j(2),L(`value`,t.filter()),j(2),M(`aria-busy`,t.loading()),j(),X(` `,t.loading()?`Scanning…`:`Refresh`,` `),j(),P(t.error()?15:t.loading()&&t.routes().length===0?16:t.filtered().length===0?17:18))},dependencies:[GF,OA],styles:[`.muted[_ngcontent-%COMP%] { +}`]})};function YF(e,t){e&1&&J(0,` The Routes tab above shows what the router uses. `)}function XF(e,t){if(e&1){let e=U();R(0,`button`,13),W(`click`,function(){D(e);let t=G();return O(t.expanded.set(!t.expanded()))}),J(1),z()}if(e&2){let e=G();M(`aria-expanded`,e.expanded()),j(),X(` `,e.expanded()?`Hide table`:`Show table`,` `)}}function ZF(e,t){e&1&&(J(0,` Run `),R(1,`code`),J(2,`pangular build`),z(),J(3,` again to rebuild the report. `))}function QF(e,t){e&1&&J(0,` Check that the dev server is running, then refresh. `)}function $F(e,t){if(e&1&&(R(0,`div`,11)(1,`p`,14),J(2,`Could not scan the route files.`),z(),R(3,`p`,15),N(4,ZF,4,0)(5,QF,1,0),z()()),e&2){let e=G();j(4),P(e.staticReport()?4:5)}}function eI(e,t){e&1&&(R(0,`p`,12),J(1,`Scanning routes…`),z())}function tI(e,t){if(e&1){let e=U();R(0,`div`,16)(1,`p`,14),J(2,`No routes match the filter.`),z(),R(3,`p`,15),J(4,`Search by path, component, guard, title or file name.`),z(),R(5,`button`,10),W(`click`,function(){D(e);let t=G(2),n=d_(12);return t.filter.set(``),O(n.focus())}),J(6,` Clear filter `),z()()}}function nI(e,t){e&1&&(R(0,`div`,16)(1,`p`,14),J(2,`No routes found.`),z(),R(3,`p`,15),J(4,` Routes are read from `),R(5,`code`),J(6,`*.routes.ts`),z(),J(7,` and `),R(8,`code`),J(9,`*routing.module.ts`),z(),J(10,` files, the files they lazy load, plus Analog pages. Add one and refresh. `),z()())}function rI(e,t){e&1&&N(0,tI,7,0,`div`,16)(1,nI,11,0,`div`,16),e&2&&P(+!G().routes().length)}function iI(e,t){if(e&1&&(R(0,`span`,21),J(1),z()),e&2){let e=G().$implicit;j(),Y(e.kind)}}function aI(e,t){if(e&1&&(R(0,`span`,22)(1,`span`,26),J(2,`→`),z(),R(3,`span`,27),J(4,`redirects to`),z(),J(5),z()),e&2){let e=G().$implicit;j(5),X(` `,e.redirectTo)}}function oI(e,t){if(e&1&&(R(0,`code`,23),J(1),z()),e&2){let e=G().$implicit;j(),Y(e.component)}}function sI(e,t){e&1&&(R(0,`span`,28),J(1,`–`),z(),R(2,`span`,27),J(3,`none`),z())}function cI(e,t){if(e&1&&(R(0,`span`,21),J(1),z()),e&2){let e=t.$implicit;j(),Y(e)}}function lI(e,t){e&1&&(R(0,`span`,28),J(1,`–`),z(),R(2,`span`,27),J(3,`none`),z())}function uI(e,t){if(e&1&&J(0),e&2){let e=G().$implicit;X(` `,e.title,` `)}}function dI(e,t){e&1&&(R(0,`span`,28),J(1,`–`),z(),R(2,`span`,27),J(3,`none`),z())}function fI(e,t){if(e&1&&(R(0,`tr`)(1,`td`,20),J(2),N(3,iI,2,1,`span`,21),z(),R(4,`td`),N(5,aI,6,1,`span`,22)(6,oI,2,1,`code`,23)(7,sI,4,0),z(),R(8,`td`),F(9,cI,2,1,`span`,21,Og,!1,lI,4,0),z(),R(12,`td`),N(13,uI,1,1)(14,dI,4,0),z(),R(15,`td`,24),B(16,`app-source-link`,25),z()()),e&2){let e=t.$implicit,n=G(2);j(2),X(` `,e.fullPath,` `),j(),P(e.kind===`page`?-1:3),j(2),P(e.redirectTo===void 0?e.component?6:7:5),j(4),I(n.checks(e)),j(4),P(e.title?13:14),j(3),L(`file`,e.file)(`line`,e.line)}}function pI(e,t){if(e&1&&(R(0,`p`,17),J(1),z(),R(2,`div`,18)(3,`table`)(4,`thead`)(5,`tr`)(6,`th`,19),J(7,`Path`),z(),R(8,`th`,19),J(9,`Component / Target`),z(),R(10,`th`,19),J(11,`Guards and resolvers`),z(),R(12,`th`,19),J(13,`Title`),z(),R(14,`th`,19),J(15,`Declared in`),z()()(),R(16,`tbody`),F(17,fI,17,7,`tr`,null,Og),z()()()),e&2){let e=G();j(),rv(` `,e.filtered().length,` of `,e.routes().length,` route entries, `,e.navigable(),` navigable `),j(16),I(e.filtered())}}var mI=class e{rpc=$(null);showComponent=Rv();staticReport=Q(()=>vE(this.rpc()));routes=A([]);filter=A(``);loading=A(!1);error=A(!1);live=Jv(JF);liveHasConfig=Q(()=>!!this.live()?.page()?.config);expanded=Fv(()=>!this.liveHasConfig());navigable=Q(()=>this.filtered().filter(e=>e.kind===`page`).length);filtered=Q(()=>{let e=this.filter().toLowerCase().trim(),t=this.routes();return e?t.filter(t=>t.fullPath.toLowerCase().includes(e)||t.component&&t.component.toLowerCase().includes(e)||t.redirectTo&&t.redirectTo.toLowerCase().includes(e)||t.title&&t.title.toLowerCase().includes(e)||this.checks(t).some(t=>t.toLowerCase().includes(e))||t.file.toLowerCase().includes(e)):t});constructor(){fc(()=>{this.rpc()&&this.refresh()})}checks(e){return[...Object.entries(e.guards??{}).flatMap(([e,t])=>t.map(t=>`${e} ${t}`)),...(e.resolvers??[]).map(e=>`resolve ${e}`)]}onFilterInput(e){let t=e.target;this.filter.set(t?.value??``)}async refresh(){let e=this.rpc();if(e){this.loading.set(!0),this.error.set(!1);try{let t=await e.scope(`pangular`).rpc.call(`get-routes`);this.routes.set(t)}catch{this.error.set(!0)}finally{this.loading.set(!1)}}}static ɵfac=function(t){return new(t||e)};static ɵcmp=Gh({type:e,selectors:[[`app-route-inspector`]],viewQuery:function(e,t){e&1&&l_(t.live,JF,5),e&2&&u_()},inputs:{rpc:[1,`rpc`]},outputs:{showComponent:`showComponent`},decls:19,vars:9,consts:[[`filterInput`,``],[3,`showComponent`,`rpc`,`sources`],[`aria-labelledby`,`config-heading`,1,`config`],[1,`section-head`],[`id`,`config-heading`],[1,`muted`,`hint`],[`type`,`button`,`aria-controls`,`config-body`,1,`small`,`toggle`],[`id`,`config-body`,1,`config-body`,3,`hidden`],[1,`toolbar`],[`type`,`search`,`aria-label`,`Filter source routes`,`placeholder`,`Filter routes…`,1,`field`,3,`input`,`keydown.escape`,`value`],[`type`,`button`,1,`small`,3,`click`],[`role`,`alert`,1,`empty`],[`role`,`status`,1,`muted`,`empty`],[`type`,`button`,`aria-controls`,`config-body`,1,`small`,`toggle`,3,`click`],[1,`empty-title`],[1,`muted`],[1,`empty`],[1,`muted`,`count`],[`role`,`region`,`aria-label`,`Source route config table`,`tabindex`,`0`,1,`table-scroll`],[`scope`,`col`],[1,`path`],[1,`tag`],[1,`redirect`],[1,`component`],[1,`file`],[3,`file`,`line`],[`aria-hidden`,`true`],[1,`visually-hidden`],[`aria-hidden`,`true`,1,`nil`]],template:function(e,t){e&1&&(R(0,`app-live-route`,1),W(`showComponent`,function(e){return t.showComponent.emit(e)}),z(),R(1,`section`,2)(2,`div`,3)(3,`h2`,4),J(4,`Source route config`),z(),R(5,`span`,5),J(6,` Read from your source files. `),N(7,YF,1,0),z(),N(8,XF,2,2,`button`,6),z(),R(9,`div`,7)(10,`div`,8)(11,`input`,9,0),W(`input`,function(e){return t.onFilterInput(e)})(`keydown.escape`,function(){return t.filter.set(``)}),z(),R(13,`button`,10),W(`click`,function(){return t.refresh()}),J(14),z()(),N(15,$F,6,1,`div`,11)(16,eI,2,0,`p`,12)(17,rI,2,1)(18,pI,19,3),z()()),e&2&&(L(`rpc`,t.rpc())(`sources`,t.routes()),j(7),P(t.liveHasConfig()?7:-1),j(),P(t.liveHasConfig()?8:-1),j(),L(`hidden`,!t.expanded()),j(2),L(`value`,t.filter()),j(2),M(`aria-busy`,t.loading()),j(),X(` `,t.loading()?`Scanning…`:`Refresh`,` `),j(),P(t.error()?15:t.loading()&&t.routes().length===0?16:t.filtered().length===0?17:18))},dependencies:[JF,jA],styles:[`.muted[_ngcontent-%COMP%] { color: var(--%NS%text-2); font-size: 13px; line-height: 1.5; @@ -5405,7 +5429,7 @@ h2[_ngcontent-%COMP%] { font-family: var(--%NS%font-mono); font-size: 12px; overflow-wrap: anywhere; -}`]})},fI=[`ArrowDown`,`ArrowUp`,`Home`,`End`],pI=`[aria-pressed="true"], [aria-expanded="true"], [aria-current]:not([aria-current="false"]), .selected`,mI=class e{appRovingList=$(``);host=T(Pl).nativeElement;current=null;focusInside=!1;constructor(){let e=T(Ts);Bd(()=>{if(this.sync(),typeof MutationObserver>`u`)return;let t=new MutationObserver(()=>this.sync());t.observe(this.host,{childList:!0,subtree:!0}),e.onDestroy(()=>t.disconnect())})}isItem(e){let t=this.appRovingList();return!!t&&!!e?.matches(t)}items(){let e=this.appRovingList();return e?[...this.host.querySelectorAll(e)]:[]}sync(){let e=this.items(),t=!1;if(!this.current||!this.host.contains(this.current)){let n=document.activeElement;t=this.focusInside&&(!n||n===document.body),this.current=e.find(e=>e.matches(pI))??e[0]??null}for(let t of e){let e=t===this.current?`0`:`-1`;t.getAttribute(`tabindex`)!==e&&t.setAttribute(`tabindex`,e)}t&&this.current?.focus()}onFocusIn(e){this.focusInside=!0;let t=e.target;this.isItem(t)&&t!==this.current&&(this.current?.setAttribute(`tabindex`,`-1`),this.current=t,t.setAttribute(`tabindex`,`0`))}onFocusOut(e){let t=e.relatedTarget;if(t&&this.host.contains(t))return;let n=e.target;setTimeout(()=>{n?.isConnected!==!1&&!this.host.contains(document.activeElement)&&(this.focusInside=!1)})}onKey(e){if(!fI.includes(e.key)||e.altKey||e.ctrlKey||e.metaKey)return;let t=e.target;if(!this.isItem(t))return;let n=this.items(),r=n.indexOf(t);if(r<0)return;let i={ArrowDown:Math.min(r+1,n.length-1),ArrowUp:Math.max(r-1,0),Home:0,End:n.length-1}[e.key];e.preventDefault(),n[i].focus()}static ɵfac=function(t){return new(t||e)};static ɵdir=Yh({type:e,selectors:[[``,`appRovingList`,``]],hostBindings:function(e,t){e&1&&W(`keydown`,function(e){return t.onKey(e)})(`focusin`,function(e){return t.onFocusIn(e)})(`focusout`,function(e){return t.onFocusOut(e)})},inputs:{appRovingList:[1,`appRovingList`]}})},hI=[`filterInput`],gI=e=>({id:e,label:`Status history`}),_I=e=>({id:e,label:`Value history`}),vI=(e,t)=>t.kind,yI=(e,t)=>t.name+t.file+t.line,bI=(e,t)=>t.epoch,xI=(e,t)=>t.id;function SI(e,t){if(e&1){let e=U();R(0,`div`,4)(1,`span`,15),J(2,`Page`),z(),R(3,`app-select`,16),W(`valueChange`,function(t){return D(e),O(G().selectPage(t))}),z()()}if(e&2){let e=G();j(3),L(`options`,e.pageOptions())(`value`,e.shownPageId())}}function CI(e,t){if(e&1){let e=U();R(0,`div`,5)(1,`span`,17),J(2,`Graph of`),z(),R(3,`app-select`,18),W(`valueChange`,function(t){return D(e),O(G().pickComponent(t))}),z()()}if(e&2){let e=G();j(3),L(`options`,e.componentOptions())(`value`,e.pickerValue())}}function wI(e,t){if(e&1&&(R(0,`span`,21),J(1),z()),e&2){let e=G(2);j(),Y(e.sourceNote(e.graph().source))}}function TI(e,t){if(e&1&&(R(0,`p`,7)(1,`span`,19),J(2),z(),R(3,`span`,20),J(4),z(),N(5,wI,2,1,`span`,21),z()),e&2){let e=t,n=G();j(2),Y(e.name),j(2),Y(e.path),j(),P(n.graph().source?5:-1)}}function EI(e,t){if(e&1&&(R(0,`p`,7)(1,`span`,19),J(2),z(),R(3,`span`,21),J(4,`environment injector`),z()()),e&2){let e=G();j(2),Y(e.injectorLabel(t))}}function DI(e,t){e&1&&(R(0,`p`,8),J(1,` The picked component or injector is gone or has no signal graph, so this shows another one. `),z())}function OI(e,t){e&1&&J(0,` The effects registered on this injector and the signals they read. A signal that no effect reads is not part of the graph. Pick a kind to filter. `)}function kI(e,t){e&1&&J(0,` The live signal graph of one component. Only signals that its template or an effect has read appear here; a signal nothing has read yet is not part of the graph. Pick a kind to filter. `)}function AI(e,t){e&1&&J(0,` Every signal, computed and effect found in your source. Pick a kind to filter. `)}function jI(e,t){e&1&&(R(0,`p`,8),J(1,` The live signal graph needs Angular 20.1 or later. This list comes from a source scan. `),z())}function MI(e,t){e&1&&(R(0,`p`,8),J(1,` The signal write hook did not load. Value history shows sampled values only, with no exact set entries. `),z())}function NI(e,t){if(e&1&&(R(0,`p`,8),J(1),z()),e&2){let e=G();j(),Z(` Showing `,e.graph().nodes.length,` of `,t,` signals. The rest and their edges are left out. `)}}function PI(e,t){if(e&1){let e=U();R(0,`button`,22),W(`click`,function(){let t=D(e).$implicit,n=G(2);return O(n.kind.set(n.kind()===t.kind?null:t.kind))}),B(1,`span`,25),R(2,`span`,26),J(3),z(),R(4,`span`,23),J(5),z()()}if(e&2){let e=t.$implicit,n=G(2);q(`active`,n.kind()===e.kind),M(`aria-pressed`,n.kind()===e.kind),j(),K(`background`,n.kindColor(e.kind)),j(2),Y(e.kind),j(2),Y(e.count)}}function FI(e,t){if(e&1){let e=U();R(0,`div`,10)(1,`button`,22),W(`click`,function(){return D(e),O(G().kind.set(null))}),J(2,` All `),R(3,`span`,23),J(4),z()(),F(5,PI,6,7,`button`,24,vI),z()}if(e&2){let e=G();j(),q(`active`,!e.kind()),M(`aria-pressed`,!e.kind()),j(3),Y(e.kindTotal()),j(),I(e.kindChips())}}function II(e,t){e&1&&(R(0,`div`,11),B(1,`span`,27),R(2,`p`,28),J(3,`Scanning source for signals…`),z()())}function LI(e,t){if(e&1){let e=U();R(0,`div`,29)(1,`p`,28),J(2,`Couldn't load signals`),z(),R(3,`p`,30),J(4,` The devtools server did not answer. Check that it is still running, then retry. `),z(),R(5,`button`,31),W(`click`,function(){return D(e),O(G().retry())}),J(6),z()()}if(e&2){let e=G();q(`compact`,e.sourceSignals().length>0),j(5),M(`aria-disabled`,e.retrying()||null),j(),X(` `,e.retrying()?`Retrying…`:`Retry`,` `)}}function RI(e,t){e&1&&(R(0,`div`,13)(1,`p`,28),J(2,`No signals found.`),z(),R(3,`p`,30),J(4,` No `),R(5,`code`),J(6,`signal()`),z(),J(7,`, `),R(8,`code`),J(9,`computed()`),z(),J(10,` or `),R(11,`code`),J(12,`effect()`),z(),J(13,` calls were found in your source. To see the live graph, run Angular 20.1 or later with the overlay connected and select a component. `),z()())}function zI(e,t){if(e&1&&(R(0,`span`,41),J(1,`·`),z(),R(2,`span`),J(3),z()),e&2){let e=G().$implicit;j(3),X(`in <`,e.component,`>`)}}function BI(e,t){if(e&1&&(R(0,`div`,34)(1,`div`,36)(2,`span`,37),J(3),z(),R(4,`span`,38),J(5),z()(),R(6,`div`,39),B(7,`app-source-link`,40),N(8,zI,4,1),z()()),e&2){let e=t.$implicit,n=G(2);j(2),K(`background`,n.kindColor(e.kind)),j(),Y(e.kind),j(2),Y(e.name),j(2),L(`file`,e.file)(`line`,e.line),j(),P(e.component?8:-1)}}function VI(e,t){if(e&1){let e=U();R(0,`div`,35)(1,`p`,28),J(2,`No signals match.`),z(),R(3,`p`,30),J(4,`Try a different name or kind.`),z(),R(5,`button`,31),W(`click`,function(){return D(e),O(G(2).clearFilters())}),J(6,`Clear filters`),z()()}}function HI(e,t){if(e&1&&(R(0,`p`,32),J(1,`Signals from source scan (static analysis):`),z(),R(2,`div`,33),F(3,BI,9,7,`div`,34,yI,!1,VI,7,0,`div`,35),z()),e&2){let e=G();j(3),I(e.filteredSourceSignals())}}function UI(e,t){if(e&1&&(R(0,`span`,47),J(1),z()),e&2){let e=G().$implicit;j(),X(``,e.missed,` earlier not captured`)}}function WI(e,t){if(e&1&&(R(0,`li`)(1,`span`,45)(2,`time`),J(3),xv(4,`date`),z(),R(5,`span`,46),J(6),z(),R(7,`span`),J(8),z(),N(9,UI,2,1,`span`,47),z(),R(10,`pre`),J(11),xv(12,`json`),z()()),e&2){let e=t.$implicit,n=G(3);j(3),Y(wv(4,7,e.at,`HH:mm:ss.SSS`)),j(2),M_(`source-`+e.source),j(),Y(n.sourceLabel(e.source)),j(2),X(`epoch `,e.epoch),j(),P(e.missed?9:-1),j(2),Y(Cv(12,10,e.value))}}function GI(e,t){if(e&1&&(R(0,`h4`,42),J(1),z(),R(2,`p`,43),J(3),z(),R(4,`ol`,44),F(5,WI,13,12,`li`,null,bI),z()),e&2){let e=G(),t=e.id,n=e.label,r=G();L(`id`,`history-heading-`+t),j(),Y(n),j(2),Y(r.historySummary(t)),j(),M(`aria-labelledby`,`history-heading-`+t),j(),I(r.selectedHistory())}}function KI(e,t){e&1&&N(0,GI,7,4),e&2&&P(G().selectedHistory().length?0:-1)}function qI(e,t){if(e&1&&(R(0,`span`,56),J(1),z()),e&2){let e=G().$implicit;M_(`tone-`+G(2).statusTone(e.status)),j(),Y(e.status)}}function JI(e,t){if(e&1&&(R(0,`span`,52),J(1),z()),e&2){let e=t;j(),Z(``,e,` `,e===1?`change`:`changes`)}}function YI(e,t){if(e&1&&(R(0,`span`,54),J(1),xv(2,`json`),z()),e&2){let e=G().$implicit;j(),Y(Cv(2,1,e.error))}}function XI(e,t){if(e&1&&(R(0,`span`,54),J(1),xv(2,`json`),z()),e&2){let e=G().$implicit;j(),Y(Cv(2,1,e.value))}}function ZI(e,t){e&1&&(R(0,`p`,30),J(1,` This resource has no name. Pass `),R(2,`code`),J(3,`debugName`),z(),J(4,` to `),R(5,`code`),J(6,`resource()`),z(),J(7,` or `),R(8,`code`),J(9,`httpResource()`),z(),J(10,` to name it here. `),z())}function QI(e,t){if(e&1&&(R(0,`dt`),J(1,`Loading`),z(),R(2,`dd`),J(3),z()),e&2){let e=G(2).$implicit;j(3),Y(e.isLoading?`yes`:`no`)}}function $I(e,t){if(e&1&&(R(0,`dt`),J(1,`HTTP status`),z(),R(2,`dd`),J(3),z()),e&2){let e=G(2).$implicit;j(3),Y(e.statusCode)}}function eL(e,t){if(e&1&&(R(0,`dt`),J(1,`Params`),z(),R(2,`dd`)(3,`pre`,60),J(4),xv(5,`json`),z()()),e&2){let e=G(2).$implicit;j(3),M(`aria-label`,`Params of `+e.name),j(),Y(Cv(5,2,e.params))}}function tL(e,t){if(e&1&&(R(0,`dt`),J(1,`Value`),z(),R(2,`dd`)(3,`pre`,60),J(4),xv(5,`json`),z()()),e&2){let e=G(2).$implicit;j(3),M(`aria-label`,`Value of `+e.name),j(),Y(Cv(5,2,e.value))}}function nL(e,t){if(e&1&&(R(0,`dt`),J(1,`Error`),z(),R(2,`dd`)(3,`pre`,60),J(4),xv(5,`json`),z()()),e&2){let e=G(2).$implicit;j(3),M(`aria-label`,`Error of `+e.name),j(),Y(Cv(5,2,e.error))}}function rL(e,t){if(e&1&&(R(0,`li`)(1,`span`,61),J(2),z(),R(3,`span`,62),J(4),z()()),e&2){let e=t.$implicit,n=G(5);j(),K(`background`,n.kindColor(e.kind)),j(),Y(e.kind),j(2),Y(e.label??e.id)}}function iL(e,t){if(e&1&&(R(0,`ul`,42),F(1,rL,5,4,`li`,null,xI),z()),e&2){let e=G(2).$implicit,t=G(2);L(`id`,`resource-internals-`+e.id),j(),I(t.internalsOf(e))}}function aL(e,t){if(e&1){let e=U();R(0,`div`,55)(1,`h3`,57),J(2),z(),N(3,ZI,11,0,`p`,30),R(4,`dl`)(5,`dt`),J(6,`Status`),z(),R(7,`dd`),J(8),z(),N(9,QI,4,1),N(10,$I,4,1),N(11,eL,6,4),N(12,tL,6,4),N(13,nL,6,4),z(),Wg(14,58),R(15,`button`,59),W(`click`,function(){D(e);let t=G(3);return O(t.showInternals.set(!t.showInternals()))}),J(16),z(),N(17,iL,3,1,`ul`,42),z()}if(e&2){let e=G().$implicit,t=G(2),n=d_(23);L(`id`,`signal-detail-`+e.id),j(2),Y(e.name),j(),P(e.named?-1:3),j(5),Y(e.status??`unknown`),j(),P(e.isLoading===void 0?-1:9),j(),P(e.statusCode===void 0?-1:10),j(),P(e.params===void 0?-1:11),j(),P(e.value===void 0?-1:12),j(),P(e.error===void 0?-1:13),j(),L(`ngTemplateOutlet`,n)(`ngTemplateOutletContext`,hv(16,gI,e.id)),j(),M(`aria-expanded`,t.showInternals())(`aria-controls`,`resource-internals-`+e.id),j(),Z(` `,t.showInternals()?`Hide`:`Show`,` internal signals (`,e.nodeIds.length,`) `),j(),P(t.showInternals()?17:-1)}}function oL(e,t){if(e&1){let e=U();R(0,`li`)(1,`button`,50),W(`click`,function(){let t=D(e).$implicit;return O(G(2).select(t.id))}),R(2,`span`,36)(3,`span`,37),J(4,`resource`),z(),R(5,`span`,38),J(6),z(),N(7,qI,2,3,`span`,51),N(8,JI,2,2,`span`,52),B(9,`span`,53),z(),N(10,YI,3,3,`span`,54)(11,XI,3,3,`span`,54),z(),N(12,aL,18,18,`div`,55),z()}if(e&2){let e,n=t.$implicit,r=G(2);j(),q(`selected`,r.selectedId()===n.id),M(`aria-expanded`,r.selectedId()===n.id)(`aria-controls`,`signal-detail-`+n.id)(`data-card`,n.id),j(2),K(`background`,r.kindColor(`resource`)),j(3),Y(n.name),j(),P(n.status?7:-1),j(),P((e=n.changes)?8:-1,e),j(2),P(n.error===void 0?n.value===void 0?-1:11:10),j(2),P(r.selectedId()===n.id?12:-1)}}function sL(e,t){if(e&1&&(R(0,`h2`,48),J(1,`Resources`),z(),R(2,`ul`,49),F(3,oL,13,12,`li`,null,xI),z()),e&2){let e=G();j(3),I(e.filteredResources())}}function cL(e,t){if(e&1&&(R(0,`span`,52),J(1),z()),e&2){let e=t;j(),Z(``,e,` `,e===1?`change`:`changes`)}}function lL(e,t){if(e&1&&(R(0,`span`,54),J(1),xv(2,`json`),z()),e&2){let e=G().$implicit;j(),Y(Cv(2,1,e.value))}}function uL(e,t){if(e&1&&(R(0,`span`,41),J(1,`·`),z(),R(2,`span`),J(3),z()),e&2){let e=G().$implicit,t=G(2);j(3),X(`Deps: `,t.getDependencies(e).length)}}function dL(e,t){if(e&1&&(R(0,`span`,41),J(1,`·`),z(),R(2,`span`),J(3),z()),e&2){let e=G().$implicit,t=G(2);j(3),X(`Consumers: `,t.getConsumers(e).length)}}function fL(e,t){if(e&1&&(R(0,`dt`),J(1,`Value`),z(),R(2,`dd`)(3,`pre`,60),J(4),xv(5,`json`),z()()),e&2){let e=G(4);j(3),M(`aria-label`,`Value of `+(e.selectedNode().label??`signal`)),j(),Y(Cv(5,2,e.selectedNode().value))}}function pL(e,t){if(e&1){let e=U();R(0,`li`)(1,`button`,65),W(`click`,function(){let t=D(e).$implicit;return O(G(5).jumpTo(t))}),R(2,`span`,61),J(3),z(),R(4,`span`,62),J(5),z()()()}if(e&2){let e=t.$implicit,n=G(5);j(),M(`aria-label`,`Go to `+e.kind+` `+(e.label??e.id)),j(),K(`background`,n.kindColor(e.kind)),j(),Y(e.kind),j(2),Y(e.label??e.id)}}function mL(e,t){if(e&1&&(R(0,`h4`),J(1,`Dependencies (producers)`),z(),R(2,`ul`),F(3,pL,6,5,`li`,null,xI),z()),e&2){let e=G(4);j(3),I(e.getDependencies(e.selectedNode()))}}function hL(e,t){if(e&1){let e=U();R(0,`li`)(1,`button`,65),W(`click`,function(){let t=D(e).$implicit;return O(G(5).jumpTo(t))}),R(2,`span`,61),J(3),z(),R(4,`span`,62),J(5),z()()()}if(e&2){let e=t.$implicit,n=G(5);j(),M(`aria-label`,`Go to `+e.kind+` `+(e.label??e.id)),j(),K(`background`,n.kindColor(e.kind)),j(),Y(e.kind),j(2),Y(e.label??e.id)}}function gL(e,t){if(e&1&&(R(0,`h4`),J(1,`Consumers`),z(),R(2,`ul`),F(3,hL,6,5,`li`,null,xI),z()),e&2){let e=G(4);j(3),I(e.getConsumers(e.selectedNode()))}}function _L(e,t){e&1&&(R(0,`p`,30),J(1),z()),e&2&&(j(),Y(t))}function vL(e,t){if(e&1&&(R(0,`div`,55)(1,`h3`,57),J(2),z(),R(3,`dl`)(4,`dt`),J(5,`Kind`),z(),R(6,`dd`),J(7),z(),R(8,`dt`),J(9,`Epoch`),z(),R(10,`dd`),J(11),z(),N(12,fL,6,4),z(),N(13,mL,5,0),N(14,gL,5,0),N(15,_L,2,1,`p`,30),Wg(16,58),z()),e&2){let e,t=G().$implicit,n=G(2),r=d_(23);L(`id`,`signal-detail-`+t.id),j(2),Y(n.selectedNode().label??n.selectedNode().id),j(5),Y(n.selectedNode().kind),j(4),Y(n.selectedNode().epoch),j(),P(n.selectedNode().value===void 0?-1:12),j(),P(n.getDependencies(n.selectedNode()).length?13:-1),j(),P(n.getConsumers(n.selectedNode()).length?14:-1),j(),P((e=n.writeHint())?15:-1,e),j(),L(`ngTemplateOutlet`,r)(`ngTemplateOutletContext`,hv(10,_I,t.id))}}function yL(e,t){if(e&1){let e=U();R(0,`li`)(1,`button`,50),W(`click`,function(){let t=D(e).$implicit;return O(G(2).select(t.id))}),R(2,`span`,36)(3,`span`,37),J(4),z(),R(5,`span`,38),J(6),z(),N(7,cL,2,2,`span`,52),B(8,`span`,53),z(),N(9,lL,3,3,`span`,54),R(10,`span`,39)(11,`span`),J(12),z(),N(13,uL,4,1),N(14,dL,4,1),z()(),N(15,vL,17,12,`div`,55),z()}if(e&2){let e,n=t.$implicit,r=G(2);j(),q(`selected`,r.selectedId()===n.id),M(`aria-expanded`,r.selectedId()===n.id)(`aria-controls`,`signal-detail-`+n.id)(`data-card`,n.id),j(2),K(`background`,r.kindColor(n.kind)),j(),Y(n.kind),j(2),Y(n.label??`(unnamed)`),j(),P((e=r.changeCount(n.id))?7:-1,e),j(2),P(n.value===void 0?-1:9),j(3),X(`Epoch: `,n.epoch),j(),P(r.getDependencies(n).length?13:-1),j(),P(r.getConsumers(n).length?14:-1),j(),P(r.selectedId()===n.id&&r.selectedNode()?15:-1)}}function bL(e,t){if(e&1){let e=U();R(0,`button`,31),W(`click`,function(){return D(e),O(G(3).clearFilters())}),J(1,`Clear filters`),z()}}function xL(e,t){if(e&1&&(R(0,`li`,64)(1,`p`,28),J(2),z(),R(3,`p`,30),J(4),z(),N(5,bL,2,0,`button`,66),z()),e&2){let e=G(2);j(2),X(` `,e.hasAnySignals()?`No signals match.`:`No signals in this graph.`,` `),j(2),X(` `,e.hasAnySignals()?`Try a different name or kind.`:`Select a component that reads signals, or interact with the page to create some.`,` `),j(),P(e.hasAnySignals()?5:-1)}}function SL(e,t){if(e&1&&(R(0,`h2`,48),J(1,`Signals`),z(),R(2,`ul`,63),F(3,yL,16,15,`li`,null,xI,!1,xL,6,3,`li`,64),z()),e&2){let e=G();j(3),I(e.filteredNodes())}}var CL=`follow`;function wL(e){return Object.keys(e.pages).length?e.pages:e.graph?{[e.graph.pageId??``]:e.graph}:{}}var TL=`env:`,EL=50,DL={selected:`picked`,routed:`rendered by the router`,root:`first component with signals`},OL={write:`set`,sample:`sampled`,initial:`initial`},kL={resolved:`ok`,local:`ok`,loading:`warn`,reloading:`warn`,error:`danger`},AL={signal:`#facc15`,computed:`#60a5fa`,linkedSignal:`#34d399`,effect:`#fb923c`,template:`#94a3b8`,afterRenderEffectPhase:`#f472b6`,childSignalProp:`#fef08a`,"input (signal)":`#f59e0b`,"input.required (signal)":`#f59e0b`,"output (signal)":`#ec4899`,"model (signal)":`#14b8a6`,"model.required (signal)":`#14b8a6`,"viewChild (signal)":`#a3e635`,"viewChild.required (signal)":`#a3e635`,"viewChildren (signal)":`#a3e635`,"contentChild (signal)":`#fda4af`,"contentChild.required (signal)":`#fda4af`,"contentChildren (signal)":`#fda4af`,resource:`#06b6d4`,unknown:`#a1a1aa`},jL=class e{rpc=$(null);destroyRef=T(Ts);host=T(Pl);filterInput=Jv(`filterInput`);injector=T(Cs);pageId=fE();cleanups=[];graphLoad=0;treePages=A({});graphState=A({graph:null,pages:{}});chosenPageId=A(null);announcement=A(``);graphPages=Q(()=>wL(this.graphState()));shownPageId=Fv({source:()=>({pages:this.graphPages(),newest:this.graphState().graph?.pageId??null,chosen:this.chosenPageId()}),computation:({pages:e,newest:t,chosen:n},r)=>{let i={};for(let n of Object.keys(e))i[n]={pageId:n,reportedAt:+(n===t)};return pE(i,{chosen:n,host:this.pageId,previous:r?.value??null})}});reported=Q(()=>{let e=this.shownPageId();return e===null?null:this.graphPages()[e]??null});unsupported=Q(()=>!!this.reported()?.unsupported);graph=Q(()=>{let e=this.reported();return e?.unsupported?null:e});graphOwner=Q(()=>{let e=this.graph();return e?`${e.pageId??``}|${e.component?.id??e.injector?.id??``}`:null});pickedByPage=A({});picked=Q(()=>this.pickedByPage()[this.targetPageId()??``]??null);pageOptions=Q(()=>{if(this.pageId)return[];let e=this.treePages();return Object.keys(this.graphPages()).map(t=>{let n=e[t];return{value:t,label:n?.title||n?.url||`Page ${t}`,hint:n?.url}})});showInternals=A(!1);sourceSignals=A([]);sourceLoaded=A(!1);sourceFailed=A(!1);graphFailed=A(!1);loadFailed=Q(()=>this.sourceFailed()||this.graphFailed());retrying=A(!1);filter=A(``);resources=Q(()=>this.graph()?.resources??[]);internalIds=Q(()=>new Set(this.resources().flatMap(e=>e.nodeIds)));visibleNodes=Q(()=>{let e=this.internalIds();return(this.graph()?.nodes??[]).filter(t=>!e.has(t.id))});hasAnySignals=Q(()=>this.visibleNodes().length+this.resources().length>0);kindCounts=Q(()=>{let e=this.graph()?[...this.visibleNodes().map(e=>e.kind),...this.resources().map(()=>`resource`)]:this.sourceSignals().map(e=>e.kind),t=new Map;for(let n of e)t.set(n,(t.get(n)??0)+1);return[...t].map(([e,t])=>({kind:e,count:t}))});kind=Fv({source:this.graphOwner,computation:(e,t)=>{let n=t?.value??null;return n&&Nv(this.kindCounts).some(e=>e.kind===n)?n:null}});kindChips=Q(()=>{let e=this.kindCounts(),t=this.kind();return t&&!e.some(e=>e.kind===t)?[...e,{kind:t,count:0}]:e});kindTotal=Q(()=>this.kindCounts().reduce((e,t)=>e+t.count,0));selectedId=Fv({source:this.graphOwner,computation:()=>null});selectedNode=Q(()=>this.graph()?.nodes.find(e=>e.id===this.selectedId())??null);jumpedPast=A(null);jumpNote=Q(()=>{let e=this.jumpedPast();return!e||this.filter()||this.kind()||this.selectedId()!==e.id?``:`Cleared the filters to show ${e.label}.`});selectedHistory=Q(()=>{let e=this.selectedId();return e?[...this.graph()?.history?.[e]??[]].reverse():[]});writeHint=Q(()=>{let e=this.selectedNode(),t=this.graph();if(!e||!t||t.writeHook===!1||e.kind!==`signal`&&e.kind!==`linkedSignal`)return``;if(!e.label)return`This signal has no name, so its history holds sampled values only. Pass a debugName in its options, for example signal(0, { debugName: 'count' }).`;let n=t.history?.[e.id]??[];return n.some(e=>e.source===`write`)||!n.some(e=>e.source===`sample`)?``:`Every change here was sampled. Writes are matched by name, kind, version and value, so another live signal with the same name and value can hide them.`});kindLegend=Object.entries(AL).map(([e,t])=>({kind:e,color:t}));filteredResources=Q(()=>{let e=this.filter().toLowerCase(),t=this.kind();return t&&t!==`resource`?[]:this.resources().filter(t=>!e||t.name.toLowerCase().includes(e)||e.length>=3&&`resource`.startsWith(e))});filteredNodes=Q(()=>{let e=this.filter().toLowerCase(),t=this.kind();return this.visibleNodes().filter(n=>(!t||n.kind===t)&&(!e||(n.label??``).toLowerCase().includes(e)||n.kind.toLowerCase().includes(e))).sort((e,t)=>e.id.localeCompare(t.id,void 0,{numeric:!0}))});filteredSourceSignals=Q(()=>{let e=this.filter().toLowerCase(),t=this.kind();return this.sourceSignals().filter(n=>(!t||n.kind===t)&&(!e||n.name.toLowerCase().includes(e)||n.kind.toLowerCase().includes(e)||n.file.toLowerCase().includes(e)))});targetPageId=Q(()=>this.pageId??(this.shownPageId()||null)??this.graph()?.pageId??this.latestTreePage()?.pageId??null);latestTreePage=Q(()=>{let e=null;for(let[t,n]of Object.entries(this.treePages())){let r=n.reportedAt??0;(!e||r>e.reportedAt)&&(e={pageId:t,reportedAt:r})}return e});componentOptions=Q(()=>{let e=this.targetPageId(),t=(e?this.treePages()[e]?.roots:void 0)??[],n=[],r=e=>{for(let t of e)n.push(t),r(t.children)};r(t);let i=this.graph()?.environments??[];if(!n.length&&!i.length)return[];let a=new Map;for(let e of n)a.set(e.name,(a.get(e.name)??0)+1);let o=new Map,s=[{value:CL,label:`Follow the routed component`,hint:`automatic`},...i.map(e=>({value:TL+e.id,label:this.injectorLabel(e),hint:`injector`}))];for(let e of n){let t=(o.get(e.name)??0)+1;o.set(e.name,t),s.push({value:e.id,label:(a.get(e.name)??0)>1?`${e.name} #${t}`:e.name,hint:`<${e.tag}>`})}return s});pickerValue=Q(()=>{let e=this.picked();return e&&this.componentOptions().some(t=>t.value===e)?e:CL});constructor(){fc(()=>{let e=this.rpc();e&&(this.loadSignalGraph(e),this.loadSourceSignals(e))}),this.destroyRef.onDestroy(()=>{for(let e of this.cleanups.splice(0))e()})}async loadSignalGraph(e){for(let e of this.cleanups.splice(0))e();let t=++this.graphLoad,n=()=>this.destroyRef.destroyed||t!==this.graphLoad,r=e.scope(`pangular`);try{let e=await r.rpc.sharedState(`signal-graph`);if(n())return;this.graphFailed.set(!1);let t=e=>{let t=e,n=t?.pages&&typeof t.pages==`object`?t.pages:{},r={graph:t?.graph??null,pages:n};this.notePageGone(wL(r)),this.graphState.set(r)};t(e.value()),this.cleanups.push(e.on(`updated`,t))}catch{if(n())return;this.graphState.set({graph:null,pages:{}}),this.graphFailed.set(!0)}try{let e=await r.rpc.sharedState(`component-tree`);if(n())return;let t=e=>{let t=e?.pages;this.treePages.set(t&&typeof t==`object`?t:{})};t(e.value()),this.cleanups.push(e.on(`updated`,t))}catch{n()||this.treePages.set({})}}notePageGone(e){let t=Object.keys(this.graphPages()).filter(t=>!e[t]);t.length&&this.pickedByPage.update(e=>{let n={...e};for(let e of t)delete n[e];return n});let n=this.chosenPageId();if(!n||e[n])return;let r=this.pageOptions().find(e=>e.value===n)?.label??`The chosen page`;this.chosenPageId.set(null),this.announcement.set(`${r} closed, so this shows another page.`)}selectPage(e){if(!e||e===this.shownPageId())return;this.chosenPageId.set(e);let t=this.pageOptions().find(t=>t.value===e)?.label??e;this.announcement.set(`Showing the signal graph of ${t}.`)}pickComponent(e){let t=e&&e!==CL?e:null,n=this.targetPageId()??void 0;this.pickedByPage.update(e=>{let r={...e};return t?r[n??``]=t:delete r[n??``],r});let r=this.rpc();if(!r)return;let i=t?.startsWith(TL)?{pageId:n,env:t.slice(4)}:{pageId:n,id:t};r.scope(`pangular`).rpc.call(`select-signal-target`,i).catch(()=>{})}injectorLabel(e){return e.name===`Root`?`Root services`:e.name}sourceNote(e){return DL[e]}async loadSourceSignals(e){let t=e.scope(`pangular`);try{let e=await t.rpc.call(`get-signals`);this.sourceSignals.set(e),this.sourceFailed.set(!1)}catch{this.sourceFailed.set(!0)}finally{this.sourceLoaded.set(!0)}}async retry(){let e=this.rpc();if(!e||this.retrying())return;let t=document.activeElement;this.retrying.set(!0);try{await Promise.all([this.loadSignalGraph(e),this.loadSourceSignals(e)])}finally{this.retrying.set(!1)}this.destroyRef.destroyed||Bd(()=>{(!t?.isConnected||document.activeElement===document.body)&&this.filterInput()?.nativeElement.focus()},{injector:this.injector})}clearFilters(){this.resetFilters(),this.filterInput()?.nativeElement.focus()}resetFilters(){this.filter.set(``),this.kind.set(null)}select(e){this.selectedId.set(this.selectedId()===e?null:e),this.showInternals.set(!1)}jumpTo(e){let t=this.resources().find(t=>t.nodeIds.includes(e.id)),n=t?.id??e.id,r=t?!this.filteredResources().some(e=>e.id===n):!this.filteredNodes().some(e=>e.id===n);r&&this.resetFilters(),this.jumpedPast.set(r?{id:n,label:t?.name??e.label??e.id}:null),this.selectedId.set(n),this.showInternals.set(!!t),Bd(()=>{let e=[...this.host.nativeElement.querySelectorAll(`.node-card[data-card]`)].find(e=>e.dataset.card===n);e?.scrollIntoView?.({block:`nearest`}),e?.focus({preventScroll:!0})},{injector:this.injector})}changeCount(e){let t=this.graph(),n=t?.nodes.find(t=>t.id===e)?.changes??t?.resources?.find(t=>t.id===e)?.changes;return n===void 0?(t?.history?.[e]??[]).reduce((e,t)=>e+(t.source===`initial`?0:1+(t.missed??0)),0):n}historySummary(e){let t=this.changeCount(e),n=this.graph()?.history?.[e]?.length??0;return t?`${`${t} ${t===1?`change`:`changes`} recorded`}${n>=EL&&t>=n?`, showing the last ${n}`:``}, newest first.`:`No changes recorded yet. The entry below is the value seen first.`}statusTone(e){return kL[e]??`neutral`}internalsOf(e){let t=new Set(e.nodeIds);return(this.graph()?.nodes??[]).filter(e=>t.has(e.id))}sourceLabel(e){return OL[e]}kindColor(e){return AL[e]??AL.unknown}relations=Q(()=>{let e=new Map,t=this.graph();if(!t)return e;for(let n of t.nodes)e.set(n.id,{deps:[],consumers:[]});for(let n of t.edges){let r=t.nodes[n.producer],i=t.nodes[n.consumer];r&&i&&(e.get(i.id)?.deps.push(r),e.get(r.id)?.consumers.push(i))}return e});getDependencies(e){return this.relations().get(e.id)?.deps??[]}getConsumers(e){return this.relations().get(e.id)?.consumers??[]}static ɵfac=function(t){return new(t||e)};static ɵcmp=Gh({type:e,selectors:[[`app-signal-inspector`]],viewQuery:function(e,t){e&1&&l_(t.filterInput,hI,5),e&2&&u_()},inputs:{rpc:[1,`rpc`]},decls:28,vars:17,consts:[[`filterInput`,``],[`historyTpl`,``],[1,`toolbar`],[`type`,`search`,`placeholder`,`Filter by name or kind…`,`aria-label`,`Filter signals by name or kind`,3,`input`,`keydown.escape`,`value`],[1,`picker`,`page-picker`],[1,`picker`],[`role`,`status`,1,`sr-only`],[1,`showing`],[`role`,`status`,1,`fallback`],[1,`intro`],[`role`,`group`,`aria-label`,`Filter by kind`,1,`kinds`],[`role`,`status`,1,`empty`],[`role`,`alert`,1,`empty`,3,`compact`],[1,`empty`],[`role`,`status`,1,`jump-note`],[`id`,`signals-page-label`,1,`label-key`],[`labelledBy`,`signals-page-label`,3,`valueChange`,`options`,`value`],[`id`,`signals-component-label`,1,`label-key`],[`labelledBy`,`signals-component-label`,3,`valueChange`,`options`,`value`],[1,`showing-name`],[1,`mono`],[1,`source-note`],[`type`,`button`,1,`kind-chip`,3,`click`],[1,`count`],[`type`,`button`,1,`kind-chip`,3,`active`],[`aria-hidden`,`true`,1,`dot`],[1,`chip-text`],[`aria-hidden`,`true`,1,`spinner`],[1,`empty-title`],[`role`,`alert`,1,`empty`],[1,`hint`],[`type`,`button`,1,`reset`,3,`click`],[1,`source-label`],[1,`nodes`],[1,`node-card`],[`role`,`status`,1,`empty`,`compact`],[1,`node-header`],[1,`kind-badge`],[1,`node-label`],[1,`node-meta`],[1,`file`,3,`file`,`line`],[`aria-hidden`,`true`,1,`sep`],[3,`id`],[1,`history-summary`],[`tabindex`,`0`,1,`history`,`scroll-box`],[1,`history-meta`],[1,`source-tag`],[1,`missed`],[1,`list-heading`],[`role`,`list`,1,`nodes`,`resources`],[`type`,`button`,1,`node-card`,3,`click`],[1,`status-tag`,3,`class`],[1,`changed-badge`],[`aria-hidden`,`true`,1,`chevron`],[1,`node-value`],[1,`detail-panel`,3,`id`],[1,`status-tag`],[1,`detail-title`],[3,`ngTemplateOutlet`,`ngTemplateOutletContext`],[`type`,`button`,1,`reset`,`internals-toggle`,3,`click`],[`role`,`region`,`tabindex`,`0`,1,`scroll-box`],[1,`kind-badge`,`sm`],[1,`rel-label`],[`role`,`list`,`appRovingList`,`button.node-card`,1,`nodes`],[1,`empty`,`compact`],[`type`,`button`,1,`rel-link`,3,`click`],[`type`,`button`,1,`reset`]],template:function(e,t){if(e&1&&(R(0,`div`,2)(1,`input`,3,0),W(`input`,function(e){return t.filter.set(e.target.value)})(`keydown.escape`,function(){return t.filter.set(``)}),z(),N(3,SI,4,2,`div`,4),N(4,CI,4,2,`div`,5),z(),R(5,`p`,6),J(6),z(),N(7,TI,6,3,`p`,7)(8,EI,5,1,`p`,7),N(9,DI,2,0,`p`,8),R(10,`p`,9),N(11,OI,1,0)(12,kI,1,0)(13,AI,1,0),z(),N(14,jI,2,0,`p`,8),N(15,MI,2,0,`p`,8),N(16,NI,2,2,`p`,8),N(17,FI,7,4,`div`,10),N(18,II,4,0,`div`,11),N(19,LI,7,4,`div`,12)(20,RI,14,0,`div`,13),N(21,HI,6,1),og(22,KI,1,1,`ng-template`,null,1,Ev),R(24,`p`,14),J(25),z(),N(26,sL,5,0),N(27,SL,6,1)),e&2){let e,n;j(),L(`value`,t.filter()),j(2),P(t.pageOptions().length>1?3:-1),j(),P(t.componentOptions().length?4:-1),j(2),Y(t.announcement()),j(),P((e=t.graph()?.component)?7:(e=t.graph()?.injector)?8:-1,e),j(2),P(t.graph()&&t.picked()&&t.graph().source!==`selected`?9:-1),j(2),P(t.graph()?.injector?11:t.graph()?12:13),j(3),P(t.unsupported()?14:-1),j(),P(t.graph()?.writeHook===!1?15:-1),j(),P((n=t.graph()?.nodeCount)?16:-1,n),j(),P(t.kindChips().length?17:-1),j(),P(!t.graph()&&!t.sourceLoaded()?18:-1),j(),P(!t.graph()&&t.sourceLoaded()&&t.loadFailed()?19:!t.graph()&&t.sourceLoaded()&&t.sourceSignals().length===0?20:-1),j(2),P(!t.graph()&&t.sourceSignals().length>0?21:-1),j(4),Y(t.jumpNote()),j(),P(t.graph()&&t.filteredResources().length?26:-1),j(),P(t.graph()&&(t.visibleNodes().length||!t.filteredResources().length)?27:-1)}},dependencies:[lb,mI,qD,OA,mb,hb],styles:[`[_nghost-%COMP%] { +}`]})},hI=[`ArrowDown`,`ArrowUp`,`Home`,`End`],gI=`[aria-pressed="true"], [aria-expanded="true"], [aria-current]:not([aria-current="false"]), .selected`,_I=class e{appRovingList=$(``);host=T(Pl).nativeElement;current=null;focusInside=!1;constructor(){let e=T(Ts);Bd(()=>{if(this.sync(),typeof MutationObserver>`u`)return;let t=new MutationObserver(()=>this.sync());t.observe(this.host,{childList:!0,subtree:!0}),e.onDestroy(()=>t.disconnect())})}isItem(e){let t=this.appRovingList();return!!t&&!!e?.matches(t)}items(){let e=this.appRovingList();return e?[...this.host.querySelectorAll(e)]:[]}sync(){let e=this.items(),t=!1;if(!this.current||!this.host.contains(this.current)){let n=document.activeElement;t=this.focusInside&&(!n||n===document.body),this.current=e.find(e=>e.matches(gI))??e[0]??null}for(let t of e){let e=t===this.current?`0`:`-1`;t.getAttribute(`tabindex`)!==e&&t.setAttribute(`tabindex`,e)}t&&this.current?.focus()}onFocusIn(e){this.focusInside=!0;let t=e.target;this.isItem(t)&&t!==this.current&&(this.current?.setAttribute(`tabindex`,`-1`),this.current=t,t.setAttribute(`tabindex`,`0`))}onFocusOut(e){let t=e.relatedTarget;if(t&&this.host.contains(t))return;let n=e.target;setTimeout(()=>{n?.isConnected!==!1&&!this.host.contains(document.activeElement)&&(this.focusInside=!1)})}onKey(e){if(!hI.includes(e.key)||e.altKey||e.ctrlKey||e.metaKey)return;let t=e.target;if(!this.isItem(t))return;let n=this.items(),r=n.indexOf(t);if(r<0)return;let i={ArrowDown:Math.min(r+1,n.length-1),ArrowUp:Math.max(r-1,0),Home:0,End:n.length-1}[e.key];e.preventDefault(),n[i].focus()}static ɵfac=function(t){return new(t||e)};static ɵdir=Yh({type:e,selectors:[[``,`appRovingList`,``]],hostBindings:function(e,t){e&1&&W(`keydown`,function(e){return t.onKey(e)})(`focusin`,function(e){return t.onFocusIn(e)})(`focusout`,function(e){return t.onFocusOut(e)})},inputs:{appRovingList:[1,`appRovingList`]}})},vI=[`filterInput`],yI=e=>({id:e,label:`Status history`}),bI=e=>({id:e,label:`Value history`}),xI=(e,t)=>t.kind,SI=(e,t)=>t.name+t.file+t.line,CI=(e,t)=>t.epoch,wI=(e,t)=>t.id;function TI(e,t){if(e&1){let e=U();R(0,`div`,4)(1,`span`,15),J(2,`Page`),z(),R(3,`app-select`,16),W(`valueChange`,function(t){return D(e),O(G().selectPage(t))}),z()()}if(e&2){let e=G();j(3),L(`options`,e.pageOptions())(`value`,e.shownPageId())}}function EI(e,t){if(e&1){let e=U();R(0,`div`,5)(1,`span`,17),J(2,`Graph of`),z(),R(3,`app-select`,18),W(`valueChange`,function(t){return D(e),O(G().pickComponent(t))}),z()()}if(e&2){let e=G();j(3),L(`options`,e.componentOptions())(`value`,e.pickerValue())}}function DI(e,t){if(e&1&&(R(0,`span`,21),J(1),z()),e&2){let e=G(2);j(),Y(e.sourceNote(e.graph().source))}}function OI(e,t){if(e&1&&(R(0,`p`,7)(1,`span`,19),J(2),z(),R(3,`span`,20),J(4),z(),N(5,DI,2,1,`span`,21),z()),e&2){let e=t,n=G();j(2),Y(e.name),j(2),Y(e.path),j(),P(n.graph().source?5:-1)}}function kI(e,t){if(e&1&&(R(0,`p`,7)(1,`span`,19),J(2),z(),R(3,`span`,21),J(4,`environment injector`),z()()),e&2){let e=G();j(2),Y(e.injectorLabel(t))}}function AI(e,t){e&1&&(R(0,`p`,8),J(1,` The picked component or injector is gone or has no signal graph, so this shows another one. `),z())}function jI(e,t){e&1&&J(0,` The effects registered on this injector and the signals they read. A signal that no effect reads is not part of the graph. Pick a kind to filter. `)}function MI(e,t){e&1&&J(0,` The live signal graph of one component. Only signals that its template or an effect has read appear here; a signal nothing has read yet is not part of the graph. Pick a kind to filter. `)}function NI(e,t){e&1&&J(0,` Every signal, computed and effect found in your source. Pick a kind to filter. `)}function PI(e,t){e&1&&(R(0,`p`,8),J(1,` The live signal graph needs Angular 20.1 or later. This list comes from a source scan. `),z())}function FI(e,t){e&1&&(R(0,`p`,8),J(1,` The signal write hook did not load. Value history shows sampled values only, with no exact set entries. `),z())}function II(e,t){if(e&1&&(R(0,`p`,8),J(1),z()),e&2){let e=G();j(),Z(` Showing `,e.graph().nodes.length,` of `,t,` signals. The rest and their edges are left out. `)}}function LI(e,t){if(e&1){let e=U();R(0,`button`,22),W(`click`,function(){let t=D(e).$implicit,n=G(2);return O(n.kind.set(n.kind()===t.kind?null:t.kind))}),B(1,`span`,25),R(2,`span`,26),J(3),z(),R(4,`span`,23),J(5),z()()}if(e&2){let e=t.$implicit,n=G(2);q(`active`,n.kind()===e.kind),M(`aria-pressed`,n.kind()===e.kind),j(),K(`background`,n.kindColor(e.kind)),j(2),Y(e.kind),j(2),Y(e.count)}}function RI(e,t){if(e&1){let e=U();R(0,`div`,10)(1,`button`,22),W(`click`,function(){return D(e),O(G().kind.set(null))}),J(2,` All `),R(3,`span`,23),J(4),z()(),F(5,LI,6,7,`button`,24,xI),z()}if(e&2){let e=G();j(),q(`active`,!e.kind()),M(`aria-pressed`,!e.kind()),j(3),Y(e.kindTotal()),j(),I(e.kindChips())}}function zI(e,t){e&1&&(R(0,`div`,11),B(1,`span`,27),R(2,`p`,28),J(3,`Scanning source for signals…`),z()())}function BI(e,t){if(e&1){let e=U();R(0,`div`,29)(1,`p`,28),J(2,`Couldn't load signals`),z(),R(3,`p`,30),J(4,` The devtools server did not answer. Check that it is still running, then retry. `),z(),R(5,`button`,31),W(`click`,function(){return D(e),O(G().retry())}),J(6),z()()}if(e&2){let e=G();q(`compact`,e.sourceSignals().length>0),j(5),M(`aria-disabled`,e.retrying()||null),j(),X(` `,e.retrying()?`Retrying…`:`Retry`,` `)}}function VI(e,t){e&1&&(R(0,`div`,13)(1,`p`,28),J(2,`No signals found.`),z(),R(3,`p`,30),J(4,` No `),R(5,`code`),J(6,`signal()`),z(),J(7,`, `),R(8,`code`),J(9,`computed()`),z(),J(10,` or `),R(11,`code`),J(12,`effect()`),z(),J(13,` calls were found in your source. To see the live graph, run Angular 20.1 or later with the overlay connected and select a component. `),z()())}function HI(e,t){if(e&1&&(R(0,`span`,41),J(1,`·`),z(),R(2,`span`),J(3),z()),e&2){let e=G().$implicit;j(3),X(`in <`,e.component,`>`)}}function UI(e,t){if(e&1&&(R(0,`div`,34)(1,`div`,36)(2,`span`,37),J(3),z(),R(4,`span`,38),J(5),z()(),R(6,`div`,39),B(7,`app-source-link`,40),N(8,HI,4,1),z()()),e&2){let e=t.$implicit,n=G(2);j(2),K(`background`,n.kindColor(e.kind)),j(),Y(e.kind),j(2),Y(e.name),j(2),L(`file`,e.file)(`line`,e.line),j(),P(e.component?8:-1)}}function WI(e,t){if(e&1){let e=U();R(0,`div`,35)(1,`p`,28),J(2,`No signals match.`),z(),R(3,`p`,30),J(4,`Try a different name or kind.`),z(),R(5,`button`,31),W(`click`,function(){return D(e),O(G(2).clearFilters())}),J(6,`Clear filters`),z()()}}function GI(e,t){if(e&1&&(R(0,`p`,32),J(1,`Signals from source scan (static analysis):`),z(),R(2,`div`,33),F(3,UI,9,7,`div`,34,SI,!1,WI,7,0,`div`,35),z()),e&2){let e=G();j(3),I(e.filteredSourceSignals())}}function KI(e,t){if(e&1&&(R(0,`span`,47),J(1),z()),e&2){let e=G().$implicit;j(),X(``,e.missed,` earlier not captured`)}}function qI(e,t){if(e&1&&(R(0,`li`)(1,`span`,45)(2,`time`),J(3),xv(4,`date`),z(),R(5,`span`,46),J(6),z(),R(7,`span`),J(8),z(),N(9,KI,2,1,`span`,47),z(),R(10,`pre`),J(11),xv(12,`json`),z()()),e&2){let e=t.$implicit,n=G(3);j(3),Y(wv(4,7,e.at,`HH:mm:ss.SSS`)),j(2),M_(`source-`+e.source),j(),Y(n.sourceLabel(e.source)),j(2),X(`epoch `,e.epoch),j(),P(e.missed?9:-1),j(2),Y(Cv(12,10,e.value))}}function JI(e,t){if(e&1&&(R(0,`h4`,42),J(1),z(),R(2,`p`,43),J(3),z(),R(4,`ol`,44),F(5,qI,13,12,`li`,null,CI),z()),e&2){let e=G(),t=e.id,n=e.label,r=G();L(`id`,`history-heading-`+t),j(),Y(n),j(2),Y(r.historySummary(t)),j(),M(`aria-labelledby`,`history-heading-`+t),j(),I(r.selectedHistory())}}function YI(e,t){e&1&&N(0,JI,7,4),e&2&&P(G().selectedHistory().length?0:-1)}function XI(e,t){if(e&1&&(R(0,`span`,56),J(1),z()),e&2){let e=G().$implicit;M_(`tone-`+G(2).statusTone(e.status)),j(),Y(e.status)}}function ZI(e,t){if(e&1&&(R(0,`span`,52),J(1),z()),e&2){let e=t;j(),Z(``,e,` `,e===1?`change`:`changes`)}}function QI(e,t){if(e&1&&(R(0,`span`,54),J(1),xv(2,`json`),z()),e&2){let e=G().$implicit;j(),Y(Cv(2,1,e.error))}}function $I(e,t){if(e&1&&(R(0,`span`,54),J(1),xv(2,`json`),z()),e&2){let e=G().$implicit;j(),Y(Cv(2,1,e.value))}}function eL(e,t){e&1&&(R(0,`p`,30),J(1,` This resource has no name. Pass `),R(2,`code`),J(3,`debugName`),z(),J(4,` to `),R(5,`code`),J(6,`resource()`),z(),J(7,` or `),R(8,`code`),J(9,`httpResource()`),z(),J(10,` to name it here. `),z())}function tL(e,t){if(e&1&&(R(0,`dt`),J(1,`Loading`),z(),R(2,`dd`),J(3),z()),e&2){let e=G(2).$implicit;j(3),Y(e.isLoading?`yes`:`no`)}}function nL(e,t){if(e&1&&(R(0,`dt`),J(1,`HTTP status`),z(),R(2,`dd`),J(3),z()),e&2){let e=G(2).$implicit;j(3),Y(e.statusCode)}}function rL(e,t){if(e&1&&(R(0,`dt`),J(1,`Params`),z(),R(2,`dd`)(3,`pre`,60),J(4),xv(5,`json`),z()()),e&2){let e=G(2).$implicit;j(3),M(`aria-label`,`Params of `+e.name),j(),Y(Cv(5,2,e.params))}}function iL(e,t){if(e&1&&(R(0,`dt`),J(1,`Value`),z(),R(2,`dd`)(3,`pre`,60),J(4),xv(5,`json`),z()()),e&2){let e=G(2).$implicit;j(3),M(`aria-label`,`Value of `+e.name),j(),Y(Cv(5,2,e.value))}}function aL(e,t){if(e&1&&(R(0,`dt`),J(1,`Error`),z(),R(2,`dd`)(3,`pre`,60),J(4),xv(5,`json`),z()()),e&2){let e=G(2).$implicit;j(3),M(`aria-label`,`Error of `+e.name),j(),Y(Cv(5,2,e.error))}}function oL(e,t){if(e&1&&(R(0,`li`)(1,`span`,61),J(2),z(),R(3,`span`,62),J(4),z()()),e&2){let e=t.$implicit,n=G(5);j(),K(`background`,n.kindColor(e.kind)),j(),Y(e.kind),j(2),Y(e.label??e.id)}}function sL(e,t){if(e&1&&(R(0,`ul`,42),F(1,oL,5,4,`li`,null,wI),z()),e&2){let e=G(2).$implicit,t=G(2);L(`id`,`resource-internals-`+e.id),j(),I(t.internalsOf(e))}}function cL(e,t){if(e&1){let e=U();R(0,`div`,55)(1,`h3`,57),J(2),z(),N(3,eL,11,0,`p`,30),R(4,`dl`)(5,`dt`),J(6,`Status`),z(),R(7,`dd`),J(8),z(),N(9,tL,4,1),N(10,nL,4,1),N(11,rL,6,4),N(12,iL,6,4),N(13,aL,6,4),z(),Wg(14,58),R(15,`button`,59),W(`click`,function(){D(e);let t=G(3);return O(t.showInternals.set(!t.showInternals()))}),J(16),z(),N(17,sL,3,1,`ul`,42),z()}if(e&2){let e=G().$implicit,t=G(2),n=d_(23);L(`id`,`signal-detail-`+e.id),j(2),Y(e.name),j(),P(e.named?-1:3),j(5),Y(e.status??`unknown`),j(),P(e.isLoading===void 0?-1:9),j(),P(e.statusCode===void 0?-1:10),j(),P(e.params===void 0?-1:11),j(),P(e.value===void 0?-1:12),j(),P(e.error===void 0?-1:13),j(),L(`ngTemplateOutlet`,n)(`ngTemplateOutletContext`,hv(16,yI,e.id)),j(),M(`aria-expanded`,t.showInternals())(`aria-controls`,`resource-internals-`+e.id),j(),Z(` `,t.showInternals()?`Hide`:`Show`,` internal signals (`,e.nodeIds.length,`) `),j(),P(t.showInternals()?17:-1)}}function lL(e,t){if(e&1){let e=U();R(0,`li`)(1,`button`,50),W(`click`,function(){let t=D(e).$implicit;return O(G(2).select(t.id))}),R(2,`span`,36)(3,`span`,37),J(4,`resource`),z(),R(5,`span`,38),J(6),z(),N(7,XI,2,3,`span`,51),N(8,ZI,2,2,`span`,52),B(9,`span`,53),z(),N(10,QI,3,3,`span`,54)(11,$I,3,3,`span`,54),z(),N(12,cL,18,18,`div`,55),z()}if(e&2){let e,n=t.$implicit,r=G(2);j(),q(`selected`,r.selectedId()===n.id),M(`aria-expanded`,r.selectedId()===n.id)(`aria-controls`,`signal-detail-`+n.id)(`data-card`,n.id),j(2),K(`background`,r.kindColor(`resource`)),j(3),Y(n.name),j(),P(n.status?7:-1),j(),P((e=n.changes)?8:-1,e),j(2),P(n.error===void 0?n.value===void 0?-1:11:10),j(2),P(r.selectedId()===n.id?12:-1)}}function uL(e,t){if(e&1&&(R(0,`h2`,48),J(1,`Resources`),z(),R(2,`ul`,49),F(3,lL,13,12,`li`,null,wI),z()),e&2){let e=G();j(3),I(e.filteredResources())}}function dL(e,t){if(e&1&&(R(0,`span`,52),J(1),z()),e&2){let e=t;j(),Z(``,e,` `,e===1?`change`:`changes`)}}function fL(e,t){if(e&1&&(R(0,`span`,54),J(1),xv(2,`json`),z()),e&2){let e=G().$implicit;j(),Y(Cv(2,1,e.value))}}function pL(e,t){if(e&1&&(R(0,`span`,41),J(1,`·`),z(),R(2,`span`),J(3),z()),e&2){let e=G().$implicit,t=G(2);j(3),X(`Deps: `,t.getDependencies(e).length)}}function mL(e,t){if(e&1&&(R(0,`span`,41),J(1,`·`),z(),R(2,`span`),J(3),z()),e&2){let e=G().$implicit,t=G(2);j(3),X(`Consumers: `,t.getConsumers(e).length)}}function hL(e,t){if(e&1&&(R(0,`dt`),J(1,`Value`),z(),R(2,`dd`)(3,`pre`,60),J(4),xv(5,`json`),z()()),e&2){let e=G(4);j(3),M(`aria-label`,`Value of `+(e.selectedNode().label??`signal`)),j(),Y(Cv(5,2,e.selectedNode().value))}}function gL(e,t){if(e&1){let e=U();R(0,`li`)(1,`button`,65),W(`click`,function(){let t=D(e).$implicit;return O(G(5).jumpTo(t))}),R(2,`span`,61),J(3),z(),R(4,`span`,62),J(5),z()()()}if(e&2){let e=t.$implicit,n=G(5);j(),M(`aria-label`,`Go to `+e.kind+` `+(e.label??e.id)),j(),K(`background`,n.kindColor(e.kind)),j(),Y(e.kind),j(2),Y(e.label??e.id)}}function _L(e,t){if(e&1&&(R(0,`h4`),J(1,`Dependencies (producers)`),z(),R(2,`ul`),F(3,gL,6,5,`li`,null,wI),z()),e&2){let e=G(4);j(3),I(e.getDependencies(e.selectedNode()))}}function vL(e,t){if(e&1){let e=U();R(0,`li`)(1,`button`,65),W(`click`,function(){let t=D(e).$implicit;return O(G(5).jumpTo(t))}),R(2,`span`,61),J(3),z(),R(4,`span`,62),J(5),z()()()}if(e&2){let e=t.$implicit,n=G(5);j(),M(`aria-label`,`Go to `+e.kind+` `+(e.label??e.id)),j(),K(`background`,n.kindColor(e.kind)),j(),Y(e.kind),j(2),Y(e.label??e.id)}}function yL(e,t){if(e&1&&(R(0,`h4`),J(1,`Consumers`),z(),R(2,`ul`),F(3,vL,6,5,`li`,null,wI),z()),e&2){let e=G(4);j(3),I(e.getConsumers(e.selectedNode()))}}function bL(e,t){e&1&&(R(0,`p`,30),J(1),z()),e&2&&(j(),Y(t))}function xL(e,t){if(e&1&&(R(0,`div`,55)(1,`h3`,57),J(2),z(),R(3,`dl`)(4,`dt`),J(5,`Kind`),z(),R(6,`dd`),J(7),z(),R(8,`dt`),J(9,`Epoch`),z(),R(10,`dd`),J(11),z(),N(12,hL,6,4),z(),N(13,_L,5,0),N(14,yL,5,0),N(15,bL,2,1,`p`,30),Wg(16,58),z()),e&2){let e,t=G().$implicit,n=G(2),r=d_(23);L(`id`,`signal-detail-`+t.id),j(2),Y(n.selectedNode().label??n.selectedNode().id),j(5),Y(n.selectedNode().kind),j(4),Y(n.selectedNode().epoch),j(),P(n.selectedNode().value===void 0?-1:12),j(),P(n.getDependencies(n.selectedNode()).length?13:-1),j(),P(n.getConsumers(n.selectedNode()).length?14:-1),j(),P((e=n.writeHint())?15:-1,e),j(),L(`ngTemplateOutlet`,r)(`ngTemplateOutletContext`,hv(10,bI,t.id))}}function SL(e,t){if(e&1){let e=U();R(0,`li`)(1,`button`,50),W(`click`,function(){let t=D(e).$implicit;return O(G(2).select(t.id))}),R(2,`span`,36)(3,`span`,37),J(4),z(),R(5,`span`,38),J(6),z(),N(7,dL,2,2,`span`,52),B(8,`span`,53),z(),N(9,fL,3,3,`span`,54),R(10,`span`,39)(11,`span`),J(12),z(),N(13,pL,4,1),N(14,mL,4,1),z()(),N(15,xL,17,12,`div`,55),z()}if(e&2){let e,n=t.$implicit,r=G(2);j(),q(`selected`,r.selectedId()===n.id),M(`aria-expanded`,r.selectedId()===n.id)(`aria-controls`,`signal-detail-`+n.id)(`data-card`,n.id),j(2),K(`background`,r.kindColor(n.kind)),j(),Y(n.kind),j(2),Y(n.label??`(unnamed)`),j(),P((e=r.changeCount(n.id))?7:-1,e),j(2),P(n.value===void 0?-1:9),j(3),X(`Epoch: `,n.epoch),j(),P(r.getDependencies(n).length?13:-1),j(),P(r.getConsumers(n).length?14:-1),j(),P(r.selectedId()===n.id&&r.selectedNode()?15:-1)}}function CL(e,t){if(e&1){let e=U();R(0,`button`,31),W(`click`,function(){return D(e),O(G(3).clearFilters())}),J(1,`Clear filters`),z()}}function wL(e,t){if(e&1&&(R(0,`li`,64)(1,`p`,28),J(2),z(),R(3,`p`,30),J(4),z(),N(5,CL,2,0,`button`,66),z()),e&2){let e=G(2);j(2),X(` `,e.hasAnySignals()?`No signals match.`:`No signals in this graph.`,` `),j(2),X(` `,e.hasAnySignals()?`Try a different name or kind.`:`Select a component that reads signals, or interact with the page to create some.`,` `),j(),P(e.hasAnySignals()?5:-1)}}function TL(e,t){if(e&1&&(R(0,`h2`,48),J(1,`Signals`),z(),R(2,`ul`,63),F(3,SL,16,15,`li`,null,wI,!1,wL,6,3,`li`,64),z()),e&2){let e=G();j(3),I(e.filteredNodes())}}var EL=`follow`;function DL(e){return Object.keys(e.pages).length?e.pages:e.graph?{[e.graph.pageId??``]:e.graph}:{}}var OL=`env:`,kL=50,AL={selected:`picked`,routed:`rendered by the router`,root:`first component with signals`},jL={write:`set`,sample:`sampled`,initial:`initial`},ML={resolved:`ok`,local:`ok`,loading:`warn`,reloading:`warn`,error:`danger`},NL={signal:`#facc15`,computed:`#60a5fa`,linkedSignal:`#34d399`,effect:`#fb923c`,template:`#94a3b8`,afterRenderEffectPhase:`#f472b6`,childSignalProp:`#fef08a`,"input (signal)":`#f59e0b`,"input.required (signal)":`#f59e0b`,"output (signal)":`#ec4899`,"model (signal)":`#14b8a6`,"model.required (signal)":`#14b8a6`,"viewChild (signal)":`#a3e635`,"viewChild.required (signal)":`#a3e635`,"viewChildren (signal)":`#a3e635`,"contentChild (signal)":`#fda4af`,"contentChild.required (signal)":`#fda4af`,"contentChildren (signal)":`#fda4af`,resource:`#06b6d4`,unknown:`#a1a1aa`},PL=class e{rpc=$(null);destroyRef=T(Ts);host=T(Pl);filterInput=Jv(`filterInput`);injector=T(Cs);pageId=fE();cleanups=[];graphLoad=0;treePages=A({});graphState=A({graph:null,pages:{}});chosenPageId=A(null);announcement=A(``);graphPages=Q(()=>DL(this.graphState()));shownPageId=Fv({source:()=>({pages:this.graphPages(),newest:this.graphState().graph?.pageId??null,chosen:this.chosenPageId()}),computation:({pages:e,newest:t,chosen:n},r)=>{let i={};for(let n of Object.keys(e))i[n]={pageId:n,reportedAt:+(n===t)};return pE(i,{chosen:n,host:this.pageId,previous:r?.value??null})}});reported=Q(()=>{let e=this.shownPageId();return e===null?null:this.graphPages()[e]??null});unsupported=Q(()=>!!this.reported()?.unsupported);graph=Q(()=>{let e=this.reported();return e?.unsupported?null:e});graphOwner=Q(()=>{let e=this.graph();return e?`${e.pageId??``}|${e.component?.id??e.injector?.id??``}`:null});pickedByPage=A({});picked=Q(()=>this.pickedByPage()[this.targetPageId()??``]??null);pageOptions=Q(()=>{if(this.pageId)return[];let e=this.treePages();return Object.keys(this.graphPages()).map(t=>{let n=e[t];return{value:t,label:n?.title||n?.url||`Page ${t}`,hint:n?.url}})});showInternals=A(!1);sourceSignals=A([]);sourceLoaded=A(!1);sourceFailed=A(!1);graphFailed=A(!1);loadFailed=Q(()=>this.sourceFailed()||this.graphFailed());retrying=A(!1);filter=A(``);resources=Q(()=>this.graph()?.resources??[]);internalIds=Q(()=>new Set(this.resources().flatMap(e=>e.nodeIds)));visibleNodes=Q(()=>{let e=this.internalIds();return(this.graph()?.nodes??[]).filter(t=>!e.has(t.id))});hasAnySignals=Q(()=>this.visibleNodes().length+this.resources().length>0);kindCounts=Q(()=>{let e=this.graph()?[...this.visibleNodes().map(e=>e.kind),...this.resources().map(()=>`resource`)]:this.sourceSignals().map(e=>e.kind),t=new Map;for(let n of e)t.set(n,(t.get(n)??0)+1);return[...t].map(([e,t])=>({kind:e,count:t}))});kind=Fv({source:this.graphOwner,computation:(e,t)=>{let n=t?.value??null;return n&&Nv(this.kindCounts).some(e=>e.kind===n)?n:null}});kindChips=Q(()=>{let e=this.kindCounts(),t=this.kind();return t&&!e.some(e=>e.kind===t)?[...e,{kind:t,count:0}]:e});kindTotal=Q(()=>this.kindCounts().reduce((e,t)=>e+t.count,0));selectedId=Fv({source:this.graphOwner,computation:()=>null});selectedNode=Q(()=>this.graph()?.nodes.find(e=>e.id===this.selectedId())??null);jumpedPast=A(null);jumpNote=Q(()=>{let e=this.jumpedPast();return!e||this.filter()||this.kind()||this.selectedId()!==e.id?``:`Cleared the filters to show ${e.label}.`});selectedHistory=Q(()=>{let e=this.selectedId();return e?[...this.graph()?.history?.[e]??[]].reverse():[]});writeHint=Q(()=>{let e=this.selectedNode(),t=this.graph();if(!e||!t||t.writeHook===!1||e.kind!==`signal`&&e.kind!==`linkedSignal`)return``;if(!e.label)return`This signal has no name, so its history holds sampled values only. Pass a debugName in its options, for example signal(0, { debugName: 'count' }).`;let n=t.history?.[e.id]??[];return n.some(e=>e.source===`write`)||!n.some(e=>e.source===`sample`)?``:`Every change here was sampled. Writes are matched by name, kind, version and value, so another live signal with the same name and value can hide them.`});kindLegend=Object.entries(NL).map(([e,t])=>({kind:e,color:t}));filteredResources=Q(()=>{let e=this.filter().toLowerCase(),t=this.kind();return t&&t!==`resource`?[]:this.resources().filter(t=>!e||t.name.toLowerCase().includes(e)||e.length>=3&&`resource`.startsWith(e))});filteredNodes=Q(()=>{let e=this.filter().toLowerCase(),t=this.kind();return this.visibleNodes().filter(n=>(!t||n.kind===t)&&(!e||(n.label??``).toLowerCase().includes(e)||n.kind.toLowerCase().includes(e))).sort((e,t)=>e.id.localeCompare(t.id,void 0,{numeric:!0}))});filteredSourceSignals=Q(()=>{let e=this.filter().toLowerCase(),t=this.kind();return this.sourceSignals().filter(n=>(!t||n.kind===t)&&(!e||n.name.toLowerCase().includes(e)||n.kind.toLowerCase().includes(e)||n.file.toLowerCase().includes(e)))});targetPageId=Q(()=>this.pageId??(this.shownPageId()||null)??this.graph()?.pageId??this.latestTreePage()?.pageId??null);latestTreePage=Q(()=>{let e=null;for(let[t,n]of Object.entries(this.treePages())){let r=n.reportedAt??0;(!e||r>e.reportedAt)&&(e={pageId:t,reportedAt:r})}return e});componentOptions=Q(()=>{let e=this.targetPageId(),t=(e?this.treePages()[e]?.roots:void 0)??[],n=[],r=e=>{for(let t of e)n.push(t),r(t.children)};r(t);let i=this.graph()?.environments??[];if(!n.length&&!i.length)return[];let a=new Map;for(let e of n)a.set(e.name,(a.get(e.name)??0)+1);let o=new Map,s=[{value:EL,label:`Follow the routed component`,hint:`automatic`},...i.map(e=>({value:OL+e.id,label:this.injectorLabel(e),hint:`injector`}))];for(let e of n){let t=(o.get(e.name)??0)+1;o.set(e.name,t),s.push({value:e.id,label:(a.get(e.name)??0)>1?`${e.name} #${t}`:e.name,hint:`<${e.tag}>`})}return s});pickerValue=Q(()=>{let e=this.picked();return e&&this.componentOptions().some(t=>t.value===e)?e:EL});constructor(){fc(()=>{let e=this.rpc();e&&(this.loadSignalGraph(e),this.loadSourceSignals(e))}),this.destroyRef.onDestroy(()=>{for(let e of this.cleanups.splice(0))e()})}async loadSignalGraph(e){for(let e of this.cleanups.splice(0))e();let t=++this.graphLoad,n=()=>this.destroyRef.destroyed||t!==this.graphLoad,r=e.scope(`pangular`);try{let e=await r.rpc.sharedState(`signal-graph`);if(n())return;this.graphFailed.set(!1);let t=e=>{let t=e,n=t?.pages&&typeof t.pages==`object`?t.pages:{},r={graph:t?.graph??null,pages:n};this.notePageGone(DL(r)),this.graphState.set(r)};t(e.value()),this.cleanups.push(e.on(`updated`,t))}catch{if(n())return;this.graphState.set({graph:null,pages:{}}),this.graphFailed.set(!0)}try{let e=await r.rpc.sharedState(`component-tree`);if(n())return;let t=e=>{let t=e?.pages;this.treePages.set(t&&typeof t==`object`?t:{})};t(e.value()),this.cleanups.push(e.on(`updated`,t))}catch{n()||this.treePages.set({})}}notePageGone(e){let t=Object.keys(this.graphPages()).filter(t=>!e[t]);t.length&&this.pickedByPage.update(e=>{let n={...e};for(let e of t)delete n[e];return n});let n=this.chosenPageId();if(!n||e[n])return;let r=this.pageOptions().find(e=>e.value===n)?.label??`The chosen page`;this.chosenPageId.set(null),this.announcement.set(`${r} closed, so this shows another page.`)}selectPage(e){if(!e||e===this.shownPageId())return;this.chosenPageId.set(e);let t=this.pageOptions().find(t=>t.value===e)?.label??e;this.announcement.set(`Showing the signal graph of ${t}.`)}pickComponent(e){let t=e&&e!==EL?e:null,n=this.targetPageId()??void 0;this.pickedByPage.update(e=>{let r={...e};return t?r[n??``]=t:delete r[n??``],r});let r=this.rpc();if(!r)return;let i=t?.startsWith(OL)?{pageId:n,env:t.slice(4)}:{pageId:n,id:t};r.scope(`pangular`).rpc.call(`select-signal-target`,i).catch(()=>{})}injectorLabel(e){return e.name===`Root`?`Root services`:e.name}sourceNote(e){return AL[e]}async loadSourceSignals(e){let t=e.scope(`pangular`);try{let e=await t.rpc.call(`get-signals`);this.sourceSignals.set(e),this.sourceFailed.set(!1)}catch{this.sourceFailed.set(!0)}finally{this.sourceLoaded.set(!0)}}async retry(){let e=this.rpc();if(!e||this.retrying())return;let t=document.activeElement;this.retrying.set(!0);try{await Promise.all([this.loadSignalGraph(e),this.loadSourceSignals(e)])}finally{this.retrying.set(!1)}this.destroyRef.destroyed||Bd(()=>{(!t?.isConnected||document.activeElement===document.body)&&this.filterInput()?.nativeElement.focus()},{injector:this.injector})}clearFilters(){this.resetFilters(),this.filterInput()?.nativeElement.focus()}resetFilters(){this.filter.set(``),this.kind.set(null)}select(e){this.selectedId.set(this.selectedId()===e?null:e),this.showInternals.set(!1)}jumpTo(e){let t=this.resources().find(t=>t.nodeIds.includes(e.id)),n=t?.id??e.id,r=t?!this.filteredResources().some(e=>e.id===n):!this.filteredNodes().some(e=>e.id===n);r&&this.resetFilters(),this.jumpedPast.set(r?{id:n,label:t?.name??e.label??e.id}:null),this.selectedId.set(n),this.showInternals.set(!!t),Bd(()=>{let e=[...this.host.nativeElement.querySelectorAll(`.node-card[data-card]`)].find(e=>e.dataset.card===n);e?.scrollIntoView?.({block:`nearest`}),e?.focus({preventScroll:!0})},{injector:this.injector})}changeCount(e){let t=this.graph(),n=t?.nodes.find(t=>t.id===e)?.changes??t?.resources?.find(t=>t.id===e)?.changes;return n===void 0?(t?.history?.[e]??[]).reduce((e,t)=>e+(t.source===`initial`?0:1+(t.missed??0)),0):n}historySummary(e){let t=this.changeCount(e),n=this.graph()?.history?.[e]?.length??0;return t?`${`${t} ${t===1?`change`:`changes`} recorded`}${n>=kL&&t>=n?`, showing the last ${n}`:``}, newest first.`:`No changes recorded yet. The entry below is the value seen first.`}statusTone(e){return ML[e]??`neutral`}internalsOf(e){let t=new Set(e.nodeIds);return(this.graph()?.nodes??[]).filter(e=>t.has(e.id))}sourceLabel(e){return jL[e]}kindColor(e){return NL[e]??NL.unknown}relations=Q(()=>{let e=new Map,t=this.graph();if(!t)return e;for(let n of t.nodes)e.set(n.id,{deps:[],consumers:[]});for(let n of t.edges){let r=t.nodes[n.producer],i=t.nodes[n.consumer];r&&i&&(e.get(i.id)?.deps.push(r),e.get(r.id)?.consumers.push(i))}return e});getDependencies(e){return this.relations().get(e.id)?.deps??[]}getConsumers(e){return this.relations().get(e.id)?.consumers??[]}static ɵfac=function(t){return new(t||e)};static ɵcmp=Gh({type:e,selectors:[[`app-signal-inspector`]],viewQuery:function(e,t){e&1&&l_(t.filterInput,vI,5),e&2&&u_()},inputs:{rpc:[1,`rpc`]},decls:28,vars:17,consts:[[`filterInput`,``],[`historyTpl`,``],[1,`toolbar`],[`type`,`search`,`placeholder`,`Filter by name or kind…`,`aria-label`,`Filter signals by name or kind`,3,`input`,`keydown.escape`,`value`],[1,`picker`,`page-picker`],[1,`picker`],[`role`,`status`,1,`sr-only`],[1,`showing`],[`role`,`status`,1,`fallback`],[1,`intro`],[`role`,`group`,`aria-label`,`Filter by kind`,1,`kinds`],[`role`,`status`,1,`empty`],[`role`,`alert`,1,`empty`,3,`compact`],[1,`empty`],[`role`,`status`,1,`jump-note`],[`id`,`signals-page-label`,1,`label-key`],[`labelledBy`,`signals-page-label`,3,`valueChange`,`options`,`value`],[`id`,`signals-component-label`,1,`label-key`],[`labelledBy`,`signals-component-label`,3,`valueChange`,`options`,`value`],[1,`showing-name`],[1,`mono`],[1,`source-note`],[`type`,`button`,1,`kind-chip`,3,`click`],[1,`count`],[`type`,`button`,1,`kind-chip`,3,`active`],[`aria-hidden`,`true`,1,`dot`],[1,`chip-text`],[`aria-hidden`,`true`,1,`spinner`],[1,`empty-title`],[`role`,`alert`,1,`empty`],[1,`hint`],[`type`,`button`,1,`reset`,3,`click`],[1,`source-label`],[1,`nodes`],[1,`node-card`],[`role`,`status`,1,`empty`,`compact`],[1,`node-header`],[1,`kind-badge`],[1,`node-label`],[1,`node-meta`],[1,`file`,3,`file`,`line`],[`aria-hidden`,`true`,1,`sep`],[3,`id`],[1,`history-summary`],[`tabindex`,`0`,1,`history`,`scroll-box`],[1,`history-meta`],[1,`source-tag`],[1,`missed`],[1,`list-heading`],[`role`,`list`,1,`nodes`,`resources`],[`type`,`button`,1,`node-card`,3,`click`],[1,`status-tag`,3,`class`],[1,`changed-badge`],[`aria-hidden`,`true`,1,`chevron`],[1,`node-value`],[1,`detail-panel`,3,`id`],[1,`status-tag`],[1,`detail-title`],[3,`ngTemplateOutlet`,`ngTemplateOutletContext`],[`type`,`button`,1,`reset`,`internals-toggle`,3,`click`],[`role`,`region`,`tabindex`,`0`,1,`scroll-box`],[1,`kind-badge`,`sm`],[1,`rel-label`],[`role`,`list`,`appRovingList`,`button.node-card`,1,`nodes`],[1,`empty`,`compact`],[`type`,`button`,1,`rel-link`,3,`click`],[`type`,`button`,1,`reset`]],template:function(e,t){if(e&1&&(R(0,`div`,2)(1,`input`,3,0),W(`input`,function(e){return t.filter.set(e.target.value)})(`keydown.escape`,function(){return t.filter.set(``)}),z(),N(3,TI,4,2,`div`,4),N(4,EI,4,2,`div`,5),z(),R(5,`p`,6),J(6),z(),N(7,OI,6,3,`p`,7)(8,kI,5,1,`p`,7),N(9,AI,2,0,`p`,8),R(10,`p`,9),N(11,jI,1,0)(12,MI,1,0)(13,NI,1,0),z(),N(14,PI,2,0,`p`,8),N(15,FI,2,0,`p`,8),N(16,II,2,2,`p`,8),N(17,RI,7,4,`div`,10),N(18,zI,4,0,`div`,11),N(19,BI,7,4,`div`,12)(20,VI,14,0,`div`,13),N(21,GI,6,1),og(22,YI,1,1,`ng-template`,null,1,Ev),R(24,`p`,14),J(25),z(),N(26,uL,5,0),N(27,TL,6,1)),e&2){let e,n;j(),L(`value`,t.filter()),j(2),P(t.pageOptions().length>1?3:-1),j(),P(t.componentOptions().length?4:-1),j(2),Y(t.announcement()),j(),P((e=t.graph()?.component)?7:(e=t.graph()?.injector)?8:-1,e),j(2),P(t.graph()&&t.picked()&&t.graph().source!==`selected`?9:-1),j(2),P(t.graph()?.injector?11:t.graph()?12:13),j(3),P(t.unsupported()?14:-1),j(),P(t.graph()?.writeHook===!1?15:-1),j(),P((n=t.graph()?.nodeCount)?16:-1,n),j(),P(t.kindChips().length?17:-1),j(),P(!t.graph()&&!t.sourceLoaded()?18:-1),j(),P(!t.graph()&&t.sourceLoaded()&&t.loadFailed()?19:!t.graph()&&t.sourceLoaded()&&t.sourceSignals().length===0?20:-1),j(2),P(!t.graph()&&t.sourceSignals().length>0?21:-1),j(4),Y(t.jumpNote()),j(),P(t.graph()&&t.filteredResources().length?26:-1),j(),P(t.graph()&&(t.visibleNodes().length||!t.filteredResources().length)?27:-1)}},dependencies:[lb,_I,qD,jA,mb,hb],styles:[`[_nghost-%COMP%] { display: block; min-width: 0; color: var(--%NS%text); @@ -6159,7 +6183,7 @@ button.node-card[_ngcontent-%COMP%] { dd[_ngcontent-%COMP%] + dt[_ngcontent-%COMP%] { margin-top: 8px; } -}`]})},ML=[`queryInput`],NL=(e,t,n)=>({kind:`provider`,injectorId:e,token:t,index:n}),PL=()=>({compact:!1}),FL=()=>({compact:!0}),IL=(e,t)=>t.node.injector.id,LL=(e,t)=>t.id,RL=(e,t)=>t.from+t.token+e,zL=(e,t)=>t.token+e,BL=(e,t)=>t.type,VL=(e,t)=>t.token+t.file+t.line;function HL(e,t){if(e&1){let e=U();R(0,`div`,6)(1,`p`,7),J(2),z(),R(3,`p`,8),J(4,` The devtools server did not answer. Check that it is still running, then retry. `),z(),R(5,`button`,9),W(`click`,function(){return D(e),O(G().retry())}),J(6),z()()}if(e&2){let e=t.compact,n=G();q(`compact`,e),j(2),X(` `,e?`Couldn't load the live injector tree`:`Couldn't load DI data`,` `),j(3),M(`aria-disabled`,n.retrying()||null),j(),X(` `,n.retrying()?`Retrying…`:`Retry`,` `)}}function UL(e,t){if(e&1){let e=U();R(0,`div`,10)(1,`span`,11),J(2,`Page`),z(),R(3,`app-select`,12),W(`valueChange`,function(t){return D(e),O(G(2).selectPage(t))}),z()()}if(e&2){let e=G(2);j(3),L(`options`,e.pageOptions())(`value`,e.shownPageId())}}function WL(e,t){e&1&&N(0,UL,4,2,`div`,10),e&2&&P(G().pageOptions().length>1?0:-1)}function GL(e,t){if(e&1){let e=U();R(0,`label`,23)(1,`input`,24),W(`change`,function(){D(e);let t=G(2);return O(t.componentsOnly.set(!t.componentsOnly()))}),z(),J(2,` Components only `),z()}if(e&2){let e=G(2);j(),L(`checked`,e.componentsOnly())}}function KL(e,t){e&1&&(R(0,`span`,25),J(1),z()),e&2&&(j(),X(`Change detection: `,t))}function qL(e,t){e&1&&(R(0,`p`,26),k(),R(1,`svg`,35),B(2,`circle`,36)(3,`path`,37),z(),hs(),R(4,`span`)(5,`strong`),J(6,`The page reported only part of its injector tree.`),z(),J(7,` It keeps at most 2000 element injectors and 2500 in all, and leaves out injectors nested more than 1000 levels deep, so a lookup path or a provider can point to one that is not listed. `),z()())}function JL(e,t){if(e&1){let e=U();R(0,`button`,41),W(`click`,function(){let t=D(e).$implicit;return O(G(3).reveal(t.id))}),B(1,`span`,42),R(2,`span`,43),J(3),z(),R(4,`span`,44),J(5),z()()}if(e&2){let e=t.$implicit,n=G(3);j(),K(`background`,n.tone(e.kind)),j(2),Y(e.label),j(2),Y(e.tokens)}}function YL(e,t){e&1&&(R(0,`span`,40),J(1),z()),e&2&&(j(),X(`+`,t,` more`))}function XL(e,t){if(e&1&&(R(0,`div`,27)(1,`span`,38),J(2,`Provided by`),z(),F(3,JL,6,4,`button`,39,LL),N(5,YL,2,1,`span`,40),z()),e&2){let e,t=G(2);j(3),I(t.providedBy()),j(2),P((e=t.providedByMore())?5:-1,e)}}function ZL(e,t){if(e&1){let e=U();R(0,`div`,28),J(1),R(2,`button`,45),W(`click`,function(){return D(e),O(G(2).clearQuery())}),J(3,`Clear search`),z()()}if(e&2){let e=G(2);j(),X(` Nothing here matches “`,e.query().trim(),`”. `)}}function QL(e,t){e&1&&J(0,` None of them provide anything themselves. `)}function $L(e,t){e&1&&J(0,` Turn off “Components only” to see directives. `)}function eR(e,t){e&1&&J(0,` Try a different search. `)}function tR(e,t){if(e&1&&(R(0,`div`,30)(1,`p`,7),J(2,`No injectors to show`),z(),R(3,`p`,8),N(4,QL,1,0)(5,$L,1,0)(6,eR,1,0),z()()),e&2){let e=G(2);j(4),P(e.onlyProviding()?4:e.componentsOnly()&&e.view()===`element`?5:6)}}function nR(e,t){if(e&1){let e=U();R(0,`span`,56),W(`click`,function(t){D(e);let n=G().$implicit;return O(G(2).toggle(n.node.injector.id,t))}),k(),R(1,`svg`,57),B(2,`path`,58),z()()}if(e&2){let e=G().$implicit;q(`open`,e.expanded)}}function rR(e,t){e&1&&B(0,`span`,48)}function iR(e,t){if(e&1&&(R(0,`span`,52),J(1),z()),e&2){let e=G().$implicit;j(),Y(e.node.injector.component)}}function aR(e,t){if(e&1&&(R(0,`span`,52),J(1),z()),e&2){let e=G().$implicit;j(),Y(e.node.injector.directives.join(`, `))}}function oR(e,t){if(e&1&&(R(0,`span`,54),k(),R(1,`svg`,35),B(2,`path`,59),z(),hs(),R(3,`span`,50),J(4,`injects`),z(),J(5),z()),e&2){let e=G().$implicit;M(`title`,e.node.dependencies.length+` injected`),j(5),X(` `,e.node.dependencies.length,` `)}}function sR(e,t){if(e&1&&(R(0,`span`,55),k(),R(1,`svg`,35),B(2,`path`,60),z(),hs(),R(3,`span`,50),J(4,`provides`),z(),J(5),z()),e&2){let e=G().$implicit;M(`title`,e.node.injector.providerCount+` provided`),j(5),X(` `,e.node.injector.providerCount,` `)}}function cR(e,t){if(e&1){let e=U();R(0,`div`,46),W(`click`,function(){let t=D(e).$implicit;return O(G(2).select(t.node.injector.id))})(`focus`,function(){let t=D(e).$implicit,n=G(2);return n.focusId.set(t.node.injector.id),O(n.highlight(t.node))})(`blur`,function(){return D(e),O(G(2).highlight(null))})(`mouseenter`,function(){let t=D(e).$implicit;return O(G(2).highlight(t.node))})(`mouseleave`,function(){return D(e),O(G(2).highlight(null))}),N(1,nR,3,2,`span`,47)(2,rR,1,0,`span`,48),R(3,`span`,49),J(4),z(),R(5,`span`,50),J(6),z(),R(7,`span`,51),J(8),z(),N(9,iR,2,1,`span`,52)(10,aR,2,1,`span`,52),R(11,`span`,53),N(12,oR,6,2,`span`,54),N(13,sR,6,2,`span`,55),z()()}if(e&2){let e=t.$implicit,n=G(2);K(`--%NS%depth`,e.depth),q(`selected`,n.selected()?.injector?.id===e.node.injector.id),M(`aria-level`,e.depth+1)(`aria-expanded`,e.hasChildren?e.expanded:null)(`aria-selected`,n.selected()?.injector?.id===e.node.injector.id)(`tabindex`,n.rovingId()===e.node.injector.id?0:-1)(`data-id`,e.node.injector.id),j(),P(e.hasChildren?1:2),j(2),K(`--%NS%tone`,n.tone(n.kind(e.node))),M(`title`,n.kind(e.node)),j(),Y(n.kind(e.node)[0].toUpperCase()),j(2),Y(n.kind(e.node)),j(2),Y(n.label(e.node)),j(),P(e.node.injector.component?9:e.node.injector.directives?.length?10:-1),j(3),P((e.node.dependencies?.length??0)>0?12:-1),j(),P(e.node.injector.providerCount>0?13:-1)}}function lR(e,t){if(e&1){let e=U();R(0,`button`,9),W(`click`,function(){let t=D(e);return O(G(3).reveal(t.node.injector.id))}),J(1),z()}if(e&2){let e=G(3);j(),X(` Show `,e.label(t.node),` `)}}function uR(e,t){if(e&1&&(R(0,`section`,33)(1,`header`,61)(2,`h2`,62),J(3),z()(),R(4,`div`,63)(5,`p`,8),J(6,` This injector is no longer on the page. Its component or directive was destroyed. `),z(),N(7,lR,2,1,`button`,64),z()()),e&2){let e,n=G(2);j(3),Y(t),j(4),P((e=n.rows()[0])?7:-1,e)}}function dR(e,t){if(e&1&&(R(0,`li`),J(1),z()),e&2){let e=t.$implicit;q(`is-component`,e===G(2).injector.component),j(),Y(e)}}function fR(e,t){if(e&1&&(R(0,`ul`,66),F(1,dR,2,3,`li`,73,kg),z()),e&2){let e=G();j(),I(e.injector.directives)}}function pR(e,t){if(e&1&&(R(0,`span`,74),B(1,`span`,42),J(2,` Null injector `),R(3,`span`,76),J(4,`throws NullInjectorError`),z()()),e&2){let e=G(4);j(),K(`background`,e.tone(`null`))}}function mR(e,t){if(e&1&&(R(0,`span`,78),J(1),R(2,`span`,50),J(3),z()()),e&2){let e=G(2).$implicit;j(),X(` `,e.providers,` `),j(2),Y(e.providers===1?`provider`:`providers`)}}function hR(e,t){if(e&1){let e=U();R(0,`button`,77),W(`click`,function(){D(e);let t=G().$implicit;return O(G(3).reveal(t.id))}),B(1,`span`,42),R(2,`span`,43),J(3),z(),N(4,mR,4,2,`span`,78),z()}if(e&2){let e=G().$implicit,t=G(3);j(),K(`background`,t.tone(e.kind)),j(2),Y(e.label),j(),P(e.providers?4:-1)}}function gR(e,t){if(e&1&&(R(0,`li`),N(1,pR,5,2,`span`,74)(2,hR,5,4,`button`,75),z()),e&2){let e=t.$implicit,n=t.$index,r=G(3);q(`current`,n===0),j(),P(e.id===r.nullId?1:2)}}function _R(e,t){e&1&&(R(0,`p`,68),J(1,`Only services this injector has already created are listed.`),z())}function vR(e,t){if(e&1&&(R(0,`span`,84),J(1),z()),e&2){let e=t.$implicit;j(),Y(e)}}function yR(e,t){if(e&1&&(R(0,`span`),J(1),z()),e&2){let e=G().$implicit;j(),X(`for `,e.from)}}function bR(e,t){if(e&1){let e=U();R(0,`button`,89),W(`click`,function(){let t=D(e);return O(G(6).reveal(t))}),B(1,`span`,42),J(2,` from `),R(3,`span`,43),J(4),z()()}if(e&2){let e=t,n=G(6);j(),K(`background`,n.tone(n.kindById(e))),j(3),Y(n.labelById(e))}}function xR(e,t){e&1&&(R(0,`span`,87),J(1,`optional, not provided`),z())}function SR(e,t){e&1&&(R(0,`span`,88),J(1,`not provided anywhere`),z())}function CR(e,t){if(e&1&&(R(0,`li`,81)(1,`div`,82)(2,`span`,83),J(3),z(),F(4,vR,2,1,`span`,84,kg),z(),R(6,`div`,85),N(7,yR,2,1,`span`),N(8,bR,5,3,`button`,86)(9,xR,2,0,`span`,87)(10,SR,2,0,`span`,88),z()()),e&2){let e,n=t.$implicit,r=G(3);q(`hit`,G(2).matches(n.token)),j(3),Y(n.token),j(),I(n.flags),j(3),P(r.injector.type!==`element`||r.injector.directives&&r.injector.directives.length>1?7:-1),j(),P((e=n.providedBy)?8:n.flags.includes(`optional`)?9:10,e)}}function wR(e,t){if(e&1&&(R(0,`ul`,79),F(1,CR,11,5,`li`,80,RL),z()),e&2){let e=G(2);j(),I(e.dependencies)}}function TR(e,t){e&1&&(R(0,`p`,72),J(1,`Nothing is injected through the constructor or inject().`),z())}function ER(e,t){e&1&&(R(0,`p`,72),J(1,`No service created here has injected anything yet.`),z())}function DR(e,t){if(e&1&&(R(0,`div`,67)(1,`h3`),J(2),R(3,`span`,16),J(4),z()(),N(5,_R,2,0,`p`,68),N(6,wR,3,0,`ul`,79)(7,TR,2,0,`p`,72)(8,ER,2,0,`p`,72),z()),e&2){let e=G();j(2),X(` `,e.injector.type===`element`?`Injected here`:`Injected by its services`,` `),j(2),Y(e.dependencies?.length??0),j(),P(e.injector.type===`element`?-1:5),j(),P(e.dependencies?.length?6:e.injector.type===`element`?7:8)}}function OR(e,t){e&1&&(R(0,`span`,84),J(1,`viewProviders`),z())}function kR(e,t){e&1&&(R(0,`span`,84),J(1,`multi`),z())}function AR(e,t){if(e&1&&(R(0,`div`,85),J(1),z()),e&2){let e=G().$implicit;j(),X(`via `,e.importPath.join(` › `))}}function jR(e,t){if(e&1&&(R(0,`li`,91)(1,`div`,82)(2,`span`,83),J(3),z(),R(4,`span`,92),J(5),z(),N(6,OR,2,0,`span`,84),N(7,kR,2,0,`span`,84),z(),N(8,AR,2,1,`div`,85),B(9,`app-store-global`,93),z()),e&2){let e=t.$implicit,n=t.$index,r=G(2),i=G(2);q(`hit`,i.matches(e.token)),j(3),Y(e.token),j(2),Y(e.type===`unknown`?`provider`:`use`+i.capital(e.type)),j(),P(e.isViewProvider?6:-1),j(),P(e.multi?7:-1),j(),P(e.importPath?.length?8:-1),j(),L(`rpc`,i.rpc())(`pageId`,i.shownPageId())(`target`,gv(11,NL,r.injector.id,e.token,n))(`label`,e.token)}}function MR(e,t){if(e&1&&(R(0,`ul`,71),F(1,jR,10,15,`li`,90,zL),z()),e&2){let e=G();j(),I(e.providers)}}function NR(e,t){e&1&&J(0,` No providers or viewProviders on this element. `)}function PR(e,t){e&1&&J(0,` This injector has no providers of its own. `)}function FR(e,t){if(e&1&&(R(0,`p`,72),N(1,NR,1,0)(2,PR,1,0),z()),e&2){let e=G();j(),P(e.injector.type===`element`?1:2)}}function IR(e,t){if(e&1&&(R(0,`section`,34)(1,`header`,61)(2,`span`,65),J(3),z(),R(4,`h2`,62),J(5),z(),N(6,fR,3,0,`ul`,66),z(),R(7,`div`,67)(8,`h3`),J(9,`Lookup path`),z(),R(10,`p`,68),J(11,`Angular asks these injectors in order until one has the token.`),z(),R(12,`ol`,69),F(13,gR,3,3,`li`,70,LL),z()(),N(15,DR,9,4,`div`,67),R(16,`div`,67)(17,`h3`),J(18,` Provides `),R(19,`span`,16),J(20),z()(),N(21,MR,3,0,`ul`,71)(22,FR,3,1,`p`,72),z()()),e&2){let e=t,n=G(2);j(2),K(`--%NS%tone`,n.tone(n.kind(e))),j(),Y(n.kind(e)),j(2),Y(n.label(e)),j(),P(e.injector.directives?.length?6:-1),j(7),I(n.path()),j(2),P(e.injector.type===`element`||e.dependencies?15:-1),j(5),Y(e.providers.length),j(),P(e.providers.length?21:22)}}function LR(e,t){if(e&1){let e=U();R(0,`p`,13),J(1,` Every component and directive gets an injector. When it asks for a token, Angular walks up this tree, then through the environment injectors, until something provides it. `),z(),R(2,`div`,14)(3,`div`,15)(4,`button`,9),W(`click`,function(){return D(e),O(G().setView(`element`))}),J(5,` Elements `),R(6,`span`,16),J(7),z()(),R(8,`button`,9),W(`click`,function(){return D(e),O(G().setView(`environment`))}),J(9,` Environment `),R(10,`span`,16),J(11),z()()(),R(12,`div`,17),k(),R(13,`svg`,18),B(14,`circle`,19)(15,`path`,20),z(),hs(),R(16,`input`,21,2),W(`input`,function(t){return D(e),O(G().query.set(t.target.value))})(`keydown.escape`,function(){return D(e),O(G().query.set(``))}),z()(),Wg(18,22),N(19,GL,3,1,`label`,23),R(20,`label`,23)(21,`input`,24),W(`change`,function(){D(e);let t=G();return O(t.onlyProviding.set(!t.onlyProviding()))}),z(),J(22,` With providers `),z(),N(23,KL,2,1,`span`,25),z(),N(24,qL,8,0,`p`,26),N(25,XL,6,1,`div`,27)(26,ZL,4,1,`div`,28),R(27,`div`,29),N(28,tR,7,1,`div`,30),R(29,`div`,31),W(`keydown`,function(t){return D(e),O(G().onTreeKey(t))}),F(30,cR,14,19,`div`,32,IL),z(),N(32,uR,8,2,`section`,33)(33,IR,23,8,`section`,34),z()}if(e&2){let e,t,n=G(),r=d_(5);j(4),q(`active`,n.view()===`element`),M(`aria-pressed`,n.view()===`element`),j(3),Y(n.elementCount()),j(),q(`active`,n.view()===`environment`),M(`aria-pressed`,n.view()===`environment`),j(3),Y(n.environmentCount()),j(5),L(`value`,n.query()),j(2),L(`ngTemplateOutlet`,r),j(),P(n.view()===`element`?19:-1),j(2),L(`checked`,n.onlyProviding()),j(2),P((e=n.zone())?23:-1,e),j(),P(n.truncated()?24:-1),j(),P(n.providedBy().length?25:n.query().trim()&&!n.rows().length?26:-1),j(3),P(n.rows().length?-1:28),j(),L(`hidden`,!n.rows().length),M(`aria-label`,n.view()===`element`?`Element injectors`:`Environment injectors`),j(),I(n.rows()),j(2),P((t=n.gone())?32:(t=n.selected())?33:-1,t)}}function RR(e,t){e&1&&(R(0,`div`,4),B(1,`span`,94),R(2,`p`,7),J(3,`Loading dependency injection data…`),z()())}function zR(e,t){e&1&&Wg(0,5),e&2&&(G(),L(`ngTemplateOutlet`,d_(3))(`ngTemplateOutletContext`,mv(2,PL)))}function BR(e,t){if(e&1&&(R(0,`div`,14),Wg(1,22),z()),e&2){G(2);let e=d_(5);j(),L(`ngTemplateOutlet`,e)}}function VR(e,t){e&1&&(N(0,BR,2,1,`div`,14),R(1,`div`,30)(2,`p`,7),J(3,`No DI data found`),z(),R(4,`p`,8),J(5,` Open the app in a browser with the devtools connected to see its live injectors. No providers, injectables or inject() calls were found in the source either. `),z()()),e&2&&P(G().pageOptions().length>1?0:-1)}function HR(e,t){e&1&&Wg(0,5),e&2&&(G(2),L(`ngTemplateOutlet`,d_(3))(`ngTemplateOutletContext`,mv(2,FL)))}function UR(e,t){if(e&1){let e=U();R(0,`div`,30)(1,`p`,7),J(2),z(),R(3,`p`,8),J(4,`Try part of a token name or a file path.`),z(),R(5,`button`,9),W(`click`,function(){return D(e),O(G(2).clearQuery())}),J(6,`Clear filter`),z()()}if(e&2){let e=G(2);j(2),X(`No providers match “`,e.query(),`”`)}}function WR(e,t){if(e&1&&(R(0,`span`,104),J(1),z()),e&2){let e=G().$implicit;j(),X(`providedIn: `,e.providedIn)}}function GR(e,t){if(e&1&&(R(0,`span`,107),J(1),z()),e&2){let e=G().$implicit;j(),X(`as `,e.source)}}function KR(e,t){if(e&1&&(R(0,`li`,101)(1,`div`,102)(2,`span`,103),J(3),z(),N(4,WR,2,1,`span`,104),z(),R(5,`div`,105),B(6,`app-source-link`,106),N(7,GR,2,1,`span`,107),z()()),e&2){let e=t.$implicit;j(3),Y(e.token),j(),P(e.providedIn?4:-1),j(2),L(`file`,e.file)(`line`,e.line),j(),P(e.source!==`class`&&e.source!==`providers array`?7:-1)}}function qR(e,t){if(e&1&&(R(0,`section`,98)(1,`h2`),J(2),R(3,`span`,99),J(4),z()(),R(5,`ul`,100),F(6,KR,8,5,`li`,101,VL),z()()),e&2){let e=t.$implicit;j(2),X(` `,e.label,` `),j(2),Y(e.items.length),j(2),I(e.items)}}function JR(e,t){if(e&1&&(R(0,`div`,97),F(1,qR,8,2,`section`,98,BL),z()),e&2){let e=G(2);j(),I(e.groupedProviders())}}function YR(e,t){if(e&1){let e=U();R(0,`div`,14)(1,`div`,17),k(),R(2,`svg`,18),B(3,`circle`,19)(4,`path`,20),z(),hs(),R(5,`input`,95,2),W(`input`,function(t){return D(e),O(G().query.set(t.target.value))})(`keydown.escape`,function(){return D(e),O(G().query.set(``))}),z()(),Wg(7,22),R(8,`span`,96),J(9),z()(),N(10,HR,1,3,`ng-container`,5),R(11,`p`,26),k(),R(12,`svg`,35),B(13,`circle`,36)(14,`path`,37),z(),hs(),R(15,`span`)(16,`strong`),J(17,`DI from source scan (static analysis).`),z(),J(18,` Connect the overlay on Angular 20 or later to see the live injector tree. `),z()(),N(19,UR,7,1,`div`,30)(20,JR,3,0,`div`,97)}if(e&2){let e=G(),t=d_(5);j(5),L(`value`,e.query()),j(2),L(`ngTemplateOutlet`,t),j(2),Z(` `,e.sourceMatchCount(),` of `,e.sourceProviders().length,` `),j(),P(e.loadFailed()?10:-1),j(9),P(e.groupedProviders().length===0?19:20)}}var XR=`inj-null`,ZR=12,QR=600,$R={component:`var(--accent-text)`,directive:`var(--directive)`,environment:`var(--ok-text)`,null:`var(--text-3)`};function ez(e){return e.injector.type===`element`?e.injector.component?`component`:`directive`:`environment`}function tz(e){return e.injector.type===`element`?`<${e.injector.name}>`:e.injector.name}function nz(e){return Array.isArray(e)}var rz=class e{rpc=$(null);injector=T(Cs);nullId=XR;hostPage=fE();treeState=A(null);pageTitles=A({});chosenPageId=A(null);treePages=Q(()=>{let e=this.treeState();if(!e)return{};let t=e.pages&&typeof e.pages==`object`?e.pages:{};return Object.keys(t).length||this.hostPage?t:{"":e}});shownPageId=Fv({source:()=>({pages:this.treePages(),chosen:this.chosenPageId()}),computation:({pages:e,chosen:t},n)=>{let r={};for(let[t,n]of Object.entries(e))r[t]={pageId:t,reportedAt:typeof n?.reportedAt==`number`?n.reportedAt:0};return pE(r,{chosen:t,host:this.hostPage,previous:n?.value??null})}});shownPage=Q(()=>{let e=this.shownPageId();return e===null?null:this.treePages()[e]??null});roots=Q(()=>{let e=this.shownPage()?.roots;return nz(e)?e:[]});environment=Q(()=>{let e=this.shownPage()?.environment;return nz(e)?e:[]});truncated=Q(()=>this.shownPage()?.truncated===!0);zone=Q(()=>{let e=this.shownPage()?.zone;return typeof e==`string`?_D(e):null});multiPage=Q(()=>!this.hostPage&&Object.keys(this.treePages()).length>1);pageOptions=Q(()=>{if(!this.multiPage())return[];let e=this.pageTitles();return Object.keys(this.treePages()).map(t=>{let n=e[t];return{value:t,label:n?.title||n?.url||`Page ${t}`,hint:n?.url}})});pageKey=Q(()=>this.shownPageId()??``);perPage(e){let t=new Map;return Fv({source:this.pageKey,computation:(n,r)=>(r&&t.set(r.source,r.value),t.has(n)?t.get(n):e())})}sourceProviders=A([]);loaded=A(!1);treeFailed=A(!1);sourceFailed=A(!1);loadFailed=Q(()=>this.treeFailed()||this.sourceFailed());retrying=A(!1);host=T(Pl);view=A(`element`);query=A(``);queryInput=Jv(`queryInput`);onlyProviding=A(!1);componentsOnly=A(!0);collapsed=this.perPage(()=>new Set);selectedId=this.perPage(()=>null);focusId=this.perPage(()=>null);announcement=A(``);selectedLabel=this.perPage(()=>null);wasGone=!1;index=Q(()=>{let e=new Map,t=new Map,n=(r,i)=>{for(let a of r)e.set(a.injector.id,a),i&&t.set(a.injector.id,i),n(a.children,a.injector.id)};return n(this.roots(),null),n(this.environment(),null),{map:e,parents:t}});elementCount=Q(()=>this.count(this.roots()));environmentCount=Q(()=>this.count(this.environment()));visible=Q(()=>{let e=this.view()===`element`?this.roots():this.environment();this.view()===`element`&&this.componentsOnly()&&(e=this.prune(e,e=>!!e.injector.component)),this.onlyProviding()&&(e=this.prune(e,e=>e.providers.length>0));let t=this.normalizedQuery();return t&&(e=this.prune(e,e=>this.nodeMatches(e,t))),e});rows=Q(()=>{let e=[],t=this.collapsed(),n=!!this.normalizedQuery(),r=(i,a)=>{for(let o of i){let i=n||!t.has(o.injector.id);e.push({node:o,depth:a,hasChildren:o.children.length>0,expanded:i}),i&&r(o.children,a+1)}};return r(this.visible(),0),e});selected=Q(()=>{let e=this.selectedId();return e?this.index().map.get(e)??null:this.rows()[0]?.node??null});gone=Q(()=>{let e=this.selectedId();return e&&!this.index().map.has(e)?this.selectedLabel()??`The injector`:null});rovingId=Q(()=>{let e=this.rows(),t=this.focusId()??this.selected()?.injector.id;return t&&e.some(e=>e.node.injector.id===t)?t:e[0]?.node.injector.id??null});path=Q(()=>{let e=this.selected();if(!e)return[];let{map:t,parents:n}=this.index(),r=e.injector.path??[];if(!r.length){r=[e.injector.id];let t=n.get(e.injector.id);for(;t;)r.push(t),t=n.get(t);r.push(XR)}return r.map(e=>{let n=t.get(e);return{id:e,label:n?tz(n):e===XR?`Null injector`:`Not listed`,kind:n?ez(n):`null`,providers:n?.providers.length??0}})});providerHits=Q(()=>{let e=this.normalizedQuery();if(!e)return[];let t=[];for(let n of this.index().map.values()){let r=n.providers.filter(t=>t.token.toLowerCase().includes(e));r.length&&t.push({id:n.injector.id,label:tz(n),kind:ez(n),tokens:r.map(e=>e.token).join(`, `)})}return t});providedBy=Q(()=>this.providerHits().slice(0,ZR));providedByMore=Q(()=>Math.max(0,this.providerHits().length-ZR));groupedProviders=Q(()=>{let e=this.normalizedQuery(),t=e?this.sourceProviders().filter(t=>t.token.toLowerCase().includes(e)||t.file.toLowerCase().includes(e)):this.sourceProviders(),n=[{type:`root-provider`,label:`Root Providers (provide*)`,items:[]},{type:`injectable`,label:`Injectable Services`,items:[]},{type:`injection`,label:`inject() Calls`,items:[]},{type:`provider`,label:`Component Providers`,items:[]}];for(let e of t)n.find(t=>t.type===e.type)?.items.push(e);return n.filter(e=>e.items.length>0)});sourceMatchCount=Q(()=>this.groupedProviders().reduce((e,t)=>e+t.items.length,0));searchSummary=Q(()=>{let e=this.query().trim();if(!e)return``;let t=this.providerHits().length;return t===1?`1 injector provides “${e}”.`:t>1?`${t} injectors provide “${e}”.`:this.rows().length?`No injector provides “${e}”.`:`Nothing here matches “${e}”.`});normalizedQuery=Q(()=>this.query().trim().toLowerCase());destroyRef=T(Ts);stopTree=null;treeLoad=0;lastSearchMessage=``;constructor(){fc(e=>{let t=this.searchSummary();if(!t){this.lastSearchMessage=``;return}if(t===this.lastSearchMessage)return;let n=setTimeout(()=>{this.lastSearchMessage=t,this.announcement.set(t)},QR);e(()=>clearTimeout(n))}),fc(()=>{let e=this.rpc();e&&(this.loadInjectorTree(e),this.loadSourceProviders(e))}),fc(e=>{let t=this.rpc();if(!t||!this.multiPage())return;let n=!0,r=null;e(()=>{n=!1,r?.()}),t.scope(`pangular`).rpc.sharedState(`component-tree`).then(e=>{if(!n)return;let t=e=>{let t=e?.pages;this.pageTitles.set(t&&typeof t==`object`?t:{})};t(e.value()),r=e.on(`updated`,t)}).catch(()=>{})}),this.destroyRef.onDestroy(()=>{this.stopTree?.(),this.highlight(null)})}async retry(){let e=this.rpc();if(!e||this.retrying())return;let t=document.activeElement;this.retrying.set(!0);try{await Promise.all([this.loadInjectorTree(e),this.loadSourceProviders(e)])}finally{this.retrying.set(!1)}this.destroyRef.destroyed||Bd(()=>{t?.isConnected&&document.activeElement!==document.body||this.host.nativeElement.querySelector(`.toolbar input, .toolbar button`)?.focus()},{injector:this.injector})}clearQuery(){this.query.set(``),this.queryInput()?.nativeElement.focus()}label(e){return tz(e)}kind(e){return ez(e)}tone(e){return $R[e]??$R.null}kindById(e){let t=this.index().map.get(e);return t?ez(t):`null`}labelById(e){let t=this.index().map.get(e);return t?tz(t):e===XR?`Null injector`:`not listed`}capital(e){return e.charAt(0).toUpperCase()+e.slice(1)}matches(e){let t=this.normalizedQuery();return!!t&&e.toLowerCase().includes(t)}setView(e){this.view()!==e&&(this.view.set(e),this.choose(null),this.focusId.set(null))}select(e){this.choose(e),this.focusId.set(e)}choose(e){let t=e?this.index().map.get(e):void 0;this.selectedId.set(e),this.selectedLabel.set(t?tz(t):null),this.wasGone=!1}syncGone(){let e=this.gone()!==null;if(e&&!this.wasGone){let e=`The selected injector is no longer on the page.`;this.announcement.update(t=>t===e?`${e}\u00a0`:e)}this.wasGone=e}selectPage(e){if(!e||e===this.shownPageId())return;this.chosenPageId.set(e),this.wasGone=this.gone()!==null;let t=this.pageOptions().find(t=>t.value===e)?.label??e;this.announcement.set(`Showing the injectors of ${t}.`)}notePageGone(e){let t=this.chosenPageId();if(!t||e?.[t])return;let n=this.pageOptions().find(e=>e.value===t)?.label??`The chosen page`;this.chosenPageId.set(null),this.announcement.set(`${n} closed, so this shows another page.`),this.wasGone=!0}toggle(e,t){t?.stopPropagation(),!this.normalizedQuery()&&this.collapsed.update(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})}reveal(e){let t=this.index().map.get(e);if(!t)return;this.setView(t.injector.type===`element`?`element`:`environment`);let{parents:n}=this.index();this.collapsed.update(t=>{let r=new Set(t),i=n.get(e);for(;i;)r.delete(i),i=n.get(i);return r}),this.onlyProviding()&&t.providers.length===0&&this.onlyProviding.set(!1),t.injector.type===`element`&&!t.injector.component&&this.componentsOnly.set(!1),this.select(e),Bd(()=>this.focusRow(e,!1),{injector:this.injector})}highlight(e){let t=this.rpc();if(!t)return;let n=e?.injector.type===`element`?e.injector.selector??null:null,r=n?{pageId:this.shownPageId()||null,selector:n}:null;t.scope(`pangular`).rpc.call(`request-page-highlight`,r).catch(()=>{})}onTreeKey(e){let t=this.rows();if(!t.length)return;let n=this.rovingId(),r=t.findIndex(e=>e.node.injector.id===n),i=Math.max(r,0),a=t[i],o=-1;switch(e.key){case`ArrowDown`:o=Math.min(i+1,t.length-1);break;case`ArrowUp`:o=Math.max(i-1,0);break;case`Home`:o=0;break;case`End`:o=t.length-1;break;case`ArrowRight`:a.hasChildren&&!a.expanded?this.toggle(a.node.injector.id):a.hasChildren&&(o=i+1);break;case`ArrowLeft`:if(a.hasChildren&&a.expanded&&!this.normalizedQuery())this.toggle(a.node.injector.id);else{let e=this.index().parents.get(a.node.injector.id);o=t.findIndex(t=>t.node.injector.id===e)}break;case`Enter`:case` `:this.select(a.node.injector.id);break;default:return}if(e.preventDefault(),o>=0){let e=t[o].node.injector.id;this.focusId.set(e),this.choose(e),queueMicrotask(()=>this.focusRow(e,!0))}}focusRow(e,t){let n=document.querySelector(`.row[data-id="${CSS.escape(e)}"]`);n&&(t&&n.focus(),n.scrollIntoView({block:`nearest`}))}clearTree(){this.stopTree?.(),this.stopTree=null}async loadInjectorTree(e){let t=++this.treeLoad;this.clearTree();let n=e.scope(`pangular`),r;try{r=await n.rpc.sharedState(`injector-tree`)}catch{t===this.treeLoad&&this.treeFailed.set(!0);return}if(this.destroyRef.destroyed||this.rpc()!==e||t!==this.treeLoad)return;this.treeFailed.set(!1);let i=e=>{let t=e&&typeof e==`object`?e:null;this.notePageGone(t?.pages),this.treeState.set(t),this.syncGone()};i(r.value()),this.clearTree(),this.stopTree=r.on(`updated`,i)}async loadSourceProviders(e){let t=e.scope(`pangular`);try{this.sourceProviders.set(await t.rpc.call(`get-providers`)),this.sourceFailed.set(!1)}catch{this.sourceProviders.set([]),this.sourceFailed.set(!0)}finally{this.loaded.set(!0)}}count(e){return e.reduce((e,t)=>e+1+this.count(t.children),0)}nodeMatches(e,t){let n=e.injector;return n.name.toLowerCase().includes(t)||!!n.component?.toLowerCase().includes(t)||!!n.directives?.some(e=>e.toLowerCase().includes(t))||e.providers.some(e=>e.token.toLowerCase().includes(t))||!!e.dependencies?.some(e=>e.token.toLowerCase().includes(t))}prune(e,t){let n=[];for(let r of e){let e=this.prune(r.children,t);(t(r)||e.length)&&n.push({...r,children:e})}return n}static ɵfac=function(t){return new(t||e)};static ɵcmp=Gh({type:e,selectors:[[`app-di-inspector`]],viewQuery:function(e,t){e&1&&l_(t.queryInput,ML,5),e&2&&u_()},inputs:{rpc:[1,`rpc`]},decls:11,vars:2,consts:[[`loadError`,``],[`pagePicker`,``],[`queryInput`,``],[`role`,`status`,1,`sr-only`],[`role`,`status`,1,`state`],[3,`ngTemplateOutlet`,`ngTemplateOutletContext`],[`role`,`alert`,1,`state`,`load-error`],[1,`state-title`],[1,`state-hint`],[`type`,`button`,3,`click`],[1,`page-picker`],[`id`,`di-page-label`,1,`label-key`],[`labelledBy`,`di-page-label`,3,`valueChange`,`options`,`value`],[1,`intro`],[1,`toolbar`],[`role`,`group`,`aria-label`,`Injector tree`,1,`segmented`],[1,`pill`],[1,`search`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`,1,`search-icon`],[`cx`,`11`,`cy`,`11`,`r`,`7`],[`d`,`m20 20-3.5-3.5`],[`type`,`search`,`placeholder`,`Find a token, component or injector…`,`aria-label`,`Find a token, component or injector`,`autocomplete`,`off`,`spellcheck`,`false`,3,`input`,`keydown.escape`,`value`],[3,`ngTemplateOutlet`],[1,`checkbox`],[`type`,`checkbox`,3,`change`,`checked`],[1,`total`],[1,`notice`],[1,`where`],[1,`where`,`muted`],[1,`layout`],[1,`state`],[`role`,`tree`,1,`tree`,3,`keydown`,`hidden`],[`role`,`treeitem`,1,`row`,3,`selected`,`--%NS%depth`],[`aria-labelledby`,`di-detail-title`,1,`detail`,`gone`],[`aria-labelledby`,`di-detail-title`,1,`detail`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`],[`cx`,`12`,`cy`,`12`,`r`,`9`],[`d`,`M12 11v5M12 8h.01`],[1,`where-label`],[`type`,`button`,1,`chip`],[1,`more`],[`type`,`button`,1,`chip`,3,`click`],[`aria-hidden`,`true`,1,`dot`],[1,`mono`],[1,`chip-tokens`],[`type`,`button`,1,`link`,3,`click`],[`role`,`treeitem`,1,`row`,3,`click`,`focus`,`blur`,`mouseenter`,`mouseleave`],[`aria-hidden`,`true`,1,`twisty`,3,`open`],[`aria-hidden`,`true`,1,`twisty-space`],[`aria-hidden`,`true`,1,`kind`],[1,`sr-only`],[1,`name`,`mono`],[1,`sub`],[1,`meta`],[1,`count`],[1,`count`,`provides`],[`aria-hidden`,`true`,1,`twisty`,3,`click`],[`viewBox`,`0 0 24 24`],[`d`,`m9 6 6 6-6 6`],[`d`,`M12 5v14M5 12l7 7 7-7`],[`d`,`M21 8 12 3 3 8v8l9 5 9-5z`],[1,`detail-head`],[`id`,`di-detail-title`,1,`mono`],[1,`state`,`compact`],[`type`,`button`],[1,`badge`],[`aria-label`,`Classes on this element`,1,`classes`],[1,`block`],[1,`hint`],[1,`path`],[3,`current`],[1,`providers`],[1,`empty-line`],[3,`is-component`],[1,`step`,`null`],[`type`,`button`,1,`step`],[1,`hint-inline`],[`type`,`button`,1,`step`,3,`click`],[1,`step-count`],[1,`deps`],[1,`dep`,3,`hit`],[1,`dep`],[1,`dep-main`],[1,`token`,`mono`],[1,`flag`],[1,`dep-meta`],[`type`,`button`,1,`from`],[1,`from`,`absent`],[1,`from`,`missing`],[`type`,`button`,1,`from`,3,`click`],[1,`provider`,3,`hit`],[1,`provider`],[1,`flag`,`kind-flag`],[1,`provider-global`,3,`rpc`,`pageId`,`target`,`label`],[`aria-hidden`,`true`,1,`spinner`],[`type`,`search`,`placeholder`,`Filter by token or file…`,`aria-label`,`Filter by token or file`,`autocomplete`,`off`,`spellcheck`,`false`,3,`input`,`keydown.escape`,`value`],[`aria-live`,`polite`,1,`total`],[1,`source-providers`],[1,`provider-group`],[1,`section-count`],[`role`,`list`,1,`provider-list`],[1,`provider-card`],[1,`provider-header`],[1,`token`],[1,`provided-in`],[1,`provider-meta`],[1,`path`,3,`file`,`line`],[1,`as`]],template:function(e,t){e&1&&(R(0,`p`,3),J(1),z(),og(2,HL,7,5,`ng-template`,null,0,Ev)(4,WL,1,1,`ng-template`,null,1,Ev),N(6,LR,34,19)(7,RR,4,0,`div`,4)(8,zR,1,3,`ng-container`,5)(9,VR,6,1)(10,YR,21,6)),e&2&&(j(),Y(t.announcement()),j(5),P(t.roots().length>0?6:t.loaded()?t.loadFailed()&&t.sourceProviders().length===0?8:t.sourceProviders().length===0?9:10:7))},dependencies:[lb,qD,OA,HA],styles:[`[_nghost-%COMP%] { +}`]})},FL=[`queryInput`],IL=(e,t,n)=>({kind:`provider`,injectorId:e,token:t,index:n}),LL=()=>({compact:!1}),RL=()=>({compact:!0}),zL=(e,t)=>t.node.injector.id,BL=(e,t)=>t.id,VL=(e,t)=>t.from+t.token+e,HL=(e,t)=>t.token+e,UL=(e,t)=>t.type,WL=(e,t)=>t.token+t.file+t.line;function GL(e,t){if(e&1){let e=U();R(0,`div`,6)(1,`p`,7),J(2),z(),R(3,`p`,8),J(4,` The devtools server did not answer. Check that it is still running, then retry. `),z(),R(5,`button`,9),W(`click`,function(){return D(e),O(G().retry())}),J(6),z()()}if(e&2){let e=t.compact,n=G();q(`compact`,e),j(2),X(` `,e?`Couldn't load the live injector tree`:`Couldn't load DI data`,` `),j(3),M(`aria-disabled`,n.retrying()||null),j(),X(` `,n.retrying()?`Retrying…`:`Retry`,` `)}}function KL(e,t){if(e&1){let e=U();R(0,`div`,10)(1,`span`,11),J(2,`Page`),z(),R(3,`app-select`,12),W(`valueChange`,function(t){return D(e),O(G(2).selectPage(t))}),z()()}if(e&2){let e=G(2);j(3),L(`options`,e.pageOptions())(`value`,e.shownPageId())}}function qL(e,t){e&1&&N(0,KL,4,2,`div`,10),e&2&&P(G().pageOptions().length>1?0:-1)}function JL(e,t){if(e&1){let e=U();R(0,`label`,23)(1,`input`,24),W(`change`,function(){D(e);let t=G(2);return O(t.componentsOnly.set(!t.componentsOnly()))}),z(),J(2,` Components only `),z()}if(e&2){let e=G(2);j(),L(`checked`,e.componentsOnly())}}function YL(e,t){e&1&&(R(0,`span`,25),J(1),z()),e&2&&(j(),X(`Change detection: `,t))}function XL(e,t){e&1&&(R(0,`p`,26),k(),R(1,`svg`,35),B(2,`circle`,36)(3,`path`,37),z(),hs(),R(4,`span`)(5,`strong`),J(6,`The page reported only part of its injector tree.`),z(),J(7,` It keeps at most 2000 element injectors and 2500 in all, and leaves out injectors nested more than 1000 levels deep, so a lookup path or a provider can point to one that is not listed. `),z()())}function ZL(e,t){if(e&1){let e=U();R(0,`button`,41),W(`click`,function(){let t=D(e).$implicit;return O(G(3).reveal(t.id))}),B(1,`span`,42),R(2,`span`,43),J(3),z(),R(4,`span`,44),J(5),z()()}if(e&2){let e=t.$implicit,n=G(3);j(),K(`background`,n.tone(e.kind)),j(2),Y(e.label),j(2),Y(e.tokens)}}function QL(e,t){e&1&&(R(0,`span`,40),J(1),z()),e&2&&(j(),X(`+`,t,` more`))}function $L(e,t){if(e&1&&(R(0,`div`,27)(1,`span`,38),J(2,`Provided by`),z(),F(3,ZL,6,4,`button`,39,BL),N(5,QL,2,1,`span`,40),z()),e&2){let e,t=G(2);j(3),I(t.providedBy()),j(2),P((e=t.providedByMore())?5:-1,e)}}function eR(e,t){if(e&1){let e=U();R(0,`div`,28),J(1),R(2,`button`,45),W(`click`,function(){return D(e),O(G(2).clearQuery())}),J(3,`Clear search`),z()()}if(e&2){let e=G(2);j(),X(` Nothing here matches “`,e.query().trim(),`”. `)}}function tR(e,t){e&1&&J(0,` None of them provide anything themselves. `)}function nR(e,t){e&1&&J(0,` Turn off “Components only” to see directives. `)}function rR(e,t){e&1&&J(0,` Try a different search. `)}function iR(e,t){if(e&1&&(R(0,`div`,30)(1,`p`,7),J(2,`No injectors to show`),z(),R(3,`p`,8),N(4,tR,1,0)(5,nR,1,0)(6,rR,1,0),z()()),e&2){let e=G(2);j(4),P(e.onlyProviding()?4:e.componentsOnly()&&e.view()===`element`?5:6)}}function aR(e,t){if(e&1){let e=U();R(0,`span`,56),W(`click`,function(t){D(e);let n=G().$implicit;return O(G(2).toggle(n.node.injector.id,t))}),k(),R(1,`svg`,57),B(2,`path`,58),z()()}if(e&2){let e=G().$implicit;q(`open`,e.expanded)}}function oR(e,t){e&1&&B(0,`span`,48)}function sR(e,t){if(e&1&&(R(0,`span`,52),J(1),z()),e&2){let e=G().$implicit;j(),Y(e.node.injector.component)}}function cR(e,t){if(e&1&&(R(0,`span`,52),J(1),z()),e&2){let e=G().$implicit;j(),Y(e.node.injector.directives.join(`, `))}}function lR(e,t){if(e&1&&(R(0,`span`,54),k(),R(1,`svg`,35),B(2,`path`,59),z(),hs(),R(3,`span`,50),J(4,`injects`),z(),J(5),z()),e&2){let e=G().$implicit;M(`title`,e.node.dependencies.length+` injected`),j(5),X(` `,e.node.dependencies.length,` `)}}function uR(e,t){if(e&1&&(R(0,`span`,55),k(),R(1,`svg`,35),B(2,`path`,60),z(),hs(),R(3,`span`,50),J(4,`provides`),z(),J(5),z()),e&2){let e=G().$implicit;M(`title`,e.node.injector.providerCount+` provided`),j(5),X(` `,e.node.injector.providerCount,` `)}}function dR(e,t){if(e&1){let e=U();R(0,`div`,46),W(`click`,function(){let t=D(e).$implicit;return O(G(2).select(t.node.injector.id))})(`focus`,function(){let t=D(e).$implicit,n=G(2);return n.focusId.set(t.node.injector.id),O(n.highlight(t.node))})(`blur`,function(){return D(e),O(G(2).highlight(null))})(`mouseenter`,function(){let t=D(e).$implicit;return O(G(2).highlight(t.node))})(`mouseleave`,function(){return D(e),O(G(2).highlight(null))}),N(1,aR,3,2,`span`,47)(2,oR,1,0,`span`,48),R(3,`span`,49),J(4),z(),R(5,`span`,50),J(6),z(),R(7,`span`,51),J(8),z(),N(9,sR,2,1,`span`,52)(10,cR,2,1,`span`,52),R(11,`span`,53),N(12,lR,6,2,`span`,54),N(13,uR,6,2,`span`,55),z()()}if(e&2){let e=t.$implicit,n=G(2);K(`--%NS%depth`,e.depth),q(`selected`,n.selected()?.injector?.id===e.node.injector.id),M(`aria-level`,e.depth+1)(`aria-expanded`,e.hasChildren?e.expanded:null)(`aria-selected`,n.selected()?.injector?.id===e.node.injector.id)(`tabindex`,n.rovingId()===e.node.injector.id?0:-1)(`data-id`,e.node.injector.id),j(),P(e.hasChildren?1:2),j(2),K(`--%NS%tone`,n.tone(n.kind(e.node))),M(`title`,n.kind(e.node)),j(),Y(n.kind(e.node)[0].toUpperCase()),j(2),Y(n.kind(e.node)),j(2),Y(n.label(e.node)),j(),P(e.node.injector.component?9:e.node.injector.directives?.length?10:-1),j(3),P((e.node.dependencies?.length??0)>0?12:-1),j(),P(e.node.injector.providerCount>0?13:-1)}}function fR(e,t){if(e&1){let e=U();R(0,`button`,9),W(`click`,function(){let t=D(e);return O(G(3).reveal(t.node.injector.id))}),J(1),z()}if(e&2){let e=G(3);j(),X(` Show `,e.label(t.node),` `)}}function pR(e,t){if(e&1&&(R(0,`section`,33)(1,`header`,61)(2,`h2`,62),J(3),z()(),R(4,`div`,63)(5,`p`,8),J(6,` This injector is no longer on the page. Its component or directive was destroyed. `),z(),N(7,fR,2,1,`button`,64),z()()),e&2){let e,n=G(2);j(3),Y(t),j(4),P((e=n.rows()[0])?7:-1,e)}}function mR(e,t){if(e&1&&(R(0,`li`),J(1),z()),e&2){let e=t.$implicit;q(`is-component`,e===G(2).injector.component),j(),Y(e)}}function hR(e,t){if(e&1&&(R(0,`ul`,66),F(1,mR,2,3,`li`,73,kg),z()),e&2){let e=G();j(),I(e.injector.directives)}}function gR(e,t){if(e&1&&(R(0,`span`,74),B(1,`span`,42),J(2,` Null injector `),R(3,`span`,76),J(4,`throws NullInjectorError`),z()()),e&2){let e=G(4);j(),K(`background`,e.tone(`null`))}}function _R(e,t){if(e&1&&(R(0,`span`,78),J(1),R(2,`span`,50),J(3),z()()),e&2){let e=G(2).$implicit;j(),X(` `,e.providers,` `),j(2),Y(e.providers===1?`provider`:`providers`)}}function vR(e,t){if(e&1){let e=U();R(0,`button`,77),W(`click`,function(){D(e);let t=G().$implicit;return O(G(3).reveal(t.id))}),B(1,`span`,42),R(2,`span`,43),J(3),z(),N(4,_R,4,2,`span`,78),z()}if(e&2){let e=G().$implicit,t=G(3);j(),K(`background`,t.tone(e.kind)),j(2),Y(e.label),j(),P(e.providers?4:-1)}}function yR(e,t){if(e&1&&(R(0,`li`),N(1,gR,5,2,`span`,74)(2,vR,5,4,`button`,75),z()),e&2){let e=t.$implicit,n=t.$index,r=G(3);q(`current`,n===0),j(),P(e.id===r.nullId?1:2)}}function bR(e,t){e&1&&(R(0,`p`,68),J(1,`Only services this injector has already created are listed.`),z())}function xR(e,t){if(e&1&&(R(0,`span`,84),J(1),z()),e&2){let e=t.$implicit;j(),Y(e)}}function SR(e,t){if(e&1&&(R(0,`span`),J(1),z()),e&2){let e=G().$implicit;j(),X(`for `,e.from)}}function CR(e,t){if(e&1){let e=U();R(0,`button`,89),W(`click`,function(){let t=D(e);return O(G(6).reveal(t))}),B(1,`span`,42),J(2,` from `),R(3,`span`,43),J(4),z()()}if(e&2){let e=t,n=G(6);j(),K(`background`,n.tone(n.kindById(e))),j(3),Y(n.labelById(e))}}function wR(e,t){e&1&&(R(0,`span`,87),J(1,`optional, not provided`),z())}function TR(e,t){e&1&&(R(0,`span`,88),J(1,`not provided anywhere`),z())}function ER(e,t){if(e&1&&(R(0,`li`,81)(1,`div`,82)(2,`span`,83),J(3),z(),F(4,xR,2,1,`span`,84,kg),z(),R(6,`div`,85),N(7,SR,2,1,`span`),N(8,CR,5,3,`button`,86)(9,wR,2,0,`span`,87)(10,TR,2,0,`span`,88),z()()),e&2){let e,n=t.$implicit,r=G(3);q(`hit`,G(2).matches(n.token)),j(3),Y(n.token),j(),I(n.flags),j(3),P(r.injector.type!==`element`||r.injector.directives&&r.injector.directives.length>1?7:-1),j(),P((e=n.providedBy)?8:n.flags.includes(`optional`)?9:10,e)}}function DR(e,t){if(e&1&&(R(0,`ul`,79),F(1,ER,11,5,`li`,80,VL),z()),e&2){let e=G(2);j(),I(e.dependencies)}}function OR(e,t){e&1&&(R(0,`p`,72),J(1,`Nothing is injected through the constructor or inject().`),z())}function kR(e,t){e&1&&(R(0,`p`,72),J(1,`No service created here has injected anything yet.`),z())}function AR(e,t){if(e&1&&(R(0,`div`,67)(1,`h3`),J(2),R(3,`span`,16),J(4),z()(),N(5,bR,2,0,`p`,68),N(6,DR,3,0,`ul`,79)(7,OR,2,0,`p`,72)(8,kR,2,0,`p`,72),z()),e&2){let e=G();j(2),X(` `,e.injector.type===`element`?`Injected here`:`Injected by its services`,` `),j(2),Y(e.dependencies?.length??0),j(),P(e.injector.type===`element`?-1:5),j(),P(e.dependencies?.length?6:e.injector.type===`element`?7:8)}}function jR(e,t){e&1&&(R(0,`span`,84),J(1,`viewProviders`),z())}function MR(e,t){e&1&&(R(0,`span`,84),J(1,`multi`),z())}function NR(e,t){if(e&1&&(R(0,`div`,85),J(1),z()),e&2){let e=G().$implicit;j(),X(`via `,e.importPath.join(` › `))}}function PR(e,t){if(e&1&&(R(0,`li`,91)(1,`div`,82)(2,`span`,83),J(3),z(),R(4,`span`,92),J(5),z(),N(6,jR,2,0,`span`,84),N(7,MR,2,0,`span`,84),z(),N(8,NR,2,1,`div`,85),B(9,`app-store-global`,93),z()),e&2){let e=t.$implicit,n=t.$index,r=G(2),i=G(2);q(`hit`,i.matches(e.token)),j(3),Y(e.token),j(2),Y(e.type===`unknown`?`provider`:`use`+i.capital(e.type)),j(),P(e.isViewProvider?6:-1),j(),P(e.multi?7:-1),j(),P(e.importPath?.length?8:-1),j(),L(`rpc`,i.rpc())(`pageId`,i.shownPageId())(`target`,gv(11,IL,r.injector.id,e.token,n))(`label`,e.token)}}function FR(e,t){if(e&1&&(R(0,`ul`,71),F(1,PR,10,15,`li`,90,HL),z()),e&2){let e=G();j(),I(e.providers)}}function IR(e,t){e&1&&J(0,` No providers or viewProviders on this element. `)}function LR(e,t){e&1&&J(0,` This injector has no providers of its own. `)}function RR(e,t){if(e&1&&(R(0,`p`,72),N(1,IR,1,0)(2,LR,1,0),z()),e&2){let e=G();j(),P(e.injector.type===`element`?1:2)}}function zR(e,t){if(e&1&&(R(0,`section`,34)(1,`header`,61)(2,`span`,65),J(3),z(),R(4,`h2`,62),J(5),z(),N(6,hR,3,0,`ul`,66),z(),R(7,`div`,67)(8,`h3`),J(9,`Lookup path`),z(),R(10,`p`,68),J(11,`Angular asks these injectors in order until one has the token.`),z(),R(12,`ol`,69),F(13,yR,3,3,`li`,70,BL),z()(),N(15,AR,9,4,`div`,67),R(16,`div`,67)(17,`h3`),J(18,` Provides `),R(19,`span`,16),J(20),z()(),N(21,FR,3,0,`ul`,71)(22,RR,3,1,`p`,72),z()()),e&2){let e=t,n=G(2);j(2),K(`--%NS%tone`,n.tone(n.kind(e))),j(),Y(n.kind(e)),j(2),Y(n.label(e)),j(),P(e.injector.directives?.length?6:-1),j(7),I(n.path()),j(2),P(e.injector.type===`element`||e.dependencies?15:-1),j(5),Y(e.providers.length),j(),P(e.providers.length?21:22)}}function BR(e,t){if(e&1){let e=U();R(0,`p`,13),J(1,` Every component and directive gets an injector. When it asks for a token, Angular walks up this tree, then through the environment injectors, until something provides it. `),z(),R(2,`div`,14)(3,`div`,15)(4,`button`,9),W(`click`,function(){return D(e),O(G().setView(`element`))}),J(5,` Elements `),R(6,`span`,16),J(7),z()(),R(8,`button`,9),W(`click`,function(){return D(e),O(G().setView(`environment`))}),J(9,` Environment `),R(10,`span`,16),J(11),z()()(),R(12,`div`,17),k(),R(13,`svg`,18),B(14,`circle`,19)(15,`path`,20),z(),hs(),R(16,`input`,21,2),W(`input`,function(t){return D(e),O(G().query.set(t.target.value))})(`keydown.escape`,function(){return D(e),O(G().query.set(``))}),z()(),Wg(18,22),N(19,JL,3,1,`label`,23),R(20,`label`,23)(21,`input`,24),W(`change`,function(){D(e);let t=G();return O(t.onlyProviding.set(!t.onlyProviding()))}),z(),J(22,` With providers `),z(),N(23,YL,2,1,`span`,25),z(),N(24,XL,8,0,`p`,26),N(25,$L,6,1,`div`,27)(26,eR,4,1,`div`,28),R(27,`div`,29),N(28,iR,7,1,`div`,30),R(29,`div`,31),W(`keydown`,function(t){return D(e),O(G().onTreeKey(t))}),F(30,dR,14,19,`div`,32,zL),z(),N(32,pR,8,2,`section`,33)(33,zR,23,8,`section`,34),z()}if(e&2){let e,t,n=G(),r=d_(5);j(4),q(`active`,n.view()===`element`),M(`aria-pressed`,n.view()===`element`),j(3),Y(n.elementCount()),j(),q(`active`,n.view()===`environment`),M(`aria-pressed`,n.view()===`environment`),j(3),Y(n.environmentCount()),j(5),L(`value`,n.query()),j(2),L(`ngTemplateOutlet`,r),j(),P(n.view()===`element`?19:-1),j(2),L(`checked`,n.onlyProviding()),j(2),P((e=n.zone())?23:-1,e),j(),P(n.truncated()?24:-1),j(),P(n.providedBy().length?25:n.query().trim()&&!n.rows().length?26:-1),j(3),P(n.rows().length?-1:28),j(),L(`hidden`,!n.rows().length),M(`aria-label`,n.view()===`element`?`Element injectors`:`Environment injectors`),j(),I(n.rows()),j(2),P((t=n.gone())?32:(t=n.selected())?33:-1,t)}}function VR(e,t){e&1&&(R(0,`div`,4),B(1,`span`,94),R(2,`p`,7),J(3,`Loading dependency injection data…`),z()())}function HR(e,t){e&1&&Wg(0,5),e&2&&(G(),L(`ngTemplateOutlet`,d_(3))(`ngTemplateOutletContext`,mv(2,LL)))}function UR(e,t){if(e&1&&(R(0,`div`,14),Wg(1,22),z()),e&2){G(2);let e=d_(5);j(),L(`ngTemplateOutlet`,e)}}function WR(e,t){e&1&&(N(0,UR,2,1,`div`,14),R(1,`div`,30)(2,`p`,7),J(3,`No DI data found`),z(),R(4,`p`,8),J(5,` Open the app in a browser with the devtools connected to see its live injectors. No providers, injectables or inject() calls were found in the source either. `),z()()),e&2&&P(G().pageOptions().length>1?0:-1)}function GR(e,t){e&1&&Wg(0,5),e&2&&(G(2),L(`ngTemplateOutlet`,d_(3))(`ngTemplateOutletContext`,mv(2,RL)))}function KR(e,t){if(e&1){let e=U();R(0,`div`,30)(1,`p`,7),J(2),z(),R(3,`p`,8),J(4,`Try part of a token name or a file path.`),z(),R(5,`button`,9),W(`click`,function(){return D(e),O(G(2).clearQuery())}),J(6,`Clear filter`),z()()}if(e&2){let e=G(2);j(2),X(`No providers match “`,e.query(),`”`)}}function qR(e,t){if(e&1&&(R(0,`span`,104),J(1),z()),e&2){let e=G().$implicit;j(),X(`providedIn: `,e.providedIn)}}function JR(e,t){if(e&1&&(R(0,`span`,107),J(1),z()),e&2){let e=G().$implicit;j(),X(`as `,e.source)}}function YR(e,t){if(e&1&&(R(0,`li`,101)(1,`div`,102)(2,`span`,103),J(3),z(),N(4,qR,2,1,`span`,104),z(),R(5,`div`,105),B(6,`app-source-link`,106),N(7,JR,2,1,`span`,107),z()()),e&2){let e=t.$implicit;j(3),Y(e.token),j(),P(e.providedIn?4:-1),j(2),L(`file`,e.file)(`line`,e.line),j(),P(e.source!==`class`&&e.source!==`providers array`?7:-1)}}function XR(e,t){if(e&1&&(R(0,`section`,98)(1,`h2`),J(2),R(3,`span`,99),J(4),z()(),R(5,`ul`,100),F(6,YR,8,5,`li`,101,WL),z()()),e&2){let e=t.$implicit;j(2),X(` `,e.label,` `),j(2),Y(e.items.length),j(2),I(e.items)}}function ZR(e,t){if(e&1&&(R(0,`div`,97),F(1,XR,8,2,`section`,98,UL),z()),e&2){let e=G(2);j(),I(e.groupedProviders())}}function QR(e,t){if(e&1){let e=U();R(0,`div`,14)(1,`div`,17),k(),R(2,`svg`,18),B(3,`circle`,19)(4,`path`,20),z(),hs(),R(5,`input`,95,2),W(`input`,function(t){return D(e),O(G().query.set(t.target.value))})(`keydown.escape`,function(){return D(e),O(G().query.set(``))}),z()(),Wg(7,22),R(8,`span`,96),J(9),z()(),N(10,GR,1,3,`ng-container`,5),R(11,`p`,26),k(),R(12,`svg`,35),B(13,`circle`,36)(14,`path`,37),z(),hs(),R(15,`span`)(16,`strong`),J(17,`DI from source scan (static analysis).`),z(),J(18,` Connect the overlay on Angular 20 or later to see the live injector tree. `),z()(),N(19,KR,7,1,`div`,30)(20,ZR,3,0,`div`,97)}if(e&2){let e=G(),t=d_(5);j(5),L(`value`,e.query()),j(2),L(`ngTemplateOutlet`,t),j(2),Z(` `,e.sourceMatchCount(),` of `,e.sourceProviders().length,` `),j(),P(e.loadFailed()?10:-1),j(9),P(e.groupedProviders().length===0?19:20)}}var $R=`inj-null`,ez=12,tz=600,nz={component:`var(--accent-text)`,directive:`var(--directive)`,environment:`var(--ok-text)`,null:`var(--text-3)`};function rz(e){return e.injector.type===`element`?e.injector.component?`component`:`directive`:`environment`}function iz(e){return e.injector.type===`element`?`<${e.injector.name}>`:e.injector.name}function az(e){return Array.isArray(e)}var oz=class e{rpc=$(null);injector=T(Cs);nullId=$R;hostPage=fE();treeState=A(null);pageTitles=A({});chosenPageId=A(null);treePages=Q(()=>{let e=this.treeState();if(!e)return{};let t=e.pages&&typeof e.pages==`object`?e.pages:{};return Object.keys(t).length||this.hostPage?t:{"":e}});shownPageId=Fv({source:()=>({pages:this.treePages(),chosen:this.chosenPageId()}),computation:({pages:e,chosen:t},n)=>{let r={};for(let[t,n]of Object.entries(e))r[t]={pageId:t,reportedAt:typeof n?.reportedAt==`number`?n.reportedAt:0};return pE(r,{chosen:t,host:this.hostPage,previous:n?.value??null})}});shownPage=Q(()=>{let e=this.shownPageId();return e===null?null:this.treePages()[e]??null});roots=Q(()=>{let e=this.shownPage()?.roots;return az(e)?e:[]});environment=Q(()=>{let e=this.shownPage()?.environment;return az(e)?e:[]});truncated=Q(()=>this.shownPage()?.truncated===!0);zone=Q(()=>{let e=this.shownPage()?.zone;return typeof e==`string`?_D(e):null});multiPage=Q(()=>!this.hostPage&&Object.keys(this.treePages()).length>1);pageOptions=Q(()=>{if(!this.multiPage())return[];let e=this.pageTitles();return Object.keys(this.treePages()).map(t=>{let n=e[t];return{value:t,label:n?.title||n?.url||`Page ${t}`,hint:n?.url}})});pageKey=Q(()=>this.shownPageId()??``);perPage(e){let t=new Map;return Fv({source:this.pageKey,computation:(n,r)=>(r&&t.set(r.source,r.value),t.has(n)?t.get(n):e())})}sourceProviders=A([]);loaded=A(!1);treeFailed=A(!1);sourceFailed=A(!1);loadFailed=Q(()=>this.treeFailed()||this.sourceFailed());retrying=A(!1);host=T(Pl);view=A(`element`);query=A(``);queryInput=Jv(`queryInput`);onlyProviding=A(!1);componentsOnly=A(!0);collapsed=this.perPage(()=>new Set);selectedId=this.perPage(()=>null);focusId=this.perPage(()=>null);announcement=A(``);selectedLabel=this.perPage(()=>null);wasGone=!1;index=Q(()=>{let e=new Map,t=new Map,n=(r,i)=>{for(let a of r)e.set(a.injector.id,a),i&&t.set(a.injector.id,i),n(a.children,a.injector.id)};return n(this.roots(),null),n(this.environment(),null),{map:e,parents:t}});elementCount=Q(()=>this.count(this.roots()));environmentCount=Q(()=>this.count(this.environment()));visible=Q(()=>{let e=this.view()===`element`?this.roots():this.environment();this.view()===`element`&&this.componentsOnly()&&(e=this.prune(e,e=>!!e.injector.component)),this.onlyProviding()&&(e=this.prune(e,e=>e.providers.length>0));let t=this.normalizedQuery();return t&&(e=this.prune(e,e=>this.nodeMatches(e,t))),e});rows=Q(()=>{let e=[],t=this.collapsed(),n=!!this.normalizedQuery(),r=(i,a)=>{for(let o of i){let i=n||!t.has(o.injector.id);e.push({node:o,depth:a,hasChildren:o.children.length>0,expanded:i}),i&&r(o.children,a+1)}};return r(this.visible(),0),e});selected=Q(()=>{let e=this.selectedId();return e?this.index().map.get(e)??null:this.rows()[0]?.node??null});gone=Q(()=>{let e=this.selectedId();return e&&!this.index().map.has(e)?this.selectedLabel()??`The injector`:null});rovingId=Q(()=>{let e=this.rows(),t=this.focusId()??this.selected()?.injector.id;return t&&e.some(e=>e.node.injector.id===t)?t:e[0]?.node.injector.id??null});path=Q(()=>{let e=this.selected();if(!e)return[];let{map:t,parents:n}=this.index(),r=e.injector.path??[];if(!r.length){r=[e.injector.id];let t=n.get(e.injector.id);for(;t;)r.push(t),t=n.get(t);r.push($R)}return r.map(e=>{let n=t.get(e);return{id:e,label:n?iz(n):e===$R?`Null injector`:`Not listed`,kind:n?rz(n):`null`,providers:n?.providers.length??0}})});providerHits=Q(()=>{let e=this.normalizedQuery();if(!e)return[];let t=[];for(let n of this.index().map.values()){let r=n.providers.filter(t=>t.token.toLowerCase().includes(e));r.length&&t.push({id:n.injector.id,label:iz(n),kind:rz(n),tokens:r.map(e=>e.token).join(`, `)})}return t});providedBy=Q(()=>this.providerHits().slice(0,ez));providedByMore=Q(()=>Math.max(0,this.providerHits().length-ez));groupedProviders=Q(()=>{let e=this.normalizedQuery(),t=e?this.sourceProviders().filter(t=>t.token.toLowerCase().includes(e)||t.file.toLowerCase().includes(e)):this.sourceProviders(),n=[{type:`root-provider`,label:`Root Providers (provide*)`,items:[]},{type:`injectable`,label:`Injectable Services`,items:[]},{type:`injection`,label:`inject() Calls`,items:[]},{type:`provider`,label:`Component Providers`,items:[]}];for(let e of t)n.find(t=>t.type===e.type)?.items.push(e);return n.filter(e=>e.items.length>0)});sourceMatchCount=Q(()=>this.groupedProviders().reduce((e,t)=>e+t.items.length,0));searchSummary=Q(()=>{let e=this.query().trim();if(!e)return``;let t=this.providerHits().length;return t===1?`1 injector provides “${e}”.`:t>1?`${t} injectors provide “${e}”.`:this.rows().length?`No injector provides “${e}”.`:`Nothing here matches “${e}”.`});normalizedQuery=Q(()=>this.query().trim().toLowerCase());destroyRef=T(Ts);stopTree=null;treeLoad=0;lastSearchMessage=``;constructor(){fc(e=>{let t=this.searchSummary();if(!t){this.lastSearchMessage=``;return}if(t===this.lastSearchMessage)return;let n=setTimeout(()=>{this.lastSearchMessage=t,this.announcement.set(t)},tz);e(()=>clearTimeout(n))}),fc(()=>{let e=this.rpc();e&&(this.loadInjectorTree(e),this.loadSourceProviders(e))}),fc(e=>{let t=this.rpc();if(!t||!this.multiPage())return;let n=!0,r=null;e(()=>{n=!1,r?.()}),t.scope(`pangular`).rpc.sharedState(`component-tree`).then(e=>{if(!n)return;let t=e=>{let t=e?.pages;this.pageTitles.set(t&&typeof t==`object`?t:{})};t(e.value()),r=e.on(`updated`,t)}).catch(()=>{})}),this.destroyRef.onDestroy(()=>{this.stopTree?.(),this.highlight(null)})}async retry(){let e=this.rpc();if(!e||this.retrying())return;let t=document.activeElement;this.retrying.set(!0);try{await Promise.all([this.loadInjectorTree(e),this.loadSourceProviders(e)])}finally{this.retrying.set(!1)}this.destroyRef.destroyed||Bd(()=>{t?.isConnected&&document.activeElement!==document.body||this.host.nativeElement.querySelector(`.toolbar input, .toolbar button`)?.focus()},{injector:this.injector})}clearQuery(){this.query.set(``),this.queryInput()?.nativeElement.focus()}label(e){return iz(e)}kind(e){return rz(e)}tone(e){return nz[e]??nz.null}kindById(e){let t=this.index().map.get(e);return t?rz(t):`null`}labelById(e){let t=this.index().map.get(e);return t?iz(t):e===$R?`Null injector`:`not listed`}capital(e){return e.charAt(0).toUpperCase()+e.slice(1)}matches(e){let t=this.normalizedQuery();return!!t&&e.toLowerCase().includes(t)}setView(e){this.view()!==e&&(this.view.set(e),this.choose(null),this.focusId.set(null))}select(e){this.choose(e),this.focusId.set(e)}choose(e){let t=e?this.index().map.get(e):void 0;this.selectedId.set(e),this.selectedLabel.set(t?iz(t):null),this.wasGone=!1}syncGone(){let e=this.gone()!==null;if(e&&!this.wasGone){let e=`The selected injector is no longer on the page.`;this.announcement.update(t=>t===e?`${e}\u00a0`:e)}this.wasGone=e}selectPage(e){if(!e||e===this.shownPageId())return;this.chosenPageId.set(e),this.wasGone=this.gone()!==null;let t=this.pageOptions().find(t=>t.value===e)?.label??e;this.announcement.set(`Showing the injectors of ${t}.`)}notePageGone(e){let t=this.chosenPageId();if(!t||e?.[t])return;let n=this.pageOptions().find(e=>e.value===t)?.label??`The chosen page`;this.chosenPageId.set(null),this.announcement.set(`${n} closed, so this shows another page.`),this.wasGone=!0}toggle(e,t){t?.stopPropagation(),!this.normalizedQuery()&&this.collapsed.update(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})}reveal(e){let t=this.index().map.get(e);if(!t)return;this.setView(t.injector.type===`element`?`element`:`environment`);let{parents:n}=this.index();this.collapsed.update(t=>{let r=new Set(t),i=n.get(e);for(;i;)r.delete(i),i=n.get(i);return r}),this.onlyProviding()&&t.providers.length===0&&this.onlyProviding.set(!1),t.injector.type===`element`&&!t.injector.component&&this.componentsOnly.set(!1),this.select(e),Bd(()=>this.focusRow(e,!1),{injector:this.injector})}highlight(e){let t=this.rpc();if(!t)return;let n=e?.injector.type===`element`?e.injector.selector??null:null,r=n?{pageId:this.shownPageId()||null,selector:n}:null;t.scope(`pangular`).rpc.call(`request-page-highlight`,r).catch(()=>{})}onTreeKey(e){let t=this.rows();if(!t.length)return;let n=this.rovingId(),r=t.findIndex(e=>e.node.injector.id===n),i=Math.max(r,0),a=t[i],o=-1;switch(e.key){case`ArrowDown`:o=Math.min(i+1,t.length-1);break;case`ArrowUp`:o=Math.max(i-1,0);break;case`Home`:o=0;break;case`End`:o=t.length-1;break;case`ArrowRight`:a.hasChildren&&!a.expanded?this.toggle(a.node.injector.id):a.hasChildren&&(o=i+1);break;case`ArrowLeft`:if(a.hasChildren&&a.expanded&&!this.normalizedQuery())this.toggle(a.node.injector.id);else{let e=this.index().parents.get(a.node.injector.id);o=t.findIndex(t=>t.node.injector.id===e)}break;case`Enter`:case` `:this.select(a.node.injector.id);break;default:return}if(e.preventDefault(),o>=0){let e=t[o].node.injector.id;this.focusId.set(e),this.choose(e),queueMicrotask(()=>this.focusRow(e,!0))}}focusRow(e,t){let n=document.querySelector(`.row[data-id="${CSS.escape(e)}"]`);n&&(t&&n.focus(),n.scrollIntoView({block:`nearest`}))}clearTree(){this.stopTree?.(),this.stopTree=null}async loadInjectorTree(e){let t=++this.treeLoad;this.clearTree();let n=e.scope(`pangular`),r;try{r=await n.rpc.sharedState(`injector-tree`)}catch{t===this.treeLoad&&this.treeFailed.set(!0);return}if(this.destroyRef.destroyed||this.rpc()!==e||t!==this.treeLoad)return;this.treeFailed.set(!1);let i=e=>{let t=e&&typeof e==`object`?e:null;this.notePageGone(t?.pages),this.treeState.set(t),this.syncGone()};i(r.value()),this.clearTree(),this.stopTree=r.on(`updated`,i)}async loadSourceProviders(e){let t=e.scope(`pangular`);try{this.sourceProviders.set(await t.rpc.call(`get-providers`)),this.sourceFailed.set(!1)}catch{this.sourceProviders.set([]),this.sourceFailed.set(!0)}finally{this.loaded.set(!0)}}count(e){return e.reduce((e,t)=>e+1+this.count(t.children),0)}nodeMatches(e,t){let n=e.injector;return n.name.toLowerCase().includes(t)||!!n.component?.toLowerCase().includes(t)||!!n.directives?.some(e=>e.toLowerCase().includes(t))||e.providers.some(e=>e.token.toLowerCase().includes(t))||!!e.dependencies?.some(e=>e.token.toLowerCase().includes(t))}prune(e,t){let n=[];for(let r of e){let e=this.prune(r.children,t);(t(r)||e.length)&&n.push({...r,children:e})}return n}static ɵfac=function(t){return new(t||e)};static ɵcmp=Gh({type:e,selectors:[[`app-di-inspector`]],viewQuery:function(e,t){e&1&&l_(t.queryInput,FL,5),e&2&&u_()},inputs:{rpc:[1,`rpc`]},decls:11,vars:2,consts:[[`loadError`,``],[`pagePicker`,``],[`queryInput`,``],[`role`,`status`,1,`sr-only`],[`role`,`status`,1,`state`],[3,`ngTemplateOutlet`,`ngTemplateOutletContext`],[`role`,`alert`,1,`state`,`load-error`],[1,`state-title`],[1,`state-hint`],[`type`,`button`,3,`click`],[1,`page-picker`],[`id`,`di-page-label`,1,`label-key`],[`labelledBy`,`di-page-label`,3,`valueChange`,`options`,`value`],[1,`intro`],[1,`toolbar`],[`role`,`group`,`aria-label`,`Injector tree`,1,`segmented`],[1,`pill`],[1,`search`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`,1,`search-icon`],[`cx`,`11`,`cy`,`11`,`r`,`7`],[`d`,`m20 20-3.5-3.5`],[`type`,`search`,`placeholder`,`Find a token, component or injector…`,`aria-label`,`Find a token, component or injector`,`autocomplete`,`off`,`spellcheck`,`false`,3,`input`,`keydown.escape`,`value`],[3,`ngTemplateOutlet`],[1,`checkbox`],[`type`,`checkbox`,3,`change`,`checked`],[1,`total`],[1,`notice`],[1,`where`],[1,`where`,`muted`],[1,`layout`],[1,`state`],[`role`,`tree`,1,`tree`,3,`keydown`,`hidden`],[`role`,`treeitem`,1,`row`,3,`selected`,`--%NS%depth`],[`aria-labelledby`,`di-detail-title`,1,`detail`,`gone`],[`aria-labelledby`,`di-detail-title`,1,`detail`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`],[`cx`,`12`,`cy`,`12`,`r`,`9`],[`d`,`M12 11v5M12 8h.01`],[1,`where-label`],[`type`,`button`,1,`chip`],[1,`more`],[`type`,`button`,1,`chip`,3,`click`],[`aria-hidden`,`true`,1,`dot`],[1,`mono`],[1,`chip-tokens`],[`type`,`button`,1,`link`,3,`click`],[`role`,`treeitem`,1,`row`,3,`click`,`focus`,`blur`,`mouseenter`,`mouseleave`],[`aria-hidden`,`true`,1,`twisty`,3,`open`],[`aria-hidden`,`true`,1,`twisty-space`],[`aria-hidden`,`true`,1,`kind`],[1,`sr-only`],[1,`name`,`mono`],[1,`sub`],[1,`meta`],[1,`count`],[1,`count`,`provides`],[`aria-hidden`,`true`,1,`twisty`,3,`click`],[`viewBox`,`0 0 24 24`],[`d`,`m9 6 6 6-6 6`],[`d`,`M12 5v14M5 12l7 7 7-7`],[`d`,`M21 8 12 3 3 8v8l9 5 9-5z`],[1,`detail-head`],[`id`,`di-detail-title`,1,`mono`],[1,`state`,`compact`],[`type`,`button`],[1,`badge`],[`aria-label`,`Classes on this element`,1,`classes`],[1,`block`],[1,`hint`],[1,`path`],[3,`current`],[1,`providers`],[1,`empty-line`],[3,`is-component`],[1,`step`,`null`],[`type`,`button`,1,`step`],[1,`hint-inline`],[`type`,`button`,1,`step`,3,`click`],[1,`step-count`],[1,`deps`],[1,`dep`,3,`hit`],[1,`dep`],[1,`dep-main`],[1,`token`,`mono`],[1,`flag`],[1,`dep-meta`],[`type`,`button`,1,`from`],[1,`from`,`absent`],[1,`from`,`missing`],[`type`,`button`,1,`from`,3,`click`],[1,`provider`,3,`hit`],[1,`provider`],[1,`flag`,`kind-flag`],[1,`provider-global`,3,`rpc`,`pageId`,`target`,`label`],[`aria-hidden`,`true`,1,`spinner`],[`type`,`search`,`placeholder`,`Filter by token or file…`,`aria-label`,`Filter by token or file`,`autocomplete`,`off`,`spellcheck`,`false`,3,`input`,`keydown.escape`,`value`],[`aria-live`,`polite`,1,`total`],[1,`source-providers`],[1,`provider-group`],[1,`section-count`],[`role`,`list`,1,`provider-list`],[1,`provider-card`],[1,`provider-header`],[1,`token`],[1,`provided-in`],[1,`provider-meta`],[1,`path`,3,`file`,`line`],[1,`as`]],template:function(e,t){e&1&&(R(0,`p`,3),J(1),z(),og(2,GL,7,5,`ng-template`,null,0,Ev)(4,qL,1,1,`ng-template`,null,1,Ev),N(6,BR,34,19)(7,VR,4,0,`div`,4)(8,HR,1,3,`ng-container`,5)(9,WR,6,1)(10,QR,21,6)),e&2&&(j(),Y(t.announcement()),j(5),P(t.roots().length>0?6:t.loaded()?t.loadFailed()&&t.sourceProviders().length===0?8:t.sourceProviders().length===0?9:10:7))},dependencies:[lb,qD,jA,GA],styles:[`[_nghost-%COMP%] { --%NS%directive: #7cb4ff; display: block; color: var(--%NS%text); @@ -7081,11 +7105,11 @@ button[_ngcontent-%COMP%] { .provider-meta[_ngcontent-%COMP%] .as[_ngcontent-%COMP%] { color: var(--%NS%text-2); -}`]})},iz=1e3;function az(e){return`${e>=1e3?`${iz}+`:String(e)} more ${e===1?`change`:`changes`} not shown`}function oz(e){let t=e.diffTruncated??0,n=e.diff.length+t;return n===0?`no change`:`${t>=1e3?`${n}+`:String(n)} ${n===1?`change`:`changes`}`}function sz(e,t){if(e.pageId!==t.pageId)return!1;let n=e.log.at(-1);if(!n)return!0;let r=t.log.at(-1);if(!r||r.seqe.seq===n.seq);return!i||i.timestamp===n.timestamp}var cz=`@type`,lz=new Set([`undefined`,`number`,`bigint`,`symbol`,`function`,`Date`,`RegExp`,`Error`,`Element`,`Map`,`Set`]);function uz(e){return!!e&&typeof e==`object`&&!Array.isArray(e)&&cz in e&&lz.has(e[cz])}function dz(e){return/^[A-Za-z_$][\w$]*$/.test(e)?e:JSON.stringify(e)}function fz(e,t=``){if(e===null)return`null`;if(typeof e==`string`)return JSON.stringify(e);if(typeof e!=`object`)return String(e);let n=t+` `;if(Array.isArray(e))return e.length?`[\n${e.map(e=>n+fz(e,n)).join(`, -`)}\n${t}]`:`[]`;if(uz(e)){let r=e;switch(r[cz]){case`undefined`:return`undefined`;case`Date`:return`Date(${r.value})`;case`bigint`:return`${r.value}n`;case`symbol`:return`Symbol(${r.value})`;case`function`:return`ƒ ${r.name}()`;case`Error`:return`${r.name??`Error`}: ${r.message}`;case`Element`:return`<${r.value}>`;case`Map`:{let e=r.entries??[];if(!e.length)return`Map(${r.size}) {}`;let i=e.map(([e,t])=>`${n}${fz(e,n)} => ${fz(t,n)}`);return`Map(${r.size}) {\n${i.join(`, -`)}\n${t}}`}case`Set`:{let e=r.values??[];return e.length?`Set(${r.size}) {\n${e.map(e=>n+fz(e,n)).join(`, -`)}\n${t}}`:`Set(${r.size}) {}`}default:return String(r.value??r[cz])}}let r=Object.entries(e);return r.length?`{\n${r.map(([e,t])=>`${n}${dz(e)}: ${fz(t,n)}`).join(`, -`)}\n${t}}`:`{}`}function pz(e,t=120){let n=fz(e).replace(/\s*\n\s*/g,` `);return n.length>t?`${n.slice(0,t-1)}…`:n}var mz=[`eventDetailHeading`],hz=[`cancelButton`],gz=[`restoreButton`],_z=[`stateTree`],vz=[`filterInput`],yz=[`latestButton`],bz=e=>({kind:`ngrx`,storeId:e}),xz=e=>({selected:e,headingLevel:5,idPrefix:`ngrx-change`}),Sz=e=>({selected:e,headingLevel:3,idPrefix:`ngrx-event`}),Cz=(e,t)=>t.id,wz=(e,t)=>t.seq,Tz=(e,t)=>t.key,Ez=(e,t)=>t.name,Dz=(e,t)=>t.idsKey,Oz=(e,t)=>t.path,kz=(e,t)=>t.kind,Az=(e,t)=>t.name+t.file+t.line;function jz(e,t){if(e&1){let e=U();R(0,`span`,25),J(1,`Page`),z(),R(2,`app-select`,26),W(`valueChange`,function(t){return D(e),O(G().selectPage(t))}),z()}if(e&2){let e=G();j(2),L(`options`,e.pageOptions())(`value`,e.page()?.pageId??null)}}function Mz(e,t){if(e&1&&(R(0,`span`,14),J(1),z()),e&2){let e=G();j(),Y(e.liveStores().length)}}function Nz(e,t){if(e&1){let e=U();R(0,`div`,15)(1,`p`,27),J(2,`Could not load the live store state.`),z(),R(3,`p`,28),J(4,`Check that the dev server with Pangular Inspector is still running.`),z(),R(5,`button`,29),W(`click`,function(){return D(e),O(G().retry())}),J(6,`Retry`),z()()}}function Pz(e,t){e&1&&(R(0,`div`,16)(1,`p`,27),J(2,`Loading…`),z()())}function Fz(e,t){e&1&&(R(0,`div`,17)(1,`p`,27),J(2,`No page is reporting NgRx state yet.`),z(),R(3,`p`,28),J(4,` Open the app in a browser. Stores show up here as soon as the page creates them. `),z()())}function Iz(e,t){e&1&&(R(0,`p`,27),J(1,`No signal store instance on this page yet.`),z(),R(2,`p`,28),J(3,` A `),R(4,`code`),J(5,`signalStore`),z(),J(6,` is created the first time something injects it. Navigate to a page that uses the store and it appears here. `),z())}function Lz(e,t){e&1&&(R(0,`p`,27),J(1,`The @ngrx/store Store was not found on this page.`),z(),R(2,`p`,28),J(3,` Check that `),R(4,`code`),J(5,`provideStore()`),z(),J(6,` or `),R(7,`code`),J(8,`StoreModule.forRoot()`),z(),J(9,` is part of the providers of the running app. `),z())}function Rz(e,t){e&1&&(R(0,`p`,27),J(1,`This page has no NgRx store.`),z(),R(2,`p`,28),J(3,` Stores from `),R(4,`code`),J(5,`@ngrx/signals`),z(),J(6,` (`),R(7,`code`),J(8,`signalStore`),z(),J(9,`, `),R(10,`code`),J(11,`signalState`),z(),J(12,`) and `),R(13,`code`),J(14,`@ngrx/store`),z(),J(15,` are listed here once the app creates them. `),z())}function zz(e,t){if(e&1&&(R(0,`div`,17),N(1,Iz,7,0)(2,Lz,10,0)(3,Rz,16,0),z()),e&2){let e=G();j(),P(e.usesSignals()?1:e.usesClassic()?2:3)}}function Bz(e,t){if(e&1){let e=U();R(0,`li`)(1,`button`,33),W(`click`,function(){let t=D(e).$implicit;return O(G(2).selectStore(t.id))}),R(2,`span`,34),B(3,`span`,35),R(4,`span`,36),J(5),z()(),R(6,`span`,37),J(7),z()()()}if(e&2){let e=t.$implicit,n=G(2);j(),q(`selected`,e.id===n.store()?.id),M(`aria-pressed`,e.id===n.store()?.id),j(2),K(`background`,n.kindColor(e.kind)),j(2),Y(e.label),j(2),iv(` `,n.kindLabel(e.kind),` · `,e.scope,` · `,n.changeCount(e.id),` `,n.changeCount(e.id)===1?`change`:`changes`,` `)}}function Vz(e,t){e&1&&(R(0,`li`,31),J(1,`No stores match this filter.`),z())}function Hz(e,t){e&1&&B(0,`app-source-link`,41),e&2&&L(`file`,t)}function Uz(e,t){if(e&1&&(R(0,`span`,40),J(1),z()),e&2){let e=G();j(),Y(e.classic.devtools?`Store DevTools on`:`Store DevTools off`)}}function Wz(e,t){if(e&1&&(R(0,`code`),J(1),z(),J(2)),e&2){let e=t.$implicit,n=t.$index,r=t.$count;j(),Y(e),j(),X(``,n===r-1?``:`, `,` `)}}function Gz(e,t){if(e&1&&(R(0,`p`,42),J(1,` Referenced by `),F(2,Wz,3,2,null,null,kg),z()),e&2){let e=G();j(2),I(e.signal.references)}}function Kz(e,t){if(e&1&&(R(0,`p`,60),J(1),z()),e&2){let e=G(4);j(),Y(e.restoreOff)}}function qz(e,t){if(e&1){let e=U();R(0,`div`,43)(1,`p`)(2,`strong`),J(3,`Viewing a past state.`),z(),J(4,` New actions are logged but do not change the state until you go back to the latest state. `),z(),R(5,`button`,59,3),W(`click`,function(){return D(e),O(G(3).backToLatest())}),J(7,` Back to latest `),z(),N(8,Kz,2,1,`p`,60),z()}if(e&2){let e=G(3);j(5),L(`disabled`,e.busy()||!e.canRestore()),M(`aria-describedby`,e.canRestore()?null:`store-latest-off`),j(3),P(e.canRestore()?-1:8)}}function Jz(e,t){if(e&1&&(R(0,`dt`),J(1),z(),R(2,`dd`)(3,`code`,68),J(4),z()()),e&2){let e=t.$implicit;j(),Y(e.key),j(2),L(`title`,e.full),j(),Y(e.value)}}function Yz(e,t){if(e&1&&(R(0,`dl`,63),F(1,Jz,5,3,null,null,Tz),z()),e&2){let e=G(4);j(),I(e.computedEntries())}}function Xz(e,t){e&1&&(R(0,`p`,64),J(1,`No computed signals.`),z())}function Zz(e,t){e&1&&(R(0,`span`,70),J(1,`signalMethod`),z())}function Qz(e,t){e&1&&(R(0,`span`,70),J(1,`rxMethod`),z())}function $z(e,t){if(e&1&&(R(0,`li`,69),J(1),N(2,Zz,2,0,`span`,70)(3,Qz,2,0,`span`,70),R(4,`span`,71),J(5),z()()),e&2){let e=t.$implicit,n=G(5);j(),X(` `,e.name,` `),j(),P(e.signalMethod?2:e.rx?3:-1),j(3),rv(``,e.calls,` `,e.calls===1?`call`:`calls`,``,n.methodDuration(e))}}function eB(e,t){if(e&1&&(R(0,`ul`,66),F(1,$z,6,5,`li`,69,Ez),z()),e&2){let e=G();j(),I(e.methods)}}function tB(e,t){e&1&&(R(0,`p`,64),J(1,`No methods.`),z())}function nB(e,t){if(e&1&&(R(0,`li`,69),J(1),z()),e&2){let e=t.$implicit;j(),Y(e)}}function rB(e,t){if(e&1&&(R(0,`li`,78),J(1),z()),e&2){let e=G().$implicit;L(`title`,G(5).entityOverflowTitle(e.ids,e.count)),j(),X(` +`,e.count-30,` more `)}}function iB(e,t){if(e&1&&(R(0,`code`,68),J(1),z()),e&2){let e=G(2).$implicit,t=G(5);L(`title`,t.prettyText(e.selected)),j(),Y(t.shortText(e.selected))}}function aB(e,t){e&1&&(R(0,`span`,64),J(1,`None selected`),z())}function oB(e,t){if(e&1&&(R(0,`dl`,63)(1,`dt`),J(2,`Selected`),z(),R(3,`dd`),N(4,iB,2,2,`code`,68)(5,aB,2,0,`span`,64),z()()),e&2){let e=G().$implicit;j(4),P(e.selected===void 0?5:4)}}function sB(e,t){if(e&1&&(R(0,`div`,74)(1,`div`,75)(2,`span`,69),J(3),z(),R(4,`span`,76),J(5),z()(),R(6,`ul`,77),F(7,nB,2,1,`li`,69,kg),N(9,rB,2,2,`li`,78),z(),N(10,oB,6,1,`dl`,63),z()),e&2){let e=t.$implicit,n=G(5);j(3),Y(e.collection??`entities`),j(2),Z(``,e.count,` `,e.count===1?`entity`:`entities`),j(),M(`aria-label`,(e.collection??`entities`)+` ids`),j(),I(n.entityIds(e.ids)),j(2),P(e.count>30?9:-1),j(),P(e.selectedId===void 0?-1:10)}}function cB(e,t){if(e&1&&(R(0,`section`,67)(1,`h4`,72),J(2,`Entities`),z(),R(3,`div`,73),F(4,sB,11,6,`div`,74,Dz),z()()),e&2){let e=G();j(4),I(e.entities)}}function lB(e,t){if(e&1&&(R(0,`section`,61)(1,`h4`,62),J(2,`Computed`),z(),N(3,Yz,3,0,`dl`,63)(4,Xz,2,0,`p`,64),R(5,`h4`,65),J(6,`Methods`),z(),N(7,eB,3,0,`ul`,66)(8,tB,2,0,`p`,64),z(),N(9,cB,6,0,`section`,67)),e&2){let e=t,n=G(3);j(3),P(n.computedEntries().length?3:4),j(4),P(e.methods.length?7:8),j(2),P(e.entities?.length?9:-1)}}function uB(e,t){if(e&1&&(R(0,`span`,83),J(1),z()),e&2){let e=t;L(`title`,`Caused by `+G(4).kindLabel(`event`)+`: `+e.type),j(),Y(e.type)}}function dB(e,t){if(e&1&&(R(0,`span`,70),J(1),z()),e&2){let e=G().$implicit;j(),Y(e.origin)}}function fB(e,t){if(e&1&&J(0),e&2){let e=G().$implicit;X(` · `,G(3).formatDuration(e.durationMs),` `)}}function pB(e,t){if(e&1){let e=U();R(0,`li`)(1,`button`,79),W(`click`,function(){let t=D(e).$implicit;return O(G(3).selectChange(t.seq))}),R(2,`span`,80),J(3),z(),R(4,`span`,81)(5,`span`,82),J(6),z(),N(7,uB,2,2,`span`,83),z(),R(8,`span`,84),N(9,dB,2,1,`span`,70),J(10),N(11,fB,1,1),z()()()}if(e&2){let e,n=t.$implicit,r=G(3);j(),q(`selected`,n.seq===r.selectedChangeSeq()),M(`aria-pressed`,n.seq===r.selectedChangeSeq())(`aria-controls`,n.seq===r.selectedChangeSeq()?`ngrx-change-detail`:null),j(2),X(`#`,n.seq),j(2),L(`title`,n.type),j(),Y(n.type),j(),P((e=n.causedByEvent)?7:-1,e),j(2),P(n.origin?9:-1),j(),Z(` `,r.changesLabel(n),` · `,r.formatTime(n.timestamp),` `),j(),P(n.durationMs===void 0?-1:11)}}function mB(e,t){e&1&&J(0,` No entries match this filter. `)}function hB(e,t){e&1&&J(0,` No actions dispatched since the page connected. `)}function gB(e,t){e&1&&J(0,` No state changes yet. Method calls and patchState writes that change the state are recorded here. `)}function _B(e,t){if(e&1&&(R(0,`li`,31),N(1,mB,1,0)(2,hB,1,0)(3,gB,1,0),z()),e&2){let e=G(),t=G(2);j(),P(t.filter()?1:e.classic?2:3)}}function vB(e,t){if(e&1&&(R(0,`div`,57),Wg(1,85),z()),e&2){G(3);let e=d_(21);j(),L(`ngTemplateOutlet`,e)(`ngTemplateOutletContext`,hv(2,xz,t))}}function yB(e,t){if(e&1&&B(0,`option`,90),e&2){let e=t.$implicit;L(`value`,e)}}function bB(e,t){if(e&1&&(R(0,`p`,96),J(1),z()),e&2){let e=G(4);j(),Y(e.restoreOff)}}function xB(e,t){if(e&1){let e=U();R(0,`section`,58)(1,`h4`,86),J(2,`Dispatch an action`),z(),R(3,`form`,87),W(`submit`,function(t){return D(e),O(G(3).dispatchAction(t))}),R(4,`label`)(5,`span`),J(6,`Type`),z(),R(7,`input`,88),W(`input`,function(t){return D(e),O(G(3).dispatchType.set(t.target.value))}),z()(),R(8,`datalist`,89),F(9,yB,1,1,`option`,90,kg),z(),R(11,`label`)(12,`span`),J(13,`Payload `),R(14,`span`,91),J(15,`(JSON object, optional)`),z()(),R(16,`textarea`,92),W(`input`,function(t){return D(e),O(G(3).dispatchPayload.set(t.target.value))}),z()(),R(17,`p`,93),J(18),z(),R(19,`div`,94)(20,`button`,95),J(21,` Dispatch `),z()(),N(22,bB,2,1,`p`,96),z()()}if(e&2){let e=G(3);j(7),L(`value`,e.dispatchType()),j(2),I(e.actionTypes()),j(7),L(`value`,e.dispatchPayload()),M(`aria-invalid`,e.payloadError()?`true`:null),j(2),Y(e.payloadError()),j(2),L(`disabled`,e.busy()||!e.canRestore()||!e.dispatchRequest()),M(`aria-describedby`,e.canRestore()?null:`store-dispatch-off`),j(2),P(e.canRestore()?-1:22)}}function SB(e,t){if(e&1){let e=U();R(0,`div`,32)(1,`div`,38)(2,`h3`),J(3),z(),R(4,`div`,39)(5,`span`,40),J(6),z(),R(7,`span`,40),J(8),z(),N(9,Hz,1,1,`app-source-link`,41),N(10,Uz,2,1,`span`,40),z(),N(11,Gz,4,0,`p`,42),z(),N(12,qz,9,3,`div`,43),R(13,`div`,44)(14,`section`,45)(15,`div`,46)(16,`h4`,47),J(17,`State`),z(),R(18,`div`,48),B(19,`app-store-global`,49),R(20,`button`,50),W(`click`,function(){return D(e),O(G(2).copyState())}),J(21,` Copy `),z()()(),R(22,`pre`,51,2),J(24),z()(),N(25,lB,10,3),z(),R(26,`section`,52)(27,`h4`,53),J(28),R(29,`span`,14),J(30),z()(),B(31,`app-limit-note`,54),R(32,`div`,55)(33,`ul`,56),F(34,pB,12,12,`li`,null,wz,!1,_B,4,1,`li`,31),z(),N(37,vB,2,4,`div`,57),z()(),N(38,xB,23,7,`section`,58),z()}if(e&2){let e,n,r,i=t,a=G(2);j(3),Y(i.label),j(3),Y(a.kindLabel(i.kind)),j(2),X(`scope: `,i.scope),j(),P((e=i.signal?.declaredIn)?9:-1,e),j(),P(i.classic?10:-1),j(),P(i.signal?.references?.length?11:-1),j(),P(i.classic?.paused?12:-1),j(7),L(`rpc`,a.rpc())(`pageId`,a.page()?.pageId)(`target`,hv(21,bz,i.id))(`label`,i.label+` state`),j(5),Y(a.stateText()),j(),P((n=i.signal)?25:-1,n),j(3),X(` `,i.classic?`Action log`:`Change log`,` `),j(2),Y(a.storeLog().length),j(),L(`dropped`,a.page()?.dropped??0)(`max`,a.maxLog()),j(2),M(`aria-label`,i.classic?`Actions`:`Changes`),j(),I(a.storeLog()),j(3),P((r=a.changeEntry())?37:-1,r),j(),P(i.classic?38:-1)}}function CB(e,t){if(e&1&&(R(0,`div`,18)(1,`ul`,30),F(2,Bz,8,10,`li`,null,Cz,!1,Vz,2,0,`li`,31),z(),N(5,SB,39,23,`div`,32),z()),e&2){let e,t=G();j(2),I(t.filteredStores()),j(3),P((e=t.store())?5:-1,e)}}function wB(e,t){if(e&1&&(R(0,`code`,103),J(1),z()),e&2){let e=G().$implicit,t=G(2);L(`title`,t.prettyText(e.payload)),j(),Y(t.shortText(e.payload))}}function TB(e,t){if(e&1){let e=U();R(0,`li`)(1,`button`,101),W(`click`,function(){let t=D(e).$implicit;return O(G(2).selectEvent(t.seq))}),B(2,`span`,35),R(3,`span`,102),J(4),z(),N(5,wB,2,2,`code`,103),R(6,`span`,104),J(7),z()()()}if(e&2){let e=t.$implicit,n=G(2);j(),q(`selected`,e.seq===n.selectedEventSeq()),M(`aria-pressed`,e.seq===n.selectedEventSeq())(`aria-controls`,e.seq===n.selectedEventSeq()?`ngrx-event-detail`:null),j(),K(`background`,n.kindColor(`event`)),j(),L(`title`,e.eventType??e.type),j(),Y(e.eventType??e.type),j(),P(e.payload===void 0?-1:5),j(2),Y(n.formatTime(e.timestamp))}}function EB(e,t){e&1&&(R(0,`li`,31),J(1,`No events match this filter.`),z())}function DB(e,t){if(e&1&&(R(0,`div`,100,4),Wg(2,85),z()),e&2){G(2);let e=d_(21);j(2),L(`ngTemplateOutlet`,e)(`ngTemplateOutletContext`,hv(2,Sz,t))}}function OB(e,t){if(e&1&&(R(0,`section`,20)(1,`div`,12)(2,`h2`,97),J(3,`Events`),z(),R(4,`span`,14),J(5),z()(),R(6,`p`,98),J(7,` Events dispatched through @ngrx/signals/events, across every store on this page. `),z(),R(8,`ul`,99),F(9,TB,8,10,`li`,null,wz,!1,EB,2,0,`li`,31),z(),N(12,DB,3,4,`div`,100),z()),e&2){let e,t=G();j(5),Y(t.pageEvents().length),j(4),I(t.pageEvents()),j(3),P((e=t.eventEntry())?12:-1,e)}}function kB(e,t){if(e&1&&(R(0,`dt`),J(1,`Origin`),z(),R(2,`dd`),J(3),z()),e&2){let e=G().selected,t=G();j(3),Y(t.originText(e.origin))}}function AB(e,t){if(e&1&&(R(0,`dt`),J(1,`Duration`),z(),R(2,`dd`),J(3),z()),e&2){let e=G().selected,t=G();j(3),Y(t.formatDuration(e.durationMs))}}function jB(e,t){if(e&1&&(R(0,`dt`),J(1,`Action`),z(),R(2,`dd`)(3,`pre`,109),J(4),z()()),e&2){let e=G().selected,t=G();j(4),Y(t.prettyText(e.action))}}function MB(e,t){if(e&1&&(R(0,`dt`),J(1,`Arguments`),z(),R(2,`dd`)(3,`pre`,109),J(4),z()()),e&2){let e=G().selected,t=G();j(4),Y(t.prettyText(e.args))}}function NB(e,t){if(e&1&&(R(0,`dt`),J(1,`Payload`),z(),R(2,`dd`)(3,`pre`,109),J(4),z()()),e&2){let e=G().selected,t=G();j(4),Y(t.prettyText(e.payload))}}function PB(e,t){if(e&1&&(R(0,`pre`,109),J(1),z()),e&2){let e=G(),t=G(2);j(),Y(t.prettyText(e.payload))}}function FB(e,t){if(e&1&&(R(0,`dt`),J(1,`Caused by event`),z(),R(2,`dd`)(3,`code`,110),J(4),z(),N(5,PB,2,1,`pre`,109),z()),e&2){let e=t;j(4),Y(e.type),j(),P(e.payload===void 0?-1:5)}}function IB(e,t){if(e&1){let e=U();R(0,`button`,114),W(`click`,function(){D(e);let t=G(2).selected;return O(G().copyDiff(t))}),J(1,` Copy `),z()}if(e&2){let e=G(2).selected;M(`aria-label`,`Copy the state diff of #`+e.seq)}}function LB(e,t){if(e&1&&(R(0,`code`,120),J(1),z()),e&2){let e=G().$implicit,t=G(4);j(),Y(t.shortText(e.before))}}function RB(e,t){e&1&&(R(0,`span`,122),J(1,`→`),z(),R(2,`span`,123),J(3,`became`),z())}function zB(e,t){if(e&1&&(R(0,`code`,121),J(1),z()),e&2){let e=G().$implicit,t=G(4);j(),Y(t.shortText(e.after))}}function BB(e,t){if(e&1&&(R(0,`li`)(1,`span`,117),J(2),z(),R(3,`code`,118),J(4),z(),R(5,`span`,119),N(6,LB,2,1,`code`,120),N(7,RB,4,0),N(8,zB,2,1,`code`,121),z()()),e&2){let e=t.$implicit,n=G(4);M_(`diff-row `+e.op),j(2),Y(n.opLabel(e.op)),j(2),Y(e.path),j(2),P(e.op===`add`?-1:6),j(),P(e.op===`change`?7:-1),j(),P(e.op===`remove`?-1:8)}}function VB(e,t){if(e&1&&(R(0,`p`,64),J(1),z()),e&2){let e=G(3).selected,t=G();j(),Y(t.moreChanges(e.diffTruncated))}}function HB(e,t){if(e&1&&(R(0,`ul`,115),F(1,BB,9,7,`li`,116,Oz),z(),N(3,VB,2,1,`p`,64)),e&2){let e=G(2).selected;j(),I(e.diff),j(2),P(e.diffTruncated?3:-1)}}function UB(e,t){e&1&&(R(0,`p`,64),J(1,`The state did not change.`),z())}function WB(e,t){if(e&1&&(R(0,`div`,111)(1,`div`,112),J(2,`State diff`),z(),N(3,IB,2,1,`button`,113),z(),N(4,HB,4,1)(5,UB,2,0,`p`,64)),e&2){let e=G(),t=e.selected,n=e.headingLevel;j(),M(`aria-level`,n+1),j(2),P(t.diff.length?3:-1),j(),P(t.diff.length?4:5)}}function GB(e,t){if(e&1&&J(0),e&2){let e=G(2).selected;X(` Store DevTools jumps the app state to the state right after action #`,e.seq,`. Until you go back to the latest state, new actions are logged but do not change the state. `)}}function KB(e,t){if(e&1&&J(0),e&2){let e=G(3).selected;Z(` This sets every state key of `,t.label,` back to its value right after change #`,e.seq,`. Components that read the store update at once, and a new "Restore" entry is added to the log. `)}}function qB(e,t){if(e&1&&J(0),e&2){let e=G(3).selected;X(` This sets every state key of the store back to its value right after change #`,e.seq,`. Components that read the store update at once, and a new "Restore" entry is added to the log. `)}}function JB(e,t){if(e&1&&N(0,KB,1,2)(1,qB,1,1),e&2){let e;P((e=G(3).store())?0:1,e)}}function YB(e,t){if(e&1){let e=U();R(0,`div`,124),W(`keydown.escape`,function(t){return D(e),O(G(2).cancelRestore(t))}),R(1,`p`,125),N(2,GB,1,1)(3,JB,2,1),z(),R(4,`div`,94)(5,`button`,59),W(`click`,function(){D(e);let t=G().selected;return O(G().restore(t.seq,t.source===`store`))}),J(6,` Restore `),z(),R(7,`button`,29,5),W(`click`,function(){return D(e),O(G(2).cancelRestore())}),J(9,` Cancel `),z()()()}if(e&2){let e=G(),t=e.selected,n=e.idPrefix,r=G();M(`aria-labelledby`,n+`-confirm-text`),j(),L(`id`,n+`-confirm-text`),j(),P(t.source===`store`?2:3),j(3),L(`disabled`,r.busy())}}function XB(e,t){if(e&1){let e=U();R(0,`button`,130,6),W(`click`,function(){D(e);let t=G(2).selected;return O(G().askRestore(t.seq))}),J(2,` Restore this state `),z()}if(e&2){let e=G(2).idPrefix,t=G();L(`disabled`,!t.canRestore()),M(`aria-describedby`,t.canRestore()?null:e+`-writes-off`)}}function ZB(e,t){if(e&1){let e=U();R(0,`button`,131),W(`click`,function(){D(e);let t=G(2).selected;return O(G().dispatchAgain(t.seq))}),J(1,` Dispatch again `),z()}if(e&2){let e=G(2).idPrefix,t=G();L(`disabled`,t.busy()||!t.canRestore()),M(`aria-describedby`,t.canRestore()?null:e+`-writes-off`)}}function QB(e,t){if(e&1&&(R(0,`p`,129),J(1),z()),e&2){let e=G(2).idPrefix,t=G();L(`id`,e+`-writes-off`),j(),Y(t.restoreOff)}}function $B(e,t){if(e&1&&(R(0,`div`,126),N(1,XB,3,2,`button`,127),N(2,ZB,2,2,`button`,128),z(),N(3,QB,2,2,`p`,129)),e&2){let e=G().selected,t=G();j(),P(e.restorable?1:-1),j(),P(t.canAgain(e)?2:-1),j(),P(t.canRestore()?-1:3)}}function eV(e,t){e&1&&(J(0,` Store DevTools no longer holds this action, so this state cannot be restored. It was dropped past `),R(1,`code`),J(2,`maxAge`),z(),J(3,`, or the Store DevTools history was committed, reset or imported. `))}function tV(e,t){e&1&&(J(0,` Store DevTools never recorded this action, so this state cannot be restored. An `),R(1,`code`),J(2,`actionsBlocklist`),z(),J(3,`, `),R(4,`code`),J(5,`actionsSafelist`),z(),J(6,` or `),R(7,`code`),J(8,`predicate`),z(),J(9,` option filtered it out, or recording was paused. `))}function nV(e,t){e&1&&(J(0,` Time travel for @ngrx/store needs `),R(1,`code`),J(2,`provideStoreDevtools()`),z(),J(3,`. Without it, entries cannot be restored. `))}function rV(e,t){if(e&1&&(R(0,`p`,108),N(1,eV,4,0)(2,tV,10,0)(3,nV,4,0),z()),e&2){let e=G().selected;j(),P(e.unrestorable===`dropped`?1:e.unrestorable===`not-recorded`?2:3)}}function iV(e,t){if(e&1&&(R(0,`section`,105)(1,`div`,106),J(2),z(),R(3,`dl`,63)(4,`dt`),J(5,`Time`),z(),R(6,`dd`),J(7),z(),N(8,kB,4,1),N(9,AB,4,1),N(10,jB,5,1),N(11,MB,5,1),N(12,NB,5,1),N(13,FB,6,2),z(),N(14,WB,6,3),N(15,YB,10,4,`div`,107),N(16,$B,4,3),N(17,rV,4,1,`p`,108),z()),e&2){let e,n=t.selected,r=t.headingLevel,i=t.idPrefix,a=G();M(`aria-labelledby`,i+`-entry-heading`),j(),L(`id`,i+`-entry-heading`),M(`aria-level`,r),j(),Z(` #`,n.seq,` `,n.type,` `),j(5),Y(a.formatTime(n.timestamp)),j(),P(n.origin?8:-1),j(),P(n.durationMs===void 0?-1:9),j(),P(n.action===void 0?-1:10),j(),P(n.args?.length?11:-1),j(),P(n.source===`event`&&n.payload!==void 0?12:-1),j(),P((e=n.causedByEvent)?13:-1,e),j(),P(n.source===`event`?-1:14),j(),P(n.restorable&&a.confirmSeq()===n.seq?15:-1),j(),P(a.confirmSeq()!==n.seq&&(n.restorable||a.canAgain(n))?16:-1),j(),P(!n.restorable&&n.source===`store`?17:-1)}}function aV(e,t){if(e&1&&(R(0,`span`,14),J(1),z()),e&2){let e=G();j(),Y(e.sourceEntries().length)}}function oV(e,t){e&1&&(R(0,`div`,23),B(1,`span`,132),R(2,`p`,27),J(3,`Scanning source for NgRx declarations…`),z()())}function sV(e,t){e&1&&(R(0,`div`,24)(1,`p`,27),J(2,`No NgRx declarations found in source.`),z(),R(3,`p`,28),J(4,` The scan looks for `),R(5,`code`),J(6,`signalStore`),z(),J(7,`, `),R(8,`code`),J(9,`signalState`),z(),J(10,`, `),R(11,`code`),J(12,`signalMethod`),z(),J(13,`, `),R(14,`code`),J(15,`createAction`),z(),J(16,`, `),R(17,`code`),J(18,`createReducer`),z(),J(19,`, `),R(20,`code`),J(21,`createEffect`),z(),J(22,`, `),R(23,`code`),J(24,`createSelector`),z(),J(25,` and `),R(26,`code`),J(27,`createFeature`),z(),J(28,`. `),z()())}function cV(e,t){if(e&1){let e=U();R(0,`button`,134),W(`click`,function(){let t=D(e).$implicit,n=G(2);return O(n.kind.set(n.kind()===t.kind?null:t.kind))}),B(1,`span`,35),R(2,`span`,139),J(3),z(),R(4,`span`,135),J(5),z()()}if(e&2){let e=t.$implicit,n=G(2);q(`active`,n.kind()===e.kind),M(`aria-pressed`,n.kind()===e.kind),j(),K(`background`,n.kindColor(e.kind)),j(2),Y(n.kindLabel(e.kind)),j(2),Y(e.count)}}function lV(e,t){if(e&1&&(R(0,`p`,144),J(1),z()),e&2){let e=G().$implicit;j(),Y(e.detail)}}function uV(e,t){if(e&1&&(R(0,`li`,138)(1,`div`,140),B(2,`span`,35),R(3,`span`,141),J(4),z(),R(5,`span`,40),J(6),z()(),R(7,`div`,142),B(8,`app-source-link`,143),z(),N(9,lV,2,1,`p`,144),z()),e&2){let e=t.$implicit,n=G(2);j(2),K(`background`,n.kindColor(e.kind)),j(2),Y(e.name),j(2),Y(n.kindLabel(e.kind)),j(2),L(`file`,e.file)(`line`,e.line),j(),P(e.detail?9:-1)}}function dV(e,t){if(e&1){let e=U();R(0,`li`)(1,`div`,23)(2,`p`,27),J(3,`No declarations match.`),z(),R(4,`button`,29),W(`click`,function(){return D(e),O(G(2).clearFilters())}),J(5,`Clear filters`),z()()()}}function fV(e,t){if(e&1){let e=U();R(0,`div`,133)(1,`button`,134),W(`click`,function(){return D(e),O(G().kind.set(null))}),J(2,` All `),R(3,`span`,135),J(4),z()(),F(5,cV,6,7,`button`,136,kz),z(),R(7,`ul`,137),F(8,uV,10,7,`li`,138,Az,!1,dV,6,0,`li`),z()}if(e&2){let e=G();j(),q(`active`,!e.kind()),M(`aria-pressed`,!e.kind()),j(3),Y(e.sourceEntries().length),j(),I(e.groupedEntries()),j(3),I(e.filteredEntries())}}var pV={action:`#f59e0b`,reducer:`#a78bfa`,effect:`#fb923c`,selector:`#60a5fa`,feature:`#34d399`,"store-setup":`#94a3b8`,"signal-store":`#e879f9`,"signal-state":`#22d3ee`,"signal-method":`#fb7185`,store:`#a78bfa`,event:`var(--warn)`},mV={"signal-store":`signalStore`,"signal-state":`signalState`,"signal-method":`signalMethod`,"store-setup":`store setup`,store:`@ngrx/store`,event:`event`},hV={dispatch:`store.dispatch(action)`,effect:`NgRx effect (Store.next)`,reactive:`store.dispatch(() => action)`};function gV(e){if(!e.trim())return{};let t;try{t=JSON.parse(e)}catch{return{error:`The payload is not valid JSON.`}}return!t||typeof t!=`object`||Array.isArray(t)?{error:`The payload must be a JSON object, like {"id": 7}.`}:Object.prototype.hasOwnProperty.call(t,`type`)?{error:`The payload cannot have a "type" key. Put the action type in the Type field.`}:{payload:t}}var _V=new Set([`action`,`reducer`,`effect`,`selector`,`feature`,`store-setup`]),vV=class e{rpc=$(null);canRestore=Q(()=>ME(this.rpc(),`ngrx`));restoreOff=iE(`ngrx`);filter=A(``);kind=A(null);sourceEntries=A([]);sourceLoaded=A(!1);pages=A([]);failed=A(!1);stateLoaded=A(!1);selectedPageId=A(null);hostPageId=fE();maxLog=Q(()=>jE(this.rpc()).limits.changeLog);selectedStoreId=A(null);focusEventSeq=A(null);eventDetailHeading=Jv(`eventDetailHeading`);busy=A(!1);focusLatest=A(!1);focusConfirm=A(null);cancelButton=Jv(`cancelButton`);restoreButton=Jv(`restoreButton`);stateTree=Jv(`stateTree`);filterInput=Jv(`filterInput`);latestButton=Jv(`latestButton`);message=A(``);destroyRef=T(Ts);unsubscribe=null;page=Q(()=>{let e=this.pages();return e.find(e=>e.pageId===this.selectedPageId())??e.find(e=>e.pageId===this.hostPageId)??e[0]??null});logKey=Q(()=>{let e=this.page();return{pageId:e?.pageId??null,log:e?.log??[]}});logSession=Fv({source:this.logKey,computation:(e,t)=>t?sz(t.source,e)?t.value:t.value+1:0});selectedChangeSeq=Fv({source:this.logSession,computation:()=>null});selectedEventSeq=Fv({source:this.logSession,computation:()=>null});confirmSeq=Fv({source:this.logSession,computation:()=>null});pageOptions=Q(()=>this.pages().map(e=>({value:e.pageId,label:e.title||e.url,hint:e.url})));liveStores=Q(()=>{let e=this.page();if(!e)return[];let t=e.stores.map(e=>({id:e.id,label:e.name??e.references[0]??e.className,kind:e.kind,scope:e.scope,signal:e}));return e.classic&&t.push({id:`store`,label:`Store`,kind:`store`,scope:e.classic.scope,classic:e.classic}),t});filteredStores=Q(()=>{let e=this.filter().trim().toLowerCase();return e?this.liveStores().filter(t=>t.label.toLowerCase().includes(e)||t.kind.includes(e)||(t.signal?.stateKeys??[]).some(t=>t.toLowerCase().includes(e))||(this.page()?.log??[]).some(n=>n.storeId===t.id&&n.type.toLowerCase().includes(e))):this.liveStores()});store=Q(()=>{let e=this.liveStores();return e.find(e=>e.id===this.selectedStoreId())??e[0]??null});stateText=Q(()=>{let e=this.store();return e?fz(e.signal?e.signal.state:e.classic?.state):``});computedEntries=Q(()=>Object.entries(this.store()?.signal?.computed??{}).map(([e,t])=>({key:e,value:pz(t,160),full:fz(t)})));storeLog=Q(()=>{let e=this.store()?.id,t=this.filter().trim().toLowerCase();return(this.page()?.log??[]).filter(n=>n.storeId===e&&(!t||n.type.toLowerCase().includes(t)||this.storeMatches(t))).reverse()});hasEvents=Q(()=>(this.page()?.log??[]).some(e=>e.source===`event`));pageEvents=Q(()=>{let e=this.filter().trim().toLowerCase();return(this.page()?.log??[]).filter(t=>t.source===`event`&&(!e||t.type.toLowerCase().includes(e))).slice().reverse()});changeEntry=Q(()=>{let e=this.selectedChangeSeq();return e===null?null:this.storeLog().find(t=>t.seq===e)??null});eventEntry=Q(()=>{let e=this.selectedEventSeq();return e===null?null:this.pageEvents().find(t=>t.seq===e)??null});dispatchType=A(``);dispatchPayload=A(``);actionTypes=Q(()=>{let e=new Set;for(let t of this.sourceEntries())for(let n of t.types??[])e.add(n);for(let t of this.page()?.log??[])t.source===`store`&&t.action!==void 0&&e.add(t.type);return[...e].sort().slice(0,200)});payloadError=Q(()=>gV(this.dispatchPayload()).error??``);dispatchRequest=Q(()=>{let e=this.dispatchType().trim(),{payload:t,error:n}=gV(this.dispatchPayload());return!e||n?null:{type:`dispatch`,action:e,...t?{payload:t}:{}}});usesSignals=Q(()=>this.sourceEntries().some(e=>e.kind===`signal-store`||e.kind===`signal-state`));usesClassic=Q(()=>this.sourceEntries().some(e=>_V.has(e.kind)));filteredEntries=Q(()=>{let e=this.filter().trim().toLowerCase(),t=this.kind();return this.sourceEntries().filter(n=>(!t||n.kind===t)&&(!e||n.name.toLowerCase().includes(e)||n.kind.includes(e)||(n.detail??``).toLowerCase().includes(e)))});groupedEntries=Q(()=>{let e=new Map;for(let t of this.sourceEntries())e.set(t.kind,(e.get(t.kind)??0)+1);return[...e.entries()].map(([e,t])=>({kind:e,count:t}))});constructor(){fc(()=>{let e=this.rpc();e&&this.load(e)}),uy(()=>{let e=this.latestButton();e&&this.focusLatest()&&!this.busy()&&(this.focusLatest.set(!1),e.nativeElement.focus())}),fc(()=>{let e=this.focusConfirm(),t=e===`cancel`?this.cancelButton():this.restoreButton();e&&t&&(this.focusConfirm.set(null),t.nativeElement.focus())}),uy(()=>{let e=this.focusEventSeq(),t=this.eventDetailHeading();e!==null&&t&&(this.focusEventSeq.set(null),t.nativeElement.focus())}),this.destroyRef.onDestroy(()=>this.unsubscribe?.())}storeMatches(e){let t=this.store();return!!t&&t.label.toLowerCase().includes(e)}async load(e){this.failed.set(!1),gE(e,`get-ngrx-store`).then(e=>this.sourceEntries.set(Array.isArray(e)?e:[])).catch(()=>this.sourceEntries.set([])).finally(()=>this.sourceLoaded.set(!0));try{let t=await e.scope(`pangular`).rpc.sharedState(`ngrx-store`);if(this.destroyRef.destroyed)return;let n=e=>{let t=e;this.pages.set(Array.isArray(t?.pages)?t.pages:[]),e!==void 0&&this.stateLoaded.set(!0)};n(t.value()),this.unsubscribe?.(),this.unsubscribe=t.on(`updated`,n)}catch{this.failed.set(!0)}}retry(){let e=this.rpc();e&&this.load(e)}selectPage(e){this.selectedPageId.set(e),this.selectedStoreId.set(null),this.selectedChangeSeq.set(null),this.selectedEventSeq.set(null),this.confirmSeq.set(null),this.message.set(``)}selectStore(e){this.selectedStoreId.set(e),this.selectedChangeSeq.set(null),this.confirmSeq.set(null),this.message.set(``)}selectChange(e){this.selectedChangeSeq.set(this.selectedChangeSeq()===e?null:e),this.confirmSeq.set(null),this.message.set(``)}copyState(){return this.copyText(this.stateText())}copyDiff(e){return this.copyText(fz(e.diff))}async copyText(e){try{await navigator.clipboard.writeText(e),this.message.set(`Copied.`)}catch{this.message.set(`The clipboard is not available here.`)}}askRestore(e){this.confirmSeq.set(e),this.focusConfirm.set(`cancel`)}cancelRestore(e){e?.preventDefault(),this.confirmSeq.set(null),this.focusConfirm.set(`restore`)}async restore(e,t){let n=this.page();if(!n)return;this.busy.set(!0),this.focusLatest.set(!1);let r=!1;try{let i=await gE(this.rpc(),`request-ngrx-action`,{pageId:n.pageId,request:{type:`restore`,seq:e}});this.message.set(i?.error??i?.message??`Restored.`),r=t&&!i?.error&&!!i?.paused}catch{this.message.set(`Could not reach the page to restore the state.`)}finally{this.busy.set(!1),this.confirmSeq.set(null),this.focusLatest.set(r),r||this.stateTree()?.nativeElement.focus()}}selectEvent(e){let t=this.selectedEventSeq()===e?null:e;this.selectedEventSeq.set(t),t!==null&&this.focusEventSeq.set(t)}async backToLatest(){let e=this.page();if(e){this.busy.set(!0);try{let t=await gE(this.rpc(),`request-ngrx-action`,{pageId:e.pageId,request:{type:`latest`}});this.focusLatest.set(!1),this.stateTree()?.nativeElement.focus(),this.message.set(t?.error??t?.message??`Back on the latest state.`)}catch{this.message.set(`Could not reach the page to go back to the latest state.`)}finally{this.busy.set(!1)}}}canAgain(e){return e.source===`store`&&e.action!==void 0}async dispatchAction(e){e.preventDefault();let t=this.dispatchRequest();t&&await this.send(t,`Could not reach the page to dispatch the action.`)}dispatchAgain(e){return this.send({type:`dispatch-again`,seq:e},`Could not reach the page to dispatch the action again.`)}async send(e,t){let n=this.page();if(!n||this.busy())return;let r=this.logSession();this.busy.set(!0);try{let t=await gE(this.rpc(),`request-ngrx-action`,{pageId:n.pageId,request:e});this.message.set(t?.error??t?.message??`Dispatched.`),t?.entry&&this.logSession()===r&&(this.selectedStoreId.set(`store`),this.selectedChangeSeq.set(t.entry.seq))}catch{this.message.set(t)}finally{this.busy.set(!1)}}clearFilters(){this.filter.set(``),this.kind.set(null),this.filterInput()?.nativeElement.focus()}changeCount(e){return(this.page()?.log??[]).filter(t=>t.storeId===e).length}entityIds(e){return e.slice(0,30)}entityOverflowTitle(e,t){let n=e.slice(30).join(`, `);return t>e.length?`${n} (first ${e.length} of ${t} shown)`:n}kindColor(e){return pV[e]??`var(--text-3)`}kindLabel(e){return mV[e]??e}originText(e){return hV[e]??e}changesLabel=oz;moreChanges=az;opLabel(e){return e===`add`?`added`:e===`remove`?`removed`:`changed`}prettyText(e){return fz(e)}shortText(e){return pz(e)}formatTime=tO;formatDuration(e){return e<=0?`<1ms`:`${Math.round(e)}ms`}methodDuration(e){let t=[];return e.avgDurationMs!==void 0&&t.push(`avg ${this.formatDuration(e.avgDurationMs)}`),e.lastDurationMs!==void 0&&t.push(`last ${this.formatDuration(e.lastDurationMs)}`),t.length?` · ${t.join(` · `)}`:``}static ɵfac=function(t){return new(t||e)};static ɵcmp=Gh({type:e,selectors:[[`app-store-inspector`]],viewQuery:function(e,t){e&1&&l_(t.eventDetailHeading,mz,5)(t.cancelButton,hz,5)(t.restoreButton,gz,5)(t.stateTree,_z,5)(t.filterInput,vz,5)(t.latestButton,yz,5),e&2&&u_(6)},inputs:{rpc:[1,`rpc`]},decls:30,vars:11,consts:[[`filterInput`,``],[`entryDetailTpl`,``],[`stateTree`,``],[`latestButton`,``],[`eventDetailHeading`,``],[`cancelButton`,``],[`restoreButton`,``],[1,`toolbar`],[`type`,`search`,`placeholder`,`Filter stores, changes and declarations…`,`aria-label`,`Filter stores, changes and source declarations`,3,`input`,`keydown.escape`,`value`],[1,`status`],[`aria-hidden`,`true`,1,`live-dot`],[`aria-labelledby`,`ngrx-live-heading`,1,`block`],[1,`section-head`],[`id`,`ngrx-live-heading`],[1,`pill`],[`role`,`alert`,1,`empty`],[`role`,`status`,1,`empty`],[1,`empty`],[1,`live-layout`],[`role`,`status`,1,`message`],[`aria-labelledby`,`ngrx-events-heading`,1,`block`],[`aria-labelledby`,`ngrx-source-heading`,1,`block`],[`id`,`ngrx-source-heading`],[`role`,`status`,1,`empty`,`compact`],[1,`empty`,`compact`],[`id`,`ngrx-page-label`,1,`visually-hidden`],[`labelledBy`,`ngrx-page-label`,1,`page-select`,3,`valueChange`,`options`,`value`],[1,`empty-title`],[1,`hint`],[`type`,`button`,1,`btn`,3,`click`],[`aria-label`,`Stores on this page`,1,`store-list`],[1,`muted`,`pad`],[1,`store-detail`],[`type`,`button`,1,`store-item`,3,`click`],[1,`store-top`],[`aria-hidden`,`true`,1,`dot`],[1,`store-name`],[1,`store-meta`],[1,`detail-head`],[1,`chips`],[1,`chip`],[1,`chip`,`mono`,3,`file`],[1,`refs`],[1,`paused`],[1,`facts`],[`aria-labelledby`,`ngrx-state-heading`,1,`fact`],[1,`fact-head`],[`id`,`ngrx-state-heading`],[1,`state-actions`],[3,`rpc`,`pageId`,`target`,`label`],[`type`,`button`,`aria-label`,`Copy state`,1,`btn`,`copy`,3,`click`],[`tabindex`,`0`,`aria-labelledby`,`ngrx-state-heading`,1,`tree`],[`aria-labelledby`,`ngrx-log-heading`,1,`log`],[`id`,`ngrx-log-heading`],[`what`,`changes on this page`,`limit`,`changeLog`,3,`dropped`,`max`],[1,`log-layout`],[`appRovingList`,`button.log-item`,1,`log-list`],[`id`,`ngrx-change-detail`],[`aria-labelledby`,`ngrx-dispatch-heading`,1,`dispatch`],[`type`,`button`,1,`btn`,`primary`,3,`click`,`disabled`],[`id`,`store-latest-off`,1,`hint`,`small`],[`aria-labelledby`,`ngrx-computed-heading`,1,`fact`],[`id`,`ngrx-computed-heading`],[1,`kv`],[1,`muted`],[`id`,`ngrx-methods-heading`,1,`spaced`],[`aria-labelledby`,`ngrx-methods-heading`,1,`methods`],[`aria-labelledby`,`ngrx-entities-heading`,1,`fact`],[3,`title`],[1,`chip`,`mono`],[1,`tag`],[1,`calls`],[`id`,`ngrx-entities-heading`],[1,`entities`],[1,`entity-group`],[1,`entity-head`],[1,`entity-count`],[1,`chips`,`entity-ids`],[1,`chip`,`more`,3,`title`],[`type`,`button`,1,`log-item`,3,`click`],[1,`seq`],[1,`log-type-row`],[1,`log-type`,3,`title`],[1,`tag`,3,`title`],[1,`log-meta`],[3,`ngTemplateOutlet`,`ngTemplateOutletContext`],[`id`,`ngrx-dispatch-heading`],[1,`dispatch-form`,3,`submit`],[`required`,``,`spellcheck`,`false`,`autocomplete`,`off`,`list`,`ngrx-action-types`,`placeholder`,`e.g. [Cart] Add Item`,3,`input`,`value`],[`id`,`ngrx-action-types`],[3,`value`],[1,`optional`],[`rows`,`3`,`spellcheck`,`false`,`placeholder`,`e.g. {"id": 7}`,`aria-describedby`,`ngrx-payload-error`,3,`input`,`value`],[`id`,`ngrx-payload-error`,1,`field-error`],[1,`actions`],[`type`,`submit`,1,`btn`,`primary`,3,`disabled`],[`id`,`store-dispatch-off`,1,`hint`,`small`],[`id`,`ngrx-events-heading`],[1,`intro`],[`appRovingList`,`button.event-item`,`aria-label`,`Dispatched events`,1,`events-list`],[`id`,`ngrx-event-detail`,`tabindex`,`-1`,1,`event-detail-focus`],[`type`,`button`,1,`event-item`,3,`click`],[1,`event-type`,`mono`,3,`title`],[1,`event-payload`,3,`title`],[1,`event-time`],[1,`entry`],[`role`,`heading`,1,`entry-heading`,3,`id`],[`role`,`group`,1,`confirm`],[1,`hint`,`small`],[1,`code`],[1,`mono`],[1,`sub-head`],[`role`,`heading`,1,`sub`],[`type`,`button`,1,`btn`,`copy`],[`type`,`button`,1,`btn`,`copy`,3,`click`],[1,`diff`],[3,`class`],[1,`op`],[1,`path`],[1,`values`],[1,`before`],[1,`after`],[`aria-hidden`,`true`,1,`arrow`],[1,`visually-hidden`],[`role`,`group`,1,`confirm`,3,`keydown.escape`],[3,`id`],[1,`entry-actions`],[`type`,`button`,1,`btn`,`restore`,3,`disabled`],[`type`,`button`,1,`btn`,3,`disabled`],[1,`hint`,`small`,3,`id`],[`type`,`button`,1,`btn`,`restore`,3,`click`,`disabled`],[`type`,`button`,1,`btn`,3,`click`,`disabled`],[`aria-hidden`,`true`,1,`spinner`],[`role`,`group`,`aria-label`,`Filter declarations by kind`,1,`kinds`],[`type`,`button`,1,`kind-chip`,3,`click`],[1,`count`],[`type`,`button`,1,`kind-chip`,3,`active`],[1,`nodes`],[1,`node-card`],[1,`chip-text`],[1,`node-header`],[1,`node-label`],[1,`node-meta`],[1,`file`,3,`file`,`line`],[1,`detail`]],template:function(e,t){e&1&&(R(0,`div`,7)(1,`input`,8,0),W(`input`,function(e){return t.filter.set(e.target.value)})(`keydown.escape`,function(){return t.filter.set(``)}),z(),N(3,jz,3,2),R(4,`span`,9),B(5,`span`,10),J(6),z()(),R(7,`section`,11)(8,`div`,12)(9,`h2`,13),J(10,`Live stores`),z(),N(11,Mz,2,1,`span`,14),z(),N(12,Nz,7,0,`div`,15)(13,Pz,3,0,`div`,16)(14,Fz,5,0,`div`,17)(15,zz,4,1,`div`,17)(16,CB,6,2,`div`,18),R(17,`p`,19),J(18),z()(),N(19,OB,13,3,`section`,20),og(20,iV,18,16,`ng-template`,null,1,Ev),R(22,`section`,21)(23,`div`,12)(24,`h2`,22),J(25,`Source declarations`),z(),N(26,aV,2,1,`span`,14),z(),N(27,oV,4,0,`div`,23)(28,sV,29,0,`div`,24)(29,fV,11,5),z()),e&2&&(j(),L(`value`,t.filter()),j(2),P(t.pages().length>1?3:-1),j(),q(`on`,!!t.page()),j(2),X(` `,t.page()?`Live`:`No page connected`,` `),j(5),P(t.liveStores().length?11:-1),j(),P(t.failed()?12:t.stateLoaded()?t.page()?t.liveStores().length?16:15:14:13),j(6),Y(t.message()),j(),P(t.hasEvents()?19:-1),j(7),P(t.sourceEntries().length?26:-1),j(),P(t.sourceLoaded()?t.sourceEntries().length===0?28:29:27))},dependencies:[oO,mI,qD,lb,OA,HA],styles:[`[_nghost-%COMP%] { +}`]})},sz=1e3;function cz(e){return`${e>=1e3?`${sz}+`:String(e)} more ${e===1?`change`:`changes`} not shown`}function lz(e){let t=e.diffTruncated??0,n=e.diff.length+t;return n===0?`no change`:`${t>=1e3?`${n}+`:String(n)} ${n===1?`change`:`changes`}`}function uz(e,t){if(e.pageId!==t.pageId)return!1;let n=e.log.at(-1);if(!n)return!0;let r=t.log.at(-1);if(!r||r.seqe.seq===n.seq);return!i||i.timestamp===n.timestamp}var dz=`@type`,fz=new Set([`undefined`,`number`,`bigint`,`symbol`,`function`,`Date`,`RegExp`,`Error`,`Element`,`Map`,`Set`]);function pz(e){return!!e&&typeof e==`object`&&!Array.isArray(e)&&dz in e&&fz.has(e[dz])}function mz(e){return/^[A-Za-z_$][\w$]*$/.test(e)?e:JSON.stringify(e)}function hz(e,t=``){if(e===null)return`null`;if(typeof e==`string`)return JSON.stringify(e);if(typeof e!=`object`)return String(e);let n=t+` `;if(Array.isArray(e))return e.length?`[\n${e.map(e=>n+hz(e,n)).join(`, +`)}\n${t}]`:`[]`;if(pz(e)){let r=e;switch(r[dz]){case`undefined`:return`undefined`;case`Date`:return`Date(${r.value})`;case`bigint`:return`${r.value}n`;case`symbol`:return`Symbol(${r.value})`;case`function`:return`ƒ ${r.name}()`;case`Error`:return`${r.name??`Error`}: ${r.message}`;case`Element`:return`<${r.value}>`;case`Map`:{let e=r.entries??[];if(!e.length)return`Map(${r.size}) {}`;let i=e.map(([e,t])=>`${n}${hz(e,n)} => ${hz(t,n)}`);return`Map(${r.size}) {\n${i.join(`, +`)}\n${t}}`}case`Set`:{let e=r.values??[];return e.length?`Set(${r.size}) {\n${e.map(e=>n+hz(e,n)).join(`, +`)}\n${t}}`:`Set(${r.size}) {}`}default:return String(r.value??r[dz])}}let r=Object.entries(e);return r.length?`{\n${r.map(([e,t])=>`${n}${mz(e)}: ${hz(t,n)}`).join(`, +`)}\n${t}}`:`{}`}function gz(e,t=120){let n=hz(e).replace(/\s*\n\s*/g,` `);return n.length>t?`${n.slice(0,t-1)}…`:n}var _z=[`eventDetailHeading`],vz=[`cancelButton`],yz=[`restoreButton`],bz=[`stateTree`],xz=[`filterInput`],Sz=[`latestButton`],Cz=e=>({kind:`ngrx`,storeId:e}),wz=e=>({selected:e,headingLevel:5,idPrefix:`ngrx-change`}),Tz=e=>({selected:e,headingLevel:3,idPrefix:`ngrx-event`}),Ez=(e,t)=>t.id,Dz=(e,t)=>t.seq,Oz=(e,t)=>t.key,kz=(e,t)=>t.name,Az=(e,t)=>t.idsKey,jz=(e,t)=>t.path,Mz=(e,t)=>t.kind,Nz=(e,t)=>t.name+t.file+t.line;function Pz(e,t){if(e&1){let e=U();R(0,`span`,25),J(1,`Page`),z(),R(2,`app-select`,26),W(`valueChange`,function(t){return D(e),O(G().selectPage(t))}),z()}if(e&2){let e=G();j(2),L(`options`,e.pageOptions())(`value`,e.page()?.pageId??null)}}function Fz(e,t){if(e&1&&(R(0,`span`,14),J(1),z()),e&2){let e=G();j(),Y(e.liveStores().length)}}function Iz(e,t){if(e&1){let e=U();R(0,`div`,15)(1,`p`,27),J(2,`Could not load the live store state.`),z(),R(3,`p`,28),J(4,`Check that the dev server with Pangular Inspector is still running.`),z(),R(5,`button`,29),W(`click`,function(){return D(e),O(G().retry())}),J(6,`Retry`),z()()}}function Lz(e,t){e&1&&(R(0,`div`,16)(1,`p`,27),J(2,`Loading…`),z()())}function Rz(e,t){e&1&&(R(0,`div`,17)(1,`p`,27),J(2,`No page is reporting NgRx state yet.`),z(),R(3,`p`,28),J(4,` Open the app in a browser. Stores show up here as soon as the page creates them. `),z()())}function zz(e,t){e&1&&(R(0,`p`,27),J(1,`No signal store instance on this page yet.`),z(),R(2,`p`,28),J(3,` A `),R(4,`code`),J(5,`signalStore`),z(),J(6,` is created the first time something injects it. Navigate to a page that uses the store and it appears here. `),z())}function Bz(e,t){e&1&&(R(0,`p`,27),J(1,`The @ngrx/store Store was not found on this page.`),z(),R(2,`p`,28),J(3,` Check that `),R(4,`code`),J(5,`provideStore()`),z(),J(6,` or `),R(7,`code`),J(8,`StoreModule.forRoot()`),z(),J(9,` is part of the providers of the running app. `),z())}function Vz(e,t){e&1&&(R(0,`p`,27),J(1,`This page has no NgRx store.`),z(),R(2,`p`,28),J(3,` Stores from `),R(4,`code`),J(5,`@ngrx/signals`),z(),J(6,` (`),R(7,`code`),J(8,`signalStore`),z(),J(9,`, `),R(10,`code`),J(11,`signalState`),z(),J(12,`) and `),R(13,`code`),J(14,`@ngrx/store`),z(),J(15,` are listed here once the app creates them. `),z())}function Hz(e,t){if(e&1&&(R(0,`div`,17),N(1,zz,7,0)(2,Bz,10,0)(3,Vz,16,0),z()),e&2){let e=G();j(),P(e.usesSignals()?1:e.usesClassic()?2:3)}}function Uz(e,t){if(e&1){let e=U();R(0,`li`)(1,`button`,33),W(`click`,function(){let t=D(e).$implicit;return O(G(2).selectStore(t.id))}),R(2,`span`,34),B(3,`span`,35),R(4,`span`,36),J(5),z()(),R(6,`span`,37),J(7),z()()()}if(e&2){let e=t.$implicit,n=G(2);j(),q(`selected`,e.id===n.store()?.id),M(`aria-pressed`,e.id===n.store()?.id),j(2),K(`background`,n.kindColor(e.kind)),j(2),Y(e.label),j(2),iv(` `,n.kindLabel(e.kind),` · `,e.scope,` · `,n.changeCount(e.id),` `,n.changeCount(e.id)===1?`change`:`changes`,` `)}}function Wz(e,t){e&1&&(R(0,`li`,31),J(1,`No stores match this filter.`),z())}function Gz(e,t){e&1&&B(0,`app-source-link`,41),e&2&&L(`file`,t)}function Kz(e,t){if(e&1&&(R(0,`span`,40),J(1),z()),e&2){let e=G();j(),Y(e.classic.devtools?`Store DevTools on`:`Store DevTools off`)}}function qz(e,t){if(e&1&&(R(0,`code`),J(1),z(),J(2)),e&2){let e=t.$implicit,n=t.$index,r=t.$count;j(),Y(e),j(),X(``,n===r-1?``:`, `,` `)}}function Jz(e,t){if(e&1&&(R(0,`p`,42),J(1,` Referenced by `),F(2,qz,3,2,null,null,kg),z()),e&2){let e=G();j(2),I(e.signal.references)}}function Yz(e,t){if(e&1&&(R(0,`p`,60),J(1),z()),e&2){let e=G(4);j(),Y(e.restoreOff)}}function Xz(e,t){if(e&1){let e=U();R(0,`div`,43)(1,`p`)(2,`strong`),J(3,`Viewing a past state.`),z(),J(4,` New actions are logged but do not change the state until you go back to the latest state. `),z(),R(5,`button`,59,3),W(`click`,function(){return D(e),O(G(3).backToLatest())}),J(7,` Back to latest `),z(),N(8,Yz,2,1,`p`,60),z()}if(e&2){let e=G(3);j(5),L(`disabled`,e.busy()||!e.canRestore()),M(`aria-describedby`,e.canRestore()?null:`store-latest-off`),j(3),P(e.canRestore()?-1:8)}}function Zz(e,t){if(e&1&&(R(0,`dt`),J(1),z(),R(2,`dd`)(3,`code`,68),J(4),z()()),e&2){let e=t.$implicit;j(),Y(e.key),j(2),L(`title`,e.full),j(),Y(e.value)}}function Qz(e,t){if(e&1&&(R(0,`dl`,63),F(1,Zz,5,3,null,null,Oz),z()),e&2){let e=G(4);j(),I(e.computedEntries())}}function $z(e,t){e&1&&(R(0,`p`,64),J(1,`No computed signals.`),z())}function eB(e,t){e&1&&(R(0,`span`,70),J(1,`signalMethod`),z())}function tB(e,t){e&1&&(R(0,`span`,70),J(1,`rxMethod`),z())}function nB(e,t){if(e&1&&(R(0,`li`,69),J(1),N(2,eB,2,0,`span`,70)(3,tB,2,0,`span`,70),R(4,`span`,71),J(5),z()()),e&2){let e=t.$implicit,n=G(5);j(),X(` `,e.name,` `),j(),P(e.signalMethod?2:e.rx?3:-1),j(3),rv(``,e.calls,` `,e.calls===1?`call`:`calls`,``,n.methodDuration(e))}}function rB(e,t){if(e&1&&(R(0,`ul`,66),F(1,nB,6,5,`li`,69,kz),z()),e&2){let e=G();j(),I(e.methods)}}function iB(e,t){e&1&&(R(0,`p`,64),J(1,`No methods.`),z())}function aB(e,t){if(e&1&&(R(0,`li`,69),J(1),z()),e&2){let e=t.$implicit;j(),Y(e)}}function oB(e,t){if(e&1&&(R(0,`li`,78),J(1),z()),e&2){let e=G().$implicit;L(`title`,G(5).entityOverflowTitle(e.ids,e.count)),j(),X(` +`,e.count-30,` more `)}}function sB(e,t){if(e&1&&(R(0,`code`,68),J(1),z()),e&2){let e=G(2).$implicit,t=G(5);L(`title`,t.prettyText(e.selected)),j(),Y(t.shortText(e.selected))}}function cB(e,t){e&1&&(R(0,`span`,64),J(1,`None selected`),z())}function lB(e,t){if(e&1&&(R(0,`dl`,63)(1,`dt`),J(2,`Selected`),z(),R(3,`dd`),N(4,sB,2,2,`code`,68)(5,cB,2,0,`span`,64),z()()),e&2){let e=G().$implicit;j(4),P(e.selected===void 0?5:4)}}function uB(e,t){if(e&1&&(R(0,`div`,74)(1,`div`,75)(2,`span`,69),J(3),z(),R(4,`span`,76),J(5),z()(),R(6,`ul`,77),F(7,aB,2,1,`li`,69,kg),N(9,oB,2,2,`li`,78),z(),N(10,lB,6,1,`dl`,63),z()),e&2){let e=t.$implicit,n=G(5);j(3),Y(e.collection??`entities`),j(2),Z(``,e.count,` `,e.count===1?`entity`:`entities`),j(),M(`aria-label`,(e.collection??`entities`)+` ids`),j(),I(n.entityIds(e.ids)),j(2),P(e.count>30?9:-1),j(),P(e.selectedId===void 0?-1:10)}}function dB(e,t){if(e&1&&(R(0,`section`,67)(1,`h4`,72),J(2,`Entities`),z(),R(3,`div`,73),F(4,uB,11,6,`div`,74,Az),z()()),e&2){let e=G();j(4),I(e.entities)}}function fB(e,t){if(e&1&&(R(0,`section`,61)(1,`h4`,62),J(2,`Computed`),z(),N(3,Qz,3,0,`dl`,63)(4,$z,2,0,`p`,64),R(5,`h4`,65),J(6,`Methods`),z(),N(7,rB,3,0,`ul`,66)(8,iB,2,0,`p`,64),z(),N(9,dB,6,0,`section`,67)),e&2){let e=t,n=G(3);j(3),P(n.computedEntries().length?3:4),j(4),P(e.methods.length?7:8),j(2),P(e.entities?.length?9:-1)}}function pB(e,t){if(e&1&&(R(0,`span`,83),J(1),z()),e&2){let e=t;L(`title`,`Caused by `+G(4).kindLabel(`event`)+`: `+e.type),j(),Y(e.type)}}function mB(e,t){if(e&1&&(R(0,`span`,70),J(1),z()),e&2){let e=G().$implicit;j(),Y(e.origin)}}function hB(e,t){if(e&1&&J(0),e&2){let e=G().$implicit;X(` · `,G(3).formatDuration(e.durationMs),` `)}}function gB(e,t){if(e&1){let e=U();R(0,`li`)(1,`button`,79),W(`click`,function(){let t=D(e).$implicit;return O(G(3).selectChange(t.seq))}),R(2,`span`,80),J(3),z(),R(4,`span`,81)(5,`span`,82),J(6),z(),N(7,pB,2,2,`span`,83),z(),R(8,`span`,84),N(9,mB,2,1,`span`,70),J(10),N(11,hB,1,1),z()()()}if(e&2){let e,n=t.$implicit,r=G(3);j(),q(`selected`,n.seq===r.selectedChangeSeq()),M(`aria-pressed`,n.seq===r.selectedChangeSeq())(`aria-controls`,n.seq===r.selectedChangeSeq()?`ngrx-change-detail`:null),j(2),X(`#`,n.seq),j(2),L(`title`,n.type),j(),Y(n.type),j(),P((e=n.causedByEvent)?7:-1,e),j(2),P(n.origin?9:-1),j(),Z(` `,r.changesLabel(n),` · `,r.formatTime(n.timestamp),` `),j(),P(n.durationMs===void 0?-1:11)}}function _B(e,t){e&1&&J(0,` No entries match this filter. `)}function vB(e,t){e&1&&J(0,` No actions dispatched since the page connected. `)}function yB(e,t){e&1&&J(0,` No state changes yet. Method calls and patchState writes that change the state are recorded here. `)}function bB(e,t){if(e&1&&(R(0,`li`,31),N(1,_B,1,0)(2,vB,1,0)(3,yB,1,0),z()),e&2){let e=G(),t=G(2);j(),P(t.filter()?1:e.classic?2:3)}}function xB(e,t){if(e&1&&(R(0,`div`,57),Wg(1,85),z()),e&2){G(3);let e=d_(21);j(),L(`ngTemplateOutlet`,e)(`ngTemplateOutletContext`,hv(2,wz,t))}}function SB(e,t){if(e&1&&B(0,`option`,90),e&2){let e=t.$implicit;L(`value`,e)}}function CB(e,t){if(e&1&&(R(0,`p`,96),J(1),z()),e&2){let e=G(4);j(),Y(e.restoreOff)}}function wB(e,t){if(e&1){let e=U();R(0,`section`,58)(1,`h4`,86),J(2,`Dispatch an action`),z(),R(3,`form`,87),W(`submit`,function(t){return D(e),O(G(3).dispatchAction(t))}),R(4,`label`)(5,`span`),J(6,`Type`),z(),R(7,`input`,88),W(`input`,function(t){return D(e),O(G(3).dispatchType.set(t.target.value))}),z()(),R(8,`datalist`,89),F(9,SB,1,1,`option`,90,kg),z(),R(11,`label`)(12,`span`),J(13,`Payload `),R(14,`span`,91),J(15,`(JSON object, optional)`),z()(),R(16,`textarea`,92),W(`input`,function(t){return D(e),O(G(3).dispatchPayload.set(t.target.value))}),z()(),R(17,`p`,93),J(18),z(),R(19,`div`,94)(20,`button`,95),J(21,` Dispatch `),z()(),N(22,CB,2,1,`p`,96),z()()}if(e&2){let e=G(3);j(7),L(`value`,e.dispatchType()),j(2),I(e.actionTypes()),j(7),L(`value`,e.dispatchPayload()),M(`aria-invalid`,e.payloadError()?`true`:null),j(2),Y(e.payloadError()),j(2),L(`disabled`,e.busy()||!e.canRestore()||!e.dispatchRequest()),M(`aria-describedby`,e.canRestore()?null:`store-dispatch-off`),j(2),P(e.canRestore()?-1:22)}}function TB(e,t){if(e&1){let e=U();R(0,`div`,32)(1,`div`,38)(2,`h3`),J(3),z(),R(4,`div`,39)(5,`span`,40),J(6),z(),R(7,`span`,40),J(8),z(),N(9,Gz,1,1,`app-source-link`,41),N(10,Kz,2,1,`span`,40),z(),N(11,Jz,4,0,`p`,42),z(),N(12,Xz,9,3,`div`,43),R(13,`div`,44)(14,`section`,45)(15,`div`,46)(16,`h4`,47),J(17,`State`),z(),R(18,`div`,48),B(19,`app-store-global`,49),R(20,`button`,50),W(`click`,function(){return D(e),O(G(2).copyState())}),J(21,` Copy `),z()()(),R(22,`pre`,51,2),J(24),z()(),N(25,fB,10,3),z(),R(26,`section`,52)(27,`h4`,53),J(28),R(29,`span`,14),J(30),z()(),B(31,`app-limit-note`,54),R(32,`div`,55)(33,`ul`,56),F(34,gB,12,12,`li`,null,Dz,!1,bB,4,1,`li`,31),z(),N(37,xB,2,4,`div`,57),z()(),N(38,wB,23,7,`section`,58),z()}if(e&2){let e,n,r,i=t,a=G(2);j(3),Y(i.label),j(3),Y(a.kindLabel(i.kind)),j(2),X(`scope: `,i.scope),j(),P((e=i.signal?.declaredIn)?9:-1,e),j(),P(i.classic?10:-1),j(),P(i.signal?.references?.length?11:-1),j(),P(i.classic?.paused?12:-1),j(7),L(`rpc`,a.rpc())(`pageId`,a.page()?.pageId)(`target`,hv(21,Cz,i.id))(`label`,i.label+` state`),j(5),Y(a.stateText()),j(),P((n=i.signal)?25:-1,n),j(3),X(` `,i.classic?`Action log`:`Change log`,` `),j(2),Y(a.storeLog().length),j(),L(`dropped`,a.page()?.dropped??0)(`max`,a.maxLog()),j(2),M(`aria-label`,i.classic?`Actions`:`Changes`),j(),I(a.storeLog()),j(3),P((r=a.changeEntry())?37:-1,r),j(),P(i.classic?38:-1)}}function EB(e,t){if(e&1&&(R(0,`div`,18)(1,`ul`,30),F(2,Uz,8,10,`li`,null,Ez,!1,Wz,2,0,`li`,31),z(),N(5,TB,39,23,`div`,32),z()),e&2){let e,t=G();j(2),I(t.filteredStores()),j(3),P((e=t.store())?5:-1,e)}}function DB(e,t){if(e&1&&(R(0,`code`,103),J(1),z()),e&2){let e=G().$implicit,t=G(2);L(`title`,t.prettyText(e.payload)),j(),Y(t.shortText(e.payload))}}function OB(e,t){if(e&1){let e=U();R(0,`li`)(1,`button`,101),W(`click`,function(){let t=D(e).$implicit;return O(G(2).selectEvent(t.seq))}),B(2,`span`,35),R(3,`span`,102),J(4),z(),N(5,DB,2,2,`code`,103),R(6,`span`,104),J(7),z()()()}if(e&2){let e=t.$implicit,n=G(2);j(),q(`selected`,e.seq===n.selectedEventSeq()),M(`aria-pressed`,e.seq===n.selectedEventSeq())(`aria-controls`,e.seq===n.selectedEventSeq()?`ngrx-event-detail`:null),j(),K(`background`,n.kindColor(`event`)),j(),L(`title`,e.eventType??e.type),j(),Y(e.eventType??e.type),j(),P(e.payload===void 0?-1:5),j(2),Y(n.formatTime(e.timestamp))}}function kB(e,t){e&1&&(R(0,`li`,31),J(1,`No events match this filter.`),z())}function AB(e,t){if(e&1&&(R(0,`div`,100,4),Wg(2,85),z()),e&2){G(2);let e=d_(21);j(2),L(`ngTemplateOutlet`,e)(`ngTemplateOutletContext`,hv(2,Tz,t))}}function jB(e,t){if(e&1&&(R(0,`section`,20)(1,`div`,12)(2,`h2`,97),J(3,`Events`),z(),R(4,`span`,14),J(5),z()(),R(6,`p`,98),J(7,` Events dispatched through @ngrx/signals/events, across every store on this page. `),z(),R(8,`ul`,99),F(9,OB,8,10,`li`,null,Dz,!1,kB,2,0,`li`,31),z(),N(12,AB,3,4,`div`,100),z()),e&2){let e,t=G();j(5),Y(t.pageEvents().length),j(4),I(t.pageEvents()),j(3),P((e=t.eventEntry())?12:-1,e)}}function MB(e,t){if(e&1&&(R(0,`dt`),J(1,`Origin`),z(),R(2,`dd`),J(3),z()),e&2){let e=G().selected,t=G();j(3),Y(t.originText(e.origin))}}function NB(e,t){if(e&1&&(R(0,`dt`),J(1,`Duration`),z(),R(2,`dd`),J(3),z()),e&2){let e=G().selected,t=G();j(3),Y(t.formatDuration(e.durationMs))}}function PB(e,t){if(e&1&&(R(0,`dt`),J(1,`Action`),z(),R(2,`dd`)(3,`pre`,109),J(4),z()()),e&2){let e=G().selected,t=G();j(4),Y(t.prettyText(e.action))}}function FB(e,t){if(e&1&&(R(0,`dt`),J(1,`Arguments`),z(),R(2,`dd`)(3,`pre`,109),J(4),z()()),e&2){let e=G().selected,t=G();j(4),Y(t.prettyText(e.args))}}function IB(e,t){if(e&1&&(R(0,`dt`),J(1,`Payload`),z(),R(2,`dd`)(3,`pre`,109),J(4),z()()),e&2){let e=G().selected,t=G();j(4),Y(t.prettyText(e.payload))}}function LB(e,t){if(e&1&&(R(0,`pre`,109),J(1),z()),e&2){let e=G(),t=G(2);j(),Y(t.prettyText(e.payload))}}function RB(e,t){if(e&1&&(R(0,`dt`),J(1,`Caused by event`),z(),R(2,`dd`)(3,`code`,110),J(4),z(),N(5,LB,2,1,`pre`,109),z()),e&2){let e=t;j(4),Y(e.type),j(),P(e.payload===void 0?-1:5)}}function zB(e,t){if(e&1){let e=U();R(0,`button`,114),W(`click`,function(){D(e);let t=G(2).selected;return O(G().copyDiff(t))}),J(1,` Copy `),z()}if(e&2){let e=G(2).selected;M(`aria-label`,`Copy the state diff of #`+e.seq)}}function BB(e,t){if(e&1&&(R(0,`code`,120),J(1),z()),e&2){let e=G().$implicit,t=G(4);j(),Y(t.shortText(e.before))}}function VB(e,t){e&1&&(R(0,`span`,122),J(1,`→`),z(),R(2,`span`,123),J(3,`became`),z())}function HB(e,t){if(e&1&&(R(0,`code`,121),J(1),z()),e&2){let e=G().$implicit,t=G(4);j(),Y(t.shortText(e.after))}}function UB(e,t){if(e&1&&(R(0,`li`)(1,`span`,117),J(2),z(),R(3,`code`,118),J(4),z(),R(5,`span`,119),N(6,BB,2,1,`code`,120),N(7,VB,4,0),N(8,HB,2,1,`code`,121),z()()),e&2){let e=t.$implicit,n=G(4);M_(`diff-row `+e.op),j(2),Y(n.opLabel(e.op)),j(2),Y(e.path),j(2),P(e.op===`add`?-1:6),j(),P(e.op===`change`?7:-1),j(),P(e.op===`remove`?-1:8)}}function WB(e,t){if(e&1&&(R(0,`p`,64),J(1),z()),e&2){let e=G(3).selected,t=G();j(),Y(t.moreChanges(e.diffTruncated))}}function GB(e,t){if(e&1&&(R(0,`ul`,115),F(1,UB,9,7,`li`,116,jz),z(),N(3,WB,2,1,`p`,64)),e&2){let e=G(2).selected;j(),I(e.diff),j(2),P(e.diffTruncated?3:-1)}}function KB(e,t){e&1&&(R(0,`p`,64),J(1,`The state did not change.`),z())}function qB(e,t){if(e&1&&(R(0,`div`,111)(1,`div`,112),J(2,`State diff`),z(),N(3,zB,2,1,`button`,113),z(),N(4,GB,4,1)(5,KB,2,0,`p`,64)),e&2){let e=G(),t=e.selected,n=e.headingLevel;j(),M(`aria-level`,n+1),j(2),P(t.diff.length?3:-1),j(),P(t.diff.length?4:5)}}function JB(e,t){if(e&1&&J(0),e&2){let e=G(2).selected;X(` Store DevTools jumps the app state to the state right after action #`,e.seq,`. Until you go back to the latest state, new actions are logged but do not change the state. `)}}function YB(e,t){if(e&1&&J(0),e&2){let e=G(3).selected;Z(` This sets every state key of `,t.label,` back to its value right after change #`,e.seq,`. Components that read the store update at once, and a new "Restore" entry is added to the log. `)}}function XB(e,t){if(e&1&&J(0),e&2){let e=G(3).selected;X(` This sets every state key of the store back to its value right after change #`,e.seq,`. Components that read the store update at once, and a new "Restore" entry is added to the log. `)}}function ZB(e,t){if(e&1&&N(0,YB,1,2)(1,XB,1,1),e&2){let e;P((e=G(3).store())?0:1,e)}}function QB(e,t){if(e&1){let e=U();R(0,`div`,124),W(`keydown.escape`,function(t){return D(e),O(G(2).cancelRestore(t))}),R(1,`p`,125),N(2,JB,1,1)(3,ZB,2,1),z(),R(4,`div`,94)(5,`button`,59),W(`click`,function(){D(e);let t=G().selected;return O(G().restore(t.seq,t.source===`store`))}),J(6,` Restore `),z(),R(7,`button`,29,5),W(`click`,function(){return D(e),O(G(2).cancelRestore())}),J(9,` Cancel `),z()()()}if(e&2){let e=G(),t=e.selected,n=e.idPrefix,r=G();M(`aria-labelledby`,n+`-confirm-text`),j(),L(`id`,n+`-confirm-text`),j(),P(t.source===`store`?2:3),j(3),L(`disabled`,r.busy())}}function $B(e,t){if(e&1){let e=U();R(0,`button`,130,6),W(`click`,function(){D(e);let t=G(2).selected;return O(G().askRestore(t.seq))}),J(2,` Restore this state `),z()}if(e&2){let e=G(2).idPrefix,t=G();L(`disabled`,!t.canRestore()),M(`aria-describedby`,t.canRestore()?null:e+`-writes-off`)}}function eV(e,t){if(e&1){let e=U();R(0,`button`,131),W(`click`,function(){D(e);let t=G(2).selected;return O(G().dispatchAgain(t.seq))}),J(1,` Dispatch again `),z()}if(e&2){let e=G(2).idPrefix,t=G();L(`disabled`,t.busy()||!t.canRestore()),M(`aria-describedby`,t.canRestore()?null:e+`-writes-off`)}}function tV(e,t){if(e&1&&(R(0,`p`,129),J(1),z()),e&2){let e=G(2).idPrefix,t=G();L(`id`,e+`-writes-off`),j(),Y(t.restoreOff)}}function nV(e,t){if(e&1&&(R(0,`div`,126),N(1,$B,3,2,`button`,127),N(2,eV,2,2,`button`,128),z(),N(3,tV,2,2,`p`,129)),e&2){let e=G().selected,t=G();j(),P(e.restorable?1:-1),j(),P(t.canAgain(e)?2:-1),j(),P(t.canRestore()?-1:3)}}function rV(e,t){e&1&&(J(0,` Store DevTools no longer holds this action, so this state cannot be restored. It was dropped past `),R(1,`code`),J(2,`maxAge`),z(),J(3,`, or the Store DevTools history was committed, reset or imported. `))}function iV(e,t){e&1&&(J(0,` Store DevTools never recorded this action, so this state cannot be restored. An `),R(1,`code`),J(2,`actionsBlocklist`),z(),J(3,`, `),R(4,`code`),J(5,`actionsSafelist`),z(),J(6,` or `),R(7,`code`),J(8,`predicate`),z(),J(9,` option filtered it out, or recording was paused. `))}function aV(e,t){e&1&&(J(0,` Time travel for @ngrx/store needs `),R(1,`code`),J(2,`provideStoreDevtools()`),z(),J(3,`. Without it, entries cannot be restored. `))}function oV(e,t){if(e&1&&(R(0,`p`,108),N(1,rV,4,0)(2,iV,10,0)(3,aV,4,0),z()),e&2){let e=G().selected;j(),P(e.unrestorable===`dropped`?1:e.unrestorable===`not-recorded`?2:3)}}function sV(e,t){if(e&1&&(R(0,`section`,105)(1,`div`,106),J(2),z(),R(3,`dl`,63)(4,`dt`),J(5,`Time`),z(),R(6,`dd`),J(7),z(),N(8,MB,4,1),N(9,NB,4,1),N(10,PB,5,1),N(11,FB,5,1),N(12,IB,5,1),N(13,RB,6,2),z(),N(14,qB,6,3),N(15,QB,10,4,`div`,107),N(16,nV,4,3),N(17,oV,4,1,`p`,108),z()),e&2){let e,n=t.selected,r=t.headingLevel,i=t.idPrefix,a=G();M(`aria-labelledby`,i+`-entry-heading`),j(),L(`id`,i+`-entry-heading`),M(`aria-level`,r),j(),Z(` #`,n.seq,` `,n.type,` `),j(5),Y(a.formatTime(n.timestamp)),j(),P(n.origin?8:-1),j(),P(n.durationMs===void 0?-1:9),j(),P(n.action===void 0?-1:10),j(),P(n.args?.length?11:-1),j(),P(n.source===`event`&&n.payload!==void 0?12:-1),j(),P((e=n.causedByEvent)?13:-1,e),j(),P(n.source===`event`?-1:14),j(),P(n.restorable&&a.confirmSeq()===n.seq?15:-1),j(),P(a.confirmSeq()!==n.seq&&(n.restorable||a.canAgain(n))?16:-1),j(),P(!n.restorable&&n.source===`store`?17:-1)}}function cV(e,t){if(e&1&&(R(0,`span`,14),J(1),z()),e&2){let e=G();j(),Y(e.sourceEntries().length)}}function lV(e,t){e&1&&(R(0,`div`,23),B(1,`span`,132),R(2,`p`,27),J(3,`Scanning source for NgRx declarations…`),z()())}function uV(e,t){e&1&&(R(0,`div`,24)(1,`p`,27),J(2,`No NgRx declarations found in source.`),z(),R(3,`p`,28),J(4,` The scan looks for `),R(5,`code`),J(6,`signalStore`),z(),J(7,`, `),R(8,`code`),J(9,`signalState`),z(),J(10,`, `),R(11,`code`),J(12,`signalMethod`),z(),J(13,`, `),R(14,`code`),J(15,`createAction`),z(),J(16,`, `),R(17,`code`),J(18,`createReducer`),z(),J(19,`, `),R(20,`code`),J(21,`createEffect`),z(),J(22,`, `),R(23,`code`),J(24,`createSelector`),z(),J(25,` and `),R(26,`code`),J(27,`createFeature`),z(),J(28,`. `),z()())}function dV(e,t){if(e&1){let e=U();R(0,`button`,134),W(`click`,function(){let t=D(e).$implicit,n=G(2);return O(n.kind.set(n.kind()===t.kind?null:t.kind))}),B(1,`span`,35),R(2,`span`,139),J(3),z(),R(4,`span`,135),J(5),z()()}if(e&2){let e=t.$implicit,n=G(2);q(`active`,n.kind()===e.kind),M(`aria-pressed`,n.kind()===e.kind),j(),K(`background`,n.kindColor(e.kind)),j(2),Y(n.kindLabel(e.kind)),j(2),Y(e.count)}}function fV(e,t){if(e&1&&(R(0,`p`,144),J(1),z()),e&2){let e=G().$implicit;j(),Y(e.detail)}}function pV(e,t){if(e&1&&(R(0,`li`,138)(1,`div`,140),B(2,`span`,35),R(3,`span`,141),J(4),z(),R(5,`span`,40),J(6),z()(),R(7,`div`,142),B(8,`app-source-link`,143),z(),N(9,fV,2,1,`p`,144),z()),e&2){let e=t.$implicit,n=G(2);j(2),K(`background`,n.kindColor(e.kind)),j(2),Y(e.name),j(2),Y(n.kindLabel(e.kind)),j(2),L(`file`,e.file)(`line`,e.line),j(),P(e.detail?9:-1)}}function mV(e,t){if(e&1){let e=U();R(0,`li`)(1,`div`,23)(2,`p`,27),J(3,`No declarations match.`),z(),R(4,`button`,29),W(`click`,function(){return D(e),O(G(2).clearFilters())}),J(5,`Clear filters`),z()()()}}function hV(e,t){if(e&1){let e=U();R(0,`div`,133)(1,`button`,134),W(`click`,function(){return D(e),O(G().kind.set(null))}),J(2,` All `),R(3,`span`,135),J(4),z()(),F(5,dV,6,7,`button`,136,Mz),z(),R(7,`ul`,137),F(8,pV,10,7,`li`,138,Nz,!1,mV,6,0,`li`),z()}if(e&2){let e=G();j(),q(`active`,!e.kind()),M(`aria-pressed`,!e.kind()),j(3),Y(e.sourceEntries().length),j(),I(e.groupedEntries()),j(3),I(e.filteredEntries())}}var gV={action:`#f59e0b`,reducer:`#a78bfa`,effect:`#fb923c`,selector:`#60a5fa`,feature:`#34d399`,"store-setup":`#94a3b8`,"signal-store":`#e879f9`,"signal-state":`#22d3ee`,"signal-method":`#fb7185`,store:`#a78bfa`,event:`var(--warn)`},_V={"signal-store":`signalStore`,"signal-state":`signalState`,"signal-method":`signalMethod`,"store-setup":`store setup`,store:`@ngrx/store`,event:`event`},vV={dispatch:`store.dispatch(action)`,effect:`NgRx effect (Store.next)`,reactive:`store.dispatch(() => action)`};function yV(e){if(!e.trim())return{};let t;try{t=JSON.parse(e)}catch{return{error:`The payload is not valid JSON.`}}return!t||typeof t!=`object`||Array.isArray(t)?{error:`The payload must be a JSON object, like {"id": 7}.`}:Object.prototype.hasOwnProperty.call(t,`type`)?{error:`The payload cannot have a "type" key. Put the action type in the Type field.`}:{payload:t}}var bV=new Set([`action`,`reducer`,`effect`,`selector`,`feature`,`store-setup`]),xV=class e{rpc=$(null);canRestore=Q(()=>ME(this.rpc(),`ngrx`));restoreOff=iE(`ngrx`);filter=A(``);kind=A(null);sourceEntries=A([]);sourceLoaded=A(!1);pages=A([]);failed=A(!1);stateLoaded=A(!1);selectedPageId=A(null);hostPageId=fE();maxLog=Q(()=>jE(this.rpc()).limits.changeLog);selectedStoreId=A(null);focusEventSeq=A(null);eventDetailHeading=Jv(`eventDetailHeading`);busy=A(!1);focusLatest=A(!1);focusConfirm=A(null);cancelButton=Jv(`cancelButton`);restoreButton=Jv(`restoreButton`);stateTree=Jv(`stateTree`);filterInput=Jv(`filterInput`);latestButton=Jv(`latestButton`);message=A(``);destroyRef=T(Ts);unsubscribe=null;page=Q(()=>{let e=this.pages();return e.find(e=>e.pageId===this.selectedPageId())??e.find(e=>e.pageId===this.hostPageId)??e[0]??null});logKey=Q(()=>{let e=this.page();return{pageId:e?.pageId??null,log:e?.log??[]}});logSession=Fv({source:this.logKey,computation:(e,t)=>t?uz(t.source,e)?t.value:t.value+1:0});selectedChangeSeq=Fv({source:this.logSession,computation:()=>null});selectedEventSeq=Fv({source:this.logSession,computation:()=>null});confirmSeq=Fv({source:this.logSession,computation:()=>null});pageOptions=Q(()=>this.pages().map(e=>({value:e.pageId,label:e.title||e.url,hint:e.url})));liveStores=Q(()=>{let e=this.page();if(!e)return[];let t=e.stores.map(e=>({id:e.id,label:e.name??e.references[0]??e.className,kind:e.kind,scope:e.scope,signal:e}));return e.classic&&t.push({id:`store`,label:`Store`,kind:`store`,scope:e.classic.scope,classic:e.classic}),t});filteredStores=Q(()=>{let e=this.filter().trim().toLowerCase();return e?this.liveStores().filter(t=>t.label.toLowerCase().includes(e)||t.kind.includes(e)||(t.signal?.stateKeys??[]).some(t=>t.toLowerCase().includes(e))||(this.page()?.log??[]).some(n=>n.storeId===t.id&&n.type.toLowerCase().includes(e))):this.liveStores()});store=Q(()=>{let e=this.liveStores();return e.find(e=>e.id===this.selectedStoreId())??e[0]??null});stateText=Q(()=>{let e=this.store();return e?hz(e.signal?e.signal.state:e.classic?.state):``});computedEntries=Q(()=>Object.entries(this.store()?.signal?.computed??{}).map(([e,t])=>({key:e,value:gz(t,160),full:hz(t)})));storeLog=Q(()=>{let e=this.store()?.id,t=this.filter().trim().toLowerCase();return(this.page()?.log??[]).filter(n=>n.storeId===e&&(!t||n.type.toLowerCase().includes(t)||this.storeMatches(t))).reverse()});hasEvents=Q(()=>(this.page()?.log??[]).some(e=>e.source===`event`));pageEvents=Q(()=>{let e=this.filter().trim().toLowerCase();return(this.page()?.log??[]).filter(t=>t.source===`event`&&(!e||t.type.toLowerCase().includes(e))).slice().reverse()});changeEntry=Q(()=>{let e=this.selectedChangeSeq();return e===null?null:this.storeLog().find(t=>t.seq===e)??null});eventEntry=Q(()=>{let e=this.selectedEventSeq();return e===null?null:this.pageEvents().find(t=>t.seq===e)??null});dispatchType=A(``);dispatchPayload=A(``);actionTypes=Q(()=>{let e=new Set;for(let t of this.sourceEntries())for(let n of t.types??[])e.add(n);for(let t of this.page()?.log??[])t.source===`store`&&t.action!==void 0&&e.add(t.type);return[...e].sort().slice(0,200)});payloadError=Q(()=>yV(this.dispatchPayload()).error??``);dispatchRequest=Q(()=>{let e=this.dispatchType().trim(),{payload:t,error:n}=yV(this.dispatchPayload());return!e||n?null:{type:`dispatch`,action:e,...t?{payload:t}:{}}});usesSignals=Q(()=>this.sourceEntries().some(e=>e.kind===`signal-store`||e.kind===`signal-state`));usesClassic=Q(()=>this.sourceEntries().some(e=>bV.has(e.kind)));filteredEntries=Q(()=>{let e=this.filter().trim().toLowerCase(),t=this.kind();return this.sourceEntries().filter(n=>(!t||n.kind===t)&&(!e||n.name.toLowerCase().includes(e)||n.kind.includes(e)||(n.detail??``).toLowerCase().includes(e)))});groupedEntries=Q(()=>{let e=new Map;for(let t of this.sourceEntries())e.set(t.kind,(e.get(t.kind)??0)+1);return[...e.entries()].map(([e,t])=>({kind:e,count:t}))});constructor(){fc(()=>{let e=this.rpc();e&&this.load(e)}),uy(()=>{let e=this.latestButton();e&&this.focusLatest()&&!this.busy()&&(this.focusLatest.set(!1),e.nativeElement.focus())}),fc(()=>{let e=this.focusConfirm(),t=e===`cancel`?this.cancelButton():this.restoreButton();e&&t&&(this.focusConfirm.set(null),t.nativeElement.focus())}),uy(()=>{let e=this.focusEventSeq(),t=this.eventDetailHeading();e!==null&&t&&(this.focusEventSeq.set(null),t.nativeElement.focus())}),this.destroyRef.onDestroy(()=>this.unsubscribe?.())}storeMatches(e){let t=this.store();return!!t&&t.label.toLowerCase().includes(e)}async load(e){this.failed.set(!1),gE(e,`get-ngrx-store`).then(e=>this.sourceEntries.set(Array.isArray(e)?e:[])).catch(()=>this.sourceEntries.set([])).finally(()=>this.sourceLoaded.set(!0));try{let t=await e.scope(`pangular`).rpc.sharedState(`ngrx-store`);if(this.destroyRef.destroyed)return;let n=e=>{let t=e;this.pages.set(Array.isArray(t?.pages)?t.pages:[]),e!==void 0&&this.stateLoaded.set(!0)};n(t.value()),this.unsubscribe?.(),this.unsubscribe=t.on(`updated`,n)}catch{this.failed.set(!0)}}retry(){let e=this.rpc();e&&this.load(e)}selectPage(e){this.selectedPageId.set(e),this.selectedStoreId.set(null),this.selectedChangeSeq.set(null),this.selectedEventSeq.set(null),this.confirmSeq.set(null),this.message.set(``)}selectStore(e){this.selectedStoreId.set(e),this.selectedChangeSeq.set(null),this.confirmSeq.set(null),this.message.set(``)}selectChange(e){this.selectedChangeSeq.set(this.selectedChangeSeq()===e?null:e),this.confirmSeq.set(null),this.message.set(``)}copyState(){return this.copyText(this.stateText())}copyDiff(e){return this.copyText(hz(e.diff))}async copyText(e){try{await navigator.clipboard.writeText(e),this.message.set(`Copied.`)}catch{this.message.set(`The clipboard is not available here.`)}}askRestore(e){this.confirmSeq.set(e),this.focusConfirm.set(`cancel`)}cancelRestore(e){e?.preventDefault(),this.confirmSeq.set(null),this.focusConfirm.set(`restore`)}async restore(e,t){let n=this.page();if(!n)return;this.busy.set(!0),this.focusLatest.set(!1);let r=!1;try{let i=await gE(this.rpc(),`request-ngrx-action`,{pageId:n.pageId,request:{type:`restore`,seq:e}});this.message.set(i?.error??i?.message??`Restored.`),r=t&&!i?.error&&!!i?.paused}catch{this.message.set(`Could not reach the page to restore the state.`)}finally{this.busy.set(!1),this.confirmSeq.set(null),this.focusLatest.set(r),r||this.stateTree()?.nativeElement.focus()}}selectEvent(e){let t=this.selectedEventSeq()===e?null:e;this.selectedEventSeq.set(t),t!==null&&this.focusEventSeq.set(t)}async backToLatest(){let e=this.page();if(e){this.busy.set(!0);try{let t=await gE(this.rpc(),`request-ngrx-action`,{pageId:e.pageId,request:{type:`latest`}});this.focusLatest.set(!1),this.stateTree()?.nativeElement.focus(),this.message.set(t?.error??t?.message??`Back on the latest state.`)}catch{this.message.set(`Could not reach the page to go back to the latest state.`)}finally{this.busy.set(!1)}}}canAgain(e){return e.source===`store`&&e.action!==void 0}async dispatchAction(e){e.preventDefault();let t=this.dispatchRequest();t&&await this.send(t,`Could not reach the page to dispatch the action.`)}dispatchAgain(e){return this.send({type:`dispatch-again`,seq:e},`Could not reach the page to dispatch the action again.`)}async send(e,t){let n=this.page();if(!n||this.busy())return;let r=this.logSession();this.busy.set(!0);try{let t=await gE(this.rpc(),`request-ngrx-action`,{pageId:n.pageId,request:e});this.message.set(t?.error??t?.message??`Dispatched.`),t?.entry&&this.logSession()===r&&(this.selectedStoreId.set(`store`),this.selectedChangeSeq.set(t.entry.seq))}catch{this.message.set(t)}finally{this.busy.set(!1)}}clearFilters(){this.filter.set(``),this.kind.set(null),this.filterInput()?.nativeElement.focus()}changeCount(e){return(this.page()?.log??[]).filter(t=>t.storeId===e).length}entityIds(e){return e.slice(0,30)}entityOverflowTitle(e,t){let n=e.slice(30).join(`, `);return t>e.length?`${n} (first ${e.length} of ${t} shown)`:n}kindColor(e){return gV[e]??`var(--text-3)`}kindLabel(e){return _V[e]??e}originText(e){return vV[e]??e}changesLabel=lz;moreChanges=cz;opLabel(e){return e===`add`?`added`:e===`remove`?`removed`:`changed`}prettyText(e){return hz(e)}shortText(e){return gz(e)}formatTime=tO;formatDuration(e){return e<=0?`<1ms`:`${Math.round(e)}ms`}methodDuration(e){let t=[];return e.avgDurationMs!==void 0&&t.push(`avg ${this.formatDuration(e.avgDurationMs)}`),e.lastDurationMs!==void 0&&t.push(`last ${this.formatDuration(e.lastDurationMs)}`),t.length?` · ${t.join(` · `)}`:``}static ɵfac=function(t){return new(t||e)};static ɵcmp=Gh({type:e,selectors:[[`app-store-inspector`]],viewQuery:function(e,t){e&1&&l_(t.eventDetailHeading,_z,5)(t.cancelButton,vz,5)(t.restoreButton,yz,5)(t.stateTree,bz,5)(t.filterInput,xz,5)(t.latestButton,Sz,5),e&2&&u_(6)},inputs:{rpc:[1,`rpc`]},decls:30,vars:11,consts:[[`filterInput`,``],[`entryDetailTpl`,``],[`stateTree`,``],[`latestButton`,``],[`eventDetailHeading`,``],[`cancelButton`,``],[`restoreButton`,``],[1,`toolbar`],[`type`,`search`,`placeholder`,`Filter stores, changes and declarations…`,`aria-label`,`Filter stores, changes and source declarations`,3,`input`,`keydown.escape`,`value`],[1,`status`],[`aria-hidden`,`true`,1,`live-dot`],[`aria-labelledby`,`ngrx-live-heading`,1,`block`],[1,`section-head`],[`id`,`ngrx-live-heading`],[1,`pill`],[`role`,`alert`,1,`empty`],[`role`,`status`,1,`empty`],[1,`empty`],[1,`live-layout`],[`role`,`status`,1,`message`],[`aria-labelledby`,`ngrx-events-heading`,1,`block`],[`aria-labelledby`,`ngrx-source-heading`,1,`block`],[`id`,`ngrx-source-heading`],[`role`,`status`,1,`empty`,`compact`],[1,`empty`,`compact`],[`id`,`ngrx-page-label`,1,`visually-hidden`],[`labelledBy`,`ngrx-page-label`,1,`page-select`,3,`valueChange`,`options`,`value`],[1,`empty-title`],[1,`hint`],[`type`,`button`,1,`btn`,3,`click`],[`aria-label`,`Stores on this page`,1,`store-list`],[1,`muted`,`pad`],[1,`store-detail`],[`type`,`button`,1,`store-item`,3,`click`],[1,`store-top`],[`aria-hidden`,`true`,1,`dot`],[1,`store-name`],[1,`store-meta`],[1,`detail-head`],[1,`chips`],[1,`chip`],[1,`chip`,`mono`,3,`file`],[1,`refs`],[1,`paused`],[1,`facts`],[`aria-labelledby`,`ngrx-state-heading`,1,`fact`],[1,`fact-head`],[`id`,`ngrx-state-heading`],[1,`state-actions`],[3,`rpc`,`pageId`,`target`,`label`],[`type`,`button`,`aria-label`,`Copy state`,1,`btn`,`copy`,3,`click`],[`tabindex`,`0`,`aria-labelledby`,`ngrx-state-heading`,1,`tree`],[`aria-labelledby`,`ngrx-log-heading`,1,`log`],[`id`,`ngrx-log-heading`],[`what`,`changes on this page`,`limit`,`changeLog`,3,`dropped`,`max`],[1,`log-layout`],[`appRovingList`,`button.log-item`,1,`log-list`],[`id`,`ngrx-change-detail`],[`aria-labelledby`,`ngrx-dispatch-heading`,1,`dispatch`],[`type`,`button`,1,`btn`,`primary`,3,`click`,`disabled`],[`id`,`store-latest-off`,1,`hint`,`small`],[`aria-labelledby`,`ngrx-computed-heading`,1,`fact`],[`id`,`ngrx-computed-heading`],[1,`kv`],[1,`muted`],[`id`,`ngrx-methods-heading`,1,`spaced`],[`aria-labelledby`,`ngrx-methods-heading`,1,`methods`],[`aria-labelledby`,`ngrx-entities-heading`,1,`fact`],[3,`title`],[1,`chip`,`mono`],[1,`tag`],[1,`calls`],[`id`,`ngrx-entities-heading`],[1,`entities`],[1,`entity-group`],[1,`entity-head`],[1,`entity-count`],[1,`chips`,`entity-ids`],[1,`chip`,`more`,3,`title`],[`type`,`button`,1,`log-item`,3,`click`],[1,`seq`],[1,`log-type-row`],[1,`log-type`,3,`title`],[1,`tag`,3,`title`],[1,`log-meta`],[3,`ngTemplateOutlet`,`ngTemplateOutletContext`],[`id`,`ngrx-dispatch-heading`],[1,`dispatch-form`,3,`submit`],[`required`,``,`spellcheck`,`false`,`autocomplete`,`off`,`list`,`ngrx-action-types`,`placeholder`,`e.g. [Cart] Add Item`,3,`input`,`value`],[`id`,`ngrx-action-types`],[3,`value`],[1,`optional`],[`rows`,`3`,`spellcheck`,`false`,`placeholder`,`e.g. {"id": 7}`,`aria-describedby`,`ngrx-payload-error`,3,`input`,`value`],[`id`,`ngrx-payload-error`,1,`field-error`],[1,`actions`],[`type`,`submit`,1,`btn`,`primary`,3,`disabled`],[`id`,`store-dispatch-off`,1,`hint`,`small`],[`id`,`ngrx-events-heading`],[1,`intro`],[`appRovingList`,`button.event-item`,`aria-label`,`Dispatched events`,1,`events-list`],[`id`,`ngrx-event-detail`,`tabindex`,`-1`,1,`event-detail-focus`],[`type`,`button`,1,`event-item`,3,`click`],[1,`event-type`,`mono`,3,`title`],[1,`event-payload`,3,`title`],[1,`event-time`],[1,`entry`],[`role`,`heading`,1,`entry-heading`,3,`id`],[`role`,`group`,1,`confirm`],[1,`hint`,`small`],[1,`code`],[1,`mono`],[1,`sub-head`],[`role`,`heading`,1,`sub`],[`type`,`button`,1,`btn`,`copy`],[`type`,`button`,1,`btn`,`copy`,3,`click`],[1,`diff`],[3,`class`],[1,`op`],[1,`path`],[1,`values`],[1,`before`],[1,`after`],[`aria-hidden`,`true`,1,`arrow`],[1,`visually-hidden`],[`role`,`group`,1,`confirm`,3,`keydown.escape`],[3,`id`],[1,`entry-actions`],[`type`,`button`,1,`btn`,`restore`,3,`disabled`],[`type`,`button`,1,`btn`,3,`disabled`],[1,`hint`,`small`,3,`id`],[`type`,`button`,1,`btn`,`restore`,3,`click`,`disabled`],[`type`,`button`,1,`btn`,3,`click`,`disabled`],[`aria-hidden`,`true`,1,`spinner`],[`role`,`group`,`aria-label`,`Filter declarations by kind`,1,`kinds`],[`type`,`button`,1,`kind-chip`,3,`click`],[1,`count`],[`type`,`button`,1,`kind-chip`,3,`active`],[1,`nodes`],[1,`node-card`],[1,`chip-text`],[1,`node-header`],[1,`node-label`],[1,`node-meta`],[1,`file`,3,`file`,`line`],[1,`detail`]],template:function(e,t){e&1&&(R(0,`div`,7)(1,`input`,8,0),W(`input`,function(e){return t.filter.set(e.target.value)})(`keydown.escape`,function(){return t.filter.set(``)}),z(),N(3,Pz,3,2),R(4,`span`,9),B(5,`span`,10),J(6),z()(),R(7,`section`,11)(8,`div`,12)(9,`h2`,13),J(10,`Live stores`),z(),N(11,Fz,2,1,`span`,14),z(),N(12,Iz,7,0,`div`,15)(13,Lz,3,0,`div`,16)(14,Rz,5,0,`div`,17)(15,Hz,4,1,`div`,17)(16,EB,6,2,`div`,18),R(17,`p`,19),J(18),z()(),N(19,jB,13,3,`section`,20),og(20,sV,18,16,`ng-template`,null,1,Ev),R(22,`section`,21)(23,`div`,12)(24,`h2`,22),J(25,`Source declarations`),z(),N(26,cV,2,1,`span`,14),z(),N(27,lV,4,0,`div`,23)(28,uV,29,0,`div`,24)(29,hV,11,5),z()),e&2&&(j(),L(`value`,t.filter()),j(2),P(t.pages().length>1?3:-1),j(),q(`on`,!!t.page()),j(2),X(` `,t.page()?`Live`:`No page connected`,` `),j(5),P(t.liveStores().length?11:-1),j(),P(t.failed()?12:t.stateLoaded()?t.page()?t.liveStores().length?16:15:14:13),j(6),Y(t.message()),j(),P(t.hasEvents()?19:-1),j(7),P(t.sourceEntries().length?26:-1),j(),P(t.sourceLoaded()?t.sourceEntries().length===0?28:29:27))},dependencies:[oO,_I,qD,lb,jA,GA],styles:[`[_nghost-%COMP%] { display: grid; gap: 24px; min-width: 0; @@ -8100,7 +8124,7 @@ textarea[aria-invalid=true][_ngcontent-%COMP%] { .kv[_ngcontent-%COMP%] { grid-template-columns: minmax(0, 1fr); } -}`]})},yV=[`heading`];function bV(e,t){if(e&1){let e=U();V(0,`div`,6)(1,`p`,9),J(2,`Could not explain this field. The devtools server did not answer.`),H(),V(3,`button`,11),r_(`click`,function(){return D(e),O(G().retry())}),J(4,`Try again`),H()()}}function xV(e,t){if(e&1&&(V(0,`pre`,7),J(1),H()),e&2){let e=G();M(`aria-busy`,e.text()===null?`true`:null),j(),Y(e.text()??`Loading…`)}}function SV(e,t){if(e&1){let e=U();V(0,`div`,8)(1,`label`,15),J(2),H(),V(3,`input`,16),r_(`input`,function(t){return D(e),O(G().draft.set(t.target.value))})(`keydown.enter`,function(){return D(e),O(G().setValue())}),H(),V(4,`button`,17),r_(`click`,function(){return D(e),O(G().setValue())}),J(5,` Set `),H()()}if(e&2){let e=G();j(2),X(`New value for `,e.node().path),j(),Kg(`value`,e.draft()),j(),Kg(`disabled`,!e.canWrite()),M(`aria-describedby`,e.canWrite()?null:`field-writes-off`)}}function CV(e,t){if(e&1&&(V(0,`p`,9),J(1),V(2,`a`,18),J(3,`How to unmask it`),H()()),e&2){let e=G();j(),X(` No Set editor: this field is redacted (`,e.redactLabel(e.node().redacted),`). `),j(),Kg(`href`,e.unmaskDocsUrl,ju)}}function wV(e,t){if(e&1&&(V(0,`p`,13),J(1),H()),e&2){let e=G();j(),Y(e.writesOff)}}var TV=class e{form=$.required();node=$.required();version=$(0);rpc=$(null);closed=Rv();canWrite=Q(()=>ME(this.rpc(),`forms`));writesOff=iE(`forms`);redactLabel=TE;unmaskDocsUrl=EE;target=Q(()=>`${this.form().id}|${this.node().path}`);text=Fv({source:this.target,computation:()=>null});failed=Fv({source:this.target,computation:()=>!1});attempt=A(0);heading=Jv.required(`heading`);host=T(Pl);draft=Fv({source:this.target,computation:()=>``});message=Fv({source:this.target,computation:()=>``});constructor(){fc(()=>{let e=this.form().id,t=this.node().path;this.version(),this.attempt();let n=this.rpc();Nv(()=>this.load(n,e,t))}),uy(()=>{this.target();let e=Nv(this.heading).nativeElement;this.host.nativeElement.scrollIntoView?.({block:`nearest`}),e.focus({preventScroll:!0})})}async load(e,t,n){if(!e)return;let r=await CE(e,`forms-explain`,{kind:`field`,form:t,path:n});if(this.form().id===t&&this.node().path===n){if(r===null){this.failed.set(!0);return}this.failed.set(!1),this.text.set(AE(r))}}retry(){this.failed.set(!1),this.attempt.update(e=>e+1)}async act(e){let t=this.form().id,n=this.node().path,r=await DE(this.rpc(),{action:e,formId:t,path:n});this.form().id===t&&this.node().path===n&&this.message.set(r.expression?`${OE(r)} ${r.expression}`:OE(r))}async setValue(){let e=this.form().id,t=this.node().path,n=await DE(this.rpc(),{action:`set-value`,formId:e,path:t,value:this.draft(),coerce:!0,mode:`user`});this.form().id===e&&this.node().path===t&&this.message.set(OE(n))}static ɵfac=function(t){return new(t||e)};static ɵcmp=Gh({type:e,selectors:[[`app-forms-field-detail`]],viewQuery:function(e,t){e&1&&l_(t.heading,yV,5),e&2&&u_()},hostAttrs:[`role`,`region`,`aria-labelledby`,`forms-field-heading`],inputs:{form:[1,`form`],node:[1,`node`],version:[1,`version`],rpc:[1,`rpc`]},outputs:{closed:`closed`},decls:26,vars:11,consts:[[`heading`,``],[1,`head`],[1,`section-label`],[`id`,`forms-field-heading`,`tabindex`,`-1`],[1,`tag`],[`type`,`button`,1,`small`,`close`,3,`click`],[`role`,`alert`,1,`failed`],[1,`explain`],[1,`editor`],[1,`muted`],[`role`,`group`,`aria-label`,`Field actions`,1,`row`],[`type`,`button`,1,`small`,3,`click`],[`type`,`button`,1,`small`,3,`click`,`disabled`],[`id`,`field-writes-off`,1,`muted`],[`role`,`status`,1,`status`],[`for`,`field-value`,1,`sr-only`],[`id`,`field-value`,`type`,`text`,`placeholder`,`New value, read as the current value's type`,`autocomplete`,`off`,`spellcheck`,`false`,1,`field-input`,3,`input`,`keydown.enter`,`value`],[`type`,`button`,1,`small`,`primary`,3,`click`,`disabled`],[`target`,`_blank`,`rel`,`noopener noreferrer`,3,`href`]],template:function(e,t){e&1&&(V(0,`div`,1)(1,`span`,2),J(2,`Field`),H(),V(3,`h3`,3,0),J(5),H(),V(6,`span`,4),J(7),H(),V(8,`button`,5),r_(`click`,function(){return t.closed.emit()}),J(9,` Close `),H()(),N(10,bV,5,0,`div`,6)(11,xV,2,2,`pre`,7),N(12,SV,6,4,`div`,8)(13,CV,4,2,`p`,9),V(14,`div`,10)(15,`button`,11),r_(`click`,function(){return t.act(`focus`)}),J(16,`Focus`),H(),V(17,`button`,12),r_(`click`,function(){return t.act(`mark-touched`)}),J(18,` Touch `),H(),V(19,`button`,12),r_(`click`,function(){return t.act(`revalidate`)}),J(20,` Revalidate `),H(),V(21,`button`,11),r_(`click`,function(){return t.act(`store-as-global`)}),J(22,`Store as global`),H()(),N(23,wV,2,1,`p`,13),V(24,`p`,14),J(25),H()),e&2&&(j(5),Y(t.node().path||`(form)`),j(2),Y(t.node().type),j(),M(`aria-label`,`Close details for `+(t.node().path||`the form`)),j(2),P(t.failed()?10:11),j(2),P(t.node().type===`control`&&!t.node().redacted?12:t.node().type===`control`?13:-1),j(5),Kg(`disabled`,!t.canWrite()),M(`aria-describedby`,t.canWrite()?null:`field-writes-off`),j(2),Kg(`disabled`,!t.canWrite()),M(`aria-describedby`,t.canWrite()?null:`field-writes-off`),j(4),P(t.canWrite()?-1:23),j(2),Y(t.message()))},styles:[`.muted[_ngcontent-%COMP%] { +}`]})},SV=[`heading`];function CV(e,t){if(e&1){let e=U();V(0,`div`,6)(1,`p`,9),J(2,`Could not explain this field. The devtools server did not answer.`),H(),V(3,`button`,11),r_(`click`,function(){return D(e),O(G().retry())}),J(4,`Try again`),H()()}}function wV(e,t){if(e&1&&(V(0,`pre`,7),J(1),H()),e&2){let e=G();M(`aria-busy`,e.text()===null?`true`:null),j(),Y(e.text()??`Loading…`)}}function TV(e,t){if(e&1){let e=U();V(0,`div`,8)(1,`label`,15),J(2),H(),V(3,`input`,16),r_(`input`,function(t){return D(e),O(G().draft.set(t.target.value))})(`keydown.enter`,function(){return D(e),O(G().setValue())}),H(),V(4,`button`,17),r_(`click`,function(){return D(e),O(G().setValue())}),J(5,` Set `),H()()}if(e&2){let e=G();j(2),X(`New value for `,e.node().path),j(),Kg(`value`,e.draft()),j(),Kg(`disabled`,!e.canWrite()),M(`aria-describedby`,e.canWrite()?null:`field-writes-off`)}}function EV(e,t){if(e&1&&(V(0,`p`,9),J(1),V(2,`a`,18),J(3,`How to unmask it`),H()()),e&2){let e=G();j(),X(` No Set editor: this field is redacted (`,e.redactLabel(e.node().redacted),`). `),j(),Kg(`href`,e.unmaskDocsUrl,ju)}}function DV(e,t){if(e&1&&(V(0,`p`,13),J(1),H()),e&2){let e=G();j(),Y(e.writesOff)}}var OV=class e{form=$.required();node=$.required();version=$(0);rpc=$(null);closed=Rv();canWrite=Q(()=>ME(this.rpc(),`forms`));writesOff=iE(`forms`);redactLabel=TE;unmaskDocsUrl=EE;target=Q(()=>`${this.form().id}|${this.node().path}`);text=Fv({source:this.target,computation:()=>null});failed=Fv({source:this.target,computation:()=>!1});attempt=A(0);heading=Jv.required(`heading`);host=T(Pl);draft=Fv({source:this.target,computation:()=>``});message=Fv({source:this.target,computation:()=>``});constructor(){fc(()=>{let e=this.form().id,t=this.node().path;this.version(),this.attempt();let n=this.rpc();Nv(()=>this.load(n,e,t))}),uy(()=>{this.target();let e=Nv(this.heading).nativeElement;this.host.nativeElement.scrollIntoView?.({block:`nearest`}),e.focus({preventScroll:!0})})}async load(e,t,n){if(!e)return;let r=await CE(e,`forms-explain`,{kind:`field`,form:t,path:n});if(this.form().id===t&&this.node().path===n){if(r===null){this.failed.set(!0);return}this.failed.set(!1),this.text.set(AE(r))}}retry(){this.failed.set(!1),this.attempt.update(e=>e+1)}async act(e){let t=this.form().id,n=this.node().path,r=await DE(this.rpc(),{action:e,formId:t,path:n});this.form().id===t&&this.node().path===n&&this.message.set(r.expression?`${OE(r)} ${r.expression}`:OE(r))}async setValue(){let e=this.form().id,t=this.node().path,n=await DE(this.rpc(),{action:`set-value`,formId:e,path:t,value:this.draft(),coerce:!0,mode:`user`});this.form().id===e&&this.node().path===t&&this.message.set(OE(n))}static ɵfac=function(t){return new(t||e)};static ɵcmp=Gh({type:e,selectors:[[`app-forms-field-detail`]],viewQuery:function(e,t){e&1&&l_(t.heading,SV,5),e&2&&u_()},hostAttrs:[`role`,`region`,`aria-labelledby`,`forms-field-heading`],inputs:{form:[1,`form`],node:[1,`node`],version:[1,`version`],rpc:[1,`rpc`]},outputs:{closed:`closed`},decls:26,vars:11,consts:[[`heading`,``],[1,`head`],[1,`section-label`],[`id`,`forms-field-heading`,`tabindex`,`-1`],[1,`tag`],[`type`,`button`,1,`small`,`close`,3,`click`],[`role`,`alert`,1,`failed`],[1,`explain`],[1,`editor`],[1,`muted`],[`role`,`group`,`aria-label`,`Field actions`,1,`row`],[`type`,`button`,1,`small`,3,`click`],[`type`,`button`,1,`small`,3,`click`,`disabled`],[`id`,`field-writes-off`,1,`muted`],[`role`,`status`,1,`status`],[`for`,`field-value`,1,`sr-only`],[`id`,`field-value`,`type`,`text`,`placeholder`,`New value, read as the current value's type`,`autocomplete`,`off`,`spellcheck`,`false`,1,`field-input`,3,`input`,`keydown.enter`,`value`],[`type`,`button`,1,`small`,`primary`,3,`click`,`disabled`],[`target`,`_blank`,`rel`,`noopener noreferrer`,3,`href`]],template:function(e,t){e&1&&(V(0,`div`,1)(1,`span`,2),J(2,`Field`),H(),V(3,`h3`,3,0),J(5),H(),V(6,`span`,4),J(7),H(),V(8,`button`,5),r_(`click`,function(){return t.closed.emit()}),J(9,` Close `),H()(),N(10,CV,5,0,`div`,6)(11,wV,2,2,`pre`,7),N(12,TV,6,4,`div`,8)(13,EV,4,2,`p`,9),V(14,`div`,10)(15,`button`,11),r_(`click`,function(){return t.act(`focus`)}),J(16,`Focus`),H(),V(17,`button`,12),r_(`click`,function(){return t.act(`mark-touched`)}),J(18,` Touch `),H(),V(19,`button`,12),r_(`click`,function(){return t.act(`revalidate`)}),J(20,` Revalidate `),H(),V(21,`button`,11),r_(`click`,function(){return t.act(`store-as-global`)}),J(22,`Store as global`),H()(),N(23,DV,2,1,`p`,13),V(24,`p`,14),J(25),H()),e&2&&(j(5),Y(t.node().path||`(form)`),j(2),Y(t.node().type),j(),M(`aria-label`,`Close details for `+(t.node().path||`the form`)),j(2),P(t.failed()?10:11),j(2),P(t.node().type===`control`&&!t.node().redacted?12:t.node().type===`control`?13:-1),j(5),Kg(`disabled`,!t.canWrite()),M(`aria-describedby`,t.canWrite()?null:`field-writes-off`),j(2),Kg(`disabled`,!t.canWrite()),M(`aria-describedby`,t.canWrite()?null:`field-writes-off`),j(4),P(t.canWrite()?-1:23),j(2),Y(t.message()))},styles:[`.muted[_ngcontent-%COMP%] { color: var(--%NS%text-2); } @@ -8441,7 +8465,7 @@ h3[_ngcontent-%COMP%]:focus-visible { .status[_ngcontent-%COMP%]:empty { height: 0; margin: -12px 0 0; -}`]})};function EV(e,t){if(e&1){let e=U();V(0,`div`,0)(1,`p`,4),J(2,`Could not explain this form`),H(),V(3,`p`),J(4,`The devtools server did not answer. Check that the app is running, then try again.`),H(),V(5,`button`,2),r_(`click`,function(){return D(e),O(G().retry())}),J(6,`Try again`),H()()}}function DV(e,t){if(e&1&&(V(0,`section`,5)(1,`h3`,6),J(2,`Submit`),H(),V(3,`pre`,7),J(4),H()(),V(5,`section`,8)(6,`h3`,9),J(7,`Payload`),H(),V(8,`pre`,7),J(9),H()()),e&2){let e=G();j(3),M(`aria-busy`,e.submit()===null?`true`:null),j(),Y(e.submit()??`Loading…`),j(4),M(`aria-busy`,e.payload()===null?`true`:null),j(),Y(e.payload()??`Loading…`)}}function OV(e,t){if(e&1){let e=U();V(0,`div`,0)(1,`p`,3),J(2,`Could not check this form`),H(),V(3,`p`),J(4,`The devtools server did not answer. Check that the app is running, then try again.`),H(),V(5,`button`,4),r_(`click`,function(){return D(e),O(G().retry())}),J(6,`Try again`),H()()}}function kV(e,t){e&1&&(V(0,`div`,1),Bg(1,`span`,5),V(2,`p`),J(3,`Checking the form for problems…`),H()())}function AV(e,t){e&1&&(V(0,`div`,2)(1,`span`,6),k(),V(2,`svg`,7),Bg(3,`path`,8),H()(),hs(),V(4,`p`,3),J(5,`No problems found`),H(),V(6,`p`),J(7,`For generic accessibility checks, run axe on the page.`),H()())}function jV(e,t){if(e&1){let e=U();V(0,`span`,15),J(1,`at `),V(2,`button`,19),r_(`click`,function(){let t=D(e);return O(G(3).showField.emit(t))}),V(3,`span`,20),J(4,`Show field `),H(),V(5,`code`),J(6),H()()()}e&2&&(j(6),Y(t))}function MV(e,t){if(e&1&&(V(0,`li`)(1,`div`,12)(2,`span`,13),J(3),H(),V(4,`code`,14),J(5),H(),N(6,jV,7,1,`span`,15),H(),V(7,`p`,16),J(8),H(),V(9,`p`,17)(10,`span`,18),J(11,`Fix`),H(),J(12),H()()),e&2){let e,n=t.$implicit;M(`data-severity`,n.severity),j(2),M(`data-tone`,n.severity===`info`?``:n.severity===`error`?`bad`:`warn`),j(),Y(n.severity),j(2),Y(n.rule),j(),P((e=n.path)?6:-1,e),j(2),Y(n.message),j(4),X(` `,n.fix)}}function NV(e,t){if(e&1&&(V(0,`p`,9)(1,`span`,10),J(2),H(),J(3),H(),V(4,`ul`,11),F(5,MV,13,7,`li`,null,Og),H()),e&2){let e=G();j(2),Y(e.findings().length),j(),X(` `,e.findings().length===1?`finding`:`findings`,` `),j(2),I(e.findings())}}var PV=class e{formId=$.required();version=$(0);rpc=$(null);submit=Fv({source:this.formId,computation:()=>null});payload=Fv({source:this.formId,computation:()=>null});failed=Fv({source:this.formId,computation:()=>!1});message=A(``);attempt=A(0);constructor(){fc(()=>{let e=this.formId();this.version(),this.attempt();let t=this.rpc();t&&Nv(async()=>{let[n,r]=await Promise.all([CE(t,`forms-explain`,{kind:`submit`,form:e}),CE(t,`forms-explain`,{kind:`payload`,form:e})]);if(this.formId()===e){if(n===null||r===null){this.failed.set(!0);return}this.failed.set(!1),this.submit.set(AE(n)),this.payload.set(AE(r))}})})}retry(){this.failed.set(!1),this.attempt.update(e=>e+1)}async copyFixture(){let e=(await CE(this.rpc(),`forms-explain`,{kind:`fixture`,form:this.formId()})??``).match(/```ts\n([\s\S]*)```\s*$/)?.[1];if(!e){this.message.set(`No test fixture is available for this form.`);return}try{await navigator.clipboard.writeText(e),this.message.set(`Copied.`)}catch{this.message.set(`Clipboard is not available here.`)}}static ɵfac=function(t){return new(t||e)};static ɵcmp=Gh({type:e,selectors:[[`app-forms-submit`]],inputs:{formId:[1,`formId`],version:[1,`version`],rpc:[1,`rpc`]},decls:7,vars:2,consts:[[`role`,`alert`,1,`empty-state`],[1,`fixture`],[`type`,`button`,1,`small`,3,`click`],[`role`,`status`,1,`status`],[1,`empty-title`],[`aria-labelledby`,`forms-submit-title`,1,`block`],[`id`,`forms-submit-title`,1,`section-label`],[1,`explain`],[`aria-labelledby`,`forms-payload-title`,1,`block`],[`id`,`forms-payload-title`,1,`section-label`]],template:function(e,t){e&1&&(N(0,EV,7,0,`div`,0)(1,DV,10,4),V(2,`div`,1)(3,`button`,2),r_(`click`,function(){return t.copyFixture()}),J(4,`Copy test fixture`),H(),V(5,`span`,3),J(6),H()()),e&2&&(P(+!t.failed()),j(6),Y(t.message()))},styles:[`.muted[_ngcontent-%COMP%] { +}`]})};function kV(e,t){if(e&1){let e=U();V(0,`div`,0)(1,`p`,4),J(2,`Could not explain this form`),H(),V(3,`p`),J(4,`The devtools server did not answer. Check that the app is running, then try again.`),H(),V(5,`button`,2),r_(`click`,function(){return D(e),O(G().retry())}),J(6,`Try again`),H()()}}function AV(e,t){if(e&1&&(V(0,`section`,5)(1,`h3`,6),J(2,`Submit`),H(),V(3,`pre`,7),J(4),H()(),V(5,`section`,8)(6,`h3`,9),J(7,`Payload`),H(),V(8,`pre`,7),J(9),H()()),e&2){let e=G();j(3),M(`aria-busy`,e.submit()===null?`true`:null),j(),Y(e.submit()??`Loading…`),j(4),M(`aria-busy`,e.payload()===null?`true`:null),j(),Y(e.payload()??`Loading…`)}}function jV(e,t){if(e&1){let e=U();V(0,`div`,0)(1,`p`,3),J(2,`Could not check this form`),H(),V(3,`p`),J(4,`The devtools server did not answer. Check that the app is running, then try again.`),H(),V(5,`button`,4),r_(`click`,function(){return D(e),O(G().retry())}),J(6,`Try again`),H()()}}function MV(e,t){e&1&&(V(0,`div`,1),Bg(1,`span`,5),V(2,`p`),J(3,`Checking the form for problems…`),H()())}function NV(e,t){e&1&&(V(0,`div`,2)(1,`span`,6),k(),V(2,`svg`,7),Bg(3,`path`,8),H()(),hs(),V(4,`p`,3),J(5,`No problems found`),H(),V(6,`p`),J(7,`For generic accessibility checks, run axe on the page.`),H()())}function PV(e,t){if(e&1){let e=U();V(0,`span`,15),J(1,`at `),V(2,`button`,19),r_(`click`,function(){let t=D(e);return O(G(3).showField.emit(t))}),V(3,`span`,20),J(4,`Show field `),H(),V(5,`code`),J(6),H()()()}e&2&&(j(6),Y(t))}function FV(e,t){if(e&1&&(V(0,`li`)(1,`div`,12)(2,`span`,13),J(3),H(),V(4,`code`,14),J(5),H(),N(6,PV,7,1,`span`,15),H(),V(7,`p`,16),J(8),H(),V(9,`p`,17)(10,`span`,18),J(11,`Fix`),H(),J(12),H()()),e&2){let e,n=t.$implicit;M(`data-severity`,n.severity),j(2),M(`data-tone`,n.severity===`info`?``:n.severity===`error`?`bad`:`warn`),j(),Y(n.severity),j(2),Y(n.rule),j(),P((e=n.path)?6:-1,e),j(2),Y(n.message),j(4),X(` `,n.fix)}}function IV(e,t){if(e&1&&(V(0,`p`,9)(1,`span`,10),J(2),H(),J(3),H(),V(4,`ul`,11),F(5,FV,13,7,`li`,null,Og),H()),e&2){let e=G();j(2),Y(e.findings().length),j(),X(` `,e.findings().length===1?`finding`:`findings`,` `),j(2),I(e.findings())}}var LV=class e{formId=$.required();version=$(0);rpc=$(null);submit=Fv({source:this.formId,computation:()=>null});payload=Fv({source:this.formId,computation:()=>null});failed=Fv({source:this.formId,computation:()=>!1});message=A(``);attempt=A(0);constructor(){fc(()=>{let e=this.formId();this.version(),this.attempt();let t=this.rpc();t&&Nv(async()=>{let[n,r]=await Promise.all([CE(t,`forms-explain`,{kind:`submit`,form:e}),CE(t,`forms-explain`,{kind:`payload`,form:e})]);if(this.formId()===e){if(n===null||r===null){this.failed.set(!0);return}this.failed.set(!1),this.submit.set(AE(n)),this.payload.set(AE(r))}})})}retry(){this.failed.set(!1),this.attempt.update(e=>e+1)}async copyFixture(){let e=(await CE(this.rpc(),`forms-explain`,{kind:`fixture`,form:this.formId()})??``).match(/```ts\n([\s\S]*)```\s*$/)?.[1];if(!e){this.message.set(`No test fixture is available for this form.`);return}try{await navigator.clipboard.writeText(e),this.message.set(`Copied.`)}catch{this.message.set(`Clipboard is not available here.`)}}static ɵfac=function(t){return new(t||e)};static ɵcmp=Gh({type:e,selectors:[[`app-forms-submit`]],inputs:{formId:[1,`formId`],version:[1,`version`],rpc:[1,`rpc`]},decls:7,vars:2,consts:[[`role`,`alert`,1,`empty-state`],[1,`fixture`],[`type`,`button`,1,`small`,3,`click`],[`role`,`status`,1,`status`],[1,`empty-title`],[`aria-labelledby`,`forms-submit-title`,1,`block`],[`id`,`forms-submit-title`,1,`section-label`],[1,`explain`],[`aria-labelledby`,`forms-payload-title`,1,`block`],[`id`,`forms-payload-title`,1,`section-label`]],template:function(e,t){e&1&&(N(0,kV,7,0,`div`,0)(1,AV,10,4),V(2,`div`,1)(3,`button`,2),r_(`click`,function(){return t.copyFixture()}),J(4,`Copy test fixture`),H(),V(5,`span`,3),J(6),H()()),e&2&&(P(+!t.failed()),j(6),Y(t.message()))},styles:[`.muted[_ngcontent-%COMP%] { color: var(--%NS%text-2); } @@ -8713,7 +8737,7 @@ code[_ngcontent-%COMP%] { flex-wrap: wrap; gap: 8px 12px; align-items: center; -}`]})},FV=class e{formId=$.required();version=$(0);rpc=$(null);showField=Rv();findings=Fv({source:this.formId,computation:()=>null});failed=Fv({source:this.formId,computation:()=>!1});attempt=A(0);constructor(){fc(()=>{let e=this.formId();this.version(),this.attempt();let t=this.rpc();t&&Nv(async()=>{let n=await CE(t,`forms-lint`,{form:e});this.formId()===e&&(this.failed.set(n===null),n&&this.findings.set(n))})})}retry(){this.failed.set(!1),this.attempt.update(e=>e+1)}static ɵfac=function(t){return new(t||e)};static ɵcmp=Gh({type:e,selectors:[[`app-forms-lint`]],inputs:{formId:[1,`formId`],version:[1,`version`],rpc:[1,`rpc`]},outputs:{showField:`showField`},decls:4,vars:1,consts:[[`role`,`alert`,1,`empty-state`],[`role`,`status`,1,`empty-state`],[1,`empty-state`],[1,`empty-title`],[`type`,`button`,1,`small`,3,`click`],[`aria-hidden`,`true`,1,`spinner`],[`aria-hidden`,`true`,1,`ok-icon`],[`width`,`16`,`height`,`16`,`viewBox`,`0 0 24 24`,`fill`,`none`,`stroke`,`currentColor`,`stroke-width`,`2.5`,`stroke-linecap`,`round`,`stroke-linejoin`,`round`],[`d`,`M20 6 9 17l-5-5`],[1,`summary`],[1,`tabular`],[1,`findings`],[1,`meta`],[1,`tag`,`severity`],[1,`rule`],[1,`muted`,`path`],[1,`message`],[1,`fix`],[1,`fix-label`],[`type`,`button`,1,`summary-link`,3,`click`],[1,`sr-only`]],template:function(e,t){e&1&&N(0,OV,7,0,`div`,0)(1,kV,4,0,`div`,1)(2,AV,8,0,`div`,2)(3,NV,7,2),e&2&&P(t.failed()?0:t.findings()===null?1:t.findings().length?3:2)},styles:[`.muted[_ngcontent-%COMP%] { +}`]})},RV=class e{formId=$.required();version=$(0);rpc=$(null);showField=Rv();findings=Fv({source:this.formId,computation:()=>null});failed=Fv({source:this.formId,computation:()=>!1});attempt=A(0);constructor(){fc(()=>{let e=this.formId();this.version(),this.attempt();let t=this.rpc();t&&Nv(async()=>{let n=await CE(t,`forms-lint`,{form:e});this.formId()===e&&(this.failed.set(n===null),n&&this.findings.set(n))})})}retry(){this.failed.set(!1),this.attempt.update(e=>e+1)}static ɵfac=function(t){return new(t||e)};static ɵcmp=Gh({type:e,selectors:[[`app-forms-lint`]],inputs:{formId:[1,`formId`],version:[1,`version`],rpc:[1,`rpc`]},outputs:{showField:`showField`},decls:4,vars:1,consts:[[`role`,`alert`,1,`empty-state`],[`role`,`status`,1,`empty-state`],[1,`empty-state`],[1,`empty-title`],[`type`,`button`,1,`small`,3,`click`],[`aria-hidden`,`true`,1,`spinner`],[`aria-hidden`,`true`,1,`ok-icon`],[`width`,`16`,`height`,`16`,`viewBox`,`0 0 24 24`,`fill`,`none`,`stroke`,`currentColor`,`stroke-width`,`2.5`,`stroke-linecap`,`round`,`stroke-linejoin`,`round`],[`d`,`M20 6 9 17l-5-5`],[1,`summary`],[1,`tabular`],[1,`findings`],[1,`meta`],[1,`tag`,`severity`],[1,`rule`],[1,`muted`,`path`],[1,`message`],[1,`fix`],[1,`fix-label`],[`type`,`button`,1,`summary-link`,3,`click`],[1,`sr-only`]],template:function(e,t){e&1&&N(0,jV,7,0,`div`,0)(1,MV,4,0,`div`,1)(2,NV,8,0,`div`,2)(3,IV,7,2),e&2&&P(t.failed()?0:t.findings()===null?1:t.findings().length?3:2)},styles:[`.muted[_ngcontent-%COMP%] { color: var(--%NS%text-2); } @@ -9069,7 +9093,7 @@ code[_ngcontent-%COMP%] { font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; -}`]})},IV=[`pathInput`],LV=()=>[],RV=(e,t)=>t.formId+`#`+t.seq;function zV(e,t){e&1&&B(0,`span`,6)}function BV(e,t){if(e&1){let e=U();R(0,`label`)(1,`input`,21),W(`change`,function(){let t=D(e).$implicit;return O(G().filter.set(t))}),z(),J(2),z()}if(e&2){let e=t.$implicit,n=G();j(),L(`value`,e)(`checked`,e===n.filter()),j(),X(` `,e,` `)}}function VV(e,t){if(e&1&&(R(0,`span`,26),J(1),z()),e&2){let e=G().$implicit;M(`data-tone`,e.outcome===`ran`?``:`bad`),j(),Y(e.outcome)}}function HV(e,t){if(e&1&&(R(0,`span`,26),J(1),z()),e&2){let e=G().$implicit;j(),X(`×`,e.count)}}function UV(e,t){if(e&1&&(R(0,`span`,26),J(1),z()),e&2){let e=G().$implicit;j(),Y(e.origin)}}function WV(e,t){if(e&1&&(R(0,`span`,26),J(1),z()),e&2){let e=G().$implicit;M(`data-tone`,e.ms>1e3?`warn`:``),j(),X(`pending `,e.ms,`ms`)}}function GV(e,t){if(e&1&&(R(0,`span`,26),J(1),z()),e&2){let e=G().$implicit;M(`data-tone`,e.renders>20?`warn`:``),j(),Z(``,e.renders,` renders: `,(e.rendered??mv(3,LV)).join(`, `))}}function KV(e,t){if(e&1&&(R(0,`span`,29),J(1),z(),R(2,`span`,30),J(3,`→`),z(),R(4,`span`,9),J(5,`changed to`),z()),e&2){let e=G(2).$implicit;j(),Y(e.prev)}}function qV(e,t){if(e&1&&(R(0,`div`,27),N(1,KV,6,1),J(2),z()),e&2){let e=G().$implicit;j(),P(e.prev===void 0?-1:1),j(),X(` `,e.detail,` `)}}function JV(e,t){if(e&1&&(R(0,`span`,28),J(1),z()),e&2){let e=G().$implicit;j(),X(`from `,e.caller)}}function YV(e,t){if(e&1&&(R(0,`li`)(1,`time`),J(2),z(),R(3,`div`,22)(4,`div`,23)(5,`code`,24),J(6),z(),R(7,`span`,25),J(8),z(),N(9,VV,2,2,`span`,26),N(10,HV,2,1,`span`,26),N(11,UV,2,1,`span`,26),N(12,WV,2,2,`span`,26),N(13,GV,2,4,`span`,26),z(),N(14,qV,3,2,`div`,27),N(15,JV,2,1,`span`,28),z()()),e&2){let e=t.$implicit,n=G(2);M(`data-type`,e.type),j(),M(`datetime`,n.iso(e.timestamp)),j(),Y(n.time(e.timestamp)),j(4),Y(e.path||`(form)`),j(2),Y(e.type),j(),P(e.outcome?9:-1),j(),P(e.count&&e.count>1?10:-1),j(),P(e.origin?11:-1),j(),P(e.ms===void 0?-1:12),j(),P(e.renders?13:-1),j(),P(e.prev!==void 0||e.detail?14:-1),j(),P(e.caller?15:-1)}}function XV(e,t){if(e&1&&(R(0,`ol`,19),F(1,YV,16,12,`li`,null,RV),z()),e&2){let e=G();j(),I(e.shown())}}function ZV(e,t){if(e&1){let e=U();R(0,`div`,20)(1,`p`,31),J(2,`No events match these filters`),z(),R(3,`p`),J(4,`Change the path, type or origin, or interact with the form to record more.`),z(),R(5,`button`,32),W(`click`,function(){return D(e),O(G().clearFilters())}),J(6,`Clear filters`),z()()}}function QV(e,t){e&1&&(R(0,`div`,20)(1,`p`,31),J(2,`No changes yet`),z(),R(3,`p`),J(4,`Type into the form to see them here.`),z()())}var $V=[`all`,`user`,`code`,`agent`,`devtools`],eH=[`value`,`status`,`touched`,`dirty`,`submit`,`reset`,`added`,`removed`,`moved`,`validators`],tH=class e{events=$.required();recording=$(!1);record=Rv();toggle(e){let t=e.target;t.checked=this.recording(),this.record.emit(!this.recording())}origins=$V;filter=A(`all`);pathFilter=A(``);typeFilter=A(`all`);pathInput=Jv(`pathInput`);typeOptions=Q(()=>{let e=new Set(this.events().map(e=>e.type)),t=this.typeFilter();t&&t!==`all`&&e.add(t);let n=eH.filter(t=>e.has(t)),r=[...e].filter(e=>!eH.includes(e)).sort();return[{value:`all`,label:`All types`},...[...n,...r].map(e=>({value:e,label:e}))]});matching=Q(()=>{let e=this.filter(),t=this.typeFilter()??`all`,n=this.pathFilter().trim().toLowerCase();return this.events().filter(r=>(e===`all`||r.origin===e)&&(t===`all`||r.type===t)&&(!n||r.path.toLowerCase().includes(n)))});shown=Q(()=>this.matching().slice(-100).reverse());filtered=Q(()=>this.filter()!==`all`||(this.typeFilter()??`all`)!==`all`||!!this.pathFilter().trim());summary=Q(()=>{let e=this.events().length,t=this.matching().length,n=e=>e===1?`event`:`events`,r=this.filtered()?` matching ${n(t)}`:` ${n(t)}`;return t>100?`Showing the latest 100 of ${t}${r}`:this.filtered()?`${t} of ${e} ${n(e)}`:`${e} ${n(e)}`});filterStatus=Q(()=>(this.filter(),this.typeFilter(),this.pathFilter(),Nv(()=>this.summary())));clearFilters(){this.pathFilter.set(``),this.typeFilter.set(`all`),this.filter.set(`all`),this.pathInput()?.nativeElement.focus()}iso(e){return new Date(e).toISOString()}time=tO;static ɵfac=function(t){return new(t||e)};static ɵcmp=Gh({type:e,selectors:[[`app-forms-timeline`]],viewQuery:function(e,t){e&1&&l_(t.pathInput,IV,5),e&2&&u_()},inputs:{events:[1,`events`],recording:[1,`recording`]},outputs:{record:`record`},decls:29,vars:10,consts:[[`pathInput`,``],[1,`toolbar`],[1,`record`],[`type`,`checkbox`,3,`change`,`checked`],[1,`record-text`],[1,`record-title`],[`aria-hidden`,`true`,1,`rec-dot`],[1,`record-hint`],[1,`chips`],[1,`sr-only`],[1,`filters`],[1,`search`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`,1,`search-icon`],[`cx`,`11`,`cy`,`11`,`r`,`7`],[`d`,`m20 20-3.5-3.5`],[`type`,`search`,`placeholder`,`Filter by field path…`,`aria-label`,`Filter by field path`,`autocomplete`,`off`,`spellcheck`,`false`,3,`input`,`keydown.escape`,`value`],[`ariaLabel`,`Event type`,3,`valueChange`,`options`,`value`],[1,`total`],[`role`,`status`,1,`sr-only`],[1,`events`],[1,`empty-state`],[`type`,`radio`,`name`,`timeline-origin`,3,`change`,`value`,`checked`],[1,`body`],[1,`line`],[1,`path`],[1,`event-type`],[1,`tag`],[1,`detail`],[1,`caller`],[1,`prev`],[`aria-hidden`,`true`,1,`arrow`],[1,`empty-title`],[`type`,`button`,1,`small`,3,`click`]],template:function(e,t){if(e&1){let e=U();R(0,`div`,1)(1,`label`,2)(2,`input`,3),W(`change`,function(e){return t.toggle(e)}),z(),R(3,`span`,4)(4,`span`,5),N(5,zV,1,0,`span`,6),J(6,` Record details `),z(),R(7,`span`,7),J(8,`Record calling code, validator changes and renders per keystroke`),z()()(),R(9,`fieldset`,8)(10,`legend`,9),J(11,`Show changes from`),z(),F(12,BV,3,3,`label`,null,kg),z()(),R(14,`div`,10)(15,`div`,11),k(),R(16,`svg`,12),B(17,`circle`,13)(18,`path`,14),z(),hs(),R(19,`input`,15,0),W(`input`,function(e){return t.pathFilter.set(e.target.value)})(`keydown.escape`,function(){return t.pathFilter.set(``)}),z()(),R(21,`app-select`,16),cv(`valueChange`,function(n){return D(e),sv(t.typeFilter,n)||(t.typeFilter=n),O(n)}),z(),R(22,`span`,17),J(23),z(),R(24,`span`,18),J(25),z()(),N(26,XV,3,0,`ol`,19)(27,ZV,7,0,`div`,20)(28,QV,5,0,`div`,20)}e&2&&(j(),q(`on`,t.recording()),j(),L(`checked`,t.recording()),j(3),P(t.recording()?5:-1),j(7),I(t.origins),j(7),L(`value`,t.pathFilter()),j(2),L(`options`,t.typeOptions()),ov(`value`,t.typeFilter),j(2),Y(t.summary()),j(2),Y(t.filterStatus()),j(),P(t.shown().length?26:t.events().length?27:28))},dependencies:[qD],styles:[`.muted[_ngcontent-%COMP%] { +}`]})},zV=[`pathInput`],BV=()=>[],VV=(e,t)=>t.formId+`#`+t.seq;function HV(e,t){e&1&&B(0,`span`,6)}function UV(e,t){if(e&1){let e=U();R(0,`label`)(1,`input`,21),W(`change`,function(){let t=D(e).$implicit;return O(G().filter.set(t))}),z(),J(2),z()}if(e&2){let e=t.$implicit,n=G();j(),L(`value`,e)(`checked`,e===n.filter()),j(),X(` `,e,` `)}}function WV(e,t){if(e&1&&(R(0,`span`,26),J(1),z()),e&2){let e=G().$implicit;M(`data-tone`,e.outcome===`ran`?``:`bad`),j(),Y(e.outcome)}}function GV(e,t){if(e&1&&(R(0,`span`,26),J(1),z()),e&2){let e=G().$implicit;j(),X(`×`,e.count)}}function KV(e,t){if(e&1&&(R(0,`span`,26),J(1),z()),e&2){let e=G().$implicit;j(),Y(e.origin)}}function qV(e,t){if(e&1&&(R(0,`span`,26),J(1),z()),e&2){let e=G().$implicit;M(`data-tone`,e.ms>1e3?`warn`:``),j(),X(`pending `,e.ms,`ms`)}}function JV(e,t){if(e&1&&(R(0,`span`,26),J(1),z()),e&2){let e=G().$implicit;M(`data-tone`,e.renders>20?`warn`:``),j(),Z(``,e.renders,` renders: `,(e.rendered??mv(3,BV)).join(`, `))}}function YV(e,t){if(e&1&&(R(0,`span`,29),J(1),z(),R(2,`span`,30),J(3,`→`),z(),R(4,`span`,9),J(5,`changed to`),z()),e&2){let e=G(2).$implicit;j(),Y(e.prev)}}function XV(e,t){if(e&1&&(R(0,`div`,27),N(1,YV,6,1),J(2),z()),e&2){let e=G().$implicit;j(),P(e.prev===void 0?-1:1),j(),X(` `,e.detail,` `)}}function ZV(e,t){if(e&1&&(R(0,`span`,28),J(1),z()),e&2){let e=G().$implicit;j(),X(`from `,e.caller)}}function QV(e,t){if(e&1&&(R(0,`li`)(1,`time`),J(2),z(),R(3,`div`,22)(4,`div`,23)(5,`code`,24),J(6),z(),R(7,`span`,25),J(8),z(),N(9,WV,2,2,`span`,26),N(10,GV,2,1,`span`,26),N(11,KV,2,1,`span`,26),N(12,qV,2,2,`span`,26),N(13,JV,2,4,`span`,26),z(),N(14,XV,3,2,`div`,27),N(15,ZV,2,1,`span`,28),z()()),e&2){let e=t.$implicit,n=G(2);M(`data-type`,e.type),j(),M(`datetime`,n.iso(e.timestamp)),j(),Y(n.time(e.timestamp)),j(4),Y(e.path||`(form)`),j(2),Y(e.type),j(),P(e.outcome?9:-1),j(),P(e.count&&e.count>1?10:-1),j(),P(e.origin?11:-1),j(),P(e.ms===void 0?-1:12),j(),P(e.renders?13:-1),j(),P(e.prev!==void 0||e.detail?14:-1),j(),P(e.caller?15:-1)}}function $V(e,t){if(e&1&&(R(0,`ol`,19),F(1,QV,16,12,`li`,null,VV),z()),e&2){let e=G();j(),I(e.shown())}}function eH(e,t){if(e&1){let e=U();R(0,`div`,20)(1,`p`,31),J(2,`No events match these filters`),z(),R(3,`p`),J(4,`Change the path, type or origin, or interact with the form to record more.`),z(),R(5,`button`,32),W(`click`,function(){return D(e),O(G().clearFilters())}),J(6,`Clear filters`),z()()}}function tH(e,t){e&1&&(R(0,`div`,20)(1,`p`,31),J(2,`No changes yet`),z(),R(3,`p`),J(4,`Type into the form to see them here.`),z()())}var nH=[`all`,`user`,`code`,`agent`,`devtools`],rH=[`value`,`status`,`touched`,`dirty`,`submit`,`reset`,`added`,`removed`,`moved`,`validators`],iH=class e{events=$.required();recording=$(!1);record=Rv();toggle(e){let t=e.target;t.checked=this.recording(),this.record.emit(!this.recording())}origins=nH;filter=A(`all`);pathFilter=A(``);typeFilter=A(`all`);pathInput=Jv(`pathInput`);typeOptions=Q(()=>{let e=new Set(this.events().map(e=>e.type)),t=this.typeFilter();t&&t!==`all`&&e.add(t);let n=rH.filter(t=>e.has(t)),r=[...e].filter(e=>!rH.includes(e)).sort();return[{value:`all`,label:`All types`},...[...n,...r].map(e=>({value:e,label:e}))]});matching=Q(()=>{let e=this.filter(),t=this.typeFilter()??`all`,n=this.pathFilter().trim().toLowerCase();return this.events().filter(r=>(e===`all`||r.origin===e)&&(t===`all`||r.type===t)&&(!n||r.path.toLowerCase().includes(n)))});shown=Q(()=>this.matching().slice(-100).reverse());filtered=Q(()=>this.filter()!==`all`||(this.typeFilter()??`all`)!==`all`||!!this.pathFilter().trim());summary=Q(()=>{let e=this.events().length,t=this.matching().length,n=e=>e===1?`event`:`events`,r=this.filtered()?` matching ${n(t)}`:` ${n(t)}`;return t>100?`Showing the latest 100 of ${t}${r}`:this.filtered()?`${t} of ${e} ${n(e)}`:`${e} ${n(e)}`});filterStatus=Q(()=>(this.filter(),this.typeFilter(),this.pathFilter(),Nv(()=>this.summary())));clearFilters(){this.pathFilter.set(``),this.typeFilter.set(`all`),this.filter.set(`all`),this.pathInput()?.nativeElement.focus()}iso(e){return new Date(e).toISOString()}time=tO;static ɵfac=function(t){return new(t||e)};static ɵcmp=Gh({type:e,selectors:[[`app-forms-timeline`]],viewQuery:function(e,t){e&1&&l_(t.pathInput,zV,5),e&2&&u_()},inputs:{events:[1,`events`],recording:[1,`recording`]},outputs:{record:`record`},decls:29,vars:10,consts:[[`pathInput`,``],[1,`toolbar`],[1,`record`],[`type`,`checkbox`,3,`change`,`checked`],[1,`record-text`],[1,`record-title`],[`aria-hidden`,`true`,1,`rec-dot`],[1,`record-hint`],[1,`chips`],[1,`sr-only`],[1,`filters`],[1,`search`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`,1,`search-icon`],[`cx`,`11`,`cy`,`11`,`r`,`7`],[`d`,`m20 20-3.5-3.5`],[`type`,`search`,`placeholder`,`Filter by field path…`,`aria-label`,`Filter by field path`,`autocomplete`,`off`,`spellcheck`,`false`,3,`input`,`keydown.escape`,`value`],[`ariaLabel`,`Event type`,3,`valueChange`,`options`,`value`],[1,`total`],[`role`,`status`,1,`sr-only`],[1,`events`],[1,`empty-state`],[`type`,`radio`,`name`,`timeline-origin`,3,`change`,`value`,`checked`],[1,`body`],[1,`line`],[1,`path`],[1,`event-type`],[1,`tag`],[1,`detail`],[1,`caller`],[1,`prev`],[`aria-hidden`,`true`,1,`arrow`],[1,`empty-title`],[`type`,`button`,1,`small`,3,`click`]],template:function(e,t){if(e&1){let e=U();R(0,`div`,1)(1,`label`,2)(2,`input`,3),W(`change`,function(e){return t.toggle(e)}),z(),R(3,`span`,4)(4,`span`,5),N(5,HV,1,0,`span`,6),J(6,` Record details `),z(),R(7,`span`,7),J(8,`Record calling code, validator changes and renders per keystroke`),z()()(),R(9,`fieldset`,8)(10,`legend`,9),J(11,`Show changes from`),z(),F(12,UV,3,3,`label`,null,kg),z()(),R(14,`div`,10)(15,`div`,11),k(),R(16,`svg`,12),B(17,`circle`,13)(18,`path`,14),z(),hs(),R(19,`input`,15,0),W(`input`,function(e){return t.pathFilter.set(e.target.value)})(`keydown.escape`,function(){return t.pathFilter.set(``)}),z()(),R(21,`app-select`,16),cv(`valueChange`,function(n){return D(e),sv(t.typeFilter,n)||(t.typeFilter=n),O(n)}),z(),R(22,`span`,17),J(23),z(),R(24,`span`,18),J(25),z()(),N(26,$V,3,0,`ol`,19)(27,eH,7,0,`div`,20)(28,tH,5,0,`div`,20)}e&2&&(j(),q(`on`,t.recording()),j(),L(`checked`,t.recording()),j(3),P(t.recording()?5:-1),j(7),I(t.origins),j(7),L(`value`,t.pathFilter()),j(2),L(`options`,t.typeOptions()),ov(`value`,t.typeFilter),j(2),Y(t.summary()),j(2),Y(t.filterStatus()),j(),P(t.shown().length?26:t.events().length?27:28))},dependencies:[qD],styles:[`.muted[_ngcontent-%COMP%] { color: var(--%NS%text-2); } @@ -9662,7 +9686,7 @@ time[_ngcontent-%COMP%] { justify-content: center; padding: 0 8px; } -}`]})},nH=(e,t)=>t.path;function rH(e,t){e&1&&(V(0,`span`,6),J(1,`duplicate name`),H())}function iH(e,t){if(e&1&&(V(0,`p`,7),J(1),H()),e&2){let e=G();j(),Y(e.description)}}function aH(e,t){if(e&1&&(V(0,`p`,8),J(1),H()),e&2){let e=G();j(),Y(e.error)}}function oH(e,t){if(e&1&&(V(0,`li`)(1,`code`),J(2),H(),J(3),H()),e&2){let e=t.$implicit;j(2),Y(e.path),j(),X(` is `,e.reason,` `)}}function sH(e,t){if(e&1&&(V(0,`div`,9)(1,`p`,10),J(2,`Angular could not infer an input schema. These fields block it:`),H(),V(3,`ul`),F(4,oH,4,2,`li`,null,nH),H()()),e&2){let e=G();j(4),I(e.blocking)}}function cH(e,t){e&1&&(V(0,`span`,12),J(1,`required`),H())}function lH(e,t){if(e&1&&(V(0,`li`)(1,`code`),J(2),H(),N(3,cH,2,0,`span`,12),H()),e&2){let e=t.$implicit,n=G(3);j(2),Y(e),j(),P(n.isRequired(e)?3:-1)}}function uH(e,t){if(e&1&&(V(0,`div`,9)(1,`p`,10),J(2,`Inputs`),H(),V(3,`ul`,11),F(4,lH,4,2,`li`,null,kg),H()()),e&2){let e=G();j(4),I(e.inputs)}}function dH(e,t){if(e&1&&(V(0,`li`)(1,`code`),J(2),H(),J(3),H()),e&2){let e=t.$implicit;j(2),Y(e.path),j(),X(` is now `,e.now?`required`:`optional`,` `)}}function fH(e,t){if(e&1&&(V(0,`div`,9)(1,`p`,10),J(2,` Required changed since registration. Angular reads it once, so agents still see the old schema: `),H(),V(3,`ul`),F(4,dH,4,2,`li`,null,nH),H()()),e&2){let e=G();j(4),I(e.requiredChanged)}}function pH(e,t){if(e&1&&(V(0,`span`,10),J(1),H()),e&2){let e=G().$implicit;j(),X(``,e.ms,` ms`)}}function mH(e,t){if(e&1&&(V(0,`span`,10),J(1),H()),e&2){let e=G().$implicit;j(),X(`fields `,e.fields.join(`, `))}}function hH(e,t){if(e&1&&(V(0,`pre`,13),J(1),H()),e&2){let e=G().$implicit;j(),Y(e.detail)}}function gH(e,t){if(e&1&&(V(0,`li`)(1,`time`),J(2),xv(3,`date`),H(),V(4,`span`,5),J(5),H(),N(6,pH,2,1,`span`,10),N(7,mH,2,1,`span`,10),N(8,hH,2,1,`pre`,13),H()),e&2){let e=t.$implicit,n=G(3);j(),M(`datetime`,n.iso(e.at)),j(),Y(wv(3,7,e.at,`HH:mm:ss`)),j(2),M(`data-state`,e.outcome),j(),Y(n.outcome(e.outcome)),j(),P(e.ms===void 0?-1:6),j(),P(e.fields?.length?7:-1),j(),P(e.detail?8:-1)}}function _H(e,t){if(e&1&&(V(0,`ul`),F(1,gH,9,10,`li`,null,Og),H()),e&2){let e=G();j(),I(e.calls)}}function vH(e,t){e&1&&(V(0,`p`,10),J(1,` Calls are not recorded for a tool registered before the inspector attached. `),H())}function yH(e,t){e&1&&(V(0,`p`,10),J(1,`No agent has called this tool since the inspector attached.`),H())}function bH(e,t){if(e&1&&(V(0,`section`,0)(1,`div`,2)(2,`h3`,3),J(3,`WebMCP tool`),H(),V(4,`code`,4),J(5),H(),V(6,`span`,5),J(7),H(),N(8,rH,2,0,`span`,6),H(),N(9,iH,2,1,`p`,7),N(10,aH,2,1,`p`,8),N(11,sH,6,0,`div`,9),N(12,uH,6,0,`div`,9),N(13,fH,6,0,`div`,9),V(14,`div`,9)(15,`p`,10),J(16,`Recent calls`),H(),N(17,_H,3,0,`ul`)(18,vH,2,0,`p`,10)(19,yH,2,0,`p`,10),H()()),e&2){let e=t,n=G();j(5),Y(e.name),j(),M(`data-state`,e.status),j(),Y(n.statusText()),j(),P(e.duplicate?8:-1),j(),P(e.description?9:-1),j(),P(e.status===`failed`&&e.error&&e.error!==`schema`?10:-1),j(),P(e.blocking?.length?11:-1),j(),P(e.inputs?.length?12:-1),j(),P(e.requiredChanged?.length?13:-1),j(4),P(e.calls?.length?17:e.seen===`list`?18:19)}}function xH(e,t){e&1&&(V(0,`p`,1),J(1,` This app uses `),V(2,`code`),J(3,`provideExperimentalWebMcpForms()`),H(),J(4,`, but the browser has no `),V(5,`code`),J(6,`modelContext`),H(),J(7,`, so Angular registers no WebMCP tool for this form. `),H())}var SH={running:`running`,submitted:`submitted`,failed:`submit failed`,done:`done`,threw:`threw`},CH=class e{tool=$();page=$();signalForm=$(!1);statusText=Q(()=>{let e=this.tool();return e?e.status===`failed`?`not registered`:e.status===`registering`?`registering`:e.seen===`list`?`registered before the inspector attached`:`registered`:``});noModelContext=Q(()=>{let e=this.page();return this.signalForm()&&!!e&&!e.modelContext&&!!e.provided});isRequired(e){let t=e.slice(0,e.lastIndexOf(`:`));return this.tool()?.required?.includes(t)??!1}outcome(e){return SH[e]??e}iso(e){return new Date(e).toISOString()}static ɵfac=function(t){return new(t||e)};static ɵcmp=Gh({type:e,selectors:[[`app-forms-webmcp`]],inputs:{tool:[1,`tool`],page:[1,`page`],signalForm:[1,`signalForm`]},decls:2,vars:1,consts:[[`aria-labelledby`,`forms-webmcp-title`,1,`webmcp`],[1,`note`],[1,`head`],[`id`,`forms-webmcp-title`,1,`section-label`],[1,`name`],[1,`state`],[`data-state`,`failed`,1,`state`],[1,`description`],[1,`problem`],[1,`group`],[1,`muted`],[1,`inputs`],[1,`tag`],[1,`detail`]],template:function(e,t){if(e&1&&N(0,bH,20,10,`section`,0)(1,xH,8,0,`p`,1),e&2){let e;P((e=t.tool())?0:t.noModelContext()?1:-1,e)}},dependencies:[mb],styles:[`[_nghost-%COMP%] { +}`]})},aH=(e,t)=>t.path;function oH(e,t){e&1&&(V(0,`span`,6),J(1,`duplicate name`),H())}function sH(e,t){if(e&1&&(V(0,`p`,7),J(1),H()),e&2){let e=G();j(),Y(e.description)}}function cH(e,t){if(e&1&&(V(0,`p`,8),J(1),H()),e&2){let e=G();j(),Y(e.error)}}function lH(e,t){if(e&1&&(V(0,`li`)(1,`code`),J(2),H(),J(3),H()),e&2){let e=t.$implicit;j(2),Y(e.path),j(),X(` is `,e.reason,` `)}}function uH(e,t){if(e&1&&(V(0,`div`,9)(1,`p`,10),J(2,`Angular could not infer an input schema. These fields block it:`),H(),V(3,`ul`),F(4,lH,4,2,`li`,null,aH),H()()),e&2){let e=G();j(4),I(e.blocking)}}function dH(e,t){e&1&&(V(0,`span`,12),J(1,`required`),H())}function fH(e,t){if(e&1&&(V(0,`li`)(1,`code`),J(2),H(),N(3,dH,2,0,`span`,12),H()),e&2){let e=t.$implicit,n=G(3);j(2),Y(e),j(),P(n.isRequired(e)?3:-1)}}function pH(e,t){if(e&1&&(V(0,`div`,9)(1,`p`,10),J(2,`Inputs`),H(),V(3,`ul`,11),F(4,fH,4,2,`li`,null,kg),H()()),e&2){let e=G();j(4),I(e.inputs)}}function mH(e,t){if(e&1&&(V(0,`li`)(1,`code`),J(2),H(),J(3),H()),e&2){let e=t.$implicit;j(2),Y(e.path),j(),X(` is now `,e.now?`required`:`optional`,` `)}}function hH(e,t){if(e&1&&(V(0,`div`,9)(1,`p`,10),J(2,` Required changed since registration. Angular reads it once, so agents still see the old schema: `),H(),V(3,`ul`),F(4,mH,4,2,`li`,null,aH),H()()),e&2){let e=G();j(4),I(e.requiredChanged)}}function gH(e,t){if(e&1&&(V(0,`span`,10),J(1),H()),e&2){let e=G().$implicit;j(),X(``,e.ms,` ms`)}}function _H(e,t){if(e&1&&(V(0,`span`,10),J(1),H()),e&2){let e=G().$implicit;j(),X(`fields `,e.fields.join(`, `))}}function vH(e,t){if(e&1&&(V(0,`pre`,13),J(1),H()),e&2){let e=G().$implicit;j(),Y(e.detail)}}function yH(e,t){if(e&1&&(V(0,`li`)(1,`time`),J(2),xv(3,`date`),H(),V(4,`span`,5),J(5),H(),N(6,gH,2,1,`span`,10),N(7,_H,2,1,`span`,10),N(8,vH,2,1,`pre`,13),H()),e&2){let e=t.$implicit,n=G(3);j(),M(`datetime`,n.iso(e.at)),j(),Y(wv(3,7,e.at,`HH:mm:ss`)),j(2),M(`data-state`,e.outcome),j(),Y(n.outcome(e.outcome)),j(),P(e.ms===void 0?-1:6),j(),P(e.fields?.length?7:-1),j(),P(e.detail?8:-1)}}function bH(e,t){if(e&1&&(V(0,`ul`),F(1,yH,9,10,`li`,null,Og),H()),e&2){let e=G();j(),I(e.calls)}}function xH(e,t){e&1&&(V(0,`p`,10),J(1,` Calls are not recorded for a tool registered before the inspector attached. `),H())}function SH(e,t){e&1&&(V(0,`p`,10),J(1,`No agent has called this tool since the inspector attached.`),H())}function CH(e,t){if(e&1&&(V(0,`section`,0)(1,`div`,2)(2,`h3`,3),J(3,`WebMCP tool`),H(),V(4,`code`,4),J(5),H(),V(6,`span`,5),J(7),H(),N(8,oH,2,0,`span`,6),H(),N(9,sH,2,1,`p`,7),N(10,cH,2,1,`p`,8),N(11,uH,6,0,`div`,9),N(12,pH,6,0,`div`,9),N(13,hH,6,0,`div`,9),V(14,`div`,9)(15,`p`,10),J(16,`Recent calls`),H(),N(17,bH,3,0,`ul`)(18,xH,2,0,`p`,10)(19,SH,2,0,`p`,10),H()()),e&2){let e=t,n=G();j(5),Y(e.name),j(),M(`data-state`,e.status),j(),Y(n.statusText()),j(),P(e.duplicate?8:-1),j(),P(e.description?9:-1),j(),P(e.status===`failed`&&e.error&&e.error!==`schema`?10:-1),j(),P(e.blocking?.length?11:-1),j(),P(e.inputs?.length?12:-1),j(),P(e.requiredChanged?.length?13:-1),j(4),P(e.calls?.length?17:e.seen===`list`?18:19)}}function wH(e,t){e&1&&(V(0,`p`,1),J(1,` This app uses `),V(2,`code`),J(3,`provideExperimentalWebMcpForms()`),H(),J(4,`, but the browser has no `),V(5,`code`),J(6,`modelContext`),H(),J(7,`, so Angular registers no WebMCP tool for this form. `),H())}var TH={running:`running`,submitted:`submitted`,failed:`submit failed`,done:`done`,threw:`threw`},EH=class e{tool=$();page=$();signalForm=$(!1);statusText=Q(()=>{let e=this.tool();return e?e.status===`failed`?`not registered`:e.status===`registering`?`registering`:e.seen===`list`?`registered before the inspector attached`:`registered`:``});noModelContext=Q(()=>{let e=this.page();return this.signalForm()&&!!e&&!e.modelContext&&!!e.provided});isRequired(e){let t=e.slice(0,e.lastIndexOf(`:`));return this.tool()?.required?.includes(t)??!1}outcome(e){return TH[e]??e}iso(e){return new Date(e).toISOString()}static ɵfac=function(t){return new(t||e)};static ɵcmp=Gh({type:e,selectors:[[`app-forms-webmcp`]],inputs:{tool:[1,`tool`],page:[1,`page`],signalForm:[1,`signalForm`]},decls:2,vars:1,consts:[[`aria-labelledby`,`forms-webmcp-title`,1,`webmcp`],[1,`note`],[1,`head`],[`id`,`forms-webmcp-title`,1,`section-label`],[1,`name`],[1,`state`],[`data-state`,`failed`,1,`state`],[1,`description`],[1,`problem`],[1,`group`],[1,`muted`],[1,`inputs`],[1,`tag`],[1,`detail`]],template:function(e,t){if(e&1&&N(0,CH,20,10,`section`,0)(1,wH,8,0,`p`,1),e&2){let e;P((e=t.tool())?0:t.noModelContext()?1:-1,e)}},dependencies:[mb],styles:[`[_nghost-%COMP%] { display: contents; } @@ -9782,7 +9806,7 @@ li[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] + *[_ngcontent-%COMP%] { font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; -}`]})},wH=()=>[],TH=(e,t)=>t.id,EH=(e,t)=>t.node.path;function DH(e,t){e&1&&(R(0,`div`,1),B(1,`span`,5),R(2,`p`),J(3,`Connecting to the devtools server…`),z()())}function OH(e,t){if(e&1){let e=U();R(0,`div`,2)(1,`p`,6),J(2,`Could not load forms`),z(),R(3,`p`,7),J(4,` The devtools server did not answer. Check that the app is running, then try again. `),z(),R(5,`button`,8),W(`click`,function(){return D(e),O(G().retry())}),J(6,`Try again`),z()()}}function kH(e,t){e&1&&(R(0,`div`,1),B(1,`span`,5),R(2,`p`),J(3,`Loading forms…`),z()())}function AH(e,t){e&1&&(R(0,`div`,3)(1,`p`,6),J(2,`No forms on the page yet`),z(),R(3,`p`,7),J(4,` Open a page that renders a form. Signal Forms, reactive and template-driven forms all show up here, in development builds. `),z()())}function jH(e,t){if(e&1){let e=U();R(0,`div`,3)(1,`p`,6),J(2,`No forms on this page`),z(),R(3,`p`,7),J(4),z(),R(5,`button`,8),W(`click`,function(){return D(e),O(G().allPages.set(!0))}),J(6,` Show forms from all pages `),z()()}if(e&2){let e=G();j(4),Z(` Other connected tabs report `,e.forms().length,` `,e.forms().length===1?`form`:`forms`,`. `)}}function MH(e,t){if(e&1){let e=U();R(0,`label`,12)(1,`input`,16),W(`change`,function(t){return D(e),O(G(2).allPages.set(t.target.checked))}),z(),J(2,` All pages `),z()}if(e&2){let e=G(2);j(),L(`checked`,e.allPages())}}function NH(e,t){e&1&&(R(0,`span`,23),J(1),R(2,`span`,22),J(3,` errors`),z()()),e&2&&(j(),Y(t))}function PH(e,t){if(e&1){let e=U();R(0,`li`)(1,`button`,17),W(`click`,function(){let t=D(e).$implicit;return O(G(2).selectForm(t.id))}),B(2,`span`,18),R(3,`span`,19),J(4),z(),R(5,`span`,20),J(6),R(7,`span`,21),J(8),z(),R(9,`span`,22),J(10),z()(),N(11,NH,4,1,`span`,23),z()()}if(e&2){let e,n=t.$implicit,r=G(2);j(),q(`active`,n.id===r.selected()?.id),M(`aria-current`,n.id===r.selected()?.id?`true`:null),j(),M(`data-status`,n.root.status),j(),M(`title`,n.label),j(),Y(n.label),j(2),X(``,r.kindLabel(n.kind),` · `),j(2),Y(n.id),j(2),X(`, `,n.root.status),j(),P((e=r.counts().get(n.id)?.errors)?11:-1,e)}}function FH(e,t){if(e&1){let e=U();R(0,`section`,14)(1,`h2`,24),J(2),z(),R(3,`p`,25),J(4,` This form is no longer on the page. It comes back here if the page renders it again. `),z(),R(5,`button`,8),W(`click`,function(){D(e);let t=G(2);return O(t.selectForm(t.visible()[0].id))}),J(6),z()()}if(e&2){let e=G(2);j(2),Y(t),j(4),X(` Show `,e.visible()[0].label,` `)}}function IH(e,t){if(e&1){let e=U();R(0,`section`,14)(1,`h2`,24),J(2),z(),R(3,`p`,7),J(4,`This form is on another page. Tick "All pages" to see it again.`),z(),R(5,`button`,8),W(`click`,function(){return D(e),O(G(2).allPages.set(!0))}),J(6,` Show forms from all pages `),z()()}e&2&&(j(2),Y(t))}function LH(e,t){if(e&1&&(R(0,`span`),J(1),z()),e&2){let e=G();j(),Y(e.submitted?`submitted`:`not submitted`)}}function RH(e,t){e&1&&(R(0,`span`),J(1,`submitting`),z())}function zH(e,t){if(e&1){let e=U();R(0,`li`)(1,`button`,47),W(`click`,function(){let t=D(e).$implicit;return O(G(4).showField(t.path))}),R(2,`span`,22),J(3,`Show field `),z(),R(4,`code`),J(5),z(),R(6,`span`,22),J(7,`:`),z(),J(8),R(9,`code`,48),J(10),z()()()}if(e&2){let e=t.$implicit;j(5),Y(e.path||`(form)`),j(3),X(` `,e.message,` `),j(2),Y(e.kind)}}function BH(e,t){if(e&1&&(R(0,`details`,31)(1,`summary`),J(2),z(),R(3,`ul`),F(4,zH,11,3,`li`,null,Og),z()()),e&2){let e=G();j(2),X(`Error summary (`,e.errorSummary.length,`)`),j(2),I(e.errorSummary)}}function VH(e,t){if(e&1){let e=U();R(0,`button`,35),W(`click`,function(){return D(e),O(G(3).confirmAct(`restore`))}),J(1),z()}if(e&2){let e=G(3);q(`armed`,e.armed()===`restore`),L(`disabled`,!e.canWrite()),M(`aria-describedby`,e.canWrite()?null:`forms-writes-off`)(`title`,`Restore `+e.snapshot()),j(),X(` `,e.armed()===`restore`?`Confirm restore`:`Restore `+e.snapshot(),` `)}}function HH(e,t){if(e&1&&(R(0,`p`,41),J(1),z()),e&2){let e=G(3);j(),Y(e.writesOff)}}function UH(e,t){if(e&1){let e=U();R(0,`button`,49),W(`click`,function(){let t=D(e).$implicit;return O(G(3).tab_.set(t.id))}),J(1),z()}if(e&2){let e=t.$implicit,n=G(3);L(`id`,`forms-tab-`+e.id),M(`aria-selected`,e.id===n.tab_())(`aria-controls`,`forms-panel-`+e.id)(`tabindex`,e.id===n.tab_()?0:-1),j(),X(` `,e.label,` `)}}function WH(e,t){if(e&1){let e=U();R(0,`label`)(1,`input`,16),W(`change`,function(){let t=D(e).$implicit;return O(G(4).toggleChip(t.id))}),z(),J(2),z()}if(e&2){let e=t.$implicit,n=G(4);j(),L(`checked`,n.active().has(e.id)),j(),X(` `,e.label,` `)}}function GH(e,t){if(e&1&&(R(0,`div`,7),J(1,` typed `),R(2,`code`),J(3),xv(4,`json`),z(),J(5,`, not in the model yet `),z()),e&2){let e=G(2).$implicit;j(3),Y(Cv(4,1,e.node.uncommitted))}}function KH(e,t){if(e&1&&(R(0,`div`,7),J(1,` resets to `),R(2,`code`),J(3),xv(4,`json`),z()()),e&2){let e=G(2).$implicit;j(3),Y(Cv(4,1,e.node.defaultValue))}}function qH(e,t){if(e&1&&(R(0,`code`),J(1),xv(2,`json`),z(),N(3,GH,6,3,`div`,7),N(4,KH,5,3,`div`,7)),e&2){let e=G().$implicit;j(),Y(Cv(2,3,e.node.value)),j(2),P(e.node.uncommitted===void 0?-1:3),j(),P(e.node.defaultValue===void 0?-1:4)}}function JH(e,t){e&1&&(R(0,`span`,7),J(1,`not created yet`),z())}function YH(e,t){if(e&1&&(R(0,`span`,29),J(1),z()),e&2){let e=G().$implicit;M(`data-status`,e.node.status),j(),Y(e.node.status)}}function XH(e,t){e&1&&(R(0,`span`),J(1,`touched`),z())}function ZH(e,t){if(e&1&&(R(0,`span`),J(1),z()),e&2){let e=G().$implicit;j(),Y(e.node.changed===!1?`dirty, unchanged`:`dirty`)}}function QH(e,t){if(e&1&&(R(0,`span`),J(1),z()),e&2){let e=G().$implicit;j(),X(`not validated (`,e.node.skipped,`)`)}}function $H(e,t){if(e&1&&(R(0,`span`,65),J(1),z()),e&2){let e=G().$implicit;j(),X(`stale: `,e.node.stale.join(`, `))}}function eU(e,t){e&1&&(R(0,`span`,65),J(1,`view out of sync`),z())}function tU(e,t){if(e&1&&(R(0,`span`),J(1),z()),e&2){let e=G().$implicit,t=G(4);j(),X(`redacted: `,t.redactLabel(e.node.redacted))}}function nU(e,t){e&1&&(R(0,`span`),J(1,`required`),z())}function rU(e,t){e&1&&(R(0,`span`),J(1,`readonly`),z())}function iU(e,t){e&1&&(R(0,`span`),J(1,`hidden`),z())}function aU(e,t){if(e&1&&(R(0,`span`),J(1),z()),e&2){let e=G().$implicit;j(),X(`updates on `,e.node.updateOn)}}function oU(e,t){e&1&&(R(0,`span`),J(1,`debouncing`),z())}function sU(e,t){e&1&&(R(0,`span`),J(1,`validators`),z())}function cU(e,t){e&1&&(R(0,`span`),J(1,`async validator`),z())}function lU(e,t){if(e&1&&(R(0,`span`),J(1),z()),e&2){let e=t.$implicit;j(),Y(e)}}function uU(e,t){if(e&1&&(R(0,`span`),J(1),z()),e&2){let e=G().$implicit;j(),Y(e.node.accessor)}}function dU(e,t){if(e&1&&(R(0,`span`),J(1),z()),e&2){let e=G().$implicit;j(),X(`name `,e.node.name)}}function fU(e,t){if(e&1&&(R(0,`span`),J(1),xv(2,`json`),z()),e&2){let e=t.$implicit;j(),X(`metadata `,Cv(2,1,e))}}function pU(e,t){if(e&1&&(R(0,`span`),J(1),z()),e&2){let e=t.$implicit;j(),X(`disabled: `,e)}}function mU(e,t){if(e&1&&(R(0,`span`,68),J(1),z()),e&2){let e=G().$implicit;j(),X(`at `,e.params.path)}}function hU(e,t){if(e&1&&(R(0,`span`,68),J(1),z()),e&2){let e=G().$implicit,t=G(5);j(),Y(t.sourceText(e))}}function gU(e,t){if(e&1&&(R(0,`div`),J(1),R(2,`code`,48),J(3),z(),N(4,mU,2,1,`span`,68),N(5,hU,2,1,`span`,68),z()),e&2){let e=t.$implicit,n=G().$implicit,r=G(4);j(),X(` `,r.errorText(n.node,e),` `),j(2),Y(e.kind),j(),P(e.kind===`standardSchema`&&e.params?.path?4:-1),j(),P(e.source?5:-1)}}function _U(e,t){e&1&&(R(0,`div`,67),J(1,`not shown to the user`),z())}function vU(e,t){if(e&1&&(R(0,`tr`)(1,`td`,69),J(2),z()()),e&2){let e=G().$implicit;j(),K(`padding-left`,28+e.depth*16,`px`),j(),Z(` `,e.node.truncated,` more fields under `,e.node.path||`the form`,` not shown `)}}function yU(e,t){if(e&1){let e=U();R(0,`tr`,58),W(`mouseenter`,function(){let t=D(e).$implicit,n=G(2);return O(G(2).highlight(n.id,t.node.path))})(`mouseleave`,function(){return D(e),O(G(4).highlight(null,``))}),R(1,`th`,59)(2,`button`,60),W(`focus`,function(){let t=D(e).$implicit,n=G(2);return O(G(2).highlight(n.id,t.node.path))})(`blur`,function(){return D(e),O(G(4).highlight(null,``))})(`click`,function(){let t=D(e).$implicit;return O(G(4).toggleField(t.node.path))}),J(3),z(),R(4,`span`,61),J(5),z()(),R(6,`td`,62),N(7,qH,5,5),z(),R(8,`td`,63),N(9,JH,2,0,`span`,7)(10,YH,2,2,`span`,29),z(),R(11,`td`,64),N(12,XH,2,0,`span`),N(13,ZH,2,1,`span`),N(14,QH,2,1,`span`),N(15,$H,2,1,`span`,65),N(16,eU,2,0,`span`,65),N(17,tU,2,1,`span`),N(18,nU,2,0,`span`),N(19,rU,2,0,`span`),N(20,iU,2,0,`span`),N(21,aU,2,1,`span`),N(22,oU,2,0,`span`),N(23,sU,2,0,`span`),N(24,cU,2,0,`span`),F(25,lU,2,1,`span`,null,kg),N(27,uU,2,1,`span`),N(28,dU,2,1,`span`),F(29,fU,3,3,`span`,null,Og),F(31,pU,2,1,`span`,null,Og),z(),R(33,`td`,66),F(34,gU,6,4,`div`,null,Og),N(36,_U,2,0,`div`,67),z()(),N(37,vU,3,4,`tr`)}if(e&2){let e=t.$implicit,n=G(4);q(`invalid`,e.node.errors.length),j(),K(`padding-left`,12+e.depth*16,`px`),j(),M(`aria-label`,`Show details for `+(e.node.path||`the form`))(`aria-pressed`,e.node.path===n.fieldPath())(`title`,e.node.path||`(form)`),j(),X(` `,e.node.key||`(form)`,` `),j(2),Y(e.node.type),j(2),P(e.node.type===`control`?7:-1),j(2),P(e.node.materialized===!1?9:10),j(3),P(e.node.touched?12:-1),j(),P(e.node.dirty?13:-1),j(),P(e.node.skipped?14:-1),j(),P(e.node.stale?.length?15:-1),j(),P(e.node.dom?.drift===void 0?-1:16),j(),P(e.node.redacted?17:-1),j(),P(e.node.required?18:-1),j(),P(e.node.readonly?19:-1),j(),P(e.node.hidden?20:-1),j(),P(e.node.updateOn?21:-1),j(),P(e.node.debouncing?22:-1),j(),P(e.node.validators?.sync?23:-1),j(),P(e.node.validators?.async?24:-1),j(),I(n.constraintList(e.node)),j(2),P(e.node.accessor?27:-1),j(),P(e.node.name?28:-1),j(),I(e.node.metadata??mv(28,wH)),j(2),I(e.node.disabledReasons??mv(29,wH)),j(3),I(e.node.errors),j(2),P(e.node.errors.length&&e.node.dom?.errorShown===!1?36:-1),j(),P(e.node.truncated?37:-1)}}function bU(e,t){e&1&&J(0),e&2&&X(` No field path matches "`,G(5).filter(),`". `)}function xU(e,t){e&1&&J(0,` No field matches the selected filters. `)}function SU(e,t){if(e&1){let e=U();R(0,`button`,8),W(`click`,function(){D(e),G(2);let t=d_(2);return O(G(3).clearFilters(t))}),J(1,` Clear filters `),z()}}function CU(e,t){if(e&1&&(R(0,`tr`)(1,`td`,70)(2,`p`),N(3,bU,1,1)(4,xU,1,0),z(),N(5,SU,2,0,`button`,71),z()()),e&2){let e=G(4);j(3),P(e.filter()?3:4),j(2),P(e.filtering()?5:-1)}}function wU(e,t){if(e&1){let e=U();R(0,`app-forms-field-detail`,72),W(`closed`,function(){return D(e),O(G(4).closeField())}),z()}if(e&2){let e=G(2),n=G(2);L(`form`,e)(`node`,t)(`version`,n.version())(`rpc`,n.rpc())}}function TU(e,t){if(e&1){let e=U();R(0,`div`,50)(1,`input`,51,0),W(`input`,function(t){return D(e),O(G(3).onFilter(t))})(`keydown.escape`,function(){return D(e),O(G(3).filter.set(``))}),z(),R(3,`fieldset`,52)(4,`legend`,22),J(5,`Show only fields that are`),z(),F(6,WH,3,2,`label`,null,TH),z()(),R(8,`p`,53),J(9),z(),R(10,`div`,54)(11,`table`,55)(12,`thead`)(13,`tr`)(14,`th`,56),J(15,`Field`),z(),R(16,`th`,56),J(17,`Value`),z(),R(18,`th`,56),J(19,`Status`),z(),R(20,`th`,56),J(21,`State`),z(),R(22,`th`,56),J(23,`Errors`),z()()(),R(24,`tbody`),F(25,yU,38,30,null,null,EH,!1,CU,6,2,`tr`),z()()(),N(28,wU,1,4,`app-forms-field-detail`,57)}if(e&2){let e,t=G(3);j(),L(`value`,t.filter()),j(5),I(t.chips),j(3),Y(t.filterStatus()),j(16),I(t.rows()),j(3),P((e=t.selectedNode())?28:-1,e)}}function EU(e,t){if(e&1){let e=U();B(0,`app-limit-note`,73),R(1,`app-forms-timeline`,74),W(`record`,function(t){return D(e),O(G(3).setRecording(t))}),z()}if(e&2){let e=G(3);L(`dropped`,e.droppedEvents())(`max`,e.maxEvents()),j(),L(`events`,e.selectedEvents())(`recording`,e.recording())}}function DU(e,t){if(e&1&&B(0,`app-forms-submit`,46),e&2){let e=G(),t=G(2);L(`formId`,e.id)(`version`,t.version())(`rpc`,t.rpc())}}function OU(e,t){if(e&1){let e=U();R(0,`app-forms-lint`,75),W(`showField`,function(t){return D(e),O(G(3).showField(t))}),z()}if(e&2){let e=G(),t=G(2);L(`formId`,e.id)(`version`,t.version())(`rpc`,t.rpc())}}function kU(e,t){if(e&1){let e=U();R(0,`section`,15)(1,`div`,26)(2,`h2`,24),J(3),z(),R(4,`p`,27),J(5),R(6,`code`),J(7),z()()(),R(8,`div`,28)(9,`span`,29),J(10),z(),R(11,`span`),J(12),z(),R(13,`span`),J(14),z(),N(15,LH,2,1,`span`),N(16,RH,2,0,`span`),R(17,`span`,30)(18,`b`),J(19),z(),J(20,` fields · `),R(21,`b`),J(22),z(),J(23,` errors`),z()(),N(24,BH,6,1,`details`,31),B(25,`app-forms-webmcp`,32),R(26,`div`,33)(27,`div`,34)(28,`button`,35),W(`click`,function(){return D(e),O(G(2).act(`touch-all`))}),J(29,` Touch all `),z(),R(30,`button`,35),W(`click`,function(){return D(e),O(G(2).act(`revalidate`))}),J(31,` Revalidate `),z(),R(32,`button`,8),W(`click`,function(){return D(e),O(G(2).act(`focus-first-invalid`))}),J(33,` Focus first invalid `),z(),R(34,`button`,8),W(`click`,function(){D(e);let t=G(2);return O(t.picking()?t.cancelPick():t.pick())}),J(35),z(),B(36,`span`,36),R(37,`button`,8),W(`click`,function(){return D(e),O(G(2).act(`snapshot`))}),J(38,`Snapshot`),z(),N(39,VH,2,6,`button`,37),B(40,`span`,38),R(41,`button`,39),W(`click`,function(){return D(e),O(G(2).confirmAct(`reset`))}),J(42),z(),R(43,`button`,40),W(`click`,function(){return D(e),O(G(2).confirmAct(`submit`))}),J(44),z()(),N(45,HH,2,1,`p`,41),R(46,`p`,42),J(47),z()(),R(48,`div`,43),W(`keydown`,function(t){return D(e),O(G(2).onKey(t))}),F(49,UH,2,5,`button`,44,TH),z(),R(51,`div`,45),N(52,TU,29,4)(53,EU,2,4)(54,DU,1,3,`app-forms-submit`,46)(55,OU,1,3,`app-forms-lint`,46),z()()}if(e&2){let e,n=t,r=G(2);j(3),Y(n.label),j(2),X(` `,r.kindLabel(n.kind),` · `),j(2),Y(n.id),j(2),M(`data-status`,n.root.status),j(),Y(n.root.status),j(2),Y(n.root.dirty?`dirty`:`pristine`),j(2),Y(n.root.touched?`touched`:`untouched`),j(),P(n.submitted===void 0?-1:15),j(),P(n.root.submitting?16:-1),j(3),Y(r.counts().get(n.id)?.fields),j(2),q(`has-errors`,r.counts().get(n.id)?.errors),j(),Y(r.counts().get(n.id)?.errors),j(2),P(n.errorSummary?.length?24:-1),j(),L(`tool`,n.webMcp)(`page`,r.webMcpPage(n.id))(`signalForm`,n.kind===`signal`),j(3),L(`disabled`,!r.canWrite()),M(`aria-describedby`,r.canWrite()?null:`forms-writes-off`),j(2),L(`disabled`,!r.canWrite()),M(`aria-describedby`,r.canWrite()?null:`forms-writes-off`),j(4),q(`on`,r.picking()),M(`aria-pressed`,!!r.picking()),j(),X(` `,r.picking()?`Cancel picking`:`Pick field on page`,` `),j(4),P(r.snapshot()?39:-1),j(2),q(`armed`,r.armed()===`reset`),L(`disabled`,!r.canWrite()),M(`aria-describedby`,r.canWrite()?null:`forms-writes-off`),j(),X(` `,r.armed()===`reset`?`Confirm reset`:`Reset`,` `),j(),q(`armed`,r.armed()===`submit`),L(`disabled`,!r.canWrite()),M(`aria-describedby`,r.canWrite()?null:`forms-writes-off`),j(),X(` `,r.armed()===`submit`?`Confirm submit`:`Submit`,` `),j(),P(r.canWrite()?-1:45),j(2),Y(r.message()),j(2),I(r.tabs),j(2),L(`id`,`forms-panel-`+r.tab_()),M(`aria-labelledby`,`forms-tab-`+r.tab_()),j(),P((e=r.tab_())===`fields`?52:e===`timeline`?53:e===`submit`?54:e===`lint`?55:-1)}}function AU(e,t){if(e&1&&(R(0,`div`,4)(1,`div`,9)(2,`h2`,10),J(3,` Forms `),R(4,`span`,11),J(5),z()(),N(6,MH,3,1,`label`,12),R(7,`ul`,13),F(8,PH,12,10,`li`,null,TH),z()(),N(10,FH,7,2,`section`,14)(11,IH,7,1,`section`,14)(12,kU,56,41,`section`,15),z()),e&2){let e,t=G();j(5),Y(t.visible().length),j(),P(t.hostPageId&&(t.allPages()||t.otherPages())?6:-1),j(2),I(t.visible()),j(2),P((e=t.missing())?10:(e=t.hidden())?11:(e=t.selected())?12:-1,e)}}var jU=[{id:`fields`,label:`Fields`},{id:`timeline`,label:`Timeline`},{id:`submit`,label:`Submit`},{id:`lint`,label:`Lint`}],MU=[{id:`invalid`,label:`Invalid`},{id:`dirty`,label:`Dirty`},{id:`touched`,label:`Touched`},{id:`disabled`,label:`Disabled`},{id:`hidden-error`,label:`Error not shown`}];function NU(e,t){switch(t){case`invalid`:return e.errors.length>0;case`dirty`:return e.dirty&&e.type===`control`;case`touched`:return e.touched&&e.type===`control`;case`disabled`:return e.status===`DISABLED`;case`hidden-error`:return e.dom?.errorShown===!1}}function PU(e){return e.errors.length+(e.children??[]).reduce((e,t)=>e+PU(t),0)}function FU(e){return e.children?e.children.reduce((e,t)=>e+FU(t),0):+(e.type===`control`&&e.materialized!==!1)}var IU=class e{rpc=$(null);focus=$(null);canWrite=Q(()=>ME(this.rpc(),`forms`));redactLabel=TE;writesOff=iE(`forms`);focusHandled=Rv();forms=A([]);webMcp=A([]);events=A([]);loading=A(!0);failed=A(!1);selectedId=A(null);selectedLabel=A(null);hostPageId=fE();allPages=A(!1);visible=Q(()=>{let e=this.forms(),t=this.hostPageId;return t&&!this.allPages()?e.filter(e=>bE(e.id)===t):e});otherPages=Q(()=>this.forms().some(e=>bE(e.id)!==this.hostPageId));instrumented=A([]);recording=Q(()=>{let e=this.selected()?.id??``;return this.instrumented().some(t=>e.endsWith(`@${t}`))});filter=A(``);tabs=jU;chips=MU;tab_=A(`fields`);active=A(new Set);filtering=Q(()=>!!this.filter()||this.active().size>0);filterStatus=A(``);version=A(0);message=A(``);webMcpPage(e){let t=bE(e);return this.webMcp().find(e=>e.pageId===t)}picking=A(null);pickSeq=0;unsubscribe=null;destroyRef=T(Ts);host=T(Pl);injector=T(Cs);counts=Q(()=>new Map(this.visible().map(e=>[e.id,{fields:FU(e.root),errors:PU(e.root)}])));chosen=Q(()=>{let e=this.selectedId();if(e===null)return null;let t=this.forms(),n=this.selectedLabel(),r=bE(e);return t.find(t=>t.id===e)??t.find(e=>e.label===n&&bE(e.id)===r)??null});selected=Q(()=>{let e=this.visible();if(this.selectedId()===null)return e[0]??null;let t=this.chosen();return t&&e.includes(t)?t:null});missing=Q(()=>this.selectedId()!==null&&!this.chosen()&&this.visible().length?this.selectedLabel()??this.selectedId():null);hidden=Q(()=>{let e=this.chosen();return e&&!this.selected()&&this.visible().length?e.label:null});selectedFormId=Q(()=>this.selected()?.id??null);fieldPath=Fv({source:this.selectedFormId,computation:()=>null});armed=Fv({source:this.selectedFormId,computation:()=>null});snapshot=Fv({source:this.selectedFormId,computation:()=>null});rows=Q(()=>{let e=this.selected();if(!e)return[];let t=this.filter().toLowerCase(),n=Array.from(this.active()),r=[],i=(e,a)=>{let o=r.length,s=(!t||e.path.toLowerCase().includes(t))&&n.every(t=>NU(e,t));for(let t of e.children??[])s=i(t,a+1)||s;return s&&r.splice(o,0,{node:e,depth:a}),s};return i(e.root,0),r});selectedNode=Q(()=>{let e=this.fieldPath(),t=this.selected();if(e===null||!t)return null;let n=t=>t.path===e?t:(t.children??[]).map(n).find(Boolean)??null;return n(t.root)});dropped=A({});droppedEvents=Q(()=>{let e=this.selected()?.id;return e?this.dropped()[bE(e)]??0:0});maxEvents=Q(()=>jE(this.rpc()).limits.formTimeline);selectedEvents=Q(()=>{let e=this.selected()?.id;return this.events().filter(t=>t.formId===e)});constructor(){fc(()=>{let e=this.rpc();e&&this.load(e)}),fc(()=>{let e=this.focus();e&&Nv(()=>{this.selectForm(e.id),this.focusHandled.emit()})}),this.destroyRef.onDestroy(()=>{this.unsubscribe?.(),this.highlight(null,``)})}async load(e){this.loading.set(!0),this.failed.set(!1);try{let t=await e.scope(`pangular`).rpc.sharedState(`forms`);if(this.destroyRef.destroyed)return;let n=e=>{let t=e;this.forms.set(t?.forms??[]),this.events.set(t?.events??[]),this.instrumented.set(t?.instrumented??[]),this.dropped.set(t?.dropped??{}),this.webMcp.set(t?.webMcp??[]),this.version.update(e=>e+1)};n(t.value()),this.unsubscribe?.(),this.unsubscribe=t.on(`updated`,n)}catch{this.failed.set(!0)}finally{this.loading.set(!1)}}retry(){let e=this.rpc();e&&this.load(e)}async pick(){let e=this.selected();if(!e)return;let t=++this.pickSeq;this.picking.set(e.id),this.message.set(`Click a field in the app. Press Escape or Cancel picking to stop.`);let n=await DE(this.rpc(),{action:`pick`,formId:e.id});if(t!==this.pickSeq)return;this.picking.set(null);let r=n;if(!n.ok||!r.formId){this.message.set(OE(n));return}this.selectForm(r.formId),this.tab_.set(`fields`),this.fieldPath.set(r.path??``),this.message.set(`Picked ${r.path||`(form)`}.`)}cancelPick(){let e=this.picking();e&&DE(this.rpc(),{action:`cancel-pick`,formId:e})}async setRecording(e){let t=this.selected();if(!t)return;let n=await DE(this.rpc(),{action:`instrument`,formId:t.id,value:e});this.message.set(OE(n))}selectForm(e){this.hostPageId&&bE(e)&&bE(e)!==this.hostPageId&&this.allPages.set(!0),this.selectedId.set(e),this.selectedLabel.set(this.forms().find(t=>t.id===e)?.label??null),this.filter.set(``),this.fieldPath.set(null),this.snapshot.set(null),this.armed.set(null)}toggleField(e){this.fieldPath.update(t=>t===e?null:e)}closeField(){let e=this.host.nativeElement,t=e.querySelector(`button.field[aria-pressed="true"]`)??e.querySelector(`.table-scroll`);this.fieldPath.set(null),t?.focus()}showField(e){this.tab_.set(`fields`);let t=()=>this.rows().some(t=>t.node.path===e);t()||this.filter.set(``),t()||this.active.set(new Set),this.fieldPath.set(e),Bd(()=>{let e=this.host.nativeElement;e.querySelector(`button.field[aria-pressed="true"]`)?.scrollIntoView?.({block:`nearest`}),(e.querySelector(`#forms-field-heading`)??e.querySelector(`.table-scroll`))?.focus()},{injector:this.injector})}toggleChip(e){this.active.update(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})}async act(e,t={}){let n=this.selected();if(!n)return;this.armed.set(null);let r=await DE(this.rpc(),{action:e,formId:n.id,...t});r.snapshot&&this.selected()?.id===n.id&&this.snapshot.set(r.snapshot),this.message.set(OE(r))}confirmAct(e){if(this.armed()!==e){this.armed.set(e),this.message.set(`Press "Confirm ${e}" to ${e} the form in the app.`);return}this.act(e,{confirm:!0,snapshot:this.snapshot()??void 0})}onKey(e){let t=this.tabs.map(e=>e.id),n=t.indexOf(this.tab_()),r=n;if(e.key===`ArrowRight`)r=(n+1)%t.length;else if(e.key===`ArrowLeft`)r=(n-1+t.length)%t.length;else if(e.key===`Home`)r=0;else if(e.key===`End`)r=t.length-1;else return;e.preventDefault(),this.tab_.set(t[r]);let i=e.currentTarget;queueMicrotask(()=>i.querySelector(`#forms-tab-${t[r]}`)?.focus())}sourceText(e){let t=SE[e.source??``]??e.source??``;return e.from===void 0?t:`${t} on ${e.from||`the form`}`}clearFilters(e){this.filter.set(``),this.active.set(new Set);let t=this.rows().length,n=`Filters cleared. Showing ${t} ${t===1?`field`:`fields`}.`;this.filterStatus.update(e=>e===n?`${n}\u00a0`:n),e.focus()}onFilter(e){this.filter.set(e.target.value)}highlight(e,t){let n=this.rpc();n&&n.scope(`pangular`).rpc.callEvent(`request-form-highlight`,e?{formId:e,path:t}:null)}kindLabel(e){return xE[e]}constraintList(e){return Object.entries(e.constraints??{}).map(([e,t])=>`${e} ${t}`)}errorText(e,t){return/^[a-z]/.test(t.message)?`${e.key||`The form`} ${t.message}`:t.message}static ɵfac=function(t){return new(t||e)};static ɵcmp=Gh({type:e,selectors:[[`app-forms-inspector`]],hostBindings:function(e,t){e&1&&W(`keydown.escape`,function(){return t.cancelPick()})},inputs:{rpc:[1,`rpc`],focus:[1,`focus`]},outputs:{focusHandled:`focusHandled`},decls:6,vars:1,consts:[[`fieldFilter`,``],[`role`,`status`,1,`empty`],[`role`,`alert`,1,`empty`],[1,`empty`],[1,`layout`],[`aria-hidden`,`true`,1,`spinner`],[1,`empty-title`],[1,`muted`],[`type`,`button`,1,`small`,3,`click`],[1,`sidebar`],[`id`,`forms-list-heading`,1,`list-heading`],[1,`list-count`],[1,`page-toggle`],[`aria-labelledby`,`forms-list-heading`,1,`form-list`],[`aria-labelledby`,`forms-detail-title`,1,`detail`,`gone`],[`aria-labelledby`,`forms-detail-title`,1,`detail`],[`type`,`checkbox`,3,`change`,`checked`],[`type`,`button`,1,`form-item`,3,`click`],[`aria-hidden`,`true`,1,`dot`],[1,`label`],[1,`kind`],[1,`id`],[1,`sr-only`],[1,`count`],[`id`,`forms-detail-title`],[`role`,`status`,1,`muted`],[1,`detail-head`],[1,`detail-meta`],[1,`summary`],[1,`badge`],[1,`totals`],[1,`error-summary`],[3,`tool`,`page`,`signalForm`],[1,`action-bar`],[`role`,`group`,`aria-label`,`Form actions`,1,`actions`],[`type`,`button`,1,`small`,3,`click`,`disabled`],[`aria-hidden`,`true`,1,`divider`],[`type`,`button`,1,`small`,3,`armed`,`disabled`],[`aria-hidden`,`true`,1,`spacer`],[`type`,`button`,1,`small`,`danger`,3,`click`,`disabled`],[`type`,`button`,1,`small`,`primary`,3,`click`,`disabled`],[`id`,`forms-writes-off`,1,`muted`],[`role`,`status`,1,`status`],[`role`,`tablist`,`aria-label`,`Form views`,1,`tabs`,3,`keydown`],[`type`,`button`,`role`,`tab`,3,`id`],[`role`,`tabpanel`,1,`panel`,3,`id`],[3,`formId`,`version`,`rpc`],[`type`,`button`,1,`summary-link`,3,`click`],[1,`kind-tag`],[`type`,`button`,`role`,`tab`,3,`click`,`id`],[1,`filters`],[`type`,`search`,`placeholder`,`Filter fields by path`,`aria-label`,`Filter fields by path`,`autocomplete`,`off`,`spellcheck`,`false`,1,`filter`,3,`input`,`keydown.escape`,`value`],[1,`chips`],[`role`,`status`,1,`sr-only`],[`role`,`region`,`aria-label`,`Fields`,`tabindex`,`0`,1,`table-scroll`],[1,`fields`],[`scope`,`col`],[3,`form`,`node`,`version`,`rpc`],[3,`mouseenter`,`mouseleave`],[`scope`,`row`,1,`name`],[`type`,`button`,1,`field`,3,`focus`,`blur`,`click`],[1,`type`],[1,`value`],[1,`status-cell`],[1,`flags`],[1,`warn`],[1,`errors`],[1,`unseen`],[1,`source`],[`colspan`,`5`,1,`muted`,`truncated`],[`colspan`,`5`,1,`no-match`],[`type`,`button`,1,`small`],[3,`closed`,`form`,`node`,`version`,`rpc`],[`what`,`form events on this page`,`limit`,`formTimeline`,3,`dropped`,`max`],[3,`record`,`events`,`recording`],[3,`showField`,`formId`,`version`,`rpc`]],template:function(e,t){e&1&&N(0,DH,4,0,`div`,1)(1,OH,7,0,`div`,2)(2,kH,4,0,`div`,1)(3,AH,5,0,`div`,3)(4,jH,7,2,`div`,3)(5,AU,13,3,`div`,4),e&2&&P(t.rpc()?t.failed()?1:t.loading()?2:t.forms().length?t.visible().length?5:4:3:0)},dependencies:[TV,tH,PV,FV,CH,oO,hb],styles:[`.muted[_ngcontent-%COMP%] { +}`]})},DH=()=>[],OH=(e,t)=>t.id,kH=(e,t)=>t.node.path;function AH(e,t){e&1&&(R(0,`div`,1),B(1,`span`,5),R(2,`p`),J(3,`Connecting to the devtools server…`),z()())}function jH(e,t){if(e&1){let e=U();R(0,`div`,2)(1,`p`,6),J(2,`Could not load forms`),z(),R(3,`p`,7),J(4,` The devtools server did not answer. Check that the app is running, then try again. `),z(),R(5,`button`,8),W(`click`,function(){return D(e),O(G().retry())}),J(6,`Try again`),z()()}}function MH(e,t){e&1&&(R(0,`div`,1),B(1,`span`,5),R(2,`p`),J(3,`Loading forms…`),z()())}function NH(e,t){e&1&&(R(0,`div`,3)(1,`p`,6),J(2,`No forms on the page yet`),z(),R(3,`p`,7),J(4,` Open a page that renders a form. Signal Forms, reactive and template-driven forms all show up here, in development builds. `),z()())}function PH(e,t){if(e&1){let e=U();R(0,`div`,3)(1,`p`,6),J(2,`No forms on this page`),z(),R(3,`p`,7),J(4),z(),R(5,`button`,8),W(`click`,function(){return D(e),O(G().allPages.set(!0))}),J(6,` Show forms from all pages `),z()()}if(e&2){let e=G();j(4),Z(` Other connected tabs report `,e.forms().length,` `,e.forms().length===1?`form`:`forms`,`. `)}}function FH(e,t){if(e&1){let e=U();R(0,`label`,12)(1,`input`,16),W(`change`,function(t){return D(e),O(G(2).allPages.set(t.target.checked))}),z(),J(2,` All pages `),z()}if(e&2){let e=G(2);j(),L(`checked`,e.allPages())}}function IH(e,t){e&1&&(R(0,`span`,23),J(1),R(2,`span`,22),J(3,` errors`),z()()),e&2&&(j(),Y(t))}function LH(e,t){if(e&1){let e=U();R(0,`li`)(1,`button`,17),W(`click`,function(){let t=D(e).$implicit;return O(G(2).selectForm(t.id))}),B(2,`span`,18),R(3,`span`,19),J(4),z(),R(5,`span`,20),J(6),R(7,`span`,21),J(8),z(),R(9,`span`,22),J(10),z()(),N(11,IH,4,1,`span`,23),z()()}if(e&2){let e,n=t.$implicit,r=G(2);j(),q(`active`,n.id===r.selected()?.id),M(`aria-current`,n.id===r.selected()?.id?`true`:null),j(),M(`data-status`,n.root.status),j(),M(`title`,n.label),j(),Y(n.label),j(2),X(``,r.kindLabel(n.kind),` · `),j(2),Y(n.id),j(2),X(`, `,n.root.status),j(),P((e=r.counts().get(n.id)?.errors)?11:-1,e)}}function RH(e,t){if(e&1){let e=U();R(0,`section`,14)(1,`h2`,24),J(2),z(),R(3,`p`,25),J(4,` This form is no longer on the page. It comes back here if the page renders it again. `),z(),R(5,`button`,8),W(`click`,function(){D(e);let t=G(2);return O(t.selectForm(t.visible()[0].id))}),J(6),z()()}if(e&2){let e=G(2);j(2),Y(t),j(4),X(` Show `,e.visible()[0].label,` `)}}function zH(e,t){if(e&1){let e=U();R(0,`section`,14)(1,`h2`,24),J(2),z(),R(3,`p`,7),J(4,`This form is on another page. Tick "All pages" to see it again.`),z(),R(5,`button`,8),W(`click`,function(){return D(e),O(G(2).allPages.set(!0))}),J(6,` Show forms from all pages `),z()()}e&2&&(j(2),Y(t))}function BH(e,t){if(e&1&&(R(0,`span`),J(1),z()),e&2){let e=G();j(),Y(e.submitted?`submitted`:`not submitted`)}}function VH(e,t){e&1&&(R(0,`span`),J(1,`submitting`),z())}function HH(e,t){if(e&1){let e=U();R(0,`li`)(1,`button`,47),W(`click`,function(){let t=D(e).$implicit;return O(G(4).showField(t.path))}),R(2,`span`,22),J(3,`Show field `),z(),R(4,`code`),J(5),z(),R(6,`span`,22),J(7,`:`),z(),J(8),R(9,`code`,48),J(10),z()()()}if(e&2){let e=t.$implicit;j(5),Y(e.path||`(form)`),j(3),X(` `,e.message,` `),j(2),Y(e.kind)}}function UH(e,t){if(e&1&&(R(0,`details`,31)(1,`summary`),J(2),z(),R(3,`ul`),F(4,HH,11,3,`li`,null,Og),z()()),e&2){let e=G();j(2),X(`Error summary (`,e.errorSummary.length,`)`),j(2),I(e.errorSummary)}}function WH(e,t){if(e&1){let e=U();R(0,`button`,35),W(`click`,function(){return D(e),O(G(3).confirmAct(`restore`))}),J(1),z()}if(e&2){let e=G(3);q(`armed`,e.armed()===`restore`),L(`disabled`,!e.canWrite()),M(`aria-describedby`,e.canWrite()?null:`forms-writes-off`)(`title`,`Restore `+e.snapshot()),j(),X(` `,e.armed()===`restore`?`Confirm restore`:`Restore `+e.snapshot(),` `)}}function GH(e,t){if(e&1&&(R(0,`p`,41),J(1),z()),e&2){let e=G(3);j(),Y(e.writesOff)}}function KH(e,t){if(e&1){let e=U();R(0,`button`,49),W(`click`,function(){let t=D(e).$implicit;return O(G(3).tab_.set(t.id))}),J(1),z()}if(e&2){let e=t.$implicit,n=G(3);L(`id`,`forms-tab-`+e.id),M(`aria-selected`,e.id===n.tab_())(`aria-controls`,`forms-panel-`+e.id)(`tabindex`,e.id===n.tab_()?0:-1),j(),X(` `,e.label,` `)}}function qH(e,t){if(e&1){let e=U();R(0,`label`)(1,`input`,16),W(`change`,function(){let t=D(e).$implicit;return O(G(4).toggleChip(t.id))}),z(),J(2),z()}if(e&2){let e=t.$implicit,n=G(4);j(),L(`checked`,n.active().has(e.id)),j(),X(` `,e.label,` `)}}function JH(e,t){if(e&1&&(R(0,`div`,7),J(1,` typed `),R(2,`code`),J(3),xv(4,`json`),z(),J(5,`, not in the model yet `),z()),e&2){let e=G(2).$implicit;j(3),Y(Cv(4,1,e.node.uncommitted))}}function YH(e,t){if(e&1&&(R(0,`div`,7),J(1,` resets to `),R(2,`code`),J(3),xv(4,`json`),z()()),e&2){let e=G(2).$implicit;j(3),Y(Cv(4,1,e.node.defaultValue))}}function XH(e,t){if(e&1&&(R(0,`code`),J(1),xv(2,`json`),z(),N(3,JH,6,3,`div`,7),N(4,YH,5,3,`div`,7)),e&2){let e=G().$implicit;j(),Y(Cv(2,3,e.node.value)),j(2),P(e.node.uncommitted===void 0?-1:3),j(),P(e.node.defaultValue===void 0?-1:4)}}function ZH(e,t){e&1&&(R(0,`span`,7),J(1,`not created yet`),z())}function QH(e,t){if(e&1&&(R(0,`span`,29),J(1),z()),e&2){let e=G().$implicit;M(`data-status`,e.node.status),j(),Y(e.node.status)}}function $H(e,t){e&1&&(R(0,`span`),J(1,`touched`),z())}function eU(e,t){if(e&1&&(R(0,`span`),J(1),z()),e&2){let e=G().$implicit;j(),Y(e.node.changed===!1?`dirty, unchanged`:`dirty`)}}function tU(e,t){if(e&1&&(R(0,`span`),J(1),z()),e&2){let e=G().$implicit;j(),X(`not validated (`,e.node.skipped,`)`)}}function nU(e,t){if(e&1&&(R(0,`span`,65),J(1),z()),e&2){let e=G().$implicit;j(),X(`stale: `,e.node.stale.join(`, `))}}function rU(e,t){e&1&&(R(0,`span`,65),J(1,`view out of sync`),z())}function iU(e,t){if(e&1&&(R(0,`span`),J(1),z()),e&2){let e=G().$implicit,t=G(4);j(),X(`redacted: `,t.redactLabel(e.node.redacted))}}function aU(e,t){e&1&&(R(0,`span`),J(1,`required`),z())}function oU(e,t){e&1&&(R(0,`span`),J(1,`readonly`),z())}function sU(e,t){e&1&&(R(0,`span`),J(1,`hidden`),z())}function cU(e,t){if(e&1&&(R(0,`span`),J(1),z()),e&2){let e=G().$implicit;j(),X(`updates on `,e.node.updateOn)}}function lU(e,t){e&1&&(R(0,`span`),J(1,`debouncing`),z())}function uU(e,t){e&1&&(R(0,`span`),J(1,`validators`),z())}function dU(e,t){e&1&&(R(0,`span`),J(1,`async validator`),z())}function fU(e,t){if(e&1&&(R(0,`span`),J(1),z()),e&2){let e=t.$implicit;j(),Y(e)}}function pU(e,t){if(e&1&&(R(0,`span`),J(1),z()),e&2){let e=G().$implicit;j(),Y(e.node.accessor)}}function mU(e,t){if(e&1&&(R(0,`span`),J(1),z()),e&2){let e=G().$implicit;j(),X(`name `,e.node.name)}}function hU(e,t){if(e&1&&(R(0,`span`),J(1),xv(2,`json`),z()),e&2){let e=t.$implicit;j(),X(`metadata `,Cv(2,1,e))}}function gU(e,t){if(e&1&&(R(0,`span`),J(1),z()),e&2){let e=t.$implicit;j(),X(`disabled: `,e)}}function _U(e,t){if(e&1&&(R(0,`span`,68),J(1),z()),e&2){let e=G().$implicit;j(),X(`at `,e.params.path)}}function vU(e,t){if(e&1&&(R(0,`span`,68),J(1),z()),e&2){let e=G().$implicit,t=G(5);j(),Y(t.sourceText(e))}}function yU(e,t){if(e&1&&(R(0,`div`),J(1),R(2,`code`,48),J(3),z(),N(4,_U,2,1,`span`,68),N(5,vU,2,1,`span`,68),z()),e&2){let e=t.$implicit,n=G().$implicit,r=G(4);j(),X(` `,r.errorText(n.node,e),` `),j(2),Y(e.kind),j(),P(e.kind===`standardSchema`&&e.params?.path?4:-1),j(),P(e.source?5:-1)}}function bU(e,t){e&1&&(R(0,`div`,67),J(1,`not shown to the user`),z())}function xU(e,t){if(e&1&&(R(0,`tr`)(1,`td`,69),J(2),z()()),e&2){let e=G().$implicit;j(),K(`padding-left`,28+e.depth*16,`px`),j(),Z(` `,e.node.truncated,` more fields under `,e.node.path||`the form`,` not shown `)}}function SU(e,t){if(e&1){let e=U();R(0,`tr`,58),W(`mouseenter`,function(){let t=D(e).$implicit,n=G(2);return O(G(2).highlight(n.id,t.node.path))})(`mouseleave`,function(){return D(e),O(G(4).highlight(null,``))}),R(1,`th`,59)(2,`button`,60),W(`focus`,function(){let t=D(e).$implicit,n=G(2);return O(G(2).highlight(n.id,t.node.path))})(`blur`,function(){return D(e),O(G(4).highlight(null,``))})(`click`,function(){let t=D(e).$implicit;return O(G(4).toggleField(t.node.path))}),J(3),z(),R(4,`span`,61),J(5),z()(),R(6,`td`,62),N(7,XH,5,5),z(),R(8,`td`,63),N(9,ZH,2,0,`span`,7)(10,QH,2,2,`span`,29),z(),R(11,`td`,64),N(12,$H,2,0,`span`),N(13,eU,2,1,`span`),N(14,tU,2,1,`span`),N(15,nU,2,1,`span`,65),N(16,rU,2,0,`span`,65),N(17,iU,2,1,`span`),N(18,aU,2,0,`span`),N(19,oU,2,0,`span`),N(20,sU,2,0,`span`),N(21,cU,2,1,`span`),N(22,lU,2,0,`span`),N(23,uU,2,0,`span`),N(24,dU,2,0,`span`),F(25,fU,2,1,`span`,null,kg),N(27,pU,2,1,`span`),N(28,mU,2,1,`span`),F(29,hU,3,3,`span`,null,Og),F(31,gU,2,1,`span`,null,Og),z(),R(33,`td`,66),F(34,yU,6,4,`div`,null,Og),N(36,bU,2,0,`div`,67),z()(),N(37,xU,3,4,`tr`)}if(e&2){let e=t.$implicit,n=G(4);q(`invalid`,e.node.errors.length),j(),K(`padding-left`,12+e.depth*16,`px`),j(),M(`aria-label`,`Show details for `+(e.node.path||`the form`))(`aria-pressed`,e.node.path===n.fieldPath())(`title`,e.node.path||`(form)`),j(),X(` `,e.node.key||`(form)`,` `),j(2),Y(e.node.type),j(2),P(e.node.type===`control`?7:-1),j(2),P(e.node.materialized===!1?9:10),j(3),P(e.node.touched?12:-1),j(),P(e.node.dirty?13:-1),j(),P(e.node.skipped?14:-1),j(),P(e.node.stale?.length?15:-1),j(),P(e.node.dom?.drift===void 0?-1:16),j(),P(e.node.redacted?17:-1),j(),P(e.node.required?18:-1),j(),P(e.node.readonly?19:-1),j(),P(e.node.hidden?20:-1),j(),P(e.node.updateOn?21:-1),j(),P(e.node.debouncing?22:-1),j(),P(e.node.validators?.sync?23:-1),j(),P(e.node.validators?.async?24:-1),j(),I(n.constraintList(e.node)),j(2),P(e.node.accessor?27:-1),j(),P(e.node.name?28:-1),j(),I(e.node.metadata??mv(28,DH)),j(2),I(e.node.disabledReasons??mv(29,DH)),j(3),I(e.node.errors),j(2),P(e.node.errors.length&&e.node.dom?.errorShown===!1?36:-1),j(),P(e.node.truncated?37:-1)}}function CU(e,t){e&1&&J(0),e&2&&X(` No field path matches "`,G(5).filter(),`". `)}function wU(e,t){e&1&&J(0,` No field matches the selected filters. `)}function TU(e,t){if(e&1){let e=U();R(0,`button`,8),W(`click`,function(){D(e),G(2);let t=d_(2);return O(G(3).clearFilters(t))}),J(1,` Clear filters `),z()}}function EU(e,t){if(e&1&&(R(0,`tr`)(1,`td`,70)(2,`p`),N(3,CU,1,1)(4,wU,1,0),z(),N(5,TU,2,0,`button`,71),z()()),e&2){let e=G(4);j(3),P(e.filter()?3:4),j(2),P(e.filtering()?5:-1)}}function DU(e,t){if(e&1){let e=U();R(0,`app-forms-field-detail`,72),W(`closed`,function(){return D(e),O(G(4).closeField())}),z()}if(e&2){let e=G(2),n=G(2);L(`form`,e)(`node`,t)(`version`,n.version())(`rpc`,n.rpc())}}function OU(e,t){if(e&1){let e=U();R(0,`div`,50)(1,`input`,51,0),W(`input`,function(t){return D(e),O(G(3).onFilter(t))})(`keydown.escape`,function(){return D(e),O(G(3).filter.set(``))}),z(),R(3,`fieldset`,52)(4,`legend`,22),J(5,`Show only fields that are`),z(),F(6,qH,3,2,`label`,null,OH),z()(),R(8,`p`,53),J(9),z(),R(10,`div`,54)(11,`table`,55)(12,`thead`)(13,`tr`)(14,`th`,56),J(15,`Field`),z(),R(16,`th`,56),J(17,`Value`),z(),R(18,`th`,56),J(19,`Status`),z(),R(20,`th`,56),J(21,`State`),z(),R(22,`th`,56),J(23,`Errors`),z()()(),R(24,`tbody`),F(25,SU,38,30,null,null,kH,!1,EU,6,2,`tr`),z()()(),N(28,DU,1,4,`app-forms-field-detail`,57)}if(e&2){let e,t=G(3);j(),L(`value`,t.filter()),j(5),I(t.chips),j(3),Y(t.filterStatus()),j(16),I(t.rows()),j(3),P((e=t.selectedNode())?28:-1,e)}}function kU(e,t){if(e&1){let e=U();B(0,`app-limit-note`,73),R(1,`app-forms-timeline`,74),W(`record`,function(t){return D(e),O(G(3).setRecording(t))}),z()}if(e&2){let e=G(3);L(`dropped`,e.droppedEvents())(`max`,e.maxEvents()),j(),L(`events`,e.selectedEvents())(`recording`,e.recording())}}function AU(e,t){if(e&1&&B(0,`app-forms-submit`,46),e&2){let e=G(),t=G(2);L(`formId`,e.id)(`version`,t.version())(`rpc`,t.rpc())}}function jU(e,t){if(e&1){let e=U();R(0,`app-forms-lint`,75),W(`showField`,function(t){return D(e),O(G(3).showField(t))}),z()}if(e&2){let e=G(),t=G(2);L(`formId`,e.id)(`version`,t.version())(`rpc`,t.rpc())}}function MU(e,t){if(e&1){let e=U();R(0,`section`,15)(1,`div`,26)(2,`h2`,24),J(3),z(),R(4,`p`,27),J(5),R(6,`code`),J(7),z()()(),R(8,`div`,28)(9,`span`,29),J(10),z(),R(11,`span`),J(12),z(),R(13,`span`),J(14),z(),N(15,BH,2,1,`span`),N(16,VH,2,0,`span`),R(17,`span`,30)(18,`b`),J(19),z(),J(20,` fields · `),R(21,`b`),J(22),z(),J(23,` errors`),z()(),N(24,UH,6,1,`details`,31),B(25,`app-forms-webmcp`,32),R(26,`div`,33)(27,`div`,34)(28,`button`,35),W(`click`,function(){return D(e),O(G(2).act(`touch-all`))}),J(29,` Touch all `),z(),R(30,`button`,35),W(`click`,function(){return D(e),O(G(2).act(`revalidate`))}),J(31,` Revalidate `),z(),R(32,`button`,8),W(`click`,function(){return D(e),O(G(2).act(`focus-first-invalid`))}),J(33,` Focus first invalid `),z(),R(34,`button`,8),W(`click`,function(){D(e);let t=G(2);return O(t.picking()?t.cancelPick():t.pick())}),J(35),z(),B(36,`span`,36),R(37,`button`,8),W(`click`,function(){return D(e),O(G(2).act(`snapshot`))}),J(38,`Snapshot`),z(),N(39,WH,2,6,`button`,37),B(40,`span`,38),R(41,`button`,39),W(`click`,function(){return D(e),O(G(2).confirmAct(`reset`))}),J(42),z(),R(43,`button`,40),W(`click`,function(){return D(e),O(G(2).confirmAct(`submit`))}),J(44),z()(),N(45,GH,2,1,`p`,41),R(46,`p`,42),J(47),z()(),R(48,`div`,43),W(`keydown`,function(t){return D(e),O(G(2).onKey(t))}),F(49,KH,2,5,`button`,44,OH),z(),R(51,`div`,45),N(52,OU,29,4)(53,kU,2,4)(54,AU,1,3,`app-forms-submit`,46)(55,jU,1,3,`app-forms-lint`,46),z()()}if(e&2){let e,n=t,r=G(2);j(3),Y(n.label),j(2),X(` `,r.kindLabel(n.kind),` · `),j(2),Y(n.id),j(2),M(`data-status`,n.root.status),j(),Y(n.root.status),j(2),Y(n.root.dirty?`dirty`:`pristine`),j(2),Y(n.root.touched?`touched`:`untouched`),j(),P(n.submitted===void 0?-1:15),j(),P(n.root.submitting?16:-1),j(3),Y(r.counts().get(n.id)?.fields),j(2),q(`has-errors`,r.counts().get(n.id)?.errors),j(),Y(r.counts().get(n.id)?.errors),j(2),P(n.errorSummary?.length?24:-1),j(),L(`tool`,n.webMcp)(`page`,r.webMcpPage(n.id))(`signalForm`,n.kind===`signal`),j(3),L(`disabled`,!r.canWrite()),M(`aria-describedby`,r.canWrite()?null:`forms-writes-off`),j(2),L(`disabled`,!r.canWrite()),M(`aria-describedby`,r.canWrite()?null:`forms-writes-off`),j(4),q(`on`,r.picking()),M(`aria-pressed`,!!r.picking()),j(),X(` `,r.picking()?`Cancel picking`:`Pick field on page`,` `),j(4),P(r.snapshot()?39:-1),j(2),q(`armed`,r.armed()===`reset`),L(`disabled`,!r.canWrite()),M(`aria-describedby`,r.canWrite()?null:`forms-writes-off`),j(),X(` `,r.armed()===`reset`?`Confirm reset`:`Reset`,` `),j(),q(`armed`,r.armed()===`submit`),L(`disabled`,!r.canWrite()),M(`aria-describedby`,r.canWrite()?null:`forms-writes-off`),j(),X(` `,r.armed()===`submit`?`Confirm submit`:`Submit`,` `),j(),P(r.canWrite()?-1:45),j(2),Y(r.message()),j(2),I(r.tabs),j(2),L(`id`,`forms-panel-`+r.tab_()),M(`aria-labelledby`,`forms-tab-`+r.tab_()),j(),P((e=r.tab_())===`fields`?52:e===`timeline`?53:e===`submit`?54:e===`lint`?55:-1)}}function NU(e,t){if(e&1&&(R(0,`div`,4)(1,`div`,9)(2,`h2`,10),J(3,` Forms `),R(4,`span`,11),J(5),z()(),N(6,FH,3,1,`label`,12),R(7,`ul`,13),F(8,LH,12,10,`li`,null,OH),z()(),N(10,RH,7,2,`section`,14)(11,zH,7,1,`section`,14)(12,MU,56,41,`section`,15),z()),e&2){let e,t=G();j(5),Y(t.visible().length),j(),P(t.hostPageId&&(t.allPages()||t.otherPages())?6:-1),j(2),I(t.visible()),j(2),P((e=t.missing())?10:(e=t.hidden())?11:(e=t.selected())?12:-1,e)}}var PU=[{id:`fields`,label:`Fields`},{id:`timeline`,label:`Timeline`},{id:`submit`,label:`Submit`},{id:`lint`,label:`Lint`}],FU=[{id:`invalid`,label:`Invalid`},{id:`dirty`,label:`Dirty`},{id:`touched`,label:`Touched`},{id:`disabled`,label:`Disabled`},{id:`hidden-error`,label:`Error not shown`}];function IU(e,t){switch(t){case`invalid`:return e.errors.length>0;case`dirty`:return e.dirty&&e.type===`control`;case`touched`:return e.touched&&e.type===`control`;case`disabled`:return e.status===`DISABLED`;case`hidden-error`:return e.dom?.errorShown===!1}}function LU(e){return e.errors.length+(e.children??[]).reduce((e,t)=>e+LU(t),0)}function RU(e){return e.children?e.children.reduce((e,t)=>e+RU(t),0):+(e.type===`control`&&e.materialized!==!1)}var zU=class e{rpc=$(null);focus=$(null);canWrite=Q(()=>ME(this.rpc(),`forms`));redactLabel=TE;writesOff=iE(`forms`);focusHandled=Rv();forms=A([]);webMcp=A([]);events=A([]);loading=A(!0);failed=A(!1);selectedId=A(null);selectedLabel=A(null);hostPageId=fE();allPages=A(!1);visible=Q(()=>{let e=this.forms(),t=this.hostPageId;return t&&!this.allPages()?e.filter(e=>bE(e.id)===t):e});otherPages=Q(()=>this.forms().some(e=>bE(e.id)!==this.hostPageId));instrumented=A([]);recording=Q(()=>{let e=this.selected()?.id??``;return this.instrumented().some(t=>e.endsWith(`@${t}`))});filter=A(``);tabs=PU;chips=FU;tab_=A(`fields`);active=A(new Set);filtering=Q(()=>!!this.filter()||this.active().size>0);filterStatus=A(``);version=A(0);message=A(``);webMcpPage(e){let t=bE(e);return this.webMcp().find(e=>e.pageId===t)}picking=A(null);pickSeq=0;unsubscribe=null;destroyRef=T(Ts);host=T(Pl);injector=T(Cs);counts=Q(()=>new Map(this.visible().map(e=>[e.id,{fields:RU(e.root),errors:LU(e.root)}])));chosen=Q(()=>{let e=this.selectedId();if(e===null)return null;let t=this.forms(),n=this.selectedLabel(),r=bE(e);return t.find(t=>t.id===e)??t.find(e=>e.label===n&&bE(e.id)===r)??null});selected=Q(()=>{let e=this.visible();if(this.selectedId()===null)return e[0]??null;let t=this.chosen();return t&&e.includes(t)?t:null});missing=Q(()=>this.selectedId()!==null&&!this.chosen()&&this.visible().length?this.selectedLabel()??this.selectedId():null);hidden=Q(()=>{let e=this.chosen();return e&&!this.selected()&&this.visible().length?e.label:null});selectedFormId=Q(()=>this.selected()?.id??null);fieldPath=Fv({source:this.selectedFormId,computation:()=>null});armed=Fv({source:this.selectedFormId,computation:()=>null});snapshot=Fv({source:this.selectedFormId,computation:()=>null});rows=Q(()=>{let e=this.selected();if(!e)return[];let t=this.filter().toLowerCase(),n=Array.from(this.active()),r=[],i=(e,a)=>{let o=r.length,s=(!t||e.path.toLowerCase().includes(t))&&n.every(t=>IU(e,t));for(let t of e.children??[])s=i(t,a+1)||s;return s&&r.splice(o,0,{node:e,depth:a}),s};return i(e.root,0),r});selectedNode=Q(()=>{let e=this.fieldPath(),t=this.selected();if(e===null||!t)return null;let n=t=>t.path===e?t:(t.children??[]).map(n).find(Boolean)??null;return n(t.root)});dropped=A({});droppedEvents=Q(()=>{let e=this.selected()?.id;return e?this.dropped()[bE(e)]??0:0});maxEvents=Q(()=>jE(this.rpc()).limits.formTimeline);selectedEvents=Q(()=>{let e=this.selected()?.id;return this.events().filter(t=>t.formId===e)});constructor(){fc(()=>{let e=this.rpc();e&&this.load(e)}),fc(()=>{let e=this.focus();e&&Nv(()=>{this.selectForm(e.id),this.focusHandled.emit()})}),this.destroyRef.onDestroy(()=>{this.unsubscribe?.(),this.highlight(null,``)})}async load(e){this.loading.set(!0),this.failed.set(!1);try{let t=await e.scope(`pangular`).rpc.sharedState(`forms`);if(this.destroyRef.destroyed)return;let n=e=>{let t=e;this.forms.set(t?.forms??[]),this.events.set(t?.events??[]),this.instrumented.set(t?.instrumented??[]),this.dropped.set(t?.dropped??{}),this.webMcp.set(t?.webMcp??[]),this.version.update(e=>e+1)};n(t.value()),this.unsubscribe?.(),this.unsubscribe=t.on(`updated`,n)}catch{this.failed.set(!0)}finally{this.loading.set(!1)}}retry(){let e=this.rpc();e&&this.load(e)}async pick(){let e=this.selected();if(!e)return;let t=++this.pickSeq;this.picking.set(e.id),this.message.set(`Click a field in the app. Press Escape or Cancel picking to stop.`);let n=await DE(this.rpc(),{action:`pick`,formId:e.id});if(t!==this.pickSeq)return;this.picking.set(null);let r=n;if(!n.ok||!r.formId){this.message.set(OE(n));return}this.selectForm(r.formId),this.tab_.set(`fields`),this.fieldPath.set(r.path??``),this.message.set(`Picked ${r.path||`(form)`}.`)}cancelPick(){let e=this.picking();e&&DE(this.rpc(),{action:`cancel-pick`,formId:e})}async setRecording(e){let t=this.selected();if(!t)return;let n=await DE(this.rpc(),{action:`instrument`,formId:t.id,value:e});this.message.set(OE(n))}selectForm(e){this.hostPageId&&bE(e)&&bE(e)!==this.hostPageId&&this.allPages.set(!0),this.selectedId.set(e),this.selectedLabel.set(this.forms().find(t=>t.id===e)?.label??null),this.filter.set(``),this.fieldPath.set(null),this.snapshot.set(null),this.armed.set(null)}toggleField(e){this.fieldPath.update(t=>t===e?null:e)}closeField(){let e=this.host.nativeElement,t=e.querySelector(`button.field[aria-pressed="true"]`)??e.querySelector(`.table-scroll`);this.fieldPath.set(null),t?.focus()}showField(e){this.tab_.set(`fields`);let t=()=>this.rows().some(t=>t.node.path===e);t()||this.filter.set(``),t()||this.active.set(new Set),this.fieldPath.set(e),Bd(()=>{let e=this.host.nativeElement;e.querySelector(`button.field[aria-pressed="true"]`)?.scrollIntoView?.({block:`nearest`}),(e.querySelector(`#forms-field-heading`)??e.querySelector(`.table-scroll`))?.focus()},{injector:this.injector})}toggleChip(e){this.active.update(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})}async act(e,t={}){let n=this.selected();if(!n)return;this.armed.set(null);let r=await DE(this.rpc(),{action:e,formId:n.id,...t});r.snapshot&&this.selected()?.id===n.id&&this.snapshot.set(r.snapshot),this.message.set(OE(r))}confirmAct(e){if(this.armed()!==e){this.armed.set(e),this.message.set(`Press "Confirm ${e}" to ${e} the form in the app.`);return}this.act(e,{confirm:!0,snapshot:this.snapshot()??void 0})}onKey(e){let t=this.tabs.map(e=>e.id),n=t.indexOf(this.tab_()),r=n;if(e.key===`ArrowRight`)r=(n+1)%t.length;else if(e.key===`ArrowLeft`)r=(n-1+t.length)%t.length;else if(e.key===`Home`)r=0;else if(e.key===`End`)r=t.length-1;else return;e.preventDefault(),this.tab_.set(t[r]);let i=e.currentTarget;queueMicrotask(()=>i.querySelector(`#forms-tab-${t[r]}`)?.focus())}sourceText(e){let t=SE[e.source??``]??e.source??``;return e.from===void 0?t:`${t} on ${e.from||`the form`}`}clearFilters(e){this.filter.set(``),this.active.set(new Set);let t=this.rows().length,n=`Filters cleared. Showing ${t} ${t===1?`field`:`fields`}.`;this.filterStatus.update(e=>e===n?`${n}\u00a0`:n),e.focus()}onFilter(e){this.filter.set(e.target.value)}highlight(e,t){let n=this.rpc();n&&n.scope(`pangular`).rpc.callEvent(`request-form-highlight`,e?{formId:e,path:t}:null)}kindLabel(e){return xE[e]}constraintList(e){return Object.entries(e.constraints??{}).map(([e,t])=>`${e} ${t}`)}errorText(e,t){return/^[a-z]/.test(t.message)?`${e.key||`The form`} ${t.message}`:t.message}static ɵfac=function(t){return new(t||e)};static ɵcmp=Gh({type:e,selectors:[[`app-forms-inspector`]],hostBindings:function(e,t){e&1&&W(`keydown.escape`,function(){return t.cancelPick()})},inputs:{rpc:[1,`rpc`],focus:[1,`focus`]},outputs:{focusHandled:`focusHandled`},decls:6,vars:1,consts:[[`fieldFilter`,``],[`role`,`status`,1,`empty`],[`role`,`alert`,1,`empty`],[1,`empty`],[1,`layout`],[`aria-hidden`,`true`,1,`spinner`],[1,`empty-title`],[1,`muted`],[`type`,`button`,1,`small`,3,`click`],[1,`sidebar`],[`id`,`forms-list-heading`,1,`list-heading`],[1,`list-count`],[1,`page-toggle`],[`aria-labelledby`,`forms-list-heading`,1,`form-list`],[`aria-labelledby`,`forms-detail-title`,1,`detail`,`gone`],[`aria-labelledby`,`forms-detail-title`,1,`detail`],[`type`,`checkbox`,3,`change`,`checked`],[`type`,`button`,1,`form-item`,3,`click`],[`aria-hidden`,`true`,1,`dot`],[1,`label`],[1,`kind`],[1,`id`],[1,`sr-only`],[1,`count`],[`id`,`forms-detail-title`],[`role`,`status`,1,`muted`],[1,`detail-head`],[1,`detail-meta`],[1,`summary`],[1,`badge`],[1,`totals`],[1,`error-summary`],[3,`tool`,`page`,`signalForm`],[1,`action-bar`],[`role`,`group`,`aria-label`,`Form actions`,1,`actions`],[`type`,`button`,1,`small`,3,`click`,`disabled`],[`aria-hidden`,`true`,1,`divider`],[`type`,`button`,1,`small`,3,`armed`,`disabled`],[`aria-hidden`,`true`,1,`spacer`],[`type`,`button`,1,`small`,`danger`,3,`click`,`disabled`],[`type`,`button`,1,`small`,`primary`,3,`click`,`disabled`],[`id`,`forms-writes-off`,1,`muted`],[`role`,`status`,1,`status`],[`role`,`tablist`,`aria-label`,`Form views`,1,`tabs`,3,`keydown`],[`type`,`button`,`role`,`tab`,3,`id`],[`role`,`tabpanel`,1,`panel`,3,`id`],[3,`formId`,`version`,`rpc`],[`type`,`button`,1,`summary-link`,3,`click`],[1,`kind-tag`],[`type`,`button`,`role`,`tab`,3,`click`,`id`],[1,`filters`],[`type`,`search`,`placeholder`,`Filter fields by path`,`aria-label`,`Filter fields by path`,`autocomplete`,`off`,`spellcheck`,`false`,1,`filter`,3,`input`,`keydown.escape`,`value`],[1,`chips`],[`role`,`status`,1,`sr-only`],[`role`,`region`,`aria-label`,`Fields`,`tabindex`,`0`,1,`table-scroll`],[1,`fields`],[`scope`,`col`],[3,`form`,`node`,`version`,`rpc`],[3,`mouseenter`,`mouseleave`],[`scope`,`row`,1,`name`],[`type`,`button`,1,`field`,3,`focus`,`blur`,`click`],[1,`type`],[1,`value`],[1,`status-cell`],[1,`flags`],[1,`warn`],[1,`errors`],[1,`unseen`],[1,`source`],[`colspan`,`5`,1,`muted`,`truncated`],[`colspan`,`5`,1,`no-match`],[`type`,`button`,1,`small`],[3,`closed`,`form`,`node`,`version`,`rpc`],[`what`,`form events on this page`,`limit`,`formTimeline`,3,`dropped`,`max`],[3,`record`,`events`,`recording`],[3,`showField`,`formId`,`version`,`rpc`]],template:function(e,t){e&1&&N(0,AH,4,0,`div`,1)(1,jH,7,0,`div`,2)(2,MH,4,0,`div`,1)(3,NH,5,0,`div`,3)(4,PH,7,2,`div`,3)(5,NU,13,3,`div`,4),e&2&&P(t.rpc()?t.failed()?1:t.loading()?2:t.forms().length?t.visible().length?5:4:3:0)},dependencies:[OV,iH,LV,RV,EH,oO,hb],styles:[`.muted[_ngcontent-%COMP%] { color: var(--%NS%text-2); } @@ -10831,7 +10855,7 @@ code[_ngcontent-%COMP%] { .divider[_ngcontent-%COMP%] { display: none; } -}`]})},LU=[`filterInput`],RU=(e,t)=>t.file+t.name,zU=(e,t)=>t.file+`:`+t.line,BU=(e,t)=>t.name;function VU(e,t){e&1&&(R(0,`p`,14),k(),R(1,`svg`,26),B(2,`circle`,27)(3,`path`,28),z(),hs(),R(4,`span`),J(5),z()()),e&2&&(j(5),Y(t))}function HU(e,t){if(e&1&&(R(0,`p`,14),k(),R(1,`svg`,26),B(2,`circle`,27)(3,`path`,28),z(),hs(),R(4,`span`)(5,`strong`),J(6),z(),J(7,` Pipe prototypes are patched in the inspected page to count calls and keep the last input and output. Stop recording when you are done. `),z()()),e&2){let e=G();j(6),X(`Recording on `,e.instrumentedPages().length,` page(s).`)}}function UU(e,t){e&1&&(R(0,`div`,15),B(1,`span`,29),R(2,`p`,30),J(3,`Scanning pipes…`),z()())}function WU(e,t){if(e&1){let e=U();R(0,`div`,16)(1,`p`,30),J(2,`Couldn't load pipes`),z(),R(3,`p`,31),J(4,`The devtools server did not answer. Check that it is running.`),z(),R(5,`button`,32),W(`click`,function(){return D(e),O(G().refresh())}),J(6,`Try again`),z()()}}function GU(e,t){e&1&&(R(0,`div`,17)(1,`p`,30),J(2,`No pipes found`),z(),R(3,`p`,31),J(4,` No @Pipe classes were found in the source, and no template uses a built-in pipe yet. `),z()())}function KU(e,t){e&1&&J(0,` Couldn't scan the source again. The list keeps the last scan. `)}function qU(e,t){e&1&&J(0,` Couldn't scan the source. Only pipes seen on the page are listed. `)}function JU(e,t){if(e&1){let e=U();R(0,`div`,33),k(),R(1,`svg`,26),B(2,`circle`,27)(3,`path`,39),z(),hs(),R(4,`span`),N(5,KU,1,0)(6,qU,1,0),z(),R(7,`button`,11),W(`click`,function(){return D(e),O(G(2).refresh())}),J(8,`Try again`),z()()}if(e&2){let e=G(2);j(5),P(e.pipes().length?5:6),j(2),L(`disabled`,e.loading())}}function YU(e,t){e&1&&(R(0,`span`,46),J(1,`stale?`),z())}function XU(e,t){if(e&1&&(R(0,`span`,47),J(1),z()),e&2){G();let e=fv(0);j(),X(``,e.instanceCount,` live`)}}function ZU(e,t){e&1&&(R(0,`span`,48),J(1,`built-in`),z())}function QU(e,t){e&1&&(R(0,`span`,48),J(1,`runtime only`),z())}function $U(e,t){e&1&&(R(0,`span`,48),J(1,`NgModule`),z())}function eW(e,t){e&1&&(R(0,`span`,50),J(1,`No source location`),z())}function tW(e,t){if(e&1&&J(0),e&2){let e=G().$implicit;Z(` `,e.file,`:`,e.line,` `)}}function nW(e,t){if(e&1&&(R(0,`span`,51),J(1),z()),e&2){let e=G().$implicit;j(),X(`+`,(e.usageCount??1)-1,` more`)}}function rW(e,t){if(e&1&&(R(0,`span`,51),J(1),z()),e&2){let e=G().$implicit;j(),Z(``,e.usageCount,` `,e.usageCount===1?`use`:`uses`)}}function iW(e,t){if(e&1){let e=U();uv(0),R(1,`li`)(2,`button`,41),W(`click`,function(){let t=D(e).$implicit;return O(G(3).select(t))})(`mouseenter`,function(){D(e);let t=fv(0);return O(G(3).highlightPipe(t))})(`mouseleave`,function(){return D(e),O(G(3).highlight(null))})(`focus`,function(){D(e);let t=fv(0);return O(G(3).highlightPipe(t))})(`blur`,function(){return D(e),O(G(3).highlight(null))}),R(3,`span`,42)(4,`span`,43),J(5),z(),R(6,`span`,44),J(7),z()(),R(8,`span`,45),N(9,YU,2,0,`span`,46),N(10,XU,2,1,`span`,47),N(11,ZU,2,0,`span`,48),N(12,QU,2,0,`span`,48),N(13,$U,2,0,`span`,48),R(14,`span`,48),J(15),z()(),R(16,`span`,49),N(17,eW,2,0,`span`,50)(18,tW,1,2),N(19,nW,2,1,`span`,51)(20,rW,2,2,`span`,51),z()()()}if(e&2){let e=t.$implicit,n=G(3),r=dv(n.liveFor(e.name));j(2),q(`selected`,n.isSelected(e)),M(`aria-current`,n.isSelected(e)||null),j(3),Y(e.name),j(2),Y(e.className),j(2),P(r?.stale?9:-1),j(),P(r?10:-1),j(),P(e.builtin?11:-1),j(),P(e.runtime?12:-1),j(),P(e.isStandalone?-1:13),j(),q(`impure`,!e.isPure),j(),Y(e.isPure?`pure`:`impure`),j(2),P(e.runtime?17:18),j(2),P(e.builtin&&(e.usageCount??0)>1?19:!e.builtin&&e.usageCount?20:-1)}}function aW(e,t){if(e&1){let e=U();R(0,`ul`,40),W(`keydown`,function(t){return D(e),O(G(2).onListKey(t))}),F(1,iW,21,16,`li`,null,RU),z()}if(e&2){let e=G(2);j(),I(e.filtered())}}function oW(e,t){e&1&&J(0),e&2&&X(` Nothing matches “`,G(3).filter().trim(),`” in this view. `)}function sW(e,t){e&1&&J(0,` None of the pipes fit this filter. `)}function cW(e,t){if(e&1){let e=U();R(0,`div`,37)(1,`p`,30),J(2,`No pipes match`),z(),R(3,`p`,31),N(4,oW,1,1)(5,sW,1,0),z(),R(6,`button`,32),W(`click`,function(){return D(e),O(G(2).clearFilters())}),J(7,`Clear filters`),z()()}if(e&2){let e=G(2);j(4),P(e.filter().trim()?4:5)}}function lW(e,t){e&1&&(R(0,`span`,48),J(1,`built-in`),z())}function uW(e,t){e&1&&(R(0,`span`,48),J(1,`runtime only`),z())}function dW(e,t){if(e&1&&(R(0,`dt`),J(1,`File`),z(),R(2,`dd`,55),B(3,`app-source-link`,57),z()),e&2){let e=G();j(3),L(`file`,e.file)(`line`,e.line)}}function fW(e,t){if(e&1&&(R(0,`dt`),J(1,`Standalone`),z(),R(2,`dd`),J(3),z()),e&2){let e=G();j(3),Y(e.isStandalone?`Yes`:`No, declared in an NgModule`)}}function pW(e,t){if(e&1&&(R(0,`li`,55),B(1,`app-source-link`,57),z()),e&2){let e=t.$implicit;j(),L(`file`,e.file)(`line`,e.line)}}function mW(e,t){if(e&1&&(R(0,`div`,54)(1,`h3`),J(2,` Used in templates `),R(3,`span`,21),J(4),z()(),R(5,`ul`,58),F(6,pW,2,2,`li`,55,zU),z()()),e&2){let e=G();j(4),Y(e.usageCount),j(2),I(e.usages)}}function hW(e,t){e&1&&(R(0,`p`,59)(1,`span`,46),J(2,`experimental`),z(),J(3,` This pure pipe got an argument whose contents changed while its reference stayed the same, so it may be showing a stale value. `),z())}function gW(e,t){if(e&1){let e=U();R(0,`button`,64),W(`click`,function(){let t=D(e);return O(G(5).highlight(t,!0))})(`mouseenter`,function(){let t=D(e);return O(G(5).highlight(t))})(`mouseleave`,function(){return D(e),O(G(5).highlight(null))})(`focus`,function(){let t=D(e);return O(G(5).highlight(t))})(`blur`,function(){return D(e),O(G(5).highlight(null))}),R(1,`span`,55),J(2),z(),R(3,`span`,65),J(4),z()()}if(e&2){let e=G().$implicit;M(`aria-label`,`Highlight `+e.name+` on the page`),j(2),Y(e.name),j(2),Y(e.count)}}function _W(e,t){if(e&1&&(R(0,`span`,63)(1,`span`,55),J(2),z(),R(3,`span`,65),J(4),z()()),e&2){let e=G().$implicit;j(2),Y(e.name),j(2),Y(e.count)}}function vW(e,t){if(e&1&&(R(0,`li`),N(1,gW,5,3,`button`,62)(2,_W,5,2,`span`,63),z()),e&2){let e,n=t.$implicit;j(),P((e=n.targets?.[0])?1:2,e)}}function yW(e,t){if(e&1&&(R(0,`dt`),J(1,`Time`),z(),R(2,`dd`),J(3),z()),e&2){let e=G(),t=G(4);j(3),rv(` `,t.ms(e.totalMs),` total, `,t.ms(e.totalMs/e.callCount),` average, `,t.ms(e.maxMs??0),` slowest `)}}function bW(e,t){if(e&1&&(R(0,`span`,66),J(1),z()),e&2){let e=G(2);j(),Y(e.lastError)}}function xW(e,t){if(e&1&&(R(0,`dt`),J(1,`Errors`),z(),R(2,`dd`),J(3),N(4,bW,2,1,`span`,66),z()),e&2){let e=G();j(3),X(` `,e.errorCount,` `),j(),P(e.lastError?4:-1)}}function SW(e,t){if(e&1){let e=U();R(0,`button`,64),W(`click`,function(){let t=D(e);return O(G(7).highlight(t,!0))})(`mouseenter`,function(){let t=D(e);return O(G(7).highlight(t))})(`mouseleave`,function(){return D(e),O(G(7).highlight(null))})(`focus`,function(){let t=D(e);return O(G(7).highlight(t))})(`blur`,function(){return D(e),O(G(7).highlight(null))}),R(1,`span`,55),J(2),z()()}if(e&2){let e=G().$implicit;M(`aria-label`,`Highlight `+e.component+` on the page`),j(2),Y(e.component)}}function CW(e,t){if(e&1&&(R(0,`span`,63)(1,`span`,55),J(2),z()()),e&2){let e=G().$implicit;j(2),Y(e.component)}}function wW(e,t){if(e&1&&(R(0,`span`,68),J(1),z()),e&2){let e=G().$implicit,t=G(6);j(),Y(t.ms(e.totalMs))}}function TW(e,t){if(e&1&&(R(0,`span`,69),J(1),z()),e&2){let e=G().$implicit;j(),Y(e.lastCaller)}}function EW(e,t){if(e&1&&(R(0,`li`,67),N(1,SW,3,2,`button`,62)(2,CW,3,1,`span`,63),R(3,`span`,66),J(4),R(5,`span`,68),J(6),z(),N(7,wW,2,1,`span`,68),z(),N(8,TW,2,1,`span`,69),z()),e&2){let e,n=t.$implicit,r=G(6);j(),P((e=n.target)?1:2,e),j(3),Z(` `,r.describe(n.lastArgs),` → `,r.describe(n.lastResult),` `),j(2),X(``,n.callCount,`×`),j(),P(n.totalMs===void 0?-1:7),j(),P(n.lastCaller?8:-1)}}function DW(e,t){if(e&1&&(R(0,`p`,61),J(1),z()),e&2){let e=G(2);j(),Z(` Showing `,e.instances.length,` of `,e.instanceTotal,` instances. `)}}function OW(e,t){if(e&1&&(R(0,`dt`),J(1,`Per instance`),z(),R(2,`dd`)(3,`ul`,58),F(4,EW,9,6,`li`,67,Og),z(),N(6,DW,2,2,`p`,61),z()),e&2){let e=G();j(4),I(e.instances),j(2),P(e.instanceTotal?6:-1)}}function kW(e,t){if(e&1&&(R(0,`dt`),J(1,`Last caller`),z(),R(2,`dd`,66),J(3),z()),e&2){let e=G();j(3),Y(e.lastCaller)}}function AW(e,t){if(e&1&&(R(0,`dt`),J(1,`Calls`),z(),R(2,`dd`),J(3),z(),N(4,yW,4,3),N(5,xW,5,2),R(6,`dt`),J(7,`Last input`),z(),R(8,`dd`,66),J(9),z(),R(10,`dt`),J(11,`Last output`),z(),R(12,`dd`,66),J(13),z(),N(14,OW,7,1),N(15,kW,4,1)),e&2){let e=t,n=G(4);j(3),Y(e.callCount),j(),P(e.totalMs===void 0?-1:4),j(),P(e.errorCount?5:-1),j(4),Y(n.describe(e.lastArgs)),j(4),Y(n.describe(e.lastResult)),j(),P(e.instances?.length?14:-1),j(),P(e.lastCaller?15:-1)}}function jW(e,t){e&1&&(R(0,`dt`),J(1,`Calls`),z(),R(2,`dd`,70),J(3,`None recorded yet.`),z())}function MW(e,t){e&1&&(R(0,`p`,61),J(1,` The stale check is off for this pipe: it couldn't read the compiled template, which happens in minified builds. `),z())}function NW(e,t){e&1&&(R(0,`p`,61),J(1,`Turn on “Record calls” to see call counts and values.`),z())}function PW(e,t){if(e&1&&(N(0,hW,4,0,`p`,59),R(1,`dl`)(2,`dt`),J(3,`Instances`),z(),R(4,`dd`),J(5),z(),R(6,`dt`),J(7,`Used by`),z(),R(8,`dd`)(9,`ul`,60),F(10,vW,3,1,`li`,null,BU),z()(),N(12,AW,16,7)(13,jW,4,0),z(),N(14,MW,2,0,`p`,61),N(15,NW,2,0,`p`,61)),e&2){let e,n=t,r=G(3);P(n.stale?0:-1),j(5),Y(n.instanceCount),j(5),I(n.components),j(2),P((e=n.call)?12:r.instrumenting()?13:-1,e),j(2),P(n.staleCheck===`unavailable`?14:-1),j(),P(!n.call&&!r.instrumenting()?15:-1)}}function FW(e,t){e&1&&(R(0,`p`,56),J(1,` Not in use on the connected page. Open a view that uses it, or connect the app. `),z())}function IW(e,t){if(e&1&&(R(0,`header`,52)(1,`h2`,53),J(2),z(),R(3,`span`,48),J(4),z(),N(5,lW,2,0,`span`,48),N(6,uW,2,0,`span`,48),z(),R(7,`div`,54)(8,`h3`),J(9,`Declaration`),z(),R(10,`dl`)(11,`dt`),J(12,`Class`),z(),R(13,`dd`,55),J(14),z(),R(15,`dt`),J(16,`Source`),z(),R(17,`dd`),J(18),z(),N(19,dW,4,2),N(20,fW,4,1),R(21,`dt`),J(22,`Pure`),z(),R(23,`dd`),J(24),z()()(),N(25,mW,8,1,`div`,54),R(26,`div`,54)(27,`h3`),J(28,`Live on the page`),z(),N(29,PW,16,5)(30,FW,2,0,`p`,56),z()),e&2){let e,n=t,r=G(2);j(2),Y(n.name),j(),q(`impure`,!n.isPure),j(),Y(n.isPure?`pure`:`impure`),j(),P(n.builtin?5:-1),j(),P(n.runtime?6:-1),j(8),Y(n.className),j(4),Y(r.sourceLabel(n)),j(),P(!n.builtin&&!n.runtime?19:-1),j(),P(n.runtime?-1:20),j(4),X(` `,n.isPure?`Yes, reruns only when an input changes`:`No, reruns on every check`,` `),j(),P(n.usages?.length?25:-1),j(4),P((e=r.liveFor(n.name))?29:30,e)}}function LW(e,t){e&1&&(R(0,`h2`,71),J(1,`Pipe details`),z(),R(2,`div`,72)(3,`p`,30),J(4,`Pick a pipe`),z(),R(5,`p`,31),J(6,` See where it is declared, which components use it and what it last returned. `),z()())}function RW(e,t){if(e&1&&(N(0,JU,9,2,`div`,33),R(1,`div`,34)(2,`div`,35),N(3,aW,3,0,`ul`,36)(4,cW,8,1,`div`,37),z(),R(5,`section`,38),N(6,IW,31,13)(7,LW,7,0),z()()),e&2){let e,t=G();P(t.loadFailed()?0:-1),j(3),P(t.filtered().length?3:4),j(3),P((e=t.selected())?6:7,e)}}function zW(e,t){if(e&1&&(R(0,`p`,61),J(1),z()),e&2){let e=G(2);j(),Z(`Showing `,e.async().length,` of `,t,` subscriptions.`)}}function BW(e,t){if(e&1){let e=U();R(0,`button`,80),W(`click`,function(){let t=D(e);return O(G(3).highlight(t))})(`focus`,function(){let t=D(e);return O(G(3).highlight(t))})(`blur`,function(){return D(e),O(G(3).highlight(null))}),J(1),z()}if(e&2){let e=G().$implicit;M(`aria-label`,`Highlight `+e.component+` on the page`),j(),X(` `,e.component,` `)}}function VW(e,t){if(e&1&&(R(0,`span`,78),J(1),z()),e&2){let e=G().$implicit;j(),Y(e.component)}}function HW(e,t){e&1&&(R(0,`span`,48),J(1,`no source`),z())}function UW(e,t){e&1&&(R(0,`span`,46),J(1,`duplicate subscription`),z())}function WW(e,t){e&1&&(R(0,`span`,46),J(1,`resubscribing`),z())}function GW(e,t){if(e&1){let e=U();R(0,`li`,76),W(`mouseenter`,function(){let t=D(e).$implicit;return O(G(2).highlight(t.target))})(`mouseleave`,function(){return D(e),O(G(2).highlight(null))}),N(1,BW,2,2,`button`,77)(2,VW,2,1,`span`,78),N(3,HW,2,0,`span`,48),N(4,UW,2,0,`span`,46),N(5,WW,2,0,`span`,46),R(6,`span`,79),J(7),z()()}if(e&2){let e,n=t.$implicit;j(),P((e=n.target)?1:2,e),j(2),P(n.hasSource?-1:3),j(),P(n.duplicate?4:-1),j(),P(n.resubscribing?5:-1),j(2),Y(n.latestValue??`no value yet`)}}function KW(e,t){if(e&1&&(R(0,`section`,18)(1,`h2`,73),J(2,` Async subscriptions `),R(3,`span`,21),J(4),z()(),R(5,`p`,61),J(6,` Each `),R(7,`span`,55),J(8,`| async`),z(),J(9,` subscribes on its own. Two on the same source mean the work runs twice. A source that changes on every check, like `),R(10,`span`,55),J(11,`getData() | async`),z(),J(12,`, resubscribes each time. `),z(),N(13,zW,2,2,`p`,61),R(14,`ul`,74),F(15,GW,8,5,`li`,75,Og),z()()),e&2){let e,t=G();j(4),Y(t.async().length),j(9),P((e=t.asyncTotal())?13:-1,e),j(2),I(t.async())}}function qW(e,t){e&1&&(R(0,`span`,21),J(1),z()),e&2&&(j(),Y(t.length))}function JW(e,t){e&1&&(R(0,`p`,22),J(1,`Couldn't run the lint check. Try Refresh.`),z())}function YW(e,t){e&1&&(R(0,`p`,23),J(1,`Checking…`),z())}function XW(e,t){e&1&&(R(0,`p`,24),J(1,`No problems found.`),z())}function ZW(e,t){if(e&1){let e=U();R(0,`button`,90),W(`click`,function(){D(e),G();let t=fv(6);return O(G(2).showPipe(t))}),R(1,`span`,91),J(2,`Show pipe `),z(),J(3),z()}if(e&2){let e=G().$implicit;j(3),X(``,e.pipe,` `)}}function QW(e,t){if(e&1&&J(0),e&2){let e=G().$implicit;X(` `,e.pipe,` `)}}function $W(e,t){if(e&1&&(R(0,`li`,81)(1,`div`,82)(2,`span`,83),J(3),z(),R(4,`code`,84),J(5),z(),uv(6),R(7,`span`,85),N(8,ZW,4,1,`button`,86)(9,QW,1,1),J(10,` · `),B(11,`app-source-link`,57),z()(),R(12,`p`,87),J(13),z(),R(14,`p`,88)(15,`span`,89),J(16,`Fix`),z(),J(17),z()()),e&2){let e=t.$implicit;j(2),M(`data-tone`,e.severity),j(),Y(e.severity),j(2),Y(e.rule),j();let n=dv(G(2).pipeFor(e));j(2),P(n?8:9),j(3),L(`file`,e.file)(`line`,e.line),j(2),Y(e.message),j(4),X(` `,e.fix)}}function eG(e,t){if(e&1&&(R(0,`ul`,25),F(1,$W,18,9,`li`,81,Og),z()),e&2){let e=G();j(),I(e.lint())}}var tG=5e3,nG=[{value:`all`,label:`All pipes`},{value:`custom`,label:`Custom`},{value:`builtin`,label:`Built-in`},{value:`runtime`,label:`Runtime only`},{value:`impure`,label:`Impure`},{value:`live`,label:`On the page`}],rG=class e{destroyRef=T(Ts);host=T(Pl);injector=T(Cs);filterInput=Jv(`filterInput`);rpc=$(null);kindOptions=nG;pipes=A([]);filter=A(``);kind=A(`all`);loading=A(!1);loadFailed=A(!1);selected=A(null);live=A([]);async=A([]);asyncTotal=A(void 0);lint=A(null);lintFailed=A(!1);instrumentedPages=A([]);instrumenting=Q(()=>this.instrumentedPages().length>0);pendingRecord=A(null);recordMessage=A(null);recordLabel=Q(()=>{let e=this.pendingRecord();return e===null?this.instrumenting()?`Stop recording`:`Record calls`:e?`Starting…`:`Stopping…`});pendingTimer;liveByName=Q(()=>new Map(this.live().map(e=>[e.name,e])));allPipes=Q(()=>{let e=this.pipes(),t=new Set(e.map(e=>e.name)),n=this.live().filter(e=>!t.has(e.name)).map(e=>({name:e.name,className:e.className,file:``,line:0,isStandalone:!0,isPure:e.isPure,runtime:!0}));return n.length?[...e,...n]:e});filtered=Q(()=>{let e=this.filter(),t=this.kind()??`all`;return this.allPipes().filter(n=>this.fitsKind(n,t)&&this.fitsQuery(n,e))});pipesByName=Q(()=>{let e=new Map;for(let t of this.allPipes())e.set(t.name,[...e.get(t.name)??[],t]);return e});unsubscribe;constructor(){fc(()=>{let e=this.rpc();e&&(this.refresh(),this.loadLive(e))}),this.destroyRef.onDestroy(()=>{this.unsubscribe?.(),clearTimeout(this.pendingTimer),this.highlight(null)})}async refresh(){let e=this.rpc();if(e){this.loading.set(!0),this.loadFailed.set(!1);try{let t=await e.scope(`pangular`).rpc.call(`get-pipes`);this.pipes.set(t);let n=this.selected();if(n){let e=this.allPipes().find(e=>e.name===n.name&&e.file===n.file);this.selected.set(e??null)}}catch{this.loadFailed.set(!0)}finally{this.loading.set(!1)}this.loadLint(e)}}async loadLint(e){this.lintFailed.set(!1);try{let t=await e.scope(`pangular`).rpc.call(`pipe-lint`);this.lint.set(t)}catch{this.lintFailed.set(!0)}}async loadLive(e){try{let t=await e.scope(`pangular`).rpc.sharedState(`pipe-usage`);if(this.destroyRef.destroyed)return;let n=e=>{let t=e,n=fE(),r=(n?t?.pages?.find(e=>e.pageId===n):void 0)??t;this.live.set(r?.pipes??[]);let i=this.selected();i?.runtime&&!this.liveByName().has(i.name)&&this.selected.set(null),this.async.set(r?.async??[]),this.asyncTotal.set(r?.asyncTotal);let a=t?.instrumented??[];this.instrumentedPages.set(a),this.pendingRecord()===a.length>0&&this.settleRecord(null)};n(t.value()),this.unsubscribe?.(),this.unsubscribe=t.on(`updated`,n)}catch{}}async toggleInstrument(){let e=this.rpc();if(!e||this.pendingRecord()!==null)return;let t=!this.instrumenting();this.recordMessage.set(null),this.pendingRecord.set(t);let n;try{let r=t?{pageId:fE()??void 0,on:t}:{on:t};n=await e.scope(`pangular`).rpc.call(`request-instrument-pipes`,r)}catch{this.settleRecord(`Couldn't reach the devtools server. Try again.`);return}if(this.pendingRecord()===t){if(n?.pages===0){this.settleRecord(`No page is connected. Open your app in the browser with the devtools running, then record again.`);return}clearTimeout(this.pendingTimer),this.pendingTimer=setTimeout(()=>{this.pendingRecord()===t&&this.settleRecord(t?`No page confirmed recording. Reload the app and try again.`:`No page confirmed it stopped recording. Reload the app to stop it.`)},tG)}}settleRecord(e){clearTimeout(this.pendingTimer),this.pendingRecord.set(null),e!==null&&this.recordMessage.set(e)}sourceLabel(e){return e.builtin?`@angular/common`:e.runtime?`Seen on the page only`:`This project`}liveFor(e){return this.liveByName().get(e)}ms(e){return`${e<10?e.toFixed(2):Math.round(e)} ms`}describe(e){if(Array.isArray(e))return e.map(e=>this.describe(e)).join(`, `);if(typeof e==`string`)return e.length>80?`${e.slice(0,80)}…`:e;try{let t=JSON.stringify(e);return t&&t.length>120?`${t.slice(0,120)}…`:t??String(e)}catch{return String(e)}}isSelected(e){let t=this.selected();return t!==null&&t.name===e.name&&t.file===e.file}select(e){this.selected.set(this.isSelected(e)?null:e)}pipeFor(e){let t=this.pipesByName().get(e.pipe);return t?.length?t.find(t=>t.file===e.file)??t[0]:null}showPipe(e){this.fitsQuery(e,this.filter())||this.filter.set(``),this.fitsKind(e,this.kind()??`all`)||this.kind.set(`all`),this.selected.set(e),Bd(()=>{let e=this.host.nativeElement;e.querySelector(`.row.selected`)?.scrollIntoView?.({block:`nearest`}),e.querySelector(`#pipe-detail-title`)?.focus()},{injector:this.injector})}fitsKind(e,t){return t===`custom`?!e.builtin&&!e.runtime:t===`builtin`?!!e.builtin:t===`runtime`?!!e.runtime:t===`impure`?!e.isPure:t!==`live`||this.liveByName().has(e.name)}fitsQuery(e,t){let n=t.trim().toLowerCase();return!n||e.name.toLowerCase().includes(n)||e.className.toLowerCase().includes(n)||e.file.toLowerCase().includes(n)}clearFilters(){this.filter.set(``),this.kind.set(`all`),this.filterInput()?.nativeElement.focus()}highlightPipe(e){this.highlight(e?.components.find(e=>e.targets?.length)?.targets?.[0])}highlight(e,t=!1){let n=this.rpc();n&&n.scope(`pangular`).rpc.call(`request-page-highlight`,e?{...e,...t?{reveal:t}:{}}:null).catch(()=>{})}onListKey(e){if(![`ArrowDown`,`ArrowUp`,`Home`,`End`].includes(e.key))return;let t=Array.from(this.host.nativeElement.querySelectorAll(`[data-pipe-row]`));if(!t.length)return;let n=t.indexOf(document.activeElement),r=n;r=e.key===`ArrowDown`?Math.min(n+1,t.length-1):e.key===`ArrowUp`?Math.max(n-1,0):e.key===`Home`?0:t.length-1,e.preventDefault(),t[r]?.focus()}static ɵfac=function(t){return new(t||e)};static ɵcmp=Gh({type:e,selectors:[[`app-pipes-inspector`]],viewQuery:function(e,t){e&1&&l_(t.filterInput,LU,5),e&2&&u_()},inputs:{rpc:[1,`rpc`]},decls:33,vars:18,consts:[[`filterInput`,``],[1,`intro`],[1,`toolbar`],[1,`search`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`,1,`search-icon`],[`cx`,`11`,`cy`,`11`,`r`,`7`],[`d`,`m20 20-3.5-3.5`],[`type`,`search`,`placeholder`,`Find a pipe, class or file…`,`aria-label`,`Find a pipe, class or file`,`autocomplete`,`off`,`spellcheck`,`false`,3,`input`,`keydown.escape`,`value`],[`ariaLabel`,`Show pipes`,3,`valueChange`,`options`,`value`],[`aria-live`,`polite`,1,`total`],[1,`actions`],[`type`,`button`,3,`click`,`disabled`],[`type`,`button`,1,`record`,3,`click`],[`aria-hidden`,`true`,1,`rec-dot`],[`role`,`status`,1,`notice`],[`role`,`status`,1,`state`],[`role`,`alert`,1,`state`],[1,`state`],[`aria-labelledby`,`async-title`,1,`section`],[`aria-labelledby`,`lint-title`,1,`section`],[`id`,`lint-title`],[1,`pill`],[`role`,`alert`,1,`empty-line`],[`role`,`status`,1,`empty-line`],[1,`empty-line`,`ok`],[1,`findings`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`],[`cx`,`12`,`cy`,`12`,`r`,`9`],[`d`,`M12 11v5M12 8h.01`],[`aria-hidden`,`true`,1,`spinner`],[1,`state-title`],[1,`state-hint`],[`type`,`button`,3,`click`],[`role`,`alert`,1,`notice`,`error`],[1,`layout`],[1,`list-wrap`],[`aria-label`,`Pipes`,1,`pipe-list`],[`role`,`status`,1,`state`,`compact`],[`id`,`pipe-detail`,`aria-labelledby`,`pipe-detail-title`,1,`detail`],[`d`,`M12 8v5M12 16h.01`],[`aria-label`,`Pipes`,1,`pipe-list`,3,`keydown`],[`type`,`button`,`data-pipe-row`,``,`aria-controls`,`pipe-detail`,1,`row`,3,`click`,`mouseenter`,`mouseleave`,`focus`,`blur`],[1,`row-main`],[1,`name`,`mono`],[1,`sub`,`mono`],[1,`row-meta`],[1,`chip`,`warn`],[1,`chip`,`live`],[1,`chip`],[1,`row-file`,`mono`],[1,`no-source`],[1,`more`],[1,`detail-head`],[`id`,`pipe-detail-title`,`tabindex`,`-1`,1,`mono`],[1,`block`],[1,`mono`],[1,`empty-line`],[3,`file`,`line`],[1,`sites`],[`role`,`note`,1,`warning`],[1,`chips`],[1,`hint`],[`type`,`button`,1,`component`],[1,`component`],[`type`,`button`,1,`component`,3,`click`,`mouseenter`,`mouseleave`,`focus`,`blur`],[1,`count`],[1,`mono`,`value`],[1,`instance`],[1,`calls`],[1,`mono`,`value`,`caller`],[1,`muted`],[`id`,`pipe-detail-title`,1,`visually-hidden`],[1,`state`,`compact`],[`id`,`async-title`],[1,`async-list`],[1,`async-row`],[1,`async-row`,3,`mouseenter`,`mouseleave`],[`type`,`button`,1,`component-name`,`mono`],[1,`mono`,`component-name`],[1,`mono`,`value`,`latest`],[`type`,`button`,1,`component-name`,`mono`,3,`click`,`focus`,`blur`],[1,`finding`],[1,`finding-head`],[1,`severity`],[1,`mono`,`rule`],[1,`where`,`mono`],[`type`,`button`,1,`pipe-link`],[1,`finding-message`],[1,`finding-fix`],[1,`fix-label`],[`type`,`button`,1,`pipe-link`,3,`click`],[1,`sr-only`]],template:function(e,t){if(e&1){let e=U();R(0,`p`,1),J(1,` Pipes declared in your source, the built-in pipes your templates use and library pipes seen on the page. Live data shows which components use each pipe on the page; turn on recording to capture calls and the last input and output. `),z(),R(2,`div`,2)(3,`div`,3),k(),R(4,`svg`,4),B(5,`circle`,5)(6,`path`,6),z(),hs(),R(7,`input`,7,0),W(`input`,function(e){return t.filter.set(e.target.value)})(`keydown.escape`,function(){return t.filter.set(``)}),z()(),R(9,`app-select`,8),cv(`valueChange`,function(n){return D(e),sv(t.kind,n)||(t.kind=n),O(n)}),z(),R(10,`span`,9),J(11),z(),R(12,`div`,10)(13,`button`,11),W(`click`,function(){return t.refresh()}),J(14,`Refresh`),z(),R(15,`button`,12),W(`click`,function(){return t.toggleInstrument()}),B(16,`span`,13),J(17),z()()(),N(18,VU,6,1,`p`,14),N(19,HU,8,1,`p`,14),N(20,UU,4,0,`div`,15)(21,WU,7,0,`div`,16)(22,GU,5,0,`div`,17)(23,RW,8,3),N(24,KW,17,2,`section`,18),R(25,`section`,19)(26,`h2`,20),J(27,` Lint `),N(28,qW,2,1,`span`,21),z(),N(29,JW,2,0,`p`,22)(30,YW,2,0,`p`,23)(31,XW,2,0,`p`,24)(32,eG,3,0,`ul`,25),z()}if(e&2){let e,n;j(7),L(`value`,t.filter()),j(2),L(`options`,t.kindOptions),ov(`value`,t.kind),j(2),Z(``,t.filtered().length,` of `,t.allPipes().length),j(2),L(`disabled`,t.loading()),j(2),q(`on`,t.instrumenting()),M(`aria-pressed`,t.instrumenting())(`aria-busy`,t.pendingRecord()!==null)(`aria-disabled`,t.pendingRecord()!==null),j(2),X(` `,t.recordLabel(),` `),j(),P((e=t.recordMessage())?18:-1,e),j(),P(t.instrumenting()?19:-1),j(),P(t.loading()&&t.allPipes().length===0?20:t.loadFailed()&&t.allPipes().length===0?21:t.allPipes().length===0?22:23),j(4),P(t.async().length>0?24:-1),j(4),P((n=t.lint())?28:-1,n),j(),P(t.lintFailed()?29:t.lint()===null?30:t.lint().length?32:31)}},dependencies:[qD,OA],styles:[`[_nghost-%COMP%] { +}`]})},BU=[`filterInput`],VU=(e,t)=>t.file+t.name,HU=(e,t)=>t.file+`:`+t.line,UU=(e,t)=>t.name;function WU(e,t){e&1&&(R(0,`p`,14),k(),R(1,`svg`,26),B(2,`circle`,27)(3,`path`,28),z(),hs(),R(4,`span`),J(5),z()()),e&2&&(j(5),Y(t))}function GU(e,t){if(e&1&&(R(0,`p`,14),k(),R(1,`svg`,26),B(2,`circle`,27)(3,`path`,28),z(),hs(),R(4,`span`)(5,`strong`),J(6),z(),J(7,` Pipe prototypes are patched in the inspected page to count calls and keep the last input and output. Stop recording when you are done. `),z()()),e&2){let e=G();j(6),X(`Recording on `,e.instrumentedPages().length,` page(s).`)}}function KU(e,t){e&1&&(R(0,`div`,15),B(1,`span`,29),R(2,`p`,30),J(3,`Scanning pipes…`),z()())}function qU(e,t){if(e&1){let e=U();R(0,`div`,16)(1,`p`,30),J(2,`Couldn't load pipes`),z(),R(3,`p`,31),J(4,`The devtools server did not answer. Check that it is running.`),z(),R(5,`button`,32),W(`click`,function(){return D(e),O(G().refresh())}),J(6,`Try again`),z()()}}function JU(e,t){e&1&&(R(0,`div`,17)(1,`p`,30),J(2,`No pipes found`),z(),R(3,`p`,31),J(4,` No @Pipe classes were found in the source, and no template uses a built-in pipe yet. `),z()())}function YU(e,t){e&1&&J(0,` Couldn't scan the source again. The list keeps the last scan. `)}function XU(e,t){e&1&&J(0,` Couldn't scan the source. Only pipes seen on the page are listed. `)}function ZU(e,t){if(e&1){let e=U();R(0,`div`,33),k(),R(1,`svg`,26),B(2,`circle`,27)(3,`path`,39),z(),hs(),R(4,`span`),N(5,YU,1,0)(6,XU,1,0),z(),R(7,`button`,11),W(`click`,function(){return D(e),O(G(2).refresh())}),J(8,`Try again`),z()()}if(e&2){let e=G(2);j(5),P(e.pipes().length?5:6),j(2),L(`disabled`,e.loading())}}function QU(e,t){e&1&&(R(0,`span`,46),J(1,`stale?`),z())}function $U(e,t){if(e&1&&(R(0,`span`,47),J(1),z()),e&2){G();let e=fv(0);j(),X(``,e.instanceCount,` live`)}}function eW(e,t){e&1&&(R(0,`span`,48),J(1,`built-in`),z())}function tW(e,t){e&1&&(R(0,`span`,48),J(1,`runtime only`),z())}function nW(e,t){e&1&&(R(0,`span`,48),J(1,`NgModule`),z())}function rW(e,t){e&1&&(R(0,`span`,50),J(1,`No source location`),z())}function iW(e,t){if(e&1&&J(0),e&2){let e=G().$implicit;Z(` `,e.file,`:`,e.line,` `)}}function aW(e,t){if(e&1&&(R(0,`span`,51),J(1),z()),e&2){let e=G().$implicit;j(),X(`+`,(e.usageCount??1)-1,` more`)}}function oW(e,t){if(e&1&&(R(0,`span`,51),J(1),z()),e&2){let e=G().$implicit;j(),Z(``,e.usageCount,` `,e.usageCount===1?`use`:`uses`)}}function sW(e,t){if(e&1){let e=U();uv(0),R(1,`li`)(2,`button`,41),W(`click`,function(){let t=D(e).$implicit;return O(G(3).select(t))})(`mouseenter`,function(){D(e);let t=fv(0);return O(G(3).highlightPipe(t))})(`mouseleave`,function(){return D(e),O(G(3).highlight(null))})(`focus`,function(){D(e);let t=fv(0);return O(G(3).highlightPipe(t))})(`blur`,function(){return D(e),O(G(3).highlight(null))}),R(3,`span`,42)(4,`span`,43),J(5),z(),R(6,`span`,44),J(7),z()(),R(8,`span`,45),N(9,QU,2,0,`span`,46),N(10,$U,2,1,`span`,47),N(11,eW,2,0,`span`,48),N(12,tW,2,0,`span`,48),N(13,nW,2,0,`span`,48),R(14,`span`,48),J(15),z()(),R(16,`span`,49),N(17,rW,2,0,`span`,50)(18,iW,1,2),N(19,aW,2,1,`span`,51)(20,oW,2,2,`span`,51),z()()()}if(e&2){let e=t.$implicit,n=G(3),r=dv(n.liveFor(e.name));j(2),q(`selected`,n.isSelected(e)),M(`aria-current`,n.isSelected(e)||null),j(3),Y(e.name),j(2),Y(e.className),j(2),P(r?.stale?9:-1),j(),P(r?10:-1),j(),P(e.builtin?11:-1),j(),P(e.runtime?12:-1),j(),P(e.isStandalone?-1:13),j(),q(`impure`,!e.isPure),j(),Y(e.isPure?`pure`:`impure`),j(2),P(e.runtime?17:18),j(2),P(e.builtin&&(e.usageCount??0)>1?19:!e.builtin&&e.usageCount?20:-1)}}function cW(e,t){if(e&1){let e=U();R(0,`ul`,40),W(`keydown`,function(t){return D(e),O(G(2).onListKey(t))}),F(1,sW,21,16,`li`,null,VU),z()}if(e&2){let e=G(2);j(),I(e.filtered())}}function lW(e,t){e&1&&J(0),e&2&&X(` Nothing matches “`,G(3).filter().trim(),`” in this view. `)}function uW(e,t){e&1&&J(0,` None of the pipes fit this filter. `)}function dW(e,t){if(e&1){let e=U();R(0,`div`,37)(1,`p`,30),J(2,`No pipes match`),z(),R(3,`p`,31),N(4,lW,1,1)(5,uW,1,0),z(),R(6,`button`,32),W(`click`,function(){return D(e),O(G(2).clearFilters())}),J(7,`Clear filters`),z()()}if(e&2){let e=G(2);j(4),P(e.filter().trim()?4:5)}}function fW(e,t){e&1&&(R(0,`span`,48),J(1,`built-in`),z())}function pW(e,t){e&1&&(R(0,`span`,48),J(1,`runtime only`),z())}function mW(e,t){if(e&1&&(R(0,`dt`),J(1,`File`),z(),R(2,`dd`,55),B(3,`app-source-link`,57),z()),e&2){let e=G();j(3),L(`file`,e.file)(`line`,e.line)}}function hW(e,t){if(e&1&&(R(0,`dt`),J(1,`Standalone`),z(),R(2,`dd`),J(3),z()),e&2){let e=G();j(3),Y(e.isStandalone?`Yes`:`No, declared in an NgModule`)}}function gW(e,t){if(e&1&&(R(0,`li`,55),B(1,`app-source-link`,57),z()),e&2){let e=t.$implicit;j(),L(`file`,e.file)(`line`,e.line)}}function _W(e,t){if(e&1&&(R(0,`div`,54)(1,`h3`),J(2,` Used in templates `),R(3,`span`,21),J(4),z()(),R(5,`ul`,58),F(6,gW,2,2,`li`,55,HU),z()()),e&2){let e=G();j(4),Y(e.usageCount),j(2),I(e.usages)}}function vW(e,t){e&1&&(R(0,`p`,59)(1,`span`,46),J(2,`experimental`),z(),J(3,` This pure pipe got an argument whose contents changed while its reference stayed the same, so it may be showing a stale value. `),z())}function yW(e,t){if(e&1){let e=U();R(0,`button`,64),W(`click`,function(){let t=D(e);return O(G(5).highlight(t,!0))})(`mouseenter`,function(){let t=D(e);return O(G(5).highlight(t))})(`mouseleave`,function(){return D(e),O(G(5).highlight(null))})(`focus`,function(){let t=D(e);return O(G(5).highlight(t))})(`blur`,function(){return D(e),O(G(5).highlight(null))}),R(1,`span`,55),J(2),z(),R(3,`span`,65),J(4),z()()}if(e&2){let e=G().$implicit;M(`aria-label`,`Highlight `+e.name+` on the page`),j(2),Y(e.name),j(2),Y(e.count)}}function bW(e,t){if(e&1&&(R(0,`span`,63)(1,`span`,55),J(2),z(),R(3,`span`,65),J(4),z()()),e&2){let e=G().$implicit;j(2),Y(e.name),j(2),Y(e.count)}}function xW(e,t){if(e&1&&(R(0,`li`),N(1,yW,5,3,`button`,62)(2,bW,5,2,`span`,63),z()),e&2){let e,n=t.$implicit;j(),P((e=n.targets?.[0])?1:2,e)}}function SW(e,t){if(e&1&&(R(0,`dt`),J(1,`Time`),z(),R(2,`dd`),J(3),z()),e&2){let e=G(),t=G(4);j(3),rv(` `,t.ms(e.totalMs),` total, `,t.ms(e.totalMs/e.callCount),` average, `,t.ms(e.maxMs??0),` slowest `)}}function CW(e,t){if(e&1&&(R(0,`span`,66),J(1),z()),e&2){let e=G(2);j(),Y(e.lastError)}}function wW(e,t){if(e&1&&(R(0,`dt`),J(1,`Errors`),z(),R(2,`dd`),J(3),N(4,CW,2,1,`span`,66),z()),e&2){let e=G();j(3),X(` `,e.errorCount,` `),j(),P(e.lastError?4:-1)}}function TW(e,t){if(e&1){let e=U();R(0,`button`,64),W(`click`,function(){let t=D(e);return O(G(7).highlight(t,!0))})(`mouseenter`,function(){let t=D(e);return O(G(7).highlight(t))})(`mouseleave`,function(){return D(e),O(G(7).highlight(null))})(`focus`,function(){let t=D(e);return O(G(7).highlight(t))})(`blur`,function(){return D(e),O(G(7).highlight(null))}),R(1,`span`,55),J(2),z()()}if(e&2){let e=G().$implicit;M(`aria-label`,`Highlight `+e.component+` on the page`),j(2),Y(e.component)}}function EW(e,t){if(e&1&&(R(0,`span`,63)(1,`span`,55),J(2),z()()),e&2){let e=G().$implicit;j(2),Y(e.component)}}function DW(e,t){if(e&1&&(R(0,`span`,68),J(1),z()),e&2){let e=G().$implicit,t=G(6);j(),Y(t.ms(e.totalMs))}}function OW(e,t){if(e&1&&(R(0,`span`,69),J(1),z()),e&2){let e=G().$implicit;j(),Y(e.lastCaller)}}function kW(e,t){if(e&1&&(R(0,`li`,67),N(1,TW,3,2,`button`,62)(2,EW,3,1,`span`,63),R(3,`span`,66),J(4),R(5,`span`,68),J(6),z(),N(7,DW,2,1,`span`,68),z(),N(8,OW,2,1,`span`,69),z()),e&2){let e,n=t.$implicit,r=G(6);j(),P((e=n.target)?1:2,e),j(3),Z(` `,r.describe(n.lastArgs),` → `,r.describe(n.lastResult),` `),j(2),X(``,n.callCount,`×`),j(),P(n.totalMs===void 0?-1:7),j(),P(n.lastCaller?8:-1)}}function AW(e,t){if(e&1&&(R(0,`p`,61),J(1),z()),e&2){let e=G(2);j(),Z(` Showing `,e.instances.length,` of `,e.instanceTotal,` instances. `)}}function jW(e,t){if(e&1&&(R(0,`dt`),J(1,`Per instance`),z(),R(2,`dd`)(3,`ul`,58),F(4,kW,9,6,`li`,67,Og),z(),N(6,AW,2,2,`p`,61),z()),e&2){let e=G();j(4),I(e.instances),j(2),P(e.instanceTotal?6:-1)}}function MW(e,t){if(e&1&&(R(0,`dt`),J(1,`Last caller`),z(),R(2,`dd`,66),J(3),z()),e&2){let e=G();j(3),Y(e.lastCaller)}}function NW(e,t){if(e&1&&(R(0,`dt`),J(1,`Calls`),z(),R(2,`dd`),J(3),z(),N(4,SW,4,3),N(5,wW,5,2),R(6,`dt`),J(7,`Last input`),z(),R(8,`dd`,66),J(9),z(),R(10,`dt`),J(11,`Last output`),z(),R(12,`dd`,66),J(13),z(),N(14,jW,7,1),N(15,MW,4,1)),e&2){let e=t,n=G(4);j(3),Y(e.callCount),j(),P(e.totalMs===void 0?-1:4),j(),P(e.errorCount?5:-1),j(4),Y(n.describe(e.lastArgs)),j(4),Y(n.describe(e.lastResult)),j(),P(e.instances?.length?14:-1),j(),P(e.lastCaller?15:-1)}}function PW(e,t){e&1&&(R(0,`dt`),J(1,`Calls`),z(),R(2,`dd`,70),J(3,`None recorded yet.`),z())}function FW(e,t){e&1&&(R(0,`p`,61),J(1,` The stale check is off for this pipe: it couldn't read the compiled template, which happens in minified builds. `),z())}function IW(e,t){e&1&&(R(0,`p`,61),J(1,`Turn on “Record calls” to see call counts and values.`),z())}function LW(e,t){if(e&1&&(N(0,vW,4,0,`p`,59),R(1,`dl`)(2,`dt`),J(3,`Instances`),z(),R(4,`dd`),J(5),z(),R(6,`dt`),J(7,`Used by`),z(),R(8,`dd`)(9,`ul`,60),F(10,xW,3,1,`li`,null,UU),z()(),N(12,NW,16,7)(13,PW,4,0),z(),N(14,FW,2,0,`p`,61),N(15,IW,2,0,`p`,61)),e&2){let e,n=t,r=G(3);P(n.stale?0:-1),j(5),Y(n.instanceCount),j(5),I(n.components),j(2),P((e=n.call)?12:r.instrumenting()?13:-1,e),j(2),P(n.staleCheck===`unavailable`?14:-1),j(),P(!n.call&&!r.instrumenting()?15:-1)}}function RW(e,t){e&1&&(R(0,`p`,56),J(1,` Not in use on the connected page. Open a view that uses it, or connect the app. `),z())}function zW(e,t){if(e&1&&(R(0,`header`,52)(1,`h2`,53),J(2),z(),R(3,`span`,48),J(4),z(),N(5,fW,2,0,`span`,48),N(6,pW,2,0,`span`,48),z(),R(7,`div`,54)(8,`h3`),J(9,`Declaration`),z(),R(10,`dl`)(11,`dt`),J(12,`Class`),z(),R(13,`dd`,55),J(14),z(),R(15,`dt`),J(16,`Source`),z(),R(17,`dd`),J(18),z(),N(19,mW,4,2),N(20,hW,4,1),R(21,`dt`),J(22,`Pure`),z(),R(23,`dd`),J(24),z()()(),N(25,_W,8,1,`div`,54),R(26,`div`,54)(27,`h3`),J(28,`Live on the page`),z(),N(29,LW,16,5)(30,RW,2,0,`p`,56),z()),e&2){let e,n=t,r=G(2);j(2),Y(n.name),j(),q(`impure`,!n.isPure),j(),Y(n.isPure?`pure`:`impure`),j(),P(n.builtin?5:-1),j(),P(n.runtime?6:-1),j(8),Y(n.className),j(4),Y(r.sourceLabel(n)),j(),P(!n.builtin&&!n.runtime?19:-1),j(),P(n.runtime?-1:20),j(4),X(` `,n.isPure?`Yes, reruns only when an input changes`:`No, reruns on every check`,` `),j(),P(n.usages?.length?25:-1),j(4),P((e=r.liveFor(n.name))?29:30,e)}}function BW(e,t){e&1&&(R(0,`h2`,71),J(1,`Pipe details`),z(),R(2,`div`,72)(3,`p`,30),J(4,`Pick a pipe`),z(),R(5,`p`,31),J(6,` See where it is declared, which components use it and what it last returned. `),z()())}function VW(e,t){if(e&1&&(N(0,ZU,9,2,`div`,33),R(1,`div`,34)(2,`div`,35),N(3,cW,3,0,`ul`,36)(4,dW,8,1,`div`,37),z(),R(5,`section`,38),N(6,zW,31,13)(7,BW,7,0),z()()),e&2){let e,t=G();P(t.loadFailed()?0:-1),j(3),P(t.filtered().length?3:4),j(3),P((e=t.selected())?6:7,e)}}function HW(e,t){if(e&1&&(R(0,`p`,61),J(1),z()),e&2){let e=G(2);j(),Z(`Showing `,e.async().length,` of `,t,` subscriptions.`)}}function UW(e,t){if(e&1){let e=U();R(0,`button`,80),W(`click`,function(){let t=D(e);return O(G(3).highlight(t))})(`focus`,function(){let t=D(e);return O(G(3).highlight(t))})(`blur`,function(){return D(e),O(G(3).highlight(null))}),J(1),z()}if(e&2){let e=G().$implicit;M(`aria-label`,`Highlight `+e.component+` on the page`),j(),X(` `,e.component,` `)}}function WW(e,t){if(e&1&&(R(0,`span`,78),J(1),z()),e&2){let e=G().$implicit;j(),Y(e.component)}}function GW(e,t){e&1&&(R(0,`span`,48),J(1,`no source`),z())}function KW(e,t){e&1&&(R(0,`span`,46),J(1,`duplicate subscription`),z())}function qW(e,t){e&1&&(R(0,`span`,46),J(1,`resubscribing`),z())}function JW(e,t){if(e&1){let e=U();R(0,`li`,76),W(`mouseenter`,function(){let t=D(e).$implicit;return O(G(2).highlight(t.target))})(`mouseleave`,function(){return D(e),O(G(2).highlight(null))}),N(1,UW,2,2,`button`,77)(2,WW,2,1,`span`,78),N(3,GW,2,0,`span`,48),N(4,KW,2,0,`span`,46),N(5,qW,2,0,`span`,46),R(6,`span`,79),J(7),z()()}if(e&2){let e,n=t.$implicit;j(),P((e=n.target)?1:2,e),j(2),P(n.hasSource?-1:3),j(),P(n.duplicate?4:-1),j(),P(n.resubscribing?5:-1),j(2),Y(n.latestValue??`no value yet`)}}function YW(e,t){if(e&1&&(R(0,`section`,18)(1,`h2`,73),J(2,` Async subscriptions `),R(3,`span`,21),J(4),z()(),R(5,`p`,61),J(6,` Each `),R(7,`span`,55),J(8,`| async`),z(),J(9,` subscribes on its own. Two on the same source mean the work runs twice. A source that changes on every check, like `),R(10,`span`,55),J(11,`getData() | async`),z(),J(12,`, resubscribes each time. `),z(),N(13,HW,2,2,`p`,61),R(14,`ul`,74),F(15,JW,8,5,`li`,75,Og),z()()),e&2){let e,t=G();j(4),Y(t.async().length),j(9),P((e=t.asyncTotal())?13:-1,e),j(2),I(t.async())}}function XW(e,t){e&1&&(R(0,`span`,21),J(1),z()),e&2&&(j(),Y(t.length))}function ZW(e,t){e&1&&(R(0,`p`,22),J(1,`Couldn't run the lint check. Try Refresh.`),z())}function QW(e,t){e&1&&(R(0,`p`,23),J(1,`Checking…`),z())}function $W(e,t){e&1&&(R(0,`p`,24),J(1,`No problems found.`),z())}function eG(e,t){if(e&1){let e=U();R(0,`button`,90),W(`click`,function(){D(e),G();let t=fv(6);return O(G(2).showPipe(t))}),R(1,`span`,91),J(2,`Show pipe `),z(),J(3),z()}if(e&2){let e=G().$implicit;j(3),X(``,e.pipe,` `)}}function tG(e,t){if(e&1&&J(0),e&2){let e=G().$implicit;X(` `,e.pipe,` `)}}function nG(e,t){if(e&1&&(R(0,`li`,81)(1,`div`,82)(2,`span`,83),J(3),z(),R(4,`code`,84),J(5),z(),uv(6),R(7,`span`,85),N(8,eG,4,1,`button`,86)(9,tG,1,1),J(10,` · `),B(11,`app-source-link`,57),z()(),R(12,`p`,87),J(13),z(),R(14,`p`,88)(15,`span`,89),J(16,`Fix`),z(),J(17),z()()),e&2){let e=t.$implicit;j(2),M(`data-tone`,e.severity),j(),Y(e.severity),j(2),Y(e.rule),j();let n=dv(G(2).pipeFor(e));j(2),P(n?8:9),j(3),L(`file`,e.file)(`line`,e.line),j(2),Y(e.message),j(4),X(` `,e.fix)}}function rG(e,t){if(e&1&&(R(0,`ul`,25),F(1,nG,18,9,`li`,81,Og),z()),e&2){let e=G();j(),I(e.lint())}}var iG=5e3,aG=[{value:`all`,label:`All pipes`},{value:`custom`,label:`Custom`},{value:`builtin`,label:`Built-in`},{value:`runtime`,label:`Runtime only`},{value:`impure`,label:`Impure`},{value:`live`,label:`On the page`}],oG=class e{destroyRef=T(Ts);host=T(Pl);injector=T(Cs);filterInput=Jv(`filterInput`);rpc=$(null);kindOptions=aG;pipes=A([]);filter=A(``);kind=A(`all`);loading=A(!1);loadFailed=A(!1);selected=A(null);live=A([]);async=A([]);asyncTotal=A(void 0);lint=A(null);lintFailed=A(!1);instrumentedPages=A([]);instrumenting=Q(()=>this.instrumentedPages().length>0);pendingRecord=A(null);recordMessage=A(null);recordLabel=Q(()=>{let e=this.pendingRecord();return e===null?this.instrumenting()?`Stop recording`:`Record calls`:e?`Starting…`:`Stopping…`});pendingTimer;liveByName=Q(()=>new Map(this.live().map(e=>[e.name,e])));allPipes=Q(()=>{let e=this.pipes(),t=new Set(e.map(e=>e.name)),n=this.live().filter(e=>!t.has(e.name)).map(e=>({name:e.name,className:e.className,file:``,line:0,isStandalone:!0,isPure:e.isPure,runtime:!0}));return n.length?[...e,...n]:e});filtered=Q(()=>{let e=this.filter(),t=this.kind()??`all`;return this.allPipes().filter(n=>this.fitsKind(n,t)&&this.fitsQuery(n,e))});pipesByName=Q(()=>{let e=new Map;for(let t of this.allPipes())e.set(t.name,[...e.get(t.name)??[],t]);return e});unsubscribe;constructor(){fc(()=>{let e=this.rpc();e&&(this.refresh(),this.loadLive(e))}),this.destroyRef.onDestroy(()=>{this.unsubscribe?.(),clearTimeout(this.pendingTimer),this.highlight(null)})}async refresh(){let e=this.rpc();if(e){this.loading.set(!0),this.loadFailed.set(!1);try{let t=await e.scope(`pangular`).rpc.call(`get-pipes`);this.pipes.set(t);let n=this.selected();if(n){let e=this.allPipes().find(e=>e.name===n.name&&e.file===n.file);this.selected.set(e??null)}}catch{this.loadFailed.set(!0)}finally{this.loading.set(!1)}this.loadLint(e)}}async loadLint(e){this.lintFailed.set(!1);try{let t=await e.scope(`pangular`).rpc.call(`pipe-lint`);this.lint.set(t)}catch{this.lintFailed.set(!0)}}async loadLive(e){try{let t=await e.scope(`pangular`).rpc.sharedState(`pipe-usage`);if(this.destroyRef.destroyed)return;let n=e=>{let t=e,n=fE(),r=(n?t?.pages?.find(e=>e.pageId===n):void 0)??t;this.live.set(r?.pipes??[]);let i=this.selected();i?.runtime&&!this.liveByName().has(i.name)&&this.selected.set(null),this.async.set(r?.async??[]),this.asyncTotal.set(r?.asyncTotal);let a=t?.instrumented??[];this.instrumentedPages.set(a),this.pendingRecord()===a.length>0&&this.settleRecord(null)};n(t.value()),this.unsubscribe?.(),this.unsubscribe=t.on(`updated`,n)}catch{}}async toggleInstrument(){let e=this.rpc();if(!e||this.pendingRecord()!==null)return;let t=!this.instrumenting();this.recordMessage.set(null),this.pendingRecord.set(t);let n;try{let r=t?{pageId:fE()??void 0,on:t}:{on:t};n=await e.scope(`pangular`).rpc.call(`request-instrument-pipes`,r)}catch{this.settleRecord(`Couldn't reach the devtools server. Try again.`);return}if(this.pendingRecord()===t){if(n?.pages===0){this.settleRecord(`No page is connected. Open your app in the browser with the devtools running, then record again.`);return}clearTimeout(this.pendingTimer),this.pendingTimer=setTimeout(()=>{this.pendingRecord()===t&&this.settleRecord(t?`No page confirmed recording. Reload the app and try again.`:`No page confirmed it stopped recording. Reload the app to stop it.`)},iG)}}settleRecord(e){clearTimeout(this.pendingTimer),this.pendingRecord.set(null),e!==null&&this.recordMessage.set(e)}sourceLabel(e){return e.builtin?`@angular/common`:e.runtime?`Seen on the page only`:`This project`}liveFor(e){return this.liveByName().get(e)}ms(e){return`${e<10?e.toFixed(2):Math.round(e)} ms`}describe(e){if(Array.isArray(e))return e.map(e=>this.describe(e)).join(`, `);if(typeof e==`string`)return e.length>80?`${e.slice(0,80)}…`:e;try{let t=JSON.stringify(e);return t&&t.length>120?`${t.slice(0,120)}…`:t??String(e)}catch{return String(e)}}isSelected(e){let t=this.selected();return t!==null&&t.name===e.name&&t.file===e.file}select(e){this.selected.set(this.isSelected(e)?null:e)}pipeFor(e){let t=this.pipesByName().get(e.pipe);return t?.length?t.find(t=>t.file===e.file)??t[0]:null}showPipe(e){this.fitsQuery(e,this.filter())||this.filter.set(``),this.fitsKind(e,this.kind()??`all`)||this.kind.set(`all`),this.selected.set(e),Bd(()=>{let e=this.host.nativeElement;e.querySelector(`.row.selected`)?.scrollIntoView?.({block:`nearest`}),e.querySelector(`#pipe-detail-title`)?.focus()},{injector:this.injector})}fitsKind(e,t){return t===`custom`?!e.builtin&&!e.runtime:t===`builtin`?!!e.builtin:t===`runtime`?!!e.runtime:t===`impure`?!e.isPure:t!==`live`||this.liveByName().has(e.name)}fitsQuery(e,t){let n=t.trim().toLowerCase();return!n||e.name.toLowerCase().includes(n)||e.className.toLowerCase().includes(n)||e.file.toLowerCase().includes(n)}clearFilters(){this.filter.set(``),this.kind.set(`all`),this.filterInput()?.nativeElement.focus()}highlightPipe(e){this.highlight(e?.components.find(e=>e.targets?.length)?.targets?.[0])}highlight(e,t=!1){let n=this.rpc();n&&n.scope(`pangular`).rpc.call(`request-page-highlight`,e?{...e,...t?{reveal:t}:{}}:null).catch(()=>{})}onListKey(e){if(![`ArrowDown`,`ArrowUp`,`Home`,`End`].includes(e.key))return;let t=Array.from(this.host.nativeElement.querySelectorAll(`[data-pipe-row]`));if(!t.length)return;let n=t.indexOf(document.activeElement),r=n;r=e.key===`ArrowDown`?Math.min(n+1,t.length-1):e.key===`ArrowUp`?Math.max(n-1,0):e.key===`Home`?0:t.length-1,e.preventDefault(),t[r]?.focus()}static ɵfac=function(t){return new(t||e)};static ɵcmp=Gh({type:e,selectors:[[`app-pipes-inspector`]],viewQuery:function(e,t){e&1&&l_(t.filterInput,BU,5),e&2&&u_()},inputs:{rpc:[1,`rpc`]},decls:33,vars:18,consts:[[`filterInput`,``],[1,`intro`],[1,`toolbar`],[1,`search`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`,1,`search-icon`],[`cx`,`11`,`cy`,`11`,`r`,`7`],[`d`,`m20 20-3.5-3.5`],[`type`,`search`,`placeholder`,`Find a pipe, class or file…`,`aria-label`,`Find a pipe, class or file`,`autocomplete`,`off`,`spellcheck`,`false`,3,`input`,`keydown.escape`,`value`],[`ariaLabel`,`Show pipes`,3,`valueChange`,`options`,`value`],[`aria-live`,`polite`,1,`total`],[1,`actions`],[`type`,`button`,3,`click`,`disabled`],[`type`,`button`,1,`record`,3,`click`],[`aria-hidden`,`true`,1,`rec-dot`],[`role`,`status`,1,`notice`],[`role`,`status`,1,`state`],[`role`,`alert`,1,`state`],[1,`state`],[`aria-labelledby`,`async-title`,1,`section`],[`aria-labelledby`,`lint-title`,1,`section`],[`id`,`lint-title`],[1,`pill`],[`role`,`alert`,1,`empty-line`],[`role`,`status`,1,`empty-line`],[1,`empty-line`,`ok`],[1,`findings`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`],[`cx`,`12`,`cy`,`12`,`r`,`9`],[`d`,`M12 11v5M12 8h.01`],[`aria-hidden`,`true`,1,`spinner`],[1,`state-title`],[1,`state-hint`],[`type`,`button`,3,`click`],[`role`,`alert`,1,`notice`,`error`],[1,`layout`],[1,`list-wrap`],[`aria-label`,`Pipes`,1,`pipe-list`],[`role`,`status`,1,`state`,`compact`],[`id`,`pipe-detail`,`aria-labelledby`,`pipe-detail-title`,1,`detail`],[`d`,`M12 8v5M12 16h.01`],[`aria-label`,`Pipes`,1,`pipe-list`,3,`keydown`],[`type`,`button`,`data-pipe-row`,``,`aria-controls`,`pipe-detail`,1,`row`,3,`click`,`mouseenter`,`mouseleave`,`focus`,`blur`],[1,`row-main`],[1,`name`,`mono`],[1,`sub`,`mono`],[1,`row-meta`],[1,`chip`,`warn`],[1,`chip`,`live`],[1,`chip`],[1,`row-file`,`mono`],[1,`no-source`],[1,`more`],[1,`detail-head`],[`id`,`pipe-detail-title`,`tabindex`,`-1`,1,`mono`],[1,`block`],[1,`mono`],[1,`empty-line`],[3,`file`,`line`],[1,`sites`],[`role`,`note`,1,`warning`],[1,`chips`],[1,`hint`],[`type`,`button`,1,`component`],[1,`component`],[`type`,`button`,1,`component`,3,`click`,`mouseenter`,`mouseleave`,`focus`,`blur`],[1,`count`],[1,`mono`,`value`],[1,`instance`],[1,`calls`],[1,`mono`,`value`,`caller`],[1,`muted`],[`id`,`pipe-detail-title`,1,`visually-hidden`],[1,`state`,`compact`],[`id`,`async-title`],[1,`async-list`],[1,`async-row`],[1,`async-row`,3,`mouseenter`,`mouseleave`],[`type`,`button`,1,`component-name`,`mono`],[1,`mono`,`component-name`],[1,`mono`,`value`,`latest`],[`type`,`button`,1,`component-name`,`mono`,3,`click`,`focus`,`blur`],[1,`finding`],[1,`finding-head`],[1,`severity`],[1,`mono`,`rule`],[1,`where`,`mono`],[`type`,`button`,1,`pipe-link`],[1,`finding-message`],[1,`finding-fix`],[1,`fix-label`],[`type`,`button`,1,`pipe-link`,3,`click`],[1,`sr-only`]],template:function(e,t){if(e&1){let e=U();R(0,`p`,1),J(1,` Pipes declared in your source, the built-in pipes your templates use and library pipes seen on the page. Live data shows which components use each pipe on the page; turn on recording to capture calls and the last input and output. `),z(),R(2,`div`,2)(3,`div`,3),k(),R(4,`svg`,4),B(5,`circle`,5)(6,`path`,6),z(),hs(),R(7,`input`,7,0),W(`input`,function(e){return t.filter.set(e.target.value)})(`keydown.escape`,function(){return t.filter.set(``)}),z()(),R(9,`app-select`,8),cv(`valueChange`,function(n){return D(e),sv(t.kind,n)||(t.kind=n),O(n)}),z(),R(10,`span`,9),J(11),z(),R(12,`div`,10)(13,`button`,11),W(`click`,function(){return t.refresh()}),J(14,`Refresh`),z(),R(15,`button`,12),W(`click`,function(){return t.toggleInstrument()}),B(16,`span`,13),J(17),z()()(),N(18,WU,6,1,`p`,14),N(19,GU,8,1,`p`,14),N(20,KU,4,0,`div`,15)(21,qU,7,0,`div`,16)(22,JU,5,0,`div`,17)(23,VW,8,3),N(24,YW,17,2,`section`,18),R(25,`section`,19)(26,`h2`,20),J(27,` Lint `),N(28,XW,2,1,`span`,21),z(),N(29,ZW,2,0,`p`,22)(30,QW,2,0,`p`,23)(31,$W,2,0,`p`,24)(32,rG,3,0,`ul`,25),z()}if(e&2){let e,n;j(7),L(`value`,t.filter()),j(2),L(`options`,t.kindOptions),ov(`value`,t.kind),j(2),Z(``,t.filtered().length,` of `,t.allPipes().length),j(2),L(`disabled`,t.loading()),j(2),q(`on`,t.instrumenting()),M(`aria-pressed`,t.instrumenting())(`aria-busy`,t.pendingRecord()!==null)(`aria-disabled`,t.pendingRecord()!==null),j(2),X(` `,t.recordLabel(),` `),j(),P((e=t.recordMessage())?18:-1,e),j(),P(t.instrumenting()?19:-1),j(),P(t.loading()&&t.allPipes().length===0?20:t.loadFailed()&&t.allPipes().length===0?21:t.allPipes().length===0?22:23),j(4),P(t.async().length>0?24:-1),j(4),P((n=t.lint())?28:-1,n),j(),P(t.lintFailed()?29:t.lint()===null?30:t.lint().length?32:31)}},dependencies:[qD,jA],styles:[`[_nghost-%COMP%] { display: block; color: var(--%NS%text); font-size: 13px; @@ -11592,7 +11616,7 @@ button.pipe-link[_ngcontent-%COMP%]:focus-visible { .spinner[_ngcontent-%COMP%] { animation: none; } -}`]})},iG=()=>[],aG=()=>[`/`],oG=(e,t)=>t.id,sG=(e,t)=>t.route.id,cG=(e,t)=>t[0],lG=(e,t)=>t.file+t.method,uG=(e,t)=>t.path,dG=(e,t)=>t.mode,fG=(e,t)=>t.file,pG=(e,t)=>t.rule;function mG(e,t){if(e&1){let e=U();R(0,`div`,0)(1,`h2`,3),J(2,`Could not read the project.`),z(),R(3,`p`,4),J(4,` Check that the dev server with Pangular Inspector is still running, then retry. `),z(),R(5,`button`,5),W(`click`,function(){return D(e),O(G().retry())}),J(6,`Retry`),z()()}}function hG(e,t){e&1&&(R(0,`div`,1),B(1,`span`,6),R(2,`span`),J(3,`Reading the project…`),z()())}function gG(e,t){e&1&&(R(0,`div`,2)(1,`h2`,3),J(2,`This app is not an Analog app.`),z(),R(3,`p`,4),J(4,` Add `),R(5,`code`),J(6,`pangular()`),z(),J(7,` from `),R(8,`code`),J(9,`@pangular-inspector/devtools/vite`),z(),J(10,` next to `),R(11,`code`),J(12,`analog()`),z(),J(13,` in vite.config.ts and run the Analog dev server. `),z()())}function _G(e,t){if(e&1&&(R(0,`div`,11)(1,`span`,9),J(2,`Open in the browser`),z(),R(3,`span`,15),J(4),z()()),e&2){let e=t;j(3),L(`title`,e.url),j(),Y(e.url)}}function vG(e,t){if(e&1){let e=U();R(0,`button`,16),W(`click`,function(){let t=D(e).$implicit;return O(G(2).view.set(t.id))}),J(1),R(2,`span`,17),J(3),z()()}if(e&2){let e=t.$implicit,n=G(2);L(`id`,`analog-tab-`+e.id),M(`aria-selected`,e.id===n.view())(`aria-controls`,`analog-panel-`+e.id)(`tabindex`,e.id===n.view()?0:-1),j(),X(` `,e.label,` `),j(),M(`data-tone`,e.tone),j(),Y(e.count)}}function yG(e,t){e&1&&(R(0,`div`,26),J(1),z()),e&2&&(j(),Y(t))}function bG(e,t){if(e&1&&(R(0,`app-source-link`,34),J(1),z()),e&2){let e=G().$implicit,t=G(5);L(`file`,e.file),j(),Y(t.short(e.file))}}function xG(e,t){if(e&1&&(R(0,`span`,31),J(1),z()),e&2){let e=G().$implicit;j(),Y(e.fullPath)}}function SG(e,t){if(e&1&&(R(0,`li`),N(1,bG,2,2,`app-source-link`,34)(2,xG,2,1,`span`,31),R(3,`span`,35),J(4),z()()),e&2){let e=t.$implicit;j(),P(e.file?1:2),j(2),M(`data-kind`,e.kind),j(),Y(e.kind)}}function CG(e,t){if(e&1&&(R(0,`span`,36),J(1),z()),e&2){let e=t.$implicit;j(),Z(``,e[0],` = `,e[1])}}function wG(e,t){if(e&1&&(R(0,`div`,33),F(1,CG,2,2,`span`,36,cG),z()),e&2){let e=G(2),t=G(3);j(),I(t.paramList(e.match.params))}}function TG(e,t){if(e&1&&(R(0,`strong`,31),J(1),z(),J(2,` renders `),R(3,`ol`,32),F(4,SG,5,3,`li`,null,oG),z(),N(6,wG,3,0,`div`,33)),e&2){let e=G(),t=G(3);j(),Y(e.url),j(3),I(e.match.chain),j(2),P(t.paramList(e.match.params).length?6:-1)}}function EG(e,t){if(e&1&&(R(0,`app-source-link`,34),J(1),z()),e&2){let e=G().$implicit,t=G(6);L(`file`,e.file),j(),Y(t.short(e.file))}}function DG(e,t){if(e&1&&(R(0,`span`,31),J(1),z()),e&2){let e=G().$implicit;j(),Y(e.path)}}function OG(e,t){if(e&1&&(R(0,`li`),N(1,EG,2,2,`app-source-link`,34)(2,DG,2,1,`span`,31),R(3,`span`,4),J(4),z()()),e&2){let e=t.$implicit;j(),P(e.file?1:2),j(3),Y(e.reason)}}function kG(e,t){if(e&1&&(R(0,`ul`,37),F(1,OG,5,2,`li`,null,Og),z()),e&2){let e=G(2);j(),I(e.match.rejected.slice(0,5))}}function AG(e,t){if(e&1&&(R(0,`strong`,31),J(1),z(),J(2,` matches no file route. Angular throws NG04002 "Cannot match any routes". `),N(3,kG,3,0,`ul`,37)),e&2){let e=G();j(),Y(e.url),j(2),P(e.match.rejected.length?3:-1)}}function jG(e,t){if(e&1&&(R(0,`div`,27),N(1,TG,7,2)(2,AG,4,2),z()),e&2){let e=t;M(`data-tone`,e.match.matched?`good`:`bad`),j(),P(e.match.matched?1:2)}}function MG(e,t){e&1&&(R(0,`span`,39),J(1,`└`),z())}function NG(e,t){e&1&&(R(0,`span`,41),J(1,`open`),z())}function PG(e,t){if(e&1&&(R(0,`app-source-link`,42)(1,`span`,46),J(2),z(),J(3),z()),e&2){let e=G().$implicit,t=G(3);L(`file`,e.route.file),j(2),Y(t.dir(e.route.file)),j(),Y(t.base(e.route.file))}}function FG(e,t){e&1&&(R(0,`span`,4),J(1,`folder only`),z())}function IG(e,t){if(e&1&&(R(0,`span`,44),J(1),z()),e&2){let e=t.$implicit;j(),X(``,e,`()`)}}function LG(e,t){if(e&1&&(R(0,`span`,45),J(1),z()),e&2){let e=G().$implicit;j(),X(`"`,e.route.title,`"`)}}function RG(e,t){if(e&1&&(R(0,`span`,36),J(1),z()),e&2){let e=G().$implicit;j(),Y(e)}}function zG(e,t){if(e&1&&N(0,RG,2,1,`span`,36),e&2){let e=t.$implicit;P(e===`title`?-1:0)}}function BG(e,t){if(e&1&&(R(0,`tr`)(1,`td`)(2,`div`,38),N(3,MG,2,0,`span`,39),R(4,`span`,40),J(5),z(),R(6,`span`,35),J(7),z(),N(8,NG,2,0,`span`,41),z()(),R(9,`td`),N(10,PG,4,3,`app-source-link`,42)(11,FG,2,0,`span`,4),z(),R(12,`td`)(13,`div`,43),F(14,IG,2,1,`span`,44,kg),z()(),R(16,`td`),N(17,LG,2,1,`span`,45),F(18,zG,1,1,null,null,kg),z()()),e&2){let e=t.$implicit,n=G(3);q(`open`,n.isOpen(e.route))(`dim`,e.route.kind===`group`||e.route.kind===`implicit`),j(2),K(`padding-left`,e.depth*16,`px`),j(),P(e.depth?3:-1),j(2),Y(e.route.fullPath),j(),M(`data-kind`,e.route.kind),j(),Y(n.kindText(e.route)),j(),P(n.isOpen(e.route)?8:-1),j(2),P(e.route.file?10:11),j(4),I(n.serverExports(e.route)),j(3),P(e.route.title?17:-1),j(),I(e.route.routeMeta??mv(13,iG))}}function VG(e,t){e&1&&J(0,` No route matches the filter. Try part of a path or a file name. `)}function HG(e,t){e&1&&J(0,` No file routes yet. Add a .page.ts file under src/app/pages. `)}function UG(e,t){if(e&1&&(R(0,`tr`)(1,`td`,47),N(2,VG,1,0)(3,HG,1,0),z()()),e&2){let e=G(3);j(2),P(e.filter().trim()?2:3)}}function WG(e,t){if(e&1){let e=U();R(0,`div`,18)(1,`form`,19),W(`submit`,function(t){D(e);let n=G(2);return t.preventDefault(),O(n.explain())}),R(2,`label`,20),J(3,`Test a URL`),z(),R(4,`input`,21),W(`input`,function(t){return D(e),O(G(2).testUrl.set(t.target.value))}),z(),R(5,`button`,22),J(6),z()(),R(7,`label`,23),J(8,`Filter routes`),z(),R(9,`input`,24),W(`input`,function(t){return D(e),O(G(2).filter.set(t.target.value))})(`keydown.escape`,function(){return D(e),O(G(2).filter.set(``))}),z()(),R(10,`div`,25),N(11,yG,2,1,`div`,26)(12,jG,3,2,`div`,27),z(),R(13,`div`,28)(14,`table`)(15,`thead`)(16,`tr`)(17,`th`,29),J(18,`Route`),z(),R(19,`th`,29),J(20,`File`),z(),R(21,`th`,29),J(22,`Data`),z(),R(23,`th`,29),J(24,`Route meta`),z()()(),R(25,`tbody`),F(26,BG,20,14,`tr`,30,sG,!1,UG,4,1,`tr`),z()()()}if(e&2){let e,t=G(2);j(4),L(`value`,t.testUrl()),j(),L(`disabled`,t.explaining()),j(),X(` `,t.explaining()?`Explaining…`:`Explain`,` `),j(3),L(`value`,t.filter()),j(2),P((e=t.explainError())?11:(e=t.explained())?12:-1,e),j(15),I(t.routeRows())}}function GG(e,t){if(e&1&&(R(0,`span`,31),J(1),z(),J(2)),e&2){let e=t.$implicit,n=t.$index,r=t.$count;j(),Y(e),j(),X(``,n===r-1?``:`, `,` `)}}function KG(e,t){if(e&1&&(R(0,`div`,48)(1,`strong`),J(2,`load() ran twice`),z(),J(3,` for `),F(4,GG,3,2,null,null,kg),J(6,` : once while server rendering, again in the browser. TransferState did not serve the server result. `),z()),e&2){let e=G(3);j(4),I(e.duplicates())}}function qG(e,t){if(e&1&&(R(0,`span`,31),J(1),z(),J(2)),e&2){let e=t.$implicit,n=t.$index,r=t.$count;j(),Y(e),j(),X(``,n===r-1?``:`, `,` `)}}function JG(e,t){if(e&1&&(R(0,`div`,48)(1,`strong`),J(2,`Server function read ran twice`),z(),J(3,`: `),F(4,qG,3,2,null,null,kg),J(6,` ran while server rendering, then again in the browser. The browser did not use the TransferState seed. `),z()),e&2){let e=G(3);j(4),I(e.refetchedFns())}}function YG(e,t){if(e&1){let e=U();R(0,`label`)(1,`input`,80),W(`change`,function(){let t=D(e).$implicit;return O(G(3).kind.set(t))}),z(),J(2),R(3,`span`,4),J(4),z()()}if(e&2){let e=t.$implicit,n=G(3);q(`on`,n.kind()===e),j(),L(`checked`,n.kind()===e),M(`data-kind`,e),j(),X(` `,n.kindLabel(e),` `),j(2),Y(n.kindCount(e))}}function XG(e,t){if(e&1&&J(0),e&2){let e=G(4);Z(` Showing the newest `,e.shownCount(),` of `,e.matchingCalls().length,`. `)}}function ZG(e,t){e&1&&J(0),e&2&&X(` The dev server keeps only the newest `,G(4).maxServerCalls,` calls and drops older ones. `)}function QG(e,t){if(e&1&&(R(0,`p`,66),N(1,XG,1,2),N(2,ZG,1,1),z()),e&2){let e=G(3);j(),P(e.shownCount()1?6:-1),j(2),Y(e.summary),j(2),I(e.items),j(5),X(` `,e.fix),j(2),Y(e.rule)}}function dq(e,t){if(e&1&&(R(0,`p`,4),J(1),z(),R(2,`ul`,113),F(3,uq,18,8,`li`,null,pG),z()),e&2){let e=G(3);j(),Z(` `,e.findings().length,` issue(s) in `,e.lintCards().length,` group(s). Each card says what is wrong, where, and how to fix it. `),j(2),I(e.lintCards())}}function fq(e,t){e&1&&(R(0,`div`,112)(1,`strong`),J(2,`No Analog problems found.`),z(),J(3,` Routes, server files, prerender config and content all check out. `),z())}function pq(e,t){e&1&&N(0,dq,5,2)(1,fq,4,0,`div`,112),e&2&&P(+!G(2).findings().length)}function mq(e,t){if(e&1){let e=U();R(0,`section`,7)(1,`div`,8)(2,`span`,9),J(3,`Analog`),z(),R(4,`span`,10),J(5),z()(),R(6,`div`,8)(7,`span`,9),J(8,`Pages`),z(),R(9,`span`,10),J(10),z()(),R(11,`div`,8)(12,`span`,9),J(13,`API routes`),z(),R(14,`span`,10),J(15),z()(),R(16,`div`,8)(17,`span`,9),J(18,`Server calls`),z(),R(19,`span`,10),J(20),z()(),R(21,`div`,8)(22,`span`,9),J(23,`Issues`),z(),R(24,`span`,10),J(25),z()(),N(26,_G,5,2,`div`,11),z(),R(27,`div`,12),W(`keydown`,function(t){return D(e),O(G().onKey(t))}),F(28,vG,4,7,`button`,13,oG),z(),R(30,`div`,14),N(31,WG,29,6)(32,OK,65,21)(33,QK,18,3)(34,iq,2,1)(35,pq,2,1),z()}if(e&2){let e,t,n=G();j(5),Y(n.project().version||`unknown`),j(5),Y(n.pageCount()),j(5),Y(n.project().api.length),j(5),Y(n.allCalls().length),j(),M(`data-tone`,n.lintTone()||`good`),j(4),Y(n.lintCount().errors+n.lintCount().warnings),j(),P((e=n.page())?26:-1,e),j(2),I(n.views()),j(2),L(`id`,`analog-panel-`+n.view()),M(`aria-labelledby`,`analog-tab-`+n.view()),j(),P((t=n.view())===`routes`?31:t===`server`?32:t===`render`?33:t===`content`?34:t===`lint`?35:-1)}}var hq={"scan-error":{title:`A folder could not be read`,summary:`Its files are missing from routes, API routes and lint results.`},"duplicate-url":{title:`Two files serve the same URL`,summary:`Only one of them is reachable; the other never renders.`},"sibling-params":{title:`Two dynamic pages in one folder`,summary:`Both are [param] pages at the same level, so the first one always wins.`},"missing-default-export":{title:`Page has no default export`,summary:`Analog needs the component as the default export, so the page renders nothing.`},"redirect-with-component":{title:`Redirect page also exports a component`,summary:`The redirect runs first, so the component never shows.`},"redirect-path-match":{title:`Redirect matches too much`,summary:`An empty-path redirect without pathMatch "full" catches every URL below it.`},"layout-without-outlet":{title:`Layout has no router-outlet`,summary:`The layout has child pages, but without they never render.`},"server-without-load":{title:`.server.ts without load or action`,summary:`The server file exports no load, action or server function, so Analog calls nothing.`},"orphan-server-file":{title:`.server.ts without a page`,summary:`No page file sits next to it, so its load never runs.`},"api-method-suffix":{title:`Unknown method suffix on an API file`,summary:`The suffix is not an HTTP method, so it becomes part of the URL.`},"duplicate-api-route":{title:`Two handlers for one API route`,summary:`Two files answer the same method and path.`},"api-outside-prefix":{title:`Server route outside the API prefix`,summary:`During vite dev only routes under the prefix reach Nitro.`},"prerender-unknown-route":{title:`Prerender entry matches no page`,summary:`prerender.routes lists a path that no page file serves.`},"prerender-missing-root":{title:`Home page is not prerendered`,summary:`static is on, but prerender.routes leaves out /.`},"content-frontmatter":{title:`Broken frontmatter`,summary:`The markdown frontmatter cannot be read.`},"duplicate-slug":{title:`Two posts share a slug`,summary:`injectContent picks one of them at random.`},"content-shadows-page":{title:`Markdown file takes over a page`,summary:`Files under src/content are routes too, so these URLs render the markdown file instead of the [param] page.`},"load-fetched-twice":{title:`load() runs twice`,summary:`These pages fetched their data while rendering on the server and again in the browser.`},"fn-fetched-twice":{title:`Server function read runs twice`,summary:`These reads ran while rendering on the server and again in the browser right after hydration.`},"restart-needed":{title:`New pages need a restart`,summary:`These page files exist, but the running router does not know them yet.`},"hydration-error":{title:`Hydration error`,summary:`The browser DOM did not match the server HTML.`},"api-not-found":{title:`API call failed with 404 or 405`,summary:`A request hit a path or method that no server route handles.`}},gq=200,_q=new Set([`missing-default-export`,`redirect-with-component`,`redirect-path-match`,`layout-without-outlet`,`server-without-load`,`orphan-server-file`,`load-fetched-twice`,`restart-needed`,`prerender-missing-root`]),vq={ssr:`SSR`,ssg:`Prerendered`,client:`Client only`,cached:`Cached`,redirect:`Redirect`},yq={all:`All`,page:`Pages`,load:`load()`,action:`Actions`,fn:`Server fn`,api:`API`},bq={success:`succeeded`,redirect:`redirected`,invalid:`validation errors`,error:`failed`},xq={success:`good`,redirect:`info`,invalid:`warn`,error:`bad`};function Sq(e,t=0,n=[]){for(let r of e)n.push({route:r,depth:t}),Sq(r.children,t+1,n);return n}var Cq=class e{rpc=$(null);canCall=Q(()=>ME(this.rpc(),`analog`));callsOff=iE(`analog`);kinds=[`all`,`page`,`load`,`action`,`fn`,`api`];methods=[`GET`,`POST`,`PUT`,`PATCH`,`DELETE`];methodOptions=this.methods.map(e=>({value:e,label:e}));view=A(`routes`);project=A(null);loadFailed=A(!1);state=A({});findings=A([]);renderRows=A([]);plan=A(null);filter=A(``);testUrl=A(``);explained=A(null);explainError=A(``);explaining=A(!1);kind=A(`all`);method=A(`GET`);apiPath=A(``);apiBody=A(``);confirmSend=A(!1);response=A(null);sending=A(!1);needsConfirm=Q(()=>this.method()!==`GET`&&!this.confirmSend());canSend=Q(()=>this.canCall()&&!this.sending()&&!this.needsConfirm());sendHintId=Q(()=>this.canCall()?this.needsConfirm()?`analog-confirm-hint`:null:`analog-calls-off`);unsubscribe=null;refreshTimer;refreshRun=0;destroyRef=T(Ts);host=T(Pl);hostPageId=fE();page=Q(()=>{let e=this.state().pages??[];return(this.hostPageId?e.find(e=>e.pageId===this.hostPageId):e[0])??null});openFiles=Q(()=>new Set((this.page()?.chain??[]).map(e=>e.file)));allCalls=Q(()=>this.state().calls??[]);maxServerCalls=gq;callQuery=A(``);failedOnly=A(!1);callsMessage=A(``);callFiltered=Q(()=>!!this.callQuery().trim()||this.failedOnly());matchingCalls=Q(()=>{let e=this.kind(),t=this.callQuery().trim().toLowerCase(),n=this.failedOnly();return this.allCalls().filter(r=>(e===`all`||r.kind===e)&&(!n||this.isFailed(r))&&(!t||this.callText(r).includes(t)))});calls=Q(()=>this.matchingCalls().slice(-150).reverse());shownCount=Q(()=>this.calls().length);serverFull=Q(()=>this.allCalls().length>=gq);allRoutes=Q(()=>Sq(this.project()?.routes??[]));pageCount=Q(()=>this.allRoutes().filter(e=>e.route.file&&e.route.kind!==`layout`).length);routeRows=Q(()=>{let e=this.filter().trim().toLowerCase();return e?this.allRoutes().filter(t=>t.route.fullPath.toLowerCase().includes(e)||!!t.route.file?.toLowerCase().includes(e)):this.allRoutes()});serverFns=Q(()=>this.project()?.serverFns??[]);fnById=Q(()=>new Map(this.serverFns().map(e=>[e.id,e])));refetchedFns=Q(()=>Array.from(new Set((this.state().refetches??[]).map(e=>this.fnById().get(e.id)?.name??e.id))));duplicates=Q(()=>Array.from(new Set((this.state().duplicates??[]).map(e=>e.route))));modeCounts=Q(()=>[`ssr`,`ssg`,`cached`,`client`,`redirect`].map(e=>({mode:e,label:vq[e],count:this.renderRows().filter(t=>t.mode===e).length})).filter(e=>e.count));lintCards=Q(()=>{let e={error:0,warning:1,info:2},t=new Map;for(let e of this.findings()){let n=t.get(e.rule);if(!n){let r=hq[e.rule];n={rule:e.rule,severity:e.severity,title:r?.title??e.rule,summary:r?.summary??e.message,fix:e.fix,items:[]},t.set(e.rule,n)}let r=_q.has(e.rule)||e.message===n.summary?void 0:e.message;n.items.some(t=>t.file===e.file&&t.path===e.path&&t.message===r)||n.items.push({file:e.file,path:e.path,message:r})}return Array.from(t.values()).sort((t,n)=>e[t.severity]-e[n.severity])});lintCount=Q(()=>{let e=this.findings();return{errors:e.filter(e=>e.severity===`error`).length,warnings:e.filter(e=>e.severity===`warning`).length}});lintTone=Q(()=>{let{errors:e,warnings:t}=this.lintCount();return e?`bad`:t?`warn`:``});views=Q(()=>{let{errors:e,warnings:t}=this.lintCount();return[{id:`routes`,label:`Routes`,count:this.pageCount(),tone:``},{id:`server`,label:`Server`,count:this.allCalls().length,tone:``},{id:`render`,label:`Render`,count:this.renderRows().length,tone:``},{id:`content`,label:`Content`,count:this.project()?.content.length??0,tone:``},{id:`lint`,label:`Lint`,count:e+t,tone:this.lintTone()}]});constructor(){fc(()=>{let e=this.rpc();e&&Nv(()=>void this.load(e))}),fc(()=>{let e=this.view();this.state(),Nv(()=>this.scheduleRefresh(e))}),this.destroyRef.onDestroy(()=>{this.unsubscribe?.(),clearTimeout(this.refreshTimer)})}async load(e){let t=await _E(e,`analog-project`);if(!this.destroyRef.destroyed){this.project.set(t),this.loadFailed.set(t===null);try{let t=await e.scope(`pangular`).rpc.sharedState(`analog`);if(this.destroyRef.destroyed)return;let n=e=>this.state.set(e??{});n(t.value()),this.unsubscribe?.(),this.unsubscribe=t.on(`updated`,n)}catch{this.state.set({})}this.destroyRef.destroyed||await this.refresh(this.view())}}retry(){let e=this.rpc();e&&(this.loadFailed.set(!1),this.load(e))}scheduleRefresh(e){clearTimeout(this.refreshTimer),this.refreshTimer=setTimeout(()=>void this.refresh(e),300)}async refresh(e){let t=this.rpc();if(!t)return;let n=++this.refreshRun,[r,i]=await Promise.all([_E(t,`analog-lint`,this.hostPageId??void 0),_E(t,`analog-render`)]);if(n===this.refreshRun&&(this.findings.set(r??[]),this.renderRows.set(i?.rows??[]),this.plan.set(i?.plan??null),e===`routes`||e===`content`||this.project()===null)){let e=await _E(t,`analog-project`);e&&n===this.refreshRun&&(this.project.set(e),this.loadFailed.set(!1))}}isOpen(e){return!!e.file&&this.openFiles().has(e.file)}kindText(e){return e.catchAll?e.catchAll===`optional`?`optional catch-all`:`catch-all`:e.kind===`implicit`?`folder`:e.kind}serverExports(e){return(e.serverExports??[]).filter(e=>e===`load`||e===`action`)}short(e){return e?.replace(/^\/src\/app\//,``).replace(/^\//,``)}dir(e){let t=this.short(e)??e;return t.includes(`/`)?t.slice(0,t.lastIndexOf(`/`)+1):``}base(e){return e.slice(e.lastIndexOf(`/`)+1)}paramList(e){return Object.entries(e)}kindLabel(e){return yq[e]}kindCount(e){return e===`all`?this.allCalls().length:this.allCalls().filter(t=>t.kind===e).length}modeLabel(e){return vq[e]}mismatch(e){return!e.last?.render||e.mode===`redirect`?!1:e.mode===`client`?e.last.render!==`client`:e.last.render===`client`}fnOf(e){return e.kind===`fn`&&e.route?this.fnById().get(e.route):void 0}fnCalls(e){return this.allCalls().filter(t=>t.kind===`fn`&&t.route===e).length}outcomeLabel(e){return bq[e]}outcomeTone(e){return xq[e]}statusClass(e){return e>=500||e===0?`bad`:e>=400?`warn`:`good`}tone(e){return e===`error`?`bad`:e===`warning`?`warn`:`info`}shadowed(e){return this.findings().find(t=>t.rule===`content-shadows-page`&&t.file===e)?.relatedFile}contentUrl(e){return this.allRoutes().find(t=>t.route.file===e)?.route.fullPath}pretty(e){try{return JSON.stringify(JSON.parse(e),null,2)}catch{return e}}time=tO;tryApi(e){this.method.set(e.method===`ANY`?`GET`:e.method),this.apiPath.set(e.path.replace(/:(\w+)/g,`1`).replace(`**`,`x`)),this.response.set(null),queueMicrotask(()=>document.getElementById(`api-path`)?.focus())}isFailed(e){return!e.status||e.status>=400||e.outcome===`error`}callText(e){let t=this.fnOf(e);return[e.url,e.route,t?.name,t?.file].filter(Boolean).join(` `).toLowerCase()}clearCallFilters(){this.callQuery.set(``),this.failedOnly.set(!1),this.kind.set(`all`),queueMicrotask(()=>this.host.nativeElement.querySelector(`#analog-call-search`)?.focus())}async clearCalls(){let e=this.rpc();try{if(!e)throw Error(`No devtools server`);await gE(e,`analog-clear-calls`),this.callsMessage.set(`Calls cleared.`),queueMicrotask(()=>this.host.nativeElement.querySelector(`input[name="analog-kind"]:checked`)?.focus())}catch{this.callsMessage.set(`Could not clear the calls.`)}}async explain(){let e=this.testUrl().trim();if(!e){this.explained.set(null),this.explainError.set(`Type a URL to explain, for example /products/42.`);return}this.explaining.set(!0),this.explainError.set(``);try{let t=await gE(this.rpc(),`analog-explain-url`,e);if(!t)throw Error(`The devtools server did not answer`);this.explained.set({url:e,match:t})}catch(t){let n=String(t?.message||`The devtools server did not answer`);this.explained.set(null),this.explainError.set(`Could not explain ${e}. ${n.replace(/\.?$/,`.`)}`)}finally{this.explaining.set(!1)}}async send(){let e=this.apiPath().trim();if(!e||this.sending()||this.needsConfirm())return;let t;if(this.method()!==`GET`&&this.apiBody().trim())try{t=JSON.parse(this.apiBody())}catch{this.response.set({error:`The body is not valid JSON.`});return}this.response.set(null),this.sending.set(!0);try{let n=await _E(this.rpc(),`analog-call-api`,{method:this.method(),path:e,body:t,confirm:this.confirmSend()});this.response.set(n??{error:`No answer from the devtools server.`})}finally{this.sending.set(!1)}}onKey(e){let t=this.views().map(e=>e.id),n=t.indexOf(this.view()),r=n;if(e.key===`ArrowRight`)r=(n+1)%t.length;else if(e.key===`ArrowLeft`)r=(n-1+t.length)%t.length;else if(e.key===`Home`)r=0;else if(e.key===`End`)r=t.length-1;else return;e.preventDefault(),this.view.set(t[r]);let i=e.currentTarget;queueMicrotask(()=>i.querySelector(`#analog-tab-${t[r]}`)?.focus())}static ɵfac=function(t){return new(t||e)};static ɵcmp=Gh({type:e,selectors:[[`app-analog-inspector`]],inputs:{rpc:[1,`rpc`]},decls:4,vars:1,consts:[[`role`,`alert`,1,`empty`],[`role`,`status`,1,`loading`],[1,`empty`],[1,`empty-title`],[1,`muted`],[`type`,`button`,1,`btn`,3,`click`],[`aria-hidden`,`true`,1,`spinner`],[`aria-label`,`Analog summary`,1,`summary`],[1,`stat`],[1,`label`],[1,`value`],[1,`stat`,`wide`],[`role`,`tablist`,`aria-label`,`Analog views`,1,`tabs`,3,`keydown`],[`type`,`button`,`role`,`tab`,3,`id`],[`role`,`tabpanel`,1,`panel`,3,`id`],[1,`value`,`mono`,3,`title`],[`type`,`button`,`role`,`tab`,3,`click`,`id`],[1,`count`],[1,`toolbar`],[1,`inline`,`explain`,3,`submit`],[`for`,`analog-url`],[`id`,`analog-url`,`type`,`text`,`placeholder`,`/products/42`,1,`field`,`grow`,`mono`,3,`input`,`value`],[`type`,`submit`,1,`btn`,`primary`,3,`disabled`],[`for`,`route-filter`,1,`sr-only`],[`id`,`route-filter`,`type`,`search`,`placeholder`,`Filter by path or file`,1,`field`,`filter`,3,`input`,`keydown.escape`,`value`],[`role`,`status`,1,`explain-result`],[`data-tone`,`bad`,1,`callout`],[1,`callout`],[`role`,`region`,`aria-label`,`File routes`,`tabindex`,`0`,1,`table-wrap`],[`scope`,`col`],[3,`open`,`dim`],[1,`mono`],[1,`chain`],[1,`chips`],[1,`mono`,3,`file`],[1,`pill`],[1,`chip`,`mono`],[1,`plain`],[1,`route`],[`aria-hidden`,`true`,1,`guide`],[1,`mono`,`path`],[1,`pill`,`live`],[1,`file`,3,`file`],[1,`meta`],[`data-kind`,`load`,1,`pill`],[1,`chip`],[1,`dir`],[`colspan`,`4`,1,`empty-row`],[`data-tone`,`warn`,`role`,`note`,1,`callout`],[`id`,`analog-calls-heading`],[1,`calls-bar`],[1,`segmented`],[1,`sr-only`],[3,`on`],[1,`calls-actions`],[`type`,`button`,1,`btn`,`ghost`,3,`click`,`disabled`],[`role`,`status`,1,`calls-message`],[`role`,`group`,`aria-label`,`Filter the server calls`,1,`call-filters`],[1,`search`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`,1,`search-icon`],[`cx`,`11`,`cy`,`11`,`r`,`7`],[`d`,`m20 20-3.5-3.5`],[`id`,`analog-call-search`,`type`,`search`,`placeholder`,`Find a URL, path or function…`,`aria-label`,`Find a URL, path or function`,`autocomplete`,`off`,`spellcheck`,`false`,1,`field`,3,`input`,`keydown.escape`,`value`],[1,`check`],[`type`,`checkbox`,3,`change`,`checked`],[`aria-live`,`polite`,1,`total`],[1,`note`],[`role`,`region`,`aria-label`,`Server calls`,`tabindex`,`0`,1,`table-wrap`],[`role`,`status`,1,`empty-box`,`no-match`],[1,`empty-box`],[`role`,`region`,`aria-label`,`API routes`,`tabindex`,`0`,1,`table-wrap`],[1,`card`,`playground`,3,`submit`],[1,`row`],[`ariaLabel`,`Method`,1,`method-select`,3,`valueChange`,`options`,`value`],[`for`,`api-path`,1,`sr-only`],[`id`,`api-path`,`type`,`text`,`placeholder`,`/api/v1/products`,1,`field`,`grow`,`mono`,3,`input`,`value`],[`id`,`analog-calls-off`,1,`muted`],[`id`,`analog-confirm-hint`,1,`muted`],[`role`,`status`,1,`muted`],[`role`,`status`,1,`response`],[`type`,`radio`,`name`,`analog-kind`,1,`sr-only`,3,`change`,`checked`],[`scope`,`col`,1,`num`],[1,`muted`,`nowrap`],[1,`request`],[1,`method`],[1,`mono`,`url`],[1,`status`],[1,`num`,`nowrap`],[1,`mono`,`muted`,3,`file`],[1,`code`],[1,`empty-lead`],[1,`empty-actions`],[`type`,`button`,1,`btn`,`ghost`,3,`click`],[1,`actions`],[`role`,`region`,`aria-label`,`Server functions`,`tabindex`,`0`,1,`table-wrap`],[1,`num`,`tnum`],[`for`,`api-body`],[`id`,`api-body`,`rows`,`3`,`placeholder`,`{"name": "Ada"}`,1,`field`,`mono`,3,`input`,`value`],[1,`check`,`confirm-send`],[`data-status`,`bad`,1,`status`],[`role`,`region`,`aria-label`,`Render modes`,`tabindex`,`0`,1,`table-wrap`],[1,`card`],[1,`muted`,`small`],[1,`muted`,`small`,`tnum`],[`data-tone`,`warn`,1,`pill`],[1,`facts`],[1,`tnum`],[`data-tone`,`warn`,1,`chip`,`mono`],[`data-tone`,`bad`,1,`chip`,`mono`],[`role`,`region`,`aria-label`,`Content files`,`tabindex`,`0`,1,`table-wrap`],[1,`muted`,`nowrap`,`tnum`],[`data-tone`,`bad`,1,`pill`],[`data-tone`,`good`,`role`,`status`,1,`callout`],[1,`findings`],[1,`finding-head`],[1,`finding-title`],[1,`where`],[1,`fix`],[1,`rule`,`mono`],[1,`detail`]],template:function(e,t){e&1&&N(0,mG,7,0,`div`,0)(1,hG,4,0,`div`,1)(2,gG,14,0,`div`,2)(3,mq,36,10),e&2&&P(t.project()===null&&t.loadFailed()?0:t.project()===null?1:t.project().analog?3:2)},dependencies:[qD,OA],styles:[`@charset "UTF-8"; +}`]})},sG=()=>[],cG=()=>[`/`],lG=(e,t)=>t.id,uG=(e,t)=>t.route.id,dG=(e,t)=>t[0],fG=(e,t)=>t.file+t.method,pG=(e,t)=>t.path,mG=(e,t)=>t.mode,hG=(e,t)=>t.file,gG=(e,t)=>t.rule;function _G(e,t){if(e&1){let e=U();R(0,`div`,0)(1,`h2`,3),J(2,`Could not read the project.`),z(),R(3,`p`,4),J(4,` Check that the dev server with Pangular Inspector is still running, then retry. `),z(),R(5,`button`,5),W(`click`,function(){return D(e),O(G().retry())}),J(6,`Retry`),z()()}}function vG(e,t){e&1&&(R(0,`div`,1),B(1,`span`,6),R(2,`span`),J(3,`Reading the project…`),z()())}function yG(e,t){e&1&&(R(0,`div`,2)(1,`h2`,3),J(2,`This app is not an Analog app.`),z(),R(3,`p`,4),J(4,` Add `),R(5,`code`),J(6,`pangular()`),z(),J(7,` from `),R(8,`code`),J(9,`@pangular-inspector/devtools/vite`),z(),J(10,` next to `),R(11,`code`),J(12,`analog()`),z(),J(13,` in vite.config.ts and run the Analog dev server. `),z()())}function bG(e,t){if(e&1&&(R(0,`div`,11)(1,`span`,9),J(2,`Open in the browser`),z(),R(3,`span`,15),J(4),z()()),e&2){let e=t;j(3),L(`title`,e.url),j(),Y(e.url)}}function xG(e,t){if(e&1){let e=U();R(0,`button`,16),W(`click`,function(){let t=D(e).$implicit;return O(G(2).view.set(t.id))}),J(1),R(2,`span`,17),J(3),z()()}if(e&2){let e=t.$implicit,n=G(2);L(`id`,`analog-tab-`+e.id),M(`aria-selected`,e.id===n.view())(`aria-controls`,`analog-panel-`+e.id)(`tabindex`,e.id===n.view()?0:-1),j(),X(` `,e.label,` `),j(),M(`data-tone`,e.tone),j(),Y(e.count)}}function SG(e,t){e&1&&(R(0,`div`,26),J(1),z()),e&2&&(j(),Y(t))}function CG(e,t){if(e&1&&(R(0,`app-source-link`,34),J(1),z()),e&2){let e=G().$implicit,t=G(5);L(`file`,e.file),j(),Y(t.short(e.file))}}function wG(e,t){if(e&1&&(R(0,`span`,31),J(1),z()),e&2){let e=G().$implicit;j(),Y(e.fullPath)}}function TG(e,t){if(e&1&&(R(0,`li`),N(1,CG,2,2,`app-source-link`,34)(2,wG,2,1,`span`,31),R(3,`span`,35),J(4),z()()),e&2){let e=t.$implicit;j(),P(e.file?1:2),j(2),M(`data-kind`,e.kind),j(),Y(e.kind)}}function EG(e,t){if(e&1&&(R(0,`span`,36),J(1),z()),e&2){let e=t.$implicit;j(),Z(``,e[0],` = `,e[1])}}function DG(e,t){if(e&1&&(R(0,`div`,33),F(1,EG,2,2,`span`,36,dG),z()),e&2){let e=G(2),t=G(3);j(),I(t.paramList(e.match.params))}}function OG(e,t){if(e&1&&(R(0,`strong`,31),J(1),z(),J(2,` renders `),R(3,`ol`,32),F(4,TG,5,3,`li`,null,lG),z(),N(6,DG,3,0,`div`,33)),e&2){let e=G(),t=G(3);j(),Y(e.url),j(3),I(e.match.chain),j(2),P(t.paramList(e.match.params).length?6:-1)}}function kG(e,t){if(e&1&&(R(0,`app-source-link`,34),J(1),z()),e&2){let e=G().$implicit,t=G(6);L(`file`,e.file),j(),Y(t.short(e.file))}}function AG(e,t){if(e&1&&(R(0,`span`,31),J(1),z()),e&2){let e=G().$implicit;j(),Y(e.path)}}function jG(e,t){if(e&1&&(R(0,`li`),N(1,kG,2,2,`app-source-link`,34)(2,AG,2,1,`span`,31),R(3,`span`,4),J(4),z()()),e&2){let e=t.$implicit;j(),P(e.file?1:2),j(3),Y(e.reason)}}function MG(e,t){if(e&1&&(R(0,`ul`,37),F(1,jG,5,2,`li`,null,Og),z()),e&2){let e=G(2);j(),I(e.match.rejected.slice(0,5))}}function NG(e,t){if(e&1&&(R(0,`strong`,31),J(1),z(),J(2,` matches no file route. Angular throws NG04002 "Cannot match any routes". `),N(3,MG,3,0,`ul`,37)),e&2){let e=G();j(),Y(e.url),j(2),P(e.match.rejected.length?3:-1)}}function PG(e,t){if(e&1&&(R(0,`div`,27),N(1,OG,7,2)(2,NG,4,2),z()),e&2){let e=t;M(`data-tone`,e.match.matched?`good`:`bad`),j(),P(e.match.matched?1:2)}}function FG(e,t){e&1&&(R(0,`span`,39),J(1,`└`),z())}function IG(e,t){e&1&&(R(0,`span`,41),J(1,`open`),z())}function LG(e,t){if(e&1&&(R(0,`app-source-link`,42)(1,`span`,46),J(2),z(),J(3),z()),e&2){let e=G().$implicit,t=G(3);L(`file`,e.route.file),j(2),Y(t.dir(e.route.file)),j(),Y(t.base(e.route.file))}}function RG(e,t){e&1&&(R(0,`span`,4),J(1,`folder only`),z())}function zG(e,t){if(e&1&&(R(0,`span`,44),J(1),z()),e&2){let e=t.$implicit;j(),X(``,e,`()`)}}function BG(e,t){if(e&1&&(R(0,`span`,45),J(1),z()),e&2){let e=G().$implicit;j(),X(`"`,e.route.title,`"`)}}function VG(e,t){if(e&1&&(R(0,`span`,36),J(1),z()),e&2){let e=G().$implicit;j(),Y(e)}}function HG(e,t){if(e&1&&N(0,VG,2,1,`span`,36),e&2){let e=t.$implicit;P(e===`title`?-1:0)}}function UG(e,t){if(e&1&&(R(0,`tr`)(1,`td`)(2,`div`,38),N(3,FG,2,0,`span`,39),R(4,`span`,40),J(5),z(),R(6,`span`,35),J(7),z(),N(8,IG,2,0,`span`,41),z()(),R(9,`td`),N(10,LG,4,3,`app-source-link`,42)(11,RG,2,0,`span`,4),z(),R(12,`td`)(13,`div`,43),F(14,zG,2,1,`span`,44,kg),z()(),R(16,`td`),N(17,BG,2,1,`span`,45),F(18,HG,1,1,null,null,kg),z()()),e&2){let e=t.$implicit,n=G(3);q(`open`,n.isOpen(e.route))(`dim`,e.route.kind===`group`||e.route.kind===`implicit`),j(2),K(`padding-left`,e.depth*16,`px`),j(),P(e.depth?3:-1),j(2),Y(e.route.fullPath),j(),M(`data-kind`,e.route.kind),j(),Y(n.kindText(e.route)),j(),P(n.isOpen(e.route)?8:-1),j(2),P(e.route.file?10:11),j(4),I(n.serverExports(e.route)),j(3),P(e.route.title?17:-1),j(),I(e.route.routeMeta??mv(13,sG))}}function WG(e,t){e&1&&J(0,` No route matches the filter. Try part of a path or a file name. `)}function GG(e,t){e&1&&J(0,` No file routes yet. Add a .page.ts file under src/app/pages. `)}function KG(e,t){if(e&1&&(R(0,`tr`)(1,`td`,47),N(2,WG,1,0)(3,GG,1,0),z()()),e&2){let e=G(3);j(2),P(e.filter().trim()?2:3)}}function qG(e,t){if(e&1){let e=U();R(0,`div`,18)(1,`form`,19),W(`submit`,function(t){D(e);let n=G(2);return t.preventDefault(),O(n.explain())}),R(2,`label`,20),J(3,`Test a URL`),z(),R(4,`input`,21),W(`input`,function(t){return D(e),O(G(2).testUrl.set(t.target.value))}),z(),R(5,`button`,22),J(6),z()(),R(7,`label`,23),J(8,`Filter routes`),z(),R(9,`input`,24),W(`input`,function(t){return D(e),O(G(2).filter.set(t.target.value))})(`keydown.escape`,function(){return D(e),O(G(2).filter.set(``))}),z()(),R(10,`div`,25),N(11,SG,2,1,`div`,26)(12,PG,3,2,`div`,27),z(),R(13,`div`,28)(14,`table`)(15,`thead`)(16,`tr`)(17,`th`,29),J(18,`Route`),z(),R(19,`th`,29),J(20,`File`),z(),R(21,`th`,29),J(22,`Data`),z(),R(23,`th`,29),J(24,`Route meta`),z()()(),R(25,`tbody`),F(26,UG,20,14,`tr`,30,uG,!1,KG,4,1,`tr`),z()()()}if(e&2){let e,t=G(2);j(4),L(`value`,t.testUrl()),j(),L(`disabled`,t.explaining()),j(),X(` `,t.explaining()?`Explaining…`:`Explain`,` `),j(3),L(`value`,t.filter()),j(2),P((e=t.explainError())?11:(e=t.explained())?12:-1,e),j(15),I(t.routeRows())}}function JG(e,t){if(e&1&&(R(0,`span`,31),J(1),z(),J(2)),e&2){let e=t.$implicit,n=t.$index,r=t.$count;j(),Y(e),j(),X(``,n===r-1?``:`, `,` `)}}function YG(e,t){if(e&1&&(R(0,`div`,48)(1,`strong`),J(2,`load() ran twice`),z(),J(3,` for `),F(4,JG,3,2,null,null,kg),J(6,` : once while server rendering, again in the browser. TransferState did not serve the server result. `),z()),e&2){let e=G(3);j(4),I(e.duplicates())}}function XG(e,t){if(e&1&&(R(0,`span`,31),J(1),z(),J(2)),e&2){let e=t.$implicit,n=t.$index,r=t.$count;j(),Y(e),j(),X(``,n===r-1?``:`, `,` `)}}function ZG(e,t){if(e&1&&(R(0,`div`,48)(1,`strong`),J(2,`Server function read ran twice`),z(),J(3,`: `),F(4,XG,3,2,null,null,kg),J(6,` ran while server rendering, then again in the browser. The browser did not use the TransferState seed. `),z()),e&2){let e=G(3);j(4),I(e.refetchedFns())}}function QG(e,t){if(e&1){let e=U();R(0,`label`)(1,`input`,80),W(`change`,function(){let t=D(e).$implicit;return O(G(3).kind.set(t))}),z(),J(2),R(3,`span`,4),J(4),z()()}if(e&2){let e=t.$implicit,n=G(3);q(`on`,n.kind()===e),j(),L(`checked`,n.kind()===e),M(`data-kind`,e),j(),X(` `,n.kindLabel(e),` `),j(2),Y(n.kindCount(e))}}function $G(e,t){if(e&1&&J(0),e&2){let e=G(4);Z(` Showing the newest `,e.shownCount(),` of `,e.matchingCalls().length,`. `)}}function eK(e,t){e&1&&J(0),e&2&&X(` The dev server keeps only the newest `,G(4).maxServerCalls,` calls and drops older ones. `)}function tK(e,t){if(e&1&&(R(0,`p`,66),N(1,$G,1,2),N(2,eK,1,1),z()),e&2){let e=G(3);j(),P(e.shownCount()1?6:-1),j(2),Y(e.summary),j(2),I(e.items),j(5),X(` `,e.fix),j(2),Y(e.rule)}}function mq(e,t){if(e&1&&(R(0,`p`,4),J(1),z(),R(2,`ul`,113),F(3,pq,18,8,`li`,null,gG),z()),e&2){let e=G(3);j(),Z(` `,e.findings().length,` issue(s) in `,e.lintCards().length,` group(s). Each card says what is wrong, where, and how to fix it. `),j(2),I(e.lintCards())}}function hq(e,t){e&1&&(R(0,`div`,112)(1,`strong`),J(2,`No Analog problems found.`),z(),J(3,` Routes, server files, prerender config and content all check out. `),z())}function gq(e,t){e&1&&N(0,mq,5,2)(1,hq,4,0,`div`,112),e&2&&P(+!G(2).findings().length)}function _q(e,t){if(e&1){let e=U();R(0,`section`,7)(1,`div`,8)(2,`span`,9),J(3,`Analog`),z(),R(4,`span`,10),J(5),z()(),R(6,`div`,8)(7,`span`,9),J(8,`Pages`),z(),R(9,`span`,10),J(10),z()(),R(11,`div`,8)(12,`span`,9),J(13,`API routes`),z(),R(14,`span`,10),J(15),z()(),R(16,`div`,8)(17,`span`,9),J(18,`Server calls`),z(),R(19,`span`,10),J(20),z()(),R(21,`div`,8)(22,`span`,9),J(23,`Issues`),z(),R(24,`span`,10),J(25),z()(),N(26,bG,5,2,`div`,11),z(),R(27,`div`,12),W(`keydown`,function(t){return D(e),O(G().onKey(t))}),F(28,xG,4,7,`button`,13,lG),z(),R(30,`div`,14),N(31,qG,29,6)(32,jK,65,21)(33,tq,18,3)(34,sq,2,1)(35,gq,2,1),z()}if(e&2){let e,t,n=G();j(5),Y(n.project().version||`unknown`),j(5),Y(n.pageCount()),j(5),Y(n.project().api.length),j(5),Y(n.allCalls().length),j(),M(`data-tone`,n.lintTone()||`good`),j(4),Y(n.lintCount().errors+n.lintCount().warnings),j(),P((e=n.page())?26:-1,e),j(2),I(n.views()),j(2),L(`id`,`analog-panel-`+n.view()),M(`aria-labelledby`,`analog-tab-`+n.view()),j(),P((t=n.view())===`routes`?31:t===`server`?32:t===`render`?33:t===`content`?34:t===`lint`?35:-1)}}var vq={"scan-error":{title:`A folder could not be read`,summary:`Its files are missing from routes, API routes and lint results.`},"duplicate-url":{title:`Two files serve the same URL`,summary:`Only one of them is reachable; the other never renders.`},"sibling-params":{title:`Two dynamic pages in one folder`,summary:`Both are [param] pages at the same level, so the first one always wins.`},"missing-default-export":{title:`Page has no default export`,summary:`Analog needs the component as the default export, so the page renders nothing.`},"redirect-with-component":{title:`Redirect page also exports a component`,summary:`The redirect runs first, so the component never shows.`},"redirect-path-match":{title:`Redirect matches too much`,summary:`An empty-path redirect without pathMatch "full" catches every URL below it.`},"layout-without-outlet":{title:`Layout has no router-outlet`,summary:`The layout has child pages, but without they never render.`},"server-without-load":{title:`.server.ts without load or action`,summary:`The server file exports no load, action or server function, so Analog calls nothing.`},"orphan-server-file":{title:`.server.ts without a page`,summary:`No page file sits next to it, so its load never runs.`},"api-method-suffix":{title:`Unknown method suffix on an API file`,summary:`The suffix is not an HTTP method, so it becomes part of the URL.`},"duplicate-api-route":{title:`Two handlers for one API route`,summary:`Two files answer the same method and path.`},"api-outside-prefix":{title:`Server route outside the API prefix`,summary:`During vite dev only routes under the prefix reach Nitro.`},"prerender-unknown-route":{title:`Prerender entry matches no page`,summary:`prerender.routes lists a path that no page file serves.`},"prerender-missing-root":{title:`Home page is not prerendered`,summary:`static is on, but prerender.routes leaves out /.`},"content-frontmatter":{title:`Broken frontmatter`,summary:`The markdown frontmatter cannot be read.`},"duplicate-slug":{title:`Two posts share a slug`,summary:`injectContent picks one of them at random.`},"content-shadows-page":{title:`Markdown file takes over a page`,summary:`Files under src/content are routes too, so these URLs render the markdown file instead of the [param] page.`},"load-fetched-twice":{title:`load() runs twice`,summary:`These pages fetched their data while rendering on the server and again in the browser.`},"fn-fetched-twice":{title:`Server function read runs twice`,summary:`These reads ran while rendering on the server and again in the browser right after hydration.`},"restart-needed":{title:`New pages need a restart`,summary:`These page files exist, but the running router does not know them yet.`},"hydration-error":{title:`Hydration error`,summary:`The browser DOM did not match the server HTML.`},"api-not-found":{title:`API call failed with 404 or 405`,summary:`A request hit a path or method that no server route handles.`}},yq=200,bq=new Set([`missing-default-export`,`redirect-with-component`,`redirect-path-match`,`layout-without-outlet`,`server-without-load`,`orphan-server-file`,`load-fetched-twice`,`restart-needed`,`prerender-missing-root`]),xq={ssr:`SSR`,ssg:`Prerendered`,client:`Client only`,cached:`Cached`,redirect:`Redirect`},Sq={all:`All`,page:`Pages`,load:`load()`,action:`Actions`,fn:`Server fn`,api:`API`},Cq={success:`succeeded`,redirect:`redirected`,invalid:`validation errors`,error:`failed`},wq={success:`good`,redirect:`info`,invalid:`warn`,error:`bad`};function Tq(e,t=0,n=[]){for(let r of e)n.push({route:r,depth:t}),Tq(r.children,t+1,n);return n}var Eq=class e{rpc=$(null);canCall=Q(()=>ME(this.rpc(),`analog`));callsOff=iE(`analog`);kinds=[`all`,`page`,`load`,`action`,`fn`,`api`];methods=[`GET`,`POST`,`PUT`,`PATCH`,`DELETE`];methodOptions=this.methods.map(e=>({value:e,label:e}));view=A(`routes`);project=A(null);loadFailed=A(!1);state=A({});findings=A([]);renderRows=A([]);plan=A(null);filter=A(``);testUrl=A(``);explained=A(null);explainError=A(``);explaining=A(!1);kind=A(`all`);method=A(`GET`);apiPath=A(``);apiBody=A(``);confirmSend=A(!1);response=A(null);sending=A(!1);needsConfirm=Q(()=>this.method()!==`GET`&&!this.confirmSend());canSend=Q(()=>this.canCall()&&!this.sending()&&!this.needsConfirm());sendHintId=Q(()=>this.canCall()?this.needsConfirm()?`analog-confirm-hint`:null:`analog-calls-off`);unsubscribe=null;refreshTimer;refreshRun=0;destroyRef=T(Ts);host=T(Pl);hostPageId=fE();page=Q(()=>{let e=this.state().pages??[];return(this.hostPageId?e.find(e=>e.pageId===this.hostPageId):e[0])??null});openFiles=Q(()=>new Set((this.page()?.chain??[]).map(e=>e.file)));allCalls=Q(()=>this.state().calls??[]);maxServerCalls=yq;callQuery=A(``);failedOnly=A(!1);callsMessage=A(``);callFiltered=Q(()=>!!this.callQuery().trim()||this.failedOnly());matchingCalls=Q(()=>{let e=this.kind(),t=this.callQuery().trim().toLowerCase(),n=this.failedOnly();return this.allCalls().filter(r=>(e===`all`||r.kind===e)&&(!n||this.isFailed(r))&&(!t||this.callText(r).includes(t)))});calls=Q(()=>this.matchingCalls().slice(-150).reverse());shownCount=Q(()=>this.calls().length);serverFull=Q(()=>this.allCalls().length>=yq);allRoutes=Q(()=>Tq(this.project()?.routes??[]));pageCount=Q(()=>this.allRoutes().filter(e=>e.route.file&&e.route.kind!==`layout`).length);routeRows=Q(()=>{let e=this.filter().trim().toLowerCase();return e?this.allRoutes().filter(t=>t.route.fullPath.toLowerCase().includes(e)||!!t.route.file?.toLowerCase().includes(e)):this.allRoutes()});serverFns=Q(()=>this.project()?.serverFns??[]);fnById=Q(()=>new Map(this.serverFns().map(e=>[e.id,e])));refetchedFns=Q(()=>Array.from(new Set((this.state().refetches??[]).map(e=>this.fnById().get(e.id)?.name??e.id))));duplicates=Q(()=>Array.from(new Set((this.state().duplicates??[]).map(e=>e.route))));modeCounts=Q(()=>[`ssr`,`ssg`,`cached`,`client`,`redirect`].map(e=>({mode:e,label:xq[e],count:this.renderRows().filter(t=>t.mode===e).length})).filter(e=>e.count));lintCards=Q(()=>{let e={error:0,warning:1,info:2},t=new Map;for(let e of this.findings()){let n=t.get(e.rule);if(!n){let r=vq[e.rule];n={rule:e.rule,severity:e.severity,title:r?.title??e.rule,summary:r?.summary??e.message,fix:e.fix,items:[]},t.set(e.rule,n)}let r=bq.has(e.rule)||e.message===n.summary?void 0:e.message;n.items.some(t=>t.file===e.file&&t.path===e.path&&t.message===r)||n.items.push({file:e.file,path:e.path,message:r})}return Array.from(t.values()).sort((t,n)=>e[t.severity]-e[n.severity])});lintCount=Q(()=>{let e=this.findings();return{errors:e.filter(e=>e.severity===`error`).length,warnings:e.filter(e=>e.severity===`warning`).length}});lintTone=Q(()=>{let{errors:e,warnings:t}=this.lintCount();return e?`bad`:t?`warn`:``});views=Q(()=>{let{errors:e,warnings:t}=this.lintCount();return[{id:`routes`,label:`Routes`,count:this.pageCount(),tone:``},{id:`server`,label:`Server`,count:this.allCalls().length,tone:``},{id:`render`,label:`Render`,count:this.renderRows().length,tone:``},{id:`content`,label:`Content`,count:this.project()?.content.length??0,tone:``},{id:`lint`,label:`Lint`,count:e+t,tone:this.lintTone()}]});constructor(){fc(()=>{let e=this.rpc();e&&Nv(()=>void this.load(e))}),fc(()=>{let e=this.view();this.state(),Nv(()=>this.scheduleRefresh(e))}),this.destroyRef.onDestroy(()=>{this.unsubscribe?.(),clearTimeout(this.refreshTimer)})}async load(e){let t=await _E(e,`analog-project`);if(!this.destroyRef.destroyed){this.project.set(t),this.loadFailed.set(t===null);try{let t=await e.scope(`pangular`).rpc.sharedState(`analog`);if(this.destroyRef.destroyed)return;let n=e=>this.state.set(e??{});n(t.value()),this.unsubscribe?.(),this.unsubscribe=t.on(`updated`,n)}catch{this.state.set({})}this.destroyRef.destroyed||await this.refresh(this.view())}}retry(){let e=this.rpc();e&&(this.loadFailed.set(!1),this.load(e))}scheduleRefresh(e){clearTimeout(this.refreshTimer),this.refreshTimer=setTimeout(()=>void this.refresh(e),300)}async refresh(e){let t=this.rpc();if(!t)return;let n=++this.refreshRun,[r,i]=await Promise.all([_E(t,`analog-lint`,this.hostPageId??void 0),_E(t,`analog-render`)]);if(n===this.refreshRun&&(this.findings.set(r??[]),this.renderRows.set(i?.rows??[]),this.plan.set(i?.plan??null),e===`routes`||e===`content`||this.project()===null)){let e=await _E(t,`analog-project`);e&&n===this.refreshRun&&(this.project.set(e),this.loadFailed.set(!1))}}isOpen(e){return!!e.file&&this.openFiles().has(e.file)}kindText(e){return e.catchAll?e.catchAll===`optional`?`optional catch-all`:`catch-all`:e.kind===`implicit`?`folder`:e.kind}serverExports(e){return(e.serverExports??[]).filter(e=>e===`load`||e===`action`)}short(e){return e?.replace(/^\/src\/app\//,``).replace(/^\//,``)}dir(e){let t=this.short(e)??e;return t.includes(`/`)?t.slice(0,t.lastIndexOf(`/`)+1):``}base(e){return e.slice(e.lastIndexOf(`/`)+1)}paramList(e){return Object.entries(e)}kindLabel(e){return Sq[e]}kindCount(e){return e===`all`?this.allCalls().length:this.allCalls().filter(t=>t.kind===e).length}modeLabel(e){return xq[e]}mismatch(e){return!e.last?.render||e.mode===`redirect`?!1:e.mode===`client`?e.last.render!==`client`:e.last.render===`client`}fnOf(e){return e.kind===`fn`&&e.route?this.fnById().get(e.route):void 0}fnCalls(e){return this.allCalls().filter(t=>t.kind===`fn`&&t.route===e).length}outcomeLabel(e){return Cq[e]}outcomeTone(e){return wq[e]}statusClass(e){return e>=500||e===0?`bad`:e>=400?`warn`:`good`}tone(e){return e===`error`?`bad`:e===`warning`?`warn`:`info`}shadowed(e){return this.findings().find(t=>t.rule===`content-shadows-page`&&t.file===e)?.relatedFile}contentUrl(e){return this.allRoutes().find(t=>t.route.file===e)?.route.fullPath}pretty(e){try{return JSON.stringify(JSON.parse(e),null,2)}catch{return e}}time=tO;tryApi(e){this.method.set(e.method===`ANY`?`GET`:e.method),this.apiPath.set(e.path.replace(/:(\w+)/g,`1`).replace(`**`,`x`)),this.response.set(null),queueMicrotask(()=>document.getElementById(`api-path`)?.focus())}isFailed(e){return!e.status||e.status>=400||e.outcome===`error`}callText(e){let t=this.fnOf(e);return[e.url,e.route,t?.name,t?.file].filter(Boolean).join(` `).toLowerCase()}clearCallFilters(){this.callQuery.set(``),this.failedOnly.set(!1),this.kind.set(`all`),queueMicrotask(()=>this.host.nativeElement.querySelector(`#analog-call-search`)?.focus())}async clearCalls(){let e=this.rpc();try{if(!e)throw Error(`No devtools server`);await gE(e,`analog-clear-calls`),this.callsMessage.set(`Calls cleared.`),queueMicrotask(()=>this.host.nativeElement.querySelector(`input[name="analog-kind"]:checked`)?.focus())}catch{this.callsMessage.set(`Could not clear the calls.`)}}async explain(){let e=this.testUrl().trim();if(!e){this.explained.set(null),this.explainError.set(`Type a URL to explain, for example /products/42.`);return}this.explaining.set(!0),this.explainError.set(``);try{let t=await gE(this.rpc(),`analog-explain-url`,e);if(!t)throw Error(`The devtools server did not answer`);this.explained.set({url:e,match:t})}catch(t){let n=String(t?.message||`The devtools server did not answer`);this.explained.set(null),this.explainError.set(`Could not explain ${e}. ${n.replace(/\.?$/,`.`)}`)}finally{this.explaining.set(!1)}}async send(){let e=this.apiPath().trim();if(!e||this.sending()||this.needsConfirm())return;let t;if(this.method()!==`GET`&&this.apiBody().trim())try{t=JSON.parse(this.apiBody())}catch{this.response.set({error:`The body is not valid JSON.`});return}this.response.set(null),this.sending.set(!0);try{let n=await _E(this.rpc(),`analog-call-api`,{method:this.method(),path:e,body:t,confirm:this.confirmSend()});this.response.set(n??{error:`No answer from the devtools server.`})}finally{this.sending.set(!1)}}onKey(e){let t=this.views().map(e=>e.id),n=t.indexOf(this.view()),r=n;if(e.key===`ArrowRight`)r=(n+1)%t.length;else if(e.key===`ArrowLeft`)r=(n-1+t.length)%t.length;else if(e.key===`Home`)r=0;else if(e.key===`End`)r=t.length-1;else return;e.preventDefault(),this.view.set(t[r]);let i=e.currentTarget;queueMicrotask(()=>i.querySelector(`#analog-tab-${t[r]}`)?.focus())}static ɵfac=function(t){return new(t||e)};static ɵcmp=Gh({type:e,selectors:[[`app-analog-inspector`]],inputs:{rpc:[1,`rpc`]},decls:4,vars:1,consts:[[`role`,`alert`,1,`empty`],[`role`,`status`,1,`loading`],[1,`empty`],[1,`empty-title`],[1,`muted`],[`type`,`button`,1,`btn`,3,`click`],[`aria-hidden`,`true`,1,`spinner`],[`aria-label`,`Analog summary`,1,`summary`],[1,`stat`],[1,`label`],[1,`value`],[1,`stat`,`wide`],[`role`,`tablist`,`aria-label`,`Analog views`,1,`tabs`,3,`keydown`],[`type`,`button`,`role`,`tab`,3,`id`],[`role`,`tabpanel`,1,`panel`,3,`id`],[1,`value`,`mono`,3,`title`],[`type`,`button`,`role`,`tab`,3,`click`,`id`],[1,`count`],[1,`toolbar`],[1,`inline`,`explain`,3,`submit`],[`for`,`analog-url`],[`id`,`analog-url`,`type`,`text`,`placeholder`,`/products/42`,1,`field`,`grow`,`mono`,3,`input`,`value`],[`type`,`submit`,1,`btn`,`primary`,3,`disabled`],[`for`,`route-filter`,1,`sr-only`],[`id`,`route-filter`,`type`,`search`,`placeholder`,`Filter by path or file`,1,`field`,`filter`,3,`input`,`keydown.escape`,`value`],[`role`,`status`,1,`explain-result`],[`data-tone`,`bad`,1,`callout`],[1,`callout`],[`role`,`region`,`aria-label`,`File routes`,`tabindex`,`0`,1,`table-wrap`],[`scope`,`col`],[3,`open`,`dim`],[1,`mono`],[1,`chain`],[1,`chips`],[1,`mono`,3,`file`],[1,`pill`],[1,`chip`,`mono`],[1,`plain`],[1,`route`],[`aria-hidden`,`true`,1,`guide`],[1,`mono`,`path`],[1,`pill`,`live`],[1,`file`,3,`file`],[1,`meta`],[`data-kind`,`load`,1,`pill`],[1,`chip`],[1,`dir`],[`colspan`,`4`,1,`empty-row`],[`data-tone`,`warn`,`role`,`note`,1,`callout`],[`id`,`analog-calls-heading`],[1,`calls-bar`],[1,`segmented`],[1,`sr-only`],[3,`on`],[1,`calls-actions`],[`type`,`button`,1,`btn`,`ghost`,3,`click`,`disabled`],[`role`,`status`,1,`calls-message`],[`role`,`group`,`aria-label`,`Filter the server calls`,1,`call-filters`],[1,`search`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`,1,`search-icon`],[`cx`,`11`,`cy`,`11`,`r`,`7`],[`d`,`m20 20-3.5-3.5`],[`id`,`analog-call-search`,`type`,`search`,`placeholder`,`Find a URL, path or function…`,`aria-label`,`Find a URL, path or function`,`autocomplete`,`off`,`spellcheck`,`false`,1,`field`,3,`input`,`keydown.escape`,`value`],[1,`check`],[`type`,`checkbox`,3,`change`,`checked`],[`aria-live`,`polite`,1,`total`],[1,`note`],[`role`,`region`,`aria-label`,`Server calls`,`tabindex`,`0`,1,`table-wrap`],[`role`,`status`,1,`empty-box`,`no-match`],[1,`empty-box`],[`role`,`region`,`aria-label`,`API routes`,`tabindex`,`0`,1,`table-wrap`],[1,`card`,`playground`,3,`submit`],[1,`row`],[`ariaLabel`,`Method`,1,`method-select`,3,`valueChange`,`options`,`value`],[`for`,`api-path`,1,`sr-only`],[`id`,`api-path`,`type`,`text`,`placeholder`,`/api/v1/products`,1,`field`,`grow`,`mono`,3,`input`,`value`],[`id`,`analog-calls-off`,1,`muted`],[`id`,`analog-confirm-hint`,1,`muted`],[`role`,`status`,1,`muted`],[`role`,`status`,1,`response`],[`type`,`radio`,`name`,`analog-kind`,1,`sr-only`,3,`change`,`checked`],[`scope`,`col`,1,`num`],[1,`muted`,`nowrap`],[1,`request`],[1,`method`],[1,`mono`,`url`],[1,`status`],[1,`num`,`nowrap`],[1,`mono`,`muted`,3,`file`],[1,`code`],[1,`empty-lead`],[1,`empty-actions`],[`type`,`button`,1,`btn`,`ghost`,3,`click`],[1,`actions`],[`role`,`region`,`aria-label`,`Server functions`,`tabindex`,`0`,1,`table-wrap`],[1,`num`,`tnum`],[`for`,`api-body`],[`id`,`api-body`,`rows`,`3`,`placeholder`,`{"name": "Ada"}`,1,`field`,`mono`,3,`input`,`value`],[1,`check`,`confirm-send`],[`data-status`,`bad`,1,`status`],[`role`,`region`,`aria-label`,`Render modes`,`tabindex`,`0`,1,`table-wrap`],[1,`card`],[1,`muted`,`small`],[1,`muted`,`small`,`tnum`],[`data-tone`,`warn`,1,`pill`],[1,`facts`],[1,`tnum`],[`data-tone`,`warn`,1,`chip`,`mono`],[`data-tone`,`bad`,1,`chip`,`mono`],[`role`,`region`,`aria-label`,`Content files`,`tabindex`,`0`,1,`table-wrap`],[1,`muted`,`nowrap`,`tnum`],[`data-tone`,`bad`,1,`pill`],[`data-tone`,`good`,`role`,`status`,1,`callout`],[1,`findings`],[1,`finding-head`],[1,`finding-title`],[1,`where`],[1,`fix`],[1,`rule`,`mono`],[1,`detail`]],template:function(e,t){e&1&&N(0,_G,7,0,`div`,0)(1,vG,4,0,`div`,1)(2,yG,14,0,`div`,2)(3,_q,36,10),e&2&&P(t.project()===null&&t.loadFailed()?0:t.project()===null?1:t.project().analog?3:2)},dependencies:[qD,jA],styles:[`@charset "UTF-8"; [_nghost-%COMP%] { --%NS%good: var(--%NS%ok); --%NS%bad: var(--%NS%danger); @@ -12940,7 +12964,7 @@ h2[_ngcontent-%COMP%] { color: var(--%NS%text-strong); font-size: 15px; font-weight: 600; -}`]})},wq=(e,t)=>t.id,Tq=(e,t)=>t.id+t.kind,Eq=(e,t)=>t.side+t.id,Dq=(e,t)=>t.key;function Oq(e,t){e&1&&(R(0,`div`,0),B(1,`span`,67),R(2,`span`),J(3,`Loading…`),z()())}function kq(e,t){if(e&1){let e=U();R(0,`div`,1)(1,`strong`),J(2,`Could not reach the devtools server.`),z(),R(3,`span`),J(4,`Check that the app's dev server is running with the devtools plugin.`),z(),R(5,`button`,68),W(`click`,function(){return D(e),O(G().retry())}),J(6,`Try again`),z()()}}function Aq(e,t){e&1&&(R(0,`span`,81),J(1,`this page`),z())}function jq(e,t){e&1&&(R(0,`span`,82),J(1,`overridden`),z())}function Mq(e,t){e&1&&(R(0,`span`,83),J(1,`aborted`),z())}function Nq(e,t){if(e&1){let e=U();R(0,`tr`,73),W(`click`,function(){let t=D(e).$implicit;return O(G(2).selectedRequestId.set(t.id))}),R(1,`td`,74)(2,`button`,75)(3,`span`,76),J(4),z(),J(5),z()(),R(6,`td`,77),B(7,`span`,78),J(8),z(),R(9,`td`),J(10),z(),R(11,`td`,79),J(12),z(),R(13,`td`,79),J(14),z(),R(15,`td`)(16,`div`,80),N(17,Aq,2,0,`span`,81),N(18,jq,2,0,`span`,82),N(19,Mq,2,0,`span`,83),z()()()}if(e&2){let e=t.$implicit,n=G(2);q(`selected`,n.selectedRequest()?.id===e.id),j(2),L(`title`,e.url),M(`aria-pressed`,n.selectedRequest()?.id===e.id),j(2),Y(e.method),j(),X(` `,e.url,` `),j(),q(`ok`,n.statusTone(e.status)===`ok`)(`redirect`,n.statusTone(e.status)===`redirect`)(`bad`,n.statusTone(e.status)===`bad`),j(2),X(``,e.status,` `),j(2),Y(n.renderModeLabel(e.renderMode)),j(2),X(``,e.renderMs,` ms`),j(2),Z(``,e.fetches,` (`,e.fetchMs,` ms)`),j(3),P(e.id===n.selected()?.ssrRequestId?17:-1),j(),P(e.overrides?.length?18:-1),j(),P(e.aborted?19:-1)}}function Pq(e,t){e&1&&(R(0,`p`,56),J(1),R(2,`code`),J(3,`ssrMiddleware`),z(),J(4,` saw it, so the render mode can't be read and TransferState edits can't apply. Mount `),R(5,`code`),J(6,`ssrMiddleware`),z(),J(7,` after `),R(8,`code`),J(9,`compression()`),z(),J(10,`. `),z()),e&2&&(j(),X(` The body was already compressed (`,t,`) when `))}function Fq(e,t){if(e&1&&(R(0,`span`,88),J(1),z()),e&2){let e=G().$implicit;j(),Y(e.note)}}function Iq(e,t){if(e&1&&(R(0,`p`,87)(1,`span`,82),J(2),z(),R(3,`span`),J(4),z(),N(5,Fq,2,1,`span`,88),z()),e&2){let e=t.$implicit,n=G(4);j(2),Y(n.overrideLabel(e.kind)),j(2),Y(e.applied?`applied`:`not applied`),j(),P(e.note?5:-1)}}function Lq(e,t){if(e&1&&(R(0,`h3`),J(1,`Overrides from the panel`),z(),R(2,`p`,56),J(3,` This response was changed on purpose, so it is not what the app sends on its own. `),z(),F(4,Iq,6,3,`p`,87,Tq)),e&2){let e=G();j(4),I(e.overrides)}}function Rq(e,t){if(e&1&&(J(0,` to `),R(1,`code`),J(2),z()),e&2){let e=G().$implicit;j(2),Y(e.finalUrl)}}function zq(e,t){if(e&1&&(R(0,`div`)(1,`dt`),J(2,`Guards`),z(),R(3,`dd`),J(4),z()()),e&2){let e=G().$implicit,t=G(4);j(3),q(`bad`,t.guardVerdict(e)===`rejected`),j(),Z(` `,t.msLabel(e.guards.ms),``,t.guardVerdict(e)?`, `+t.guardVerdict(e):``,` `)}}function Bq(e,t){if(e&1&&(R(0,`div`)(1,`dt`),J(2,`Resolvers`),z(),R(3,`dd`),J(4),z()()),e&2){let e=G().$implicit,t=G(4);j(4),Y(t.msLabel(e.resolvers.ms))}}function Vq(e,t){if(e&1&&(R(0,`div`)(1,`dt`),J(2,`Navigation total`),z(),R(3,`dd`),J(4),z()()),e&2){let e=G().$implicit;j(4),X(``,e.durationMs,` ms`)}}function Hq(e,t){if(e&1&&(R(0,`p`,56),J(1),z()),e&2){let e=G().$implicit;j(),Y(e.reason)}}function Uq(e,t){if(e&1&&(R(0,`dl`,89)(1,`div`)(2,`dt`),J(3,`Navigation`),z(),R(4,`dd`)(5,`code`),J(6),z(),N(7,Rq,3,1),J(8),z()(),N(9,zq,5,4,`div`),N(10,Bq,5,1,`div`),N(11,Vq,5,1,`div`),z(),N(12,Hq,2,1,`p`,56)),e&2){let e=t.$implicit;j(6),Y(e.url),j(),P(e.finalUrl?7:-1),j(),X(` (`,e.outcome,`) `),j(),P(e.guards?9:-1),j(),P(e.resolvers?10:-1),j(),P(e.durationMs===void 0?-1:11),j(),P(e.reason?12:-1)}}function Wq(e,t){if(e&1&&(R(0,`h3`),J(1,`Router during the render`),z(),F(2,Uq,13,7,null,null,Og)),e&2){let e=G();j(2),I(e.navigations)}}function Gq(e,t){e&1&&(R(0,`span`,81),J(1,`cached`),z())}function Kq(e,t){if(e&1&&(R(0,`span`,91),J(1,`not cached`),z()),e&2){let e=G().$implicit;L(`title`,G(3).skipText(e.cacheSkip))}}function qq(e,t){if(e&1&&(R(0,`p`,92),J(1),z()),e&2){let e=G().$implicit,t=G(3);j(),X(`Not cached: `,t.skipText(e.cacheSkip),`.`)}}function Jq(e,t){if(e&1&&(R(0,`p`,87)(1,`span`,76),J(2),z(),R(3,`span`,90),J(4),z(),R(5,`span`,77),J(6),z(),R(7,`span`,88),J(8),z(),N(9,Gq,2,0,`span`,81)(10,Kq,2,1,`span`,91),z(),N(11,qq,2,1,`p`,92)),e&2){let e=t.$implicit,n=G(3);j(2),Y(e.method),j(),L(`title`,e.url),j(),Y(e.url),j(),q(`ok`,n.callTone(e)===`ok`)(`bad`,n.callTone(e)===`bad`),j(),Y(n.statusLabel(e)),j(2),X(``,e.durationMs,` ms`),j(),P(e.cacheStored?9:e.cacheSkip?10:-1),j(2),P(!e.cacheStored&&e.cacheSkip?11:-1)}}function Yq(e,t){e&1&&(R(0,`p`,56),J(1,`The render made no HttpClient calls.`),z())}function Xq(e,t){e&1&&(R(0,`p`,92),J(1),z()),e&2&&(j(),X(`Why: `,t,`.`))}function Zq(e,t){if(e&1&&(R(0,`p`,87)(1,`span`,76),J(2),z(),R(3,`span`,90),J(4),z(),R(5,`span`,83),J(6,`cache miss`),z()(),N(7,Xq,2,1,`p`,92)),e&2){let e,n=t.$implicit,r=G(4);j(2),Y(n.method),j(),L(`title`,n.url),j(),Y(n.url),j(3),P((e=r.refetchReason(n))?7:-1,e)}}function Qq(e,t){if(e&1&&(R(0,`h3`),J(1),z(),R(2,`p`,56),J(3,` These calls ran on the server and again after hydration instead of reading the transfer cache. `),z(),F(4,Zq,8,4,null,null,wq)),e&2){let e=G(3);j(),X(`Fetched again in the browser (`,e.refetched().length,`)`),j(3),I(e.refetched())}}function $q(e,t){e&1&&(R(0,`p`,86),J(1,`No server call ran again in the browser.`),z())}function eJ(e,t){if(e&1&&(R(0,`div`,72)(1,`h3`,84),J(2),R(3,`code`),J(4),z()(),R(5,`dl`,85)(6,`div`)(7,`dt`),J(8,`Request id`),z(),R(9,`dd`)(10,`code`),J(11),z()()(),R(12,`div`)(13,`dt`),J(14,`Render`),z(),R(15,`dd`),J(16),z()(),R(17,`div`)(18,`dt`),J(19,`Total`),z(),R(20,`dd`),J(21),z()(),R(22,`div`)(23,`dt`),J(24,`Sent`),z(),R(25,`dd`),J(26),z()(),R(27,`div`)(28,`dt`),J(29,`Browser page`),z(),R(30,`dd`),J(31),z()()(),N(32,Pq,11,1,`p`,56),N(33,Lq,6,0),N(34,Wq,4,0),R(35,`h3`),J(36),z(),F(37,Jq,12,11,null,null,wq,!1,Yq,2,0,`p`,56),N(40,Qq,6,1)(41,$q,2,0,`p`,86),z()),e&2){let e,n=t,r=G(2);j(2),X(` `,n.method,` `),j(2),Y(n.url),j(7),Y(n.id),j(5),X(``,n.renderMs,` ms`),j(5),X(``,n.durationMs,` ms`),j(5),X(``,n.bytes,` B`),j(5),Y(r.requestPage()?.title||r.requestPage()?.url||`not connected`),j(),P((e=r.compressedWith(n))?32:-1,e),j(),P(n.overrides?.length?33:-1),j(),P(n.navigations?.length?34:-1),j(2),X(`Server calls (`,r.requestCalls().length,`)`),j(),I(r.requestCalls()),j(3),P(r.refetched().length?40:r.requestPage()&&r.requestCalls().length?41:-1)}}function tJ(e,t){if(e&1&&(R(0,`div`,26)(1,`table`)(2,`thead`)(3,`tr`)(4,`th`,69),J(5,`Request`),z(),R(6,`th`,69),J(7,`Status`),z(),R(8,`th`,69),J(9,`Render mode`),z(),R(10,`th`,70),J(11,`Render`),z(),R(12,`th`,70),J(13,`Server calls`),z(),R(14,`th`,69),J(15,`Notes`),z()()(),R(16,`tbody`),F(17,Nq,20,20,`tr`,71,wq),z()()(),N(19,eJ,42,13,`div`,72)),e&2){let e,t=G();j(17),I(t.requests()),j(2),P((e=t.selectedRequest())?19:-1,e)}}function nJ(e,t){e&1&&(R(0,`div`,11)(1,`p`),J(2,`No SSR requests traced.`),z(),R(3,`p`,56),J(4,` Add `),R(5,`code`),J(6,`app.use(devtools.ssrMiddleware)`),z(),J(7,` before the Angular handler in `),R(8,`code`),J(9,`server.ts`),z(),J(10,`, then load a server rendered page. `),z()())}function rJ(e,t){e&1&&(R(0,`span`,94),J(1,`transfer cache`),z())}function iJ(e,t){if(e&1&&(R(0,`span`,94),J(1),z()),e&2){let e=G().$implicit;j(),X(`delayed `,e.delayMs,` ms`)}}function aJ(e,t){e&1&&(R(0,`span`,82),J(1,`mocked`),z())}function oJ(e,t){e&1&&(R(0,`span`,83),J(1,`faulted`),z())}function sJ(e,t){if(e&1&&(R(0,`span`,97),J(1,`rule `),R(2,`code`),J(3),z()()),e&2){let e=t;L(`title`,`Matched rule: `+e),j(3),Y(e)}}function cJ(e,t){if(e&1){let e=U();R(0,`tr`,73),W(`click`,function(){let t=D(e).$implicit;return O(G(2).openCall(t.id))}),R(1,`td`)(2,`span`,94),J(3),z()(),R(4,`td`,76),J(5),z(),R(6,`td`,74)(7,`button`,95),J(8),z()(),R(9,`td`,96),J(10),z(),R(11,`td`,77),B(12,`span`,78),J(13),z(),R(14,`td`,79),J(15),z(),R(16,`td`)(17,`div`,80),N(18,rJ,2,0,`span`,94),N(19,iJ,2,1,`span`,94),N(20,aJ,2,0,`span`,82),N(21,oJ,2,0,`span`,83),N(22,sJ,4,2,`span`,97),z()()()}if(e&2){let e,n=t.$implicit,r=G(2);q(`selected`,r.selectedCall()?.id===n.id),j(2),q(`server`,n.side===`server`),j(),Y(n.side===`server`?`SSR`:`Client`),j(2),Y(n.method),j(2),L(`title`,n.url),M(`data-call-id`,n.id)(`aria-pressed`,r.selectedCall()?.id===n.id)(`aria-controls`,r.selectedCall()?`call-preview`:null),j(),X(` `,n.url,` `),j(),L(`title`,n.pageUrl??``),j(),X(` `,n.pageUrl??``,` `),j(),q(`ok`,r.callTone(n)===`ok`)(`redirect`,r.callTone(n)===`redirect`)(`bad`,r.callTone(n)===`bad`),j(2),X(``,r.statusLabel(n),` `),j(2),X(``,n.durationMs,` ms`),j(3),P(n.cacheHit?18:-1),j(),P(n.delayMs?19:-1),j(),P(n.mocked?20:-1),j(),P(n.faulted?21:-1),j(),P((e=r.rulePatternOf(n))?22:-1,e)}}function lJ(e,t){if(e&1&&(R(0,`div`,26)(1,`table`)(2,`thead`)(3,`tr`)(4,`th`,69),J(5,`Side`),z(),R(6,`th`,69),J(7,`Method`),z(),R(8,`th`,69),J(9,`URL`),z(),R(10,`th`,69),J(11,`Page`),z(),R(12,`th`,69),J(13,`Status`),z(),R(14,`th`,70),J(15,`Time`),z(),R(16,`th`,69),J(17,`Notes`),z()()(),R(18,`tbody`,93),F(19,cJ,23,26,`tr`,71,Eq),z()()()),e&2){let e=G();j(19),I(e.visibleCalls())}}function uJ(e,t){e&1&&J(0),e&2&&X(` Nothing matches “`,G(2).callQuery().trim(),`” with these filters. `)}function dJ(e,t){e&1&&J(0),e&2&&X(` None of the `,G(2).timeline().length,` requests fit these filters. `)}function fJ(e,t){if(e&1){let e=U();R(0,`div`,27)(1,`p`),J(2,`No requests match.`),z(),R(3,`p`,56),N(4,uJ,1,1)(5,dJ,1,1),z(),R(6,`div`,98)(7,`button`,68),W(`click`,function(){return D(e),O(G().clearCallFilters())}),J(8,`Clear filters`),z()()()}if(e&2){let e=G();j(4),P(e.callQuery().trim()?4:5)}}function pJ(e,t){e&1&&(R(0,`div`,11)(1,`p`),J(2,`No requests yet.`),z(),R(3,`p`,56),J(4,` Add `),R(5,`code`),J(6,`withPangular()`),z(),J(7,` to `),R(8,`code`),J(9,`provideHttpClient`),z(),J(10,`, then load a page of the app. `),z()())}function mJ(e,t){if(e&1){let e=U();R(0,`button`,105),W(`click`,function(){D(e);let t=G();return O(G().copyPreview(t))}),J(1,` Copy `),z()}if(e&2){let e=G();M(`aria-label`,`Copy the response of `+e.method+` `+e.url)}}function hJ(e,t){e&1&&(R(0,`p`,107),J(1,` Matched rule `),R(2,`code`),J(3),z()()),e&2&&(j(3),Y(t))}function gJ(e,t){if(e&1){let e=U();R(0,`div`,99),W(`keydown.escape`,function(){return D(e),O(G().closePreview())}),R(1,`div`,100)(2,`h3`,101),J(3,`Response preview`),z(),R(4,`div`,102),N(5,mJ,2,1,`button`,103),R(6,`button`,104),W(`click`,function(){let t=D(e);return O(G().mockCall(t))}),J(7,` Mock this request `),z(),R(8,`button`,105),W(`click`,function(){return D(e),O(G().closePreview())}),J(9,`Close`),z()()(),R(10,`p`,106)(11,`span`,76),J(12),z(),R(13,`span`,77),J(14),z(),R(15,`span`,90),J(16),z()(),N(17,hJ,4,1,`p`,107),R(18,`pre`,108),J(19),z()()}if(e&2){let e,n=t,r=G();j(5),P(!n.error&&n.preview?5:-1),j(),L(`disabled`,!r.canWrite()),M(`aria-describedby`,r.canWrite()?null:`http-writes-off`),j(6),Y(n.method),j(),q(`ok`,r.callTone(n)===`ok`)(`redirect`,r.callTone(n)===`redirect`)(`bad`,r.callTone(n)===`bad`),j(),Y(r.statusLabel(n)),j(),L(`title`,n.url),j(),Y(n.url),j(),P((e=r.rulePatternOf(n))?17:-1,e),j(),q(`error`,!!n.error&&!n.cancelled),M(`aria-label`,n.error?`Response error`:`Response body`),j(),Y(n.error??r.previewText(n)??`(no body)`)}}function _J(e,t){if(e&1&&(R(0,`p`,31),J(1),z()),e&2){let e=G();j(),Y(e.writesOff)}}function vJ(e,t){e&1&&(R(0,`p`,46),J(1,` SSR mocks are not transferred to the client: the browser requests the URL again and gets the real response unless the rule also applies on the client. `),z())}function yJ(e,t){e&1&&(R(0,`span`),J(1,`passthrough`),z())}function bJ(e,t){if(e&1&&(R(0,`span`,77),J(1),z()),e&2){let e=G().$implicit,t=G();q(`ok`,t.statusTone(e.status)===`ok`)(`redirect`,t.statusTone(e.status)===`redirect`)(`bad`,t.statusTone(e.status)===`bad`),j(),Y(e.status)}}function xJ(e,t){if(e&1&&(R(0,`span`),J(1),z()),e&2){let e=G().$implicit;j(),X(``,e.delayMs,` ms`)}}function SJ(e,t){e&1&&(R(0,`span`),J(1,`mock body`),z())}function CJ(e,t){e&1&&(R(0,`p`,116),J(1,` The SSR mock is not written to TransferState, so the browser requests this URL again. `),z())}function wJ(e,t){if(e&1){let e=U();R(0,`li`)(1,`label`,109)(2,`input`,110),W(`change`,function(){let t=D(e).$implicit;return O(G().toggleRule(t.id))}),z(),R(3,`code`,111)(4,`span`,112),J(5),z(),J(6),z()(),R(7,`button`,113),W(`click`,function(){let t=D(e).$implicit;return O(G().removeRule(t.id))}),J(8,` Remove `),z(),R(9,`span`,114)(10,`span`),J(11),z(),N(12,yJ,2,0,`span`)(13,bJ,2,7,`span`,115),N(14,xJ,2,1,`span`),N(15,SJ,2,0,`span`),z(),N(16,CJ,2,0,`p`,116),z()}if(e&2){let e=t.$implicit,n=G();q(`off`,!e.enabled),j(2),L(`checked`,e.enabled)(`disabled`,!n.canWrite()),M(`aria-describedby`,n.canWrite()?null:`http-writes-off`)(`aria-label`,`Enable rule for `+e.pattern),j(),L(`title`,e.pattern),j(2),Y(e.method||`ANY`),j(),X(` `,e.pattern),j(),L(`disabled`,!n.canWrite()),M(`aria-describedby`,n.canWrite()?null:`http-writes-off`)(`aria-label`,`Remove rule for `+e.pattern),j(4),Y(n.targetLabel(e.target)),j(),P(e.status===void 0?12:13),j(2),P(e.delayMs?14:-1),j(),P(e.body?15:-1),j(),P(n.mocksOnServer(e)?16:-1)}}function TJ(e,t){e&1&&(R(0,`li`,53),J(1,`No rules. SSR rules apply on the next page load.`),z())}function EJ(e,t){if(e&1){let e=U();R(0,`p`,61),J(1,` Throws while the server renders, so it needs `),R(2,`code`),J(3,`providePangularHttp()`),z(),J(4,` and a page the engine renders. Prerendered files served as static files skip it. `),z(),R(5,`label`),J(6,` Error message `),R(7,`input`,117),W(`input`,function(t){return D(e),O(G().patchOverride(`message`,t))}),z()()}if(e&2){let e=G();j(7),L(`value`,e.overrideDraft().message)}}function DJ(e,t){e&1&&J(0,` For a cached HTTP response this is the whole cache record, not only the response body. `)}function OJ(e,t){e&1&&(R(0,`p`,121),J(1,` Filled in from the TransferState payload. The value starts empty because the panel only shows a redacted copy, so type the JSON the server should send. `),N(2,DJ,1,0),z()),e&2&&(j(2),P(t===`http`?2:-1))}function kJ(e,t){if(e&1){let e=U();R(0,`label`),J(1,` TransferState key `),R(2,`input`,118),W(`input`,function(t){return D(e),O(G().patchOverride(`key`,t))}),z()(),R(3,`label`)(4,`span`),J(5,`New JSON value `),R(6,`span`,33),J(7,`(empty removes the entry)`),z()(),R(8,`textarea`,119),W(`input`,function(t){return D(e),O(G().patchOverride(`value`,t))}),z()(),R(9,`p`,120),J(10),z(),N(11,OJ,3,1,`p`,121)}if(e&2){let e,t=G();j(2),L(`value`,t.overrideDraft().key),j(6),L(`value`,t.overrideDraft().value),M(`aria-invalid`,t.overrideValueError()?`true`:null)(`aria-describedby`,t.overrideFromPayload()?`override-value-error override-value-note`:`override-value-error`),j(2),Y(t.overrideValueError()),j(),P((e=t.overrideFromPayload())?11:-1,e)}}function AJ(e,t){e&1&&(R(0,`p`,61),J(1,` Serves `),R(2,`code`),J(3,`index.csr.html`),z(),J(4,` instead of rendering. Needs `),R(5,`code`),J(6,`browserDistFolder`),z(),J(7,` in `),R(8,`code`),J(9,`initPangularHub()`),z(),J(10,`. `),z())}function jJ(e,t){if(e&1&&(R(0,`span`),J(1),z()),e&2){let e=G().$implicit;j(),Y(e.message)}}function MJ(e,t){if(e&1&&(R(0,`span`),J(1),z()),e&2){let e=G().$implicit;j(),Z(``,e.value===void 0?`remove`:`set`,` `,e.key)}}function NJ(e,t){if(e&1){let e=U();R(0,`li`)(1,`label`,109)(2,`input`,110),W(`change`,function(){let t=D(e).$implicit;return O(G().toggleOverride(t.id))}),z(),R(3,`code`,111)(4,`span`,112),J(5),z(),J(6),z()(),R(7,`button`,122),W(`click`,function(){let t=D(e).$implicit;return O(G().removeOverride(t.id))}),J(8,` Remove `),z(),R(9,`span`,114),N(10,jJ,2,1,`span`),N(11,MJ,2,2,`span`),z()()}if(e&2){let e=t.$implicit,n=G();q(`off`,!e.enabled),j(2),L(`checked`,e.enabled)(`disabled`,!n.canWrite()),M(`aria-label`,`Enable `+n.overrideLabel(e.kind)+` for `+e.pattern),j(),L(`title`,e.pattern),j(2),Y(n.overrideLabel(e.kind)),j(),X(` `,e.pattern),j(),L(`disabled`,!n.canWrite()),M(`aria-label`,`Remove `+n.overrideLabel(e.kind)+` for `+e.pattern),j(3),P(e.message?10:-1),j(),P(e.key?11:-1)}}function PJ(e,t){e&1&&(R(0,`li`,53),J(1,`No overrides.`),z())}function FJ(e,t){if(e&1&&(R(0,`div`)(1,`dt`),J(2,`DOM nodes hydrated`),z(),R(3,`dd`),J(4),z()(),R(5,`div`)(6,`dt`),J(7,`DOM nodes skipped`),z(),R(8,`dd`),J(9),z()(),R(10,`div`)(11,`dt`),J(12,`Mismatched components`),z(),R(13,`dd`),J(14),z()()),e&2){let e=t;j(4),Y(e.hydrated),j(5),Y(e.skipped),j(4),q(`bad`,e.mismatched>0),j(),Y(e.mismatched)}}function IJ(e,t){if(e&1&&(R(0,`span`,124)(1,`span`,125),J(2,`Expected`),z(),R(3,`code`),J(4),z()()),e&2){let e=G().$implicit;j(4),Y(e.expected)}}function LJ(e,t){if(e&1&&(R(0,`span`,124)(1,`span`,125),J(2,`Actual`),z(),R(3,`code`),J(4),z()()),e&2){let e=G().$implicit;j(4),Y(e.actual)}}function RJ(e,t){if(e&1&&(R(0,`li`)(1,`code`),J(2),z(),N(3,IJ,5,1,`span`,124),N(4,LJ,5,1,`span`,124),z()),e&2){let e=t.$implicit;j(2),Y(`<`+e.component+`>`),j(),P(e.expected?3:-1),j(),P(e.actual?4:-1)}}function zJ(e,t){if(e&1&&(R(0,`h3`),J(1),z(),R(2,`ul`,123),F(3,RJ,5,3,`li`,null,Og),z()),e&2){let e=G();j(),X(`Mismatches (`,e.mismatches.length,`)`),j(2),I(e.mismatches)}}function BJ(e,t){if(e&1&&(R(0,`li`)(1,`code`),J(2),z()()),e&2){let e=t.$implicit;j(2),Y(e)}}function VJ(e,t){if(e&1&&(R(0,`h3`),J(1,`ngSkipHydration hosts`),z(),R(2,`ul`,126),F(3,BJ,3,1,`li`,null,Og),z()),e&2){let e=G();j(3),I(e.skipHydrationHosts)}}function HJ(e,t){e&1&&(R(0,`h3`),J(1,`Warnings`),z(),R(2,`p`,56),J(3,` Not captured: add `),R(4,`code`),J(5,`providePangularHttp()`),z(),J(6,` to the app providers. `),z())}function UJ(e,t){if(e&1&&(R(0,`pre`,127),J(1),z()),e&2){let e=t.$implicit;j(),Y(e)}}function WJ(e,t){e&1&&(R(0,`p`,86),J(1,`No hydration warnings.`),z())}function GJ(e,t){if(e&1&&(R(0,`h3`),J(1),z(),F(2,UJ,2,1,`pre`,127,Og,!1,WJ,2,0,`p`,86)),e&2){let e=G();j(),X(`Warnings (`,e.warnings.length,`)`),j(),I(e.warnings)}}function KJ(e,t){if(e&1&&(R(0,`dl`,85)(1,`div`)(2,`dt`),J(3,`Enabled`),z(),R(4,`dd`)(5,`span`,94),J(6),z()()(),R(7,`div`)(8,`dt`),J(9,`Hydrated components`),z(),R(10,`dd`),J(11),z()(),R(12,`div`)(13,`dt`),J(14,`Hydrated nodes`),z(),R(15,`dd`),J(16),z()(),R(17,`div`)(18,`dt`),J(19,`Skipped components`),z(),R(20,`dd`),J(21),z()(),R(22,`div`)(23,`dt`),J(24,`App stable after`),z(),R(25,`dd`),J(26),z()(),R(27,`div`)(28,`dt`),J(29,`Incremental defer blocks`),z(),R(30,`dd`),J(31),z()(),N(32,FJ,15,5),z(),N(33,zJ,5,1),N(34,VJ,5,0),N(35,HJ,7,0)(36,GJ,5,2)),e&2){let e,n=t;j(5),q(`on`,n.enabled)(`off-tag`,!n.enabled),j(),Y(n.enabled?`yes`:`no (client render only)`),j(5),Y(n.hydratedComponents??`n/a`),j(5),Y(n.hydratedNodes??`n/a`),j(5),Y(n.componentsSkippedHydration??`n/a`),j(5),Y(n.stableMs===void 0?`n/a`:n.stableMs+` ms`),j(5),Y(n.deferBlocksWithIncrementalHydration??`n/a`),j(),P((e=n.nodes)?32:-1,e),j(),P(n.mismatches?.length?33:-1),j(),P(n.skipHydrationHosts.length?34:-1),j(),P(n.warningsCaptured===!1?35:36)}}function qJ(e,t){e&1&&(R(0,`div`,11)(1,`p`),J(2,`No hydration data for this page.`),z(),R(3,`p`,56),J(4,`Open a server rendered page of the app to see its stats.`),z()())}function JJ(e,t){e&1&&(R(0,`div`,11)(1,`p`),J(2,`No TransferState script: this page was not server rendered.`),z()())}function YJ(e,t){if(e&1&&(R(0,`p`,129),J(1),z()),e&2){let e=G(2);j(),Y(e.error)}}function XJ(e,t){e&1&&(R(0,`span`,94),J(1),z()),e&2&&(j(),Y(t))}function ZJ(e,t){if(e&1&&(R(0,`span`,94),J(1),z(),R(2,`span`,132),J(3),z()),e&2){let e=t,n=G().$implicit,r=G(3);q(`server`,r.statusTone(e.status)===`ok`)(`fault`,r.statusTone(e.status)===`bad`),j(),X(`HTTP `,e.status),j(2),Y(e.url??n.key)}}function QJ(e,t){if(e&1&&(R(0,`span`,132),J(1),z()),e&2){let e=G().$implicit;j(),Y(e.key)}}function $J(e,t){if(e&1){let e=U();R(0,`button`,105),W(`click`,function(){D(e);let t=G().$implicit;return O(G(3).editEntry(t))}),J(1,` Edit in SSR overrides `),z()}if(e&2){let e=G().$implicit;M(`aria-label`,`Edit in SSR overrides, key `+e.key)}}function eY(e,t){if(e&1){let e=U();R(0,`details`)(1,`summary`),B(2,`span`,131),N(3,XJ,2,1,`span`,94),N(4,ZJ,4,6)(5,QJ,2,1,`span`,132),R(6,`span`,133),J(7),z()(),R(8,`div`,134)(9,`span`,135),J(10,`Key`),z(),R(11,`code`,136),J(12),z(),R(13,`div`,137)(14,`button`,105),W(`click`,function(){let t=D(e).$implicit;return O(G(3).copyKey(t.key))}),J(15,` Copy `),z(),N(16,$J,2,1,`button`,103),z()(),R(17,`pre`,138),J(18),xv(19,`json`),z()()}if(e&2){let e,n,r=t.$implicit,i=G(3);j(3),P((e=i.payloadLabel(r))?3:-1,e),j(),P((n=r.http)?4:5,n),j(3),X(``,r.size,` B`),j(5),Y(r.key),j(2),M(`aria-label`,`Copy key `+r.key),j(2),P(i.canEditEntry(r)?16:-1),j(),M(`aria-label`,`Value of `+r.key),j(),Y(Cv(19,8,r.value))}}function tY(e,t){if(e&1&&(R(0,`p`,128),J(1),z(),N(2,YJ,2,1,`p`,129),R(3,`div`,130),F(4,eY,20,10,`details`,null,Dq),z()),e&2){let e=G();j(),rv(` `,e.entries.length,` entr`,e.entries.length===1?`y`:`ies`,`, `,e.size,` bytes `),j(),P(e.error?2:-1),j(2),I(e.entries)}}function nY(e,t){e&1&&N(0,JJ,3,0,`div`,11)(1,tY,6,4),e&2&&P(+!!t.found)}function rY(e,t){e&1&&(R(0,`div`,11)(1,`p`),J(2,`Open a page of the app to see its payload.`),z()())}var iY={kind:`render-error`,pattern:``,message:``,key:``,value:``},aY={"render-error":`Render error`,"client-render":`Client render`,"state-edit":`TransferState edit`},oY={server:`Server`,prerender:`Prerender`,client:`Client`,redirect:`Redirect`,"not-rendered":`Not rendered`,unknown:`Unknown`},sY={pattern:``,method:``,target:`both`,status:``,delayMs:``,body:``};function cY(e){try{let t=new URL(e,`http://x`);return t.pathname+t.search}catch{return e}}var lY=/\[redacted\]|%5Bredacted%5D/gi;function uY(e){return(/^([a-z][a-z\d+.-]*:|\/\/)/i.test(e)?cY(e):e).replace(lY,`*`)}function dY(e){let t=rO(e);if(t!==null)return t;try{return JSON.parse(e),e.trim()}catch{return null}}var fY=[`GET`,`POST`,`PUT`,`PATCH`,`DELETE`];function pY(e){try{return new URL(e,`http://x`).pathname}catch{return``}}function mY(e){let t=pY(e);return t===`/`?``:t}var hY=/\[redacted\]|%5Bredacted%5D/i,gY=200,_Y=50,vY=500,yY=1e5,bY=[{value:``,label:`None`},...KT.map(([e,t])=>({value:String(e),label:`${e} ${t}`}))],xY=class e{rpc=$(null);canWrite=Q(()=>ME(this.rpc(),`http`));writesOff=iE(`http`);loading=A(!1);failed=A(!1);serverCalls=A([]);pages=A([]);payloads=A({});serverDropped=A(0);requests=A([]);rules=A([]);overrides=A([]);overrideDraft=A({...iY});overrideFromPayload=A(null);overrideKindOptions=[{value:`render-error`,label:`Render error`},{value:`client-render`,label:`Force Client render`},{value:`state-edit`,label:`Edit TransferState entry`}];overrideValueError=Q(()=>{let e=this.overrideDraft().value.trim();if(!e)return``;try{return JSON.parse(e),``}catch{return`The value must be valid JSON.`}});overrideReady=Q(()=>{let e=this.overrideDraft();return!e.pattern.trim()||this.overrides().length>=20?!1:e.kind!==`state-edit`||!!e.key.trim()&&!this.overrideValueError()});hostPageId=fE();selectedPageId=Fv({source:()=>this.pages(),computation:(e,t)=>t?.value&&e.some(e=>e.pageId===t.value)?t.value:e.find(e=>e.pageId===this.hostPageId)?.pageId??e[0]?.pageId??null});selectedCallId=A(null);draft=A({...sY});message=A(``);bodyPlaceholder=`{ "error": "Service unavailable" }`;statusOptions=bY;unsubscribe=[];destroyRef=T(Ts);injector=T(Cs);host=T(Pl);selected=Q(()=>this.pages().find(e=>e.pageId===this.selectedPageId())??null);pageRequestId=Q(()=>this.selected()?.ssrRequestId??null);selectedRequestId=Fv(()=>this.pageRequestId());selectedPayload=Q(()=>{let e=this.selectedPageId();return e?this.payloads()[e]??null:null});maxCalls=Q(()=>jE(this.rpc()).limits.httpCalls);droppedCalls=Q(()=>(this.selected()?.dropped??0)+this.serverDropped());pageServerCalls=Q(()=>{let e=this.selected()?.initialUrl;return e?this.serverCalls().filter(t=>!t.pageUrl||t.pageUrl===e):this.serverCalls()});timeline=Q(()=>[...this.pageServerCalls(),...this.selected()?.calls??[]].sort((e,t)=>t.at-e.at));callQuery=A(``);sideFilter=A(`all`);failedOnly=A(!1);sideOptions=[{value:`all`,label:`All sides`},{value:`server`,label:`SSR`},{value:`client`,label:`Client`}];visibleCalls=Q(()=>{let e=this.callQuery().trim().toLowerCase(),t=this.sideFilter()??`all`,n=this.failedOnly();return this.timeline().filter(r=>(t===`all`||r.side===t)&&(!n||this.isFailed(r))&&(!e||`${r.method} ${r.url}`.toLowerCase().includes(e)||`${r.method} ${cY(r.url)}`.toLowerCase().includes(e)))});filterStatus=Q(()=>{this.callQuery(),this.sideFilter(),this.failedOnly(),this.filterFlip=!this.filterFlip;let e=Nv(()=>`${this.visibleCalls().length} of ${this.timeline().length}`);return this.filterFlip?`${e}\u00a0`:e});filterFlip=!0;selectedCall=Q(()=>this.visibleCalls().find(e=>e.id===this.selectedCallId())??null);selectedRequest=Q(()=>this.requests().find(e=>e.id===this.selectedRequestId())??null);requestCalls=Q(()=>{let e=this.selectedRequest()?.id;return e?this.serverCalls().filter(t=>t.requestId===e):[]});requestPage=Q(()=>{let e=this.selectedRequest()?.id;return e?this.pages().find(t=>t.ssrRequestId===e)??null:null});refetched=Q(()=>{let e=this.selectedRequest(),t=this.requestPage();if(!e||!t)return[];let n=new Set(this.requestCalls().filter(e=>e.status).map(e=>`${e.method} ${cY(e.url)}`));return t.calls.filter(t=>t.side===`client`&&!t.cacheHit&&!t.mocked&&t.at>=e.at&&n.has(`${t.method} ${cY(t.url)}`))});draftMocksOnServer=Q(()=>{let e=this.draftRule();return!!e&&this.mocksOnServer(e)});draftRule=Q(()=>{let e=this.draft(),t=e.pattern.trim();if(!t||t.length>vY||this.bodyError()||this.rules().length>=_Y)return null;let n=e.body.trim(),r=Math.min(Math.max(Math.round(Number(e.delayMs))||0,0),1e4),i=e.status.trim()?Number(e.status):n?200:void 0;return i!==void 0&&!qT(i)||i===void 0&&!r?null:{pattern:t,enabled:!0,target:e.target,...e.method?{method:e.method}:{},...i===void 0?{}:{status:i},...r?{delayMs:r}:{},...n?{body:n}:{}}});draftHint=Q(()=>{let e=this.draft();return this.rules().length>=_Y?`You can add up to ${_Y} rules. Remove one to add another.`:e.pattern.trim()?e.pattern.trim().length>vY?`The URL pattern is limited to ${vY} characters.`:this.bodyError()?``:e.status.trim()&&!qT(Number(e.status))?`Pick a status from the list.`:this.draftRule()?!e.status.trim()&&e.body.trim()?`With no status, the mock body returns 200.`:``:`Set a status, a delay or a mock body.`:`Enter a URL pattern to add a rule.`});bodyError=Q(()=>{let e=this.draft().body.trim();if(!e)return``;if(e.length>yY)return`The mock body is limited to ${yY} characters.`;try{return JSON.parse(e),``}catch{return`The mock body must be valid JSON.`}});constructor(){fc(()=>{let e=this.rpc();e&&this.load(e)}),this.destroyRef.onDestroy(()=>this.stopListening())}async load(e){this.loading.set(!0),this.failed.set(!1);try{let t=e.scope(`pangular`).rpc,[n,r]=await Promise.all([t.sharedState(`http`),t.sharedState(`http-payloads`)]);if(this.destroyRef.destroyed)return;let i=e=>{let t=e;this.serverCalls.set(t?.serverCalls??[]),this.serverDropped.set(t?.serverDropped??0),this.requests.set([...t?.requests??[]].reverse()),this.pages.set(t?.pages??[]),this.rules.set(t?.rules??[]),this.overrides.set(t?.ssrOverrides??[])},a=e=>this.payloads.set(e?.pages??{});i(n.value()),a(r.value()),this.stopListening(),this.unsubscribe=[n.on(`updated`,i),r.on(`updated`,a)]}catch{this.failed.set(!0)}finally{this.loading.set(!1)}}retry(){let e=this.rpc();e&&this.load(e)}guardVerdict(e){return e.guards?.passed===!1?e.outcome===`redirected`?`redirected`:`rejected`:``}msLabel(e){return e===void 0?`n/a`:`${e} ms`}skipText(e){return GT[e]??``}refetchReason(e){let t=`${e.method} ${cY(e.url)}`,n=this.requestCalls().filter(e=>`${e.method} ${cY(e.url)}`===t),r=n[0];return r?.cacheSkip&&n.every(e=>e.cacheSkip===r.cacheSkip)?this.skipText(r.cacheSkip):``}compressedWith(e){if(e.compressedBeforeTrace)return e.headers[`content-encoding`]??`unknown encoding`}renderModeLabel(e){return oY[e]??`Unknown`}statusLabel(e){return e.cancelled?`cancelled`:e.status?String(e.status):`ERR`}callTone(e){return e.cancelled?`neutral`:this.statusTone(e.status)}isFailed(e){return!!e.cancelled||!e.status||e.status>=400}clearCallFilters(){this.callQuery.set(``),this.sideFilter.set(`all`),this.failedOnly.set(!1),this.host.nativeElement.querySelector(`#timeline-search`)?.focus()}rulePatternOf(e){return e.rulePattern?e.rulePattern:e.ruleId?this.rules().find(t=>t.id===e.ruleId)?.pattern??null:null}openCall(e){this.selectedCallId.set(e),Bd(()=>this.host.nativeElement.querySelector(`#preview-heading`)?.focus(),{injector:this.injector})}previewText(e){if(e.preview!==void 0)return rO(e.preview)??e.preview}async copyPreview(e){let t=this.previewText(e);if(t)try{await navigator.clipboard.writeText(t),this.message.set(`Copied.`)}catch{this.message.set(`The clipboard is not available here.`)}}mockCall(e){let t=e.method.toUpperCase(),n=uY(e.url),r=e.error||!e.preview?null:dY(e.preview);this.draft.set({...sY,pattern:n,method:t,body:r??``});let i=`${t} ${n}`;this.message.set(r?`Filled in a rule for ${i} with the preview as its body. Check it, then add the rule.`:e.preview&&!e.error?`Filled in a rule for ${i}. The preview is not complete JSON, so it is not used as the body.`:`Filled in a rule for ${i}. Set a status, a delay or a body, then add the rule.`),Bd(()=>this.host.nativeElement.querySelector(`#rule-pattern`)?.focus(),{injector:this.injector})}closePreview(){let e=this.selectedCallId();this.selectedCallId.set(null),e&&[...this.host.nativeElement.querySelectorAll(`button[data-call-id]`)].find(t=>t.dataset.callId===e)?.focus()}stopListening(){for(let e of this.unsubscribe.splice(0))e()}statusTone(e){return e===void 0?`neutral`:e===0||e>=400?`bad`:e>=300?`redirect`:e>=200?`ok`:`neutral`}mocksOnServer(e){return e.target!==`client`&&e.status!==void 0&&e.status<400}payloadLabel(e){return e.source===`hydration`?`hydration annotations`:e.fn?`Analog server function ${e.fn.name??e.fn.id}`:e.source===`analog`?`Analog`:null}targetLabel(e){return e===`both`?`SSR + client`:e===`server`?`SSR only`:`Client only`}pageOptions=Q(()=>this.pages().map(e=>({value:e.pageId,label:e.title||e.url})));methodOptions=Q(()=>{let e=this.draft().method;return[{value:``,label:`Any`},...(e&&!fY.includes(e)?[...fY,e]:fY).map(e=>({value:e,label:e}))]});targetOptions=[{value:`both`,label:`SSR + client`},{value:`server`,label:`SSR only`},{value:`client`,label:`Client only`}];selectPage(e){e&&this.selectedPageId.set(e),this.selectedCallId.set(null),this.overrideFromPayload.set(null)}setDraft(e,t){this.draft.update(n=>({...n,[e]:t}))}patch(e,t){let n=t.target.value;this.draft.update(t=>({...t,[e]:n}))}async addRule(e){e.preventDefault();let t=this.draftRule();if(!t)return;let n={id:`r${Date.now().toString(36)}${Math.random().toString(36).slice(2,6)}`,...t};await this.saveRules([...this.rules(),n],`Rule added.`,n)&&(this.draft.set({...sY}),this.host.nativeElement.querySelector(`#rule-pattern`)?.focus())}toggleRule(e){let t=this.rules().find(t=>t.id===e);t&&this.saveRules(this.rules().map(t=>t.id===e?{...t,enabled:!t.enabled}:t),`Rule updated.`,t)}async removeRule(e){let t=this.rules().findIndex(t=>t.id===e);if(t<0)return;let n=this.rules().filter(t=>t.id!==e);await this.saveRules(n,`Rule removed.`,this.rules()[t])&&this.focusAfterRemove(`[data-remove-rule]`,t,`#rule-list-heading`)}async clearCalls(){try{await gE(this.rpc(),`clear-http-calls`),this.selectedCallId.set(null),this.message.set(`Timeline cleared.`)}catch{this.message.set(`Could not clear the timeline.`)}}overrideLabel(e){return aY[e]??e}setOverrideDraft(e,t){this.overrideDraft.update(n=>({...n,[e]:t})),e===`kind`&&t!==`state-edit`&&this.overrideFromPayload.set(null)}patchOverride(e,t){let n=t.target.value;this.overrideDraft.update(t=>({...t,[e]:n})),e===`key`&&this.overrideFromPayload.set(null)}async copyKey(e){try{await navigator.clipboard.writeText(e),this.message.set(`Copied.`)}catch{this.message.set(`The clipboard is not available here.`)}}canEditEntry(e){let{key:t}=e;return this.canWrite()&&!!t&&t===t.trim()&&t.length<=gY&&!hY.test(t)}editEntry(e){if(!this.canEditEntry(e))return;let t=this.selected();this.overrideDraft.set({...iY,kind:`state-edit`,pattern:t?mY(t.initialUrl??t.url):``,key:e.key}),this.overrideFromPayload.set(e.http?`http`:`other`),this.message.set(`Editing the TransferState entry in SSR overrides.`),Bd(()=>{let e=this.host.nativeElement.querySelector(this.overrideDraft().pattern?`#override-value`:`#override-pattern`);e?.scrollIntoView?.({block:`center`}),e?.focus()},{injector:this.injector})}async addOverride(e){if(e.preventDefault(),!this.overrideReady())return;let t=this.overrideDraft(),n={id:`o${Date.now().toString(36)}${Math.random().toString(36).slice(2,6)}`,kind:t.kind,pattern:t.pattern.trim(),enabled:!0,...t.kind===`render-error`&&t.message.trim()?{message:t.message.trim()}:{},...t.kind===`state-edit`?{key:t.key.trim()}:{},...t.kind===`state-edit`&&t.value.trim()?{value:t.value.trim()}:{}};await this.saveOverrides([...this.overrides(),n],`Override added. Reload the page.`)&&(this.overrideDraft.set({...iY,kind:t.kind}),this.overrideFromPayload.set(null),this.host.nativeElement.querySelector(`#override-pattern`)?.focus())}toggleOverride(e){this.saveOverrides(this.overrides().map(t=>t.id===e?{...t,enabled:!t.enabled}:t),`Override updated. Reload the page.`)}async removeOverride(e){let t=this.overrides().findIndex(t=>t.id===e);if(t<0)return;let n=this.overrides().filter(t=>t.id!==e);await this.saveOverrides(n,`Override removed.`)&&this.focusAfterRemove(`[data-remove-override]`,t,`#override-list-heading`)}focusAfterRemove(e,t,n){Bd(()=>{let r=this.host.nativeElement,i=r.querySelectorAll(e);(i[Math.min(t,i.length-1)]??r.querySelector(n))?.focus()},{injector:this.injector})}announce(e){if(this.message()!==e){this.message.set(e);return}this.message.set(``),Bd(()=>{this.message()===``&&this.message.set(e)},{injector:this.injector})}async saveOverrides(e,t){try{let n=await gE(this.rpc(),`set-ssr-overrides`,e);return this.overrides.set(Array.isArray(n)?n:e),this.announce(t),!0}catch{return this.message.set(`Could not save the overrides.`),!1}}async saveRules(e,t,n){try{let r=await gE(this.rpc(),`set-http-rules`,e);return this.rules.set(Array.isArray(r)?r:e),this.announce(n.target===`client`?t:`${t} Reload the page to apply it to SSR.`),!0}catch{return this.message.set(`Could not save the rules.`),!1}}static ɵfac=function(t){return new(t||e)};static ɵcmp=Gh({type:e,selectors:[[`app-network-inspector`]],inputs:{rpc:[1,`rpc`]},decls:128,vars:54,consts:[[`role`,`status`,1,`state`],[`role`,`alert`,1,`state`,`error`],[1,`toolbar`],[1,`page-picker`],[`id`,`page-picker-label`],[`labelledBy`,`page-picker-label`,`emptyText`,`No connected page`,`placeholder`,`No connected page`,3,`valueChange`,`options`,`value`],[`type`,`button`,3,`click`,`disabled`],[`role`,`status`,1,`message`],[1,`grid`],[`aria-labelledby`,`ssr-heading`,1,`panel`,`wide`],[`id`,`ssr-heading`],[1,`empty`],[`aria-labelledby`,`timeline-heading`,1,`panel`,`wide`],[`id`,`timeline-heading`],[`what`,`HTTP calls`,`limit`,`httpCalls`,3,`dropped`,`max`],[`role`,`group`,`aria-label`,`Filter the HTTP timeline`,1,`filters`],[1,`search`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`,1,`search-icon`],[`cx`,`11`,`cy`,`11`,`r`,`7`],[`d`,`m20 20-3.5-3.5`],[`id`,`timeline-search`,`type`,`search`,`placeholder`,`Find a URL or method…`,`aria-label`,`Find a URL or method`,`autocomplete`,`off`,`spellcheck`,`false`,3,`input`,`keydown.escape`,`value`],[`ariaLabel`,`Side`,1,`side-filter`,3,`valueChange`,`options`,`value`],[1,`inline`,`failed-toggle`],[`type`,`checkbox`,3,`change`,`checked`],[1,`total`],[`role`,`status`,1,`sr-only`],[1,`table-wrap`],[`role`,`status`,1,`empty`,`no-match`],[`id`,`call-preview`,`role`,`region`,`aria-labelledby`,`preview-heading`,1,`preview`],[`aria-labelledby`,`rules-heading`,1,`panel`],[`id`,`rules-heading`],[`id`,`http-writes-off`,1,`muted`,`small`],[`id`,`rule-form`,1,`rule-form`,3,`submit`],[1,`hint`],[`id`,`rule-pattern`,`required`,``,`spellcheck`,`false`,`autocomplete`,`off`,`placeholder`,`e.g. /api/products`,3,`input`,`value`],[1,`row`],[1,`field-group`],[`id`,`rule-method-label`],[`labelledBy`,`rule-method-label`,3,`valueChange`,`options`,`value`],[`id`,`rule-target-label`],[`labelledBy`,`rule-target-label`,3,`valueChange`,`describedBy`,`options`,`value`],[`id`,`rule-status-label`],[`labelledBy`,`rule-status-label`,3,`valueChange`,`describedBy`,`options`,`value`],[`type`,`number`,`inputmode`,`numeric`,`min`,`0`,`max`,`10000`,`placeholder`,`0`,3,`input`,`value`],[`rows`,`3`,`spellcheck`,`false`,`aria-describedby`,`body-error`,3,`input`,`placeholder`,`value`],[`id`,`body-error`,1,`field-error`],[`id`,`rule-ssr-note`,1,`muted`,`small`],[`id`,`rule-hint`,1,`muted`,`small`],[1,`form-actions`],[`type`,`submit`,3,`disabled`],[`id`,`rule-list-heading`,`tabindex`,`-1`,1,`rules-heading`],[1,`rules`],[3,`off`],[1,`empty-rule`],[`aria-labelledby`,`overrides-heading`,1,`panel`],[`id`,`overrides-heading`],[1,`muted`,`small`],[1,`rule-form`,3,`submit`],[`id`,`override-kind-label`],[`labelledBy`,`override-kind-label`,3,`valueChange`,`describedBy`,`options`,`value`],[`id`,`override-pattern`,`required`,``,`spellcheck`,`false`,`autocomplete`,`off`,`placeholder`,`e.g. /examples/ssr`,3,`input`,`value`],[`id`,`override-kind-help`,1,`muted`,`small`],[`id`,`override-list-heading`,`tabindex`,`-1`,1,`rules-heading`],[`aria-labelledby`,`hydration-heading`,1,`panel`],[`id`,`hydration-heading`],[`aria-labelledby`,`payload-heading`,1,`panel`,`wide`],[`id`,`payload-heading`],[`aria-hidden`,`true`,1,`spinner`],[`type`,`button`,3,`click`],[`scope`,`col`],[`scope`,`col`,1,`num`],[3,`selected`],[`id`,`ssr-detail`,`role`,`region`,`aria-labelledby`,`ssr-detail-heading`,1,`preview`],[3,`click`],[1,`url`],[`type`,`button`,`aria-controls`,`ssr-detail`,1,`link`,3,`title`],[1,`method`],[1,`status`],[`aria-hidden`,`true`,1,`dot`],[1,`num`],[1,`notes`],[1,`tag`,`server`],[1,`tag`,`mock`],[1,`tag`,`fault`],[`id`,`ssr-detail-heading`],[1,`stats`],[1,`muted`,`small`,`ok-note`],[1,`request-call`],[1,`muted`],[1,`stats`,`nav-stats`],[1,`preview-url`,3,`title`],[1,`tag`,3,`title`],[1,`muted`,`small`,`skip-reason`],[`appRovingList`,`button[data-call-id]`],[1,`tag`],[`type`,`button`,1,`link`,3,`title`],[1,`page-url`,3,`title`],[1,`tag`,`rule-ref`,3,`title`],[1,`empty-actions`],[`id`,`call-preview`,`role`,`region`,`aria-labelledby`,`preview-heading`,1,`preview`,3,`keydown.escape`],[1,`preview-head`],[`id`,`preview-heading`,`tabindex`,`-1`],[1,`preview-actions`],[`type`,`button`,1,`ghost`],[`type`,`button`,`aria-controls`,`rule-form`,1,`ghost`,3,`click`,`disabled`],[`type`,`button`,1,`ghost`,3,`click`],[1,`preview-meta`],[1,`preview-rule`],[`tabindex`,`0`,`role`,`region`,1,`preview-body`],[1,`inline`],[`type`,`checkbox`,3,`change`,`checked`,`disabled`],[1,`rule-pattern`,3,`title`],[1,`rule-method`],[`type`,`button`,`data-remove-rule`,``,1,`link`,`remove`,3,`click`,`disabled`],[1,`rule-meta`],[1,`status`,3,`ok`,`redirect`,`bad`],[1,`rule-note`],[`spellcheck`,`false`,`placeholder`,`Simulated render error`,`aria-describedby`,`override-kind-help`,3,`input`,`value`],[`id`,`override-key`,`spellcheck`,`false`,`autocomplete`,`off`,3,`input`,`value`],[`id`,`override-value`,`rows`,`3`,`spellcheck`,`false`,3,`input`,`value`],[`id`,`override-value-error`,1,`field-error`],[`id`,`override-value-note`,1,`muted`,`small`],[`type`,`button`,`data-remove-override`,``,1,`link`,`remove`,3,`click`,`disabled`],[1,`plain`,`mismatches`],[1,`mismatch-row`],[1,`mismatch-label`],[1,`plain`],[1,`warn`],[1,`muted`,`small`,`summary-line`],[`role`,`alert`,1,`bad`],[1,`entries`],[`aria-hidden`,`true`,1,`chevron`],[1,`entry-key`],[1,`entry-size`],[1,`entry-key-row`],[1,`entry-key-label`],[1,`entry-key-text`],[1,`entry-actions`],[`tabindex`,`0`,`role`,`region`]],template:function(e,t){if(e&1&&(N(0,Oq,4,0,`div`,0)(1,kq,7,0,`div`,1),R(2,`div`,2)(3,`div`,3)(4,`span`,4),J(5,`Page`),z(),R(6,`app-select`,5),W(`valueChange`,function(e){return t.selectPage(e)}),z()(),R(7,`button`,6),W(`click`,function(){return t.clearCalls()}),J(8,` Clear timeline `),z(),R(9,`p`,7),J(10),z()(),R(11,`div`,8)(12,`section`,9)(13,`h2`,10),J(14),z(),N(15,tJ,20,1)(16,nJ,11,0,`div`,11),z(),R(17,`section`,12)(18,`h2`,13),J(19),z(),B(20,`app-limit-note`,14),R(21,`div`,15)(22,`div`,16),k(),R(23,`svg`,17),B(24,`circle`,18)(25,`path`,19),z(),hs(),R(26,`input`,20),W(`input`,function(e){return t.callQuery.set(e.target.value)})(`keydown.escape`,function(){return t.callQuery.set(``)}),z()(),R(27,`app-select`,21),cv(`valueChange`,function(e){return sv(t.sideFilter,e)||(t.sideFilter=e),e}),z(),R(28,`label`,22)(29,`input`,23),W(`change`,function(e){return t.failedOnly.set(e.target.checked)}),z(),J(30,` Failed only `),z(),R(31,`span`,24),J(32),z(),R(33,`span`,25),J(34),z()(),N(35,lJ,21,0,`div`,26)(36,fJ,9,1,`div`,27)(37,pJ,11,0,`div`,11),N(38,gJ,20,18,`div`,28),z(),R(39,`section`,29)(40,`h2`,30),J(41,`Fault injection`),z(),N(42,_J,2,1,`p`,31),R(43,`form`,32),W(`submit`,function(e){return t.addRule(e)}),R(44,`label`)(45,`span`),J(46,`URL pattern `),R(47,`span`,33),J(48,`(substring or * glob, ^ anchors the path)`),z()(),R(49,`input`,34),W(`input`,function(e){return t.patch(`pattern`,e)}),z()(),R(50,`div`,35)(51,`div`,36)(52,`span`,37),J(53,`Method`),z(),R(54,`app-select`,38),W(`valueChange`,function(e){return t.setDraft(`method`,e??``)}),z()(),R(55,`div`,36)(56,`span`,39),J(57,`Apply on`),z(),R(58,`app-select`,40),W(`valueChange`,function(e){return t.setDraft(`target`,e??`both`)}),z()()(),R(59,`div`,35)(60,`div`,36)(61,`span`,41),J(62,`Status`),z(),R(63,`app-select`,42),W(`valueChange`,function(e){return t.setDraft(`status`,e??``)}),z()(),R(64,`label`),J(65,` Delay (ms) `),R(66,`input`,43),W(`input`,function(e){return t.patch(`delayMs`,e)}),z()()(),R(67,`label`)(68,`span`),J(69,`Mock JSON body `),R(70,`span`,33),J(71,`(optional)`),z()(),R(72,`textarea`,44),W(`input`,function(e){return t.patch(`body`,e)}),z()(),R(73,`p`,45),J(74),z(),N(75,vJ,2,0,`p`,46),R(76,`p`,47),J(77),z(),R(78,`div`,48)(79,`button`,49),J(80,` Add rule `),z()()(),R(81,`h3`,50),J(82),z(),R(83,`ul`,51),F(84,wJ,17,17,`li`,52,wq,!1,TJ,2,0,`li`,53),z()(),R(87,`section`,54)(88,`h2`,55),J(89,`SSR overrides`),z(),R(90,`p`,56),J(91,` Development only. These change what the server sends for matching pages, from the next full page load, and the request is marked `),R(92,`strong`),J(93,`overridden`),z(),J(94,`. `),z(),R(95,`form`,57),W(`submit`,function(e){return t.addOverride(e)}),R(96,`div`,36)(97,`span`,58),J(98,`Override`),z(),R(99,`app-select`,59),W(`valueChange`,function(e){return t.setOverrideDraft(`kind`,e??`render-error`)}),z()(),R(100,`label`)(101,`span`),J(102,`Page pattern `),R(103,`span`,33),J(104,`(substring or * glob, ^ anchors the path)`),z()(),R(105,`input`,60),W(`input`,function(e){return t.patchOverride(`pattern`,e)}),z()(),N(106,EJ,8,1)(107,kJ,12,6)(108,AJ,11,0,`p`,61),R(109,`div`,48)(110,`button`,49),J(111,` Add override `),z()()(),R(112,`h3`,62),J(113),z(),R(114,`ul`,51),F(115,NJ,12,12,`li`,52,wq,!1,PJ,2,0,`li`,53),z()(),R(118,`section`,63)(119,`h2`,64),J(120,`Hydration`),z(),N(121,KJ,37,14)(122,qJ,5,0,`div`,11),z(),R(123,`section`,65)(124,`h2`,66),J(125,`TransferState payload`),z(),N(126,nY,2,1)(127,rY,3,0,`div`,11),z()()),e&2){let e,n,r,i;P(t.loading()?0:t.failed()?1:-1),j(6),L(`options`,t.pageOptions())(`value`,t.selected()?.pageId??null),j(),L(`disabled`,!t.canWrite()),M(`aria-describedby`,t.canWrite()?null:`http-writes-off`),j(3),Y(t.message()),j(4),X(`SSR requests (`,t.requests().length,`)`),j(),P(t.requests().length?15:16),j(4),X(`HTTP timeline (`,t.timeline().length,`)`),j(),L(`dropped`,t.droppedCalls())(`max`,t.maxCalls()),j(),q(`no-calls`,!t.timeline().length),j(5),L(`value`,t.callQuery()),j(),L(`options`,t.sideOptions),ov(`value`,t.sideFilter),j(2),L(`checked`,t.failedOnly()),j(3),Z(``,t.visibleCalls().length,` of `,t.timeline().length),j(2),Y(t.filterStatus()),j(),P(t.visibleCalls().length?35:t.timeline().length?36:37),j(3),P((e=t.selectedCall())?38:-1,e),j(4),P(t.canWrite()?-1:42),j(7),L(`value`,t.draft().pattern),j(5),L(`options`,t.methodOptions())(`value`,t.draft().method),j(4),L(`describedBy`,t.draftMocksOnServer()?`rule-ssr-note`:``)(`options`,t.targetOptions)(`value`,t.draft().target),j(5),L(`describedBy`,t.draftMocksOnServer()?`rule-ssr-note`:``)(`options`,t.statusOptions)(`value`,t.draft().status),j(3),L(`value`,t.draft().delayMs),j(6),L(`placeholder`,t.bodyPlaceholder)(`value`,t.draft().body),M(`aria-invalid`,t.bodyError()?`true`:null),j(2),Y(t.bodyError()),j(),P(t.draftMocksOnServer()?75:-1),j(2),Y(t.draftHint()),j(2),L(`disabled`,!t.canWrite()||!t.draftRule()),M(`aria-describedby`,t.canWrite()?`rule-hint`:`http-writes-off`),j(3),X(` Rules (`,t.rules().length,`) `),j(2),I(t.rules()),j(15),L(`describedBy`,t.overrideDraft().kind===`state-edit`?``:`override-kind-help`)(`options`,t.overrideKindOptions)(`value`,t.overrideDraft().kind),j(6),L(`value`,t.overrideDraft().pattern),j(),P((n=t.overrideDraft().kind)===`render-error`?106:n===`state-edit`?107:n===`client-render`?108:-1),j(4),L(`disabled`,!t.canWrite()||!t.overrideReady()),M(`aria-describedby`,t.canWrite()?null:`http-writes-off`),j(3),X(` Overrides (`,t.overrides().length,`) `),j(2),I(t.overrides()),j(6),P((r=t.selected()?.hydration)?121:122,r),j(5),P((i=t.selectedPayload())?126:127,i)}},dependencies:[oO,mI,qD,hb],styles:[`@charset "UTF-8"; +}`]})},Dq=(e,t)=>t.id,Oq=(e,t)=>t.id+t.kind,kq=(e,t)=>t.side+t.id,Aq=(e,t)=>t.key;function jq(e,t){e&1&&(R(0,`div`,0),B(1,`span`,67),R(2,`span`),J(3,`Loading…`),z()())}function Mq(e,t){if(e&1){let e=U();R(0,`div`,1)(1,`strong`),J(2,`Could not reach the devtools server.`),z(),R(3,`span`),J(4,`Check that the app's dev server is running with the devtools plugin.`),z(),R(5,`button`,68),W(`click`,function(){return D(e),O(G().retry())}),J(6,`Try again`),z()()}}function Nq(e,t){e&1&&(R(0,`span`,81),J(1,`this page`),z())}function Pq(e,t){e&1&&(R(0,`span`,82),J(1,`overridden`),z())}function Fq(e,t){e&1&&(R(0,`span`,83),J(1,`aborted`),z())}function Iq(e,t){if(e&1){let e=U();R(0,`tr`,73),W(`click`,function(){let t=D(e).$implicit;return O(G(2).selectedRequestId.set(t.id))}),R(1,`td`,74)(2,`button`,75)(3,`span`,76),J(4),z(),J(5),z()(),R(6,`td`,77),B(7,`span`,78),J(8),z(),R(9,`td`),J(10),z(),R(11,`td`,79),J(12),z(),R(13,`td`,79),J(14),z(),R(15,`td`)(16,`div`,80),N(17,Nq,2,0,`span`,81),N(18,Pq,2,0,`span`,82),N(19,Fq,2,0,`span`,83),z()()()}if(e&2){let e=t.$implicit,n=G(2);q(`selected`,n.selectedRequest()?.id===e.id),j(2),L(`title`,e.url),M(`aria-pressed`,n.selectedRequest()?.id===e.id),j(2),Y(e.method),j(),X(` `,e.url,` `),j(),q(`ok`,n.statusTone(e.status)===`ok`)(`redirect`,n.statusTone(e.status)===`redirect`)(`bad`,n.statusTone(e.status)===`bad`),j(2),X(``,e.status,` `),j(2),Y(n.renderModeLabel(e.renderMode)),j(2),X(``,e.renderMs,` ms`),j(2),Z(``,e.fetches,` (`,e.fetchMs,` ms)`),j(3),P(e.id===n.selected()?.ssrRequestId?17:-1),j(),P(e.overrides?.length?18:-1),j(),P(e.aborted?19:-1)}}function Lq(e,t){e&1&&(R(0,`p`,56),J(1),R(2,`code`),J(3,`ssrMiddleware`),z(),J(4,` saw it, so the render mode can't be read and TransferState edits can't apply. Mount `),R(5,`code`),J(6,`ssrMiddleware`),z(),J(7,` after `),R(8,`code`),J(9,`compression()`),z(),J(10,`. `),z()),e&2&&(j(),X(` The body was already compressed (`,t,`) when `))}function Rq(e,t){if(e&1&&(R(0,`span`,88),J(1),z()),e&2){let e=G().$implicit;j(),Y(e.note)}}function zq(e,t){if(e&1&&(R(0,`p`,87)(1,`span`,82),J(2),z(),R(3,`span`),J(4),z(),N(5,Rq,2,1,`span`,88),z()),e&2){let e=t.$implicit,n=G(4);j(2),Y(n.overrideLabel(e.kind)),j(2),Y(e.applied?`applied`:`not applied`),j(),P(e.note?5:-1)}}function Bq(e,t){if(e&1&&(R(0,`h3`),J(1,`Overrides from the panel`),z(),R(2,`p`,56),J(3,` This response was changed on purpose, so it is not what the app sends on its own. `),z(),F(4,zq,6,3,`p`,87,Oq)),e&2){let e=G();j(4),I(e.overrides)}}function Vq(e,t){if(e&1&&(J(0,` to `),R(1,`code`),J(2),z()),e&2){let e=G().$implicit;j(2),Y(e.finalUrl)}}function Hq(e,t){if(e&1&&(R(0,`div`)(1,`dt`),J(2,`Guards`),z(),R(3,`dd`),J(4),z()()),e&2){let e=G().$implicit,t=G(4);j(3),q(`bad`,t.guardVerdict(e)===`rejected`),j(),Z(` `,t.msLabel(e.guards.ms),``,t.guardVerdict(e)?`, `+t.guardVerdict(e):``,` `)}}function Uq(e,t){if(e&1&&(R(0,`div`)(1,`dt`),J(2,`Resolvers`),z(),R(3,`dd`),J(4),z()()),e&2){let e=G().$implicit,t=G(4);j(4),Y(t.msLabel(e.resolvers.ms))}}function Wq(e,t){if(e&1&&(R(0,`div`)(1,`dt`),J(2,`Navigation total`),z(),R(3,`dd`),J(4),z()()),e&2){let e=G().$implicit;j(4),X(``,e.durationMs,` ms`)}}function Gq(e,t){if(e&1&&(R(0,`p`,56),J(1),z()),e&2){let e=G().$implicit;j(),Y(e.reason)}}function Kq(e,t){if(e&1&&(R(0,`dl`,89)(1,`div`)(2,`dt`),J(3,`Navigation`),z(),R(4,`dd`)(5,`code`),J(6),z(),N(7,Vq,3,1),J(8),z()(),N(9,Hq,5,4,`div`),N(10,Uq,5,1,`div`),N(11,Wq,5,1,`div`),z(),N(12,Gq,2,1,`p`,56)),e&2){let e=t.$implicit;j(6),Y(e.url),j(),P(e.finalUrl?7:-1),j(),X(` (`,e.outcome,`) `),j(),P(e.guards?9:-1),j(),P(e.resolvers?10:-1),j(),P(e.durationMs===void 0?-1:11),j(),P(e.reason?12:-1)}}function qq(e,t){if(e&1&&(R(0,`h3`),J(1,`Router during the render`),z(),F(2,Kq,13,7,null,null,Og)),e&2){let e=G();j(2),I(e.navigations)}}function Jq(e,t){e&1&&(R(0,`span`,81),J(1,`cached`),z())}function Yq(e,t){if(e&1&&(R(0,`span`,91),J(1,`not cached`),z()),e&2){let e=G().$implicit;L(`title`,G(3).skipText(e.cacheSkip))}}function Xq(e,t){if(e&1&&(R(0,`p`,92),J(1),z()),e&2){let e=G().$implicit,t=G(3);j(),X(`Not cached: `,t.skipText(e.cacheSkip),`.`)}}function Zq(e,t){if(e&1&&(R(0,`p`,87)(1,`span`,76),J(2),z(),R(3,`span`,90),J(4),z(),R(5,`span`,77),J(6),z(),R(7,`span`,88),J(8),z(),N(9,Jq,2,0,`span`,81)(10,Yq,2,1,`span`,91),z(),N(11,Xq,2,1,`p`,92)),e&2){let e=t.$implicit,n=G(3);j(2),Y(e.method),j(),L(`title`,e.url),j(),Y(e.url),j(),q(`ok`,n.callTone(e)===`ok`)(`bad`,n.callTone(e)===`bad`),j(),Y(n.statusLabel(e)),j(2),X(``,e.durationMs,` ms`),j(),P(e.cacheStored?9:e.cacheSkip?10:-1),j(2),P(!e.cacheStored&&e.cacheSkip?11:-1)}}function Qq(e,t){e&1&&(R(0,`p`,56),J(1,`The render made no HttpClient calls.`),z())}function $q(e,t){e&1&&(R(0,`p`,92),J(1),z()),e&2&&(j(),X(`Why: `,t,`.`))}function eJ(e,t){if(e&1&&(R(0,`p`,87)(1,`span`,76),J(2),z(),R(3,`span`,90),J(4),z(),R(5,`span`,83),J(6,`cache miss`),z()(),N(7,$q,2,1,`p`,92)),e&2){let e,n=t.$implicit,r=G(4);j(2),Y(n.method),j(),L(`title`,n.url),j(),Y(n.url),j(3),P((e=r.refetchReason(n))?7:-1,e)}}function tJ(e,t){if(e&1&&(R(0,`h3`),J(1),z(),R(2,`p`,56),J(3,` These calls ran on the server and again after hydration instead of reading the transfer cache. `),z(),F(4,eJ,8,4,null,null,Dq)),e&2){let e=G(3);j(),X(`Fetched again in the browser (`,e.refetched().length,`)`),j(3),I(e.refetched())}}function nJ(e,t){e&1&&(R(0,`p`,86),J(1,`No server call ran again in the browser.`),z())}function rJ(e,t){if(e&1&&(R(0,`div`,72)(1,`h3`,84),J(2),R(3,`code`),J(4),z()(),R(5,`dl`,85)(6,`div`)(7,`dt`),J(8,`Request id`),z(),R(9,`dd`)(10,`code`),J(11),z()()(),R(12,`div`)(13,`dt`),J(14,`Render`),z(),R(15,`dd`),J(16),z()(),R(17,`div`)(18,`dt`),J(19,`Total`),z(),R(20,`dd`),J(21),z()(),R(22,`div`)(23,`dt`),J(24,`Sent`),z(),R(25,`dd`),J(26),z()(),R(27,`div`)(28,`dt`),J(29,`Browser page`),z(),R(30,`dd`),J(31),z()()(),N(32,Lq,11,1,`p`,56),N(33,Bq,6,0),N(34,qq,4,0),R(35,`h3`),J(36),z(),F(37,Zq,12,11,null,null,Dq,!1,Qq,2,0,`p`,56),N(40,tJ,6,1)(41,nJ,2,0,`p`,86),z()),e&2){let e,n=t,r=G(2);j(2),X(` `,n.method,` `),j(2),Y(n.url),j(7),Y(n.id),j(5),X(``,n.renderMs,` ms`),j(5),X(``,n.durationMs,` ms`),j(5),X(``,n.bytes,` B`),j(5),Y(r.requestPage()?.title||r.requestPage()?.url||`not connected`),j(),P((e=r.compressedWith(n))?32:-1,e),j(),P(n.overrides?.length?33:-1),j(),P(n.navigations?.length?34:-1),j(2),X(`Server calls (`,r.requestCalls().length,`)`),j(),I(r.requestCalls()),j(3),P(r.refetched().length?40:r.requestPage()&&r.requestCalls().length?41:-1)}}function iJ(e,t){if(e&1&&(R(0,`div`,26)(1,`table`)(2,`thead`)(3,`tr`)(4,`th`,69),J(5,`Request`),z(),R(6,`th`,69),J(7,`Status`),z(),R(8,`th`,69),J(9,`Render mode`),z(),R(10,`th`,70),J(11,`Render`),z(),R(12,`th`,70),J(13,`Server calls`),z(),R(14,`th`,69),J(15,`Notes`),z()()(),R(16,`tbody`),F(17,Iq,20,20,`tr`,71,Dq),z()()(),N(19,rJ,42,13,`div`,72)),e&2){let e,t=G();j(17),I(t.requests()),j(2),P((e=t.selectedRequest())?19:-1,e)}}function aJ(e,t){e&1&&(R(0,`div`,11)(1,`p`),J(2,`No SSR requests traced.`),z(),R(3,`p`,56),J(4,` Add `),R(5,`code`),J(6,`app.use(devtools.ssrMiddleware)`),z(),J(7,` before the Angular handler in `),R(8,`code`),J(9,`server.ts`),z(),J(10,`, then load a server rendered page. `),z()())}function oJ(e,t){e&1&&(R(0,`span`,94),J(1,`transfer cache`),z())}function sJ(e,t){if(e&1&&(R(0,`span`,94),J(1),z()),e&2){let e=G().$implicit;j(),X(`delayed `,e.delayMs,` ms`)}}function cJ(e,t){e&1&&(R(0,`span`,82),J(1,`mocked`),z())}function lJ(e,t){e&1&&(R(0,`span`,83),J(1,`faulted`),z())}function uJ(e,t){if(e&1&&(R(0,`span`,97),J(1,`rule `),R(2,`code`),J(3),z()()),e&2){let e=t;L(`title`,`Matched rule: `+e),j(3),Y(e)}}function dJ(e,t){if(e&1){let e=U();R(0,`tr`,73),W(`click`,function(){let t=D(e).$implicit;return O(G(2).openCall(t.id))}),R(1,`td`)(2,`span`,94),J(3),z()(),R(4,`td`,76),J(5),z(),R(6,`td`,74)(7,`button`,95),J(8),z()(),R(9,`td`,96),J(10),z(),R(11,`td`,77),B(12,`span`,78),J(13),z(),R(14,`td`,79),J(15),z(),R(16,`td`)(17,`div`,80),N(18,oJ,2,0,`span`,94),N(19,sJ,2,1,`span`,94),N(20,cJ,2,0,`span`,82),N(21,lJ,2,0,`span`,83),N(22,uJ,4,2,`span`,97),z()()()}if(e&2){let e,n=t.$implicit,r=G(2);q(`selected`,r.selectedCall()?.id===n.id),j(2),q(`server`,n.side===`server`),j(),Y(n.side===`server`?`SSR`:`Client`),j(2),Y(n.method),j(2),L(`title`,n.url),M(`data-call-id`,n.id)(`aria-pressed`,r.selectedCall()?.id===n.id)(`aria-controls`,r.selectedCall()?`call-preview`:null),j(),X(` `,n.url,` `),j(),L(`title`,n.pageUrl??``),j(),X(` `,n.pageUrl??``,` `),j(),q(`ok`,r.callTone(n)===`ok`)(`redirect`,r.callTone(n)===`redirect`)(`bad`,r.callTone(n)===`bad`),j(2),X(``,r.statusLabel(n),` `),j(2),X(``,n.durationMs,` ms`),j(3),P(n.cacheHit?18:-1),j(),P(n.delayMs?19:-1),j(),P(n.mocked?20:-1),j(),P(n.faulted?21:-1),j(),P((e=r.rulePatternOf(n))?22:-1,e)}}function fJ(e,t){if(e&1&&(R(0,`div`,26)(1,`table`)(2,`thead`)(3,`tr`)(4,`th`,69),J(5,`Side`),z(),R(6,`th`,69),J(7,`Method`),z(),R(8,`th`,69),J(9,`URL`),z(),R(10,`th`,69),J(11,`Page`),z(),R(12,`th`,69),J(13,`Status`),z(),R(14,`th`,70),J(15,`Time`),z(),R(16,`th`,69),J(17,`Notes`),z()()(),R(18,`tbody`,93),F(19,dJ,23,26,`tr`,71,kq),z()()()),e&2){let e=G();j(19),I(e.visibleCalls())}}function pJ(e,t){e&1&&J(0),e&2&&X(` Nothing matches “`,G(2).callQuery().trim(),`” with these filters. `)}function mJ(e,t){e&1&&J(0),e&2&&X(` None of the `,G(2).timeline().length,` requests fit these filters. `)}function hJ(e,t){if(e&1){let e=U();R(0,`div`,27)(1,`p`),J(2,`No requests match.`),z(),R(3,`p`,56),N(4,pJ,1,1)(5,mJ,1,1),z(),R(6,`div`,98)(7,`button`,68),W(`click`,function(){return D(e),O(G().clearCallFilters())}),J(8,`Clear filters`),z()()()}if(e&2){let e=G();j(4),P(e.callQuery().trim()?4:5)}}function gJ(e,t){e&1&&(R(0,`div`,11)(1,`p`),J(2,`No requests yet.`),z(),R(3,`p`,56),J(4,` Add `),R(5,`code`),J(6,`withPangular()`),z(),J(7,` to `),R(8,`code`),J(9,`provideHttpClient`),z(),J(10,`, then load a page of the app. `),z()())}function _J(e,t){if(e&1){let e=U();R(0,`button`,105),W(`click`,function(){D(e);let t=G();return O(G().copyPreview(t))}),J(1,` Copy `),z()}if(e&2){let e=G();M(`aria-label`,`Copy the response of `+e.method+` `+e.url)}}function vJ(e,t){e&1&&(R(0,`p`,107),J(1,` Matched rule `),R(2,`code`),J(3),z()()),e&2&&(j(3),Y(t))}function yJ(e,t){if(e&1){let e=U();R(0,`div`,99),W(`keydown.escape`,function(){return D(e),O(G().closePreview())}),R(1,`div`,100)(2,`h3`,101),J(3,`Response preview`),z(),R(4,`div`,102),N(5,_J,2,1,`button`,103),R(6,`button`,104),W(`click`,function(){let t=D(e);return O(G().mockCall(t))}),J(7,` Mock this request `),z(),R(8,`button`,105),W(`click`,function(){return D(e),O(G().closePreview())}),J(9,`Close`),z()()(),R(10,`p`,106)(11,`span`,76),J(12),z(),R(13,`span`,77),J(14),z(),R(15,`span`,90),J(16),z()(),N(17,vJ,4,1,`p`,107),R(18,`pre`,108),J(19),z()()}if(e&2){let e,n=t,r=G();j(5),P(!n.error&&n.preview?5:-1),j(),L(`disabled`,!r.canWrite()),M(`aria-describedby`,r.canWrite()?null:`http-writes-off`),j(6),Y(n.method),j(),q(`ok`,r.callTone(n)===`ok`)(`redirect`,r.callTone(n)===`redirect`)(`bad`,r.callTone(n)===`bad`),j(),Y(r.statusLabel(n)),j(),L(`title`,n.url),j(),Y(n.url),j(),P((e=r.rulePatternOf(n))?17:-1,e),j(),q(`error`,!!n.error&&!n.cancelled),M(`aria-label`,n.error?`Response error`:`Response body`),j(),Y(n.error??r.previewText(n)??`(no body)`)}}function bJ(e,t){if(e&1&&(R(0,`p`,31),J(1),z()),e&2){let e=G();j(),Y(e.writesOff)}}function xJ(e,t){e&1&&(R(0,`p`,46),J(1,` SSR mocks are not transferred to the client: the browser requests the URL again and gets the real response unless the rule also applies on the client. `),z())}function SJ(e,t){e&1&&(R(0,`span`),J(1,`passthrough`),z())}function CJ(e,t){if(e&1&&(R(0,`span`,77),J(1),z()),e&2){let e=G().$implicit,t=G();q(`ok`,t.statusTone(e.status)===`ok`)(`redirect`,t.statusTone(e.status)===`redirect`)(`bad`,t.statusTone(e.status)===`bad`),j(),Y(e.status)}}function wJ(e,t){if(e&1&&(R(0,`span`),J(1),z()),e&2){let e=G().$implicit;j(),X(``,e.delayMs,` ms`)}}function TJ(e,t){e&1&&(R(0,`span`),J(1,`mock body`),z())}function EJ(e,t){e&1&&(R(0,`p`,116),J(1,` The SSR mock is not written to TransferState, so the browser requests this URL again. `),z())}function DJ(e,t){if(e&1){let e=U();R(0,`li`)(1,`label`,109)(2,`input`,110),W(`change`,function(){let t=D(e).$implicit;return O(G().toggleRule(t.id))}),z(),R(3,`code`,111)(4,`span`,112),J(5),z(),J(6),z()(),R(7,`button`,113),W(`click`,function(){let t=D(e).$implicit;return O(G().removeRule(t.id))}),J(8,` Remove `),z(),R(9,`span`,114)(10,`span`),J(11),z(),N(12,SJ,2,0,`span`)(13,CJ,2,7,`span`,115),N(14,wJ,2,1,`span`),N(15,TJ,2,0,`span`),z(),N(16,EJ,2,0,`p`,116),z()}if(e&2){let e=t.$implicit,n=G();q(`off`,!e.enabled),j(2),L(`checked`,e.enabled)(`disabled`,!n.canWrite()),M(`aria-describedby`,n.canWrite()?null:`http-writes-off`)(`aria-label`,`Enable rule for `+e.pattern),j(),L(`title`,e.pattern),j(2),Y(e.method||`ANY`),j(),X(` `,e.pattern),j(),L(`disabled`,!n.canWrite()),M(`aria-describedby`,n.canWrite()?null:`http-writes-off`)(`aria-label`,`Remove rule for `+e.pattern),j(4),Y(n.targetLabel(e.target)),j(),P(e.status===void 0?12:13),j(2),P(e.delayMs?14:-1),j(),P(e.body?15:-1),j(),P(n.mocksOnServer(e)?16:-1)}}function OJ(e,t){e&1&&(R(0,`li`,53),J(1,`No rules. SSR rules apply on the next page load.`),z())}function kJ(e,t){if(e&1){let e=U();R(0,`p`,61),J(1,` Throws while the server renders, so it needs `),R(2,`code`),J(3,`providePangularHttp()`),z(),J(4,` and a page the engine renders. Prerendered files served as static files skip it. `),z(),R(5,`label`),J(6,` Error message `),R(7,`input`,117),W(`input`,function(t){return D(e),O(G().patchOverride(`message`,t))}),z()()}if(e&2){let e=G();j(7),L(`value`,e.overrideDraft().message)}}function AJ(e,t){e&1&&J(0,` For a cached HTTP response this is the whole cache record, not only the response body. `)}function jJ(e,t){e&1&&(R(0,`p`,121),J(1,` Filled in from the TransferState payload. The value starts empty because the panel only shows a redacted copy, so type the JSON the server should send. `),N(2,AJ,1,0),z()),e&2&&(j(2),P(t===`http`?2:-1))}function MJ(e,t){if(e&1){let e=U();R(0,`label`),J(1,` TransferState key `),R(2,`input`,118),W(`input`,function(t){return D(e),O(G().patchOverride(`key`,t))}),z()(),R(3,`label`)(4,`span`),J(5,`New JSON value `),R(6,`span`,33),J(7,`(empty removes the entry)`),z()(),R(8,`textarea`,119),W(`input`,function(t){return D(e),O(G().patchOverride(`value`,t))}),z()(),R(9,`p`,120),J(10),z(),N(11,jJ,3,1,`p`,121)}if(e&2){let e,t=G();j(2),L(`value`,t.overrideDraft().key),j(6),L(`value`,t.overrideDraft().value),M(`aria-invalid`,t.overrideValueError()?`true`:null)(`aria-describedby`,t.overrideFromPayload()?`override-value-error override-value-note`:`override-value-error`),j(2),Y(t.overrideValueError()),j(),P((e=t.overrideFromPayload())?11:-1,e)}}function NJ(e,t){e&1&&(R(0,`p`,61),J(1,` Serves `),R(2,`code`),J(3,`index.csr.html`),z(),J(4,` instead of rendering. Needs `),R(5,`code`),J(6,`browserDistFolder`),z(),J(7,` in `),R(8,`code`),J(9,`initPangularHub()`),z(),J(10,`. `),z())}function PJ(e,t){if(e&1&&(R(0,`span`),J(1),z()),e&2){let e=G().$implicit;j(),Y(e.message)}}function FJ(e,t){if(e&1&&(R(0,`span`),J(1),z()),e&2){let e=G().$implicit;j(),Z(``,e.value===void 0?`remove`:`set`,` `,e.key)}}function IJ(e,t){if(e&1){let e=U();R(0,`li`)(1,`label`,109)(2,`input`,110),W(`change`,function(){let t=D(e).$implicit;return O(G().toggleOverride(t.id))}),z(),R(3,`code`,111)(4,`span`,112),J(5),z(),J(6),z()(),R(7,`button`,122),W(`click`,function(){let t=D(e).$implicit;return O(G().removeOverride(t.id))}),J(8,` Remove `),z(),R(9,`span`,114),N(10,PJ,2,1,`span`),N(11,FJ,2,2,`span`),z()()}if(e&2){let e=t.$implicit,n=G();q(`off`,!e.enabled),j(2),L(`checked`,e.enabled)(`disabled`,!n.canWrite()),M(`aria-label`,`Enable `+n.overrideLabel(e.kind)+` for `+e.pattern),j(),L(`title`,e.pattern),j(2),Y(n.overrideLabel(e.kind)),j(),X(` `,e.pattern),j(),L(`disabled`,!n.canWrite()),M(`aria-label`,`Remove `+n.overrideLabel(e.kind)+` for `+e.pattern),j(3),P(e.message?10:-1),j(),P(e.key?11:-1)}}function LJ(e,t){e&1&&(R(0,`li`,53),J(1,`No overrides.`),z())}function RJ(e,t){if(e&1&&(R(0,`div`)(1,`dt`),J(2,`DOM nodes hydrated`),z(),R(3,`dd`),J(4),z()(),R(5,`div`)(6,`dt`),J(7,`DOM nodes skipped`),z(),R(8,`dd`),J(9),z()(),R(10,`div`)(11,`dt`),J(12,`Mismatched components`),z(),R(13,`dd`),J(14),z()()),e&2){let e=t;j(4),Y(e.hydrated),j(5),Y(e.skipped),j(4),q(`bad`,e.mismatched>0),j(),Y(e.mismatched)}}function zJ(e,t){if(e&1&&(R(0,`span`,124)(1,`span`,125),J(2,`Expected`),z(),R(3,`code`),J(4),z()()),e&2){let e=G().$implicit;j(4),Y(e.expected)}}function BJ(e,t){if(e&1&&(R(0,`span`,124)(1,`span`,125),J(2,`Actual`),z(),R(3,`code`),J(4),z()()),e&2){let e=G().$implicit;j(4),Y(e.actual)}}function VJ(e,t){if(e&1&&(R(0,`li`)(1,`code`),J(2),z(),N(3,zJ,5,1,`span`,124),N(4,BJ,5,1,`span`,124),z()),e&2){let e=t.$implicit;j(2),Y(`<`+e.component+`>`),j(),P(e.expected?3:-1),j(),P(e.actual?4:-1)}}function HJ(e,t){if(e&1&&(R(0,`h3`),J(1),z(),R(2,`ul`,123),F(3,VJ,5,3,`li`,null,Og),z()),e&2){let e=G();j(),X(`Mismatches (`,e.mismatches.length,`)`),j(2),I(e.mismatches)}}function UJ(e,t){if(e&1&&(R(0,`li`)(1,`code`),J(2),z()()),e&2){let e=t.$implicit;j(2),Y(e)}}function WJ(e,t){if(e&1&&(R(0,`h3`),J(1,`ngSkipHydration hosts`),z(),R(2,`ul`,126),F(3,UJ,3,1,`li`,null,Og),z()),e&2){let e=G();j(3),I(e.skipHydrationHosts)}}function GJ(e,t){e&1&&(R(0,`h3`),J(1,`Warnings`),z(),R(2,`p`,56),J(3,` Not captured: add `),R(4,`code`),J(5,`providePangularHttp()`),z(),J(6,` to the app providers. `),z())}function KJ(e,t){if(e&1&&(R(0,`pre`,127),J(1),z()),e&2){let e=t.$implicit;j(),Y(e)}}function qJ(e,t){e&1&&(R(0,`p`,86),J(1,`No hydration warnings.`),z())}function JJ(e,t){if(e&1&&(R(0,`h3`),J(1),z(),F(2,KJ,2,1,`pre`,127,Og,!1,qJ,2,0,`p`,86)),e&2){let e=G();j(),X(`Warnings (`,e.warnings.length,`)`),j(),I(e.warnings)}}function YJ(e,t){if(e&1&&(R(0,`dl`,85)(1,`div`)(2,`dt`),J(3,`Enabled`),z(),R(4,`dd`)(5,`span`,94),J(6),z()()(),R(7,`div`)(8,`dt`),J(9,`Hydrated components`),z(),R(10,`dd`),J(11),z()(),R(12,`div`)(13,`dt`),J(14,`Hydrated nodes`),z(),R(15,`dd`),J(16),z()(),R(17,`div`)(18,`dt`),J(19,`Skipped components`),z(),R(20,`dd`),J(21),z()(),R(22,`div`)(23,`dt`),J(24,`App stable after`),z(),R(25,`dd`),J(26),z()(),R(27,`div`)(28,`dt`),J(29,`Incremental defer blocks`),z(),R(30,`dd`),J(31),z()(),N(32,RJ,15,5),z(),N(33,HJ,5,1),N(34,WJ,5,0),N(35,GJ,7,0)(36,JJ,5,2)),e&2){let e,n=t;j(5),q(`on`,n.enabled)(`off-tag`,!n.enabled),j(),Y(n.enabled?`yes`:`no (client render only)`),j(5),Y(n.hydratedComponents??`n/a`),j(5),Y(n.hydratedNodes??`n/a`),j(5),Y(n.componentsSkippedHydration??`n/a`),j(5),Y(n.stableMs===void 0?`n/a`:n.stableMs+` ms`),j(5),Y(n.deferBlocksWithIncrementalHydration??`n/a`),j(),P((e=n.nodes)?32:-1,e),j(),P(n.mismatches?.length?33:-1),j(),P(n.skipHydrationHosts.length?34:-1),j(),P(n.warningsCaptured===!1?35:36)}}function XJ(e,t){e&1&&(R(0,`div`,11)(1,`p`),J(2,`No hydration data for this page.`),z(),R(3,`p`,56),J(4,`Open a server rendered page of the app to see its stats.`),z()())}function ZJ(e,t){e&1&&(R(0,`div`,11)(1,`p`),J(2,`No TransferState script: this page was not server rendered.`),z()())}function QJ(e,t){if(e&1&&(R(0,`p`,129),J(1),z()),e&2){let e=G(2);j(),Y(e.error)}}function $J(e,t){e&1&&(R(0,`span`,94),J(1),z()),e&2&&(j(),Y(t))}function eY(e,t){if(e&1&&(R(0,`span`,94),J(1),z(),R(2,`span`,132),J(3),z()),e&2){let e=t,n=G().$implicit,r=G(3);q(`server`,r.statusTone(e.status)===`ok`)(`fault`,r.statusTone(e.status)===`bad`),j(),X(`HTTP `,e.status),j(2),Y(e.url??n.key)}}function tY(e,t){if(e&1&&(R(0,`span`,132),J(1),z()),e&2){let e=G().$implicit;j(),Y(e.key)}}function nY(e,t){if(e&1){let e=U();R(0,`button`,105),W(`click`,function(){D(e);let t=G().$implicit;return O(G(3).editEntry(t))}),J(1,` Edit in SSR overrides `),z()}if(e&2){let e=G().$implicit;M(`aria-label`,`Edit in SSR overrides, key `+e.key)}}function rY(e,t){if(e&1){let e=U();R(0,`details`)(1,`summary`),B(2,`span`,131),N(3,$J,2,1,`span`,94),N(4,eY,4,6)(5,tY,2,1,`span`,132),R(6,`span`,133),J(7),z()(),R(8,`div`,134)(9,`span`,135),J(10,`Key`),z(),R(11,`code`,136),J(12),z(),R(13,`div`,137)(14,`button`,105),W(`click`,function(){let t=D(e).$implicit;return O(G(3).copyKey(t.key))}),J(15,` Copy `),z(),N(16,nY,2,1,`button`,103),z()(),R(17,`pre`,138),J(18),xv(19,`json`),z()()}if(e&2){let e,n,r=t.$implicit,i=G(3);j(3),P((e=i.payloadLabel(r))?3:-1,e),j(),P((n=r.http)?4:5,n),j(3),X(``,r.size,` B`),j(5),Y(r.key),j(2),M(`aria-label`,`Copy key `+r.key),j(2),P(i.canEditEntry(r)?16:-1),j(),M(`aria-label`,`Value of `+r.key),j(),Y(Cv(19,8,r.value))}}function iY(e,t){if(e&1&&(R(0,`p`,128),J(1),z(),N(2,QJ,2,1,`p`,129),R(3,`div`,130),F(4,rY,20,10,`details`,null,Aq),z()),e&2){let e=G();j(),rv(` `,e.entries.length,` entr`,e.entries.length===1?`y`:`ies`,`, `,e.size,` bytes `),j(),P(e.error?2:-1),j(2),I(e.entries)}}function aY(e,t){e&1&&N(0,ZJ,3,0,`div`,11)(1,iY,6,4),e&2&&P(+!!t.found)}function oY(e,t){e&1&&(R(0,`div`,11)(1,`p`),J(2,`Open a page of the app to see its payload.`),z()())}var sY={kind:`render-error`,pattern:``,message:``,key:``,value:``},cY={"render-error":`Render error`,"client-render":`Client render`,"state-edit":`TransferState edit`},lY={server:`Server`,prerender:`Prerender`,client:`Client`,redirect:`Redirect`,"not-rendered":`Not rendered`,unknown:`Unknown`},uY={pattern:``,method:``,target:`both`,status:``,delayMs:``,body:``};function dY(e){try{let t=new URL(e,`http://x`);return t.pathname+t.search}catch{return e}}var fY=/\[redacted\]|%5Bredacted%5D/gi;function pY(e){return(/^([a-z][a-z\d+.-]*:|\/\/)/i.test(e)?dY(e):e).replace(fY,`*`)}function mY(e){let t=rO(e);if(t!==null)return t;try{return JSON.parse(e),e.trim()}catch{return null}}var hY=[`GET`,`POST`,`PUT`,`PATCH`,`DELETE`];function gY(e){try{return new URL(e,`http://x`).pathname}catch{return``}}function _Y(e){let t=gY(e);return t===`/`?``:t}var vY=/\[redacted\]|%5Bredacted%5D/i,yY=200,bY=50,xY=500,SY=1e5,CY=[{value:``,label:`None`},...KT.map(([e,t])=>({value:String(e),label:`${e} ${t}`}))],wY=class e{rpc=$(null);canWrite=Q(()=>ME(this.rpc(),`http`));writesOff=iE(`http`);loading=A(!1);failed=A(!1);serverCalls=A([]);pages=A([]);payloads=A({});serverDropped=A(0);requests=A([]);rules=A([]);overrides=A([]);overrideDraft=A({...sY});overrideFromPayload=A(null);overrideKindOptions=[{value:`render-error`,label:`Render error`},{value:`client-render`,label:`Force Client render`},{value:`state-edit`,label:`Edit TransferState entry`}];overrideValueError=Q(()=>{let e=this.overrideDraft().value.trim();if(!e)return``;try{return JSON.parse(e),``}catch{return`The value must be valid JSON.`}});overrideReady=Q(()=>{let e=this.overrideDraft();return!e.pattern.trim()||this.overrides().length>=20?!1:e.kind!==`state-edit`||!!e.key.trim()&&!this.overrideValueError()});hostPageId=fE();selectedPageId=Fv({source:()=>this.pages(),computation:(e,t)=>t?.value&&e.some(e=>e.pageId===t.value)?t.value:e.find(e=>e.pageId===this.hostPageId)?.pageId??e[0]?.pageId??null});selectedCallId=A(null);draft=A({...uY});message=A(``);bodyPlaceholder=`{ "error": "Service unavailable" }`;statusOptions=CY;unsubscribe=[];destroyRef=T(Ts);injector=T(Cs);host=T(Pl);selected=Q(()=>this.pages().find(e=>e.pageId===this.selectedPageId())??null);pageRequestId=Q(()=>this.selected()?.ssrRequestId??null);selectedRequestId=Fv(()=>this.pageRequestId());selectedPayload=Q(()=>{let e=this.selectedPageId();return e?this.payloads()[e]??null:null});maxCalls=Q(()=>jE(this.rpc()).limits.httpCalls);droppedCalls=Q(()=>(this.selected()?.dropped??0)+this.serverDropped());pageServerCalls=Q(()=>{let e=this.selected()?.initialUrl;return e?this.serverCalls().filter(t=>!t.pageUrl||t.pageUrl===e):this.serverCalls()});timeline=Q(()=>[...this.pageServerCalls(),...this.selected()?.calls??[]].sort((e,t)=>t.at-e.at));callQuery=A(``);sideFilter=A(`all`);failedOnly=A(!1);sideOptions=[{value:`all`,label:`All sides`},{value:`server`,label:`SSR`},{value:`client`,label:`Client`}];visibleCalls=Q(()=>{let e=this.callQuery().trim().toLowerCase(),t=this.sideFilter()??`all`,n=this.failedOnly();return this.timeline().filter(r=>(t===`all`||r.side===t)&&(!n||this.isFailed(r))&&(!e||`${r.method} ${r.url}`.toLowerCase().includes(e)||`${r.method} ${dY(r.url)}`.toLowerCase().includes(e)))});filterStatus=Q(()=>{this.callQuery(),this.sideFilter(),this.failedOnly(),this.filterFlip=!this.filterFlip;let e=Nv(()=>`${this.visibleCalls().length} of ${this.timeline().length}`);return this.filterFlip?`${e}\u00a0`:e});filterFlip=!0;selectedCall=Q(()=>this.visibleCalls().find(e=>e.id===this.selectedCallId())??null);selectedRequest=Q(()=>this.requests().find(e=>e.id===this.selectedRequestId())??null);requestCalls=Q(()=>{let e=this.selectedRequest()?.id;return e?this.serverCalls().filter(t=>t.requestId===e):[]});requestPage=Q(()=>{let e=this.selectedRequest()?.id;return e?this.pages().find(t=>t.ssrRequestId===e)??null:null});refetched=Q(()=>{let e=this.selectedRequest(),t=this.requestPage();if(!e||!t)return[];let n=new Set(this.requestCalls().filter(e=>e.status).map(e=>`${e.method} ${dY(e.url)}`));return t.calls.filter(t=>t.side===`client`&&!t.cacheHit&&!t.mocked&&t.at>=e.at&&n.has(`${t.method} ${dY(t.url)}`))});draftMocksOnServer=Q(()=>{let e=this.draftRule();return!!e&&this.mocksOnServer(e)});draftRule=Q(()=>{let e=this.draft(),t=e.pattern.trim();if(!t||t.length>xY||this.bodyError()||this.rules().length>=bY)return null;let n=e.body.trim(),r=Math.min(Math.max(Math.round(Number(e.delayMs))||0,0),1e4),i=e.status.trim()?Number(e.status):n?200:void 0;return i!==void 0&&!qT(i)||i===void 0&&!r?null:{pattern:t,enabled:!0,target:e.target,...e.method?{method:e.method}:{},...i===void 0?{}:{status:i},...r?{delayMs:r}:{},...n?{body:n}:{}}});draftHint=Q(()=>{let e=this.draft();return this.rules().length>=bY?`You can add up to ${bY} rules. Remove one to add another.`:e.pattern.trim()?e.pattern.trim().length>xY?`The URL pattern is limited to ${xY} characters.`:this.bodyError()?``:e.status.trim()&&!qT(Number(e.status))?`Pick a status from the list.`:this.draftRule()?!e.status.trim()&&e.body.trim()?`With no status, the mock body returns 200.`:``:`Set a status, a delay or a mock body.`:`Enter a URL pattern to add a rule.`});bodyError=Q(()=>{let e=this.draft().body.trim();if(!e)return``;if(e.length>SY)return`The mock body is limited to ${SY} characters.`;try{return JSON.parse(e),``}catch{return`The mock body must be valid JSON.`}});constructor(){fc(()=>{let e=this.rpc();e&&this.load(e)}),this.destroyRef.onDestroy(()=>this.stopListening())}async load(e){this.loading.set(!0),this.failed.set(!1);try{let t=e.scope(`pangular`).rpc,[n,r]=await Promise.all([t.sharedState(`http`),t.sharedState(`http-payloads`)]);if(this.destroyRef.destroyed)return;let i=e=>{let t=e;this.serverCalls.set(t?.serverCalls??[]),this.serverDropped.set(t?.serverDropped??0),this.requests.set([...t?.requests??[]].reverse()),this.pages.set(t?.pages??[]),this.rules.set(t?.rules??[]),this.overrides.set(t?.ssrOverrides??[])},a=e=>this.payloads.set(e?.pages??{});i(n.value()),a(r.value()),this.stopListening(),this.unsubscribe=[n.on(`updated`,i),r.on(`updated`,a)]}catch{this.failed.set(!0)}finally{this.loading.set(!1)}}retry(){let e=this.rpc();e&&this.load(e)}guardVerdict(e){return e.guards?.passed===!1?e.outcome===`redirected`?`redirected`:`rejected`:``}msLabel(e){return e===void 0?`n/a`:`${e} ms`}skipText(e){return GT[e]??``}refetchReason(e){let t=`${e.method} ${dY(e.url)}`,n=this.requestCalls().filter(e=>`${e.method} ${dY(e.url)}`===t),r=n[0];return r?.cacheSkip&&n.every(e=>e.cacheSkip===r.cacheSkip)?this.skipText(r.cacheSkip):``}compressedWith(e){if(e.compressedBeforeTrace)return e.headers[`content-encoding`]??`unknown encoding`}renderModeLabel(e){return lY[e]??`Unknown`}statusLabel(e){return e.cancelled?`cancelled`:e.status?String(e.status):`ERR`}callTone(e){return e.cancelled?`neutral`:this.statusTone(e.status)}isFailed(e){return!!e.cancelled||!e.status||e.status>=400}clearCallFilters(){this.callQuery.set(``),this.sideFilter.set(`all`),this.failedOnly.set(!1),this.host.nativeElement.querySelector(`#timeline-search`)?.focus()}rulePatternOf(e){return e.rulePattern?e.rulePattern:e.ruleId?this.rules().find(t=>t.id===e.ruleId)?.pattern??null:null}openCall(e){this.selectedCallId.set(e),Bd(()=>this.host.nativeElement.querySelector(`#preview-heading`)?.focus(),{injector:this.injector})}previewText(e){if(e.preview!==void 0)return rO(e.preview)??e.preview}async copyPreview(e){let t=this.previewText(e);if(t)try{await navigator.clipboard.writeText(t),this.message.set(`Copied.`)}catch{this.message.set(`The clipboard is not available here.`)}}mockCall(e){let t=e.method.toUpperCase(),n=pY(e.url),r=e.error||!e.preview?null:mY(e.preview);this.draft.set({...uY,pattern:n,method:t,body:r??``});let i=`${t} ${n}`;this.message.set(r?`Filled in a rule for ${i} with the preview as its body. Check it, then add the rule.`:e.preview&&!e.error?`Filled in a rule for ${i}. The preview is not complete JSON, so it is not used as the body.`:`Filled in a rule for ${i}. Set a status, a delay or a body, then add the rule.`),Bd(()=>this.host.nativeElement.querySelector(`#rule-pattern`)?.focus(),{injector:this.injector})}closePreview(){let e=this.selectedCallId();this.selectedCallId.set(null),e&&[...this.host.nativeElement.querySelectorAll(`button[data-call-id]`)].find(t=>t.dataset.callId===e)?.focus()}stopListening(){for(let e of this.unsubscribe.splice(0))e()}statusTone(e){return e===void 0?`neutral`:e===0||e>=400?`bad`:e>=300?`redirect`:e>=200?`ok`:`neutral`}mocksOnServer(e){return e.target!==`client`&&e.status!==void 0&&e.status<400}payloadLabel(e){return e.source===`hydration`?`hydration annotations`:e.fn?`Analog server function ${e.fn.name??e.fn.id}`:e.source===`analog`?`Analog`:null}targetLabel(e){return e===`both`?`SSR + client`:e===`server`?`SSR only`:`Client only`}pageOptions=Q(()=>this.pages().map(e=>({value:e.pageId,label:e.title||e.url})));methodOptions=Q(()=>{let e=this.draft().method;return[{value:``,label:`Any`},...(e&&!hY.includes(e)?[...hY,e]:hY).map(e=>({value:e,label:e}))]});targetOptions=[{value:`both`,label:`SSR + client`},{value:`server`,label:`SSR only`},{value:`client`,label:`Client only`}];selectPage(e){e&&this.selectedPageId.set(e),this.selectedCallId.set(null),this.overrideFromPayload.set(null)}setDraft(e,t){this.draft.update(n=>({...n,[e]:t}))}patch(e,t){let n=t.target.value;this.draft.update(t=>({...t,[e]:n}))}async addRule(e){e.preventDefault();let t=this.draftRule();if(!t)return;let n={id:`r${Date.now().toString(36)}${Math.random().toString(36).slice(2,6)}`,...t};await this.saveRules([...this.rules(),n],`Rule added.`,n)&&(this.draft.set({...uY}),this.host.nativeElement.querySelector(`#rule-pattern`)?.focus())}toggleRule(e){let t=this.rules().find(t=>t.id===e);t&&this.saveRules(this.rules().map(t=>t.id===e?{...t,enabled:!t.enabled}:t),`Rule updated.`,t)}async removeRule(e){let t=this.rules().findIndex(t=>t.id===e);if(t<0)return;let n=this.rules().filter(t=>t.id!==e);await this.saveRules(n,`Rule removed.`,this.rules()[t])&&this.focusAfterRemove(`[data-remove-rule]`,t,`#rule-list-heading`)}async clearCalls(){try{await gE(this.rpc(),`clear-http-calls`),this.selectedCallId.set(null),this.message.set(`Timeline cleared.`)}catch{this.message.set(`Could not clear the timeline.`)}}overrideLabel(e){return cY[e]??e}setOverrideDraft(e,t){this.overrideDraft.update(n=>({...n,[e]:t})),e===`kind`&&t!==`state-edit`&&this.overrideFromPayload.set(null)}patchOverride(e,t){let n=t.target.value;this.overrideDraft.update(t=>({...t,[e]:n})),e===`key`&&this.overrideFromPayload.set(null)}async copyKey(e){try{await navigator.clipboard.writeText(e),this.message.set(`Copied.`)}catch{this.message.set(`The clipboard is not available here.`)}}canEditEntry(e){let{key:t}=e;return this.canWrite()&&!!t&&t===t.trim()&&t.length<=yY&&!vY.test(t)}editEntry(e){if(!this.canEditEntry(e))return;let t=this.selected();this.overrideDraft.set({...sY,kind:`state-edit`,pattern:t?_Y(t.initialUrl??t.url):``,key:e.key}),this.overrideFromPayload.set(e.http?`http`:`other`),this.message.set(`Editing the TransferState entry in SSR overrides.`),Bd(()=>{let e=this.host.nativeElement.querySelector(this.overrideDraft().pattern?`#override-value`:`#override-pattern`);e?.scrollIntoView?.({block:`center`}),e?.focus()},{injector:this.injector})}async addOverride(e){if(e.preventDefault(),!this.overrideReady())return;let t=this.overrideDraft(),n={id:`o${Date.now().toString(36)}${Math.random().toString(36).slice(2,6)}`,kind:t.kind,pattern:t.pattern.trim(),enabled:!0,...t.kind===`render-error`&&t.message.trim()?{message:t.message.trim()}:{},...t.kind===`state-edit`?{key:t.key.trim()}:{},...t.kind===`state-edit`&&t.value.trim()?{value:t.value.trim()}:{}};await this.saveOverrides([...this.overrides(),n],`Override added. Reload the page.`)&&(this.overrideDraft.set({...sY,kind:t.kind}),this.overrideFromPayload.set(null),this.host.nativeElement.querySelector(`#override-pattern`)?.focus())}toggleOverride(e){this.saveOverrides(this.overrides().map(t=>t.id===e?{...t,enabled:!t.enabled}:t),`Override updated. Reload the page.`)}async removeOverride(e){let t=this.overrides().findIndex(t=>t.id===e);if(t<0)return;let n=this.overrides().filter(t=>t.id!==e);await this.saveOverrides(n,`Override removed.`)&&this.focusAfterRemove(`[data-remove-override]`,t,`#override-list-heading`)}focusAfterRemove(e,t,n){Bd(()=>{let r=this.host.nativeElement,i=r.querySelectorAll(e);(i[Math.min(t,i.length-1)]??r.querySelector(n))?.focus()},{injector:this.injector})}announce(e){if(this.message()!==e){this.message.set(e);return}this.message.set(``),Bd(()=>{this.message()===``&&this.message.set(e)},{injector:this.injector})}async saveOverrides(e,t){try{let n=await gE(this.rpc(),`set-ssr-overrides`,e);return this.overrides.set(Array.isArray(n)?n:e),this.announce(t),!0}catch{return this.message.set(`Could not save the overrides.`),!1}}async saveRules(e,t,n){try{let r=await gE(this.rpc(),`set-http-rules`,e);return this.rules.set(Array.isArray(r)?r:e),this.announce(n.target===`client`?t:`${t} Reload the page to apply it to SSR.`),!0}catch{return this.message.set(`Could not save the rules.`),!1}}static ɵfac=function(t){return new(t||e)};static ɵcmp=Gh({type:e,selectors:[[`app-network-inspector`]],inputs:{rpc:[1,`rpc`]},decls:128,vars:54,consts:[[`role`,`status`,1,`state`],[`role`,`alert`,1,`state`,`error`],[1,`toolbar`],[1,`page-picker`],[`id`,`page-picker-label`],[`labelledBy`,`page-picker-label`,`emptyText`,`No connected page`,`placeholder`,`No connected page`,3,`valueChange`,`options`,`value`],[`type`,`button`,3,`click`,`disabled`],[`role`,`status`,1,`message`],[1,`grid`],[`aria-labelledby`,`ssr-heading`,1,`panel`,`wide`],[`id`,`ssr-heading`],[1,`empty`],[`aria-labelledby`,`timeline-heading`,1,`panel`,`wide`],[`id`,`timeline-heading`],[`what`,`HTTP calls`,`limit`,`httpCalls`,3,`dropped`,`max`],[`role`,`group`,`aria-label`,`Filter the HTTP timeline`,1,`filters`],[1,`search`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`,1,`search-icon`],[`cx`,`11`,`cy`,`11`,`r`,`7`],[`d`,`m20 20-3.5-3.5`],[`id`,`timeline-search`,`type`,`search`,`placeholder`,`Find a URL or method…`,`aria-label`,`Find a URL or method`,`autocomplete`,`off`,`spellcheck`,`false`,3,`input`,`keydown.escape`,`value`],[`ariaLabel`,`Side`,1,`side-filter`,3,`valueChange`,`options`,`value`],[1,`inline`,`failed-toggle`],[`type`,`checkbox`,3,`change`,`checked`],[1,`total`],[`role`,`status`,1,`sr-only`],[1,`table-wrap`],[`role`,`status`,1,`empty`,`no-match`],[`id`,`call-preview`,`role`,`region`,`aria-labelledby`,`preview-heading`,1,`preview`],[`aria-labelledby`,`rules-heading`,1,`panel`],[`id`,`rules-heading`],[`id`,`http-writes-off`,1,`muted`,`small`],[`id`,`rule-form`,1,`rule-form`,3,`submit`],[1,`hint`],[`id`,`rule-pattern`,`required`,``,`spellcheck`,`false`,`autocomplete`,`off`,`placeholder`,`e.g. /api/products`,3,`input`,`value`],[1,`row`],[1,`field-group`],[`id`,`rule-method-label`],[`labelledBy`,`rule-method-label`,3,`valueChange`,`options`,`value`],[`id`,`rule-target-label`],[`labelledBy`,`rule-target-label`,3,`valueChange`,`describedBy`,`options`,`value`],[`id`,`rule-status-label`],[`labelledBy`,`rule-status-label`,3,`valueChange`,`describedBy`,`options`,`value`],[`type`,`number`,`inputmode`,`numeric`,`min`,`0`,`max`,`10000`,`placeholder`,`0`,3,`input`,`value`],[`rows`,`3`,`spellcheck`,`false`,`aria-describedby`,`body-error`,3,`input`,`placeholder`,`value`],[`id`,`body-error`,1,`field-error`],[`id`,`rule-ssr-note`,1,`muted`,`small`],[`id`,`rule-hint`,1,`muted`,`small`],[1,`form-actions`],[`type`,`submit`,3,`disabled`],[`id`,`rule-list-heading`,`tabindex`,`-1`,1,`rules-heading`],[1,`rules`],[3,`off`],[1,`empty-rule`],[`aria-labelledby`,`overrides-heading`,1,`panel`],[`id`,`overrides-heading`],[1,`muted`,`small`],[1,`rule-form`,3,`submit`],[`id`,`override-kind-label`],[`labelledBy`,`override-kind-label`,3,`valueChange`,`describedBy`,`options`,`value`],[`id`,`override-pattern`,`required`,``,`spellcheck`,`false`,`autocomplete`,`off`,`placeholder`,`e.g. /examples/ssr`,3,`input`,`value`],[`id`,`override-kind-help`,1,`muted`,`small`],[`id`,`override-list-heading`,`tabindex`,`-1`,1,`rules-heading`],[`aria-labelledby`,`hydration-heading`,1,`panel`],[`id`,`hydration-heading`],[`aria-labelledby`,`payload-heading`,1,`panel`,`wide`],[`id`,`payload-heading`],[`aria-hidden`,`true`,1,`spinner`],[`type`,`button`,3,`click`],[`scope`,`col`],[`scope`,`col`,1,`num`],[3,`selected`],[`id`,`ssr-detail`,`role`,`region`,`aria-labelledby`,`ssr-detail-heading`,1,`preview`],[3,`click`],[1,`url`],[`type`,`button`,`aria-controls`,`ssr-detail`,1,`link`,3,`title`],[1,`method`],[1,`status`],[`aria-hidden`,`true`,1,`dot`],[1,`num`],[1,`notes`],[1,`tag`,`server`],[1,`tag`,`mock`],[1,`tag`,`fault`],[`id`,`ssr-detail-heading`],[1,`stats`],[1,`muted`,`small`,`ok-note`],[1,`request-call`],[1,`muted`],[1,`stats`,`nav-stats`],[1,`preview-url`,3,`title`],[1,`tag`,3,`title`],[1,`muted`,`small`,`skip-reason`],[`appRovingList`,`button[data-call-id]`],[1,`tag`],[`type`,`button`,1,`link`,3,`title`],[1,`page-url`,3,`title`],[1,`tag`,`rule-ref`,3,`title`],[1,`empty-actions`],[`id`,`call-preview`,`role`,`region`,`aria-labelledby`,`preview-heading`,1,`preview`,3,`keydown.escape`],[1,`preview-head`],[`id`,`preview-heading`,`tabindex`,`-1`],[1,`preview-actions`],[`type`,`button`,1,`ghost`],[`type`,`button`,`aria-controls`,`rule-form`,1,`ghost`,3,`click`,`disabled`],[`type`,`button`,1,`ghost`,3,`click`],[1,`preview-meta`],[1,`preview-rule`],[`tabindex`,`0`,`role`,`region`,1,`preview-body`],[1,`inline`],[`type`,`checkbox`,3,`change`,`checked`,`disabled`],[1,`rule-pattern`,3,`title`],[1,`rule-method`],[`type`,`button`,`data-remove-rule`,``,1,`link`,`remove`,3,`click`,`disabled`],[1,`rule-meta`],[1,`status`,3,`ok`,`redirect`,`bad`],[1,`rule-note`],[`spellcheck`,`false`,`placeholder`,`Simulated render error`,`aria-describedby`,`override-kind-help`,3,`input`,`value`],[`id`,`override-key`,`spellcheck`,`false`,`autocomplete`,`off`,3,`input`,`value`],[`id`,`override-value`,`rows`,`3`,`spellcheck`,`false`,3,`input`,`value`],[`id`,`override-value-error`,1,`field-error`],[`id`,`override-value-note`,1,`muted`,`small`],[`type`,`button`,`data-remove-override`,``,1,`link`,`remove`,3,`click`,`disabled`],[1,`plain`,`mismatches`],[1,`mismatch-row`],[1,`mismatch-label`],[1,`plain`],[1,`warn`],[1,`muted`,`small`,`summary-line`],[`role`,`alert`,1,`bad`],[1,`entries`],[`aria-hidden`,`true`,1,`chevron`],[1,`entry-key`],[1,`entry-size`],[1,`entry-key-row`],[1,`entry-key-label`],[1,`entry-key-text`],[1,`entry-actions`],[`tabindex`,`0`,`role`,`region`]],template:function(e,t){if(e&1&&(N(0,jq,4,0,`div`,0)(1,Mq,7,0,`div`,1),R(2,`div`,2)(3,`div`,3)(4,`span`,4),J(5,`Page`),z(),R(6,`app-select`,5),W(`valueChange`,function(e){return t.selectPage(e)}),z()(),R(7,`button`,6),W(`click`,function(){return t.clearCalls()}),J(8,` Clear timeline `),z(),R(9,`p`,7),J(10),z()(),R(11,`div`,8)(12,`section`,9)(13,`h2`,10),J(14),z(),N(15,iJ,20,1)(16,aJ,11,0,`div`,11),z(),R(17,`section`,12)(18,`h2`,13),J(19),z(),B(20,`app-limit-note`,14),R(21,`div`,15)(22,`div`,16),k(),R(23,`svg`,17),B(24,`circle`,18)(25,`path`,19),z(),hs(),R(26,`input`,20),W(`input`,function(e){return t.callQuery.set(e.target.value)})(`keydown.escape`,function(){return t.callQuery.set(``)}),z()(),R(27,`app-select`,21),cv(`valueChange`,function(e){return sv(t.sideFilter,e)||(t.sideFilter=e),e}),z(),R(28,`label`,22)(29,`input`,23),W(`change`,function(e){return t.failedOnly.set(e.target.checked)}),z(),J(30,` Failed only `),z(),R(31,`span`,24),J(32),z(),R(33,`span`,25),J(34),z()(),N(35,fJ,21,0,`div`,26)(36,hJ,9,1,`div`,27)(37,gJ,11,0,`div`,11),N(38,yJ,20,18,`div`,28),z(),R(39,`section`,29)(40,`h2`,30),J(41,`Fault injection`),z(),N(42,bJ,2,1,`p`,31),R(43,`form`,32),W(`submit`,function(e){return t.addRule(e)}),R(44,`label`)(45,`span`),J(46,`URL pattern `),R(47,`span`,33),J(48,`(substring or * glob, ^ anchors the path)`),z()(),R(49,`input`,34),W(`input`,function(e){return t.patch(`pattern`,e)}),z()(),R(50,`div`,35)(51,`div`,36)(52,`span`,37),J(53,`Method`),z(),R(54,`app-select`,38),W(`valueChange`,function(e){return t.setDraft(`method`,e??``)}),z()(),R(55,`div`,36)(56,`span`,39),J(57,`Apply on`),z(),R(58,`app-select`,40),W(`valueChange`,function(e){return t.setDraft(`target`,e??`both`)}),z()()(),R(59,`div`,35)(60,`div`,36)(61,`span`,41),J(62,`Status`),z(),R(63,`app-select`,42),W(`valueChange`,function(e){return t.setDraft(`status`,e??``)}),z()(),R(64,`label`),J(65,` Delay (ms) `),R(66,`input`,43),W(`input`,function(e){return t.patch(`delayMs`,e)}),z()()(),R(67,`label`)(68,`span`),J(69,`Mock JSON body `),R(70,`span`,33),J(71,`(optional)`),z()(),R(72,`textarea`,44),W(`input`,function(e){return t.patch(`body`,e)}),z()(),R(73,`p`,45),J(74),z(),N(75,xJ,2,0,`p`,46),R(76,`p`,47),J(77),z(),R(78,`div`,48)(79,`button`,49),J(80,` Add rule `),z()()(),R(81,`h3`,50),J(82),z(),R(83,`ul`,51),F(84,DJ,17,17,`li`,52,Dq,!1,OJ,2,0,`li`,53),z()(),R(87,`section`,54)(88,`h2`,55),J(89,`SSR overrides`),z(),R(90,`p`,56),J(91,` Development only. These change what the server sends for matching pages, from the next full page load, and the request is marked `),R(92,`strong`),J(93,`overridden`),z(),J(94,`. `),z(),R(95,`form`,57),W(`submit`,function(e){return t.addOverride(e)}),R(96,`div`,36)(97,`span`,58),J(98,`Override`),z(),R(99,`app-select`,59),W(`valueChange`,function(e){return t.setOverrideDraft(`kind`,e??`render-error`)}),z()(),R(100,`label`)(101,`span`),J(102,`Page pattern `),R(103,`span`,33),J(104,`(substring or * glob, ^ anchors the path)`),z()(),R(105,`input`,60),W(`input`,function(e){return t.patchOverride(`pattern`,e)}),z()(),N(106,kJ,8,1)(107,MJ,12,6)(108,NJ,11,0,`p`,61),R(109,`div`,48)(110,`button`,49),J(111,` Add override `),z()()(),R(112,`h3`,62),J(113),z(),R(114,`ul`,51),F(115,IJ,12,12,`li`,52,Dq,!1,LJ,2,0,`li`,53),z()(),R(118,`section`,63)(119,`h2`,64),J(120,`Hydration`),z(),N(121,YJ,37,14)(122,XJ,5,0,`div`,11),z(),R(123,`section`,65)(124,`h2`,66),J(125,`TransferState payload`),z(),N(126,aY,2,1)(127,oY,3,0,`div`,11),z()()),e&2){let e,n,r,i;P(t.loading()?0:t.failed()?1:-1),j(6),L(`options`,t.pageOptions())(`value`,t.selected()?.pageId??null),j(),L(`disabled`,!t.canWrite()),M(`aria-describedby`,t.canWrite()?null:`http-writes-off`),j(3),Y(t.message()),j(4),X(`SSR requests (`,t.requests().length,`)`),j(),P(t.requests().length?15:16),j(4),X(`HTTP timeline (`,t.timeline().length,`)`),j(),L(`dropped`,t.droppedCalls())(`max`,t.maxCalls()),j(),q(`no-calls`,!t.timeline().length),j(5),L(`value`,t.callQuery()),j(),L(`options`,t.sideOptions),ov(`value`,t.sideFilter),j(2),L(`checked`,t.failedOnly()),j(3),Z(``,t.visibleCalls().length,` of `,t.timeline().length),j(2),Y(t.filterStatus()),j(),P(t.visibleCalls().length?35:t.timeline().length?36:37),j(3),P((e=t.selectedCall())?38:-1,e),j(4),P(t.canWrite()?-1:42),j(7),L(`value`,t.draft().pattern),j(5),L(`options`,t.methodOptions())(`value`,t.draft().method),j(4),L(`describedBy`,t.draftMocksOnServer()?`rule-ssr-note`:``)(`options`,t.targetOptions)(`value`,t.draft().target),j(5),L(`describedBy`,t.draftMocksOnServer()?`rule-ssr-note`:``)(`options`,t.statusOptions)(`value`,t.draft().status),j(3),L(`value`,t.draft().delayMs),j(6),L(`placeholder`,t.bodyPlaceholder)(`value`,t.draft().body),M(`aria-invalid`,t.bodyError()?`true`:null),j(2),Y(t.bodyError()),j(),P(t.draftMocksOnServer()?75:-1),j(2),Y(t.draftHint()),j(2),L(`disabled`,!t.canWrite()||!t.draftRule()),M(`aria-describedby`,t.canWrite()?`rule-hint`:`http-writes-off`),j(3),X(` Rules (`,t.rules().length,`) `),j(2),I(t.rules()),j(15),L(`describedBy`,t.overrideDraft().kind===`state-edit`?``:`override-kind-help`)(`options`,t.overrideKindOptions)(`value`,t.overrideDraft().kind),j(6),L(`value`,t.overrideDraft().pattern),j(),P((n=t.overrideDraft().kind)===`render-error`?106:n===`state-edit`?107:n===`client-render`?108:-1),j(4),L(`disabled`,!t.canWrite()||!t.overrideReady()),M(`aria-describedby`,t.canWrite()?null:`http-writes-off`),j(3),X(` Overrides (`,t.overrides().length,`) `),j(2),I(t.overrides()),j(6),P((r=t.selected()?.hydration)?121:122,r),j(5),P((i=t.selectedPayload())?126:127,i)}},dependencies:[oO,_I,qD,hb],styles:[`@charset "UTF-8"; [_nghost-%COMP%] { display: block; color: var(--%NS%text); @@ -13980,7 +14004,7 @@ summary[_ngcontent-%COMP%]:hover .entry-key[_ngcontent-%COMP%] { .message[_ngcontent-%COMP%] { text-align: left; } -}`]})};function SY(e,t){e&1&&(k(),V(0,`svg`,9),Bg(1,`path`,20),H())}function CY(e,t){e&1&&(k(),V(0,`svg`,10)(1,`defs`)(2,`linearGradient`,21),Bg(3,`stop`,22)(4,`stop`,23),H()(),Bg(5,`path`,24),V(6,`g`,25),Bg(7,`path`,26)(8,`path`,27)(9,`path`,28)(10,`path`,29),H()())}function wY(e,t){e&1&&(k(),V(0,`svg`,11),Bg(1,`path`,30)(2,`path`,31)(3,`path`,32)(4,`path`,33),H())}function TY(e,t){e&1&&(k(),V(0,`svg`,9),Bg(1,`path`,34)(2,`path`,35)(3,`path`,36)(4,`path`,37)(5,`path`,38)(6,`path`,39),H())}function EY(e,t){if(e&1&&(V(0,`a`,16)(1,`span`,40)(2,`strong`),J(3),H()(),V(4,`span`,41),J(5,`→`),H(),V(6,`span`,42),J(7,`(opens in a new tab)`),H()()),e&2){let e=t;Kg(`href`,e.href,ju),j(3),Y(e.label)}}function DY(e,t){if(e&1&&(V(0,`li`),J(1),H()),e&2){let e=t.$implicit,n=t.$index;K(`animation-delay`,200+n*120,`ms`),j(),Y(e)}}var OY=class e{info=$.required();plansTitle=Q(()=>{let e=this.info();return e.plansTitle??(e.link?`In an ${e.name} app`:`On the roadmap`)});static ɵfac=function(t){return new(t||e)};static ɵcmp=Gh({type:e,selectors:[[`app-coming-soon`]],hostVars:2,hostBindings:function(e,t){e&2&&K(`--%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&&(V(0,`section`,0)(1,`div`,1),Bg(2,`span`,2)(3,`span`,3),V(4,`span`,4),Bg(5,`span`,5),H(),V(6,`span`,6),Bg(7,`span`,5),H(),V(8,`span`,7),Bg(9,`span`,5),H(),V(10,`div`,8),N(11,SY,2,0,`:svg:svg`,9)(12,CY,11,0,`:svg:svg`,10)(13,wY,5,0,`:svg:svg`,11)(14,TY,7,0,`:svg:svg`,9),H()(),V(15,`p`,12)(16,`span`,13),J(17,`✦`),H(),J(18),H(),V(19,`h2`,14),J(20),H(),V(21,`p`,15),J(22),H(),N(23,EY,8,2,`a`,16),V(24,`h3`,17),J(25),H(),V(26,`ul`,18),F(27,DY,2,3,`li`,19,kg),H()()),e&2){let e,n;j(11),P((e=t.info().id)===`nativescript`?11:e===`angular-native`?12:e===`analog`?13:e===`capacitor`?14:-1),j(7),X(` `,t.info().badge),j(2),Y(t.info().heading),j(2),Y(t.info().summary),j(),P((n=t.info().link)?23:-1,n),j(2),X(` `,t.plansTitle(),` `),j(2),I(t.info().plans)}},styles:[`[_nghost-%COMP%] { +}`]})};function TY(e,t){e&1&&(k(),V(0,`svg`,9),Bg(1,`path`,20),H())}function EY(e,t){e&1&&(k(),V(0,`svg`,10)(1,`defs`)(2,`linearGradient`,21),Bg(3,`stop`,22)(4,`stop`,23),H()(),Bg(5,`path`,24),V(6,`g`,25),Bg(7,`path`,26)(8,`path`,27)(9,`path`,28)(10,`path`,29),H()())}function DY(e,t){e&1&&(k(),V(0,`svg`,11),Bg(1,`path`,30)(2,`path`,31)(3,`path`,32)(4,`path`,33),H())}function OY(e,t){e&1&&(k(),V(0,`svg`,9),Bg(1,`path`,34)(2,`path`,35)(3,`path`,36)(4,`path`,37)(5,`path`,38)(6,`path`,39),H())}function kY(e,t){if(e&1&&(V(0,`a`,16)(1,`span`,40)(2,`strong`),J(3),H()(),V(4,`span`,41),J(5,`→`),H(),V(6,`span`,42),J(7,`(opens in a new tab)`),H()()),e&2){let e=t;Kg(`href`,e.href,ju),j(3),Y(e.label)}}function AY(e,t){if(e&1&&(V(0,`li`),J(1),H()),e&2){let e=t.$implicit,n=t.$index;K(`animation-delay`,200+n*120,`ms`),j(),Y(e)}}var jY=class e{info=$.required();plansTitle=Q(()=>{let e=this.info();return e.plansTitle??(e.link?`In an ${e.name} app`:`On the roadmap`)});static ɵfac=function(t){return new(t||e)};static ɵcmp=Gh({type:e,selectors:[[`app-coming-soon`]],hostVars:2,hostBindings:function(e,t){e&2&&K(`--%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&&(V(0,`section`,0)(1,`div`,1),Bg(2,`span`,2)(3,`span`,3),V(4,`span`,4),Bg(5,`span`,5),H(),V(6,`span`,6),Bg(7,`span`,5),H(),V(8,`span`,7),Bg(9,`span`,5),H(),V(10,`div`,8),N(11,TY,2,0,`:svg:svg`,9)(12,EY,11,0,`:svg:svg`,10)(13,DY,5,0,`:svg:svg`,11)(14,OY,7,0,`:svg:svg`,9),H()(),V(15,`p`,12)(16,`span`,13),J(17,`✦`),H(),J(18),H(),V(19,`h2`,14),J(20),H(),V(21,`p`,15),J(22),H(),N(23,kY,8,2,`a`,16),V(24,`h3`,17),J(25),H(),V(26,`ul`,18),F(27,AY,2,3,`li`,19,kg),H()()),e&2){let e,n;j(11),P((e=t.info().id)===`nativescript`?11:e===`angular-native`?12:e===`analog`?13:e===`capacitor`?14:-1),j(7),X(` `,t.info().badge),j(2),Y(t.info().heading),j(2),Y(t.info().summary),j(),P((n=t.info().link)?23:-1,n),j(2),X(` `,t.plansTitle(),` `),j(2),I(t.info().plans)}},styles:[`[_nghost-%COMP%] { display: block; min-height: 100%; background: radial-gradient(60% 50% at 50% 18%, color-mix(in srgb, var(--%NS%brand) 22%, transparent), transparent 70%); @@ -14326,9 +14350,9 @@ h2[_ngcontent-%COMP%] { .author[_ngcontent-%COMP%]:hover .go[_ngcontent-%COMP%] { transform: none; } -}`]})},kY=new Set([`CapacitorCookies`,`CapacitorHttp`,`SystemBars`,`WebView`]);function AY(e){return e==null?`Unknown`:e?`Yes`:`No`}function jY(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 MY(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 NY=new WeakMap;function PY(e){let t=e.calls;if(Array.isArray(t))return e;let n=NY.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)},NY.set(e,n)}return n}function FY(e){let t=e?.pages;return!t||typeof t!=`object`?[]:Object.values(t).filter(e=>e&&typeof e.pageId==`string`&&!!e.info).map(PY).sort((e,t)=>t.reportedAt-e.reportedAt)}function IY(e){let t=e.error;return!!t&&(t.code===`UNIMPLEMENTED`||/not implemented/i.test(t.message))}function LY(e,t){return e.durationMs===void 0?e.status===`pending`?Math.max(0,t-e.startedAt):0:e.durationMs}function RY(e,t,n){return t===`failed`?e.status===`error`:t===`pending`?e.status===`pending`:t!==`slow`||LY(e,n)>=500}function zY(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 BY(e,t){let n=t-e;return n<1e3?`just now`:`${zY(n)} ago`}function VY(e,t){return kY.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 HY(e,t){let n=e.info,r=n=>e.calls.filter(e=>RY(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=>VY(e,n.platform)).length}}function UY(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 WY=/^[A-Za-z_$][\w$]*$/;function GY(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+GY(e,n)).join(`, -`)},\n${t}]`:`[]`;let r=Object.entries(e);return r.length?`{\n${r.map(([e,t])=>`${n}${WY.test(e)?e:JSON.stringify(e)}: ${GY(t,n)}`).join(`, -`)},\n${t}}`:`{}`}function KY(e){let t=WY.test(e.plugin)?e.plugin:`Capacitor.Plugins[${JSON.stringify(e.plugin)}]`,n=WY.test(e.method)?`.${e.method}`:`[${JSON.stringify(e.method)}]`,r=e.args===void 0?[]:[GY(e.args)];return e.kind===`callback`&&(r.length||r.push(`{}`),r.push(`(result, error) => {}`)),`await ${t}${n}(${r.join(`, `)});`}function qY(e){if(e===void 0)return`undefined`;try{return JSON.stringify(e,null,2)??`undefined`}catch{return String(e)}}function JY(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 YY(e,t){if(e&1){let e=U();V(0,`button`,8),r_(`click`,function(){let t=D(e).$implicit;return O(G().tab.set(t))}),J(1),H()}if(e&2){let e=t.$implicit,n=G();Kg(`id`,`cap-tab-`+e),M(`aria-selected`,n.tab()===e)(`aria-controls`,`cap-panel-`+e)(`tabindex`,n.tab()===e?0:-1),j(),X(` `,n.tabLabel(e),` `)}}function XY(e,t){e&1&&(V(0,`p`,9),J(1,`No arguments.`),H())}function ZY(e,t){if(e&1&&(V(0,`pre`,10),J(1),H()),e&2){let e=G(2),t=fv(0);j(),Y(e.json(t.args))}}function QY(e,t){e&1&&N(0,XY,2,0,`p`,9)(1,ZY,2,1,`pre`,10),e&2&&(G(),P(fv(0).args===void 0?0:1))}function $Y(e,t){if(e&1&&(V(0,`code`),J(1),H()),e&2){let e=G();j(),Y(e.code)}}function eX(e,t){if(e&1&&(V(0,`p`,11),N(1,$Y,2,1,`code`),J(2),H()),e&2){let e=t;j(),P(e.code?1:-1),j(),X(` `,e.message,` `)}}function tX(e,t){e&1&&(V(0,`p`,9),J(1,`No answer yet.`),H())}function nX(e,t){if(e&1&&(V(0,`p`,9),J(1),H()),e&2){G(3);let e=fv(0);j(),X(`The latest of `,e.callbacks,` callbacks.`)}}function rX(e,t){e&1&&(V(0,`p`,9),J(1,`Resolved without a value.`),H())}function iX(e,t){if(e&1&&(V(0,`pre`,12),J(1),H()),e&2){let e=G(3),t=fv(0);j(),Y(e.json(t.result))}}function aX(e,t){if(e&1&&(N(0,nX,2,1,`p`,9),N(1,rX,2,0,`p`,9)(2,iX,2,1,`pre`,12)),e&2){G(2);let e=fv(0);P(e.callbacks&&e.callbacks>1?0:-1),j(),P(e.result===void 0?1:2)}}function oX(e,t){if(e&1&&N(0,eX,3,2,`p`,11)(1,tX,2,0,`p`,9)(2,aX,3,2),e&2){let e;G();let t=fv(0);P((e=t.error)?0:t.status===`pending`?1:2,e)}}function sX(e,t){if(e&1&&(V(0,`div`)(1,`dt`),J(2,`Callbacks`),H(),V(3,`dd`),J(4),H()()),e&2){G(2);let e=fv(0);j(4),Y(e.callbacks??0)}}function cX(e,t){if(e&1&&(V(0,`dl`)(1,`div`)(2,`dt`),J(3,`Started`),H(),V(4,`dd`),J(5),H()(),V(6,`div`)(7,`dt`),J(8,`Finished`),H(),V(9,`dd`),J(10),H()(),V(11,`div`)(12,`dt`),J(13),H(),V(14,`dd`),J(15),H()(),N(16,sX,5,1,`div`),H()),e&2){let e=G(),t=fv(0);j(5),Y(e.time(t.startedAt)),j(5),X(` `,t.durationMs===void 0?`Not yet`:e.time(t.startedAt+t.durationMs),` `),j(3),Y(t.status===`pending`?`Waiting for`:`Duration`),j(2),Y(e.span(e.took(t,e.now()))),j(),P(t.kind===`callback`?16:-1)}}var lX=[`args`,`outcome`,`timing`],uX=class e{call=$.required();now=$.required();announce=Rv();host=T(Pl);tab=A(`args`);tabOrder=lX;json=qY;time=tO;span=zY;took=LY;statusText=Q(()=>{let e=this.call();return e.status===`pending`?`Pending`:e.status===`ok`?`OK`:IY(e)?`Not implemented`:`Error`});panelHasFocusable=Q(()=>{let e=this.call();return this.tab()===`args`?e.args!==void 0:this.tab()===`outcome`&&!e.error&&e.status===`ok`&&e.result!==void 0});tabLabel(e){return e===`args`?`Arguments`:e===`timing`?`Timing`:this.call().status===`error`?`Error`:`Result`}onTabKey(e){let t=lX.indexOf(this.tab()),n;if(e.key===`ArrowRight`)n=(t+1)%lX.length;else if(e.key===`ArrowLeft`)n=(t-1+lX.length)%lX.length;else if(e.key===`Home`)n=0;else if(e.key===`End`)n=lX.length-1;else return;e.preventDefault();let r=lX[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`?qY(t):KY(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=Gh({type:e,selectors:[[`app-capacitor-call-detail`]],inputs:{call:[1,`call`],now:[1,`now`]},outputs:{announce:`announce`},decls:19,vars:10,consts:[[`id`,`cap-detail`,`aria-labelledby`,`cap-detail-title`,1,`detail`],[`id`,`cap-detail-title`],[1,`meta`],[1,`actions`],[`type`,`button`,1,`small`,3,`click`],[`role`,`tablist`,`aria-label`,`Call details`,1,`tabs`,3,`keydown`],[`type`,`button`,`role`,`tab`,3,`id`],[`role`,`tabpanel`,1,`panel`,3,`id`],[`type`,`button`,`role`,`tab`,3,`click`,`id`],[1,`muted`],[`tabindex`,`0`,`aria-label`,`Arguments`],[1,`error-text`],[`tabindex`,`0`,`aria-label`,`Result`]],template:function(e,t){if(e&1&&(uv(0),V(1,`section`,0)(2,`h3`,1)(3,`code`),J(4),H()(),V(5,`p`,2),J(6),H(),V(7,`div`,3)(8,`button`,4),r_(`click`,function(){return t.copy(`json`)}),J(9,`Copy as JSON`),H(),V(10,`button`,4),r_(`click`,function(){return t.copy(`code`)}),J(11,`Copy as code`),H()(),V(12,`div`,5),r_(`keydown`,function(e){return t.onTabKey(e)}),F(13,YY,2,5,`button`,6,kg),H(),V(15,`div`,7),N(16,QY,2,1)(17,oX,3,1)(18,cX,17,5,`dl`),H()()),e&2){let e,n=dv(t.call());j(4),Z(``,n.plugin,`.`,n.method,`()`),j(2),rv(` `,t.statusText(),`, `,n.via,`, `,n.kind===`callback`?`stream`:`promise`,` `),j(7),I(t.tabOrder),j(2),Kg(`id`,`cap-panel-`+t.tab()),M(`aria-labelledby`,`cap-tab-`+t.tab())(`tabindex`,t.panelHasFocusable()?null:0),j(),P((e=t.tab())===`args`?16:e===`outcome`?17:e===`timing`?18:-1)}},styles:[`.detail[_ngcontent-%COMP%] { +}`]})},MY=new Set([`CapacitorCookies`,`CapacitorHttp`,`SystemBars`,`WebView`]);function NY(e){return e==null?`Unknown`:e?`Yes`:`No`}function PY(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 FY(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 IY=new WeakMap;function LY(e){let t=e.calls;if(Array.isArray(t))return e;let n=IY.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)},IY.set(e,n)}return n}function RY(e){let t=e?.pages;return!t||typeof t!=`object`?[]:Object.values(t).filter(e=>e&&typeof e.pageId==`string`&&!!e.info).map(LY).sort((e,t)=>t.reportedAt-e.reportedAt)}function zY(e){let t=e.error;return!!t&&(t.code===`UNIMPLEMENTED`||/not implemented/i.test(t.message))}function BY(e,t){return e.durationMs===void 0?e.status===`pending`?Math.max(0,t-e.startedAt):0:e.durationMs}function VY(e,t,n){return t===`failed`?e.status===`error`:t===`pending`?e.status===`pending`:t!==`slow`||BY(e,n)>=500}function HY(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 UY(e,t){let n=t-e;return n<1e3?`just now`:`${HY(n)} ago`}function WY(e,t){return MY.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 GY(e,t){let n=e.info,r=n=>e.calls.filter(e=>VY(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=>WY(e,n.platform)).length}}function KY(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 qY=/^[A-Za-z_$][\w$]*$/;function JY(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+JY(e,n)).join(`, +`)},\n${t}]`:`[]`;let r=Object.entries(e);return r.length?`{\n${r.map(([e,t])=>`${n}${qY.test(e)?e:JSON.stringify(e)}: ${JY(t,n)}`).join(`, +`)},\n${t}}`:`{}`}function YY(e){let t=qY.test(e.plugin)?e.plugin:`Capacitor.Plugins[${JSON.stringify(e.plugin)}]`,n=qY.test(e.method)?`.${e.method}`:`[${JSON.stringify(e.method)}]`,r=e.args===void 0?[]:[JY(e.args)];return e.kind===`callback`&&(r.length||r.push(`{}`),r.push(`(result, error) => {}`)),`await ${t}${n}(${r.join(`, `)});`}function XY(e){if(e===void 0)return`undefined`;try{return JSON.stringify(e,null,2)??`undefined`}catch{return String(e)}}function ZY(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 QY(e,t){if(e&1){let e=U();V(0,`button`,8),r_(`click`,function(){let t=D(e).$implicit;return O(G().tab.set(t))}),J(1),H()}if(e&2){let e=t.$implicit,n=G();Kg(`id`,`cap-tab-`+e),M(`aria-selected`,n.tab()===e)(`aria-controls`,`cap-panel-`+e)(`tabindex`,n.tab()===e?0:-1),j(),X(` `,n.tabLabel(e),` `)}}function $Y(e,t){e&1&&(V(0,`p`,9),J(1,`No arguments.`),H())}function eX(e,t){if(e&1&&(V(0,`pre`,10),J(1),H()),e&2){let e=G(2),t=fv(0);j(),Y(e.json(t.args))}}function tX(e,t){e&1&&N(0,$Y,2,0,`p`,9)(1,eX,2,1,`pre`,10),e&2&&(G(),P(fv(0).args===void 0?0:1))}function nX(e,t){if(e&1&&(V(0,`code`),J(1),H()),e&2){let e=G();j(),Y(e.code)}}function rX(e,t){if(e&1&&(V(0,`p`,11),N(1,nX,2,1,`code`),J(2),H()),e&2){let e=t;j(),P(e.code?1:-1),j(),X(` `,e.message,` `)}}function iX(e,t){e&1&&(V(0,`p`,9),J(1,`No answer yet.`),H())}function aX(e,t){if(e&1&&(V(0,`p`,9),J(1),H()),e&2){G(3);let e=fv(0);j(),X(`The latest of `,e.callbacks,` callbacks.`)}}function oX(e,t){e&1&&(V(0,`p`,9),J(1,`Resolved without a value.`),H())}function sX(e,t){if(e&1&&(V(0,`pre`,12),J(1),H()),e&2){let e=G(3),t=fv(0);j(),Y(e.json(t.result))}}function cX(e,t){if(e&1&&(N(0,aX,2,1,`p`,9),N(1,oX,2,0,`p`,9)(2,sX,2,1,`pre`,12)),e&2){G(2);let e=fv(0);P(e.callbacks&&e.callbacks>1?0:-1),j(),P(e.result===void 0?1:2)}}function lX(e,t){if(e&1&&N(0,rX,3,2,`p`,11)(1,iX,2,0,`p`,9)(2,cX,3,2),e&2){let e;G();let t=fv(0);P((e=t.error)?0:t.status===`pending`?1:2,e)}}function uX(e,t){if(e&1&&(V(0,`div`)(1,`dt`),J(2,`Callbacks`),H(),V(3,`dd`),J(4),H()()),e&2){G(2);let e=fv(0);j(4),Y(e.callbacks??0)}}function dX(e,t){if(e&1&&(V(0,`dl`)(1,`div`)(2,`dt`),J(3,`Started`),H(),V(4,`dd`),J(5),H()(),V(6,`div`)(7,`dt`),J(8,`Finished`),H(),V(9,`dd`),J(10),H()(),V(11,`div`)(12,`dt`),J(13),H(),V(14,`dd`),J(15),H()(),N(16,uX,5,1,`div`),H()),e&2){let e=G(),t=fv(0);j(5),Y(e.time(t.startedAt)),j(5),X(` `,t.durationMs===void 0?`Not yet`:e.time(t.startedAt+t.durationMs),` `),j(3),Y(t.status===`pending`?`Waiting for`:`Duration`),j(2),Y(e.span(e.took(t,e.now()))),j(),P(t.kind===`callback`?16:-1)}}var fX=[`args`,`outcome`,`timing`],pX=class e{call=$.required();now=$.required();announce=Rv();host=T(Pl);tab=A(`args`);tabOrder=fX;json=XY;time=tO;span=HY;took=BY;statusText=Q(()=>{let e=this.call();return e.status===`pending`?`Pending`:e.status===`ok`?`OK`:zY(e)?`Not implemented`:`Error`});panelHasFocusable=Q(()=>{let e=this.call();return this.tab()===`args`?e.args!==void 0:this.tab()===`outcome`&&!e.error&&e.status===`ok`&&e.result!==void 0});tabLabel(e){return e===`args`?`Arguments`:e===`timing`?`Timing`:this.call().status===`error`?`Error`:`Result`}onTabKey(e){let t=fX.indexOf(this.tab()),n;if(e.key===`ArrowRight`)n=(t+1)%fX.length;else if(e.key===`ArrowLeft`)n=(t-1+fX.length)%fX.length;else if(e.key===`Home`)n=0;else if(e.key===`End`)n=fX.length-1;else return;e.preventDefault();let r=fX[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`?XY(t):YY(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=Gh({type:e,selectors:[[`app-capacitor-call-detail`]],inputs:{call:[1,`call`],now:[1,`now`]},outputs:{announce:`announce`},decls:19,vars:10,consts:[[`id`,`cap-detail`,`aria-labelledby`,`cap-detail-title`,1,`detail`],[`id`,`cap-detail-title`],[1,`meta`],[1,`actions`],[`type`,`button`,1,`small`,3,`click`],[`role`,`tablist`,`aria-label`,`Call details`,1,`tabs`,3,`keydown`],[`type`,`button`,`role`,`tab`,3,`id`],[`role`,`tabpanel`,1,`panel`,3,`id`],[`type`,`button`,`role`,`tab`,3,`click`,`id`],[1,`muted`],[`tabindex`,`0`,`aria-label`,`Arguments`],[1,`error-text`],[`tabindex`,`0`,`aria-label`,`Result`]],template:function(e,t){if(e&1&&(uv(0),V(1,`section`,0)(2,`h3`,1)(3,`code`),J(4),H()(),V(5,`p`,2),J(6),H(),V(7,`div`,3)(8,`button`,4),r_(`click`,function(){return t.copy(`json`)}),J(9,`Copy as JSON`),H(),V(10,`button`,4),r_(`click`,function(){return t.copy(`code`)}),J(11,`Copy as code`),H()(),V(12,`div`,5),r_(`keydown`,function(e){return t.onTabKey(e)}),F(13,QY,2,5,`button`,6,kg),H(),V(15,`div`,7),N(16,tX,2,1)(17,lX,3,1)(18,dX,17,5,`dl`),H()()),e&2){let e,n=dv(t.call());j(4),Z(``,n.plugin,`.`,n.method,`()`),j(2),rv(` `,t.statusText(),`, `,n.via,`, `,n.kind===`callback`?`stream`:`promise`,` `),j(7),I(t.tabOrder),j(2),Kg(`id`,`cap-panel-`+t.tab()),M(`aria-labelledby`,`cap-tab-`+t.tab())(`tabindex`,t.panelHasFocusable()?null:0),j(),P((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); @@ -14481,7 +14505,7 @@ dd[_ngcontent-%COMP%] { margin: 0; color: var(--%NS%text); font-variant-numeric: tabular-nums; -}`]})},dX=(e,t)=>t.plugin,fX=(e,t)=>t.label;function pX(e,t){if(e&1&&(V(0,`span`,5),J(1),H(),J(2,` `),V(3,`span`,6),J(4,`from `),V(5,`code`),J(6),H(),J(7),H()),e&2){let e=G().$implicit,t=G(2);j(),Y(e.value),j(5),Y(e.from),j(),X(`, `,t.ago(e.at,t.now()))}}function mX(e,t){e&1&&(V(0,`span`,4),J(1,`Not reported yet`),H())}function hX(e,t){if(e&1&&(V(0,`div`)(1,`dt`),J(2),H(),V(3,`dd`),N(4,pX,8,3)(5,mX,2,0,`span`,4),H()()),e&2){let e=t.$implicit;j(2),Y(e.label),j(2),P(e.value===null?5:4)}}function gX(e,t){if(e&1&&(V(0,`article`,2)(1,`h3`,3)(2,`code`),J(3),H()(),V(4,`dl`),F(5,hX,6,2,`div`,null,fX),H()()),e&2){let e=t.$implicit;M(`aria-labelledby`,`cap-state-`+e.plugin),j(),Kg(`id`,`cap-state-`+e.plugin),j(2),Y(e.plugin),j(2),I(e.fields)}}function _X(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function vX(e,t=e=>e){return n=>{let r=_X(n)?n[e]:void 0;return typeof r==`string`||typeof r==`number`||typeof r==`boolean`?t(String(r)):null}}function yX(e,t,n){return[...e.map(e=>({method:e,read:n})),...t.map(e=>({event:e,read:n}))]}var bX=[{plugin:`Foldable`,fields:[{label:`Fold state`,sources:yX([`getFoldState`],[`foldStateChange`],vX(`state`))},{label:`Posture`,sources:yX([`getFoldState`],[`foldStateChange`],vX(`posture`))},{label:`Hinge orientation`,sources:yX([`getFoldState`],[`foldStateChange`],vX(`hingeOrientation`))},{label:`Hinge angle`,sources:yX([`getHingeAngle`],[`hingeAngleChange`],vX(`angle`,e=>`${e}°`))},{label:`Active display`,sources:yX([`getFoldState`],[`foldStateChange`],vX(`activeDisplay`))},{label:`Size class`,sources:yX([`getSizeClass`],[`sizeClassChange`],e=>{let t=vX(`widthClass`)(e),n=vX(`heightClass`)(e);return!t&&!n?null:[t&&`width ${t}`,n&&`height ${n}`].filter(Boolean).join(`, `)})}]}];function xX(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 SX(e,t=bX){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=xX(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 CX=class e{cards=$.required();now=$.required();ago=BY;static ɵfac=function(t){return new(t||e)};static ɵcmp=Gh({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&&(V(0,`p`,0),J(1,` Read from the results and events the app already received. The panel calls nothing in the app. `),H(),V(2,`div`,1),F(3,gX,7,3,`article`,2,dX),H()),e&2&&(j(3),I(t.cards()))},styles:[`[_nghost-%COMP%] { +}`]})},mX=(e,t)=>t.plugin,hX=(e,t)=>t.label;function gX(e,t){if(e&1&&(V(0,`span`,5),J(1),H(),J(2,` `),V(3,`span`,6),J(4,`from `),V(5,`code`),J(6),H(),J(7),H()),e&2){let e=G().$implicit,t=G(2);j(),Y(e.value),j(5),Y(e.from),j(),X(`, `,t.ago(e.at,t.now()))}}function _X(e,t){e&1&&(V(0,`span`,4),J(1,`Not reported yet`),H())}function vX(e,t){if(e&1&&(V(0,`div`)(1,`dt`),J(2),H(),V(3,`dd`),N(4,gX,8,3)(5,_X,2,0,`span`,4),H()()),e&2){let e=t.$implicit;j(2),Y(e.label),j(2),P(e.value===null?5:4)}}function yX(e,t){if(e&1&&(V(0,`article`,2)(1,`h3`,3)(2,`code`),J(3),H()(),V(4,`dl`),F(5,vX,6,2,`div`,null,hX),H()()),e&2){let e=t.$implicit;M(`aria-labelledby`,`cap-state-`+e.plugin),j(),Kg(`id`,`cap-state-`+e.plugin),j(2),Y(e.plugin),j(2),I(e.fields)}}function bX(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function xX(e,t=e=>e){return n=>{let r=bX(n)?n[e]:void 0;return typeof r==`string`||typeof r==`number`||typeof r==`boolean`?t(String(r)):null}}function SX(e,t,n){return[...e.map(e=>({method:e,read:n})),...t.map(e=>({event:e,read:n}))]}var CX=[{plugin:`Foldable`,fields:[{label:`Fold state`,sources:SX([`getFoldState`],[`foldStateChange`],xX(`state`))},{label:`Posture`,sources:SX([`getFoldState`],[`foldStateChange`],xX(`posture`))},{label:`Hinge orientation`,sources:SX([`getFoldState`],[`foldStateChange`],xX(`hingeOrientation`))},{label:`Hinge angle`,sources:SX([`getHingeAngle`],[`hingeAngleChange`],xX(`angle`,e=>`${e}°`))},{label:`Active display`,sources:SX([`getFoldState`],[`foldStateChange`],xX(`activeDisplay`))},{label:`Size class`,sources:SX([`getSizeClass`],[`sizeClassChange`],e=>{let t=xX(`widthClass`)(e),n=xX(`heightClass`)(e);return!t&&!n?null:[t&&`width ${t}`,n&&`height ${n}`].filter(Boolean).join(`, `)})}]}];function wX(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 TX(e,t=CX){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=wX(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 EX=class e{cards=$.required();now=$.required();ago=UY;static ɵfac=function(t){return new(t||e)};static ɵcmp=Gh({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&&(V(0,`p`,0),J(1,` Read from the results and events the app already received. The panel calls nothing in the app. `),H(),V(2,`div`,1),F(3,yX,7,3,`article`,2,mX),H()),e&2&&(j(3),I(t.cards()))},styles:[`[_nghost-%COMP%] { display: block; } @@ -14557,7 +14581,7 @@ dd[_ngcontent-%COMP%] { .missing[_ngcontent-%COMP%] { font-style: italic; -}`]})},wX=(e,t)=>t.filter,TX=(e,t)=>t.id,EX=(e,t)=>t.name;function DX(e,t){e&1&&(R(0,`p`,1),J(1,`Loading Capacitor data…`),z())}function OX(e,t){if(e&1){let e=U();R(0,`div`,2)(1,`p`),J(2,`Can't read the Capacitor data from the devtools server.`),z(),R(3,`button`,3),W(`click`,function(){return D(e),O(G().retry())}),J(4,`Retry`),z()()}}function kX(e,t){if(e&1){let e=U();R(0,`button`,27),W(`click`,function(){let t=D(e).$implicit;return O(G(4).pickFilter(t.filter))}),R(1,`span`,24),J(2),z(),J(3,` `),R(4,`span`,25),J(5),z()()}if(e&2){let e=t.$implicit,n=G(4);M(`data-filter`,e.filter)(`aria-pressed`,n.callFilter()===e.filter),j(2),Y(e.label),j(3),Y(e.count)}}function AX(e,t){if(e&1&&F(0,kX,6,4,`button`,26,wX),e&2){let e=G();I(G(2).callStats(e))}}function jX(e,t){if(e&1&&(R(0,`span`,23)(1,`span`,24),J(2,`Platform`),z(),J(3,` `),R(4,`span`,25)(5,`code`),J(6),z(),J(7),z()(),N(8,AX,2,0),R(9,`span`,23)(10,`span`,24),J(11,`CapacitorHttp`),z(),J(12,` `),R(13,`span`,25),J(14),z()(),R(15,`span`,23)(16,`span`,24),J(17,`Plugin hints`),z(),J(18,` `),R(19,`span`,25),J(20),z()()),e&2){let e=t;j(6),Y(e.platform),j(),X(` `,e.native?`native`:`web`),j(),P(e.logsCalls?8:-1),j(6),Y(e.capacitorHttp),j(6),Y(e.hints)}}function MX(e,t){if(e&1){let e=U();R(0,`div`,10)(1,`span`,28),J(2,`Page`),z(),R(3,`app-select`,29),W(`valueChange`,function(t){return D(e),O(G(2).selectedPageId.set(t))}),z()()}if(e&2){let e=G(),t=G();j(3),L(`options`,t.pageOptions())(`value`,e.pageId)}}function NX(e,t){if(e&1&&(R(0,`section`,12)(1,`h2`,30),J(2,`Plugin state`),z(),B(3,`app-capacitor-state`,31),z()),e&2){let e=G(2);j(3),L(`cards`,e.stateCards())(`now`,e.now())}}function PX(e,t){if(e&1&&(R(0,`p`,15),J(1,` Plugin calls aren't shown on this page. Native calls are logged on iOS and Android, where plugins go through the native bridge. To log calls a web implementation answers, load `),R(2,`code`),J(3,`@pangular-inspector/devtools/capacitor-hook`),z(),J(4,` before `),R(5,`code`),J(6,`@capacitor/core`),z(),J(7,`. `),R(8,`a`,32),J(9,`How to log web calls`),R(10,`span`,6),J(11,` (opens in a new tab)`),z()()()),e&2){let e=G(2);j(8),L(`href`,e.guideUrl,ju)}}function FX(e,t){if(e&1&&(R(0,`p`,15),J(1,` Only native calls are logged. Calls a web implementation answers are left out. `),R(2,`a`,32),J(3,`How to log them too`),R(4,`span`,6),J(5,` (opens in a new tab)`),z()()()),e&2){let e=G(3);j(2),L(`href`,e.guideUrl,ju)}}function IX(e,t){e&1&&(R(0,`p`,18),J(1,`No plugin calls yet. Use the app and they show up here.`),z())}function LX(e,t){if(e&1){let e=U();R(0,`div`,18)(1,`p`),J(2,`No call matches the filters.`),z(),R(3,`p`,43),J(4),z(),R(5,`button`,3),W(`click`,function(){D(e),G();let t=d_(7);return G(2).clearFilters(),O(t.focus())}),J(6,` Clear filters `),z()()}if(e&2){let e=G(2),t=G();j(4),rv(` `,e.calls.length,` `,e.calls.length===1?`call is`:`calls are`,` hidden by `,t.hiddenBy(),`. `)}}function RX(e,t){e&1&&(k(),B(0,`path`,50))}function zX(e,t){e&1&&(k(),B(0,`circle`,55)(1,`path`,56))}function BX(e,t){e&1&&(k(),B(0,`circle`,55)(1,`path`,57))}function VX(e,t){e&1&&(k(),B(0,`circle`,55)(1,`path`,58))}function HX(e,t){e&1&&(R(0,`span`,51),J(1,`stream`),z())}function UX(e,t){if(e&1){let e=U();R(0,`li`)(1,`button`,46),W(`focus`,function(){let t=D(e).$implicit;return O(G(4).focusedCallId.set(t.id))})(`click`,function(){let t=D(e).$implicit;return O(G(4).select(t.id))}),R(2,`code`,47),J(3),z(),R(4,`span`,48),k(),R(5,`svg`,49),N(6,RX,1,0,`:svg:path`,50)(7,zX,2,0)(8,BX,2,0)(9,VX,2,0),z(),J(10),z(),N(11,HX,2,0,`span`,51),hs(),R(12,`span`,52)(13,`span`,53),B(14,`span`),z(),J(15),z(),R(16,`span`,51),J(17),z(),R(18,`time`,54),J(19),z()()()}if(e&2){let e,n=t.$implicit,r=G(4);j(),q(`selected`,r.selected()?.id===n.id),M(`aria-pressed`,r.selected()?.id===n.id)(`tabindex`,r.tabStop()===n.id?0:-1),j(2),Z(``,n.plugin,`.`,n.method,`()`),j(),M(`data-tone`,r.tone(n)),j(2),P((e=r.tone(n))===`ok`?6:e===`danger`?7:e===`warn`?8:9),j(4),X(` `,r.statusLabel(n),` `),j(),P(n.kind===`callback`?11:-1),j(3),K(`width`,r.barWidth(n),`%`),j(),X(` `,r.durationText(n),` `),j(2),Y(n.via),j(2),Y(r.time(n.startedAt))}}function WX(e,t){if(e&1){let e=U();R(0,`app-capacitor-call-detail`,59),W(`announce`,function(t){return D(e),O(G(4).announce(t))}),z()}if(e&2){let e=G(4);L(`call`,t)(`now`,e.now())}}function GX(e,t){if(e&1){let e=U();R(0,`div`,42)(1,`ol`,44),W(`keydown`,function(t){return D(e),O(G(3).onListKey(t))}),F(2,UX,20,15,`li`,null,TX),z(),N(4,WX,1,2,`app-capacitor-call-detail`,45),z()}if(e&2){let e,t=G(3);j(2),I(t.shownCalls()),j(2),P((e=t.selected())?4:-1,e)}}function KX(e,t){if(e&1){let e=U();N(0,FX,6,1,`p`,15),R(1,`div`,33)(2,`div`,34),k(),R(3,`svg`,35),B(4,`circle`,36)(5,`path`,37),z(),hs(),R(6,`input`,38,0),W(`input`,function(t){return D(e),O(G(2).setSearch(t.target.value))})(`keydown.escape`,function(){return D(e),O(G(2).setSearch(``))}),z()(),R(8,`app-select`,39),W(`valueChange`,function(t){return D(e),O(G(2).setFilter(t))}),z(),R(9,`span`,40),J(10),z()(),B(11,`app-limit-note`,41),N(12,IX,2,0,`p`,18)(13,LX,7,3,`div`,18)(14,GX,5,1,`div`,42)}if(e&2){let e=G(),t=G();P(e.info.webCalls?-1:0),j(6),L(`value`,t.filter()),j(2),L(`options`,t.filterOptions)(`value`,t.callFilter()),j(2),Z(``,t.shownCalls().length,` of `,e.calls.length,` calls`),j(),L(`dropped`,e.dropped)(`max`,t.maxCalls()),j(),P(e.calls.length?t.shownCalls().length?14:13:12)}}function qX(e,t){e&1&&(R(0,`p`,18),J(1,`No plugins are registered or installed.`),z())}function JX(e,t){if(e&1&&(R(0,`code`),J(1),z()),e&2){let e=G();j(),Y(e.command)}}function YX(e,t){if(e&1){let e=U();R(0,`button`,65),W(`click`,function(){D(e);let t=G();return O(G(4).copyCommand(t.command))}),J(1,` Copy `),z()}e&2&&M(`aria-label`,`Copy `+G().command)}function XX(e,t){if(e&1&&(R(0,`span`,63),J(1),N(2,JX,2,1,`code`),J(3),z(),N(4,YX,2,1,`button`,64)),e&2){let e=t;j(),Y(e.before),j(),P(e.command?2:-1),j(),Y(e.after),j(),P(e.command?4:-1)}}function ZX(e,t){if(e&1&&(R(0,`tr`)(1,`th`,61)(2,`code`),J(3),z()(),R(4,`td`),J(5),z(),R(6,`td`),J(7),z(),R(8,`td`),J(9),z(),R(10,`td`,62),N(11,XX,5,4),z()()),e&2){let e,n=t.$implicit,r=G(2),i=G();j(3),Y(n.name),j(2),Y(n.available?`Yes`:`No`),j(2),Y(i.yesNo(n.registered)),j(2),Y(n.native?`Yes`:`No`),j(2),P((e=i.pluginHint(n,r.info.platform))?11:-1,e)}}function QX(e,t){if(e&1&&(R(0,`div`,19)(1,`table`)(2,`thead`)(3,`tr`)(4,`th`,60),J(5,`Plugin`),z(),R(6,`th`,60),J(7,`Available`),z(),R(8,`th`,60),J(9,`Imported`),z(),R(10,`th`,60),J(11,`Native`),z(),R(12,`th`,60),J(13,`Note`),z()()(),R(14,`tbody`),F(15,ZX,12,5,`tr`,null,EX),z()()()),e&2){let e=G();j(15),I(e.info.plugins)}}function $X(e,t){e&1&&(R(0,`p`,18),J(1,`No plugin listeners. They show up when the app calls addListener.`),z())}function eZ(e,t){if(e&1&&(R(0,`code`,68),J(1),z()),e&2){let e=G(2).$implicit,t=G(3);j(),Y(t.preview(e.last))}}function tZ(e,t){e&1&&(R(0,`span`,68),J(1,`No data`),z())}function nZ(e,t){if(e&1&&(N(0,eZ,2,1,`code`,68)(1,tZ,2,0,`span`,68),R(2,`span`,43),J(3),z()),e&2){let e=G().$implicit,t=G(3);P(+(e.last===void 0)),j(3),X(`at `,t.time(e.lastEventAt))}}function rZ(e,t){e&1&&J(0,` None yet `)}function iZ(e,t){if(e&1&&(R(0,`span`,67),k(),R(1,`svg`,49),B(2,`path`,69)(3,`path`,70),z(),J(4),z()),e&2){let e=G().$implicit,t=G(3);j(4),X(` `,t.leakCount(e),` active listeners: possible leak `)}}function aZ(e,t){if(e&1&&(R(0,`tr`)(1,`th`,61)(2,`code`),J(3),z()(),R(4,`td`)(5,`code`),J(6),z()(),R(7,`td`),J(8),z(),R(9,`td`,66),N(10,nZ,4,2)(11,rZ,1,0),z(),R(12,`td`),J(13),N(14,iZ,5,1,`span`,67),z()()),e&2){let e=t.$implicit,n=G(3);j(3),Y(e.plugin),j(3),Y(e.event),j(2),Y(e.events),j(2),P(e.lastEventAt?10:11),j(3),X(` `,e.removed?`Removed`:`Active`,` `),j(),P(!e.removed&&n.leakCount(e)>1?14:-1)}}function oZ(e,t){if(e&1&&(R(0,`div`,22)(1,`table`)(2,`thead`)(3,`tr`)(4,`th`,60),J(5,`Plugin`),z(),R(6,`th`,60),J(7,`Event`),z(),R(8,`th`,60),J(9,`Events`),z(),R(10,`th`,60),J(11,`Last event`),z(),R(12,`th`,60),J(13,`State`),z()()(),R(14,`tbody`),F(15,aZ,15,6,`tr`,null,TX),z()()()),e&2){let e=G();j(15),I(e.listeners)}}function sZ(e,t){if(e&1&&(R(0,`p`,4),J(1,` Plugin calls, plugins and listeners of a Capacitor app, as its WebView reports them. Values are masked like other live data. `),z(),R(2,`div`,5),N(3,jX,21,5),R(4,`span`,6),J(5),z()(),R(6,`section`,7)(7,`div`,8)(8,`h2`,9),J(9,`Environment`),z(),N(10,MX,4,2,`div`,10),z(),R(11,`dl`)(12,`div`)(13,`dt`),J(14,`Platform`),z(),R(15,`dd`)(16,`code`),J(17),z(),J(18),z()(),R(19,`div`)(20,`dt`),J(21,`Server URL`),z(),R(22,`dd`)(23,`code`),J(24),z()()(),R(25,`div`)(26,`dt`),J(27,`CapacitorHttp`),z(),R(28,`dd`),J(29),z()(),R(30,`div`)(31,`dt`),J(32,`Calls logged`),z(),R(33,`dd`),J(34),z()(),R(35,`div`,11)(36,`dt`),J(37,`User agent`),z(),R(38,`dd`)(39,`code`),J(40),z()()()()(),N(41,NX,4,2,`section`,12),R(42,`section`,13)(43,`h2`,14),J(44,`Plugin calls`),z(),N(45,PX,12,1,`p`,15)(46,KX,15,9),z(),R(47,`section`,16)(48,`h2`,17),J(49,`Plugins`),z(),N(50,qX,2,0,`p`,18)(51,QX,17,0,`div`,19),z(),R(52,`section`,20)(53,`h2`,21),J(54,`Listeners`),z(),N(55,$X,2,0,`p`,18)(56,oZ,17,0,`div`,22),z()),e&2){let e,n=t,r=G();j(3),P((e=r.summary())?3:-1,e),j(2),Y(r.message()),j(5),P(r.pageOptions().length>1?10:-1),j(7),Y(n.info.platform),j(),X(` (`,n.info.native?`native`:`web`,`) `),j(6),Y(n.info.env.serverUrl||`none`),j(5),X(` `,n.info.env.capacitorHttp===null?`Unknown`:n.info.env.capacitorHttp?`On`:`Off`,` `),j(5),Y(r.loggedLabel()),j(6),Y(n.info.env.userAgent||`unknown`),j(),P(r.stateCards().length?41:-1),j(4),P(!n.info.bridge&&!n.info.webCalls?45:46),j(5),P(n.info.plugins.length?51:50),j(5),P(n.listeners.length?56:55)}}function cZ(e,t){e&1&&(R(0,`p`,1),J(1,` No Capacitor app reports to this server. Start the overlay in the app, then use it. `),z())}var lZ=`https://pangular-inspector.dev/inspectors/capacitor/#web-calls`,uZ=2e3,dZ={all:`All calls`,failed:`Failed`,slow:`Slow (500 ms or more)`,pending:`Pending`},fZ=class e{rpc=$(null);destroyRef=T(Ts);host=T(Pl);injector=T(Cs);seen=new Map;hostPageId=fE();unsubscribe;time=tO;preview=JY;pluginHint=VY;guideUrl=lZ;yesNo=AY;filterOptions=Object.keys(dZ).map(e=>({value:e,label:dZ[e]}));pages=A([]);loaded=A(!1);failed=A(!1);selectedPageId=Fv({source:()=>this.pages(),computation:(e,t)=>t?.value&&e.some(e=>e.pageId===t.value)?t.value:MY(e,this.hostPageId)});selectedCallId=A(null);focusedCallId=A(null);filter=A(``);callFilter=A(`all`);now=A(Date.now());message=A(``);page=Q(()=>{let e=this.selectedPageId();return this.pages().find(t=>t.pageId===e)??null});pageOptions=Q(()=>this.pages().map(e=>({value:e.pageId,label:e.title||e.url||e.pageId,hint:e.info.platform})));maxCalls=Q(()=>jE(this.rpc()).limits.capacitorCalls);loggedLabel=Q(()=>{let e=this.page()?.info;return e?e.bridge&&e.webCalls?`Native and web`:e.bridge?`Native only`:e.webCalls?`Web only`:`None on this platform`:``});shownCalls=Q(()=>{let e=this.page();if(!e)return[];let t=this.filter().trim().toLowerCase(),n=this.callFilter(),r=n===`slow`?this.now():0;return[...e.calls].filter(e=>RY(e,n,r)).filter(e=>!t||`${e.plugin}.${e.method}`.toLowerCase().includes(t)).sort((e,t)=>t.startedAt-e.startedAt)});selected=Q(()=>this.shownCalls().find(e=>e.id===this.selectedCallId())??null);tabStop=Q(()=>{let e=this.shownCalls();for(let t of[this.focusedCallId(),this.selectedCallId()])if(t!==null&&e.some(e=>e.id===t))return t;return e[0]?.id??null});slowest=Q(()=>{let e=this.now();return Math.max(1,...this.shownCalls().map(t=>LY(t,e)))});hiddenBy=Q(()=>{let e=[],t=this.filter().trim();return t&&e.push(`the search “${t}”`),this.callFilter()!==`all`&&e.push(`the ${dZ[this.callFilter()]} filter`),e.join(` and `)});stateCards=Q(()=>{let e=this.page();return e?SX(e):[]});leaks=Q(()=>UY(this.page()?.listeners??[]));liveSummary=Q(()=>{let e=this.page();return e?HY(e,this.now()):null});summary=A(null);summaryShownAt=0;summaryTimer;messageFlip=!1;constructor(){fc(()=>{let e=this.rpc();e&&this.load(e)}),fc(()=>{let e=this.liveSummary();Nv(()=>this.queueSummary(e))});let e=setInterval(()=>this.now.set(Date.now()),1e3);this.destroyRef.onDestroy(()=>{clearInterval(e),clearTimeout(this.summaryTimer),this.unsubscribe?.()})}retry(){let e=this.rpc();e&&this.load(e)}callStats(e){return[{filter:`all`,label:`Calls`,count:e.calls},{filter:`failed`,label:`Failed`,count:e.failed},{filter:`slow`,label:`Slow, 500 ms+`,count:e.slow},{filter:`pending`,label:`Pending`,count:e.pending}]}select(e){this.selectedCallId.set(e),Bd(()=>{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`:IY(e)?`warn`:`danger`}statusLabel(e){return e.status===`pending`?`Pending`:e.status===`ok`?`OK`:IY(e)?`Not implemented`:`Error`}durationText(e){return e.status===`pending`?`waiting ${zY(LY(e,this.now()))}`:e.durationMs===void 0?``:`${Math.round(e.durationMs)} ms`}barWidth(e){return Math.min(100,LY(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+uZ-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(jY(FY(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=Gh({type:e,selectors:[[`app-capacitor-inspector`]],inputs:{rpc:[1,`rpc`]},decls:4,vars:1,consts:[[`search`,``],[`role`,`status`,1,`state`],[`role`,`alert`,1,`state`],[`type`,`button`,1,`small`,3,`click`],[1,`intro`],[`role`,`status`,`aria-label`,`Capacitor summary`,`aria-atomic`,`false`,1,`strip`],[1,`sr-only`],[`aria-labelledby`,`cap-env-title`,1,`env`],[1,`env-head`],[`id`,`cap-env-title`],[1,`page-picker`],[1,`wide`],[`aria-labelledby`,`cap-state-title`],[`aria-labelledby`,`cap-calls-title`],[`id`,`cap-calls-title`],[1,`notice`],[`aria-labelledby`,`cap-plugins-title`],[`id`,`cap-plugins-title`],[1,`empty`],[`tabindex`,`0`,`role`,`group`,`aria-label`,`Plugins table`,1,`table-wrap`],[`aria-labelledby`,`cap-listeners-title`],[`id`,`cap-listeners-title`],[`tabindex`,`0`,`role`,`group`,`aria-label`,`Listeners table`,1,`table-wrap`],[`aria-atomic`,`true`,1,`stat`],[1,`stat-label`],[1,`stat-value`],[`type`,`button`,`aria-atomic`,`true`,1,`stat`],[`type`,`button`,`aria-atomic`,`true`,1,`stat`,3,`click`],[`id`,`cap-page-label`,1,`label-key`],[`labelledBy`,`cap-page-label`,3,`valueChange`,`options`,`value`],[`id`,`cap-state-title`],[3,`cards`,`now`],[`target`,`_blank`,`rel`,`noopener noreferrer`,3,`href`],[1,`toolbar`],[1,`search`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`,1,`search-icon`],[`cx`,`11`,`cy`,`11`,`r`,`7`],[`d`,`m20 20-3.5-3.5`],[`type`,`search`,`aria-label`,`Filter calls by plugin or method`,`placeholder`,`Filter by plugin or method`,3,`input`,`keydown.escape`,`value`],[`ariaLabel`,`Show calls`,1,`show`,3,`valueChange`,`options`,`value`],[1,`count`],[`what`,`plugin calls`,`limit`,`capacitorCalls`,3,`dropped`,`max`],[1,`split`],[1,`muted`],[`aria-label`,`Plugin calls, newest first`,1,`calls`,3,`keydown`],[3,`call`,`now`],[`type`,`button`,`data-cap-call`,``,1,`call`,3,`focus`,`click`],[1,`name`],[1,`chip`,`status`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`],[`d`,`M20 6 9 17l-5-5`],[1,`chip`,`via`],[1,`duration`],[`aria-hidden`,`true`,1,`bar`],[1,`when`],[`cx`,`12`,`cy`,`12`,`r`,`9`],[`d`,`m15 9-6 6M9 9l6 6`],[`d`,`M5.6 5.6l12.8 12.8`],[`d`,`M12 7v5l3 2`],[3,`announce`,`call`,`now`],[`scope`,`col`],[`scope`,`row`],[1,`note`],[1,`hint`],[`type`,`button`,1,`copy`],[`type`,`button`,1,`copy`,3,`click`],[1,`last`],[`data-tone`,`warn`,1,`chip`,`leak`],[1,`payload`],[`d`,`M12 3 2 21h20z`],[`d`,`M12 10v4M12 17.5v.01`]],template:function(e,t){if(e&1&&N(0,DX,2,0,`p`,1)(1,OX,5,0,`div`,2)(2,sZ,57,13)(3,cZ,2,0,`p`,1),e&2){let e;P(t.loaded()?t.failed()?1:(e=t.page())?2:3:0,e)}},dependencies:[oO,qD,uX,CX],styles:[`[_nghost-%COMP%] { +}`]})},DX=(e,t)=>t.filter,OX=(e,t)=>t.id,kX=(e,t)=>t.name;function AX(e,t){e&1&&(R(0,`p`,1),J(1,`Loading Capacitor data…`),z())}function jX(e,t){if(e&1){let e=U();R(0,`div`,2)(1,`p`),J(2,`Can't read the Capacitor data from the devtools server.`),z(),R(3,`button`,3),W(`click`,function(){return D(e),O(G().retry())}),J(4,`Retry`),z()()}}function MX(e,t){if(e&1){let e=U();R(0,`button`,27),W(`click`,function(){let t=D(e).$implicit;return O(G(4).pickFilter(t.filter))}),R(1,`span`,24),J(2),z(),J(3,` `),R(4,`span`,25),J(5),z()()}if(e&2){let e=t.$implicit,n=G(4);M(`data-filter`,e.filter)(`aria-pressed`,n.callFilter()===e.filter),j(2),Y(e.label),j(3),Y(e.count)}}function NX(e,t){if(e&1&&F(0,MX,6,4,`button`,26,DX),e&2){let e=G();I(G(2).callStats(e))}}function PX(e,t){if(e&1&&(R(0,`span`,23)(1,`span`,24),J(2,`Platform`),z(),J(3,` `),R(4,`span`,25)(5,`code`),J(6),z(),J(7),z()(),N(8,NX,2,0),R(9,`span`,23)(10,`span`,24),J(11,`CapacitorHttp`),z(),J(12,` `),R(13,`span`,25),J(14),z()(),R(15,`span`,23)(16,`span`,24),J(17,`Plugin hints`),z(),J(18,` `),R(19,`span`,25),J(20),z()()),e&2){let e=t;j(6),Y(e.platform),j(),X(` `,e.native?`native`:`web`),j(),P(e.logsCalls?8:-1),j(6),Y(e.capacitorHttp),j(6),Y(e.hints)}}function FX(e,t){if(e&1){let e=U();R(0,`div`,10)(1,`span`,28),J(2,`Page`),z(),R(3,`app-select`,29),W(`valueChange`,function(t){return D(e),O(G(2).selectedPageId.set(t))}),z()()}if(e&2){let e=G(),t=G();j(3),L(`options`,t.pageOptions())(`value`,e.pageId)}}function IX(e,t){if(e&1&&(R(0,`section`,12)(1,`h2`,30),J(2,`Plugin state`),z(),B(3,`app-capacitor-state`,31),z()),e&2){let e=G(2);j(3),L(`cards`,e.stateCards())(`now`,e.now())}}function LX(e,t){if(e&1&&(R(0,`p`,15),J(1,` Plugin calls aren't shown on this page. Native calls are logged on iOS and Android, where plugins go through the native bridge. To log calls a web implementation answers, load `),R(2,`code`),J(3,`@pangular-inspector/devtools/capacitor-hook`),z(),J(4,` before `),R(5,`code`),J(6,`@capacitor/core`),z(),J(7,`. `),R(8,`a`,32),J(9,`How to log web calls`),R(10,`span`,6),J(11,` (opens in a new tab)`),z()()()),e&2){let e=G(2);j(8),L(`href`,e.guideUrl,ju)}}function RX(e,t){if(e&1&&(R(0,`p`,15),J(1,` Only native calls are logged. Calls a web implementation answers are left out. `),R(2,`a`,32),J(3,`How to log them too`),R(4,`span`,6),J(5,` (opens in a new tab)`),z()()()),e&2){let e=G(3);j(2),L(`href`,e.guideUrl,ju)}}function zX(e,t){e&1&&(R(0,`p`,18),J(1,`No plugin calls yet. Use the app and they show up here.`),z())}function BX(e,t){if(e&1){let e=U();R(0,`div`,18)(1,`p`),J(2,`No call matches the filters.`),z(),R(3,`p`,43),J(4),z(),R(5,`button`,3),W(`click`,function(){D(e),G();let t=d_(7);return G(2).clearFilters(),O(t.focus())}),J(6,` Clear filters `),z()()}if(e&2){let e=G(2),t=G();j(4),rv(` `,e.calls.length,` `,e.calls.length===1?`call is`:`calls are`,` hidden by `,t.hiddenBy(),`. `)}}function VX(e,t){e&1&&(k(),B(0,`path`,50))}function HX(e,t){e&1&&(k(),B(0,`circle`,55)(1,`path`,56))}function UX(e,t){e&1&&(k(),B(0,`circle`,55)(1,`path`,57))}function WX(e,t){e&1&&(k(),B(0,`circle`,55)(1,`path`,58))}function GX(e,t){e&1&&(R(0,`span`,51),J(1,`stream`),z())}function KX(e,t){if(e&1){let e=U();R(0,`li`)(1,`button`,46),W(`focus`,function(){let t=D(e).$implicit;return O(G(4).focusedCallId.set(t.id))})(`click`,function(){let t=D(e).$implicit;return O(G(4).select(t.id))}),R(2,`code`,47),J(3),z(),R(4,`span`,48),k(),R(5,`svg`,49),N(6,VX,1,0,`:svg:path`,50)(7,HX,2,0)(8,UX,2,0)(9,WX,2,0),z(),J(10),z(),N(11,GX,2,0,`span`,51),hs(),R(12,`span`,52)(13,`span`,53),B(14,`span`),z(),J(15),z(),R(16,`span`,51),J(17),z(),R(18,`time`,54),J(19),z()()()}if(e&2){let e,n=t.$implicit,r=G(4);j(),q(`selected`,r.selected()?.id===n.id),M(`aria-pressed`,r.selected()?.id===n.id)(`tabindex`,r.tabStop()===n.id?0:-1),j(2),Z(``,n.plugin,`.`,n.method,`()`),j(),M(`data-tone`,r.tone(n)),j(2),P((e=r.tone(n))===`ok`?6:e===`danger`?7:e===`warn`?8:9),j(4),X(` `,r.statusLabel(n),` `),j(),P(n.kind===`callback`?11:-1),j(3),K(`width`,r.barWidth(n),`%`),j(),X(` `,r.durationText(n),` `),j(2),Y(n.via),j(2),Y(r.time(n.startedAt))}}function qX(e,t){if(e&1){let e=U();R(0,`app-capacitor-call-detail`,59),W(`announce`,function(t){return D(e),O(G(4).announce(t))}),z()}if(e&2){let e=G(4);L(`call`,t)(`now`,e.now())}}function JX(e,t){if(e&1){let e=U();R(0,`div`,42)(1,`ol`,44),W(`keydown`,function(t){return D(e),O(G(3).onListKey(t))}),F(2,KX,20,15,`li`,null,OX),z(),N(4,qX,1,2,`app-capacitor-call-detail`,45),z()}if(e&2){let e,t=G(3);j(2),I(t.shownCalls()),j(2),P((e=t.selected())?4:-1,e)}}function YX(e,t){if(e&1){let e=U();N(0,RX,6,1,`p`,15),R(1,`div`,33)(2,`div`,34),k(),R(3,`svg`,35),B(4,`circle`,36)(5,`path`,37),z(),hs(),R(6,`input`,38,0),W(`input`,function(t){return D(e),O(G(2).setSearch(t.target.value))})(`keydown.escape`,function(){return D(e),O(G(2).setSearch(``))}),z()(),R(8,`app-select`,39),W(`valueChange`,function(t){return D(e),O(G(2).setFilter(t))}),z(),R(9,`span`,40),J(10),z()(),B(11,`app-limit-note`,41),N(12,zX,2,0,`p`,18)(13,BX,7,3,`div`,18)(14,JX,5,1,`div`,42)}if(e&2){let e=G(),t=G();P(e.info.webCalls?-1:0),j(6),L(`value`,t.filter()),j(2),L(`options`,t.filterOptions)(`value`,t.callFilter()),j(2),Z(``,t.shownCalls().length,` of `,e.calls.length,` calls`),j(),L(`dropped`,e.dropped)(`max`,t.maxCalls()),j(),P(e.calls.length?t.shownCalls().length?14:13:12)}}function XX(e,t){e&1&&(R(0,`p`,18),J(1,`No plugins are registered or installed.`),z())}function ZX(e,t){if(e&1&&(R(0,`code`),J(1),z()),e&2){let e=G();j(),Y(e.command)}}function QX(e,t){if(e&1){let e=U();R(0,`button`,65),W(`click`,function(){D(e);let t=G();return O(G(4).copyCommand(t.command))}),J(1,` Copy `),z()}e&2&&M(`aria-label`,`Copy `+G().command)}function $X(e,t){if(e&1&&(R(0,`span`,63),J(1),N(2,ZX,2,1,`code`),J(3),z(),N(4,QX,2,1,`button`,64)),e&2){let e=t;j(),Y(e.before),j(),P(e.command?2:-1),j(),Y(e.after),j(),P(e.command?4:-1)}}function eZ(e,t){if(e&1&&(R(0,`tr`)(1,`th`,61)(2,`code`),J(3),z()(),R(4,`td`),J(5),z(),R(6,`td`),J(7),z(),R(8,`td`),J(9),z(),R(10,`td`,62),N(11,$X,5,4),z()()),e&2){let e,n=t.$implicit,r=G(2),i=G();j(3),Y(n.name),j(2),Y(n.available?`Yes`:`No`),j(2),Y(i.yesNo(n.registered)),j(2),Y(n.native?`Yes`:`No`),j(2),P((e=i.pluginHint(n,r.info.platform))?11:-1,e)}}function tZ(e,t){if(e&1&&(R(0,`div`,19)(1,`table`)(2,`thead`)(3,`tr`)(4,`th`,60),J(5,`Plugin`),z(),R(6,`th`,60),J(7,`Available`),z(),R(8,`th`,60),J(9,`Imported`),z(),R(10,`th`,60),J(11,`Native`),z(),R(12,`th`,60),J(13,`Note`),z()()(),R(14,`tbody`),F(15,eZ,12,5,`tr`,null,kX),z()()()),e&2){let e=G();j(15),I(e.info.plugins)}}function nZ(e,t){e&1&&(R(0,`p`,18),J(1,`No plugin listeners. They show up when the app calls addListener.`),z())}function rZ(e,t){if(e&1&&(R(0,`code`,68),J(1),z()),e&2){let e=G(2).$implicit,t=G(3);j(),Y(t.preview(e.last))}}function iZ(e,t){e&1&&(R(0,`span`,68),J(1,`No data`),z())}function aZ(e,t){if(e&1&&(N(0,rZ,2,1,`code`,68)(1,iZ,2,0,`span`,68),R(2,`span`,43),J(3),z()),e&2){let e=G().$implicit,t=G(3);P(+(e.last===void 0)),j(3),X(`at `,t.time(e.lastEventAt))}}function oZ(e,t){e&1&&J(0,` None yet `)}function sZ(e,t){if(e&1&&(R(0,`span`,67),k(),R(1,`svg`,49),B(2,`path`,69)(3,`path`,70),z(),J(4),z()),e&2){let e=G().$implicit,t=G(3);j(4),X(` `,t.leakCount(e),` active listeners: possible leak `)}}function cZ(e,t){if(e&1&&(R(0,`tr`)(1,`th`,61)(2,`code`),J(3),z()(),R(4,`td`)(5,`code`),J(6),z()(),R(7,`td`),J(8),z(),R(9,`td`,66),N(10,aZ,4,2)(11,oZ,1,0),z(),R(12,`td`),J(13),N(14,sZ,5,1,`span`,67),z()()),e&2){let e=t.$implicit,n=G(3);j(3),Y(e.plugin),j(3),Y(e.event),j(2),Y(e.events),j(2),P(e.lastEventAt?10:11),j(3),X(` `,e.removed?`Removed`:`Active`,` `),j(),P(!e.removed&&n.leakCount(e)>1?14:-1)}}function lZ(e,t){if(e&1&&(R(0,`div`,22)(1,`table`)(2,`thead`)(3,`tr`)(4,`th`,60),J(5,`Plugin`),z(),R(6,`th`,60),J(7,`Event`),z(),R(8,`th`,60),J(9,`Events`),z(),R(10,`th`,60),J(11,`Last event`),z(),R(12,`th`,60),J(13,`State`),z()()(),R(14,`tbody`),F(15,cZ,15,6,`tr`,null,OX),z()()()),e&2){let e=G();j(15),I(e.listeners)}}function uZ(e,t){if(e&1&&(R(0,`p`,4),J(1,` Plugin calls, plugins and listeners of a Capacitor app, as its WebView reports them. Values are masked like other live data. `),z(),R(2,`div`,5),N(3,PX,21,5),R(4,`span`,6),J(5),z()(),R(6,`section`,7)(7,`div`,8)(8,`h2`,9),J(9,`Environment`),z(),N(10,FX,4,2,`div`,10),z(),R(11,`dl`)(12,`div`)(13,`dt`),J(14,`Platform`),z(),R(15,`dd`)(16,`code`),J(17),z(),J(18),z()(),R(19,`div`)(20,`dt`),J(21,`Server URL`),z(),R(22,`dd`)(23,`code`),J(24),z()()(),R(25,`div`)(26,`dt`),J(27,`CapacitorHttp`),z(),R(28,`dd`),J(29),z()(),R(30,`div`)(31,`dt`),J(32,`Calls logged`),z(),R(33,`dd`),J(34),z()(),R(35,`div`,11)(36,`dt`),J(37,`User agent`),z(),R(38,`dd`)(39,`code`),J(40),z()()()()(),N(41,IX,4,2,`section`,12),R(42,`section`,13)(43,`h2`,14),J(44,`Plugin calls`),z(),N(45,LX,12,1,`p`,15)(46,YX,15,9),z(),R(47,`section`,16)(48,`h2`,17),J(49,`Plugins`),z(),N(50,XX,2,0,`p`,18)(51,tZ,17,0,`div`,19),z(),R(52,`section`,20)(53,`h2`,21),J(54,`Listeners`),z(),N(55,nZ,2,0,`p`,18)(56,lZ,17,0,`div`,22),z()),e&2){let e,n=t,r=G();j(3),P((e=r.summary())?3:-1,e),j(2),Y(r.message()),j(5),P(r.pageOptions().length>1?10:-1),j(7),Y(n.info.platform),j(),X(` (`,n.info.native?`native`:`web`,`) `),j(6),Y(n.info.env.serverUrl||`none`),j(5),X(` `,n.info.env.capacitorHttp===null?`Unknown`:n.info.env.capacitorHttp?`On`:`Off`,` `),j(5),Y(r.loggedLabel()),j(6),Y(n.info.env.userAgent||`unknown`),j(),P(r.stateCards().length?41:-1),j(4),P(!n.info.bridge&&!n.info.webCalls?45:46),j(5),P(n.info.plugins.length?51:50),j(5),P(n.listeners.length?56:55)}}function dZ(e,t){e&1&&(R(0,`p`,1),J(1,` No Capacitor app reports to this server. Start the overlay in the app, then use it. `),z())}var fZ=`https://pangular-inspector.dev/inspectors/capacitor/#web-calls`,pZ=2e3,mZ={all:`All calls`,failed:`Failed`,slow:`Slow (500 ms or more)`,pending:`Pending`},hZ=class e{rpc=$(null);destroyRef=T(Ts);host=T(Pl);injector=T(Cs);seen=new Map;hostPageId=fE();unsubscribe;time=tO;preview=ZY;pluginHint=WY;guideUrl=fZ;yesNo=NY;filterOptions=Object.keys(mZ).map(e=>({value:e,label:mZ[e]}));pages=A([]);loaded=A(!1);failed=A(!1);selectedPageId=Fv({source:()=>this.pages(),computation:(e,t)=>t?.value&&e.some(e=>e.pageId===t.value)?t.value:FY(e,this.hostPageId)});selectedCallId=A(null);focusedCallId=A(null);filter=A(``);callFilter=A(`all`);now=A(Date.now());message=A(``);page=Q(()=>{let e=this.selectedPageId();return this.pages().find(t=>t.pageId===e)??null});pageOptions=Q(()=>this.pages().map(e=>({value:e.pageId,label:e.title||e.url||e.pageId,hint:e.info.platform})));maxCalls=Q(()=>jE(this.rpc()).limits.capacitorCalls);loggedLabel=Q(()=>{let e=this.page()?.info;return e?e.bridge&&e.webCalls?`Native and web`:e.bridge?`Native only`:e.webCalls?`Web only`:`None on this platform`:``});shownCalls=Q(()=>{let e=this.page();if(!e)return[];let t=this.filter().trim().toLowerCase(),n=this.callFilter(),r=n===`slow`?this.now():0;return[...e.calls].filter(e=>VY(e,n,r)).filter(e=>!t||`${e.plugin}.${e.method}`.toLowerCase().includes(t)).sort((e,t)=>t.startedAt-e.startedAt)});selected=Q(()=>this.shownCalls().find(e=>e.id===this.selectedCallId())??null);tabStop=Q(()=>{let e=this.shownCalls();for(let t of[this.focusedCallId(),this.selectedCallId()])if(t!==null&&e.some(e=>e.id===t))return t;return e[0]?.id??null});slowest=Q(()=>{let e=this.now();return Math.max(1,...this.shownCalls().map(t=>BY(t,e)))});hiddenBy=Q(()=>{let e=[],t=this.filter().trim();return t&&e.push(`the search “${t}”`),this.callFilter()!==`all`&&e.push(`the ${mZ[this.callFilter()]} filter`),e.join(` and `)});stateCards=Q(()=>{let e=this.page();return e?TX(e):[]});leaks=Q(()=>KY(this.page()?.listeners??[]));liveSummary=Q(()=>{let e=this.page();return e?GY(e,this.now()):null});summary=A(null);summaryShownAt=0;summaryTimer;messageFlip=!1;constructor(){fc(()=>{let e=this.rpc();e&&this.load(e)}),fc(()=>{let e=this.liveSummary();Nv(()=>this.queueSummary(e))});let e=setInterval(()=>this.now.set(Date.now()),1e3);this.destroyRef.onDestroy(()=>{clearInterval(e),clearTimeout(this.summaryTimer),this.unsubscribe?.()})}retry(){let e=this.rpc();e&&this.load(e)}callStats(e){return[{filter:`all`,label:`Calls`,count:e.calls},{filter:`failed`,label:`Failed`,count:e.failed},{filter:`slow`,label:`Slow, 500 ms+`,count:e.slow},{filter:`pending`,label:`Pending`,count:e.pending}]}select(e){this.selectedCallId.set(e),Bd(()=>{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`:zY(e)?`warn`:`danger`}statusLabel(e){return e.status===`pending`?`Pending`:e.status===`ok`?`OK`:zY(e)?`Not implemented`:`Error`}durationText(e){return e.status===`pending`?`waiting ${HY(BY(e,this.now()))}`:e.durationMs===void 0?``:`${Math.round(e.durationMs)} ms`}barWidth(e){return Math.min(100,BY(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+pZ-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(PY(RY(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=Gh({type:e,selectors:[[`app-capacitor-inspector`]],inputs:{rpc:[1,`rpc`]},decls:4,vars:1,consts:[[`search`,``],[`role`,`status`,1,`state`],[`role`,`alert`,1,`state`],[`type`,`button`,1,`small`,3,`click`],[1,`intro`],[`role`,`status`,`aria-label`,`Capacitor summary`,`aria-atomic`,`false`,1,`strip`],[1,`sr-only`],[`aria-labelledby`,`cap-env-title`,1,`env`],[1,`env-head`],[`id`,`cap-env-title`],[1,`page-picker`],[1,`wide`],[`aria-labelledby`,`cap-state-title`],[`aria-labelledby`,`cap-calls-title`],[`id`,`cap-calls-title`],[1,`notice`],[`aria-labelledby`,`cap-plugins-title`],[`id`,`cap-plugins-title`],[1,`empty`],[`tabindex`,`0`,`role`,`group`,`aria-label`,`Plugins table`,1,`table-wrap`],[`aria-labelledby`,`cap-listeners-title`],[`id`,`cap-listeners-title`],[`tabindex`,`0`,`role`,`group`,`aria-label`,`Listeners table`,1,`table-wrap`],[`aria-atomic`,`true`,1,`stat`],[1,`stat-label`],[1,`stat-value`],[`type`,`button`,`aria-atomic`,`true`,1,`stat`],[`type`,`button`,`aria-atomic`,`true`,1,`stat`,3,`click`],[`id`,`cap-page-label`,1,`label-key`],[`labelledBy`,`cap-page-label`,3,`valueChange`,`options`,`value`],[`id`,`cap-state-title`],[3,`cards`,`now`],[`target`,`_blank`,`rel`,`noopener noreferrer`,3,`href`],[1,`toolbar`],[1,`search`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`,1,`search-icon`],[`cx`,`11`,`cy`,`11`,`r`,`7`],[`d`,`m20 20-3.5-3.5`],[`type`,`search`,`aria-label`,`Filter calls by plugin or method`,`placeholder`,`Filter by plugin or method`,3,`input`,`keydown.escape`,`value`],[`ariaLabel`,`Show calls`,1,`show`,3,`valueChange`,`options`,`value`],[1,`count`],[`what`,`plugin calls`,`limit`,`capacitorCalls`,3,`dropped`,`max`],[1,`split`],[1,`muted`],[`aria-label`,`Plugin calls, newest first`,1,`calls`,3,`keydown`],[3,`call`,`now`],[`type`,`button`,`data-cap-call`,``,1,`call`,3,`focus`,`click`],[1,`name`],[1,`chip`,`status`],[`viewBox`,`0 0 24 24`,`aria-hidden`,`true`],[`d`,`M20 6 9 17l-5-5`],[1,`chip`,`via`],[1,`duration`],[`aria-hidden`,`true`,1,`bar`],[1,`when`],[`cx`,`12`,`cy`,`12`,`r`,`9`],[`d`,`m15 9-6 6M9 9l6 6`],[`d`,`M5.6 5.6l12.8 12.8`],[`d`,`M12 7v5l3 2`],[3,`announce`,`call`,`now`],[`scope`,`col`],[`scope`,`row`],[1,`note`],[1,`hint`],[`type`,`button`,1,`copy`],[`type`,`button`,1,`copy`,3,`click`],[1,`last`],[`data-tone`,`warn`,1,`chip`,`leak`],[1,`payload`],[`d`,`M12 3 2 21h20z`],[`d`,`M12 10v4M12 17.5v.01`]],template:function(e,t){if(e&1&&N(0,AX,2,0,`p`,1)(1,jX,5,0,`div`,2)(2,uZ,57,13)(3,dZ,2,0,`p`,1),e&2){let e;P(t.loaded()?t.failed()?1:(e=t.page())?2:3:0,e)}},dependencies:[oO,qD,pX,EX],styles:[`[_nghost-%COMP%] { display: block; font-size: 13px; } @@ -15040,7 +15064,7 @@ td.last[_ngcontent-%COMP%] { .empty[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .state[_ngcontent-%COMP%] p[_ngcontent-%COMP%] { margin: 0 0 8px; -}`]})};function pZ(e){let t=e===`light`?`#ffffff`:`#0b0b0e`,n=e===`light`?`#92400e`:`#f5a524`;return` +}`]})};function gZ(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; } @@ -15131,7 +15155,7 @@ td.last[_ngcontent-%COMP%] { transition: none; } } -`}var mZ=new Map;function hZ(e,t=`dark`,n=50){let r=e?.querySelector(`devframes-dock-standalone`)?.shadowRoot;if(r){if(e){let t=mZ.get(e);t!==void 0&&(clearTimeout(t),mZ.delete(e))}let n=r.querySelector(`style[data-pangular]`);n||(n=e.createElement(`style`),n.dataset.pangular=``,r.append(n)),n.textContent=pZ(t);return}if(n>0&&e){let r=mZ.get(e);r!==void 0&&clearTimeout(r);let i=setTimeout(()=>{mZ.delete(e),hZ(e,t,n-1)},100);mZ.set(e,i)}}var gZ=class e{current=A(`dark`);constructor(){let e=T(Ts),t=yZ(),n=document.documentElement.dataset.theme,r=n===`light`||n===`dark`;if(n===`light`||n===`dark`)this.current.set(n);else if(t)r=!0,this.apply(vZ(t));else{let t=_Z();if(t){this.current.set(t.matches?`light`:`dark`);let n=e=>{r||this.current.set(e.matches?`light`:`dark`)};t.addEventListener(`change`,n),e.onDestroy(()=>t.removeEventListener(`change`,n))}}let i;try{i=new BroadcastChannel(`pangular:theme`)}catch{}fc(()=>{let e=this.current();try{i?.postMessage(e)}catch{}for(let{win:t,origin:n}of bZ())try{t.postMessage({type:`pangular:theme-change`,theme:e},n)}catch{}});let a=e=>{if(e.source!==window.parent)return;let t=e.data;t?.type===`pangular:theme-change`&&(r=!0,this.apply(t.theme===`dark`?`dark`:`light`))};window.addEventListener(`message`,a);let o;t&&(o=new MutationObserver(()=>this.apply(vZ(t))),o.observe(t,{attributes:!0,attributeFilter:[`class`]})),e.onDestroy(()=>{window.removeEventListener(`message`,a),o?.disconnect(),i?.close()})}apply(e){this.current.set(e),document.documentElement.dataset.theme=e}static ɵfac=function(t){return new(t||e)};static ɵprov=jl({token:e,factory:e.ɵfac})};function _Z(){try{return window.matchMedia?.(`(prefers-color-scheme: light)`)??null}catch{return null}}function vZ(e){return e.classList.contains(`dark`)?`dark`:`light`}function yZ(){try{return window.frameElement?.closest(`.devframes-color-root`)??null}catch{return null}}function bZ(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=xZ(e,r,i,n);a&&t.push({win:r,origin:a})}}catch{}return t}function xZ(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 SZ=`__DEVFRAME_HUB_CLIENT_CONTEXT__`;function CZ(){try{return window.parent===window?void 0:window.parent[SZ]}catch{return}}function wZ(e,t,n=50){let r=CZ();if(!r){if(n<=0||window.parent===window)return()=>{};let r=()=>{},i=setTimeout(()=>r=wZ(e,t,n-1),100);return()=>{clearTimeout(i),r()}}let i=e.map(e=>r.docks.getStateById(HT(e))?.events.on(`entry:activated`,()=>t(e))??(()=>{})),a=r.docks.selectedId,o=e.find(e=>HT(e)===a);return o&&t(o),()=>i.forEach(e=>e())}function TZ(){return!!CZ()}async function EZ(e){let t=CZ();if(!t)return!1;try{return await t.docks.switchEntry(HT(e))}catch{return!1}}function DZ(e,t){let n=new URL(e);return n.searchParams.delete(`view`),n.hash=t?`tab=${t}`:``,n.pathname+n.search+n.hash}function OZ(e){return e.button===0&&!e.metaKey&&!e.ctrlKey&&!e.shiftKey&&!e.altKey}var kZ=`pangular-tab`;function AZ(e,t,n){let r=new URLSearchParams(e.replace(/^#/,``)).get(`tab`)||t;return n.find(e=>e===r)}function jZ(e){try{return sessionStorage.getItem(`${kZ}:${e}`)}catch{return null}}function MZ(e,t){try{sessionStorage.setItem(`${kZ}:${e}`,t)}catch{}}function NZ(e,t){try{return new URL(e,t.href).origin===t.origin}catch{return!1}}function PZ(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 FZ(e=location){let t=new URLSearchParams(e.search).get(`baseURL`);if(t&&(NZ(t,e)||PZ(t,e)))return t;if(!(e.pathname.includes(`__pangular`)||e.pathname.includes(`__devframes/`)))return[`/__pangular/`,`./`]}var IZ={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 LZ(e,t){let n=IZ[t];return e&&n[e]||null}var RZ=[`nav`],zZ=[`main`],BZ=e=>[e],VZ=(e,t)=>t.id;function HZ(e,t){e&1&&(k(),R(0,`svg`,4),B(1,`path`,22),z())}function UZ(e,t){e&1&&(k(),R(0,`svg`,4),B(1,`path`,23)(2,`path`,24)(3,`path`,25)(4,`path`,26)(5,`path`,27)(6,`path`,28),z())}function WZ(e,t){e&1&&(k(),R(0,`svg`,5)(1,`defs`)(2,`linearGradient`,29),B(3,`stop`,30)(4,`stop`,31),z()(),B(5,`path`,32),R(6,`g`,33),B(7,`path`,34)(8,`path`,35)(9,`path`,36)(10,`path`,37),z()())}function GZ(e,t){e&1&&(k(),R(0,`svg`,6),B(1,`path`,38)(2,`path`,39)(3,`path`,40)(4,`path`,41),z())}function KZ(e,t){e&1&&(k(),R(0,`svg`,7),B(1,`path`,42),z())}function qZ(e,t){e&1&&(k(),R(0,`svg`,8)(1,`defs`)(2,`linearGradient`,43),B(3,`stop`,44)(4,`stop`,45)(5,`stop`,46)(6,`stop`,47)(7,`stop`,48)(8,`stop`,49),z()(),B(9,`path`,50),z())}function JZ(e,t){e&1&&(k(),R(0,`svg`,9),B(1,`rect`,51),R(2,`g`,52)(3,`defs`)(4,`mask`,53),B(5,`rect`,54),R(6,`g`,55),B(7,`path`,56)(8,`path`,57),z()(),R(9,`clipPath`,58),B(10,`rect`,59),z()(),R(11,`g`,60),B(12,`ellipse`,61),z(),R(13,`g`,62),B(14,`path`,63)(15,`path`,64),z(),R(16,`g`,60),B(17,`ellipse`,65)(18,`ellipse`,66),R(19,`g`,67),B(20,`line`,68)(21,`circle`,69)(22,`line`,70)(23,`circle`,71),z()()()())}function YZ(e,t){if(e&1){let e=U();R(0,`button`,73),W(`click`,function(){let t=D(e).$implicit;return O(G(2).switchTab(t.id))}),B(1,`app-tab-icon`,74),R(2,`span`),J(3),z()()}if(e&2){let e=t.$implicit,n=G(2);q(`active`,n.tab()===e.id),M(`aria-current`,n.tab()===e.id?`page`:null)(`tabindex`,n.rovingTab()===e.id?0:-1),j(),L(`name`,e.id),j(2),Y(e.label)}}function XZ(e,t){if(e&1&&(R(0,`div`,12),F(1,YZ,4,6,`button`,72,VZ),z()),e&2){let e=G();j(),I(e.tabs())}}function ZZ(e,t){if(e&1){let e=U();R(0,`a`,75),W(`click`,function(t){let n=D(e);return O(G().openFullPanel(t,n.tab))}),k(),R(1,`svg`,76),B(2,`rect`,77)(3,`rect`,78)(4,`rect`,79)(5,`rect`,80),z(),J(6,` Open full panel `),z()}e&2&&L(`href`,t.href,ju)}function QZ(e,t){if(e&1){let e=U();R(0,`div`,18)(1,`p`),J(2,` Can't reach the devtools server. Check that the dev server is running. The panel keeps trying to connect. `),z(),R(3,`button`,73),W(`click`,function(){return D(e),O(G().retryConnection())}),J(4,`Retry now`),z()()}}function $Z(e,t){e&1&&B(0,`app-coming-soon`,19),e&2&&L(`info`,t)}function eQ(e,t){e&1&&(R(0,`p`,20),J(1,`Looking for an Angular Native app…`),z())}function tQ(e,t){e&1&&(J(0,` To turn it on, set `),R(1,`code`),J(2),z(),J(3,` in the devtools options. `)),e&2&&(j(2),Y(t))}function nQ(e,t){if(e&1&&(R(0,`p`,21),J(1,` This inspector is turned off in the devtools config (`),R(2,`code`),J(3,`inspectors`),z(),J(4,`). `),N(5,tQ,4,1),R(6,`a`,81),J(7,`About inspectors`),R(8,`span`,82),J(9,` (opens in a new tab)`),z()()()),e&2){let e,t=G();j(5),P((e=t.turnOnSnippet())?5:-1,e),j(),L(`href`,t.inspectorsDocsUrl,ju)}}function rQ(e,t){if(e&1){let e=U();R(0,`app-dashboard`,85),W(`navigate`,function(t){return D(e),O(G(3).switchTab(t))}),z()}e&2&&L(`rpc`,G(3).rpc())}function iQ(e,t){if(e&1){let e=U();R(0,`app-component-tree`,86),W(`focusHandled`,function(){return D(e),O(G(3).componentFocus.set(null))})(`showForm`,function(t){return D(e),O(G(3).showForm(t))}),z()}if(e&2){let e=G(3);L(`rpc`,e.rpc())(`focus`,e.componentFocus())}}function aQ(e,t){if(e&1){let e=U();R(0,`app-route-inspector`,87),W(`showComponent`,function(t){return D(e),O(G(3).showComponent(t))}),z()}e&2&&L(`rpc`,G(3).rpc())}function oQ(e,t){e&1&&B(0,`app-signal-inspector`,83),e&2&&L(`rpc`,G(3).rpc())}function sQ(e,t){e&1&&B(0,`app-di-inspector`,83),e&2&&L(`rpc`,G(3).rpc())}function cQ(e,t){e&1&&B(0,`app-store-inspector`,83),e&2&&L(`rpc`,G(3).rpc())}function lQ(e,t){e&1&&B(0,`app-network-inspector`,83),e&2&&L(`rpc`,G(3).rpc())}function uQ(e,t){if(e&1){let e=U();R(0,`app-forms-inspector`,88),W(`focusHandled`,function(){return D(e),O(G(3).formFocus.set(null))}),z()}if(e&2){let e=G(3);L(`rpc`,e.rpc())(`focus`,e.formFocus())}}function dQ(e,t){e&1&&B(0,`app-pipes-inspector`,83),e&2&&L(`rpc`,G(3).rpc())}function fQ(e,t){e&1&&B(0,`app-analog-inspector`,83),e&2&&L(`rpc`,G(3).rpc())}function pQ(e,t){e&1&&B(0,`app-capacitor-inspector`,83),e&2&&L(`rpc`,G(3).rpc())}function mQ(e,t){if(e&1&&N(0,rQ,1,1,`app-dashboard`,83)(1,iQ,1,2,`app-component-tree`,84)(2,aQ,1,1,`app-route-inspector`,83)(3,oQ,1,1,`app-signal-inspector`,83)(4,sQ,1,1,`app-di-inspector`,83)(5,cQ,1,1,`app-store-inspector`,83)(6,lQ,1,1,`app-network-inspector`,83)(7,uQ,1,2,`app-forms-inspector`,84)(8,dQ,1,1,`app-pipes-inspector`,83)(9,fQ,1,1,`app-analog-inspector`,83)(10,pQ,1,1,`app-capacitor-inspector`,83),e&2){let e;P((e=G(2).tab())===`dashboard`?0:e===`components`?1:e===`routes`?2:e===`signals`?3:e===`injectors`?4:e===`store`?5:e===`network`?6:e===`forms`?7:e===`pipes`?8:e===`analog`?9:e===`capacitor`?10:-1)}}function hQ(e,t){e&1&&F(0,mQ,11,1,null,null,kg),e&2&&I(hv(0,BZ,G().scopeKey()))}var gQ=`all`,_Q=[gQ,...VT],vQ={angular:`Angular`,ngrx:`NgRx Store`,analog:`Analog`,"angular-native":`Angular Native`,nativescript:`NativeScript`,capacitor:`Capacitor`},yQ={ngrx:`store`,analog:`analog`,capacitor:`capacitor`},bQ={store:`ngrx`,analog:`analog`,capacitor:`capacitor`},xQ={"angular-native":[`components`,`signals`,`injectors`,`store`,`pipes`]},SQ={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/`}},CQ={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/`}},wQ={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`}},TQ={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/`}},EQ=[1e3,2e3,5e3,1e4];function DQ(){let e=new URLSearchParams(location.search).get(`view`);return VT.find(t=>t===e)??null}$b(class e{analog=A(!1);allTabs=[{id:`dashboard`,label:`Dashboard`},{id:`analog`,label:`Analog`},{id:`components`,label:`Components`},{id:`routes`,label:`Routes`},{id:`signals`,label:`Signals`},{id:`injectors`,label:`Injectors`},{id:`store`,label:`Store`},{id:`forms`,label:`Forms`},{id:`pipes`,label:`Pipes`},{id:`network`,label:`SSR & HTTP`},{id:`capacitor`,label:`Capacitor`}];view=A(DQ());viewAccent=Q(()=>LZ(this.view(),this.themeService.current()));title=Q(()=>{let e=this.view();return e?vQ[e]:`Pangular Inspector`});mainLabel=Q(()=>this.availableTabs().find(e=>e.id===this.tab())?.label??this.title());analogKnown=A(!1);capacitorReporting=A(!1);capacitorKnown=A(!1);nativePageId=A(null);nativeKnown=A(!1);scopeKey=Q(()=>this.view()===`angular-native`?this.nativePageId()??``:``);comingSoon=Q(()=>{let e=this.view();if(e===`analog`)return this.analogKnown()&&!this.analog()?wQ:void 0;if(e===`nativescript`)return SQ;if(e===`capacitor`)return this.config().inspectors.capacitor&&this.capacitorKnown()&&!this.capacitorReporting()?CQ:void 0;if(e===`angular-native`)return this.nativeKnown()&&!this.nativePageId()?TQ:void 0});config=Q(()=>jE(this.rpc()));tabEnabled=IE;inspectorsDocsUrl=FE;turnOnSnippet=Q(()=>{let e=PE(this.tab());return e?`inspectors: {${e}: true}`:null});availableTabs=Q(()=>{if(this.comingSoon())return[];let e=this.view(),t=e?yQ[e]:void 0,n=this.allTabs.filter(e=>IE(e.id,this.config()));if(t)return n.filter(e=>e.id===t);let r=e?xQ[e]:void 0;return r?n.filter(e=>r.includes(e.id)):n.filter(t=>(t.id!==`analog`||this.analog())&&(t.id!==`capacitor`||this.capacitorReporting())&&!(e===`angular`&&bQ[t.id]))});tabs=Q(()=>{let e=this.availableTabs();if(this.rpc())return e;let t=this.tab();return e.filter(e=>e.id===`dashboard`||e.id===t)});rovingTab=Q(()=>{let e=this.tabs(),t=this.tab();return e.some(e=>e.id===t)?t:e[0]?.id});onNavKey(e){let t=this.nav()?.nativeElement;if(!t||e.altKey||e.ctrlKey||e.metaKey)return;let n=[...t.querySelectorAll(`button`)],r=n.indexOf(document.activeElement);if(r<0)return;let i=n.length-1,a={ArrowRight:r===i?0:r+1,ArrowLeft:r===0?i:r-1,Home:0,End:i},o=Object.hasOwn(a,e.key)?a[e.key]:-1;o<0||(e.preventDefault(),n[o].focus())}fullPanelLink=Q(()=>{let e=this.view();if(!e||location.protocol===`chrome-extension:`)return null;let t=this.comingSoon()?`dashboard`:yQ[e]??this.tab();return{tab:t,href:DZ(location.href,t)}});tab=Fv(()=>{let e=this.view();return e&&(yQ[e]??xQ[e]?.[0])||`dashboard`});rpc=A(null);openedDock=A(null);connected=A(!1);connectionFailed=A(!1);hiddenPages=A([]);pageId=fE();backgroundNote=Q(()=>{let e=this.hiddenPages();return this.pageId?e.includes(this.pageId)?`Tab in background, showing the last data.`:``:e.length?e.length===1?`A tab is in the background, showing its last data.`:`${e.length} tabs are in the background, showing their last data.`:``});stopVisibility=()=>{};stopNative=()=>{};stopCapacitor=()=>{};stopFollowing=()=>{};stopHighlights=()=>{};nav=Jv(`nav`);main=Jv(`main`);injector=T(Cs);themeService=T(gZ);navObserver;navFade=A({start:!1,end:!1});constructor(){T(EA).use(this.rpc),Bd(()=>{let e=this.nav()?.nativeElement;e&&typeof ResizeObserver<`u`&&(this.navObserver=new ResizeObserver(()=>this.measureNav()),this.navObserver.observe(e))}),uy(()=>{this.tab(),this.tabs(),Nv(()=>{this.revealActiveTab(),this.measureNav()})}),fc(()=>{let e=this.openedDock(),t=this.rpc();e&&t&&Nv(()=>void _E(t,`hub-dock-seen`,HT(e.dock)))}),fc(()=>{let e=this.themeService.current();Nv(()=>{try{window.parent!==window&&hZ(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===gQ?this.showFullPanel():this.showView(e)});let e=AZ(location.hash,jZ(this.tabScope()),this.availableTabs().map(e=>e.id));e?this.tab.set(e):!this.view()&&AZ(location.hash,jZ(this.tabScope()),[`capacitor`])===`capacitor`?this.restoreCapacitor=!0:!this.view()&&AZ(location.hash,jZ(this.tabScope()),[`analog`])===`analog`&&(this.restoreAnalog=!0),this.stopHighlights=yE(()=>this.rpc()),this.connect()}connecting=!1;retries=0;retryTimer;connect(){if(this.connecting||this.rpc())return;this.connecting=!0,clearTimeout(this.retryTimer);let e=FZ();zT(e?{baseURL:e}:{}).then(e=>{if(this.connecting=!1,this.destroyed){e.close?.();return}this.retries=0,this.connectionFailed.set(!1),this.refocusOnConnect&&this.focusCurrentTab(),this.refocusOnConnect=!1,this.rpc.set(e),this.connected.set(!0),this.watchVisibility(e),this.watchAngularNative(e),this.watchCapacitor(e),e.scope(`pangular`).rpc.call(`analog-project`).then(e=>{let t=!!e?.analog;this.analog.set(t),this.analogKnown.set(!0),t&&this.restoreAnalog&&IE(`analog`,this.config())&&this.tab.set(`analog`),this.restoreAnalog=!1,!t&&this.tab()===`analog`&&!this.view()&&this.tab.set(`dashboard`)},()=>{this.analogKnown.set(!0),this.restoreAnalog=!1,this.tab()===`analog`&&!this.view()&&this.tab.set(`dashboard`)}),e.events.on(`connection:status`,t=>{this.connected.set(t===`connected`),!(t!==`disconnected`&&t!==`error`||this.rpc()!==e)&&(this.rpc.set(null),e.close?.(),this.retryLater())})},()=>{this.connecting=!1,!this.destroyed&&(this.analogKnown.set(!0),this.nativeKnown.set(!0),this.retryLater())})}retryLater(){if(this.destroyed)return;this.connectionFailed.set(!0);let e=EQ[Math.min(this.retries++,EQ.length-1)];clearTimeout(this.retryTimer),this.retryTimer=setTimeout(()=>this.connect(),e)}retryConnection(){this.retries=0,this.refocusOnConnect=!0,this.connect()}refocusOnConnect=!1;destroyed=!1;ngOnDestroy(){this.destroyed=!0,clearTimeout(this.retryTimer),this.stopNative(),this.stopCapacitor(),this.stopFollowing(),this.stopVisibility(),this.stopHighlights(),this.navObserver?.disconnect()}showView(e){if(e===this.view())return;dE(e===`angular-native`?this.nativePageId():null),this.view.set(e);let t=new URL(location.href);t.searchParams.set(`view`,e),t.hash=``,history.replaceState(history.state,``,t)}showFullPanel(e){if(!this.view())return;dE(null),this.view.set(null);let t=new URL(location.href);t.searchParams.delete(`view`),t.hash=e?`tab=${e}`:``,history.replaceState(history.state,``,t);let n=e??jZ(this.tabScope()),r=this.availableTabs().map(e=>e.id),i=AZ(t.hash,n,r);i?this.setTab(i):n===`capacitor`&&(this.restoreCapacitor=!0)}openFullPanel(e,t){OZ(e)&&TZ()&&(e.preventDefault(),this.showFullPanel(t),this.focusCurrentTab(),EZ(gQ))}formFocus=A(null);componentFocus=Fv({source:this.tab,computation:()=>null});showForm(e){this.formFocus.set({id:e}),this.switchTab(`forms`)}showComponent(e){this.config().inspectors.components&&(this.switchTab(`components`),this.componentFocus.set(e))}inspectFromPanel({source:e,origin:t,data:n}){if(e!==window.parent||t!==location.origin)return;let r=n;r?.type===`pangular:inspect-component`&&typeof r.id==`string`&&this.tab()===`components`&&this.config().inspectors.components&&this.componentFocus.set({id:r.id})}switchTab(e){let t=bQ[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),MZ(this.tabScope(),e)}tabScope(){return this.view()??`panel`}async watchAngularNative(e){try{let t=await e.scope(`pangular`).rpc.sharedState(`component-tree`),n=e=>{let t=e?.pages,n=LD(t,this.nativePageId());this.view()===`angular-native`&&dE(n),this.nativePageId.set(n),this.nativeKnown.set(!0)};n(t.value()),this.stopNative(),this.stopNative=t.on(`updated`,n)}catch{this.nativeKnown.set(!0)}}async watchCapacitor(e){try{let t=await e.scope(`pangular`).rpc.sharedState(`capacitor`),n=e=>{if(e===void 0)return;let t=FY(e).length>0;this.capacitorReporting.set(t),this.capacitorKnown.set(!0),t&&this.restoreCapacitor&&IE(`capacitor`,this.config())&&(this.restoreCapacitor=!1,this.tab.set(`capacitor`)),!t&&this.tab()===`capacitor`&&!this.view()&&this.tab.set(`dashboard`)};n(t.value()),this.stopCapacitor(),this.stopCapacitor=t.on(`updated`,n)}catch{this.capacitorReporting.set(!1),this.capacitorKnown.set(!0)}}async watchVisibility(e){try{let t=await e.scope(`pangular`).rpc.sharedState(`page-visibility`),n=e=>{let t=e?.hidden;this.hiddenPages.set(Array.isArray(t)?t.filter(e=>typeof e==`string`):[])};n(t.value()),this.stopVisibility(),this.stopVisibility=t.on(`updated`,n)}catch{}}keepFocus(){let e=document.activeElement,t=this.main()?.nativeElement;(!e||e===document.body||t?.contains(e))&&this.focusCurrentTab()}focusCurrentTab(){Bd(()=>{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 EZ(e))return;if(window.parent===window){this.keepFocus(),this.showView(e);return}let n=this.rpc();if(!n?.call){this.setTab(t);return}try{await n.call(`hub:docks:activate`,{dockId:HT(e)}),this.keepFocus(),this.showView(e)}catch{this.setTab(t)}}static ɵfac=function(t){return new(t||e)};static ɵcmp=Gh({type:e,selectors:[[`app-root`]],viewQuery:function(e,t){e&1&&l_(t.nav,RZ,5)(t.main,zZ,5),e&2&&u_(2)},hostVars:4,hostBindings:function(e,t){e&1&&W(`message`,function(e){return t.inspectFromPanel(e)},Nu),e&2&&K(`--%NS%accent`,t.viewAccent()?.accent??null)(`--%NS%accent-text`,t.viewAccent()?.text??null)},decls:29,vars:22,consts:[[`nav`,``],[`main`,``],[1,`brand`],[1,`mark`],[`width`,`22`,`height`,`22`,`viewBox`,`0 0 256 256`,`aria-hidden`,`true`],[`width`,`22`,`height`,`22`,`viewBox`,`0 0 32 32`,`aria-hidden`,`true`],[`width`,`24`,`height`,`17`,`viewBox`,`0 0 256 182`,`aria-hidden`,`true`],[`width`,`22`,`height`,`22`,`viewBox`,`0 0 24 24`,`fill`,`currentColor`,`aria-hidden`,`true`],[`width`,`20`,`height`,`22`,`viewBox`,`0 0 223 236`,`aria-hidden`,`true`],[`width`,`30`,`height`,`30`,`viewBox`,`0 0 500 500`,`aria-hidden`,`true`],[1,`title`],[`aria-label`,`Inspectors`,3,`scroll`,`keydown`],[`role`,`toolbar`,`aria-label`,`Inspectors`,`aria-orientation`,`horizontal`,1,`tab-bar`],[1,`full-panel`,3,`href`],[`role`,`status`,1,`status`],[`aria-hidden`,`true`,1,`dot`],[`tabindex`,`-1`],[`role`,`status`,1,`background-note`],[`role`,`alert`,1,`connection-error`],[3,`info`],[`role`,`status`,1,`turned-off`],[1,`turned-off`],[`fill`,`#3c5afd`,`d`,`M237.248 18.752q18.061 18.06 18.748 45.247V192c-.457 18.12-6.707 33.207-18.748 45.247c-12.04 12.04-27.127 18.291-45.251 18.752H63.999q-27.187-.69-45.247-18.752C6.712 225.208.46 210.121 0 192.001V64q.69-27.187 18.752-45.247Q36.812.692 63.999 0h127.998c18.124.46 33.211 6.711 45.251 18.752m-17.655 103q-6.033-6.003-6.28-15.066V64q-.192-9.063-6.221-15.091c-4.02-4.023-9.054-6.093-15.095-6.22h-21.312v106.626L85.315 42.687H63.999c-6.042.128-11.072 2.198-15.091 6.221c-4.023 4.02-6.093 9.05-6.22 15.09v42.688q-.249 9.063-6.281 15.066q-6.03 5.996-15.091 6.246q9.062.255 15.09 6.25c4.024 4.002 6.115 9.024 6.281 15.066V192c.128 6.037 2.198 11.072 6.221 15.091q6.03 6.03 15.09 6.22h21.317V106.687l85.37 106.627h21.312c6.041-.128 11.076-2.202 15.095-6.221s6.093-9.054 6.22-15.09v-42.688q.249-9.063 6.281-15.066q6.03-5.995 15.091-6.25q-9.062-.25-15.09-6.246`],[`fill`,`#53b9ff`,`d`,`M39.863 54.115L.311 93.716l60.995 61.179L0 216.385l39.428 39.619l61.43-61.507l61.097 61.068l39.552-39.602z`],[`fill`,`#119eff`,`d`,`m140.517 154.896l-39.658 39.601l61.097 61.069l39.552-39.602z`],[`fill-opacity`,`.2`,`d`,`m140.517 154.896l-39.658 39.601l15.267 15.182z`],[`fill`,`#53b9ff`,`d`,`M194.57 100.985L256 39.478L216.431 0l-61.412 61.384L93.917.311L54.365 39.913L216.01 201.761l39.552-39.602z`],[`fill`,`#119eff`,`d`,`m115.36 100.987l39.659-39.602L93.917.313L54.365 39.914z`],[`fill-opacity`,`.2`,`d`,`m115.359 100.985l39.659-39.601l-15.271-15.186z`],[`id`,`an-mark-grad`,`x1`,`0`,`y1`,`0`,`x2`,`1`,`y2`,`1`],[`offset`,`0`,`stop-color`,`#f0224f`],[`offset`,`1`,`stop-color`,`#c4002d`],[`d`,`M16 0C27.2 0 32 4.8 32 16S27.2 32 16 32 0 27.2 0 16 4.8 0 16 0Z`,`fill`,`url(#an-mark-grad)`],[`transform`,`translate(6.4 6.4) scale(0.8)`,`fill`,`#fff`],[`d`,`M14.8486 0L23.138 16.8551L23.9996 3.99892L14.8486 0Z`],[`d`,`M16.9875 17.7114H7.01272L5.73926 20.627L12.0001 24L18.261 20.627L16.9875 17.7114Z`],[`d`,`M8.72168 13.9298H15.2812L11.9997 6.39575L8.72168 13.9298Z`],[`d`,`M9.15103 0L0 3.99892L0.861556 16.8551L9.15103 0Z`],[`fill`,`#c30f2e`,`d`,`M152.228.001L48.455 181.046H256L152.228 0z`],[`fill`,`#dd0330`,`d`,`M88.314 26.967L0 181.52h176.628L88.315 26.967z`],[`fill`,`#fff`,`d`,`M18.167 135.294h220.236v-2.419H18.167z`],[`fill`,`#fff`,`d`,`M204.38 170.667c-.861 0-1.67-.358-2.348-1.034c-4.045-4.063-4.221-20.586-4.026-45.33c.11-13.521.257-32.043-1.9-33.504c-2.104.873-2.315 16.172-2.451 26.301c-.162 11.785-.327 23.98-2.242 30.189c-.57 1.84-1.306 3.525-2.786 3.39c-2.086-.185-2.76-3.48-4.317-16.478c-.647-5.4-1.317-10.98-2.101-13.14a11 11 0 0 0-.269-.66c-.835 1.889-1.8 7.079-2.47 10.682c-.927 4.976-1.803 9.676-2.9 11.726c-.847 1.575-2.19 3.63-4.067 3.231c-2.558-.537-3.323-5.693-3.552-8.719c0-25.455-3.33-28.417-3.997-28.753l-.107.081l-.162-.036c-2.377 1.038-2.506 9.294-2.627 17.276c-.096 5.856-.198 12.492-1.053 18.701c-1.108 8.05-2.448 9.603-4.115 9.507c-3.838-.262-3.95-13.482-3.95-14.987c0-.472.012-1.028.027-1.642c.074-3.076.205-8.8-1.687-10.604c-.25-.239-.603-.515-.879-.437c-1.347.339-2.745 4.714-3.209 6.153c-.147.457-.265.833-.364 1.09c-.078.214-.177.515-.294.88c-1.02 3.095-2.18 6.183-4.16 6.944c-.732.284-1.498.222-2.216-.183c-.953-.541-1.73-1.646-2.455-3.482c-.397-1.016-.735-2.046-1.082-3.081c-.419-1.263-.85-2.569-1.384-3.808c-.419-.965-1.464-1.4-2.796-1.164c-2.768.494-3.232 3.29-3.622 7.5c-.07.733-.137 1.452-.228 2.128c-.011.198-.501 6.38-.814 8.344c-.865 5.39-2.002 7.512-3.89 7.358c-4.66-.398-6.798-20.836-6.684-29.47c.088-6.592-1.104-9-1.818-9.382c-.074-.034-.189-.096-.46.095c-.843.571-1.594 2.348-1.363 4.215c2.566 20.32.674 43.592-3.96 48.833c-1.46 1.649-3.448 1.627-4.832.236c-4.049-4.064-4.218-20.586-4.026-45.33c.11-13.521.254-32.043-1.9-33.504c-2.105.873-2.311 16.172-2.45 26.301c-.163 11.785-.329 23.98-2.246 30.189c-.57 1.84-1.307 3.525-2.782 3.39c-2.091-.186-2.761-3.48-4.321-16.478c-.649-5.4-1.319-10.98-2.101-13.14c-.1-.273-.189-.49-.27-.66c-.832 1.889-1.796 7.079-2.466 10.682c-.927 4.976-1.803 9.676-2.904 11.726c-.846 1.575-2.19 3.63-4.063 3.231c-2.558-.537-3.324-5.693-3.552-8.719c-.003-25.455-3.33-28.417-3.997-28.753l-.106.081l-.166-.036c-2.374 1.038-2.503 9.293-2.629 17.276c-.091 5.856-.194 12.492-1.048 18.701c-1.107 8.05-2.437 9.618-4.111 9.507c-3.846-.262-3.958-13.482-3.958-14.987c0-.472.016-1.028.03-1.642c.074-3.076.207-8.8-1.685-10.604c-.25-.239-.603-.515-.88-.438c-1.347.34-2.75 4.715-3.206 6.155a47 47 0 0 1-.364 1.09q-.16.432-.298.875c-1.02 3.096-2.18 6.187-4.155 6.95c-.736.282-1.506.22-2.22-.185c-.953-.541-1.734-1.646-2.454-3.482c-.398-1.016-.74-2.046-1.083-3.081c-.42-1.263-.854-2.569-1.387-3.808c-.416-.965-1.465-1.4-2.797-1.164c-3.188.567-3.943 4.52-4.55 9.238l-.106.839l-2.411-.32l.114-.824c.527-4.137 1.328-10.39 6.53-11.31c2.446-.435 4.585.581 5.446 2.583c.578 1.34 1.031 2.695 1.466 4.008c.324.99.654 1.98 1.037 2.959c.674 1.708 1.197 2.15 1.392 2.257c1.218-.38 2.462-4.167 2.873-5.414c.13-.402.24-.732.328-.968c.085-.233.195-.571.328-.98c1.097-3.43 2.474-7.144 4.918-7.762c.747-.191 1.903-.166 3.157 1.035c2.665 2.544 2.525 8.48 2.433 12.41c-.014.59-.028 1.126-.028 1.583c0 6.272.93 10.655 1.64 12.16c.367-.77.998-2.63 1.598-7.007c.831-6.066.938-12.624 1.027-18.41c.161-10.24.275-17.663 3.982-19.408c.552-.339 1.469-.522 2.436-.033c3.586 1.803 5.326 11.885 5.326 30.817c.225 2.926 1.013 6.006 1.66 6.448c.004-.066.53-.39 1.394-2.01c.925-1.718 1.845-6.665 2.655-11.026c1.792-9.614 2.606-12.989 4.726-13.166c1.615-.158 2.362 1.896 2.676 2.76c.883 2.422 1.537 7.888 2.23 13.678c.54 4.49 1.31 10.902 2.094 13.497c.084-.228.18-.5.283-.836c1.815-5.878 1.98-17.887 2.14-29.507c.22-16.14.503-26.139 3.448-28.226a2.44 2.44 0 0 1 2.233-.316c3.448 1.144 3.714 11.254 3.519 35.8c-.14 17.799-.313 39.952 3.323 43.603c.317.32.542.32.622.32c.17 0 .413-.161.67-.452c3.681-4.162 6.01-26.022 3.372-46.927c-.328-2.602.677-5.337 2.392-6.514c.946-.652 2.036-.736 2.978-.232c2.145 1.14 3.187 5.024 3.102 11.546c-.15 11.387 2.584 24.714 4.37 26.842c.282-.471.842-1.763 1.379-5.145c.301-1.87.799-8.153.806-8.216c.09-.71.155-1.398.217-2.097c.369-3.924.82-8.804 5.613-9.654c2.444-.435 4.583.577 5.448 2.583c.577 1.34 1.027 2.695 1.46 4.008c.332.99.664 1.98 1.046 2.959c.67 1.708 1.197 2.15 1.387 2.257c1.218-.38 2.467-4.167 2.875-5.41c.132-.402.243-.737.328-.973c.088-.228.195-.57.324-.979c1.1-3.43 2.477-7.144 4.924-7.762c.74-.191 1.9-.166 3.154 1.035c2.665 2.543 2.526 8.48 2.437 12.41q-.029.792-.033 1.583c0 6.272.931 10.655 1.641 12.16c.365-.77.994-2.63 1.601-7.007c.832-6.066.931-12.624 1.027-18.41c.159-10.24.273-17.663 3.98-19.408c.55-.339 1.467-.522 2.44-.033c3.58 1.803 5.325 11.884 5.325 30.817c.224 2.926 1.012 6.006 1.656 6.448c.008-.066.526-.39 1.399-2.01c.923-1.718 1.84-6.665 2.653-11.026c1.786-9.614 2.602-12.989 4.722-13.166c1.62-.158 2.367 1.896 2.68 2.76c.88 2.422 1.535 7.888 2.233 13.678c.534 4.49 1.304 10.902 2.092 13.497c.08-.228.176-.5.28-.836c1.813-5.878 1.976-17.887 2.138-29.507c.216-16.14.504-26.139 3.448-28.226a2.45 2.45 0 0 1 2.234-.316c3.452 1.144 3.718 11.254 3.52 35.8c-.141 17.799-.314 39.952 3.319 43.603c.324.32.544.32.63.32c.165 0 .408-.161.662-.452c3.687-4.162 6.014-26.022 3.375-46.927c-.342-2.723.43-5.47 1.84-6.526c.71-.537 1.575-.647 2.37-.313c2.054.877 3.445 4.63 4.255 11.484c.339 2.87.641 5.974.931 9.036c.641 6.683 1.509 15.69 2.684 17.67c.36-.46 1.096-1.704 2.19-5.038l2.307.753c-1.696 5.157-3.026 7.1-4.755 6.902c-2.69-.299-3.468-5.734-4.84-20.055c-.29-3.048-.59-6.132-.928-8.989c-1.03-8.74-2.782-9.532-2.801-9.54c-.342.174-1.137 1.992-.842 4.31c2.558 20.32.673 43.597-3.964 48.834c-.747.842-1.587 1.27-2.485 1.27`],[`d`,`M12.024.017V0L12 .008L11.976 0v.017L.812 3.892l1.605 14.875l9.559 5.207V24l.024-.013l.024.013v-.026l9.559-5.207l1.605-14.875zm6.868 14.244q-1.64 3.948-6.031 4.166c-2.829 0-4.661-1.7-4.66-1.7q-1.745-1.359-2.398-3.417c-.695-.76-.702-.841-.774-1.145c-.072-.303.045-.388.249-.685q.204-.298.098-.85q-.26-.36-.3-1.128q0-.37.496-.783q.495-.413.607-.632q.083-.119.065-1.031q-.006-.897.995-.975c1-.08 1.565-.832 1.879-1.174c.21-.228.52-.339.91-.341c.551-.026 1.052.185 1.484.62c1.075-.055 2.176.235 3.292.863q2.379 1.414 2.596 3.055q-.257 2.158-5.788-.113q-2.895.819-2.846 3.552q0 2.508 2.422 3.643c-.787-.772-1.122-1.422-1.01-1.959q2.456 2.906 5.588 2.173c-.92.032-1.65-.264-2.198-.893q2.116-.05 3.998-1.972c-.724.576-1.482.794-2.284.657q3.26-2.563 2.307-5.98l-.002-.006a3.02 3.02 0 0 1 .788 2.03q.023 1.175-.795 2.477q.613-.478 1.413-2.047c.23 2.117-.625 3.724-2.574 4.825q.934-.085 2.473-1.23m-5.567-6.63a.319.319 0 1 1 .638 0a.319.319 0 0 1-.638 0`],[`id`,`ng-grad`,`x1`,`49`,`x2`,`226`,`y1`,`214`,`y2`,`130`,`gradientUnits`,`userSpaceOnUse`],[`stop-color`,`#E40035`],[`offset`,`.24`,`stop-color`,`#F60A48`],[`offset`,`.352`,`stop-color`,`#F20755`],[`offset`,`.494`,`stop-color`,`#DC087D`],[`offset`,`.745`,`stop-color`,`#9717E7`],[`offset`,`1`,`stop-color`,`#6C00F5`],[`fill`,`url(#ng-grad)`,`d`,`m222.077 39.192-8.019 125.923L137.387 0l84.69 39.192Zm-53.105 162.825-57.933 33.056-57.934-33.056 11.783-28.556h92.301l11.783 28.556ZM111.039 62.675l30.357 73.803H80.681l30.358-73.803ZM7.937 165.115 0 39.192 84.69 0 7.937 165.115Z`],[`width`,`500`,`height`,`500`,`rx`,`112`,`fill`,`#1c1a17`],[`transform`,`translate(250 252) scale(1.38) translate(-120 -129)`],[`id`,`pi-mark-mask`],[`x`,`-60`,`y`,`-60`,`width`,`360`,`height`,`380`,`fill`,`#fff`],[`fill`,`none`,`stroke`,`#000`,`stroke-width`,`30`,`stroke-linejoin`,`miter`],[`d`,`M88 66 V196`],[`d`,`M88 66 H143 L170 98 L143 130 H88 Z`],[`id`,`pi-mark-clip`],[`x`,`-40`,`y`,`129`,`width`,`320`,`height`,`200`],[`transform`,`rotate(-10 120 129)`],[`cx`,`120`,`cy`,`129`,`rx`,`128`,`ry`,`34`,`fill`,`none`,`stroke`,`#78350f`,`stroke-width`,`10`],[`mask`,`url(#pi-mark-mask)`],[`fill`,`#fbbf24`,`d`,`M120 5 L2 46 L22 198 L120 253 Z`],[`fill`,`#f59e0b`,`d`,`M120 5 L238 46 L218 198 L120 253 Z`],[`clip-path`,`url(#pi-mark-clip)`,`cx`,`120`,`cy`,`129`,`rx`,`128`,`ry`,`34`,`fill`,`none`,`stroke`,`#1c1a17`,`stroke-width`,`22`],[`clip-path`,`url(#pi-mark-clip)`,`cx`,`120`,`cy`,`129`,`rx`,`128`,`ry`,`34`,`fill`,`none`,`stroke`,`#fde68a`,`stroke-width`,`10`],[`transform`,`translate(230.9 146.0) rotate(10) scale(1.5) translate(-4 -4)`],[`x1`,`9`,`y1`,`9`,`x2`,`21`,`y2`,`21`,`stroke`,`#1c1a17`,`stroke-width`,`14`,`stroke-linecap`,`round`],[`r`,`16`,`fill`,`#1c1a17`],[`x1`,`9`,`y1`,`9`,`x2`,`21`,`y2`,`21`,`stroke`,`#fde68a`,`stroke-width`,`7`,`stroke-linecap`,`round`],[`r`,`12`,`fill`,`#1c1a17`,`stroke`,`#fde68a`,`stroke-width`,`5`],[`type`,`button`,3,`active`],[`type`,`button`,3,`click`],[3,`name`],[1,`full-panel`,3,`click`,`href`],[`width`,`14`,`height`,`14`,`viewBox`,`0 0 24 24`,`aria-hidden`,`true`],[`x`,`3`,`y`,`3`,`width`,`7`,`height`,`7`,`rx`,`1.5`],[`x`,`14`,`y`,`3`,`width`,`7`,`height`,`7`,`rx`,`1.5`],[`x`,`3`,`y`,`14`,`width`,`7`,`height`,`7`,`rx`,`1.5`],[`x`,`14`,`y`,`14`,`width`,`7`,`height`,`7`,`rx`,`1.5`],[`target`,`_blank`,`rel`,`noopener noreferrer`,3,`href`],[1,`sr-only`],[3,`rpc`],[3,`rpc`,`focus`],[3,`navigate`,`rpc`],[3,`focusHandled`,`showForm`,`rpc`,`focus`],[3,`showComponent`,`rpc`],[3,`focusHandled`,`rpc`,`focus`]],template:function(e,t){if(e&1&&(R(0,`header`)(1,`h1`,2)(2,`span`,3),N(3,HZ,2,0,`:svg:svg`,4)(4,UZ,7,0,`:svg:svg`,4)(5,WZ,11,0,`:svg:svg`,5)(6,GZ,5,0,`:svg:svg`,6)(7,KZ,2,0,`:svg:svg`,7)(8,qZ,10,0,`:svg:svg`,8)(9,JZ,24,0,`:svg:svg`,9),z(),R(10,`span`,10),J(11),z()(),R(12,`nav`,11,0),W(`scroll`,function(){return t.measureNav()})(`keydown`,function(e){return t.onNavKey(e)}),N(14,XZ,3,0,`div`,12),z(),N(15,ZZ,7,1,`a`,13),R(16,`span`,14)(17,`span`,15),B(18,`span`),z(),J(19),z()(),R(20,`main`,16,1)(22,`p`,17),J(23),z(),N(24,QZ,5,0,`div`,18)(25,$Z,1,1,`app-coming-soon`,19)(26,eQ,2,0,`p`,20)(27,nQ,10,2,`p`,21)(28,hQ,2,2),z()),e&2){let e,n;j(2),q(`ng-mark`,t.view()===`angular`)(`pi-mark`,!t.view()),j(),P(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),j(7),q(`ng-text`,t.view()===`angular`),j(),Y(t.title()),j(),q(`fade-start`,t.navFade().start)(`fade-end`,t.navFade().end),j(2),P(t.availableTabs().length>1?14:-1),j(),P((e=t.fullPanelLink())?15:-1,e),j(),q(`connected`,t.connected())(`failed`,t.connectionFailed()),j(3),X(` `,t.connected()?`Live`:t.connectionFailed()?`Disconnected`:`Connecting…`,` `),j(),M(`aria-label`,t.mainLabel()),j(3),Y(t.backgroundNote()),j(),P(t.connectionFailed()?24:(n=t.comingSoon())?25:t.view()===`angular-native`&&!t.nativePageId()?26:t.tabEnabled(t.tab(),t.config())?28:27,n)}},dependencies:[OD,MM,dI,jL,rz,vV,IU,rG,Cq,xY,fZ,OY,JE],styles:[`[_nghost-%COMP%] { +`}var _Z=new Map;function vZ(e,t=`dark`,n=50){let r=e?.querySelector(`devframes-dock-standalone`)?.shadowRoot;if(r){if(e){let t=_Z.get(e);t!==void 0&&(clearTimeout(t),_Z.delete(e))}let n=r.querySelector(`style[data-pangular]`);n||(n=e.createElement(`style`),n.dataset.pangular=``,r.append(n)),n.textContent=gZ(t);return}if(n>0&&e){let r=_Z.get(e);r!==void 0&&clearTimeout(r);let i=setTimeout(()=>{_Z.delete(e),vZ(e,t,n-1)},100);_Z.set(e,i)}}var yZ=class e{current=A(`dark`);constructor(){let e=T(Ts),t=SZ(),n=document.documentElement.dataset.theme,r=n===`light`||n===`dark`;if(n===`light`||n===`dark`)this.current.set(n);else if(t)r=!0,this.apply(xZ(t));else{let t=bZ();if(t){this.current.set(t.matches?`light`:`dark`);let n=e=>{r||this.current.set(e.matches?`light`:`dark`)};t.addEventListener(`change`,n),e.onDestroy(()=>t.removeEventListener(`change`,n))}}let i;try{i=new BroadcastChannel(`pangular:theme`)}catch{}fc(()=>{let e=this.current();try{i?.postMessage(e)}catch{}for(let{win:t,origin:n}of CZ())try{t.postMessage({type:`pangular:theme-change`,theme:e},n)}catch{}});let a=e=>{if(e.source!==window.parent)return;let t=e.data;t?.type===`pangular:theme-change`&&(r=!0,this.apply(t.theme===`dark`?`dark`:`light`))};window.addEventListener(`message`,a);let o;t&&(o=new MutationObserver(()=>this.apply(xZ(t))),o.observe(t,{attributes:!0,attributeFilter:[`class`]})),e.onDestroy(()=>{window.removeEventListener(`message`,a),o?.disconnect(),i?.close()})}apply(e){this.current.set(e),document.documentElement.dataset.theme=e}static ɵfac=function(t){return new(t||e)};static ɵprov=jl({token:e,factory:e.ɵfac})};function bZ(){try{return window.matchMedia?.(`(prefers-color-scheme: light)`)??null}catch{return null}}function xZ(e){return e.classList.contains(`dark`)?`dark`:`light`}function SZ(){try{return window.frameElement?.closest(`.devframes-color-root`)??null}catch{return null}}function CZ(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=wZ(e,r,i,n);a&&t.push({win:r,origin:a})}}catch{}return t}function wZ(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 TZ=`__DEVFRAME_HUB_CLIENT_CONTEXT__`;function EZ(){try{return window.parent===window?void 0:window.parent[TZ]}catch{return}}function DZ(e,t,n=50){let r=EZ();if(!r){if(n<=0||window.parent===window)return()=>{};let r=()=>{},i=setTimeout(()=>r=DZ(e,t,n-1),100);return()=>{clearTimeout(i),r()}}let i=e.map(e=>r.docks.getStateById(HT(e))?.events.on(`entry:activated`,()=>t(e))??(()=>{})),a=r.docks.selectedId,o=e.find(e=>HT(e)===a);return o&&t(o),()=>i.forEach(e=>e())}function OZ(){return!!EZ()}async function kZ(e){let t=EZ();if(!t)return!1;try{return await t.docks.switchEntry(HT(e))}catch{return!1}}function AZ(e,t){let n=new URL(e);return n.searchParams.delete(`view`),n.hash=t?`tab=${t}`:``,n.pathname+n.search+n.hash}function jZ(e){return e.button===0&&!e.metaKey&&!e.ctrlKey&&!e.shiftKey&&!e.altKey}var MZ=`pangular-tab`;function NZ(e,t,n){let r=new URLSearchParams(e.replace(/^#/,``)).get(`tab`)||t;return n.find(e=>e===r)}function PZ(e){try{return sessionStorage.getItem(`${MZ}:${e}`)}catch{return null}}function FZ(e,t){try{sessionStorage.setItem(`${MZ}:${e}`,t)}catch{}}function IZ(e,t){try{return new URL(e,t.href).origin===t.origin}catch{return!1}}function LZ(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 RZ(e=location){let t=new URLSearchParams(e.search).get(`baseURL`);if(t&&(IZ(t,e)||LZ(t,e)))return t;if(!(e.pathname.includes(`__pangular`)||e.pathname.includes(`__devframes/`)))return[`/__pangular/`,`./`]}var zZ={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 BZ(e,t){let n=zZ[t];return e&&n[e]||null}var VZ=[`nav`],HZ=[`main`],UZ=e=>[e],WZ=(e,t)=>t.id;function GZ(e,t){e&1&&(k(),R(0,`svg`,4),B(1,`path`,22),z())}function KZ(e,t){e&1&&(k(),R(0,`svg`,4),B(1,`path`,23)(2,`path`,24)(3,`path`,25)(4,`path`,26)(5,`path`,27)(6,`path`,28),z())}function qZ(e,t){e&1&&(k(),R(0,`svg`,5)(1,`defs`)(2,`linearGradient`,29),B(3,`stop`,30)(4,`stop`,31),z()(),B(5,`path`,32),R(6,`g`,33),B(7,`path`,34)(8,`path`,35)(9,`path`,36)(10,`path`,37),z()())}function JZ(e,t){e&1&&(k(),R(0,`svg`,6),B(1,`path`,38)(2,`path`,39)(3,`path`,40)(4,`path`,41),z())}function YZ(e,t){e&1&&(k(),R(0,`svg`,7),B(1,`path`,42),z())}function XZ(e,t){e&1&&(k(),R(0,`svg`,8)(1,`defs`)(2,`linearGradient`,43),B(3,`stop`,44)(4,`stop`,45)(5,`stop`,46)(6,`stop`,47)(7,`stop`,48)(8,`stop`,49),z()(),B(9,`path`,50),z())}function ZZ(e,t){e&1&&(k(),R(0,`svg`,9),B(1,`rect`,51),R(2,`g`,52)(3,`defs`)(4,`mask`,53),B(5,`rect`,54),R(6,`g`,55),B(7,`path`,56)(8,`path`,57),z()(),R(9,`clipPath`,58),B(10,`rect`,59),z()(),R(11,`g`,60),B(12,`ellipse`,61),z(),R(13,`g`,62),B(14,`path`,63)(15,`path`,64),z(),R(16,`g`,60),B(17,`ellipse`,65)(18,`ellipse`,66),R(19,`g`,67),B(20,`line`,68)(21,`circle`,69)(22,`line`,70)(23,`circle`,71),z()()()())}function QZ(e,t){if(e&1){let e=U();R(0,`button`,73),W(`click`,function(){let t=D(e).$implicit;return O(G(2).switchTab(t.id))}),B(1,`app-tab-icon`,74),R(2,`span`),J(3),z()()}if(e&2){let e=t.$implicit,n=G(2);q(`active`,n.tab()===e.id),M(`aria-current`,n.tab()===e.id?`page`:null)(`tabindex`,n.rovingTab()===e.id?0:-1),j(),L(`name`,e.id),j(2),Y(e.label)}}function $Z(e,t){if(e&1&&(R(0,`div`,12),F(1,QZ,4,6,`button`,72,WZ),z()),e&2){let e=G();j(),I(e.tabs())}}function eQ(e,t){if(e&1){let e=U();R(0,`a`,75),W(`click`,function(t){let n=D(e);return O(G().openFullPanel(t,n.tab))}),k(),R(1,`svg`,76),B(2,`rect`,77)(3,`rect`,78)(4,`rect`,79)(5,`rect`,80),z(),J(6,` Open full panel `),z()}e&2&&L(`href`,t.href,ju)}function tQ(e,t){if(e&1){let e=U();R(0,`div`,18)(1,`p`),J(2,` Can't reach the devtools server. Check that the dev server is running. The panel keeps trying to connect. `),z(),R(3,`button`,73),W(`click`,function(){return D(e),O(G().retryConnection())}),J(4,`Retry now`),z()()}}function nQ(e,t){e&1&&B(0,`app-coming-soon`,19),e&2&&L(`info`,t)}function rQ(e,t){e&1&&(R(0,`p`,20),J(1,`Looking for an Angular Native app…`),z())}function iQ(e,t){e&1&&(J(0,` To turn it on, set `),R(1,`code`),J(2),z(),J(3,` in the devtools options. `)),e&2&&(j(2),Y(t))}function aQ(e,t){if(e&1&&(R(0,`p`,21),J(1,` This inspector is turned off in the devtools config (`),R(2,`code`),J(3,`inspectors`),z(),J(4,`). `),N(5,iQ,4,1),R(6,`a`,81),J(7,`About inspectors`),R(8,`span`,82),J(9,` (opens in a new tab)`),z()()()),e&2){let e,t=G();j(5),P((e=t.turnOnSnippet())?5:-1,e),j(),L(`href`,t.inspectorsDocsUrl,ju)}}function oQ(e,t){if(e&1){let e=U();R(0,`app-dashboard`,85),W(`navigate`,function(t){return D(e),O(G(3).switchTab(t))}),z()}e&2&&L(`rpc`,G(3).rpc())}function sQ(e,t){if(e&1){let e=U();R(0,`app-component-tree`,86),W(`focusHandled`,function(){return D(e),O(G(3).componentFocus.set(null))})(`showForm`,function(t){return D(e),O(G(3).showForm(t))}),z()}if(e&2){let e=G(3);L(`rpc`,e.rpc())(`focus`,e.componentFocus())}}function cQ(e,t){if(e&1){let e=U();R(0,`app-route-inspector`,87),W(`showComponent`,function(t){return D(e),O(G(3).showComponent(t))}),z()}e&2&&L(`rpc`,G(3).rpc())}function lQ(e,t){e&1&&B(0,`app-signal-inspector`,83),e&2&&L(`rpc`,G(3).rpc())}function uQ(e,t){e&1&&B(0,`app-di-inspector`,83),e&2&&L(`rpc`,G(3).rpc())}function dQ(e,t){e&1&&B(0,`app-store-inspector`,83),e&2&&L(`rpc`,G(3).rpc())}function fQ(e,t){e&1&&B(0,`app-network-inspector`,83),e&2&&L(`rpc`,G(3).rpc())}function pQ(e,t){if(e&1){let e=U();R(0,`app-forms-inspector`,88),W(`focusHandled`,function(){return D(e),O(G(3).formFocus.set(null))}),z()}if(e&2){let e=G(3);L(`rpc`,e.rpc())(`focus`,e.formFocus())}}function mQ(e,t){e&1&&B(0,`app-pipes-inspector`,83),e&2&&L(`rpc`,G(3).rpc())}function hQ(e,t){e&1&&B(0,`app-analog-inspector`,83),e&2&&L(`rpc`,G(3).rpc())}function gQ(e,t){e&1&&B(0,`app-capacitor-inspector`,83),e&2&&L(`rpc`,G(3).rpc())}function _Q(e,t){if(e&1&&N(0,oQ,1,1,`app-dashboard`,83)(1,sQ,1,2,`app-component-tree`,84)(2,cQ,1,1,`app-route-inspector`,83)(3,lQ,1,1,`app-signal-inspector`,83)(4,uQ,1,1,`app-di-inspector`,83)(5,dQ,1,1,`app-store-inspector`,83)(6,fQ,1,1,`app-network-inspector`,83)(7,pQ,1,2,`app-forms-inspector`,84)(8,mQ,1,1,`app-pipes-inspector`,83)(9,hQ,1,1,`app-analog-inspector`,83)(10,gQ,1,1,`app-capacitor-inspector`,83),e&2){let e;P((e=G(2).tab())===`dashboard`?0:e===`components`?1:e===`routes`?2:e===`signals`?3:e===`injectors`?4:e===`store`?5:e===`network`?6:e===`forms`?7:e===`pipes`?8:e===`analog`?9:e===`capacitor`?10:-1)}}function vQ(e,t){e&1&&F(0,_Q,11,1,null,null,kg),e&2&&I(hv(0,UZ,G().scopeKey()))}var yQ=`all`,bQ=[yQ,...VT],xQ={angular:`Angular`,ngrx:`NgRx Store`,analog:`Analog`,"angular-native":`Angular Native`,nativescript:`NativeScript`,capacitor:`Capacitor`},SQ={ngrx:`store`,analog:`analog`,capacitor:`capacitor`},CQ={store:`ngrx`,analog:`analog`,capacitor:`capacitor`},wQ={"angular-native":[`components`,`signals`,`injectors`,`store`,`pipes`]},TQ={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/`}},EQ={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/`}},DQ={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`}},OQ={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/`}},kQ=[1e3,2e3,5e3,1e4];function AQ(){let e=new URLSearchParams(location.search).get(`view`);return VT.find(t=>t===e)??null}$b(class e{analog=A(!1);allTabs=[{id:`dashboard`,label:`Dashboard`},{id:`analog`,label:`Analog`},{id:`components`,label:`Components`},{id:`routes`,label:`Routes`},{id:`signals`,label:`Signals`},{id:`injectors`,label:`Injectors`},{id:`store`,label:`Store`},{id:`forms`,label:`Forms`},{id:`pipes`,label:`Pipes`},{id:`network`,label:`SSR & HTTP`},{id:`capacitor`,label:`Capacitor`}];view=A(AQ());viewAccent=Q(()=>BZ(this.view(),this.themeService.current()));title=Q(()=>{let e=this.view();return e?xQ[e]:`Pangular Inspector`});mainLabel=Q(()=>this.availableTabs().find(e=>e.id===this.tab())?.label??this.title());analogKnown=A(!1);capacitorReporting=A(!1);capacitorKnown=A(!1);nativePageId=A(null);nativeKnown=A(!1);scopeKey=Q(()=>this.view()===`angular-native`?this.nativePageId()??``:``);comingSoon=Q(()=>{let e=this.view();if(e===`analog`)return this.analogKnown()&&!this.analog()?DQ:void 0;if(e===`nativescript`)return TQ;if(e===`capacitor`)return this.config().inspectors.capacitor&&this.capacitorKnown()&&!this.capacitorReporting()?EQ:void 0;if(e===`angular-native`)return this.nativeKnown()&&!this.nativePageId()?OQ:void 0});config=Q(()=>jE(this.rpc()));tabEnabled=IE;inspectorsDocsUrl=FE;turnOnSnippet=Q(()=>{let e=PE(this.tab());return e?`inspectors: {${e}: true}`:null});availableTabs=Q(()=>{if(this.comingSoon())return[];let e=this.view(),t=e?SQ[e]:void 0,n=this.allTabs.filter(e=>IE(e.id,this.config()));if(t)return n.filter(e=>e.id===t);let r=e?wQ[e]:void 0;return r?n.filter(e=>r.includes(e.id)):n.filter(t=>(t.id!==`analog`||this.analog())&&(t.id!==`capacitor`||this.capacitorReporting())&&!(e===`angular`&&CQ[t.id]))});tabs=Q(()=>{let e=this.availableTabs();if(this.rpc())return e;let t=this.tab();return e.filter(e=>e.id===`dashboard`||e.id===t)});rovingTab=Q(()=>{let e=this.tabs(),t=this.tab();return e.some(e=>e.id===t)?t:e[0]?.id});onNavKey(e){let t=this.nav()?.nativeElement;if(!t||e.altKey||e.ctrlKey||e.metaKey)return;let n=[...t.querySelectorAll(`button`)],r=n.indexOf(document.activeElement);if(r<0)return;let i=n.length-1,a={ArrowRight:r===i?0:r+1,ArrowLeft:r===0?i:r-1,Home:0,End:i},o=Object.hasOwn(a,e.key)?a[e.key]:-1;o<0||(e.preventDefault(),n[o].focus())}fullPanelLink=Q(()=>{let e=this.view();if(!e||location.protocol===`chrome-extension:`)return null;let t=this.comingSoon()?`dashboard`:SQ[e]??this.tab();return{tab:t,href:AZ(location.href,t)}});tab=Fv(()=>{let e=this.view();return e&&(SQ[e]??wQ[e]?.[0])||`dashboard`});rpc=A(null);openedDock=A(null);connected=A(!1);connectionFailed=A(!1);hiddenPages=A([]);pageId=fE();backgroundNote=Q(()=>{let e=this.hiddenPages();return this.pageId?e.includes(this.pageId)?`Tab in background, showing the last data.`:``:e.length?e.length===1?`A tab is in the background, showing its last data.`:`${e.length} tabs are in the background, showing their last data.`:``});stopVisibility=()=>{};stopNative=()=>{};stopCapacitor=()=>{};stopFollowing=()=>{};stopHighlights=()=>{};nav=Jv(`nav`);main=Jv(`main`);injector=T(Cs);themeService=T(yZ);navObserver;navFade=A({start:!1,end:!1});constructor(){T(kA).use(this.rpc),Bd(()=>{let e=this.nav()?.nativeElement;e&&typeof ResizeObserver<`u`&&(this.navObserver=new ResizeObserver(()=>this.measureNav()),this.navObserver.observe(e))}),uy(()=>{this.tab(),this.tabs(),Nv(()=>{this.revealActiveTab(),this.measureNav()})}),fc(()=>{let e=this.openedDock(),t=this.rpc();e&&t&&Nv(()=>void _E(t,`hub-dock-seen`,HT(e.dock)))}),fc(()=>{let e=this.themeService.current();Nv(()=>{try{window.parent!==window&&vZ(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===yQ?this.showFullPanel():this.showView(e)});let e=NZ(location.hash,PZ(this.tabScope()),this.availableTabs().map(e=>e.id));e?this.tab.set(e):!this.view()&&NZ(location.hash,PZ(this.tabScope()),[`capacitor`])===`capacitor`?this.restoreCapacitor=!0:!this.view()&&NZ(location.hash,PZ(this.tabScope()),[`analog`])===`analog`&&(this.restoreAnalog=!0),this.stopHighlights=yE(()=>this.rpc()),this.connect()}connecting=!1;retries=0;retryTimer;connect(){if(this.connecting||this.rpc())return;this.connecting=!0,clearTimeout(this.retryTimer);let e=RZ();zT(e?{baseURL:e}:{}).then(e=>{if(this.connecting=!1,this.destroyed){e.close?.();return}this.retries=0,this.connectionFailed.set(!1),this.refocusOnConnect&&this.focusCurrentTab(),this.refocusOnConnect=!1,this.rpc.set(e),this.connected.set(!0),this.watchVisibility(e),this.watchAngularNative(e),this.watchCapacitor(e),e.scope(`pangular`).rpc.call(`analog-project`).then(e=>{let t=!!e?.analog;this.analog.set(t),this.analogKnown.set(!0),t&&this.restoreAnalog&&IE(`analog`,this.config())&&this.tab.set(`analog`),this.restoreAnalog=!1,!t&&this.tab()===`analog`&&!this.view()&&this.tab.set(`dashboard`)},()=>{this.analogKnown.set(!0),this.restoreAnalog=!1,this.tab()===`analog`&&!this.view()&&this.tab.set(`dashboard`)}),e.events.on(`connection:status`,t=>{this.connected.set(t===`connected`),!(t!==`disconnected`&&t!==`error`||this.rpc()!==e)&&(this.rpc.set(null),e.close?.(),this.retryLater())})},()=>{this.connecting=!1,!this.destroyed&&(this.analogKnown.set(!0),this.nativeKnown.set(!0),this.retryLater())})}retryLater(){if(this.destroyed)return;this.connectionFailed.set(!0);let e=kQ[Math.min(this.retries++,kQ.length-1)];clearTimeout(this.retryTimer),this.retryTimer=setTimeout(()=>this.connect(),e)}retryConnection(){this.retries=0,this.refocusOnConnect=!0,this.connect()}refocusOnConnect=!1;destroyed=!1;ngOnDestroy(){this.destroyed=!0,clearTimeout(this.retryTimer),this.stopNative(),this.stopCapacitor(),this.stopFollowing(),this.stopVisibility(),this.stopHighlights(),this.navObserver?.disconnect()}showView(e){if(e===this.view())return;dE(e===`angular-native`?this.nativePageId():null),this.view.set(e);let t=new URL(location.href);t.searchParams.set(`view`,e),t.hash=``,history.replaceState(history.state,``,t)}showFullPanel(e){if(!this.view())return;dE(null),this.view.set(null);let t=new URL(location.href);t.searchParams.delete(`view`),t.hash=e?`tab=${e}`:``,history.replaceState(history.state,``,t);let n=e??PZ(this.tabScope()),r=this.availableTabs().map(e=>e.id),i=NZ(t.hash,n,r);i?this.setTab(i):n===`capacitor`&&(this.restoreCapacitor=!0)}openFullPanel(e,t){jZ(e)&&OZ()&&(e.preventDefault(),this.showFullPanel(t),this.focusCurrentTab(),kZ(yQ))}formFocus=A(null);componentFocus=Fv({source:this.tab,computation:()=>null});showForm(e){this.formFocus.set({id:e}),this.switchTab(`forms`)}showComponent(e){this.config().inspectors.components&&(this.switchTab(`components`),this.componentFocus.set(e))}inspectFromPanel({source:e,origin:t,data:n}){if(e!==window.parent||t!==location.origin)return;let r=n;r?.type===`pangular:inspect-component`&&typeof r.id==`string`&&this.tab()===`components`&&this.config().inspectors.components&&this.componentFocus.set({id:r.id})}switchTab(e){let t=CQ[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),FZ(this.tabScope(),e)}tabScope(){return this.view()??`panel`}async watchAngularNative(e){try{let t=await e.scope(`pangular`).rpc.sharedState(`component-tree`),n=e=>{let t=e?.pages,n=LD(t,this.nativePageId());this.view()===`angular-native`&&dE(n),this.nativePageId.set(n),this.nativeKnown.set(!0)};n(t.value()),this.stopNative(),this.stopNative=t.on(`updated`,n)}catch{this.nativeKnown.set(!0)}}async watchCapacitor(e){try{let t=await e.scope(`pangular`).rpc.sharedState(`capacitor`),n=e=>{if(e===void 0)return;let t=RY(e).length>0;this.capacitorReporting.set(t),this.capacitorKnown.set(!0),t&&this.restoreCapacitor&&IE(`capacitor`,this.config())&&(this.restoreCapacitor=!1,this.tab.set(`capacitor`)),!t&&this.tab()===`capacitor`&&!this.view()&&this.tab.set(`dashboard`)};n(t.value()),this.stopCapacitor(),this.stopCapacitor=t.on(`updated`,n)}catch{this.capacitorReporting.set(!1),this.capacitorKnown.set(!0)}}async watchVisibility(e){try{let t=await e.scope(`pangular`).rpc.sharedState(`page-visibility`),n=e=>{let t=e?.hidden;this.hiddenPages.set(Array.isArray(t)?t.filter(e=>typeof e==`string`):[])};n(t.value()),this.stopVisibility(),this.stopVisibility=t.on(`updated`,n)}catch{}}keepFocus(){let e=document.activeElement,t=this.main()?.nativeElement;(!e||e===document.body||t?.contains(e))&&this.focusCurrentTab()}focusCurrentTab(){Bd(()=>{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 kZ(e))return;if(window.parent===window){this.keepFocus(),this.showView(e);return}let n=this.rpc();if(!n?.call){this.setTab(t);return}try{await n.call(`hub:docks:activate`,{dockId:HT(e)}),this.keepFocus(),this.showView(e)}catch{this.setTab(t)}}static ɵfac=function(t){return new(t||e)};static ɵcmp=Gh({type:e,selectors:[[`app-root`]],viewQuery:function(e,t){e&1&&l_(t.nav,VZ,5)(t.main,HZ,5),e&2&&u_(2)},hostVars:4,hostBindings:function(e,t){e&1&&W(`message`,function(e){return t.inspectFromPanel(e)},Nu),e&2&&K(`--%NS%accent`,t.viewAccent()?.accent??null)(`--%NS%accent-text`,t.viewAccent()?.text??null)},decls:29,vars:22,consts:[[`nav`,``],[`main`,``],[1,`brand`],[1,`mark`],[`width`,`22`,`height`,`22`,`viewBox`,`0 0 256 256`,`aria-hidden`,`true`],[`width`,`22`,`height`,`22`,`viewBox`,`0 0 32 32`,`aria-hidden`,`true`],[`width`,`24`,`height`,`17`,`viewBox`,`0 0 256 182`,`aria-hidden`,`true`],[`width`,`22`,`height`,`22`,`viewBox`,`0 0 24 24`,`fill`,`currentColor`,`aria-hidden`,`true`],[`width`,`20`,`height`,`22`,`viewBox`,`0 0 223 236`,`aria-hidden`,`true`],[`width`,`30`,`height`,`30`,`viewBox`,`0 0 500 500`,`aria-hidden`,`true`],[1,`title`],[`aria-label`,`Inspectors`,3,`scroll`,`keydown`],[`role`,`toolbar`,`aria-label`,`Inspectors`,`aria-orientation`,`horizontal`,1,`tab-bar`],[1,`full-panel`,3,`href`],[`role`,`status`,1,`status`],[`aria-hidden`,`true`,1,`dot`],[`tabindex`,`-1`],[`role`,`status`,1,`background-note`],[`role`,`alert`,1,`connection-error`],[3,`info`],[`role`,`status`,1,`turned-off`],[1,`turned-off`],[`fill`,`#3c5afd`,`d`,`M237.248 18.752q18.061 18.06 18.748 45.247V192c-.457 18.12-6.707 33.207-18.748 45.247c-12.04 12.04-27.127 18.291-45.251 18.752H63.999q-27.187-.69-45.247-18.752C6.712 225.208.46 210.121 0 192.001V64q.69-27.187 18.752-45.247Q36.812.692 63.999 0h127.998c18.124.46 33.211 6.711 45.251 18.752m-17.655 103q-6.033-6.003-6.28-15.066V64q-.192-9.063-6.221-15.091c-4.02-4.023-9.054-6.093-15.095-6.22h-21.312v106.626L85.315 42.687H63.999c-6.042.128-11.072 2.198-15.091 6.221c-4.023 4.02-6.093 9.05-6.22 15.09v42.688q-.249 9.063-6.281 15.066q-6.03 5.996-15.091 6.246q9.062.255 15.09 6.25c4.024 4.002 6.115 9.024 6.281 15.066V192c.128 6.037 2.198 11.072 6.221 15.091q6.03 6.03 15.09 6.22h21.317V106.687l85.37 106.627h21.312c6.041-.128 11.076-2.202 15.095-6.221s6.093-9.054 6.22-15.09v-42.688q.249-9.063 6.281-15.066q6.03-5.995 15.091-6.25q-9.062-.25-15.09-6.246`],[`fill`,`#53b9ff`,`d`,`M39.863 54.115L.311 93.716l60.995 61.179L0 216.385l39.428 39.619l61.43-61.507l61.097 61.068l39.552-39.602z`],[`fill`,`#119eff`,`d`,`m140.517 154.896l-39.658 39.601l61.097 61.069l39.552-39.602z`],[`fill-opacity`,`.2`,`d`,`m140.517 154.896l-39.658 39.601l15.267 15.182z`],[`fill`,`#53b9ff`,`d`,`M194.57 100.985L256 39.478L216.431 0l-61.412 61.384L93.917.311L54.365 39.913L216.01 201.761l39.552-39.602z`],[`fill`,`#119eff`,`d`,`m115.36 100.987l39.659-39.602L93.917.313L54.365 39.914z`],[`fill-opacity`,`.2`,`d`,`m115.359 100.985l39.659-39.601l-15.271-15.186z`],[`id`,`an-mark-grad`,`x1`,`0`,`y1`,`0`,`x2`,`1`,`y2`,`1`],[`offset`,`0`,`stop-color`,`#f0224f`],[`offset`,`1`,`stop-color`,`#c4002d`],[`d`,`M16 0C27.2 0 32 4.8 32 16S27.2 32 16 32 0 27.2 0 16 4.8 0 16 0Z`,`fill`,`url(#an-mark-grad)`],[`transform`,`translate(6.4 6.4) scale(0.8)`,`fill`,`#fff`],[`d`,`M14.8486 0L23.138 16.8551L23.9996 3.99892L14.8486 0Z`],[`d`,`M16.9875 17.7114H7.01272L5.73926 20.627L12.0001 24L18.261 20.627L16.9875 17.7114Z`],[`d`,`M8.72168 13.9298H15.2812L11.9997 6.39575L8.72168 13.9298Z`],[`d`,`M9.15103 0L0 3.99892L0.861556 16.8551L9.15103 0Z`],[`fill`,`#c30f2e`,`d`,`M152.228.001L48.455 181.046H256L152.228 0z`],[`fill`,`#dd0330`,`d`,`M88.314 26.967L0 181.52h176.628L88.315 26.967z`],[`fill`,`#fff`,`d`,`M18.167 135.294h220.236v-2.419H18.167z`],[`fill`,`#fff`,`d`,`M204.38 170.667c-.861 0-1.67-.358-2.348-1.034c-4.045-4.063-4.221-20.586-4.026-45.33c.11-13.521.257-32.043-1.9-33.504c-2.104.873-2.315 16.172-2.451 26.301c-.162 11.785-.327 23.98-2.242 30.189c-.57 1.84-1.306 3.525-2.786 3.39c-2.086-.185-2.76-3.48-4.317-16.478c-.647-5.4-1.317-10.98-2.101-13.14a11 11 0 0 0-.269-.66c-.835 1.889-1.8 7.079-2.47 10.682c-.927 4.976-1.803 9.676-2.9 11.726c-.847 1.575-2.19 3.63-4.067 3.231c-2.558-.537-3.323-5.693-3.552-8.719c0-25.455-3.33-28.417-3.997-28.753l-.107.081l-.162-.036c-2.377 1.038-2.506 9.294-2.627 17.276c-.096 5.856-.198 12.492-1.053 18.701c-1.108 8.05-2.448 9.603-4.115 9.507c-3.838-.262-3.95-13.482-3.95-14.987c0-.472.012-1.028.027-1.642c.074-3.076.205-8.8-1.687-10.604c-.25-.239-.603-.515-.879-.437c-1.347.339-2.745 4.714-3.209 6.153c-.147.457-.265.833-.364 1.09c-.078.214-.177.515-.294.88c-1.02 3.095-2.18 6.183-4.16 6.944c-.732.284-1.498.222-2.216-.183c-.953-.541-1.73-1.646-2.455-3.482c-.397-1.016-.735-2.046-1.082-3.081c-.419-1.263-.85-2.569-1.384-3.808c-.419-.965-1.464-1.4-2.796-1.164c-2.768.494-3.232 3.29-3.622 7.5c-.07.733-.137 1.452-.228 2.128c-.011.198-.501 6.38-.814 8.344c-.865 5.39-2.002 7.512-3.89 7.358c-4.66-.398-6.798-20.836-6.684-29.47c.088-6.592-1.104-9-1.818-9.382c-.074-.034-.189-.096-.46.095c-.843.571-1.594 2.348-1.363 4.215c2.566 20.32.674 43.592-3.96 48.833c-1.46 1.649-3.448 1.627-4.832.236c-4.049-4.064-4.218-20.586-4.026-45.33c.11-13.521.254-32.043-1.9-33.504c-2.105.873-2.311 16.172-2.45 26.301c-.163 11.785-.329 23.98-2.246 30.189c-.57 1.84-1.307 3.525-2.782 3.39c-2.091-.186-2.761-3.48-4.321-16.478c-.649-5.4-1.319-10.98-2.101-13.14c-.1-.273-.189-.49-.27-.66c-.832 1.889-1.796 7.079-2.466 10.682c-.927 4.976-1.803 9.676-2.904 11.726c-.846 1.575-2.19 3.63-4.063 3.231c-2.558-.537-3.324-5.693-3.552-8.719c-.003-25.455-3.33-28.417-3.997-28.753l-.106.081l-.166-.036c-2.374 1.038-2.503 9.293-2.629 17.276c-.091 5.856-.194 12.492-1.048 18.701c-1.107 8.05-2.437 9.618-4.111 9.507c-3.846-.262-3.958-13.482-3.958-14.987c0-.472.016-1.028.03-1.642c.074-3.076.207-8.8-1.685-10.604c-.25-.239-.603-.515-.88-.438c-1.347.34-2.75 4.715-3.206 6.155a47 47 0 0 1-.364 1.09q-.16.432-.298.875c-1.02 3.096-2.18 6.187-4.155 6.95c-.736.282-1.506.22-2.22-.185c-.953-.541-1.734-1.646-2.454-3.482c-.398-1.016-.74-2.046-1.083-3.081c-.42-1.263-.854-2.569-1.387-3.808c-.416-.965-1.465-1.4-2.797-1.164c-3.188.567-3.943 4.52-4.55 9.238l-.106.839l-2.411-.32l.114-.824c.527-4.137 1.328-10.39 6.53-11.31c2.446-.435 4.585.581 5.446 2.583c.578 1.34 1.031 2.695 1.466 4.008c.324.99.654 1.98 1.037 2.959c.674 1.708 1.197 2.15 1.392 2.257c1.218-.38 2.462-4.167 2.873-5.414c.13-.402.24-.732.328-.968c.085-.233.195-.571.328-.98c1.097-3.43 2.474-7.144 4.918-7.762c.747-.191 1.903-.166 3.157 1.035c2.665 2.544 2.525 8.48 2.433 12.41c-.014.59-.028 1.126-.028 1.583c0 6.272.93 10.655 1.64 12.16c.367-.77.998-2.63 1.598-7.007c.831-6.066.938-12.624 1.027-18.41c.161-10.24.275-17.663 3.982-19.408c.552-.339 1.469-.522 2.436-.033c3.586 1.803 5.326 11.885 5.326 30.817c.225 2.926 1.013 6.006 1.66 6.448c.004-.066.53-.39 1.394-2.01c.925-1.718 1.845-6.665 2.655-11.026c1.792-9.614 2.606-12.989 4.726-13.166c1.615-.158 2.362 1.896 2.676 2.76c.883 2.422 1.537 7.888 2.23 13.678c.54 4.49 1.31 10.902 2.094 13.497c.084-.228.18-.5.283-.836c1.815-5.878 1.98-17.887 2.14-29.507c.22-16.14.503-26.139 3.448-28.226a2.44 2.44 0 0 1 2.233-.316c3.448 1.144 3.714 11.254 3.519 35.8c-.14 17.799-.313 39.952 3.323 43.603c.317.32.542.32.622.32c.17 0 .413-.161.67-.452c3.681-4.162 6.01-26.022 3.372-46.927c-.328-2.602.677-5.337 2.392-6.514c.946-.652 2.036-.736 2.978-.232c2.145 1.14 3.187 5.024 3.102 11.546c-.15 11.387 2.584 24.714 4.37 26.842c.282-.471.842-1.763 1.379-5.145c.301-1.87.799-8.153.806-8.216c.09-.71.155-1.398.217-2.097c.369-3.924.82-8.804 5.613-9.654c2.444-.435 4.583.577 5.448 2.583c.577 1.34 1.027 2.695 1.46 4.008c.332.99.664 1.98 1.046 2.959c.67 1.708 1.197 2.15 1.387 2.257c1.218-.38 2.467-4.167 2.875-5.41c.132-.402.243-.737.328-.973c.088-.228.195-.57.324-.979c1.1-3.43 2.477-7.144 4.924-7.762c.74-.191 1.9-.166 3.154 1.035c2.665 2.543 2.526 8.48 2.437 12.41q-.029.792-.033 1.583c0 6.272.931 10.655 1.641 12.16c.365-.77.994-2.63 1.601-7.007c.832-6.066.931-12.624 1.027-18.41c.159-10.24.273-17.663 3.98-19.408c.55-.339 1.467-.522 2.44-.033c3.58 1.803 5.325 11.884 5.325 30.817c.224 2.926 1.012 6.006 1.656 6.448c.008-.066.526-.39 1.399-2.01c.923-1.718 1.84-6.665 2.653-11.026c1.786-9.614 2.602-12.989 4.722-13.166c1.62-.158 2.367 1.896 2.68 2.76c.88 2.422 1.535 7.888 2.233 13.678c.534 4.49 1.304 10.902 2.092 13.497c.08-.228.176-.5.28-.836c1.813-5.878 1.976-17.887 2.138-29.507c.216-16.14.504-26.139 3.448-28.226a2.45 2.45 0 0 1 2.234-.316c3.452 1.144 3.718 11.254 3.52 35.8c-.141 17.799-.314 39.952 3.319 43.603c.324.32.544.32.63.32c.165 0 .408-.161.662-.452c3.687-4.162 6.014-26.022 3.375-46.927c-.342-2.723.43-5.47 1.84-6.526c.71-.537 1.575-.647 2.37-.313c2.054.877 3.445 4.63 4.255 11.484c.339 2.87.641 5.974.931 9.036c.641 6.683 1.509 15.69 2.684 17.67c.36-.46 1.096-1.704 2.19-5.038l2.307.753c-1.696 5.157-3.026 7.1-4.755 6.902c-2.69-.299-3.468-5.734-4.84-20.055c-.29-3.048-.59-6.132-.928-8.989c-1.03-8.74-2.782-9.532-2.801-9.54c-.342.174-1.137 1.992-.842 4.31c2.558 20.32.673 43.597-3.964 48.834c-.747.842-1.587 1.27-2.485 1.27`],[`d`,`M12.024.017V0L12 .008L11.976 0v.017L.812 3.892l1.605 14.875l9.559 5.207V24l.024-.013l.024.013v-.026l9.559-5.207l1.605-14.875zm6.868 14.244q-1.64 3.948-6.031 4.166c-2.829 0-4.661-1.7-4.66-1.7q-1.745-1.359-2.398-3.417c-.695-.76-.702-.841-.774-1.145c-.072-.303.045-.388.249-.685q.204-.298.098-.85q-.26-.36-.3-1.128q0-.37.496-.783q.495-.413.607-.632q.083-.119.065-1.031q-.006-.897.995-.975c1-.08 1.565-.832 1.879-1.174c.21-.228.52-.339.91-.341c.551-.026 1.052.185 1.484.62c1.075-.055 2.176.235 3.292.863q2.379 1.414 2.596 3.055q-.257 2.158-5.788-.113q-2.895.819-2.846 3.552q0 2.508 2.422 3.643c-.787-.772-1.122-1.422-1.01-1.959q2.456 2.906 5.588 2.173c-.92.032-1.65-.264-2.198-.893q2.116-.05 3.998-1.972c-.724.576-1.482.794-2.284.657q3.26-2.563 2.307-5.98l-.002-.006a3.02 3.02 0 0 1 .788 2.03q.023 1.175-.795 2.477q.613-.478 1.413-2.047c.23 2.117-.625 3.724-2.574 4.825q.934-.085 2.473-1.23m-5.567-6.63a.319.319 0 1 1 .638 0a.319.319 0 0 1-.638 0`],[`id`,`ng-grad`,`x1`,`49`,`x2`,`226`,`y1`,`214`,`y2`,`130`,`gradientUnits`,`userSpaceOnUse`],[`stop-color`,`#E40035`],[`offset`,`.24`,`stop-color`,`#F60A48`],[`offset`,`.352`,`stop-color`,`#F20755`],[`offset`,`.494`,`stop-color`,`#DC087D`],[`offset`,`.745`,`stop-color`,`#9717E7`],[`offset`,`1`,`stop-color`,`#6C00F5`],[`fill`,`url(#ng-grad)`,`d`,`m222.077 39.192-8.019 125.923L137.387 0l84.69 39.192Zm-53.105 162.825-57.933 33.056-57.934-33.056 11.783-28.556h92.301l11.783 28.556ZM111.039 62.675l30.357 73.803H80.681l30.358-73.803ZM7.937 165.115 0 39.192 84.69 0 7.937 165.115Z`],[`width`,`500`,`height`,`500`,`rx`,`112`,`fill`,`#1c1a17`],[`transform`,`translate(250 252) scale(1.38) translate(-120 -129)`],[`id`,`pi-mark-mask`],[`x`,`-60`,`y`,`-60`,`width`,`360`,`height`,`380`,`fill`,`#fff`],[`fill`,`none`,`stroke`,`#000`,`stroke-width`,`30`,`stroke-linejoin`,`miter`],[`d`,`M88 66 V196`],[`d`,`M88 66 H143 L170 98 L143 130 H88 Z`],[`id`,`pi-mark-clip`],[`x`,`-40`,`y`,`129`,`width`,`320`,`height`,`200`],[`transform`,`rotate(-10 120 129)`],[`cx`,`120`,`cy`,`129`,`rx`,`128`,`ry`,`34`,`fill`,`none`,`stroke`,`#78350f`,`stroke-width`,`10`],[`mask`,`url(#pi-mark-mask)`],[`fill`,`#fbbf24`,`d`,`M120 5 L2 46 L22 198 L120 253 Z`],[`fill`,`#f59e0b`,`d`,`M120 5 L238 46 L218 198 L120 253 Z`],[`clip-path`,`url(#pi-mark-clip)`,`cx`,`120`,`cy`,`129`,`rx`,`128`,`ry`,`34`,`fill`,`none`,`stroke`,`#1c1a17`,`stroke-width`,`22`],[`clip-path`,`url(#pi-mark-clip)`,`cx`,`120`,`cy`,`129`,`rx`,`128`,`ry`,`34`,`fill`,`none`,`stroke`,`#fde68a`,`stroke-width`,`10`],[`transform`,`translate(230.9 146.0) rotate(10) scale(1.5) translate(-4 -4)`],[`x1`,`9`,`y1`,`9`,`x2`,`21`,`y2`,`21`,`stroke`,`#1c1a17`,`stroke-width`,`14`,`stroke-linecap`,`round`],[`r`,`16`,`fill`,`#1c1a17`],[`x1`,`9`,`y1`,`9`,`x2`,`21`,`y2`,`21`,`stroke`,`#fde68a`,`stroke-width`,`7`,`stroke-linecap`,`round`],[`r`,`12`,`fill`,`#1c1a17`,`stroke`,`#fde68a`,`stroke-width`,`5`],[`type`,`button`,3,`active`],[`type`,`button`,3,`click`],[3,`name`],[1,`full-panel`,3,`click`,`href`],[`width`,`14`,`height`,`14`,`viewBox`,`0 0 24 24`,`aria-hidden`,`true`],[`x`,`3`,`y`,`3`,`width`,`7`,`height`,`7`,`rx`,`1.5`],[`x`,`14`,`y`,`3`,`width`,`7`,`height`,`7`,`rx`,`1.5`],[`x`,`3`,`y`,`14`,`width`,`7`,`height`,`7`,`rx`,`1.5`],[`x`,`14`,`y`,`14`,`width`,`7`,`height`,`7`,`rx`,`1.5`],[`target`,`_blank`,`rel`,`noopener noreferrer`,3,`href`],[1,`sr-only`],[3,`rpc`],[3,`rpc`,`focus`],[3,`navigate`,`rpc`],[3,`focusHandled`,`showForm`,`rpc`,`focus`],[3,`showComponent`,`rpc`],[3,`focusHandled`,`rpc`,`focus`]],template:function(e,t){if(e&1&&(R(0,`header`)(1,`h1`,2)(2,`span`,3),N(3,GZ,2,0,`:svg:svg`,4)(4,KZ,7,0,`:svg:svg`,4)(5,qZ,11,0,`:svg:svg`,5)(6,JZ,5,0,`:svg:svg`,6)(7,YZ,2,0,`:svg:svg`,7)(8,XZ,10,0,`:svg:svg`,8)(9,ZZ,24,0,`:svg:svg`,9),z(),R(10,`span`,10),J(11),z()(),R(12,`nav`,11,0),W(`scroll`,function(){return t.measureNav()})(`keydown`,function(e){return t.onNavKey(e)}),N(14,$Z,3,0,`div`,12),z(),N(15,eQ,7,1,`a`,13),R(16,`span`,14)(17,`span`,15),B(18,`span`),z(),J(19),z()(),R(20,`main`,16,1)(22,`p`,17),J(23),z(),N(24,tQ,5,0,`div`,18)(25,nQ,1,1,`app-coming-soon`,19)(26,rQ,2,0,`p`,20)(27,aQ,10,2,`p`,21)(28,vQ,2,2),z()),e&2){let e,n;j(2),q(`ng-mark`,t.view()===`angular`)(`pi-mark`,!t.view()),j(),P(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),j(7),q(`ng-text`,t.view()===`angular`),j(),Y(t.title()),j(),q(`fade-start`,t.navFade().start)(`fade-end`,t.navFade().end),j(2),P(t.availableTabs().length>1?14:-1),j(),P((e=t.fullPanelLink())?15:-1,e),j(),q(`connected`,t.connected())(`failed`,t.connectionFailed()),j(3),X(` `,t.connected()?`Live`:t.connectionFailed()?`Disconnected`:`Connecting…`,` `),j(),M(`aria-label`,t.mainLabel()),j(3),Y(t.backgroundNote()),j(),P(t.connectionFailed()?24:(n=t.comingSoon())?25:t.view()===`angular-native`&&!t.nativePageId()?26:t.tabEnabled(t.tab(),t.config())?28:27,n)}},dependencies:[OD,FM,mI,PL,oz,xV,zU,oG,Eq,wY,hZ,jY,JE],styles:[`[_nghost-%COMP%] { --%NS%accent-soft: color-mix(in srgb, var(--%NS%accent) 12%, transparent); --%NS%accent-line: color-mix(in srgb, var(--%NS%accent) 45%, transparent); display: flex; diff --git a/extension/ui/index.html b/extension/ui/index.html index 3bb7d1e3..a928c575 100644 --- a/extension/ui/index.html +++ b/extension/ui/index.html @@ -9,7 +9,7 @@ Pangular Inspector - + diff --git a/packages/devtools/src/__tests__/cd-flash.test.ts b/packages/devtools/src/__tests__/cd-flash.test.ts new file mode 100644 index 00000000..a72b3c56 --- /dev/null +++ b/packages/devtools/src/__tests__/cd-flash.test.ts @@ -0,0 +1,326 @@ +// @vitest-environment jsdom +import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'; +import { + FLASH_FADE_MS, + FLASH_STILL_MS, + MAX_FLASH_BOXES, + createCdFlash, + type FlashContext, +} from '../cd-flash.ts'; +import { PROFILER_EVENT as E } from '../cd-recorder.ts'; + +type Profiler = (event: number, instance?: unknown, hook?: unknown) => void; + +class Cart {} +class _Price {} + +/** Mirrors Angular's v20+ profiler registry and `ng.getHostElement`. */ +function fakeNg() { + const profilers: Profiler[] = []; + const hosts = new Map(); + return { + profilers, + hosts, + ɵsetProfiler: vi.fn((profiler: Profiler) => { + profilers.push(profiler); + return () => profilers.splice(profilers.indexOf(profiler), 1); + }), + getHostElement: (instance: object) => hosts.get(instance) ?? null, + emit(event: number, instance?: unknown) { + for (const profiler of [...profilers]) profiler(event, instance); + }, + }; +} + +/** A context that keeps what was drawn, with the alpha each label was drawn at. */ +function fakeContext() { + const labels: { text: string; alpha: number; x: number; y: number }[] = []; + const ctx = { + globalAlpha: 1, + fillStyle: '', + strokeStyle: '', + lineWidth: 1, + font: '', + textBaseline: 'alphabetic', + setTransform: vi.fn(), + clearRect: vi.fn(), + fillRect: vi.fn(), + strokeRect: vi.fn(), + measureText: (text: string) => ({ width: text.length * 6 }), + fillText(text: string, x: number, y: number) { + labels.push({ text, alpha: ctx.globalAlpha, x, y }); + }, + }; + return { ctx: ctx as unknown as FlashContext & typeof ctx, labels }; +} + +function fakeWindow(options: { reduced?: boolean } = {}) { + let frames: FrameRequestCallback[] = []; + const win = { + innerWidth: 800, + innerHeight: 600, + devicePixelRatio: 2, + scrollX: 0, + scrollY: 0, + requestAnimationFrame: vi.fn((fn: FrameRequestCallback) => { + frames.push(fn); + return frames.length; + }), + cancelAnimationFrame: vi.fn(() => { + frames = []; + }), + matchMedia: vi.fn((query: string) => ({ + matches: query.includes('reduced-motion') && options.reduced === true, + })), + /** Runs the frames queued so far. */ + frame() { + const run = frames; + frames = []; + for (const fn of run) fn(0); + }, + get queued() { + return frames.length; + }, + }; + return win; +} + +function hostFor(ng: ReturnType, instance: object, rect: Partial = {}) { + const el = document.createElement('app-cart'); + document.body.appendChild(el); + const box = { top: 10, left: 20, width: 100, height: 40, ...rect }; + el.getBoundingClientRect = vi.fn(() => box as DOMRect); + ng.hosts.set(instance, el); + return el; +} + +function setup(options: { reduced?: boolean } = {}) { + document.body.innerHTML = ''; + const ng = fakeNg(); + const win = fakeWindow(options); + const { ctx, labels } = fakeContext(); + vi.spyOn(HTMLCanvasElement.prototype, 'getContext').mockImplementation( + () => ctx as unknown as CanvasRenderingContext2D, + ); + let t = 0; + const flash = createCdFlash({ + getNg: () => ng, + win: win as unknown as Window, + now: () => t, + }); + const check = (instance: object, times = 1) => { + for (let i = 0; i < times; i++) { + ng.emit(E.ComponentStart); + ng.emit(E.ComponentEnd, instance); + } + }; + return { + ng, + win, + ctx, + labels, + flash, + check, + advance: (ms: number) => (t += ms), + overlay: () => document.getElementById('pangular-cd-flash'), + }; +} + +describe('flash overlay', () => { + beforeEach(() => vi.restoreAllMocks()); + afterEach(() => { + vi.restoreAllMocks(); + document.body.innerHTML = ''; + }); + + it('adds no profiler listener and no element while it is off', () => { + const { ng, flash, check, win, overlay } = setup(); + hostFor(ng, new Cart()); + check(new Cart()); + expect(ng.ɵsetProfiler).not.toHaveBeenCalled(); + expect(ng.profilers).toHaveLength(0); + expect(win.requestAnimationFrame).not.toHaveBeenCalled(); + expect(overlay()).toBeNull(); + expect(flash.on).toBe(false); + }); + + it('removes its listener, frame and canvas when turned off', () => { + const { ng, flash, check, win, overlay } = setup(); + const cart = new Cart(); + hostFor(ng, cart); + expect(flash.set(true)).toBe(true); + expect(ng.profilers).toHaveLength(1); + check(cart); + win.frame(); + expect(overlay()).not.toBeNull(); + check(cart); + flash.set(false); + expect(ng.profilers).toHaveLength(0); + expect(win.cancelAnimationFrame).toHaveBeenCalled(); + expect(overlay()).toBeNull(); + }); + + it('measures hosts once per frame, never inside the profiler callback', () => { + const { ng, flash, check, win } = setup(); + const cart = new Cart(); + const price = new _Price(); + const cartHost = hostFor(ng, cart); + const priceHost = hostFor(ng, price, { top: 100 }); + flash.set(true); + check(cart, 5); + check(price, 2); + expect(win.requestAnimationFrame).toHaveBeenCalledTimes(1); + expect(cartHost.getBoundingClientRect).not.toHaveBeenCalled(); + win.frame(); + expect(cartHost.getBoundingClientRect).toHaveBeenCalledTimes(1); + expect(priceHost.getBoundingClientRect).toHaveBeenCalledTimes(1); + }); + + it('labels each box with the class name and the checks since it appeared', () => { + const { ng, flash, check, win, labels, advance } = setup(); + const cart = new Cart(); + const price = new _Price(); + hostFor(ng, cart); + hostFor(ng, price, { top: 200 }); + flash.set(true); + check(cart, 2); + check(price); + win.frame(); + expect(labels.map((l) => l.text)).toEqual(['Cart ×2', 'Price ×1']); + + labels.length = 0; + advance(500); + check(cart); + win.frame(); + expect(labels.map((l) => l.text)).toContain('Cart ×3'); + + // Once a box has faded, the next check starts a new one at 1. + advance(FLASH_FADE_MS); + win.frame(); + labels.length = 0; + check(cart); + win.frame(); + expect(labels.map((l) => l.text)).toEqual(['Cart ×1']); + }); + + it('fades a box out over a second and then stops drawing', () => { + const { ng, flash, check, win, labels, advance, ctx } = setup(); + const cart = new Cart(); + hostFor(ng, cart); + flash.set(true); + check(cart); + win.frame(); + advance(250); + win.frame(); + advance(500); + win.frame(); + const alphas = labels.map((l) => l.alpha); + expect(alphas[0]).toBe(1); + expect(alphas[1]).toBeCloseTo(0.75); + expect(alphas[2]).toBeCloseTo(0.25); + advance(300); + win.frame(); + expect(win.queued).toBe(0); + expect(ctx.clearRect).toHaveBeenCalledTimes(4); + }); + + it('shows a short still outline without fading under reduced motion', () => { + const { ng, flash, check, win, labels, advance, ctx } = setup({ reduced: true }); + const cart = new Cart(); + hostFor(ng, cart); + flash.set(true); + check(cart); + win.frame(); + advance(FLASH_STILL_MS / 2); + win.frame(); + // Nothing changed, so nothing is drawn again. + expect(labels).toHaveLength(1); + expect(labels[0].alpha).toBe(1); + advance(FLASH_STILL_MS / 2); + win.frame(); + expect(labels).toHaveLength(1); + expect(ctx.clearRect).toHaveBeenCalledTimes(2); + expect(win.queued).toBe(0); + }); + + it(`draws at most ${MAX_FLASH_BOXES} boxes at once`, () => { + const { ng, flash, check, win, ctx } = setup(); + flash.set(true); + for (let i = 0; i < MAX_FLASH_BOXES + 50; i++) { + const instance = new Cart(); + hostFor(ng, instance, { top: i }); + check(instance); + } + win.frame(); + expect(ctx.strokeRect).toHaveBeenCalledTimes(MAX_FLASH_BOXES); + }); + + it('sizes the canvas for the device pixel ratio and follows a resize', () => { + const { ng, flash, check, win, overlay, ctx } = setup(); + const cart = new Cart(); + hostFor(ng, cart); + flash.set(true); + check(cart); + win.frame(); + const canvas = overlay()!.shadowRoot!.querySelector('canvas')!; + expect([canvas.width, canvas.height]).toEqual([1600, 1200]); + expect(ctx.setTransform).toHaveBeenLastCalledWith(2, 0, 0, 2, 0, 0); + win.innerWidth = 400; + win.devicePixelRatio = 1; + win.frame(); + expect([canvas.width, canvas.height]).toEqual([400, 600]); + }); + + it('keeps a box on its element when the page scrolls', () => { + const { ng, flash, check, win, labels } = setup(); + const cart = new Cart(); + hostFor(ng, cart, { top: 300, left: 20 }); + flash.set(true); + check(cart); + win.frame(); + expect(labels[0].y).toBe(300 - 16 + 2); + win.scrollY = 100; + win.frame(); + expect(labels[1].y).toBe(200 - 16 + 2); + }); + + it("draws inside its own shadow root and leaves the app's elements alone", () => { + const { ng, flash, check, win, overlay } = setup(); + const cart = new Cart(); + const host = hostFor(ng, cart); + flash.set(true); + check(cart); + win.frame(); + const el = overlay()!; + expect(el.getAttribute('aria-hidden')).toBe('true'); + expect(el.style.pointerEvents).toBe('none'); + expect(el.style.position).toBe('fixed'); + expect(el.shadowRoot!.querySelector('canvas')).not.toBeNull(); + expect(el.children).toHaveLength(0); + expect(host.getAttributeNames()).toEqual([]); + expect(host.children).toHaveLength(0); + }); + + it('schedules frames outside the Angular zone', () => { + const run = vi.fn((fn: () => T) => fn()); + vi.stubGlobal('Zone', { root: { run } }); + try { + const { ng, flash, check } = setup(); + const cart = new Cart(); + hostFor(ng, cart); + flash.set(true); + check(cart); + expect(run).toHaveBeenCalledTimes(1); + } finally { + vi.unstubAllGlobals(); + } + }); + + it('reports false and attaches nothing before Angular 20', () => { + const { ng, flash } = setup(); + document.body.innerHTML = ''; + expect(flash.set(true)).toBe(false); + expect(ng.profilers).toHaveLength(0); + expect(flash.on).toBe(false); + }); +}); diff --git a/packages/devtools/src/__tests__/cd-live.test.ts b/packages/devtools/src/__tests__/cd-live.test.ts new file mode 100644 index 00000000..2f23f753 --- /dev/null +++ b/packages/devtools/src/__tests__/cd-live.test.ts @@ -0,0 +1,235 @@ +// @vitest-environment jsdom +import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'; +import { attachChangeDetection } from '../cd-overlay.ts'; +import { createCdLive } from '../cd-live.ts'; +import { PERF_TRACK, PERF_TRACK_GROUP, createCdPerfTrack } from '../cd-perf-track.ts'; +import { PROFILER_EVENT as E } from '../cd-recorder.ts'; +import { toCdOptionsRequest } from '../cd-data.ts'; + +type Profiler = (event: number, instance?: unknown, hook?: unknown) => void; + +class Cart { + ngOnInit() {} +} + +function fakeNg(options: { enableProfiling?: boolean } = {}) { + const profilers: Profiler[] = []; + const ng = { + profilers, + ɵsetProfiler: vi.fn((profiler: Profiler) => { + profilers.push(profiler); + return () => profilers.splice(profilers.indexOf(profiler), 1); + }), + getHostElement: () => null, + emit(event: number, instance?: unknown, hook?: unknown) { + for (const profiler of [...profilers]) profiler(event, instance, hook); + }, + ...(options.enableProfiling ? { enableProfiling: vi.fn(() => () => {}) } : {}), + }; + return ng; +} + +function page() { + document.body.innerHTML = ''; +} + +function clock() { + let t = 0; + return { now: () => t, advance: (ms: number) => (t += ms) }; +} + +describe('Performance panel track', () => { + afterEach(() => vi.restoreAllMocks()); + + it('attaches nothing and writes nothing while it is off', () => { + page(); + const ng = fakeNg(); + const stamp = vi.fn(); + createCdPerfTrack({ getNg: () => ng, console: { timeStamp: stamp } as unknown as Console }); + ng.emit(E.ComponentStart); + ng.emit(E.ComponentEnd, new Cart()); + expect(ng.profilers).toHaveLength(0); + expect(stamp).not.toHaveBeenCalled(); + }); + + it('writes one entry per component check, hook and output on the Pangular track', () => { + page(); + const ng = fakeNg(); + const stamp = vi.fn(); + const time = clock(); + const track = createCdPerfTrack({ + getNg: () => ng, + now: time.now, + console: { timeStamp: stamp } as unknown as Console, + }); + expect(track.set(true)).toBe(true); + const cart = new Cart(); + function onAdd() {} + + ng.emit(E.OutputStart, cart, onAdd); + time.advance(1); + ng.emit(E.OutputEnd, cart, onAdd); + ng.emit(E.ComponentStart, cart); + time.advance(2); + ng.emit(E.LifecycleHookStart, cart, cart.ngOnInit); + time.advance(3); + ng.emit(E.LifecycleHookEnd, cart, cart.ngOnInit); + ng.emit(E.ComponentEnd, cart); + + expect(stamp.mock.calls).toEqual([ + ['Cart output (onAdd)', 0, 1, PERF_TRACK, PERF_TRACK_GROUP, 'tertiary'], + ['Cart.ngOnInit', 3, 6, PERF_TRACK, PERF_TRACK_GROUP, 'secondary'], + ['Cart', 1, 6, PERF_TRACK, PERF_TRACK_GROUP, 'primary'], + ]); + expect(PERF_TRACK).toBe('Pangular'); + + track.set(false); + expect(ng.profilers).toHaveLength(0); + ng.emit(E.ComponentStart); + ng.emit(E.ComponentEnd, cart); + expect(stamp).toHaveBeenCalledTimes(3); + }); + + it('does nothing where the console has no timeStamp', () => { + page(); + const ng = fakeNg(); + const track = createCdPerfTrack({ getNg: () => ng, console: {} as Console }); + expect(track.set(true)).toBe(false); + expect(ng.profilers).toHaveLength(0); + expect(track.on).toBe(false); + }); +}); + +describe('change detection views', () => { + afterEach(() => vi.restoreAllMocks()); + + it('calls ng.enableProfiling once and reports it as on for good', () => { + page(); + const ng = fakeNg({ enableProfiling: true }); + const live = createCdLive({ getNg: () => ng }); + expect(live.report()).toBeUndefined(); + live.apply({ angularProfiling: true }); + live.apply({ angularProfiling: true }); + expect(ng.enableProfiling).toHaveBeenCalledTimes(1); + live.stop(); + expect(live.report()).toMatchObject({ + angularProfiling: true, + angularProfilingAvailable: true, + }); + }); + + it('reports Angular profiling as unavailable without ng.enableProfiling', () => { + page(); + const live = createCdLive({ getNg: () => fakeNg() }); + live.apply({ angularProfiling: true }); + expect(live.report()).toEqual({ + flash: false, + track: false, + angularProfiling: false, + angularProfilingAvailable: false, + }); + }); + + it('reads only known fields from a request, and never a request to stop profiling', () => { + expect( + toCdOptionsRequest({ flash: true, track: 'yes', angularProfiling: false, x: 1 }), + ).toEqual({ flash: true }); + expect(toCdOptionsRequest(null)).toEqual({}); + }); + + it('shares the one Angular profiler with the recorder', () => { + page(); + const ng = fakeNg(); + vi.spyOn(HTMLCanvasElement.prototype, 'getContext').mockReturnValue(null); + const handlers = new Map unknown>(); + const my = { + rpc: { + call: async () => undefined, + register: (def: { name: string; handler: (...args: unknown[]) => unknown }) => + handlers.set(def.name, def.handler), + }, + }; + attachChangeDetection(my, 'p1', () => ng, 50); + handlers.get('change-detection-record')!({ pageId: 'p1', on: true }); + handlers.get('change-detection-options')!({ pageId: 'p1', flash: true, track: true }); + expect(ng.ɵsetProfiler).toHaveBeenCalledTimes(1); + expect(ng.profilers).toHaveLength(1); + }); +}); + +describe('change detection views through the page overlay', () => { + const had = Object.getOwnPropertyDescriptor(console, 'timeStamp'); + beforeEach(() => { + Object.defineProperty(console, 'timeStamp', { value: vi.fn(), configurable: true }); + }); + afterEach(() => { + vi.restoreAllMocks(); + if (had) Object.defineProperty(console, 'timeStamp', had); + else delete (console as { timeStamp?: unknown }).timeStamp; + }); + + function setup() { + page(); + const ng = fakeNg({ enableProfiling: true }); + vi.spyOn(HTMLCanvasElement.prototype, 'getContext').mockReturnValue(null); + const sent: { name: string; args: unknown[] }[] = []; + const handlers = new Map unknown>(); + const my = { + rpc: { + call: async (name: string, ...args: unknown[]) => { + sent.push({ name, args }); + return undefined; + }, + register: (def: { name: string; handler: (...args: unknown[]) => unknown }) => + handlers.set(def.name, def.handler), + }, + }; + const cd = attachChangeDetection(my, 'p1', () => ng, 50); + const last = () => + sent.filter((s) => s.name === 'push-change-detection').at(-1)?.args[0] as + { pageId: string; options?: Record } | undefined; + return { ng, cd, handlers, last, options: handlers.get('change-detection-options')! }; + } + + it('turns views on for its own page only and reports them with its pageId', async () => { + const { ng, options, last } = setup(); + options({ pageId: 'other', flash: true }); + expect(ng.profilers).toHaveLength(0); + expect(last()).toBeUndefined(); + + options({ pageId: 'p1', flash: true }); + await Promise.resolve(); + expect(ng.profilers).toHaveLength(1); + expect(last()).toMatchObject({ + pageId: 'p1', + options: { flash: true, track: false, angularProfiling: false }, + }); + + options({ track: true, angularProfiling: true }); + await Promise.resolve(); + expect(last()?.options).toEqual({ + flash: true, + track: true, + angularProfiling: true, + angularProfilingAvailable: true, + }); + + options({ flash: false, track: false }); + expect(ng.profilers).toHaveLength(0); + }); + + it('turns the views off when the overlay stops', () => { + const { ng, cd, options } = setup(); + options({ flash: true, track: true }); + expect(ng.profilers).toHaveLength(1); + cd.stop(); + expect(ng.profilers).toHaveLength(0); + }); + + it('leaves options out of the report until a view is asked for', async () => { + const { handlers, last } = setup(); + handlers.get('change-detection-record')!({ pageId: 'p1', on: true }); + await Promise.resolve(); + expect(last()).not.toHaveProperty('options'); + }); +}); diff --git a/packages/devtools/src/__tests__/cd-views-tool.test.ts b/packages/devtools/src/__tests__/cd-views-tool.test.ts new file mode 100644 index 00000000..74e4865f --- /dev/null +++ b/packages/devtools/src/__tests__/cd-views-tool.test.ts @@ -0,0 +1,112 @@ +import { createHostContext } from 'devframe/node'; +import { describe, expect, it, vi } from 'vitest'; +import pangular from '../devframe.ts'; +import { RPC_INSPECTOR } from '../config.ts'; + +async function boot() { + const host = { + mountStatic: () => {}, + resolveOrigin: () => 'http://localhost', + getStorageDir: () => '', + }; + const ctx = await createHostContext({ cwd: process.cwd(), mode: 'dev', host: host as never }); + await pangular.setup(ctx as never); + const sent: { method: string; args: [Record] }[] = []; + vi.spyOn(ctx.rpc, 'broadcast').mockImplementation((async (options: (typeof sent)[number]) => { + sent.push(options); + }) as never); + const push = (name: string, payload: unknown) => + ctx.rpc.invokeLocal(`pangular:${name}` as never, ...([payload] as never)); + const call = async (args: Record) => + ((await ctx.agent.invoke('pangular:change-detection', args)) as { markdown: string }).markdown; + const options = () => sent.filter((s) => s.method === 'pangular:change-detection-options'); + return { push, call, sent, options }; +} + +const report = (pageId: string, options?: Record) => ({ + pageId, + supported: true, + recording: false, + startedAt: null, + dropped: 0, + cycles: [], + components: [], + hosts: {}, + ...(options ? { options } : {}), +}); + +describe('change detection views', () => { + it('belongs to the components inspector', () => { + expect(RPC_INSPECTOR['request-change-detection-options']).toBe('components'); + }); + + it('sends the panel request to the page with only the known fields', async () => { + const { push, options } = await boot(); + await push('request-change-detection-options', { + pageId: 'p1', + flash: true, + track: 'x', + angularProfiling: false, + other: 1, + }); + expect(options()).toEqual([ + { + method: 'pangular:change-detection-options', + args: [{ pageId: 'p1', flash: true }], + optional: true, + }, + ]); + }); + + it('turns the flash overlay and the track on from the agent tool', async () => { + const { push, call, options } = await boot(); + await push('push-change-detection', report('p1')); + expect(await call({ page: 'gone', flash: true })).toMatch(/^No page `gone`/); + expect(options()).toEqual([]); + const text = await call({ page: 'p1', flash: true, track: true }); + expect(text).toContain('Flash overlay turned on for page `p1`'); + expect(text).toContain('"Pangular" track'); + expect(options().at(-1)!.args[0]).toEqual({ pageId: 'p1', flash: true, track: true }); + }); + + it('says Angular profiling stays on, and refuses to turn it off', async () => { + const { call, options } = await boot(); + expect(await call({ angularProfiling: true })).toContain('stays on until the page reloads'); + expect(options().at(-1)!.args[0]).toEqual({ pageId: undefined, angularProfiling: true }); + const off = await call({ angularProfiling: false }); + expect(off).toContain('cannot be turned off'); + expect(options().at(-1)!.args[0]).toEqual({ pageId: undefined }); + }); + + it('combines views with record, but not with export', async () => { + const { call, sent } = await boot(); + const text = await call({ record: 'start', flash: true }); + expect(text).toMatch(/^Recording started/); + expect(text).toContain('Flash overlay turned on'); + expect(sent.map((s) => s.method)).toEqual([ + 'pangular:change-detection-options', + 'pangular:change-detection-record', + ]); + expect(await call({ export: 'json', flash: true })).toMatch(/not both/); + }); + + it('keeps the views a page reports and lists them in the answer', async () => { + const { push, call } = await boot(); + await push( + 'push-change-detection', + report('p1', { + flash: true, + track: false, + angularProfiling: true, + angularProfilingAvailable: true, + extra: 'dropped', + }), + ); + const text = await call({ page: 'p1' }); + expect(text).toContain( + 'Live views: flash overlay on, Performance panel track off, Angular profiling on until the page reloads.', + ); + await push('push-change-detection', report('p2')); + expect(await call({ page: 'p2' })).not.toContain('Live views'); + }); +}); diff --git a/packages/devtools/src/__tests__/config.test.ts b/packages/devtools/src/__tests__/config.test.ts index 5b7df5c1..2351113f 100644 --- a/packages/devtools/src/__tests__/config.test.ts +++ b/packages/devtools/src/__tests__/config.test.ts @@ -310,10 +310,18 @@ describe('agent tool and RPC registration', () => { expect(tool?.safety).toBe('read'); const schema = tool?.inputSchema as { properties: Record }; expect(Object.keys(schema.properties)).not.toContain('record'); + for (const view of ['flash', 'track', 'angularProfiling']) { + expect(Object.keys(fullSchema.properties)).toContain(view); + expect(Object.keys(schema.properties)).not.toContain(view); + } const answer = (await readOnly.ctx.agent.invoke('pangular:change-detection', { record: 'start', })) as { markdown: string }; expect(answer.markdown).toContain('agent.readOnly'); + const flash = (await readOnly.ctx.agent.invoke('pangular:change-detection', { + flash: true, + })) as { markdown: string }; + expect(flash.markdown).toContain('agent.readOnly'); }); it('keeps navigate for its free modes when actions.router is off', async () => { diff --git a/packages/devtools/src/__tests__/hub-messages.test.ts b/packages/devtools/src/__tests__/hub-messages.test.ts index 45d46f93..dd26d9cb 100644 --- a/packages/devtools/src/__tests__/hub-messages.test.ts +++ b/packages/devtools/src/__tests__/hub-messages.test.ts @@ -140,6 +140,15 @@ describe('hub messages', () => { expect(hub.messages.add).toHaveBeenCalledTimes(1); }); + it('posts a change-detection call that turns a live view on or off', async () => { + const { feed, list } = setup(); + const cd = run(feed, 'pangular:change-detection'); + await cd.handler({ angularProfiling: false }); + expect(list()).toEqual([]); + await cd.handler({ flash: true }); + expect(list().map((m) => m.message)).toEqual(['Agent ran change-detection']); + }); + it('describes a write by its first meaningful line, past the untrusted-data notice and the JSON fence', async () => { const { feed, list } = setup(); await run( diff --git a/packages/devtools/src/cd-data.ts b/packages/devtools/src/cd-data.ts index 8c0dbe94..93489e86 100644 --- a/packages/devtools/src/cd-data.ts +++ b/packages/devtools/src/cd-data.ts @@ -4,6 +4,7 @@ import type { CdComponentStat, CdCycle, CdHookStat, + CdOptions, CdOutputStat, CdRecording, CdSpan, @@ -419,3 +420,33 @@ export function cdTraceFile(recording: CdRecording, pageId: string): CdTraceFile }, }; } + +/** A `change-detection-options` request; a missing field leaves that view as it is. */ +export interface CdOptionsRequest { + flash?: boolean; + track?: boolean; + /** Only `true` does anything: Angular has no way to turn its profiling off again. */ + angularProfiling?: boolean; +} + +/** Reads an options request from the wire, keeping only the fields it knows. */ +export function toCdOptionsRequest(value: unknown): CdOptionsRequest { + const message = (value && typeof value === 'object' ? value : {}) as Record; + const request: CdOptionsRequest = {}; + if (typeof message['flash'] === 'boolean') request.flash = message['flash']; + if (typeof message['track'] === 'boolean') request.track = message['track']; + if (message['angularProfiling'] === true) request.angularProfiling = true; + return request; +} + +/** The views a page reports it has on, with only the known boolean fields. */ +export function toCdOptions(value: unknown): CdOptions | undefined { + if (!value || typeof value !== 'object' || Array.isArray(value)) return undefined; + const options = value as Record; + return { + flash: options['flash'] === true, + track: options['track'] === true, + angularProfiling: options['angularProfiling'] === true, + angularProfilingAvailable: options['angularProfilingAvailable'] === true, + }; +} diff --git a/packages/devtools/src/cd-flash.ts b/packages/devtools/src/cd-flash.ts new file mode 100644 index 00000000..72e16721 --- /dev/null +++ b/packages/devtools/src/cd-flash.ts @@ -0,0 +1,289 @@ +// The flash overlay: a box over each component Angular checks, drawn on a +// canvas in a shadow root this package owns, never in the app's own DOM. + +import { PROFILER_EVENT } from './cd-recorder.ts'; +import { addProfilerListener, outsideAngular, type Profiler } from './change-detection.ts'; +import { className } from './injector-tree.ts'; +import { highlightBox } from './page-highlight.ts'; + +/** How long a box takes to fade out after its component's last check. */ +export const FLASH_FADE_MS = 1000; +/** How long a box stays, without fading, when the user prefers reduced motion. */ +export const FLASH_STILL_MS = 400; +/** Boxes on screen at once; checks of other components wait until some fade. */ +export const MAX_FLASH_BOXES = 150; +/** Component instances collected between two frames. */ +const MAX_PENDING = 1000; + +const HOST_ID = 'pangular-cd-flash'; + +interface FlashBox { + /** Page coordinates, so a box stays on its element when the window scrolls. */ + x: number; + y: number; + w: number; + h: number; + name: string; + /** Checks since the box appeared. */ + count: number; + /** When the component was last checked. */ + at: number; +} + +/** The part of `CanvasRenderingContext2D` the overlay draws with. */ +export type FlashContext = Pick< + CanvasRenderingContext2D, + | 'setTransform' + | 'clearRect' + | 'fillRect' + | 'strokeRect' + | 'fillText' + | 'measureText' + | 'globalAlpha' + | 'fillStyle' + | 'strokeStyle' + | 'lineWidth' + | 'font' + | 'textBaseline' +>; + +export interface CdFlashOptions { + getNg: () => unknown; + doc?: Document; + win?: Window; + now?: () => number; +} + +/** Box colors by how often the component was checked: once, a few times, often. */ +function colorFor(count: number): string { + if (count >= 10) return '239, 68, 68'; + if (count >= 3) return '245, 165, 36'; + return '56, 189, 248'; +} + +/** + * Flashes a box over the host of each component Angular checks while it is on. + * The profiler callback only collects instances; hosts are measured once per + * animation frame. Off, it has no profiler listener and no element. + */ +export function createCdFlash(options: CdFlashOptions) { + const doc = options.doc ?? document; + const win = options.win ?? window; + const now = options.now ?? (() => performance.now()); + const hosts = new WeakMap(); + const pending = new Map(); + const boxes = new Map(); + let removeListener: (() => void) | null = null; + let frame = 0; + let host: HTMLElement | null = null; + let canvas: HTMLCanvasElement | null = null; + let context: FlashContext | null = null; + let reduced: MediaQueryList | null = null; + let size = { w: 0, h: 0, dpr: 0 }; + let drawn = false; + + const hostOf = (instance: object): Element | null => { + const known = hosts.get(instance); + if (known) return known; + try { + const ng = options.getNg() as { getHostElement?: (instance: object) => unknown } | undefined; + const el = ng?.getHostElement?.(instance); + if (!(el instanceof Element)) return null; + hosts.set(instance, el); + return el; + } catch { + return null; + } + }; + + const schedule = () => { + if (frame) return; + // Outside the Angular zone, so the frame does not start another check. + frame = outsideAngular(() => win.requestAnimationFrame(tick)); + }; + + const listener: Profiler = (event, instance) => { + if (event !== PROFILER_EVENT.ComponentEnd || !instance || typeof instance !== 'object') return; + const seen = pending.get(instance); + if (seen !== undefined) pending.set(instance, seen + 1); + else if (pending.size < MAX_PENDING) pending.set(instance, 1); + schedule(); + }; + + const mount = (): FlashContext | null => { + if (context) return context; + const el = doc.createElement('div'); + el.id = HOST_ID; + el.setAttribute('aria-hidden', 'true'); + Object.assign(el.style, { + position: 'fixed', + inset: '0', + width: '100%', + height: '100%', + margin: '0', + padding: '0', + border: '0', + background: 'transparent', + overflow: 'hidden', + pointerEvents: 'none', + zIndex: '2147483644', + } satisfies Partial); + const shadow = el.attachShadow({ mode: 'open' }); + const paper = doc.createElement('canvas'); + Object.assign(paper.style, { + display: 'block', + width: '100%', + height: '100%', + pointerEvents: 'none', + } satisfies Partial); + shadow.appendChild(paper); + // Dialogs and popovers paint above any z-index; a popover shown after them paints above them. + const topLayer = typeof el.showPopover === 'function'; + if (topLayer) el.setAttribute('popover', 'manual'); + (doc.body ?? doc.documentElement).appendChild(el); + if (topLayer) { + try { + el.showPopover(); + } catch { + // keeps the z-index + } + } + let ctx: FlashContext | null = null; + try { + ctx = paper.getContext('2d'); + } catch { + ctx = null; + } + host = el; + canvas = paper; + context = ctx; + size = { w: 0, h: 0, dpr: 0 }; + return ctx; + }; + + const unmount = () => { + host?.remove(); + host = null; + canvas = null; + context = null; + drawn = false; + }; + + const resize = (ctx: FlashContext) => { + const w = win.innerWidth; + const h = win.innerHeight; + const dpr = win.devicePixelRatio || 1; + if (canvas && (w !== size.w || h !== size.h || dpr !== size.dpr)) { + canvas.width = Math.round(w * dpr); + canvas.height = Math.round(h * dpr); + size = { w, h, dpr }; + } + ctx.setTransform(dpr, 0, 0, dpr, 0, 0); + }; + + const draw = (t: number, still: boolean) => { + const ctx = mount(); + if (!ctx) return; + resize(ctx); + ctx.clearRect(0, 0, size.w, size.h); + drawn = boxes.size > 0; + const sx = win.scrollX; + const sy = win.scrollY; + ctx.font = '11px system-ui, sans-serif'; + ctx.textBaseline = 'top'; + for (const box of boxes.values()) { + const x = box.x - sx; + const y = box.y - sy; + if (x > size.w || y > size.h || x + box.w < 0 || y + box.h < 0) continue; + const alpha = still ? 1 : Math.max(0, 1 - (t - box.at) / FLASH_FADE_MS); + const rgb = colorFor(box.count); + ctx.globalAlpha = alpha; + ctx.fillStyle = `rgba(${rgb}, 0.12)`; + ctx.fillRect(x, y, box.w, box.h); + ctx.strokeStyle = `rgb(${rgb})`; + ctx.lineWidth = 2; + ctx.strokeRect(x + 1, y + 1, Math.max(0, box.w - 2), Math.max(0, box.h - 2)); + const label = `${box.name} ×${box.count}`; + const width = ctx.measureText(label).width + 8; + const ly = y >= 16 ? y - 16 : y; + ctx.fillStyle = `rgb(${rgb})`; + ctx.fillRect(x, ly, width, 16); + ctx.fillStyle = '#0b0b0f'; + ctx.fillText(label, x + 4, ly + 2); + } + ctx.globalAlpha = 1; + }; + + /** Measures the hosts checked since the last frame, fades the boxes and draws them. */ + function tick() { + frame = 0; + const t = now(); + const still = reduced?.matches === true; + const life = still ? FLASH_STILL_MS : FLASH_FADE_MS; + let changed = false; + if (pending.size) { + const sx = win.scrollX; + const sy = win.scrollY; + for (const [instance, count] of pending) { + const el = hostOf(instance); + if (!el) continue; + const box = boxes.get(el); + const alive = box && t - box.at < life; + if (!alive && boxes.size >= MAX_FLASH_BOXES) continue; + const rect = highlightBox(el); + if (!rect || (rect.width === 0 && rect.height === 0)) continue; + boxes.set(el, { + x: rect.left + sx, + y: rect.top + sy, + w: rect.width, + h: rect.height, + name: className(instance.constructor as { name?: string }), + count: alive ? box.count + count : count, + at: t, + }); + changed = true; + } + pending.clear(); + } + for (const [el, box] of boxes) { + if (t - box.at >= life) { + boxes.delete(el); + changed = true; + } + } + // With reduced motion a box does not change while it shows, so only changes redraw. + const redraw = changed || (!still && boxes.size > 0); + if (redraw && (boxes.size || drawn)) draw(t, still); + if (boxes.size) schedule(); + } + + return { + get on() { + return removeListener !== null; + }, + /** Turns the overlay on or off; false when the page has no profiler to listen to. */ + set(on: boolean): boolean { + if (!on) { + removeListener?.(); + removeListener = null; + if (frame) win.cancelAnimationFrame(frame); + frame = 0; + pending.clear(); + boxes.clear(); + unmount(); + return true; + } + if (removeListener) return true; + removeListener = addProfilerListener(options.getNg(), listener, doc); + if (!removeListener) return false; + try { + reduced = win.matchMedia?.('(prefers-reduced-motion: reduce)') ?? null; + } catch { + reduced = null; + } + return true; + }, + }; +} + +export type CdFlash = ReturnType; diff --git a/packages/devtools/src/cd-live.ts b/packages/devtools/src/cd-live.ts new file mode 100644 index 00000000..73bb8a77 --- /dev/null +++ b/packages/devtools/src/cd-live.ts @@ -0,0 +1,73 @@ +// The change detection views the panel or an agent turns on while the app +// runs: the flash overlay, the Performance panel track and Angular's own +// profiling. + +import { createCdFlash } from './cd-flash.ts'; +import { createCdPerfTrack } from './cd-perf-track.ts'; +import type { CdOptionsRequest } from './cd-data.ts'; +import type { CdOptions } from './config.ts'; + +export type { CdOptions, CdOptionsRequest }; + +interface NgProfiling { + enableProfiling?: () => unknown; +} + +export function createCdLive(options: { + getNg: () => unknown; + doc?: Document; + win?: Window; + now?: () => number; + console?: Console; +}) { + const flash = createCdFlash(options); + const track = createCdPerfTrack(options); + let angularProfiling = false; + let touched = false; + + const profilingAvailable = () => { + try { + return typeof (options.getNg() as NgProfiling | undefined)?.enableProfiling === 'function'; + } catch { + return false; + } + }; + + const enableAngularProfiling = () => { + if (angularProfiling) return; + try { + const enable = (options.getNg() as NgProfiling | undefined)?.enableProfiling; + if (typeof enable !== 'function') return; + enable(); + angularProfiling = true; + } catch { + angularProfiling = false; + } + }; + + return { + apply(request: CdOptionsRequest) { + touched = true; + if (request.flash !== undefined) flash.set(request.flash); + if (request.track !== undefined) track.set(request.track); + if (request.angularProfiling) enableAngularProfiling(); + }, + /** What the page reports, or undefined until the panel or an agent asked for a view. */ + report(): CdOptions | undefined { + if (!touched) return undefined; + return { + flash: flash.on, + track: track.on, + angularProfiling, + angularProfilingAvailable: angularProfiling || profilingAvailable(), + }; + }, + /** Turns the flash overlay and the track off. Angular's profiling stays on. */ + stop() { + flash.set(false); + track.set(false); + }, + }; +} + +export type CdLive = ReturnType; diff --git a/packages/devtools/src/cd-overlay.ts b/packages/devtools/src/cd-overlay.ts index 9706d8c5..2839718b 100644 --- a/packages/devtools/src/cd-overlay.ts +++ b/packages/devtools/src/cd-overlay.ts @@ -1,4 +1,6 @@ import { addProfilerListener, keepaliveDue } from './change-detection.ts'; +import { toCdOptionsRequest } from './cd-data.ts'; +import { createCdLive } from './cd-live.ts'; import { createCdRecorder, type CdReport } from './cd-recorder.ts'; import { elementId } from './element-id.ts'; @@ -29,6 +31,7 @@ export function attachChangeDetection( tickMs: () => number = () => 0, ) { const recorder = createCdRecorder({ maxCycles }); + const live = createCdLive({ getNg }); const hostIds = new WeakMap(); let removeListener: (() => void) | null = null; let supported = true; @@ -68,7 +71,13 @@ export function attachChangeDetection( const push = async (force = false) => { // After leave() a stopped recording with cycles is still worth sending again. if (!force && !recorder.recording && !recorder.hasCycles && !lastJson) return; - const report: CdReport = { pageId, supported, ...recorder.snapshot(hostId) }; + const options = live.report(); + const report: CdReport = { + pageId, + supported, + ...recorder.snapshot(hostId), + ...(options ? { options } : {}), + }; const json = JSON.stringify(report); if (!force && json === lastJson) { if (!keepaliveDue(sentAt, tickMs())) return; @@ -94,6 +103,17 @@ export function attachChangeDetection( }, }); + my.rpc.register({ + name: 'change-detection-options', + type: 'event', + jsonSerializable: true, + handler: (message: { pageId?: unknown } | null) => { + if (typeof message?.pageId === 'string' && message.pageId !== pageId) return; + live.apply(toCdOptionsRequest(message)); + void push(true).catch(() => {}); + }, + }); + return { push, get recording() { @@ -103,6 +123,9 @@ export function attachChangeDetection( lastJson = ''; void my.rpc.call('forget-change-detection-page', pageId).catch(() => {}); }, - stop: () => setRecording(false), + stop: () => { + setRecording(false); + live.stop(); + }, }; } diff --git a/packages/devtools/src/cd-perf-track.ts b/packages/devtools/src/cd-perf-track.ts new file mode 100644 index 00000000..d2226300 --- /dev/null +++ b/packages/devtools/src/cd-perf-track.ts @@ -0,0 +1,136 @@ +// The "Pangular" track in the Chrome DevTools Performance panel, written with +// the `console.timeStamp` extensibility API. + +import { PROFILER_EVENT } from './cd-recorder.ts'; +import { hookName, listenerName } from './cd-timing.ts'; +import { addProfilerListener, type Profiler } from './change-detection.ts'; +import { className } from './injector-tree.ts'; + +export const PERF_TRACK = 'Pangular'; +export const PERF_TRACK_GROUP = 'Pangular Inspector'; +/** Open spans past this depth are dropped, in case an end event never comes. */ +const MAX_OPEN = 50; + +type TimeStamp = ( + label: string, + start: number, + end: number, + track: string, + group: string, + color: string, +) => void; + +interface Open { + start: number; + instance: unknown; + fn: unknown; +} + +const nameOf = (instance: unknown) => { + const ctor = (instance as { constructor?: unknown } | null)?.constructor; + return typeof ctor === 'function' ? className(ctor as { name?: string }) : '?'; +}; + +/** `console.timeStamp` when the browser has it; Chrome draws its entries on custom tracks. */ +export function consoleTimeStamp(target: Console = console): TimeStamp | null { + const stamp = (target as unknown as { timeStamp?: unknown }).timeStamp; + return typeof stamp === 'function' ? (stamp.bind(target) as TimeStamp) : null; +} + +/** + * Writes one entry per component check, lifecycle hook and output listener to + * the Performance panel while it is on. Off, it has no profiler listener. + */ +export function createCdPerfTrack(options: { + getNg: () => unknown; + doc?: Document; + now?: () => number; + console?: Console; +}) { + const now = options.now ?? (() => performance.now()); + let removeListener: (() => void) | null = null; + let stamp: TimeStamp | null = null; + let components: number[] = []; + let hooks: Open[] = []; + let outputs: Open[] = []; + + const push = (stack: T[], entry: T) => { + stack.push(entry); + if (stack.length > MAX_OPEN) stack.shift(); + }; + + const emit = (label: string, start: number, color: string) => { + try { + stamp?.(label, start, now(), PERF_TRACK, PERF_TRACK_GROUP, color); + } catch { + // a console that refuses the extra arguments draws nothing + } + }; + + const listener: Profiler = (event, instance, fn) => { + switch (event) { + case PROFILER_EVENT.ComponentStart: + push(components, now()); + return; + case PROFILER_EVENT.ComponentEnd: { + const start = components.pop(); + if (start !== undefined && instance) emit(nameOf(instance), start, 'primary'); + return; + } + case PROFILER_EVENT.LifecycleHookStart: + push(hooks, { start: now(), instance, fn }); + return; + case PROFILER_EVENT.LifecycleHookEnd: { + const open = hooks.pop(); + if (open) + emit( + `${nameOf(open.instance)}.${hookName(open.instance, open.fn)}`, + open.start, + 'secondary', + ); + return; + } + case PROFILER_EVENT.OutputStart: + push(outputs, { start: now(), instance, fn }); + return; + case PROFILER_EVENT.OutputEnd: { + const open = outputs.pop(); + if (!open) return; + const listener = listenerName(open.fn); + emit( + `${nameOf(open.instance)} output${listener ? ` (${listener})` : ''}`, + open.start, + 'tertiary', + ); + return; + } + } + }; + + return { + get on() { + return removeListener !== null; + }, + /** + * Turns the track on or off; false when the page has no profiler to listen + * to or the browser has no `console.timeStamp`. + */ + set(on: boolean): boolean { + if (!on) { + removeListener?.(); + removeListener = null; + components = []; + hooks = []; + outputs = []; + return true; + } + if (removeListener) return true; + stamp = consoleTimeStamp(options.console); + if (!stamp) return false; + removeListener = addProfilerListener(options.getNg(), listener, options.doc); + return removeListener !== null; + }, + }; +} + +export type CdPerfTrack = ReturnType; diff --git a/packages/devtools/src/config.ts b/packages/devtools/src/config.ts index 66b94038..659fda11 100644 --- a/packages/devtools/src/config.ts +++ b/packages/devtools/src/config.ts @@ -547,6 +547,7 @@ export const RPC_INSPECTOR: Record = { 'ping-change-detection': 'components', 'forget-change-detection-page': 'components', 'request-change-detection-record': 'components', + 'request-change-detection-options': 'components', 'ping-component-tree': 'components', 'forget-component-page': 'components', 'select-component': 'components', @@ -994,9 +995,23 @@ export interface CdRecording { spanNames?: string[]; } +/** The change detection views a page shows while it runs, turned on from the panel or an agent. */ +export interface CdOptions { + /** A box flashes over each component as Angular checks it. */ + flash: boolean; + /** Component checks, hooks and outputs go to the "Pangular" track of the Chrome Performance panel. */ + track: boolean; + /** `ng.enableProfiling()` was called. It stays on until the page reloads. */ + angularProfiling: boolean; + /** Whether the page has `ng.enableProfiling` (Angular 20 or later, development build). */ + angularProfilingAvailable: boolean; +} + /** What a page pushes: its recording, with the page id and whether it can record. */ export interface CdReport extends CdRecording { pageId: string; /** False when the page has no profiler hook to record with (before Angular 20). */ supported: boolean; + /** The views the page has on; missing from pages that report none. */ + options?: CdOptions; } diff --git a/packages/devtools/src/devframe.ts b/packages/devtools/src/devframe.ts index e6acac53..3f3c32d1 100644 --- a/packages/devtools/src/devframe.ts +++ b/packages/devtools/src/devframe.ts @@ -171,7 +171,10 @@ import { type SetHttpRuleArgs, } from './rpc/http-rule-tools.ts'; import { + cdOptionsText, cdUnknownPageText, + cdViewsAsked, + cdViewsText, changeDetectionText, expireCdPages, pickCdPage, @@ -180,6 +183,7 @@ import { type CdState, } from './rpc/cd-tools.ts'; import { cdExportText } from './rpc/cd-export-tools.ts'; +import { toCdOptionsRequest } from './cd-data.ts'; import type { HttpPage, HttpPayloadState, HttpReport, HttpState } from './types.ts'; import { analogPages, nameServerFns, registerAnalog } from './rpc/analog-register.ts'; @@ -1573,6 +1577,16 @@ const pangular = defineDevframe({ }); }; + const requestCdOptions = (message: unknown) => { + const raw = (message && typeof message === 'object' ? message : {}) as { pageId?: unknown }; + const pageId = typeof raw.pageId === 'string' ? raw.pageId.slice(0, 50) : undefined; + void my.rpc.broadcast({ + method: 'change-detection-options', + args: [{ pageId, ...toCdOptionsRequest(message) }], + optional: true, + }); + }; + register({ name: 'push-change-detection', type: 'action', @@ -1617,6 +1631,15 @@ const pangular = defineDevframe({ }, }); + register({ + name: 'request-change-detection-options', + type: 'action', + jsonSerializable: true, + handler: (message: unknown) => { + requestCdOptions(message); + }, + }); + register({ name: 'ping-component-tree', type: 'action', @@ -2365,14 +2388,32 @@ const pangular = defineDevframe({ id: 'pangular:change-detection', description: `Change detection cycles recorded with Angular's profiler (Angular 20+, development build): the slowest components by self time, the most often checked components, and the latest cycles with duration, component checks, sync passes and the output that ran before each one. ${ cdRecordAllowed - ? 'Recording is off until the panel or this tool starts it; pass `record: "start"`, use the app, then call again without `record`. `stop` keeps the recording, `clear` empties it.' - : 'Recording is off until the panel starts it. The agent is read-only, so this tool cannot start, stop or clear a recording.' + ? 'Recording is off until the panel or this tool starts it; pass `record: "start"`, use the app, then call again without `record`. `stop` keeps the recording, `clear` empties it. `flash: true` draws a fading box with the class name and check count over each component as Angular checks it, so a person watching the page sees what each interaction checks; `track: true` writes every component check, lifecycle hook and output to a "Pangular" track in the Chrome Performance panel while it records; `angularProfiling: true` calls `ng.enableProfiling()` for Angular\'s own track, which stays on until the page reloads. Each view is off by default and costs nothing while off.' + : 'Recording is off until the panel starts it. The agent is read-only, so this tool cannot start, stop or clear a recording, or turn on the flash overlay, the Performance panel track or Angular profiling.' } The answer starts with the change detection mode the page runs: zoneless, zone.js, or zoneless with zone.js still loaded. Times include lifecycle hooks per class and hook, output listeners and afterRender callbacks. Pass \`export: "json"\` for the recording as the file the panel imports, or \`export: "trace"\` for a Trace Event Format file that Perfetto (ui.perfetto.dev) and chrome://tracing open; exporting only reads, and a file over 100,000 characters is not returned, only its counts.`, inputSchema: { type: 'object', properties: { ...(cdRecordAllowed - ? { record: { type: 'string', enum: ['start', 'stop', 'clear'] } } + ? { + record: { type: 'string', enum: ['start', 'stop', 'clear'] }, + flash: { + type: 'boolean', + description: + 'Turn the flash overlay on or off: a box over each component as it is checked.', + }, + track: { + type: 'boolean', + description: + 'Turn the "Pangular" track in the Chrome Performance panel on or off.', + }, + angularProfiling: { + type: 'boolean', + enum: [true], + description: + "Call `ng.enableProfiling()` for Angular's own Performance panel track. It cannot be turned off until the page reloads.", + }, + } : {}), page: { type: 'string', description: 'Page id; defaults to the page that is recording.' }, limit: { type: 'number', description: 'Rows per list (default 10, max 50).' }, @@ -2389,6 +2430,9 @@ const pangular = defineDevframe({ page?: string; limit?: number; export?: string; + flash?: boolean; + track?: boolean; + angularProfiling?: boolean; }) => { const unknown = args?.page && @@ -2407,6 +2451,12 @@ const pangular = defineDevframe({ if (args.record !== undefined) { return { markdown: 'Pass either `record` or `export`, not both.' }; } + if (cdViewsAsked(args)) { + return { + markdown: + 'Pass either `export` or `flash`, `track` and `angularProfiling`, not both.', + }; + } return { markdown: cdExportText(cdState.value() as CdState, { page: args.page, @@ -2414,12 +2464,22 @@ const pangular = defineDevframe({ }), }; } - if (args?.record !== undefined && !cdRecordAllowed) { + if ((args?.record !== undefined || cdViewsAsked(args)) && !cdRecordAllowed) { return { markdown: - 'The agent is read-only in the devtools config (agent.readOnly), so it cannot start, stop or clear a change detection recording. Start it from the panel, then call this tool without `record`.', + 'The agent is read-only in the devtools config (agent.readOnly), so it cannot start, stop or clear a change detection recording, or turn on the flash overlay, the Performance panel track or Angular profiling. Use the panel, then call this tool without those arguments.', }; } + const views = cdViewsAsked(args) ? cdViewsText(args) : ''; + if (views) { + requestCdOptions({ + pageId: args.page, + flash: args.flash, + track: args.track, + angularProfiling: args.angularProfiling, + }); + if (args.record === undefined) return { markdown: views }; + } if (args?.record === 'start' || args?.record === 'stop' || args?.record === 'clear') { requestCdRecord({ pageId: args.page, @@ -2432,7 +2492,7 @@ const pangular = defineDevframe({ : args.record === 'stop' ? 'Recording stopped. The cycles recorded so far stay available.' : 'Recording cleared.'; - return { markdown: next }; + return { markdown: views ? `${next}\n\n${views}` : next }; } const cd = cdState.value() as CdState; const text = changeDetectionText(cd, args ?? {}); @@ -2440,7 +2500,9 @@ const pangular = defineDevframe({ const zonePage = args?.page ?? pickCdPage(cd)?.pageId; const injectors = zonePage ? injectorPages.get(zonePage) : latestInjectorPage(); const mode = injectors ? zoneModeText(injectors.zone, injectors.pageId) : ''; - return { markdown: mode ? `${mode}\n\n${text}` : text }; + const options = cdOptionsText(pickCdPage(cd, args?.page)?.options); + const parts = [mode, text, options].filter(Boolean); + return { markdown: parts.join('\n\n') }; }, }); diff --git a/packages/devtools/src/hub-messages.ts b/packages/devtools/src/hub-messages.ts index ca1c0a9a..7eeefc06 100644 --- a/packages/devtools/src/hub-messages.ts +++ b/packages/devtools/src/hub-messages.ts @@ -16,6 +16,17 @@ import { clip } from './text.ts'; import type { HydrationStats } from './types.ts'; /** The kinds of item the feed posts, as the message `category`. */ +/** Whether a `change-detection` call changes the page rather than only reading it. */ +function cdWrites(args: unknown): boolean { + const call = (args ?? {}) as Record; + return ( + typeof call['record'] === 'string' || + typeof call['flash'] === 'boolean' || + typeof call['track'] === 'boolean' || + call['angularProfiling'] === true + ); +} + export const HUB_MESSAGE_CATEGORIES = { agent: 'agent', error: 'runtime', @@ -279,10 +290,9 @@ export function createHubFeed( const agentWrite = (id: string, args: unknown, result: unknown) => { const name = id.replace(/^pangular:/, ''); if (agentSafety(id, config) === 'read' || !agentAllowed({ id }, config)) return; - // change-detection only writes when it starts, stops or clears a recording. - if (name === 'change-detection' && typeof (args as { record?: unknown })?.record !== 'string') { - return; - } + // change-detection only writes when it starts, stops or clears a recording, + // or turns a live view on or off. + if (name === 'change-detection' && !cdWrites(args)) return; if (changedNothing(result)) return; const page = pageOf(args); post( diff --git a/packages/devtools/src/rpc/cd-tools.ts b/packages/devtools/src/rpc/cd-tools.ts index 8dae0af1..db07d95d 100644 --- a/packages/devtools/src/rpc/cd-tools.ts +++ b/packages/devtools/src/rpc/cd-tools.ts @@ -1,5 +1,6 @@ import type { CdReport } from '../cd-overlay.ts'; -import { sanitizeCdRecording } from '../cd-data.ts'; +import type { CdOptions } from '../config.ts'; +import { sanitizeCdRecording, toCdOptions } from '../cd-data.ts'; import type { CdComponentStat, CdCycle } from '../cd-recorder.ts'; import { droppedNote } from '../timeline-limits.ts'; import { code, UNTRUSTED } from './forms-tools.ts'; @@ -26,14 +27,81 @@ export function toCdPage(value: unknown, maxCycles: number, now = Date.now()): C if (typeof pageId !== 'string' || !pageId || pageId.length >= 50) return null; const recording = sanitizeCdRecording(report, maxCycles); if (!recording) return null; + const options = toCdOptions(report['options']); return { pageId, supported: report['supported'] !== false, ...recording, + ...(options ? { options } : {}), reportedAt: now, }; } +/** Whether a `change-detection` call asks to turn a view on or off. */ +export function cdViewsAsked( + args: { flash?: unknown; track?: unknown; angularProfiling?: unknown } | undefined, +): boolean { + return ( + args?.flash !== undefined || args?.track !== undefined || args?.angularProfiling !== undefined + ); +} + +/** The answer to a `change-detection` call that turns views on or off. */ +export function cdViewsText(args: { + page?: string; + flash?: unknown; + track?: unknown; + angularProfiling?: unknown; +}): string { + const where = args.page ? `for page ${code(args.page)}` : 'for every connected page'; + const lines: string[] = []; + if (typeof args.flash === 'boolean') { + lines.push( + args.flash + ? `Flash overlay turned on ${where}: each component Angular checks gets a box with its class name and how often it was checked, fading over a second.` + : `Flash overlay turned off ${where}.`, + ); + } + if (typeof args.track === 'boolean') { + lines.push( + args.track + ? `Performance panel track turned on ${where}: record in the Chrome DevTools Performance panel and look for the "Pangular" track. Browsers without \`console.timeStamp\` draw nothing.` + : `Performance panel track turned off ${where}.`, + ); + } + if (args.angularProfiling === true) { + lines.push( + `Angular profiling (\`ng.enableProfiling()\`) requested ${where}. It stays on until the page reloads. Call this tool without arguments to see whether the page has it: it needs Angular 20 or later in a development build.`, + ); + } else if (args.angularProfiling !== undefined) { + lines.push( + 'Angular profiling cannot be turned off once it is on; reload the page to turn it off. Only `angularProfiling: true` is accepted.', + ); + } + if (args.flash !== undefined && typeof args.flash !== 'boolean') { + lines.push('`flash` must be true or false.'); + } + if (args.track !== undefined && typeof args.track !== 'boolean') { + lines.push('`track` must be true or false.'); + } + return lines.join('\n\n'); +} + +/** + * One line on the views a page has on, for the `change-detection` answer; + * empty when the page reported none. + */ +export function cdOptionsText(options: CdOptions | undefined): string { + if (!options) return ''; + const on = (value: boolean) => (value ? 'on' : 'off'); + const profiling = options.angularProfiling + ? 'on until the page reloads' + : options.angularProfilingAvailable + ? 'off' + : 'not available on this page (it needs Angular 20 or later in a development build)'; + return `Live views: flash overlay ${on(options.flash)}, Performance panel track ${on(options.track)}, Angular profiling ${profiling}.`; +} + export function expireCdPages( pages: Map, now = Date.now(),