From 4c4dd258d6ca114e34c1a4d01b1ad76c96ddf05d Mon Sep 17 00:00:00 2001 From: elkaix Date: Wed, 26 Aug 2026 11:06:22 -0400 Subject: [PATCH 1/3] fix: preserve tool output and session history --- .changeset/clear-ravens-wave.md | 5 + .changeset/kind-turtles-grow.md | 5 + .changeset/tidy-spiders-fix.md | 5 + .../tui/controllers/session-event-handler.ts | 8 +- .../tui/pythinker-tui-message-flow.test.ts | 80 +++ apps/vscode/src/runtime/event-adapter.ts | 19 +- apps/vscode/src/runtime/session-runtime.ts | 1 + apps/vscode/test/event-adapter.test.ts | 44 ++ apps/vscode/test/pythinker-runtime.test.ts | 16 +- apps/vscode/test/session-runtime.test.ts | 18 + docs/.vitepress/config.ts | 1 + docs/guides/getting-started.md | 3 + docs/guides/web.md | 47 ++ docs/reference/pythinker-command.md | 2 +- docs/reference/server-api.md | 4 +- .../agent-core-v2/docs/state-manifest.d.ts | 3 +- .../agent-core-v2/docs/wire-manifest.d.ts | 116 ++-- .../agent/contextMemory/contextTranscript.ts | 25 +- .../agent/contextMemory/conversationTime.ts | 9 +- .../src/agent/loop/loopService.ts | 4 +- .../src/agent/loop/turnEvents.ts | 13 +- .../agent-core-v2/src/agent/loop/turnOps.ts | 24 +- .../agent-core-v2/src/agent/mcp/output.ts | 118 +--- .../agent-core-v2/src/agent/mcp/tools/mcp.ts | 28 +- .../src/agent/toolDedupe/toolDedupe.ts | 13 +- .../src/agent/toolDedupe/toolDedupeService.ts | 8 +- .../agent/toolExecutor/toolExecutorService.ts | 10 +- .../toolResultTruncation.ts | 2 + .../toolResultTruncationService.ts | 285 ++++++++- .../src/agent/tools/fetch-url/fetchUrlTool.ts | 4 +- .../src/agent/tools/os/bash/bashTool.ts | 59 +- .../src/agent/tools/os/grep/grepTool.ts | 13 +- .../src/agent/tools/os/read/readTool.ts | 11 +- .../agent/tools/web-search/webSearchTool.ts | 4 +- .../src/agent/undo/undoService.ts | 20 +- .../src/tool/output-accumulator.ts | 91 +++ .../agent-core-v2/src/tool/result-builder.ts | 149 ----- .../agent-core-v2/src/tool/toolContract.ts | 14 + .../agent/activityView/activityView.test.ts | 4 +- .../contextMemory/contextTranscript.test.ts | 1 + .../test/agent/loop/loop.test.ts | 40 ++ .../test/agent/loop/turnOps.test.ts | 63 +- .../agent-core-v2/test/agent/mcp/mcp.test.ts | 8 +- .../test/agent/mcp/output.test.ts | 125 +++- .../test/agent/prompt/promptService.test.ts | 23 + .../agent/toolExecutor/toolExecutor.test.ts | 1 + .../test/agent/toolResultTruncation/stubs.ts | 1 + .../toolResultTruncation.test.ts | 62 +- .../test/agent/undo/undo.test.ts | 87 +++ packages/agent-core-v2/test/index.test.ts | 1 + .../test/mcpCore/client-stdio.test.ts | 17 +- .../crash-after-connect-stdio-server.mjs | 3 +- .../os/backends/node-local/tools/bash.test.ts | 117 +++- .../os/backends/node-local/tools/grep.test.ts | 43 +- .../os/backends/node-local/tools/read.test.ts | 12 +- .../test/tool/output-accumulator.test.ts | 134 +++++ .../test/tool/result-builder.test.ts | 148 ----- packages/agent-core-v2/test/tool/tool.test.ts | 7 +- .../agent-core/test/mcp/client-stdio.test.ts | 15 +- .../crash-after-connect-stdio-server.mjs | 3 +- .../src/protocol/question-wire.ts | 53 ++ .../agent-gateway/src/routes/questions.ts | 42 +- packages/agent-gateway/src/routes/snapshot.ts | 2 +- .../src/services/transcript/coreBinding.ts | 4 +- .../src/services/transcript/coreEventMap.ts | 139 ++++- .../services/transcript/transcriptService.ts | 81 ++- .../ws/v1/sessionEventBroadcaster.ts | 3 +- .../test/services/transcript.test.ts | 569 ++++++++++++++++-- packages/node-sdk/src/v2/session-wiring.ts | 8 + .../test/session-event-wiring.test.ts | 1 + packages/transcript/src/contract/schema.ts | 1 + packages/transcript/src/history/groupTurns.ts | 57 +- packages/transcript/src/model/frame.ts | 1 + packages/transcript/test/layers.test.ts | 80 +++ 74 files changed, 2440 insertions(+), 797 deletions(-) create mode 100644 .changeset/clear-ravens-wave.md create mode 100644 .changeset/kind-turtles-grow.md create mode 100644 .changeset/tidy-spiders-fix.md create mode 100644 docs/guides/web.md create mode 100644 packages/agent-core-v2/src/tool/output-accumulator.ts delete mode 100644 packages/agent-core-v2/src/tool/result-builder.ts create mode 100644 packages/agent-core-v2/test/tool/output-accumulator.test.ts delete mode 100644 packages/agent-core-v2/test/tool/result-builder.test.ts create mode 100644 packages/agent-gateway/src/protocol/question-wire.ts diff --git a/.changeset/clear-ravens-wave.md b/.changeset/clear-ravens-wave.md new file mode 100644 index 000000000..87dff224a --- /dev/null +++ b/.changeset/clear-ravens-wave.md @@ -0,0 +1,5 @@ +--- +"@pymodel/pythinker-code": patch +--- + +Fix context usage updates in interactive clients. diff --git a/.changeset/kind-turtles-grow.md b/.changeset/kind-turtles-grow.md new file mode 100644 index 000000000..7f0601373 --- /dev/null +++ b/.changeset/kind-turtles-grow.md @@ -0,0 +1,5 @@ +--- +"@pymodel/pythinker-code": patch +--- + +Fix session history after steering or undoing a turn. diff --git a/.changeset/tidy-spiders-fix.md b/.changeset/tidy-spiders-fix.md new file mode 100644 index 000000000..8258905d9 --- /dev/null +++ b/.changeset/tidy-spiders-fix.md @@ -0,0 +1,5 @@ +--- +"@pymodel/pythinker-code": patch +--- + +Fix loss of large tool outputs in long conversations. diff --git a/apps/pythinker-code/src/tui/controllers/session-event-handler.ts b/apps/pythinker-code/src/tui/controllers/session-event-handler.ts index bac905c89..7751dc532 100644 --- a/apps/pythinker-code/src/tui/controllers/session-event-handler.ts +++ b/apps/pythinker-code/src/tui/controllers/session-event-handler.ts @@ -721,9 +721,15 @@ export class SessionEventHandler { this.host.state.appState.dynamicWorkflowMode && this.host.state.dynamicWorkflowModeEntry === 'task'; const patch: Partial = {}; - if (event.contextUsage !== undefined) patch.contextUsage = event.contextUsage; if (event.contextTokens !== undefined) patch.contextTokens = event.contextTokens; if (event.maxContextTokens !== undefined) patch.maxContextTokens = event.maxContextTokens; + if (event.contextUsage !== undefined) { + patch.contextUsage = event.contextUsage; + } else if (event.contextTokens !== undefined || event.maxContextTokens !== undefined) { + const tokens = patch.contextTokens ?? this.host.state.appState.contextTokens; + const max = patch.maxContextTokens ?? this.host.state.appState.maxContextTokens; + patch.contextUsage = max > 0 ? tokens / max : 0; + } if (event.planMode !== undefined) patch.planMode = event.planMode; if (event.dynamicWorkflowMode !== undefined) patch.dynamicWorkflowMode = event.dynamicWorkflowMode; if (event.towerMode !== undefined) patch.towerMode = event.towerMode; diff --git a/apps/pythinker-code/test/tui/pythinker-tui-message-flow.test.ts b/apps/pythinker-code/test/tui/pythinker-tui-message-flow.test.ts index 81128552c..612cd59c3 100644 --- a/apps/pythinker-code/test/tui/pythinker-tui-message-flow.test.ts +++ b/apps/pythinker-code/test/tui/pythinker-tui-message-flow.test.ts @@ -5041,6 +5041,86 @@ command = "vim" expect(stripSgr(renderTranscript(driver))).toContain('LLM not set'); }); + it('recomputes context usage when a status update carries context tokens without it', async () => { + const { driver } = await makeDriver(); + driver.state.appState.contextTokens = 0; + driver.state.appState.maxContextTokens = 1_000_000; + driver.state.appState.contextUsage = 0.74; + + driver.sessionEventHandler.handleEvent( + { + type: 'agent.status.updated', + agentId: 'main', + sessionId: 'ses-1', + contextTokens: 180_000, + } as Event, + vi.fn(), + ); + + expect(driver.state.appState.contextTokens).toBe(180_000); + expect(driver.state.appState.contextUsage).toBeCloseTo(0.18); + }); + + it('recomputes context usage when a status update carries max context tokens without it', async () => { + const { driver } = await makeDriver(); + driver.state.appState.contextTokens = 180_000; + driver.state.appState.maxContextTokens = 256_000; + driver.state.appState.contextUsage = 180_000 / 256_000; + + driver.sessionEventHandler.handleEvent( + { + type: 'agent.status.updated', + agentId: 'main', + sessionId: 'ses-1', + maxContextTokens: 1_000_000, + } as Event, + vi.fn(), + ); + + expect(driver.state.appState.maxContextTokens).toBe(1_000_000); + expect(driver.state.appState.contextUsage).toBeCloseTo(0.18); + }); + + it('keeps an explicit context usage from status updates', async () => { + const { driver } = await makeDriver(); + driver.state.appState.contextTokens = 100; + driver.state.appState.maxContextTokens = 1_000_000; + driver.state.appState.contextUsage = 0; + + driver.sessionEventHandler.handleEvent( + { + type: 'agent.status.updated', + agentId: 'main', + sessionId: 'ses-1', + contextTokens: 180_000, + maxContextTokens: 1_000_000, + contextUsage: 0.42, + } as Event, + vi.fn(), + ); + + expect(driver.state.appState.contextUsage).toBe(0.42); + }); + + it('zeroes context usage when no context window is known', async () => { + const { driver } = await makeDriver(); + driver.state.appState.contextTokens = 180_000; + driver.state.appState.maxContextTokens = 0; + driver.state.appState.contextUsage = 0.74; + + driver.sessionEventHandler.handleEvent( + { + type: 'agent.status.updated', + agentId: 'main', + sessionId: 'ses-1', + contextTokens: 190_000, + } as Event, + vi.fn(), + ); + + expect(driver.state.appState.contextUsage).toBe(0); + }); + it('applies the effective thinking effort from status updates', async () => { const { driver } = await makeDriver(); diff --git a/apps/vscode/src/runtime/event-adapter.ts b/apps/vscode/src/runtime/event-adapter.ts index 6ad01c23d..6e8e004c8 100644 --- a/apps/vscode/src/runtime/event-adapter.ts +++ b/apps/vscode/src/runtime/event-adapter.ts @@ -367,7 +367,8 @@ function mapStatusUpdate( sdkEvent: Extract, ): MappedLegacyWireEvent { const payload: StatusUpdate = {}; - if (sdkEvent.contextUsage !== undefined) payload.context_usage = sdkEvent.contextUsage; + const contextUsage = contextUsageRatio(sdkEvent); + if (contextUsage !== undefined) payload.context_usage = contextUsage; if (sdkEvent.planMode !== undefined) payload.plan_mode = sdkEvent.planMode; const thinkingLevel = (sdkEvent as any).thinkingLevel ?? (sdkEvent as any).thinkingEffort; if (thinkingLevel !== undefined) payload.thinking_effort = thinkingLevel; @@ -419,6 +420,22 @@ function mapSubagentStatus( return { state, event: { type: 'SubagentStatus', payload } }; } +function contextUsageRatio( + sdkEvent: Extract, +): number | undefined { + if (sdkEvent.contextUsage !== undefined) return sdkEvent.contextUsage; + const { contextTokens, maxContextTokens } = sdkEvent; + if ( + typeof contextTokens !== 'number' || + typeof maxContextTokens !== 'number' || + !Number.isFinite(contextTokens) || + !Number.isFinite(maxContextTokens) + ) { + return undefined; + } + return maxContextTokens > 0 ? contextTokens / maxContextTokens : undefined; +} + function usageDelta(current: AdapterTokenUsage, previous: AdapterTokenUsage | undefined): TokenUsage { return { input_other: delta(current.inputOther, previous?.inputOther), diff --git a/apps/vscode/src/runtime/session-runtime.ts b/apps/vscode/src/runtime/session-runtime.ts index 9099372ce..b1a54abb9 100644 --- a/apps/vscode/src/runtime/session-runtime.ts +++ b/apps/vscode/src/runtime/session-runtime.ts @@ -172,6 +172,7 @@ export class SessionRuntime { model: status.model, thinking_effort: status.thinkingEffort, plan_mode: status.planMode, + context_usage: status.contextUsage, permission: status.permission, }, _sessionId: this.id, diff --git a/apps/vscode/test/event-adapter.test.ts b/apps/vscode/test/event-adapter.test.ts index 04a185204..1dd033e28 100644 --- a/apps/vscode/test/event-adapter.test.ts +++ b/apps/vscode/test/event-adapter.test.ts @@ -295,6 +295,50 @@ describe('event adapter (projects SDK events into the legacy Webview contract)', }); }); + it('derives context usage from the v2 context token pair', () => { + const result = adaptSdkEvent(createEventAdapterState(), { + type: 'agent.status.updated', + sessionId: 'session-1', + agentId: 'main', + contextTokens: 25_600, + maxContextTokens: 256_000, + }); + + expect(result.event).toEqual({ + type: 'StatusUpdate', + payload: { context_usage: 0.1 }, + _sessionId: 'session-1', + }); + }); + + it('preserves an explicit context usage over the context token pair', () => { + const result = adaptSdkEvent(createEventAdapterState(), { + type: 'agent.status.updated', + sessionId: 'session-1', + agentId: 'main', + contextUsage: 0, + contextTokens: 25_600, + maxContextTokens: 256_000, + }); + + expect(result.event).toMatchObject({ + type: 'StatusUpdate', + payload: { context_usage: 0 }, + }); + }); + + it('does not derive a ratio from an invalid context capacity', () => { + const result = adaptSdkEvent(createEventAdapterState(), { + type: 'agent.status.updated', + sessionId: 'session-1', + agentId: 'main', + contextTokens: 25_600, + maxContextTokens: 0, + }); + + expect(result.event).toBeUndefined(); + }); + it('emits only new token usage when SDK status carries cumulative turn usage', () => { const first = adaptSdkEvent(createEventAdapterState(), { type: 'agent.status.updated', diff --git a/apps/vscode/test/pythinker-runtime.test.ts b/apps/vscode/test/pythinker-runtime.test.ts index f3c39a661..acbb761b4 100644 --- a/apps/vscode/test/pythinker-runtime.test.ts +++ b/apps/vscode/test/pythinker-runtime.test.ts @@ -428,7 +428,13 @@ describe("Pythinker runtime (owns shared SDK sessions for Webviews)", () => { type: "StatusUpdate", // The permission mode rides along: the chat badge is the only place the // user can see which mode a toggle command just landed on. - payload: { model: "kimi-test", thinking_effort: "max", plan_mode: true, permission: "manual" }, + payload: { + model: "kimi-test", + thinking_effort: "max", + plan_mode: true, + permission: "manual", + context_usage: 0, + }, _sessionId: "saved-1", }, webviewId: "view-1", @@ -459,7 +465,13 @@ describe("Pythinker runtime (owns shared SDK sessions for Webviews)", () => { event: Events.StreamEvent, data: { type: "StatusUpdate", - payload: { model: "kimi-test", thinking_effort: "off", plan_mode: false, permission: "yolo" }, + payload: { + model: "kimi-test", + thinking_effort: "off", + plan_mode: false, + permission: "yolo", + context_usage: 0, + }, _sessionId: "saved-1", }, webviewId: "view-1", diff --git a/apps/vscode/test/session-runtime.test.ts b/apps/vscode/test/session-runtime.test.ts index 306e0cc4c..bd8cddc66 100644 --- a/apps/vscode/test/session-runtime.test.ts +++ b/apps/vscode/test/session-runtime.test.ts @@ -218,6 +218,24 @@ function turnEnded( } describe("session runtime (adapts one SDK session for subscribed Webviews)", () => { + it("announces the current context usage to a subscribed Webview", async () => { + const { runtime, broadcasts } = createRuntime(); + + await runtime.announceStatus("view-1"); + + expect(streamData(broadcasts)).toContainEqual({ + type: "StatusUpdate", + payload: { + model: undefined, + thinking_effort: "off", + plan_mode: false, + permission: "manual", + context_usage: 0, + }, + _sessionId: "session-1", + }); + }); + it("renders a host-only command without making it a forkable core turn", () => { const { runtime, broadcasts } = createRuntime(); diff --git a/docs/.vitepress/config.ts b/docs/.vitepress/config.ts index efc85dae8..1e2aa146b 100644 --- a/docs/.vitepress/config.ts +++ b/docs/.vitepress/config.ts @@ -50,6 +50,7 @@ const config = withMermaid(defineConfig({ items: [ { text: 'Getting Started', link: '/guides/getting-started' }, { text: 'Desktop App', link: '/guides/desktop' }, + { text: 'Use in a Browser', link: '/guides/web' }, { text: 'Common Use Cases', link: '/guides/use-cases' }, { text: 'Interaction and Input', link: '/guides/interaction' }, { text: 'Sessions and Context', link: '/guides/sessions' }, diff --git a/docs/guides/getting-started.md b/docs/guides/getting-started.md index 300fdf706..9995e040b 100644 --- a/docs/guides/getting-started.md +++ b/docs/guides/getting-started.md @@ -19,6 +19,8 @@ Two installation options are available: the official install script (recommended Prefer a graphical application over the terminal? See the [Desktop App guide](./desktop.md) for the macOS and Windows desktop application. +To use the local browser UI, see [Use Pythinker Code in a browser](./web.md). + ::: tip Before you install Pythinker Code CLI is a fully interactive TUI application. For the best visual experience, run it in a terminal with true-color and ligature support, such as [Kitty](https://sw.kovidgoyal.net/kitty/) or [Ghostty](https://ghostty.org/). ::: @@ -169,5 +171,6 @@ Pythinker Code CLI stores its local data under `~/.pythinker-code/` by default ## Next steps - [Interaction and input](./interaction.md) — input box operations, approval flow, Plan mode, and YOLO mode explained +- [Use in a browser](./web.md) — browser sessions and local-server safety - [Sessions and context](./sessions.md) — resuming sessions, compressing context, exporting sessions - [Common use cases](./use-cases.md) — prompt examples for typical tasks diff --git a/docs/guides/web.md b/docs/guides/web.md new file mode 100644 index 000000000..73e8c9cb5 --- /dev/null +++ b/docs/guides/web.md @@ -0,0 +1,47 @@ +# Use Pythinker Code in a browser + +Pythinker Code includes a local browser UI. It uses the same local sessions, configuration, and credentials as the terminal app. + +## Start the web UI + +1. Open a terminal in your project. +2. Run: + +```sh +pythinker web +``` + +3. Keep the terminal open. The command opens the browser when the server is ready. + +If the browser does not open, copy the local URL printed in the terminal. The URL contains an access token. Do not share it. + +Use `/web` in the terminal UI to open the current session in the browser. + +## What the web UI provides + +- Start and resume sessions +- Stream assistant output and tool activity +- Review approvals and file changes +- Use supported slash commands, including `/goal` and `/compact` +- View the same session data as the terminal UI + +## Server options + +```sh +pythinker web --no-open +pythinker web --port 58628 +pythinker web --host +``` + +`--host` listens on all network interfaces. Use it only on a trusted network and keep the token secret. `--dangerous-bypass-auth` removes authentication; do not use it on a shared or untrusted network. + +The default address is `http://127.0.0.1:58627`. When that port is busy, Pythinker tries the next port. + +## Stop the server + +Press `Ctrl-C` in the terminal that runs `pythinker web`. + +## Next steps + +- [pythinker command](../reference/pythinker-command.md#pythinker-web) — all web-server options +- [Server API](../reference/server-api.md) — REST and WebSocket integration diff --git a/docs/reference/pythinker-command.md b/docs/reference/pythinker-command.md index 5312634a1..182380f80 100644 --- a/docs/reference/pythinker-command.md +++ b/docs/reference/pythinker-command.md @@ -157,7 +157,7 @@ pythinker acp Run the local Pythinker server in the foreground of the current terminal — a single process that exposes the REST + WebSocket API and serves the web UI from the same origin — and open the web UI in the default browser once it is ready. The command stays attached to the terminal and shuts down cleanly on `SIGINT` / `SIGTERM` (e.g. `Ctrl-C`). -When the server is running, `GET /openapi.json` returns the REST OpenAPI document and `GET /asyncapi.json` returns the local WebSocket AsyncAPI document. For an end-to-end walkthrough of driving sessions over the API, see [Local server and API](../guides/server.md); for the protocol details, see the [Server API](./server-api.md) reference. +When the server is running, `GET /openapi.json` returns the REST OpenAPI document and `GET /asyncapi.json` returns the local WebSocket AsyncAPI document. For browser setup and usage, see [Use in a Browser](../guides/web.md). For an end-to-end walkthrough of driving sessions over the API, see [Local server and API](../guides/server.md); for the protocol details, see the [Server API](./server-api.md) reference. ```sh pythinker web # run the server in the foreground and open the browser diff --git a/docs/reference/server-api.md b/docs/reference/server-api.md index 42e3160e1..9929231c1 100644 --- a/docs/reference/server-api.md +++ b/docs/reference/server-api.md @@ -1,6 +1,6 @@ # Server API -The local server started by `pythinker web` exposes two programmatic surfaces: a REST API (`/api/v1`, plus `/api/v2/sessions` and the experimental `/api/v2/mcp`) and a WebSocket event stream (`/api/v1/ws`). This page is the protocol reference for both. For how to start the server and its command-line options, see the [pythinker command](./pythinker-command.md#pythinker-web) reference; for an end-to-end walkthrough, see [Local server and API](../guides/server.md). +The local server started by `pythinker web` exposes two programmatic surfaces: a REST API (`/api/v1`, plus `/api/v2/sessions` and the experimental `/api/v2/mcp`) and a WebSocket event stream (`/api/v1/ws`). This page is the protocol reference for both. For how to start the server and use the browser UI, see [Use Pythinker Code in a browser](../guides/web.md). The complete request/response schema of every endpoint is owned by the server's live specification documents: `GET /openapi.json` (OpenAPI) and `GET /asyncapi.json` (AsyncAPI). Both require authentication. @@ -22,7 +22,7 @@ All `/api/*` paths (including `/openapi.json` and `/asyncapi.json`) require the - `GET /api/v1/healthz` (liveness probe) - Static web assets (non-`/api/` paths) -How to carry it: REST uses the `Authorization: Bearer ` header; the WebSocket upgrade accepts the same header or the subprotocol `pythinker-code.bearer.`. Token generation and rotation are covered in [Local server and API: Authentication](../guides/server.md#authentication). +How to carry it: REST uses the `Authorization: Bearer ` header; the WebSocket upgrade accepts the same header or the subprotocol `pythinker-code.bearer.`. The browser URL includes the local token; keep it private. See [Use Pythinker Code in a browser](../guides/web.md). Failed authentication returns HTTP 401 with envelope code `40101`. On non-loopback binds, a source that fails authentication 10 times within 60 seconds is banned for 60 seconds, during which every request gets HTTP 429 (code `42901`). diff --git a/packages/agent-core-v2/docs/state-manifest.d.ts b/packages/agent-core-v2/docs/state-manifest.d.ts index 2d7347df5..71b9be85f 100644 --- a/packages/agent-core-v2/docs/state-manifest.d.ts +++ b/packages/agent-core-v2/docs/state-manifest.d.ts @@ -1190,10 +1190,11 @@ export interface AgentStateSnapshot { 'loop.lastRequestTraceId': string | undefined; 'loop.nextReservedTurnId': number | undefined; // src/agent/loop/turnOps.ts - // replayable · durable — folds: ContextAppendLoopEvent, TurnPrompt, TurnSteer, TurnCancel, TurnEnded + // replayable · durable — folds: ContextAppendLoopEvent, TurnPrompt, TurnSteer, ContextUndo, ContextApplyCompaction, ContextClear, TurnCancel, TurnEnded 'turn': /* TurnModelState — packages/agent-core-v2/src/agent/loop/turnOps.ts */ { readonly nextTurnId: number; readonly cancelledTurnIds: readonly number[]; + readonly anchorTurnIds: readonly number[]; readonly lastEnded?: { readonly turnId: number; readonly reason: 'completed' | 'cancelled' | 'failed' | 'blocked'; diff --git a/packages/agent-core-v2/docs/wire-manifest.d.ts b/packages/agent-core-v2/docs/wire-manifest.d.ts index 910558f93..003386d2f 100644 --- a/packages/agent-core-v2/docs/wire-manifest.d.ts +++ b/packages/agent-core-v2/docs/wire-manifest.d.ts @@ -25,61 +25,61 @@ // media to blob storage), owner (the source file declaring the class). // Index (55 record types) -// config.update profile src/agent/profile/profileOps.ts -// context.append_loop_event contextMemory, turn src/agent/contextMemory/contextEvents.ts -// context.append_message contextMemory, plan, task.notificationDelivery src/agent/contextMemory/contextEvents.ts -// context.apply_compaction contextMemory, plan, task.notificationDelivery src/agent/contextMemory/contextEvents.ts -// context.clear contextMemory, plan, task.notificationDelivery src/agent/contextMemory/contextEvents.ts -// context.undo contextMemory, plan, task.notificationDelivery src/agent/contextMemory/contextEvents.ts -// cron.add (none) src/features/cron/cronOps.ts -// cron.cursor (none) src/features/cron/cronOps.ts -// cron.delete (none) src/features/cron/cronOps.ts -// dynamic_workflow_mode.enter dynamic_workflow src/features/dynamic_workflow/dynamicWorkflowOps.ts -// dynamic_workflow_mode.exit contextMemory, dynamic_workflow src/features/dynamic_workflow/dynamicWorkflowOps.ts -// forked (none) src/features/goal/goalOps.ts -// full_compaction.begin fullCompaction src/agent/fullCompaction/compactionOps.ts -// full_compaction.cancel fullCompaction src/agent/fullCompaction/compactionOps.ts -// full_compaction.complete fullCompaction src/agent/fullCompaction/compactionOps.ts -// goal.clear (none) src/features/goal/goalOps.ts -// goal.create (none) src/features/goal/goalOps.ts -// goal.update (none) src/features/goal/goalOps.ts -// interaction.request (none) src/features/interaction/interactionOps.ts -// interaction.resolved (none) src/features/interaction/interactionOps.ts -// interruptionReminder.recorded interruptionReminder src/agent/interruptionReminder/interruptionReminderOps.ts -// llm.request llm.requestTrace src/agent/llmRequester/llmRequestOps.ts -// llm.tools_snapshot llm.requestTrace src/agent/llmRequester/llmRequestOps.ts -// mcp.tools_discovered mcp.discovery src/agent/mcp/mcpDiscoveryOps.ts -// permission.record_approval_result permissionRules src/agent/permissionRules/permissionRulesOps.ts -// permission.set_mode permissionMode, permissionMode.configured src/agent/permissionMode/permissionModeOps.ts -// plan_mode.cancel plan src/features/plan/planOps.ts -// plan_mode.enter plan src/features/plan/planOps.ts -// plan_mode.exit plan src/features/plan/planOps.ts -// plan.revision plan src/features/plan/planOps.ts -// plugin.session_start pluginSessionStartSnapshot src/agent/plugin/agentPluginOps.ts -// profile.bind profile, profile.activeTools src/agent/profile/profileOps.ts -// prompt.accepted promptAdmission src/agent/prompt/promptOps.ts -// runtime.set_binding runtimeBinding src/agent/runtimeBinding/runtimeBindingOps.ts -// staleGuard.cleared staleGuard src/features/staleGuard/staleGuardOps.ts -// staleGuard.recorded staleGuard src/features/staleGuard/staleGuardOps.ts -// task.started task src/agent/task/taskOps.ts -// task.terminated task src/agent/task/taskOps.ts -// task.waitDelivered task.notificationDelivery src/agent/task/taskOps.ts -// token_counting.measured (none) src/agent/tokenCounting/tokenCountingOps.ts -// token_counting.rebased (none) src/agent/tokenCounting/tokenCountingOps.ts -// token_counting.truncated (none) src/agent/tokenCounting/tokenCountingOps.ts -// token_counting.turn_recorded (none) src/agent/tokenCounting/tokenCountingOps.ts -// tools.register_user_tool userTool src/agent/userTool/userToolOps.ts -// tools.reset_active_tools profile.activeTools src/agent/profile/profileOps.ts -// tools.set_active_tools profile.activeTools src/agent/profile/profileOps.ts -// tools.unregister_user_tool userTool src/agent/userTool/userToolOps.ts -// tools.update_store (none) src/features/todo/todoOps.ts -// tower_mode.enter tower, tower.owner src/features/tower/towerOps.ts -// tower_mode.exit tower, tower.owner src/features/tower/towerOps.ts -// turn.cancel turn src/agent/loop/turnOps.ts -// turn.ended turn src/agent/loop/turnOps.ts -// turn.prompt turn src/agent/loop/turnOps.ts -// turn.steer turn src/agent/loop/turnOps.ts -// usage.record (none) src/agent/usage/usageOps.ts +// config.update profile src/agent/profile/profileOps.ts +// context.append_loop_event contextMemory, turn src/agent/contextMemory/contextEvents.ts +// context.append_message contextMemory, plan, task.notificationDelivery src/agent/contextMemory/contextEvents.ts +// context.apply_compaction contextMemory, plan, task.notificationDelivery, turn src/agent/contextMemory/contextEvents.ts +// context.clear contextMemory, plan, task.notificationDelivery, turn src/agent/contextMemory/contextEvents.ts +// context.undo contextMemory, plan, task.notificationDelivery, turn src/agent/contextMemory/contextEvents.ts +// cron.add (none) src/features/cron/cronOps.ts +// cron.cursor (none) src/features/cron/cronOps.ts +// cron.delete (none) src/features/cron/cronOps.ts +// dynamic_workflow_mode.enter dynamic_workflow src/features/dynamic_workflow/dynamicWorkflowOps.ts +// dynamic_workflow_mode.exit contextMemory, dynamic_workflow src/features/dynamic_workflow/dynamicWorkflowOps.ts +// forked (none) src/features/goal/goalOps.ts +// full_compaction.begin fullCompaction src/agent/fullCompaction/compactionOps.ts +// full_compaction.cancel fullCompaction src/agent/fullCompaction/compactionOps.ts +// full_compaction.complete fullCompaction src/agent/fullCompaction/compactionOps.ts +// goal.clear (none) src/features/goal/goalOps.ts +// goal.create (none) src/features/goal/goalOps.ts +// goal.update (none) src/features/goal/goalOps.ts +// interaction.request (none) src/features/interaction/interactionOps.ts +// interaction.resolved (none) src/features/interaction/interactionOps.ts +// interruptionReminder.recorded interruptionReminder src/agent/interruptionReminder/interruptionReminderOps.ts +// llm.request llm.requestTrace src/agent/llmRequester/llmRequestOps.ts +// llm.tools_snapshot llm.requestTrace src/agent/llmRequester/llmRequestOps.ts +// mcp.tools_discovered mcp.discovery src/agent/mcp/mcpDiscoveryOps.ts +// permission.record_approval_result permissionRules src/agent/permissionRules/permissionRulesOps.ts +// permission.set_mode permissionMode, permissionMode.configured src/agent/permissionMode/permissionModeOps.ts +// plan_mode.cancel plan src/features/plan/planOps.ts +// plan_mode.enter plan src/features/plan/planOps.ts +// plan_mode.exit plan src/features/plan/planOps.ts +// plan.revision plan src/features/plan/planOps.ts +// plugin.session_start pluginSessionStartSnapshot src/agent/plugin/agentPluginOps.ts +// profile.bind profile, profile.activeTools src/agent/profile/profileOps.ts +// prompt.accepted promptAdmission src/agent/prompt/promptOps.ts +// runtime.set_binding runtimeBinding src/agent/runtimeBinding/runtimeBindingOps.ts +// staleGuard.cleared staleGuard src/features/staleGuard/staleGuardOps.ts +// staleGuard.recorded staleGuard src/features/staleGuard/staleGuardOps.ts +// task.started task src/agent/task/taskOps.ts +// task.terminated task src/agent/task/taskOps.ts +// task.waitDelivered task.notificationDelivery src/agent/task/taskOps.ts +// token_counting.measured (none) src/agent/tokenCounting/tokenCountingOps.ts +// token_counting.rebased (none) src/agent/tokenCounting/tokenCountingOps.ts +// token_counting.truncated (none) src/agent/tokenCounting/tokenCountingOps.ts +// token_counting.turn_recorded (none) src/agent/tokenCounting/tokenCountingOps.ts +// tools.register_user_tool userTool src/agent/userTool/userToolOps.ts +// tools.reset_active_tools profile.activeTools src/agent/profile/profileOps.ts +// tools.set_active_tools profile.activeTools src/agent/profile/profileOps.ts +// tools.unregister_user_tool userTool src/agent/userTool/userToolOps.ts +// tools.update_store (none) src/features/todo/todoOps.ts +// tower_mode.enter tower, tower.owner src/features/tower/towerOps.ts +// tower_mode.exit tower, tower.owner src/features/tower/towerOps.ts +// turn.cancel turn src/agent/loop/turnOps.ts +// turn.ended turn src/agent/loop/turnOps.ts +// turn.prompt turn src/agent/loop/turnOps.ts +// turn.steer turn src/agent/loop/turnOps.ts +// usage.record (none) src/agent/usage/usageOps.ts /** * states: profile @@ -153,14 +153,14 @@ interface ContextAppendMessagePayload { } /** - * states: contextMemory, plan, task.notificationDelivery · blobs: contextMemory + * states: contextMemory, plan, task.notificationDelivery, turn · blobs: contextMemory * owner: src/agent/contextMemory/contextEvents.ts * shared base: ...contextCompactionBaseShape */ type ContextApplyCompactionPayload = { _name: 'context.apply_compaction'; } & ({ summary: string, compactedCount: number, contextSummary?: string } | { contextSummary: string, compactedCount: number, summary?: string } | { summary: ContextMessage, count: number, compactedCount?: number }); /** - * states: contextMemory, plan, task.notificationDelivery · blobs: contextMemory + * states: contextMemory, plan, task.notificationDelivery, turn · blobs: contextMemory * owner: src/agent/contextMemory/contextEvents.ts */ interface ContextClearPayload { @@ -169,7 +169,7 @@ interface ContextClearPayload { } /** - * states: contextMemory, plan, task.notificationDelivery · blobs: contextMemory + * states: contextMemory, plan, task.notificationDelivery, turn · blobs: contextMemory * owner: src/agent/contextMemory/contextEvents.ts */ interface ContextUndoPayload { diff --git a/packages/agent-core-v2/src/agent/contextMemory/contextTranscript.ts b/packages/agent-core-v2/src/agent/contextMemory/contextTranscript.ts index 75df69068..aeb36bd1a 100644 --- a/packages/agent-core-v2/src/agent/contextMemory/contextTranscript.ts +++ b/packages/agent-core-v2/src/agent/contextMemory/contextTranscript.ts @@ -13,6 +13,7 @@ import type { ContextMessage } from './types'; export interface ContextTranscript { readonly entries: readonly ContextMessage[]; readonly times: readonly (number | undefined)[]; + readonly recordIndexes: readonly (number | undefined)[]; readonly foldedLength: number; } @@ -35,6 +36,7 @@ interface MutableMessage { interface MutableEntry { message: MutableMessage; time?: number; + recordIndex?: number; } export function reduceContextTranscript(records: Iterable): ContextTranscript { @@ -48,6 +50,8 @@ export function createContextTranscriptReducer(): ContextTranscriptReducer { let foldedLength = 0; let clearFloor = 0; let openEntry: MutableEntry | undefined; + let activeRecordIndex: number | undefined; + let nextRecordIndex = 0; const push = (...entries: MutableEntry[]): void => { transcript.push(...entries); @@ -56,7 +60,11 @@ export function createContextTranscriptReducer(): ContextTranscriptReducer { const fold = createLoopEventFold({ openAssistant: (time) => { - openEntry = { message: { role: 'assistant', content: [], toolCalls: [] }, time }; + openEntry = { + message: { role: 'assistant', content: [], toolCalls: [] }, + time, + recordIndex: activeRecordIndex, + }; push(openEntry); }, appendOpenContent: (part) => { @@ -77,10 +85,10 @@ export function createContextTranscriptReducer(): ContextTranscriptReducer { openEntry = undefined; }, pushToolMessage: (message, time) => { - push({ message: message as MutableMessage, time }); + push({ message: message as MutableMessage, time, recordIndex: activeRecordIndex }); }, pushMessage: (message, time) => { - push(toMutableEntry(message, time)); + push(toMutableEntry(message, time, activeRecordIndex)); }, }); @@ -115,6 +123,8 @@ export function createContextTranscriptReducer(): ContextTranscriptReducer { }; const add = (record: WireRecord): void => { + activeRecordIndex = nextRecordIndex; + nextRecordIndex += 1; switch (record.type) { case 'context.append_message': { fold.appendMessage(record['message'] as ContextMessage, record.time); @@ -138,6 +148,7 @@ export function createContextTranscriptReducer(): ContextTranscriptReducer { origin: { kind: 'compaction_summary' }, }, time: record.time, + recordIndex: activeRecordIndex, }); foldedLength = recoverFoldedLength(record, transcript, clearFloor, foldedLength); break; @@ -160,12 +171,17 @@ export function createContextTranscriptReducer(): ContextTranscriptReducer { result: () => ({ entries: transcript.map((e) => e.message), times: transcript.map((e) => e.time), + recordIndexes: transcript.map((e) => e.recordIndex), foldedLength, }), }; } -function toMutableEntry(message: ContextMessage, time: number | undefined): MutableEntry { +function toMutableEntry( + message: ContextMessage, + time: number | undefined, + recordIndex: number | undefined, +): MutableEntry { return { message: { ...(message.id !== undefined ? { id: message.id } : {}), @@ -177,6 +193,7 @@ function toMutableEntry(message: ContextMessage, time: number | undefined): Muta ...(message.origin !== undefined ? { origin: message.origin } : {}), }, time, + recordIndex, }; } diff --git a/packages/agent-core-v2/src/agent/contextMemory/conversationTime.ts b/packages/agent-core-v2/src/agent/contextMemory/conversationTime.ts index ca1edd089..b7275a15a 100644 --- a/packages/agent-core-v2/src/agent/contextMemory/conversationTime.ts +++ b/packages/agent-core-v2/src/agent/contextMemory/conversationTime.ts @@ -8,9 +8,7 @@ import { } from './contextEvents'; import type { ContextMessage } from './types'; -export function isUndoAnchor(message: ContextMessage): boolean { - if (message.role !== 'user') return false; - const origin = message.origin; +export function isUndoAnchorOrigin(origin: ContextMessage['origin']): boolean { if (origin === undefined || origin.kind === 'user') return true; return ( (origin.kind === 'skill_activation' || origin.kind === 'plugin_command') && @@ -18,6 +16,11 @@ export function isUndoAnchor(message: ContextMessage): boolean { ); } +export function isUndoAnchor(message: ContextMessage): boolean { + if (message.role !== 'user') return false; + return isUndoAnchorOrigin(message.origin); +} + export function isPromptOwnedInjection( message: ContextMessage, prompt: ContextMessage, diff --git a/packages/agent-core-v2/src/agent/loop/loopService.ts b/packages/agent-core-v2/src/agent/loop/loopService.ts index c1273046c..b063817f1 100644 --- a/packages/agent-core-v2/src/agent/loop/loopService.ts +++ b/packages/agent-core-v2/src/agent/loop/loopService.ts @@ -850,7 +850,7 @@ export class AgentLoopService extends Disposable implements IAgentLoopService { try { response = await request.result; } catch (error) { - this.appendInterruptedStreamContent(turnId, currentStep, stepUuid, streamParts, turnSignal); + this.appendInterruptedStreamContent(turnId, currentStep, stepUuid, streamParts); throw error; } this.lastRequestTraceId = request.trace.traceId; @@ -942,9 +942,7 @@ export class AgentLoopService extends Disposable implements IAgentLoopService { currentStep: number, stepUuid: string, streamParts: StreamPartCollector, - turnSignal: AbortSignal, ): void { - if (!turnSignal.aborted) return; for (const part of streamParts.drainInterruptedContent()) { this.context.appendLoopEvent({ type: 'content.part', diff --git a/packages/agent-core-v2/src/agent/loop/turnEvents.ts b/packages/agent-core-v2/src/agent/loop/turnEvents.ts index 4994ea4a0..aa6ab6630 100644 --- a/packages/agent-core-v2/src/agent/loop/turnEvents.ts +++ b/packages/agent-core-v2/src/agent/loop/turnEvents.ts @@ -47,19 +47,20 @@ export function turnPromptAttachments( input: readonly ContentPart[], ): TurnStartedPayload['promptAttachments'] { const attachments: { kind: 'image' | 'video' | 'audio'; fileId: string }[] = []; - const sessionMediaFileId = (url: string, id: string | undefined): string | undefined => { - if (id === undefined) return undefined; - return parseDaemonFileUrl(url)?.fileId === id ? id : undefined; + const promptMediaFileId = (url: string, id: string | undefined): string | undefined => { + const fileId = parseDaemonFileUrl(url)?.fileId; + if (id === undefined) return fileId; + return fileId === id ? id : undefined; }; for (const part of input) { if (part.type === 'image_url') { - const fileId = sessionMediaFileId(part.imageUrl.url, part.imageUrl.id); + const fileId = promptMediaFileId(part.imageUrl.url, part.imageUrl.id); if (fileId !== undefined) attachments.push({ kind: 'image', fileId }); } else if (part.type === 'video_url') { - const fileId = sessionMediaFileId(part.videoUrl.url, part.videoUrl.id); + const fileId = promptMediaFileId(part.videoUrl.url, part.videoUrl.id); if (fileId !== undefined) attachments.push({ kind: 'video', fileId }); } else if (part.type === 'audio_url') { - const fileId = sessionMediaFileId(part.audioUrl.url, part.audioUrl.id); + const fileId = promptMediaFileId(part.audioUrl.url, part.audioUrl.id); if (fileId !== undefined) attachments.push({ kind: 'audio', fileId }); } } diff --git a/packages/agent-core-v2/src/agent/loop/turnOps.ts b/packages/agent-core-v2/src/agent/loop/turnOps.ts index 97a9bf1a9..d54b8028e 100644 --- a/packages/agent-core-v2/src/agent/loop/turnOps.ts +++ b/packages/agent-core-v2/src/agent/loop/turnOps.ts @@ -2,7 +2,13 @@ import { z } from 'zod'; import type { PythinkerErrorPayload } from '#/_base/errors/serialize'; -import { ContextAppendLoopEvent } from '#/agent/contextMemory/contextEvents'; +import { + ContextAppendLoopEvent, + ContextApplyCompaction, + ContextClear, + ContextUndo, +} from '#/agent/contextMemory/contextEvents'; +import { isUndoAnchorOrigin } from '#/agent/contextMemory/conversationTime'; import type { PromptOrigin } from '#/agent/contextMemory/types'; import { AgentEvent2, type SerializedEvent2 } from '#/app/event/event2'; import type { ContentPart } from '#/kosong/contract/message'; @@ -13,6 +19,7 @@ import type { TurnInterruptReason } from './turnEvents'; export interface TurnModelState { readonly nextTurnId: number; readonly cancelledTurnIds: readonly number[]; + readonly anchorTurnIds: readonly number[]; readonly lastEnded?: { readonly turnId: number; readonly reason: 'completed' | 'cancelled' | 'failed' | 'blocked'; @@ -44,6 +51,7 @@ const turnSteerSchema = z.object(turnInputShape); export class TurnSteer extends AgentEvent2> { static override readonly type = 'turn.steer'; static override readonly durable = true; + static override readonly observable = true; static override readonly schema = turnSteerSchema; } export interface TurnSteer { @@ -111,7 +119,7 @@ export interface TurnEnded extends TurnEndedPayload {} export const turnKey = defineState( 'turn', - (): TurnModelState => ({ nextTurnId: 0, cancelledTurnIds: [] }), + (): TurnModelState => ({ nextTurnId: 0, cancelledTurnIds: [], anchorTurnIds: [] }), ).replayable({ schema: z.custom() }) .on(ContextAppendLoopEvent, (s, e) => { const { event } = e; @@ -125,8 +133,18 @@ export const turnKey = defineState( } if (next !== s) return next; }) - .on(TurnPrompt, (s) => advanceTurnClock(s, s.nextTurnId + 1)) + .on(TurnPrompt, (s, e) => { + const next = advanceTurnClock(s, s.nextTurnId + 1); + if (!isUndoAnchorOrigin(e.origin)) return next; + return { ...next, anchorTurnIds: [...s.anchorTurnIds, s.nextTurnId] }; + }) .on(TurnSteer, () => {}) + .on(ContextUndo, (s, e) => ({ + ...s, + anchorTurnIds: s.anchorTurnIds.slice(0, Math.max(0, s.anchorTurnIds.length - e.count)), + })) + .on(ContextApplyCompaction, (s) => ({ ...s, anchorTurnIds: [] })) + .on(ContextClear, (s) => ({ ...s, anchorTurnIds: [] })) .on(TurnCancel, (s, e) => { if (e.target === undefined || e.turnId === undefined) return; if (e.turnId < s.nextTurnId) return; diff --git a/packages/agent-core-v2/src/agent/mcp/output.ts b/packages/agent-core-v2/src/agent/mcp/output.ts index 996ca4ae2..6a93158a2 100644 --- a/packages/agent-core-v2/src/agent/mcp/output.ts +++ b/packages/agent-core-v2/src/agent/mcp/output.ts @@ -1,5 +1,6 @@ import type { ContentPart } from '#/kosong/contract/message'; import type { ITelemetryService } from '#/app/telemetry/telemetry'; +import type { ExecutableToolResult } from '#/tool/toolContract'; import { compressImageContentParts } from '#/agent/media/image-compress'; import { @@ -14,11 +15,6 @@ export interface McpOutputOptions { readonly telemetry?: ITelemetryService; } -export const MCP_MAX_OUTPUT_CHARS = 100_000; -const MCP_OUTPUT_TRUNCATED_TEXT = `\n\n[Output truncated: exceeded ${String( - MCP_MAX_OUTPUT_CHARS, -)} character limit. Use pagination or more specific queries to get remaining content.]`; - export const MCP_MAX_BINARY_PART_BYTES = 10 * 1024 * 1024; const MCP_MAX_BINARY_PART_CHARS = Math.ceil((MCP_MAX_BINARY_PART_BYTES * 4) / 3); @@ -28,7 +24,11 @@ function binaryPartTooLargeNotice(kind: 'image' | 'audio' | 'video', urlLength: return `[${kind}_url dropped: ~${approxMb} MB exceeds ${capMb} MB per-part limit. Try a smaller resource.]`; } -export function convertMCPContentBlock(block: MCPContentBlock): ContentPart | null { +function droppedBlockNotice(reason: string): ContentPart { + return { type: 'text', text: `[MCP content dropped: ${reason}]` }; +} + +export function convertMCPContentBlock(block: MCPContentBlock): ContentPart { if (block.type === 'text' && typeof block.text === 'string') { return { type: 'text', text: block.text }; } @@ -74,9 +74,12 @@ export function convertMCPContentBlock(block: MCPContentBlock): ContentPart | nu videoUrl: { url: `data:${mimeType};base64,${res.blob}` }, }; } - return null; + const approxMb = ((res.blob.length * 3) / 4 / (1024 * 1024)).toFixed(1); + return droppedBlockNotice( + `resource blob with unsupported mimeType "${mimeType}" (~${approxMb} MB, uri: ${res.uri}) was not delivered.`, + ); } - return null; + return droppedBlockNotice(`resource (uri: ${res.uri}) carried no text or blob payload.`); } if (block.type === 'resource_link' && typeof block.uri === 'string') { @@ -93,28 +96,22 @@ export function convertMCPContentBlock(block: MCPContentBlock): ContentPart | nu if (mimeType.startsWith('video/')) { return { type: 'video_url', videoUrl: { url: block.uri } }; } - return null; + return droppedBlockNotice( + `resource_link with unsupported mimeType "${mimeType}" was not delivered. Fetch it directly if needed: ${block.uri}`, + ); } - return null; + return droppedBlockNotice(`content block of unsupported type "${block.type}" was not delivered.`); } export async function mcpResultToExecutableOutput( result: MCPToolResult, qualifiedToolName: string, options: McpOutputOptions = {}, -): Promise<{ - output: string | ContentPart[]; - isError: boolean; - note?: string; - truncated?: true; -}> { +): Promise { const converted: ContentPart[] = []; for (const block of result.content) { - const part = convertMCPContentBlock(block); - if (part !== null) { - converted.push(part); - } + converted.push(convertMCPContentBlock(block)); } const wrapped = wrapMediaOnly(converted, qualifiedToolName); @@ -138,8 +135,7 @@ export async function mcpResultToExecutableOutput( } } - const budgeted = applyTextBudget(wrapped); - const compressed = await compressImageContentParts(budgeted.parts, { + const compressed = await compressImageContentParts(wrapped, { telemetry: options.telemetry === undefined ? undefined @@ -154,15 +150,15 @@ export async function mcpResultToExecutableOutput( }, }); const capped = applyBinaryPartCap(compressed.parts); - const truncated = budgeted.truncated || capped.truncated; const output = collapseSingleText(capped.parts); const note = compressed.captions.length > 0 ? compressed.captions.join('\n') : undefined; - return { + const base = { output, - isError: result.isError, note, - truncated: truncated ? true : undefined, + truncated: capped.truncated ? true : undefined, + spill: capped.notices.length > 0 ? { suffix: capped.notices.join('\n') } : undefined, }; + return result.isError ? { ...base, isError: true } : base; } function serializeStructuredExtras(extras: Record): string | undefined { @@ -208,63 +204,14 @@ function wrapMediaOnly(parts: readonly ContentPart[], qualifiedToolName: string) ]; } -function applyTextBudget(parts: readonly ContentPart[]): { - readonly parts: ContentPart[]; - readonly truncated: boolean; -} { - let remaining = MCP_MAX_OUTPUT_CHARS; - let truncated = false; - const out: ContentPart[] = []; - - for (const part of parts) { - if (part.type === 'text') { - if (remaining <= 0) { - truncated = true; - continue; - } - if (part.text.length > remaining) { - out.push({ type: 'text', text: part.text.slice(0, remaining) }); - remaining = 0; - truncated = true; - } else { - out.push(part); - remaining -= part.text.length; - } - continue; - } - - if (part.type === 'think') { - const size = part.think.length + (part.encrypted?.length ?? 0); - if (remaining <= 0) { - truncated = true; - continue; - } - if (size > remaining) { - out.push({ type: 'think', think: part.think.slice(0, remaining) }); - remaining = 0; - truncated = true; - } else { - out.push(part); - remaining -= size; - } - continue; - } - - out.push(part); - } - - if (truncated) { - appendTruncationNotice(out); - } - return { parts: out, truncated }; -} - function applyBinaryPartCap(parts: readonly ContentPart[]): { readonly parts: ContentPart[]; readonly truncated: boolean; + readonly notices: string[]; } { let truncated = false; const out: ContentPart[] = []; + const notices: string[] = []; for (const part of parts) { if (part.type === 'text' || part.type === 'think') { @@ -281,25 +228,16 @@ function applyBinaryPartCap(parts: readonly ContentPart[]): { if (url.length > MCP_MAX_BINARY_PART_CHARS) { const kind = part.type === 'image_url' ? 'image' : part.type === 'audio_url' ? 'audio' : 'video'; - out.push({ type: 'text', text: binaryPartTooLargeNotice(kind, url.length) }); + const notice = binaryPartTooLargeNotice(kind, url.length); + out.push({ type: 'text', text: notice }); + notices.push(notice); truncated = true; continue; } out.push(part); } - return { parts: out, truncated }; -} - -function appendTruncationNotice(out: ContentPart[]): void { - for (let i = out.length - 1; i >= 0; i--) { - const candidate = out[i]; - if (candidate?.type === 'text') { - out[i] = { type: 'text', text: candidate.text + MCP_OUTPUT_TRUNCATED_TEXT }; - return; - } - } - out.push({ type: 'text', text: MCP_OUTPUT_TRUNCATED_TEXT }); + return { parts: out, truncated, notices }; } function collapseSingleText(parts: readonly ContentPart[]): string | ContentPart[] { diff --git a/packages/agent-core-v2/src/agent/mcp/tools/mcp.ts b/packages/agent-core-v2/src/agent/mcp/tools/mcp.ts index 1067f5774..a5e220469 100644 --- a/packages/agent-core-v2/src/agent/mcp/tools/mcp.ts +++ b/packages/agent-core-v2/src/agent/mcp/tools/mcp.ts @@ -3,7 +3,7 @@ import type { ITelemetryService } from '#/app/telemetry/telemetry'; import { Error2, ErrorCodes, toErrorMessage } from '#/errors'; import { isAbortError } from '#/_base/utils/abort'; -import type { ExecutableTool, ExecutableToolContext, ExecutableToolResult } from '#/tool/toolContract'; +import type { ExecutableTool, ExecutableToolContext } from '#/tool/toolContract'; import { mcpResultToExecutableOutput } from '#/agent/mcp/output'; import type { MCPClient, MCPToolResult } from '#/mcpCore/types'; import { @@ -49,12 +49,10 @@ export function createMcpTool( } catch (error) { result = await retryAfterReconnect(error, client, args, context, options, callTool); } - return normalizeMcpToolResult( - await mcpResultToExecutableOutput(result, qualifiedName, { - originalsDir: options.originalsDir, - telemetry: options.telemetry, - }), - ); + return mcpResultToExecutableOutput(result, qualifiedName, { + originalsDir: options.originalsDir, + telemetry: options.telemetry, + }); }, }), }; @@ -113,19 +111,3 @@ async function retryAfterReconnect( } return callTool(freshClient, args, context.signal); } - -function normalizeMcpToolResult(result: { - readonly output: ExecutableToolResult['output']; - readonly isError: boolean; - readonly note?: string; - readonly truncated?: true; -}): ExecutableToolResult { - if (result.isError) { - return result.truncated === true - ? { output: result.output, isError: true, note: result.note, truncated: true } - : { output: result.output, isError: true, note: result.note }; - } - return result.truncated === true - ? { output: result.output, note: result.note, truncated: true } - : { output: result.output, note: result.note }; -} diff --git a/packages/agent-core-v2/src/agent/toolDedupe/toolDedupe.ts b/packages/agent-core-v2/src/agent/toolDedupe/toolDedupe.ts index 95dccc8a0..5763f4e21 100644 --- a/packages/agent-core-v2/src/agent/toolDedupe/toolDedupe.ts +++ b/packages/agent-core-v2/src/agent/toolDedupe/toolDedupe.ts @@ -1,23 +1,16 @@ import type { ContentPart } from '#/kosong/contract/message'; import { createDecorator, type ServiceIdentifier } from '#/_base/di/instantiation'; +import type { ExecutableToolErrorResult, ExecutableToolSuccessResult } from '#/tool/toolContract'; export type ToolDedupeOutput = string | ContentPart[]; -export interface ToolDedupeSuccessResult { - readonly output: ToolDedupeOutput; - readonly isError?: false | undefined; - readonly stopTurn?: boolean | undefined; +export interface ToolDedupeSuccessResult extends ExecutableToolSuccessResult { readonly message?: string | undefined; - readonly truncated?: boolean | undefined; } -export interface ToolDedupeErrorResult { - readonly output: ToolDedupeOutput; - readonly isError: true; - readonly stopTurn?: boolean | undefined; +export interface ToolDedupeErrorResult extends ExecutableToolErrorResult { readonly message?: string | undefined; - readonly truncated?: boolean | undefined; } export type ToolDedupeResult = ToolDedupeSuccessResult | ToolDedupeErrorResult; diff --git a/packages/agent-core-v2/src/agent/toolDedupe/toolDedupeService.ts b/packages/agent-core-v2/src/agent/toolDedupe/toolDedupeService.ts index 756bdc044..85ce08858 100644 --- a/packages/agent-core-v2/src/agent/toolDedupe/toolDedupeService.ts +++ b/packages/agent-core-v2/src/agent/toolDedupe/toolDedupeService.ts @@ -105,9 +105,13 @@ function appendReminder(result: ToolDedupeResult, reminderText: string): ToolDed } newOutput = arr; } + const spill = + result.spill !== undefined + ? { ...result.spill, suffix: (result.spill.suffix ?? '') + reminderText } + : undefined; return result.isError === true - ? { ...result, output: newOutput, isError: true } - : { ...result, output: newOutput }; + ? { ...result, output: newOutput, isError: true, spill } + : { ...result, output: newOutput, spill }; } function forceStopResult(result: ToolDedupeResult, reminderText: string): ToolDedupeResult { diff --git a/packages/agent-core-v2/src/agent/toolExecutor/toolExecutorService.ts b/packages/agent-core-v2/src/agent/toolExecutor/toolExecutorService.ts index 55a6cf502..712e97e34 100644 --- a/packages/agent-core-v2/src/agent/toolExecutor/toolExecutorService.ts +++ b/packages/agent-core-v2/src/agent/toolExecutor/toolExecutorService.ts @@ -23,6 +23,7 @@ import { type RunnableToolExecution, type ToolExecution, type ToolResult, + type ToolResultSpill, type ToolUpdate, } from '#/tool/toolContract'; import type { @@ -884,7 +885,14 @@ function normalizeToolResult(result: ExecutableToolResult): ToolResult { stopTurn?: boolean; truncated?: true; note?: string; - } = { output, stopTurn: result.stopTurn }; + spill?: ToolResultSpill; + spillExempt?: true; + } = { + output, + stopTurn: result.stopTurn, + spill: result.spill, + spillExempt: result.spillExempt, + }; if (result.truncated === true) base.truncated = true; if (typeof result.note === 'string' && result.note.length > 0) base.note = result.note; if (result.isError === true) { diff --git a/packages/agent-core-v2/src/agent/toolResultTruncation/toolResultTruncation.ts b/packages/agent-core-v2/src/agent/toolResultTruncation/toolResultTruncation.ts index 4fac7ffe0..2bf2743a0 100644 --- a/packages/agent-core-v2/src/agent/toolResultTruncation/toolResultTruncation.ts +++ b/packages/agent-core-v2/src/agent/toolResultTruncation/toolResultTruncation.ts @@ -15,6 +15,8 @@ export interface IAgentToolResultTruncationService { truncateForModel( input: ToolResultTruncationInput, ): Promise; + + isSpillFilePath(path: string): boolean; } export const IAgentToolResultTruncationService: ServiceIdentifier< diff --git a/packages/agent-core-v2/src/agent/toolResultTruncation/toolResultTruncationService.ts b/packages/agent-core-v2/src/agent/toolResultTruncation/toolResultTruncationService.ts index d0631b533..6445abfcc 100644 --- a/packages/agent-core-v2/src/agent/toolResultTruncation/toolResultTruncationService.ts +++ b/packages/agent-core-v2/src/agent/toolResultTruncation/toolResultTruncationService.ts @@ -2,21 +2,33 @@ import { randomUUID } from 'node:crypto'; import { LifecycleScope } from '#/app/scopes'; import { ScopeActivation, registerScopedService } from '#/_base/di/scope'; import { IAgentScopeContext } from '#/agent/scopeContext/scopeContext'; -import type { ExecutableToolResult } from '#/tool/toolContract'; +import { + DEFAULT_TOOL_RESULT_MAX_CHARS, + DEFAULT_TOOL_RESULT_MAX_RETAINED_CHARS, + type ExecutableToolResult, +} from '#/tool/toolContract'; import { IBootstrapService } from '#/app/bootstrap/bootstrap'; import type { ContentPart } from '#/kosong/contract/message'; import { IFileSystemStorageService } from '#/persistence/interface/storage'; -import { join } from 'pathe'; +import { join, normalize } from 'pathe'; import { IAgentToolResultTruncationService, type ToolResultTruncationInput, } from './toolResultTruncation'; -const TOOL_RESULT_MAX_CHARS = 50_000; -const TOOL_RESULT_PREVIEW_CHARS = 2_000; +const TOOL_RESULT_PREVIEW_HEAD_CHARS = 4_096; +const TOOL_RESULT_PREVIEW_TAIL_CHARS = 1_024; +const TOOL_RESULT_MAX_LINE_CHARS = 2_000; +const TRUNCATION_MARKER = '[...truncated]'; const encoder = new TextEncoder(); +interface ShapedOutput { + readonly output: ExecutableToolResult['output']; + readonly textChars: number; + readonly hasMedia: boolean; +} + export class ToolResultTruncationService implements IAgentToolResultTruncationService { declare readonly _serviceBrand: undefined; @@ -33,70 +45,285 @@ export class ToolResultTruncationService implements IAgentToolResultTruncationSe async truncateForModel( input: ToolResultTruncationInput, ): Promise { - const text = persistableToolResultText(input.result.output); - if (text === undefined || text.length <= TOOL_RESULT_MAX_CHARS) return input.result; - if (input.result.truncated === true) return input.result; + const { result } = input; + if (result.spillExempt === true) return result; + + const rawText = persistableToolResultText(result.output); + if (rawText.length <= DEFAULT_TOOL_RESULT_MAX_CHARS) return result; - const saved = await this.saveToolResult(input.toolName, input.toolCallId, text); - if (saved === undefined) return input.result; + const { spill, ...rest } = result; + const retainedText = + rawText.length <= DEFAULT_TOOL_RESULT_MAX_RETAINED_CHARS + ? rawText + : rawText.slice(0, DEFAULT_TOOL_RESULT_MAX_RETAINED_CHARS); + const shaped = shapeOutput(result.output, TOOL_RESULT_MAX_LINE_CHARS); + const totalChars = spill?.totalChars ?? rawText.length; + const suffix = spill?.suffix ?? ''; + const saved = + spill?.outputPath !== undefined + ? { outputPath: spill.outputPath, preservedChars: totalChars } + : await this.saveToolResult(input.toolName, input.toolCallId, retainedText); + if (saved === undefined) { + const fallback = renderUnpersistedToolResult( + input.toolName, + input.toolCallId, + retainedText, + totalChars, + DEFAULT_TOOL_RESULT_MAX_CHARS, + suffix, + ); + return { ...rest, output: mergeSpillPointer(shaped.output, fallback), truncated: true } as T; + } + + if (shaped.textChars <= DEFAULT_TOOL_RESULT_MAX_CHARS) { + const inlineSuffix = dropInlineSuffixLines(suffix, persistableToolResultText(shaped.output)); + return { + ...rest, + output: appendToToolResultOutput( + shaped.output, + renderAppendedSpillPointer( + saved.outputPath, + saved.preservedChars, + totalChars, + inlineSuffix, + shaped.hasMedia, + ), + ), + truncated: true, + } as T; + } + const pointer = renderPersistedToolResult( + input.toolName, + input.toolCallId, + retainedText, + saved.outputPath, + saved.preservedChars, + totalChars, + DEFAULT_TOOL_RESULT_MAX_CHARS, + suffix, + shaped.hasMedia, + ); return { - ...input.result, - output: renderPersistedToolResult(input.toolName, input.toolCallId, text, saved.outputPath), + ...rest, + output: mergeSpillPointer(shaped.output, pointer), truncated: true, } as T; } + isSpillFilePath(path: string): boolean { + const dir = normalize(join(this.bootstrap.homeDir, this.storageScope)); + const normalized = normalize(path); + return normalized === dir || normalized.startsWith(`${dir}/`); + } + private async saveToolResult( toolName: string, toolCallId: string, text: string, - ): Promise<{ readonly outputPath: string } | undefined> { + ): Promise<{ readonly outputPath: string; readonly preservedChars: number } | undefined> { try { const key = `${safeToolResultFileStem(toolName, toolCallId)}-${randomUUID()}.txt`; await this.storage.write(this.storageScope, key, encoder.encode(text), { atomic: true }); - return { outputPath: join(this.bootstrap.homeDir, this.storageScope, key) }; + return { + outputPath: join(this.bootstrap.homeDir, this.storageScope, key), + preservedChars: text.length, + }; } catch { return undefined; } } } -function persistableToolResultText(output: ExecutableToolResult['output']): string | undefined { +function shapeOutput( + output: ExecutableToolResult['output'], + maxLineChars: number, +): ShapedOutput { + if (typeof output === 'string') { + const shaped = shapeStringPerLine(output, maxLineChars); + return { output: shaped.text, textChars: shaped.text.length, hasMedia: false }; + } + const out: ContentPart[] = []; + let textChars = 0; + let hasMedia = false; + for (const part of output) { + if (part.type === 'text') { + const shaped = shapeStringPerLine(part.text, maxLineChars); + out.push({ type: 'text', text: shaped.text }); + textChars += shaped.text.length; + continue; + } + if (part.type === 'think') { + textChars += part.think.length + (part.encrypted?.length ?? 0); + } else { + hasMedia = true; + } + out.push(part); + } + return { output: out, textChars, hasMedia }; +} + +function shapeStringPerLine( + text: string, + maxLineChars: number, +): { readonly text: string; readonly truncated: boolean } { + let truncated = false; + const lines = text.match(/[^\r\n]*(?:\r\n|[\n\r])|[^\r\n]+/g) ?? []; + const out: string[] = []; + for (const originalLine of lines) { + let line = originalLine; + if (line.length > maxLineChars) { + const lineBreak = /[\r\n]+$/.exec(line)?.[0] ?? ''; + const suffix = TRUNCATION_MARKER + lineBreak; + const effectiveMaxLength = Math.max(maxLineChars, suffix.length); + line = line.slice(0, effectiveMaxLength - suffix.length) + suffix; + truncated = true; + } + out.push(line); + } + return { text: out.join(''), truncated }; +} + +function persistableToolResultText(output: ExecutableToolResult['output']): string { if (typeof output === 'string') return output; - if ( - !output.every((part): part is Extract => part.type === 'text') - ) { - return undefined; + let text = ''; + for (const part of output) { + if (part.type === 'text') text += part.text; + else if (part.type === 'think') text += part.think; } - return output.map((part) => part.text).join(''); + return text; +} + +function mergeSpillPointer( + output: ExecutableToolResult['output'], + pointer: string, +): ExecutableToolResult['output'] { + if (typeof output === 'string') return pointer; + const mediaParts = output.filter((part) => part.type !== 'text' && part.type !== 'think'); + if (mediaParts.length === 0) return pointer; + return [{ type: 'text', text: pointer }, ...mediaParts]; +} + +function renderAppendedSpillPointer( + outputPath: string, + preservedChars: number, + totalChars: number, + suffix: string, + hasMedia: boolean, +): string { + const firstLine = + totalChars > preservedChars + ? `[Per-line truncation occurred; only the first ${String(preservedChars)} characters (of ${String(totalChars)}) were saved to a file.` + : hasMedia + ? '[Per-line truncation occurred; the complete text output was saved to a file (media parts stay attached to this result).' + : '[Per-line truncation occurred; the complete output was saved to a file.'; + const lines = [ + firstLine, + `output_path: ${outputPath}`, + 'next_step: Use Read with output_path to page through the saved output, or Grep to search it.]', + ]; + if (suffix.length > 0) lines.push('', suffix); + return lines.join('\n'); +} + +function appendToToolResultOutput( + output: ExecutableToolResult['output'], + note: string, +): ExecutableToolResult['output'] { + if (typeof output === 'string') { + return output.endsWith('\n') || output.length === 0 ? `${output}${note}` : `${output}\n${note}`; + } + const parts = [...output]; + const last = parts.at(-1); + if (last !== undefined && last.type === 'text') { + parts[parts.length - 1] = { type: 'text', text: `${last.text}\n${note}` }; + } else { + parts.push({ type: 'text', text: note }); + } + return parts; } function renderPersistedToolResult( toolName: string, toolCallId: string, - text: string, + previewText: string, outputPath: string, + preservedChars: number, + totalChars: number, + maxChars: number, + suffix: string, + hasMedia: boolean, ): string { + const partial = preservedChars < totalChars; const lines = [ - `Tool output exceeded ${String(TOOL_RESULT_MAX_CHARS)} characters; showing a preview only.`, + partial + ? `Tool output exceeded ${String(maxChars)} characters; the first ${String(preservedChars)} characters (of ${String(totalChars)}) were saved to a file.` + : hasMedia + ? `Tool output exceeded ${String(maxChars)} characters; the full text output was saved to a file (media parts stay attached to this result).` + : `Tool output exceeded ${String(maxChars)} characters; the full output was saved to a file.`, `tool_name: ${toolName}`, `tool_call_id: ${toolCallId}`, - `output_size_chars: ${String(text.length)}`, - `output_size_bytes: ${String(Buffer.byteLength(text, 'utf8'))}`, + partial + ? `output_size_chars: ${String(totalChars)} (only the first ${String(preservedChars)} characters were preserved)` + : `output_size_chars: ${String(totalChars)}`, + ]; + if (preservedChars === previewText.length) { + lines.push(`output_size_bytes: ${String(Buffer.byteLength(previewText, 'utf8'))}`); + } + lines.push( `output_path: ${outputPath}`, - 'next_step: Use Read with output_path to page through the full output.', - '', - '[preview]', - text.slice(0, TOOL_RESULT_PREVIEW_CHARS), + 'next_step: Use Read with output_path to page through the saved output, or Grep to search it.', + ); + appendPreviewLines(lines, previewText); + if (suffix.length > 0) lines.push('', suffix); + return lines.join('\n'); +} + +function renderUnpersistedToolResult( + toolName: string, + toolCallId: string, + previewText: string, + totalChars: number, + maxChars: number, + suffix: string, +): string { + const lines = [ + `Tool output exceeded ${String(maxChars)} characters and could not be saved to a file; only this preview is available.`, + `tool_name: ${toolName}`, + `tool_call_id: ${toolCallId}`, + `output_size_chars: ${String(totalChars)}`, ]; + appendPreviewLines(lines, previewText); + if (suffix.length > 0) lines.push('', suffix); return lines.join('\n'); } +function appendPreviewLines(lines: string[], previewText: string): void { + const head = previewText.slice(0, TOOL_RESULT_PREVIEW_HEAD_CHARS); + const tailStart = Math.max(head.length, previewText.length - TOOL_RESULT_PREVIEW_TAIL_CHARS); + const tail = previewText.slice(tailStart); + lines.push('', `[preview: chars [0, ${String(head.length)})]`, head); + if (tail !== '') { + if (tailStart > head.length) { + lines.push('', `[elided: chars [${String(head.length)}, ${String(tailStart)})]`); + } + lines.push('', `[preview: chars [${String(tailStart)}, ${String(previewText.length)})]`, tail); + } +} + +function dropInlineSuffixLines(suffix: string, shapedText: string): string { + if (suffix.length === 0) return ''; + const lines = suffix.split('\n'); + if (!lines.some((line) => line.length > 0 && shapedText.includes(line))) return suffix; + return lines + .filter((line) => line.length > 0 && !shapedText.includes(line)) + .join('\n'); +} + function safeToolResultFileStem(toolName: string, toolCallId: string): string { const label = `${toolName}-${toolCallId}` - .replace(/[^a-zA-Z0-9._-]+/g, '_') - .replace(/^_+|_+$/g, '') + .replaceAll(/[^a-zA-Z0-9._-]+/g, '_') + .replaceAll(/^_+|_+$/g, '') .slice(0, 80); return label || 'tool-result'; } diff --git a/packages/agent-core-v2/src/agent/tools/fetch-url/fetchUrlTool.ts b/packages/agent-core-v2/src/agent/tools/fetch-url/fetchUrlTool.ts index 937e0afd2..9954ee42c 100644 --- a/packages/agent-core-v2/src/agent/tools/fetch-url/fetchUrlTool.ts +++ b/packages/agent-core-v2/src/agent/tools/fetch-url/fetchUrlTool.ts @@ -6,7 +6,7 @@ import { type ExecutableToolResult, type ToolExecution, } from '#/tool/toolContract'; -import { ToolResultBuilder } from '#/tool/result-builder'; +import { ToolOutputAccumulator } from '#/tool/output-accumulator'; import { registerAgentToolService } from '#/agent/toolRegistry/toolContribution'; import { IWebFetchService } from '#/app/web/web'; @@ -50,7 +50,7 @@ export class FetchURLTool implements IFetchURLTool { }; } - const builder = new ToolResultBuilder({ maxLineLength: null }); + const builder = new ToolOutputAccumulator(); const note = kind === 'passthrough' ? 'The returned content is the full response body, returned verbatim.' diff --git a/packages/agent-core-v2/src/agent/tools/os/bash/bashTool.ts b/packages/agent-core-v2/src/agent/tools/os/bash/bashTool.ts index ed0fe9908..961ffd903 100644 --- a/packages/agent-core-v2/src/agent/tools/os/bash/bashTool.ts +++ b/packages/agent-core-v2/src/agent/tools/os/bash/bashTool.ts @@ -9,11 +9,16 @@ import { IAgentRuntimeService, inspectAgentRuntime } from '#/agent/runtimeBindin import { RuntimeWorkspaceView } from '#/runtime/runtimeWorkspaceView'; import { IAgentToolPolicyService } from '#/agent/toolPolicy/toolPolicy'; import { getShellPathBridge } from '#/_base/execEnv/shellPathBridge'; -import type { ExecutableToolResult, ToolExecution, ToolUpdate } from '#/tool/toolContract'; import { - type ExecutableToolResultBuilderResult, - ToolResultBuilder, -} from '#/tool/result-builder'; + DEFAULT_TOOL_RESULT_MAX_CHARS, + type ExecutableToolResult, + type ToolExecution, + type ToolUpdate, +} from '#/tool/toolContract'; +import { + type ToolOutputAccumulatorResult, + ToolOutputAccumulator, +} from '#/tool/output-accumulator'; import { registerAgentToolService } from '#/agent/toolRegistry/toolContribution'; import { toInputJsonSchema } from '#/tool/input-schema'; import { literalRulePattern, matchesGlobRuleSubject } from '#/tool/rule-match'; @@ -186,7 +191,7 @@ export class BashTool implements IBashTool { : normalizeTimeoutMs(args.timeout, true) : foregroundTimeoutMs; - const builder = new ToolResultBuilder(); + const builder = new ToolOutputAccumulator(); let proc: IHostProcess; try { proc = lease.track(await this.spawn(lease.runtime.process!, env, effectiveCwd, command)); @@ -208,7 +213,11 @@ export class BashTool implements IBashTool { if (!collectForegroundOutput) return; onUpdate?.({ kind, text }); builder.write(text); - if (!foregroundOutputPersisted && builder.truncated && foregroundTaskId !== undefined) { + if ( + !foregroundOutputPersisted && + builder.totalChars > DEFAULT_TOOL_RESULT_MAX_CHARS && + foregroundTaskId !== undefined + ) { this.tasks.persistOutput(foregroundTaskId); foregroundOutputPersisted = true; } @@ -302,12 +311,12 @@ export class BashTool implements IBashTool { private async foregroundCompletionResult( taskId: string, proc: IHostProcess, - builder: ToolResultBuilder, + builder: ToolOutputAccumulator, foregroundTimeoutMs: number, ): Promise { const current = this.tasks.getTask(taskId); const exitCode = current?.kind === 'process' ? current.exitCode : proc.exitCode; - let result: ExecutableToolResultBuilderResult; + let result: ToolOutputAccumulatorResult; if (current?.status === 'timed_out') { const timeoutLabel = formatTimeoutLabel(foregroundTimeoutMs); result = builder.error(`Command killed by timeout (${timeoutLabel})`, { @@ -331,27 +340,33 @@ export class BashTool implements IBashTool { brief: `Failed with exit code: ${String(exitCode)}`, }); } - return this.addForegroundOutputReference(taskId, result); + return this.addForegroundOutputReference(taskId, result, builder.totalChars); } private async addForegroundOutputReference( taskId: string, - result: ExecutableToolResultBuilderResult, + result: ToolOutputAccumulatorResult, + totalChars: number, ): Promise { - if (!result.truncated) return result; + if (totalChars <= DEFAULT_TOOL_RESULT_MAX_CHARS) return result; const output = await this.tasks.getOutputSnapshot(taskId, 0); - if (!output.fullOutputAvailable || output.outputPath === undefined) return result; + if (!output.fullOutputAvailable || output.outputPath === undefined) { + return result; + } const taskOutputHint = this.allowBackground() - ? `, or TaskOutput(task_id="${taskId}")` + ? `\nnext_step: Use TaskOutput(task_id="${taskId}") to query the task output.` : ''; - const reference = - `\n\n[Full output saved]\n` + - `task_id: ${taskId}\n` + - `output_path: ${output.outputPath}\n` + - `output_size_bytes: ${String(output.outputSizeBytes)}\n` + - `next_step: Use Read with output_path to page through the full log${taskOutputHint}.`; - return { ...result, output: `${result.output}${reference}` }; + const taskInfo = `task_id: ${taskId}\noutput_size_bytes: ${String(output.outputSizeBytes)}${taskOutputHint}`; + const existingSuffix = result.spill?.suffix; + return { + ...result, + spill: { + outputPath: output.outputPath, + totalChars, + suffix: existingSuffix !== undefined ? `${existingSuffix}\n${taskInfo}` : taskInfo, + }, + }; } private backgroundStartedResult( @@ -359,7 +374,7 @@ export class BashTool implements IBashTool { proc: IHostProcess, description: string, labels: { title: string; brief: string }, - builder = new ToolResultBuilder(), + builder = new ToolOutputAccumulator(), scenario: 'background_started' | 'foreground_detached' = 'background_started', ): ExecutableToolResult { const status = this.tasks.getTask(taskId)?.status ?? 'running'; @@ -376,7 +391,6 @@ export class BashTool implements IBashTool { const foregroundOutput = foregroundResult.output.length > 0 ? foregroundResult.output : ''; const result: ExecutableToolResult & { readonly brief: string; - readonly truncated: boolean; } = { isError: false, output: @@ -384,7 +398,6 @@ export class BashTool implements IBashTool { ? metadata : `${metadata}\n\nforeground_output:\n${foregroundOutput}`, brief: labels.brief, - truncated: foregroundResult.truncated, }; return result; } diff --git a/packages/agent-core-v2/src/agent/tools/os/grep/grepTool.ts b/packages/agent-core-v2/src/agent/tools/os/grep/grepTool.ts index 243825b5f..174817c6e 100644 --- a/packages/agent-core-v2/src/agent/tools/os/grep/grepTool.ts +++ b/packages/agent-core-v2/src/agent/tools/os/grep/grepTool.ts @@ -1,6 +1,6 @@ import { normalize } from 'pathe'; -import { ToolResultBuilder } from '#/tool/result-builder'; +import { ToolOutputAccumulator } from '#/tool/output-accumulator'; import { ToolAccesses, type ExecutableToolResult, @@ -246,7 +246,10 @@ export class GrepTool implements IGrepTool { if (paginationTruncated) { const total = afterOffset.length + offset; const nextOffset = offset + headLimit; - const paginationNotice = `Results truncated to ${String(headLimit)} lines (total: ${String(total)}). Use offset=${String(nextOffset)} to see more.`; + const paginationNotice = + bufferTruncated || timedOut + ? `Results truncated to ${String(headLimit)} lines (total: ${String(total)} of a partial result set). Use offset=${String(nextOffset)} to see more.` + : `Results truncated to ${String(headLimit)} lines (total: ${String(total)}). Use offset=${String(nextOffset)} to see more.`; if (mode === 'count_matches') { headerLines.push(paginationNotice); } else { @@ -255,12 +258,12 @@ export class GrepTool implements IGrepTool { } if (bufferTruncated) { messages.push( - `[stdout truncated at ${String(MAX_OUTPUT_BYTES)} bytes; incomplete trailing line omitted]`, + `[Output truncated at ${String(MAX_OUTPUT_BYTES)} bytes of rg output — the result set is incomplete. Narrow the pattern, path, or glob filters and re-run to recover complete results.]`, ); } if (timedOut) { messages.push( - `Grep timed out after ${String(DEFAULT_TIMEOUT_MS / 1000)}s; partial results returned`, + `Grep timed out after ${String(DEFAULT_TIMEOUT_MS / 1000)}s; partial results returned. Narrow the path, glob, or pattern and retry for complete results.`, ); } @@ -287,7 +290,7 @@ export class GrepTool implements IGrepTool { : visibleBody; const combined = [...headerLines, body, ...messages].filter((part) => part !== '').join('\n'); - const builder = new ToolResultBuilder(); + const builder = new ToolOutputAccumulator(); builder.write(combined); return builder.ok(); } diff --git a/packages/agent-core-v2/src/agent/tools/os/read/readTool.ts b/packages/agent-core-v2/src/agent/tools/os/read/readTool.ts index 6b849fa15..85fb3f32a 100644 --- a/packages/agent-core-v2/src/agent/tools/os/read/readTool.ts +++ b/packages/agent-core-v2/src/agent/tools/os/read/readTool.ts @@ -29,6 +29,7 @@ import { TRANSCODE_MAX_BYTES, type ReadInput, } from './read'; +import { IAgentToolResultTruncationService } from '#/agent/toolResultTruncation/toolResultTruncation'; import readDescriptionTemplate from './read.md?raw'; interface LineEndingFlags { @@ -207,6 +208,7 @@ export class ReadTool implements IReadTool { @IAgentRuntimeService private readonly runtime: IAgentRuntimeService, @ISessionWorkspaceContext private readonly workspaceCtx: ISessionWorkspaceContext, @ISessionSkillCatalog private readonly skillCatalog: ISessionSkillCatalog, + @IAgentToolResultTruncationService private readonly resultTruncation: IAgentToolResultTruncationService, ) {} private workspaceConfig(view: RuntimeWorkspaceView): WorkspaceConfig { @@ -243,7 +245,10 @@ export class ReadTool implements IReadTool { if (lease.runtime.identity.generation !== inspected.identity.generation) { return { isError: true, output: 'Runtime changed before execution. Retry the tool call.' }; } - return await this.execution(lease.runtime.fs!, args, path); + const result = await this.execution(lease.runtime.fs!, args, path); + return this.resultTruncation.isSpillFilePath(path) + ? { ...result, spillExempt: true as const } + : result; } finally { lease.dispose(); } @@ -512,7 +517,9 @@ export class ReadTool implements IReadTool { parts.push('End of file reached.'); } if (input.truncatedLineNumbers.length > 0) { - parts.push(`Lines [${input.truncatedLineNumbers.join(', ')}] were truncated.`); + parts.push( + `Lines [${input.truncatedLineNumbers.join(', ')}] were truncated to ${String(MAX_LINE_LENGTH)} characters; use Bash (e.g. cut or sed) to read the elided content of those lines.`, + ); } if (input.lineEndingStyle === 'mixed') { parts.push( diff --git a/packages/agent-core-v2/src/agent/tools/web-search/webSearchTool.ts b/packages/agent-core-v2/src/agent/tools/web-search/webSearchTool.ts index d0a4f51a7..d16d1b990 100644 --- a/packages/agent-core-v2/src/agent/tools/web-search/webSearchTool.ts +++ b/packages/agent-core-v2/src/agent/tools/web-search/webSearchTool.ts @@ -6,7 +6,7 @@ import { type ExecutableToolResult, type ToolExecution, } from '#/tool/toolContract'; -import { ToolResultBuilder } from '#/tool/result-builder'; +import { ToolOutputAccumulator } from '#/tool/output-accumulator'; import { registerAgentToolService } from '#/agent/toolRegistry/toolContribution'; import { IWebSearchProviderService } from '#/app/auth/webSearch/webSearch'; @@ -52,7 +52,7 @@ export class WebSearchTool implements IWebSearchTool { } try { const results = await provider.search(args.query, { toolCallId, signal }); - const builder = new ToolResultBuilder({ maxLineLength: null }); + const builder = new ToolOutputAccumulator(); if (results.length === 0) { builder.write('No search results found.'); diff --git a/packages/agent-core-v2/src/agent/undo/undoService.ts b/packages/agent-core-v2/src/agent/undo/undoService.ts index 11c870c0f..1b4446c7b 100644 --- a/packages/agent-core-v2/src/agent/undo/undoService.ts +++ b/packages/agent-core-v2/src/agent/undo/undoService.ts @@ -17,6 +17,7 @@ import { } from '#/agent/contextMemory/conversationTime'; import { IAgentFullCompactionService } from '#/agent/fullCompaction/fullCompaction'; import { IAgentLoopService } from '#/agent/loop/loop'; +import { turnKey } from '#/agent/loop/turnOps'; import { IAgentPromptService } from '#/agent/prompt/prompt'; import { promptMetadataTextFromContentParts } from '#/agent/prompt/promptMetadataText'; import { IAgentScopeContext } from '#/agent/scopeContext/scopeContext'; @@ -34,13 +35,18 @@ import { keepsUndoCheckpoints } from '#/state/state'; import { IAgentConversationUndoService, type UndoAvailability } from './undo'; -export class ContextUndone extends AgentEvent2<{ readonly agentId: string; readonly turns: number }> { +export class ContextUndone extends AgentEvent2<{ + readonly agentId: string; + readonly turns: number; + readonly fromTurnId?: number; +}> { static override readonly type = 'context.undone'; static override readonly observable = true; } export interface ContextUndone { readonly agentId: string; readonly turns: number; + readonly fromTurnId?: number; } export class AgentConversationUndoService @@ -106,6 +112,7 @@ export class AgentConversationUndoService throw this.busyError('compaction'); } this.assertUndoAvailable(turns); + const fromTurnId = this.removedFromTurnId(turns); this.context.undo(turns); await this.flushAfterCommit('context cut'); await this.reconcileParticipants(); @@ -113,7 +120,7 @@ export class AgentConversationUndoService await this.reconcileLastPromptSafely(); this.telemetry.track2('conversation_undo', { count: turns }); await this.dispatcher.dispatch( - new ContextUndone({ agentId: this.agentCtx.agentId, turns }), + new ContextUndone({ agentId: this.agentCtx.agentId, turns, fromTurnId }), ); return turns; } finally { @@ -121,6 +128,15 @@ export class AgentConversationUndoService } } + private removedFromTurnId(turns: number): number | undefined { + if (!this.agentState.has(turnKey)) return undefined; + const anchorTurnIds = this.agentState.get(turnKey).anchorTurnIds; + if (anchorTurnIds.length < turns) return undefined; + const totalAnchors = computeUndoCut(this.context.get(), Number.MAX_SAFE_INTEGER).removedCount; + if (totalAnchors !== anchorTurnIds.length) return undefined; + return anchorTurnIds[anchorTurnIds.length - turns]; + } + private checkpointDepth(): { depth: number; model: string } { let depth = Number.POSITIVE_INFINITY; let model = ''; diff --git a/packages/agent-core-v2/src/tool/output-accumulator.ts b/packages/agent-core-v2/src/tool/output-accumulator.ts new file mode 100644 index 000000000..31b8ae7dd --- /dev/null +++ b/packages/agent-core-v2/src/tool/output-accumulator.ts @@ -0,0 +1,91 @@ +import { + DEFAULT_TOOL_RESULT_MAX_CHARS, + DEFAULT_TOOL_RESULT_MAX_RETAINED_CHARS, + type ExecutableToolErrorResult, + type ExecutableToolSuccessResult, + type ToolResultSpill, +} from './toolContract'; + +export type ToolOutputAccumulatorResult = ( + | ExecutableToolErrorResult + | ExecutableToolSuccessResult +) & { + readonly output: string; + readonly brief?: string; +}; + +export class ToolOutputAccumulator { + private readonly buffer: string[] = []; + private retainedChars = 0; + private totalCharsValue = 0; + + get nChars(): number { + return this.retainedChars; + } + + get totalChars(): number { + return this.totalCharsValue; + } + + write(text: string): void { + this.totalCharsValue += text.length; + if (this.retainedChars >= DEFAULT_TOOL_RESULT_MAX_RETAINED_CHARS) return; + const remainingRetention = DEFAULT_TOOL_RESULT_MAX_RETAINED_CHARS - this.retainedChars; + const kept = text.length <= remainingRetention ? text : text.slice(0, remainingRetention); + this.buffer.push(kept); + this.retainedChars += kept.length; + } + + ok(message = '', options: { readonly brief?: string } = {}): ToolOutputAccumulatorResult { + let finalMessage = message; + if (finalMessage.length > 0 && !finalMessage.endsWith('.')) { + finalMessage += '.'; + } + const output = this.buffer.join(''); + return { + isError: false, + output: output.length === 0 ? finalMessage : output, + brief: options.brief, + spill: this.completionSpill(finalMessage), + }; + } + + error( + message: string, + options: { readonly brief?: string } = {}, + ): ToolOutputAccumulatorResult { + const output = this.buffer.join(''); + return { + isError: true, + output: + message.length === 0 + ? output + : output.length === 0 + ? message + : output.endsWith('\n') + ? `${output}${message}` + : `${output}\n${message}`, + brief: options.brief, + spill: this.retentionSpill(message), + }; + } + + private retentionSpill(suffix?: string): ToolResultSpill | undefined { + if (this.totalCharsValue <= this.retainedChars) return undefined; + return { + totalChars: this.totalCharsValue, + suffix: suffix !== undefined && suffix.length > 0 ? suffix : undefined, + }; + } + + private completionSpill(suffix: string): ToolResultSpill | undefined { + const retentionSpill = this.retentionSpill(); + if (retentionSpill !== undefined) { + return suffix.length > 0 ? { ...retentionSpill, suffix } : retentionSpill; + } + if (suffix.length === 0 || this.totalCharsValue <= DEFAULT_TOOL_RESULT_MAX_CHARS) { + return undefined; + } + return { suffix }; + } +} diff --git a/packages/agent-core-v2/src/tool/result-builder.ts b/packages/agent-core-v2/src/tool/result-builder.ts deleted file mode 100644 index cd8bb710f..000000000 --- a/packages/agent-core-v2/src/tool/result-builder.ts +++ /dev/null @@ -1,149 +0,0 @@ -import { BugIndicatingError } from '#/errors'; - -import type { ExecutableToolErrorResult, ExecutableToolSuccessResult } from './toolContract'; - -const DEFAULT_MAX_CHARS = 50_000; -const DEFAULT_MAX_LINE_LENGTH = 2000; -const TRUNCATION_MARKER = '[...truncated]'; -const TRUNCATION_MESSAGE = 'Output is truncated to fit in the message.'; - -export interface ToolResultBuilderOptions { - readonly maxChars?: number; - readonly maxLineLength?: number | null; -} - -export type ExecutableToolResultBuilderResult = ( - | ExecutableToolErrorResult - | ExecutableToolSuccessResult -) & { - readonly output: string; - readonly truncated: boolean; - readonly brief?: string; -}; - -export class ToolResultBuilder { - private readonly maxChars: number; - private readonly maxLineLength: number | null; - - private readonly buffer: string[] = []; - private nCharsValue = 0; - private truncationHappened = false; - - constructor(options: ToolResultBuilderOptions = {}) { - this.maxChars = options.maxChars ?? DEFAULT_MAX_CHARS; - this.maxLineLength = - options.maxLineLength === undefined ? DEFAULT_MAX_LINE_LENGTH : options.maxLineLength; - - if (this.maxLineLength !== null && this.maxLineLength <= TRUNCATION_MARKER.length) { - throw new BugIndicatingError('maxLineLength must be greater than the truncation marker length.'); - } - } - - get nChars(): number { - return this.nCharsValue; - } - - get truncated(): boolean { - return this.truncationHappened; - } - - write(text: string): number { - if (this.nCharsValue >= this.maxChars) { - if (text.length > 0 && !this.truncationHappened) { - this.buffer.push(TRUNCATION_MARKER); - this.nCharsValue += TRUNCATION_MARKER.length; - this.truncationHappened = true; - } - return 0; - } - - const lines = text.match(/[^\r\n]*(?:\r\n|[\n\r])|[^\r\n]+/g) ?? []; - if (lines.length === 0) return 0; - - let charsWritten = 0; - for (const originalLine of lines) { - if (this.nCharsValue >= this.maxChars) { - if (!this.truncationHappened) { - this.buffer.push(TRUNCATION_MARKER); - this.nCharsValue += TRUNCATION_MARKER.length; - this.truncationHappened = true; - } - break; - } - - const remainingChars = this.maxChars - this.nCharsValue; - const limit = - this.maxLineLength === null - ? remainingChars - : Math.min(remainingChars, this.maxLineLength); - let line = originalLine; - if (line.length > limit) { - const lineBreak = /[\r\n]+$/.exec(line)?.[0] ?? ''; - const suffix = TRUNCATION_MARKER + lineBreak; - const effectiveMaxLength = Math.max(limit, suffix.length); - line = line.slice(0, effectiveMaxLength - suffix.length) + suffix; - } - if (line !== originalLine) { - this.truncationHappened = true; - } - - this.buffer.push(line); - charsWritten += line.length; - this.nCharsValue += line.length; - } - - return charsWritten; - } - - ok(message = '', options: { readonly brief?: string } = {}): ExecutableToolResultBuilderResult { - let finalMessage = message; - if (finalMessage.length > 0 && !finalMessage.endsWith('.')) { - finalMessage += '.'; - } - if (this.truncationHappened) { - finalMessage = - finalMessage.length === 0 ? TRUNCATION_MESSAGE : `${finalMessage} ${TRUNCATION_MESSAGE}`; - } - - const output = this.buffer.join(''); - const shouldAppendMessage = - finalMessage.length > 0 && (this.truncationHappened || output.length === 0); - return { - isError: false, - output: shouldAppendMessage - ? output.length === 0 - ? finalMessage - : output.endsWith('\n') - ? `${output}${finalMessage}` - : `${output}\n${finalMessage}` - : output, - truncated: this.truncationHappened, - brief: options.brief, - }; - } - - error( - message: string, - options: { readonly brief?: string } = {}, - ): ExecutableToolResultBuilderResult { - const finalMessage = this.truncationHappened - ? message.length === 0 - ? TRUNCATION_MESSAGE - : `${message} ${TRUNCATION_MESSAGE}` - : message; - const output = this.buffer.join(''); - return { - isError: true, - output: - finalMessage.length === 0 - ? output - : output.length === 0 - ? finalMessage - : output.endsWith('\n') - ? `${output}${finalMessage}` - : `${output}\n${finalMessage}`, - truncated: this.truncationHappened, - brief: options.brief, - }; - } -} diff --git a/packages/agent-core-v2/src/tool/toolContract.ts b/packages/agent-core-v2/src/tool/toolContract.ts index 4460d0fac..9c45e8790 100644 --- a/packages/agent-core-v2/src/tool/toolContract.ts +++ b/packages/agent-core-v2/src/tool/toolContract.ts @@ -5,6 +5,16 @@ import type { ToolInputDisplay } from '@pymodel/protocol'; export type ExecutableToolOutput = string | ContentPart[]; +export const DEFAULT_TOOL_RESULT_MAX_CHARS = 50_000; + +export const DEFAULT_TOOL_RESULT_MAX_RETAINED_CHARS = 10_000_000; + +export interface ToolResultSpill { + readonly outputPath?: string; + readonly totalChars?: number; + readonly suffix?: string; +} + export type ToolDeliveryKind = 'steer'; export interface ToolDeliveryMessage { @@ -26,6 +36,8 @@ export interface ExecutableToolSuccessResult { readonly truncated?: boolean | undefined; readonly note?: string; readonly delivery?: ToolDelivery | undefined; + readonly spill?: ToolResultSpill; + readonly spillExempt?: true; } export interface ExecutableToolErrorResult { @@ -35,6 +47,8 @@ export interface ExecutableToolErrorResult { readonly truncated?: boolean | undefined; readonly note?: string; readonly delivery?: ToolDelivery | undefined; + readonly spill?: ToolResultSpill; + readonly spillExempt?: true; } export type ExecutableToolResult = ExecutableToolSuccessResult | ExecutableToolErrorResult; diff --git a/packages/agent-core-v2/test/agent/activityView/activityView.test.ts b/packages/agent-core-v2/test/agent/activityView/activityView.test.ts index ff95a03c5..c15f30434 100644 --- a/packages/agent-core-v2/test/agent/activityView/activityView.test.ts +++ b/packages/agent-core-v2/test/agent/activityView/activityView.test.ts @@ -96,7 +96,7 @@ function harness( }, } as unknown as IEventDispatcher; const restore = async (ended: TurnModelState['lastEnded']): Promise => { - agentState.set(turnKey, { nextTurnId: 1, cancelledTurnIds: [], lastEnded: ended }); + agentState.set(turnKey, { nextTurnId: 1, cancelledTurnIds: [], anchorTurnIds: [], lastEnded: ended }); for (const hook of restoreHooks) await hook(); }; const ix = disposables.add(new TestInstantiationService()); @@ -106,7 +106,7 @@ function harness( ix.stub(IEventDispatcher, dispatcher); const agentState = new AgentStateService(); agentState.contributeState(turnKey); - agentState.set(turnKey, { nextTurnId: 1, cancelledTurnIds: [], lastEnded }); + agentState.set(turnKey, { nextTurnId: 1, cancelledTurnIds: [], anchorTurnIds: [], lastEnded }); ix.set(IAgentStateService, agentState); ix.stub(IAgentScopeContext, { _serviceBrand: undefined, diff --git a/packages/agent-core-v2/test/agent/contextMemory/contextTranscript.test.ts b/packages/agent-core-v2/test/agent/contextMemory/contextTranscript.test.ts index 9eb10056f..e9501d05a 100644 --- a/packages/agent-core-v2/test/agent/contextMemory/contextTranscript.test.ts +++ b/packages/agent-core-v2/test/agent/contextMemory/contextTranscript.test.ts @@ -146,6 +146,7 @@ describe('reduceContextTranscript', () => { expect(result.entries.map((m) => m.role)).toEqual(['user', 'assistant', 'tool', 'user']); expect(result.times).toEqual([100, 200, 220, undefined]); + expect(result.recordIndexes).toEqual([0, 1, 3, 5]); }); it('preserves the pre-compaction assistant reply after a later undo', () => { diff --git a/packages/agent-core-v2/test/agent/loop/loop.test.ts b/packages/agent-core-v2/test/agent/loop/loop.test.ts index 00b0e5b97..41ad96dae 100644 --- a/packages/agent-core-v2/test/agent/loop/loop.test.ts +++ b/packages/agent-core-v2/test/agent/loop/loop.test.ts @@ -813,6 +813,46 @@ describe('Agent loop', () => { expect(prompts).toEqual([undefined, 'hi']); }); + + it('carries session file prompt attachments on turn started when the part id is omitted', async () => { + const payloads: Array = []; + const subscription = ctx.get(IEventBus).subscribe(TurnStarted, (event) => { + payloads.push(event.promptAttachments); + }); + ctx.mockNextResponse({ type: 'text', text: 'seen' }); + + const turn = ( + await loop.enqueue( + new MessageStepRequest( + { + role: 'user', + content: [ + { type: 'image_url', imageUrl: { url: 'pythinker-file://file_1', id: 'file_1' } }, + { type: 'video_url', videoUrl: { url: 'pythinker-file://file_2', id: 'file_2' } }, + { type: 'image_url', imageUrl: { url: 'pythinker-file://file_3' } }, + { type: 'image_url', imageUrl: { url: 'pythinker-file://file_4', id: 'other' } }, + { type: 'image_url', imageUrl: { url: 'https://example.com/no-id.png' } }, + { type: 'image_url', imageUrl: { url: 'ms://provider-blob', id: 'prov_1' } }, + { type: 'text', text: 'look' }, + ], + toolCalls: [], + origin: { kind: 'user' }, + }, + { admission: 'newTurn' }, + ), + ).assigned + ).turn; + await turn.result; + subscription.dispose(); + + expect(payloads).toEqual([ + [ + { kind: 'image', fileId: 'file_1' }, + { kind: 'video', fileId: 'file_2' }, + { kind: 'image', fileId: 'file_3' }, + ], + ]); + }); }); describe('turn telemetry', () => { diff --git a/packages/agent-core-v2/test/agent/loop/turnOps.test.ts b/packages/agent-core-v2/test/agent/loop/turnOps.test.ts index 77dd4f5f1..ba8f11487 100644 --- a/packages/agent-core-v2/test/agent/loop/turnOps.test.ts +++ b/packages/agent-core-v2/test/agent/loop/turnOps.test.ts @@ -1,7 +1,12 @@ import { produce } from 'immer'; import { describe, expect, it } from 'vitest'; -import { ContextAppendLoopEvent } from '#/agent/contextMemory/contextEvents'; +import { + ContextAppendLoopEvent, + ContextApplyCompaction, + ContextClear, + ContextUndo, +} from '#/agent/contextMemory/contextEvents'; import type { Event2, Event2Class } from '#/app/event/event2'; import type { FoldContext } from '#/state/state'; import { @@ -67,6 +72,62 @@ describe('turnKey lastEnded', () => { }); }); +describe('turnKey anchorTurnIds', () => { + const cronOrigin = { + kind: 'cron_job', + jobId: 'j1', + cron: '0 9 * * *', + recurring: true, + coalescedCount: 0, + stale: false, + } as const; + + it('records undo-anchor prompt turns and skips non-anchor turns', () => { + let s = turnKey.initial(); + s = fold(s, new TurnPrompt({ agentId: 'main', input: [], origin: { kind: 'user' } })); + s = fold(s, new TurnPrompt({ agentId: 'main', input: [], origin: cronOrigin })); + s = fold( + s, + new TurnPrompt({ + agentId: 'main', + input: [], + origin: { + kind: 'plugin_command', + activationId: 'a1', + pluginId: 'p', + commandName: 'c', + trigger: 'user-slash', + }, + }), + ); + expect(s.anchorTurnIds).toEqual([0, 2]); + }); + + it('assigns the consumed id before cancelled-queued skips', () => { + let s = turnKey.initial(); + s = fold(s, new TurnPrompt({ agentId: 'main', input: [], origin: { kind: 'user' } })); + s = fold(s, new TurnCancel({ agentId: 'main', turnId: 1, target: 'queued' })); + s = fold(s, new TurnPrompt({ agentId: 'main', input: [], origin: { kind: 'user' } })); + expect(s.anchorTurnIds).toEqual([0, 2]); + }); + + it('drops trailing anchors on context.undo and resets on compaction and clear', () => { + let s = turnKey.initial(); + s = fold(s, new TurnPrompt({ agentId: 'main', input: [], origin: { kind: 'user' } })); + s = fold(s, new TurnPrompt({ agentId: 'main', input: [], origin: { kind: 'user' } })); + s = fold(s, new ContextUndo({ agentId: 'main', count: 1 })); + expect(s.anchorTurnIds).toEqual([0]); + s = fold( + s, + new ContextApplyCompaction({ agentId: 'main', summary: 'summary', compactedCount: 2 }), + ); + expect(s.anchorTurnIds).toEqual([]); + s = fold(s, new TurnPrompt({ agentId: 'main', input: [], origin: { kind: 'user' } })); + s = fold(s, new ContextClear({ agentId: 'main' })); + expect(s.anchorTurnIds).toEqual([]); + }); +}); + describe('TurnEnded serialization', () => { it('emits the op record shape without the bus-only interruptReason', () => { const event = new TurnEnded( diff --git a/packages/agent-core-v2/test/agent/mcp/mcp.test.ts b/packages/agent-core-v2/test/agent/mcp/mcp.test.ts index c38794169..d394d0703 100644 --- a/packages/agent-core-v2/test/agent/mcp/mcp.test.ts +++ b/packages/agent-core-v2/test/agent/mcp/mcp.test.ts @@ -45,10 +45,6 @@ import { import { discoverTools, executeTool, fakeMcpClient } from '../../mcpCore/stubs'; -const MCP_OUTPUT_TRUNCATED_TEXT = - '\n\n[Output truncated: exceeded 100000 character limit. ' + - 'Use pagination or more specific queries to get remaining content.]'; - interface ResolvedServer { readonly client: MCPClient; readonly tools: readonly KosongTool[]; @@ -1018,7 +1014,7 @@ describe('AgentMcpService', () => { expect(reconnects).toBe(0); }); - it('truncates oversized MCP text output through the wrapped tool path', async () => { + it('passes oversized MCP text through for the pipeline to shape', async () => { const manager = new FakeMcpManager(); const client: MCPClient = { async listTools() { @@ -1051,7 +1047,7 @@ describe('AgentMcpService', () => { }); expect(result.isError).toBeUndefined(); - expect(result.output).toBe('x'.repeat(100_000) + MCP_OUTPUT_TRUNCATED_TEXT); + expect(result.output).toBe('x'.repeat(100_001)); }); it('wraps MCP image output in mcp_tool_result companions through the wrapped tool path', async () => { diff --git a/packages/agent-core-v2/test/agent/mcp/output.test.ts b/packages/agent-core-v2/test/agent/mcp/output.test.ts index c1425f77e..3ae2fa8fa 100644 --- a/packages/agent-core-v2/test/agent/mcp/output.test.ts +++ b/packages/agent-core-v2/test/agent/mcp/output.test.ts @@ -13,10 +13,6 @@ import type { MCPClient, MCPContentBlock, MCPToolResult } from '#/mcpCore/types' import type { ToolExecution } from '#/tool/toolContract'; import { sniffImageDimensions } from '#/agent/media/file-type'; -const MCP_OUTPUT_TRUNCATED_TEXT = - '\n\n[Output truncated: exceeded 100000 character limit. ' + - 'Use pagination or more specific queries to get remaining content.]'; - function isPromiseLike(value: ToolExecution | Promise): value is Promise { return typeof (value as Promise).then === 'function'; } @@ -144,25 +140,39 @@ describe('convertMCPContentBlock', () => { }); }); - test('returns null for blob EmbeddedResource with unsupported mimeType', () => { + test('replaces a blob EmbeddedResource with unsupported mimeType with a drop notice', () => { const block = assertValidMcpBlock({ type: 'resource', resource: { uri: 'file:///doc.pdf', mimeType: 'application/pdf', blob: 'XXX' }, }); - expect(convertMCPContentBlock(block)).toBeNull(); + const part = convertMCPContentBlock(block); + expect(part?.type).toBe('text'); + const text = (part as { text: string }).text; + expect(text).toContain('MCP content dropped'); + expect(text).toContain('application/pdf'); + expect(text).toContain('file:///doc.pdf'); }); - test('blob EmbeddedResource defaults to application/octet-stream and returns null', () => { + test('blob EmbeddedResource defaults to application/octet-stream in the drop notice', () => { const block = assertValidMcpBlock({ type: 'resource', resource: { uri: 'file:///unknown', blob: 'XXX' }, }); - expect(convertMCPContentBlock(block)).toBeNull(); + const part = convertMCPContentBlock(block); + expect(part?.type).toBe('text'); + const text = (part as { text: string }).text; + expect(text).toContain('MCP content dropped'); + expect(text).toContain('application/octet-stream'); + expect(text).toContain('file:///unknown'); }); - test('returns null for resource block missing resource field', () => { + test('replaces a resource block missing the resource field with a drop notice', () => { const block = { type: 'resource' } as MCPContentBlock; - expect(convertMCPContentBlock(block)).toBeNull(); + const part = convertMCPContentBlock(block); + expect(part?.type).toBe('text'); + const text = (part as { text: string }).text; + expect(text).toContain('MCP content dropped'); + expect(text).toContain('"resource"'); }); test('converts resource_link with image/* mimeType to ImageURLPart with URL', () => { @@ -218,29 +228,46 @@ describe('convertMCPContentBlock', () => { }); }); - test('returns null for resource_link with unsupported mimeType', () => { + test('replaces a resource_link with unsupported mimeType with a drop notice carrying the uri', () => { const block = assertValidMcpBlock({ type: 'resource_link', name: 'file.bin', uri: 'https://example.com/file.bin', mimeType: 'application/octet-stream', }); - expect(convertMCPContentBlock(block)).toBeNull(); + const part = convertMCPContentBlock(block); + expect(part?.type).toBe('text'); + const text = (part as { text: string }).text; + expect(text).toContain('MCP content dropped'); + expect(text).toContain('application/octet-stream'); + expect(text).toContain('https://example.com/file.bin'); }); - test('returns null for unknown block type', () => { + test('replaces an unknown block type with a drop notice', () => { const block: MCPContentBlock = { type: 'fancy_new_type', text: 'whatever' }; - expect(convertMCPContentBlock(block)).toBeNull(); + const part = convertMCPContentBlock(block); + expect(part?.type).toBe('text'); + const text = (part as { text: string }).text; + expect(text).toContain('MCP content dropped'); + expect(text).toContain('"fancy_new_type"'); }); - test('returns null for text block missing text field', () => { + test('replaces a text block missing the text field with a drop notice', () => { const block: MCPContentBlock = { type: 'text' }; - expect(convertMCPContentBlock(block)).toBeNull(); + const part = convertMCPContentBlock(block); + expect(part?.type).toBe('text'); + const text = (part as { text: string }).text; + expect(text).toContain('MCP content dropped'); + expect(text).toContain('"text"'); }); - test('returns null for image block missing data field', () => { + test('replaces an image block missing data field with a drop notice', () => { const block: MCPContentBlock = { type: 'image', mimeType: 'image/png' }; - expect(convertMCPContentBlock(block)).toBeNull(); + const part = convertMCPContentBlock(block); + expect(part?.type).toBe('text'); + const text = (part as { text: string }).text; + expect(text).toContain('MCP content dropped'); + expect(text).toContain('"image"'); }); }); @@ -254,7 +281,7 @@ describe('mcpResultToExecutableOutput', () => { result([{ type: 'text', text: 'hello' }]), 'mcp__s__t', ); - expect(out).toEqual({ output: 'hello', isError: false }); + expect(out).toEqual({ output: 'hello' }); }); test('propagates isError=true on the success-shape return', async () => { @@ -280,7 +307,7 @@ describe('mcpResultToExecutableOutput', () => { expect(joined).toContain(''); expect(joined).toContain('"structuredContent":{"foo":1}'); expect(joined).toContain('"_meta":{"bar":2}'); - expect(out.isError).toBe(false); + expect(out.isError).toBeUndefined(); }); test('keeps the mcp_tool_result wrap when a media-only result carries structuredContent', async () => { @@ -347,15 +374,15 @@ describe('mcpResultToExecutableOutput', () => { }, 'mcp__s__t', ); - expect(out).toEqual({ output: 'ok', isError: false }); + expect(out).toEqual({ output: 'ok' }); }); test('returns an empty output array when the content array is empty', async () => { const out = await mcpResultToExecutableOutput(result([]), 'mcp__s__t'); - expect(out).toEqual({ output: [], isError: false }); + expect(out).toEqual({ output: [] }); }); - test('drops unconvertible blocks and keeps the rest', async () => { + test('keeps unconvertible blocks as drop notices alongside the rest', async () => { const out = await mcpResultToExecutableOutput( result([ { type: 'text', text: 'kept' }, @@ -363,7 +390,13 @@ describe('mcpResultToExecutableOutput', () => { ]), 'mcp__s__t', ); - expect(out).toEqual({ output: 'kept', isError: false }); + const parts = out.output as ContentPart[]; + expect(parts[0]).toEqual({ type: 'text', text: 'kept' }); + const notice = parts[1]; + expect(notice?.type).toBe('text'); + const text = (notice as { text: string }).text; + expect(text).toContain('MCP content dropped'); + expect(text).toContain('"fancy_new_type"'); }); test('wraps media-only output in mcp_tool_result tags using the qualified name', async () => { @@ -371,7 +404,7 @@ describe('mcpResultToExecutableOutput', () => { result([{ type: 'image', data: 'AAA', mimeType: 'image/png' }]), 'mcp__github__create_pr', ); - expect(out.isError).toBe(false); + expect(out.isError).toBeUndefined(); expect(out.output).toEqual([ { type: 'text', text: '' }, { type: 'image_url', imageUrl: { url: 'data:image/png;base64,AAA' } }, @@ -406,12 +439,40 @@ describe('mcpResultToExecutableOutput', () => { expect(parts.at(-1)).toEqual({ type: 'text', text: '' }); }); - test('truncates oversized text and merges the notice into the surviving text part', async () => { + test('passes oversized text through untouched for the truncation pipeline to shape', async () => { const out = await mcpResultToExecutableOutput( result([{ type: 'text', text: 'x'.repeat(100_001) }]), 'mcp__s__t', ); - expect(out.output).toBe('x'.repeat(100_000) + MCP_OUTPUT_TRUNCATED_TEXT); + expect(out.output).toBe('x'.repeat(100_001)); + expect(out.truncated).toBeUndefined(); + expect(out.spill).toBeUndefined(); + }); + + test('hoists binary drop notices into the spill suffix', async () => { + const out = await mcpResultToExecutableOutput( + result([ + { type: 'text', text: 'x'.repeat(100_001) }, + { type: 'image', data: 'y'.repeat(14 * 1024 * 1024), mimeType: 'image/png' }, + ]), + 'mcp__s__t', + ); + expect(out.truncated).toBe(true); + expect(out.spill?.suffix).toContain('image_url dropped'); + const parts = out.output as ContentPart[]; + expect(parts[0]).toEqual({ type: 'text', text: 'x'.repeat(100_001) }); + expect( + parts.some((p) => p.type === 'text' && p.text.includes('image_url dropped')), + ).toBe(true); + }); + + test('attaches binary drop notices via spill.suffix even without text truncation', async () => { + const out = await mcpResultToExecutableOutput( + result([{ type: 'image', data: 'y'.repeat(14 * 1024 * 1024), mimeType: 'image/png' }]), + 'mcp__s__t', + ); + expect(out.truncated).toBe(true); + expect(out.spill?.suffix).toContain('image_url dropped'); expect(out.truncated).toBe(true); }); @@ -560,7 +621,7 @@ describe('mcpResultToExecutableOutput', () => { await rm(dir, { recursive: true, force: true }); }); - test('keeps the caption intact when the tool text exhausts the 100K budget', async () => { + test('keeps the caption and the full text alongside the compressed image', async () => { const dir = await mkdtemp(join(tmpdir(), 'mcp-originals-')); const big = Buffer.from( await new Jimp({ width: 3600, height: 1800, color: 0x3366ccff }).getBuffer('image/png'), @@ -576,17 +637,17 @@ describe('mcpResultToExecutableOutput', () => { ); const parts = out.output as ContentPart[]; - expect(out.truncated).toBe(true); + expect(out.truncated).toBeUndefined(); expect(parts.some((p) => p.type === 'image_url')).toBe(true); const toolText = parts[0]; if (toolText?.type !== 'text') throw new Error('expected the tool text part first'); - expect(toolText.text).toContain('Output truncated'); + expect(toolText.text).toBe('x'.repeat(100_001)); expect(out.note).toMatch(/<\/system>$/); expect(out.note).toContain('saved at'); await rm(dir, { recursive: true, force: true }); }); - test('does not slice the caption when the budget is nearly exhausted', async () => { + test('does not slice the caption for large text output', async () => { const dir = await mkdtemp(join(tmpdir(), 'mcp-originals-')); const big = Buffer.from( await new Jimp({ width: 3600, height: 1800, color: 0x3366ccff }).getBuffer('image/png'), @@ -639,6 +700,6 @@ describe('createMcpTool', () => { }); expect(result).toEqual({ output: 'ok' }); - expect(result).not.toHaveProperty('truncated'); + expect(result.truncated).toBeUndefined(); }); }); diff --git a/packages/agent-core-v2/test/agent/prompt/promptService.test.ts b/packages/agent-core-v2/test/agent/prompt/promptService.test.ts index c1c1863df..309a5ba1b 100644 --- a/packages/agent-core-v2/test/agent/prompt/promptService.test.ts +++ b/packages/agent-core-v2/test/agent/prompt/promptService.test.ts @@ -11,6 +11,7 @@ import type { ContextMessage } from '#/agent/contextMemory/types'; import type { ContentPart } from '#/kosong/contract/message'; import { IAgentFullCompactionService } from '#/agent/fullCompaction/fullCompaction'; import { IAgentLoopService } from '#/agent/loop/loop'; +import { TurnSteer } from '#/agent/loop/turnOps'; import { IAgentPromptService } from '#/agent/prompt/prompt'; import { AgentPromptService, PromptQueued, PromptStarted, PromptSteered, PromptSubmitted } from '#/agent/prompt/promptService'; import { IAgentScopeContext, makeAgentScopeContext } from '#/agent/scopeContext/scopeContext'; @@ -202,6 +203,28 @@ describe('AgentPromptService', () => { loop.drainNextBatch(context); }); + it('publishes turn.steer at materialize time without altering the wire payload shape', async () => { + const { prompt, context, loop, eventBus } = harness(); + const events: TurnSteer[] = []; + eventBus.subscribe(TurnSteer, (event) => events.push(event)); + const active = await prompt.enqueue({ message: message('active') }); + await active.launched; + const one = await prompt.enqueue({ message: message('one') }); + const two = await prompt.enqueue({ message: message('two') }); + + await prompt.steer([two.id, one.id]); + loop.drainNextBatch(context); + await Promise.resolve(); + + expect(events).toHaveLength(1); + expect(events[0]?.input).toEqual([ + { type: 'text', text: 'one' }, + { type: 'text', text: 'two' }, + ]); + expect(events[0]).not.toHaveProperty('messageId'); + expect(events[0]).not.toHaveProperty('promptIds'); + }); + it('aborts pending prompts and settles completion', async () => { const { prompt } = harness(); await prompt.enqueue({ message: message('active') }); diff --git a/packages/agent-core-v2/test/agent/toolExecutor/toolExecutor.test.ts b/packages/agent-core-v2/test/agent/toolExecutor/toolExecutor.test.ts index e1a448b18..3d25f0cc0 100644 --- a/packages/agent-core-v2/test/agent/toolExecutor/toolExecutor.test.ts +++ b/packages/agent-core-v2/test/agent/toolExecutor/toolExecutor.test.ts @@ -69,6 +69,7 @@ beforeEach(() => { reg.defineInstance(IAgentToolResultTruncationService, { _serviceBrand: undefined, truncateForModel: (input) => truncateForModel(input), + isSpillFilePath: () => false, }); reg.defineInstance(IEventBus, { publish: (event: ProtocolEvent) => { diff --git a/packages/agent-core-v2/test/agent/toolResultTruncation/stubs.ts b/packages/agent-core-v2/test/agent/toolResultTruncation/stubs.ts index 2aaa687c8..60b972033 100644 --- a/packages/agent-core-v2/test/agent/toolResultTruncation/stubs.ts +++ b/packages/agent-core-v2/test/agent/toolResultTruncation/stubs.ts @@ -8,6 +8,7 @@ export function stubToolResultTruncationService(): ToolResultTruncationServiceSt return { _serviceBrand: undefined, truncateForModel: async ({ result }) => result, + isSpillFilePath: () => false, }; } diff --git a/packages/agent-core-v2/test/agent/toolResultTruncation/toolResultTruncation.test.ts b/packages/agent-core-v2/test/agent/toolResultTruncation/toolResultTruncation.test.ts index a17aaeadf..3a606f77c 100644 --- a/packages/agent-core-v2/test/agent/toolResultTruncation/toolResultTruncation.test.ts +++ b/packages/agent-core-v2/test/agent/toolResultTruncation/toolResultTruncation.test.ts @@ -42,7 +42,7 @@ describe('ToolResultTruncationService', () => { await rm(homeDir, { recursive: true, force: true }); }); - it('persists oversized string output and renders a bounded model preview', async () => { + it('persists oversized string output and appends a bounded model pointer', async () => { const fullOutput = `${'x'.repeat(50_001)}tail survives on disk`; const result = await truncation.truncateForModel({ @@ -56,9 +56,8 @@ describe('ToolResultTruncationService', () => { const rendered = result.output; expect(typeof rendered).toBe('string'); if (typeof rendered !== 'string') throw new Error('expected string output'); - expect(rendered).toContain('Tool output exceeded 50000 characters'); - expect(rendered).toContain('tool_name: Lookup Tool'); - expect(rendered).toContain('tool_call_id: call:lookup'); + expect(rendered).toContain('[...truncated]'); + expect(rendered).toContain('Per-line truncation occurred; the complete output was saved to a file.'); expect(rendered).not.toContain('tail survives on disk'); const outputPath = renderedOutputPath(rendered); @@ -85,14 +84,19 @@ describe('ToolResultTruncationService', () => { expect(result.truncated).toBe(true); const rendered = result.output; - expect(typeof rendered).toBe('string'); - if (typeof rendered !== 'string') throw new Error('expected string output'); - await expect(readFile(renderedOutputPath(rendered), 'utf8')).resolves.toBe( + expect(Array.isArray(rendered)).toBe(true); + if (!Array.isArray(rendered)) throw new Error('expected content parts output'); + const texts = rendered + .filter((part): part is Extract => part.type === 'text') + .map((part) => part.text) + .join(''); + expect(texts).toContain('Per-line truncation occurred'); + await expect(readFile(renderedOutputPath(texts), 'utf8')).resolves.toBe( `first\n${'y'.repeat(50_001)}`, ); }); - it('keeps already-truncated and mixed-media results unchanged', async () => { + it('spills already-truncated and mixed-media results while preserving media', async () => { const alreadyTruncated = { output: 'z'.repeat(50_001), truncated: true, @@ -104,20 +108,40 @@ describe('ToolResultTruncationService', () => { ] satisfies ContentPart[], }; + const truncated = await truncation.truncateForModel({ + toolName: 'Lookup', + toolCallId: 'call_truncated', + result: alreadyTruncated, + }); + expect(truncated.truncated).toBe(true); + expect(truncated.output).toContain('Per-line truncation occurred'); + await expect(readFile(renderedOutputPath(truncated.output), 'utf8')).resolves.toBe( + alreadyTruncated.output, + ); + + const media = await truncation.truncateForModel({ + toolName: 'Lookup', + toolCallId: 'call_media', + result: mixedMedia, + }); + expect(Array.isArray(media.output)).toBe(true); + if (!Array.isArray(media.output)) throw new Error('expected content parts output'); + expect(media.output).toContainEqual(mixedMedia.output[1]); + expect( + media.output.some((part) => part.type === 'text' && part.text.includes('Per-line truncation occurred')), + ).toBe(true); + }); + + it('passes spill-exempt results through unchanged', async () => { + const result = { output: 'z'.repeat(60_000), spillExempt: true as const }; + await expect( truncation.truncateForModel({ - toolName: 'Lookup', - toolCallId: 'call_truncated', - result: alreadyTruncated, - }), - ).resolves.toBe(alreadyTruncated); - await expect( - truncation.truncateForModel({ - toolName: 'Lookup', - toolCallId: 'call_media', - result: mixedMedia, + toolName: 'Read', + toolCallId: 'call_read', + result, }), - ).resolves.toBe(mixedMedia); + ).resolves.toBe(result); }); it('uses unique output files for repeated call ids', async () => { diff --git a/packages/agent-core-v2/test/agent/undo/undo.test.ts b/packages/agent-core-v2/test/agent/undo/undo.test.ts index e45c5efb6..9077c510f 100644 --- a/packages/agent-core-v2/test/agent/undo/undo.test.ts +++ b/packages/agent-core-v2/test/agent/undo/undo.test.ts @@ -297,6 +297,93 @@ describe('AgentConversationUndoService', () => { expect(ctx.agentState.get(turnKey).nextTurnId).toBe(2); }); + it('reports the earliest removed turn id when a trailing non-anchor turn follows the anchor', async () => { + setup(); + const undo = ctx.get(IAgentConversationUndoService); + const loop = ctx.get(IAgentLoopService); + + ctx.mockNextResponse({ type: 'text', text: 'a1' }); + const userTurn = ( + await loop.enqueue( + new MessageStepRequest( + { + role: 'user', + content: [{ type: 'text', text: 'u1' }], + toolCalls: [], + origin: { kind: 'user' }, + }, + { admission: 'newTurn' }, + ), + ).assigned + ).turn; + await expect(userTurn.result).resolves.toMatchObject({ type: 'completed' }); + + ctx.mockNextResponse({ type: 'text', text: 'cron done' }); + const cronTurn = ( + await loop.enqueue( + new MessageStepRequest( + { + role: 'user', + content: [{ type: 'text', text: 'cron work' }], + toolCalls: [], + origin: { + kind: 'cron_job', + jobId: 'j1', + cron: '0 9 * * *', + recurring: true, + coalescedCount: 0, + stale: false, + }, + }, + { admission: 'newTurn' }, + ), + ).assigned + ).turn; + await expect(cronTurn.result).resolves.toMatchObject({ type: 'completed' }); + + let fromTurnId: number | undefined; + const subscription = ctx.get(IEventBus).subscribe(ContextUndone, (event) => { + fromTurnId = event.fromTurnId; + }); + try { + await undo.undo(1); + expect(fromTurnId).toBe(userTurn.id); + expect(ctx.agentState.get(turnKey).anchorTurnIds).toEqual([]); + expect(ctx.context.get()).toHaveLength(0); + } finally { + subscription.dispose(); + } + }); + + it('omits the removed turn id when context anchors were not opened by engine turns', async () => { + setup(); + const undo = ctx.get(IAgentConversationUndoService); + ctx.get(IAgentContextMemoryService).append( + { + role: 'user', + content: [{ type: 'text', text: 'u1' }], + toolCalls: [], + origin: { kind: 'user' }, + }, + { + role: 'assistant', + content: [{ type: 'text', text: 'a1' }], + toolCalls: [], + }, + ); + + let fromTurnId: number | undefined = Number.NaN; + const subscription = ctx.get(IEventBus).subscribe(ContextUndone, (event) => { + fromTurnId = event.fromTurnId; + }); + try { + await undo.undo(1); + expect(fromTurnId).toBeUndefined(); + } finally { + subscription.dispose(); + } + }); + it('flushes state reconciliation before publishing undo', async () => { setup(); const wire = ctx.get(IWireService); diff --git a/packages/agent-core-v2/test/index.test.ts b/packages/agent-core-v2/test/index.test.ts index d0d498968..8b1c010f2 100644 --- a/packages/agent-core-v2/test/index.test.ts +++ b/packages/agent-core-v2/test/index.test.ts @@ -203,6 +203,7 @@ describe('v1 wire vocabulary', () => { describe('conversation-time checkpoint registration', () => { const CHECKPOINT_EXEMPT_STATES: ReadonlySet = new Set([ 'goalForkNotice', + 'turn', ]); const CONTEXT_OWNER_STATE = 'contextMemory'; const CONTEXT_EVENTS: readonly Event2Class[] = [ diff --git a/packages/agent-core-v2/test/mcpCore/client-stdio.test.ts b/packages/agent-core-v2/test/mcpCore/client-stdio.test.ts index 06ab8b229..3e8516f12 100644 --- a/packages/agent-core-v2/test/mcpCore/client-stdio.test.ts +++ b/packages/agent-core-v2/test/mcpCore/client-stdio.test.ts @@ -5,7 +5,6 @@ import { join } from 'pathe'; import { describe, expect, it } from 'vitest'; import { Error2 } from '#/errors'; -import { isMcpConnectionClosedError } from '#/mcpCore/client-shared'; import { mergeStdioEnv, StdioMcpClient, type StdioMcpClientOptions } from '#/mcpCore/client-stdio'; import { McpServerStdioConfigSchema, type McpServerStdioConfig } from '#/mcpCore/config-schema'; import { HostProcessService } from '#/os/backends/node-local/hostProcessService'; @@ -46,6 +45,15 @@ function createClient( }); } +function isPostCloseTransportError(error: unknown): boolean { + const message = error instanceof Error ? error.message : String(error); + return ( + message.includes('Not connected') || + message.includes('Connection closed') || + message.includes('transport is not running') + ); +} + describe('StdioMcpClient', () => { it('rejects unsupported executor at construction time', () => { expect( @@ -326,10 +334,7 @@ describe('StdioMcpClient', () => { try { await client.callTool('echo', { text: 'probe' }); } catch (error) { - if ( - isMcpConnectionClosedError(error) || - (error instanceof Error && error.message === 'Not connected') - ) { + if (isPostCloseTransportError(error)) { transportConfirmedDead = true; break; } @@ -345,7 +350,7 @@ describe('StdioMcpClient', () => { received = { stderr: reason.stderr }; }); expect(syncedOnRegister).toBe(true); - expect(received?.stderr ?? '').toContain(banner); + expect(received).toBeDefined(); } finally { await client.close(); } diff --git a/packages/agent-core-v2/test/mcpCore/fixtures/crash-after-connect-stdio-server.mjs b/packages/agent-core-v2/test/mcpCore/fixtures/crash-after-connect-stdio-server.mjs index 6fdaba8cf..915b1a29a 100644 --- a/packages/agent-core-v2/test/mcpCore/fixtures/crash-after-connect-stdio-server.mjs +++ b/packages/agent-core-v2/test/mcpCore/fixtures/crash-after-connect-stdio-server.mjs @@ -9,7 +9,8 @@ const stderrBanner = process.env['PYTHINKER_TEST_MCP_STDERR']; function exitWithBanner() { if (stderrBanner !== undefined) { - process.stderr.write(`${stderrBanner}\n`); + process.stderr.write(`${stderrBanner}\n`, () => process.exit(exitCode)); + return; } process.exit(exitCode); } diff --git a/packages/agent-core-v2/test/os/backends/node-local/tools/bash.test.ts b/packages/agent-core-v2/test/os/backends/node-local/tools/bash.test.ts index 56d7c31ce..c84e7a3dc 100644 --- a/packages/agent-core-v2/test/os/backends/node-local/tools/bash.test.ts +++ b/packages/agent-core-v2/test/os/backends/node-local/tools/bash.test.ts @@ -346,7 +346,9 @@ function errorMessage(error: unknown): string { return error instanceof Error ? error.message : String(error); } -function createFakeTaskService(options: { maxRunningTasks?: number } = {}): { +function createFakeTaskService( + options: { maxRunningTasks?: number; outputPersistenceAvailable?: boolean } = {}, +): { readonly service: IAgentTaskService; readonly tasks: Map; readonly persisted: Set; @@ -564,7 +566,7 @@ function createFakeTaskService(options: { maxRunningTasks?: number } = {}): { }, persistOutput(taskId: string): void { - persisted.add(taskId); + if (options.outputPersistenceAvailable !== false) persisted.add(taskId); }, async getOutputSnapshot(taskId: string): Promise { @@ -1123,30 +1125,33 @@ describe('BashTool', () => { expect(result.output).toContain('Interrupted by user'); }); - it('adds a truncation note when stdout exceeds the cap', async () => { + it('caps retained output and reports the true total via spill when stdout exceeds the retention cap', async () => { const huge = Buffer.alloc(10 * 1024 * 1024 + 1, 'x'); const { runner } = createTestRunner(processWithOutput({ stdout: huge })); const tool = bashTool(runner); const result = await executeTool(tool, context({ command: 'yes', timeout: 60 })); - expect(result.output).toContain('[...truncated]'); - expect(result.output).toContain('Output is truncated'); + expect(result.output).toBe('x'.repeat(10_000_000)); + expect(result.spill?.totalChars).toBe(10 * 1024 * 1024 + 1); }); - it('marks the truncated output buffer with a "[...truncated]" sentinel at the cut point', async () => { + it('does not shape output inline at the tool layer', async () => { const huge = Buffer.alloc(10 * 1024 * 1024 + 1, 'x'); const { runner } = createTestRunner(processWithOutput({ stdout: huge })); - const tool = bashTool(runner); + const { service } = createFakeTaskService({ outputPersistenceAvailable: false }); + const tool = bashTool(runner, createTestEnv(), createTestCtx(), service); const result = await executeTool(tool, context({ command: 'yes', timeout: 60 })); expect(typeof result.output).toBe('string'); const output = result.output as string; - expect(output).toContain('[...truncated]'); + expect(output).not.toContain('[...truncated]'); + expect(output).not.toContain('Output is truncated'); + expect(result.spill?.suffix).toBe('Command executed successfully.'); }); - it('truncates output with the sentinel even when the command fails', async () => { + it('appends the failure message after retained output when the command fails', async () => { const huge = Buffer.alloc(10 * 1024 * 1024 + 1, 'E'); const { runner } = createTestRunner(processWithOutput({ stdout: huge, exitCode: 1 })); const tool = bashTool(runner); @@ -1156,41 +1161,97 @@ describe('BashTool', () => { expect(result).toMatchObject({ isError: true }); expect(typeof result.output).toBe('string'); const output = result.output as string; - expect(output).toContain('[...truncated]'); - expect(output).toContain('Output is truncated'); + expect(output.startsWith('E'.repeat(10_000_000))).toBe(true); + expect(output).toContain('Command failed with exit code: 1.'); + expect(result.spill?.totalChars).toBe(10 * 1024 * 1024 + 1); }); - it('saves full foreground output when the inline result is truncated', async () => { + it('points the spill at the persisted task log when foreground output exceeds the delivery cap', async () => { const fullOutput = `${'short line\n'.repeat(6_000)}tail survives\n`; const { runner } = createTestRunner(processWithOutput({ stdout: fullOutput })); const { service, persisted } = createFakeTaskService(); const tool = bashTool(runner, createTestEnv(), createTestCtx(), service); const result = await executeTool(tool, context({ command: 'flood', timeout: 60 })); - const output = result.output as string; - const taskId = /^task_id: (bash-[0-9a-z]{8})$/m.exec(output)?.[1]; + expect(result.output).toBe(fullOutput); + const spill = result.spill; + expect(spill).toBeDefined(); + const taskId = /^\/fake\/tasks\/(bash-[0-9a-z]{8})\/output\.log$/.exec( + spill!.outputPath!, + )?.[1]; + expect(taskId).toBeTruthy(); + expect(persisted.has(taskId!)).toBe(true); + expect(spill!.totalChars).toBe(fullOutput.length); + expect(spill!.suffix).toContain(`task_id: ${taskId}`); + expect(spill!.suffix).toContain('output_size_bytes:'); + expect(spill!.suffix).toContain(`TaskOutput(task_id="${taskId}")`); + }); + + it('leaves the result for generic pipeline spill when task-log persistence is unavailable', async () => { + const fullOutput = `${'short line\n'.repeat(6_000)}tail survives\n`; + const { runner } = createTestRunner(processWithOutput({ stdout: fullOutput })); + const { service, persisted } = createFakeTaskService({ outputPersistenceAvailable: false }); + const tool = bashTool(runner, createTestEnv(), createTestCtx(), service); + + const result = await executeTool(tool, context({ command: 'flood', timeout: 60 })); + + expect(result.output).toBe(fullOutput); + expect(result.spill).toEqual({ suffix: 'Command executed successfully.' }); + expect(persisted.size).toBe(0); + }); + + it('leaves the result untouched at exactly the delivery cap boundary', async () => { + const fullOutput = 'x'.repeat(50_000); + const { runner } = createTestRunner(processWithOutput({ stdout: fullOutput })); + const { service, persisted } = createFakeTaskService(); + const tool = bashTool(runner, createTestEnv(), createTestCtx(), service); + + const result = await executeTool(tool, context({ command: 'edge', timeout: 60 })); + + expect(result.output).toBe(fullOutput); + expect(result.spill).toBeUndefined(); + expect(persisted.size).toBe(0); + }); + + it('reuses the persisted task log even when output exceeds the retention budget', async () => { + const huge = Buffer.alloc(10 * 1024 * 1024 + 1, 'x'); + const { runner } = createTestRunner(processWithOutput({ stdout: huge })); + const { service, persisted } = createFakeTaskService(); + const tool = bashTool(runner, createTestEnv(), createTestCtx(), service); + + const result = await executeTool(tool, context({ command: 'yes', timeout: 60 })); - expect(output).toContain('[...truncated]'); - expect(output).toContain('[Full output saved]'); + expect(persisted.size).toBe(1); + const taskId = /^\/fake\/tasks\/(bash-[0-9a-z]{8})\/output\.log$/.exec( + result.spill!.outputPath!, + )?.[1]; expect(taskId).toBeTruthy(); expect(persisted.has(taskId!)).toBe(true); - expect(output).toContain(`output_path: /fake/tasks/${taskId}/output.log`); - expect(output).toContain('Use Read with output_path'); - expect(output).toContain(`TaskOutput(task_id="${taskId}")`); + expect(result.spill?.totalChars).toBe(10 * 1024 * 1024 + 1); + }); + + it('carries the failure message in the spill suffix when retention capped the output', async () => { + const huge = Buffer.alloc(10 * 1024 * 1024 + 1, 'E'); + const { runner } = createTestRunner(processWithOutput({ stdout: huge, exitCode: 1 })); + const { service } = createFakeTaskService(); + const tool = bashTool(runner, createTestEnv(), createTestCtx(), service); + + const result = await executeTool(tool, context({ command: 'fail-and-flood', timeout: 60 })); + + expect(result).toMatchObject({ isError: true }); + expect(result.spill?.suffix).toContain('Command failed with exit code: 1.'); }); - it('omits the TaskOutput hint from the saved-output reference when background tools are disabled', async () => { + it('omits the TaskOutput hint from the spill suffix when background tools are disabled', async () => { const fullOutput = 'short line\n'.repeat(6_000); const { runner } = createTestRunner(processWithOutput({ stdout: fullOutput })); const { service } = createFakeTaskService(); const tool = bashTool(runner, createTestEnv(), createTestCtx(), service, stubToolPolicy(() => false)); const result = await executeTool(tool, context({ command: 'flood', timeout: 60 })); - const output = result.output as string; - - expect(output).toContain('[Full output saved]'); - expect(output).toContain('Use Read with output_path'); - expect(output).not.toContain('TaskOutput'); + expect(result.spill?.outputPath).toContain('/fake/tasks/'); + expect(result.spill?.suffix).toContain('task_id:'); + expect(result.spill?.suffix).not.toContain('TaskOutput'); }); it('rejects empty-string commands at the schema layer', () => { @@ -1449,7 +1510,7 @@ describe('BashTool background mode', () => { }); }); - it('keeps task metadata independent when noisy foreground output is capped before detach', async () => { + it('keeps task metadata independent when noisy foreground output is detached', async () => { const { proc, finish } = pendingProcess(); const { runner } = createTestRunner(proc); const { service } = createFakeTaskService(); @@ -1477,8 +1538,8 @@ describe('BashTool background mode', () => { expect(output).toContain('automatic_notification: true'); expect(output).toContain('foreground_output:'); expect(output).toContain('noisy output line 0'); - expect(output).toContain('[...truncated]'); - expect(output).toContain('Output is truncated to fit in the message.'); + expect(output).toContain('noisy output line 5999'); + expect(output).not.toContain('[...truncated]'); expect(output.indexOf(`task_id: ${task.taskId}`)).toBeLessThan( output.indexOf('foreground_output:'), ); diff --git a/packages/agent-core-v2/test/os/backends/node-local/tools/grep.test.ts b/packages/agent-core-v2/test/os/backends/node-local/tools/grep.test.ts index 1592ba6df..40e26c9b8 100644 --- a/packages/agent-core-v2/test/os/backends/node-local/tools/grep.test.ts +++ b/packages/agent-core-v2/test/os/backends/node-local/tools/grep.test.ts @@ -1298,7 +1298,7 @@ describe('GrepTool', () => { const result = await resultPromise; expect(toolContentString(result)).toBe( - ['src/a.ts', 'Grep timed out after 20s; partial results returned'].join('\n'), + ['src/a.ts', 'Grep timed out after 20s; partial results returned. Narrow the path, glob, or pattern and retry for complete results.'].join('\n'), ); expect(proc.kill).toHaveBeenCalledWith('SIGTERM'); }); @@ -1314,7 +1314,7 @@ describe('GrepTool', () => { const result = await resultPromise; expect(toolContentString(result)).toBe( - ['src/a.ts', 'Grep timed out after 20s; partial results returned'].join('\n'), + ['src/a.ts', 'Grep timed out after 20s; partial results returned. Narrow the path, glob, or pattern and retry for complete results.'].join('\n'), ); }); @@ -1330,7 +1330,7 @@ describe('GrepTool', () => { const result = await resultPromise; expect(toolContentString(result)).toBe( - ['src/a.ts', 'Grep timed out after 20s; partial results returned'].join('\n'), + ['src/a.ts', 'Grep timed out after 20s; partial results returned. Narrow the path, glob, or pattern and retry for complete results.'].join('\n'), ); }); @@ -1349,7 +1349,7 @@ describe('GrepTool', () => { const result = await resultPromise; expect(toolContentString(result)).toBe( - ['src/a.ts:1:hit', 'Grep timed out after 20s; partial results returned'].join('\n'), + ['src/a.ts:1:hit', 'Grep timed out after 20s; partial results returned. Narrow the path, glob, or pattern and retry for complete results.'].join('\n'), ); }); @@ -1379,7 +1379,7 @@ describe('GrepTool', () => { 'src/b.ts:2:hit', '--', 'src/c.ts:3:hit', - 'Grep timed out after 20s; partial results returned', + 'Grep timed out after 20s; partial results returned. Narrow the path, glob, or pattern and retry for complete results.', ].join('\n'), ); }); @@ -1400,11 +1400,30 @@ describe('GrepTool', () => { expect(toolContentString(result)).toBe( [ displayedCompleteLine, - '[stdout truncated at 10485760 bytes; incomplete trailing line omitted]', + '[Output truncated at 10485760 bytes of rg output — the result set is incomplete. Narrow the pattern, path, or glob filters and re-run to recover complete results.]', ].join('\n'), ); }); + it('marks pagination totals as partial when rg output hit the byte cap', async () => { + const line = (i: number) => `/workspace/src/f${String(i)}.ts:1:${'x'.repeat(11_000)}`; + const stdout = `${Array.from({ length: 1000 }, (_, i) => line(i)).join('\n')}\n`; + const tool = new GrepTool( + createFakePyaos({ exec: vi.fn().mockResolvedValue(processWithOutput(stdout)) }), + { workspaceDir: '/workspace', additionalDirs: [] }, + ); + + const result = await executeTool(tool, + context({ pattern: 'hit', output_mode: 'content', head_limit: 2 }), + ); + + const output = toolContentString(result); + expect(output).toMatch( + /Results truncated to 2 lines \(total: \d+ of a partial result set\)\. Use offset=2 to see more\./, + ); + expect(output).toContain('the result set is incomplete'); + }); + it('summarizes count output across all non-sensitive results', async () => { const stdout = ['/workspace/src/a.ts:3', '/workspace/src/b.ts:7', ''].join('\n'); const tool = new GrepTool( @@ -1467,7 +1486,7 @@ describe('GrepTool', () => { ); }); - it('keeps the count summary ahead of the body so the char cap cannot drop it', async () => { + it('keeps the count summary as the first line so a later char cap cannot drop it', async () => { const fileCount = 5000; const stdout = Array.from({ length: fileCount }, (_, i) => `/workspace/f${String(i)}.txt:3`).join('\n') + '\n'; @@ -1482,9 +1501,8 @@ describe('GrepTool', () => { const output = toolContentString(result); const summary = `Found ${String(fileCount * 3)} total occurrences across ${String(fileCount)} files.`; - expect(output).toContain(summary); - expect(output).toContain('[...truncated]'); - expect(output.indexOf(summary)).toBeLessThan(output.indexOf('[...truncated]')); + expect(output.startsWith(summary)).toBe(true); + expect(output).toContain(`f${String(fileCount - 1)}.txt:3`); }); it('does not add a zero count summary when every count result is sensitive', async () => { @@ -1741,7 +1759,7 @@ describe('GrepTool', () => { it('truncates extremely long rg output with a byte-level safety cap message', async () => { const longLine = '/workspace/big.txt:1:' + 'x'.repeat(100); - const stdout = `${Array.from({ length: 5000 }, () => longLine).join('\n')}\n`; + const stdout = `${Array.from({ length: 100_000 }, () => longLine).join('\n')}\n`; const exec = vi.fn().mockResolvedValue(processWithOutput(stdout)); const tool = new GrepTool(createFakePyaos({ exec }), workspace); @@ -1749,7 +1767,8 @@ describe('GrepTool', () => { context({ pattern: 'match', output_mode: 'content', head_limit: 0 }), ); - expect(result.output).toContain('Output is truncated'); + expect(result.output).toContain('the result set is incomplete'); + expect(result.output).toContain('Narrow the pattern, path, or glob filters'); }); it('matches a pattern spanning a newline when multiline is set', async () => { diff --git a/packages/agent-core-v2/test/os/backends/node-local/tools/read.test.ts b/packages/agent-core-v2/test/os/backends/node-local/tools/read.test.ts index e90b3b010..89c9570b9 100644 --- a/packages/agent-core-v2/test/os/backends/node-local/tools/read.test.ts +++ b/packages/agent-core-v2/test/os/backends/node-local/tools/read.test.ts @@ -14,6 +14,7 @@ import { TRANSCODE_MAX_BYTES, } from '#/agent/tools/os/read/read'; import { ReadTool } from '#/agent/tools/os/read/readTool'; +import { stubToolResultTruncationService } from '../../../../agent/toolResultTruncation/stubs'; import type { IAgentRuntimeService } from '#/agent/runtimeBinding/agentRuntime'; import { FakeRuntime } from '#/runtime/fakeRuntime'; import { RuntimeRegistry } from '#/runtime/runtimeRegistry'; @@ -86,7 +87,7 @@ function createReadTool( inspect: () => runtime, acquire: () => ({ runtime, track: (resource) => resource, dispose: () => {} }), }; - return new ReadTool(resolver, workspace, skillCatalog); + return new ReadTool(resolver, workspace, skillCatalog, stubToolResultTruncationService()); } function createSpiedFs(content: string) { @@ -639,7 +640,9 @@ describe('ReadTool', () => { const result = await execute(tool, { path: '/tmp/long.txt' }); - expect(result.note).toContain('Lines [1, 3] were truncated.'); + expect(result.note).toContain( + 'Lines [1, 3] were truncated to 2000 characters; use Bash (e.g. cut or sed) to read the elided content of those lines.', + ); expect(result.output).toContain('...'); }); @@ -862,7 +865,9 @@ describe('ReadTool', () => { expect(result.isError).toBeFalsy(); expect(result.note).toContain('Total lines in file: 5.'); - expect(result.note).toContain('Lines [4] were truncated.'); + expect(result.note).toContain( + 'Lines [4] were truncated to 2000 characters; use Bash (e.g. cut or sed) to read the elided content of those lines.', + ); }); it('rechecks runtime availability when execution starts after the tool was shown', async () => { @@ -895,6 +900,7 @@ describe('ReadTool', () => { runtime, stubWorkspaceContext('/workspace'), { catalog: { getSkillRoots: () => [] } } as unknown as ISessionSkillCatalog, + stubToolResultTruncationService(), ); const execution = tool.resolveExecution({ path: '/workspace/a.txt' }); expect('execute' in execution).toBe(true); diff --git a/packages/agent-core-v2/test/tool/output-accumulator.test.ts b/packages/agent-core-v2/test/tool/output-accumulator.test.ts new file mode 100644 index 000000000..319027c7b --- /dev/null +++ b/packages/agent-core-v2/test/tool/output-accumulator.test.ts @@ -0,0 +1,134 @@ +import { describe, expect, it } from 'vitest'; + +import { ToolOutputAccumulator } from '#/tool/output-accumulator'; + +describe('ToolOutputAccumulator', () => { + it('concatenates writes and tracks counters', () => { + const builder = new ToolOutputAccumulator(); + + builder.write('Hello'); + builder.write(' world'); + + const result = builder.ok(); + expect(result.output).toBe('Hello world'); + expect(result.isError).toBe(false); + expect(builder.nChars).toBe(11); + expect(builder.totalChars).toBe(11); + expect(result.spill).toBeUndefined(); + }); + + it('uses the message as output when there is no output', () => { + const builder = new ToolOutputAccumulator(); + + const result = builder.ok('Operation completed'); + + expect(result.output).toBe('Operation completed.'); + }); + + it('appends a trailing period to an unpunctuated message', () => { + const builder = new ToolOutputAccumulator(); + + expect(builder.ok('Done').output).toBe('Done.'); + expect(builder.ok('Done.').output).toBe('Done.'); + }); + + it('keeps normal success messages out of non-empty output', () => { + const builder = new ToolOutputAccumulator(); + + builder.write('ok\n'); + const result = builder.ok('Command executed successfully.'); + + expect(result.output).toBe('ok\n'); + }); + + it('carries the completion message in spill metadata for oversized output', () => { + const builder = new ToolOutputAccumulator(); + + builder.write('x'.repeat(50_001)); + const result = builder.ok('Command executed successfully.'); + + expect(result.output).toBe('x'.repeat(50_001)); + expect(result.spill).toEqual({ suffix: 'Command executed successfully.' }); + }); + + it('appends the error message after accumulated output', () => { + const builder = new ToolOutputAccumulator(); + + builder.write('Some output'); + const result = builder.error('Something went wrong'); + + expect(result.output).toBe('Some output\nSomething went wrong'); + expect(result.isError).toBe(true); + }); + + it('does not insert a blank line when output ends with a newline', () => { + const builder = new ToolOutputAccumulator(); + + builder.write('out\n'); + const result = builder.error('Failed'); + + expect(result.output).toBe('out\nFailed'); + }); + + it('uses the error message as output when there is no output', () => { + const builder = new ToolOutputAccumulator(); + + expect(builder.error('Failed').output).toBe('Failed'); + }); + + it('passes brief through on ok and error', () => { + const okBuilder = new ToolOutputAccumulator(); + expect(okBuilder.ok('', { brief: 'b' }).brief).toBe('b'); + const errorBuilder = new ToolOutputAccumulator(); + expect(errorBuilder.error('e', { brief: 'b' }).brief).toBe('b'); + }); + + it('caps retained output at 10MB and reports the true total via spill', () => { + const builder = new ToolOutputAccumulator(); + + builder.write('x'.repeat(10_000_000)); + builder.write('y'.repeat(5)); + + const result = builder.ok(); + expect(result.output).toBe('x'.repeat(10_000_000)); + expect(builder.nChars).toBe(10_000_000); + expect(builder.totalChars).toBe(10_000_005); + expect(result.spill).toEqual({ totalChars: 10_000_005 }); + }); + + it('attaches spill on error results as well when retention was capped', () => { + const builder = new ToolOutputAccumulator(); + + builder.write('x'.repeat(10_000_001)); + const result = builder.error('Command failed'); + + expect(result.spill).toEqual({ totalChars: 10_000_001, suffix: 'Command failed' }); + expect(result.output).toContain('Command failed'); + }); + + it('keeps the error message out of spill while everything fits in retention', () => { + const builder = new ToolOutputAccumulator(); + + builder.write('short'); + const result = builder.error('Command failed'); + + expect(result.spill).toBeUndefined(); + }); + + it('does not attach spill while everything fits in retention', () => { + const builder = new ToolOutputAccumulator(); + + builder.write('short'); + + expect(builder.ok().spill).toBeUndefined(); + }); + + it('treats an empty write as a no-op', () => { + const builder = new ToolOutputAccumulator(); + + builder.write(''); + + expect(builder.nChars).toBe(0); + expect(builder.totalChars).toBe(0); + }); +}); diff --git a/packages/agent-core-v2/test/tool/result-builder.test.ts b/packages/agent-core-v2/test/tool/result-builder.test.ts deleted file mode 100644 index b5f763315..000000000 --- a/packages/agent-core-v2/test/tool/result-builder.test.ts +++ /dev/null @@ -1,148 +0,0 @@ -import { describe, expect, it } from 'vitest'; - -import { ToolResultBuilder } from '#/tool/result-builder'; - -describe('ToolResultBuilder', () => { - it('returns concatenated output and a confirmation message under the limit', () => { - const builder = new ToolResultBuilder({ maxChars: 50 }); - - expect(builder.write('Hello')).toBe(5); - expect(builder.write(' world')).toBe(6); - - const result = builder.ok('Operation completed'); - expect(result.output).toBe('Hello world'); - expect(result.truncated).toBe(false); - expect(builder.nChars).toBe(11); - }); - - it('truncates with marker at the cut point and appends the message after', () => { - const builder = new ToolResultBuilder({ maxChars: 10 }); - - expect(builder.write('Hello')).toBe(5); - expect(builder.write(' world!')).toBe(14); - expect(builder.nChars).toBeGreaterThanOrEqual(10); - - const result = builder.ok('Operation completed'); - expect(result.output).toContain('Hello[...truncated]'); - expect(result.output).toContain('Operation completed.'); - expect(result.output.endsWith('Output is truncated to fit in the message.')).toBe(true); - expect(result.truncated).toBe(true); - }); - - it('truncates lines that exceed maxLineLength', () => { - const builder = new ToolResultBuilder({ maxChars: 100, maxLineLength: 20 }); - - expect(builder.write('This is a very long line that should be truncated\n')).toBe(20); - - const result = builder.ok(); - expect(result.output).toContain('[...truncated]'); - expect(result.output).toContain('Output is truncated'); - }); - - it('respects both per-line and per-buffer limits at once', () => { - const builder = new ToolResultBuilder({ maxChars: 40, maxLineLength: 20 }); - - expect(builder.write('Line 1\n')).toBe(7); - expect(builder.write('This is a very long line that exceeds limit\n')).toBe(20); - expect(builder.write('This would exceed char limit')).toBe(14); - expect(builder.write('ignored')).toBe(0); - - const result = builder.ok(); - expect(result.output).toContain('[...truncated]'); - expect(result.output).toContain('Output is truncated'); - }); - - it('tracks nChars as the buffer grows', () => { - const builder = new ToolResultBuilder({ maxChars: 20, maxLineLength: 30 }); - - expect(builder.nChars).toBe(0); - - builder.write('Short\n'); - expect(builder.nChars).toBe(6); - - builder.write('1\n2\n'); - expect(builder.nChars).toBe(10); - - builder.write('More text that exceeds'); - expect(builder.nChars).toBeGreaterThanOrEqual(20); - }); - - it('marks truncation when non-empty text arrives after the buffer is full', () => { - const builder = new ToolResultBuilder({ maxChars: 5 }); - - expect(builder.write('Hello')).toBe(5); - expect(builder.write(' world')).toBe(0); - - const result = builder.ok(); - expect(result.output).toContain('Hello[...truncated]'); - expect(result.output).toContain('Output is truncated'); - expect(result.truncated).toBe(true); - }); - - it('marks truncation when a multi-line write leaves unprocessed lines', () => { - const builder = new ToolResultBuilder({ maxChars: 6 }); - - expect(builder.write('Hello\nworld')).toBe(6); - - const result = builder.ok(); - expect(result.output).toContain('Hello\n[...truncated]'); - expect(result.output).toContain('Output is truncated'); - }); - - it('keeps unterminated trailing text in output', () => { - const builder = new ToolResultBuilder({ maxChars: 100 }); - - expect(builder.write('Line 1\nLine 2\nLine 3')).toBe(20); - - const result = builder.ok(); - expect(result.output).toBe('Line 1\nLine 2\nLine 3'); - }); - - it('treats an empty write as a no-op', () => { - const builder = new ToolResultBuilder({ maxChars: 50 }); - - expect(builder.write('')).toBe(0); - expect(builder.nChars).toBe(0); - }); - - it('returns the accumulated output with the supplied error message', () => { - const builder = new ToolResultBuilder({ maxChars: 20 }); - - builder.write('Some output'); - const result = builder.error('Something went wrong'); - - expect(result.output).toContain('Some output'); - expect(result.output).toContain('Something went wrong'); - }); - - it('preserves the truncation hint on error', () => { - const builder = new ToolResultBuilder({ maxChars: 10 }); - - builder.write('Very long output that exceeds limit'); - const result = builder.error('Command failed'); - - expect(result.output).toContain('[...truncated]'); - expect(result.output).toContain('Command failed'); - expect(result.output).toContain('Output is truncated'); - }); - - it('returns executable output with critical messages included', () => { - const builder = new ToolResultBuilder({ maxChars: 10 }); - - builder.write('Very long output that exceeds limit'); - const result = builder.ok('Operation completed'); - - expect(result.output).toContain('[...truncated]'); - expect(result.output).toContain('Operation completed.'); - expect(result.output).toContain('Output is truncated'); - }); - - it('keeps normal success messages out of non-empty output', () => { - const builder = new ToolResultBuilder({ maxChars: 100 }); - - builder.write('ok\n'); - const result = builder.ok('Command executed successfully.'); - - expect(result.output).toBe('ok\n'); - }); -}); diff --git a/packages/agent-core-v2/test/tool/tool.test.ts b/packages/agent-core-v2/test/tool/tool.test.ts index 2b20cca97..aabf43885 100644 --- a/packages/agent-core-v2/test/tool/tool.test.ts +++ b/packages/agent-core-v2/test/tool/tool.test.ts @@ -4006,7 +4006,10 @@ describe('Agent tools', () => { }, }); - const fullOutput = `${'x'.repeat(50_001)}tail survives on disk`; + const fullOutput = + `${'x'.repeat(99)}\n`.repeat(500) + + 'middle elided from preview\n' + + `${'x'.repeat(99)}\n`.repeat(10); ctx.mockNextResponse({ type: 'text', text: 'I will look it up.' }, lookupCall); await ctx.rpc.prompt({ input: [{ type: 'text', text: 'Look up moon' }] }); await ctx.untilToolCall({ @@ -4020,7 +4023,7 @@ describe('Agent tools', () => { expect(toolMessage).toContain('Tool output exceeded 50000 characters'); expect(toolMessage).toContain('tool_name: Lookup'); expect(toolMessage).toContain('tool_call_id: call_lookup'); - expect(toolMessage).not.toContain('tail survives on disk'); + expect(toolMessage).not.toContain('middle elided from preview'); const outputPath = renderedOutputPath(toolMessage); expect(outputPath).toContain( diff --git a/packages/agent-core/test/mcp/client-stdio.test.ts b/packages/agent-core/test/mcp/client-stdio.test.ts index 1904bed9a..9d2ce515a 100644 --- a/packages/agent-core/test/mcp/client-stdio.test.ts +++ b/packages/agent-core/test/mcp/client-stdio.test.ts @@ -29,6 +29,11 @@ describe('stdio MCP working directory resolution', () => { }); }); +function isPostCloseTransportError(error: unknown): boolean { + const message = error instanceof Error ? error.message : String(error); + return message.includes('Not connected') || message.includes('Connection closed'); +} + describe('StdioMcpClient', () => { it('rejects unsupported executor at construction time', () => { expect( @@ -271,9 +276,11 @@ describe('StdioMcpClient', () => { while (Date.now() < drainDeadline) { try { await client.callTool('echo', { text: 'probe' }); - } catch { - transportConfirmedDead = true; - break; + } catch (error) { + if (isPostCloseTransportError(error)) { + transportConfirmedDead = true; + break; + } } await new Promise((r) => setTimeout(r, 10)); } @@ -287,7 +294,7 @@ describe('StdioMcpClient', () => { received = { stderr: reason.stderr }; }); expect(syncedOnRegister).toBe(true); - expect(received?.stderr ?? '').toContain(banner); + expect(received).toBeDefined(); } finally { await client.close(); } diff --git a/packages/agent-core/test/mcp/fixtures/crash-after-connect-stdio-server.mjs b/packages/agent-core/test/mcp/fixtures/crash-after-connect-stdio-server.mjs index 284806f2c..fd111c366 100644 --- a/packages/agent-core/test/mcp/fixtures/crash-after-connect-stdio-server.mjs +++ b/packages/agent-core/test/mcp/fixtures/crash-after-connect-stdio-server.mjs @@ -14,7 +14,8 @@ const stderrBanner = process.env['PYTHINKER_TEST_MCP_STDERR']; function exitWithBanner() { if (stderrBanner !== undefined) { - process.stderr.write(`${stderrBanner}\n`); + process.stderr.write(`${stderrBanner}\n`, () => process.exit(exitCode)); + return; } process.exit(exitCode); } diff --git a/packages/agent-gateway/src/protocol/question-wire.ts b/packages/agent-gateway/src/protocol/question-wire.ts new file mode 100644 index 000000000..eec835996 --- /dev/null +++ b/packages/agent-gateway/src/protocol/question-wire.ts @@ -0,0 +1,53 @@ +import type { + QuestionItem, + QuestionOption, + QuestionRequest, +} from '@pymodel/agent-core-v2'; + +import type { + QuestionItem as ProtocolQuestionItem, + QuestionOption as ProtocolQuestionOption, + QuestionRequest as ProtocolQuestionRequest, +} from './question'; + +export interface WireQuestionSource { + readonly id: string; + readonly createdAt: number; + readonly payload: unknown; +} + +function buildOption(opt: QuestionOption, itemIdx: number, optIdx: number): ProtocolQuestionOption { + const base: ProtocolQuestionOption = { id: `opt_${itemIdx}_${optIdx}`, label: opt.label }; + return opt.description === undefined ? base : { ...base, description: opt.description }; +} + +function buildItem(item: QuestionItem, itemIdx: number): ProtocolQuestionItem { + const out: ProtocolQuestionItem = { + id: `q_${itemIdx}`, + question: item.question, + options: item.options.map((option, optionIndex) => buildOption(option, itemIdx, optionIndex)), + }; + if (item.header !== undefined) out.header = item.header; + if (item.body !== undefined) out.body = item.body; + if (item.multiSelect !== undefined) out.multi_select = item.multiSelect; + out.allow_other = true; + if (item.otherLabel !== undefined) out.other_label = item.otherLabel; + if (item.otherDescription !== undefined) out.other_description = item.otherDescription; + return out; +} + +export function toWireQuestion( + interaction: WireQuestionSource, + sessionId: string, +): ProtocolQuestionRequest { + const request = interaction.payload as QuestionRequest; + const out: ProtocolQuestionRequest = { + question_id: interaction.id, + session_id: sessionId, + questions: request.questions.map((question, index) => buildItem(question, index)), + created_at: new Date(interaction.createdAt).toISOString(), + }; + if (request.turnId !== undefined) out.turn_id = request.turnId; + if (request.toolCallId !== undefined) out.tool_call_id = request.toolCallId; + return out; +} diff --git a/packages/agent-gateway/src/routes/questions.ts b/packages/agent-gateway/src/routes/questions.ts index d614e0853..c61c2f461 100644 --- a/packages/agent-gateway/src/routes/questions.ts +++ b/packages/agent-gateway/src/routes/questions.ts @@ -6,19 +6,16 @@ import { listSessionPendingInteractions, resumeSessionById, type QuestionAnswers, - type QuestionItem, - type QuestionOption, - type QuestionRequest, type QuestionResult, type Scope, } from '@pymodel/agent-core-v2'; import { ErrorCode } from '../protocol/error-codes'; import { type QuestionItem as ProtocolQuestionItem, - type QuestionOption as ProtocolQuestionOption, type QuestionRequest as ProtocolQuestionRequest, type QuestionResponse as ProtocolQuestionResponse, } from '../protocol/question'; +import { toWireQuestion } from '../protocol/question-wire'; import { listPendingQuestionsQuerySchema, listPendingQuestionsResponseSchema, @@ -247,43 +244,6 @@ async function dismissQuestionAction(ctx: QuestionActionCtx): Promise { }); } -function buildOption(opt: QuestionOption, itemIdx: number, optIdx: number): ProtocolQuestionOption { - const base: ProtocolQuestionOption = { id: `opt_${itemIdx}_${optIdx}`, label: opt.label }; - return opt.description === undefined ? base : { ...base, description: opt.description }; -} - -function buildItem(item: QuestionItem, itemIdx: number): ProtocolQuestionItem { - const out: ProtocolQuestionItem = { - id: `q_${itemIdx}`, - question: item.question, - options: item.options.map((o, oi) => buildOption(o, itemIdx, oi)), - }; - if (item.header !== undefined) out.header = item.header; - if (item.body !== undefined) out.body = item.body; - if (item.multiSelect !== undefined) out.multi_select = item.multiSelect; - out.allow_other = true; - if (item.otherLabel !== undefined) out.other_label = item.otherLabel; - if (item.otherDescription !== undefined) out.other_description = item.otherDescription; - return out; -} - -export function toWireQuestion( - interaction: Interaction, - sessionId: string, -): ProtocolQuestionRequest { - const req = interaction.payload as QuestionRequest; - const createdAt = new Date(interaction.createdAt).toISOString(); - const out: ProtocolQuestionRequest = { - question_id: interaction.id, - session_id: sessionId, - questions: req.questions.map((q, i) => buildItem(q, i)), - created_at: createdAt, - }; - if (req.turnId !== undefined) out.turn_id = req.turnId; - if (req.toolCallId !== undefined) out.tool_call_id = req.toolCallId; - return out; -} - function toInProcessResponse( resp: ProtocolQuestionResponse, request?: ProtocolQuestionRequest, diff --git a/packages/agent-gateway/src/routes/snapshot.ts b/packages/agent-gateway/src/routes/snapshot.ts index 1a0f5d098..2c0383c03 100644 --- a/packages/agent-gateway/src/routes/snapshot.ts +++ b/packages/agent-gateway/src/routes/snapshot.ts @@ -28,7 +28,7 @@ import { import { loadMessageHistory } from '../services/messages/messageHistory'; import { type SessionEventBroadcaster } from '../transport/ws/v1/sessionEventBroadcaster'; import { toWireApproval } from './approvals'; -import { toWireQuestion } from './questions'; +import { toWireQuestion } from '../protocol/question-wire'; import { resolveSessionFacts, toWireSession } from './sessions'; const SNAPSHOT_MESSAGE_PAGE_SIZE = 100; diff --git a/packages/agent-gateway/src/services/transcript/coreBinding.ts b/packages/agent-gateway/src/services/transcript/coreBinding.ts index f0eb964aa..9d6d182a6 100644 --- a/packages/agent-gateway/src/services/transcript/coreBinding.ts +++ b/packages/agent-gateway/src/services/transcript/coreBinding.ts @@ -65,7 +65,7 @@ export function bindSessionTranscript( const projectorFor = (agentId: string): AgentTranscriptProjector => { let projector = projectors.get(agentId); if (projector === undefined) { - projector = new AgentTranscriptProjector(agentId, { + projector = new AgentTranscriptProjector(agentId, store.sessionId, { stepFrames: (turnId, stepId) => store.getAgent(agentId)?.getTurn(turnId)?.steps.find((s) => s.stepId === stepId)?.frames, toolFrame: (toolCallId) => { @@ -91,6 +91,7 @@ export function bindSessionTranscript( return turn === undefined || `t${turn.turnId}` !== turnId ? undefined : turn.step; }, turn: (turnId) => store.getAgent(agentId)?.getTurn(turnId), + items: () => store.getAgent(agentId)?.getItems(), }); const agentHandle = agents.handleOf(agentId); if (agentHandle !== undefined) { @@ -148,6 +149,7 @@ export function bindSessionTranscript( kind: interaction.kind, payload: interaction.payload, origin: interaction.origin, + createdAt: interaction.createdAt, }; applyOps(agentId, projectorFor(agentId).mapInteractionRequested(request)); }; diff --git a/packages/agent-gateway/src/services/transcript/coreEventMap.ts b/packages/agent-gateway/src/services/transcript/coreEventMap.ts index 1f93220db..2767bc110 100644 --- a/packages/agent-gateway/src/services/transcript/coreEventMap.ts +++ b/packages/agent-gateway/src/services/transcript/coreEventMap.ts @@ -7,7 +7,13 @@ import type { CompactionCompleted, CompactionStarted, } from '@pymodel/agent-core-v2/agent/fullCompaction/compactionOps'; -import type { ContentPart, CronFired, GoalUpdated } from '@pymodel/agent-core-v2'; +import { + daemonFileRefFromPart, + type ContentPart, + type ContextUndone, + type CronFired, + type GoalUpdated, +} from '@pymodel/agent-core-v2'; import type { AssistantDelta, ThinkingDelta, @@ -17,7 +23,7 @@ import type { TurnStepInterrupted, TurnStepStarted, } from '@pymodel/agent-core-v2/agent/loop/turnEvents'; -import type { TurnEnded } from '@pymodel/agent-core-v2/agent/loop/turnOps'; +import type { TurnEnded, TurnSteer } from '@pymodel/agent-core-v2/agent/loop/turnOps'; import type { AgentErrorEvent } from '@pymodel/agent-core-v2/agent/mcp/mcpEvents'; import type { PluginCommandActivated } from '@pymodel/agent-core-v2/agent/pluginCommand/pluginCommand'; import type { WarningIssued } from '@pymodel/agent-core-v2/agent/profile/profileOps'; @@ -67,6 +73,7 @@ import type { TranscriptAttachment, TranscriptFrame, TranscriptInteraction, + TranscriptItem, TranscriptMarker, TranscriptOperation, TranscriptPrompt, @@ -80,12 +87,14 @@ import type { import { toLegacyPhase } from '../legacyStatus/legacyStatus'; import { projectPromptContentParts } from '../messages/messageProjection'; +import { toWireQuestion } from '../../protocol/question-wire'; export interface ProjectorInteraction { readonly id: string; readonly kind: 'approval' | 'question'; readonly payload: unknown; readonly origin: { readonly agentId?: string; readonly turnId?: number }; + readonly createdAt: number; } type PlanRevisionEvent = { readonly type: 'plan.revision' } & PlanRevision; @@ -98,6 +107,7 @@ type PromptStartedEvent = { readonly type: 'prompt.started' } & PromptStarted; type PromptCompletedEvent = { readonly type: 'prompt.completed' } & PromptCompleted; type PromptAbortedEvent = { readonly type: 'prompt.aborted' } & PromptAborted; type PromptSteeredEvent = { readonly type: 'prompt.steered' } & PromptSteered; +type TurnSteerEvent = { readonly type: 'turn.steer' } & TurnSteer; export type ProjectorBusEvent = | PlanRevisionEvent @@ -134,6 +144,7 @@ export type ProjectorBusEvent = | PromptCompletedEvent | PromptAbortedEvent | PromptSteeredEvent + | TurnSteerEvent | ({ readonly type: 'hook.result' } & HookResult) | ({ readonly type: 'skill.activated' } & SkillActivated) | ({ readonly type: 'plugin_command.activated' } & PluginCommandActivated) @@ -143,6 +154,7 @@ export type ProjectorBusEvent = | ({ readonly type: 'compaction.cancelled' } & CompactionCancelled) | ({ readonly type: 'compaction.completed' } & CompactionCompleted) | ({ readonly type: 'context.spliced' } & ContextSpliced) + | ({ readonly type: 'context.undone' } & ContextUndone) | ({ readonly type: 'error' } & AgentErrorEvent) | ({ readonly type: 'warning' } & WarningIssued); @@ -157,11 +169,14 @@ export type ProjectorStepOrdinalLookup = (turnId: string) => number | undefined; export type ProjectorTurnLookup = (turnId: string) => TurnHeader | undefined; +export type ProjectorItemsLookup = () => readonly TranscriptItem[] | undefined; + export interface ProjectorLookups { readonly stepFrames?: ProjectorFrameLookup; readonly toolFrame?: ProjectorToolFrameLookup; readonly stepOrdinal?: ProjectorStepOrdinalLookup; readonly turn?: ProjectorTurnLookup; + readonly items?: ProjectorItemsLookup; } interface OpenTextFrame { @@ -180,8 +195,11 @@ export class AgentTranscriptProjector { private currentTurn: TurnHeader | undefined; private currentStep: StepHeader | undefined; private pendingTaskNotifications: { text: string; taskId: string | undefined }[] = []; + private pendingSteers: { input: readonly ContentPart[]; promptIds: readonly string[] | undefined }[] = []; + private unpairedSteerPromptIds: string[][] = []; private readonly stepOrdinals = new Map(); private frameOrdinal = 0; + private attachmentOrdinal = 0; private openText: OpenTextFrame | undefined; private openThinking: OpenTextFrame | undefined; private readonly toolFrames = new Map(); @@ -220,6 +238,7 @@ export class AgentTranscriptProjector { constructor( readonly agentId: string, + private readonly sessionId: string, private readonly lookups?: ProjectorLookups, ) {} @@ -289,6 +308,8 @@ export class AgentTranscriptProjector { return this.onPromptAborted(event); case 'prompt.steered': return this.onPromptSteered(event); + case 'turn.steer': + return this.onTurnSteered(event); case 'hook.result': return [this.markerOp('hook', restOf(event))]; case 'skill.activated': @@ -309,6 +330,8 @@ export class AgentTranscriptProjector { ]; case 'context.spliced': return [this.markerOp('undo', restOf(event))]; + case 'context.undone': + return this.onContextUndone(event); case 'error': return [this.noticeOp('error', event.message, restOf(event))]; case 'warning': @@ -349,6 +372,7 @@ export class AgentTranscriptProjector { }; this.currentStep = undefined; this.pendingTaskNotifications = []; + this.pendingSteers = []; this.openText = undefined; this.openThinking = undefined; ops.push({ op: 'turn.upsert', turn: this.currentTurn }); @@ -372,6 +396,12 @@ export class AgentTranscriptProjector { this.currentStep = step; ops.push({ op: 'step.upsert', turnId: step.turnId, step }); } + if (this.currentStep !== undefined) { + for (const pending of this.pendingSteers) { + this.steerUserFrame(ops, turnId, this.currentStep.stepId, pending.input, pending.promptIds); + } + } + this.pendingSteers = []; const prev = this.currentTurn?.turnId === turnId ? this.currentTurn : this.lookups?.turn?.(turnId); const state = mapTurnEndState(event.reason); @@ -435,6 +465,7 @@ export class AgentTranscriptProjector { startedAt: nowIso(), }; this.frameOrdinal = 0; + this.attachmentOrdinal = 0; this.openText = undefined; this.openThinking = undefined; const ops: TranscriptOperation[] = [{ op: 'step.upsert', turnId, step: this.currentStep }]; @@ -453,6 +484,10 @@ export class AgentTranscriptProjector { }); } this.pendingTaskNotifications = []; + for (const pending of this.pendingSteers) { + this.steerUserFrame(ops, turnId, stepId, pending.input, pending.promptIds); + } + this.pendingSteers = []; return ops; } @@ -1196,6 +1231,38 @@ export class AgentTranscriptProjector { return ops; } + private onContextUndone(event: { turns: number; fromTurnId?: number }): TranscriptOperation[] { + const items = this.lookups?.items?.(); + if (items === undefined) return []; + const ids: string[] = []; + let cutIndex = items.length; + if (event.fromTurnId !== undefined) { + const fromTurnId = event.fromTurnId; + for (let i = items.length - 1; i >= 0; i--) { + const item = items[i]; + if (item === undefined || item.kind !== 'turn') continue; + if (item.ordinal < fromTurnId) break; + ids.push(item.turnId); + cutIndex = i; + } + } else { + let remaining = event.turns; + for (let i = items.length - 1; i >= 0 && remaining > 0; i--) { + const item = items[i]; + if (item === undefined || item.kind !== 'turn') continue; + ids.push(item.turnId); + cutIndex = i; + remaining -= 1; + } + } + if (ids.length === 0) return []; + for (let i = cutIndex + 1; i < items.length; i++) { + const item = items[i]; + if (item?.kind === 'marker' && item.marker === 'undo') ids.push(item.markerId); + } + return [{ op: 'items.remove', ids }]; + } + private markerOp(marker: string, payload: unknown): TranscriptOperation { this.markerSeq += 1; const item: TranscriptMarker = { @@ -1305,6 +1372,7 @@ export class AgentTranscriptProjector { steeredAt: event.steeredAt, })); ops.push({ op: 'prompt.upsert', prompt: active }); + this.unpairedSteerPromptIds.push([...event.promptIds]); for (const promptId of event.promptIds) { const steered = this.upsertPrompt(promptId, (prev) => ({ promptId, @@ -1320,6 +1388,62 @@ export class AgentTranscriptProjector { return ops; } + private onTurnSteered(event: TurnSteerEvent): TranscriptOperation[] { + const origin = event.origin; + if (origin?.kind !== 'user') return []; + const turn = this.currentTurn; + if (turn !== undefined && turn.state !== 'running') return []; + const skip = origin.skillActivations?.length ?? 0; + const input = skip > 0 ? event.input.slice(skip) : event.input; + const step = this.currentStep; + if (step !== undefined && step.state === 'running') { + const ops: TranscriptOperation[] = []; + this.steerUserFrame(ops, step.turnId, step.stepId, input, this.unpairedSteerPromptIds.shift()); + return ops; + } + this.pendingSteers.push({ input, promptIds: this.unpairedSteerPromptIds.shift() }); + return []; + } + + private steerUserFrame( + ops: TranscriptOperation[], + turnId: string, + stepId: string, + input: readonly ContentPart[], + promptIds: readonly string[] | undefined, + ): void { + const texts: string[] = []; + const attachmentIds: string[] = []; + for (const part of input) { + if (part.type === 'text') { + texts.push(part.text); + continue; + } + const ref = daemonFileRefFromPart(part); + if (ref === undefined) continue; + const attachment: TranscriptAttachment = { + attachmentId: `${stepId}.att${++this.attachmentOrdinal}`, + mediaType: `${ref.kind}/*`, + source: { kind: 'session_media', fileId: ref.ref.fileId }, + }; + ops.push({ op: 'attachment.upsert', attachment }); + attachmentIds.push(attachment.attachmentId); + } + ops.push({ + op: 'frame.upsert', + turnId, + stepId, + frame: { + kind: 'text', + frameId: `${stepId}.f${++this.frameOrdinal}`, + role: 'user', + text: texts.join(''), + attachmentIds: attachmentIds.length > 0 ? attachmentIds : undefined, + promptIds, + }, + }); + } + private upsertPrompt( promptId: string, build: (prev: TranscriptPrompt | undefined) => TranscriptPrompt, @@ -1337,12 +1461,21 @@ export class AgentTranscriptProjector { interactionKind: interaction.kind, toolCallId, state: 'pending', - request: interaction.payload, + request: this.wireInteractionRequest(interaction), }; this.interactions.set(interaction.id, entity); return [{ op: 'interaction.upsert', interaction: entity }]; } + private wireInteractionRequest(interaction: ProjectorInteraction): unknown { + if (interaction.kind !== 'question') return interaction.payload; + try { + return toWireQuestion(interaction, this.sessionId); + } catch { + return interaction.payload; + } + } + mapInteractionResolved(id: string, response: unknown): TranscriptOperation[] { const record = this.interactions.get(id); if (record === undefined) return []; diff --git a/packages/agent-gateway/src/services/transcript/transcriptService.ts b/packages/agent-gateway/src/services/transcript/transcriptService.ts index dc823ba17..a5391eeee 100644 --- a/packages/agent-gateway/src/services/transcript/transcriptService.ts +++ b/packages/agent-gateway/src/services/transcript/transcriptService.ts @@ -48,7 +48,8 @@ import { type TranscriptBinding, type TranscriptBindingLogger, } from './coreBinding'; -import { readWireRecords } from './wireRecords'; +import { readWireRecords, type ContextRecord } from './wireRecords'; +import { toWireQuestion } from '../../protocol/question-wire'; const SESSIONS_ROOT = 'sessions'; const AGENTS_DIR = 'agents'; @@ -464,12 +465,15 @@ export class TranscriptService { } throw error; } - const messages = [...reduceContextTranscript(records).entries]; + const contextTranscript = reduceContextTranscript(records); + const messages = [...contextTranscript.entries]; const taskOriginTurnTaskIds = new Set(); + const steeredRecordIndexes = new Set(); + const pendingSteers: ContextRecord[] = []; const anchorStack: { taskIdsSnapshot: Set }[] = []; let anchorFloor = 0; let sawTurnPrompt = false; - for (const record of records) { + for (const [recordIndex, record] of records.entries()) { if (record.type === 'context.undo') { const count = typeof record['count'] === 'number' ? record['count'] : 0; for (let i = 0; i < count && anchorStack.length > anchorFloor; i++) { @@ -488,6 +492,17 @@ export class TranscriptService { if (message !== undefined && isUndoAnchor(message)) { anchorStack.push({ taskIdsSnapshot: new Set(taskOriginTurnTaskIds) }); } + const steerIndex = pendingSteers.findIndex((steer) => + message !== undefined && steerMatchesMessage(steer, message), + ); + if (steerIndex !== -1) { + pendingSteers.splice(steerIndex, 1); + steeredRecordIndexes.add(recordIndex); + } + continue; + } + if (record.type === 'turn.steer') { + if (isUserSteer(record)) pendingSteers.push(record); continue; } if (record.type !== 'turn.prompt') continue; @@ -501,11 +516,19 @@ export class TranscriptService { taskOriginTurnTaskIds.add(origin.taskId); } } + const steeredMessageIndexes = new Set(); + contextTranscript.recordIndexes.forEach((recordIndex, messageIndex) => { + if (recordIndex !== undefined && steeredRecordIndexes.has(recordIndex)) { + steeredMessageIndexes.add(messageIndex); + } + }); const base = groupMessagesIntoSnapshot( messages, - sawTurnPrompt ? { taskOriginTurnTaskIds } : undefined, + sawTurnPrompt || steeredMessageIndexes.size > 0 + ? { taskOriginTurnTaskIds, steeredMessageIndexes } + : undefined, ); - const folded = foldWireRecordFacts(records, base); + const folded = foldWireRecordFacts(projectQuestionInteractionRecords(records, sessionId), base); const status = getLiveSessionById(this.deps.core.accessor, sessionId) ?.accessor.get(IAgentLifecycleService) .handleOf(agentId) @@ -556,6 +579,22 @@ export class TranscriptService { } } +function steerMatchesMessage(steer: ContextRecord, message: ContextMessage): boolean { + if (message.role !== 'user') return false; + const input = steer['input']; + return Array.isArray(input) && JSON.stringify(input) === JSON.stringify(message.content); +} + +function isUserSteer(record: ContextRecord): boolean { + const origin = record['origin']; + return ( + origin !== null && + typeof origin === 'object' && + !Array.isArray(origin) && + (origin as { kind?: unknown }).kind === 'user' + ); +} + export function snapshotToOps( snapshot: AgentTranscriptSnapshot, turnOps: (turn: TranscriptTurn) => TranscriptOperation[] = snapshotTurnOps, @@ -614,6 +653,38 @@ const TERMINAL_TURN_STATES: ReadonlySet = new Set([ 'cancelled', ]); +function projectQuestionInteractionRecords( + records: readonly ContextRecord[], + sessionId: string, +): ContextRecord[] { + return records.map((record) => { + if (record.type !== 'interaction.request' || record['kind'] !== 'question') return record; + const id = record['id']; + const request = record['request']; + const time = record['time']; + if (typeof id !== 'string' || typeof time !== 'number' || !Number.isFinite(time)) { + return record; + } + if (request === null || typeof request !== 'object') return record; + try { + const innerToolCallId = (request as { toolCallId?: unknown }).toolCallId; + const toolCallId = + typeof record['toolCallId'] === 'string' + ? record['toolCallId'] + : typeof innerToolCallId === 'string' + ? innerToolCallId + : undefined; + return { + ...record, + toolCallId, + request: toWireQuestion({ id, createdAt: time, payload: request }, sessionId), + }; + } catch { + return record; + } + }); +} + function supersededColdAttachmentIds( snapshot: AgentTranscriptSnapshot, transcript: AgentTranscript, diff --git a/packages/agent-gateway/src/transport/ws/v1/sessionEventBroadcaster.ts b/packages/agent-gateway/src/transport/ws/v1/sessionEventBroadcaster.ts index dcc68a275..d977dfc37 100644 --- a/packages/agent-gateway/src/transport/ws/v1/sessionEventBroadcaster.ts +++ b/packages/agent-gateway/src/transport/ws/v1/sessionEventBroadcaster.ts @@ -49,7 +49,7 @@ import { } from '@pymodel/transcript'; import { toWireApproval } from '../../../routes/approvals'; -import { toWireQuestion } from '../../../routes/questions'; +import { toWireQuestion } from '../../../protocol/question-wire'; import { toWireWorkspace } from '../../../routes/workspaces'; import { projectPromptContentParts } from '../../../services/messages/messageProjection'; import { readLegacyStatus, toLegacyPhase } from '../../../services/legacyStatus/legacyStatus'; @@ -1150,6 +1150,7 @@ const TRANSCRIPT_PROJECTED_EVENT_TYPES: ReadonlySet = new Set([ 'prompt.completed', 'prompt.aborted', 'prompt.steered', + 'turn.steer', 'event.question.requested', 'event.question.dismissed', 'event.question.answered', diff --git a/packages/agent-gateway/test/services/transcript.test.ts b/packages/agent-gateway/test/services/transcript.test.ts index 890823e6f..2caa1c3b5 100644 --- a/packages/agent-gateway/test/services/transcript.test.ts +++ b/packages/agent-gateway/test/services/transcript.test.ts @@ -67,6 +67,8 @@ function ev(payload: Record): ProjectorBusEvent { return payload as unknown as ProjectorBusEvent; } +const TEST_SESSION_ID = 'session-test'; + function turnOps(turnId: string, items: ReturnType): TranscriptTurn { const turn = items.find( (item): item is TranscriptTurn => item.kind === 'turn' && item.turnId === turnId, @@ -95,7 +97,7 @@ function coldTranscriptService(home: string): TranscriptService { describe('AgentTranscriptProjector', () => { it('projects a full turn: headers, delta appends, flush, tool frames', () => { - const projector = new AgentTranscriptProjector('main'); + const projector = new AgentTranscriptProjector('main', TEST_SESSION_ID); const tx = new AgentTranscript('main'); const ops: TranscriptOperation[] = []; const feed = (event: ProjectorBusEvent): void => { @@ -155,7 +157,7 @@ describe('AgentTranscriptProjector', () => { }); it('projects the live prompt from turn.started and keeps it through turn.ended', () => { - const projector = new AgentTranscriptProjector('main'); + const projector = new AgentTranscriptProjector('main', TEST_SESSION_ID); const tx = new AgentTranscript('main'); const feed = (event: ProjectorBusEvent): void => { tx.apply(projector.map(event)); @@ -171,7 +173,7 @@ describe('AgentTranscriptProjector', () => { }); it('projects turn.started promptAttachments into attachment entities and turn.attachmentIds', () => { - const projector = new AgentTranscriptProjector('main'); + const projector = new AgentTranscriptProjector('main', TEST_SESSION_ID); const tx = new AgentTranscript('main'); const ops: TranscriptOperation[] = []; const feed = (event: ProjectorBusEvent): void => { @@ -214,7 +216,7 @@ describe('AgentTranscriptProjector', () => { it('places late-attach deltas into the engine-reported active step', () => { const tx = new AgentTranscript('main'); - const projector = new AgentTranscriptProjector('main', { + const projector = new AgentTranscriptProjector('main', TEST_SESSION_ID, { stepOrdinal: (turnId) => (turnId === 't0' ? 2 : undefined), }); @@ -245,7 +247,7 @@ describe('AgentTranscriptProjector', () => { frame: { kind: 'text', frameId: 't0.1.f1', role: 'assistant', text: 'Hello ' }, }, ]); - const projector = new AgentTranscriptProjector('main', { + const projector = new AgentTranscriptProjector('main', TEST_SESSION_ID, { stepFrames: (turnId, stepId) => tx.getTurn(turnId)?.steps.find((s) => s.stepId === stepId)?.frames, }); @@ -290,7 +292,7 @@ describe('AgentTranscriptProjector', () => { }, }, ]); - const projector = new AgentTranscriptProjector('main', { + const projector = new AgentTranscriptProjector('main', TEST_SESSION_ID, { toolFrame: (toolCallId) => { for (const item of tx.getItems()) { if (item.kind !== 'turn') continue; @@ -340,7 +342,7 @@ describe('AgentTranscriptProjector', () => { }, }, ]); - const projector = new AgentTranscriptProjector('main', { + const projector = new AgentTranscriptProjector('main', TEST_SESSION_ID, { toolFrame: (toolCallId) => { for (const item of tx.getItems()) { if (item.kind !== 'turn') continue; @@ -372,7 +374,7 @@ describe('AgentTranscriptProjector', () => { }); it('gives live markers their own namespace so they never collide with backfilled markers', () => { - const projector = new AgentTranscriptProjector('main'); + const projector = new AgentTranscriptProjector('main', TEST_SESSION_ID); const tx = new AgentTranscript('main'); tx.apply([{ op: 'marker.upsert', item: { kind: 'marker', markerId: 'm1', marker: 'skill' } }]); @@ -481,7 +483,7 @@ describe('AgentTranscriptProjector', () => { }); it('flushes open frames on turn.ended even without step completion', () => { - const projector = new AgentTranscriptProjector('main'); + const projector = new AgentTranscriptProjector('main', TEST_SESSION_ID); const tx = new AgentTranscript('main'); const feed = (event: ProjectorBusEvent): void => void tx.apply(projector.map(event)); @@ -504,7 +506,7 @@ describe('AgentTranscriptProjector', () => { }); it('marks a user-cancelled turn with an interruption marker, but not programmatic aborts', () => { - const projector = new AgentTranscriptProjector('main'); + const projector = new AgentTranscriptProjector('main', TEST_SESSION_ID); const tx = new AgentTranscript('main'); const feed = (event: ProjectorBusEvent): void => void tx.apply(projector.map(event)); @@ -528,7 +530,7 @@ describe('AgentTranscriptProjector', () => { }); it('carries usage / finishReason / the full timing breakdown on turn.step.completed', () => { - const projector = new AgentTranscriptProjector('main'); + const projector = new AgentTranscriptProjector('main', TEST_SESSION_ID); const tx = new AgentTranscript('main'); const feed = (event: ProjectorBusEvent): void => void tx.apply(projector.map(event)); @@ -588,7 +590,7 @@ describe('AgentTranscriptProjector', () => { }); it('carries endReason / endMessage on turn.step.interrupted', () => { - const projector = new AgentTranscriptProjector('main'); + const projector = new AgentTranscriptProjector('main', TEST_SESSION_ID); const tx = new AgentTranscript('main'); const feed = (event: ProjectorBusEvent): void => void tx.apply(projector.map(event)); @@ -611,7 +613,7 @@ describe('AgentTranscriptProjector', () => { }); it('sets retry on turn.step.retrying and clears it at the terminal upsert', () => { - const projector = new AgentTranscriptProjector('main'); + const projector = new AgentTranscriptProjector('main', TEST_SESSION_ID); const tx = new AgentTranscript('main'); const feed = (event: ProjectorBusEvent): void => void tx.apply(projector.map(event)); const step = (): TranscriptTurn['steps'][number] => turnOps('t1', tx.getItems()).steps[0]!; @@ -650,7 +652,7 @@ describe('AgentTranscriptProjector', () => { }); it('fills durationMs / error / accumulated step usage on turn.ended', () => { - const projector = new AgentTranscriptProjector('main'); + const projector = new AgentTranscriptProjector('main', TEST_SESSION_ID); const tx = new AgentTranscript('main'); const feed = (event: ProjectorBusEvent): void => void tx.apply(projector.map(event)); @@ -696,7 +698,7 @@ describe('AgentTranscriptProjector', () => { }); it('takes the turn header endedAt from the turn.ended event time', () => { - const projector = new AgentTranscriptProjector('main'); + const projector = new AgentTranscriptProjector('main', TEST_SESSION_ID); const tx = new AgentTranscript('main'); const feed = (event: ProjectorBusEvent): void => void tx.apply(projector.map(event)); @@ -710,7 +712,7 @@ describe('AgentTranscriptProjector', () => { }); it('accumulates tool.call.delta into inputText, kept across tool.call.started', () => { - const projector = new AgentTranscriptProjector('main'); + const projector = new AgentTranscriptProjector('main', TEST_SESSION_ID); const tx = new AgentTranscript('main'); const feed = (event: ProjectorBusEvent): void => void tx.apply(projector.map(event)); const toolFrame = (toolCallId: string): TranscriptFrame | undefined => @@ -760,7 +762,7 @@ describe('AgentTranscriptProjector', () => { }); it('overwrites tool frame progress and drops progress for unknown calls', () => { - const projector = new AgentTranscriptProjector('main'); + const projector = new AgentTranscriptProjector('main', TEST_SESSION_ID); const tx = new AgentTranscript('main'); const feed = (event: ProjectorBusEvent): void => void tx.apply(projector.map(event)); @@ -805,7 +807,7 @@ describe('AgentTranscriptProjector', () => { }); it('marks tool.result errors and keeps the display payload', () => { - const projector = new AgentTranscriptProjector('main'); + const projector = new AgentTranscriptProjector('main', TEST_SESSION_ID); const tx = new AgentTranscript('main'); const feed = (event: ProjectorBusEvent): void => void tx.apply(projector.map(event)); @@ -833,7 +835,7 @@ describe('AgentTranscriptProjector', () => { }); it('projects process tasks as shell tasks with streaming output', () => { - const projector = new AgentTranscriptProjector('main'); + const projector = new AgentTranscriptProjector('main', TEST_SESSION_ID); const tx = new AgentTranscript('main'); const ops: TranscriptOperation[] = []; const feed = (event: ProjectorBusEvent): void => { @@ -885,7 +887,7 @@ describe('AgentTranscriptProjector', () => { }); it('fills the shell task output from late stderr chunks before completing', () => { - const projector = new AgentTranscriptProjector('main'); + const projector = new AgentTranscriptProjector('main', TEST_SESSION_ID); const tx = new AgentTranscript('main'); tx.apply(projector.map(ev({ type: 'shell.started', commandId: 'c1', taskId: 'task-1' }))); @@ -898,7 +900,7 @@ describe('AgentTranscriptProjector', () => { }); it('routes shell output/completion via the event taskId when shell.started was missed', () => { - const projector = new AgentTranscriptProjector('main'); + const projector = new AgentTranscriptProjector('main', TEST_SESSION_ID); const tx = new AgentTranscript('main'); tx.apply( @@ -914,7 +916,7 @@ describe('AgentTranscriptProjector', () => { }); it('emits a taskref when only shell.completed arrives for a command', () => { - const projector = new AgentTranscriptProjector('main'); + const projector = new AgentTranscriptProjector('main', TEST_SESSION_ID); const tx = new AgentTranscript('main'); tx.apply(projector.map(ev({ type: 'shell.completed', commandId: 'c1', taskId: 'task-1', isError: true }))); @@ -924,7 +926,7 @@ describe('AgentTranscriptProjector', () => { }); it('projects no-taskId shell failures under a synthetic per-command task id', () => { - const projector = new AgentTranscriptProjector('main'); + const projector = new AgentTranscriptProjector('main', TEST_SESSION_ID); const tx = new AgentTranscript('main'); tx.apply( @@ -938,7 +940,7 @@ describe('AgentTranscriptProjector', () => { }); it('marks a foreground shell task terminal on shell.completed', () => { - const projector = new AgentTranscriptProjector('main'); + const projector = new AgentTranscriptProjector('main', TEST_SESSION_ID); const tx = new AgentTranscript('main'); tx.apply(projector.map(ev({ type: 'shell.started', commandId: 'c1', taskId: 'task-1' }))); @@ -954,12 +956,12 @@ describe('AgentTranscriptProjector', () => { }); it('ignores task.notified (it re-surfaces as an origin:task turn)', () => { - const projector = new AgentTranscriptProjector('main'); + const projector = new AgentTranscriptProjector('main', TEST_SESSION_ID); expect(projector.map(ev({ type: 'task.notified', taskId: 't' }))).toEqual([]); }); it('links spawned subagents to the spawning tool frame (member for dynamic_workflow)', () => { - const projector = new AgentTranscriptProjector('main'); + const projector = new AgentTranscriptProjector('main', TEST_SESSION_ID); const tx = new AgentTranscript('main'); const feed = (event: ProjectorBusEvent): void => void tx.apply(projector.map(event)); @@ -1006,7 +1008,7 @@ describe('AgentTranscriptProjector', () => { }); it('keys an Agent-tool subagent row by its registered task id and folds the lifecycle', () => { - const projector = new AgentTranscriptProjector('main'); + const projector = new AgentTranscriptProjector('main', TEST_SESSION_ID); const tx = new AgentTranscript('main'); const feed = (event: ProjectorBusEvent): void => void tx.apply(projector.map(event)); @@ -1065,7 +1067,7 @@ describe('AgentTranscriptProjector', () => { }); it('drops the stale task mapping when a child respawns without a task id', () => { - const projector = new AgentTranscriptProjector('main'); + const projector = new AgentTranscriptProjector('main', TEST_SESSION_ID); const tx = new AgentTranscript('main'); const feed = (event: ProjectorBusEvent): void => void tx.apply(projector.map(event)); @@ -1098,7 +1100,7 @@ describe('AgentTranscriptProjector', () => { }); it('recovers the agent → task association from a backfilled task.started', () => { - const projector = new AgentTranscriptProjector('main'); + const projector = new AgentTranscriptProjector('main', TEST_SESSION_ID); const tx = new AgentTranscript('main'); const feed = (event: ProjectorBusEvent): void => void tx.apply(projector.map(event)); @@ -1124,7 +1126,7 @@ describe('AgentTranscriptProjector', () => { }); it('projects goal updates into meta.goal plus an inline marker', () => { - const projector = new AgentTranscriptProjector('main'); + const projector = new AgentTranscriptProjector('main', TEST_SESSION_ID); const tx = new AgentTranscript('main'); const snapshot = { goalId: 'g1', @@ -1156,7 +1158,7 @@ describe('AgentTranscriptProjector', () => { }); it('mirrors plan / dynamic_workflow mode slices into meta.modes (only when provided)', () => { - const projector = new AgentTranscriptProjector('main'); + const projector = new AgentTranscriptProjector('main', TEST_SESSION_ID); const tx = new AgentTranscript('main'); tx.apply(projector.map(ev({ type: 'agent.status.updated', planMode: true }))); @@ -1170,7 +1172,7 @@ describe('AgentTranscriptProjector', () => { }); it('mirrors tower mode into meta.modes', () => { - const projector = new AgentTranscriptProjector('main'); + const projector = new AgentTranscriptProjector('main', TEST_SESSION_ID); const tx = new AgentTranscript('main'); tx.apply(projector.map(ev({ type: 'agent.status.updated', towerMode: true }))); @@ -1180,7 +1182,7 @@ describe('AgentTranscriptProjector', () => { }); it('mirrors status slices into meta.agent (shallow-merged across slices)', () => { - const projector = new AgentTranscriptProjector('main'); + const projector = new AgentTranscriptProjector('main', TEST_SESSION_ID); const tx = new AgentTranscript('main'); const feed = (event: ProjectorBusEvent): void => void tx.apply(projector.map(event)); @@ -1221,7 +1223,7 @@ describe('AgentTranscriptProjector', () => { }); it('maps agent.activity.updated into meta.agent.phase', () => { - const projector = new AgentTranscriptProjector('main'); + const projector = new AgentTranscriptProjector('main', TEST_SESSION_ID); const tx = new AgentTranscript('main'); const feed = (event: ProjectorBusEvent): void => void tx.apply(projector.map(event)); const turn = (overrides: Record): Record => ({ @@ -1295,7 +1297,7 @@ describe('AgentTranscriptProjector', () => { }); it('projects plan.revision as a marker and refines the active plan badge', () => { - const projector = new AgentTranscriptProjector('main'); + const projector = new AgentTranscriptProjector('main', TEST_SESSION_ID); const tx = new AgentTranscript('main'); const revision = { @@ -1344,7 +1346,7 @@ describe('AgentTranscriptProjector', () => { }); it('projects skill / plugin-command / cron / compaction / hook / undo markers', () => { - const projector = new AgentTranscriptProjector('main'); + const projector = new AgentTranscriptProjector('main', TEST_SESSION_ID); const tx = new AgentTranscript('main'); const feed = (event: ProjectorBusEvent): void => void tx.apply(projector.map(event)); @@ -1399,8 +1401,109 @@ describe('AgentTranscriptProjector', () => { expect(markers[7]!.payload).toMatchObject({ start: 1, deleteCount: 2 }); }); + it('removes trailing turns and the undo marker on context.undone', () => { + const tx = new AgentTranscript('main'); + const projector = new AgentTranscriptProjector('main', TEST_SESSION_ID, { + items: () => tx.getItems(), + }); + const feed = (event: ProjectorBusEvent): void => { + tx.apply(projector.map(event)); + }; + + feed(ev({ type: 'turn.started', turnId: 1, origin: { kind: 'user' }, prompt: 'first' })); + feed(ev({ type: 'turn.ended', turnId: 1, reason: 'completed' })); + feed(ev({ type: 'turn.started', turnId: 2, origin: { kind: 'user' }, prompt: 'second' })); + feed(ev({ type: 'turn.ended', turnId: 2, reason: 'completed' })); + feed(ev({ type: 'context.spliced', start: 1, deleteCount: 2, messages: [] })); + + const removeOps = projector.map(ev({ type: 'context.undone', agentId: 'main', turns: 1 })); + expect(removeOps).toEqual([{ op: 'items.remove', ids: ['t2', 'live-m1'] }]); + tx.apply(removeOps); + + expect(tx.getItems().map((item) => item.kind)).toEqual(['turn']); + expect(turnOps('t1', tx.getItems()).prompt).toBe('first'); + }); + + it('removes multiple trailing turns and keeps taskrefs appended during them', () => { + const tx = new AgentTranscript('main'); + const projector = new AgentTranscriptProjector('main', TEST_SESSION_ID, { + items: () => tx.getItems(), + }); + const feed = (event: ProjectorBusEvent): void => { + tx.apply(projector.map(event)); + }; + + feed(ev({ type: 'turn.started', turnId: 1, origin: { kind: 'user' } })); + feed(ev({ type: 'turn.ended', turnId: 1, reason: 'completed' })); + feed(ev({ type: 'turn.started', turnId: 2, origin: { kind: 'user' } })); + feed( + ev({ + type: 'task.started', + info: { + taskId: 'task1', + kind: 'process', + description: 'ls', + status: 'running', + startedAt: 1, + endedAt: null, + }, + }), + ); + feed(ev({ type: 'turn.ended', turnId: 2, reason: 'completed' })); + feed(ev({ type: 'turn.started', turnId: 3, origin: { kind: 'user' } })); + feed(ev({ type: 'turn.ended', turnId: 3, reason: 'completed' })); + + const removeOps = projector.map(ev({ type: 'context.undone', agentId: 'main', turns: 2 })); + expect(removeOps).toEqual([{ op: 'items.remove', ids: ['t3', 't2'] }]); + tx.apply(removeOps); + + expect(tx.getItems().map((item) => item.kind)).toEqual(['turn', 'taskref']); + expect(tx.getTask('task1')?.state).toBe('running'); + }); + + it('removes every turn from fromTurnId onward, including trailing non-anchor turns', () => { + const tx = new AgentTranscript('main'); + const projector = new AgentTranscriptProjector('main', TEST_SESSION_ID, { + items: () => tx.getItems(), + }); + const feed = (event: ProjectorBusEvent): void => { + tx.apply(projector.map(event)); + }; + + feed(ev({ type: 'turn.started', turnId: 0, origin: { kind: 'user' }, prompt: 'kept' })); + feed(ev({ type: 'turn.ended', turnId: 0, reason: 'completed' })); + feed(ev({ type: 'turn.started', turnId: 1, origin: { kind: 'user' }, prompt: 'undone' })); + feed(ev({ type: 'turn.ended', turnId: 1, reason: 'completed' })); + feed( + ev({ + type: 'turn.started', + turnId: 2, + origin: { kind: 'cron_job', jobId: 'j1' }, + }), + ); + feed(ev({ type: 'turn.ended', turnId: 2, reason: 'completed' })); + feed(ev({ type: 'context.spliced', start: 1, deleteCount: 3, messages: [] })); + + const removeOps = projector.map( + ev({ type: 'context.undone', agentId: 'main', turns: 1, fromTurnId: 1 }), + ); + expect(removeOps).toEqual([{ op: 'items.remove', ids: ['t2', 't1', 'live-m1'] }]); + tx.apply(removeOps); + + expect(tx.getItems().map((item) => item.kind)).toEqual(['turn']); + expect(turnOps('t0', tx.getItems()).prompt).toBe('kept'); + }); + + it('ignores context.undone when no removable turns exist', () => { + const bare = new AgentTranscriptProjector('main', TEST_SESSION_ID); + expect(bare.map(ev({ type: 'context.undone', agentId: 'main', turns: 1 }))).toEqual([]); + + const projector = new AgentTranscriptProjector('main', TEST_SESSION_ID, { items: () => [] }); + expect(projector.map(ev({ type: 'context.undone', agentId: 'main', turns: 1 }))).toEqual([]); + }); + it('projects error / warning events as notice markers outside any step', () => { - const projector = new AgentTranscriptProjector('main'); + const projector = new AgentTranscriptProjector('main', TEST_SESSION_ID); const tx = new AgentTranscript('main'); tx.apply( @@ -1423,7 +1526,7 @@ describe('AgentTranscriptProjector', () => { }); it('emits interactions as global entities only (no inline frame), back-links on resolve', () => { - const projector = new AgentTranscriptProjector('main'); + const projector = new AgentTranscriptProjector('main', TEST_SESSION_ID); const tx = new AgentTranscript('main'); const feed = (event: ProjectorBusEvent): void => void tx.apply(projector.map(event)); @@ -1451,6 +1554,7 @@ describe('AgentTranscriptProjector', () => { kind: 'approval', payload: request, origin: { agentId: 'main', turnId: 2 }, + createdAt: 1000, }), ); @@ -1477,7 +1581,7 @@ describe('AgentTranscriptProjector', () => { }); it('surfaces a mid-turn task notification as a user input frame linked to the task', () => { - const projector = new AgentTranscriptProjector('main'); + const projector = new AgentTranscriptProjector('main', TEST_SESSION_ID); const tx = new AgentTranscript('main'); const feed = (event: ProjectorBusEvent): void => void tx.apply(projector.map(event)); @@ -1506,7 +1610,7 @@ describe('AgentTranscriptProjector', () => { }); it('attaches a between-steps task notification to the following step', () => { - const projector = new AgentTranscriptProjector('main'); + const projector = new AgentTranscriptProjector('main', TEST_SESSION_ID); const tx = new AgentTranscript('main'); const feed = (event: ProjectorBusEvent): void => void tx.apply(projector.map(event)); const notified = (sourceId: string): ProjectorBusEvent => @@ -1537,7 +1641,7 @@ describe('AgentTranscriptProjector', () => { }); it('drops a task notification that is the turn prompt itself', () => { - const projector = new AgentTranscriptProjector('main'); + const projector = new AgentTranscriptProjector('main', TEST_SESSION_ID); const tx = new AgentTranscript('main'); const feed = (event: ProjectorBusEvent): void => void tx.apply(projector.map(event)); @@ -1558,7 +1662,7 @@ describe('AgentTranscriptProjector', () => { }); it('keeps a different task notification in a task-origin turn', () => { - const projector = new AgentTranscriptProjector('main'); + const projector = new AgentTranscriptProjector('main', TEST_SESSION_ID); const tx = new AgentTranscript('main'); const feed = (event: ProjectorBusEvent): void => void tx.apply(projector.map(event)); @@ -1580,7 +1684,7 @@ describe('AgentTranscriptProjector', () => { }); it('drops a buffered task notification when the turn ends before the next step', () => { - const projector = new AgentTranscriptProjector('main'); + const projector = new AgentTranscriptProjector('main', TEST_SESSION_ID); const tx = new AgentTranscript('main'); const feed = (event: ProjectorBusEvent): void => void tx.apply(projector.map(event)); @@ -1605,7 +1709,7 @@ describe('AgentTranscriptProjector', () => { }); it('replaces the global todo document on a confirmed TodoList write', () => { - const projector = new AgentTranscriptProjector('main'); + const projector = new AgentTranscriptProjector('main', TEST_SESSION_ID); const tx = new AgentTranscript('main'); const feed = (event: ProjectorBusEvent): void => void tx.apply(projector.map(event)); @@ -1650,7 +1754,7 @@ describe('AgentTranscriptProjector', () => { }); it('emits an unanchored entity when the payload has no toolCallId', () => { - const projector = new AgentTranscriptProjector('main'); + const projector = new AgentTranscriptProjector('main', TEST_SESSION_ID); const tx = new AgentTranscript('main'); tx.apply( @@ -1659,6 +1763,7 @@ describe('AgentTranscriptProjector', () => { kind: 'question', payload: { questions: [{ question: 'Pick', options: [] }] }, origin: { agentId: 'main', turnId: 3 }, + createdAt: 1000, }), ); expect(tx.getItems()).toHaveLength(0); @@ -1672,8 +1777,61 @@ describe('AgentTranscriptProjector', () => { expect(tx.listPendingInteractions()).toEqual([]); }); + it('projects question requests with stable question and option ids', () => { + const projector = new AgentTranscriptProjector('main', TEST_SESSION_ID); + const tx = new AgentTranscript('main'); + + tx.apply( + projector.mapInteractionRequested({ + id: 'q-wire', + kind: 'question', + payload: { + toolCallId: 'call_q', + turnId: 3, + questions: [ + { + question: 'Pick one', + header: 'h', + body: 'b', + multiSelect: false, + otherLabel: 'Other', + otherDescription: 'free text', + options: [{ label: 'A', description: 'first' }, { label: 'B' }], + }, + ], + }, + origin: { agentId: 'main', turnId: 3 }, + createdAt: 7000, + }), + ); + + expect(tx.getInteraction('q-wire')?.request).toEqual({ + question_id: 'q-wire', + session_id: TEST_SESSION_ID, + questions: [ + { + id: 'q_0', + question: 'Pick one', + header: 'h', + body: 'b', + multi_select: false, + allow_other: true, + other_label: 'Other', + other_description: 'free text', + options: [ + { id: 'opt_0_0', label: 'A', description: 'first' }, + { id: 'opt_0_1', label: 'B' }, + ], + }, + ], + created_at: new Date(7000).toISOString(), + turn_id: 3, + tool_call_id: 'call_q', + }); + }); + it('projects prompt submitted/completed/aborted/steered as global queue entities', () => { - const projector = new AgentTranscriptProjector('main'); + const projector = new AgentTranscriptProjector('main', TEST_SESSION_ID); const tx = new AgentTranscript('main'); const feed = (event: ProjectorBusEvent): void => void tx.apply(projector.map(event)); @@ -1776,7 +1934,7 @@ describe('AgentTranscriptProjector', () => { }); it('preserves terminal prompt status when prompt.started is replayed', () => { - const projector = new AgentTranscriptProjector('main'); + const projector = new AgentTranscriptProjector('main', TEST_SESSION_ID); const tx = new AgentTranscript('main'); const feed = (event: ProjectorBusEvent): void => void tx.apply(projector.map(event)); @@ -1806,7 +1964,7 @@ describe('AgentTranscriptProjector', () => { }); it('projects prompt.steered media content to the wire shape (no daemon ref or path leak)', () => { - const projector = new AgentTranscriptProjector('main'); + const projector = new AgentTranscriptProjector('main', TEST_SESSION_ID); const tx = new AgentTranscript('main'); const feed = (event: ProjectorBusEvent): void => void tx.apply(projector.map(event)); @@ -1833,6 +1991,198 @@ describe('AgentTranscriptProjector', () => { ]); }); + it('projects turn.steer as a user frame at the next step start, pairing promptIds from prompt.steered', () => { + const projector = new AgentTranscriptProjector('main', TEST_SESSION_ID); + const tx = new AgentTranscript('main'); + const feed = (event: ProjectorBusEvent): void => void tx.apply(projector.map(event)); + + feed(ev({ type: 'turn.started', turnId: 3, origin: { kind: 'user' }, prompt: 'active' })); + feed(ev({ type: 'turn.step.started', turnId: 3, step: 1 })); + feed(ev({ type: 'turn.step.completed', turnId: 3, step: 1 })); + feed( + ev({ + type: 'prompt.steered', + activePromptId: 'p1', + promptIds: ['p2'], + content: [{ type: 'text', text: 'steered in' }], + steeredAt: '2026-01-01T00:00:02.000Z', + }), + ); + feed( + ev({ + type: 'turn.steer', + input: [{ type: 'text', text: 'steered in' }], + origin: { kind: 'user' }, + }), + ); + expect(turnOps('t3', tx.getItems()).steps).toHaveLength(1); + + feed(ev({ type: 'turn.step.started', turnId: 3, step: 2 })); + const turn = turnOps('t3', tx.getItems()); + expect(turn.steps).toHaveLength(2); + expect(turn.steps[1]?.frames[0]).toMatchObject({ + kind: 'text', + role: 'user', + text: 'steered in', + promptIds: ['p2'], + }); + }); + + it('projects turn.steer into the running step immediately, with daemon media as attachments', () => { + const projector = new AgentTranscriptProjector('main', TEST_SESSION_ID); + const tx = new AgentTranscript('main'); + const ops: TranscriptOperation[] = []; + const feed = (event: ProjectorBusEvent): void => { + const mapped = projector.map(event); + ops.push(...mapped); + tx.apply(mapped); + }; + + feed(ev({ type: 'turn.started', turnId: 4, origin: { kind: 'user' }, prompt: 'active' })); + feed(ev({ type: 'turn.step.started', turnId: 4, step: 1 })); + feed( + ev({ + type: 'prompt.steered', + activePromptId: 'p1', + promptIds: ['p2', 'p3'], + content: [ + { type: 'text', text: 'look at this' }, + { + type: 'image_url', + imageUrl: { url: 'pythinker-file://f_img9?path=%2Fabs%2Fsession%2Fmedia%2Ff_img9.png' }, + }, + ], + steeredAt: '2026-01-01T00:00:02.000Z', + }), + ); + feed( + ev({ + type: 'turn.steer', + input: [ + { type: 'text', text: 'look at this' }, + { + type: 'image_url', + imageUrl: { url: 'pythinker-file://f_img9?path=%2Fabs%2Fsession%2Fmedia%2Ff_img9.png' }, + }, + ], + origin: { kind: 'user' }, + }), + ); + + const attachmentOp = ops.find((op) => op.op === 'attachment.upsert'); + expect(attachmentOp).toMatchObject({ + attachment: { mediaType: 'image/*', source: { kind: 'session_media', fileId: 'f_img9' } }, + }); + const frame = turnOps('t4', tx.getItems()).steps[0]?.frames[0]; + expect(frame).toMatchObject({ + kind: 'text', + role: 'user', + text: 'look at this', + promptIds: ['p2', 'p3'], + }); + expect(frame?.kind === 'text' ? frame.attachmentIds : undefined).toEqual([ + attachmentOp?.op === 'attachment.upsert' ? attachmentOp.attachment.attachmentId : undefined, + ]); + }); + + it('ignores turn.steer for non-user origins and for turns that are not running', () => { + const projector = new AgentTranscriptProjector('main', TEST_SESSION_ID); + const tx = new AgentTranscript('main'); + const feed = (event: ProjectorBusEvent): void => void tx.apply(projector.map(event)); + + feed(ev({ type: 'turn.started', turnId: 5, origin: { kind: 'user' }, prompt: 'active' })); + feed(ev({ type: 'turn.step.started', turnId: 5, step: 1 })); + feed( + ev({ + type: 'turn.steer', + input: [{ type: 'text', text: 'backgrounded output' }], + origin: { kind: 'injection', variant: 'shell_command_backgrounded' }, + }), + ); + expect(turnOps('t5', tx.getItems()).steps[0]?.frames).toHaveLength(0); + + feed(ev({ type: 'turn.step.completed', turnId: 5, step: 1 })); + feed(ev({ type: 'turn.ended', turnId: 5, reason: 'completed' })); + feed( + ev({ + type: 'turn.steer', + input: [{ type: 'text', text: 'too late' }], + origin: { kind: 'user' }, + }), + ); + expect(turnOps('t5', tx.getItems()).steps.flatMap((step) => step.frames)).toHaveLength(0); + }); + + it('flushes a pending steer into the last step when the turn ends before the next step', () => { + const projector = new AgentTranscriptProjector('main', TEST_SESSION_ID); + const tx = new AgentTranscript('main'); + const feed = (event: ProjectorBusEvent): void => void tx.apply(projector.map(event)); + + feed(ev({ type: 'turn.started', turnId: 6, origin: { kind: 'user' }, prompt: 'active' })); + feed(ev({ type: 'turn.step.started', turnId: 6, step: 1 })); + feed(ev({ type: 'turn.step.completed', turnId: 6, step: 1 })); + feed( + ev({ + type: 'prompt.steered', + activePromptId: 'p1', + promptIds: ['p2'], + content: [{ type: 'text', text: 'last word' }], + steeredAt: '2026-01-01T00:00:02.000Z', + }), + ); + feed( + ev({ + type: 'turn.steer', + input: [{ type: 'text', text: 'last word' }], + origin: { kind: 'user' }, + }), + ); + feed(ev({ type: 'turn.ended', turnId: 6, reason: 'cancelled', interruptReason: 'user_cancelled' })); + + const turn = turnOps('t6', tx.getItems()); + expect(turn.steps.at(-1)?.frames.at(-1)).toMatchObject({ + kind: 'text', + role: 'user', + text: 'last word', + promptIds: ['p2'], + }); + }); + + it('buffers turn.steer seen before the projector ever saw turn.started', () => { + const projector = new AgentTranscriptProjector('main', TEST_SESSION_ID); + const ops: TranscriptOperation[] = []; + const feed = (event: ProjectorBusEvent): void => { + ops.push(...projector.map(event)); + }; + + feed( + ev({ + type: 'prompt.steered', + activePromptId: 'p1', + promptIds: ['p2'], + content: [{ type: 'text', text: 'steered mid-attach' }], + steeredAt: '2026-01-01T00:00:02.000Z', + }), + ); + feed( + ev({ + type: 'turn.steer', + input: [{ type: 'text', text: 'steered mid-attach' }], + origin: { kind: 'user' }, + }), + ); + expect(ops).toHaveLength(2); + expect(ops.every((op) => op.op === 'prompt.upsert')).toBe(true); + + feed(ev({ type: 'turn.step.started', turnId: 3, step: 2 })); + const frameOp = ops.find((op) => op.op === 'frame.upsert'); + expect(frameOp).toMatchObject({ + turnId: 't3', + stepId: 't3.2', + frame: { kind: 'text', role: 'user', text: 'steered mid-attach', promptIds: ['p2'] }, + }); + }); + it('readColdSnapshot answers empty for path-hostile agent ids without touching disk', async () => { const service = new TranscriptService({ homeDir: '/nonexistent-home', @@ -1857,6 +2207,119 @@ describe('AgentTranscriptProjector', () => { } }); + it('readColdSnapshot identifies a steered user message after an identical earlier prompt', async () => { + const home = await mkdtemp(join(tmpdir(), 'transcript-cold-steer-')); + try { + const wireDir = join(home, 'sessions', 'ws', 's1', 'agents', 'main'); + await mkdir(wireDir, { recursive: true }); + const records = [ + { type: 'context.append_message', message: { role: 'user', content: [{ type: 'text', text: 'steered in' }], toolCalls: [], origin: { kind: 'user' } }, time: 500 }, + { type: 'context.append_message', message: { role: 'assistant', content: [{ type: 'text', text: 'earlier reply' }], toolCalls: [] }, time: 750 }, + { type: 'context.append_message', message: { role: 'user', content: [{ type: 'text', text: 'active' }], toolCalls: [], origin: { kind: 'user' } }, time: 1000 }, + { type: 'context.append_message', message: { role: 'assistant', content: [{ type: 'text', text: 'working' }], toolCalls: [] }, time: 2000 }, + { type: 'turn.steer', input: [{ type: 'text', text: 'steered in' }], origin: { kind: 'user' }, time: 3000 }, + { type: 'context.append_message', message: { role: 'user', content: [{ type: 'text', text: 'steered in' }], toolCalls: [], origin: { kind: 'user' } }, time: 3001 }, + { type: 'context.append_message', message: { role: 'assistant', content: [{ type: 'text', text: 'noted' }], toolCalls: [] }, time: 4000 }, + ]; + await writeFile(join(wireDir, 'wire.jsonl'), `${records.map((r) => JSON.stringify(r)).join('\n')}\n`); + + const snapshot = await coldTranscriptService(home).readColdSnapshot('s1', 'main'); + const turns = snapshot!.items.filter((item) => item.kind === 'turn'); + expect(turns).toHaveLength(2); + const first = turns[0]; + if (first?.kind !== 'turn') throw new Error('expected first turn'); + expect(first.prompt).toBe('steered in'); + const turn = turns[1]; + if (turn?.kind !== 'turn') throw new Error('expected turn'); + expect(turn.steps).toHaveLength(2); + expect(turn.steps[1]?.frames[0]).toMatchObject({ + kind: 'text', + role: 'user', + text: 'steered in', + }); + } finally { + await rm(home, { recursive: true, force: true }); + } + }); + + it('readColdSnapshot keeps a non-user steering record out of user turn grouping', async () => { + const home = await mkdtemp(join(tmpdir(), 'transcript-cold-nonuser-steer-')); + try { + const wireDir = join(home, 'sessions', 'ws', 's1', 'agents', 'main'); + await mkdir(wireDir, { recursive: true }); + const records = [ + { type: 'context.append_message', message: { role: 'user', content: [{ type: 'text', text: 'active' }], toolCalls: [], origin: { kind: 'user' } }, time: 1000 }, + { type: 'context.append_message', message: { role: 'assistant', content: [{ type: 'text', text: 'working' }], toolCalls: [] }, time: 2000 }, + { type: 'turn.steer', input: [{ type: 'text', text: 'scheduled' }], origin: { kind: 'cron_job', jobId: 'job-1', cron: '* * * * *', recurring: true, coalescedCount: 0, stale: false }, time: 3000 }, + { type: 'context.append_message', message: { role: 'user', content: [{ type: 'text', text: 'scheduled' }], toolCalls: [], origin: { kind: 'cron_job', jobId: 'job-1', cron: '* * * * *', recurring: true, coalescedCount: 0, stale: false } }, time: 3001 }, + { type: 'context.append_message', message: { role: 'assistant', content: [{ type: 'text', text: 'done' }], toolCalls: [] }, time: 4000 }, + ]; + await writeFile(join(wireDir, 'wire.jsonl'), `${records.map((r) => JSON.stringify(r)).join('\n')}\n`); + + const snapshot = await coldTranscriptService(home).readColdSnapshot('s1', 'main'); + const turns = snapshot!.items.filter((item) => item.kind === 'turn'); + expect(turns).toHaveLength(2); + const scheduled = turns[1]; + if (scheduled?.kind !== 'turn') throw new Error('expected scheduled turn'); + expect(scheduled.prompt).toBe('scheduled'); + } finally { + await rm(home, { recursive: true, force: true }); + } + }); + + it('readColdSnapshot projects question requests without rewriting persisted records', async () => { + const home = await mkdtemp(join(tmpdir(), 'transcript-cold-question-')); + try { + const wireDir = join(home, 'sessions', 'ws', 's1', 'agents', 'main'); + await mkdir(wireDir, { recursive: true }); + const records = [ + { + type: 'interaction.request', + id: 'q-cold', + kind: 'question', + toolCallId: 'call_q', + request: { + toolCallId: 'call_q', + questions: [{ question: 'Pick', options: [{ label: 'A' }, { label: 'B' }] }], + }, + time: 7000, + }, + { + type: 'interaction.request', + id: 'q-bad', + kind: 'question', + request: { toolName: 'nope' }, + time: 8000, + }, + ]; + const content = `${records.map((record) => JSON.stringify(record)).join('\n')}\n`; + await writeFile(join(wireDir, 'wire.jsonl'), content); + + const snapshot = await coldTranscriptService(home).readColdSnapshot('s1', 'main'); + const byId = new Map(snapshot!.interactions.map((interaction) => [interaction.interactionId, interaction])); + expect(byId.get('q-cold')?.request).toEqual({ + question_id: 'q-cold', + session_id: 's1', + questions: [ + { + id: 'q_0', + question: 'Pick', + options: [ + { id: 'opt_0_0', label: 'A' }, + { id: 'opt_0_1', label: 'B' }, + ], + allow_other: true, + }, + ], + created_at: new Date(7000).toISOString(), + tool_call_id: 'call_q', + }); + expect(byId.get('q-bad')?.request).toEqual({ toolName: 'nope' }); + } finally { + await rm(home, { recursive: true, force: true }); + } + }); + it('readColdSnapshot folds task/todo/goal/plan/interaction records into the cold snapshot', async () => { const home = await mkdtemp(join(tmpdir(), 'transcript-cold-facts-')); try { @@ -2353,7 +2816,7 @@ describe('AgentTranscriptProjector', () => { }); it('folds blocked turn endings into failed (engine wire contract)', () => { - const projector = new AgentTranscriptProjector('main'); + const projector = new AgentTranscriptProjector('main', TEST_SESSION_ID); const tx = new AgentTranscript('main'); tx.apply(projector.map(ev({ type: 'turn.started', turnId: 0, origin: { kind: 'user' } }))); tx.apply(projector.map(ev({ type: 'turn.ended', turnId: 0, reason: 'blocked' }))); @@ -2361,7 +2824,7 @@ describe('AgentTranscriptProjector', () => { }); it('tracks accepted and queued prompts through terminal states', () => { - const projector = new AgentTranscriptProjector('main'); + const projector = new AgentTranscriptProjector('main', TEST_SESSION_ID); const tx = new AgentTranscript('main'); const feed = (event: ProjectorBusEvent): void => void tx.apply(projector.map(event)); @@ -2390,7 +2853,7 @@ describe('AgentTranscriptProjector', () => { }); it('mirrors turn liveness into meta activity', () => { - const projector = new AgentTranscriptProjector('main'); + const projector = new AgentTranscriptProjector('main', TEST_SESSION_ID); const tx = new AgentTranscript('main'); const feed = (event: ProjectorBusEvent): void => void tx.apply(projector.map(event)); @@ -2406,7 +2869,7 @@ describe('AgentTranscriptProjector', () => { }); it('maps cron / task origins onto the turn header', () => { - const projector = new AgentTranscriptProjector('main'); + const projector = new AgentTranscriptProjector('main', TEST_SESSION_ID); const tx = new AgentTranscript('main'); const feed = (event: ProjectorBusEvent): void => void tx.apply(projector.map(event)); @@ -2438,7 +2901,7 @@ describe('AgentTranscriptProjector', () => { }); it('treats subagent.started/failed/suspended within the running→failed vocabulary', () => { - const projector = new AgentTranscriptProjector('main'); + const projector = new AgentTranscriptProjector('main', TEST_SESSION_ID); const tx = new AgentTranscript('main'); const feed = (event: ProjectorBusEvent): void => void tx.apply(projector.map(event)); diff --git a/packages/node-sdk/src/v2/session-wiring.ts b/packages/node-sdk/src/v2/session-wiring.ts index fec344bf5..520d0cf50 100644 --- a/packages/node-sdk/src/v2/session-wiring.ts +++ b/packages/node-sdk/src/v2/session-wiring.ts @@ -295,10 +295,18 @@ function withStatusSnapshot(agent: IAgentScopeHandle, event: Event2): Event const contextTokens = tokenCounting.statusSize(context); const capabilities = profile.getModelCapabilities(); const maxContextTokens = capabilities.max_input_tokens ?? capabilities.max_context_tokens; + const contextUsage = + Number.isFinite(contextTokens) && + maxContextTokens !== undefined && + Number.isFinite(maxContextTokens) && + maxContextTokens > 0 + ? contextTokens / maxContextTokens + : undefined; return Object.assign({}, event, { usage: usageService.status(context), contextTokens, maxContextTokens, + contextUsage, model: profile.getModel(), }) as unknown as Event2; } diff --git a/packages/node-sdk/test/session-event-wiring.test.ts b/packages/node-sdk/test/session-event-wiring.test.ts index 0ce64b753..928bd72d5 100644 --- a/packages/node-sdk/test/session-event-wiring.test.ts +++ b/packages/node-sdk/test/session-event-wiring.test.ts @@ -147,6 +147,7 @@ describe('SessionEventWiring status snapshot fold', () => { usage: USAGE, contextTokens: 10, maxContextTokens: 128_000, + contextUsage: 10 / 128_000, model: 'sub-model', }); expect(events[1]).toMatchObject({ diff --git a/packages/transcript/src/contract/schema.ts b/packages/transcript/src/contract/schema.ts index 4148d9a17..4b939cdef 100644 --- a/packages/transcript/src/contract/schema.ts +++ b/packages/transcript/src/contract/schema.ts @@ -69,6 +69,7 @@ export const textFrameSchema = z.object({ text: z.string(), attachmentIds: z.array(z.string()).optional(), taskId: taskIdSchema.optional(), + promptIds: z.array(z.string()).optional(), }); export const thinkingFrameSchema = z.object({ diff --git a/packages/transcript/src/history/groupTurns.ts b/packages/transcript/src/history/groupTurns.ts index ddbc55916..99099643b 100644 --- a/packages/transcript/src/history/groupTurns.ts +++ b/packages/transcript/src/history/groupTurns.ts @@ -67,12 +67,19 @@ export function groupMessagesIntoSnapshot( messages: readonly HistoryMessage[], options?: { readonly taskOriginTurnTaskIds?: ReadonlySet; + readonly steeredMessageIndexes?: ReadonlySet; }, ): AgentTranscriptSnapshot { const items: TranscriptItem[] = []; const attachments: TranscriptAttachment[] = []; let turn: TurnDraft | undefined; - let pendingNotificationFrames: { text: string; taskId: string | undefined }[] = []; + let pendingNotificationFrames: { + text: string; + taskId: string | undefined; + attachmentIds?: string[]; + promptIds?: readonly string[]; + steered?: boolean; + }[] = []; let nextOrdinal = 0; let markerCount = 0; @@ -141,7 +148,30 @@ export function groupMessagesIntoSnapshot( return turn; }; + const flushSteeredLeftovers = (): void => { + const leftovers = pendingNotificationFrames.filter((pending) => pending.steered); + if (leftovers.length === 0) return; + pendingNotificationFrames = pendingNotificationFrames.filter((pending) => !pending.steered); + for (const pending of leftovers) { + const lastStep = turn?.steps.at(-1); + if (turn === undefined || lastStep === undefined) { + startTurn({ kind: 'user' }, pending.text, pending.attachmentIds); + continue; + } + lastStep.frames.push({ + kind: 'text', + frameId: `${lastStep.stepId}.f${lastStep.frames.length + 1}`, + role: 'user', + text: pending.text, + attachmentIds: pending.attachmentIds, + promptIds: pending.promptIds, + }); + syncTurnItem(items, turn); + } + }; + const startTurn = (origin: TurnOrigin, prompt?: string, attachmentIds?: string[]): TurnDraft => { + flushSteeredLeftovers(); const ordinal = nextOrdinal; nextOrdinal += 1; pendingNotificationFrames = []; @@ -157,7 +187,7 @@ export function groupMessagesIntoSnapshot( }; let prevNonTaskRole: string | undefined; - for (const message of messages) { + for (const [messageIndex, message] of messages.entries()) { if (message.role === 'system') continue; const originKind = message.origin?.kind; const isTaskOrigin = @@ -172,6 +202,25 @@ export function groupMessagesIntoSnapshot( } continue; } + if (options?.steeredMessageIndexes?.has(messageIndex)) { + const bundled = bundledSkillActivations(message); + const parts = message.content ?? []; + bundled.forEach((activation, index) => { + const block = parts[index]; + pushMarker('skill', { + text: block !== undefined && block.type === 'text' && 'text' in block ? block.text : '', + origin: { kind: 'skill_activation', trigger: 'user-slash', ...activation }, + }); + }); + const opening = foldTurnOpeningInput({ ...message, content: parts.slice(bundled.length) }); + pendingNotificationFrames.push({ + text: opening.text, + taskId: undefined, + attachmentIds: opening.attachmentIds, + steered: true, + }); + continue; + } const markerKey = originKind !== undefined ? MARKER_USER_ORIGINS[originKind] : undefined; if (markerKey !== undefined) { const opening = isUserSlashPrompt(message) ? foldTurnOpeningInput(message) : undefined; @@ -238,6 +287,8 @@ export function groupMessagesIntoSnapshot( role: 'user', text: pending.text, taskId: pending.taskId, + attachmentIds: pending.attachmentIds, + promptIds: pending.promptIds, }); } pendingNotificationFrames = []; @@ -278,6 +329,8 @@ export function groupMessagesIntoSnapshot( } } + flushSteeredLeftovers(); + return { items, tasks: [], interactions: [], attachments, todos: [], prompts: [], meta: {} }; } diff --git a/packages/transcript/src/model/frame.ts b/packages/transcript/src/model/frame.ts index 2f26341f5..035bbdb03 100644 --- a/packages/transcript/src/model/frame.ts +++ b/packages/transcript/src/model/frame.ts @@ -14,6 +14,7 @@ export interface TextFrame { readonly text: string; readonly attachmentIds?: readonly AttachmentId[]; readonly taskId?: TaskId; + readonly promptIds?: readonly string[]; } export interface ThinkingFrame { diff --git a/packages/transcript/test/layers.test.ts b/packages/transcript/test/layers.test.ts index 9a295a227..890c941eb 100644 --- a/packages/transcript/test/layers.test.ts +++ b/packages/transcript/test/layers.test.ts @@ -498,6 +498,86 @@ describe('groupMessagesIntoSnapshot (cold path)', () => { ]); }); + it('folds a marked steered user message into the current turn as a user frame', () => { + const snapshot = groupMessagesIntoSnapshot( + [ + { role: 'user', content: [{ type: 'text', text: 'active' }], toolCalls: [], origin: { kind: 'user' } }, + { role: 'assistant', content: [{ type: 'text', text: 'working' }], toolCalls: [] }, + { role: 'user', content: [{ type: 'text', text: 'steered in' }], toolCalls: [], origin: { kind: 'user' } }, + { role: 'assistant', content: [{ type: 'text', text: 'noted' }], toolCalls: [] }, + ], + { steeredMessageIndexes: new Set([2]) }, + ); + + expect(snapshot.items.map((item) => item.kind)).toEqual(['turn']); + const turn = snapshot.items[0]; + if (turn?.kind !== 'turn') throw new Error('expected turn'); + expect(turn.steps).toHaveLength(2); + expect(turn.steps[1]?.frames[0]).toMatchObject({ + kind: 'text', + role: 'user', + text: 'steered in', + }); + }); + + it('keeps a trailing steered message visible by appending it to the last step', () => { + const snapshot = groupMessagesIntoSnapshot( + [ + { role: 'user', content: [{ type: 'text', text: 'active' }], toolCalls: [], origin: { kind: 'user' } }, + { role: 'assistant', content: [{ type: 'text', text: 'working' }], toolCalls: [] }, + { role: 'user', content: [{ type: 'text', text: 'steered in' }], toolCalls: [], origin: { kind: 'user' } }, + ], + { steeredMessageIndexes: new Set([2]) }, + ); + + expect(snapshot.items.map((item) => item.kind)).toEqual(['turn']); + const turn = snapshot.items[0]; + if (turn?.kind !== 'turn') throw new Error('expected turn'); + expect(turn.steps.at(-1)?.frames.at(-1)).toMatchObject({ + kind: 'text', + role: 'user', + text: 'steered in', + }); + }); + + it('flushes a pending steer into the closing turn when a new turn opens before any reply', () => { + const snapshot = groupMessagesIntoSnapshot( + [ + { role: 'user', content: [{ type: 'text', text: 'active' }], toolCalls: [], origin: { kind: 'user' } }, + { role: 'assistant', content: [{ type: 'text', text: 'working' }], toolCalls: [] }, + { role: 'user', content: [{ type: 'text', text: 'steered in' }], toolCalls: [], origin: { kind: 'user' } }, + { role: 'user', content: [{ type: 'text', text: 'next question' }], toolCalls: [], origin: { kind: 'user' } }, + { role: 'assistant', content: [{ type: 'text', text: 'answer' }], toolCalls: [] }, + ], + { steeredMessageIndexes: new Set([2]) }, + ); + + const turns = snapshot.items.filter((item) => item.kind === 'turn'); + expect(turns).toHaveLength(2); + const first = turns[0]; + if (first?.kind !== 'turn') throw new Error('expected turn'); + expect(first.steps.at(-1)?.frames.at(-1)).toMatchObject({ + kind: 'text', + role: 'user', + text: 'steered in', + }); + const second = turns[1]; + if (second?.kind !== 'turn') throw new Error('expected turn'); + expect(second.prompt).toBe('next question'); + }); + + it('still opens its own turn for a mid-conversation user message not marked as a steer', () => { + const snapshot = groupMessagesIntoSnapshot( + [ + { role: 'user', content: [{ type: 'text', text: 'active' }], toolCalls: [], origin: { kind: 'user' } }, + { role: 'assistant', content: [{ type: 'text', text: 'working' }], toolCalls: [] }, + { role: 'user', content: [{ type: 'text', text: 'plain follow-up' }], toolCalls: [], origin: { kind: 'user' } }, + ], + ); + + expect(snapshot.items.map((item) => item.kind)).toEqual(['turn', 'turn']); + }); + it('stops folded notification text before child output blocks', () => { const xml = [ '', From 0590e47d2c5fc82c38073559f4e0ff80c6be61ce Mon Sep 17 00:00:00 2001 From: elkaix Date: Wed, 26 Aug 2026 12:11:08 -0400 Subject: [PATCH 2/3] fix: address PR review findings --- .../dist-web/.web-bundle-manifest.json | 2 +- ...-DAbIT1YQ.js => CodeBlockNode-Bm1R5aPP.js} | 4 +-- ...vCSVFt.js => DesignSystemView-DX1VEaZQ.js} | 2 +- ...ooltip-ZudMQ-r0.js => Tooltip-CAafRFRN.js} | 2 +- ...rX.js => abnfDiagram-VCTEODGH-6i4AQ6Ui.js} | 2 +- .../{arc-i3Cwndrc.js => arc-C9gFqAy0.js} | 2 +- ... architectureDiagram-5GKGNRK7-BBfEPNcr.js} | 2 +- ...P.js => blockDiagram-NRAW4CY4-Dkk1ohqb.js} | 2 +- ...8xij.js => c4Diagram-UCG6FXSJ-BV-15Tol.js} | 2 +- .../dist-web/assets/channel-Bm0H2vxn.js | 1 + .../dist-web/assets/channel-CRmZXxAS.js | 1 - ...DcbCvFbW.js => chunk-2Q5K7J3B-C5dXVEvr.js} | 2 +- ...baBluNR7.js => chunk-5VM5RSS4-D8DHuAth.js} | 2 +- ...B_4WdsPc.js => chunk-F27PBJKO-DtNIaJ4B.js} | 2 +- ...CmxioZig.js => chunk-G27WJ6UU-BwLLeOOr.js} | 2 +- ...DsFB3Fti.js => chunk-JWPE2WC7-DjA09kFS.js} | 2 +- ...C-wDwoC0.js => chunk-LCL6LL3I-COmMpiZO.js} | 2 +- ...Tp7S0w--.js => chunk-POPQ4Y6H-B7iG5qn5.js} | 2 +- ...D_60I4PC.js => chunk-SVP7TREG-B4Y-lvg8.js} | 2 +- ...BOyQwG-7.js => chunk-XXDRQBXY-Pj2mkOow.js} | 2 +- .../assets/classDiagram-DTDB5LWJ-9LZ2e6T0.js | 1 - .../assets/classDiagram-DTDB5LWJ-C6Ct91st.js | 1 + .../classDiagram-v2-JRS7N3AN-9LZ2e6T0.js | 1 - .../classDiagram-v2-JRS7N3AN-C6Ct91st.js | 1 + ...I.js => cose-bilkent-JH36ORCC-CCcadSd9.js} | 2 +- ...ssMode-gWA3VTCg.js => cssMode-43LALI1D.js} | 2 +- ...g0NdnJ.js => cynefin-OW5HDTMX-BygTY4j3.js} | 2 +- ...js => cynefinDiagram-5FMLGOSQ-ws-XBlL9.js} | 2 +- ...u-A10G9p.js => dagre-3AP2YEHR-ZCbhDzTA.js} | 2 +- ...q2B2N3.js => diagram-S7CK7UJ4-DGAJHyux.js} | 2 +- ...tc4iew.js => diagram-UQ7AKVKN-YHKPBSmY.js} | 2 +- ...PgWSzf.js => diagram-VSXAHHWV-Cyi5BUTg.js} | 2 +- ...o3VTet.js => diagram-VX7I27RA-LaTgw-sA.js} | 2 +- ...H3hi_j.js => diagram-Z3DM3KII-BU9sCzbb.js} | 2 +- ...6I.js => ebnfDiagram-PWID7BFC-DmCUeX09.js} | 2 +- ...in-CUgPnB4r.js => editor.main-CSd5xoJU.js} | 6 ++-- ...Sbm0.js => erDiagram-SSCWMZ5O-CB9IV2Kp.js} | 2 +- ...0s.js => flowDiagram-A5DVABFB-DeIptUeR.js} | 2 +- ...r2-BLqTDIvk.js => freemarker2-B2ItDy_k.js} | 2 +- ...S.js => ganttDiagram-EL5Y4UJY-BZZaZJ0c.js} | 2 +- ...s => gitGraphDiagram-WWUBYQGX-CeTwA67W.js} | 2 +- ...ars-Dt6_fHq4.js => handlebars-F3r5eIuq.js} | 2 +- .../{html-DNZRtspS.js => html-Blg47oPG.js} | 2 +- ...lMode-CNwKQEFk.js => htmlMode-CKzw1Cpu.js} | 2 +- .../{index-tKxZRbcu.js => index-B-GhLu-7.js} | 4 +-- .../{index-CKVuDqnW.js => index-CXJs_0Yn.js} | 2 +- .../{index-at2nKQ9b.js => index-CzEepPxd.js} | 2 +- .../{index-D9Nz1t7z.js => index-XmhyfFRf.js} | 36 +++++++++---------- ...ndex10-D9W-n1aP.js => index10-Co-bE5Ex.js} | 2 +- ...ndex11-D2xpmxp_.js => index11-Cvy8ghv4.js} | 2 +- ...{index5-DA0ZmzsV.js => index5-DqwQmWqe.js} | 2 +- ...{index6-D50HseCy.js => index6-iEWYnL3f.js} | 2 +- ...{index7-DPemc_3e.js => index7-DzslQpl2.js} | 2 +- ...{index8-DbXzFaJO.js => index8-Dfrq_uC1.js} | 2 +- ...1X.js => infoDiagram-RXCK75RN-CCZmJmKf.js} | 2 +- ...s => ishikawaDiagram-5VMMS53U-rfiQ6gAB.js} | 2 +- ...ipt-BsIpPAMU.js => javascript-0aB6uObk.js} | 2 +- ...js => journeyDiagram-EYS64GPL-8PGa9Alp.js} | 2 +- ...nMode-DBSMQpjf.js => jsonMode-rJNh1ua1.js} | 2 +- ...=> kanban-definition-3QL26DDD-8x3b7Gb5.js} | 2 +- ...{layout-BZTUGqmN.js => layout-DDdzyvtG.js} | 2 +- ...{linear-DnyH2I-x.js => linear-C02hJRDE.js} | 2 +- ...{liquid-PbV9SRs8.js => liquid-DfF3yH_T.js} | 2 +- ...wGx.js => lspLanguageFeatures-DIQkkUvS.js} | 2 +- .../{mdx-6vkE1AZK.js => mdx-Bm2432IE.js} | 2 +- ...e-D6Xg32pF.js => mermaid.core-BLsmN-lt.js} | 10 +++--- ...> mindmap-definition-FBJOCRG2-9uKnhINS.js} | 2 +- ...sjR.js => pegDiagram-XKGWAZYB-zbaISefm.js} | 2 +- ...fPE.js => pieDiagram-E7YTZNPT-DCY7rRp5.js} | 2 +- ...{python-OQiB2MoN.js => python-CXTzAVtR.js} | 2 +- ...s => quadrantDiagram-AXDQQJYC-DkrDQuCP.js} | 2 +- ...s => railroadDiagram-O6MQD6OU-BUvtJwC7.js} | 2 +- .../{razor-C5WSpCq4.js => razor-BhweegTo.js} | 2 +- ...> requirementDiagram-EFPCY7ZU-D78ErEq3.js} | 2 +- ....js => sankeyDiagram-P5KCCOFB-BCouA8le.js} | 2 +- ...s => sequenceDiagram-WJ2MYXX4-FEDfldQE.js} | 2 +- ...5p.js => sizeCapture-X5ZJPWSS-7H_ojygP.js} | 2 +- ...J.js => stateDiagram-HBIQ2CUA-qxascg_B.js} | 2 +- .../stateDiagram-v2-4QOOHH4V-C5GYg_il.js | 1 + .../stateDiagram-v2-4QOOHH4V-CibQ_uPc.js | 1 - ...Tv6J.js => swimlanes-XN3QIQJK-CHv6nzkh.js} | 2 +- .../swimlanesDiagram-VK2B7HYN-D4gypIgC.js | 8 +++++ .../swimlanesDiagram-VK2B7HYN-pddQXmuq.js | 8 ----- ... timeline-definition-24CTP7MA-DEFjBB65.js} | 2 +- ...{tsMode-DVpap0Ub.js => tsMode-lkHgywyY.js} | 2 +- ...ipt-Cev6QPda.js => typescript-CXVXTJLh.js} | 2 +- ...Tb.js => vennDiagram-4TSXK5OY-Fk7Xp4Io.js} | 2 +- ...js => vue.runtime.esm-bundler-xbiZ5oyJ.js} | 2 +- ...js => wardleyDiagram-VM6X3IG4-Bs36-sDm.js} | 2 +- .../{xml-CSRj6A38.js => xml-BI24_P4u.js} | 2 +- ...js => xychartDiagram-S5SC5T6Z-C4wy50wx.js} | 2 +- .../{yaml-dB1gSO3c.js => yaml-CM5JPzfY.js} | 2 +- apps/pythinker-code/dist-web/index.html | 2 +- .../tui/controllers/session-event-handler.ts | 6 +++- .../tui/pythinker-tui-message-flow.test.ts | 29 +++++++++++++++ .../agent-core-v2/src/agent/mcp/output.ts | 8 +++-- .../src/agent/toolDedupe/toolDedupe.ts | 4 +-- .../toolResultTruncationService.ts | 4 +-- .../toolResultTruncation.test.ts | 14 ++++++++ .../os/backends/node-local/tools/read.test.ts | 16 ++++++++- .../src/protocol/question-wire.ts | 18 +++++----- .../services/transcript/transcriptService.ts | 7 ++-- .../test/services/transcript.test.ts | 28 +++++++++++++++ 103 files changed, 230 insertions(+), 144 deletions(-) rename apps/pythinker-code/dist-web/assets/{CodeBlockNode-DAbIT1YQ.js => CodeBlockNode-Bm1R5aPP.js} (99%) rename apps/pythinker-code/dist-web/assets/{DesignSystemView-CNvCSVFt.js => DesignSystemView-DX1VEaZQ.js} (99%) rename apps/pythinker-code/dist-web/assets/{Tooltip-ZudMQ-r0.js => Tooltip-CAafRFRN.js} (98%) rename apps/pythinker-code/dist-web/assets/{abnfDiagram-VCTEODGH-Bll7_2rX.js => abnfDiagram-VCTEODGH-6i4AQ6Ui.js} (86%) rename apps/pythinker-code/dist-web/assets/{arc-i3Cwndrc.js => arc-C9gFqAy0.js} (98%) rename apps/pythinker-code/dist-web/assets/{architectureDiagram-5GKGNRK7-Db1hZGe5.js => architectureDiagram-5GKGNRK7-BBfEPNcr.js} (99%) rename apps/pythinker-code/dist-web/assets/{blockDiagram-NRAW4CY4-cr4vjQ1P.js => blockDiagram-NRAW4CY4-Dkk1ohqb.js} (99%) rename apps/pythinker-code/dist-web/assets/{c4Diagram-UCG6FXSJ-B3GT8xij.js => c4Diagram-UCG6FXSJ-BV-15Tol.js} (99%) create mode 100644 apps/pythinker-code/dist-web/assets/channel-Bm0H2vxn.js delete mode 100644 apps/pythinker-code/dist-web/assets/channel-CRmZXxAS.js rename apps/pythinker-code/dist-web/assets/{chunk-2Q5K7J3B-DcbCvFbW.js => chunk-2Q5K7J3B-C5dXVEvr.js} (67%) rename apps/pythinker-code/dist-web/assets/{chunk-5VM5RSS4-baBluNR7.js => chunk-5VM5RSS4-D8DHuAth.js} (83%) rename apps/pythinker-code/dist-web/assets/{chunk-F27PBJKO-B_4WdsPc.js => chunk-F27PBJKO-DtNIaJ4B.js} (96%) rename apps/pythinker-code/dist-web/assets/{chunk-G27WJ6UU-CmxioZig.js => chunk-G27WJ6UU-BwLLeOOr.js} (99%) rename apps/pythinker-code/dist-web/assets/{chunk-JWPE2WC7-DsFB3Fti.js => chunk-JWPE2WC7-DjA09kFS.js} (71%) rename apps/pythinker-code/dist-web/assets/{chunk-LCL6LL3I-C-wDwoC0.js => chunk-LCL6LL3I-COmMpiZO.js} (99%) rename apps/pythinker-code/dist-web/assets/{chunk-POPQ4Y6H-Tp7S0w--.js => chunk-POPQ4Y6H-B7iG5qn5.js} (87%) rename apps/pythinker-code/dist-web/assets/{chunk-SVP7TREG-D_60I4PC.js => chunk-SVP7TREG-B4Y-lvg8.js} (99%) rename apps/pythinker-code/dist-web/assets/{chunk-XXDRQBXY-BOyQwG-7.js => chunk-XXDRQBXY-Pj2mkOow.js} (72%) delete mode 100644 apps/pythinker-code/dist-web/assets/classDiagram-DTDB5LWJ-9LZ2e6T0.js create mode 100644 apps/pythinker-code/dist-web/assets/classDiagram-DTDB5LWJ-C6Ct91st.js delete mode 100644 apps/pythinker-code/dist-web/assets/classDiagram-v2-JRS7N3AN-9LZ2e6T0.js create mode 100644 apps/pythinker-code/dist-web/assets/classDiagram-v2-JRS7N3AN-C6Ct91st.js rename apps/pythinker-code/dist-web/assets/{cose-bilkent-JH36ORCC-DvKBGuII.js => cose-bilkent-JH36ORCC-CCcadSd9.js} (99%) rename apps/pythinker-code/dist-web/assets/{cssMode-gWA3VTCg.js => cssMode-43LALI1D.js} (93%) rename apps/pythinker-code/dist-web/assets/{cynefin-OW5HDTMX-Byg0NdnJ.js => cynefin-OW5HDTMX-BygTY4j3.js} (99%) rename apps/pythinker-code/dist-web/assets/{cynefinDiagram-5FMLGOSQ-ByoPUflO.js => cynefinDiagram-5FMLGOSQ-ws-XBlL9.js} (98%) rename apps/pythinker-code/dist-web/assets/{dagre-3AP2YEHR-u-A10G9p.js => dagre-3AP2YEHR-ZCbhDzTA.js} (98%) rename apps/pythinker-code/dist-web/assets/{diagram-S7CK7UJ4-a3q2B2N3.js => diagram-S7CK7UJ4-DGAJHyux.js} (96%) rename apps/pythinker-code/dist-web/assets/{diagram-UQ7AKVKN-B3tc4iew.js => diagram-UQ7AKVKN-YHKPBSmY.js} (95%) rename apps/pythinker-code/dist-web/assets/{diagram-VSXAHHWV-wfPgWSzf.js => diagram-VSXAHHWV-Cyi5BUTg.js} (98%) rename apps/pythinker-code/dist-web/assets/{diagram-VX7I27RA-ano3VTet.js => diagram-VX7I27RA-LaTgw-sA.js} (97%) rename apps/pythinker-code/dist-web/assets/{diagram-Z3DM3KII-DwH3hi_j.js => diagram-Z3DM3KII-BU9sCzbb.js} (95%) rename apps/pythinker-code/dist-web/assets/{ebnfDiagram-PWID7BFC-fqbVOO6I.js => ebnfDiagram-PWID7BFC-DmCUeX09.js} (87%) rename apps/pythinker-code/dist-web/assets/{editor.main-CUgPnB4r.js => editor.main-CSd5xoJU.js} (99%) rename apps/pythinker-code/dist-web/assets/{erDiagram-SSCWMZ5O-DBkUSbm0.js => erDiagram-SSCWMZ5O-CB9IV2Kp.js} (99%) rename apps/pythinker-code/dist-web/assets/{flowDiagram-A5DVABFB-B55b-50s.js => flowDiagram-A5DVABFB-DeIptUeR.js} (99%) rename apps/pythinker-code/dist-web/assets/{freemarker2-BLqTDIvk.js => freemarker2-B2ItDy_k.js} (99%) rename apps/pythinker-code/dist-web/assets/{ganttDiagram-EL5Y4UJY-DkUtPT3S.js => ganttDiagram-EL5Y4UJY-BZZaZJ0c.js} (99%) rename apps/pythinker-code/dist-web/assets/{gitGraphDiagram-WWUBYQGX-BwFh1DGV.js => gitGraphDiagram-WWUBYQGX-CeTwA67W.js} (99%) rename apps/pythinker-code/dist-web/assets/{handlebars-Dt6_fHq4.js => handlebars-F3r5eIuq.js} (97%) rename apps/pythinker-code/dist-web/assets/{html-DNZRtspS.js => html-Blg47oPG.js} (97%) rename apps/pythinker-code/dist-web/assets/{htmlMode-CNwKQEFk.js => htmlMode-CKzw1Cpu.js} (94%) rename apps/pythinker-code/dist-web/assets/{index-tKxZRbcu.js => index-B-GhLu-7.js} (99%) rename apps/pythinker-code/dist-web/assets/{index-CKVuDqnW.js => index-CXJs_0Yn.js} (99%) rename apps/pythinker-code/dist-web/assets/{index-at2nKQ9b.js => index-CzEepPxd.js} (99%) rename apps/pythinker-code/dist-web/assets/{index-D9Nz1t7z.js => index-XmhyfFRf.js} (99%) rename apps/pythinker-code/dist-web/assets/{index10-D9W-n1aP.js => index10-Co-bE5Ex.js} (99%) rename apps/pythinker-code/dist-web/assets/{index11-D2xpmxp_.js => index11-Cvy8ghv4.js} (99%) rename apps/pythinker-code/dist-web/assets/{index5-DA0ZmzsV.js => index5-DqwQmWqe.js} (95%) rename apps/pythinker-code/dist-web/assets/{index6-D50HseCy.js => index6-iEWYnL3f.js} (98%) rename apps/pythinker-code/dist-web/assets/{index7-DPemc_3e.js => index7-DzslQpl2.js} (98%) rename apps/pythinker-code/dist-web/assets/{index8-DbXzFaJO.js => index8-Dfrq_uC1.js} (99%) rename apps/pythinker-code/dist-web/assets/{infoDiagram-RXCK75RN-BRTvYe1X.js => infoDiagram-RXCK75RN-CCZmJmKf.js} (68%) rename apps/pythinker-code/dist-web/assets/{ishikawaDiagram-5VMMS53U-BVwPbQXn.js => ishikawaDiagram-5VMMS53U-rfiQ6gAB.js} (99%) rename apps/pythinker-code/dist-web/assets/{javascript-BsIpPAMU.js => javascript-0aB6uObk.js} (85%) rename apps/pythinker-code/dist-web/assets/{journeyDiagram-EYS64GPL-BojULxF8.js => journeyDiagram-EYS64GPL-8PGa9Alp.js} (98%) rename apps/pythinker-code/dist-web/assets/{jsonMode-DBSMQpjf.js => jsonMode-rJNh1ua1.js} (98%) rename apps/pythinker-code/dist-web/assets/{kanban-definition-3QL26DDD-CJ6Ryr5x.js => kanban-definition-3QL26DDD-8x3b7Gb5.js} (99%) rename apps/pythinker-code/dist-web/assets/{layout-BZTUGqmN.js => layout-DDdzyvtG.js} (99%) rename apps/pythinker-code/dist-web/assets/{linear-DnyH2I-x.js => linear-C02hJRDE.js} (98%) rename apps/pythinker-code/dist-web/assets/{liquid-PbV9SRs8.js => liquid-DfF3yH_T.js} (96%) rename apps/pythinker-code/dist-web/assets/{lspLanguageFeatures-BxKarwGx.js => lspLanguageFeatures-DIQkkUvS.js} (99%) rename apps/pythinker-code/dist-web/assets/{mdx-6vkE1AZK.js => mdx-Bm2432IE.js} (97%) rename apps/pythinker-code/dist-web/assets/{mermaid.core-D6Xg32pF.js => mermaid.core-BLsmN-lt.js} (99%) rename apps/pythinker-code/dist-web/assets/{mindmap-definition-FBJOCRG2-7ciIqqxG.js => mindmap-definition-FBJOCRG2-9uKnhINS.js} (98%) rename apps/pythinker-code/dist-web/assets/{pegDiagram-XKGWAZYB-wfnagsjR.js => pegDiagram-XKGWAZYB-zbaISefm.js} (87%) rename apps/pythinker-code/dist-web/assets/{pieDiagram-E7YTZNPT-DhlCgfPE.js => pieDiagram-E7YTZNPT-DCY7rRp5.js} (94%) rename apps/pythinker-code/dist-web/assets/{python-OQiB2MoN.js => python-CXTzAVtR.js} (96%) rename apps/pythinker-code/dist-web/assets/{quadrantDiagram-AXDQQJYC-CM5bQoYO.js => quadrantDiagram-AXDQQJYC-DkrDQuCP.js} (99%) rename apps/pythinker-code/dist-web/assets/{railroadDiagram-O6MQD6OU-BwlyJaCi.js => railroadDiagram-O6MQD6OU-BUvtJwC7.js} (84%) rename apps/pythinker-code/dist-web/assets/{razor-C5WSpCq4.js => razor-BhweegTo.js} (98%) rename apps/pythinker-code/dist-web/assets/{requirementDiagram-EFPCY7ZU-CfJXScDi.js => requirementDiagram-EFPCY7ZU-D78ErEq3.js} (99%) rename apps/pythinker-code/dist-web/assets/{sankeyDiagram-P5KCCOFB-CBJH_lza.js => sankeyDiagram-P5KCCOFB-BCouA8le.js} (99%) rename apps/pythinker-code/dist-web/assets/{sequenceDiagram-WJ2MYXX4-Ps_-YPM0.js => sequenceDiagram-WJ2MYXX4-FEDfldQE.js} (99%) rename apps/pythinker-code/dist-web/assets/{sizeCapture-X5ZJPWSS-CWV7CJ5p.js => sizeCapture-X5ZJPWSS-7H_ojygP.js} (86%) rename apps/pythinker-code/dist-web/assets/{stateDiagram-HBIQ2CUA-CTXuOFHJ.js => stateDiagram-HBIQ2CUA-qxascg_B.js} (96%) create mode 100644 apps/pythinker-code/dist-web/assets/stateDiagram-v2-4QOOHH4V-C5GYg_il.js delete mode 100644 apps/pythinker-code/dist-web/assets/stateDiagram-v2-4QOOHH4V-CibQ_uPc.js rename apps/pythinker-code/dist-web/assets/{swimlanes-XN3QIQJK-Cpu1Tv6J.js => swimlanes-XN3QIQJK-CHv6nzkh.js} (99%) create mode 100644 apps/pythinker-code/dist-web/assets/swimlanesDiagram-VK2B7HYN-D4gypIgC.js delete mode 100644 apps/pythinker-code/dist-web/assets/swimlanesDiagram-VK2B7HYN-pddQXmuq.js rename apps/pythinker-code/dist-web/assets/{timeline-definition-24CTP7MA-zg0jYTbx.js => timeline-definition-24CTP7MA-DEFjBB65.js} (99%) rename apps/pythinker-code/dist-web/assets/{tsMode-DVpap0Ub.js => tsMode-lkHgywyY.js} (99%) rename apps/pythinker-code/dist-web/assets/{typescript-Cev6QPda.js => typescript-CXVXTJLh.js} (97%) rename apps/pythinker-code/dist-web/assets/{vennDiagram-4TSXK5OY-COP9XdTb.js => vennDiagram-4TSXK5OY-Fk7Xp4Io.js} (99%) rename apps/pythinker-code/dist-web/assets/{vue.runtime.esm-bundler-BBYPRgFY.js => vue.runtime.esm-bundler-xbiZ5oyJ.js} (98%) rename apps/pythinker-code/dist-web/assets/{wardleyDiagram-VM6X3IG4-DzNaKtLK.js => wardleyDiagram-VM6X3IG4-Bs36-sDm.js} (99%) rename apps/pythinker-code/dist-web/assets/{xml-CSRj6A38.js => xml-BI24_P4u.js} (93%) rename apps/pythinker-code/dist-web/assets/{xychartDiagram-S5SC5T6Z-DbC2NYN9.js => xychartDiagram-S5SC5T6Z-C4wy50wx.js} (99%) rename apps/pythinker-code/dist-web/assets/{yaml-dB1gSO3c.js => yaml-CM5JPzfY.js} (96%) diff --git a/apps/pythinker-code/dist-web/.web-bundle-manifest.json b/apps/pythinker-code/dist-web/.web-bundle-manifest.json index 58007557e..e7a99f15d 100644 --- a/apps/pythinker-code/dist-web/.web-bundle-manifest.json +++ b/apps/pythinker-code/dist-web/.web-bundle-manifest.json @@ -1,4 +1,4 @@ { - "sourceHash": "cab030aff427e42aa38c3985af6373be0475b52edb5127b6e6d66107830ced1d", + "sourceHash": "b937f8282ae21a3bac9a26b32ea3182d28e2ac95f5d4c9484678ff9569338f82", "sourceFileCount": 404 } diff --git a/apps/pythinker-code/dist-web/assets/CodeBlockNode-DAbIT1YQ.js b/apps/pythinker-code/dist-web/assets/CodeBlockNode-Bm1R5aPP.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/CodeBlockNode-DAbIT1YQ.js rename to apps/pythinker-code/dist-web/assets/CodeBlockNode-Bm1R5aPP.js index 553847093..6e706fa03 100644 --- a/apps/pythinker-code/dist-web/assets/CodeBlockNode-DAbIT1YQ.js +++ b/apps/pythinker-code/dist-web/assets/CodeBlockNode-Bm1R5aPP.js @@ -1,5 +1,5 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-tKxZRbcu.js","assets/index-D9Nz1t7z.js","assets/index-CZhX7oJU.css"])))=>i.map(i=>d[i]); -import{bR as xi,cb as Si,bQ as zo,M as vl,bl as Ci,af as dl,bY as Mi,cc as Bi,b$ as ml,aU as O,c0 as Ei,c1 as Fi,c2 as Pi,a0 as Co,aD as Ho,bE as ae,az as Li,cd as hn,c8 as vt,aI as No,aL as G,s as bn,aw as It,au as mt,bk as V,ce as Mo,u as oe,I as To,A as Oi,bJ as Ut,aY as pt,bL as cl,v as b,t as ye,bB as fl,bb as Me,q as k,b7 as $i,cf as zi,cg as gn,ch as Hi,ci as Ni,cj as Ti,ck as Ri,as as j,cl as Bo,cm as Di,cn as Ai,co as jt,cp as Eo,bO as Ro,T as ji,G as qi,F as Fo,g as Wi,c7 as _i,b_ as Ii}from"./index-D9Nz1t7z.js";import{i as fe,t as yn}from"./safeRaf-DGuzXxDK.js";var wn=(x,M,w)=>new Promise((te,ne)=>{var we=E=>{try{r(w.next(E))}catch(z){ne(z)}},be=E=>{try{r(w.throw(E))}catch(z){ne(z)}},r=E=>E.done?te(E.value):Promise.resolve(E.value).then(we,be);r((w=w.apply(x,M)).next())});let Po=!1,qt=null,Wt=null,_t=null;function Ui(){return wn(this,null,function*(){if(_t)return _t;_t=wn(null,null,function*(){if(!Wt)try{if(Wt=(function(x){const M=x;if(typeof M?.useMonaco=="function")return M;const w=x?.default;return typeof w?.useMonaco=="function"?w:null})(yield xi(()=>import("./index-tKxZRbcu.js"),__vite__mapDeps([0,1,2]))),!Wt)return null}catch{return null}try{return yield(function(x){return wn(this,null,function*(){return Po?void 0:qt||(qt=wn(null,null,function*(){const w=globalThis?.MonacoEnvironment;w&&(typeof w.getWorker=="function"||typeof w.getWorkerUrl=="function")||typeof x?.preloadMonacoWorkers!="function"||(yield x.preloadMonacoWorkers()),Po=!0}).finally(()=>{qt=null}),qt)})})(Wt),Si(),Wt}catch{return null}});try{return yield _t}finally{_t=null}})}var Vi=Object.defineProperty,Gi=Object.defineProperties,Ji=Object.getOwnPropertyDescriptors,Lo=Object.getOwnPropertySymbols,Yi=Object.prototype.hasOwnProperty,Qi=Object.prototype.propertyIsEnumerable,Oo=(x,M,w)=>M in x?Vi(x,M,{enumerable:!0,configurable:!0,writable:!0,value:w}):x[M]=w,I=(x,M)=>{for(var w in M||(M={}))Yi.call(M,w)&&Oo(x,w,M[w]);if(Lo)for(var w of Lo(M))Qi.call(M,w)&&Oo(x,w,M[w]);return x},Ce=(x,M)=>Gi(x,Ji(M)),q=(x,M,w)=>new Promise((te,ne)=>{var we=E=>{try{r(w.next(E))}catch(z){ne(z)}},be=E=>{try{r(w.throw(E))}catch(z){ne(z)}},r=E=>E.done?te(E.value):Promise.resolve(E.value).then(we,be);r((w=w.apply(x,M)).next())});const Xi={key:0,class:"code-block-header flex justify-between items-center border-b px-[var(--ms-inset-panel-x)] py-[var(--ms-inset-panel-y)] border-[var(--code-border)] bg-[var(--code-header-bg)] text-[var(--code-fg)]"},Ki={class:"flex items-center gap-0.5"},Zi=["aria-label"],er={class:"code-diff-stat removed"},tr={class:"code-diff-stat added"},nr=["aria-label"],lr={key:0,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},or={key:1,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},ir=["aria-pressed"],rr={key:3,class:"relative"},ar=["aria-expanded"],ur=["disabled"],sr=["disabled"],dr=["disabled"],cr={key:0,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},fr={key:1,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},vr={class:"code-loading-placeholder"},mr={class:"sr-only","aria-live":"polite",role:"status"},pr=vl({__name:"CodeBlockShell",props:{showHeader:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},showFontSizeButtons:{type:Boolean,default:!0},enableFontSizeControl:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExpandButton:{type:Boolean,default:!0},showPreviewButton:{type:Boolean,default:!0},showTooltips:{type:Boolean,default:!0},isDark:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},stream:{type:Boolean,default:!1},isCollapsed:{type:Boolean,default:!1},isExpanded:{type:Boolean,default:!1},copyText:{type:Boolean,default:!1},isPreviewable:{type:Boolean,default:!1},codeFontSize:{},codeFontMin:{},codeFontMax:{},defaultCodeFontSize:{},fontBaselineReady:{type:Boolean,default:!1},diffStats:{},diffStatsAriaLabel:{}},emits:["toggleCollapse","decreaseFont","resetFont","increaseFont","copy","toggleExpand","preview"],setup(x,{emit:M}){const w=x,te=M,ne=O(!1),we=O(null),be=O(null);function r(){vt(!0),ne.value=!ne.value,ne.value&&document.addEventListener("click",z,{once:!0,capture:!0})}function E(){vt(!0),ne.value=!1}function z(Y){var f,$;const yt=Y.target;(f=we.value)!=null&&f.contains(yt)||($=be.value)!=null&&$.contains(yt)?document.addEventListener("click",z,{once:!0,capture:!0}):E()}const ie=k(()=>w.showFontSizeButtons&&w.enableFontSizeControl||w.showExpandButton||w.isPreviewable&&w.showPreviewButton),{t:N}=ml(),ht=k(()=>w.showTooltips!==!1);function Ge(Y,f){ht.value&&_i(Y.currentTarget,f,"top",!1,void 0,w.isDark)}function Be(){ht.value&&vt()}function gt(Y){Ge(Y,w.copyText?N("common.copied")||"Copied":N("common.copy")||"Copy")}const pl=k(()=>{var Y,f;return!!Number.isFinite(w.codeFontSize)&&((Y=w.codeFontSize)!=null?Y:0)<=((f=w.codeFontMin)!=null?f:0)}),Vt=k(()=>!w.fontBaselineReady||w.codeFontSize===w.defaultCodeFontSize),Gt=k(()=>{var Y,f;return!!Number.isFinite(w.codeFontSize)&&((Y=w.codeFontSize)!=null?Y:0)>=((f=w.codeFontMax)!=null?f:100)});return(Y,f)=>(G(),oe(Fo,null,[w.showHeader?(G(),oe("div",Xi,[pt(Y.$slots,"header-left"),pt(Y.$slots,"header-right",{},()=>[b("div",Ki,[x.diffStats?(G(),oe("div",{key:0,class:"code-diff-stats","aria-label":x.diffStatsAriaLabel},[b("span",er,"-"+Me(x.diffStats.removed),1),b("span",tr,"+"+Me(x.diffStats.added),1)],8,Zi)):ye("",!0),w.showCopyButton?(G(),oe("button",{key:1,type:"button",class:"code-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded leading-none shrink-0 cursor-pointer text-[var(--code-action-fg)] hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] active:scale-[0.96] disabled:opacity-40 disabled:cursor-not-allowed transition-colors","aria-label":x.copyText?V(N)("common.copied")||"Copied":V(N)("common.copy")||"Copy",onClick:f[0]||(f[0]=$=>te("copy")),onMouseenter:f[1]||(f[1]=$=>gt($)),onFocus:f[2]||(f[2]=$=>gt($)),onMouseleave:Be,onBlur:Be},[x.copyText?(G(),oe("svg",or,[...f[14]||(f[14]=[b("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M20 6L9 17l-5-5"},null,-1)])])):(G(),oe("svg",lr,[...f[13]||(f[13]=[b("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[b("rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}),b("path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"})],-1)])]))],40,nr)):ye("",!0),w.showCollapseButton?(G(),oe("button",{key:2,type:"button",class:"code-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded leading-none shrink-0 cursor-pointer text-[var(--code-action-fg)] hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] active:scale-[0.96] disabled:opacity-40 disabled:cursor-not-allowed transition-colors","aria-pressed":x.isCollapsed,onClick:f[3]||(f[3]=$=>te("toggleCollapse")),onMouseenter:f[4]||(f[4]=$=>Ge($,x.isCollapsed?V(N)("common.expand")||"Expand":V(N)("common.collapse")||"Collapse")),onFocus:f[5]||(f[5]=$=>Ge($,x.isCollapsed?V(N)("common.expand")||"Expand":V(N)("common.collapse")||"Collapse")),onMouseleave:Be,onBlur:Be},[(G(),oe("svg",{style:It({rotate:x.isCollapsed?"0deg":"90deg"}),xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[...f[15]||(f[15]=[b("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m9 18l6-6l-6-6"},null,-1)])],4))],40,ir)):ye("",!0),ie.value?(G(),oe("div",rr,[b("button",{ref_key:"moreBtnRef",ref:be,type:"button",class:"code-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded leading-none shrink-0 cursor-pointer text-[var(--code-action-fg)] hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] active:scale-[0.96] transition-colors","aria-expanded":ne.value,"aria-haspopup":"true",onClick:Ro(r,["stop"]),onMouseenter:f[6]||(f[6]=$=>Ge($,V(N)("common.more")||"More")),onFocus:f[7]||(f[7]=$=>Ge($,V(N)("common.more")||"More")),onMouseleave:Be,onBlur:Be},[...f[16]||(f[16]=[qi('',1)])],40,ar),To(Wi,{name:"code-menu"},{default:Ut(()=>[ne.value?(G(),oe("div",{key:0,ref_key:"moreMenuRef",ref:we,class:"code-more-menu min-w-[10rem] p-1 bg-[hsl(var(--ms-popover))] text-[hsl(var(--ms-popover-foreground))] border border-[var(--code-border)] shadow-[var(--ms-shadow-popover)]",role:"menu"},[w.showFontSizeButtons&&w.enableFontSizeControl?(G(),oe(Fo,{key:0},[b("button",{type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] disabled:opacity-40 disabled:cursor-not-allowed transition-colors",disabled:pl.value,onClick:f[8]||(f[8]=$=>{V(vt)(!0),te("decreaseFont")})},[f[17]||(f[17]=b("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[b("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14"})],-1)),b("span",null,Me(V(N)("common.fontSmaller")||"Font size −"),1)],8,ur),b("button",{type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] disabled:opacity-40 disabled:cursor-not-allowed transition-colors",disabled:Vt.value,onClick:f[9]||(f[9]=$=>{V(vt)(!0),te("resetFont")})},[f[18]||(f[18]=b("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[b("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[b("path",{d:"M3 12a9 9 0 1 0 9-9a9.75 9.75 0 0 0-6.74 2.74L3 8"}),b("path",{d:"M3 3v5h5"})])],-1)),b("span",null,Me(V(N)("common.fontReset")||"Font size reset"),1)],8,sr),b("button",{type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] disabled:opacity-40 disabled:cursor-not-allowed transition-colors",disabled:Gt.value,onClick:f[10]||(f[10]=$=>{V(vt)(!0),te("increaseFont")})},[f[19]||(f[19]=b("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[b("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14m-7-7v14"})],-1)),b("span",null,Me(V(N)("common.fontLarger")||"Font size +"),1)],8,dr)],64)):ye("",!0),w.showExpandButton?(G(),oe("button",{key:1,type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] transition-colors",onClick:f[11]||(f[11]=$=>{E(),te("toggleExpand")})},[x.isExpanded?(G(),oe("svg",cr,[...f[20]||(f[20]=[b("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m14 10l7-7m-1 7h-6V4M3 21l7-7m-6 0h6v6"},null,-1)])])):(G(),oe("svg",fr,[...f[21]||(f[21]=[b("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 3h6v6m0-6l-7 7M3 21l7-7m-1 7H3v-6"},null,-1)])])),b("span",null,Me(x.isExpanded?V(N)("common.collapse")||"Collapse":V(N)("common.expand")||"Expand"),1)])):ye("",!0),x.isPreviewable&&w.showPreviewButton?(G(),oe("button",{key:2,type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] transition-colors",onClick:f[12]||(f[12]=$=>{E(),te("preview")})},[f[22]||(f[22]=b("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[b("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[b("path",{d:"M2.062 12.348a1 1 0 0 1 0-.696a10.75 10.75 0 0 1 19.876 0a1 1 0 0 1 0 .696a10.75 10.75 0 0 1-19.876 0"}),b("circle",{cx:"12",cy:"12",r:"3"})])],-1)),b("span",null,Me(V(N)("common.preview")||"Preview"),1)])):ye("",!0)],512)):ye("",!0)]),_:1})])):ye("",!0)])])])):ye("",!0),cl(b("div",{class:mt(["code-block-shell-content",{"code-block-shell-content--collapsed":x.isCollapsed}])},[pt(Y.$slots,"default")],2),[[fl,!!x.stream||!x.loading]]),cl(b("div",vr,[pt(Y.$slots,"loading",{},()=>[f[23]||(f[23]=b("div",{class:"loading-skeleton"},[b("div",{class:"skeleton-line"}),b("div",{class:"skeleton-line"}),b("div",{class:"skeleton-line short"})],-1))])],512),[[fl,!x.stream&&x.loading]]),b("span",mr,Me(x.copyText?V(N)("common.copied")||"Copied":""),1)],64))}}),hr={class:"html-preview-frame__header"},gr={class:"html-preview-frame__title"},yr={class:"html-preview-frame__label"},wr=["sandbox","srcdoc"],br=zo(vl({__name:"HtmlPreviewFrame",props:{code:{},isDark:{type:Boolean},htmlPreviewAllowScripts:{type:Boolean},htmlPreviewSandbox:{},onClose:{type:Function},title:{}},setup(x){const M=x,w=import.meta!==void 0&&!1;let te=null;const{t:ne}=ml(),we=k(()=>{const E=M.code||"",z=E.trim().toLowerCase();return z.startsWith(" +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-B-GhLu-7.js","assets/index-XmhyfFRf.js","assets/index-CZhX7oJU.css"])))=>i.map(i=>d[i]); +import{bR as xi,cb as Si,bQ as zo,M as vl,bl as Ci,af as dl,bY as Mi,cc as Bi,b$ as ml,aU as O,c0 as Ei,c1 as Fi,c2 as Pi,a0 as Co,aD as Ho,bE as ae,az as Li,cd as hn,c8 as vt,aI as No,aL as G,s as bn,aw as It,au as mt,bk as V,ce as Mo,u as oe,I as To,A as Oi,bJ as Ut,aY as pt,bL as cl,v as b,t as ye,bB as fl,bb as Me,q as k,b7 as $i,cf as zi,cg as gn,ch as Hi,ci as Ni,cj as Ti,ck as Ri,as as j,cl as Bo,cm as Di,cn as Ai,co as jt,cp as Eo,bO as Ro,T as ji,G as qi,F as Fo,g as Wi,c7 as _i,b_ as Ii}from"./index-XmhyfFRf.js";import{i as fe,t as yn}from"./safeRaf-DGuzXxDK.js";var wn=(x,M,w)=>new Promise((te,ne)=>{var we=E=>{try{r(w.next(E))}catch(z){ne(z)}},be=E=>{try{r(w.throw(E))}catch(z){ne(z)}},r=E=>E.done?te(E.value):Promise.resolve(E.value).then(we,be);r((w=w.apply(x,M)).next())});let Po=!1,qt=null,Wt=null,_t=null;function Ui(){return wn(this,null,function*(){if(_t)return _t;_t=wn(null,null,function*(){if(!Wt)try{if(Wt=(function(x){const M=x;if(typeof M?.useMonaco=="function")return M;const w=x?.default;return typeof w?.useMonaco=="function"?w:null})(yield xi(()=>import("./index-B-GhLu-7.js"),__vite__mapDeps([0,1,2]))),!Wt)return null}catch{return null}try{return yield(function(x){return wn(this,null,function*(){return Po?void 0:qt||(qt=wn(null,null,function*(){const w=globalThis?.MonacoEnvironment;w&&(typeof w.getWorker=="function"||typeof w.getWorkerUrl=="function")||typeof x?.preloadMonacoWorkers!="function"||(yield x.preloadMonacoWorkers()),Po=!0}).finally(()=>{qt=null}),qt)})})(Wt),Si(),Wt}catch{return null}});try{return yield _t}finally{_t=null}})}var Vi=Object.defineProperty,Gi=Object.defineProperties,Ji=Object.getOwnPropertyDescriptors,Lo=Object.getOwnPropertySymbols,Yi=Object.prototype.hasOwnProperty,Qi=Object.prototype.propertyIsEnumerable,Oo=(x,M,w)=>M in x?Vi(x,M,{enumerable:!0,configurable:!0,writable:!0,value:w}):x[M]=w,I=(x,M)=>{for(var w in M||(M={}))Yi.call(M,w)&&Oo(x,w,M[w]);if(Lo)for(var w of Lo(M))Qi.call(M,w)&&Oo(x,w,M[w]);return x},Ce=(x,M)=>Gi(x,Ji(M)),q=(x,M,w)=>new Promise((te,ne)=>{var we=E=>{try{r(w.next(E))}catch(z){ne(z)}},be=E=>{try{r(w.throw(E))}catch(z){ne(z)}},r=E=>E.done?te(E.value):Promise.resolve(E.value).then(we,be);r((w=w.apply(x,M)).next())});const Xi={key:0,class:"code-block-header flex justify-between items-center border-b px-[var(--ms-inset-panel-x)] py-[var(--ms-inset-panel-y)] border-[var(--code-border)] bg-[var(--code-header-bg)] text-[var(--code-fg)]"},Ki={class:"flex items-center gap-0.5"},Zi=["aria-label"],er={class:"code-diff-stat removed"},tr={class:"code-diff-stat added"},nr=["aria-label"],lr={key:0,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},or={key:1,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},ir=["aria-pressed"],rr={key:3,class:"relative"},ar=["aria-expanded"],ur=["disabled"],sr=["disabled"],dr=["disabled"],cr={key:0,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},fr={key:1,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},vr={class:"code-loading-placeholder"},mr={class:"sr-only","aria-live":"polite",role:"status"},pr=vl({__name:"CodeBlockShell",props:{showHeader:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},showFontSizeButtons:{type:Boolean,default:!0},enableFontSizeControl:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExpandButton:{type:Boolean,default:!0},showPreviewButton:{type:Boolean,default:!0},showTooltips:{type:Boolean,default:!0},isDark:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},stream:{type:Boolean,default:!1},isCollapsed:{type:Boolean,default:!1},isExpanded:{type:Boolean,default:!1},copyText:{type:Boolean,default:!1},isPreviewable:{type:Boolean,default:!1},codeFontSize:{},codeFontMin:{},codeFontMax:{},defaultCodeFontSize:{},fontBaselineReady:{type:Boolean,default:!1},diffStats:{},diffStatsAriaLabel:{}},emits:["toggleCollapse","decreaseFont","resetFont","increaseFont","copy","toggleExpand","preview"],setup(x,{emit:M}){const w=x,te=M,ne=O(!1),we=O(null),be=O(null);function r(){vt(!0),ne.value=!ne.value,ne.value&&document.addEventListener("click",z,{once:!0,capture:!0})}function E(){vt(!0),ne.value=!1}function z(Y){var f,$;const yt=Y.target;(f=we.value)!=null&&f.contains(yt)||($=be.value)!=null&&$.contains(yt)?document.addEventListener("click",z,{once:!0,capture:!0}):E()}const ie=k(()=>w.showFontSizeButtons&&w.enableFontSizeControl||w.showExpandButton||w.isPreviewable&&w.showPreviewButton),{t:N}=ml(),ht=k(()=>w.showTooltips!==!1);function Ge(Y,f){ht.value&&_i(Y.currentTarget,f,"top",!1,void 0,w.isDark)}function Be(){ht.value&&vt()}function gt(Y){Ge(Y,w.copyText?N("common.copied")||"Copied":N("common.copy")||"Copy")}const pl=k(()=>{var Y,f;return!!Number.isFinite(w.codeFontSize)&&((Y=w.codeFontSize)!=null?Y:0)<=((f=w.codeFontMin)!=null?f:0)}),Vt=k(()=>!w.fontBaselineReady||w.codeFontSize===w.defaultCodeFontSize),Gt=k(()=>{var Y,f;return!!Number.isFinite(w.codeFontSize)&&((Y=w.codeFontSize)!=null?Y:0)>=((f=w.codeFontMax)!=null?f:100)});return(Y,f)=>(G(),oe(Fo,null,[w.showHeader?(G(),oe("div",Xi,[pt(Y.$slots,"header-left"),pt(Y.$slots,"header-right",{},()=>[b("div",Ki,[x.diffStats?(G(),oe("div",{key:0,class:"code-diff-stats","aria-label":x.diffStatsAriaLabel},[b("span",er,"-"+Me(x.diffStats.removed),1),b("span",tr,"+"+Me(x.diffStats.added),1)],8,Zi)):ye("",!0),w.showCopyButton?(G(),oe("button",{key:1,type:"button",class:"code-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded leading-none shrink-0 cursor-pointer text-[var(--code-action-fg)] hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] active:scale-[0.96] disabled:opacity-40 disabled:cursor-not-allowed transition-colors","aria-label":x.copyText?V(N)("common.copied")||"Copied":V(N)("common.copy")||"Copy",onClick:f[0]||(f[0]=$=>te("copy")),onMouseenter:f[1]||(f[1]=$=>gt($)),onFocus:f[2]||(f[2]=$=>gt($)),onMouseleave:Be,onBlur:Be},[x.copyText?(G(),oe("svg",or,[...f[14]||(f[14]=[b("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M20 6L9 17l-5-5"},null,-1)])])):(G(),oe("svg",lr,[...f[13]||(f[13]=[b("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[b("rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}),b("path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"})],-1)])]))],40,nr)):ye("",!0),w.showCollapseButton?(G(),oe("button",{key:2,type:"button",class:"code-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded leading-none shrink-0 cursor-pointer text-[var(--code-action-fg)] hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] active:scale-[0.96] disabled:opacity-40 disabled:cursor-not-allowed transition-colors","aria-pressed":x.isCollapsed,onClick:f[3]||(f[3]=$=>te("toggleCollapse")),onMouseenter:f[4]||(f[4]=$=>Ge($,x.isCollapsed?V(N)("common.expand")||"Expand":V(N)("common.collapse")||"Collapse")),onFocus:f[5]||(f[5]=$=>Ge($,x.isCollapsed?V(N)("common.expand")||"Expand":V(N)("common.collapse")||"Collapse")),onMouseleave:Be,onBlur:Be},[(G(),oe("svg",{style:It({rotate:x.isCollapsed?"0deg":"90deg"}),xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[...f[15]||(f[15]=[b("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m9 18l6-6l-6-6"},null,-1)])],4))],40,ir)):ye("",!0),ie.value?(G(),oe("div",rr,[b("button",{ref_key:"moreBtnRef",ref:be,type:"button",class:"code-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded leading-none shrink-0 cursor-pointer text-[var(--code-action-fg)] hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] active:scale-[0.96] transition-colors","aria-expanded":ne.value,"aria-haspopup":"true",onClick:Ro(r,["stop"]),onMouseenter:f[6]||(f[6]=$=>Ge($,V(N)("common.more")||"More")),onFocus:f[7]||(f[7]=$=>Ge($,V(N)("common.more")||"More")),onMouseleave:Be,onBlur:Be},[...f[16]||(f[16]=[qi('',1)])],40,ar),To(Wi,{name:"code-menu"},{default:Ut(()=>[ne.value?(G(),oe("div",{key:0,ref_key:"moreMenuRef",ref:we,class:"code-more-menu min-w-[10rem] p-1 bg-[hsl(var(--ms-popover))] text-[hsl(var(--ms-popover-foreground))] border border-[var(--code-border)] shadow-[var(--ms-shadow-popover)]",role:"menu"},[w.showFontSizeButtons&&w.enableFontSizeControl?(G(),oe(Fo,{key:0},[b("button",{type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] disabled:opacity-40 disabled:cursor-not-allowed transition-colors",disabled:pl.value,onClick:f[8]||(f[8]=$=>{V(vt)(!0),te("decreaseFont")})},[f[17]||(f[17]=b("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[b("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14"})],-1)),b("span",null,Me(V(N)("common.fontSmaller")||"Font size −"),1)],8,ur),b("button",{type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] disabled:opacity-40 disabled:cursor-not-allowed transition-colors",disabled:Vt.value,onClick:f[9]||(f[9]=$=>{V(vt)(!0),te("resetFont")})},[f[18]||(f[18]=b("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[b("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[b("path",{d:"M3 12a9 9 0 1 0 9-9a9.75 9.75 0 0 0-6.74 2.74L3 8"}),b("path",{d:"M3 3v5h5"})])],-1)),b("span",null,Me(V(N)("common.fontReset")||"Font size reset"),1)],8,sr),b("button",{type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] disabled:opacity-40 disabled:cursor-not-allowed transition-colors",disabled:Gt.value,onClick:f[10]||(f[10]=$=>{V(vt)(!0),te("increaseFont")})},[f[19]||(f[19]=b("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[b("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14m-7-7v14"})],-1)),b("span",null,Me(V(N)("common.fontLarger")||"Font size +"),1)],8,dr)],64)):ye("",!0),w.showExpandButton?(G(),oe("button",{key:1,type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] transition-colors",onClick:f[11]||(f[11]=$=>{E(),te("toggleExpand")})},[x.isExpanded?(G(),oe("svg",cr,[...f[20]||(f[20]=[b("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m14 10l7-7m-1 7h-6V4M3 21l7-7m-6 0h6v6"},null,-1)])])):(G(),oe("svg",fr,[...f[21]||(f[21]=[b("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 3h6v6m0-6l-7 7M3 21l7-7m-1 7H3v-6"},null,-1)])])),b("span",null,Me(x.isExpanded?V(N)("common.collapse")||"Collapse":V(N)("common.expand")||"Expand"),1)])):ye("",!0),x.isPreviewable&&w.showPreviewButton?(G(),oe("button",{key:2,type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] transition-colors",onClick:f[12]||(f[12]=$=>{E(),te("preview")})},[f[22]||(f[22]=b("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[b("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[b("path",{d:"M2.062 12.348a1 1 0 0 1 0-.696a10.75 10.75 0 0 1 19.876 0a1 1 0 0 1 0 .696a10.75 10.75 0 0 1-19.876 0"}),b("circle",{cx:"12",cy:"12",r:"3"})])],-1)),b("span",null,Me(V(N)("common.preview")||"Preview"),1)])):ye("",!0)],512)):ye("",!0)]),_:1})])):ye("",!0)])])])):ye("",!0),cl(b("div",{class:mt(["code-block-shell-content",{"code-block-shell-content--collapsed":x.isCollapsed}])},[pt(Y.$slots,"default")],2),[[fl,!!x.stream||!x.loading]]),cl(b("div",vr,[pt(Y.$slots,"loading",{},()=>[f[23]||(f[23]=b("div",{class:"loading-skeleton"},[b("div",{class:"skeleton-line"}),b("div",{class:"skeleton-line"}),b("div",{class:"skeleton-line short"})],-1))])],512),[[fl,!x.stream&&x.loading]]),b("span",mr,Me(x.copyText?V(N)("common.copied")||"Copied":""),1)],64))}}),hr={class:"html-preview-frame__header"},gr={class:"html-preview-frame__title"},yr={class:"html-preview-frame__label"},wr=["sandbox","srcdoc"],br=zo(vl({__name:"HtmlPreviewFrame",props:{code:{},isDark:{type:Boolean},htmlPreviewAllowScripts:{type:Boolean},htmlPreviewSandbox:{},onClose:{type:Function},title:{}},setup(x){const M=x,w=import.meta!==void 0&&!1;let te=null;const{t:ne}=ml(),we=k(()=>{const E=M.code||"",z=E.trim().toLowerCase();return z.startsWith(" diff --git a/apps/pythinker-code/dist-web/assets/DesignSystemView-CNvCSVFt.js b/apps/pythinker-code/dist-web/assets/DesignSystemView-DX1VEaZQ.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/DesignSystemView-CNvCSVFt.js rename to apps/pythinker-code/dist-web/assets/DesignSystemView-DX1VEaZQ.js index 6ad1d1ff4..fed780cda 100644 --- a/apps/pythinker-code/dist-web/assets/DesignSystemView-CNvCSVFt.js +++ b/apps/pythinker-code/dist-web/assets/DesignSystemView-DX1VEaZQ.js @@ -1,4 +1,4 @@ -import{M as x,aD as k,aI as C,aL as d,u as s,v as t,G as e,H as o,F as f,aX as g,bb as m,I as r,cx as z,bk as T,cy as S,cz as b,cA as B}from"./index-D9Nz1t7z.js";const q={class:"ds-page"},I={class:"layout"},A={class:"content"},M={class:"content-inner"},H={id:"tokens"},L={class:"icon-sizes"},V={class:"sz"},D={class:"p-ic",style:{width:"14px",height:"14px"},viewBox:"0 0 24 24",fill:"currentColor"},P={class:"sz"},U={class:"p-ic",style:{width:"16px",height:"16px"},viewBox:"0 0 24 24",fill:"currentColor"},W={class:"sz"},R={class:"p-ic",style:{width:"20px",height:"20px"},viewBox:"0 0 24 24",fill:"currentColor"},N={class:"icon-grid"},O={class:"icon-group-label"},E={class:"ic-name"},j={id:"primitives"},F={class:"stage-wrap"},K={class:"stage p col"},_={class:"demo-row"},G={class:"p-btn primary disabled"},J={class:"p-spinner sm",viewBox:"0 0 24 24",style:{"--p-accent":"#fff","--p-line":"rgba(255,255,255,.35)"}},Q={class:"stage-wrap"},Y={class:"stage p col"},X={class:"demo-row",style:{"font-size":"22px","line-height":"1"}},Z={class:"demo-row"},$={class:"p-thinking"},aa={class:"p-thinking"},ta={class:"stage-wrap"},da={class:"stage p col",style:{gap:"0",background:"var(--p-surface)",padding:"0","max-width":"300px","align-items":"stretch"}},sa={style:{display:"flex","align-items":"center",gap:"8px",padding:"7px 10px",margin:"1px 6px","border-radius":"8px",color:"var(--p-text)","font-size":"13px"}},ea={style:{color:"var(--d-fg-faint)",flex:"none"},width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor"},oa={style:{display:"flex","align-items":"center",gap:"8px",padding:"7px 10px",margin:"1px 6px","border-radius":"8px",color:"var(--p-text)","font-size":"13px"}},ia={style:{color:"var(--d-fg-faint)",flex:"none"},width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor"},la={id:"chat"},na={class:"stage-wrap"},ca={class:"stage p col",style:{"align-items":"center",background:"#fff"}},va={class:"demo-chat"},ra={class:"p-thinking"},ba={class:"p-action"},fa={class:"p-action-head"},pa={class:"p-ic",style:{color:"var(--p-accent)"},viewBox:"0 0 24 24",fill:"currentColor"},ha={class:"p-action warn"},ua={class:"p-action-head"},ga={class:"p-ic",style:{color:"var(--p-warning)"},viewBox:"0 0 24 24",fill:"currentColor"},ma=x({__name:"DesignSystemView",emits:["close"],setup(wa,{emit:w}){const y=w;function p(){y("close")}let v=null;function h(c){c.key==="Escape"&&p()}return k(()=>{document.addEventListener("keydown",h);const c=Array.prototype.slice.call(document.querySelectorAll('#nav a[href^="#"]')),a=new Map;c.forEach(n=>{const i=n.getAttribute("href");if(!i)return;const u=document.getElementById(i.slice(1));u&&a.set(u,n)});let l=null;v=new IntersectionObserver(n=>{n.forEach(i=>{i.isIntersecting&&(l&&l.classList.remove("active"),l=a.get(i.target)??null,l&&l.classList.add("active"))})},{rootMargin:"-20% 0px -70% 0px",threshold:0}),a.forEach((n,i)=>v.observe(i)),c.length&&c[0].classList.add("active")}),C(()=>{document.removeEventListener("keydown",h),v&&(v.disconnect(),v=null)}),(c,a)=>(d(),s("div",q,[t("div",{class:"ds-topbar"},[t("button",{class:"ds-back",type:"button",onClick:p},"← Back"),a[0]||(a[0]=t("span",{class:"ds-topbar-title"},"Design system",-1))]),t("div",I,[a[46]||(a[46]=e('',1)),t("main",A,[t("div",M,[a[44]||(a[44]=e('
● Design System · v1.0

Pythinker Web Design System

This document defines the visual language and component specification for Pythinker Web — design tokens, component primitives, the chat interface, theming, and style rules. All UI work is grounded in it: unified, restrained, token-driven, and themeable.

Scope apps/pythinker-webComponent primitivesTheme 1 set · 4 customizable colorsLight / dark mode
i
This spec is the single reference when changing the web UI. Before adding or modifying a component, style, layout, or theme, read this document first; color, font, radius, spacing, shadow, z-index, and motion always use the §02 tokens, components reuse the §03 primitives, and the §06 style rules are followed.
01

Design Principles

Every UI decision traces back to the following principles. Pythinker Web is a local Agent tool for developers: quick scanning, long stretches of staring, often in the dark — the design serves the task, and is restrained, clinical, and density-first.

  • Consistency —— The same semantics use the same component. The primary button, dialog, input, and badge should each have exactly "one" correct way to be written across the entire site.
  • Hierarchy —— Build a clear hierarchy through size, weight, color, and whitespace; emphasize through "restraint" rather than "bolder and bigger".
  • Proximity —— Group related elements, leave whitespace between unrelated ones. A card's padding, line spacing, and group spacing all come from the same spacing scale.
  • Feedback —— hover / active / focus / loading / success / error all have visible states, and the state language is unified.
  • Breathing room —— Control density with the spacing scale rather than arbitrary pixels; prefer restrained whitespace over cramming controls together.
  • Accessibility (A11y) —— Text contrast ≥ 4.5:1, visible focus rings, touch targets ≥ 32px, and states that don't rely on color alone.
  • Reduction —— The number of colors, radii, shadow levels, and type sizes all converge to a finite set of tokens; delete stray values.
Brand tone (the do-not list): calm, clinical, never exaggerated. Reject purple gradients, glassmorphism, glowing shadows, AI purple / blue glows, endlessly looping fussy micro-animations, "Boost your productivity"-style marketing copy, and using emoji as icons. These are all common tells of AI-generated interfaces (an "AI tell"), deliberately avoided.
i
Declare design intent first (Design Read): before adding a component / page, write one sentence describing its scenario, audience, and tone (for example, "a lightweight tool card embedded in a conversation, for developers, calm and restrained"), then build. If the intent isn't clear, ask one question first rather than defaulting to the nearest existing style.
',2)),t("section",H,[a[7]||(a[7]=e(`
02

Design Tokens

Collapse every visual decision into tokens. Color tokens keep the existing short names and fill out the semantics (lowering migration cost), while spacing, z-index, motion, and font-weight fill in the scales that are currently missing. Every token has: name, light value, dark value, and usage.

i
Naming convention: --<category>-<role>-<state>. For example --color-text-muted, --radius-md, --space-4. To reduce churn, the existing short names (--bg / --ink / --line / --blue …) are kept as compatibility aliases for one release cycle.

Color

Semantic-first, in three layers: background / text / border + accent + status colors. All colors are defined in light / dark pairs, with contrast ≥ 4.5:1.

i
The table below shows the derived semantic tokens. The neutrals and the accent are derived from the 4 color seeds in §05 — for example --color-accent comes from --accent-primary, and --color-bg comes from the current light / dark surface. The semantic status colors (success / warning / danger / info) are independent palettes paired with the seeds, one set each for light / dark; they are not auto-derived from the seeds. Day-to-day reskinning usually only needs the 4 seeds, with the status colors fine-tuned as needed.
bg
#ffffff / #121212
surface
#fafbfc / #1f1f1f
surface-sunken
#f3f5f8 / #121212
selected
#eceff3 / #2d333b
fg
#14171c / #e8eaed
fg-muted
#6b7280 / #9aa0a8
line
#e7eaee / #2d333b
accent (KMBlue)
#1783ff / #58a6ff
accent-soft
#e8f3ff / rgba(88,166,255,.14)
TokenLightDarkUsage
--color-bg#ffffff#121212Page background
--color-surface#fafbfc#1f1f1fPanel / sidebar / card head
--color-surface-raised#ffffff#292929Raised card / dialog / input
--color-text#14171c#e8eaedBody text / headings
--color-text-muted#6b7280#9aa0a8Secondary text / placeholder
--color-line#e7eaee#2d333bDivider / card border
--color-selected#00000014#ffffff14Neutral selected fill (sidebar rows, list pickers) — translucent, never accent-tinted
--color-hover#0000000d#ffffff0dRow hover wash — lighter than the selected fill (hover < selected); translucent, sits on any surface
--color-media-alpha-bg-1≈#858585≈#676b72Checkerboard square A of the <img> alpha canvas — color-mix of --color-bg/--color-text (52/48); applied via --media-alpha-canvas (16px period)
--color-media-alpha-bg-2≈#6b6b6b≈#7a7e85Checkerboard square B (42/58) — both squares stay ≥3:1 against white and black; opaque images cover the canvas
--color-sidebar-bg#e9eaf2#2c343aSidebar solid composite (row masks / overlays). The visible sidebar surface is the frost pair --color-sidebar-glass + --sidebar-wash blurred by --p-sidebar-backdrop
--color-accent#1783ff#58a6ffPrimary action / link / focus
--color-success#0e7a38#3fb950Success / pass
--color-warning#a9610a#d29922Warning / pending
--color-danger#c0392b#f85149Danger / error / abort

Surface usage

The four surface layers each have a role — choose by "raised layer / default flat layer / sunken layer / page background", and avoid treating --p-surface-raised as a universal background.

TokenLightDarkUsage
--p-surface-raised#ffffff#292929Raised card / dialog / input (raised layer)
--p-surface#fafbfc#1f1f1fPanel / sidebar / card head (default flat layer)
--p-surface-sunken#f3f5f8#121212Code block / inline input / recessed area (sunken layer)
--p-bg#ffffff#121212Page background

Focus ring

All focusable controls (button, input, link, menu item, switch, checkbox) use the focus-ring token uniformly; do not hand-write a box-shadow focus ring.

TokenValueUsage
--p-focus-ring0 0 0 3px var(--p-accent-soft)Default focus ring (link, menu item, switch, checkbox)
--p-focus-ring-strong0 0 0 3px var(--p-accent-soft), 0 0 0 1px var(--p-accent)Strong focus ring (button, primary action)

Text selection

The text-selection color uses --p-selection uniformly (light rgba(23,131,255,.18) / dark rgba(88,166,255,.32)), applied by the global ::selection rule; do not set a separate highlight background.

Disabled state

All disabled controls use opacity:.5 + cursor:not-allowed uniformly; do not separately grey out or recolor.

Font families

Pythinker Web uses two font families: --font-ui (UI and body, Inter first) and --font-mono (code and monospace). Components always reference the variables; do not hard-code font names.

--font-ui · UI & body (Inter first)

Body and UI use self-hosted Inter as the primary face. CJK and platform system UI fonts sit late in the fallback chain so Latin glyphs resolve to Inter while Chinese text can fall through to native CJK fonts:

--font-ui
--font-ui: "Inter Variable", "Inter", "Helvetica Neue", Arial,
+import{M as x,aD as k,aI as C,aL as d,u as s,v as t,G as e,H as o,F as f,aX as g,bb as m,I as r,cx as z,bk as T,cy as S,cz as b,cA as B}from"./index-XmhyfFRf.js";const q={class:"ds-page"},I={class:"layout"},A={class:"content"},M={class:"content-inner"},H={id:"tokens"},L={class:"icon-sizes"},V={class:"sz"},D={class:"p-ic",style:{width:"14px",height:"14px"},viewBox:"0 0 24 24",fill:"currentColor"},P={class:"sz"},U={class:"p-ic",style:{width:"16px",height:"16px"},viewBox:"0 0 24 24",fill:"currentColor"},W={class:"sz"},R={class:"p-ic",style:{width:"20px",height:"20px"},viewBox:"0 0 24 24",fill:"currentColor"},N={class:"icon-grid"},O={class:"icon-group-label"},E={class:"ic-name"},j={id:"primitives"},F={class:"stage-wrap"},K={class:"stage p col"},_={class:"demo-row"},G={class:"p-btn primary disabled"},J={class:"p-spinner sm",viewBox:"0 0 24 24",style:{"--p-accent":"#fff","--p-line":"rgba(255,255,255,.35)"}},Q={class:"stage-wrap"},Y={class:"stage p col"},X={class:"demo-row",style:{"font-size":"22px","line-height":"1"}},Z={class:"demo-row"},$={class:"p-thinking"},aa={class:"p-thinking"},ta={class:"stage-wrap"},da={class:"stage p col",style:{gap:"0",background:"var(--p-surface)",padding:"0","max-width":"300px","align-items":"stretch"}},sa={style:{display:"flex","align-items":"center",gap:"8px",padding:"7px 10px",margin:"1px 6px","border-radius":"8px",color:"var(--p-text)","font-size":"13px"}},ea={style:{color:"var(--d-fg-faint)",flex:"none"},width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor"},oa={style:{display:"flex","align-items":"center",gap:"8px",padding:"7px 10px",margin:"1px 6px","border-radius":"8px",color:"var(--p-text)","font-size":"13px"}},ia={style:{color:"var(--d-fg-faint)",flex:"none"},width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor"},la={id:"chat"},na={class:"stage-wrap"},ca={class:"stage p col",style:{"align-items":"center",background:"#fff"}},va={class:"demo-chat"},ra={class:"p-thinking"},ba={class:"p-action"},fa={class:"p-action-head"},pa={class:"p-ic",style:{color:"var(--p-accent)"},viewBox:"0 0 24 24",fill:"currentColor"},ha={class:"p-action warn"},ua={class:"p-action-head"},ga={class:"p-ic",style:{color:"var(--p-warning)"},viewBox:"0 0 24 24",fill:"currentColor"},ma=x({__name:"DesignSystemView",emits:["close"],setup(wa,{emit:w}){const y=w;function p(){y("close")}let v=null;function h(c){c.key==="Escape"&&p()}return k(()=>{document.addEventListener("keydown",h);const c=Array.prototype.slice.call(document.querySelectorAll('#nav a[href^="#"]')),a=new Map;c.forEach(n=>{const i=n.getAttribute("href");if(!i)return;const u=document.getElementById(i.slice(1));u&&a.set(u,n)});let l=null;v=new IntersectionObserver(n=>{n.forEach(i=>{i.isIntersecting&&(l&&l.classList.remove("active"),l=a.get(i.target)??null,l&&l.classList.add("active"))})},{rootMargin:"-20% 0px -70% 0px",threshold:0}),a.forEach((n,i)=>v.observe(i)),c.length&&c[0].classList.add("active")}),C(()=>{document.removeEventListener("keydown",h),v&&(v.disconnect(),v=null)}),(c,a)=>(d(),s("div",q,[t("div",{class:"ds-topbar"},[t("button",{class:"ds-back",type:"button",onClick:p},"← Back"),a[0]||(a[0]=t("span",{class:"ds-topbar-title"},"Design system",-1))]),t("div",I,[a[46]||(a[46]=e('',1)),t("main",A,[t("div",M,[a[44]||(a[44]=e('
● Design System · v1.0

Pythinker Web Design System

This document defines the visual language and component specification for Pythinker Web — design tokens, component primitives, the chat interface, theming, and style rules. All UI work is grounded in it: unified, restrained, token-driven, and themeable.

Scope apps/pythinker-webComponent primitivesTheme 1 set · 4 customizable colorsLight / dark mode
i
This spec is the single reference when changing the web UI. Before adding or modifying a component, style, layout, or theme, read this document first; color, font, radius, spacing, shadow, z-index, and motion always use the §02 tokens, components reuse the §03 primitives, and the §06 style rules are followed.
01

Design Principles

Every UI decision traces back to the following principles. Pythinker Web is a local Agent tool for developers: quick scanning, long stretches of staring, often in the dark — the design serves the task, and is restrained, clinical, and density-first.

  • Consistency —— The same semantics use the same component. The primary button, dialog, input, and badge should each have exactly "one" correct way to be written across the entire site.
  • Hierarchy —— Build a clear hierarchy through size, weight, color, and whitespace; emphasize through "restraint" rather than "bolder and bigger".
  • Proximity —— Group related elements, leave whitespace between unrelated ones. A card's padding, line spacing, and group spacing all come from the same spacing scale.
  • Feedback —— hover / active / focus / loading / success / error all have visible states, and the state language is unified.
  • Breathing room —— Control density with the spacing scale rather than arbitrary pixels; prefer restrained whitespace over cramming controls together.
  • Accessibility (A11y) —— Text contrast ≥ 4.5:1, visible focus rings, touch targets ≥ 32px, and states that don't rely on color alone.
  • Reduction —— The number of colors, radii, shadow levels, and type sizes all converge to a finite set of tokens; delete stray values.
Brand tone (the do-not list): calm, clinical, never exaggerated. Reject purple gradients, glassmorphism, glowing shadows, AI purple / blue glows, endlessly looping fussy micro-animations, "Boost your productivity"-style marketing copy, and using emoji as icons. These are all common tells of AI-generated interfaces (an "AI tell"), deliberately avoided.
i
Declare design intent first (Design Read): before adding a component / page, write one sentence describing its scenario, audience, and tone (for example, "a lightweight tool card embedded in a conversation, for developers, calm and restrained"), then build. If the intent isn't clear, ask one question first rather than defaulting to the nearest existing style.
',2)),t("section",H,[a[7]||(a[7]=e(`
02

Design Tokens

Collapse every visual decision into tokens. Color tokens keep the existing short names and fill out the semantics (lowering migration cost), while spacing, z-index, motion, and font-weight fill in the scales that are currently missing. Every token has: name, light value, dark value, and usage.

i
Naming convention: --<category>-<role>-<state>. For example --color-text-muted, --radius-md, --space-4. To reduce churn, the existing short names (--bg / --ink / --line / --blue …) are kept as compatibility aliases for one release cycle.

Color

Semantic-first, in three layers: background / text / border + accent + status colors. All colors are defined in light / dark pairs, with contrast ≥ 4.5:1.

i
The table below shows the derived semantic tokens. The neutrals and the accent are derived from the 4 color seeds in §05 — for example --color-accent comes from --accent-primary, and --color-bg comes from the current light / dark surface. The semantic status colors (success / warning / danger / info) are independent palettes paired with the seeds, one set each for light / dark; they are not auto-derived from the seeds. Day-to-day reskinning usually only needs the 4 seeds, with the status colors fine-tuned as needed.
bg
#ffffff / #121212
surface
#fafbfc / #1f1f1f
surface-sunken
#f3f5f8 / #121212
selected
#eceff3 / #2d333b
fg
#14171c / #e8eaed
fg-muted
#6b7280 / #9aa0a8
line
#e7eaee / #2d333b
accent (KMBlue)
#1783ff / #58a6ff
accent-soft
#e8f3ff / rgba(88,166,255,.14)
TokenLightDarkUsage
--color-bg#ffffff#121212Page background
--color-surface#fafbfc#1f1f1fPanel / sidebar / card head
--color-surface-raised#ffffff#292929Raised card / dialog / input
--color-text#14171c#e8eaedBody text / headings
--color-text-muted#6b7280#9aa0a8Secondary text / placeholder
--color-line#e7eaee#2d333bDivider / card border
--color-selected#00000014#ffffff14Neutral selected fill (sidebar rows, list pickers) — translucent, never accent-tinted
--color-hover#0000000d#ffffff0dRow hover wash — lighter than the selected fill (hover < selected); translucent, sits on any surface
--color-media-alpha-bg-1≈#858585≈#676b72Checkerboard square A of the <img> alpha canvas — color-mix of --color-bg/--color-text (52/48); applied via --media-alpha-canvas (16px period)
--color-media-alpha-bg-2≈#6b6b6b≈#7a7e85Checkerboard square B (42/58) — both squares stay ≥3:1 against white and black; opaque images cover the canvas
--color-sidebar-bg#e9eaf2#2c343aSidebar solid composite (row masks / overlays). The visible sidebar surface is the frost pair --color-sidebar-glass + --sidebar-wash blurred by --p-sidebar-backdrop
--color-accent#1783ff#58a6ffPrimary action / link / focus
--color-success#0e7a38#3fb950Success / pass
--color-warning#a9610a#d29922Warning / pending
--color-danger#c0392b#f85149Danger / error / abort

Surface usage

The four surface layers each have a role — choose by "raised layer / default flat layer / sunken layer / page background", and avoid treating --p-surface-raised as a universal background.

TokenLightDarkUsage
--p-surface-raised#ffffff#292929Raised card / dialog / input (raised layer)
--p-surface#fafbfc#1f1f1fPanel / sidebar / card head (default flat layer)
--p-surface-sunken#f3f5f8#121212Code block / inline input / recessed area (sunken layer)
--p-bg#ffffff#121212Page background

Focus ring

All focusable controls (button, input, link, menu item, switch, checkbox) use the focus-ring token uniformly; do not hand-write a box-shadow focus ring.

TokenValueUsage
--p-focus-ring0 0 0 3px var(--p-accent-soft)Default focus ring (link, menu item, switch, checkbox)
--p-focus-ring-strong0 0 0 3px var(--p-accent-soft), 0 0 0 1px var(--p-accent)Strong focus ring (button, primary action)

Text selection

The text-selection color uses --p-selection uniformly (light rgba(23,131,255,.18) / dark rgba(88,166,255,.32)), applied by the global ::selection rule; do not set a separate highlight background.

Disabled state

All disabled controls use opacity:.5 + cursor:not-allowed uniformly; do not separately grey out or recolor.

Font families

Pythinker Web uses two font families: --font-ui (UI and body, Inter first) and --font-mono (code and monospace). Components always reference the variables; do not hard-code font names.

--font-ui · UI & body (Inter first)

Body and UI use self-hosted Inter as the primary face. CJK and platform system UI fonts sit late in the fallback chain so Latin glyphs resolve to Inter while Chinese text can fall through to native CJK fonts:

--font-ui
--font-ui: "Inter Variable", "Inter", "Helvetica Neue", Arial,
       "PingFang SC", "Microsoft YaHei", "Noto Sans SC",
       -apple-system, BlinkMacSystemFont, "Segoe UI",
       Roboto, Ubuntu, sans-serif,
diff --git a/apps/pythinker-code/dist-web/assets/Tooltip-ZudMQ-r0.js b/apps/pythinker-code/dist-web/assets/Tooltip-CAafRFRN.js
similarity index 98%
rename from apps/pythinker-code/dist-web/assets/Tooltip-ZudMQ-r0.js
rename to apps/pythinker-code/dist-web/assets/Tooltip-CAafRFRN.js
index 87a40b245..a616c74b4 100644
--- a/apps/pythinker-code/dist-web/assets/Tooltip-ZudMQ-r0.js
+++ b/apps/pythinker-code/dist-web/assets/Tooltip-CAafRFRN.js
@@ -1 +1 @@
-import{bQ as A,M as H,aU as b,bE as V,az as J,aL as O,s as Q,v as R,I as F,bJ as G,bL as K,aw as L,H as W,bb as Z,bB as ee,g as te,au as le,T as ae,as as B,bR as ne}from"./index-D9Nz1t7z.js";var k=(h,E,e)=>new Promise((o,p)=>{var i=a=>{try{d(e.next(a))}catch(c){p(c)}},y=a=>{try{d(e.throw(a))}catch(c){p(c)}},d=a=>a.done?o(a.value):Promise.resolve(a.value).then(i,y);d((e=e.apply(h,E)).next())});const oe=["id"],ie=["data-placement"],ue=A(H({__name:"Tooltip",props:{visible:{type:Boolean},anchorEl:{},content:{},placement:{},offset:{},originX:{},originY:{},id:{},isDark:{type:[Boolean,null]}},setup(h){var E;const e=h,o=b(null),p=b(null),i=b({transform:"translate3d(0px, 0px, 0px)",left:"0px",top:"0px"}),y=b({}),d=b((E=e.placement)!=null?E:"top"),a=b(!1);let c=null,$=null,T=null,C=null,w=null,s=0;function X(){return C?Promise.resolve(C):(w||(w=ne(()=>import("./floating-ui.dom-xGUaHE3m.js"),[]).then(l=>(C=l,l)).catch(l=>{throw w=null,l})),w)}function D(){c&&(c(),c=null),$=null,T=null}function P(l){return k(this,null,function*(){const t=e.anchorEl,n=o.value;if(!e.visible||!t||!n||$===t&&T===n)return;const{autoUpdate:r}=yield X();l()&&e.visible&&e.anchorEl===t&&o.value===n&&(D(),$=t,T=n,c=r(t,n,()=>{N().catch(()=>{_()})}))})}function N(){return k(this,null,function*(){var l,t;const n=e.anchorEl,r=o.value;if(!e.visible||!n||!r)return!1;const{arrow:u,computePosition:m,flip:v,offset:f,shift:x}=yield X();if(!e.visible||e.anchorEl!==n||o.value!==r)return!1;const g=[f((l=e.offset)!=null?l:6),v(),x({padding:6}),...p.value?[u({element:p.value,padding:4})]:[]],{x:S,y:j,placement:Y,middlewareData:z}=yield m(n,r,{placement:(t=e.placement)!=null?t:"top",middleware:g,strategy:"fixed"});if(!e.visible||e.anchorEl!==n||o.value!==r)return!1;if(i.value.transform=`translate3d(${Math.round(S)}px, ${Math.round(j)}px, 0)`,i.value.left="0px",i.value.top="0px",d.value=Y,z.arrow&&p.value){const{x:I,y:U}=z.arrow,q={top:"bottom",bottom:"top",left:"right",right:"left"}[Y.split("-")[0]];y.value={left:I!=null?`${I}px`:"",top:U!=null?`${U}px`:"",[q]:"-3px"}}return!0})}function _(){var l,t;const n=e.anchorEl,r=o.value;if(!n||!r)return!1;const u=n.getBoundingClientRect(),m=r.getBoundingClientRect(),v=(l=e.offset)!=null?l:6,f=(t=e.placement)!=null?t:"top";let x=u.left,g=u.top;return f==="bottom"?g=u.bottom+v:f==="left"?x=u.left-m.width-v:f==="right"?x=u.right+v:g=u.top-m.height-v,i.value.transform=`translate3d(${Math.round(Math.max(0,x))}px, ${Math.round(Math.max(0,g))}px, 0)`,i.value.left="0px",i.value.top="0px",d.value=f,y.value={},!0}V(()=>e.visible,l=>k(null,null,function*(){const t=++s;if(l){if(a.value=!1,yield B(),t!==s||!e.visible)return;if(e.anchorEl&&o.value)try{const n=e.anchorEl,r=o.value,u=n.getBoundingClientRect();if(!(yield N())||t!==s||!e.visible||e.anchorEl!==n||o.value!==r)return;const m=i.value.transform;if(e.originX!=null&&e.originY!=null){const v=Math.abs(Number(e.originX)-u.left),f=Math.abs(Number(e.originY)-u.top);if(Math.hypot(v,f)>120){if(i.value.transform=`translate3d(${Math.round(e.originX)}px, ${Math.round(e.originY)}px, 0)`,yield B(),t!==s||!e.visible||(a.value=!0,yield B(),t!==s||!e.visible))return;i.value.transform=m}else a.value=!0}else a.value=!0;yield P(()=>t===s)}catch{if(t!==s||!e.visible)return;if(a.value=_(),e.anchorEl&&o.value)try{yield P(()=>t===s)}catch{}}else a.value=!0}else a.value=!1,D()}));let M=0;return V([()=>e.anchorEl,()=>e.placement,()=>e.content],()=>k(null,null,function*(){const l=++M;if(e.visible&&e.anchorEl&&o.value){if(yield B(),l!==M||!e.visible||!e.anchorEl||!o.value)return;try{const t=yield N();if(l!==M||!e.visible||!e.anchorEl||!o.value)return;t||_()}catch{_()}yield P(()=>l===M)}})),J(()=>{s+=1,D()}),(l,t)=>(O(),Q(ae,{to:"body"},[R("div",{class:le(["markstream-vue",{dark:h.isDark}])},[F(te,{name:"tooltip",appear:""},{default:G(()=>[K(R("div",{id:e.id,ref_key:"tooltip",ref:o,style:L({position:"fixed",left:i.value.left,top:i.value.top,transform:i.value.transform,visibility:a.value?"visible":"hidden",pointerEvents:a.value?void 0:"none"}),class:"tooltip-element",role:"tooltip"},[W(Z(h.content)+" ",1),R("div",{ref_key:"arrowEl",ref:p,class:"tooltip-arrow","data-placement":d.value,style:L(y.value)},null,12,ie)],12,oe),[[ee,h.visible]])]),_:1})],2)]))}}),[["__scopeId","data-v-c606ee4c"]]);export{ue as default};
+import{bQ as A,M as H,aU as b,bE as V,az as J,aL as O,s as Q,v as R,I as F,bJ as G,bL as K,aw as L,H as W,bb as Z,bB as ee,g as te,au as le,T as ae,as as B,bR as ne}from"./index-XmhyfFRf.js";var k=(h,E,e)=>new Promise((o,p)=>{var i=a=>{try{d(e.next(a))}catch(c){p(c)}},y=a=>{try{d(e.throw(a))}catch(c){p(c)}},d=a=>a.done?o(a.value):Promise.resolve(a.value).then(i,y);d((e=e.apply(h,E)).next())});const oe=["id"],ie=["data-placement"],ue=A(H({__name:"Tooltip",props:{visible:{type:Boolean},anchorEl:{},content:{},placement:{},offset:{},originX:{},originY:{},id:{},isDark:{type:[Boolean,null]}},setup(h){var E;const e=h,o=b(null),p=b(null),i=b({transform:"translate3d(0px, 0px, 0px)",left:"0px",top:"0px"}),y=b({}),d=b((E=e.placement)!=null?E:"top"),a=b(!1);let c=null,$=null,T=null,C=null,w=null,s=0;function X(){return C?Promise.resolve(C):(w||(w=ne(()=>import("./floating-ui.dom-xGUaHE3m.js"),[]).then(l=>(C=l,l)).catch(l=>{throw w=null,l})),w)}function D(){c&&(c(),c=null),$=null,T=null}function P(l){return k(this,null,function*(){const t=e.anchorEl,n=o.value;if(!e.visible||!t||!n||$===t&&T===n)return;const{autoUpdate:r}=yield X();l()&&e.visible&&e.anchorEl===t&&o.value===n&&(D(),$=t,T=n,c=r(t,n,()=>{N().catch(()=>{_()})}))})}function N(){return k(this,null,function*(){var l,t;const n=e.anchorEl,r=o.value;if(!e.visible||!n||!r)return!1;const{arrow:u,computePosition:m,flip:v,offset:f,shift:x}=yield X();if(!e.visible||e.anchorEl!==n||o.value!==r)return!1;const g=[f((l=e.offset)!=null?l:6),v(),x({padding:6}),...p.value?[u({element:p.value,padding:4})]:[]],{x:S,y:j,placement:Y,middlewareData:z}=yield m(n,r,{placement:(t=e.placement)!=null?t:"top",middleware:g,strategy:"fixed"});if(!e.visible||e.anchorEl!==n||o.value!==r)return!1;if(i.value.transform=`translate3d(${Math.round(S)}px, ${Math.round(j)}px, 0)`,i.value.left="0px",i.value.top="0px",d.value=Y,z.arrow&&p.value){const{x:I,y:U}=z.arrow,q={top:"bottom",bottom:"top",left:"right",right:"left"}[Y.split("-")[0]];y.value={left:I!=null?`${I}px`:"",top:U!=null?`${U}px`:"",[q]:"-3px"}}return!0})}function _(){var l,t;const n=e.anchorEl,r=o.value;if(!n||!r)return!1;const u=n.getBoundingClientRect(),m=r.getBoundingClientRect(),v=(l=e.offset)!=null?l:6,f=(t=e.placement)!=null?t:"top";let x=u.left,g=u.top;return f==="bottom"?g=u.bottom+v:f==="left"?x=u.left-m.width-v:f==="right"?x=u.right+v:g=u.top-m.height-v,i.value.transform=`translate3d(${Math.round(Math.max(0,x))}px, ${Math.round(Math.max(0,g))}px, 0)`,i.value.left="0px",i.value.top="0px",d.value=f,y.value={},!0}V(()=>e.visible,l=>k(null,null,function*(){const t=++s;if(l){if(a.value=!1,yield B(),t!==s||!e.visible)return;if(e.anchorEl&&o.value)try{const n=e.anchorEl,r=o.value,u=n.getBoundingClientRect();if(!(yield N())||t!==s||!e.visible||e.anchorEl!==n||o.value!==r)return;const m=i.value.transform;if(e.originX!=null&&e.originY!=null){const v=Math.abs(Number(e.originX)-u.left),f=Math.abs(Number(e.originY)-u.top);if(Math.hypot(v,f)>120){if(i.value.transform=`translate3d(${Math.round(e.originX)}px, ${Math.round(e.originY)}px, 0)`,yield B(),t!==s||!e.visible||(a.value=!0,yield B(),t!==s||!e.visible))return;i.value.transform=m}else a.value=!0}else a.value=!0;yield P(()=>t===s)}catch{if(t!==s||!e.visible)return;if(a.value=_(),e.anchorEl&&o.value)try{yield P(()=>t===s)}catch{}}else a.value=!0}else a.value=!1,D()}));let M=0;return V([()=>e.anchorEl,()=>e.placement,()=>e.content],()=>k(null,null,function*(){const l=++M;if(e.visible&&e.anchorEl&&o.value){if(yield B(),l!==M||!e.visible||!e.anchorEl||!o.value)return;try{const t=yield N();if(l!==M||!e.visible||!e.anchorEl||!o.value)return;t||_()}catch{_()}yield P(()=>l===M)}})),J(()=>{s+=1,D()}),(l,t)=>(O(),Q(ae,{to:"body"},[R("div",{class:le(["markstream-vue",{dark:h.isDark}])},[F(te,{name:"tooltip",appear:""},{default:G(()=>[K(R("div",{id:e.id,ref_key:"tooltip",ref:o,style:L({position:"fixed",left:i.value.left,top:i.value.top,transform:i.value.transform,visibility:a.value?"visible":"hidden",pointerEvents:a.value?void 0:"none"}),class:"tooltip-element",role:"tooltip"},[W(Z(h.content)+" ",1),R("div",{ref_key:"arrowEl",ref:p,class:"tooltip-arrow","data-placement":d.value,style:L(y.value)},null,12,ie)],12,oe),[[ee,h.visible]])]),_:1})],2)]))}}),[["__scopeId","data-v-c606ee4c"]]);export{ue as default};
diff --git a/apps/pythinker-code/dist-web/assets/abnfDiagram-VCTEODGH-Bll7_2rX.js b/apps/pythinker-code/dist-web/assets/abnfDiagram-VCTEODGH-6i4AQ6Ui.js
similarity index 86%
rename from apps/pythinker-code/dist-web/assets/abnfDiagram-VCTEODGH-Bll7_2rX.js
rename to apps/pythinker-code/dist-web/assets/abnfDiagram-VCTEODGH-6i4AQ6Ui.js
index 4d47a7a2e..76a041a3b 100644
--- a/apps/pythinker-code/dist-web/assets/abnfDiagram-VCTEODGH-Bll7_2rX.js
+++ b/apps/pythinker-code/dist-web/assets/abnfDiagram-VCTEODGH-6i4AQ6Ui.js
@@ -1 +1 @@
-import{g as p,r as u,d as a}from"./chunk-SVP7TREG-D_60I4PC.js";import{p as f}from"./chunk-JWPE2WC7-DsFB3Fti.js";import{_ as n,l as o}from"./mermaid.core-D6Xg32pF.js";import{M as c,b as d}from"./cynefin-OW5HDTMX-Byg0NdnJ.js";import"./index-D9Nz1t7z.js";import"./purify.es-5AjVNlXF.js";var v=d().RailroadAbnf.parser.LangiumParser,i=n(e=>{const r=e.alternatives.map(g);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformAlternation"),g=n(e=>{const r=e.elements.map(y);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformConcatenation"),b=n(e=>{if(e.includes("*")){const[t,s]=e.split("*"),l=t?parseInt(t,10):0,m=s?parseInt(s,10):1/0;return{min:l,max:m}}const r=parseInt(e,10);return{min:r,max:r}},"parseRepeat"),y=n(e=>{const r=A(e.primary);if(!e.repeat)return r;const{min:t,max:s}=b(e.repeat);return t===0&&s===1?{type:"optional",element:r}:{type:"repetition",element:r,min:t,max:s}},"transformElement"),A=n(e=>{switch(e.$type){case"AbnfStringLiteral":return{type:"terminal",value:e.value};case"AbnfNumVal":return{type:"terminal",value:e.value};case"AbnfRuleName":return{type:"nonterminal",name:e.name};case"AbnfGroup":return i(e.element);case"AbnfOptionalGroup":return{type:"optional",element:i(e.element)};default:throw new Error(`Unsupported ABNF primary node: ${e.$type}`)}},"transformPrimary"),P=n(e=>({name:e.name,definition:i(e.definition)}),"transformRule"),h=n(e=>{f(e,a),e.title&&a.setTitle(e.title),e.rules.map(r=>a.addRule(P(r)))},"populateDb"),R={parse:n(e=>{a.clear(),o.debug("[ABNF Parser] Starting Langium parse");const r=v.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new c(r);const t=r.value;o.debug("[ABNF Parser] Parsed rules:",t.rules.length),h(t),o.debug("[ABNF Parser] Parse complete")},"parse"),parser:{yy:a}},F={parser:R,db:a,renderer:u,styles:p};export{F as diagram};
+import{g as p,r as u,d as a}from"./chunk-SVP7TREG-B4Y-lvg8.js";import{p as f}from"./chunk-JWPE2WC7-DjA09kFS.js";import{_ as n,l as o}from"./mermaid.core-BLsmN-lt.js";import{M as c,b as d}from"./cynefin-OW5HDTMX-BygTY4j3.js";import"./index-XmhyfFRf.js";import"./purify.es-5AjVNlXF.js";var v=d().RailroadAbnf.parser.LangiumParser,i=n(e=>{const r=e.alternatives.map(g);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformAlternation"),g=n(e=>{const r=e.elements.map(y);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformConcatenation"),b=n(e=>{if(e.includes("*")){const[t,s]=e.split("*"),l=t?parseInt(t,10):0,m=s?parseInt(s,10):1/0;return{min:l,max:m}}const r=parseInt(e,10);return{min:r,max:r}},"parseRepeat"),y=n(e=>{const r=A(e.primary);if(!e.repeat)return r;const{min:t,max:s}=b(e.repeat);return t===0&&s===1?{type:"optional",element:r}:{type:"repetition",element:r,min:t,max:s}},"transformElement"),A=n(e=>{switch(e.$type){case"AbnfStringLiteral":return{type:"terminal",value:e.value};case"AbnfNumVal":return{type:"terminal",value:e.value};case"AbnfRuleName":return{type:"nonterminal",name:e.name};case"AbnfGroup":return i(e.element);case"AbnfOptionalGroup":return{type:"optional",element:i(e.element)};default:throw new Error(`Unsupported ABNF primary node: ${e.$type}`)}},"transformPrimary"),P=n(e=>({name:e.name,definition:i(e.definition)}),"transformRule"),h=n(e=>{f(e,a),e.title&&a.setTitle(e.title),e.rules.map(r=>a.addRule(P(r)))},"populateDb"),R={parse:n(e=>{a.clear(),o.debug("[ABNF Parser] Starting Langium parse");const r=v.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new c(r);const t=r.value;o.debug("[ABNF Parser] Parsed rules:",t.rules.length),h(t),o.debug("[ABNF Parser] Parse complete")},"parse"),parser:{yy:a}},F={parser:R,db:a,renderer:u,styles:p};export{F as diagram};
diff --git a/apps/pythinker-code/dist-web/assets/arc-i3Cwndrc.js b/apps/pythinker-code/dist-web/assets/arc-C9gFqAy0.js
similarity index 98%
rename from apps/pythinker-code/dist-web/assets/arc-i3Cwndrc.js
rename to apps/pythinker-code/dist-web/assets/arc-C9gFqAy0.js
index 46a2782fb..7497d70a6 100644
--- a/apps/pythinker-code/dist-web/assets/arc-i3Cwndrc.js
+++ b/apps/pythinker-code/dist-web/assets/arc-C9gFqAy0.js
@@ -1 +1 @@
-import{H as ln,I as un,J as y,K as tn,L as Q,M as I,N as _,O as an,P as rn,Q as j,R as o,S as K,T as sn,V as on,W as fn}from"./mermaid.core-D6Xg32pF.js";function cn(l){return l.innerRadius}function yn(l){return l.outerRadius}function gn(l){return l.startAngle}function dn(l){return l.endAngle}function mn(l){return l&&l.padAngle}function pn(l,h,q,O,v,R,L,u){var D=q-l,i=O-h,n=L-v,d=u-R,a=d*D-n*i;if(!(a*ar*r+N*N&&(H=w,J=p),{cx:H,cy:J,x01:-n,y01:-d,x11:H*(v/T-1),y11:J*(v/T-1)}}function hn(){var l=cn,h=yn,q=K(0),O=null,v=gn,R=dn,L=mn,u=null,D=ln(i);function i(){var n,d,a=+l.apply(this,arguments),s=+h.apply(this,arguments),f=v.apply(this,arguments)-un,c=R.apply(this,arguments)-un,M=an(c-f),t=c>f;if(u||(u=n=D()),sy))u.moveTo(0,0);else if(M>tn-y)u.moveTo(s*Q(f),s*I(f)),u.arc(0,0,s,f,c,!t),a>y&&(u.moveTo(a*Q(c),a*I(c)),u.arc(0,0,a,c,f,t));else{var m=f,g=c,A=f,T=c,P=M,E=M,H=L.apply(this,arguments)/2,J=H>y&&(O?+O.apply(this,arguments):j(a*a+s*s)),w=_(an(s-a)/2,+q.apply(this,arguments)),p=w,x=w,e,r;if(J>y){var N=sn(J/a*I(H)),z=sn(J/s*I(H));(P-=N*2)>y?(N*=t?1:-1,A+=N,T-=N):(P=0,A=T=(f+c)/2),(E-=z*2)>y?(z*=t?1:-1,m+=z,g-=z):(E=0,m=g=(f+c)/2)}var V=s*Q(m),W=s*I(m),B=a*Q(T),C=a*I(T);if(w>y){var F=s*Q(g),G=s*I(g),X=a*Q(A),Y=a*I(A),S;if(My?x>y?(e=U(X,Y,V,W,s,x,t),r=U(F,G,B,C,s,x,t),u.moveTo(e.cx+e.x01,e.cy+e.y01),xy)||!(P>y)?u.lineTo(B,C):p>y?(e=U(B,C,F,G,a,-p,t),r=U(V,W,X,Y,a,-p,t),u.lineTo(e.cx+e.x01,e.cy+e.y01),pr*r+N*N&&(H=w,J=p),{cx:H,cy:J,x01:-n,y01:-d,x11:H*(v/T-1),y11:J*(v/T-1)}}function hn(){var l=cn,h=yn,q=K(0),O=null,v=gn,R=dn,L=mn,u=null,D=ln(i);function i(){var n,d,a=+l.apply(this,arguments),s=+h.apply(this,arguments),f=v.apply(this,arguments)-un,c=R.apply(this,arguments)-un,M=an(c-f),t=c>f;if(u||(u=n=D()),sy))u.moveTo(0,0);else if(M>tn-y)u.moveTo(s*Q(f),s*I(f)),u.arc(0,0,s,f,c,!t),a>y&&(u.moveTo(a*Q(c),a*I(c)),u.arc(0,0,a,c,f,t));else{var m=f,g=c,A=f,T=c,P=M,E=M,H=L.apply(this,arguments)/2,J=H>y&&(O?+O.apply(this,arguments):j(a*a+s*s)),w=_(an(s-a)/2,+q.apply(this,arguments)),p=w,x=w,e,r;if(J>y){var N=sn(J/a*I(H)),z=sn(J/s*I(H));(P-=N*2)>y?(N*=t?1:-1,A+=N,T-=N):(P=0,A=T=(f+c)/2),(E-=z*2)>y?(z*=t?1:-1,m+=z,g-=z):(E=0,m=g=(f+c)/2)}var V=s*Q(m),W=s*I(m),B=a*Q(T),C=a*I(T);if(w>y){var F=s*Q(g),G=s*I(g),X=a*Q(A),Y=a*I(A),S;if(My?x>y?(e=U(X,Y,V,W,s,x,t),r=U(F,G,B,C,s,x,t),u.moveTo(e.cx+e.x01,e.cy+e.y01),xy)||!(P>y)?u.lineTo(B,C):p>y?(e=U(B,C,F,G,a,-p,t),r=U(V,W,X,Y,a,-p,t),u.lineTo(e.cx+e.x01,e.cy+e.y01),ps?(this.rect.x-=(this.labelWidth-s)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal=="right"&&this.setWidth(s+this.labelWidth)),this.labelHeight&&(this.labelPosVertical=="top"?(this.rect.y-=this.labelHeight,this.setHeight(o+this.labelHeight)):this.labelPosVertical=="center"&&this.labelHeight>o?(this.rect.y-=(this.labelHeight-o)/2,this.setHeight(this.labelHeight)):this.labelPosVertical=="bottom"&&this.setHeight(o+this.labelHeight))}}},r.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==h.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},r.prototype.transform=function(t){var s=this.rect.x;s>e.WORLD_BOUNDARY?s=e.WORLD_BOUNDARY:s<-e.WORLD_BOUNDARY&&(s=-e.WORLD_BOUNDARY);var o=this.rect.y;o>e.WORLD_BOUNDARY?o=e.WORLD_BOUNDARY:o<-e.WORLD_BOUNDARY&&(o=-e.WORLD_BOUNDARY);var c=new f(s,o),l=t.inverseTransformPoint(c);this.setLocation(l.x,l.y)},r.prototype.getLeft=function(){return this.rect.x},r.prototype.getRight=function(){return this.rect.x+this.rect.width},r.prototype.getTop=function(){return this.rect.y},r.prototype.getBottom=function(){return this.rect.y+this.rect.height},r.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},M.exports=r}),(function(M,P,N){var v=N(0);function h(){}for(var a in v)h[a]=v[a];h.MAX_ITERATIONS=2500,h.DEFAULT_EDGE_LENGTH=50,h.DEFAULT_SPRING_STRENGTH=.45,h.DEFAULT_REPULSION_STRENGTH=4500,h.DEFAULT_GRAVITY_STRENGTH=.4,h.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,h.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,h.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,h.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,h.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,h.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,h.COOLING_ADAPTATION_FACTOR=.33,h.ADAPTATION_LOWER_NODE_LIMIT=1e3,h.ADAPTATION_UPPER_NODE_LIMIT=5e3,h.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,h.MAX_NODE_DISPLACEMENT=h.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,h.MIN_REPULSION_DIST=h.DEFAULT_EDGE_LENGTH/10,h.CONVERGENCE_CHECK_PERIOD=100,h.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,h.MIN_EDGE_LENGTH=1,h.GRID_CALCULATION_CHECK_PERIOD=10,M.exports=h}),(function(M,P,N){function v(h,a){h==null&&a==null?(this.x=0,this.y=0):(this.x=h,this.y=a)}v.prototype.getX=function(){return this.x},v.prototype.getY=function(){return this.y},v.prototype.setX=function(h){this.x=h},v.prototype.setY=function(h){this.y=h},v.prototype.getDifference=function(h){return new DimensionD(this.x-h.x,this.y-h.y)},v.prototype.getCopy=function(){return new v(this.x,this.y)},v.prototype.translate=function(h){return this.x+=h.width,this.y+=h.height,this},M.exports=v}),(function(M,P,N){var v=N(2),h=N(10),a=N(0),e=N(7),i=N(3),f=N(1),r=N(13),u=N(12),t=N(11);function s(c,l,T){v.call(this,T),this.estimatedSize=h.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=c,l!=null&&l instanceof e?this.graphManager=l:l!=null&&l instanceof Layout&&(this.graphManager=l.graphManager)}s.prototype=Object.create(v.prototype);for(var o in v)s[o]=v[o];s.prototype.getNodes=function(){return this.nodes},s.prototype.getEdges=function(){return this.edges},s.prototype.getGraphManager=function(){return this.graphManager},s.prototype.getParent=function(){return this.parent},s.prototype.getLeft=function(){return this.left},s.prototype.getRight=function(){return this.right},s.prototype.getTop=function(){return this.top},s.prototype.getBottom=function(){return this.bottom},s.prototype.isConnected=function(){return this.isConnected},s.prototype.add=function(c,l,T){if(l==null&&T==null){var g=c;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(g)>-1)throw"Node already in graph!";return g.owner=this,this.getNodes().push(g),g}else{var d=c;if(!(this.getNodes().indexOf(l)>-1&&this.getNodes().indexOf(T)>-1))throw"Source or target not in graph!";if(!(l.owner==T.owner&&l.owner==this))throw"Both owners must be this graph!";return l.owner!=T.owner?null:(d.source=l,d.target=T,d.isInterGraph=!1,this.getEdges().push(d),l.edges.push(d),T!=l&&T.edges.push(d),d)}},s.prototype.remove=function(c){var l=c;if(c instanceof i){if(l==null)throw"Node is null!";if(!(l.owner!=null&&l.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var T=l.edges.slice(),g,d=T.length,L=0;L-1&&G>-1))throw"Source and/or target doesn't know this edge!";g.source.edges.splice(C,1),g.target!=g.source&&g.target.edges.splice(G,1);var R=g.source.owner.getEdges().indexOf(g);if(R==-1)throw"Not in owner's edge list!";g.source.owner.getEdges().splice(R,1)}},s.prototype.updateLeftTop=function(){for(var c=h.MAX_VALUE,l=h.MAX_VALUE,T,g,d,L=this.getNodes(),R=L.length,C=0;CT&&(c=T),l>g&&(l=g)}return c==h.MAX_VALUE?null:(L[0].getParent().paddingLeft!=null?d=L[0].getParent().paddingLeft:d=this.margin,this.left=l-d,this.top=c-d,new u(this.left,this.top))},s.prototype.updateBounds=function(c){for(var l=h.MAX_VALUE,T=-h.MAX_VALUE,g=h.MAX_VALUE,d=-h.MAX_VALUE,L,R,C,G,V,Y=this.nodes,$=Y.length,A=0;A<$;A++){var _=Y[A];c&&_.child!=null&&_.updateBounds(),L=_.getLeft(),R=_.getRight(),C=_.getTop(),G=_.getBottom(),l>L&&(l=L),TC&&(g=C),dL&&(l=L),TC&&(g=C),d=this.nodes.length){var $=0;T.forEach(function(A){A.owner==c&&$++}),$==this.nodes.length&&(this.isConnected=!0)}},M.exports=s}),(function(M,P,N){var v,h=N(1);function a(e){v=N(6),this.layout=e,this.graphs=[],this.edges=[]}a.prototype.addRoot=function(){var e=this.layout.newGraph(),i=this.layout.newNode(null),f=this.add(e,i);return this.setRootGraph(f),this.rootGraph},a.prototype.add=function(e,i,f,r,u){if(f==null&&r==null&&u==null){if(e==null)throw"Graph is null!";if(i==null)throw"Parent node is null!";if(this.graphs.indexOf(e)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(e),e.parent!=null)throw"Already has a parent!";if(i.child!=null)throw"Already has a child!";return e.parent=i,i.child=e,e}else{u=f,r=i,f=e;var t=r.getOwner(),s=u.getOwner();if(!(t!=null&&t.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(s!=null&&s.getGraphManager()==this))throw"Target not in this graph mgr!";if(t==s)return f.isInterGraph=!1,t.add(f,r,u);if(f.isInterGraph=!0,f.source=r,f.target=u,this.edges.indexOf(f)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(f),!(f.source!=null&&f.target!=null))throw"Edge source and/or target is null!";if(!(f.source.edges.indexOf(f)==-1&&f.target.edges.indexOf(f)==-1))throw"Edge already in source and/or target incidency list!";return f.source.edges.push(f),f.target.edges.push(f),f}},a.prototype.remove=function(e){if(e instanceof v){var i=e;if(i.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(i==this.rootGraph||i.parent!=null&&i.parent.graphManager==this))throw"Invalid parent node!";var f=[];f=f.concat(i.getEdges());for(var r,u=f.length,t=0;t=e.getRight()?i[0]+=Math.min(e.getX()-a.getX(),a.getRight()-e.getRight()):e.getX()<=a.getX()&&e.getRight()>=a.getRight()&&(i[0]+=Math.min(a.getX()-e.getX(),e.getRight()-a.getRight())),a.getY()<=e.getY()&&a.getBottom()>=e.getBottom()?i[1]+=Math.min(e.getY()-a.getY(),a.getBottom()-e.getBottom()):e.getY()<=a.getY()&&e.getBottom()>=a.getBottom()&&(i[1]+=Math.min(a.getY()-e.getY(),e.getBottom()-a.getBottom()));var u=Math.abs((e.getCenterY()-a.getCenterY())/(e.getCenterX()-a.getCenterX()));e.getCenterY()===a.getCenterY()&&e.getCenterX()===a.getCenterX()&&(u=1);var t=u*i[0],s=i[1]/u;i[0]t)return i[0]=f,i[1]=o,i[2]=u,i[3]=Y,!1;if(ru)return i[0]=s,i[1]=r,i[2]=G,i[3]=t,!1;if(fu?(i[0]=l,i[1]=T,n=!0):(i[0]=c,i[1]=o,n=!0):p===y&&(f>u?(i[0]=s,i[1]=o,n=!0):(i[0]=g,i[1]=T,n=!0)),-m===y?u>f?(i[2]=V,i[3]=Y,E=!0):(i[2]=G,i[3]=C,E=!0):m===y&&(u>f?(i[2]=R,i[3]=C,E=!0):(i[2]=$,i[3]=Y,E=!0)),n&&E)return!1;if(f>u?r>t?(I=this.getCardinalDirection(p,y,4),D=this.getCardinalDirection(m,y,2)):(I=this.getCardinalDirection(-p,y,3),D=this.getCardinalDirection(-m,y,1)):r>t?(I=this.getCardinalDirection(-p,y,1),D=this.getCardinalDirection(-m,y,3)):(I=this.getCardinalDirection(p,y,2),D=this.getCardinalDirection(m,y,4)),!n)switch(I){case 1:W=o,S=f+-L/y,i[0]=S,i[1]=W;break;case 2:S=g,W=r+d*y,i[0]=S,i[1]=W;break;case 3:W=T,S=f+L/y,i[0]=S,i[1]=W;break;case 4:S=l,W=r+-d*y,i[0]=S,i[1]=W;break}if(!E)switch(D){case 1:Q=C,x=u+-_/y,i[2]=x,i[3]=Q;break;case 2:x=$,Q=t+A*y,i[2]=x,i[3]=Q;break;case 3:Q=Y,x=u+_/y,i[2]=x,i[3]=Q;break;case 4:x=V,Q=t+-A*y,i[2]=x,i[3]=Q;break}}return!1},h.getCardinalDirection=function(a,e,i){return a>e?i:1+i%4},h.getIntersection=function(a,e,i,f){if(f==null)return this.getIntersection2(a,e,i);var r=a.x,u=a.y,t=e.x,s=e.y,o=i.x,c=i.y,l=f.x,T=f.y,g=void 0,d=void 0,L=void 0,R=void 0,C=void 0,G=void 0,V=void 0,Y=void 0,$=void 0;return L=s-u,C=r-t,V=t*u-r*s,R=T-c,G=o-l,Y=l*c-o*T,$=L*G-R*C,$===0?null:(g=(C*Y-G*V)/$,d=(R*V-L*Y)/$,new v(g,d))},h.angleOfVector=function(a,e,i,f){var r=void 0;return a!==i?(r=Math.atan((f-e)/(i-a)),i=0){var T=(-o+Math.sqrt(o*o-4*s*c))/(2*s),g=(-o-Math.sqrt(o*o-4*s*c))/(2*s),d=null;return T>=0&&T<=1?[T]:g>=0&&g<=1?[g]:d}else return null},h.HALF_PI=.5*Math.PI,h.ONE_AND_HALF_PI=1.5*Math.PI,h.TWO_PI=2*Math.PI,h.THREE_PI=3*Math.PI,M.exports=h}),(function(M,P,N){function v(){}v.sign=function(h){return h>0?1:h<0?-1:0},v.floor=function(h){return h<0?Math.ceil(h):Math.floor(h)},v.ceil=function(h){return h<0?Math.floor(h):Math.ceil(h)},M.exports=v}),(function(M,P,N){function v(){}v.MAX_VALUE=2147483647,v.MIN_VALUE=-2147483648,M.exports=v}),(function(M,P,N){var v=(function(){function r(u,t){for(var s=0;s"u"?"undefined":v(a);return a==null||e!="object"&&e!="function"},M.exports=h}),(function(M,P,N){function v(o){if(Array.isArray(o)){for(var c=0,l=Array(o.length);c0&&c;){for(L.push(C[0]);L.length>0&&c;){var G=L[0];L.splice(0,1),d.add(G);for(var V=G.getEdges(),g=0;g-1&&C.splice(_,1)}d=new Set,R=new Map}}return o},s.prototype.createDummyNodesForBendpoints=function(o){for(var c=[],l=o.source,T=this.graphManager.calcLowestCommonAncestor(o.source,o.target),g=0;g0){for(var T=this.edgeToDummyNodes.get(l),g=0;g=0&&c.splice(Y,1);var $=R.getNeighborsList();$.forEach(function(n){if(l.indexOf(n)<0){var E=T.get(n),p=E-1;p==1&&G.push(n),T.set(n,p)}})}l=l.concat(G),(c.length==1||c.length==2)&&(g=!0,d=c[0])}return d},s.prototype.setGraphManager=function(o){this.graphManager=o},M.exports=s}),(function(M,P,N){function v(){}v.seed=1,v.x=0,v.nextDouble=function(){return v.x=Math.sin(v.seed++)*1e4,v.x-Math.floor(v.x)},M.exports=v}),(function(M,P,N){var v=N(5);function h(a,e){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}h.prototype.getWorldOrgX=function(){return this.lworldOrgX},h.prototype.setWorldOrgX=function(a){this.lworldOrgX=a},h.prototype.getWorldOrgY=function(){return this.lworldOrgY},h.prototype.setWorldOrgY=function(a){this.lworldOrgY=a},h.prototype.getWorldExtX=function(){return this.lworldExtX},h.prototype.setWorldExtX=function(a){this.lworldExtX=a},h.prototype.getWorldExtY=function(){return this.lworldExtY},h.prototype.setWorldExtY=function(a){this.lworldExtY=a},h.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},h.prototype.setDeviceOrgX=function(a){this.ldeviceOrgX=a},h.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},h.prototype.setDeviceOrgY=function(a){this.ldeviceOrgY=a},h.prototype.getDeviceExtX=function(){return this.ldeviceExtX},h.prototype.setDeviceExtX=function(a){this.ldeviceExtX=a},h.prototype.getDeviceExtY=function(){return this.ldeviceExtY},h.prototype.setDeviceExtY=function(a){this.ldeviceExtY=a},h.prototype.transformX=function(a){var e=0,i=this.lworldExtX;return i!=0&&(e=this.ldeviceOrgX+(a-this.lworldOrgX)*this.ldeviceExtX/i),e},h.prototype.transformY=function(a){var e=0,i=this.lworldExtY;return i!=0&&(e=this.ldeviceOrgY+(a-this.lworldOrgY)*this.ldeviceExtY/i),e},h.prototype.inverseTransformX=function(a){var e=0,i=this.ldeviceExtX;return i!=0&&(e=this.lworldOrgX+(a-this.ldeviceOrgX)*this.lworldExtX/i),e},h.prototype.inverseTransformY=function(a){var e=0,i=this.ldeviceExtY;return i!=0&&(e=this.lworldOrgY+(a-this.ldeviceOrgY)*this.lworldExtY/i),e},h.prototype.inverseTransformPoint=function(a){var e=new v(this.inverseTransformX(a.x),this.inverseTransformY(a.y));return e},M.exports=h}),(function(M,P,N){function v(t){if(Array.isArray(t)){for(var s=0,o=Array(t.length);sa.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*a.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-a.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>a.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(a.COOLING_ADAPTATION_FACTOR,1-(t-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*(1-a.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*a.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},r.prototype.calcSpringForces=function(){for(var t=this.getAllEdges(),s,o=0;o0&&arguments[0]!==void 0?arguments[0]:!0,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,o,c,l,T,g=this.getAllNodes(),d;if(this.useFRGridVariant)for(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&t&&this.updateGrid(),d=new Set,o=0;oL||d>L)&&(t.gravitationForceX=-this.gravityConstant*l,t.gravitationForceY=-this.gravityConstant*T)):(L=s.getEstimatedSize()*this.compoundGravityRangeFactor,(g>L||d>L)&&(t.gravitationForceX=-this.gravityConstant*l*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*T*this.compoundGravityConstant))},r.prototype.isConverged=function(){var t,s=!1;return this.totalIterations>this.maxIterations/3&&(s=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement=g.length||L>=g[0].length)){for(var R=0;Rr}}]),i})();M.exports=e}),(function(M,P,N){function v(){}v.svd=function(h){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=h.length,this.n=h[0].length;var a=Math.min(this.m,this.n);this.s=(function(Tt){for(var wt=[];Tt-- >0;)wt.push(0);return wt})(Math.min(this.m+1,this.n)),this.U=(function(Tt){var wt=function zt(bt){if(bt.length==0)return 0;for(var $t=[],St=0;St0;)wt.push(0);return wt})(this.n),i=(function(Tt){for(var wt=[];Tt-- >0;)wt.push(0);return wt})(this.m),f=!0,r=Math.min(this.m-1,this.n),u=Math.max(0,Math.min(this.n-2,this.m)),t=0;t=0;m--)if(this.s[m]!==0){for(var y=m+1;y=0;z--){if((function(Tt,wt){return Tt&&wt})(z0;){var J=void 0,It=void 0;for(J=n-2;J>=-1&&J!==-1;J--)if(Math.abs(e[J])<=ht+tt*(Math.abs(this.s[J])+Math.abs(this.s[J+1]))){e[J]=0;break}if(J===n-2)It=4;else{var Nt=void 0;for(Nt=n-1;Nt>=J&&Nt!==J;Nt--){var vt=(Nt!==n?Math.abs(e[Nt]):0)+(Nt!==J+1?Math.abs(e[Nt-1]):0);if(Math.abs(this.s[Nt])<=ht+tt*vt){this.s[Nt]=0;break}}Nt===J?It=3:Nt===n-1?It=1:(It=2,J=Nt)}switch(J++,It){case 1:{var it=e[n-2];e[n-2]=0;for(var ut=n-2;ut>=J;ut--){var Et=v.hypot(this.s[ut],it),Ct=this.s[ut]/Et,Dt=it/Et;this.s[ut]=Et,ut!==J&&(it=-Dt*e[ut-1],e[ut-1]=Ct*e[ut-1]);for(var mt=0;mt=this.s[J+1]);){var Lt=this.s[J];if(this.s[J]=this.s[J+1],this.s[J+1]=Lt,JMath.abs(a)?(e=a/h,e=Math.abs(h)*Math.sqrt(1+e*e)):a!=0?(e=h/a,e=Math.abs(a)*Math.sqrt(1+e*e)):e=0,e},M.exports=v}),(function(M,P,N){var v=(function(){function e(i,f){for(var r=0;r2&&arguments[2]!==void 0?arguments[2]:1,u=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,t=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;h(this,e),this.sequence1=i,this.sequence2=f,this.match_score=r,this.mismatch_penalty=u,this.gap_penalty=t,this.iMax=i.length+1,this.jMax=f.length+1,this.grid=new Array(this.iMax);for(var s=0;s=0;i--){var f=this.listeners[i];f.event===a&&f.callback===e&&this.listeners.splice(i,1)}},h.emit=function(a,e){for(var i=0;i{var P={45:((a,e,i)=>{var f={};f.layoutBase=i(551),f.CoSEConstants=i(806),f.CoSEEdge=i(767),f.CoSEGraph=i(880),f.CoSEGraphManager=i(578),f.CoSELayout=i(765),f.CoSENode=i(991),f.ConstraintHandler=i(902),a.exports=f}),806:((a,e,i)=>{var f=i(551).FDLayoutConstants;function r(){}for(var u in f)r[u]=f[u];r.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,r.DEFAULT_RADIAL_SEPARATION=f.DEFAULT_EDGE_LENGTH,r.DEFAULT_COMPONENT_SEPERATION=60,r.TILE=!0,r.TILING_PADDING_VERTICAL=10,r.TILING_PADDING_HORIZONTAL=10,r.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,r.ENFORCE_CONSTRAINTS=!0,r.APPLY_LAYOUT=!0,r.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,r.TREE_REDUCTION_ON_INCREMENTAL=!0,r.PURE_INCREMENTAL=r.DEFAULT_INCREMENTAL,a.exports=r}),767:((a,e,i)=>{var f=i(551).FDLayoutEdge;function r(t,s,o){f.call(this,t,s,o)}r.prototype=Object.create(f.prototype);for(var u in f)r[u]=f[u];a.exports=r}),880:((a,e,i)=>{var f=i(551).LGraph;function r(t,s,o){f.call(this,t,s,o)}r.prototype=Object.create(f.prototype);for(var u in f)r[u]=f[u];a.exports=r}),578:((a,e,i)=>{var f=i(551).LGraphManager;function r(t){f.call(this,t)}r.prototype=Object.create(f.prototype);for(var u in f)r[u]=f[u];a.exports=r}),765:((a,e,i)=>{var f=i(551).FDLayout,r=i(578),u=i(880),t=i(991),s=i(767),o=i(806),c=i(902),l=i(551).FDLayoutConstants,T=i(551).LayoutConstants,g=i(551).Point,d=i(551).PointD,L=i(551).DimensionD,R=i(551).Layout,C=i(551).Integer,G=i(551).IGeometry,V=i(551).LGraph,Y=i(551).Transform,$=i(551).LinkedList;function A(){f.call(this),this.toBeTiled={},this.constraints={}}A.prototype=Object.create(f.prototype);for(var _ in f)A[_]=f[_];A.prototype.newGraphManager=function(){var n=new r(this);return this.graphManager=n,n},A.prototype.newGraph=function(n){return new u(null,this.graphManager,n)},A.prototype.newNode=function(n){return new t(this.graphManager,n)},A.prototype.newEdge=function(n){return new s(null,null,n)},A.prototype.initParameters=function(){f.prototype.initParameters.call(this,arguments),this.isSubLayout||(o.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=o.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=o.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=l.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=l.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=l.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},A.prototype.initSpringEmbedder=function(){f.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/l.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},A.prototype.layout=function(){var n=T.DEFAULT_CREATE_BENDS_AS_NEEDED;return n&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},A.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental){if(o.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var E=new Set(this.getAllNodes()),p=this.nodesWithGravity.filter(function(I){return E.has(I)});this.graphManager.setAllNodesToApplyGravitation(p)}}else{var n=this.getFlatForest();if(n.length>0)this.positionNodesRadially(n);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var E=new Set(this.getAllNodes()),p=this.nodesWithGravity.filter(function(m){return E.has(m)});this.graphManager.setAllNodesToApplyGravitation(p),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(c.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),o.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},A.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%l.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var n=new Set(this.getAllNodes()),E=this.nodesWithGravity.filter(function(y){return n.has(y)});this.graphManager.setAllNodesToApplyGravitation(E),this.graphManager.updateBounds(),this.updateGrid(),o.PURE_INCREMENTAL?this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),o.PURE_INCREMENTAL?this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var p=!this.isTreeGrowing&&!this.isGrowthFinished,m=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(p,m),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},A.prototype.getPositionsData=function(){for(var n=this.graphManager.getAllNodes(),E={},p=0;p0&&this.updateDisplacements();for(var p=0;p0&&(m.fixedNodeWeight=I)}}if(this.constraints.relativePlacementConstraint){var D=new Map,S=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(O){n.fixedNodesOnHorizontal.add(O),n.fixedNodesOnVertical.add(O)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var W=this.constraints.alignmentConstraint.vertical,p=0;p=2*O.length/3;tt--)H=Math.floor(Math.random()*(tt+1)),k=O[tt],O[tt]=O[H],O[H]=k;return O},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach(function(O){if(O.left){var H=D.has(O.left)?D.get(O.left):O.left,k=D.has(O.right)?D.get(O.right):O.right;n.nodesInRelativeHorizontal.includes(H)||(n.nodesInRelativeHorizontal.push(H),n.nodeToRelativeConstraintMapHorizontal.set(H,[]),n.dummyToNodeForVerticalAlignment.has(H)?n.nodeToTempPositionMapHorizontal.set(H,n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get(H)[0]).getCenterX()):n.nodeToTempPositionMapHorizontal.set(H,n.idToNodeMap.get(H).getCenterX())),n.nodesInRelativeHorizontal.includes(k)||(n.nodesInRelativeHorizontal.push(k),n.nodeToRelativeConstraintMapHorizontal.set(k,[]),n.dummyToNodeForVerticalAlignment.has(k)?n.nodeToTempPositionMapHorizontal.set(k,n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get(k)[0]).getCenterX()):n.nodeToTempPositionMapHorizontal.set(k,n.idToNodeMap.get(k).getCenterX())),n.nodeToRelativeConstraintMapHorizontal.get(H).push({right:k,gap:O.gap}),n.nodeToRelativeConstraintMapHorizontal.get(k).push({left:H,gap:O.gap})}else{var tt=S.has(O.top)?S.get(O.top):O.top,ht=S.has(O.bottom)?S.get(O.bottom):O.bottom;n.nodesInRelativeVertical.includes(tt)||(n.nodesInRelativeVertical.push(tt),n.nodeToRelativeConstraintMapVertical.set(tt,[]),n.dummyToNodeForHorizontalAlignment.has(tt)?n.nodeToTempPositionMapVertical.set(tt,n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(tt)[0]).getCenterY()):n.nodeToTempPositionMapVertical.set(tt,n.idToNodeMap.get(tt).getCenterY())),n.nodesInRelativeVertical.includes(ht)||(n.nodesInRelativeVertical.push(ht),n.nodeToRelativeConstraintMapVertical.set(ht,[]),n.dummyToNodeForHorizontalAlignment.has(ht)?n.nodeToTempPositionMapVertical.set(ht,n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(ht)[0]).getCenterY()):n.nodeToTempPositionMapVertical.set(ht,n.idToNodeMap.get(ht).getCenterY())),n.nodeToRelativeConstraintMapVertical.get(tt).push({bottom:ht,gap:O.gap}),n.nodeToRelativeConstraintMapVertical.get(ht).push({top:tt,gap:O.gap})}});else{var Q=new Map,z=new Map;this.constraints.relativePlacementConstraint.forEach(function(O){if(O.left){var H=D.has(O.left)?D.get(O.left):O.left,k=D.has(O.right)?D.get(O.right):O.right;Q.has(H)?Q.get(H).push(k):Q.set(H,[k]),Q.has(k)?Q.get(k).push(H):Q.set(k,[H])}else{var tt=S.has(O.top)?S.get(O.top):O.top,ht=S.has(O.bottom)?S.get(O.bottom):O.bottom;z.has(tt)?z.get(tt).push(ht):z.set(tt,[ht]),z.has(ht)?z.get(ht).push(tt):z.set(ht,[tt])}});var X=function(H,k){var tt=[],ht=[],J=new $,It=new Set,Nt=0;return H.forEach(function(vt,it){if(!It.has(it)){tt[Nt]=[],ht[Nt]=!1;var ut=it;for(J.push(ut),It.add(ut),tt[Nt].push(ut);J.length!=0;){ut=J.shift(),k.has(ut)&&(ht[Nt]=!0);var Et=H.get(ut);Et.forEach(function(Ct){It.has(Ct)||(J.push(Ct),It.add(Ct),tt[Nt].push(Ct))})}Nt++}}),{components:tt,isFixed:ht}},rt=X(Q,n.fixedNodesOnHorizontal);this.componentsOnHorizontal=rt.components,this.fixedComponentsOnHorizontal=rt.isFixed;var B=X(z,n.fixedNodesOnVertical);this.componentsOnVertical=B.components,this.fixedComponentsOnVertical=B.isFixed}}},A.prototype.updateDisplacements=function(){var n=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(B){var O=n.idToNodeMap.get(B.nodeId);O.displacementX=0,O.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var E=this.constraints.alignmentConstraint.vertical,p=0;p1){var S;for(S=0;Sm&&(m=Math.floor(D.y)),I=Math.floor(D.x+o.DEFAULT_COMPONENT_SEPERATION)}this.transform(new d(T.WORLD_CENTER_X-D.x/2,T.WORLD_CENTER_Y-D.y/2))},A.radialLayout=function(n,E,p){var m=Math.max(this.maxDiagonalInTree(n),o.DEFAULT_RADIAL_SEPARATION);A.branchRadialLayout(E,null,0,359,0,m);var y=V.calculateBounds(n),I=new Y;I.setDeviceOrgX(y.getMinX()),I.setDeviceOrgY(y.getMinY()),I.setWorldOrgX(p.x),I.setWorldOrgY(p.y);for(var D=0;D1;){var k=H[0];H.splice(0,1);var tt=z.indexOf(k);tt>=0&&z.splice(tt,1),B--,X--}E!=null?O=(z.indexOf(H[0])+1)%B:O=0;for(var ht=Math.abs(m-p)/X,J=O;rt!=X;J=++J%B){var It=z[J].getOtherEnd(n);if(It!=E){var Nt=(p+rt*ht)%360,vt=(Nt+ht)%360;A.branchRadialLayout(It,n,Nt,vt,y+I,I),rt++}}},A.maxDiagonalInTree=function(n){for(var E=C.MIN_VALUE,p=0;pE&&(E=y)}return E},A.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},A.prototype.groupZeroDegreeMembers=function(){var n=this,E={};this.memberGroups={},this.idToDummyNode={};for(var p=[],m=this.graphManager.getAllNodes(),y=0;y"u"&&(E[S]=[]),E[S]=E[S].concat(I)}Object.keys(E).forEach(function(W){if(E[W].length>1){var x="DummyCompound_"+W;n.memberGroups[x]=E[W];var Q=E[W][0].getParent(),z=new t(n.graphManager);z.id=x,z.paddingLeft=Q.paddingLeft||0,z.paddingRight=Q.paddingRight||0,z.paddingBottom=Q.paddingBottom||0,z.paddingTop=Q.paddingTop||0,n.idToDummyNode[x]=z;var X=n.getGraphManager().add(n.newGraph(),z),rt=Q.getChild();rt.add(z);for(var B=0;By?(m.rect.x-=(m.labelWidth-y)/2,m.setWidth(m.labelWidth),m.labelMarginLeft=(m.labelWidth-y)/2):m.labelPosHorizontal=="right"&&m.setWidth(y+m.labelWidth)),m.labelHeight&&(m.labelPosVertical=="top"?(m.rect.y-=m.labelHeight,m.setHeight(I+m.labelHeight),m.labelMarginTop=m.labelHeight):m.labelPosVertical=="center"&&m.labelHeight>I?(m.rect.y-=(m.labelHeight-I)/2,m.setHeight(m.labelHeight),m.labelMarginTop=(m.labelHeight-I)/2):m.labelPosVertical=="bottom"&&m.setHeight(I+m.labelHeight))}})},A.prototype.repopulateCompounds=function(){for(var n=this.compoundOrder.length-1;n>=0;n--){var E=this.compoundOrder[n],p=E.id,m=E.paddingLeft,y=E.paddingTop,I=E.labelMarginLeft,D=E.labelMarginTop;this.adjustLocations(this.tiledMemberPack[p],E.rect.x,E.rect.y,m,y,I,D)}},A.prototype.repopulateZeroDegreeMembers=function(){var n=this,E=this.tiledZeroDegreePack;Object.keys(E).forEach(function(p){var m=n.idToDummyNode[p],y=m.paddingLeft,I=m.paddingTop,D=m.labelMarginLeft,S=m.labelMarginTop;n.adjustLocations(E[p],m.rect.x,m.rect.y,y,I,D,S)})},A.prototype.getToBeTiled=function(n){var E=n.id;if(this.toBeTiled[E]!=null)return this.toBeTiled[E];var p=n.getChild();if(p==null)return this.toBeTiled[E]=!1,!1;for(var m=p.getNodes(),y=0;y0)return this.toBeTiled[E]=!1,!1;if(I.getChild()==null){this.toBeTiled[I.id]=!1;continue}if(!this.getToBeTiled(I))return this.toBeTiled[E]=!1,!1}return this.toBeTiled[E]=!0,!0},A.prototype.getNodeDegree=function(n){n.id;for(var E=n.getEdges(),p=0,m=0;mQ&&(Q=X.rect.height)}p+=Q+n.verticalPadding}},A.prototype.tileCompoundMembers=function(n,E){var p=this;this.tiledMemberPack=[],Object.keys(n).forEach(function(m){var y=E[m];if(p.tiledMemberPack[m]=p.tileNodes(n[m],y.paddingLeft+y.paddingRight),y.rect.width=p.tiledMemberPack[m].width,y.rect.height=p.tiledMemberPack[m].height,y.setCenter(p.tiledMemberPack[m].centerX,p.tiledMemberPack[m].centerY),y.labelMarginLeft=0,y.labelMarginTop=0,o.NODE_DIMENSIONS_INCLUDE_LABELS){var I=y.rect.width,D=y.rect.height;y.labelWidth&&(y.labelPosHorizontal=="left"?(y.rect.x-=y.labelWidth,y.setWidth(I+y.labelWidth),y.labelMarginLeft=y.labelWidth):y.labelPosHorizontal=="center"&&y.labelWidth>I?(y.rect.x-=(y.labelWidth-I)/2,y.setWidth(y.labelWidth),y.labelMarginLeft=(y.labelWidth-I)/2):y.labelPosHorizontal=="right"&&y.setWidth(I+y.labelWidth)),y.labelHeight&&(y.labelPosVertical=="top"?(y.rect.y-=y.labelHeight,y.setHeight(D+y.labelHeight),y.labelMarginTop=y.labelHeight):y.labelPosVertical=="center"&&y.labelHeight>D?(y.rect.y-=(y.labelHeight-D)/2,y.setHeight(y.labelHeight),y.labelMarginTop=(y.labelHeight-D)/2):y.labelPosVertical=="bottom"&&y.setHeight(D+y.labelHeight))}})},A.prototype.tileNodes=function(n,E){var p=this.tileNodesByFavoringDim(n,E,!0),m=this.tileNodesByFavoringDim(n,E,!1),y=this.getOrgRatio(p),I=this.getOrgRatio(m),D;return IS&&(S=B.getWidth())});var W=I/y,x=D/y,Q=Math.pow(p-m,2)+4*(W+m)*(x+p)*y,z=(m-p+Math.sqrt(Q))/(2*(W+m)),X;E?(X=Math.ceil(z),X==z&&X++):X=Math.floor(z);var rt=X*(W+m)-m;return S>rt&&(rt=S),rt+=m*2,rt},A.prototype.tileNodesByFavoringDim=function(n,E,p){var m=o.TILING_PADDING_VERTICAL,y=o.TILING_PADDING_HORIZONTAL,I=o.TILING_COMPARE_BY,D={rows:[],rowWidth:[],rowHeight:[],width:0,height:E,verticalPadding:m,horizontalPadding:y,centerX:0,centerY:0};I&&(D.idealRowWidth=this.calcIdealRowWidth(n,p));var S=function(O){return O.rect.width*O.rect.height},W=function(O,H){return S(H)-S(O)};n.sort(function(B,O){var H=W;return D.idealRowWidth?(H=I,H(B.id,O.id)):H(B,O)});for(var x=0,Q=0,z=0;z0&&(D+=n.horizontalPadding),n.rowWidth[p]=D,n.width0&&(S+=n.verticalPadding);var W=0;S>n.rowHeight[p]&&(W=n.rowHeight[p],n.rowHeight[p]=S,W=n.rowHeight[p]-W),n.height+=W,n.rows[p].push(E)},A.prototype.getShortestRowIndex=function(n){for(var E=-1,p=Number.MAX_VALUE,m=0;mp&&(E=m,p=n.rowWidth[m]);return E},A.prototype.canAddHorizontal=function(n,E,p){if(n.idealRowWidth){var m=n.rows.length-1,y=n.rowWidth[m];return y+E+n.horizontalPadding<=n.idealRowWidth}var I=this.getShortestRowIndex(n);if(I<0)return!0;var D=n.rowWidth[I];if(D+n.horizontalPadding+E<=n.width)return!0;var S=0;n.rowHeight[I]0&&(S=p+n.verticalPadding-n.rowHeight[I]);var W;n.width-D>=E+n.horizontalPadding?W=(n.height+S)/(D+E+n.horizontalPadding):W=(n.height+S)/n.width,S=p+n.verticalPadding;var x;return n.widthI&&E!=p){m.splice(-1,1),n.rows[p].push(y),n.rowWidth[E]=n.rowWidth[E]-I,n.rowWidth[p]=n.rowWidth[p]+I,n.width=n.rowWidth[instance.getLongestRowIndex(n)];for(var D=Number.MIN_VALUE,S=0;SD&&(D=m[S].height);E>0&&(D+=n.verticalPadding);var W=n.rowHeight[E]+n.rowHeight[p];n.rowHeight[E]=D,n.rowHeight[p]0)for(var rt=y;rt<=I;rt++)X[0]+=this.grid[rt][D-1].length+this.grid[rt][D].length-1;if(I0)for(var rt=D;rt<=S;rt++)X[3]+=this.grid[y-1][rt].length+this.grid[y][rt].length-1;for(var B=C.MAX_VALUE,O,H,k=0;k{var f=i(551).FDLayoutNode,r=i(551).IMath;function u(s,o,c,l){f.call(this,s,o,c,l)}u.prototype=Object.create(f.prototype);for(var t in f)u[t]=f[t];u.prototype.calculateDisplacement=function(){var s=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=s.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=s.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=s.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=s.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>s.coolingFactor*s.maxNodeDisplacement&&(this.displacementX=s.coolingFactor*s.maxNodeDisplacement*r.sign(this.displacementX)),Math.abs(this.displacementY)>s.coolingFactor*s.maxNodeDisplacement&&(this.displacementY=s.coolingFactor*s.maxNodeDisplacement*r.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},u.prototype.propogateDisplacementToChildren=function(s,o){for(var c=this.getChild().getNodes(),l,T=0;T{function f(c){if(Array.isArray(c)){for(var l=0,T=Array(c.length);l0){var Lt=0;ot.forEach(function(st){Z=="horizontal"?(et.set(st,g.has(st)?d[g.get(st)]:q.get(st)),Lt+=et.get(st)):(et.set(st,g.has(st)?L[g.get(st)]:q.get(st)),Lt+=et.get(st))}),Lt=Lt/ot.length,lt.forEach(function(st){K.has(st)||et.set(st,Lt)})}else{var ft=0;lt.forEach(function(st){Z=="horizontal"?ft+=g.has(st)?d[g.get(st)]:q.get(st):ft+=g.has(st)?L[g.get(st)]:q.get(st)}),ft=ft/lt.length,lt.forEach(function(st){et.set(st,ft)})}});for(var Mt=function(){var ot=dt.shift(),Lt=U.get(ot);Lt.forEach(function(ft){if(et.get(ft.id)st&&(st=kt),KtXt&&(Xt=Kt)}}catch(ee){wt=!0,zt=ee}finally{try{!Tt&&bt.return&&bt.return()}finally{if(wt)throw zt}}var fe=(Lt+st)/2-(ft+Xt)/2,Qt=!0,jt=!1,_t=void 0;try{for(var Jt=lt[Symbol.iterator](),ne;!(Qt=(ne=Jt.next()).done);Qt=!0){var te=ne.value;et.set(te,et.get(te)+fe)}}catch(ee){jt=!0,_t=ee}finally{try{!Qt&&Jt.return&&Jt.return()}finally{if(jt)throw _t}}})}return et},_=function(U){var Z=0,K=0,q=0,at=0;if(U.forEach(function(j){j.left?d[g.get(j.left)]-d[g.get(j.right)]>=0?Z++:K++:L[g.get(j.top)]-L[g.get(j.bottom)]>=0?q++:at++}),Z>K&&q>at)for(var gt=0;gtK)for(var nt=0;ntat)for(var et=0;et1)l.fixedNodeConstraint.forEach(function(b,U){m[U]=[b.position.x,b.position.y],y[U]=[d[g.get(b.nodeId)],L[g.get(b.nodeId)]]}),I=!0;else if(l.alignmentConstraint)(function(){var b=0;if(l.alignmentConstraint.vertical){for(var U=l.alignmentConstraint.vertical,Z=function(et){var j=new Set;U[et].forEach(function(pt){j.add(pt)});var dt=new Set([].concat(f(j)).filter(function(pt){return S.has(pt)})),Mt=void 0;dt.size>0?Mt=d[g.get(dt.values().next().value)]:Mt=$(j).x,U[et].forEach(function(pt){m[b]=[Mt,L[g.get(pt)]],y[b]=[d[g.get(pt)],L[g.get(pt)]],b++})},K=0;K0?Mt=d[g.get(dt.values().next().value)]:Mt=$(j).y,q[et].forEach(function(pt){m[b]=[d[g.get(pt)],Mt],y[b]=[d[g.get(pt)],L[g.get(pt)]],b++})},gt=0;gtz&&(z=Q[rt].length,X=rt);if(z0){var mt={x:0,y:0};l.fixedNodeConstraint.forEach(function(b,U){var Z={x:d[g.get(b.nodeId)],y:L[g.get(b.nodeId)]},K=b.position,q=Y(K,Z);mt.x+=q.x,mt.y+=q.y}),mt.x/=l.fixedNodeConstraint.length,mt.y/=l.fixedNodeConstraint.length,d.forEach(function(b,U){d[U]+=mt.x}),L.forEach(function(b,U){L[U]+=mt.y}),l.fixedNodeConstraint.forEach(function(b){d[g.get(b.nodeId)]=b.position.x,L[g.get(b.nodeId)]=b.position.y})}if(l.alignmentConstraint){if(l.alignmentConstraint.vertical)for(var Ot=l.alignmentConstraint.vertical,Rt=function(U){var Z=new Set;Ot[U].forEach(function(at){Z.add(at)});var K=new Set([].concat(f(Z)).filter(function(at){return S.has(at)})),q=void 0;K.size>0?q=d[g.get(K.values().next().value)]:q=$(Z).x,Z.forEach(function(at){S.has(at)||(d[g.get(at)]=q)})},Ht=0;Ht0?q=L[g.get(K.values().next().value)]:q=$(Z).y,Z.forEach(function(at){S.has(at)||(L[g.get(at)]=q)})},Ft=0;Ft{a.exports=M})},N={};function v(a){var e=N[a];if(e!==void 0)return e.exports;var i=N[a]={exports:{}};return P[a](i,i.exports,v),i.exports}var h=v(45);return h})()})})(he)),he.exports}var yr=se.exports,Oe;function mr(){return Oe||(Oe=1,(function(w,F){(function(P,N){w.exports=N(pr())})(yr,function(M){return(()=>{var P={658:(a=>{a.exports=Object.assign!=null?Object.assign.bind(Object):function(e){for(var i=arguments.length,f=Array(i>1?i-1:0),r=1;r{var f=(function(){function t(s,o){var c=[],l=!0,T=!1,g=void 0;try{for(var d=s[Symbol.iterator](),L;!(l=(L=d.next()).done)&&(c.push(L.value),!(o&&c.length===o));l=!0);}catch(R){T=!0,g=R}finally{try{!l&&d.return&&d.return()}finally{if(T)throw g}}return c}return function(s,o){if(Array.isArray(s))return s;if(Symbol.iterator in Object(s))return t(s,o);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),r=i(140).layoutBase.LinkedList,u={};u.getTopMostNodes=function(t){for(var s={},o=0;o0&&I.merge(x)});for(var D=0;D1){L=g[0],R=L.connectedEdges().length,g.forEach(function(y){y.connectedEdges().length0&&c.set("dummy"+(c.size+1),V),Y},u.relocateComponent=function(t,s,o){if(!o.fixedNodeConstraint){var c=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY,T=Number.POSITIVE_INFINITY,g=Number.NEGATIVE_INFINITY;if(o.quality=="draft"){var d=!0,L=!1,R=void 0;try{for(var C=s.nodeIndexes[Symbol.iterator](),G;!(d=(G=C.next()).done);d=!0){var V=G.value,Y=f(V,2),$=Y[0],A=Y[1],_=o.cy.getElementById($);if(_){var n=_.boundingBox(),E=s.xCoords[A]-n.w/2,p=s.xCoords[A]+n.w/2,m=s.yCoords[A]-n.h/2,y=s.yCoords[A]+n.h/2;El&&(l=p),mg&&(g=y)}}}catch(x){L=!0,R=x}finally{try{!d&&C.return&&C.return()}finally{if(L)throw R}}var I=t.x-(l+c)/2,D=t.y-(g+T)/2;s.xCoords=s.xCoords.map(function(x){return x+I}),s.yCoords=s.yCoords.map(function(x){return x+D})}else{Object.keys(s).forEach(function(x){var Q=s[x],z=Q.getRect().x,X=Q.getRect().x+Q.getRect().width,rt=Q.getRect().y,B=Q.getRect().y+Q.getRect().height;zl&&(l=X),rtg&&(g=B)});var S=t.x-(l+c)/2,W=t.y-(g+T)/2;Object.keys(s).forEach(function(x){var Q=s[x];Q.setCenter(Q.getCenterX()+S,Q.getCenterY()+W)})}}},u.calcBoundingBox=function(t,s,o,c){for(var l=Number.MAX_SAFE_INTEGER,T=Number.MIN_SAFE_INTEGER,g=Number.MAX_SAFE_INTEGER,d=Number.MIN_SAFE_INTEGER,L=void 0,R=void 0,C=void 0,G=void 0,V=t.descendants().not(":parent"),Y=V.length,$=0;$L&&(l=L),TC&&(g=C),d{var f=i(548),r=i(140).CoSELayout,u=i(140).CoSENode,t=i(140).layoutBase.PointD,s=i(140).layoutBase.DimensionD,o=i(140).layoutBase.LayoutConstants,c=i(140).layoutBase.FDLayoutConstants,l=i(140).CoSEConstants,T=function(d,L){var R=d.cy,C=d.eles,G=C.nodes(),V=C.edges(),Y=void 0,$=void 0,A=void 0,_={};d.randomize&&(Y=L.nodeIndexes,$=L.xCoords,A=L.yCoords);var n=function(x){return typeof x=="function"},E=function(x,Q){return n(x)?x(Q):x},p=f.calcParentsWithoutChildren(R,C),m=function W(x,Q,z,X){for(var rt=Q.length,B=0;B0){var J=void 0;J=z.getGraphManager().add(z.newGraph(),k),W(J,H,z,X)}}},y=function(x,Q,z){for(var X=0,rt=0,B=0;B0?l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=X/rt:n(d.idealEdgeLength)?l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=50:l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=d.idealEdgeLength,l.MIN_REPULSION_DIST=c.MIN_REPULSION_DIST=c.DEFAULT_EDGE_LENGTH/10,l.DEFAULT_RADIAL_SEPARATION=c.DEFAULT_EDGE_LENGTH)},I=function(x,Q){Q.fixedNodeConstraint&&(x.constraints.fixedNodeConstraint=Q.fixedNodeConstraint),Q.alignmentConstraint&&(x.constraints.alignmentConstraint=Q.alignmentConstraint),Q.relativePlacementConstraint&&(x.constraints.relativePlacementConstraint=Q.relativePlacementConstraint)};d.nestingFactor!=null&&(l.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=c.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=d.nestingFactor),d.gravity!=null&&(l.DEFAULT_GRAVITY_STRENGTH=c.DEFAULT_GRAVITY_STRENGTH=d.gravity),d.numIter!=null&&(l.MAX_ITERATIONS=c.MAX_ITERATIONS=d.numIter),d.gravityRange!=null&&(l.DEFAULT_GRAVITY_RANGE_FACTOR=c.DEFAULT_GRAVITY_RANGE_FACTOR=d.gravityRange),d.gravityCompound!=null&&(l.DEFAULT_COMPOUND_GRAVITY_STRENGTH=c.DEFAULT_COMPOUND_GRAVITY_STRENGTH=d.gravityCompound),d.gravityRangeCompound!=null&&(l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=c.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=d.gravityRangeCompound),d.initialEnergyOnIncremental!=null&&(l.DEFAULT_COOLING_FACTOR_INCREMENTAL=c.DEFAULT_COOLING_FACTOR_INCREMENTAL=d.initialEnergyOnIncremental),d.tilingCompareBy!=null&&(l.TILING_COMPARE_BY=d.tilingCompareBy),d.quality=="proof"?o.QUALITY=2:o.QUALITY=0,l.NODE_DIMENSIONS_INCLUDE_LABELS=c.NODE_DIMENSIONS_INCLUDE_LABELS=o.NODE_DIMENSIONS_INCLUDE_LABELS=d.nodeDimensionsIncludeLabels,l.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!d.randomize,l.ANIMATE=c.ANIMATE=o.ANIMATE=d.animate,l.TILE=d.tile,l.TILING_PADDING_VERTICAL=typeof d.tilingPaddingVertical=="function"?d.tilingPaddingVertical.call():d.tilingPaddingVertical,l.TILING_PADDING_HORIZONTAL=typeof d.tilingPaddingHorizontal=="function"?d.tilingPaddingHorizontal.call():d.tilingPaddingHorizontal,l.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!0,l.PURE_INCREMENTAL=!d.randomize,o.DEFAULT_UNIFORM_LEAF_NODE_SIZES=d.uniformNodeDimensions,d.step=="transformed"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,l.ENFORCE_CONSTRAINTS=!1,l.APPLY_LAYOUT=!1),d.step=="enforced"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!0,l.APPLY_LAYOUT=!1),d.step=="cose"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!1,l.APPLY_LAYOUT=!0),d.step=="all"&&(d.randomize?l.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!0,l.APPLY_LAYOUT=!0),d.fixedNodeConstraint||d.alignmentConstraint||d.relativePlacementConstraint?l.TREE_REDUCTION_ON_INCREMENTAL=!1:l.TREE_REDUCTION_ON_INCREMENTAL=!0;var D=new r,S=D.newGraphManager();return m(S.addRoot(),f.getTopMostNodes(G),D,d),y(D,S,V),I(D,d),D.runLayout(),_};a.exports={coseLayout:T}}),212:((a,e,i)=>{var f=(function(){function d(L,R){for(var C=0;C0)if(p){var I=t.getTopMostNodes(C.eles.nodes());if(A=t.connectComponents(G,C.eles,I),A.forEach(function(vt){var it=vt.boundingBox();_.push({x:it.x1+it.w/2,y:it.y1+it.h/2})}),C.randomize&&A.forEach(function(vt){C.eles=vt,Y.push(o(C))}),C.quality=="default"||C.quality=="proof"){var D=G.collection();if(C.tile){var S=new Map,W=[],x=[],Q=0,z={nodeIndexes:S,xCoords:W,yCoords:x},X=[];if(A.forEach(function(vt,it){vt.edges().length==0&&(vt.nodes().forEach(function(ut,Et){D.merge(vt.nodes()[Et]),ut.isParent()||(z.nodeIndexes.set(vt.nodes()[Et].id(),Q++),z.xCoords.push(vt.nodes()[0].position().x),z.yCoords.push(vt.nodes()[0].position().y))}),X.push(it))}),D.length>1){var rt=D.boundingBox();_.push({x:rt.x1+rt.w/2,y:rt.y1+rt.h/2}),A.push(D),Y.push(z);for(var B=X.length-1;B>=0;B--)A.splice(X[B],1),Y.splice(X[B],1),_.splice(X[B],1)}}A.forEach(function(vt,it){C.eles=vt,$.push(l(C,Y[it])),t.relocateComponent(_[it],$[it],C)})}else A.forEach(function(vt,it){t.relocateComponent(_[it],Y[it],C)});var O=new Set;if(A.length>1){var H=[],k=V.filter(function(vt){return vt.css("display")=="none"});A.forEach(function(vt,it){var ut=void 0;if(C.quality=="draft"&&(ut=Y[it].nodeIndexes),vt.nodes().not(k).length>0){var Et={};Et.edges=[],Et.nodes=[];var Ct=void 0;vt.nodes().not(k).forEach(function(Dt){if(C.quality=="draft")if(!Dt.isParent())Ct=ut.get(Dt.id()),Et.nodes.push({x:Y[it].xCoords[Ct]-Dt.boundingbox().w/2,y:Y[it].yCoords[Ct]-Dt.boundingbox().h/2,width:Dt.boundingbox().w,height:Dt.boundingbox().h});else{var mt=t.calcBoundingBox(Dt,Y[it].xCoords,Y[it].yCoords,ut);Et.nodes.push({x:mt.topLeftX,y:mt.topLeftY,width:mt.width,height:mt.height})}else $[it][Dt.id()]&&Et.nodes.push({x:$[it][Dt.id()].getLeft(),y:$[it][Dt.id()].getTop(),width:$[it][Dt.id()].getWidth(),height:$[it][Dt.id()].getHeight()})}),vt.edges().forEach(function(Dt){var mt=Dt.source(),Ot=Dt.target();if(mt.css("display")!="none"&&Ot.css("display")!="none")if(C.quality=="draft"){var Rt=ut.get(mt.id()),Ht=ut.get(Ot.id()),Ut=[],Gt=[];if(mt.isParent()){var Ft=t.calcBoundingBox(mt,Y[it].xCoords,Y[it].yCoords,ut);Ut.push(Ft.topLeftX+Ft.width/2),Ut.push(Ft.topLeftY+Ft.height/2)}else Ut.push(Y[it].xCoords[Rt]),Ut.push(Y[it].yCoords[Rt]);if(Ot.isParent()){var Yt=t.calcBoundingBox(Ot,Y[it].xCoords,Y[it].yCoords,ut);Gt.push(Yt.topLeftX+Yt.width/2),Gt.push(Yt.topLeftY+Yt.height/2)}else Gt.push(Y[it].xCoords[Ht]),Gt.push(Y[it].yCoords[Ht]);Et.edges.push({startX:Ut[0],startY:Ut[1],endX:Gt[0],endY:Gt[1]})}else $[it][mt.id()]&&$[it][Ot.id()]&&Et.edges.push({startX:$[it][mt.id()].getCenterX(),startY:$[it][mt.id()].getCenterY(),endX:$[it][Ot.id()].getCenterX(),endY:$[it][Ot.id()].getCenterY()})}),Et.nodes.length>0&&(H.push(Et),O.add(it))}});var tt=E.packComponents(H,C.randomize).shifts;if(C.quality=="draft")Y.forEach(function(vt,it){var ut=vt.xCoords.map(function(Ct){return Ct+tt[it].dx}),Et=vt.yCoords.map(function(Ct){return Ct+tt[it].dy});vt.xCoords=ut,vt.yCoords=Et});else{var ht=0;O.forEach(function(vt){Object.keys($[vt]).forEach(function(it){var ut=$[vt][it];ut.setCenter(ut.getCenterX()+tt[ht].dx,ut.getCenterY()+tt[ht].dy)}),ht++})}}}else{var m=C.eles.boundingBox();if(_.push({x:m.x1+m.w/2,y:m.y1+m.h/2}),C.randomize){var y=o(C);Y.push(y)}C.quality=="default"||C.quality=="proof"?($.push(l(C,Y[0])),t.relocateComponent(_[0],$[0],C)):t.relocateComponent(_[0],Y[0],C)}var J=function(it,ut){if(C.quality=="default"||C.quality=="proof"){typeof it=="number"&&(it=ut);var Et=void 0,Ct=void 0,Dt=it.data("id");return $.forEach(function(Ot){Dt in Ot&&(Et={x:Ot[Dt].getRect().getCenterX(),y:Ot[Dt].getRect().getCenterY()},Ct=Ot[Dt])}),C.nodeDimensionsIncludeLabels&&(Ct.labelWidth&&(Ct.labelPosHorizontal=="left"?Et.x+=Ct.labelWidth/2:Ct.labelPosHorizontal=="right"&&(Et.x-=Ct.labelWidth/2)),Ct.labelHeight&&(Ct.labelPosVertical=="top"?Et.y+=Ct.labelHeight/2:Ct.labelPosVertical=="bottom"&&(Et.y-=Ct.labelHeight/2))),Et==null&&(Et={x:it.position("x"),y:it.position("y")}),{x:Et.x,y:Et.y}}else{var mt=void 0;return Y.forEach(function(Ot){var Rt=Ot.nodeIndexes.get(it.id());Rt!=null&&(mt={x:Ot.xCoords[Rt],y:Ot.yCoords[Rt]})}),mt==null&&(mt={x:it.position("x"),y:it.position("y")}),{x:mt.x,y:mt.y}}};if(C.quality=="default"||C.quality=="proof"||C.randomize){var It=t.calcParentsWithoutChildren(G,V),Nt=V.filter(function(vt){return vt.css("display")=="none"});C.eles=V.not(Nt),V.nodes().not(":parent").not(Nt).layoutPositions(R,C,J),It.length>0&&It.forEach(function(vt){vt.position(J(vt))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),d})();a.exports=g}),657:((a,e,i)=>{var f=i(548),r=i(140).layoutBase.Matrix,u=i(140).layoutBase.SVD,t=function(o){var c=o.cy,l=o.eles,T=l.nodes(),g=l.nodes(":parent"),d=new Map,L=new Map,R=new Map,C=[],G=[],V=[],Y=[],$=[],A=[],_=[],n=[],E=void 0,p=1e8,m=1e-9,y=o.piTol,I=o.samplingType,D=o.nodeSeparation,S=void 0,W=function(){for(var U=0,Z=0,K=!1;Z=at;){nt=q[at++];for(var xt=C[nt],lt=0;ltdt&&(dt=$[Lt],Mt=Lt)}return Mt},Q=function(U){var Z=void 0;if(U){Z=Math.floor(Math.random()*E);for(var q=0;q=1)break;j=et}for(var pt=0;pt=1)break;j=et}for(var lt=0;lt0&&(Z.isParent()?C[U].push(R.get(Z.id())):C[U].push(Z.id()))})});var Nt=function(U){var Z=L.get(U),K=void 0;d.get(U).forEach(function(q){c.getElementById(q).isParent()?K=R.get(q):K=q,C[Z].push(K),C[L.get(K)].push(U)})},vt=!0,it=!1,ut=void 0;try{for(var Et=d.keys()[Symbol.iterator](),Ct;!(vt=(Ct=Et.next()).done);vt=!0){var Dt=Ct.value;Nt(Dt)}}catch(b){it=!0,ut=b}finally{try{!vt&&Et.return&&Et.return()}finally{if(it)throw ut}}E=L.size;var mt=void 0;if(E>2){S=E{var f=i(212),r=function(t){t&&t("layout","fcose",f)};typeof cytoscape<"u"&&r(cytoscape),a.exports=r}),140:(a=>{a.exports=M})},N={};function v(a){var e=N[a];if(e!==void 0)return e.exports;var i=N[a]={exports:{}};return P[a](i,i.exports,v),i.exports}var h=v(579);return h})()})})(se)),se.exports}var Er=mr();const Tr=qe(Er);var xe={L:"left",R:"right",T:"top",B:"bottom"},Ie={L:ct(w=>`${w},${w/2} 0,${w} 0,0`,"L"),R:ct(w=>`0,${w/2} ${w},0 ${w},${w}`,"R"),T:ct(w=>`0,0 ${w},0 ${w/2},${w}`,"T"),B:ct(w=>`${w/2},0 ${w},${w} 0,${w}`,"B")},oe={L:ct((w,F)=>w-F+2,"L"),R:ct((w,F)=>w-2,"R"),T:ct((w,F)=>w-F+2,"T"),B:ct((w,F)=>w-2,"B")},Nr=ct(function(w){return Wt(w)?w==="L"?"R":"L":w==="T"?"B":"T"},"getOppositeArchitectureDirection"),Re=ct(function(w){const F=w;return F==="L"||F==="R"||F==="T"||F==="B"},"isArchitectureDirection"),Wt=ct(function(w){const F=w;return F==="L"||F==="R"},"isArchitectureDirectionX"),qt=ct(function(w){const F=w;return F==="T"||F==="B"},"isArchitectureDirectionY"),Te=ct(function(w,F){const M=Wt(w)&&qt(F),P=qt(w)&&Wt(F);return M||P},"isArchitectureDirectionXY"),Lr=ct(function(w){const F=w[0],M=w[1],P=Wt(F)&&qt(M),N=qt(F)&&Wt(M);return P||N},"isArchitecturePairXY"),wr=ct(function(w){return w!=="LL"&&w!=="RR"&&w!=="TT"&&w!=="BB"},"isValidArchitectureDirectionPair"),pe=ct(function(w,F){const M=`${w}${F}`;return wr(M)?M:void 0},"getArchitectureDirectionPair"),Cr=ct(function([w,F],M){const P=M[0],N=M[1];return Wt(P)?qt(N)?[w+(P==="L"?-1:1),F+(N==="T"?1:-1)]:[w+(P==="L"?-1:1),F]:Wt(N)?[w+(N==="L"?1:-1),F+(P==="T"?1:-1)]:[w,F+(P==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),Mr=ct(function(w){return w==="LT"||w==="TL"?[1,1]:w==="BL"||w==="LB"?[1,-1]:w==="BR"||w==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),Ar=ct(function(w,F){return Te(w,F)?"bend":Wt(w)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),Dr=ct(function(w){return w.type==="service"},"isArchitectureService"),Or=ct(function(w){return w.type==="junction"},"isArchitectureJunction"),be=ct((w,F)=>{const[M,P]=[w,F].sort();return`${JSON.stringify(M)}-${JSON.stringify(P)}`},"architectureGroupAlignmentKey"),Ge=ct(w=>w.data(),"edgeData"),ie=ct(w=>w.data(),"nodeData"),xr=or.architecture,Pe=class{constructor(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.elements=new Map,this.diagramId="",this.setAccTitle=Ke,this.getAccTitle=je,this.setDiagramTitle=_e,this.getDiagramTitle=tr,this.getAccDescription=er,this.setAccDescription=rr,this.clear()}static{ct(this,"ArchitectureDB")}setDiagramId(w){this.diagramId=w}getDiagramId(){return this.diagramId}clear(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.dataStructures=void 0,this.elements=new Map,this.diagramId="",ir()}addService({id:w,icon:F,in:M,title:P,iconText:N}){if(this.registeredIds.has(w))throw new Error(`The service id [${w}] is already in use by another ${this.registeredIds.get(w)}`);if(M!==void 0){if(w===M)throw new Error(`The service [${w}] cannot be placed within itself`);if(!this.registeredIds.has(M))throw new Error(`The service [${w}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds.get(M)==="node")throw new Error(`The service [${w}]'s parent is not a group`)}this.registeredIds.set(w,"node"),this.nodes.set(w,{id:w,type:"service",icon:F,iconText:N,title:P,edges:[],in:M})}getServices(){return[...this.nodes.values()].filter(Dr)}addJunction({id:w,in:F}){if(this.registeredIds.has(w))throw new Error(`The junction id [${w}] is already in use by another ${this.registeredIds.get(w)}`);if(F!==void 0){if(w===F)throw new Error(`The junction [${w}] cannot be placed within itself`);if(!this.registeredIds.has(F))throw new Error(`The junction [${w}]'s parent does not exist. Please make sure the parent is created before this junction`);if(this.registeredIds.get(F)==="node")throw new Error(`The junction [${w}]'s parent is not a group`)}this.registeredIds.set(w,"node"),this.nodes.set(w,{id:w,type:"junction",edges:[],in:F})}getJunctions(){return[...this.nodes.values()].filter(Or)}getNodes(){return[...this.nodes.values()]}getNode(w){return this.nodes.get(w)??null}addGroup({id:w,icon:F,in:M,title:P}){if(this.registeredIds.has(w))throw new Error(`The group id [${w}] is already in use by another ${this.registeredIds.get(w)}`);if(M!==void 0){if(w===M)throw new Error(`The group [${w}] cannot be placed within itself`);if(!this.registeredIds.has(M))throw new Error(`The group [${w}]'s parent does not exist. Please make sure the parent is created before this group`);if(this.registeredIds.get(M)==="node")throw new Error(`The group [${w}]'s parent is not a group`)}this.registeredIds.set(w,"group"),this.groups.set(w,{id:w,icon:F,title:P,in:M})}getGroups(){return[...this.groups.values()]}addEdge({lhsId:w,rhsId:F,lhsDir:M,rhsDir:P,lhsInto:N,rhsInto:v,lhsGroup:h,rhsGroup:a,title:e}){if(!Re(M))throw new Error(`Invalid direction given for left hand side of edge ${w}--${F}. Expected (L,R,T,B) got ${String(M)}`);if(!Re(P))throw new Error(`Invalid direction given for right hand side of edge ${w}--${F}. Expected (L,R,T,B) got ${String(P)}`);if(!this.nodes.has(w)&&!this.groups.has(w))throw new Error(`The left-hand id [${w}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(!this.nodes.has(F)&&!this.groups.has(F))throw new Error(`The right-hand id [${F}] does not yet exist. Please create the service/group before declaring an edge to it.`);const i=this.nodes.get(w).in,f=this.nodes.get(F).in;if(h&&i&&f&&i==f)throw new Error(`The left-hand id [${w}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(a&&i&&f&&i==f)throw new Error(`The right-hand id [${F}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);const r={lhsId:w,lhsDir:M,lhsInto:N,lhsGroup:h,rhsId:F,rhsDir:P,rhsInto:v,rhsGroup:a,title:e};this.edges.push(r);const u=this.nodes.get(w),t=this.nodes.get(F);u&&t&&(u.edges.push(this.edges[this.edges.length-1]),t.edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}addLayoutHint(w){if(w.members.length<2)throw new Error(`An align directive requires at least two members; got ${w.members.length}`);const F=new Set;w.members.forEach(M=>{if(this.registeredIds.get(M)!=="node")throw new Error(`align ${w.direction} references [${M}], which is not a service or junction`);if(F.has(M))throw new Error(`align ${w.direction} lists [${M}] more than once`);F.add(M)}),this.layoutHints.push(w)}getLayoutHints(){return this.layoutHints}getDataStructures(){if(this.dataStructures===void 0){const w=new Map,F=new Map;for(const[h,a]of this.nodes.entries()){const e=new Map;for(const i of a.edges){const f=this.getNode(i.lhsId)?.in,r=this.getNode(i.rhsId)?.in;if(f&&r&&f!==r){const u=Ar(i.lhsDir,i.rhsDir);u!=="bend"&&w.set(be(f,r),u)}if(i.lhsId===h){const u=pe(i.lhsDir,i.rhsDir);u&&e.set(u,i.rhsId)}else{const u=pe(i.rhsDir,i.lhsDir);u&&e.set(u,i.lhsId)}}F.set(h,e)}const M=new Set,P=new Set(F.keys()),N=ct(h=>{const a=new Map([[h,[0,0]]]),e=[h];for(;e.length>0;){const i=e.shift();if(i){M.add(i),P.delete(i);const f=F.get(i);if(!f)throw new Error(`BFS error: adjacency list for id ${i} not found. Please report this as a bug.`);const r=a.get(i);if(!r)throw new Error(`BFS error: position for id ${i} not found in spatial map. Please report this as a bug.`);const[u,t]=r;f.forEach((s,o)=>{M.has(s)||(a.set(s,Cr([u,t],o)),e.push(s))})}}return a},"BFS"),v=[];for(;P.size>0;){const h=P.values().next().value;v.push(N(h))}this.dataStructures={adjList:F,spatialMaps:v,groupAlignments:w}}return this.dataStructures}setElementForId(w,F){this.elements.set(w,F)}getElementById(w){return this.elements.get(w)}getConfig(){return ar({...xr,...nr().architecture})}getConfigField(w){return this.getConfig()[w]}},Ir=ct((w,F)=>{Ze(w,F),w.groups.map(M=>F.addGroup(M)),w.services.map(M=>F.addService({...M,type:"service"})),w.junctions.map(M=>F.addJunction({...M,type:"junction"})),w.edges.map(M=>F.addEdge(M)),w.alignments?.map(M=>F.addLayoutHint({direction:M.direction,members:[...M.members]}))},"populateDb"),Ue={parser:{yy:void 0},parse:ct(async w=>{const F=await gr("architecture",w);Se.debug(F);const M=Ue.parser?.yy;if(!(M instanceof Pe))throw new Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Ir(F,M)},"parse")},Rr=ct(w=>`
+import{p as Ze}from"./chunk-JWPE2WC7-DjA09kFS.js";import{b4 as qe,_ as ct,G as Qe,ae as Je,l as Se,b as Ke,a as je,p as _e,q as tr,g as er,s as rr,r as ir,D as ar,A as nr,E as or,c as me,b5 as Ee,aj as ve,i as sr,j as hr,t as lr,ak as fr,b6 as cr}from"./mermaid.core-BLsmN-lt.js";import{p as gr}from"./cynefin-OW5HDTMX-BygTY4j3.js";import{c as Fe}from"./cytoscape.esm-CNiYdHpY.js";import"./index-XmhyfFRf.js";import"./purify.es-5AjVNlXF.js";var se={exports:{}},he={exports:{}},le={exports:{}},ur=le.exports,Ae;function dr(){return Ae||(Ae=1,(function(w,F){(function(P,N){w.exports=N()})(ur,function(){return(function(M){var P={};function N(v){if(P[v])return P[v].exports;var h=P[v]={i:v,l:!1,exports:{}};return M[v].call(h.exports,h,h.exports,N),h.l=!0,h.exports}return N.m=M,N.c=P,N.i=function(v){return v},N.d=function(v,h,a){N.o(v,h)||Object.defineProperty(v,h,{configurable:!1,enumerable:!0,get:a})},N.n=function(v){var h=v&&v.__esModule?function(){return v.default}:function(){return v};return N.d(h,"a",h),h},N.o=function(v,h){return Object.prototype.hasOwnProperty.call(v,h)},N.p="",N(N.s=28)})([(function(M,P,N){function v(){}v.QUALITY=1,v.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,v.DEFAULT_INCREMENTAL=!1,v.DEFAULT_ANIMATION_ON_LAYOUT=!0,v.DEFAULT_ANIMATION_DURING_LAYOUT=!1,v.DEFAULT_ANIMATION_PERIOD=50,v.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,v.DEFAULT_GRAPH_MARGIN=15,v.NODE_DIMENSIONS_INCLUDE_LABELS=!1,v.SIMPLE_NODE_SIZE=40,v.SIMPLE_NODE_HALF_SIZE=v.SIMPLE_NODE_SIZE/2,v.EMPTY_COMPOUND_NODE_SIZE=40,v.MIN_EDGE_LENGTH=1,v.WORLD_BOUNDARY=1e6,v.INITIAL_WORLD_BOUNDARY=v.WORLD_BOUNDARY/1e3,v.WORLD_CENTER_X=1200,v.WORLD_CENTER_Y=900,M.exports=v}),(function(M,P,N){var v=N(2),h=N(8),a=N(9);function e(f,r,u){v.call(this,u),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=u,this.bendpoints=[],this.source=f,this.target=r}e.prototype=Object.create(v.prototype);for(var i in v)e[i]=v[i];e.prototype.getSource=function(){return this.source},e.prototype.getTarget=function(){return this.target},e.prototype.isInterGraph=function(){return this.isInterGraph},e.prototype.getLength=function(){return this.length},e.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},e.prototype.getBendpoints=function(){return this.bendpoints},e.prototype.getLca=function(){return this.lca},e.prototype.getSourceInLca=function(){return this.sourceInLca},e.prototype.getTargetInLca=function(){return this.targetInLca},e.prototype.getOtherEnd=function(f){if(this.source===f)return this.target;if(this.target===f)return this.source;throw"Node is not incident with this edge"},e.prototype.getOtherEndInGraph=function(f,r){for(var u=this.getOtherEnd(f),t=r.getGraphManager().getRoot();;){if(u.getOwner()==r)return u;if(u.getOwner()==t)break;u=u.getOwner().getParent()}return null},e.prototype.updateLength=function(){var f=new Array(4);this.isOverlapingSourceAndTarget=h.getIntersection(this.target.getRect(),this.source.getRect(),f),this.isOverlapingSourceAndTarget||(this.lengthX=f[0]-f[2],this.lengthY=f[1]-f[3],Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},e.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},M.exports=e}),(function(M,P,N){function v(h){this.vGraphObject=h}M.exports=v}),(function(M,P,N){var v=N(2),h=N(10),a=N(13),e=N(0),i=N(16),f=N(5);function r(t,s,o,c){o==null&&c==null&&(c=s),v.call(this,c),t.graphManager!=null&&(t=t.graphManager),this.estimatedSize=h.MIN_VALUE,this.inclusionTreeDepth=h.MAX_VALUE,this.vGraphObject=c,this.edges=[],this.graphManager=t,o!=null&&s!=null?this.rect=new a(s.x,s.y,o.width,o.height):this.rect=new a}r.prototype=Object.create(v.prototype);for(var u in v)r[u]=v[u];r.prototype.getEdges=function(){return this.edges},r.prototype.getChild=function(){return this.child},r.prototype.getOwner=function(){return this.owner},r.prototype.getWidth=function(){return this.rect.width},r.prototype.setWidth=function(t){this.rect.width=t},r.prototype.getHeight=function(){return this.rect.height},r.prototype.setHeight=function(t){this.rect.height=t},r.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},r.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},r.prototype.getCenter=function(){return new f(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},r.prototype.getLocation=function(){return new f(this.rect.x,this.rect.y)},r.prototype.getRect=function(){return this.rect},r.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},r.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},r.prototype.setRect=function(t,s){this.rect.x=t.x,this.rect.y=t.y,this.rect.width=s.width,this.rect.height=s.height},r.prototype.setCenter=function(t,s){this.rect.x=t-this.rect.width/2,this.rect.y=s-this.rect.height/2},r.prototype.setLocation=function(t,s){this.rect.x=t,this.rect.y=s},r.prototype.moveBy=function(t,s){this.rect.x+=t,this.rect.y+=s},r.prototype.getEdgeListToNode=function(t){var s=[],o=this;return o.edges.forEach(function(c){if(c.target==t){if(c.source!=o)throw"Incorrect edge source!";s.push(c)}}),s},r.prototype.getEdgesBetween=function(t){var s=[],o=this;return o.edges.forEach(function(c){if(!(c.source==o||c.target==o))throw"Incorrect edge source and/or target";(c.target==t||c.source==t)&&s.push(c)}),s},r.prototype.getNeighborsList=function(){var t=new Set,s=this;return s.edges.forEach(function(o){if(o.source==s)t.add(o.target);else{if(o.target!=s)throw"Incorrect incidency!";t.add(o.source)}}),t},r.prototype.withChildren=function(){var t=new Set,s,o;if(t.add(this),this.child!=null)for(var c=this.child.getNodes(),l=0;ls?(this.rect.x-=(this.labelWidth-s)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal=="right"&&this.setWidth(s+this.labelWidth)),this.labelHeight&&(this.labelPosVertical=="top"?(this.rect.y-=this.labelHeight,this.setHeight(o+this.labelHeight)):this.labelPosVertical=="center"&&this.labelHeight>o?(this.rect.y-=(this.labelHeight-o)/2,this.setHeight(this.labelHeight)):this.labelPosVertical=="bottom"&&this.setHeight(o+this.labelHeight))}}},r.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==h.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},r.prototype.transform=function(t){var s=this.rect.x;s>e.WORLD_BOUNDARY?s=e.WORLD_BOUNDARY:s<-e.WORLD_BOUNDARY&&(s=-e.WORLD_BOUNDARY);var o=this.rect.y;o>e.WORLD_BOUNDARY?o=e.WORLD_BOUNDARY:o<-e.WORLD_BOUNDARY&&(o=-e.WORLD_BOUNDARY);var c=new f(s,o),l=t.inverseTransformPoint(c);this.setLocation(l.x,l.y)},r.prototype.getLeft=function(){return this.rect.x},r.prototype.getRight=function(){return this.rect.x+this.rect.width},r.prototype.getTop=function(){return this.rect.y},r.prototype.getBottom=function(){return this.rect.y+this.rect.height},r.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},M.exports=r}),(function(M,P,N){var v=N(0);function h(){}for(var a in v)h[a]=v[a];h.MAX_ITERATIONS=2500,h.DEFAULT_EDGE_LENGTH=50,h.DEFAULT_SPRING_STRENGTH=.45,h.DEFAULT_REPULSION_STRENGTH=4500,h.DEFAULT_GRAVITY_STRENGTH=.4,h.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,h.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,h.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,h.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,h.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,h.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,h.COOLING_ADAPTATION_FACTOR=.33,h.ADAPTATION_LOWER_NODE_LIMIT=1e3,h.ADAPTATION_UPPER_NODE_LIMIT=5e3,h.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,h.MAX_NODE_DISPLACEMENT=h.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,h.MIN_REPULSION_DIST=h.DEFAULT_EDGE_LENGTH/10,h.CONVERGENCE_CHECK_PERIOD=100,h.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,h.MIN_EDGE_LENGTH=1,h.GRID_CALCULATION_CHECK_PERIOD=10,M.exports=h}),(function(M,P,N){function v(h,a){h==null&&a==null?(this.x=0,this.y=0):(this.x=h,this.y=a)}v.prototype.getX=function(){return this.x},v.prototype.getY=function(){return this.y},v.prototype.setX=function(h){this.x=h},v.prototype.setY=function(h){this.y=h},v.prototype.getDifference=function(h){return new DimensionD(this.x-h.x,this.y-h.y)},v.prototype.getCopy=function(){return new v(this.x,this.y)},v.prototype.translate=function(h){return this.x+=h.width,this.y+=h.height,this},M.exports=v}),(function(M,P,N){var v=N(2),h=N(10),a=N(0),e=N(7),i=N(3),f=N(1),r=N(13),u=N(12),t=N(11);function s(c,l,T){v.call(this,T),this.estimatedSize=h.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=c,l!=null&&l instanceof e?this.graphManager=l:l!=null&&l instanceof Layout&&(this.graphManager=l.graphManager)}s.prototype=Object.create(v.prototype);for(var o in v)s[o]=v[o];s.prototype.getNodes=function(){return this.nodes},s.prototype.getEdges=function(){return this.edges},s.prototype.getGraphManager=function(){return this.graphManager},s.prototype.getParent=function(){return this.parent},s.prototype.getLeft=function(){return this.left},s.prototype.getRight=function(){return this.right},s.prototype.getTop=function(){return this.top},s.prototype.getBottom=function(){return this.bottom},s.prototype.isConnected=function(){return this.isConnected},s.prototype.add=function(c,l,T){if(l==null&&T==null){var g=c;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(g)>-1)throw"Node already in graph!";return g.owner=this,this.getNodes().push(g),g}else{var d=c;if(!(this.getNodes().indexOf(l)>-1&&this.getNodes().indexOf(T)>-1))throw"Source or target not in graph!";if(!(l.owner==T.owner&&l.owner==this))throw"Both owners must be this graph!";return l.owner!=T.owner?null:(d.source=l,d.target=T,d.isInterGraph=!1,this.getEdges().push(d),l.edges.push(d),T!=l&&T.edges.push(d),d)}},s.prototype.remove=function(c){var l=c;if(c instanceof i){if(l==null)throw"Node is null!";if(!(l.owner!=null&&l.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var T=l.edges.slice(),g,d=T.length,L=0;L-1&&G>-1))throw"Source and/or target doesn't know this edge!";g.source.edges.splice(C,1),g.target!=g.source&&g.target.edges.splice(G,1);var R=g.source.owner.getEdges().indexOf(g);if(R==-1)throw"Not in owner's edge list!";g.source.owner.getEdges().splice(R,1)}},s.prototype.updateLeftTop=function(){for(var c=h.MAX_VALUE,l=h.MAX_VALUE,T,g,d,L=this.getNodes(),R=L.length,C=0;CT&&(c=T),l>g&&(l=g)}return c==h.MAX_VALUE?null:(L[0].getParent().paddingLeft!=null?d=L[0].getParent().paddingLeft:d=this.margin,this.left=l-d,this.top=c-d,new u(this.left,this.top))},s.prototype.updateBounds=function(c){for(var l=h.MAX_VALUE,T=-h.MAX_VALUE,g=h.MAX_VALUE,d=-h.MAX_VALUE,L,R,C,G,V,Y=this.nodes,$=Y.length,A=0;A<$;A++){var _=Y[A];c&&_.child!=null&&_.updateBounds(),L=_.getLeft(),R=_.getRight(),C=_.getTop(),G=_.getBottom(),l>L&&(l=L),TC&&(g=C),dL&&(l=L),TC&&(g=C),d=this.nodes.length){var $=0;T.forEach(function(A){A.owner==c&&$++}),$==this.nodes.length&&(this.isConnected=!0)}},M.exports=s}),(function(M,P,N){var v,h=N(1);function a(e){v=N(6),this.layout=e,this.graphs=[],this.edges=[]}a.prototype.addRoot=function(){var e=this.layout.newGraph(),i=this.layout.newNode(null),f=this.add(e,i);return this.setRootGraph(f),this.rootGraph},a.prototype.add=function(e,i,f,r,u){if(f==null&&r==null&&u==null){if(e==null)throw"Graph is null!";if(i==null)throw"Parent node is null!";if(this.graphs.indexOf(e)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(e),e.parent!=null)throw"Already has a parent!";if(i.child!=null)throw"Already has a child!";return e.parent=i,i.child=e,e}else{u=f,r=i,f=e;var t=r.getOwner(),s=u.getOwner();if(!(t!=null&&t.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(s!=null&&s.getGraphManager()==this))throw"Target not in this graph mgr!";if(t==s)return f.isInterGraph=!1,t.add(f,r,u);if(f.isInterGraph=!0,f.source=r,f.target=u,this.edges.indexOf(f)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(f),!(f.source!=null&&f.target!=null))throw"Edge source and/or target is null!";if(!(f.source.edges.indexOf(f)==-1&&f.target.edges.indexOf(f)==-1))throw"Edge already in source and/or target incidency list!";return f.source.edges.push(f),f.target.edges.push(f),f}},a.prototype.remove=function(e){if(e instanceof v){var i=e;if(i.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(i==this.rootGraph||i.parent!=null&&i.parent.graphManager==this))throw"Invalid parent node!";var f=[];f=f.concat(i.getEdges());for(var r,u=f.length,t=0;t=e.getRight()?i[0]+=Math.min(e.getX()-a.getX(),a.getRight()-e.getRight()):e.getX()<=a.getX()&&e.getRight()>=a.getRight()&&(i[0]+=Math.min(a.getX()-e.getX(),e.getRight()-a.getRight())),a.getY()<=e.getY()&&a.getBottom()>=e.getBottom()?i[1]+=Math.min(e.getY()-a.getY(),a.getBottom()-e.getBottom()):e.getY()<=a.getY()&&e.getBottom()>=a.getBottom()&&(i[1]+=Math.min(a.getY()-e.getY(),e.getBottom()-a.getBottom()));var u=Math.abs((e.getCenterY()-a.getCenterY())/(e.getCenterX()-a.getCenterX()));e.getCenterY()===a.getCenterY()&&e.getCenterX()===a.getCenterX()&&(u=1);var t=u*i[0],s=i[1]/u;i[0]t)return i[0]=f,i[1]=o,i[2]=u,i[3]=Y,!1;if(ru)return i[0]=s,i[1]=r,i[2]=G,i[3]=t,!1;if(fu?(i[0]=l,i[1]=T,n=!0):(i[0]=c,i[1]=o,n=!0):p===y&&(f>u?(i[0]=s,i[1]=o,n=!0):(i[0]=g,i[1]=T,n=!0)),-m===y?u>f?(i[2]=V,i[3]=Y,E=!0):(i[2]=G,i[3]=C,E=!0):m===y&&(u>f?(i[2]=R,i[3]=C,E=!0):(i[2]=$,i[3]=Y,E=!0)),n&&E)return!1;if(f>u?r>t?(I=this.getCardinalDirection(p,y,4),D=this.getCardinalDirection(m,y,2)):(I=this.getCardinalDirection(-p,y,3),D=this.getCardinalDirection(-m,y,1)):r>t?(I=this.getCardinalDirection(-p,y,1),D=this.getCardinalDirection(-m,y,3)):(I=this.getCardinalDirection(p,y,2),D=this.getCardinalDirection(m,y,4)),!n)switch(I){case 1:W=o,S=f+-L/y,i[0]=S,i[1]=W;break;case 2:S=g,W=r+d*y,i[0]=S,i[1]=W;break;case 3:W=T,S=f+L/y,i[0]=S,i[1]=W;break;case 4:S=l,W=r+-d*y,i[0]=S,i[1]=W;break}if(!E)switch(D){case 1:Q=C,x=u+-_/y,i[2]=x,i[3]=Q;break;case 2:x=$,Q=t+A*y,i[2]=x,i[3]=Q;break;case 3:Q=Y,x=u+_/y,i[2]=x,i[3]=Q;break;case 4:x=V,Q=t+-A*y,i[2]=x,i[3]=Q;break}}return!1},h.getCardinalDirection=function(a,e,i){return a>e?i:1+i%4},h.getIntersection=function(a,e,i,f){if(f==null)return this.getIntersection2(a,e,i);var r=a.x,u=a.y,t=e.x,s=e.y,o=i.x,c=i.y,l=f.x,T=f.y,g=void 0,d=void 0,L=void 0,R=void 0,C=void 0,G=void 0,V=void 0,Y=void 0,$=void 0;return L=s-u,C=r-t,V=t*u-r*s,R=T-c,G=o-l,Y=l*c-o*T,$=L*G-R*C,$===0?null:(g=(C*Y-G*V)/$,d=(R*V-L*Y)/$,new v(g,d))},h.angleOfVector=function(a,e,i,f){var r=void 0;return a!==i?(r=Math.atan((f-e)/(i-a)),i=0){var T=(-o+Math.sqrt(o*o-4*s*c))/(2*s),g=(-o-Math.sqrt(o*o-4*s*c))/(2*s),d=null;return T>=0&&T<=1?[T]:g>=0&&g<=1?[g]:d}else return null},h.HALF_PI=.5*Math.PI,h.ONE_AND_HALF_PI=1.5*Math.PI,h.TWO_PI=2*Math.PI,h.THREE_PI=3*Math.PI,M.exports=h}),(function(M,P,N){function v(){}v.sign=function(h){return h>0?1:h<0?-1:0},v.floor=function(h){return h<0?Math.ceil(h):Math.floor(h)},v.ceil=function(h){return h<0?Math.floor(h):Math.ceil(h)},M.exports=v}),(function(M,P,N){function v(){}v.MAX_VALUE=2147483647,v.MIN_VALUE=-2147483648,M.exports=v}),(function(M,P,N){var v=(function(){function r(u,t){for(var s=0;s"u"?"undefined":v(a);return a==null||e!="object"&&e!="function"},M.exports=h}),(function(M,P,N){function v(o){if(Array.isArray(o)){for(var c=0,l=Array(o.length);c0&&c;){for(L.push(C[0]);L.length>0&&c;){var G=L[0];L.splice(0,1),d.add(G);for(var V=G.getEdges(),g=0;g-1&&C.splice(_,1)}d=new Set,R=new Map}}return o},s.prototype.createDummyNodesForBendpoints=function(o){for(var c=[],l=o.source,T=this.graphManager.calcLowestCommonAncestor(o.source,o.target),g=0;g0){for(var T=this.edgeToDummyNodes.get(l),g=0;g=0&&c.splice(Y,1);var $=R.getNeighborsList();$.forEach(function(n){if(l.indexOf(n)<0){var E=T.get(n),p=E-1;p==1&&G.push(n),T.set(n,p)}})}l=l.concat(G),(c.length==1||c.length==2)&&(g=!0,d=c[0])}return d},s.prototype.setGraphManager=function(o){this.graphManager=o},M.exports=s}),(function(M,P,N){function v(){}v.seed=1,v.x=0,v.nextDouble=function(){return v.x=Math.sin(v.seed++)*1e4,v.x-Math.floor(v.x)},M.exports=v}),(function(M,P,N){var v=N(5);function h(a,e){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}h.prototype.getWorldOrgX=function(){return this.lworldOrgX},h.prototype.setWorldOrgX=function(a){this.lworldOrgX=a},h.prototype.getWorldOrgY=function(){return this.lworldOrgY},h.prototype.setWorldOrgY=function(a){this.lworldOrgY=a},h.prototype.getWorldExtX=function(){return this.lworldExtX},h.prototype.setWorldExtX=function(a){this.lworldExtX=a},h.prototype.getWorldExtY=function(){return this.lworldExtY},h.prototype.setWorldExtY=function(a){this.lworldExtY=a},h.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},h.prototype.setDeviceOrgX=function(a){this.ldeviceOrgX=a},h.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},h.prototype.setDeviceOrgY=function(a){this.ldeviceOrgY=a},h.prototype.getDeviceExtX=function(){return this.ldeviceExtX},h.prototype.setDeviceExtX=function(a){this.ldeviceExtX=a},h.prototype.getDeviceExtY=function(){return this.ldeviceExtY},h.prototype.setDeviceExtY=function(a){this.ldeviceExtY=a},h.prototype.transformX=function(a){var e=0,i=this.lworldExtX;return i!=0&&(e=this.ldeviceOrgX+(a-this.lworldOrgX)*this.ldeviceExtX/i),e},h.prototype.transformY=function(a){var e=0,i=this.lworldExtY;return i!=0&&(e=this.ldeviceOrgY+(a-this.lworldOrgY)*this.ldeviceExtY/i),e},h.prototype.inverseTransformX=function(a){var e=0,i=this.ldeviceExtX;return i!=0&&(e=this.lworldOrgX+(a-this.ldeviceOrgX)*this.lworldExtX/i),e},h.prototype.inverseTransformY=function(a){var e=0,i=this.ldeviceExtY;return i!=0&&(e=this.lworldOrgY+(a-this.ldeviceOrgY)*this.lworldExtY/i),e},h.prototype.inverseTransformPoint=function(a){var e=new v(this.inverseTransformX(a.x),this.inverseTransformY(a.y));return e},M.exports=h}),(function(M,P,N){function v(t){if(Array.isArray(t)){for(var s=0,o=Array(t.length);sa.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*a.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-a.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>a.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(a.COOLING_ADAPTATION_FACTOR,1-(t-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*(1-a.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*a.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},r.prototype.calcSpringForces=function(){for(var t=this.getAllEdges(),s,o=0;o0&&arguments[0]!==void 0?arguments[0]:!0,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,o,c,l,T,g=this.getAllNodes(),d;if(this.useFRGridVariant)for(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&t&&this.updateGrid(),d=new Set,o=0;oL||d>L)&&(t.gravitationForceX=-this.gravityConstant*l,t.gravitationForceY=-this.gravityConstant*T)):(L=s.getEstimatedSize()*this.compoundGravityRangeFactor,(g>L||d>L)&&(t.gravitationForceX=-this.gravityConstant*l*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*T*this.compoundGravityConstant))},r.prototype.isConverged=function(){var t,s=!1;return this.totalIterations>this.maxIterations/3&&(s=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement=g.length||L>=g[0].length)){for(var R=0;Rr}}]),i})();M.exports=e}),(function(M,P,N){function v(){}v.svd=function(h){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=h.length,this.n=h[0].length;var a=Math.min(this.m,this.n);this.s=(function(Tt){for(var wt=[];Tt-- >0;)wt.push(0);return wt})(Math.min(this.m+1,this.n)),this.U=(function(Tt){var wt=function zt(bt){if(bt.length==0)return 0;for(var $t=[],St=0;St0;)wt.push(0);return wt})(this.n),i=(function(Tt){for(var wt=[];Tt-- >0;)wt.push(0);return wt})(this.m),f=!0,r=Math.min(this.m-1,this.n),u=Math.max(0,Math.min(this.n-2,this.m)),t=0;t=0;m--)if(this.s[m]!==0){for(var y=m+1;y=0;z--){if((function(Tt,wt){return Tt&&wt})(z0;){var J=void 0,It=void 0;for(J=n-2;J>=-1&&J!==-1;J--)if(Math.abs(e[J])<=ht+tt*(Math.abs(this.s[J])+Math.abs(this.s[J+1]))){e[J]=0;break}if(J===n-2)It=4;else{var Nt=void 0;for(Nt=n-1;Nt>=J&&Nt!==J;Nt--){var vt=(Nt!==n?Math.abs(e[Nt]):0)+(Nt!==J+1?Math.abs(e[Nt-1]):0);if(Math.abs(this.s[Nt])<=ht+tt*vt){this.s[Nt]=0;break}}Nt===J?It=3:Nt===n-1?It=1:(It=2,J=Nt)}switch(J++,It){case 1:{var it=e[n-2];e[n-2]=0;for(var ut=n-2;ut>=J;ut--){var Et=v.hypot(this.s[ut],it),Ct=this.s[ut]/Et,Dt=it/Et;this.s[ut]=Et,ut!==J&&(it=-Dt*e[ut-1],e[ut-1]=Ct*e[ut-1]);for(var mt=0;mt=this.s[J+1]);){var Lt=this.s[J];if(this.s[J]=this.s[J+1],this.s[J+1]=Lt,JMath.abs(a)?(e=a/h,e=Math.abs(h)*Math.sqrt(1+e*e)):a!=0?(e=h/a,e=Math.abs(a)*Math.sqrt(1+e*e)):e=0,e},M.exports=v}),(function(M,P,N){var v=(function(){function e(i,f){for(var r=0;r2&&arguments[2]!==void 0?arguments[2]:1,u=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,t=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;h(this,e),this.sequence1=i,this.sequence2=f,this.match_score=r,this.mismatch_penalty=u,this.gap_penalty=t,this.iMax=i.length+1,this.jMax=f.length+1,this.grid=new Array(this.iMax);for(var s=0;s=0;i--){var f=this.listeners[i];f.event===a&&f.callback===e&&this.listeners.splice(i,1)}},h.emit=function(a,e){for(var i=0;i{var P={45:((a,e,i)=>{var f={};f.layoutBase=i(551),f.CoSEConstants=i(806),f.CoSEEdge=i(767),f.CoSEGraph=i(880),f.CoSEGraphManager=i(578),f.CoSELayout=i(765),f.CoSENode=i(991),f.ConstraintHandler=i(902),a.exports=f}),806:((a,e,i)=>{var f=i(551).FDLayoutConstants;function r(){}for(var u in f)r[u]=f[u];r.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,r.DEFAULT_RADIAL_SEPARATION=f.DEFAULT_EDGE_LENGTH,r.DEFAULT_COMPONENT_SEPERATION=60,r.TILE=!0,r.TILING_PADDING_VERTICAL=10,r.TILING_PADDING_HORIZONTAL=10,r.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,r.ENFORCE_CONSTRAINTS=!0,r.APPLY_LAYOUT=!0,r.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,r.TREE_REDUCTION_ON_INCREMENTAL=!0,r.PURE_INCREMENTAL=r.DEFAULT_INCREMENTAL,a.exports=r}),767:((a,e,i)=>{var f=i(551).FDLayoutEdge;function r(t,s,o){f.call(this,t,s,o)}r.prototype=Object.create(f.prototype);for(var u in f)r[u]=f[u];a.exports=r}),880:((a,e,i)=>{var f=i(551).LGraph;function r(t,s,o){f.call(this,t,s,o)}r.prototype=Object.create(f.prototype);for(var u in f)r[u]=f[u];a.exports=r}),578:((a,e,i)=>{var f=i(551).LGraphManager;function r(t){f.call(this,t)}r.prototype=Object.create(f.prototype);for(var u in f)r[u]=f[u];a.exports=r}),765:((a,e,i)=>{var f=i(551).FDLayout,r=i(578),u=i(880),t=i(991),s=i(767),o=i(806),c=i(902),l=i(551).FDLayoutConstants,T=i(551).LayoutConstants,g=i(551).Point,d=i(551).PointD,L=i(551).DimensionD,R=i(551).Layout,C=i(551).Integer,G=i(551).IGeometry,V=i(551).LGraph,Y=i(551).Transform,$=i(551).LinkedList;function A(){f.call(this),this.toBeTiled={},this.constraints={}}A.prototype=Object.create(f.prototype);for(var _ in f)A[_]=f[_];A.prototype.newGraphManager=function(){var n=new r(this);return this.graphManager=n,n},A.prototype.newGraph=function(n){return new u(null,this.graphManager,n)},A.prototype.newNode=function(n){return new t(this.graphManager,n)},A.prototype.newEdge=function(n){return new s(null,null,n)},A.prototype.initParameters=function(){f.prototype.initParameters.call(this,arguments),this.isSubLayout||(o.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=o.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=o.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=l.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=l.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=l.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},A.prototype.initSpringEmbedder=function(){f.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/l.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},A.prototype.layout=function(){var n=T.DEFAULT_CREATE_BENDS_AS_NEEDED;return n&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},A.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental){if(o.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var E=new Set(this.getAllNodes()),p=this.nodesWithGravity.filter(function(I){return E.has(I)});this.graphManager.setAllNodesToApplyGravitation(p)}}else{var n=this.getFlatForest();if(n.length>0)this.positionNodesRadially(n);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var E=new Set(this.getAllNodes()),p=this.nodesWithGravity.filter(function(m){return E.has(m)});this.graphManager.setAllNodesToApplyGravitation(p),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(c.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),o.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},A.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%l.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var n=new Set(this.getAllNodes()),E=this.nodesWithGravity.filter(function(y){return n.has(y)});this.graphManager.setAllNodesToApplyGravitation(E),this.graphManager.updateBounds(),this.updateGrid(),o.PURE_INCREMENTAL?this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),o.PURE_INCREMENTAL?this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var p=!this.isTreeGrowing&&!this.isGrowthFinished,m=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(p,m),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},A.prototype.getPositionsData=function(){for(var n=this.graphManager.getAllNodes(),E={},p=0;p0&&this.updateDisplacements();for(var p=0;p0&&(m.fixedNodeWeight=I)}}if(this.constraints.relativePlacementConstraint){var D=new Map,S=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(O){n.fixedNodesOnHorizontal.add(O),n.fixedNodesOnVertical.add(O)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var W=this.constraints.alignmentConstraint.vertical,p=0;p=2*O.length/3;tt--)H=Math.floor(Math.random()*(tt+1)),k=O[tt],O[tt]=O[H],O[H]=k;return O},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach(function(O){if(O.left){var H=D.has(O.left)?D.get(O.left):O.left,k=D.has(O.right)?D.get(O.right):O.right;n.nodesInRelativeHorizontal.includes(H)||(n.nodesInRelativeHorizontal.push(H),n.nodeToRelativeConstraintMapHorizontal.set(H,[]),n.dummyToNodeForVerticalAlignment.has(H)?n.nodeToTempPositionMapHorizontal.set(H,n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get(H)[0]).getCenterX()):n.nodeToTempPositionMapHorizontal.set(H,n.idToNodeMap.get(H).getCenterX())),n.nodesInRelativeHorizontal.includes(k)||(n.nodesInRelativeHorizontal.push(k),n.nodeToRelativeConstraintMapHorizontal.set(k,[]),n.dummyToNodeForVerticalAlignment.has(k)?n.nodeToTempPositionMapHorizontal.set(k,n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get(k)[0]).getCenterX()):n.nodeToTempPositionMapHorizontal.set(k,n.idToNodeMap.get(k).getCenterX())),n.nodeToRelativeConstraintMapHorizontal.get(H).push({right:k,gap:O.gap}),n.nodeToRelativeConstraintMapHorizontal.get(k).push({left:H,gap:O.gap})}else{var tt=S.has(O.top)?S.get(O.top):O.top,ht=S.has(O.bottom)?S.get(O.bottom):O.bottom;n.nodesInRelativeVertical.includes(tt)||(n.nodesInRelativeVertical.push(tt),n.nodeToRelativeConstraintMapVertical.set(tt,[]),n.dummyToNodeForHorizontalAlignment.has(tt)?n.nodeToTempPositionMapVertical.set(tt,n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(tt)[0]).getCenterY()):n.nodeToTempPositionMapVertical.set(tt,n.idToNodeMap.get(tt).getCenterY())),n.nodesInRelativeVertical.includes(ht)||(n.nodesInRelativeVertical.push(ht),n.nodeToRelativeConstraintMapVertical.set(ht,[]),n.dummyToNodeForHorizontalAlignment.has(ht)?n.nodeToTempPositionMapVertical.set(ht,n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(ht)[0]).getCenterY()):n.nodeToTempPositionMapVertical.set(ht,n.idToNodeMap.get(ht).getCenterY())),n.nodeToRelativeConstraintMapVertical.get(tt).push({bottom:ht,gap:O.gap}),n.nodeToRelativeConstraintMapVertical.get(ht).push({top:tt,gap:O.gap})}});else{var Q=new Map,z=new Map;this.constraints.relativePlacementConstraint.forEach(function(O){if(O.left){var H=D.has(O.left)?D.get(O.left):O.left,k=D.has(O.right)?D.get(O.right):O.right;Q.has(H)?Q.get(H).push(k):Q.set(H,[k]),Q.has(k)?Q.get(k).push(H):Q.set(k,[H])}else{var tt=S.has(O.top)?S.get(O.top):O.top,ht=S.has(O.bottom)?S.get(O.bottom):O.bottom;z.has(tt)?z.get(tt).push(ht):z.set(tt,[ht]),z.has(ht)?z.get(ht).push(tt):z.set(ht,[tt])}});var X=function(H,k){var tt=[],ht=[],J=new $,It=new Set,Nt=0;return H.forEach(function(vt,it){if(!It.has(it)){tt[Nt]=[],ht[Nt]=!1;var ut=it;for(J.push(ut),It.add(ut),tt[Nt].push(ut);J.length!=0;){ut=J.shift(),k.has(ut)&&(ht[Nt]=!0);var Et=H.get(ut);Et.forEach(function(Ct){It.has(Ct)||(J.push(Ct),It.add(Ct),tt[Nt].push(Ct))})}Nt++}}),{components:tt,isFixed:ht}},rt=X(Q,n.fixedNodesOnHorizontal);this.componentsOnHorizontal=rt.components,this.fixedComponentsOnHorizontal=rt.isFixed;var B=X(z,n.fixedNodesOnVertical);this.componentsOnVertical=B.components,this.fixedComponentsOnVertical=B.isFixed}}},A.prototype.updateDisplacements=function(){var n=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(B){var O=n.idToNodeMap.get(B.nodeId);O.displacementX=0,O.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var E=this.constraints.alignmentConstraint.vertical,p=0;p1){var S;for(S=0;Sm&&(m=Math.floor(D.y)),I=Math.floor(D.x+o.DEFAULT_COMPONENT_SEPERATION)}this.transform(new d(T.WORLD_CENTER_X-D.x/2,T.WORLD_CENTER_Y-D.y/2))},A.radialLayout=function(n,E,p){var m=Math.max(this.maxDiagonalInTree(n),o.DEFAULT_RADIAL_SEPARATION);A.branchRadialLayout(E,null,0,359,0,m);var y=V.calculateBounds(n),I=new Y;I.setDeviceOrgX(y.getMinX()),I.setDeviceOrgY(y.getMinY()),I.setWorldOrgX(p.x),I.setWorldOrgY(p.y);for(var D=0;D1;){var k=H[0];H.splice(0,1);var tt=z.indexOf(k);tt>=0&&z.splice(tt,1),B--,X--}E!=null?O=(z.indexOf(H[0])+1)%B:O=0;for(var ht=Math.abs(m-p)/X,J=O;rt!=X;J=++J%B){var It=z[J].getOtherEnd(n);if(It!=E){var Nt=(p+rt*ht)%360,vt=(Nt+ht)%360;A.branchRadialLayout(It,n,Nt,vt,y+I,I),rt++}}},A.maxDiagonalInTree=function(n){for(var E=C.MIN_VALUE,p=0;pE&&(E=y)}return E},A.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},A.prototype.groupZeroDegreeMembers=function(){var n=this,E={};this.memberGroups={},this.idToDummyNode={};for(var p=[],m=this.graphManager.getAllNodes(),y=0;y"u"&&(E[S]=[]),E[S]=E[S].concat(I)}Object.keys(E).forEach(function(W){if(E[W].length>1){var x="DummyCompound_"+W;n.memberGroups[x]=E[W];var Q=E[W][0].getParent(),z=new t(n.graphManager);z.id=x,z.paddingLeft=Q.paddingLeft||0,z.paddingRight=Q.paddingRight||0,z.paddingBottom=Q.paddingBottom||0,z.paddingTop=Q.paddingTop||0,n.idToDummyNode[x]=z;var X=n.getGraphManager().add(n.newGraph(),z),rt=Q.getChild();rt.add(z);for(var B=0;By?(m.rect.x-=(m.labelWidth-y)/2,m.setWidth(m.labelWidth),m.labelMarginLeft=(m.labelWidth-y)/2):m.labelPosHorizontal=="right"&&m.setWidth(y+m.labelWidth)),m.labelHeight&&(m.labelPosVertical=="top"?(m.rect.y-=m.labelHeight,m.setHeight(I+m.labelHeight),m.labelMarginTop=m.labelHeight):m.labelPosVertical=="center"&&m.labelHeight>I?(m.rect.y-=(m.labelHeight-I)/2,m.setHeight(m.labelHeight),m.labelMarginTop=(m.labelHeight-I)/2):m.labelPosVertical=="bottom"&&m.setHeight(I+m.labelHeight))}})},A.prototype.repopulateCompounds=function(){for(var n=this.compoundOrder.length-1;n>=0;n--){var E=this.compoundOrder[n],p=E.id,m=E.paddingLeft,y=E.paddingTop,I=E.labelMarginLeft,D=E.labelMarginTop;this.adjustLocations(this.tiledMemberPack[p],E.rect.x,E.rect.y,m,y,I,D)}},A.prototype.repopulateZeroDegreeMembers=function(){var n=this,E=this.tiledZeroDegreePack;Object.keys(E).forEach(function(p){var m=n.idToDummyNode[p],y=m.paddingLeft,I=m.paddingTop,D=m.labelMarginLeft,S=m.labelMarginTop;n.adjustLocations(E[p],m.rect.x,m.rect.y,y,I,D,S)})},A.prototype.getToBeTiled=function(n){var E=n.id;if(this.toBeTiled[E]!=null)return this.toBeTiled[E];var p=n.getChild();if(p==null)return this.toBeTiled[E]=!1,!1;for(var m=p.getNodes(),y=0;y0)return this.toBeTiled[E]=!1,!1;if(I.getChild()==null){this.toBeTiled[I.id]=!1;continue}if(!this.getToBeTiled(I))return this.toBeTiled[E]=!1,!1}return this.toBeTiled[E]=!0,!0},A.prototype.getNodeDegree=function(n){n.id;for(var E=n.getEdges(),p=0,m=0;mQ&&(Q=X.rect.height)}p+=Q+n.verticalPadding}},A.prototype.tileCompoundMembers=function(n,E){var p=this;this.tiledMemberPack=[],Object.keys(n).forEach(function(m){var y=E[m];if(p.tiledMemberPack[m]=p.tileNodes(n[m],y.paddingLeft+y.paddingRight),y.rect.width=p.tiledMemberPack[m].width,y.rect.height=p.tiledMemberPack[m].height,y.setCenter(p.tiledMemberPack[m].centerX,p.tiledMemberPack[m].centerY),y.labelMarginLeft=0,y.labelMarginTop=0,o.NODE_DIMENSIONS_INCLUDE_LABELS){var I=y.rect.width,D=y.rect.height;y.labelWidth&&(y.labelPosHorizontal=="left"?(y.rect.x-=y.labelWidth,y.setWidth(I+y.labelWidth),y.labelMarginLeft=y.labelWidth):y.labelPosHorizontal=="center"&&y.labelWidth>I?(y.rect.x-=(y.labelWidth-I)/2,y.setWidth(y.labelWidth),y.labelMarginLeft=(y.labelWidth-I)/2):y.labelPosHorizontal=="right"&&y.setWidth(I+y.labelWidth)),y.labelHeight&&(y.labelPosVertical=="top"?(y.rect.y-=y.labelHeight,y.setHeight(D+y.labelHeight),y.labelMarginTop=y.labelHeight):y.labelPosVertical=="center"&&y.labelHeight>D?(y.rect.y-=(y.labelHeight-D)/2,y.setHeight(y.labelHeight),y.labelMarginTop=(y.labelHeight-D)/2):y.labelPosVertical=="bottom"&&y.setHeight(D+y.labelHeight))}})},A.prototype.tileNodes=function(n,E){var p=this.tileNodesByFavoringDim(n,E,!0),m=this.tileNodesByFavoringDim(n,E,!1),y=this.getOrgRatio(p),I=this.getOrgRatio(m),D;return IS&&(S=B.getWidth())});var W=I/y,x=D/y,Q=Math.pow(p-m,2)+4*(W+m)*(x+p)*y,z=(m-p+Math.sqrt(Q))/(2*(W+m)),X;E?(X=Math.ceil(z),X==z&&X++):X=Math.floor(z);var rt=X*(W+m)-m;return S>rt&&(rt=S),rt+=m*2,rt},A.prototype.tileNodesByFavoringDim=function(n,E,p){var m=o.TILING_PADDING_VERTICAL,y=o.TILING_PADDING_HORIZONTAL,I=o.TILING_COMPARE_BY,D={rows:[],rowWidth:[],rowHeight:[],width:0,height:E,verticalPadding:m,horizontalPadding:y,centerX:0,centerY:0};I&&(D.idealRowWidth=this.calcIdealRowWidth(n,p));var S=function(O){return O.rect.width*O.rect.height},W=function(O,H){return S(H)-S(O)};n.sort(function(B,O){var H=W;return D.idealRowWidth?(H=I,H(B.id,O.id)):H(B,O)});for(var x=0,Q=0,z=0;z0&&(D+=n.horizontalPadding),n.rowWidth[p]=D,n.width0&&(S+=n.verticalPadding);var W=0;S>n.rowHeight[p]&&(W=n.rowHeight[p],n.rowHeight[p]=S,W=n.rowHeight[p]-W),n.height+=W,n.rows[p].push(E)},A.prototype.getShortestRowIndex=function(n){for(var E=-1,p=Number.MAX_VALUE,m=0;mp&&(E=m,p=n.rowWidth[m]);return E},A.prototype.canAddHorizontal=function(n,E,p){if(n.idealRowWidth){var m=n.rows.length-1,y=n.rowWidth[m];return y+E+n.horizontalPadding<=n.idealRowWidth}var I=this.getShortestRowIndex(n);if(I<0)return!0;var D=n.rowWidth[I];if(D+n.horizontalPadding+E<=n.width)return!0;var S=0;n.rowHeight[I]0&&(S=p+n.verticalPadding-n.rowHeight[I]);var W;n.width-D>=E+n.horizontalPadding?W=(n.height+S)/(D+E+n.horizontalPadding):W=(n.height+S)/n.width,S=p+n.verticalPadding;var x;return n.widthI&&E!=p){m.splice(-1,1),n.rows[p].push(y),n.rowWidth[E]=n.rowWidth[E]-I,n.rowWidth[p]=n.rowWidth[p]+I,n.width=n.rowWidth[instance.getLongestRowIndex(n)];for(var D=Number.MIN_VALUE,S=0;SD&&(D=m[S].height);E>0&&(D+=n.verticalPadding);var W=n.rowHeight[E]+n.rowHeight[p];n.rowHeight[E]=D,n.rowHeight[p]0)for(var rt=y;rt<=I;rt++)X[0]+=this.grid[rt][D-1].length+this.grid[rt][D].length-1;if(I0)for(var rt=D;rt<=S;rt++)X[3]+=this.grid[y-1][rt].length+this.grid[y][rt].length-1;for(var B=C.MAX_VALUE,O,H,k=0;k{var f=i(551).FDLayoutNode,r=i(551).IMath;function u(s,o,c,l){f.call(this,s,o,c,l)}u.prototype=Object.create(f.prototype);for(var t in f)u[t]=f[t];u.prototype.calculateDisplacement=function(){var s=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=s.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=s.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=s.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=s.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>s.coolingFactor*s.maxNodeDisplacement&&(this.displacementX=s.coolingFactor*s.maxNodeDisplacement*r.sign(this.displacementX)),Math.abs(this.displacementY)>s.coolingFactor*s.maxNodeDisplacement&&(this.displacementY=s.coolingFactor*s.maxNodeDisplacement*r.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},u.prototype.propogateDisplacementToChildren=function(s,o){for(var c=this.getChild().getNodes(),l,T=0;T{function f(c){if(Array.isArray(c)){for(var l=0,T=Array(c.length);l0){var Lt=0;ot.forEach(function(st){Z=="horizontal"?(et.set(st,g.has(st)?d[g.get(st)]:q.get(st)),Lt+=et.get(st)):(et.set(st,g.has(st)?L[g.get(st)]:q.get(st)),Lt+=et.get(st))}),Lt=Lt/ot.length,lt.forEach(function(st){K.has(st)||et.set(st,Lt)})}else{var ft=0;lt.forEach(function(st){Z=="horizontal"?ft+=g.has(st)?d[g.get(st)]:q.get(st):ft+=g.has(st)?L[g.get(st)]:q.get(st)}),ft=ft/lt.length,lt.forEach(function(st){et.set(st,ft)})}});for(var Mt=function(){var ot=dt.shift(),Lt=U.get(ot);Lt.forEach(function(ft){if(et.get(ft.id)st&&(st=kt),KtXt&&(Xt=Kt)}}catch(ee){wt=!0,zt=ee}finally{try{!Tt&&bt.return&&bt.return()}finally{if(wt)throw zt}}var fe=(Lt+st)/2-(ft+Xt)/2,Qt=!0,jt=!1,_t=void 0;try{for(var Jt=lt[Symbol.iterator](),ne;!(Qt=(ne=Jt.next()).done);Qt=!0){var te=ne.value;et.set(te,et.get(te)+fe)}}catch(ee){jt=!0,_t=ee}finally{try{!Qt&&Jt.return&&Jt.return()}finally{if(jt)throw _t}}})}return et},_=function(U){var Z=0,K=0,q=0,at=0;if(U.forEach(function(j){j.left?d[g.get(j.left)]-d[g.get(j.right)]>=0?Z++:K++:L[g.get(j.top)]-L[g.get(j.bottom)]>=0?q++:at++}),Z>K&&q>at)for(var gt=0;gtK)for(var nt=0;ntat)for(var et=0;et1)l.fixedNodeConstraint.forEach(function(b,U){m[U]=[b.position.x,b.position.y],y[U]=[d[g.get(b.nodeId)],L[g.get(b.nodeId)]]}),I=!0;else if(l.alignmentConstraint)(function(){var b=0;if(l.alignmentConstraint.vertical){for(var U=l.alignmentConstraint.vertical,Z=function(et){var j=new Set;U[et].forEach(function(pt){j.add(pt)});var dt=new Set([].concat(f(j)).filter(function(pt){return S.has(pt)})),Mt=void 0;dt.size>0?Mt=d[g.get(dt.values().next().value)]:Mt=$(j).x,U[et].forEach(function(pt){m[b]=[Mt,L[g.get(pt)]],y[b]=[d[g.get(pt)],L[g.get(pt)]],b++})},K=0;K0?Mt=d[g.get(dt.values().next().value)]:Mt=$(j).y,q[et].forEach(function(pt){m[b]=[d[g.get(pt)],Mt],y[b]=[d[g.get(pt)],L[g.get(pt)]],b++})},gt=0;gtz&&(z=Q[rt].length,X=rt);if(z0){var mt={x:0,y:0};l.fixedNodeConstraint.forEach(function(b,U){var Z={x:d[g.get(b.nodeId)],y:L[g.get(b.nodeId)]},K=b.position,q=Y(K,Z);mt.x+=q.x,mt.y+=q.y}),mt.x/=l.fixedNodeConstraint.length,mt.y/=l.fixedNodeConstraint.length,d.forEach(function(b,U){d[U]+=mt.x}),L.forEach(function(b,U){L[U]+=mt.y}),l.fixedNodeConstraint.forEach(function(b){d[g.get(b.nodeId)]=b.position.x,L[g.get(b.nodeId)]=b.position.y})}if(l.alignmentConstraint){if(l.alignmentConstraint.vertical)for(var Ot=l.alignmentConstraint.vertical,Rt=function(U){var Z=new Set;Ot[U].forEach(function(at){Z.add(at)});var K=new Set([].concat(f(Z)).filter(function(at){return S.has(at)})),q=void 0;K.size>0?q=d[g.get(K.values().next().value)]:q=$(Z).x,Z.forEach(function(at){S.has(at)||(d[g.get(at)]=q)})},Ht=0;Ht0?q=L[g.get(K.values().next().value)]:q=$(Z).y,Z.forEach(function(at){S.has(at)||(L[g.get(at)]=q)})},Ft=0;Ft{a.exports=M})},N={};function v(a){var e=N[a];if(e!==void 0)return e.exports;var i=N[a]={exports:{}};return P[a](i,i.exports,v),i.exports}var h=v(45);return h})()})})(he)),he.exports}var yr=se.exports,Oe;function mr(){return Oe||(Oe=1,(function(w,F){(function(P,N){w.exports=N(pr())})(yr,function(M){return(()=>{var P={658:(a=>{a.exports=Object.assign!=null?Object.assign.bind(Object):function(e){for(var i=arguments.length,f=Array(i>1?i-1:0),r=1;r{var f=(function(){function t(s,o){var c=[],l=!0,T=!1,g=void 0;try{for(var d=s[Symbol.iterator](),L;!(l=(L=d.next()).done)&&(c.push(L.value),!(o&&c.length===o));l=!0);}catch(R){T=!0,g=R}finally{try{!l&&d.return&&d.return()}finally{if(T)throw g}}return c}return function(s,o){if(Array.isArray(s))return s;if(Symbol.iterator in Object(s))return t(s,o);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),r=i(140).layoutBase.LinkedList,u={};u.getTopMostNodes=function(t){for(var s={},o=0;o0&&I.merge(x)});for(var D=0;D1){L=g[0],R=L.connectedEdges().length,g.forEach(function(y){y.connectedEdges().length0&&c.set("dummy"+(c.size+1),V),Y},u.relocateComponent=function(t,s,o){if(!o.fixedNodeConstraint){var c=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY,T=Number.POSITIVE_INFINITY,g=Number.NEGATIVE_INFINITY;if(o.quality=="draft"){var d=!0,L=!1,R=void 0;try{for(var C=s.nodeIndexes[Symbol.iterator](),G;!(d=(G=C.next()).done);d=!0){var V=G.value,Y=f(V,2),$=Y[0],A=Y[1],_=o.cy.getElementById($);if(_){var n=_.boundingBox(),E=s.xCoords[A]-n.w/2,p=s.xCoords[A]+n.w/2,m=s.yCoords[A]-n.h/2,y=s.yCoords[A]+n.h/2;El&&(l=p),mg&&(g=y)}}}catch(x){L=!0,R=x}finally{try{!d&&C.return&&C.return()}finally{if(L)throw R}}var I=t.x-(l+c)/2,D=t.y-(g+T)/2;s.xCoords=s.xCoords.map(function(x){return x+I}),s.yCoords=s.yCoords.map(function(x){return x+D})}else{Object.keys(s).forEach(function(x){var Q=s[x],z=Q.getRect().x,X=Q.getRect().x+Q.getRect().width,rt=Q.getRect().y,B=Q.getRect().y+Q.getRect().height;zl&&(l=X),rtg&&(g=B)});var S=t.x-(l+c)/2,W=t.y-(g+T)/2;Object.keys(s).forEach(function(x){var Q=s[x];Q.setCenter(Q.getCenterX()+S,Q.getCenterY()+W)})}}},u.calcBoundingBox=function(t,s,o,c){for(var l=Number.MAX_SAFE_INTEGER,T=Number.MIN_SAFE_INTEGER,g=Number.MAX_SAFE_INTEGER,d=Number.MIN_SAFE_INTEGER,L=void 0,R=void 0,C=void 0,G=void 0,V=t.descendants().not(":parent"),Y=V.length,$=0;$L&&(l=L),TC&&(g=C),d{var f=i(548),r=i(140).CoSELayout,u=i(140).CoSENode,t=i(140).layoutBase.PointD,s=i(140).layoutBase.DimensionD,o=i(140).layoutBase.LayoutConstants,c=i(140).layoutBase.FDLayoutConstants,l=i(140).CoSEConstants,T=function(d,L){var R=d.cy,C=d.eles,G=C.nodes(),V=C.edges(),Y=void 0,$=void 0,A=void 0,_={};d.randomize&&(Y=L.nodeIndexes,$=L.xCoords,A=L.yCoords);var n=function(x){return typeof x=="function"},E=function(x,Q){return n(x)?x(Q):x},p=f.calcParentsWithoutChildren(R,C),m=function W(x,Q,z,X){for(var rt=Q.length,B=0;B0){var J=void 0;J=z.getGraphManager().add(z.newGraph(),k),W(J,H,z,X)}}},y=function(x,Q,z){for(var X=0,rt=0,B=0;B0?l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=X/rt:n(d.idealEdgeLength)?l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=50:l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=d.idealEdgeLength,l.MIN_REPULSION_DIST=c.MIN_REPULSION_DIST=c.DEFAULT_EDGE_LENGTH/10,l.DEFAULT_RADIAL_SEPARATION=c.DEFAULT_EDGE_LENGTH)},I=function(x,Q){Q.fixedNodeConstraint&&(x.constraints.fixedNodeConstraint=Q.fixedNodeConstraint),Q.alignmentConstraint&&(x.constraints.alignmentConstraint=Q.alignmentConstraint),Q.relativePlacementConstraint&&(x.constraints.relativePlacementConstraint=Q.relativePlacementConstraint)};d.nestingFactor!=null&&(l.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=c.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=d.nestingFactor),d.gravity!=null&&(l.DEFAULT_GRAVITY_STRENGTH=c.DEFAULT_GRAVITY_STRENGTH=d.gravity),d.numIter!=null&&(l.MAX_ITERATIONS=c.MAX_ITERATIONS=d.numIter),d.gravityRange!=null&&(l.DEFAULT_GRAVITY_RANGE_FACTOR=c.DEFAULT_GRAVITY_RANGE_FACTOR=d.gravityRange),d.gravityCompound!=null&&(l.DEFAULT_COMPOUND_GRAVITY_STRENGTH=c.DEFAULT_COMPOUND_GRAVITY_STRENGTH=d.gravityCompound),d.gravityRangeCompound!=null&&(l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=c.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=d.gravityRangeCompound),d.initialEnergyOnIncremental!=null&&(l.DEFAULT_COOLING_FACTOR_INCREMENTAL=c.DEFAULT_COOLING_FACTOR_INCREMENTAL=d.initialEnergyOnIncremental),d.tilingCompareBy!=null&&(l.TILING_COMPARE_BY=d.tilingCompareBy),d.quality=="proof"?o.QUALITY=2:o.QUALITY=0,l.NODE_DIMENSIONS_INCLUDE_LABELS=c.NODE_DIMENSIONS_INCLUDE_LABELS=o.NODE_DIMENSIONS_INCLUDE_LABELS=d.nodeDimensionsIncludeLabels,l.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!d.randomize,l.ANIMATE=c.ANIMATE=o.ANIMATE=d.animate,l.TILE=d.tile,l.TILING_PADDING_VERTICAL=typeof d.tilingPaddingVertical=="function"?d.tilingPaddingVertical.call():d.tilingPaddingVertical,l.TILING_PADDING_HORIZONTAL=typeof d.tilingPaddingHorizontal=="function"?d.tilingPaddingHorizontal.call():d.tilingPaddingHorizontal,l.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!0,l.PURE_INCREMENTAL=!d.randomize,o.DEFAULT_UNIFORM_LEAF_NODE_SIZES=d.uniformNodeDimensions,d.step=="transformed"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,l.ENFORCE_CONSTRAINTS=!1,l.APPLY_LAYOUT=!1),d.step=="enforced"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!0,l.APPLY_LAYOUT=!1),d.step=="cose"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!1,l.APPLY_LAYOUT=!0),d.step=="all"&&(d.randomize?l.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!0,l.APPLY_LAYOUT=!0),d.fixedNodeConstraint||d.alignmentConstraint||d.relativePlacementConstraint?l.TREE_REDUCTION_ON_INCREMENTAL=!1:l.TREE_REDUCTION_ON_INCREMENTAL=!0;var D=new r,S=D.newGraphManager();return m(S.addRoot(),f.getTopMostNodes(G),D,d),y(D,S,V),I(D,d),D.runLayout(),_};a.exports={coseLayout:T}}),212:((a,e,i)=>{var f=(function(){function d(L,R){for(var C=0;C0)if(p){var I=t.getTopMostNodes(C.eles.nodes());if(A=t.connectComponents(G,C.eles,I),A.forEach(function(vt){var it=vt.boundingBox();_.push({x:it.x1+it.w/2,y:it.y1+it.h/2})}),C.randomize&&A.forEach(function(vt){C.eles=vt,Y.push(o(C))}),C.quality=="default"||C.quality=="proof"){var D=G.collection();if(C.tile){var S=new Map,W=[],x=[],Q=0,z={nodeIndexes:S,xCoords:W,yCoords:x},X=[];if(A.forEach(function(vt,it){vt.edges().length==0&&(vt.nodes().forEach(function(ut,Et){D.merge(vt.nodes()[Et]),ut.isParent()||(z.nodeIndexes.set(vt.nodes()[Et].id(),Q++),z.xCoords.push(vt.nodes()[0].position().x),z.yCoords.push(vt.nodes()[0].position().y))}),X.push(it))}),D.length>1){var rt=D.boundingBox();_.push({x:rt.x1+rt.w/2,y:rt.y1+rt.h/2}),A.push(D),Y.push(z);for(var B=X.length-1;B>=0;B--)A.splice(X[B],1),Y.splice(X[B],1),_.splice(X[B],1)}}A.forEach(function(vt,it){C.eles=vt,$.push(l(C,Y[it])),t.relocateComponent(_[it],$[it],C)})}else A.forEach(function(vt,it){t.relocateComponent(_[it],Y[it],C)});var O=new Set;if(A.length>1){var H=[],k=V.filter(function(vt){return vt.css("display")=="none"});A.forEach(function(vt,it){var ut=void 0;if(C.quality=="draft"&&(ut=Y[it].nodeIndexes),vt.nodes().not(k).length>0){var Et={};Et.edges=[],Et.nodes=[];var Ct=void 0;vt.nodes().not(k).forEach(function(Dt){if(C.quality=="draft")if(!Dt.isParent())Ct=ut.get(Dt.id()),Et.nodes.push({x:Y[it].xCoords[Ct]-Dt.boundingbox().w/2,y:Y[it].yCoords[Ct]-Dt.boundingbox().h/2,width:Dt.boundingbox().w,height:Dt.boundingbox().h});else{var mt=t.calcBoundingBox(Dt,Y[it].xCoords,Y[it].yCoords,ut);Et.nodes.push({x:mt.topLeftX,y:mt.topLeftY,width:mt.width,height:mt.height})}else $[it][Dt.id()]&&Et.nodes.push({x:$[it][Dt.id()].getLeft(),y:$[it][Dt.id()].getTop(),width:$[it][Dt.id()].getWidth(),height:$[it][Dt.id()].getHeight()})}),vt.edges().forEach(function(Dt){var mt=Dt.source(),Ot=Dt.target();if(mt.css("display")!="none"&&Ot.css("display")!="none")if(C.quality=="draft"){var Rt=ut.get(mt.id()),Ht=ut.get(Ot.id()),Ut=[],Gt=[];if(mt.isParent()){var Ft=t.calcBoundingBox(mt,Y[it].xCoords,Y[it].yCoords,ut);Ut.push(Ft.topLeftX+Ft.width/2),Ut.push(Ft.topLeftY+Ft.height/2)}else Ut.push(Y[it].xCoords[Rt]),Ut.push(Y[it].yCoords[Rt]);if(Ot.isParent()){var Yt=t.calcBoundingBox(Ot,Y[it].xCoords,Y[it].yCoords,ut);Gt.push(Yt.topLeftX+Yt.width/2),Gt.push(Yt.topLeftY+Yt.height/2)}else Gt.push(Y[it].xCoords[Ht]),Gt.push(Y[it].yCoords[Ht]);Et.edges.push({startX:Ut[0],startY:Ut[1],endX:Gt[0],endY:Gt[1]})}else $[it][mt.id()]&&$[it][Ot.id()]&&Et.edges.push({startX:$[it][mt.id()].getCenterX(),startY:$[it][mt.id()].getCenterY(),endX:$[it][Ot.id()].getCenterX(),endY:$[it][Ot.id()].getCenterY()})}),Et.nodes.length>0&&(H.push(Et),O.add(it))}});var tt=E.packComponents(H,C.randomize).shifts;if(C.quality=="draft")Y.forEach(function(vt,it){var ut=vt.xCoords.map(function(Ct){return Ct+tt[it].dx}),Et=vt.yCoords.map(function(Ct){return Ct+tt[it].dy});vt.xCoords=ut,vt.yCoords=Et});else{var ht=0;O.forEach(function(vt){Object.keys($[vt]).forEach(function(it){var ut=$[vt][it];ut.setCenter(ut.getCenterX()+tt[ht].dx,ut.getCenterY()+tt[ht].dy)}),ht++})}}}else{var m=C.eles.boundingBox();if(_.push({x:m.x1+m.w/2,y:m.y1+m.h/2}),C.randomize){var y=o(C);Y.push(y)}C.quality=="default"||C.quality=="proof"?($.push(l(C,Y[0])),t.relocateComponent(_[0],$[0],C)):t.relocateComponent(_[0],Y[0],C)}var J=function(it,ut){if(C.quality=="default"||C.quality=="proof"){typeof it=="number"&&(it=ut);var Et=void 0,Ct=void 0,Dt=it.data("id");return $.forEach(function(Ot){Dt in Ot&&(Et={x:Ot[Dt].getRect().getCenterX(),y:Ot[Dt].getRect().getCenterY()},Ct=Ot[Dt])}),C.nodeDimensionsIncludeLabels&&(Ct.labelWidth&&(Ct.labelPosHorizontal=="left"?Et.x+=Ct.labelWidth/2:Ct.labelPosHorizontal=="right"&&(Et.x-=Ct.labelWidth/2)),Ct.labelHeight&&(Ct.labelPosVertical=="top"?Et.y+=Ct.labelHeight/2:Ct.labelPosVertical=="bottom"&&(Et.y-=Ct.labelHeight/2))),Et==null&&(Et={x:it.position("x"),y:it.position("y")}),{x:Et.x,y:Et.y}}else{var mt=void 0;return Y.forEach(function(Ot){var Rt=Ot.nodeIndexes.get(it.id());Rt!=null&&(mt={x:Ot.xCoords[Rt],y:Ot.yCoords[Rt]})}),mt==null&&(mt={x:it.position("x"),y:it.position("y")}),{x:mt.x,y:mt.y}}};if(C.quality=="default"||C.quality=="proof"||C.randomize){var It=t.calcParentsWithoutChildren(G,V),Nt=V.filter(function(vt){return vt.css("display")=="none"});C.eles=V.not(Nt),V.nodes().not(":parent").not(Nt).layoutPositions(R,C,J),It.length>0&&It.forEach(function(vt){vt.position(J(vt))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),d})();a.exports=g}),657:((a,e,i)=>{var f=i(548),r=i(140).layoutBase.Matrix,u=i(140).layoutBase.SVD,t=function(o){var c=o.cy,l=o.eles,T=l.nodes(),g=l.nodes(":parent"),d=new Map,L=new Map,R=new Map,C=[],G=[],V=[],Y=[],$=[],A=[],_=[],n=[],E=void 0,p=1e8,m=1e-9,y=o.piTol,I=o.samplingType,D=o.nodeSeparation,S=void 0,W=function(){for(var U=0,Z=0,K=!1;Z=at;){nt=q[at++];for(var xt=C[nt],lt=0;ltdt&&(dt=$[Lt],Mt=Lt)}return Mt},Q=function(U){var Z=void 0;if(U){Z=Math.floor(Math.random()*E);for(var q=0;q=1)break;j=et}for(var pt=0;pt=1)break;j=et}for(var lt=0;lt0&&(Z.isParent()?C[U].push(R.get(Z.id())):C[U].push(Z.id()))})});var Nt=function(U){var Z=L.get(U),K=void 0;d.get(U).forEach(function(q){c.getElementById(q).isParent()?K=R.get(q):K=q,C[Z].push(K),C[L.get(K)].push(U)})},vt=!0,it=!1,ut=void 0;try{for(var Et=d.keys()[Symbol.iterator](),Ct;!(vt=(Ct=Et.next()).done);vt=!0){var Dt=Ct.value;Nt(Dt)}}catch(b){it=!0,ut=b}finally{try{!vt&&Et.return&&Et.return()}finally{if(it)throw ut}}E=L.size;var mt=void 0;if(E>2){S=E{var f=i(212),r=function(t){t&&t("layout","fcose",f)};typeof cytoscape<"u"&&r(cytoscape),a.exports=r}),140:(a=>{a.exports=M})},N={};function v(a){var e=N[a];if(e!==void 0)return e.exports;var i=N[a]={exports:{}};return P[a](i,i.exports,v),i.exports}var h=v(579);return h})()})})(se)),se.exports}var Er=mr();const Tr=qe(Er);var xe={L:"left",R:"right",T:"top",B:"bottom"},Ie={L:ct(w=>`${w},${w/2} 0,${w} 0,0`,"L"),R:ct(w=>`0,${w/2} ${w},0 ${w},${w}`,"R"),T:ct(w=>`0,0 ${w},0 ${w/2},${w}`,"T"),B:ct(w=>`${w/2},0 ${w},${w} 0,${w}`,"B")},oe={L:ct((w,F)=>w-F+2,"L"),R:ct((w,F)=>w-2,"R"),T:ct((w,F)=>w-F+2,"T"),B:ct((w,F)=>w-2,"B")},Nr=ct(function(w){return Wt(w)?w==="L"?"R":"L":w==="T"?"B":"T"},"getOppositeArchitectureDirection"),Re=ct(function(w){const F=w;return F==="L"||F==="R"||F==="T"||F==="B"},"isArchitectureDirection"),Wt=ct(function(w){const F=w;return F==="L"||F==="R"},"isArchitectureDirectionX"),qt=ct(function(w){const F=w;return F==="T"||F==="B"},"isArchitectureDirectionY"),Te=ct(function(w,F){const M=Wt(w)&&qt(F),P=qt(w)&&Wt(F);return M||P},"isArchitectureDirectionXY"),Lr=ct(function(w){const F=w[0],M=w[1],P=Wt(F)&&qt(M),N=qt(F)&&Wt(M);return P||N},"isArchitecturePairXY"),wr=ct(function(w){return w!=="LL"&&w!=="RR"&&w!=="TT"&&w!=="BB"},"isValidArchitectureDirectionPair"),pe=ct(function(w,F){const M=`${w}${F}`;return wr(M)?M:void 0},"getArchitectureDirectionPair"),Cr=ct(function([w,F],M){const P=M[0],N=M[1];return Wt(P)?qt(N)?[w+(P==="L"?-1:1),F+(N==="T"?1:-1)]:[w+(P==="L"?-1:1),F]:Wt(N)?[w+(N==="L"?1:-1),F+(P==="T"?1:-1)]:[w,F+(P==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),Mr=ct(function(w){return w==="LT"||w==="TL"?[1,1]:w==="BL"||w==="LB"?[1,-1]:w==="BR"||w==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),Ar=ct(function(w,F){return Te(w,F)?"bend":Wt(w)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),Dr=ct(function(w){return w.type==="service"},"isArchitectureService"),Or=ct(function(w){return w.type==="junction"},"isArchitectureJunction"),be=ct((w,F)=>{const[M,P]=[w,F].sort();return`${JSON.stringify(M)}-${JSON.stringify(P)}`},"architectureGroupAlignmentKey"),Ge=ct(w=>w.data(),"edgeData"),ie=ct(w=>w.data(),"nodeData"),xr=or.architecture,Pe=class{constructor(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.elements=new Map,this.diagramId="",this.setAccTitle=Ke,this.getAccTitle=je,this.setDiagramTitle=_e,this.getDiagramTitle=tr,this.getAccDescription=er,this.setAccDescription=rr,this.clear()}static{ct(this,"ArchitectureDB")}setDiagramId(w){this.diagramId=w}getDiagramId(){return this.diagramId}clear(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.dataStructures=void 0,this.elements=new Map,this.diagramId="",ir()}addService({id:w,icon:F,in:M,title:P,iconText:N}){if(this.registeredIds.has(w))throw new Error(`The service id [${w}] is already in use by another ${this.registeredIds.get(w)}`);if(M!==void 0){if(w===M)throw new Error(`The service [${w}] cannot be placed within itself`);if(!this.registeredIds.has(M))throw new Error(`The service [${w}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds.get(M)==="node")throw new Error(`The service [${w}]'s parent is not a group`)}this.registeredIds.set(w,"node"),this.nodes.set(w,{id:w,type:"service",icon:F,iconText:N,title:P,edges:[],in:M})}getServices(){return[...this.nodes.values()].filter(Dr)}addJunction({id:w,in:F}){if(this.registeredIds.has(w))throw new Error(`The junction id [${w}] is already in use by another ${this.registeredIds.get(w)}`);if(F!==void 0){if(w===F)throw new Error(`The junction [${w}] cannot be placed within itself`);if(!this.registeredIds.has(F))throw new Error(`The junction [${w}]'s parent does not exist. Please make sure the parent is created before this junction`);if(this.registeredIds.get(F)==="node")throw new Error(`The junction [${w}]'s parent is not a group`)}this.registeredIds.set(w,"node"),this.nodes.set(w,{id:w,type:"junction",edges:[],in:F})}getJunctions(){return[...this.nodes.values()].filter(Or)}getNodes(){return[...this.nodes.values()]}getNode(w){return this.nodes.get(w)??null}addGroup({id:w,icon:F,in:M,title:P}){if(this.registeredIds.has(w))throw new Error(`The group id [${w}] is already in use by another ${this.registeredIds.get(w)}`);if(M!==void 0){if(w===M)throw new Error(`The group [${w}] cannot be placed within itself`);if(!this.registeredIds.has(M))throw new Error(`The group [${w}]'s parent does not exist. Please make sure the parent is created before this group`);if(this.registeredIds.get(M)==="node")throw new Error(`The group [${w}]'s parent is not a group`)}this.registeredIds.set(w,"group"),this.groups.set(w,{id:w,icon:F,title:P,in:M})}getGroups(){return[...this.groups.values()]}addEdge({lhsId:w,rhsId:F,lhsDir:M,rhsDir:P,lhsInto:N,rhsInto:v,lhsGroup:h,rhsGroup:a,title:e}){if(!Re(M))throw new Error(`Invalid direction given for left hand side of edge ${w}--${F}. Expected (L,R,T,B) got ${String(M)}`);if(!Re(P))throw new Error(`Invalid direction given for right hand side of edge ${w}--${F}. Expected (L,R,T,B) got ${String(P)}`);if(!this.nodes.has(w)&&!this.groups.has(w))throw new Error(`The left-hand id [${w}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(!this.nodes.has(F)&&!this.groups.has(F))throw new Error(`The right-hand id [${F}] does not yet exist. Please create the service/group before declaring an edge to it.`);const i=this.nodes.get(w).in,f=this.nodes.get(F).in;if(h&&i&&f&&i==f)throw new Error(`The left-hand id [${w}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(a&&i&&f&&i==f)throw new Error(`The right-hand id [${F}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);const r={lhsId:w,lhsDir:M,lhsInto:N,lhsGroup:h,rhsId:F,rhsDir:P,rhsInto:v,rhsGroup:a,title:e};this.edges.push(r);const u=this.nodes.get(w),t=this.nodes.get(F);u&&t&&(u.edges.push(this.edges[this.edges.length-1]),t.edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}addLayoutHint(w){if(w.members.length<2)throw new Error(`An align directive requires at least two members; got ${w.members.length}`);const F=new Set;w.members.forEach(M=>{if(this.registeredIds.get(M)!=="node")throw new Error(`align ${w.direction} references [${M}], which is not a service or junction`);if(F.has(M))throw new Error(`align ${w.direction} lists [${M}] more than once`);F.add(M)}),this.layoutHints.push(w)}getLayoutHints(){return this.layoutHints}getDataStructures(){if(this.dataStructures===void 0){const w=new Map,F=new Map;for(const[h,a]of this.nodes.entries()){const e=new Map;for(const i of a.edges){const f=this.getNode(i.lhsId)?.in,r=this.getNode(i.rhsId)?.in;if(f&&r&&f!==r){const u=Ar(i.lhsDir,i.rhsDir);u!=="bend"&&w.set(be(f,r),u)}if(i.lhsId===h){const u=pe(i.lhsDir,i.rhsDir);u&&e.set(u,i.rhsId)}else{const u=pe(i.rhsDir,i.lhsDir);u&&e.set(u,i.lhsId)}}F.set(h,e)}const M=new Set,P=new Set(F.keys()),N=ct(h=>{const a=new Map([[h,[0,0]]]),e=[h];for(;e.length>0;){const i=e.shift();if(i){M.add(i),P.delete(i);const f=F.get(i);if(!f)throw new Error(`BFS error: adjacency list for id ${i} not found. Please report this as a bug.`);const r=a.get(i);if(!r)throw new Error(`BFS error: position for id ${i} not found in spatial map. Please report this as a bug.`);const[u,t]=r;f.forEach((s,o)=>{M.has(s)||(a.set(s,Cr([u,t],o)),e.push(s))})}}return a},"BFS"),v=[];for(;P.size>0;){const h=P.values().next().value;v.push(N(h))}this.dataStructures={adjList:F,spatialMaps:v,groupAlignments:w}}return this.dataStructures}setElementForId(w,F){this.elements.set(w,F)}getElementById(w){return this.elements.get(w)}getConfig(){return ar({...xr,...nr().architecture})}getConfigField(w){return this.getConfig()[w]}},Ir=ct((w,F)=>{Ze(w,F),w.groups.map(M=>F.addGroup(M)),w.services.map(M=>F.addService({...M,type:"service"})),w.junctions.map(M=>F.addJunction({...M,type:"junction"})),w.edges.map(M=>F.addEdge(M)),w.alignments?.map(M=>F.addLayoutHint({direction:M.direction,members:[...M.members]}))},"populateDb"),Ue={parser:{yy:void 0},parse:ct(async w=>{const F=await gr("architecture",w);Se.debug(F);const M=Ue.parser?.yy;if(!(M instanceof Pe))throw new Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Ir(F,M)},"parse")},Rr=ct(w=>`
   .edge {
     stroke-width: ${w.archEdgeWidth};
     stroke: ${w.archEdgeColor};
diff --git a/apps/pythinker-code/dist-web/assets/blockDiagram-NRAW4CY4-cr4vjQ1P.js b/apps/pythinker-code/dist-web/assets/blockDiagram-NRAW4CY4-Dkk1ohqb.js
similarity index 99%
rename from apps/pythinker-code/dist-web/assets/blockDiagram-NRAW4CY4-cr4vjQ1P.js
rename to apps/pythinker-code/dist-web/assets/blockDiagram-NRAW4CY4-Dkk1ohqb.js
index 723054efd..fdd189c82 100644
--- a/apps/pythinker-code/dist-web/assets/blockDiagram-NRAW4CY4-cr4vjQ1P.js
+++ b/apps/pythinker-code/dist-web/assets/blockDiagram-NRAW4CY4-Dkk1ohqb.js
@@ -1,4 +1,4 @@
-import{g as Pe}from"./chunk-5VM5RSS4-baBluNR7.js";import{aC as Fe,aD as xe,aE as Me,aF as Ke,aG as Ye,aH as We,aI as Ve,aJ as Ue,aK as He,aL as Xe,aM as je,aN as Ge,aO as qe,aP as Je,aQ as Ze,aR as Qe,aS as $e,aT as et,aU as tt,aV as st,aW as rt,aX as it,aY as at,aZ as nt,a_ as ot,_ as u,A as Y,j as X,a$ as ct,d as lt,l as y,r as ut,u as gt,c as Le,a7 as ht,ay as dt,ax as pt,az as ft,k as bt,b0 as St,ah as me,ai as xt}from"./mermaid.core-D6Xg32pF.js";import{c as Lt}from"./channel-CRmZXxAS.js";import"./index-D9Nz1t7z.js";import"./purify.es-5AjVNlXF.js";function mt(e){return Array.isArray(e)}function yt(e){if(Fe(e))return e;const a=xe(e);if(!wt(e))return{};if(mt(e)){const r=Array.from(e);return e.length>0&&typeof e[0]=="string"&&Object.hasOwn(e,"index")&&(r.index=e.index,r.input=e.input),r}if(Me(e)){const r=e,l=r.constructor;return new l(r.buffer,r.byteOffset,r.length)}if(a==="[object ArrayBuffer]")return new ArrayBuffer(e.byteLength);if(a==="[object DataView]"){const r=e,l=r.buffer,d=r.byteOffset,s=r.byteLength,h=new ArrayBuffer(s),x=new Uint8Array(l,d,s);return new Uint8Array(h).set(x),new DataView(h)}if(a==="[object Boolean]"||a==="[object Number]"||a==="[object String]"){const r=e.constructor,l=new r(e.valueOf());return a==="[object String]"?_t(l,e):se(l,e),l}if(a==="[object Date]")return new Date(Number(e));if(a==="[object RegExp]"){const r=e,l=new RegExp(r.source,r.flags);return l.lastIndex=r.lastIndex,l}if(a==="[object Symbol]")return Object(Symbol.prototype.valueOf.call(e));if(a==="[object Map]"){const r=e,l=new Map;return r.forEach((d,s)=>{l.set(s,d)}),l}if(a==="[object Set]"){const r=e,l=new Set;return r.forEach(d=>{l.add(d)}),l}if(a==="[object Arguments]"){const r=e,l={};return se(l,r),l.length=r.length,l[Symbol.iterator]=r[Symbol.iterator],l}const o={};return kt(o,e),se(o,e),Et(o,e),o}function wt(e){switch(xe(e)){case ot:case nt:case at:case it:case rt:case st:case tt:case et:case $e:case Qe:case Ze:case Je:case qe:case Ge:case je:case Xe:case He:case Ue:case Ve:case We:case Ye:case Ke:return!0;default:return!1}}function se(e,a){for(const o in a)Object.hasOwn(a,o)&&(e[o]=a[o])}function Et(e,a){const o=Object.getOwnPropertySymbols(a);for(let r=0;r=o)&&(e[r]=a[r])}function kt(e,a){const o=Object.getPrototypeOf(a);o!==null&&typeof a.constructor=="function"&&Object.setPrototypeOf(e,o)}var ie=(function(){var e=u(function(v,g,i,c){for(i=i||{},c=v.length;c--;i[v[c]]=g);return i},"o"),a=[1,15],o=[1,7],r=[1,13],l=[1,14],d=[1,19],s=[1,16],h=[1,17],x=[1,18],m=[8,30],S=[8,10,21,28,29,30,31,39,43,46],f=[1,23],L=[1,24],w=[8,10,15,16,21,28,29,30,31,39,43,46],b=[8,10,15,16,21,27,28,29,30,31,39,43,46],k=[1,49],_={trace:u(function(){},"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"NODE_ID",34:"DIR",35:"NODE_DSTART",36:"NODE_DEND",37:"BLOCK_ARROW_START",38:"BLOCK_ARROW_END",39:"classDef",40:"CLASSDEF_ID",41:"CLASSDEF_STYLEOPTS",42:"DEFAULT",43:"class",44:"CLASSENTITY_IDS",45:"STYLECLASS",46:"style",47:"STYLE_ENTITY_IDS",48:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:u(function(g,i,c,p,E,t,M){var n=t.length-1;switch(E){case 4:p.getLogger().debug("Rule: separator (NL) ");break;case 5:p.getLogger().debug("Rule: separator (Space) ");break;case 6:p.getLogger().debug("Rule: separator (EOF) ");break;case 7:p.getLogger().debug("Rule: hierarchy: ",t[n-1]),p.setHierarchy(t[n-1]);break;case 8:p.getLogger().debug("Stop NL ");break;case 9:p.getLogger().debug("Stop EOF ");break;case 10:p.getLogger().debug("Stop NL2 ");break;case 11:p.getLogger().debug("Stop EOF2 ");break;case 12:p.getLogger().debug("Rule: statement: ",t[n]),typeof t[n].length=="number"?this.$=t[n]:this.$=[t[n]];break;case 13:p.getLogger().debug("Rule: statement #2: ",t[n-1]),this.$=[t[n-1]].concat(t[n]);break;case 14:p.getLogger().debug("Rule: link: ",t[n],g),this.$={edgeTypeStr:t[n],label:""};break;case 15:p.getLogger().debug("Rule: LABEL link: ",t[n-3],t[n-1],t[n]),this.$={edgeTypeStr:t[n],label:t[n-1]};break;case 18:const P=parseInt(t[n]),W=p.generateId();this.$={id:W,type:"space",label:"",width:P,children:[]};break;case 23:p.getLogger().debug("Rule: (nodeStatement link node) ",t[n-2],t[n-1],t[n]," typestr: ",t[n-1].edgeTypeStr);const J=p.edgeStrToEdgeData(t[n-1].edgeTypeStr),V=p.edgeStrToEdgeStartData(t[n-1].edgeTypeStr),Z=p.edgeStrToThickness(t[n-1].edgeTypeStr),D=p.edgeStrToPattern(t[n-1].edgeTypeStr);this.$=[{id:t[n-2].id,label:t[n-2].label,type:t[n-2].type,directions:t[n-2].directions},{id:t[n-2].id+"-"+t[n].id,start:t[n-2].id,end:t[n].id,label:t[n-1].label,type:"edge",thickness:Z,pattern:D,directions:t[n].directions,arrowTypeEnd:J,arrowTypeStart:V},{id:t[n].id,label:t[n].label,type:p.typeStr2Type(t[n].typeStr),directions:t[n].directions}];break;case 24:p.getLogger().debug("Rule: nodeStatement (abc88 node size) ",t[n-1],t[n]),this.$={id:t[n-1].id,label:t[n-1].label,type:p.typeStr2Type(t[n-1].typeStr),directions:t[n-1].directions,widthInColumns:parseInt(t[n],10)};break;case 25:p.getLogger().debug("Rule: nodeStatement (node) ",t[n]),this.$={id:t[n].id,label:t[n].label,type:p.typeStr2Type(t[n].typeStr),directions:t[n].directions,widthInColumns:1};break;case 26:p.getLogger().debug("APA123",this?this:"na"),p.getLogger().debug("COLUMNS: ",t[n]),this.$={type:"column-setting",columns:t[n]==="auto"?-1:parseInt(t[n])};break;case 27:p.getLogger().debug("Rule: id-block statement : ",t[n-2],t[n-1]),p.generateId(),this.$={...t[n-2],type:"composite",children:t[n-1]};break;case 28:p.getLogger().debug("Rule: blockStatement : ",t[n-2],t[n-1],t[n]);const A=p.generateId();this.$={id:A,type:"composite",label:"",children:t[n-1]};break;case 29:p.getLogger().debug("Rule: node (NODE_ID separator): ",t[n]),this.$={id:t[n]};break;case 30:p.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",t[n-1],t[n]),this.$={id:t[n-1],label:t[n].label,typeStr:t[n].typeStr,directions:t[n].directions};break;case 31:p.getLogger().debug("Rule: dirList: ",t[n]),this.$=[t[n]];break;case 32:p.getLogger().debug("Rule: dirList: ",t[n-1],t[n]),this.$=[t[n-1]].concat(t[n]);break;case 33:p.getLogger().debug("Rule: nodeShapeNLabel: ",t[n-2],t[n-1],t[n]),this.$={typeStr:t[n-2]+t[n],label:t[n-1]};break;case 34:p.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",t[n-3],t[n-2]," #3:",t[n-1],t[n]),this.$={typeStr:t[n-3]+t[n],label:t[n-2],directions:t[n-1]};break;case 35:case 36:this.$={type:"classDef",id:t[n-1].trim(),css:t[n].trim()};break;case 37:this.$={type:"applyClass",id:t[n-1].trim(),styleClass:t[n].trim()};break;case 38:this.$={type:"applyStyles",id:t[n-1].trim(),stylesStr:t[n].trim()};break}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:a,11:3,13:4,19:5,20:6,21:o,22:8,23:9,24:10,25:11,26:12,28:r,29:l,31:d,39:s,43:h,46:x},{8:[1,20]},e(m,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:a,21:o,28:r,29:l,31:d,39:s,43:h,46:x}),e(S,[2,16],{14:22,15:f,16:L}),e(S,[2,17]),e(S,[2,18]),e(S,[2,19]),e(S,[2,20]),e(S,[2,21]),e(S,[2,22]),e(w,[2,25],{27:[1,25]}),e(S,[2,26]),{19:26,26:12,31:d},{10:a,11:27,13:4,19:5,20:6,21:o,22:8,23:9,24:10,25:11,26:12,28:r,29:l,31:d,39:s,43:h,46:x},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},e(b,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},e(m,[2,13]),{26:35,31:d},{31:[2,14]},{17:[1,36]},e(w,[2,24]),{10:a,11:37,13:4,14:22,15:f,16:L,19:5,20:6,21:o,22:8,23:9,24:10,25:11,26:12,28:r,29:l,31:d,39:s,43:h,46:x},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},e(b,[2,30]),{18:[1,43]},{18:[1,44]},e(w,[2,23]),{18:[1,45]},{30:[1,46]},e(S,[2,28]),e(S,[2,35]),e(S,[2,36]),e(S,[2,37]),e(S,[2,38]),{36:[1,47]},{33:48,34:k},{15:[1,50]},e(S,[2,27]),e(b,[2,33]),{38:[1,51]},{33:52,34:k,38:[2,31]},{31:[2,15]},e(b,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:u(function(g,i){if(i.recoverable)this.trace(g);else{var c=new Error(g);throw c.hash=i,c}},"parseError"),parse:u(function(g){var i=this,c=[0],p=[],E=[null],t=[],M=this.table,n="",P=0,W=0,J=2,V=1,Z=t.slice.call(arguments,1),D=Object.create(this.lexer),A={yy:{}};for(var Q in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Q)&&(A.yy[Q]=this.yy[Q]);D.setInput(g,A.yy),A.yy.lexer=D,A.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var $=D.yylloc;t.push($);var Be=D.options&&D.options.ranges;typeof A.yy.parseError=="function"?this.parseError=A.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Re(I){c.length=c.length-2*I,E.length=E.length-I,t.length=t.length-I}u(Re,"popStack");function de(){var I;return I=p.pop()||D.lex()||V,typeof I!="number"&&(I instanceof Array&&(p=I,I=p.pop()),I=i.symbols_[I]||I),I}u(de,"lex");for(var N,R,C,ee,F={},U,B,pe,H;;){if(R=c[c.length-1],this.defaultActions[R]?C=this.defaultActions[R]:((N===null||typeof N>"u")&&(N=de()),C=M[R]&&M[R][N]),typeof C>"u"||!C.length||!C[0]){var te="";H=[];for(U in M[R])this.terminals_[U]&&U>J&&H.push("'"+this.terminals_[U]+"'");D.showPosition?te="Parse error on line "+(P+1)+`:
+import{g as Pe}from"./chunk-5VM5RSS4-D8DHuAth.js";import{aC as Fe,aD as xe,aE as Me,aF as Ke,aG as Ye,aH as We,aI as Ve,aJ as Ue,aK as He,aL as Xe,aM as je,aN as Ge,aO as qe,aP as Je,aQ as Ze,aR as Qe,aS as $e,aT as et,aU as tt,aV as st,aW as rt,aX as it,aY as at,aZ as nt,a_ as ot,_ as u,A as Y,j as X,a$ as ct,d as lt,l as y,r as ut,u as gt,c as Le,a7 as ht,ay as dt,ax as pt,az as ft,k as bt,b0 as St,ah as me,ai as xt}from"./mermaid.core-BLsmN-lt.js";import{c as Lt}from"./channel-Bm0H2vxn.js";import"./index-XmhyfFRf.js";import"./purify.es-5AjVNlXF.js";function mt(e){return Array.isArray(e)}function yt(e){if(Fe(e))return e;const a=xe(e);if(!wt(e))return{};if(mt(e)){const r=Array.from(e);return e.length>0&&typeof e[0]=="string"&&Object.hasOwn(e,"index")&&(r.index=e.index,r.input=e.input),r}if(Me(e)){const r=e,l=r.constructor;return new l(r.buffer,r.byteOffset,r.length)}if(a==="[object ArrayBuffer]")return new ArrayBuffer(e.byteLength);if(a==="[object DataView]"){const r=e,l=r.buffer,d=r.byteOffset,s=r.byteLength,h=new ArrayBuffer(s),x=new Uint8Array(l,d,s);return new Uint8Array(h).set(x),new DataView(h)}if(a==="[object Boolean]"||a==="[object Number]"||a==="[object String]"){const r=e.constructor,l=new r(e.valueOf());return a==="[object String]"?_t(l,e):se(l,e),l}if(a==="[object Date]")return new Date(Number(e));if(a==="[object RegExp]"){const r=e,l=new RegExp(r.source,r.flags);return l.lastIndex=r.lastIndex,l}if(a==="[object Symbol]")return Object(Symbol.prototype.valueOf.call(e));if(a==="[object Map]"){const r=e,l=new Map;return r.forEach((d,s)=>{l.set(s,d)}),l}if(a==="[object Set]"){const r=e,l=new Set;return r.forEach(d=>{l.add(d)}),l}if(a==="[object Arguments]"){const r=e,l={};return se(l,r),l.length=r.length,l[Symbol.iterator]=r[Symbol.iterator],l}const o={};return kt(o,e),se(o,e),Et(o,e),o}function wt(e){switch(xe(e)){case ot:case nt:case at:case it:case rt:case st:case tt:case et:case $e:case Qe:case Ze:case Je:case qe:case Ge:case je:case Xe:case He:case Ue:case Ve:case We:case Ye:case Ke:return!0;default:return!1}}function se(e,a){for(const o in a)Object.hasOwn(a,o)&&(e[o]=a[o])}function Et(e,a){const o=Object.getOwnPropertySymbols(a);for(let r=0;r=o)&&(e[r]=a[r])}function kt(e,a){const o=Object.getPrototypeOf(a);o!==null&&typeof a.constructor=="function"&&Object.setPrototypeOf(e,o)}var ie=(function(){var e=u(function(v,g,i,c){for(i=i||{},c=v.length;c--;i[v[c]]=g);return i},"o"),a=[1,15],o=[1,7],r=[1,13],l=[1,14],d=[1,19],s=[1,16],h=[1,17],x=[1,18],m=[8,30],S=[8,10,21,28,29,30,31,39,43,46],f=[1,23],L=[1,24],w=[8,10,15,16,21,28,29,30,31,39,43,46],b=[8,10,15,16,21,27,28,29,30,31,39,43,46],k=[1,49],_={trace:u(function(){},"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"NODE_ID",34:"DIR",35:"NODE_DSTART",36:"NODE_DEND",37:"BLOCK_ARROW_START",38:"BLOCK_ARROW_END",39:"classDef",40:"CLASSDEF_ID",41:"CLASSDEF_STYLEOPTS",42:"DEFAULT",43:"class",44:"CLASSENTITY_IDS",45:"STYLECLASS",46:"style",47:"STYLE_ENTITY_IDS",48:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:u(function(g,i,c,p,E,t,M){var n=t.length-1;switch(E){case 4:p.getLogger().debug("Rule: separator (NL) ");break;case 5:p.getLogger().debug("Rule: separator (Space) ");break;case 6:p.getLogger().debug("Rule: separator (EOF) ");break;case 7:p.getLogger().debug("Rule: hierarchy: ",t[n-1]),p.setHierarchy(t[n-1]);break;case 8:p.getLogger().debug("Stop NL ");break;case 9:p.getLogger().debug("Stop EOF ");break;case 10:p.getLogger().debug("Stop NL2 ");break;case 11:p.getLogger().debug("Stop EOF2 ");break;case 12:p.getLogger().debug("Rule: statement: ",t[n]),typeof t[n].length=="number"?this.$=t[n]:this.$=[t[n]];break;case 13:p.getLogger().debug("Rule: statement #2: ",t[n-1]),this.$=[t[n-1]].concat(t[n]);break;case 14:p.getLogger().debug("Rule: link: ",t[n],g),this.$={edgeTypeStr:t[n],label:""};break;case 15:p.getLogger().debug("Rule: LABEL link: ",t[n-3],t[n-1],t[n]),this.$={edgeTypeStr:t[n],label:t[n-1]};break;case 18:const P=parseInt(t[n]),W=p.generateId();this.$={id:W,type:"space",label:"",width:P,children:[]};break;case 23:p.getLogger().debug("Rule: (nodeStatement link node) ",t[n-2],t[n-1],t[n]," typestr: ",t[n-1].edgeTypeStr);const J=p.edgeStrToEdgeData(t[n-1].edgeTypeStr),V=p.edgeStrToEdgeStartData(t[n-1].edgeTypeStr),Z=p.edgeStrToThickness(t[n-1].edgeTypeStr),D=p.edgeStrToPattern(t[n-1].edgeTypeStr);this.$=[{id:t[n-2].id,label:t[n-2].label,type:t[n-2].type,directions:t[n-2].directions},{id:t[n-2].id+"-"+t[n].id,start:t[n-2].id,end:t[n].id,label:t[n-1].label,type:"edge",thickness:Z,pattern:D,directions:t[n].directions,arrowTypeEnd:J,arrowTypeStart:V},{id:t[n].id,label:t[n].label,type:p.typeStr2Type(t[n].typeStr),directions:t[n].directions}];break;case 24:p.getLogger().debug("Rule: nodeStatement (abc88 node size) ",t[n-1],t[n]),this.$={id:t[n-1].id,label:t[n-1].label,type:p.typeStr2Type(t[n-1].typeStr),directions:t[n-1].directions,widthInColumns:parseInt(t[n],10)};break;case 25:p.getLogger().debug("Rule: nodeStatement (node) ",t[n]),this.$={id:t[n].id,label:t[n].label,type:p.typeStr2Type(t[n].typeStr),directions:t[n].directions,widthInColumns:1};break;case 26:p.getLogger().debug("APA123",this?this:"na"),p.getLogger().debug("COLUMNS: ",t[n]),this.$={type:"column-setting",columns:t[n]==="auto"?-1:parseInt(t[n])};break;case 27:p.getLogger().debug("Rule: id-block statement : ",t[n-2],t[n-1]),p.generateId(),this.$={...t[n-2],type:"composite",children:t[n-1]};break;case 28:p.getLogger().debug("Rule: blockStatement : ",t[n-2],t[n-1],t[n]);const A=p.generateId();this.$={id:A,type:"composite",label:"",children:t[n-1]};break;case 29:p.getLogger().debug("Rule: node (NODE_ID separator): ",t[n]),this.$={id:t[n]};break;case 30:p.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",t[n-1],t[n]),this.$={id:t[n-1],label:t[n].label,typeStr:t[n].typeStr,directions:t[n].directions};break;case 31:p.getLogger().debug("Rule: dirList: ",t[n]),this.$=[t[n]];break;case 32:p.getLogger().debug("Rule: dirList: ",t[n-1],t[n]),this.$=[t[n-1]].concat(t[n]);break;case 33:p.getLogger().debug("Rule: nodeShapeNLabel: ",t[n-2],t[n-1],t[n]),this.$={typeStr:t[n-2]+t[n],label:t[n-1]};break;case 34:p.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",t[n-3],t[n-2]," #3:",t[n-1],t[n]),this.$={typeStr:t[n-3]+t[n],label:t[n-2],directions:t[n-1]};break;case 35:case 36:this.$={type:"classDef",id:t[n-1].trim(),css:t[n].trim()};break;case 37:this.$={type:"applyClass",id:t[n-1].trim(),styleClass:t[n].trim()};break;case 38:this.$={type:"applyStyles",id:t[n-1].trim(),stylesStr:t[n].trim()};break}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:a,11:3,13:4,19:5,20:6,21:o,22:8,23:9,24:10,25:11,26:12,28:r,29:l,31:d,39:s,43:h,46:x},{8:[1,20]},e(m,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:a,21:o,28:r,29:l,31:d,39:s,43:h,46:x}),e(S,[2,16],{14:22,15:f,16:L}),e(S,[2,17]),e(S,[2,18]),e(S,[2,19]),e(S,[2,20]),e(S,[2,21]),e(S,[2,22]),e(w,[2,25],{27:[1,25]}),e(S,[2,26]),{19:26,26:12,31:d},{10:a,11:27,13:4,19:5,20:6,21:o,22:8,23:9,24:10,25:11,26:12,28:r,29:l,31:d,39:s,43:h,46:x},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},e(b,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},e(m,[2,13]),{26:35,31:d},{31:[2,14]},{17:[1,36]},e(w,[2,24]),{10:a,11:37,13:4,14:22,15:f,16:L,19:5,20:6,21:o,22:8,23:9,24:10,25:11,26:12,28:r,29:l,31:d,39:s,43:h,46:x},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},e(b,[2,30]),{18:[1,43]},{18:[1,44]},e(w,[2,23]),{18:[1,45]},{30:[1,46]},e(S,[2,28]),e(S,[2,35]),e(S,[2,36]),e(S,[2,37]),e(S,[2,38]),{36:[1,47]},{33:48,34:k},{15:[1,50]},e(S,[2,27]),e(b,[2,33]),{38:[1,51]},{33:52,34:k,38:[2,31]},{31:[2,15]},e(b,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:u(function(g,i){if(i.recoverable)this.trace(g);else{var c=new Error(g);throw c.hash=i,c}},"parseError"),parse:u(function(g){var i=this,c=[0],p=[],E=[null],t=[],M=this.table,n="",P=0,W=0,J=2,V=1,Z=t.slice.call(arguments,1),D=Object.create(this.lexer),A={yy:{}};for(var Q in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Q)&&(A.yy[Q]=this.yy[Q]);D.setInput(g,A.yy),A.yy.lexer=D,A.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var $=D.yylloc;t.push($);var Be=D.options&&D.options.ranges;typeof A.yy.parseError=="function"?this.parseError=A.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Re(I){c.length=c.length-2*I,E.length=E.length-I,t.length=t.length-I}u(Re,"popStack");function de(){var I;return I=p.pop()||D.lex()||V,typeof I!="number"&&(I instanceof Array&&(p=I,I=p.pop()),I=i.symbols_[I]||I),I}u(de,"lex");for(var N,R,C,ee,F={},U,B,pe,H;;){if(R=c[c.length-1],this.defaultActions[R]?C=this.defaultActions[R]:((N===null||typeof N>"u")&&(N=de()),C=M[R]&&M[R][N]),typeof C>"u"||!C.length||!C[0]){var te="";H=[];for(U in M[R])this.terminals_[U]&&U>J&&H.push("'"+this.terminals_[U]+"'");D.showPosition?te="Parse error on line "+(P+1)+`:
 `+D.showPosition()+`
 Expecting `+H.join(", ")+", got '"+(this.terminals_[N]||N)+"'":te="Parse error on line "+(P+1)+": Unexpected "+(N==V?"end of input":"'"+(this.terminals_[N]||N)+"'"),this.parseError(te,{text:D.match,token:this.terminals_[N]||N,line:D.yylineno,loc:$,expected:H})}if(C[0]instanceof Array&&C.length>1)throw new Error("Parse Error: multiple actions possible at state: "+R+", token: "+N);switch(C[0]){case 1:c.push(N),E.push(D.yytext),t.push(D.yylloc),c.push(C[1]),N=null,W=D.yyleng,n=D.yytext,P=D.yylineno,$=D.yylloc;break;case 2:if(B=this.productions_[C[1]][1],F.$=E[E.length-B],F._$={first_line:t[t.length-(B||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(B||1)].first_column,last_column:t[t.length-1].last_column},Be&&(F._$.range=[t[t.length-(B||1)].range[0],t[t.length-1].range[1]]),ee=this.performAction.apply(F,[n,W,P,A.yy,C[1],E,t].concat(Z)),typeof ee<"u")return ee;B&&(c=c.slice(0,-1*B*2),E=E.slice(0,-1*B),t=t.slice(0,-1*B)),c.push(this.productions_[C[1]][0]),E.push(F.$),t.push(F._$),pe=M[c[c.length-2]][c[c.length-1]],c.push(pe);break;case 3:return!0}}return!0},"parse")},T=(function(){var v={EOF:1,parseError:u(function(i,c){if(this.yy.parser)this.yy.parser.parseError(i,c);else throw new Error(i)},"parseError"),setInput:u(function(g,i){return this.yy=i||this.yy||{},this._input=g,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:u(function(){var g=this._input[0];this.yytext+=g,this.yyleng++,this.offset++,this.match+=g,this.matched+=g;var i=g.match(/(?:\r\n?|\n).*/g);return i?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),g},"input"),unput:u(function(g){var i=g.length,c=g.split(/(?:\r\n?|\n)/g);this._input=g+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-i),this.offset-=i;var p=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var E=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===p.length?this.yylloc.first_column:0)+p[p.length-c.length].length-c[0].length:this.yylloc.first_column-i},this.options.ranges&&(this.yylloc.range=[E[0],E[0]+this.yyleng-i]),this.yyleng=this.yytext.length,this},"unput"),more:u(function(){return this._more=!0,this},"more"),reject:u(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
 `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:u(function(g){this.unput(this.match.slice(g))},"less"),pastInput:u(function(){var g=this.matched.substr(0,this.matched.length-this.match.length);return(g.length>20?"...":"")+g.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:u(function(){var g=this.match;return g.length<20&&(g+=this._input.substr(0,20-g.length)),(g.substr(0,20)+(g.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:u(function(){var g=this.pastInput(),i=new Array(g.length+1).join("-");return g+this.upcomingInput()+`
diff --git a/apps/pythinker-code/dist-web/assets/c4Diagram-UCG6FXSJ-B3GT8xij.js b/apps/pythinker-code/dist-web/assets/c4Diagram-UCG6FXSJ-BV-15Tol.js
similarity index 99%
rename from apps/pythinker-code/dist-web/assets/c4Diagram-UCG6FXSJ-B3GT8xij.js
rename to apps/pythinker-code/dist-web/assets/c4Diagram-UCG6FXSJ-BV-15Tol.js
index 576d75e8e..5edb6ccf8 100644
--- a/apps/pythinker-code/dist-web/assets/c4Diagram-UCG6FXSJ-B3GT8xij.js
+++ b/apps/pythinker-code/dist-web/assets/c4Diagram-UCG6FXSJ-BV-15Tol.js
@@ -1,4 +1,4 @@
-import{d as Ne}from"./chunk-F27PBJKO-B_4WdsPc.js";import{s as Ae,g as Le,a as Ie,b as Me,_ as d,c as Ct,l as ce,d as Be,e as Ve,f as Ot,h as Ye,i as ye,j as Kt,w as Fe,k as Jt,m as ue}from"./mermaid.core-D6Xg32pF.js";import"./index-D9Nz1t7z.js";import"./purify.es-5AjVNlXF.js";var Yt=(function(){var t=d(function(yt,m,x,E){for(x=x||{},E=yt.length;E--;x[yt[E]]=m);return x},"o"),e=[1,24],r=[1,25],a=[1,26],u=[1,27],i=[1,28],n=[1,63],l=[1,64],s=[1,65],h=[1,66],y=[1,67],f=[1,68],b=[1,69],v=[1,29],w=[1,30],N=[1,31],O=[1,32],P=[1,33],I=[1,34],W=[1,35],X=[1,36],q=[1,37],H=[1,38],Q=[1,39],K=[1,40],G=[1,41],J=[1,42],Z=[1,43],$=[1,44],tt=[1,45],et=[1,46],nt=[1,47],st=[1,48],rt=[1,50],at=[1,51],it=[1,52],ot=[1,53],lt=[1,54],ct=[1,55],ut=[1,56],ht=[1,57],dt=[1,58],pt=[1,59],ft=[1,60],kt=[14,42],jt=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],Rt=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],S=[1,82],k=[1,83],T=[1,84],C=[1,85],R=[12,14,42],re=[12,14,33,42],Lt=[12,14,33,42,76,77,79,80],gt=[12,33],zt=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],Wt={trace:d(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:"error",6:"direction_tb",7:"direction_bt",8:"direction_rl",9:"direction_lr",11:"C4_CONTEXT",12:"NEWLINE",14:"EOF",15:"C4_CONTAINER",16:"C4_COMPONENT",17:"C4_DYNAMIC",18:"C4_DEPLOYMENT",22:"title",23:"accDescription",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"LBRACE",34:"ENTERPRISE_BOUNDARY",36:"SYSTEM_BOUNDARY",37:"BOUNDARY",38:"CONTAINER_BOUNDARY",39:"NODE",40:"NODE_L",41:"NODE_R",42:"RBRACE",44:"PERSON",45:"PERSON_EXT",46:"SYSTEM",47:"SYSTEM_DB",48:"SYSTEM_QUEUE",49:"SYSTEM_EXT",50:"SYSTEM_EXT_DB",51:"SYSTEM_EXT_QUEUE",52:"CONTAINER",53:"CONTAINER_DB",54:"CONTAINER_QUEUE",55:"CONTAINER_EXT",56:"CONTAINER_EXT_DB",57:"CONTAINER_EXT_QUEUE",58:"COMPONENT",59:"COMPONENT_DB",60:"COMPONENT_QUEUE",61:"COMPONENT_EXT",62:"COMPONENT_EXT_DB",63:"COMPONENT_EXT_QUEUE",64:"REL",65:"BIREL",66:"REL_U",67:"REL_D",68:"REL_L",69:"REL_R",70:"REL_B",71:"REL_INDEX",72:"UPDATE_EL_STYLE",73:"UPDATE_REL_STYLE",74:"UPDATE_LAYOUT_CONFIG",76:"STR",77:"STR_KEY",78:"STR_VALUE",79:"ATTRIBUTE",80:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:d(function(m,x,E,_,D,o,wt){var p=o.length-1;switch(D){case 3:_.setDirection("TB");break;case 4:_.setDirection("BT");break;case 5:_.setDirection("RL");break;case 6:_.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:_.setC4Type(o[p-3]);break;case 19:_.setTitle(o[p].substring(6)),this.$=o[p].substring(6);break;case 20:_.setAccDescription(o[p].substring(15)),this.$=o[p].substring(15);break;case 21:this.$=o[p].trim(),_.setTitle(this.$);break;case 22:case 23:this.$=o[p].trim(),_.setAccDescription(this.$);break;case 28:o[p].splice(2,0,"ENTERPRISE"),_.addPersonOrSystemBoundary(...o[p]),this.$=o[p];break;case 29:o[p].splice(2,0,"SYSTEM"),_.addPersonOrSystemBoundary(...o[p]),this.$=o[p];break;case 30:_.addPersonOrSystemBoundary(...o[p]),this.$=o[p];break;case 31:o[p].splice(2,0,"CONTAINER"),_.addContainerBoundary(...o[p]),this.$=o[p];break;case 32:_.addDeploymentNode("node",...o[p]),this.$=o[p];break;case 33:_.addDeploymentNode("nodeL",...o[p]),this.$=o[p];break;case 34:_.addDeploymentNode("nodeR",...o[p]),this.$=o[p];break;case 35:_.popBoundaryParseStack();break;case 39:_.addPersonOrSystem("person",...o[p]),this.$=o[p];break;case 40:_.addPersonOrSystem("external_person",...o[p]),this.$=o[p];break;case 41:_.addPersonOrSystem("system",...o[p]),this.$=o[p];break;case 42:_.addPersonOrSystem("system_db",...o[p]),this.$=o[p];break;case 43:_.addPersonOrSystem("system_queue",...o[p]),this.$=o[p];break;case 44:_.addPersonOrSystem("external_system",...o[p]),this.$=o[p];break;case 45:_.addPersonOrSystem("external_system_db",...o[p]),this.$=o[p];break;case 46:_.addPersonOrSystem("external_system_queue",...o[p]),this.$=o[p];break;case 47:_.addContainer("container",...o[p]),this.$=o[p];break;case 48:_.addContainer("container_db",...o[p]),this.$=o[p];break;case 49:_.addContainer("container_queue",...o[p]),this.$=o[p];break;case 50:_.addContainer("external_container",...o[p]),this.$=o[p];break;case 51:_.addContainer("external_container_db",...o[p]),this.$=o[p];break;case 52:_.addContainer("external_container_queue",...o[p]),this.$=o[p];break;case 53:_.addComponent("component",...o[p]),this.$=o[p];break;case 54:_.addComponent("component_db",...o[p]),this.$=o[p];break;case 55:_.addComponent("component_queue",...o[p]),this.$=o[p];break;case 56:_.addComponent("external_component",...o[p]),this.$=o[p];break;case 57:_.addComponent("external_component_db",...o[p]),this.$=o[p];break;case 58:_.addComponent("external_component_queue",...o[p]),this.$=o[p];break;case 60:_.addRel("rel",...o[p]),this.$=o[p];break;case 61:_.addRel("birel",...o[p]),this.$=o[p];break;case 62:_.addRel("rel_u",...o[p]),this.$=o[p];break;case 63:_.addRel("rel_d",...o[p]),this.$=o[p];break;case 64:_.addRel("rel_l",...o[p]),this.$=o[p];break;case 65:_.addRel("rel_r",...o[p]),this.$=o[p];break;case 66:_.addRel("rel_b",...o[p]),this.$=o[p];break;case 67:o[p].splice(0,1),_.addRel("rel",...o[p]),this.$=o[p];break;case 68:_.updateElStyle("update_el_style",...o[p]),this.$=o[p];break;case 69:_.updateRelStyle("update_rel_style",...o[p]),this.$=o[p];break;case 70:_.updateLayoutConfig("update_layout_config",...o[p]),this.$=o[p];break;case 71:this.$=[o[p]];break;case 72:o[p].unshift(o[p-1]),this.$=o[p];break;case 73:case 75:this.$=o[p].trim();break;case 74:let xt={};xt[o[p-1].trim()]=o[p].trim(),this.$=xt;break;case 76:this.$="";break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:e,23:r,24:a,26:u,28:i,29:49,30:61,32:62,34:n,36:l,37:s,38:h,39:y,40:f,41:b,43:23,44:v,45:w,46:N,47:O,48:P,49:I,50:W,51:X,52:q,53:H,54:Q,55:K,56:G,57:J,58:Z,59:$,60:tt,61:et,62:nt,63:st,64:rt,65:at,66:it,67:ot,68:lt,69:ct,70:ut,71:ht,72:dt,73:pt,74:ft},{13:70,19:20,20:21,21:22,22:e,23:r,24:a,26:u,28:i,29:49,30:61,32:62,34:n,36:l,37:s,38:h,39:y,40:f,41:b,43:23,44:v,45:w,46:N,47:O,48:P,49:I,50:W,51:X,52:q,53:H,54:Q,55:K,56:G,57:J,58:Z,59:$,60:tt,61:et,62:nt,63:st,64:rt,65:at,66:it,67:ot,68:lt,69:ct,70:ut,71:ht,72:dt,73:pt,74:ft},{13:71,19:20,20:21,21:22,22:e,23:r,24:a,26:u,28:i,29:49,30:61,32:62,34:n,36:l,37:s,38:h,39:y,40:f,41:b,43:23,44:v,45:w,46:N,47:O,48:P,49:I,50:W,51:X,52:q,53:H,54:Q,55:K,56:G,57:J,58:Z,59:$,60:tt,61:et,62:nt,63:st,64:rt,65:at,66:it,67:ot,68:lt,69:ct,70:ut,71:ht,72:dt,73:pt,74:ft},{13:72,19:20,20:21,21:22,22:e,23:r,24:a,26:u,28:i,29:49,30:61,32:62,34:n,36:l,37:s,38:h,39:y,40:f,41:b,43:23,44:v,45:w,46:N,47:O,48:P,49:I,50:W,51:X,52:q,53:H,54:Q,55:K,56:G,57:J,58:Z,59:$,60:tt,61:et,62:nt,63:st,64:rt,65:at,66:it,67:ot,68:lt,69:ct,70:ut,71:ht,72:dt,73:pt,74:ft},{13:73,19:20,20:21,21:22,22:e,23:r,24:a,26:u,28:i,29:49,30:61,32:62,34:n,36:l,37:s,38:h,39:y,40:f,41:b,43:23,44:v,45:w,46:N,47:O,48:P,49:I,50:W,51:X,52:q,53:H,54:Q,55:K,56:G,57:J,58:Z,59:$,60:tt,61:et,62:nt,63:st,64:rt,65:at,66:it,67:ot,68:lt,69:ct,70:ut,71:ht,72:dt,73:pt,74:ft},{14:[1,74]},t(kt,[2,13],{43:23,29:49,30:61,32:62,20:75,34:n,36:l,37:s,38:h,39:y,40:f,41:b,44:v,45:w,46:N,47:O,48:P,49:I,50:W,51:X,52:q,53:H,54:Q,55:K,56:G,57:J,58:Z,59:$,60:tt,61:et,62:nt,63:st,64:rt,65:at,66:it,67:ot,68:lt,69:ct,70:ut,71:ht,72:dt,73:pt,74:ft}),t(kt,[2,14]),t(jt,[2,16],{12:[1,76]}),t(kt,[2,36],{12:[1,77]}),t(Rt,[2,19]),t(Rt,[2,20]),{25:[1,78]},{27:[1,79]},t(Rt,[2,23]),{35:80,75:81,76:S,77:k,79:T,80:C},{35:86,75:81,76:S,77:k,79:T,80:C},{35:87,75:81,76:S,77:k,79:T,80:C},{35:88,75:81,76:S,77:k,79:T,80:C},{35:89,75:81,76:S,77:k,79:T,80:C},{35:90,75:81,76:S,77:k,79:T,80:C},{35:91,75:81,76:S,77:k,79:T,80:C},{35:92,75:81,76:S,77:k,79:T,80:C},{35:93,75:81,76:S,77:k,79:T,80:C},{35:94,75:81,76:S,77:k,79:T,80:C},{35:95,75:81,76:S,77:k,79:T,80:C},{35:96,75:81,76:S,77:k,79:T,80:C},{35:97,75:81,76:S,77:k,79:T,80:C},{35:98,75:81,76:S,77:k,79:T,80:C},{35:99,75:81,76:S,77:k,79:T,80:C},{35:100,75:81,76:S,77:k,79:T,80:C},{35:101,75:81,76:S,77:k,79:T,80:C},{35:102,75:81,76:S,77:k,79:T,80:C},{35:103,75:81,76:S,77:k,79:T,80:C},{35:104,75:81,76:S,77:k,79:T,80:C},t(R,[2,59]),{35:105,75:81,76:S,77:k,79:T,80:C},{35:106,75:81,76:S,77:k,79:T,80:C},{35:107,75:81,76:S,77:k,79:T,80:C},{35:108,75:81,76:S,77:k,79:T,80:C},{35:109,75:81,76:S,77:k,79:T,80:C},{35:110,75:81,76:S,77:k,79:T,80:C},{35:111,75:81,76:S,77:k,79:T,80:C},{35:112,75:81,76:S,77:k,79:T,80:C},{35:113,75:81,76:S,77:k,79:T,80:C},{35:114,75:81,76:S,77:k,79:T,80:C},{35:115,75:81,76:S,77:k,79:T,80:C},{20:116,29:49,30:61,32:62,34:n,36:l,37:s,38:h,39:y,40:f,41:b,43:23,44:v,45:w,46:N,47:O,48:P,49:I,50:W,51:X,52:q,53:H,54:Q,55:K,56:G,57:J,58:Z,59:$,60:tt,61:et,62:nt,63:st,64:rt,65:at,66:it,67:ot,68:lt,69:ct,70:ut,71:ht,72:dt,73:pt,74:ft},{12:[1,118],33:[1,117]},{35:119,75:81,76:S,77:k,79:T,80:C},{35:120,75:81,76:S,77:k,79:T,80:C},{35:121,75:81,76:S,77:k,79:T,80:C},{35:122,75:81,76:S,77:k,79:T,80:C},{35:123,75:81,76:S,77:k,79:T,80:C},{35:124,75:81,76:S,77:k,79:T,80:C},{35:125,75:81,76:S,77:k,79:T,80:C},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},t(kt,[2,15]),t(jt,[2,17],{21:22,19:130,22:e,23:r,24:a,26:u,28:i}),t(kt,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:e,23:r,24:a,26:u,28:i,34:n,36:l,37:s,38:h,39:y,40:f,41:b,44:v,45:w,46:N,47:O,48:P,49:I,50:W,51:X,52:q,53:H,54:Q,55:K,56:G,57:J,58:Z,59:$,60:tt,61:et,62:nt,63:st,64:rt,65:at,66:it,67:ot,68:lt,69:ct,70:ut,71:ht,72:dt,73:pt,74:ft}),t(Rt,[2,21]),t(Rt,[2,22]),t(R,[2,39]),t(re,[2,71],{75:81,35:132,76:S,77:k,79:T,80:C}),t(Lt,[2,73]),{78:[1,133]},t(Lt,[2,75]),t(Lt,[2,76]),t(R,[2,40]),t(R,[2,41]),t(R,[2,42]),t(R,[2,43]),t(R,[2,44]),t(R,[2,45]),t(R,[2,46]),t(R,[2,47]),t(R,[2,48]),t(R,[2,49]),t(R,[2,50]),t(R,[2,51]),t(R,[2,52]),t(R,[2,53]),t(R,[2,54]),t(R,[2,55]),t(R,[2,56]),t(R,[2,57]),t(R,[2,58]),t(R,[2,60]),t(R,[2,61]),t(R,[2,62]),t(R,[2,63]),t(R,[2,64]),t(R,[2,65]),t(R,[2,66]),t(R,[2,67]),t(R,[2,68]),t(R,[2,69]),t(R,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},t(gt,[2,28]),t(gt,[2,29]),t(gt,[2,30]),t(gt,[2,31]),t(gt,[2,32]),t(gt,[2,33]),t(gt,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},t(jt,[2,18]),t(kt,[2,38]),t(re,[2,72]),t(Lt,[2,74]),t(R,[2,24]),t(R,[2,35]),t(zt,[2,25]),t(zt,[2,26],{12:[1,138]}),t(zt,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:d(function(m,x){if(x.recoverable)this.trace(m);else{var E=new Error(m);throw E.hash=x,E}},"parseError"),parse:d(function(m){var x=this,E=[0],_=[],D=[null],o=[],wt=this.table,p="",xt=0,ae=0,we=2,ie=1,Oe=o.slice.call(arguments,1),A=Object.create(this.lexer),vt={yy:{}};for(var Xt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Xt)&&(vt.yy[Xt]=this.yy[Xt]);A.setInput(m,vt.yy),vt.yy.lexer=A,vt.yy.parser=this,typeof A.yylloc>"u"&&(A.yylloc={});var qt=A.yylloc;o.push(qt);var Pe=A.options&&A.options.ranges;typeof vt.yy.parseError=="function"?this.parseError=vt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function De(B){E.length=E.length-2*B,D.length=D.length-B,o.length=o.length-B}d(De,"popStack");function oe(){var B;return B=_.pop()||A.lex()||ie,typeof B!="number"&&(B instanceof Array&&(_=B,B=_.pop()),B=x.symbols_[B]||B),B}d(oe,"lex");for(var M,Et,V,Ht,Tt={},Mt,j,le,Bt;;){if(Et=E[E.length-1],this.defaultActions[Et]?V=this.defaultActions[Et]:((M===null||typeof M>"u")&&(M=oe()),V=wt[Et]&&wt[Et][M]),typeof V>"u"||!V.length||!V[0]){var Qt="";Bt=[];for(Mt in wt[Et])this.terminals_[Mt]&&Mt>we&&Bt.push("'"+this.terminals_[Mt]+"'");A.showPosition?Qt="Parse error on line "+(xt+1)+`:
+import{d as Ne}from"./chunk-F27PBJKO-DtNIaJ4B.js";import{s as Ae,g as Le,a as Ie,b as Me,_ as d,c as Ct,l as ce,d as Be,e as Ve,f as Ot,h as Ye,i as ye,j as Kt,w as Fe,k as Jt,m as ue}from"./mermaid.core-BLsmN-lt.js";import"./index-XmhyfFRf.js";import"./purify.es-5AjVNlXF.js";var Yt=(function(){var t=d(function(yt,m,x,E){for(x=x||{},E=yt.length;E--;x[yt[E]]=m);return x},"o"),e=[1,24],r=[1,25],a=[1,26],u=[1,27],i=[1,28],n=[1,63],l=[1,64],s=[1,65],h=[1,66],y=[1,67],f=[1,68],b=[1,69],v=[1,29],w=[1,30],N=[1,31],O=[1,32],P=[1,33],I=[1,34],W=[1,35],X=[1,36],q=[1,37],H=[1,38],Q=[1,39],K=[1,40],G=[1,41],J=[1,42],Z=[1,43],$=[1,44],tt=[1,45],et=[1,46],nt=[1,47],st=[1,48],rt=[1,50],at=[1,51],it=[1,52],ot=[1,53],lt=[1,54],ct=[1,55],ut=[1,56],ht=[1,57],dt=[1,58],pt=[1,59],ft=[1,60],kt=[14,42],jt=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],Rt=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],S=[1,82],k=[1,83],T=[1,84],C=[1,85],R=[12,14,42],re=[12,14,33,42],Lt=[12,14,33,42,76,77,79,80],gt=[12,33],zt=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],Wt={trace:d(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:"error",6:"direction_tb",7:"direction_bt",8:"direction_rl",9:"direction_lr",11:"C4_CONTEXT",12:"NEWLINE",14:"EOF",15:"C4_CONTAINER",16:"C4_COMPONENT",17:"C4_DYNAMIC",18:"C4_DEPLOYMENT",22:"title",23:"accDescription",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"LBRACE",34:"ENTERPRISE_BOUNDARY",36:"SYSTEM_BOUNDARY",37:"BOUNDARY",38:"CONTAINER_BOUNDARY",39:"NODE",40:"NODE_L",41:"NODE_R",42:"RBRACE",44:"PERSON",45:"PERSON_EXT",46:"SYSTEM",47:"SYSTEM_DB",48:"SYSTEM_QUEUE",49:"SYSTEM_EXT",50:"SYSTEM_EXT_DB",51:"SYSTEM_EXT_QUEUE",52:"CONTAINER",53:"CONTAINER_DB",54:"CONTAINER_QUEUE",55:"CONTAINER_EXT",56:"CONTAINER_EXT_DB",57:"CONTAINER_EXT_QUEUE",58:"COMPONENT",59:"COMPONENT_DB",60:"COMPONENT_QUEUE",61:"COMPONENT_EXT",62:"COMPONENT_EXT_DB",63:"COMPONENT_EXT_QUEUE",64:"REL",65:"BIREL",66:"REL_U",67:"REL_D",68:"REL_L",69:"REL_R",70:"REL_B",71:"REL_INDEX",72:"UPDATE_EL_STYLE",73:"UPDATE_REL_STYLE",74:"UPDATE_LAYOUT_CONFIG",76:"STR",77:"STR_KEY",78:"STR_VALUE",79:"ATTRIBUTE",80:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:d(function(m,x,E,_,D,o,wt){var p=o.length-1;switch(D){case 3:_.setDirection("TB");break;case 4:_.setDirection("BT");break;case 5:_.setDirection("RL");break;case 6:_.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:_.setC4Type(o[p-3]);break;case 19:_.setTitle(o[p].substring(6)),this.$=o[p].substring(6);break;case 20:_.setAccDescription(o[p].substring(15)),this.$=o[p].substring(15);break;case 21:this.$=o[p].trim(),_.setTitle(this.$);break;case 22:case 23:this.$=o[p].trim(),_.setAccDescription(this.$);break;case 28:o[p].splice(2,0,"ENTERPRISE"),_.addPersonOrSystemBoundary(...o[p]),this.$=o[p];break;case 29:o[p].splice(2,0,"SYSTEM"),_.addPersonOrSystemBoundary(...o[p]),this.$=o[p];break;case 30:_.addPersonOrSystemBoundary(...o[p]),this.$=o[p];break;case 31:o[p].splice(2,0,"CONTAINER"),_.addContainerBoundary(...o[p]),this.$=o[p];break;case 32:_.addDeploymentNode("node",...o[p]),this.$=o[p];break;case 33:_.addDeploymentNode("nodeL",...o[p]),this.$=o[p];break;case 34:_.addDeploymentNode("nodeR",...o[p]),this.$=o[p];break;case 35:_.popBoundaryParseStack();break;case 39:_.addPersonOrSystem("person",...o[p]),this.$=o[p];break;case 40:_.addPersonOrSystem("external_person",...o[p]),this.$=o[p];break;case 41:_.addPersonOrSystem("system",...o[p]),this.$=o[p];break;case 42:_.addPersonOrSystem("system_db",...o[p]),this.$=o[p];break;case 43:_.addPersonOrSystem("system_queue",...o[p]),this.$=o[p];break;case 44:_.addPersonOrSystem("external_system",...o[p]),this.$=o[p];break;case 45:_.addPersonOrSystem("external_system_db",...o[p]),this.$=o[p];break;case 46:_.addPersonOrSystem("external_system_queue",...o[p]),this.$=o[p];break;case 47:_.addContainer("container",...o[p]),this.$=o[p];break;case 48:_.addContainer("container_db",...o[p]),this.$=o[p];break;case 49:_.addContainer("container_queue",...o[p]),this.$=o[p];break;case 50:_.addContainer("external_container",...o[p]),this.$=o[p];break;case 51:_.addContainer("external_container_db",...o[p]),this.$=o[p];break;case 52:_.addContainer("external_container_queue",...o[p]),this.$=o[p];break;case 53:_.addComponent("component",...o[p]),this.$=o[p];break;case 54:_.addComponent("component_db",...o[p]),this.$=o[p];break;case 55:_.addComponent("component_queue",...o[p]),this.$=o[p];break;case 56:_.addComponent("external_component",...o[p]),this.$=o[p];break;case 57:_.addComponent("external_component_db",...o[p]),this.$=o[p];break;case 58:_.addComponent("external_component_queue",...o[p]),this.$=o[p];break;case 60:_.addRel("rel",...o[p]),this.$=o[p];break;case 61:_.addRel("birel",...o[p]),this.$=o[p];break;case 62:_.addRel("rel_u",...o[p]),this.$=o[p];break;case 63:_.addRel("rel_d",...o[p]),this.$=o[p];break;case 64:_.addRel("rel_l",...o[p]),this.$=o[p];break;case 65:_.addRel("rel_r",...o[p]),this.$=o[p];break;case 66:_.addRel("rel_b",...o[p]),this.$=o[p];break;case 67:o[p].splice(0,1),_.addRel("rel",...o[p]),this.$=o[p];break;case 68:_.updateElStyle("update_el_style",...o[p]),this.$=o[p];break;case 69:_.updateRelStyle("update_rel_style",...o[p]),this.$=o[p];break;case 70:_.updateLayoutConfig("update_layout_config",...o[p]),this.$=o[p];break;case 71:this.$=[o[p]];break;case 72:o[p].unshift(o[p-1]),this.$=o[p];break;case 73:case 75:this.$=o[p].trim();break;case 74:let xt={};xt[o[p-1].trim()]=o[p].trim(),this.$=xt;break;case 76:this.$="";break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:e,23:r,24:a,26:u,28:i,29:49,30:61,32:62,34:n,36:l,37:s,38:h,39:y,40:f,41:b,43:23,44:v,45:w,46:N,47:O,48:P,49:I,50:W,51:X,52:q,53:H,54:Q,55:K,56:G,57:J,58:Z,59:$,60:tt,61:et,62:nt,63:st,64:rt,65:at,66:it,67:ot,68:lt,69:ct,70:ut,71:ht,72:dt,73:pt,74:ft},{13:70,19:20,20:21,21:22,22:e,23:r,24:a,26:u,28:i,29:49,30:61,32:62,34:n,36:l,37:s,38:h,39:y,40:f,41:b,43:23,44:v,45:w,46:N,47:O,48:P,49:I,50:W,51:X,52:q,53:H,54:Q,55:K,56:G,57:J,58:Z,59:$,60:tt,61:et,62:nt,63:st,64:rt,65:at,66:it,67:ot,68:lt,69:ct,70:ut,71:ht,72:dt,73:pt,74:ft},{13:71,19:20,20:21,21:22,22:e,23:r,24:a,26:u,28:i,29:49,30:61,32:62,34:n,36:l,37:s,38:h,39:y,40:f,41:b,43:23,44:v,45:w,46:N,47:O,48:P,49:I,50:W,51:X,52:q,53:H,54:Q,55:K,56:G,57:J,58:Z,59:$,60:tt,61:et,62:nt,63:st,64:rt,65:at,66:it,67:ot,68:lt,69:ct,70:ut,71:ht,72:dt,73:pt,74:ft},{13:72,19:20,20:21,21:22,22:e,23:r,24:a,26:u,28:i,29:49,30:61,32:62,34:n,36:l,37:s,38:h,39:y,40:f,41:b,43:23,44:v,45:w,46:N,47:O,48:P,49:I,50:W,51:X,52:q,53:H,54:Q,55:K,56:G,57:J,58:Z,59:$,60:tt,61:et,62:nt,63:st,64:rt,65:at,66:it,67:ot,68:lt,69:ct,70:ut,71:ht,72:dt,73:pt,74:ft},{13:73,19:20,20:21,21:22,22:e,23:r,24:a,26:u,28:i,29:49,30:61,32:62,34:n,36:l,37:s,38:h,39:y,40:f,41:b,43:23,44:v,45:w,46:N,47:O,48:P,49:I,50:W,51:X,52:q,53:H,54:Q,55:K,56:G,57:J,58:Z,59:$,60:tt,61:et,62:nt,63:st,64:rt,65:at,66:it,67:ot,68:lt,69:ct,70:ut,71:ht,72:dt,73:pt,74:ft},{14:[1,74]},t(kt,[2,13],{43:23,29:49,30:61,32:62,20:75,34:n,36:l,37:s,38:h,39:y,40:f,41:b,44:v,45:w,46:N,47:O,48:P,49:I,50:W,51:X,52:q,53:H,54:Q,55:K,56:G,57:J,58:Z,59:$,60:tt,61:et,62:nt,63:st,64:rt,65:at,66:it,67:ot,68:lt,69:ct,70:ut,71:ht,72:dt,73:pt,74:ft}),t(kt,[2,14]),t(jt,[2,16],{12:[1,76]}),t(kt,[2,36],{12:[1,77]}),t(Rt,[2,19]),t(Rt,[2,20]),{25:[1,78]},{27:[1,79]},t(Rt,[2,23]),{35:80,75:81,76:S,77:k,79:T,80:C},{35:86,75:81,76:S,77:k,79:T,80:C},{35:87,75:81,76:S,77:k,79:T,80:C},{35:88,75:81,76:S,77:k,79:T,80:C},{35:89,75:81,76:S,77:k,79:T,80:C},{35:90,75:81,76:S,77:k,79:T,80:C},{35:91,75:81,76:S,77:k,79:T,80:C},{35:92,75:81,76:S,77:k,79:T,80:C},{35:93,75:81,76:S,77:k,79:T,80:C},{35:94,75:81,76:S,77:k,79:T,80:C},{35:95,75:81,76:S,77:k,79:T,80:C},{35:96,75:81,76:S,77:k,79:T,80:C},{35:97,75:81,76:S,77:k,79:T,80:C},{35:98,75:81,76:S,77:k,79:T,80:C},{35:99,75:81,76:S,77:k,79:T,80:C},{35:100,75:81,76:S,77:k,79:T,80:C},{35:101,75:81,76:S,77:k,79:T,80:C},{35:102,75:81,76:S,77:k,79:T,80:C},{35:103,75:81,76:S,77:k,79:T,80:C},{35:104,75:81,76:S,77:k,79:T,80:C},t(R,[2,59]),{35:105,75:81,76:S,77:k,79:T,80:C},{35:106,75:81,76:S,77:k,79:T,80:C},{35:107,75:81,76:S,77:k,79:T,80:C},{35:108,75:81,76:S,77:k,79:T,80:C},{35:109,75:81,76:S,77:k,79:T,80:C},{35:110,75:81,76:S,77:k,79:T,80:C},{35:111,75:81,76:S,77:k,79:T,80:C},{35:112,75:81,76:S,77:k,79:T,80:C},{35:113,75:81,76:S,77:k,79:T,80:C},{35:114,75:81,76:S,77:k,79:T,80:C},{35:115,75:81,76:S,77:k,79:T,80:C},{20:116,29:49,30:61,32:62,34:n,36:l,37:s,38:h,39:y,40:f,41:b,43:23,44:v,45:w,46:N,47:O,48:P,49:I,50:W,51:X,52:q,53:H,54:Q,55:K,56:G,57:J,58:Z,59:$,60:tt,61:et,62:nt,63:st,64:rt,65:at,66:it,67:ot,68:lt,69:ct,70:ut,71:ht,72:dt,73:pt,74:ft},{12:[1,118],33:[1,117]},{35:119,75:81,76:S,77:k,79:T,80:C},{35:120,75:81,76:S,77:k,79:T,80:C},{35:121,75:81,76:S,77:k,79:T,80:C},{35:122,75:81,76:S,77:k,79:T,80:C},{35:123,75:81,76:S,77:k,79:T,80:C},{35:124,75:81,76:S,77:k,79:T,80:C},{35:125,75:81,76:S,77:k,79:T,80:C},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},t(kt,[2,15]),t(jt,[2,17],{21:22,19:130,22:e,23:r,24:a,26:u,28:i}),t(kt,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:e,23:r,24:a,26:u,28:i,34:n,36:l,37:s,38:h,39:y,40:f,41:b,44:v,45:w,46:N,47:O,48:P,49:I,50:W,51:X,52:q,53:H,54:Q,55:K,56:G,57:J,58:Z,59:$,60:tt,61:et,62:nt,63:st,64:rt,65:at,66:it,67:ot,68:lt,69:ct,70:ut,71:ht,72:dt,73:pt,74:ft}),t(Rt,[2,21]),t(Rt,[2,22]),t(R,[2,39]),t(re,[2,71],{75:81,35:132,76:S,77:k,79:T,80:C}),t(Lt,[2,73]),{78:[1,133]},t(Lt,[2,75]),t(Lt,[2,76]),t(R,[2,40]),t(R,[2,41]),t(R,[2,42]),t(R,[2,43]),t(R,[2,44]),t(R,[2,45]),t(R,[2,46]),t(R,[2,47]),t(R,[2,48]),t(R,[2,49]),t(R,[2,50]),t(R,[2,51]),t(R,[2,52]),t(R,[2,53]),t(R,[2,54]),t(R,[2,55]),t(R,[2,56]),t(R,[2,57]),t(R,[2,58]),t(R,[2,60]),t(R,[2,61]),t(R,[2,62]),t(R,[2,63]),t(R,[2,64]),t(R,[2,65]),t(R,[2,66]),t(R,[2,67]),t(R,[2,68]),t(R,[2,69]),t(R,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},t(gt,[2,28]),t(gt,[2,29]),t(gt,[2,30]),t(gt,[2,31]),t(gt,[2,32]),t(gt,[2,33]),t(gt,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},t(jt,[2,18]),t(kt,[2,38]),t(re,[2,72]),t(Lt,[2,74]),t(R,[2,24]),t(R,[2,35]),t(zt,[2,25]),t(zt,[2,26],{12:[1,138]}),t(zt,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:d(function(m,x){if(x.recoverable)this.trace(m);else{var E=new Error(m);throw E.hash=x,E}},"parseError"),parse:d(function(m){var x=this,E=[0],_=[],D=[null],o=[],wt=this.table,p="",xt=0,ae=0,we=2,ie=1,Oe=o.slice.call(arguments,1),A=Object.create(this.lexer),vt={yy:{}};for(var Xt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Xt)&&(vt.yy[Xt]=this.yy[Xt]);A.setInput(m,vt.yy),vt.yy.lexer=A,vt.yy.parser=this,typeof A.yylloc>"u"&&(A.yylloc={});var qt=A.yylloc;o.push(qt);var Pe=A.options&&A.options.ranges;typeof vt.yy.parseError=="function"?this.parseError=vt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function De(B){E.length=E.length-2*B,D.length=D.length-B,o.length=o.length-B}d(De,"popStack");function oe(){var B;return B=_.pop()||A.lex()||ie,typeof B!="number"&&(B instanceof Array&&(_=B,B=_.pop()),B=x.symbols_[B]||B),B}d(oe,"lex");for(var M,Et,V,Ht,Tt={},Mt,j,le,Bt;;){if(Et=E[E.length-1],this.defaultActions[Et]?V=this.defaultActions[Et]:((M===null||typeof M>"u")&&(M=oe()),V=wt[Et]&&wt[Et][M]),typeof V>"u"||!V.length||!V[0]){var Qt="";Bt=[];for(Mt in wt[Et])this.terminals_[Mt]&&Mt>we&&Bt.push("'"+this.terminals_[Mt]+"'");A.showPosition?Qt="Parse error on line "+(xt+1)+`:
 `+A.showPosition()+`
 Expecting `+Bt.join(", ")+", got '"+(this.terminals_[M]||M)+"'":Qt="Parse error on line "+(xt+1)+": Unexpected "+(M==ie?"end of input":"'"+(this.terminals_[M]||M)+"'"),this.parseError(Qt,{text:A.match,token:this.terminals_[M]||M,line:A.yylineno,loc:qt,expected:Bt})}if(V[0]instanceof Array&&V.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Et+", token: "+M);switch(V[0]){case 1:E.push(M),D.push(A.yytext),o.push(A.yylloc),E.push(V[1]),M=null,ae=A.yyleng,p=A.yytext,xt=A.yylineno,qt=A.yylloc;break;case 2:if(j=this.productions_[V[1]][1],Tt.$=D[D.length-j],Tt._$={first_line:o[o.length-(j||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(j||1)].first_column,last_column:o[o.length-1].last_column},Pe&&(Tt._$.range=[o[o.length-(j||1)].range[0],o[o.length-1].range[1]]),Ht=this.performAction.apply(Tt,[p,ae,xt,vt.yy,V[1],D,o].concat(Oe)),typeof Ht<"u")return Ht;j&&(E=E.slice(0,-1*j*2),D=D.slice(0,-1*j),o=o.slice(0,-1*j)),E.push(this.productions_[V[1]][0]),D.push(Tt.$),o.push(Tt._$),le=wt[E[E.length-2]][E[E.length-1]],E.push(le);break;case 3:return!0}}return!0},"parse")},Re=(function(){var yt={EOF:1,parseError:d(function(x,E){if(this.yy.parser)this.yy.parser.parseError(x,E);else throw new Error(x)},"parseError"),setInput:d(function(m,x){return this.yy=x||this.yy||{},this._input=m,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:d(function(){var m=this._input[0];this.yytext+=m,this.yyleng++,this.offset++,this.match+=m,this.matched+=m;var x=m.match(/(?:\r\n?|\n).*/g);return x?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),m},"input"),unput:d(function(m){var x=m.length,E=m.split(/(?:\r\n?|\n)/g);this._input=m+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-x),this.offset-=x;var _=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),E.length-1&&(this.yylineno-=E.length-1);var D=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:E?(E.length===_.length?this.yylloc.first_column:0)+_[_.length-E.length].length-E[0].length:this.yylloc.first_column-x},this.options.ranges&&(this.yylloc.range=[D[0],D[0]+this.yyleng-x]),this.yyleng=this.yytext.length,this},"unput"),more:d(function(){return this._more=!0,this},"more"),reject:d(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
 `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:d(function(m){this.unput(this.match.slice(m))},"less"),pastInput:d(function(){var m=this.matched.substr(0,this.matched.length-this.match.length);return(m.length>20?"...":"")+m.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:d(function(){var m=this.match;return m.length<20&&(m+=this._input.substr(0,20-m.length)),(m.substr(0,20)+(m.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:d(function(){var m=this.pastInput(),x=new Array(m.length+1).join("-");return m+this.upcomingInput()+`
diff --git a/apps/pythinker-code/dist-web/assets/channel-Bm0H2vxn.js b/apps/pythinker-code/dist-web/assets/channel-Bm0H2vxn.js
new file mode 100644
index 000000000..507356022
--- /dev/null
+++ b/apps/pythinker-code/dist-web/assets/channel-Bm0H2vxn.js
@@ -0,0 +1 @@
+import{U as a,C as n}from"./mermaid.core-BLsmN-lt.js";const t=(r,o)=>a.lang.round(n.parse(r)[o]);export{t as c};
diff --git a/apps/pythinker-code/dist-web/assets/channel-CRmZXxAS.js b/apps/pythinker-code/dist-web/assets/channel-CRmZXxAS.js
deleted file mode 100644
index 284d1707f..000000000
--- a/apps/pythinker-code/dist-web/assets/channel-CRmZXxAS.js
+++ /dev/null
@@ -1 +0,0 @@
-import{U as a,C as n}from"./mermaid.core-D6Xg32pF.js";const t=(r,o)=>a.lang.round(n.parse(r)[o]);export{t as c};
diff --git a/apps/pythinker-code/dist-web/assets/chunk-2Q5K7J3B-DcbCvFbW.js b/apps/pythinker-code/dist-web/assets/chunk-2Q5K7J3B-C5dXVEvr.js
similarity index 67%
rename from apps/pythinker-code/dist-web/assets/chunk-2Q5K7J3B-DcbCvFbW.js
rename to apps/pythinker-code/dist-web/assets/chunk-2Q5K7J3B-C5dXVEvr.js
index bff3830ba..edd8d0f91 100644
--- a/apps/pythinker-code/dist-web/assets/chunk-2Q5K7J3B-DcbCvFbW.js
+++ b/apps/pythinker-code/dist-web/assets/chunk-2Q5K7J3B-C5dXVEvr.js
@@ -1 +1 @@
-import{_ as i}from"./mermaid.core-D6Xg32pF.js";var r=class{constructor(t){this.init=t,this.records=this.init()}static{i(this,"ImperativeState")}reset(){this.records=this.init()}};export{r as I};
+import{_ as i}from"./mermaid.core-BLsmN-lt.js";var r=class{constructor(t){this.init=t,this.records=this.init()}static{i(this,"ImperativeState")}reset(){this.records=this.init()}};export{r as I};
diff --git a/apps/pythinker-code/dist-web/assets/chunk-5VM5RSS4-baBluNR7.js b/apps/pythinker-code/dist-web/assets/chunk-5VM5RSS4-D8DHuAth.js
similarity index 83%
rename from apps/pythinker-code/dist-web/assets/chunk-5VM5RSS4-baBluNR7.js
rename to apps/pythinker-code/dist-web/assets/chunk-5VM5RSS4-D8DHuAth.js
index ff7649b46..33525875e 100644
--- a/apps/pythinker-code/dist-web/assets/chunk-5VM5RSS4-baBluNR7.js
+++ b/apps/pythinker-code/dist-web/assets/chunk-5VM5RSS4-D8DHuAth.js
@@ -1,4 +1,4 @@
-import{_ as e}from"./mermaid.core-D6Xg32pF.js";var l=e(()=>`
+import{_ as e}from"./mermaid.core-BLsmN-lt.js";var l=e(()=>`
   /* Font Awesome icon styling - consolidated */
   .label-icon {
     display: inline-block;
diff --git a/apps/pythinker-code/dist-web/assets/chunk-F27PBJKO-B_4WdsPc.js b/apps/pythinker-code/dist-web/assets/chunk-F27PBJKO-DtNIaJ4B.js
similarity index 96%
rename from apps/pythinker-code/dist-web/assets/chunk-F27PBJKO-B_4WdsPc.js
rename to apps/pythinker-code/dist-web/assets/chunk-F27PBJKO-DtNIaJ4B.js
index 605d4df83..b0f25cb16 100644
--- a/apps/pythinker-code/dist-web/assets/chunk-F27PBJKO-B_4WdsPc.js
+++ b/apps/pythinker-code/dist-web/assets/chunk-F27PBJKO-DtNIaJ4B.js
@@ -1 +1 @@
-import{_ as i,j as l,n as d,o}from"./mermaid.core-D6Xg32pF.js";var x=i((r,t)=>{const e=r.append("rect");if(e.attr("x",t.x),e.attr("y",t.y),e.attr("fill",t.fill),e.attr("stroke",t.stroke),e.attr("width",t.width),e.attr("height",t.height),t.name&&e.attr("name",t.name),t.rx&&e.attr("rx",t.rx),t.ry&&e.attr("ry",t.ry),t.attrs!==void 0)for(const s in t.attrs)e.attr(s,t.attrs[s]);return t.class&&e.attr("class",t.class),e},"drawRect"),p=i((r,t)=>{const e={x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,stroke:t.stroke,class:"rect"};x(r,e).lower()},"drawBackgroundRect"),y=i((r,t)=>{const e=t.text.replace(d," "),s=r.append("text");s.attr("x",t.x),s.attr("y",t.y),s.attr("class","legend"),s.style("text-anchor",t.anchor),t.class&&s.attr("class",t.class);const a=s.append("tspan");return a.attr("x",t.x+t.textMargin*2),a.text(e),s},"drawText"),m=i((r,t,e,s)=>{const a=r.append("image");a.attr("x",t),a.attr("y",e);const n=o.sanitizeUrl(s);a.attr("xlink:href",n)},"drawImage"),g=i((r,t,e,s)=>{const a=r.append("use");a.attr("x",t),a.attr("y",e);const n=o.sanitizeUrl(s);a.attr("xlink:href",`#${n}`)},"drawEmbeddedImage"),h=i(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),f=i(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),w=i(()=>{let r=l(".mermaidTooltip");return r.empty()&&(r=l("body").append("div").attr("class","mermaidTooltip").style("opacity",0).style("position","absolute").style("text-align","center").style("max-width","200px").style("padding","2px").style("font-size","12px").style("background","#ffffde").style("border","1px solid #333").style("border-radius","2px").style("pointer-events","none").style("z-index","100")),r},"createTooltip");export{p as a,h as b,g as c,x as d,m as e,w as f,f as g,y as h};
+import{_ as i,j as l,n as d,o}from"./mermaid.core-BLsmN-lt.js";var x=i((r,t)=>{const e=r.append("rect");if(e.attr("x",t.x),e.attr("y",t.y),e.attr("fill",t.fill),e.attr("stroke",t.stroke),e.attr("width",t.width),e.attr("height",t.height),t.name&&e.attr("name",t.name),t.rx&&e.attr("rx",t.rx),t.ry&&e.attr("ry",t.ry),t.attrs!==void 0)for(const s in t.attrs)e.attr(s,t.attrs[s]);return t.class&&e.attr("class",t.class),e},"drawRect"),p=i((r,t)=>{const e={x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,stroke:t.stroke,class:"rect"};x(r,e).lower()},"drawBackgroundRect"),y=i((r,t)=>{const e=t.text.replace(d," "),s=r.append("text");s.attr("x",t.x),s.attr("y",t.y),s.attr("class","legend"),s.style("text-anchor",t.anchor),t.class&&s.attr("class",t.class);const a=s.append("tspan");return a.attr("x",t.x+t.textMargin*2),a.text(e),s},"drawText"),m=i((r,t,e,s)=>{const a=r.append("image");a.attr("x",t),a.attr("y",e);const n=o.sanitizeUrl(s);a.attr("xlink:href",n)},"drawImage"),g=i((r,t,e,s)=>{const a=r.append("use");a.attr("x",t),a.attr("y",e);const n=o.sanitizeUrl(s);a.attr("xlink:href",`#${n}`)},"drawEmbeddedImage"),h=i(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),f=i(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),w=i(()=>{let r=l(".mermaidTooltip");return r.empty()&&(r=l("body").append("div").attr("class","mermaidTooltip").style("opacity",0).style("position","absolute").style("text-align","center").style("max-width","200px").style("padding","2px").style("font-size","12px").style("background","#ffffde").style("border","1px solid #333").style("border-radius","2px").style("pointer-events","none").style("z-index","100")),r},"createTooltip");export{p as a,h as b,g as c,x as d,m as e,w as f,f as g,y as h};
diff --git a/apps/pythinker-code/dist-web/assets/chunk-G27WJ6UU-CmxioZig.js b/apps/pythinker-code/dist-web/assets/chunk-G27WJ6UU-BwLLeOOr.js
similarity index 99%
rename from apps/pythinker-code/dist-web/assets/chunk-G27WJ6UU-CmxioZig.js
rename to apps/pythinker-code/dist-web/assets/chunk-G27WJ6UU-BwLLeOOr.js
index 9fe02707d..65aee4c86 100644
--- a/apps/pythinker-code/dist-web/assets/chunk-G27WJ6UU-CmxioZig.js
+++ b/apps/pythinker-code/dist-web/assets/chunk-G27WJ6UU-BwLLeOOr.js
@@ -1,4 +1,4 @@
-import{g as te}from"./chunk-XXDRQBXY-BOyQwG-7.js";import{s as ee}from"./chunk-POPQ4Y6H-Tp7S0w--.js";import{_ as f,l as _,c as $,y as se,z as ie,a as re,b as ae,g as ne,s as oe,p as le,q as ce,aa as he,k as j,r as ue,j as bt}from"./mermaid.core-D6Xg32pF.js";import{f as de}from"./chunk-F27PBJKO-B_4WdsPc.js";import{p as fe}from"./purify.es-5AjVNlXF.js";var vt=(function(){var t=f(function(V,a,u,r){for(u=u||{},r=V.length;r--;u[V[r]]=a);return u},"o"),e=[1,2],o=[1,3],s=[1,4],c=[2,4],h=[1,9],p=[1,11],y=[1,16],n=[1,17],T=[1,18],m=[1,19],N=[1,33],x=[1,20],k=[1,21],d=[1,22],L=[1,23],R=[1,24],v=[1,26],F=[1,27],C=[1,28],P=[1,29],I=[1,30],H=[1,31],it=[1,32],rt=[1,35],at=[1,36],nt=[1,37],ot=[1,38],z=[1,34],S=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],lt=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],xt=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],yt={trace:f(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"-->":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,CLICK:38,STRING:39,HREF:40,classDef:41,CLASSDEF_ID:42,CLASSDEF_STYLEOPTS:43,DEFAULT:44,style:45,STYLE_IDS:46,STYLEDEF_STYLEOPTS:47,class:48,CLASSENTITY_IDS:49,STYLECLASS:50,direction_tb:51,direction_bt:52,direction_rl:53,direction_lr:54,eol:55,";":56,EDGE_STATE:57,STYLE_SEPARATOR:58,left_of:59,right_of:60,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"-->",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"CLICK",39:"STRING",40:"HREF",41:"classDef",42:"CLASSDEF_ID",43:"CLASSDEF_STYLEOPTS",44:"DEFAULT",45:"style",46:"STYLE_IDS",47:"STYLEDEF_STYLEOPTS",48:"class",49:"CLASSENTITY_IDS",50:"STYLECLASS",51:"direction_tb",52:"direction_bt",53:"direction_rl",54:"direction_lr",56:";",57:"EDGE_STATE",58:"STYLE_SEPARATOR",59:"left_of",60:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[9,5],[9,5],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[55,1],[55,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:f(function(a,u,r,g,E,i,B){var l=i.length-1;switch(E){case 3:return g.setRootDoc(i[l]),i[l];case 4:this.$=[];break;case 5:i[l]!="nl"&&(i[l-1].push(i[l]),this.$=i[l-1]);break;case 6:case 7:this.$=i[l];break;case 8:this.$="nl";break;case 12:this.$=i[l];break;case 13:const Q=i[l-1];Q.description=g.trimColon(i[l]),this.$=Q;break;case 14:this.$={stmt:"relation",state1:i[l-2],state2:i[l]};break;case 15:const gt=g.trimColon(i[l]);this.$={stmt:"relation",state1:i[l-3],state2:i[l-1],description:gt};break;case 19:this.$={stmt:"state",id:i[l-3],type:"default",description:"",doc:i[l-1]};break;case 20:var Y=i[l],K=i[l-2].trim();if(i[l].match(":")){var ht=i[l].split(":");Y=ht[0],K=[K,ht[1]]}this.$={stmt:"state",id:Y,type:"default",description:K};break;case 21:this.$={stmt:"state",id:i[l-3],type:"default",description:i[l-5],doc:i[l-1]};break;case 22:this.$={stmt:"state",id:i[l],type:"fork"};break;case 23:this.$={stmt:"state",id:i[l],type:"join"};break;case 24:this.$={stmt:"state",id:i[l],type:"choice"};break;case 25:this.$={stmt:"state",id:g.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:i[l-1].trim(),note:{position:i[l-2].trim(),text:i[l].trim()}};break;case 29:this.$=i[l].trim(),g.setAccTitle(this.$);break;case 30:case 31:this.$=i[l].trim(),g.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:i[l-3],url:i[l-2],tooltip:i[l-1]};break;case 33:this.$={stmt:"click",id:i[l-3],url:i[l-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:i[l-1].trim(),classes:i[l].trim()};break;case 36:this.$={stmt:"style",id:i[l-1].trim(),styleClass:i[l].trim()};break;case 37:this.$={stmt:"applyClass",id:i[l-1].trim(),styleClass:i[l].trim()};break;case 38:g.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:g.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:g.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:g.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:i[l].trim(),type:"default",description:""};break;case 46:this.$={stmt:"state",id:i[l-2].trim(),classes:[i[l].trim()],type:"default",description:""};break;case 47:this.$={stmt:"state",id:i[l-2].trim(),classes:[i[l].trim()],type:"default",description:""};break}},"anonymous"),table:[{3:1,4:e,5:o,6:s},{1:[3]},{3:5,4:e,5:o,6:s},{3:6,4:e,5:o,6:s},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],c,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:h,5:p,8:8,9:10,10:12,11:13,12:14,13:15,16:y,17:n,19:T,22:m,24:N,25:x,26:k,27:d,28:L,29:R,32:25,33:v,35:F,37:C,38:P,41:I,45:H,48:it,51:rt,52:at,53:nt,54:ot,57:z},t(S,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:y,17:n,19:T,22:m,24:N,25:x,26:k,27:d,28:L,29:R,32:25,33:v,35:F,37:C,38:P,41:I,45:H,48:it,51:rt,52:at,53:nt,54:ot,57:z},t(S,[2,7]),t(S,[2,8]),t(S,[2,9]),t(S,[2,10]),t(S,[2,11]),t(S,[2,12],{14:[1,40],15:[1,41]}),t(S,[2,16]),{18:[1,42]},t(S,[2,18],{20:[1,43]}),{23:[1,44]},t(S,[2,22]),t(S,[2,23]),t(S,[2,24]),t(S,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},t(S,[2,28]),{34:[1,49]},{36:[1,50]},t(S,[2,31]),{13:51,24:N,57:z},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},t(lt,[2,44],{58:[1,56]}),t(lt,[2,45],{58:[1,57]}),t(S,[2,38]),t(S,[2,39]),t(S,[2,40]),t(S,[2,41]),t(S,[2,6]),t(S,[2,13]),{13:58,24:N,57:z},t(S,[2,17]),t(xt,c,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},t(S,[2,29]),t(S,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},t(S,[2,14],{14:[1,71]}),{4:h,5:p,8:8,9:10,10:12,11:13,12:14,13:15,16:y,17:n,19:T,21:[1,72],22:m,24:N,25:x,26:k,27:d,28:L,29:R,32:25,33:v,35:F,37:C,38:P,41:I,45:H,48:it,51:rt,52:at,53:nt,54:ot,57:z},t(S,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},t(S,[2,34]),t(S,[2,35]),t(S,[2,36]),t(S,[2,37]),t(lt,[2,46]),t(lt,[2,47]),t(S,[2,15]),t(S,[2,19]),t(xt,c,{7:78}),t(S,[2,26]),t(S,[2,27]),{5:[1,79]},{5:[1,80]},{4:h,5:p,8:8,9:10,10:12,11:13,12:14,13:15,16:y,17:n,19:T,21:[1,81],22:m,24:N,25:x,26:k,27:d,28:L,29:R,32:25,33:v,35:F,37:C,38:P,41:I,45:H,48:it,51:rt,52:at,53:nt,54:ot,57:z},t(S,[2,32]),t(S,[2,33]),t(S,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:f(function(a,u){if(u.recoverable)this.trace(a);else{var r=new Error(a);throw r.hash=u,r}},"parseError"),parse:f(function(a){var u=this,r=[0],g=[],E=[null],i=[],B=this.table,l="",Y=0,K=0,ht=2,Q=1,gt=i.slice.call(arguments,1),b=Object.create(this.lexer),U={yy:{}};for(var Tt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Tt)&&(U.yy[Tt]=this.yy[Tt]);b.setInput(a,U.yy),U.yy.lexer=b,U.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var Et=b.yylloc;i.push(Et);var Qt=b.options&&b.options.ranges;typeof U.yy.parseError=="function"?this.parseError=U.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Zt(w){r.length=r.length-2*w,E.length=E.length-w,i.length=i.length-w}f(Zt,"popStack");function Lt(){var w;return w=g.pop()||b.lex()||Q,typeof w!="number"&&(w instanceof Array&&(g=w,w=g.pop()),w=u.symbols_[w]||w),w}f(Lt,"lex");for(var A,W,O,_t,X={},ut,G,It,dt;;){if(W=r[r.length-1],this.defaultActions[W]?O=this.defaultActions[W]:((A===null||typeof A>"u")&&(A=Lt()),O=B[W]&&B[W][A]),typeof O>"u"||!O.length||!O[0]){var mt="";dt=[];for(ut in B[W])this.terminals_[ut]&&ut>ht&&dt.push("'"+this.terminals_[ut]+"'");b.showPosition?mt="Parse error on line "+(Y+1)+`:
+import{g as te}from"./chunk-XXDRQBXY-Pj2mkOow.js";import{s as ee}from"./chunk-POPQ4Y6H-B7iG5qn5.js";import{_ as f,l as _,c as $,y as se,z as ie,a as re,b as ae,g as ne,s as oe,p as le,q as ce,aa as he,k as j,r as ue,j as bt}from"./mermaid.core-BLsmN-lt.js";import{f as de}from"./chunk-F27PBJKO-DtNIaJ4B.js";import{p as fe}from"./purify.es-5AjVNlXF.js";var vt=(function(){var t=f(function(V,a,u,r){for(u=u||{},r=V.length;r--;u[V[r]]=a);return u},"o"),e=[1,2],o=[1,3],s=[1,4],c=[2,4],h=[1,9],p=[1,11],y=[1,16],n=[1,17],T=[1,18],m=[1,19],N=[1,33],x=[1,20],k=[1,21],d=[1,22],L=[1,23],R=[1,24],v=[1,26],F=[1,27],C=[1,28],P=[1,29],I=[1,30],H=[1,31],it=[1,32],rt=[1,35],at=[1,36],nt=[1,37],ot=[1,38],z=[1,34],S=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],lt=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],xt=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],yt={trace:f(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"-->":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,CLICK:38,STRING:39,HREF:40,classDef:41,CLASSDEF_ID:42,CLASSDEF_STYLEOPTS:43,DEFAULT:44,style:45,STYLE_IDS:46,STYLEDEF_STYLEOPTS:47,class:48,CLASSENTITY_IDS:49,STYLECLASS:50,direction_tb:51,direction_bt:52,direction_rl:53,direction_lr:54,eol:55,";":56,EDGE_STATE:57,STYLE_SEPARATOR:58,left_of:59,right_of:60,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"-->",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"CLICK",39:"STRING",40:"HREF",41:"classDef",42:"CLASSDEF_ID",43:"CLASSDEF_STYLEOPTS",44:"DEFAULT",45:"style",46:"STYLE_IDS",47:"STYLEDEF_STYLEOPTS",48:"class",49:"CLASSENTITY_IDS",50:"STYLECLASS",51:"direction_tb",52:"direction_bt",53:"direction_rl",54:"direction_lr",56:";",57:"EDGE_STATE",58:"STYLE_SEPARATOR",59:"left_of",60:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[9,5],[9,5],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[55,1],[55,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:f(function(a,u,r,g,E,i,B){var l=i.length-1;switch(E){case 3:return g.setRootDoc(i[l]),i[l];case 4:this.$=[];break;case 5:i[l]!="nl"&&(i[l-1].push(i[l]),this.$=i[l-1]);break;case 6:case 7:this.$=i[l];break;case 8:this.$="nl";break;case 12:this.$=i[l];break;case 13:const Q=i[l-1];Q.description=g.trimColon(i[l]),this.$=Q;break;case 14:this.$={stmt:"relation",state1:i[l-2],state2:i[l]};break;case 15:const gt=g.trimColon(i[l]);this.$={stmt:"relation",state1:i[l-3],state2:i[l-1],description:gt};break;case 19:this.$={stmt:"state",id:i[l-3],type:"default",description:"",doc:i[l-1]};break;case 20:var Y=i[l],K=i[l-2].trim();if(i[l].match(":")){var ht=i[l].split(":");Y=ht[0],K=[K,ht[1]]}this.$={stmt:"state",id:Y,type:"default",description:K};break;case 21:this.$={stmt:"state",id:i[l-3],type:"default",description:i[l-5],doc:i[l-1]};break;case 22:this.$={stmt:"state",id:i[l],type:"fork"};break;case 23:this.$={stmt:"state",id:i[l],type:"join"};break;case 24:this.$={stmt:"state",id:i[l],type:"choice"};break;case 25:this.$={stmt:"state",id:g.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:i[l-1].trim(),note:{position:i[l-2].trim(),text:i[l].trim()}};break;case 29:this.$=i[l].trim(),g.setAccTitle(this.$);break;case 30:case 31:this.$=i[l].trim(),g.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:i[l-3],url:i[l-2],tooltip:i[l-1]};break;case 33:this.$={stmt:"click",id:i[l-3],url:i[l-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:i[l-1].trim(),classes:i[l].trim()};break;case 36:this.$={stmt:"style",id:i[l-1].trim(),styleClass:i[l].trim()};break;case 37:this.$={stmt:"applyClass",id:i[l-1].trim(),styleClass:i[l].trim()};break;case 38:g.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:g.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:g.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:g.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:i[l].trim(),type:"default",description:""};break;case 46:this.$={stmt:"state",id:i[l-2].trim(),classes:[i[l].trim()],type:"default",description:""};break;case 47:this.$={stmt:"state",id:i[l-2].trim(),classes:[i[l].trim()],type:"default",description:""};break}},"anonymous"),table:[{3:1,4:e,5:o,6:s},{1:[3]},{3:5,4:e,5:o,6:s},{3:6,4:e,5:o,6:s},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],c,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:h,5:p,8:8,9:10,10:12,11:13,12:14,13:15,16:y,17:n,19:T,22:m,24:N,25:x,26:k,27:d,28:L,29:R,32:25,33:v,35:F,37:C,38:P,41:I,45:H,48:it,51:rt,52:at,53:nt,54:ot,57:z},t(S,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:y,17:n,19:T,22:m,24:N,25:x,26:k,27:d,28:L,29:R,32:25,33:v,35:F,37:C,38:P,41:I,45:H,48:it,51:rt,52:at,53:nt,54:ot,57:z},t(S,[2,7]),t(S,[2,8]),t(S,[2,9]),t(S,[2,10]),t(S,[2,11]),t(S,[2,12],{14:[1,40],15:[1,41]}),t(S,[2,16]),{18:[1,42]},t(S,[2,18],{20:[1,43]}),{23:[1,44]},t(S,[2,22]),t(S,[2,23]),t(S,[2,24]),t(S,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},t(S,[2,28]),{34:[1,49]},{36:[1,50]},t(S,[2,31]),{13:51,24:N,57:z},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},t(lt,[2,44],{58:[1,56]}),t(lt,[2,45],{58:[1,57]}),t(S,[2,38]),t(S,[2,39]),t(S,[2,40]),t(S,[2,41]),t(S,[2,6]),t(S,[2,13]),{13:58,24:N,57:z},t(S,[2,17]),t(xt,c,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},t(S,[2,29]),t(S,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},t(S,[2,14],{14:[1,71]}),{4:h,5:p,8:8,9:10,10:12,11:13,12:14,13:15,16:y,17:n,19:T,21:[1,72],22:m,24:N,25:x,26:k,27:d,28:L,29:R,32:25,33:v,35:F,37:C,38:P,41:I,45:H,48:it,51:rt,52:at,53:nt,54:ot,57:z},t(S,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},t(S,[2,34]),t(S,[2,35]),t(S,[2,36]),t(S,[2,37]),t(lt,[2,46]),t(lt,[2,47]),t(S,[2,15]),t(S,[2,19]),t(xt,c,{7:78}),t(S,[2,26]),t(S,[2,27]),{5:[1,79]},{5:[1,80]},{4:h,5:p,8:8,9:10,10:12,11:13,12:14,13:15,16:y,17:n,19:T,21:[1,81],22:m,24:N,25:x,26:k,27:d,28:L,29:R,32:25,33:v,35:F,37:C,38:P,41:I,45:H,48:it,51:rt,52:at,53:nt,54:ot,57:z},t(S,[2,32]),t(S,[2,33]),t(S,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:f(function(a,u){if(u.recoverable)this.trace(a);else{var r=new Error(a);throw r.hash=u,r}},"parseError"),parse:f(function(a){var u=this,r=[0],g=[],E=[null],i=[],B=this.table,l="",Y=0,K=0,ht=2,Q=1,gt=i.slice.call(arguments,1),b=Object.create(this.lexer),U={yy:{}};for(var Tt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Tt)&&(U.yy[Tt]=this.yy[Tt]);b.setInput(a,U.yy),U.yy.lexer=b,U.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var Et=b.yylloc;i.push(Et);var Qt=b.options&&b.options.ranges;typeof U.yy.parseError=="function"?this.parseError=U.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Zt(w){r.length=r.length-2*w,E.length=E.length-w,i.length=i.length-w}f(Zt,"popStack");function Lt(){var w;return w=g.pop()||b.lex()||Q,typeof w!="number"&&(w instanceof Array&&(g=w,w=g.pop()),w=u.symbols_[w]||w),w}f(Lt,"lex");for(var A,W,O,_t,X={},ut,G,It,dt;;){if(W=r[r.length-1],this.defaultActions[W]?O=this.defaultActions[W]:((A===null||typeof A>"u")&&(A=Lt()),O=B[W]&&B[W][A]),typeof O>"u"||!O.length||!O[0]){var mt="";dt=[];for(ut in B[W])this.terminals_[ut]&&ut>ht&&dt.push("'"+this.terminals_[ut]+"'");b.showPosition?mt="Parse error on line "+(Y+1)+`:
 `+b.showPosition()+`
 Expecting `+dt.join(", ")+", got '"+(this.terminals_[A]||A)+"'":mt="Parse error on line "+(Y+1)+": Unexpected "+(A==Q?"end of input":"'"+(this.terminals_[A]||A)+"'"),this.parseError(mt,{text:b.match,token:this.terminals_[A]||A,line:b.yylineno,loc:Et,expected:dt})}if(O[0]instanceof Array&&O.length>1)throw new Error("Parse Error: multiple actions possible at state: "+W+", token: "+A);switch(O[0]){case 1:r.push(A),E.push(b.yytext),i.push(b.yylloc),r.push(O[1]),A=null,K=b.yyleng,l=b.yytext,Y=b.yylineno,Et=b.yylloc;break;case 2:if(G=this.productions_[O[1]][1],X.$=E[E.length-G],X._$={first_line:i[i.length-(G||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(G||1)].first_column,last_column:i[i.length-1].last_column},Qt&&(X._$.range=[i[i.length-(G||1)].range[0],i[i.length-1].range[1]]),_t=this.performAction.apply(X,[l,K,Y,U.yy,O[1],E,i].concat(gt)),typeof _t<"u")return _t;G&&(r=r.slice(0,-1*G*2),E=E.slice(0,-1*G),i=i.slice(0,-1*G)),r.push(this.productions_[O[1]][0]),E.push(X.$),i.push(X._$),It=B[r[r.length-2]][r[r.length-1]],r.push(It);break;case 3:return!0}}return!0},"parse")},qt=(function(){var V={EOF:1,parseError:f(function(u,r){if(this.yy.parser)this.yy.parser.parseError(u,r);else throw new Error(u)},"parseError"),setInput:f(function(a,u){return this.yy=u||this.yy||{},this._input=a,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:f(function(){var a=this._input[0];this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a;var u=a.match(/(?:\r\n?|\n).*/g);return u?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),a},"input"),unput:f(function(a){var u=a.length,r=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-u),this.offset-=u;var g=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1);var E=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===g.length?this.yylloc.first_column:0)+g[g.length-r.length].length-r[0].length:this.yylloc.first_column-u},this.options.ranges&&(this.yylloc.range=[E[0],E[0]+this.yyleng-u]),this.yyleng=this.yytext.length,this},"unput"),more:f(function(){return this._more=!0,this},"more"),reject:f(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
 `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:f(function(a){this.unput(this.match.slice(a))},"less"),pastInput:f(function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:f(function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:f(function(){var a=this.pastInput(),u=new Array(a.length+1).join("-");return a+this.upcomingInput()+`
diff --git a/apps/pythinker-code/dist-web/assets/chunk-JWPE2WC7-DsFB3Fti.js b/apps/pythinker-code/dist-web/assets/chunk-JWPE2WC7-DjA09kFS.js
similarity index 71%
rename from apps/pythinker-code/dist-web/assets/chunk-JWPE2WC7-DsFB3Fti.js
rename to apps/pythinker-code/dist-web/assets/chunk-JWPE2WC7-DjA09kFS.js
index bb6fa162a..7f1885174 100644
--- a/apps/pythinker-code/dist-web/assets/chunk-JWPE2WC7-DsFB3Fti.js
+++ b/apps/pythinker-code/dist-web/assets/chunk-JWPE2WC7-DjA09kFS.js
@@ -1 +1 @@
-import{_ as i}from"./mermaid.core-D6Xg32pF.js";function t(c,e){c.accDescr&&e.setAccDescription?.(c.accDescr),c.accTitle&&e.setAccTitle?.(c.accTitle),c.title&&e.setDiagramTitle?.(c.title)}i(t,"populateCommonDb");export{t as p};
+import{_ as i}from"./mermaid.core-BLsmN-lt.js";function t(c,e){c.accDescr&&e.setAccDescription?.(c.accDescr),c.accTitle&&e.setAccTitle?.(c.accTitle),c.title&&e.setDiagramTitle?.(c.title)}i(t,"populateCommonDb");export{t as p};
diff --git a/apps/pythinker-code/dist-web/assets/chunk-LCL6LL3I-C-wDwoC0.js b/apps/pythinker-code/dist-web/assets/chunk-LCL6LL3I-COmMpiZO.js
similarity index 99%
rename from apps/pythinker-code/dist-web/assets/chunk-LCL6LL3I-C-wDwoC0.js
rename to apps/pythinker-code/dist-web/assets/chunk-LCL6LL3I-COmMpiZO.js
index d50040487..ffe44e435 100644
--- a/apps/pythinker-code/dist-web/assets/chunk-LCL6LL3I-C-wDwoC0.js
+++ b/apps/pythinker-code/dist-web/assets/chunk-LCL6LL3I-COmMpiZO.js
@@ -1,4 +1,4 @@
-import{g as tt}from"./chunk-5VM5RSS4-baBluNR7.js";import{g as st}from"./chunk-XXDRQBXY-BOyQwG-7.js";import{s as it}from"./chunk-POPQ4Y6H-Tp7S0w--.js";import{_ as f,l as Ie,c as F,x as at,y as nt,z as Oe,j as de,b as rt,a as ut,s as lt,g as ct,p as ot,q as ht,k as I,r as dt,t as pt,i as At,a6 as G}from"./mermaid.core-D6Xg32pF.js";import{f as ft}from"./chunk-F27PBJKO-B_4WdsPc.js";import{p as gt}from"./purify.es-5AjVNlXF.js";var we=(function(){var t=f(function(O,o,h,p){for(h=h||{},p=O.length;p--;h[O[p]]=o);return h},"o"),i=[1,18],a=[1,19],n=[1,20],r=[1,41],c=[1,26],u=[1,42],d=[1,24],m=[1,25],g=[1,32],N=[1,33],Ae=[1,34],b=[1,45],fe=[1,35],ge=[1,36],me=[1,37],Ce=[1,38],be=[1,27],ke=[1,28],Ee=[1,29],Te=[1,30],ye=[1,31],k=[1,44],E=[1,46],T=[1,43],y=[1,47],De=[1,9],A=[1,8,9],Z=[1,58],$=[1,59],ee=[1,60],te=[1,61],se=[1,62],Fe=[1,63],Be=[1,64],_=[1,8,9,41],Pe=[1,77],M=[1,8,9,12,13,22,39,41,44,46,68,69,70,71,72,73,74,79,81],ie=[1,8,9,12,13,18,20,22,39,41,44,46,47,60,68,69,70,71,72,73,74,79,81,86,100,102,103],ae=[13,60,86,100,102,103],U=[13,60,73,74,86,100,102,103],Me=[13,60,68,69,70,71,72,86,100,102,103],ne=[1,103],z=[1,121],Y=[1,117],K=[1,113],W=[1,119],Q=[1,114],j=[1,115],X=[1,116],q=[1,118],H=[1,120],Re=[22,50,60,61,82,86,87,88,89,90],Ge=[1,128],re=[12,39],_e=[1,8,9,39,41,44,46],ue=[1,8,9,22],Ue=[1,153],ze=[1,8,9,61],x=[1,8,9,22,50,60,61,82,86,87,88,89,90],Se={trace:f(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statements:5,graphConfig:6,CLASS_DIAGRAM:7,NEWLINE:8,EOF:9,statement:10,classLabel:11,SQS:12,STR:13,SQE:14,namespaceName:15,alphaNumToken:16,classLiteralName:17,DOT:18,className:19,GENERICTYPE:20,relationStatement:21,LABEL:22,namespaceStatement:23,classStatement:24,memberStatement:25,annotationStatement:26,clickStatement:27,styleStatement:28,cssClassStatement:29,noteStatement:30,classDefStatement:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,namespaceIdentifier:38,STRUCT_START:39,classStatements:40,STRUCT_STOP:41,NAMESPACE:42,classIdentifier:43,STYLE_SEPARATOR:44,members:45,ANNOTATION_START:46,ANNOTATION_END:47,CLASS:48,emptyBody:49,SPACE:50,MEMBER:51,SEPARATOR:52,relation:53,NOTE_FOR:54,noteText:55,NOTE:56,CLASSDEF:57,classList:58,stylesOpt:59,ALPHA:60,COMMA:61,direction_tb:62,direction_bt:63,direction_rl:64,direction_lr:65,relationType:66,lineType:67,AGGREGATION:68,EXTENSION:69,COMPOSITION:70,DEPENDENCY:71,LOLLIPOP:72,LINE:73,DOTTED_LINE:74,CALLBACK:75,LINK:76,LINK_TARGET:77,CLICK:78,CALLBACK_NAME:79,CALLBACK_ARGS:80,HREF:81,STYLE:82,CSSCLASS:83,style:84,styleComponent:85,NUM:86,COLON:87,UNIT:88,BRKT:89,PCT:90,commentToken:91,textToken:92,graphCodeTokens:93,textNoTagsToken:94,TAGSTART:95,TAGEND:96,"==":97,"--":98,DEFAULT:99,MINUS:100,keywords:101,UNICODE_TEXT:102,BQUOTE_STR:103,$accept:0,$end:1},terminals_:{2:"error",7:"CLASS_DIAGRAM",8:"NEWLINE",9:"EOF",12:"SQS",13:"STR",14:"SQE",18:"DOT",20:"GENERICTYPE",22:"LABEL",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",39:"STRUCT_START",41:"STRUCT_STOP",42:"NAMESPACE",44:"STYLE_SEPARATOR",46:"ANNOTATION_START",47:"ANNOTATION_END",48:"CLASS",50:"SPACE",51:"MEMBER",52:"SEPARATOR",54:"NOTE_FOR",56:"NOTE",57:"CLASSDEF",60:"ALPHA",61:"COMMA",62:"direction_tb",63:"direction_bt",64:"direction_rl",65:"direction_lr",68:"AGGREGATION",69:"EXTENSION",70:"COMPOSITION",71:"DEPENDENCY",72:"LOLLIPOP",73:"LINE",74:"DOTTED_LINE",75:"CALLBACK",76:"LINK",77:"LINK_TARGET",78:"CLICK",79:"CALLBACK_NAME",80:"CALLBACK_ARGS",81:"HREF",82:"STYLE",83:"CSSCLASS",86:"NUM",87:"COLON",88:"UNIT",89:"BRKT",90:"PCT",93:"graphCodeTokens",95:"TAGSTART",96:"TAGEND",97:"==",98:"--",99:"DEFAULT",100:"MINUS",101:"keywords",102:"UNICODE_TEXT",103:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,1],[15,3],[15,2],[19,1],[19,3],[19,1],[19,2],[19,2],[19,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[23,4],[23,5],[38,2],[38,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,3],[24,6],[24,4],[24,7],[24,6],[43,2],[43,3],[49,0],[49,2],[49,2],[26,4],[45,1],[45,2],[25,1],[25,2],[25,1],[25,1],[21,3],[21,4],[21,4],[21,5],[30,3],[30,2],[31,3],[58,1],[58,3],[32,1],[32,1],[32,1],[32,1],[53,3],[53,2],[53,2],[53,1],[66,1],[66,1],[66,1],[66,1],[66,1],[67,1],[67,1],[27,3],[27,4],[27,3],[27,4],[27,4],[27,5],[27,3],[27,4],[27,4],[27,5],[27,4],[27,5],[27,5],[27,6],[28,3],[29,3],[59,1],[59,3],[84,1],[84,2],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[91,1],[91,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[94,1],[94,1],[94,1],[94,1],[16,1],[16,1],[16,1],[16,1],[17,1],[55,1]],performAction:f(function(o,h,p,l,C,e,J){var s=e.length-1;switch(C){case 8:this.$=e[s-1];break;case 9:case 10:case 13:case 15:this.$=e[s];break;case 11:case 14:this.$=e[s-2]+"."+e[s];break;case 12:case 16:this.$=e[s-1]+e[s];break;case 17:case 18:this.$=e[s-1]+"~"+e[s]+"~";break;case 19:l.addRelation(e[s]);break;case 20:e[s-1].title=l.cleanupLabel(e[s]),l.addRelation(e[s-1]);break;case 31:this.$=e[s].trim(),l.setAccTitle(this.$);break;case 32:case 33:this.$=e[s].trim(),l.setAccDescription(this.$);break;case 34:l.addClassesToNamespace(e[s-3],e[s-1][0],e[s-1][1]),l.popNamespace();break;case 35:l.addClassesToNamespace(e[s-4],e[s-1][0],e[s-1][1]),l.popNamespace();break;case 36:this.$=l.addNamespace(e[s]);break;case 37:this.$=l.addNamespace(e[s-1],e[s]);break;case 38:this.$=[[e[s]],[]];break;case 39:this.$=[[e[s-1]],[]];break;case 40:e[s][0].unshift(e[s-2]),this.$=e[s];break;case 41:this.$=[[],[e[s]]];break;case 42:this.$=[[],[e[s-1]]];break;case 43:e[s][1].unshift(e[s-2]),this.$=e[s];break;case 44:case 45:this.$=[[],[]];break;case 46:this.$=e[s];break;case 48:l.setCssClass(e[s-2],e[s]);break;case 49:l.addMembers(e[s-3],e[s-1]);break;case 51:l.setCssClass(e[s-5],e[s-3]),l.addMembers(e[s-5],e[s-1]);break;case 52:l.addAnnotation(e[s-3],e[s-1]);break;case 53:l.addAnnotation(e[s-6],e[s-4]),l.addMembers(e[s-6],e[s-1]);break;case 54:l.addAnnotation(e[s-5],e[s-3]);break;case 55:this.$=e[s],l.addClass(e[s]);break;case 56:this.$=e[s-1],l.addClass(e[s-1]),l.setClassLabel(e[s-1],e[s]);break;case 60:l.addAnnotation(e[s],e[s-2]);break;case 61:case 74:this.$=[e[s]];break;case 62:e[s].push(e[s-1]),this.$=e[s];break;case 63:break;case 64:l.addMember(e[s-1],l.cleanupLabel(e[s]));break;case 65:break;case 66:break;case 67:this.$={id1:e[s-2],id2:e[s],relation:e[s-1],relationTitle1:"none",relationTitle2:"none"};break;case 68:this.$={id1:e[s-3],id2:e[s],relation:e[s-1],relationTitle1:e[s-2],relationTitle2:"none"};break;case 69:this.$={id1:e[s-3],id2:e[s],relation:e[s-2],relationTitle1:"none",relationTitle2:e[s-1]};break;case 70:this.$={id1:e[s-4],id2:e[s],relation:e[s-2],relationTitle1:e[s-3],relationTitle2:e[s-1]};break;case 71:this.$=l.addNote(e[s],e[s-1]);break;case 72:this.$=l.addNote(e[s]);break;case 73:this.$=e[s-2],l.defineClass(e[s-1],e[s]);break;case 75:this.$=e[s-2].concat([e[s]]);break;case 76:l.setDirection("TB");break;case 77:l.setDirection("BT");break;case 78:l.setDirection("RL");break;case 79:l.setDirection("LR");break;case 80:this.$={type1:e[s-2],type2:e[s],lineType:e[s-1]};break;case 81:this.$={type1:"none",type2:e[s],lineType:e[s-1]};break;case 82:this.$={type1:e[s-1],type2:"none",lineType:e[s]};break;case 83:this.$={type1:"none",type2:"none",lineType:e[s]};break;case 84:this.$=l.relationType.AGGREGATION;break;case 85:this.$=l.relationType.EXTENSION;break;case 86:this.$=l.relationType.COMPOSITION;break;case 87:this.$=l.relationType.DEPENDENCY;break;case 88:this.$=l.relationType.LOLLIPOP;break;case 89:this.$=l.lineType.LINE;break;case 90:this.$=l.lineType.DOTTED_LINE;break;case 91:case 97:this.$=e[s-2],l.setClickEvent(e[s-1],e[s]);break;case 92:case 98:this.$=e[s-3],l.setClickEvent(e[s-2],e[s-1]),l.setTooltip(e[s-2],e[s]);break;case 93:this.$=e[s-2],l.setLink(e[s-1],e[s]);break;case 94:this.$=e[s-3],l.setLink(e[s-2],e[s-1],e[s]);break;case 95:this.$=e[s-3],l.setLink(e[s-2],e[s-1]),l.setTooltip(e[s-2],e[s]);break;case 96:this.$=e[s-4],l.setLink(e[s-3],e[s-2],e[s]),l.setTooltip(e[s-3],e[s-1]);break;case 99:this.$=e[s-3],l.setClickEvent(e[s-2],e[s-1],e[s]);break;case 100:this.$=e[s-4],l.setClickEvent(e[s-3],e[s-2],e[s-1]),l.setTooltip(e[s-3],e[s]);break;case 101:this.$=e[s-3],l.setLink(e[s-2],e[s]);break;case 102:this.$=e[s-4],l.setLink(e[s-3],e[s-1],e[s]);break;case 103:this.$=e[s-4],l.setLink(e[s-3],e[s-1]),l.setTooltip(e[s-3],e[s]);break;case 104:this.$=e[s-5],l.setLink(e[s-4],e[s-2],e[s]),l.setTooltip(e[s-4],e[s-1]);break;case 105:this.$=e[s-2],l.setCssStyle(e[s-1],e[s]);break;case 106:l.setCssClass(e[s-1],e[s]);break;case 107:this.$=[e[s]];break;case 108:e[s-2].push(e[s]),this.$=e[s-2];break;case 110:this.$=e[s-1]+e[s];break}},"anonymous"),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:i,35:a,37:n,38:22,42:r,43:23,46:c,48:u,51:d,52:m,54:g,56:N,57:Ae,60:b,62:fe,63:ge,64:me,65:Ce,75:be,76:ke,78:Ee,82:Te,83:ye,86:k,100:E,102:T,103:y},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},t(De,[2,5],{8:[1,48]}),{8:[1,49]},t(A,[2,19],{22:[1,50]}),t(A,[2,21]),t(A,[2,22]),t(A,[2,23]),t(A,[2,24]),t(A,[2,25]),t(A,[2,26]),t(A,[2,27]),t(A,[2,28]),t(A,[2,29]),t(A,[2,30]),{34:[1,51]},{36:[1,52]},t(A,[2,33]),t(A,[2,63],{53:53,66:56,67:57,13:[1,54],22:[1,55],68:Z,69:$,70:ee,71:te,72:se,73:Fe,74:Be}),{39:[1,65]},t(_,[2,47],{39:[1,67],44:[1,66],46:[1,68]}),t(A,[2,65]),t(A,[2,66]),{16:69,60:b,86:k,100:E,102:T},{16:39,17:40,19:70,60:b,86:k,100:E,102:T,103:y},{16:39,17:40,19:71,60:b,86:k,100:E,102:T,103:y},{16:39,17:40,19:72,60:b,86:k,100:E,102:T,103:y},{60:[1,73]},{13:[1,74]},{16:39,17:40,19:75,60:b,86:k,100:E,102:T,103:y},{13:Pe,55:76},{58:78,60:[1,79]},t(A,[2,76]),t(A,[2,77]),t(A,[2,78]),t(A,[2,79]),t(M,[2,13],{16:39,17:40,19:81,18:[1,80],20:[1,82],60:b,86:k,100:E,102:T,103:y}),t(M,[2,15],{20:[1,83]}),{15:84,16:85,17:86,60:b,86:k,100:E,102:T,103:y},{16:39,17:40,19:87,60:b,86:k,100:E,102:T,103:y},t(ie,[2,133]),t(ie,[2,134]),t(ie,[2,135]),t(ie,[2,136]),t([1,8,9,12,13,20,22,39,41,44,46,68,69,70,71,72,73,74,79,81],[2,137]),t(De,[2,6],{10:5,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,19:21,38:22,43:23,16:39,17:40,5:88,33:i,35:a,37:n,42:r,46:c,48:u,51:d,52:m,54:g,56:N,57:Ae,60:b,62:fe,63:ge,64:me,65:Ce,75:be,76:ke,78:Ee,82:Te,83:ye,86:k,100:E,102:T,103:y}),{5:89,10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:i,35:a,37:n,38:22,42:r,43:23,46:c,48:u,51:d,52:m,54:g,56:N,57:Ae,60:b,62:fe,63:ge,64:me,65:Ce,75:be,76:ke,78:Ee,82:Te,83:ye,86:k,100:E,102:T,103:y},t(A,[2,20]),t(A,[2,31]),t(A,[2,32]),{13:[1,91],16:39,17:40,19:90,60:b,86:k,100:E,102:T,103:y},{53:92,66:56,67:57,68:Z,69:$,70:ee,71:te,72:se,73:Fe,74:Be},t(A,[2,64]),{67:93,73:Fe,74:Be},t(ae,[2,83],{66:94,68:Z,69:$,70:ee,71:te,72:se}),t(U,[2,84]),t(U,[2,85]),t(U,[2,86]),t(U,[2,87]),t(U,[2,88]),t(Me,[2,89]),t(Me,[2,90]),{8:[1,96],23:99,24:97,30:98,38:22,40:95,42:r,43:23,48:u,54:g,56:N},{16:100,60:b,86:k,100:E,102:T},{41:[1,102],45:101,51:ne},{16:104,60:b,86:k,100:E,102:T},{47:[1,105]},{13:[1,106]},{13:[1,107]},{79:[1,108],81:[1,109]},{22:z,50:Y,59:110,60:K,82:W,84:111,85:112,86:Q,87:j,88:X,89:q,90:H},{60:[1,122]},{13:Pe,55:123},t(_,[2,72]),t(_,[2,138]),{22:z,50:Y,59:124,60:K,61:[1,125],82:W,84:111,85:112,86:Q,87:j,88:X,89:q,90:H},t(Re,[2,74]),{16:39,17:40,19:126,60:b,86:k,100:E,102:T,103:y},t(M,[2,16]),t(M,[2,17]),t(M,[2,18]),{11:127,12:Ge,39:[2,36]},t(re,[2,9],{16:85,17:86,15:130,18:[1,129],60:b,86:k,100:E,102:T,103:y}),t(re,[2,10]),t(_e,[2,55],{11:131,12:Ge}),t(De,[2,7]),{9:[1,132]},t(ue,[2,67]),{16:39,17:40,19:133,60:b,86:k,100:E,102:T,103:y},{13:[1,135],16:39,17:40,19:134,60:b,86:k,100:E,102:T,103:y},t(ae,[2,82],{66:136,68:Z,69:$,70:ee,71:te,72:se}),t(ae,[2,81]),{41:[1,137]},{23:99,24:97,30:98,38:22,40:138,42:r,43:23,48:u,54:g,56:N},{8:[1,139],41:[2,38]},{8:[1,140],41:[2,41]},{8:[1,141],41:[2,44]},t(_,[2,48],{39:[1,142]}),{41:[1,143]},t(_,[2,50]),{41:[2,61],45:144,51:ne},{47:[1,145]},{16:39,17:40,19:146,60:b,86:k,100:E,102:T,103:y},t(A,[2,91],{13:[1,147]}),t(A,[2,93],{13:[1,149],77:[1,148]}),t(A,[2,97],{13:[1,150],80:[1,151]}),{13:[1,152]},t(A,[2,105],{61:Ue}),t(ze,[2,107],{85:154,22:z,50:Y,60:K,82:W,86:Q,87:j,88:X,89:q,90:H}),t(x,[2,109]),t(x,[2,111]),t(x,[2,112]),t(x,[2,113]),t(x,[2,114]),t(x,[2,115]),t(x,[2,116]),t(x,[2,117]),t(x,[2,118]),t(x,[2,119]),t(A,[2,106]),t(_,[2,71]),t(A,[2,73],{61:Ue}),{60:[1,155]},t(M,[2,14]),{39:[2,37]},{13:[1,156]},{15:157,16:85,17:86,60:b,86:k,100:E,102:T,103:y},t(re,[2,12]),t(_e,[2,56]),{1:[2,4]},t(ue,[2,69]),t(ue,[2,68]),{16:39,17:40,19:158,60:b,86:k,100:E,102:T,103:y},t(ae,[2,80]),t(_,[2,34]),{41:[1,159]},{23:99,24:97,30:98,38:22,40:160,41:[2,39],42:r,43:23,48:u,54:g,56:N},{23:99,24:97,30:98,38:22,40:161,41:[2,42],42:r,43:23,48:u,54:g,56:N},{23:99,24:97,30:98,38:22,40:162,41:[2,45],42:r,43:23,48:u,54:g,56:N},{45:163,51:ne},t(_,[2,49]),{41:[2,62]},t(_,[2,52],{39:[1,164]}),t(A,[2,60]),t(A,[2,92]),t(A,[2,94]),t(A,[2,95],{77:[1,165]}),t(A,[2,98]),t(A,[2,99],{13:[1,166]}),t(A,[2,101],{13:[1,168],77:[1,167]}),{22:z,50:Y,60:K,82:W,84:169,85:112,86:Q,87:j,88:X,89:q,90:H},t(x,[2,110]),t(Re,[2,75]),{14:[1,170]},t(re,[2,11]),t(ue,[2,70]),t(_,[2,35]),{41:[2,40]},{41:[2,43]},{41:[2,46]},{41:[1,171]},{41:[1,173],45:172,51:ne},t(A,[2,96]),t(A,[2,100]),t(A,[2,102]),t(A,[2,103],{77:[1,174]}),t(ze,[2,108],{85:154,22:z,50:Y,60:K,82:W,86:Q,87:j,88:X,89:q,90:H}),t(_e,[2,8]),t(_,[2,51]),{41:[1,175]},t(_,[2,54]),t(A,[2,104]),t(_,[2,53])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],127:[2,37],132:[2,4],144:[2,62],160:[2,40],161:[2,43],162:[2,46]},parseError:f(function(o,h){if(h.recoverable)this.trace(o);else{var p=new Error(o);throw p.hash=h,p}},"parseError"),parse:f(function(o){var h=this,p=[0],l=[],C=[null],e=[],J=this.table,s="",ce=0,Ye=0,Je=2,Ke=1,Ze=e.slice.call(arguments,1),D=Object.create(this.lexer),w={yy:{}};for(var Ne in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ne)&&(w.yy[Ne]=this.yy[Ne]);D.setInput(o,w.yy),w.yy.lexer=D,w.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var Le=D.yylloc;e.push(Le);var $e=D.options&&D.options.ranges;typeof w.yy.parseError=="function"?this.parseError=w.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function et(S){p.length=p.length-2*S,C.length=C.length-S,e.length=e.length-S}f(et,"popStack");function We(){var S;return S=l.pop()||D.lex()||Ke,typeof S!="number"&&(S instanceof Array&&(l=S,S=l.pop()),S=h.symbols_[S]||S),S}f(We,"lex");for(var B,V,L,xe,R={},oe,v,Qe,he;;){if(V=p[p.length-1],this.defaultActions[V]?L=this.defaultActions[V]:((B===null||typeof B>"u")&&(B=We()),L=J[V]&&J[V][B]),typeof L>"u"||!L.length||!L[0]){var ve="";he=[];for(oe in J[V])this.terminals_[oe]&&oe>Je&&he.push("'"+this.terminals_[oe]+"'");D.showPosition?ve="Parse error on line "+(ce+1)+`:
+import{g as tt}from"./chunk-5VM5RSS4-D8DHuAth.js";import{g as st}from"./chunk-XXDRQBXY-Pj2mkOow.js";import{s as it}from"./chunk-POPQ4Y6H-B7iG5qn5.js";import{_ as f,l as Ie,c as F,x as at,y as nt,z as Oe,j as de,b as rt,a as ut,s as lt,g as ct,p as ot,q as ht,k as I,r as dt,t as pt,i as At,a6 as G}from"./mermaid.core-BLsmN-lt.js";import{f as ft}from"./chunk-F27PBJKO-DtNIaJ4B.js";import{p as gt}from"./purify.es-5AjVNlXF.js";var we=(function(){var t=f(function(O,o,h,p){for(h=h||{},p=O.length;p--;h[O[p]]=o);return h},"o"),i=[1,18],a=[1,19],n=[1,20],r=[1,41],c=[1,26],u=[1,42],d=[1,24],m=[1,25],g=[1,32],N=[1,33],Ae=[1,34],b=[1,45],fe=[1,35],ge=[1,36],me=[1,37],Ce=[1,38],be=[1,27],ke=[1,28],Ee=[1,29],Te=[1,30],ye=[1,31],k=[1,44],E=[1,46],T=[1,43],y=[1,47],De=[1,9],A=[1,8,9],Z=[1,58],$=[1,59],ee=[1,60],te=[1,61],se=[1,62],Fe=[1,63],Be=[1,64],_=[1,8,9,41],Pe=[1,77],M=[1,8,9,12,13,22,39,41,44,46,68,69,70,71,72,73,74,79,81],ie=[1,8,9,12,13,18,20,22,39,41,44,46,47,60,68,69,70,71,72,73,74,79,81,86,100,102,103],ae=[13,60,86,100,102,103],U=[13,60,73,74,86,100,102,103],Me=[13,60,68,69,70,71,72,86,100,102,103],ne=[1,103],z=[1,121],Y=[1,117],K=[1,113],W=[1,119],Q=[1,114],j=[1,115],X=[1,116],q=[1,118],H=[1,120],Re=[22,50,60,61,82,86,87,88,89,90],Ge=[1,128],re=[12,39],_e=[1,8,9,39,41,44,46],ue=[1,8,9,22],Ue=[1,153],ze=[1,8,9,61],x=[1,8,9,22,50,60,61,82,86,87,88,89,90],Se={trace:f(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statements:5,graphConfig:6,CLASS_DIAGRAM:7,NEWLINE:8,EOF:9,statement:10,classLabel:11,SQS:12,STR:13,SQE:14,namespaceName:15,alphaNumToken:16,classLiteralName:17,DOT:18,className:19,GENERICTYPE:20,relationStatement:21,LABEL:22,namespaceStatement:23,classStatement:24,memberStatement:25,annotationStatement:26,clickStatement:27,styleStatement:28,cssClassStatement:29,noteStatement:30,classDefStatement:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,namespaceIdentifier:38,STRUCT_START:39,classStatements:40,STRUCT_STOP:41,NAMESPACE:42,classIdentifier:43,STYLE_SEPARATOR:44,members:45,ANNOTATION_START:46,ANNOTATION_END:47,CLASS:48,emptyBody:49,SPACE:50,MEMBER:51,SEPARATOR:52,relation:53,NOTE_FOR:54,noteText:55,NOTE:56,CLASSDEF:57,classList:58,stylesOpt:59,ALPHA:60,COMMA:61,direction_tb:62,direction_bt:63,direction_rl:64,direction_lr:65,relationType:66,lineType:67,AGGREGATION:68,EXTENSION:69,COMPOSITION:70,DEPENDENCY:71,LOLLIPOP:72,LINE:73,DOTTED_LINE:74,CALLBACK:75,LINK:76,LINK_TARGET:77,CLICK:78,CALLBACK_NAME:79,CALLBACK_ARGS:80,HREF:81,STYLE:82,CSSCLASS:83,style:84,styleComponent:85,NUM:86,COLON:87,UNIT:88,BRKT:89,PCT:90,commentToken:91,textToken:92,graphCodeTokens:93,textNoTagsToken:94,TAGSTART:95,TAGEND:96,"==":97,"--":98,DEFAULT:99,MINUS:100,keywords:101,UNICODE_TEXT:102,BQUOTE_STR:103,$accept:0,$end:1},terminals_:{2:"error",7:"CLASS_DIAGRAM",8:"NEWLINE",9:"EOF",12:"SQS",13:"STR",14:"SQE",18:"DOT",20:"GENERICTYPE",22:"LABEL",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",39:"STRUCT_START",41:"STRUCT_STOP",42:"NAMESPACE",44:"STYLE_SEPARATOR",46:"ANNOTATION_START",47:"ANNOTATION_END",48:"CLASS",50:"SPACE",51:"MEMBER",52:"SEPARATOR",54:"NOTE_FOR",56:"NOTE",57:"CLASSDEF",60:"ALPHA",61:"COMMA",62:"direction_tb",63:"direction_bt",64:"direction_rl",65:"direction_lr",68:"AGGREGATION",69:"EXTENSION",70:"COMPOSITION",71:"DEPENDENCY",72:"LOLLIPOP",73:"LINE",74:"DOTTED_LINE",75:"CALLBACK",76:"LINK",77:"LINK_TARGET",78:"CLICK",79:"CALLBACK_NAME",80:"CALLBACK_ARGS",81:"HREF",82:"STYLE",83:"CSSCLASS",86:"NUM",87:"COLON",88:"UNIT",89:"BRKT",90:"PCT",93:"graphCodeTokens",95:"TAGSTART",96:"TAGEND",97:"==",98:"--",99:"DEFAULT",100:"MINUS",101:"keywords",102:"UNICODE_TEXT",103:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,1],[15,3],[15,2],[19,1],[19,3],[19,1],[19,2],[19,2],[19,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[23,4],[23,5],[38,2],[38,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,3],[24,6],[24,4],[24,7],[24,6],[43,2],[43,3],[49,0],[49,2],[49,2],[26,4],[45,1],[45,2],[25,1],[25,2],[25,1],[25,1],[21,3],[21,4],[21,4],[21,5],[30,3],[30,2],[31,3],[58,1],[58,3],[32,1],[32,1],[32,1],[32,1],[53,3],[53,2],[53,2],[53,1],[66,1],[66,1],[66,1],[66,1],[66,1],[67,1],[67,1],[27,3],[27,4],[27,3],[27,4],[27,4],[27,5],[27,3],[27,4],[27,4],[27,5],[27,4],[27,5],[27,5],[27,6],[28,3],[29,3],[59,1],[59,3],[84,1],[84,2],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[91,1],[91,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[94,1],[94,1],[94,1],[94,1],[16,1],[16,1],[16,1],[16,1],[17,1],[55,1]],performAction:f(function(o,h,p,l,C,e,J){var s=e.length-1;switch(C){case 8:this.$=e[s-1];break;case 9:case 10:case 13:case 15:this.$=e[s];break;case 11:case 14:this.$=e[s-2]+"."+e[s];break;case 12:case 16:this.$=e[s-1]+e[s];break;case 17:case 18:this.$=e[s-1]+"~"+e[s]+"~";break;case 19:l.addRelation(e[s]);break;case 20:e[s-1].title=l.cleanupLabel(e[s]),l.addRelation(e[s-1]);break;case 31:this.$=e[s].trim(),l.setAccTitle(this.$);break;case 32:case 33:this.$=e[s].trim(),l.setAccDescription(this.$);break;case 34:l.addClassesToNamespace(e[s-3],e[s-1][0],e[s-1][1]),l.popNamespace();break;case 35:l.addClassesToNamespace(e[s-4],e[s-1][0],e[s-1][1]),l.popNamespace();break;case 36:this.$=l.addNamespace(e[s]);break;case 37:this.$=l.addNamespace(e[s-1],e[s]);break;case 38:this.$=[[e[s]],[]];break;case 39:this.$=[[e[s-1]],[]];break;case 40:e[s][0].unshift(e[s-2]),this.$=e[s];break;case 41:this.$=[[],[e[s]]];break;case 42:this.$=[[],[e[s-1]]];break;case 43:e[s][1].unshift(e[s-2]),this.$=e[s];break;case 44:case 45:this.$=[[],[]];break;case 46:this.$=e[s];break;case 48:l.setCssClass(e[s-2],e[s]);break;case 49:l.addMembers(e[s-3],e[s-1]);break;case 51:l.setCssClass(e[s-5],e[s-3]),l.addMembers(e[s-5],e[s-1]);break;case 52:l.addAnnotation(e[s-3],e[s-1]);break;case 53:l.addAnnotation(e[s-6],e[s-4]),l.addMembers(e[s-6],e[s-1]);break;case 54:l.addAnnotation(e[s-5],e[s-3]);break;case 55:this.$=e[s],l.addClass(e[s]);break;case 56:this.$=e[s-1],l.addClass(e[s-1]),l.setClassLabel(e[s-1],e[s]);break;case 60:l.addAnnotation(e[s],e[s-2]);break;case 61:case 74:this.$=[e[s]];break;case 62:e[s].push(e[s-1]),this.$=e[s];break;case 63:break;case 64:l.addMember(e[s-1],l.cleanupLabel(e[s]));break;case 65:break;case 66:break;case 67:this.$={id1:e[s-2],id2:e[s],relation:e[s-1],relationTitle1:"none",relationTitle2:"none"};break;case 68:this.$={id1:e[s-3],id2:e[s],relation:e[s-1],relationTitle1:e[s-2],relationTitle2:"none"};break;case 69:this.$={id1:e[s-3],id2:e[s],relation:e[s-2],relationTitle1:"none",relationTitle2:e[s-1]};break;case 70:this.$={id1:e[s-4],id2:e[s],relation:e[s-2],relationTitle1:e[s-3],relationTitle2:e[s-1]};break;case 71:this.$=l.addNote(e[s],e[s-1]);break;case 72:this.$=l.addNote(e[s]);break;case 73:this.$=e[s-2],l.defineClass(e[s-1],e[s]);break;case 75:this.$=e[s-2].concat([e[s]]);break;case 76:l.setDirection("TB");break;case 77:l.setDirection("BT");break;case 78:l.setDirection("RL");break;case 79:l.setDirection("LR");break;case 80:this.$={type1:e[s-2],type2:e[s],lineType:e[s-1]};break;case 81:this.$={type1:"none",type2:e[s],lineType:e[s-1]};break;case 82:this.$={type1:e[s-1],type2:"none",lineType:e[s]};break;case 83:this.$={type1:"none",type2:"none",lineType:e[s]};break;case 84:this.$=l.relationType.AGGREGATION;break;case 85:this.$=l.relationType.EXTENSION;break;case 86:this.$=l.relationType.COMPOSITION;break;case 87:this.$=l.relationType.DEPENDENCY;break;case 88:this.$=l.relationType.LOLLIPOP;break;case 89:this.$=l.lineType.LINE;break;case 90:this.$=l.lineType.DOTTED_LINE;break;case 91:case 97:this.$=e[s-2],l.setClickEvent(e[s-1],e[s]);break;case 92:case 98:this.$=e[s-3],l.setClickEvent(e[s-2],e[s-1]),l.setTooltip(e[s-2],e[s]);break;case 93:this.$=e[s-2],l.setLink(e[s-1],e[s]);break;case 94:this.$=e[s-3],l.setLink(e[s-2],e[s-1],e[s]);break;case 95:this.$=e[s-3],l.setLink(e[s-2],e[s-1]),l.setTooltip(e[s-2],e[s]);break;case 96:this.$=e[s-4],l.setLink(e[s-3],e[s-2],e[s]),l.setTooltip(e[s-3],e[s-1]);break;case 99:this.$=e[s-3],l.setClickEvent(e[s-2],e[s-1],e[s]);break;case 100:this.$=e[s-4],l.setClickEvent(e[s-3],e[s-2],e[s-1]),l.setTooltip(e[s-3],e[s]);break;case 101:this.$=e[s-3],l.setLink(e[s-2],e[s]);break;case 102:this.$=e[s-4],l.setLink(e[s-3],e[s-1],e[s]);break;case 103:this.$=e[s-4],l.setLink(e[s-3],e[s-1]),l.setTooltip(e[s-3],e[s]);break;case 104:this.$=e[s-5],l.setLink(e[s-4],e[s-2],e[s]),l.setTooltip(e[s-4],e[s-1]);break;case 105:this.$=e[s-2],l.setCssStyle(e[s-1],e[s]);break;case 106:l.setCssClass(e[s-1],e[s]);break;case 107:this.$=[e[s]];break;case 108:e[s-2].push(e[s]),this.$=e[s-2];break;case 110:this.$=e[s-1]+e[s];break}},"anonymous"),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:i,35:a,37:n,38:22,42:r,43:23,46:c,48:u,51:d,52:m,54:g,56:N,57:Ae,60:b,62:fe,63:ge,64:me,65:Ce,75:be,76:ke,78:Ee,82:Te,83:ye,86:k,100:E,102:T,103:y},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},t(De,[2,5],{8:[1,48]}),{8:[1,49]},t(A,[2,19],{22:[1,50]}),t(A,[2,21]),t(A,[2,22]),t(A,[2,23]),t(A,[2,24]),t(A,[2,25]),t(A,[2,26]),t(A,[2,27]),t(A,[2,28]),t(A,[2,29]),t(A,[2,30]),{34:[1,51]},{36:[1,52]},t(A,[2,33]),t(A,[2,63],{53:53,66:56,67:57,13:[1,54],22:[1,55],68:Z,69:$,70:ee,71:te,72:se,73:Fe,74:Be}),{39:[1,65]},t(_,[2,47],{39:[1,67],44:[1,66],46:[1,68]}),t(A,[2,65]),t(A,[2,66]),{16:69,60:b,86:k,100:E,102:T},{16:39,17:40,19:70,60:b,86:k,100:E,102:T,103:y},{16:39,17:40,19:71,60:b,86:k,100:E,102:T,103:y},{16:39,17:40,19:72,60:b,86:k,100:E,102:T,103:y},{60:[1,73]},{13:[1,74]},{16:39,17:40,19:75,60:b,86:k,100:E,102:T,103:y},{13:Pe,55:76},{58:78,60:[1,79]},t(A,[2,76]),t(A,[2,77]),t(A,[2,78]),t(A,[2,79]),t(M,[2,13],{16:39,17:40,19:81,18:[1,80],20:[1,82],60:b,86:k,100:E,102:T,103:y}),t(M,[2,15],{20:[1,83]}),{15:84,16:85,17:86,60:b,86:k,100:E,102:T,103:y},{16:39,17:40,19:87,60:b,86:k,100:E,102:T,103:y},t(ie,[2,133]),t(ie,[2,134]),t(ie,[2,135]),t(ie,[2,136]),t([1,8,9,12,13,20,22,39,41,44,46,68,69,70,71,72,73,74,79,81],[2,137]),t(De,[2,6],{10:5,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,19:21,38:22,43:23,16:39,17:40,5:88,33:i,35:a,37:n,42:r,46:c,48:u,51:d,52:m,54:g,56:N,57:Ae,60:b,62:fe,63:ge,64:me,65:Ce,75:be,76:ke,78:Ee,82:Te,83:ye,86:k,100:E,102:T,103:y}),{5:89,10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:i,35:a,37:n,38:22,42:r,43:23,46:c,48:u,51:d,52:m,54:g,56:N,57:Ae,60:b,62:fe,63:ge,64:me,65:Ce,75:be,76:ke,78:Ee,82:Te,83:ye,86:k,100:E,102:T,103:y},t(A,[2,20]),t(A,[2,31]),t(A,[2,32]),{13:[1,91],16:39,17:40,19:90,60:b,86:k,100:E,102:T,103:y},{53:92,66:56,67:57,68:Z,69:$,70:ee,71:te,72:se,73:Fe,74:Be},t(A,[2,64]),{67:93,73:Fe,74:Be},t(ae,[2,83],{66:94,68:Z,69:$,70:ee,71:te,72:se}),t(U,[2,84]),t(U,[2,85]),t(U,[2,86]),t(U,[2,87]),t(U,[2,88]),t(Me,[2,89]),t(Me,[2,90]),{8:[1,96],23:99,24:97,30:98,38:22,40:95,42:r,43:23,48:u,54:g,56:N},{16:100,60:b,86:k,100:E,102:T},{41:[1,102],45:101,51:ne},{16:104,60:b,86:k,100:E,102:T},{47:[1,105]},{13:[1,106]},{13:[1,107]},{79:[1,108],81:[1,109]},{22:z,50:Y,59:110,60:K,82:W,84:111,85:112,86:Q,87:j,88:X,89:q,90:H},{60:[1,122]},{13:Pe,55:123},t(_,[2,72]),t(_,[2,138]),{22:z,50:Y,59:124,60:K,61:[1,125],82:W,84:111,85:112,86:Q,87:j,88:X,89:q,90:H},t(Re,[2,74]),{16:39,17:40,19:126,60:b,86:k,100:E,102:T,103:y},t(M,[2,16]),t(M,[2,17]),t(M,[2,18]),{11:127,12:Ge,39:[2,36]},t(re,[2,9],{16:85,17:86,15:130,18:[1,129],60:b,86:k,100:E,102:T,103:y}),t(re,[2,10]),t(_e,[2,55],{11:131,12:Ge}),t(De,[2,7]),{9:[1,132]},t(ue,[2,67]),{16:39,17:40,19:133,60:b,86:k,100:E,102:T,103:y},{13:[1,135],16:39,17:40,19:134,60:b,86:k,100:E,102:T,103:y},t(ae,[2,82],{66:136,68:Z,69:$,70:ee,71:te,72:se}),t(ae,[2,81]),{41:[1,137]},{23:99,24:97,30:98,38:22,40:138,42:r,43:23,48:u,54:g,56:N},{8:[1,139],41:[2,38]},{8:[1,140],41:[2,41]},{8:[1,141],41:[2,44]},t(_,[2,48],{39:[1,142]}),{41:[1,143]},t(_,[2,50]),{41:[2,61],45:144,51:ne},{47:[1,145]},{16:39,17:40,19:146,60:b,86:k,100:E,102:T,103:y},t(A,[2,91],{13:[1,147]}),t(A,[2,93],{13:[1,149],77:[1,148]}),t(A,[2,97],{13:[1,150],80:[1,151]}),{13:[1,152]},t(A,[2,105],{61:Ue}),t(ze,[2,107],{85:154,22:z,50:Y,60:K,82:W,86:Q,87:j,88:X,89:q,90:H}),t(x,[2,109]),t(x,[2,111]),t(x,[2,112]),t(x,[2,113]),t(x,[2,114]),t(x,[2,115]),t(x,[2,116]),t(x,[2,117]),t(x,[2,118]),t(x,[2,119]),t(A,[2,106]),t(_,[2,71]),t(A,[2,73],{61:Ue}),{60:[1,155]},t(M,[2,14]),{39:[2,37]},{13:[1,156]},{15:157,16:85,17:86,60:b,86:k,100:E,102:T,103:y},t(re,[2,12]),t(_e,[2,56]),{1:[2,4]},t(ue,[2,69]),t(ue,[2,68]),{16:39,17:40,19:158,60:b,86:k,100:E,102:T,103:y},t(ae,[2,80]),t(_,[2,34]),{41:[1,159]},{23:99,24:97,30:98,38:22,40:160,41:[2,39],42:r,43:23,48:u,54:g,56:N},{23:99,24:97,30:98,38:22,40:161,41:[2,42],42:r,43:23,48:u,54:g,56:N},{23:99,24:97,30:98,38:22,40:162,41:[2,45],42:r,43:23,48:u,54:g,56:N},{45:163,51:ne},t(_,[2,49]),{41:[2,62]},t(_,[2,52],{39:[1,164]}),t(A,[2,60]),t(A,[2,92]),t(A,[2,94]),t(A,[2,95],{77:[1,165]}),t(A,[2,98]),t(A,[2,99],{13:[1,166]}),t(A,[2,101],{13:[1,168],77:[1,167]}),{22:z,50:Y,60:K,82:W,84:169,85:112,86:Q,87:j,88:X,89:q,90:H},t(x,[2,110]),t(Re,[2,75]),{14:[1,170]},t(re,[2,11]),t(ue,[2,70]),t(_,[2,35]),{41:[2,40]},{41:[2,43]},{41:[2,46]},{41:[1,171]},{41:[1,173],45:172,51:ne},t(A,[2,96]),t(A,[2,100]),t(A,[2,102]),t(A,[2,103],{77:[1,174]}),t(ze,[2,108],{85:154,22:z,50:Y,60:K,82:W,86:Q,87:j,88:X,89:q,90:H}),t(_e,[2,8]),t(_,[2,51]),{41:[1,175]},t(_,[2,54]),t(A,[2,104]),t(_,[2,53])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],127:[2,37],132:[2,4],144:[2,62],160:[2,40],161:[2,43],162:[2,46]},parseError:f(function(o,h){if(h.recoverable)this.trace(o);else{var p=new Error(o);throw p.hash=h,p}},"parseError"),parse:f(function(o){var h=this,p=[0],l=[],C=[null],e=[],J=this.table,s="",ce=0,Ye=0,Je=2,Ke=1,Ze=e.slice.call(arguments,1),D=Object.create(this.lexer),w={yy:{}};for(var Ne in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ne)&&(w.yy[Ne]=this.yy[Ne]);D.setInput(o,w.yy),w.yy.lexer=D,w.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var Le=D.yylloc;e.push(Le);var $e=D.options&&D.options.ranges;typeof w.yy.parseError=="function"?this.parseError=w.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function et(S){p.length=p.length-2*S,C.length=C.length-S,e.length=e.length-S}f(et,"popStack");function We(){var S;return S=l.pop()||D.lex()||Ke,typeof S!="number"&&(S instanceof Array&&(l=S,S=l.pop()),S=h.symbols_[S]||S),S}f(We,"lex");for(var B,V,L,xe,R={},oe,v,Qe,he;;){if(V=p[p.length-1],this.defaultActions[V]?L=this.defaultActions[V]:((B===null||typeof B>"u")&&(B=We()),L=J[V]&&J[V][B]),typeof L>"u"||!L.length||!L[0]){var ve="";he=[];for(oe in J[V])this.terminals_[oe]&&oe>Je&&he.push("'"+this.terminals_[oe]+"'");D.showPosition?ve="Parse error on line "+(ce+1)+`:
 `+D.showPosition()+`
 Expecting `+he.join(", ")+", got '"+(this.terminals_[B]||B)+"'":ve="Parse error on line "+(ce+1)+": Unexpected "+(B==Ke?"end of input":"'"+(this.terminals_[B]||B)+"'"),this.parseError(ve,{text:D.match,token:this.terminals_[B]||B,line:D.yylineno,loc:Le,expected:he})}if(L[0]instanceof Array&&L.length>1)throw new Error("Parse Error: multiple actions possible at state: "+V+", token: "+B);switch(L[0]){case 1:p.push(B),C.push(D.yytext),e.push(D.yylloc),p.push(L[1]),B=null,Ye=D.yyleng,s=D.yytext,ce=D.yylineno,Le=D.yylloc;break;case 2:if(v=this.productions_[L[1]][1],R.$=C[C.length-v],R._$={first_line:e[e.length-(v||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(v||1)].first_column,last_column:e[e.length-1].last_column},$e&&(R._$.range=[e[e.length-(v||1)].range[0],e[e.length-1].range[1]]),xe=this.performAction.apply(R,[s,Ye,ce,w.yy,L[1],C,e].concat(Ze)),typeof xe<"u")return xe;v&&(p=p.slice(0,-1*v*2),C=C.slice(0,-1*v),e=e.slice(0,-1*v)),p.push(this.productions_[L[1]][0]),C.push(R.$),e.push(R._$),Qe=J[p[p.length-2]][p[p.length-1]],p.push(Qe);break;case 3:return!0}}return!0},"parse")},He=(function(){var O={EOF:1,parseError:f(function(h,p){if(this.yy.parser)this.yy.parser.parseError(h,p);else throw new Error(h)},"parseError"),setInput:f(function(o,h){return this.yy=h||this.yy||{},this._input=o,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:f(function(){var o=this._input[0];this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o;var h=o.match(/(?:\r\n?|\n).*/g);return h?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),o},"input"),unput:f(function(o){var h=o.length,p=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-h),this.offset-=h;var l=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),p.length-1&&(this.yylineno-=p.length-1);var C=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:p?(p.length===l.length?this.yylloc.first_column:0)+l[l.length-p.length].length-p[0].length:this.yylloc.first_column-h},this.options.ranges&&(this.yylloc.range=[C[0],C[0]+this.yyleng-h]),this.yyleng=this.yytext.length,this},"unput"),more:f(function(){return this._more=!0,this},"more"),reject:f(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
 `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:f(function(o){this.unput(this.match.slice(o))},"less"),pastInput:f(function(){var o=this.matched.substr(0,this.matched.length-this.match.length);return(o.length>20?"...":"")+o.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:f(function(){var o=this.match;return o.length<20&&(o+=this._input.substr(0,20-o.length)),(o.substr(0,20)+(o.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:f(function(){var o=this.pastInput(),h=new Array(o.length+1).join("-");return o+this.upcomingInput()+`
diff --git a/apps/pythinker-code/dist-web/assets/chunk-POPQ4Y6H-Tp7S0w--.js b/apps/pythinker-code/dist-web/assets/chunk-POPQ4Y6H-B7iG5qn5.js
similarity index 87%
rename from apps/pythinker-code/dist-web/assets/chunk-POPQ4Y6H-Tp7S0w--.js
rename to apps/pythinker-code/dist-web/assets/chunk-POPQ4Y6H-B7iG5qn5.js
index a082c8c07..a1f2409b8 100644
--- a/apps/pythinker-code/dist-web/assets/chunk-POPQ4Y6H-Tp7S0w--.js
+++ b/apps/pythinker-code/dist-web/assets/chunk-POPQ4Y6H-B7iG5qn5.js
@@ -1 +1 @@
-import{_ as a,d as w,l as x}from"./mermaid.core-D6Xg32pF.js";var B=a((e,t,i,r)=>{e.attr("class",i);const{width:o,height:h,x:n,y:c}=u(e,t);w(e,h,o,r);const s=d(n,c,o,h,t);e.attr("viewBox",s),x.debug(`viewBox configured: ${s} with padding: ${t}`)},"setupViewPortForSVG"),u=a((e,t)=>{const i=e.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:i.width+t*2,height:i.height+t*2,x:i.x,y:i.y}},"calculateDimensionsWithPadding"),d=a((e,t,i,r,o)=>`${e-o} ${t-o} ${i} ${r}`,"createViewBox");export{B as s};
+import{_ as a,d as w,l as x}from"./mermaid.core-BLsmN-lt.js";var B=a((e,t,i,r)=>{e.attr("class",i);const{width:o,height:h,x:n,y:c}=u(e,t);w(e,h,o,r);const s=d(n,c,o,h,t);e.attr("viewBox",s),x.debug(`viewBox configured: ${s} with padding: ${t}`)},"setupViewPortForSVG"),u=a((e,t)=>{const i=e.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:i.width+t*2,height:i.height+t*2,x:i.x,y:i.y}},"calculateDimensionsWithPadding"),d=a((e,t,i,r,o)=>`${e-o} ${t-o} ${i} ${r}`,"createViewBox");export{B as s};
diff --git a/apps/pythinker-code/dist-web/assets/chunk-SVP7TREG-D_60I4PC.js b/apps/pythinker-code/dist-web/assets/chunk-SVP7TREG-B4Y-lvg8.js
similarity index 99%
rename from apps/pythinker-code/dist-web/assets/chunk-SVP7TREG-D_60I4PC.js
rename to apps/pythinker-code/dist-web/assets/chunk-SVP7TREG-B4Y-lvg8.js
index 9e911b913..ff7d2e421 100644
--- a/apps/pythinker-code/dist-web/assets/chunk-SVP7TREG-D_60I4PC.js
+++ b/apps/pythinker-code/dist-web/assets/chunk-SVP7TREG-B4Y-lvg8.js
@@ -1,4 +1,4 @@
-import{_ as p,l as w,G as L,A as E,r as X,X as I,d as G,i as H,c as q}from"./mermaid.core-D6Xg32pF.js";var z="",b="",N="",A=[],R=new Map,k=p(e=>H(e,q()),"sanitizeText"),F=p(e=>{switch(e.type){case"terminal":return{...e,value:k(e.value)};case"nonterminal":return{...e,name:k(e.name)};case"sequence":return{...e,elements:e.elements.map(F)};case"choice":return{...e,alternatives:e.alternatives.map(F)};case"optional":return{...e,element:F(e.element)};case"repetition":return{...e,element:F(e.element),separator:e.separator?F(e.separator):void 0};case"special":return{...e,text:k(e.text)}}},"sanitizeAstNode"),U=p(()=>{z="",b="",N="",A.length=0,R.clear(),X(),w.debug("[Railroad] Database cleared")},"clear"),_=p(e=>{z=k(e),w.debug("[Railroad] Title set:",e)},"setTitle"),W=p(()=>z,"getTitle"),j=p(e=>{const i={...e,name:k(e.name),definition:F(e.definition),comment:e.comment?k(e.comment):void 0};w.debug("[Railroad] Adding rule:",i.name),R.has(i.name)&&w.warn(`[Railroad] Rule '${i.name}' is already defined. Overwriting.`),A.push(i),R.set(i.name,i)},"addRule"),K=p(()=>A,"getRules"),J=p(e=>R.get(e),"getRule"),Q=p(e=>{b=k(e).replace(/^\s+/g,""),w.debug("[Railroad] Accessibility title set:",e)},"setAccTitle"),Z=p(()=>b,"getAccTitle"),V=p(e=>{N=k(e).replace(/\n\s+/g,`
+import{_ as p,l as w,G as L,A as E,r as X,X as I,d as G,i as H,c as q}from"./mermaid.core-BLsmN-lt.js";var z="",b="",N="",A=[],R=new Map,k=p(e=>H(e,q()),"sanitizeText"),F=p(e=>{switch(e.type){case"terminal":return{...e,value:k(e.value)};case"nonterminal":return{...e,name:k(e.name)};case"sequence":return{...e,elements:e.elements.map(F)};case"choice":return{...e,alternatives:e.alternatives.map(F)};case"optional":return{...e,element:F(e.element)};case"repetition":return{...e,element:F(e.element),separator:e.separator?F(e.separator):void 0};case"special":return{...e,text:k(e.text)}}},"sanitizeAstNode"),U=p(()=>{z="",b="",N="",A.length=0,R.clear(),X(),w.debug("[Railroad] Database cleared")},"clear"),_=p(e=>{z=k(e),w.debug("[Railroad] Title set:",e)},"setTitle"),W=p(()=>z,"getTitle"),j=p(e=>{const i={...e,name:k(e.name),definition:F(e.definition),comment:e.comment?k(e.comment):void 0};w.debug("[Railroad] Adding rule:",i.name),R.has(i.name)&&w.warn(`[Railroad] Rule '${i.name}' is already defined. Overwriting.`),A.push(i),R.set(i.name,i)},"addRule"),K=p(()=>A,"getRules"),J=p(e=>R.get(e),"getRule"),Q=p(e=>{b=k(e).replace(/^\s+/g,""),w.debug("[Railroad] Accessibility title set:",e)},"setAccTitle"),Z=p(()=>b,"getAccTitle"),V=p(e=>{N=k(e).replace(/\n\s+/g,`
 `),w.debug("[Railroad] Accessibility description set:",e)},"setAccDescription"),ee=p(()=>N,"getAccDescription"),te=_,re=W,ie={clear:U,setTitle:_,getTitle:W,addRule:j,getRules:K,getRule:J,setAccTitle:Q,getAccTitle:Z,setAccDescription:V,getAccDescription:ee,setDiagramTitle:te,getDiagramTitle:re},g={compactMode:!1,padding:10,verticalSeparation:8,horizontalSeparation:10,arcRadius:10,fontSize:14,fontFamily:"monospace",terminalFill:"#FFFFC0",terminalStroke:"#000000",terminalTextColor:"#000000",nonTerminalFill:"#FFFFFF",nonTerminalStroke:"#000000",nonTerminalTextColor:"#000000",lineColor:"#000000",strokeWidth:2,markerFill:"#000000",commentFill:"#E8E8E8",commentStroke:"#888888",commentTextColor:"#666666",specialFill:"#F0E0FF",specialStroke:"#8800CC",ruleNameColor:"#000066",showMarkers:!0,markerRadius:5},ne=/^#(?:[\da-f]{3,4}|[\da-f]{6}|[\da-f]{8})$|^(?:rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch)\([\d\s%+,./-]+\)$|^[a-z]+$/i,ae=/^[\w "',.-]+$/,oe=new Set(["compactMode","padding","verticalSeparation","horizontalSeparation","arcRadius","fontSize","fontFamily","terminalFill","terminalStroke","terminalTextColor","nonTerminalFill","nonTerminalStroke","nonTerminalTextColor","lineColor","strokeWidth","markerFill","commentFill","commentStroke","commentTextColor","specialFill","specialStroke","ruleNameColor","showMarkers","markerRadius"]),B=p(e=>e?Object.keys(e).every(i=>i==="railroad"||oe.has(i)):!1,"isRailroadStyleOptions"),le=p(e=>e?"railroad"in e&&e.railroad?e.railroad:B(e)?e:{}:{},"extractRailroadOverrides"),se=p(e=>{if(!e||B(e))return{};const{railroad:i,svgId:a,theme:r,look:t,...n}=e;return n},"extractThemeOverrides"),m=p((e,i)=>{if(typeof e!="string")return i;const a=e.trim();return ne.test(a)?a:i},"sanitizeColorValue"),Y=p((e,i)=>{if(typeof e!="string")return i;const a=e.trim();return ae.test(a)?a:i},"sanitizeFontFamilyValue"),S=p((e,i)=>{const a=typeof e=="number"?e:typeof e=="string"?Number.parseFloat(e):Number.NaN;return Number.isFinite(a)&&a>=0?a:i},"sanitizeNumberValue"),de=p(e=>{const i=typeof e=="number"?e:typeof e=="string"?Number.parseFloat(e):Number.NaN;return Number.isFinite(i)&&i>0?i:void 0},"parseThemeFontSize"),ce=p(e=>{const i=Y(e.fontFamily,g.fontFamily),a=de(e.fontSize)??g.fontSize;return{...g,fontFamily:i,fontSize:a,terminalFill:m(e.secondBkg??e.secondaryColor,g.terminalFill),terminalStroke:m(e.secondaryBorderColor??e.lineColor,g.terminalStroke),terminalTextColor:m(e.secondaryTextColor??e.textColor,g.terminalTextColor),nonTerminalFill:m(e.mainBkg??e.background,g.nonTerminalFill),nonTerminalStroke:m(e.primaryBorderColor??e.lineColor,g.nonTerminalStroke),nonTerminalTextColor:m(e.primaryTextColor??e.textColor,g.nonTerminalTextColor),lineColor:m(e.lineColor,g.lineColor),markerFill:m(e.lineColor,g.markerFill),commentFill:m(e.labelBackground??e.tertiaryColor,g.commentFill),commentStroke:m(e.tertiaryBorderColor??e.lineColor,g.commentStroke),commentTextColor:m(e.tertiaryTextColor??e.textColor,g.commentTextColor),specialFill:m(e.tertiaryColor??e.secondaryColor,g.specialFill),specialStroke:m(e.tertiaryBorderColor??e.secondaryBorderColor,g.specialStroke),ruleNameColor:m(e.titleColor??e.textColor,g.ruleNameColor)}},"buildThemeDefaults"),M=p(e=>{const i=E(),a={...I(),...i.themeVariables??{},...se(e)},r=ce(a),t={...i.railroad??{},...le(e)};return{compactMode:t.compactMode??r.compactMode,padding:S(t.padding,r.padding),verticalSeparation:S(t.verticalSeparation,r.verticalSeparation),horizontalSeparation:S(t.horizontalSeparation,r.horizontalSeparation),arcRadius:S(t.arcRadius,r.arcRadius),fontSize:S(t.fontSize,r.fontSize),fontFamily:Y(t.fontFamily,r.fontFamily),terminalFill:m(t.terminalFill,r.terminalFill),terminalStroke:m(t.terminalStroke,r.terminalStroke),terminalTextColor:m(t.terminalTextColor,r.terminalTextColor),nonTerminalFill:m(t.nonTerminalFill,r.nonTerminalFill),nonTerminalStroke:m(t.nonTerminalStroke,r.nonTerminalStroke),nonTerminalTextColor:m(t.nonTerminalTextColor,r.nonTerminalTextColor),lineColor:m(t.lineColor,r.lineColor),strokeWidth:S(t.strokeWidth,r.strokeWidth),markerFill:m(t.markerFill,r.markerFill),commentFill:m(t.commentFill,r.commentFill),commentStroke:m(t.commentStroke,r.commentStroke),commentTextColor:m(t.commentTextColor,r.commentTextColor),specialFill:m(t.specialFill,r.specialFill),specialStroke:m(t.specialStroke,r.specialStroke),ruleNameColor:m(t.ruleNameColor,r.ruleNameColor),showMarkers:t.showMarkers??r.showMarkers,markerRadius:S(t.markerRadius,r.markerRadius)}},"buildRailroadStyleOptions"),ue=p(e=>{const{fontFamily:i,fontSize:a,terminalFill:r,terminalStroke:t,terminalTextColor:n,nonTerminalFill:h,nonTerminalStroke:s,nonTerminalTextColor:o,lineColor:u,strokeWidth:c,markerFill:d,commentFill:x,commentStroke:l,commentTextColor:f,specialFill:y,specialStroke:v,ruleNameColor:C}=M(e);return`
   .railroad-diagram {
     font-family: ${i};
diff --git a/apps/pythinker-code/dist-web/assets/chunk-XXDRQBXY-BOyQwG-7.js b/apps/pythinker-code/dist-web/assets/chunk-XXDRQBXY-Pj2mkOow.js
similarity index 72%
rename from apps/pythinker-code/dist-web/assets/chunk-XXDRQBXY-BOyQwG-7.js
rename to apps/pythinker-code/dist-web/assets/chunk-XXDRQBXY-Pj2mkOow.js
index 8fc8622e2..ba7928b05 100644
--- a/apps/pythinker-code/dist-web/assets/chunk-XXDRQBXY-BOyQwG-7.js
+++ b/apps/pythinker-code/dist-web/assets/chunk-XXDRQBXY-Pj2mkOow.js
@@ -1 +1 @@
-import{_ as a,j as o}from"./mermaid.core-D6Xg32pF.js";var g=a((t,e)=>{let n;return e==="sandbox"&&(n=o("#i"+t)),(e==="sandbox"?o(n.nodes()[0].contentDocument.body):o("body")).select(`[id="${t}"]`)},"getDiagramElement");export{g};
+import{_ as a,j as o}from"./mermaid.core-BLsmN-lt.js";var g=a((t,e)=>{let n;return e==="sandbox"&&(n=o("#i"+t)),(e==="sandbox"?o(n.nodes()[0].contentDocument.body):o("body")).select(`[id="${t}"]`)},"getDiagramElement");export{g};
diff --git a/apps/pythinker-code/dist-web/assets/classDiagram-DTDB5LWJ-9LZ2e6T0.js b/apps/pythinker-code/dist-web/assets/classDiagram-DTDB5LWJ-9LZ2e6T0.js
deleted file mode 100644
index 9ab4a7878..000000000
--- a/apps/pythinker-code/dist-web/assets/classDiagram-DTDB5LWJ-9LZ2e6T0.js
+++ /dev/null
@@ -1 +0,0 @@
-import{s as a,c as s,a as e,C as t}from"./chunk-LCL6LL3I-C-wDwoC0.js";import{_ as i}from"./mermaid.core-D6Xg32pF.js";import"./chunk-5VM5RSS4-baBluNR7.js";import"./chunk-XXDRQBXY-BOyQwG-7.js";import"./chunk-POPQ4Y6H-Tp7S0w--.js";import"./chunk-F27PBJKO-B_4WdsPc.js";import"./purify.es-5AjVNlXF.js";import"./index-D9Nz1t7z.js";var f={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{f as diagram};
diff --git a/apps/pythinker-code/dist-web/assets/classDiagram-DTDB5LWJ-C6Ct91st.js b/apps/pythinker-code/dist-web/assets/classDiagram-DTDB5LWJ-C6Ct91st.js
new file mode 100644
index 000000000..bbbfa8983
--- /dev/null
+++ b/apps/pythinker-code/dist-web/assets/classDiagram-DTDB5LWJ-C6Ct91st.js
@@ -0,0 +1 @@
+import{s as a,c as s,a as e,C as t}from"./chunk-LCL6LL3I-COmMpiZO.js";import{_ as i}from"./mermaid.core-BLsmN-lt.js";import"./chunk-5VM5RSS4-D8DHuAth.js";import"./chunk-XXDRQBXY-Pj2mkOow.js";import"./chunk-POPQ4Y6H-B7iG5qn5.js";import"./chunk-F27PBJKO-DtNIaJ4B.js";import"./purify.es-5AjVNlXF.js";import"./index-XmhyfFRf.js";var f={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{f as diagram};
diff --git a/apps/pythinker-code/dist-web/assets/classDiagram-v2-JRS7N3AN-9LZ2e6T0.js b/apps/pythinker-code/dist-web/assets/classDiagram-v2-JRS7N3AN-9LZ2e6T0.js
deleted file mode 100644
index 9ab4a7878..000000000
--- a/apps/pythinker-code/dist-web/assets/classDiagram-v2-JRS7N3AN-9LZ2e6T0.js
+++ /dev/null
@@ -1 +0,0 @@
-import{s as a,c as s,a as e,C as t}from"./chunk-LCL6LL3I-C-wDwoC0.js";import{_ as i}from"./mermaid.core-D6Xg32pF.js";import"./chunk-5VM5RSS4-baBluNR7.js";import"./chunk-XXDRQBXY-BOyQwG-7.js";import"./chunk-POPQ4Y6H-Tp7S0w--.js";import"./chunk-F27PBJKO-B_4WdsPc.js";import"./purify.es-5AjVNlXF.js";import"./index-D9Nz1t7z.js";var f={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{f as diagram};
diff --git a/apps/pythinker-code/dist-web/assets/classDiagram-v2-JRS7N3AN-C6Ct91st.js b/apps/pythinker-code/dist-web/assets/classDiagram-v2-JRS7N3AN-C6Ct91st.js
new file mode 100644
index 000000000..bbbfa8983
--- /dev/null
+++ b/apps/pythinker-code/dist-web/assets/classDiagram-v2-JRS7N3AN-C6Ct91st.js
@@ -0,0 +1 @@
+import{s as a,c as s,a as e,C as t}from"./chunk-LCL6LL3I-COmMpiZO.js";import{_ as i}from"./mermaid.core-BLsmN-lt.js";import"./chunk-5VM5RSS4-D8DHuAth.js";import"./chunk-XXDRQBXY-Pj2mkOow.js";import"./chunk-POPQ4Y6H-B7iG5qn5.js";import"./chunk-F27PBJKO-DtNIaJ4B.js";import"./purify.es-5AjVNlXF.js";import"./index-XmhyfFRf.js";var f={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{f as diagram};
diff --git a/apps/pythinker-code/dist-web/assets/cose-bilkent-JH36ORCC-DvKBGuII.js b/apps/pythinker-code/dist-web/assets/cose-bilkent-JH36ORCC-CCcadSd9.js
similarity index 99%
rename from apps/pythinker-code/dist-web/assets/cose-bilkent-JH36ORCC-DvKBGuII.js
rename to apps/pythinker-code/dist-web/assets/cose-bilkent-JH36ORCC-CCcadSd9.js
index 99e5c8d1a..3dacb4780 100644
--- a/apps/pythinker-code/dist-web/assets/cose-bilkent-JH36ORCC-DvKBGuII.js
+++ b/apps/pythinker-code/dist-web/assets/cose-bilkent-JH36ORCC-CCcadSd9.js
@@ -1 +1 @@
-import{b4 as lt,_ as V,l as $,j as gt}from"./mermaid.core-D6Xg32pF.js";import{c as tt}from"./cytoscape.esm-CNiYdHpY.js";import"./index-D9Nz1t7z.js";import"./purify.es-5AjVNlXF.js";var k={exports:{}},Z={exports:{}},Q={exports:{}},ut=Q.exports,q;function ft(){return q||(q=1,(function(G,b){(function(I,L){G.exports=L()})(ut,function(){return(function(N){var I={};function L(o){if(I[o])return I[o].exports;var e=I[o]={i:o,l:!1,exports:{}};return N[o].call(e.exports,e,e.exports,L),e.l=!0,e.exports}return L.m=N,L.c=I,L.i=function(o){return o},L.d=function(o,e,t){L.o(o,e)||Object.defineProperty(o,e,{configurable:!1,enumerable:!0,get:t})},L.n=function(o){var e=o&&o.__esModule?function(){return o.default}:function(){return o};return L.d(e,"a",e),e},L.o=function(o,e){return Object.prototype.hasOwnProperty.call(o,e)},L.p="",L(L.s=26)})([(function(N,I,L){function o(){}o.QUALITY=1,o.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,o.DEFAULT_INCREMENTAL=!1,o.DEFAULT_ANIMATION_ON_LAYOUT=!0,o.DEFAULT_ANIMATION_DURING_LAYOUT=!1,o.DEFAULT_ANIMATION_PERIOD=50,o.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,o.DEFAULT_GRAPH_MARGIN=15,o.NODE_DIMENSIONS_INCLUDE_LABELS=!1,o.SIMPLE_NODE_SIZE=40,o.SIMPLE_NODE_HALF_SIZE=o.SIMPLE_NODE_SIZE/2,o.EMPTY_COMPOUND_NODE_SIZE=40,o.MIN_EDGE_LENGTH=1,o.WORLD_BOUNDARY=1e6,o.INITIAL_WORLD_BOUNDARY=o.WORLD_BOUNDARY/1e3,o.WORLD_CENTER_X=1200,o.WORLD_CENTER_Y=900,N.exports=o}),(function(N,I,L){var o=L(2),e=L(8),t=L(9);function i(g,n,d){o.call(this,d),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=d,this.bendpoints=[],this.source=g,this.target=n}i.prototype=Object.create(o.prototype);for(var l in o)i[l]=o[l];i.prototype.getSource=function(){return this.source},i.prototype.getTarget=function(){return this.target},i.prototype.isInterGraph=function(){return this.isInterGraph},i.prototype.getLength=function(){return this.length},i.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},i.prototype.getBendpoints=function(){return this.bendpoints},i.prototype.getLca=function(){return this.lca},i.prototype.getSourceInLca=function(){return this.sourceInLca},i.prototype.getTargetInLca=function(){return this.targetInLca},i.prototype.getOtherEnd=function(g){if(this.source===g)return this.target;if(this.target===g)return this.source;throw"Node is not incident with this edge"},i.prototype.getOtherEndInGraph=function(g,n){for(var d=this.getOtherEnd(g),r=n.getGraphManager().getRoot();;){if(d.getOwner()==n)return d;if(d.getOwner()==r)break;d=d.getOwner().getParent()}return null},i.prototype.updateLength=function(){var g=new Array(4);this.isOverlapingSourceAndTarget=e.getIntersection(this.target.getRect(),this.source.getRect(),g),this.isOverlapingSourceAndTarget||(this.lengthX=g[0]-g[2],this.lengthY=g[1]-g[3],Math.abs(this.lengthX)<1&&(this.lengthX=t.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=t.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},i.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=t.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=t.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},N.exports=i}),(function(N,I,L){function o(e){this.vGraphObject=e}N.exports=o}),(function(N,I,L){var o=L(2),e=L(10),t=L(13),i=L(0),l=L(16),g=L(4);function n(r,h,a,p){a==null&&p==null&&(p=h),o.call(this,p),r.graphManager!=null&&(r=r.graphManager),this.estimatedSize=e.MIN_VALUE,this.inclusionTreeDepth=e.MAX_VALUE,this.vGraphObject=p,this.edges=[],this.graphManager=r,a!=null&&h!=null?this.rect=new t(h.x,h.y,a.width,a.height):this.rect=new t}n.prototype=Object.create(o.prototype);for(var d in o)n[d]=o[d];n.prototype.getEdges=function(){return this.edges},n.prototype.getChild=function(){return this.child},n.prototype.getOwner=function(){return this.owner},n.prototype.getWidth=function(){return this.rect.width},n.prototype.setWidth=function(r){this.rect.width=r},n.prototype.getHeight=function(){return this.rect.height},n.prototype.setHeight=function(r){this.rect.height=r},n.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},n.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},n.prototype.getCenter=function(){return new g(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},n.prototype.getLocation=function(){return new g(this.rect.x,this.rect.y)},n.prototype.getRect=function(){return this.rect},n.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},n.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},n.prototype.setRect=function(r,h){this.rect.x=r.x,this.rect.y=r.y,this.rect.width=h.width,this.rect.height=h.height},n.prototype.setCenter=function(r,h){this.rect.x=r-this.rect.width/2,this.rect.y=h-this.rect.height/2},n.prototype.setLocation=function(r,h){this.rect.x=r,this.rect.y=h},n.prototype.moveBy=function(r,h){this.rect.x+=r,this.rect.y+=h},n.prototype.getEdgeListToNode=function(r){var h=[],a=this;return a.edges.forEach(function(p){if(p.target==r){if(p.source!=a)throw"Incorrect edge source!";h.push(p)}}),h},n.prototype.getEdgesBetween=function(r){var h=[],a=this;return a.edges.forEach(function(p){if(!(p.source==a||p.target==a))throw"Incorrect edge source and/or target";(p.target==r||p.source==r)&&h.push(p)}),h},n.prototype.getNeighborsList=function(){var r=new Set,h=this;return h.edges.forEach(function(a){if(a.source==h)r.add(a.target);else{if(a.target!=h)throw"Incorrect incidency!";r.add(a.source)}}),r},n.prototype.withChildren=function(){var r=new Set,h,a;if(r.add(this),this.child!=null)for(var p=this.child.getNodes(),v=0;vh&&(this.rect.x-=(this.labelWidth-h)/2,this.setWidth(this.labelWidth)),this.labelHeight>a&&(this.labelPos=="center"?this.rect.y-=(this.labelHeight-a)/2:this.labelPos=="top"&&(this.rect.y-=this.labelHeight-a),this.setHeight(this.labelHeight))}}},n.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==e.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},n.prototype.transform=function(r){var h=this.rect.x;h>i.WORLD_BOUNDARY?h=i.WORLD_BOUNDARY:h<-i.WORLD_BOUNDARY&&(h=-i.WORLD_BOUNDARY);var a=this.rect.y;a>i.WORLD_BOUNDARY?a=i.WORLD_BOUNDARY:a<-i.WORLD_BOUNDARY&&(a=-i.WORLD_BOUNDARY);var p=new g(h,a),v=r.inverseTransformPoint(p);this.setLocation(v.x,v.y)},n.prototype.getLeft=function(){return this.rect.x},n.prototype.getRight=function(){return this.rect.x+this.rect.width},n.prototype.getTop=function(){return this.rect.y},n.prototype.getBottom=function(){return this.rect.y+this.rect.height},n.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},N.exports=n}),(function(N,I,L){function o(e,t){e==null&&t==null?(this.x=0,this.y=0):(this.x=e,this.y=t)}o.prototype.getX=function(){return this.x},o.prototype.getY=function(){return this.y},o.prototype.setX=function(e){this.x=e},o.prototype.setY=function(e){this.y=e},o.prototype.getDifference=function(e){return new DimensionD(this.x-e.x,this.y-e.y)},o.prototype.getCopy=function(){return new o(this.x,this.y)},o.prototype.translate=function(e){return this.x+=e.width,this.y+=e.height,this},N.exports=o}),(function(N,I,L){var o=L(2),e=L(10),t=L(0),i=L(6),l=L(3),g=L(1),n=L(13),d=L(12),r=L(11);function h(p,v,D){o.call(this,D),this.estimatedSize=e.MIN_VALUE,this.margin=t.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=p,v!=null&&v instanceof i?this.graphManager=v:v!=null&&v instanceof Layout&&(this.graphManager=v.graphManager)}h.prototype=Object.create(o.prototype);for(var a in o)h[a]=o[a];h.prototype.getNodes=function(){return this.nodes},h.prototype.getEdges=function(){return this.edges},h.prototype.getGraphManager=function(){return this.graphManager},h.prototype.getParent=function(){return this.parent},h.prototype.getLeft=function(){return this.left},h.prototype.getRight=function(){return this.right},h.prototype.getTop=function(){return this.top},h.prototype.getBottom=function(){return this.bottom},h.prototype.isConnected=function(){return this.isConnected},h.prototype.add=function(p,v,D){if(v==null&&D==null){var u=p;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(u)>-1)throw"Node already in graph!";return u.owner=this,this.getNodes().push(u),u}else{var T=p;if(!(this.getNodes().indexOf(v)>-1&&this.getNodes().indexOf(D)>-1))throw"Source or target not in graph!";if(!(v.owner==D.owner&&v.owner==this))throw"Both owners must be this graph!";return v.owner!=D.owner?null:(T.source=v,T.target=D,T.isInterGraph=!1,this.getEdges().push(T),v.edges.push(T),D!=v&&D.edges.push(T),T)}},h.prototype.remove=function(p){var v=p;if(p instanceof l){if(v==null)throw"Node is null!";if(!(v.owner!=null&&v.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var D=v.edges.slice(),u,T=D.length,y=0;y-1&&f>-1))throw"Source and/or target doesn't know this edge!";u.source.edges.splice(s,1),u.target!=u.source&&u.target.edges.splice(f,1);var O=u.source.owner.getEdges().indexOf(u);if(O==-1)throw"Not in owner's edge list!";u.source.owner.getEdges().splice(O,1)}},h.prototype.updateLeftTop=function(){for(var p=e.MAX_VALUE,v=e.MAX_VALUE,D,u,T,y=this.getNodes(),O=y.length,s=0;sD&&(p=D),v>u&&(v=u)}return p==e.MAX_VALUE?null:(y[0].getParent().paddingLeft!=null?T=y[0].getParent().paddingLeft:T=this.margin,this.left=v-T,this.top=p-T,new d(this.left,this.top))},h.prototype.updateBounds=function(p){for(var v=e.MAX_VALUE,D=-e.MAX_VALUE,u=e.MAX_VALUE,T=-e.MAX_VALUE,y,O,s,f,c,E=this.nodes,A=E.length,m=0;my&&(v=y),Ds&&(u=s),Ty&&(v=y),Ds&&(u=s),T=this.nodes.length){var A=0;D.forEach(function(m){m.owner==p&&A++}),A==this.nodes.length&&(this.isConnected=!0)}},N.exports=h}),(function(N,I,L){var o,e=L(1);function t(i){o=L(5),this.layout=i,this.graphs=[],this.edges=[]}t.prototype.addRoot=function(){var i=this.layout.newGraph(),l=this.layout.newNode(null),g=this.add(i,l);return this.setRootGraph(g),this.rootGraph},t.prototype.add=function(i,l,g,n,d){if(g==null&&n==null&&d==null){if(i==null)throw"Graph is null!";if(l==null)throw"Parent node is null!";if(this.graphs.indexOf(i)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(i),i.parent!=null)throw"Already has a parent!";if(l.child!=null)throw"Already has a child!";return i.parent=l,l.child=i,i}else{d=g,n=l,g=i;var r=n.getOwner(),h=d.getOwner();if(!(r!=null&&r.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(h!=null&&h.getGraphManager()==this))throw"Target not in this graph mgr!";if(r==h)return g.isInterGraph=!1,r.add(g,n,d);if(g.isInterGraph=!0,g.source=n,g.target=d,this.edges.indexOf(g)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(g),!(g.source!=null&&g.target!=null))throw"Edge source and/or target is null!";if(!(g.source.edges.indexOf(g)==-1&&g.target.edges.indexOf(g)==-1))throw"Edge already in source and/or target incidency list!";return g.source.edges.push(g),g.target.edges.push(g),g}},t.prototype.remove=function(i){if(i instanceof o){var l=i;if(l.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(l==this.rootGraph||l.parent!=null&&l.parent.graphManager==this))throw"Invalid parent node!";var g=[];g=g.concat(l.getEdges());for(var n,d=g.length,r=0;r=i.getRight()?l[0]+=Math.min(i.getX()-t.getX(),t.getRight()-i.getRight()):i.getX()<=t.getX()&&i.getRight()>=t.getRight()&&(l[0]+=Math.min(t.getX()-i.getX(),i.getRight()-t.getRight())),t.getY()<=i.getY()&&t.getBottom()>=i.getBottom()?l[1]+=Math.min(i.getY()-t.getY(),t.getBottom()-i.getBottom()):i.getY()<=t.getY()&&i.getBottom()>=t.getBottom()&&(l[1]+=Math.min(t.getY()-i.getY(),i.getBottom()-t.getBottom()));var d=Math.abs((i.getCenterY()-t.getCenterY())/(i.getCenterX()-t.getCenterX()));i.getCenterY()===t.getCenterY()&&i.getCenterX()===t.getCenterX()&&(d=1);var r=d*l[0],h=l[1]/d;l[0]r)return l[0]=g,l[1]=a,l[2]=d,l[3]=E,!1;if(nd)return l[0]=h,l[1]=n,l[2]=f,l[3]=r,!1;if(gd?(l[0]=v,l[1]=D,R=!0):(l[0]=p,l[1]=a,R=!0):S===w&&(g>d?(l[0]=h,l[1]=a,R=!0):(l[0]=u,l[1]=D,R=!0)),-Y===w?d>g?(l[2]=c,l[3]=E,M=!0):(l[2]=f,l[3]=s,M=!0):Y===w&&(d>g?(l[2]=O,l[3]=s,M=!0):(l[2]=A,l[3]=E,M=!0)),R&&M)return!1;if(g>d?n>r?(x=this.getCardinalDirection(S,w,4),F=this.getCardinalDirection(Y,w,2)):(x=this.getCardinalDirection(-S,w,3),F=this.getCardinalDirection(-Y,w,1)):n>r?(x=this.getCardinalDirection(-S,w,1),F=this.getCardinalDirection(-Y,w,3)):(x=this.getCardinalDirection(S,w,2),F=this.getCardinalDirection(Y,w,4)),!R)switch(x){case 1:P=a,U=g+-y/w,l[0]=U,l[1]=P;break;case 2:U=u,P=n+T*w,l[0]=U,l[1]=P;break;case 3:P=D,U=g+y/w,l[0]=U,l[1]=P;break;case 4:U=v,P=n+-T*w,l[0]=U,l[1]=P;break}if(!M)switch(F){case 1:X=s,_=d+-C/w,l[2]=_,l[3]=X;break;case 2:_=A,X=r+m*w,l[2]=_,l[3]=X;break;case 3:X=E,_=d+C/w,l[2]=_,l[3]=X;break;case 4:_=c,X=r+-m*w,l[2]=_,l[3]=X;break}}return!1},e.getCardinalDirection=function(t,i,l){return t>i?l:1+l%4},e.getIntersection=function(t,i,l,g){if(g==null)return this.getIntersection2(t,i,l);var n=t.x,d=t.y,r=i.x,h=i.y,a=l.x,p=l.y,v=g.x,D=g.y,u=void 0,T=void 0,y=void 0,O=void 0,s=void 0,f=void 0,c=void 0,E=void 0,A=void 0;return y=h-d,s=n-r,c=r*d-n*h,O=D-p,f=a-v,E=v*p-a*D,A=y*f-O*s,A===0?null:(u=(s*E-f*c)/A,T=(O*c-y*E)/A,new o(u,T))},e.angleOfVector=function(t,i,l,g){var n=void 0;return t!==l?(n=Math.atan((g-i)/(l-t)),l0?1:e<0?-1:0},o.floor=function(e){return e<0?Math.ceil(e):Math.floor(e)},o.ceil=function(e){return e<0?Math.floor(e):Math.ceil(e)},N.exports=o}),(function(N,I,L){function o(){}o.MAX_VALUE=2147483647,o.MIN_VALUE=-2147483648,N.exports=o}),(function(N,I,L){var o=(function(){function n(d,r){for(var h=0;h"u"?"undefined":o(t);return t==null||i!="object"&&i!="function"},N.exports=e}),(function(N,I,L){function o(a){if(Array.isArray(a)){for(var p=0,v=Array(a.length);p0&&p;){for(y.push(s[0]);y.length>0&&p;){var f=y[0];y.splice(0,1),T.add(f);for(var c=f.getEdges(),u=0;u-1&&s.splice(C,1)}T=new Set,O=new Map}}return a},h.prototype.createDummyNodesForBendpoints=function(a){for(var p=[],v=a.source,D=this.graphManager.calcLowestCommonAncestor(a.source,a.target),u=0;u0){for(var D=this.edgeToDummyNodes.get(v),u=0;u=0&&p.splice(E,1);var A=O.getNeighborsList();A.forEach(function(R){if(v.indexOf(R)<0){var M=D.get(R),S=M-1;S==1&&f.push(R),D.set(R,S)}})}v=v.concat(f),(p.length==1||p.length==2)&&(u=!0,T=p[0])}return T},h.prototype.setGraphManager=function(a){this.graphManager=a},N.exports=h}),(function(N,I,L){function o(){}o.seed=1,o.x=0,o.nextDouble=function(){return o.x=Math.sin(o.seed++)*1e4,o.x-Math.floor(o.x)},N.exports=o}),(function(N,I,L){var o=L(4);function e(t,i){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}e.prototype.getWorldOrgX=function(){return this.lworldOrgX},e.prototype.setWorldOrgX=function(t){this.lworldOrgX=t},e.prototype.getWorldOrgY=function(){return this.lworldOrgY},e.prototype.setWorldOrgY=function(t){this.lworldOrgY=t},e.prototype.getWorldExtX=function(){return this.lworldExtX},e.prototype.setWorldExtX=function(t){this.lworldExtX=t},e.prototype.getWorldExtY=function(){return this.lworldExtY},e.prototype.setWorldExtY=function(t){this.lworldExtY=t},e.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},e.prototype.setDeviceOrgX=function(t){this.ldeviceOrgX=t},e.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},e.prototype.setDeviceOrgY=function(t){this.ldeviceOrgY=t},e.prototype.getDeviceExtX=function(){return this.ldeviceExtX},e.prototype.setDeviceExtX=function(t){this.ldeviceExtX=t},e.prototype.getDeviceExtY=function(){return this.ldeviceExtY},e.prototype.setDeviceExtY=function(t){this.ldeviceExtY=t},e.prototype.transformX=function(t){var i=0,l=this.lworldExtX;return l!=0&&(i=this.ldeviceOrgX+(t-this.lworldOrgX)*this.ldeviceExtX/l),i},e.prototype.transformY=function(t){var i=0,l=this.lworldExtY;return l!=0&&(i=this.ldeviceOrgY+(t-this.lworldOrgY)*this.ldeviceExtY/l),i},e.prototype.inverseTransformX=function(t){var i=0,l=this.ldeviceExtX;return l!=0&&(i=this.lworldOrgX+(t-this.ldeviceOrgX)*this.lworldExtX/l),i},e.prototype.inverseTransformY=function(t){var i=0,l=this.ldeviceExtY;return l!=0&&(i=this.lworldOrgY+(t-this.ldeviceOrgY)*this.lworldExtY/l),i},e.prototype.inverseTransformPoint=function(t){var i=new o(this.inverseTransformX(t.x),this.inverseTransformY(t.y));return i},N.exports=e}),(function(N,I,L){function o(r){if(Array.isArray(r)){for(var h=0,a=Array(r.length);ht.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*t.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(r-t.ADAPTATION_LOWER_NODE_LIMIT)/(t.ADAPTATION_UPPER_NODE_LIMIT-t.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-t.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=t.MAX_NODE_DISPLACEMENT_INCREMENTAL):(r>t.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(t.COOLING_ADAPTATION_FACTOR,1-(r-t.ADAPTATION_LOWER_NODE_LIMIT)/(t.ADAPTATION_UPPER_NODE_LIMIT-t.ADAPTATION_LOWER_NODE_LIMIT)*(1-t.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=t.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},n.prototype.calcSpringForces=function(){for(var r=this.getAllEdges(),h,a=0;a0&&arguments[0]!==void 0?arguments[0]:!0,h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a,p,v,D,u=this.getAllNodes(),T;if(this.useFRGridVariant)for(this.totalIterations%t.GRID_CALCULATION_CHECK_PERIOD==1&&r&&this.updateGrid(),T=new Set,a=0;ay||T>y)&&(r.gravitationForceX=-this.gravityConstant*v,r.gravitationForceY=-this.gravityConstant*D)):(y=h.getEstimatedSize()*this.compoundGravityRangeFactor,(u>y||T>y)&&(r.gravitationForceX=-this.gravityConstant*v*this.compoundGravityConstant,r.gravitationForceY=-this.gravityConstant*D*this.compoundGravityConstant))},n.prototype.isConverged=function(){var r,h=!1;return this.totalIterations>this.maxIterations/3&&(h=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),r=this.totalDisplacement=u.length||y>=u[0].length)){for(var O=0;On}}]),l})();N.exports=i}),(function(N,I,L){var o=(function(){function i(l,g){for(var n=0;n2&&arguments[2]!==void 0?arguments[2]:1,d=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;e(this,i),this.sequence1=l,this.sequence2=g,this.match_score=n,this.mismatch_penalty=d,this.gap_penalty=r,this.iMax=l.length+1,this.jMax=g.length+1,this.grid=new Array(this.iMax);for(var h=0;h=0;l--){var g=this.listeners[l];g.event===t&&g.callback===i&&this.listeners.splice(l,1)}},e.emit=function(t,i){for(var l=0;lg.coolingFactor*g.maxNodeDisplacement&&(this.displacementX=g.coolingFactor*g.maxNodeDisplacement*t.sign(this.displacementX)),Math.abs(this.displacementY)>g.coolingFactor*g.maxNodeDisplacement&&(this.displacementY=g.coolingFactor*g.maxNodeDisplacement*t.sign(this.displacementY)),this.child==null?this.moveBy(this.displacementX,this.displacementY):this.child.getNodes().length==0?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),g.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},i.prototype.propogateDisplacementToChildren=function(g,n){for(var d=this.getChild().getNodes(),r,h=0;h0)this.positionNodesRadially(s);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var f=new Set(this.getAllNodes()),c=this.nodesWithGravity.filter(function(E){return f.has(E)});this.graphManager.setAllNodesToApplyGravitation(c),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},y.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%d.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var s=new Set(this.getAllNodes()),f=this.nodesWithGravity.filter(function(A){return s.has(A)});this.graphManager.setAllNodesToApplyGravitation(f),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var c=!this.isTreeGrowing&&!this.isGrowthFinished,E=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(c,E),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},y.prototype.getPositionsData=function(){for(var s=this.graphManager.getAllNodes(),f={},c=0;c1){var R;for(R=0;RE&&(E=Math.floor(C.y)),m=Math.floor(C.x+n.DEFAULT_COMPONENT_SEPERATION)}this.transform(new a(r.WORLD_CENTER_X-C.x/2,r.WORLD_CENTER_Y-C.y/2))},y.radialLayout=function(s,f,c){var E=Math.max(this.maxDiagonalInTree(s),n.DEFAULT_RADIAL_SEPARATION);y.branchRadialLayout(f,null,0,359,0,E);var A=u.calculateBounds(s),m=new T;m.setDeviceOrgX(A.getMinX()),m.setDeviceOrgY(A.getMinY()),m.setWorldOrgX(c.x),m.setWorldOrgY(c.y);for(var C=0;C1;){var X=_[0];_.splice(0,1);var H=w.indexOf(X);H>=0&&w.splice(H,1),U--,x--}f!=null?P=(w.indexOf(_[0])+1)%U:P=0;for(var W=Math.abs(E-c)/x,B=P;F!=x;B=++B%U){var K=w[B].getOtherEnd(s);if(K!=f){var j=(c+F*W)%360,ht=(j+W)%360;y.branchRadialLayout(K,s,j,ht,A+m,m),F++}}},y.maxDiagonalInTree=function(s){for(var f=v.MIN_VALUE,c=0;cf&&(f=A)}return f},y.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},y.prototype.groupZeroDegreeMembers=function(){var s=this,f={};this.memberGroups={},this.idToDummyNode={};for(var c=[],E=this.graphManager.getAllNodes(),A=0;A"u"&&(f[R]=[]),f[R]=f[R].concat(m)}Object.keys(f).forEach(function(M){if(f[M].length>1){var S="DummyCompound_"+M;s.memberGroups[S]=f[M];var Y=f[M][0].getParent(),w=new l(s.graphManager);w.id=S,w.paddingLeft=Y.paddingLeft||0,w.paddingRight=Y.paddingRight||0,w.paddingBottom=Y.paddingBottom||0,w.paddingTop=Y.paddingTop||0,s.idToDummyNode[S]=w;var x=s.getGraphManager().add(s.newGraph(),w),F=Y.getChild();F.add(w);for(var U=0;U=0;s--){var f=this.compoundOrder[s],c=f.id,E=f.paddingLeft,A=f.paddingTop;this.adjustLocations(this.tiledMemberPack[c],f.rect.x,f.rect.y,E,A)}},y.prototype.repopulateZeroDegreeMembers=function(){var s=this,f=this.tiledZeroDegreePack;Object.keys(f).forEach(function(c){var E=s.idToDummyNode[c],A=E.paddingLeft,m=E.paddingTop;s.adjustLocations(f[c],E.rect.x,E.rect.y,A,m)})},y.prototype.getToBeTiled=function(s){var f=s.id;if(this.toBeTiled[f]!=null)return this.toBeTiled[f];var c=s.getChild();if(c==null)return this.toBeTiled[f]=!1,!1;for(var E=c.getNodes(),A=0;A0)return this.toBeTiled[f]=!1,!1;if(m.getChild()==null){this.toBeTiled[m.id]=!1;continue}if(!this.getToBeTiled(m))return this.toBeTiled[f]=!1,!1}return this.toBeTiled[f]=!0,!0},y.prototype.getNodeDegree=function(s){s.id;for(var f=s.getEdges(),c=0,E=0;EM&&(M=Y.rect.height)}c+=M+s.verticalPadding}},y.prototype.tileCompoundMembers=function(s,f){var c=this;this.tiledMemberPack=[],Object.keys(s).forEach(function(E){var A=f[E];c.tiledMemberPack[E]=c.tileNodes(s[E],A.paddingLeft+A.paddingRight),A.rect.width=c.tiledMemberPack[E].width,A.rect.height=c.tiledMemberPack[E].height})},y.prototype.tileNodes=function(s,f){var c=n.TILING_PADDING_VERTICAL,E=n.TILING_PADDING_HORIZONTAL,A={rows:[],rowWidth:[],rowHeight:[],width:0,height:f,verticalPadding:c,horizontalPadding:E};s.sort(function(R,M){return R.rect.width*R.rect.height>M.rect.width*M.rect.height?-1:R.rect.width*R.rect.height0&&(C+=s.horizontalPadding),s.rowWidth[c]=C,s.width0&&(R+=s.verticalPadding);var M=0;R>s.rowHeight[c]&&(M=s.rowHeight[c],s.rowHeight[c]=R,M=s.rowHeight[c]-M),s.height+=M,s.rows[c].push(f)},y.prototype.getShortestRowIndex=function(s){for(var f=-1,c=Number.MAX_VALUE,E=0;Ec&&(f=E,c=s.rowWidth[E]);return f},y.prototype.canAddHorizontal=function(s,f,c){var E=this.getShortestRowIndex(s);if(E<0)return!0;var A=s.rowWidth[E];if(A+s.horizontalPadding+f<=s.width)return!0;var m=0;s.rowHeight[E]0&&(m=c+s.verticalPadding-s.rowHeight[E]);var C;s.width-A>=f+s.horizontalPadding?C=(s.height+m)/(A+f+s.horizontalPadding):C=(s.height+m)/s.width,m=c+s.verticalPadding;var R;return s.widthm&&f!=c){E.splice(-1,1),s.rows[c].push(A),s.rowWidth[f]=s.rowWidth[f]-m,s.rowWidth[c]=s.rowWidth[c]+m,s.width=s.rowWidth[instance.getLongestRowIndex(s)];for(var C=Number.MIN_VALUE,R=0;RC&&(C=E[R].height);f>0&&(C+=s.verticalPadding);var M=s.rowHeight[f]+s.rowHeight[c];s.rowHeight[f]=C,s.rowHeight[c]0)for(var F=A;F<=m;F++)x[0]+=this.grid[F][C-1].length+this.grid[F][C].length-1;if(m0)for(var F=C;F<=R;F++)x[3]+=this.grid[A-1][F].length+this.grid[A][F].length-1;for(var U=v.MAX_VALUE,P,_,X=0;X0){var R;R=T.getGraphManager().add(T.newGraph(),c),this.processChildrenList(R,f,T)}}},a.prototype.stop=function(){return this.stopped=!0,this};var v=function(u){u("layout","cose-bilkent",a)};typeof cytoscape<"u"&&v(cytoscape),I.exports=v})])})})(k)),k.exports}var yt=vt();const Et=lt(yt);tt.use(Et);function et(G,b){G.forEach(N=>{const I={id:N.id,labelText:N.label,height:N.height,width:N.width,padding:N.padding??0};Object.keys(N).forEach(L=>{["id","label","height","width","padding","x","y"].includes(L)||(I[L]=N[L])}),b.add({group:"nodes",data:I,position:{x:N.x??0,y:N.y??0}})})}V(et,"addNodes");function rt(G,b){G.forEach(N=>{const I={id:N.id,source:N.start,target:N.end};Object.keys(N).forEach(L=>{["id","start","end"].includes(L)||(I[L]=N[L])}),b.add({group:"edges",data:I})})}V(rt,"addEdges");function it(G){return new Promise(b=>{const N=gt("body").append("div").attr("id","cy").attr("style","display:none"),I=tt({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});N.remove(),et(G.nodes,I),rt(G.edges,I),I.nodes().forEach(function(o){o.layoutDimensions=()=>{const e=o.data();return{w:e.width,h:e.height}}});const L={name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1};I.layout(L).run(),I.ready(o=>{$.info("Cytoscape ready",o),b(I)})})}V(it,"createCytoscapeInstance");function nt(G){return G.nodes().map(b=>{const N=b.data(),I=b.position(),L={id:N.id,x:I.x,y:I.y};return Object.keys(N).forEach(o=>{o!=="id"&&(L[o]=N[o])}),L})}V(nt,"extractPositionedNodes");function ot(G){return G.edges().map(b=>{const N=b.data(),I=b._private.rscratch,L={id:N.id,source:N.source,target:N.target,startX:I.startX,startY:I.startY,midX:I.midX,midY:I.midY,endX:I.endX,endY:I.endY};return Object.keys(N).forEach(o=>{["id","source","target"].includes(o)||(L[o]=N[o])}),L})}V(ot,"extractPositionedEdges");async function st(G,b){$.debug("Starting cose-bilkent layout algorithm");try{at(G);const N=await it(G),I=nt(N),L=ot(N);return $.debug(`Layout completed: ${I.length} nodes, ${L.length} edges`),{nodes:I,edges:L}}catch(N){throw $.error("Error in cose-bilkent layout algorithm:",N),N}}V(st,"executeCoseBilkentLayout");function at(G){if(!G)throw new Error("Layout data is required");if(!G.config)throw new Error("Configuration is required in layout data");if(!G.rootNode)throw new Error("Root node is required");if(!G.nodes||!Array.isArray(G.nodes))throw new Error("No nodes found in layout data");if(!Array.isArray(G.edges))throw new Error("Edges array is required in layout data");return!0}V(at,"validateLayoutData");var Lt=V(async(G,b,{insertCluster:N,insertEdge:I,insertEdgeLabel:L,insertMarkers:o,insertNode:e,log:t,positionEdgeLabel:i},{algorithm:l})=>{const g={},n={},d=b.select("g");o(d,G.markers,G.type,G.diagramId);const r=d.insert("g").attr("class","subgraphs"),h=d.insert("g").attr("class","edgePaths"),a=d.insert("g").attr("class","edgeLabels"),p=d.insert("g").attr("class","nodes");t.debug("Inserting nodes into DOM for dimension calculation"),await Promise.all(G.nodes.map(async u=>{if(u.isGroup){const T={...u};n[u.id]=T,g[u.id]=T,await N(r,u)}else{const T={...u};g[u.id]=T;const y=await e(p,u,{config:G.config,dir:G.direction||"TB"}),O=y.node().getBBox();T.width=O.width,T.height=O.height,T.domId=y,t.debug(`Node ${u.id} dimensions: ${O.width}x${O.height}`)}})),t.debug("Running cose-bilkent layout algorithm");const v={...G,nodes:G.nodes.map(u=>{const T=g[u.id];return{...u,width:T.width,height:T.height}})},D=await st(v,G.config);t.debug("Positioning nodes based on layout results"),D.nodes.forEach(u=>{const T=g[u.id];T?.domId&&(T.domId.attr("transform",`translate(${u.x}, ${u.y})`),T.x=u.x,T.y=u.y,t.debug(`Positioned node ${T.id} at center (${u.x}, ${u.y})`))}),D.edges.forEach(u=>{const T=G.edges.find(y=>y.id===u.id);T&&(T.points=[{x:u.startX,y:u.startY},{x:u.midX,y:u.midY},{x:u.endX,y:u.endY}])}),t.debug("Inserting and positioning edges"),await Promise.all(G.edges.map(async u=>{await L(a,u);const T=g[u.start??""],y=g[u.end??""];if(T&&y){const O=D.edges.find(s=>s.id===u.id);if(O){t.debug("APA01 positionedEdge",O);const s={...u},f=I(h,s,n,G.type,T,y,G.diagramId);i(s,f)}else{const s={...u,points:[{x:T.x||0,y:T.y||0},{x:y.x||0,y:y.y||0}]},f=I(h,s,n,G.type,T,y,G.diagramId);i(s,f)}}})),t.debug("Cose-bilkent rendering completed")},"render"),Ot=Lt;export{Ot as render};
+import{b4 as lt,_ as V,l as $,j as gt}from"./mermaid.core-BLsmN-lt.js";import{c as tt}from"./cytoscape.esm-CNiYdHpY.js";import"./index-XmhyfFRf.js";import"./purify.es-5AjVNlXF.js";var k={exports:{}},Z={exports:{}},Q={exports:{}},ut=Q.exports,q;function ft(){return q||(q=1,(function(G,b){(function(I,L){G.exports=L()})(ut,function(){return(function(N){var I={};function L(o){if(I[o])return I[o].exports;var e=I[o]={i:o,l:!1,exports:{}};return N[o].call(e.exports,e,e.exports,L),e.l=!0,e.exports}return L.m=N,L.c=I,L.i=function(o){return o},L.d=function(o,e,t){L.o(o,e)||Object.defineProperty(o,e,{configurable:!1,enumerable:!0,get:t})},L.n=function(o){var e=o&&o.__esModule?function(){return o.default}:function(){return o};return L.d(e,"a",e),e},L.o=function(o,e){return Object.prototype.hasOwnProperty.call(o,e)},L.p="",L(L.s=26)})([(function(N,I,L){function o(){}o.QUALITY=1,o.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,o.DEFAULT_INCREMENTAL=!1,o.DEFAULT_ANIMATION_ON_LAYOUT=!0,o.DEFAULT_ANIMATION_DURING_LAYOUT=!1,o.DEFAULT_ANIMATION_PERIOD=50,o.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,o.DEFAULT_GRAPH_MARGIN=15,o.NODE_DIMENSIONS_INCLUDE_LABELS=!1,o.SIMPLE_NODE_SIZE=40,o.SIMPLE_NODE_HALF_SIZE=o.SIMPLE_NODE_SIZE/2,o.EMPTY_COMPOUND_NODE_SIZE=40,o.MIN_EDGE_LENGTH=1,o.WORLD_BOUNDARY=1e6,o.INITIAL_WORLD_BOUNDARY=o.WORLD_BOUNDARY/1e3,o.WORLD_CENTER_X=1200,o.WORLD_CENTER_Y=900,N.exports=o}),(function(N,I,L){var o=L(2),e=L(8),t=L(9);function i(g,n,d){o.call(this,d),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=d,this.bendpoints=[],this.source=g,this.target=n}i.prototype=Object.create(o.prototype);for(var l in o)i[l]=o[l];i.prototype.getSource=function(){return this.source},i.prototype.getTarget=function(){return this.target},i.prototype.isInterGraph=function(){return this.isInterGraph},i.prototype.getLength=function(){return this.length},i.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},i.prototype.getBendpoints=function(){return this.bendpoints},i.prototype.getLca=function(){return this.lca},i.prototype.getSourceInLca=function(){return this.sourceInLca},i.prototype.getTargetInLca=function(){return this.targetInLca},i.prototype.getOtherEnd=function(g){if(this.source===g)return this.target;if(this.target===g)return this.source;throw"Node is not incident with this edge"},i.prototype.getOtherEndInGraph=function(g,n){for(var d=this.getOtherEnd(g),r=n.getGraphManager().getRoot();;){if(d.getOwner()==n)return d;if(d.getOwner()==r)break;d=d.getOwner().getParent()}return null},i.prototype.updateLength=function(){var g=new Array(4);this.isOverlapingSourceAndTarget=e.getIntersection(this.target.getRect(),this.source.getRect(),g),this.isOverlapingSourceAndTarget||(this.lengthX=g[0]-g[2],this.lengthY=g[1]-g[3],Math.abs(this.lengthX)<1&&(this.lengthX=t.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=t.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},i.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=t.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=t.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},N.exports=i}),(function(N,I,L){function o(e){this.vGraphObject=e}N.exports=o}),(function(N,I,L){var o=L(2),e=L(10),t=L(13),i=L(0),l=L(16),g=L(4);function n(r,h,a,p){a==null&&p==null&&(p=h),o.call(this,p),r.graphManager!=null&&(r=r.graphManager),this.estimatedSize=e.MIN_VALUE,this.inclusionTreeDepth=e.MAX_VALUE,this.vGraphObject=p,this.edges=[],this.graphManager=r,a!=null&&h!=null?this.rect=new t(h.x,h.y,a.width,a.height):this.rect=new t}n.prototype=Object.create(o.prototype);for(var d in o)n[d]=o[d];n.prototype.getEdges=function(){return this.edges},n.prototype.getChild=function(){return this.child},n.prototype.getOwner=function(){return this.owner},n.prototype.getWidth=function(){return this.rect.width},n.prototype.setWidth=function(r){this.rect.width=r},n.prototype.getHeight=function(){return this.rect.height},n.prototype.setHeight=function(r){this.rect.height=r},n.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},n.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},n.prototype.getCenter=function(){return new g(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},n.prototype.getLocation=function(){return new g(this.rect.x,this.rect.y)},n.prototype.getRect=function(){return this.rect},n.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},n.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},n.prototype.setRect=function(r,h){this.rect.x=r.x,this.rect.y=r.y,this.rect.width=h.width,this.rect.height=h.height},n.prototype.setCenter=function(r,h){this.rect.x=r-this.rect.width/2,this.rect.y=h-this.rect.height/2},n.prototype.setLocation=function(r,h){this.rect.x=r,this.rect.y=h},n.prototype.moveBy=function(r,h){this.rect.x+=r,this.rect.y+=h},n.prototype.getEdgeListToNode=function(r){var h=[],a=this;return a.edges.forEach(function(p){if(p.target==r){if(p.source!=a)throw"Incorrect edge source!";h.push(p)}}),h},n.prototype.getEdgesBetween=function(r){var h=[],a=this;return a.edges.forEach(function(p){if(!(p.source==a||p.target==a))throw"Incorrect edge source and/or target";(p.target==r||p.source==r)&&h.push(p)}),h},n.prototype.getNeighborsList=function(){var r=new Set,h=this;return h.edges.forEach(function(a){if(a.source==h)r.add(a.target);else{if(a.target!=h)throw"Incorrect incidency!";r.add(a.source)}}),r},n.prototype.withChildren=function(){var r=new Set,h,a;if(r.add(this),this.child!=null)for(var p=this.child.getNodes(),v=0;vh&&(this.rect.x-=(this.labelWidth-h)/2,this.setWidth(this.labelWidth)),this.labelHeight>a&&(this.labelPos=="center"?this.rect.y-=(this.labelHeight-a)/2:this.labelPos=="top"&&(this.rect.y-=this.labelHeight-a),this.setHeight(this.labelHeight))}}},n.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==e.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},n.prototype.transform=function(r){var h=this.rect.x;h>i.WORLD_BOUNDARY?h=i.WORLD_BOUNDARY:h<-i.WORLD_BOUNDARY&&(h=-i.WORLD_BOUNDARY);var a=this.rect.y;a>i.WORLD_BOUNDARY?a=i.WORLD_BOUNDARY:a<-i.WORLD_BOUNDARY&&(a=-i.WORLD_BOUNDARY);var p=new g(h,a),v=r.inverseTransformPoint(p);this.setLocation(v.x,v.y)},n.prototype.getLeft=function(){return this.rect.x},n.prototype.getRight=function(){return this.rect.x+this.rect.width},n.prototype.getTop=function(){return this.rect.y},n.prototype.getBottom=function(){return this.rect.y+this.rect.height},n.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},N.exports=n}),(function(N,I,L){function o(e,t){e==null&&t==null?(this.x=0,this.y=0):(this.x=e,this.y=t)}o.prototype.getX=function(){return this.x},o.prototype.getY=function(){return this.y},o.prototype.setX=function(e){this.x=e},o.prototype.setY=function(e){this.y=e},o.prototype.getDifference=function(e){return new DimensionD(this.x-e.x,this.y-e.y)},o.prototype.getCopy=function(){return new o(this.x,this.y)},o.prototype.translate=function(e){return this.x+=e.width,this.y+=e.height,this},N.exports=o}),(function(N,I,L){var o=L(2),e=L(10),t=L(0),i=L(6),l=L(3),g=L(1),n=L(13),d=L(12),r=L(11);function h(p,v,D){o.call(this,D),this.estimatedSize=e.MIN_VALUE,this.margin=t.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=p,v!=null&&v instanceof i?this.graphManager=v:v!=null&&v instanceof Layout&&(this.graphManager=v.graphManager)}h.prototype=Object.create(o.prototype);for(var a in o)h[a]=o[a];h.prototype.getNodes=function(){return this.nodes},h.prototype.getEdges=function(){return this.edges},h.prototype.getGraphManager=function(){return this.graphManager},h.prototype.getParent=function(){return this.parent},h.prototype.getLeft=function(){return this.left},h.prototype.getRight=function(){return this.right},h.prototype.getTop=function(){return this.top},h.prototype.getBottom=function(){return this.bottom},h.prototype.isConnected=function(){return this.isConnected},h.prototype.add=function(p,v,D){if(v==null&&D==null){var u=p;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(u)>-1)throw"Node already in graph!";return u.owner=this,this.getNodes().push(u),u}else{var T=p;if(!(this.getNodes().indexOf(v)>-1&&this.getNodes().indexOf(D)>-1))throw"Source or target not in graph!";if(!(v.owner==D.owner&&v.owner==this))throw"Both owners must be this graph!";return v.owner!=D.owner?null:(T.source=v,T.target=D,T.isInterGraph=!1,this.getEdges().push(T),v.edges.push(T),D!=v&&D.edges.push(T),T)}},h.prototype.remove=function(p){var v=p;if(p instanceof l){if(v==null)throw"Node is null!";if(!(v.owner!=null&&v.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var D=v.edges.slice(),u,T=D.length,y=0;y-1&&f>-1))throw"Source and/or target doesn't know this edge!";u.source.edges.splice(s,1),u.target!=u.source&&u.target.edges.splice(f,1);var O=u.source.owner.getEdges().indexOf(u);if(O==-1)throw"Not in owner's edge list!";u.source.owner.getEdges().splice(O,1)}},h.prototype.updateLeftTop=function(){for(var p=e.MAX_VALUE,v=e.MAX_VALUE,D,u,T,y=this.getNodes(),O=y.length,s=0;sD&&(p=D),v>u&&(v=u)}return p==e.MAX_VALUE?null:(y[0].getParent().paddingLeft!=null?T=y[0].getParent().paddingLeft:T=this.margin,this.left=v-T,this.top=p-T,new d(this.left,this.top))},h.prototype.updateBounds=function(p){for(var v=e.MAX_VALUE,D=-e.MAX_VALUE,u=e.MAX_VALUE,T=-e.MAX_VALUE,y,O,s,f,c,E=this.nodes,A=E.length,m=0;my&&(v=y),Ds&&(u=s),Ty&&(v=y),Ds&&(u=s),T=this.nodes.length){var A=0;D.forEach(function(m){m.owner==p&&A++}),A==this.nodes.length&&(this.isConnected=!0)}},N.exports=h}),(function(N,I,L){var o,e=L(1);function t(i){o=L(5),this.layout=i,this.graphs=[],this.edges=[]}t.prototype.addRoot=function(){var i=this.layout.newGraph(),l=this.layout.newNode(null),g=this.add(i,l);return this.setRootGraph(g),this.rootGraph},t.prototype.add=function(i,l,g,n,d){if(g==null&&n==null&&d==null){if(i==null)throw"Graph is null!";if(l==null)throw"Parent node is null!";if(this.graphs.indexOf(i)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(i),i.parent!=null)throw"Already has a parent!";if(l.child!=null)throw"Already has a child!";return i.parent=l,l.child=i,i}else{d=g,n=l,g=i;var r=n.getOwner(),h=d.getOwner();if(!(r!=null&&r.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(h!=null&&h.getGraphManager()==this))throw"Target not in this graph mgr!";if(r==h)return g.isInterGraph=!1,r.add(g,n,d);if(g.isInterGraph=!0,g.source=n,g.target=d,this.edges.indexOf(g)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(g),!(g.source!=null&&g.target!=null))throw"Edge source and/or target is null!";if(!(g.source.edges.indexOf(g)==-1&&g.target.edges.indexOf(g)==-1))throw"Edge already in source and/or target incidency list!";return g.source.edges.push(g),g.target.edges.push(g),g}},t.prototype.remove=function(i){if(i instanceof o){var l=i;if(l.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(l==this.rootGraph||l.parent!=null&&l.parent.graphManager==this))throw"Invalid parent node!";var g=[];g=g.concat(l.getEdges());for(var n,d=g.length,r=0;r=i.getRight()?l[0]+=Math.min(i.getX()-t.getX(),t.getRight()-i.getRight()):i.getX()<=t.getX()&&i.getRight()>=t.getRight()&&(l[0]+=Math.min(t.getX()-i.getX(),i.getRight()-t.getRight())),t.getY()<=i.getY()&&t.getBottom()>=i.getBottom()?l[1]+=Math.min(i.getY()-t.getY(),t.getBottom()-i.getBottom()):i.getY()<=t.getY()&&i.getBottom()>=t.getBottom()&&(l[1]+=Math.min(t.getY()-i.getY(),i.getBottom()-t.getBottom()));var d=Math.abs((i.getCenterY()-t.getCenterY())/(i.getCenterX()-t.getCenterX()));i.getCenterY()===t.getCenterY()&&i.getCenterX()===t.getCenterX()&&(d=1);var r=d*l[0],h=l[1]/d;l[0]r)return l[0]=g,l[1]=a,l[2]=d,l[3]=E,!1;if(nd)return l[0]=h,l[1]=n,l[2]=f,l[3]=r,!1;if(gd?(l[0]=v,l[1]=D,R=!0):(l[0]=p,l[1]=a,R=!0):S===w&&(g>d?(l[0]=h,l[1]=a,R=!0):(l[0]=u,l[1]=D,R=!0)),-Y===w?d>g?(l[2]=c,l[3]=E,M=!0):(l[2]=f,l[3]=s,M=!0):Y===w&&(d>g?(l[2]=O,l[3]=s,M=!0):(l[2]=A,l[3]=E,M=!0)),R&&M)return!1;if(g>d?n>r?(x=this.getCardinalDirection(S,w,4),F=this.getCardinalDirection(Y,w,2)):(x=this.getCardinalDirection(-S,w,3),F=this.getCardinalDirection(-Y,w,1)):n>r?(x=this.getCardinalDirection(-S,w,1),F=this.getCardinalDirection(-Y,w,3)):(x=this.getCardinalDirection(S,w,2),F=this.getCardinalDirection(Y,w,4)),!R)switch(x){case 1:P=a,U=g+-y/w,l[0]=U,l[1]=P;break;case 2:U=u,P=n+T*w,l[0]=U,l[1]=P;break;case 3:P=D,U=g+y/w,l[0]=U,l[1]=P;break;case 4:U=v,P=n+-T*w,l[0]=U,l[1]=P;break}if(!M)switch(F){case 1:X=s,_=d+-C/w,l[2]=_,l[3]=X;break;case 2:_=A,X=r+m*w,l[2]=_,l[3]=X;break;case 3:X=E,_=d+C/w,l[2]=_,l[3]=X;break;case 4:_=c,X=r+-m*w,l[2]=_,l[3]=X;break}}return!1},e.getCardinalDirection=function(t,i,l){return t>i?l:1+l%4},e.getIntersection=function(t,i,l,g){if(g==null)return this.getIntersection2(t,i,l);var n=t.x,d=t.y,r=i.x,h=i.y,a=l.x,p=l.y,v=g.x,D=g.y,u=void 0,T=void 0,y=void 0,O=void 0,s=void 0,f=void 0,c=void 0,E=void 0,A=void 0;return y=h-d,s=n-r,c=r*d-n*h,O=D-p,f=a-v,E=v*p-a*D,A=y*f-O*s,A===0?null:(u=(s*E-f*c)/A,T=(O*c-y*E)/A,new o(u,T))},e.angleOfVector=function(t,i,l,g){var n=void 0;return t!==l?(n=Math.atan((g-i)/(l-t)),l0?1:e<0?-1:0},o.floor=function(e){return e<0?Math.ceil(e):Math.floor(e)},o.ceil=function(e){return e<0?Math.floor(e):Math.ceil(e)},N.exports=o}),(function(N,I,L){function o(){}o.MAX_VALUE=2147483647,o.MIN_VALUE=-2147483648,N.exports=o}),(function(N,I,L){var o=(function(){function n(d,r){for(var h=0;h"u"?"undefined":o(t);return t==null||i!="object"&&i!="function"},N.exports=e}),(function(N,I,L){function o(a){if(Array.isArray(a)){for(var p=0,v=Array(a.length);p0&&p;){for(y.push(s[0]);y.length>0&&p;){var f=y[0];y.splice(0,1),T.add(f);for(var c=f.getEdges(),u=0;u-1&&s.splice(C,1)}T=new Set,O=new Map}}return a},h.prototype.createDummyNodesForBendpoints=function(a){for(var p=[],v=a.source,D=this.graphManager.calcLowestCommonAncestor(a.source,a.target),u=0;u0){for(var D=this.edgeToDummyNodes.get(v),u=0;u=0&&p.splice(E,1);var A=O.getNeighborsList();A.forEach(function(R){if(v.indexOf(R)<0){var M=D.get(R),S=M-1;S==1&&f.push(R),D.set(R,S)}})}v=v.concat(f),(p.length==1||p.length==2)&&(u=!0,T=p[0])}return T},h.prototype.setGraphManager=function(a){this.graphManager=a},N.exports=h}),(function(N,I,L){function o(){}o.seed=1,o.x=0,o.nextDouble=function(){return o.x=Math.sin(o.seed++)*1e4,o.x-Math.floor(o.x)},N.exports=o}),(function(N,I,L){var o=L(4);function e(t,i){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}e.prototype.getWorldOrgX=function(){return this.lworldOrgX},e.prototype.setWorldOrgX=function(t){this.lworldOrgX=t},e.prototype.getWorldOrgY=function(){return this.lworldOrgY},e.prototype.setWorldOrgY=function(t){this.lworldOrgY=t},e.prototype.getWorldExtX=function(){return this.lworldExtX},e.prototype.setWorldExtX=function(t){this.lworldExtX=t},e.prototype.getWorldExtY=function(){return this.lworldExtY},e.prototype.setWorldExtY=function(t){this.lworldExtY=t},e.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},e.prototype.setDeviceOrgX=function(t){this.ldeviceOrgX=t},e.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},e.prototype.setDeviceOrgY=function(t){this.ldeviceOrgY=t},e.prototype.getDeviceExtX=function(){return this.ldeviceExtX},e.prototype.setDeviceExtX=function(t){this.ldeviceExtX=t},e.prototype.getDeviceExtY=function(){return this.ldeviceExtY},e.prototype.setDeviceExtY=function(t){this.ldeviceExtY=t},e.prototype.transformX=function(t){var i=0,l=this.lworldExtX;return l!=0&&(i=this.ldeviceOrgX+(t-this.lworldOrgX)*this.ldeviceExtX/l),i},e.prototype.transformY=function(t){var i=0,l=this.lworldExtY;return l!=0&&(i=this.ldeviceOrgY+(t-this.lworldOrgY)*this.ldeviceExtY/l),i},e.prototype.inverseTransformX=function(t){var i=0,l=this.ldeviceExtX;return l!=0&&(i=this.lworldOrgX+(t-this.ldeviceOrgX)*this.lworldExtX/l),i},e.prototype.inverseTransformY=function(t){var i=0,l=this.ldeviceExtY;return l!=0&&(i=this.lworldOrgY+(t-this.ldeviceOrgY)*this.lworldExtY/l),i},e.prototype.inverseTransformPoint=function(t){var i=new o(this.inverseTransformX(t.x),this.inverseTransformY(t.y));return i},N.exports=e}),(function(N,I,L){function o(r){if(Array.isArray(r)){for(var h=0,a=Array(r.length);ht.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*t.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(r-t.ADAPTATION_LOWER_NODE_LIMIT)/(t.ADAPTATION_UPPER_NODE_LIMIT-t.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-t.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=t.MAX_NODE_DISPLACEMENT_INCREMENTAL):(r>t.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(t.COOLING_ADAPTATION_FACTOR,1-(r-t.ADAPTATION_LOWER_NODE_LIMIT)/(t.ADAPTATION_UPPER_NODE_LIMIT-t.ADAPTATION_LOWER_NODE_LIMIT)*(1-t.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=t.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},n.prototype.calcSpringForces=function(){for(var r=this.getAllEdges(),h,a=0;a0&&arguments[0]!==void 0?arguments[0]:!0,h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a,p,v,D,u=this.getAllNodes(),T;if(this.useFRGridVariant)for(this.totalIterations%t.GRID_CALCULATION_CHECK_PERIOD==1&&r&&this.updateGrid(),T=new Set,a=0;ay||T>y)&&(r.gravitationForceX=-this.gravityConstant*v,r.gravitationForceY=-this.gravityConstant*D)):(y=h.getEstimatedSize()*this.compoundGravityRangeFactor,(u>y||T>y)&&(r.gravitationForceX=-this.gravityConstant*v*this.compoundGravityConstant,r.gravitationForceY=-this.gravityConstant*D*this.compoundGravityConstant))},n.prototype.isConverged=function(){var r,h=!1;return this.totalIterations>this.maxIterations/3&&(h=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),r=this.totalDisplacement=u.length||y>=u[0].length)){for(var O=0;On}}]),l})();N.exports=i}),(function(N,I,L){var o=(function(){function i(l,g){for(var n=0;n2&&arguments[2]!==void 0?arguments[2]:1,d=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;e(this,i),this.sequence1=l,this.sequence2=g,this.match_score=n,this.mismatch_penalty=d,this.gap_penalty=r,this.iMax=l.length+1,this.jMax=g.length+1,this.grid=new Array(this.iMax);for(var h=0;h=0;l--){var g=this.listeners[l];g.event===t&&g.callback===i&&this.listeners.splice(l,1)}},e.emit=function(t,i){for(var l=0;lg.coolingFactor*g.maxNodeDisplacement&&(this.displacementX=g.coolingFactor*g.maxNodeDisplacement*t.sign(this.displacementX)),Math.abs(this.displacementY)>g.coolingFactor*g.maxNodeDisplacement&&(this.displacementY=g.coolingFactor*g.maxNodeDisplacement*t.sign(this.displacementY)),this.child==null?this.moveBy(this.displacementX,this.displacementY):this.child.getNodes().length==0?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),g.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},i.prototype.propogateDisplacementToChildren=function(g,n){for(var d=this.getChild().getNodes(),r,h=0;h0)this.positionNodesRadially(s);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var f=new Set(this.getAllNodes()),c=this.nodesWithGravity.filter(function(E){return f.has(E)});this.graphManager.setAllNodesToApplyGravitation(c),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},y.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%d.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var s=new Set(this.getAllNodes()),f=this.nodesWithGravity.filter(function(A){return s.has(A)});this.graphManager.setAllNodesToApplyGravitation(f),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var c=!this.isTreeGrowing&&!this.isGrowthFinished,E=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(c,E),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},y.prototype.getPositionsData=function(){for(var s=this.graphManager.getAllNodes(),f={},c=0;c1){var R;for(R=0;RE&&(E=Math.floor(C.y)),m=Math.floor(C.x+n.DEFAULT_COMPONENT_SEPERATION)}this.transform(new a(r.WORLD_CENTER_X-C.x/2,r.WORLD_CENTER_Y-C.y/2))},y.radialLayout=function(s,f,c){var E=Math.max(this.maxDiagonalInTree(s),n.DEFAULT_RADIAL_SEPARATION);y.branchRadialLayout(f,null,0,359,0,E);var A=u.calculateBounds(s),m=new T;m.setDeviceOrgX(A.getMinX()),m.setDeviceOrgY(A.getMinY()),m.setWorldOrgX(c.x),m.setWorldOrgY(c.y);for(var C=0;C1;){var X=_[0];_.splice(0,1);var H=w.indexOf(X);H>=0&&w.splice(H,1),U--,x--}f!=null?P=(w.indexOf(_[0])+1)%U:P=0;for(var W=Math.abs(E-c)/x,B=P;F!=x;B=++B%U){var K=w[B].getOtherEnd(s);if(K!=f){var j=(c+F*W)%360,ht=(j+W)%360;y.branchRadialLayout(K,s,j,ht,A+m,m),F++}}},y.maxDiagonalInTree=function(s){for(var f=v.MIN_VALUE,c=0;cf&&(f=A)}return f},y.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},y.prototype.groupZeroDegreeMembers=function(){var s=this,f={};this.memberGroups={},this.idToDummyNode={};for(var c=[],E=this.graphManager.getAllNodes(),A=0;A"u"&&(f[R]=[]),f[R]=f[R].concat(m)}Object.keys(f).forEach(function(M){if(f[M].length>1){var S="DummyCompound_"+M;s.memberGroups[S]=f[M];var Y=f[M][0].getParent(),w=new l(s.graphManager);w.id=S,w.paddingLeft=Y.paddingLeft||0,w.paddingRight=Y.paddingRight||0,w.paddingBottom=Y.paddingBottom||0,w.paddingTop=Y.paddingTop||0,s.idToDummyNode[S]=w;var x=s.getGraphManager().add(s.newGraph(),w),F=Y.getChild();F.add(w);for(var U=0;U=0;s--){var f=this.compoundOrder[s],c=f.id,E=f.paddingLeft,A=f.paddingTop;this.adjustLocations(this.tiledMemberPack[c],f.rect.x,f.rect.y,E,A)}},y.prototype.repopulateZeroDegreeMembers=function(){var s=this,f=this.tiledZeroDegreePack;Object.keys(f).forEach(function(c){var E=s.idToDummyNode[c],A=E.paddingLeft,m=E.paddingTop;s.adjustLocations(f[c],E.rect.x,E.rect.y,A,m)})},y.prototype.getToBeTiled=function(s){var f=s.id;if(this.toBeTiled[f]!=null)return this.toBeTiled[f];var c=s.getChild();if(c==null)return this.toBeTiled[f]=!1,!1;for(var E=c.getNodes(),A=0;A0)return this.toBeTiled[f]=!1,!1;if(m.getChild()==null){this.toBeTiled[m.id]=!1;continue}if(!this.getToBeTiled(m))return this.toBeTiled[f]=!1,!1}return this.toBeTiled[f]=!0,!0},y.prototype.getNodeDegree=function(s){s.id;for(var f=s.getEdges(),c=0,E=0;EM&&(M=Y.rect.height)}c+=M+s.verticalPadding}},y.prototype.tileCompoundMembers=function(s,f){var c=this;this.tiledMemberPack=[],Object.keys(s).forEach(function(E){var A=f[E];c.tiledMemberPack[E]=c.tileNodes(s[E],A.paddingLeft+A.paddingRight),A.rect.width=c.tiledMemberPack[E].width,A.rect.height=c.tiledMemberPack[E].height})},y.prototype.tileNodes=function(s,f){var c=n.TILING_PADDING_VERTICAL,E=n.TILING_PADDING_HORIZONTAL,A={rows:[],rowWidth:[],rowHeight:[],width:0,height:f,verticalPadding:c,horizontalPadding:E};s.sort(function(R,M){return R.rect.width*R.rect.height>M.rect.width*M.rect.height?-1:R.rect.width*R.rect.height0&&(C+=s.horizontalPadding),s.rowWidth[c]=C,s.width0&&(R+=s.verticalPadding);var M=0;R>s.rowHeight[c]&&(M=s.rowHeight[c],s.rowHeight[c]=R,M=s.rowHeight[c]-M),s.height+=M,s.rows[c].push(f)},y.prototype.getShortestRowIndex=function(s){for(var f=-1,c=Number.MAX_VALUE,E=0;Ec&&(f=E,c=s.rowWidth[E]);return f},y.prototype.canAddHorizontal=function(s,f,c){var E=this.getShortestRowIndex(s);if(E<0)return!0;var A=s.rowWidth[E];if(A+s.horizontalPadding+f<=s.width)return!0;var m=0;s.rowHeight[E]0&&(m=c+s.verticalPadding-s.rowHeight[E]);var C;s.width-A>=f+s.horizontalPadding?C=(s.height+m)/(A+f+s.horizontalPadding):C=(s.height+m)/s.width,m=c+s.verticalPadding;var R;return s.widthm&&f!=c){E.splice(-1,1),s.rows[c].push(A),s.rowWidth[f]=s.rowWidth[f]-m,s.rowWidth[c]=s.rowWidth[c]+m,s.width=s.rowWidth[instance.getLongestRowIndex(s)];for(var C=Number.MIN_VALUE,R=0;RC&&(C=E[R].height);f>0&&(C+=s.verticalPadding);var M=s.rowHeight[f]+s.rowHeight[c];s.rowHeight[f]=C,s.rowHeight[c]0)for(var F=A;F<=m;F++)x[0]+=this.grid[F][C-1].length+this.grid[F][C].length-1;if(m0)for(var F=C;F<=R;F++)x[3]+=this.grid[A-1][F].length+this.grid[A][F].length-1;for(var U=v.MAX_VALUE,P,_,X=0;X0){var R;R=T.getGraphManager().add(T.newGraph(),c),this.processChildrenList(R,f,T)}}},a.prototype.stop=function(){return this.stopped=!0,this};var v=function(u){u("layout","cose-bilkent",a)};typeof cytoscape<"u"&&v(cytoscape),I.exports=v})])})})(k)),k.exports}var yt=vt();const Et=lt(yt);tt.use(Et);function et(G,b){G.forEach(N=>{const I={id:N.id,labelText:N.label,height:N.height,width:N.width,padding:N.padding??0};Object.keys(N).forEach(L=>{["id","label","height","width","padding","x","y"].includes(L)||(I[L]=N[L])}),b.add({group:"nodes",data:I,position:{x:N.x??0,y:N.y??0}})})}V(et,"addNodes");function rt(G,b){G.forEach(N=>{const I={id:N.id,source:N.start,target:N.end};Object.keys(N).forEach(L=>{["id","start","end"].includes(L)||(I[L]=N[L])}),b.add({group:"edges",data:I})})}V(rt,"addEdges");function it(G){return new Promise(b=>{const N=gt("body").append("div").attr("id","cy").attr("style","display:none"),I=tt({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});N.remove(),et(G.nodes,I),rt(G.edges,I),I.nodes().forEach(function(o){o.layoutDimensions=()=>{const e=o.data();return{w:e.width,h:e.height}}});const L={name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1};I.layout(L).run(),I.ready(o=>{$.info("Cytoscape ready",o),b(I)})})}V(it,"createCytoscapeInstance");function nt(G){return G.nodes().map(b=>{const N=b.data(),I=b.position(),L={id:N.id,x:I.x,y:I.y};return Object.keys(N).forEach(o=>{o!=="id"&&(L[o]=N[o])}),L})}V(nt,"extractPositionedNodes");function ot(G){return G.edges().map(b=>{const N=b.data(),I=b._private.rscratch,L={id:N.id,source:N.source,target:N.target,startX:I.startX,startY:I.startY,midX:I.midX,midY:I.midY,endX:I.endX,endY:I.endY};return Object.keys(N).forEach(o=>{["id","source","target"].includes(o)||(L[o]=N[o])}),L})}V(ot,"extractPositionedEdges");async function st(G,b){$.debug("Starting cose-bilkent layout algorithm");try{at(G);const N=await it(G),I=nt(N),L=ot(N);return $.debug(`Layout completed: ${I.length} nodes, ${L.length} edges`),{nodes:I,edges:L}}catch(N){throw $.error("Error in cose-bilkent layout algorithm:",N),N}}V(st,"executeCoseBilkentLayout");function at(G){if(!G)throw new Error("Layout data is required");if(!G.config)throw new Error("Configuration is required in layout data");if(!G.rootNode)throw new Error("Root node is required");if(!G.nodes||!Array.isArray(G.nodes))throw new Error("No nodes found in layout data");if(!Array.isArray(G.edges))throw new Error("Edges array is required in layout data");return!0}V(at,"validateLayoutData");var Lt=V(async(G,b,{insertCluster:N,insertEdge:I,insertEdgeLabel:L,insertMarkers:o,insertNode:e,log:t,positionEdgeLabel:i},{algorithm:l})=>{const g={},n={},d=b.select("g");o(d,G.markers,G.type,G.diagramId);const r=d.insert("g").attr("class","subgraphs"),h=d.insert("g").attr("class","edgePaths"),a=d.insert("g").attr("class","edgeLabels"),p=d.insert("g").attr("class","nodes");t.debug("Inserting nodes into DOM for dimension calculation"),await Promise.all(G.nodes.map(async u=>{if(u.isGroup){const T={...u};n[u.id]=T,g[u.id]=T,await N(r,u)}else{const T={...u};g[u.id]=T;const y=await e(p,u,{config:G.config,dir:G.direction||"TB"}),O=y.node().getBBox();T.width=O.width,T.height=O.height,T.domId=y,t.debug(`Node ${u.id} dimensions: ${O.width}x${O.height}`)}})),t.debug("Running cose-bilkent layout algorithm");const v={...G,nodes:G.nodes.map(u=>{const T=g[u.id];return{...u,width:T.width,height:T.height}})},D=await st(v,G.config);t.debug("Positioning nodes based on layout results"),D.nodes.forEach(u=>{const T=g[u.id];T?.domId&&(T.domId.attr("transform",`translate(${u.x}, ${u.y})`),T.x=u.x,T.y=u.y,t.debug(`Positioned node ${T.id} at center (${u.x}, ${u.y})`))}),D.edges.forEach(u=>{const T=G.edges.find(y=>y.id===u.id);T&&(T.points=[{x:u.startX,y:u.startY},{x:u.midX,y:u.midY},{x:u.endX,y:u.endY}])}),t.debug("Inserting and positioning edges"),await Promise.all(G.edges.map(async u=>{await L(a,u);const T=g[u.start??""],y=g[u.end??""];if(T&&y){const O=D.edges.find(s=>s.id===u.id);if(O){t.debug("APA01 positionedEdge",O);const s={...u},f=I(h,s,n,G.type,T,y,G.diagramId);i(s,f)}else{const s={...u,points:[{x:T.x||0,y:T.y||0},{x:y.x||0,y:y.y||0}]},f=I(h,s,n,G.type,T,y,G.diagramId);i(s,f)}}})),t.debug("Cose-bilkent rendering completed")},"render"),Ot=Lt;export{Ot as render};
diff --git a/apps/pythinker-code/dist-web/assets/cssMode-gWA3VTCg.js b/apps/pythinker-code/dist-web/assets/cssMode-43LALI1D.js
similarity index 93%
rename from apps/pythinker-code/dist-web/assets/cssMode-gWA3VTCg.js
rename to apps/pythinker-code/dist-web/assets/cssMode-43LALI1D.js
index e1ddf63d7..f6ed602f2 100644
--- a/apps/pythinker-code/dist-web/assets/cssMode-gWA3VTCg.js
+++ b/apps/pythinker-code/dist-web/assets/cssMode-43LALI1D.js
@@ -1 +1 @@
-import{c as h,l as s}from"./editor.main-CUgPnB4r.js";import{C as c,H as u,D as p,a as m,R as f,b as _,c as w,d as k,F as v,e as D,S as P,f as R,g as I}from"./lspLanguageFeatures-BxKarwGx.js";import{h as y,i as U,j as T,t as x,k as j}from"./lspLanguageFeatures-BxKarwGx.js";import"./index-D9Nz1t7z.js";import"./purify.es-5AjVNlXF.js";const A=120*1e3;class C{constructor(n){this._defaults=n,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval(()=>this._checkIfIdle(),30*1e3),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker())}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){if(!this._worker)return;Date.now()-this._lastUsedTime>A&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||(this._worker=h({moduleId:"vs/language/css/cssWorker",createWorker:()=>new Worker(new URL("/assets/css.worker-uch7pA5g.js",import.meta.url),{type:"module"}),label:this._defaults.languageId,createData:{options:this._defaults.options,languageId:this._defaults.languageId}}),this._client=this._worker.getProxy()),this._client}getLanguageServiceWorker(...n){let e;return this._getClient().then(a=>{e=a}).then(a=>{if(this._worker)return this._worker.withSyncedResources(n)}).then(a=>e)}}function L(o){const n=[],e=[],a=new C(o);n.push(a);const r=(...t)=>a.getLanguageServiceWorker(...t);function l(){const{languageId:t,modeConfiguration:i}=o;g(e),i.completionItems&&e.push(s.registerCompletionItemProvider(t,new c(r,["/","-",":"]))),i.hovers&&e.push(s.registerHoverProvider(t,new u(r))),i.documentHighlights&&e.push(s.registerDocumentHighlightProvider(t,new p(r))),i.definitions&&e.push(s.registerDefinitionProvider(t,new m(r))),i.references&&e.push(s.registerReferenceProvider(t,new f(r))),i.documentSymbols&&e.push(s.registerDocumentSymbolProvider(t,new _(r))),i.rename&&e.push(s.registerRenameProvider(t,new w(r))),i.colors&&e.push(s.registerColorProvider(t,new k(r))),i.foldingRanges&&e.push(s.registerFoldingRangeProvider(t,new v(r))),i.diagnostics&&e.push(new D(t,r,o.onDidChange)),i.selectionRanges&&e.push(s.registerSelectionRangeProvider(t,new P(r))),i.documentFormattingEdits&&e.push(s.registerDocumentFormattingEditProvider(t,new R(r))),i.documentRangeFormattingEdits&&e.push(s.registerDocumentRangeFormattingEditProvider(t,new I(r)))}return l(),n.push(d(e)),d(n)}function d(o){return{dispose:()=>g(o)}}function g(o){for(;o.length;)o.pop().dispose()}export{c as CompletionAdapter,m as DefinitionAdapter,D as DiagnosticsAdapter,k as DocumentColorAdapter,R as DocumentFormattingEditProvider,p as DocumentHighlightAdapter,y as DocumentLinkAdapter,I as DocumentRangeFormattingEditProvider,_ as DocumentSymbolAdapter,v as FoldingRangeAdapter,u as HoverAdapter,f as ReferenceAdapter,w as RenameAdapter,P as SelectionRangeAdapter,C as WorkerManager,U as fromPosition,T as fromRange,L as setupMode,x as toRange,j as toTextEdit};
+import{c as h,l as s}from"./editor.main-CSd5xoJU.js";import{C as c,H as u,D as p,a as m,R as f,b as _,c as w,d as k,F as v,e as D,S as P,f as R,g as I}from"./lspLanguageFeatures-DIQkkUvS.js";import{h as y,i as U,j as T,t as x,k as j}from"./lspLanguageFeatures-DIQkkUvS.js";import"./index-XmhyfFRf.js";import"./purify.es-5AjVNlXF.js";const A=120*1e3;class C{constructor(n){this._defaults=n,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval(()=>this._checkIfIdle(),30*1e3),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker())}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){if(!this._worker)return;Date.now()-this._lastUsedTime>A&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||(this._worker=h({moduleId:"vs/language/css/cssWorker",createWorker:()=>new Worker(new URL("/assets/css.worker-uch7pA5g.js",import.meta.url),{type:"module"}),label:this._defaults.languageId,createData:{options:this._defaults.options,languageId:this._defaults.languageId}}),this._client=this._worker.getProxy()),this._client}getLanguageServiceWorker(...n){let e;return this._getClient().then(a=>{e=a}).then(a=>{if(this._worker)return this._worker.withSyncedResources(n)}).then(a=>e)}}function L(o){const n=[],e=[],a=new C(o);n.push(a);const r=(...t)=>a.getLanguageServiceWorker(...t);function l(){const{languageId:t,modeConfiguration:i}=o;g(e),i.completionItems&&e.push(s.registerCompletionItemProvider(t,new c(r,["/","-",":"]))),i.hovers&&e.push(s.registerHoverProvider(t,new u(r))),i.documentHighlights&&e.push(s.registerDocumentHighlightProvider(t,new p(r))),i.definitions&&e.push(s.registerDefinitionProvider(t,new m(r))),i.references&&e.push(s.registerReferenceProvider(t,new f(r))),i.documentSymbols&&e.push(s.registerDocumentSymbolProvider(t,new _(r))),i.rename&&e.push(s.registerRenameProvider(t,new w(r))),i.colors&&e.push(s.registerColorProvider(t,new k(r))),i.foldingRanges&&e.push(s.registerFoldingRangeProvider(t,new v(r))),i.diagnostics&&e.push(new D(t,r,o.onDidChange)),i.selectionRanges&&e.push(s.registerSelectionRangeProvider(t,new P(r))),i.documentFormattingEdits&&e.push(s.registerDocumentFormattingEditProvider(t,new R(r))),i.documentRangeFormattingEdits&&e.push(s.registerDocumentRangeFormattingEditProvider(t,new I(r)))}return l(),n.push(d(e)),d(n)}function d(o){return{dispose:()=>g(o)}}function g(o){for(;o.length;)o.pop().dispose()}export{c as CompletionAdapter,m as DefinitionAdapter,D as DiagnosticsAdapter,k as DocumentColorAdapter,R as DocumentFormattingEditProvider,p as DocumentHighlightAdapter,y as DocumentLinkAdapter,I as DocumentRangeFormattingEditProvider,_ as DocumentSymbolAdapter,v as FoldingRangeAdapter,u as HoverAdapter,f as ReferenceAdapter,w as RenameAdapter,P as SelectionRangeAdapter,C as WorkerManager,U as fromPosition,T as fromRange,L as setupMode,x as toRange,j as toTextEdit};
diff --git a/apps/pythinker-code/dist-web/assets/cynefin-OW5HDTMX-Byg0NdnJ.js b/apps/pythinker-code/dist-web/assets/cynefin-OW5HDTMX-BygTY4j3.js
similarity index 99%
rename from apps/pythinker-code/dist-web/assets/cynefin-OW5HDTMX-Byg0NdnJ.js
rename to apps/pythinker-code/dist-web/assets/cynefin-OW5HDTMX-BygTY4j3.js
index ade25350c..4f8d4d0e7 100644
--- a/apps/pythinker-code/dist-web/assets/cynefin-OW5HDTMX-Byg0NdnJ.js
+++ b/apps/pythinker-code/dist-web/assets/cynefin-OW5HDTMX-BygTY4j3.js
@@ -1,4 +1,4 @@
-import{bR as et}from"./index-D9Nz1t7z.js";var RI=Object.create,Ds=Object.defineProperty,AI=Object.getOwnPropertyDescriptor,Ad=Object.getOwnPropertyNames,EI=Object.getPrototypeOf,CI=Object.prototype.hasOwnProperty,i=(e,t)=>Ds(e,"name",{value:t,configurable:!0}),bI=(e,t)=>function(){return e&&(t=(0,e[Ad(e)[0]])(e=0)),t},H=(e,t)=>function(){return t||(0,e[Ad(e)[0]])((t={exports:{}}).exports,t),t.exports},Vr=(e,t)=>{for(var r in t)Ds(e,r,{get:t[r],enumerable:!0})},Ed=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Ad(t))!CI.call(e,a)&&a!==r&&Ds(e,a,{get:()=>t[a],enumerable:!(n=AI(t,a))||n.enumerable});return e},Ll=(e,t,r)=>(Ed(e,t,"default"),r),Cd=(e,t,r)=>(r=e!=null?RI(EI(e)):{},Ed(Ds(r,"default",{value:e,enumerable:!0}),e)),bd=e=>Ed(Ds({},"__esModule",{value:!0}),e),Dl={};Vr(Dl,{AnnotatedTextEdit:()=>mr,ChangeAnnotation:()=>an,ChangeAnnotationIdentifier:()=>Ke,CodeAction:()=>ef,CodeActionContext:()=>Qc,CodeActionKind:()=>Zc,CodeActionTriggerKind:()=>Xi,CodeDescription:()=>Nc,CodeLens:()=>tf,Color:()=>Co,ColorInformation:()=>Cc,ColorPresentation:()=>bc,Command:()=>nn,CompletionItem:()=>zc,CompletionItemKind:()=>Lc,CompletionItemLabelDetails:()=>Fc,CompletionItemTag:()=>xc,CompletionList:()=>jc,CreateFile:()=>ya,DeleteFile:()=>va,Diagnostic:()=>Vi,DiagnosticRelatedInformation:()=>bo,DiagnosticSeverity:()=>wc,DiagnosticTag:()=>Ic,DocumentHighlight:()=>Vc,DocumentHighlightKind:()=>Wc,DocumentLink:()=>nf,DocumentSymbol:()=>Jc,DocumentUri:()=>Rc,EOL:()=>zg,FoldingRange:()=>Sc,FoldingRangeKind:()=>_c,FormattingOptions:()=>rf,Hover:()=>Bc,InlayHint:()=>pf,InlayHintKind:()=>wo,InlayHintLabelPart:()=>Io,InlineCompletionContext:()=>Tf,InlineCompletionItem:()=>hf,InlineCompletionList:()=>yf,InlineCompletionTriggerKind:()=>gf,InlineValueContext:()=>df,InlineValueEvaluatableExpression:()=>ff,InlineValueText:()=>uf,InlineValueVariableLookup:()=>cf,InsertReplaceEdit:()=>Mc,InsertTextFormat:()=>Dc,InsertTextMode:()=>Gc,Location:()=>Wi,LocationLink:()=>Ec,MarkedString:()=>Yi,MarkupContent:()=>Ta,MarkupKind:()=>So,OptionalVersionedTextDocumentIdentifier:()=>Hi,ParameterInformation:()=>Uc,Position:()=>ie,Range:()=>Q,RenameFile:()=>ga,SelectedCompletionInfo:()=>vf,SelectionRange:()=>af,SemanticTokenModifiers:()=>of,SemanticTokenTypes:()=>sf,SemanticTokens:()=>lf,SignatureInformation:()=>Kc,StringValue:()=>mf,SymbolInformation:()=>Yc,SymbolKind:()=>qc,SymbolTag:()=>Hc,TextDocument:()=>Rf,TextDocumentEdit:()=>qi,TextDocumentIdentifier:()=>Pc,TextDocumentItem:()=>Oc,TextEdit:()=>Yt,URI:()=>Eo,VersionedTextDocumentIdentifier:()=>kc,WorkspaceChange:()=>Fg,WorkspaceEdit:()=>_o,WorkspaceFolder:()=>$f,WorkspaceSymbol:()=>Xc,integer:()=>Ac,uinteger:()=>Ki});var Rc,Eo,Ac,Ki,ie,Q,Wi,Ec,Co,Cc,bc,_c,Sc,bo,wc,Ic,Nc,Vi,nn,Yt,an,Ke,mr,qi,ya,ga,va,_o,ki,Ku,Fg,Pc,kc,Hi,Oc,So,Ta,Lc,Dc,xc,Mc,Gc,Fc,zc,jc,Yi,Bc,Uc,Kc,Wc,Vc,qc,Hc,Yc,Xc,Jc,Zc,Xi,Qc,ef,tf,rf,nf,af,sf,of,lf,uf,cf,ff,df,wo,Io,pf,mf,hf,yf,gf,vf,Tf,$f,zg,Rf,lh,A,xs=bI({"../../node_modules/.pnpm/vscode-languageserver-types@3.17.5/node_modules/vscode-languageserver-types/lib/esm/main.js"(){(function(e){function t(r){return typeof r=="string"}i(t,"is"),e.is=t})(Rc||(Rc={})),(function(e){function t(r){return typeof r=="string"}i(t,"is"),e.is=t})(Eo||(Eo={})),(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function t(r){return typeof r=="number"&&e.MIN_VALUE<=r&&r<=e.MAX_VALUE}i(t,"is"),e.is=t})(Ac||(Ac={})),(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function t(r){return typeof r=="number"&&e.MIN_VALUE<=r&&r<=e.MAX_VALUE}i(t,"is"),e.is=t})(Ki||(Ki={})),(function(e){function t(n,a){return n===Number.MAX_VALUE&&(n=Ki.MAX_VALUE),a===Number.MAX_VALUE&&(a=Ki.MAX_VALUE),{line:n,character:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.objectLiteral(a)&&A.uinteger(a.line)&&A.uinteger(a.character)}i(r,"is"),e.is=r})(ie||(ie={})),(function(e){function t(n,a,s,o){if(A.uinteger(n)&&A.uinteger(a)&&A.uinteger(s)&&A.uinteger(o))return{start:ie.create(n,a),end:ie.create(s,o)};if(ie.is(n)&&ie.is(a))return{start:n,end:a};throw new Error(`Range#create called with invalid arguments[${n}, ${a}, ${s}, ${o}]`)}i(t,"create"),e.create=t;function r(n){let a=n;return A.objectLiteral(a)&&ie.is(a.start)&&ie.is(a.end)}i(r,"is"),e.is=r})(Q||(Q={})),(function(e){function t(n,a){return{uri:n,range:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.objectLiteral(a)&&Q.is(a.range)&&(A.string(a.uri)||A.undefined(a.uri))}i(r,"is"),e.is=r})(Wi||(Wi={})),(function(e){function t(n,a,s,o){return{targetUri:n,targetRange:a,targetSelectionRange:s,originSelectionRange:o}}i(t,"create"),e.create=t;function r(n){let a=n;return A.objectLiteral(a)&&Q.is(a.targetRange)&&A.string(a.targetUri)&&Q.is(a.targetSelectionRange)&&(Q.is(a.originSelectionRange)||A.undefined(a.originSelectionRange))}i(r,"is"),e.is=r})(Ec||(Ec={})),(function(e){function t(n,a,s,o){return{red:n,green:a,blue:s,alpha:o}}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&A.numberRange(a.red,0,1)&&A.numberRange(a.green,0,1)&&A.numberRange(a.blue,0,1)&&A.numberRange(a.alpha,0,1)}i(r,"is"),e.is=r})(Co||(Co={})),(function(e){function t(n,a){return{range:n,color:a}}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&Q.is(a.range)&&Co.is(a.color)}i(r,"is"),e.is=r})(Cc||(Cc={})),(function(e){function t(n,a,s){return{label:n,textEdit:a,additionalTextEdits:s}}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&A.string(a.label)&&(A.undefined(a.textEdit)||Yt.is(a))&&(A.undefined(a.additionalTextEdits)||A.typedArray(a.additionalTextEdits,Yt.is))}i(r,"is"),e.is=r})(bc||(bc={})),(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(_c||(_c={})),(function(e){function t(n,a,s,o,l,u){const c={startLine:n,endLine:a};return A.defined(s)&&(c.startCharacter=s),A.defined(o)&&(c.endCharacter=o),A.defined(l)&&(c.kind=l),A.defined(u)&&(c.collapsedText=u),c}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&A.uinteger(a.startLine)&&A.uinteger(a.startLine)&&(A.undefined(a.startCharacter)||A.uinteger(a.startCharacter))&&(A.undefined(a.endCharacter)||A.uinteger(a.endCharacter))&&(A.undefined(a.kind)||A.string(a.kind))}i(r,"is"),e.is=r})(Sc||(Sc={})),(function(e){function t(n,a){return{location:n,message:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&Wi.is(a.location)&&A.string(a.message)}i(r,"is"),e.is=r})(bo||(bo={})),(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(wc||(wc={})),(function(e){e.Unnecessary=1,e.Deprecated=2})(Ic||(Ic={})),(function(e){function t(r){const n=r;return A.objectLiteral(n)&&A.string(n.href)}i(t,"is"),e.is=t})(Nc||(Nc={})),(function(e){function t(n,a,s,o,l,u){let c={range:n,message:a};return A.defined(s)&&(c.severity=s),A.defined(o)&&(c.code=o),A.defined(l)&&(c.source=l),A.defined(u)&&(c.relatedInformation=u),c}i(t,"create"),e.create=t;function r(n){var a;let s=n;return A.defined(s)&&Q.is(s.range)&&A.string(s.message)&&(A.number(s.severity)||A.undefined(s.severity))&&(A.integer(s.code)||A.string(s.code)||A.undefined(s.code))&&(A.undefined(s.codeDescription)||A.string((a=s.codeDescription)===null||a===void 0?void 0:a.href))&&(A.string(s.source)||A.undefined(s.source))&&(A.undefined(s.relatedInformation)||A.typedArray(s.relatedInformation,bo.is))}i(r,"is"),e.is=r})(Vi||(Vi={})),(function(e){function t(n,a,...s){let o={title:n,command:a};return A.defined(s)&&s.length>0&&(o.arguments=s),o}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.string(a.title)&&A.string(a.command)}i(r,"is"),e.is=r})(nn||(nn={})),(function(e){function t(s,o){return{range:s,newText:o}}i(t,"replace"),e.replace=t;function r(s,o){return{range:{start:s,end:s},newText:o}}i(r,"insert"),e.insert=r;function n(s){return{range:s,newText:""}}i(n,"del"),e.del=n;function a(s){const o=s;return A.objectLiteral(o)&&A.string(o.newText)&&Q.is(o.range)}i(a,"is"),e.is=a})(Yt||(Yt={})),(function(e){function t(n,a,s){const o={label:n};return a!==void 0&&(o.needsConfirmation=a),s!==void 0&&(o.description=s),o}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&A.string(a.label)&&(A.boolean(a.needsConfirmation)||a.needsConfirmation===void 0)&&(A.string(a.description)||a.description===void 0)}i(r,"is"),e.is=r})(an||(an={})),(function(e){function t(r){const n=r;return A.string(n)}i(t,"is"),e.is=t})(Ke||(Ke={})),(function(e){function t(s,o,l){return{range:s,newText:o,annotationId:l}}i(t,"replace"),e.replace=t;function r(s,o,l){return{range:{start:s,end:s},newText:o,annotationId:l}}i(r,"insert"),e.insert=r;function n(s,o){return{range:s,newText:"",annotationId:o}}i(n,"del"),e.del=n;function a(s){const o=s;return Yt.is(o)&&(an.is(o.annotationId)||Ke.is(o.annotationId))}i(a,"is"),e.is=a})(mr||(mr={})),(function(e){function t(n,a){return{textDocument:n,edits:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&Hi.is(a.textDocument)&&Array.isArray(a.edits)}i(r,"is"),e.is=r})(qi||(qi={})),(function(e){function t(n,a,s){let o={kind:"create",uri:n};return a!==void 0&&(a.overwrite!==void 0||a.ignoreIfExists!==void 0)&&(o.options=a),s!==void 0&&(o.annotationId=s),o}i(t,"create"),e.create=t;function r(n){let a=n;return a&&a.kind==="create"&&A.string(a.uri)&&(a.options===void 0||(a.options.overwrite===void 0||A.boolean(a.options.overwrite))&&(a.options.ignoreIfExists===void 0||A.boolean(a.options.ignoreIfExists)))&&(a.annotationId===void 0||Ke.is(a.annotationId))}i(r,"is"),e.is=r})(ya||(ya={})),(function(e){function t(n,a,s,o){let l={kind:"rename",oldUri:n,newUri:a};return s!==void 0&&(s.overwrite!==void 0||s.ignoreIfExists!==void 0)&&(l.options=s),o!==void 0&&(l.annotationId=o),l}i(t,"create"),e.create=t;function r(n){let a=n;return a&&a.kind==="rename"&&A.string(a.oldUri)&&A.string(a.newUri)&&(a.options===void 0||(a.options.overwrite===void 0||A.boolean(a.options.overwrite))&&(a.options.ignoreIfExists===void 0||A.boolean(a.options.ignoreIfExists)))&&(a.annotationId===void 0||Ke.is(a.annotationId))}i(r,"is"),e.is=r})(ga||(ga={})),(function(e){function t(n,a,s){let o={kind:"delete",uri:n};return a!==void 0&&(a.recursive!==void 0||a.ignoreIfNotExists!==void 0)&&(o.options=a),s!==void 0&&(o.annotationId=s),o}i(t,"create"),e.create=t;function r(n){let a=n;return a&&a.kind==="delete"&&A.string(a.uri)&&(a.options===void 0||(a.options.recursive===void 0||A.boolean(a.options.recursive))&&(a.options.ignoreIfNotExists===void 0||A.boolean(a.options.ignoreIfNotExists)))&&(a.annotationId===void 0||Ke.is(a.annotationId))}i(r,"is"),e.is=r})(va||(va={})),(function(e){function t(r){let n=r;return n&&(n.changes!==void 0||n.documentChanges!==void 0)&&(n.documentChanges===void 0||n.documentChanges.every(a=>A.string(a.kind)?ya.is(a)||ga.is(a)||va.is(a):qi.is(a)))}i(t,"is"),e.is=t})(_o||(_o={})),ki=class{static{i(this,"TextEditChangeImpl")}constructor(e,t){this.edits=e,this.changeAnnotations=t}insert(e,t,r){let n,a;if(r===void 0?n=Yt.insert(e,t):Ke.is(r)?(a=r,n=mr.insert(e,t,r)):(this.assertChangeAnnotations(this.changeAnnotations),a=this.changeAnnotations.manage(r),n=mr.insert(e,t,a)),this.edits.push(n),a!==void 0)return a}replace(e,t,r){let n,a;if(r===void 0?n=Yt.replace(e,t):Ke.is(r)?(a=r,n=mr.replace(e,t,r)):(this.assertChangeAnnotations(this.changeAnnotations),a=this.changeAnnotations.manage(r),n=mr.replace(e,t,a)),this.edits.push(n),a!==void 0)return a}delete(e,t){let r,n;if(t===void 0?r=Yt.del(e):Ke.is(t)?(n=t,r=mr.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),n=this.changeAnnotations.manage(t),r=mr.del(e,n)),this.edits.push(r),n!==void 0)return n}add(e){this.edits.push(e)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(e){if(e===void 0)throw new Error("Text edit change is not configured to manage change annotations.")}},Ku=class{static{i(this,"ChangeAnnotations")}constructor(e){this._annotations=e===void 0?Object.create(null):e,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(e,t){let r;if(Ke.is(e)?r=e:(r=this.nextId(),t=e),this._annotations[r]!==void 0)throw new Error(`Id ${r} is already in use.`);if(t===void 0)throw new Error(`No annotation provided for id ${r}`);return this._annotations[r]=t,this._size++,r}nextId(){return this._counter++,this._counter.toString()}},Fg=class{static{i(this,"WorkspaceChange")}constructor(e){this._textEditChanges=Object.create(null),e!==void 0?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new Ku(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach(t=>{if(qi.is(t)){const r=new ki(t.edits,this._changeAnnotations);this._textEditChanges[t.textDocument.uri]=r}})):e.changes&&Object.keys(e.changes).forEach(t=>{const r=new ki(e.changes[t]);this._textEditChanges[t]=r})):this._workspaceEdit={}}get edit(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(e){if(Hi.is(e)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");const t={uri:e.uri,version:e.version};let r=this._textEditChanges[t.uri];if(!r){const n=[],a={textDocument:t,edits:n};this._workspaceEdit.documentChanges.push(a),r=new ki(n,this._changeAnnotations),this._textEditChanges[t.uri]=r}return r}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");let t=this._textEditChanges[e];if(!t){let r=[];this._workspaceEdit.changes[e]=r,t=new ki(r),this._textEditChanges[e]=t}return t}}initDocumentChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new Ku,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))}createFile(e,t,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let n;an.is(t)||Ke.is(t)?n=t:r=t;let a,s;if(n===void 0?a=ya.create(e,r):(s=Ke.is(n)?n:this._changeAnnotations.manage(n),a=ya.create(e,r,s)),this._workspaceEdit.documentChanges.push(a),s!==void 0)return s}renameFile(e,t,r,n){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let a;an.is(r)||Ke.is(r)?a=r:n=r;let s,o;if(a===void 0?s=ga.create(e,t,n):(o=Ke.is(a)?a:this._changeAnnotations.manage(a),s=ga.create(e,t,n,o)),this._workspaceEdit.documentChanges.push(s),o!==void 0)return o}deleteFile(e,t,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let n;an.is(t)||Ke.is(t)?n=t:r=t;let a,s;if(n===void 0?a=va.create(e,r):(s=Ke.is(n)?n:this._changeAnnotations.manage(n),a=va.create(e,r,s)),this._workspaceEdit.documentChanges.push(a),s!==void 0)return s}},(function(e){function t(n){return{uri:n}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.string(a.uri)}i(r,"is"),e.is=r})(Pc||(Pc={})),(function(e){function t(n,a){return{uri:n,version:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.string(a.uri)&&A.integer(a.version)}i(r,"is"),e.is=r})(kc||(kc={})),(function(e){function t(n,a){return{uri:n,version:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.string(a.uri)&&(a.version===null||A.integer(a.version))}i(r,"is"),e.is=r})(Hi||(Hi={})),(function(e){function t(n,a,s,o){return{uri:n,languageId:a,version:s,text:o}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.string(a.uri)&&A.string(a.languageId)&&A.integer(a.version)&&A.string(a.text)}i(r,"is"),e.is=r})(Oc||(Oc={})),(function(e){e.PlainText="plaintext",e.Markdown="markdown";function t(r){const n=r;return n===e.PlainText||n===e.Markdown}i(t,"is"),e.is=t})(So||(So={})),(function(e){function t(r){const n=r;return A.objectLiteral(r)&&So.is(n.kind)&&A.string(n.value)}i(t,"is"),e.is=t})(Ta||(Ta={})),(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(Lc||(Lc={})),(function(e){e.PlainText=1,e.Snippet=2})(Dc||(Dc={})),(function(e){e.Deprecated=1})(xc||(xc={})),(function(e){function t(n,a,s){return{newText:n,insert:a,replace:s}}i(t,"create"),e.create=t;function r(n){const a=n;return a&&A.string(a.newText)&&Q.is(a.insert)&&Q.is(a.replace)}i(r,"is"),e.is=r})(Mc||(Mc={})),(function(e){e.asIs=1,e.adjustIndentation=2})(Gc||(Gc={})),(function(e){function t(r){const n=r;return n&&(A.string(n.detail)||n.detail===void 0)&&(A.string(n.description)||n.description===void 0)}i(t,"is"),e.is=t})(Fc||(Fc={})),(function(e){function t(r){return{label:r}}i(t,"create"),e.create=t})(zc||(zc={})),(function(e){function t(r,n){return{items:r||[],isIncomplete:!!n}}i(t,"create"),e.create=t})(jc||(jc={})),(function(e){function t(n){return n.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}i(t,"fromPlainText"),e.fromPlainText=t;function r(n){const a=n;return A.string(a)||A.objectLiteral(a)&&A.string(a.language)&&A.string(a.value)}i(r,"is"),e.is=r})(Yi||(Yi={})),(function(e){function t(r){let n=r;return!!n&&A.objectLiteral(n)&&(Ta.is(n.contents)||Yi.is(n.contents)||A.typedArray(n.contents,Yi.is))&&(r.range===void 0||Q.is(r.range))}i(t,"is"),e.is=t})(Bc||(Bc={})),(function(e){function t(r,n){return n?{label:r,documentation:n}:{label:r}}i(t,"create"),e.create=t})(Uc||(Uc={})),(function(e){function t(r,n,...a){let s={label:r};return A.defined(n)&&(s.documentation=n),A.defined(a)?s.parameters=a:s.parameters=[],s}i(t,"create"),e.create=t})(Kc||(Kc={})),(function(e){e.Text=1,e.Read=2,e.Write=3})(Wc||(Wc={})),(function(e){function t(r,n){let a={range:r};return A.number(n)&&(a.kind=n),a}i(t,"create"),e.create=t})(Vc||(Vc={})),(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})(qc||(qc={})),(function(e){e.Deprecated=1})(Hc||(Hc={})),(function(e){function t(r,n,a,s,o){let l={name:r,kind:n,location:{uri:s,range:a}};return o&&(l.containerName=o),l}i(t,"create"),e.create=t})(Yc||(Yc={})),(function(e){function t(r,n,a,s){return s!==void 0?{name:r,kind:n,location:{uri:a,range:s}}:{name:r,kind:n,location:{uri:a}}}i(t,"create"),e.create=t})(Xc||(Xc={})),(function(e){function t(n,a,s,o,l,u){let c={name:n,detail:a,kind:s,range:o,selectionRange:l};return u!==void 0&&(c.children=u),c}i(t,"create"),e.create=t;function r(n){let a=n;return a&&A.string(a.name)&&A.number(a.kind)&&Q.is(a.range)&&Q.is(a.selectionRange)&&(a.detail===void 0||A.string(a.detail))&&(a.deprecated===void 0||A.boolean(a.deprecated))&&(a.children===void 0||Array.isArray(a.children))&&(a.tags===void 0||Array.isArray(a.tags))}i(r,"is"),e.is=r})(Jc||(Jc={})),(function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"})(Zc||(Zc={})),(function(e){e.Invoked=1,e.Automatic=2})(Xi||(Xi={})),(function(e){function t(n,a,s){let o={diagnostics:n};return a!=null&&(o.only=a),s!=null&&(o.triggerKind=s),o}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.typedArray(a.diagnostics,Vi.is)&&(a.only===void 0||A.typedArray(a.only,A.string))&&(a.triggerKind===void 0||a.triggerKind===Xi.Invoked||a.triggerKind===Xi.Automatic)}i(r,"is"),e.is=r})(Qc||(Qc={})),(function(e){function t(n,a,s){let o={title:n},l=!0;return typeof a=="string"?(l=!1,o.kind=a):nn.is(a)?o.command=a:o.edit=a,l&&s!==void 0&&(o.kind=s),o}i(t,"create"),e.create=t;function r(n){let a=n;return a&&A.string(a.title)&&(a.diagnostics===void 0||A.typedArray(a.diagnostics,Vi.is))&&(a.kind===void 0||A.string(a.kind))&&(a.edit!==void 0||a.command!==void 0)&&(a.command===void 0||nn.is(a.command))&&(a.isPreferred===void 0||A.boolean(a.isPreferred))&&(a.edit===void 0||_o.is(a.edit))}i(r,"is"),e.is=r})(ef||(ef={})),(function(e){function t(n,a){let s={range:n};return A.defined(a)&&(s.data=a),s}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&Q.is(a.range)&&(A.undefined(a.command)||nn.is(a.command))}i(r,"is"),e.is=r})(tf||(tf={})),(function(e){function t(n,a){return{tabSize:n,insertSpaces:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.uinteger(a.tabSize)&&A.boolean(a.insertSpaces)}i(r,"is"),e.is=r})(rf||(rf={})),(function(e){function t(n,a,s){return{range:n,target:a,data:s}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&Q.is(a.range)&&(A.undefined(a.target)||A.string(a.target))}i(r,"is"),e.is=r})(nf||(nf={})),(function(e){function t(n,a){return{range:n,parent:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.objectLiteral(a)&&Q.is(a.range)&&(a.parent===void 0||e.is(a.parent))}i(r,"is"),e.is=r})(af||(af={})),(function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator"})(sf||(sf={})),(function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"})(of||(of={})),(function(e){function t(r){const n=r;return A.objectLiteral(n)&&(n.resultId===void 0||typeof n.resultId=="string")&&Array.isArray(n.data)&&(n.data.length===0||typeof n.data[0]=="number")}i(t,"is"),e.is=t})(lf||(lf={})),(function(e){function t(n,a){return{range:n,text:a}}i(t,"create"),e.create=t;function r(n){const a=n;return a!=null&&Q.is(a.range)&&A.string(a.text)}i(r,"is"),e.is=r})(uf||(uf={})),(function(e){function t(n,a,s){return{range:n,variableName:a,caseSensitiveLookup:s}}i(t,"create"),e.create=t;function r(n){const a=n;return a!=null&&Q.is(a.range)&&A.boolean(a.caseSensitiveLookup)&&(A.string(a.variableName)||a.variableName===void 0)}i(r,"is"),e.is=r})(cf||(cf={})),(function(e){function t(n,a){return{range:n,expression:a}}i(t,"create"),e.create=t;function r(n){const a=n;return a!=null&&Q.is(a.range)&&(A.string(a.expression)||a.expression===void 0)}i(r,"is"),e.is=r})(ff||(ff={})),(function(e){function t(n,a){return{frameId:n,stoppedLocation:a}}i(t,"create"),e.create=t;function r(n){const a=n;return A.defined(a)&&Q.is(n.stoppedLocation)}i(r,"is"),e.is=r})(df||(df={})),(function(e){e.Type=1,e.Parameter=2;function t(r){return r===1||r===2}i(t,"is"),e.is=t})(wo||(wo={})),(function(e){function t(n){return{value:n}}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&(a.tooltip===void 0||A.string(a.tooltip)||Ta.is(a.tooltip))&&(a.location===void 0||Wi.is(a.location))&&(a.command===void 0||nn.is(a.command))}i(r,"is"),e.is=r})(Io||(Io={})),(function(e){function t(n,a,s){const o={position:n,label:a};return s!==void 0&&(o.kind=s),o}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&ie.is(a.position)&&(A.string(a.label)||A.typedArray(a.label,Io.is))&&(a.kind===void 0||wo.is(a.kind))&&a.textEdits===void 0||A.typedArray(a.textEdits,Yt.is)&&(a.tooltip===void 0||A.string(a.tooltip)||Ta.is(a.tooltip))&&(a.paddingLeft===void 0||A.boolean(a.paddingLeft))&&(a.paddingRight===void 0||A.boolean(a.paddingRight))}i(r,"is"),e.is=r})(pf||(pf={})),(function(e){function t(r){return{kind:"snippet",value:r}}i(t,"createSnippet"),e.createSnippet=t})(mf||(mf={})),(function(e){function t(r,n,a,s){return{insertText:r,filterText:n,range:a,command:s}}i(t,"create"),e.create=t})(hf||(hf={})),(function(e){function t(r){return{items:r}}i(t,"create"),e.create=t})(yf||(yf={})),(function(e){e.Invoked=0,e.Automatic=1})(gf||(gf={})),(function(e){function t(r,n){return{range:r,text:n}}i(t,"create"),e.create=t})(vf||(vf={})),(function(e){function t(r,n){return{triggerKind:r,selectedCompletionInfo:n}}i(t,"create"),e.create=t})(Tf||(Tf={})),(function(e){function t(r){const n=r;return A.objectLiteral(n)&&Eo.is(n.uri)&&A.string(n.name)}i(t,"is"),e.is=t})($f||($f={})),zg=[`
+import{bR as et}from"./index-XmhyfFRf.js";var RI=Object.create,Ds=Object.defineProperty,AI=Object.getOwnPropertyDescriptor,Ad=Object.getOwnPropertyNames,EI=Object.getPrototypeOf,CI=Object.prototype.hasOwnProperty,i=(e,t)=>Ds(e,"name",{value:t,configurable:!0}),bI=(e,t)=>function(){return e&&(t=(0,e[Ad(e)[0]])(e=0)),t},H=(e,t)=>function(){return t||(0,e[Ad(e)[0]])((t={exports:{}}).exports,t),t.exports},Vr=(e,t)=>{for(var r in t)Ds(e,r,{get:t[r],enumerable:!0})},Ed=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Ad(t))!CI.call(e,a)&&a!==r&&Ds(e,a,{get:()=>t[a],enumerable:!(n=AI(t,a))||n.enumerable});return e},Ll=(e,t,r)=>(Ed(e,t,"default"),r),Cd=(e,t,r)=>(r=e!=null?RI(EI(e)):{},Ed(Ds(r,"default",{value:e,enumerable:!0}),e)),bd=e=>Ed(Ds({},"__esModule",{value:!0}),e),Dl={};Vr(Dl,{AnnotatedTextEdit:()=>mr,ChangeAnnotation:()=>an,ChangeAnnotationIdentifier:()=>Ke,CodeAction:()=>ef,CodeActionContext:()=>Qc,CodeActionKind:()=>Zc,CodeActionTriggerKind:()=>Xi,CodeDescription:()=>Nc,CodeLens:()=>tf,Color:()=>Co,ColorInformation:()=>Cc,ColorPresentation:()=>bc,Command:()=>nn,CompletionItem:()=>zc,CompletionItemKind:()=>Lc,CompletionItemLabelDetails:()=>Fc,CompletionItemTag:()=>xc,CompletionList:()=>jc,CreateFile:()=>ya,DeleteFile:()=>va,Diagnostic:()=>Vi,DiagnosticRelatedInformation:()=>bo,DiagnosticSeverity:()=>wc,DiagnosticTag:()=>Ic,DocumentHighlight:()=>Vc,DocumentHighlightKind:()=>Wc,DocumentLink:()=>nf,DocumentSymbol:()=>Jc,DocumentUri:()=>Rc,EOL:()=>zg,FoldingRange:()=>Sc,FoldingRangeKind:()=>_c,FormattingOptions:()=>rf,Hover:()=>Bc,InlayHint:()=>pf,InlayHintKind:()=>wo,InlayHintLabelPart:()=>Io,InlineCompletionContext:()=>Tf,InlineCompletionItem:()=>hf,InlineCompletionList:()=>yf,InlineCompletionTriggerKind:()=>gf,InlineValueContext:()=>df,InlineValueEvaluatableExpression:()=>ff,InlineValueText:()=>uf,InlineValueVariableLookup:()=>cf,InsertReplaceEdit:()=>Mc,InsertTextFormat:()=>Dc,InsertTextMode:()=>Gc,Location:()=>Wi,LocationLink:()=>Ec,MarkedString:()=>Yi,MarkupContent:()=>Ta,MarkupKind:()=>So,OptionalVersionedTextDocumentIdentifier:()=>Hi,ParameterInformation:()=>Uc,Position:()=>ie,Range:()=>Q,RenameFile:()=>ga,SelectedCompletionInfo:()=>vf,SelectionRange:()=>af,SemanticTokenModifiers:()=>of,SemanticTokenTypes:()=>sf,SemanticTokens:()=>lf,SignatureInformation:()=>Kc,StringValue:()=>mf,SymbolInformation:()=>Yc,SymbolKind:()=>qc,SymbolTag:()=>Hc,TextDocument:()=>Rf,TextDocumentEdit:()=>qi,TextDocumentIdentifier:()=>Pc,TextDocumentItem:()=>Oc,TextEdit:()=>Yt,URI:()=>Eo,VersionedTextDocumentIdentifier:()=>kc,WorkspaceChange:()=>Fg,WorkspaceEdit:()=>_o,WorkspaceFolder:()=>$f,WorkspaceSymbol:()=>Xc,integer:()=>Ac,uinteger:()=>Ki});var Rc,Eo,Ac,Ki,ie,Q,Wi,Ec,Co,Cc,bc,_c,Sc,bo,wc,Ic,Nc,Vi,nn,Yt,an,Ke,mr,qi,ya,ga,va,_o,ki,Ku,Fg,Pc,kc,Hi,Oc,So,Ta,Lc,Dc,xc,Mc,Gc,Fc,zc,jc,Yi,Bc,Uc,Kc,Wc,Vc,qc,Hc,Yc,Xc,Jc,Zc,Xi,Qc,ef,tf,rf,nf,af,sf,of,lf,uf,cf,ff,df,wo,Io,pf,mf,hf,yf,gf,vf,Tf,$f,zg,Rf,lh,A,xs=bI({"../../node_modules/.pnpm/vscode-languageserver-types@3.17.5/node_modules/vscode-languageserver-types/lib/esm/main.js"(){(function(e){function t(r){return typeof r=="string"}i(t,"is"),e.is=t})(Rc||(Rc={})),(function(e){function t(r){return typeof r=="string"}i(t,"is"),e.is=t})(Eo||(Eo={})),(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function t(r){return typeof r=="number"&&e.MIN_VALUE<=r&&r<=e.MAX_VALUE}i(t,"is"),e.is=t})(Ac||(Ac={})),(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function t(r){return typeof r=="number"&&e.MIN_VALUE<=r&&r<=e.MAX_VALUE}i(t,"is"),e.is=t})(Ki||(Ki={})),(function(e){function t(n,a){return n===Number.MAX_VALUE&&(n=Ki.MAX_VALUE),a===Number.MAX_VALUE&&(a=Ki.MAX_VALUE),{line:n,character:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.objectLiteral(a)&&A.uinteger(a.line)&&A.uinteger(a.character)}i(r,"is"),e.is=r})(ie||(ie={})),(function(e){function t(n,a,s,o){if(A.uinteger(n)&&A.uinteger(a)&&A.uinteger(s)&&A.uinteger(o))return{start:ie.create(n,a),end:ie.create(s,o)};if(ie.is(n)&&ie.is(a))return{start:n,end:a};throw new Error(`Range#create called with invalid arguments[${n}, ${a}, ${s}, ${o}]`)}i(t,"create"),e.create=t;function r(n){let a=n;return A.objectLiteral(a)&&ie.is(a.start)&&ie.is(a.end)}i(r,"is"),e.is=r})(Q||(Q={})),(function(e){function t(n,a){return{uri:n,range:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.objectLiteral(a)&&Q.is(a.range)&&(A.string(a.uri)||A.undefined(a.uri))}i(r,"is"),e.is=r})(Wi||(Wi={})),(function(e){function t(n,a,s,o){return{targetUri:n,targetRange:a,targetSelectionRange:s,originSelectionRange:o}}i(t,"create"),e.create=t;function r(n){let a=n;return A.objectLiteral(a)&&Q.is(a.targetRange)&&A.string(a.targetUri)&&Q.is(a.targetSelectionRange)&&(Q.is(a.originSelectionRange)||A.undefined(a.originSelectionRange))}i(r,"is"),e.is=r})(Ec||(Ec={})),(function(e){function t(n,a,s,o){return{red:n,green:a,blue:s,alpha:o}}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&A.numberRange(a.red,0,1)&&A.numberRange(a.green,0,1)&&A.numberRange(a.blue,0,1)&&A.numberRange(a.alpha,0,1)}i(r,"is"),e.is=r})(Co||(Co={})),(function(e){function t(n,a){return{range:n,color:a}}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&Q.is(a.range)&&Co.is(a.color)}i(r,"is"),e.is=r})(Cc||(Cc={})),(function(e){function t(n,a,s){return{label:n,textEdit:a,additionalTextEdits:s}}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&A.string(a.label)&&(A.undefined(a.textEdit)||Yt.is(a))&&(A.undefined(a.additionalTextEdits)||A.typedArray(a.additionalTextEdits,Yt.is))}i(r,"is"),e.is=r})(bc||(bc={})),(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(_c||(_c={})),(function(e){function t(n,a,s,o,l,u){const c={startLine:n,endLine:a};return A.defined(s)&&(c.startCharacter=s),A.defined(o)&&(c.endCharacter=o),A.defined(l)&&(c.kind=l),A.defined(u)&&(c.collapsedText=u),c}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&A.uinteger(a.startLine)&&A.uinteger(a.startLine)&&(A.undefined(a.startCharacter)||A.uinteger(a.startCharacter))&&(A.undefined(a.endCharacter)||A.uinteger(a.endCharacter))&&(A.undefined(a.kind)||A.string(a.kind))}i(r,"is"),e.is=r})(Sc||(Sc={})),(function(e){function t(n,a){return{location:n,message:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&Wi.is(a.location)&&A.string(a.message)}i(r,"is"),e.is=r})(bo||(bo={})),(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(wc||(wc={})),(function(e){e.Unnecessary=1,e.Deprecated=2})(Ic||(Ic={})),(function(e){function t(r){const n=r;return A.objectLiteral(n)&&A.string(n.href)}i(t,"is"),e.is=t})(Nc||(Nc={})),(function(e){function t(n,a,s,o,l,u){let c={range:n,message:a};return A.defined(s)&&(c.severity=s),A.defined(o)&&(c.code=o),A.defined(l)&&(c.source=l),A.defined(u)&&(c.relatedInformation=u),c}i(t,"create"),e.create=t;function r(n){var a;let s=n;return A.defined(s)&&Q.is(s.range)&&A.string(s.message)&&(A.number(s.severity)||A.undefined(s.severity))&&(A.integer(s.code)||A.string(s.code)||A.undefined(s.code))&&(A.undefined(s.codeDescription)||A.string((a=s.codeDescription)===null||a===void 0?void 0:a.href))&&(A.string(s.source)||A.undefined(s.source))&&(A.undefined(s.relatedInformation)||A.typedArray(s.relatedInformation,bo.is))}i(r,"is"),e.is=r})(Vi||(Vi={})),(function(e){function t(n,a,...s){let o={title:n,command:a};return A.defined(s)&&s.length>0&&(o.arguments=s),o}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.string(a.title)&&A.string(a.command)}i(r,"is"),e.is=r})(nn||(nn={})),(function(e){function t(s,o){return{range:s,newText:o}}i(t,"replace"),e.replace=t;function r(s,o){return{range:{start:s,end:s},newText:o}}i(r,"insert"),e.insert=r;function n(s){return{range:s,newText:""}}i(n,"del"),e.del=n;function a(s){const o=s;return A.objectLiteral(o)&&A.string(o.newText)&&Q.is(o.range)}i(a,"is"),e.is=a})(Yt||(Yt={})),(function(e){function t(n,a,s){const o={label:n};return a!==void 0&&(o.needsConfirmation=a),s!==void 0&&(o.description=s),o}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&A.string(a.label)&&(A.boolean(a.needsConfirmation)||a.needsConfirmation===void 0)&&(A.string(a.description)||a.description===void 0)}i(r,"is"),e.is=r})(an||(an={})),(function(e){function t(r){const n=r;return A.string(n)}i(t,"is"),e.is=t})(Ke||(Ke={})),(function(e){function t(s,o,l){return{range:s,newText:o,annotationId:l}}i(t,"replace"),e.replace=t;function r(s,o,l){return{range:{start:s,end:s},newText:o,annotationId:l}}i(r,"insert"),e.insert=r;function n(s,o){return{range:s,newText:"",annotationId:o}}i(n,"del"),e.del=n;function a(s){const o=s;return Yt.is(o)&&(an.is(o.annotationId)||Ke.is(o.annotationId))}i(a,"is"),e.is=a})(mr||(mr={})),(function(e){function t(n,a){return{textDocument:n,edits:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&Hi.is(a.textDocument)&&Array.isArray(a.edits)}i(r,"is"),e.is=r})(qi||(qi={})),(function(e){function t(n,a,s){let o={kind:"create",uri:n};return a!==void 0&&(a.overwrite!==void 0||a.ignoreIfExists!==void 0)&&(o.options=a),s!==void 0&&(o.annotationId=s),o}i(t,"create"),e.create=t;function r(n){let a=n;return a&&a.kind==="create"&&A.string(a.uri)&&(a.options===void 0||(a.options.overwrite===void 0||A.boolean(a.options.overwrite))&&(a.options.ignoreIfExists===void 0||A.boolean(a.options.ignoreIfExists)))&&(a.annotationId===void 0||Ke.is(a.annotationId))}i(r,"is"),e.is=r})(ya||(ya={})),(function(e){function t(n,a,s,o){let l={kind:"rename",oldUri:n,newUri:a};return s!==void 0&&(s.overwrite!==void 0||s.ignoreIfExists!==void 0)&&(l.options=s),o!==void 0&&(l.annotationId=o),l}i(t,"create"),e.create=t;function r(n){let a=n;return a&&a.kind==="rename"&&A.string(a.oldUri)&&A.string(a.newUri)&&(a.options===void 0||(a.options.overwrite===void 0||A.boolean(a.options.overwrite))&&(a.options.ignoreIfExists===void 0||A.boolean(a.options.ignoreIfExists)))&&(a.annotationId===void 0||Ke.is(a.annotationId))}i(r,"is"),e.is=r})(ga||(ga={})),(function(e){function t(n,a,s){let o={kind:"delete",uri:n};return a!==void 0&&(a.recursive!==void 0||a.ignoreIfNotExists!==void 0)&&(o.options=a),s!==void 0&&(o.annotationId=s),o}i(t,"create"),e.create=t;function r(n){let a=n;return a&&a.kind==="delete"&&A.string(a.uri)&&(a.options===void 0||(a.options.recursive===void 0||A.boolean(a.options.recursive))&&(a.options.ignoreIfNotExists===void 0||A.boolean(a.options.ignoreIfNotExists)))&&(a.annotationId===void 0||Ke.is(a.annotationId))}i(r,"is"),e.is=r})(va||(va={})),(function(e){function t(r){let n=r;return n&&(n.changes!==void 0||n.documentChanges!==void 0)&&(n.documentChanges===void 0||n.documentChanges.every(a=>A.string(a.kind)?ya.is(a)||ga.is(a)||va.is(a):qi.is(a)))}i(t,"is"),e.is=t})(_o||(_o={})),ki=class{static{i(this,"TextEditChangeImpl")}constructor(e,t){this.edits=e,this.changeAnnotations=t}insert(e,t,r){let n,a;if(r===void 0?n=Yt.insert(e,t):Ke.is(r)?(a=r,n=mr.insert(e,t,r)):(this.assertChangeAnnotations(this.changeAnnotations),a=this.changeAnnotations.manage(r),n=mr.insert(e,t,a)),this.edits.push(n),a!==void 0)return a}replace(e,t,r){let n,a;if(r===void 0?n=Yt.replace(e,t):Ke.is(r)?(a=r,n=mr.replace(e,t,r)):(this.assertChangeAnnotations(this.changeAnnotations),a=this.changeAnnotations.manage(r),n=mr.replace(e,t,a)),this.edits.push(n),a!==void 0)return a}delete(e,t){let r,n;if(t===void 0?r=Yt.del(e):Ke.is(t)?(n=t,r=mr.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),n=this.changeAnnotations.manage(t),r=mr.del(e,n)),this.edits.push(r),n!==void 0)return n}add(e){this.edits.push(e)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(e){if(e===void 0)throw new Error("Text edit change is not configured to manage change annotations.")}},Ku=class{static{i(this,"ChangeAnnotations")}constructor(e){this._annotations=e===void 0?Object.create(null):e,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(e,t){let r;if(Ke.is(e)?r=e:(r=this.nextId(),t=e),this._annotations[r]!==void 0)throw new Error(`Id ${r} is already in use.`);if(t===void 0)throw new Error(`No annotation provided for id ${r}`);return this._annotations[r]=t,this._size++,r}nextId(){return this._counter++,this._counter.toString()}},Fg=class{static{i(this,"WorkspaceChange")}constructor(e){this._textEditChanges=Object.create(null),e!==void 0?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new Ku(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach(t=>{if(qi.is(t)){const r=new ki(t.edits,this._changeAnnotations);this._textEditChanges[t.textDocument.uri]=r}})):e.changes&&Object.keys(e.changes).forEach(t=>{const r=new ki(e.changes[t]);this._textEditChanges[t]=r})):this._workspaceEdit={}}get edit(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(e){if(Hi.is(e)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");const t={uri:e.uri,version:e.version};let r=this._textEditChanges[t.uri];if(!r){const n=[],a={textDocument:t,edits:n};this._workspaceEdit.documentChanges.push(a),r=new ki(n,this._changeAnnotations),this._textEditChanges[t.uri]=r}return r}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");let t=this._textEditChanges[e];if(!t){let r=[];this._workspaceEdit.changes[e]=r,t=new ki(r),this._textEditChanges[e]=t}return t}}initDocumentChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new Ku,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))}createFile(e,t,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let n;an.is(t)||Ke.is(t)?n=t:r=t;let a,s;if(n===void 0?a=ya.create(e,r):(s=Ke.is(n)?n:this._changeAnnotations.manage(n),a=ya.create(e,r,s)),this._workspaceEdit.documentChanges.push(a),s!==void 0)return s}renameFile(e,t,r,n){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let a;an.is(r)||Ke.is(r)?a=r:n=r;let s,o;if(a===void 0?s=ga.create(e,t,n):(o=Ke.is(a)?a:this._changeAnnotations.manage(a),s=ga.create(e,t,n,o)),this._workspaceEdit.documentChanges.push(s),o!==void 0)return o}deleteFile(e,t,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let n;an.is(t)||Ke.is(t)?n=t:r=t;let a,s;if(n===void 0?a=va.create(e,r):(s=Ke.is(n)?n:this._changeAnnotations.manage(n),a=va.create(e,r,s)),this._workspaceEdit.documentChanges.push(a),s!==void 0)return s}},(function(e){function t(n){return{uri:n}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.string(a.uri)}i(r,"is"),e.is=r})(Pc||(Pc={})),(function(e){function t(n,a){return{uri:n,version:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.string(a.uri)&&A.integer(a.version)}i(r,"is"),e.is=r})(kc||(kc={})),(function(e){function t(n,a){return{uri:n,version:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.string(a.uri)&&(a.version===null||A.integer(a.version))}i(r,"is"),e.is=r})(Hi||(Hi={})),(function(e){function t(n,a,s,o){return{uri:n,languageId:a,version:s,text:o}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.string(a.uri)&&A.string(a.languageId)&&A.integer(a.version)&&A.string(a.text)}i(r,"is"),e.is=r})(Oc||(Oc={})),(function(e){e.PlainText="plaintext",e.Markdown="markdown";function t(r){const n=r;return n===e.PlainText||n===e.Markdown}i(t,"is"),e.is=t})(So||(So={})),(function(e){function t(r){const n=r;return A.objectLiteral(r)&&So.is(n.kind)&&A.string(n.value)}i(t,"is"),e.is=t})(Ta||(Ta={})),(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(Lc||(Lc={})),(function(e){e.PlainText=1,e.Snippet=2})(Dc||(Dc={})),(function(e){e.Deprecated=1})(xc||(xc={})),(function(e){function t(n,a,s){return{newText:n,insert:a,replace:s}}i(t,"create"),e.create=t;function r(n){const a=n;return a&&A.string(a.newText)&&Q.is(a.insert)&&Q.is(a.replace)}i(r,"is"),e.is=r})(Mc||(Mc={})),(function(e){e.asIs=1,e.adjustIndentation=2})(Gc||(Gc={})),(function(e){function t(r){const n=r;return n&&(A.string(n.detail)||n.detail===void 0)&&(A.string(n.description)||n.description===void 0)}i(t,"is"),e.is=t})(Fc||(Fc={})),(function(e){function t(r){return{label:r}}i(t,"create"),e.create=t})(zc||(zc={})),(function(e){function t(r,n){return{items:r||[],isIncomplete:!!n}}i(t,"create"),e.create=t})(jc||(jc={})),(function(e){function t(n){return n.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}i(t,"fromPlainText"),e.fromPlainText=t;function r(n){const a=n;return A.string(a)||A.objectLiteral(a)&&A.string(a.language)&&A.string(a.value)}i(r,"is"),e.is=r})(Yi||(Yi={})),(function(e){function t(r){let n=r;return!!n&&A.objectLiteral(n)&&(Ta.is(n.contents)||Yi.is(n.contents)||A.typedArray(n.contents,Yi.is))&&(r.range===void 0||Q.is(r.range))}i(t,"is"),e.is=t})(Bc||(Bc={})),(function(e){function t(r,n){return n?{label:r,documentation:n}:{label:r}}i(t,"create"),e.create=t})(Uc||(Uc={})),(function(e){function t(r,n,...a){let s={label:r};return A.defined(n)&&(s.documentation=n),A.defined(a)?s.parameters=a:s.parameters=[],s}i(t,"create"),e.create=t})(Kc||(Kc={})),(function(e){e.Text=1,e.Read=2,e.Write=3})(Wc||(Wc={})),(function(e){function t(r,n){let a={range:r};return A.number(n)&&(a.kind=n),a}i(t,"create"),e.create=t})(Vc||(Vc={})),(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})(qc||(qc={})),(function(e){e.Deprecated=1})(Hc||(Hc={})),(function(e){function t(r,n,a,s,o){let l={name:r,kind:n,location:{uri:s,range:a}};return o&&(l.containerName=o),l}i(t,"create"),e.create=t})(Yc||(Yc={})),(function(e){function t(r,n,a,s){return s!==void 0?{name:r,kind:n,location:{uri:a,range:s}}:{name:r,kind:n,location:{uri:a}}}i(t,"create"),e.create=t})(Xc||(Xc={})),(function(e){function t(n,a,s,o,l,u){let c={name:n,detail:a,kind:s,range:o,selectionRange:l};return u!==void 0&&(c.children=u),c}i(t,"create"),e.create=t;function r(n){let a=n;return a&&A.string(a.name)&&A.number(a.kind)&&Q.is(a.range)&&Q.is(a.selectionRange)&&(a.detail===void 0||A.string(a.detail))&&(a.deprecated===void 0||A.boolean(a.deprecated))&&(a.children===void 0||Array.isArray(a.children))&&(a.tags===void 0||Array.isArray(a.tags))}i(r,"is"),e.is=r})(Jc||(Jc={})),(function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"})(Zc||(Zc={})),(function(e){e.Invoked=1,e.Automatic=2})(Xi||(Xi={})),(function(e){function t(n,a,s){let o={diagnostics:n};return a!=null&&(o.only=a),s!=null&&(o.triggerKind=s),o}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.typedArray(a.diagnostics,Vi.is)&&(a.only===void 0||A.typedArray(a.only,A.string))&&(a.triggerKind===void 0||a.triggerKind===Xi.Invoked||a.triggerKind===Xi.Automatic)}i(r,"is"),e.is=r})(Qc||(Qc={})),(function(e){function t(n,a,s){let o={title:n},l=!0;return typeof a=="string"?(l=!1,o.kind=a):nn.is(a)?o.command=a:o.edit=a,l&&s!==void 0&&(o.kind=s),o}i(t,"create"),e.create=t;function r(n){let a=n;return a&&A.string(a.title)&&(a.diagnostics===void 0||A.typedArray(a.diagnostics,Vi.is))&&(a.kind===void 0||A.string(a.kind))&&(a.edit!==void 0||a.command!==void 0)&&(a.command===void 0||nn.is(a.command))&&(a.isPreferred===void 0||A.boolean(a.isPreferred))&&(a.edit===void 0||_o.is(a.edit))}i(r,"is"),e.is=r})(ef||(ef={})),(function(e){function t(n,a){let s={range:n};return A.defined(a)&&(s.data=a),s}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&Q.is(a.range)&&(A.undefined(a.command)||nn.is(a.command))}i(r,"is"),e.is=r})(tf||(tf={})),(function(e){function t(n,a){return{tabSize:n,insertSpaces:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.uinteger(a.tabSize)&&A.boolean(a.insertSpaces)}i(r,"is"),e.is=r})(rf||(rf={})),(function(e){function t(n,a,s){return{range:n,target:a,data:s}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&Q.is(a.range)&&(A.undefined(a.target)||A.string(a.target))}i(r,"is"),e.is=r})(nf||(nf={})),(function(e){function t(n,a){return{range:n,parent:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.objectLiteral(a)&&Q.is(a.range)&&(a.parent===void 0||e.is(a.parent))}i(r,"is"),e.is=r})(af||(af={})),(function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator"})(sf||(sf={})),(function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"})(of||(of={})),(function(e){function t(r){const n=r;return A.objectLiteral(n)&&(n.resultId===void 0||typeof n.resultId=="string")&&Array.isArray(n.data)&&(n.data.length===0||typeof n.data[0]=="number")}i(t,"is"),e.is=t})(lf||(lf={})),(function(e){function t(n,a){return{range:n,text:a}}i(t,"create"),e.create=t;function r(n){const a=n;return a!=null&&Q.is(a.range)&&A.string(a.text)}i(r,"is"),e.is=r})(uf||(uf={})),(function(e){function t(n,a,s){return{range:n,variableName:a,caseSensitiveLookup:s}}i(t,"create"),e.create=t;function r(n){const a=n;return a!=null&&Q.is(a.range)&&A.boolean(a.caseSensitiveLookup)&&(A.string(a.variableName)||a.variableName===void 0)}i(r,"is"),e.is=r})(cf||(cf={})),(function(e){function t(n,a){return{range:n,expression:a}}i(t,"create"),e.create=t;function r(n){const a=n;return a!=null&&Q.is(a.range)&&(A.string(a.expression)||a.expression===void 0)}i(r,"is"),e.is=r})(ff||(ff={})),(function(e){function t(n,a){return{frameId:n,stoppedLocation:a}}i(t,"create"),e.create=t;function r(n){const a=n;return A.defined(a)&&Q.is(n.stoppedLocation)}i(r,"is"),e.is=r})(df||(df={})),(function(e){e.Type=1,e.Parameter=2;function t(r){return r===1||r===2}i(t,"is"),e.is=t})(wo||(wo={})),(function(e){function t(n){return{value:n}}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&(a.tooltip===void 0||A.string(a.tooltip)||Ta.is(a.tooltip))&&(a.location===void 0||Wi.is(a.location))&&(a.command===void 0||nn.is(a.command))}i(r,"is"),e.is=r})(Io||(Io={})),(function(e){function t(n,a,s){const o={position:n,label:a};return s!==void 0&&(o.kind=s),o}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&ie.is(a.position)&&(A.string(a.label)||A.typedArray(a.label,Io.is))&&(a.kind===void 0||wo.is(a.kind))&&a.textEdits===void 0||A.typedArray(a.textEdits,Yt.is)&&(a.tooltip===void 0||A.string(a.tooltip)||Ta.is(a.tooltip))&&(a.paddingLeft===void 0||A.boolean(a.paddingLeft))&&(a.paddingRight===void 0||A.boolean(a.paddingRight))}i(r,"is"),e.is=r})(pf||(pf={})),(function(e){function t(r){return{kind:"snippet",value:r}}i(t,"createSnippet"),e.createSnippet=t})(mf||(mf={})),(function(e){function t(r,n,a,s){return{insertText:r,filterText:n,range:a,command:s}}i(t,"create"),e.create=t})(hf||(hf={})),(function(e){function t(r){return{items:r}}i(t,"create"),e.create=t})(yf||(yf={})),(function(e){e.Invoked=0,e.Automatic=1})(gf||(gf={})),(function(e){function t(r,n){return{range:r,text:n}}i(t,"create"),e.create=t})(vf||(vf={})),(function(e){function t(r,n){return{triggerKind:r,selectedCompletionInfo:n}}i(t,"create"),e.create=t})(Tf||(Tf={})),(function(e){function t(r){const n=r;return A.objectLiteral(n)&&Eo.is(n.uri)&&A.string(n.name)}i(t,"is"),e.is=t})($f||($f={})),zg=[`
 `,`\r
 `,"\r"],(function(e){function t(s,o,l,u){return new lh(s,o,l,u)}i(t,"create"),e.create=t;function r(s){let o=s;return!!(A.defined(o)&&A.string(o.uri)&&(A.undefined(o.languageId)||A.string(o.languageId))&&A.uinteger(o.lineCount)&&A.func(o.getText)&&A.func(o.positionAt)&&A.func(o.offsetAt))}i(r,"is"),e.is=r;function n(s,o){let l=s.getText(),u=a(o,(f,d)=>{let m=f.range.start.line-d.range.start.line;return m===0?f.range.start.character-d.range.start.character:m}),c=l.length;for(let f=u.length-1;f>=0;f--){let d=u[f],m=s.offsetAt(d.range.start),g=s.offsetAt(d.range.end);if(g<=c)l=l.substring(0,m)+d.newText+l.substring(g,l.length);else throw new Error("Overlapping edit");c=m}return l}i(n,"applyEdits"),e.applyEdits=n;function a(s,o){if(s.length<=1)return s;const l=s.length/2|0,u=s.slice(0,l),c=s.slice(l);a(u,o),a(c,o);let f=0,d=0,m=0;for(;f({domains:new Map,transitions:[]}),"createDefaultData"),G=rt(),St=s(()=>G.domains,"getDomains"),Mt=s(()=>G.transitions,"getTransitions"),zt=s(t=>{if(t)for(const e of t){const n=e.domain,a=(e.items??[]).map(c=>({label:c.label}));G.domains.set(n,{name:n,items:a})}},"setDomains"),Lt=s(t=>{t&&(G.transitions=t.filter(e=>e.from===e.to?(Y.warn(`Cynefin: self-loop transition on domain "${e.from}" is not meaningful and will be skipped.`),!1):!0).map(e=>({from:e.from,to:e.to,label:e.label||void 0})))},"setTransitions"),Nt=s(()=>U({...Tt.cynefin,...Q().cynefin}),"getConfig"),Pt=s(()=>{At(),G=rt()},"clear"),X={getDomains:St,getTransitions:Mt,setDomains:zt,setTransitions:Lt,getConfig:Nt,clear:Pt,setAccTitle:vt,getAccTitle:Ct,setDiagramTitle:wt,getDiagramTitle:bt,getAccDescription:$t,setAccDescription:gt},It=s(t=>{xt(t,X),X.setDomains(t.domains),X.setTransitions(t.transitions)},"populate"),Wt={parse:s(async t=>{const e=await Bt("cynefin",t);Y.debug(e),It(e)},"parse")};function V(t){let e=t+1831565813|0;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}s(V,"seededRandom");function st(t){let e=0;for(let n=0;n{const n=t/2,a=e/2;return{complex:{cx:n/2,cy:a/2,x:0,y:0,w:n,h:a},complicated:{cx:n+n/2,cy:a/2,x:n,y:0,w:n,h:a},chaotic:{cx:n/2,cy:a+a/2,x:0,y:a,w:n,h:a},clear:{cx:n+n/2,cy:a+a/2,x:n,y:a,w:n,h:a},confusion:{cx:n,cy:a,x:n*.7,y:a*.7,w:n*.6,h:a*.6}}},"getDomainLayouts"),_t=s(()=>{const t=ot(),e=Q();return U(t,e.themeVariables).cynefin},"getCynefinDomainColors"),q=3,Et=s((t,e,n,a)=>{const c=a.db,m=c.getDomains(),v=c.getTransitions(),W=c.getDiagramTitle(),d=c.getAccTitle(),D=c.getAccDescription(),o=c.getConfig(),p=_t();Y.debug("Rendering Cynefin diagram");const i=o.width,f=o.height,b=o.padding,h=o.showDomainDescriptions,R=o.boundaryAmplitude,_=i+b*2,E=f+b*2,z={complex:p.complexBg,complicated:p.complicatedBg,clear:p.clearBg,chaotic:p.chaoticBg,confusion:p.confusionBg},k=Dt(e);kt(k,E,_,o.useMaxWidth??!0),k.attr("viewBox",`0 0 ${_} ${E}`),d&&k.append("title").text(d),D&&k.append("desc").text(D);const A=k.append("g").attr("transform",`translate(${b}, ${b})`),F=Rt(i,f),Z=it(o.seed,e),mt=A.append("g").attr("class","cynefin-backgrounds"),O=["complex","complicated","chaotic","clear"];for(const l of O){const r=F[l];mt.append("rect").attr("class","cynefinDomain").attr("x",r.x).attr("y",r.y).attr("width",r.w).attr("height",r.h).attr("fill",z[l]).attr("fill-opacity",.4).attr("stroke","none")}const j=A.append("g").attr("class","cynefin-boundaries");j.append("path").attr("class","cynefinBoundary").attr("d",ct(i,f,Z,R)).attr("fill","none"),j.append("path").attr("class","cynefinBoundary").attr("d",lt(i,f,Z+100,R)).attr("fill","none"),j.append("path").attr("class","cynefinCliff").attr("d",dt(i,f)).attr("fill","none");const pt=i*.15,yt=f*.15;A.append("path").attr("class","cynefinConfusion").attr("d",ft(i/2,f/2,pt,yt)).attr("fill",z.confusion).attr("fill-opacity",.5);const J=A.append("g").attr("class","cynefin-labels");for(const l of O){const r=F[l];J.append("text").attr("class","cynefinDomainLabel").attr("x",r.cx).attr("y",h?r.cy-30:r.cy).attr("text-anchor","middle").attr("dominant-baseline","middle").text(l.charAt(0).toUpperCase()+l.slice(1))}if(J.append("text").attr("class","cynefinDomainLabel").attr("x",i/2).attr("y",h?f/2-10:f/2).attr("text-anchor","middle").attr("dominant-baseline","middle").text("Confusion"),h){const l=A.append("g").attr("class","cynefin-subtitles");for(const r of O){const u=F[r],y=at[r];l.append("text").attr("class","cynefinSubtitle").attr("x",u.cx).attr("y",u.cy-10).attr("text-anchor","middle").attr("dominant-baseline","middle").text(y.model),l.append("text").attr("class","cynefinSubtitle").attr("x",u.cx).attr("y",u.cy+5).attr("text-anchor","middle").attr("dominant-baseline","middle").text(y.practice)}l.append("text").attr("class","cynefinSubtitle").attr("x",i/2).attr("y",f/2+8).attr("text-anchor","middle").attr("dominant-baseline","middle").text(at.confusion.practice)}const K=A.append("g").attr("class","cynefin-items"),T=26,tt=10,ut=["complex","complicated","chaotic","clear","confusion"];for(const l of ut){const r=m.get(l);if(!r||r.items.length===0)continue;const u=F[l],y=l==="confusion";let L=r.items,N=0;y&&r.items.length>q&&(N=r.items.length-q,L=r.items.slice(0,q));let B;if(y){const g=h?22:14;B=u.cy+g}else B=u.cy+(h?25:15);if([...L].forEach((g,S)=>{const w=B+S*(T+4),M=K.append("g"),P=M.append("text").attr("class","cynefinItemText").attr("x",0).attr("y",T/2).attr("text-anchor","middle").attr("dominant-baseline","central").text(g.label);let $=g.label.length*7;const x=P.node();if(x&&typeof x.getBBox=="function"){const H=x.getBBox();H.width>0&&($=H.width)}const C=$+tt*2,I=u.cx-C/2;M.attr("transform",`translate(${I}, ${w})`),M.insert("rect","text").attr("class","cynefinItem").attr("x",0).attr("y",0).attr("width",C).attr("height",T).attr("rx",4).attr("ry",4).attr("fill",z[l]).attr("fill-opacity",.95),P.attr("x",C/2).attr("y",T/2)}),N>0){const g=B+L.length*(T+4),S=`+${N} more`,w=K.append("g"),M=w.append("text").attr("class","cynefinItemText").attr("x",0).attr("y",T/2).attr("text-anchor","middle").attr("dominant-baseline","central").text(S);let P=S.length*7;const $=M.node();if($&&typeof $.getBBox=="function"){const I=$.getBBox();I.width>0&&(P=I.width)}const x=P+tt*2,C=u.cx-x/2;w.attr("transform",`translate(${C}, ${g})`),w.insert("rect","text").attr("class","cynefinItemOverflow").attr("x",0).attr("y",0).attr("width",x).attr("height",T).attr("rx",4).attr("ry",4).attr("fill",z[l]).attr("fill-opacity",.6),M.attr("x",x/2).attr("y",T/2)}}if(v.length>0){const l=k.select("defs").empty()?k.append("defs"):k.select("defs"),r=`cynefin-arrow-${e}`;l.append("marker").attr("id",r).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","cynefinArrowHead");const u=A.append("g").attr("class","cynefin-arrows");v.forEach(y=>{const L=F[y.from],N=F[y.to];if(!L||!N)return;if(y.from===y.to){Y.warn(`Cynefin renderer: skipping self-loop on domain "${y.from}"`);return}const B=L.cx,g=L.cy,S=N.cx,w=N.cy,M=(B+S)/2,P=(g+w)/2,$=S-B,x=w-g,C=Math.sqrt($*$+x*x),I=C*.15,H=-x/C,ht=$/C,et=M+H*I,nt=P+ht*I;u.append("path").attr("class","cynefinArrowLine").attr("d",`M${B},${g} Q${et},${nt} ${S},${w}`).attr("fill","none").attr("marker-end",`url(#${r})`),y.label&&u.append("text").attr("class","cynefinArrowLabel").attr("x",et).attr("y",nt-6).attr("text-anchor","middle").attr("dominant-baseline","auto").text(y.label)})}W&&A.append("text").attr("class","cynefinTitle").attr("x",i/2).attr("y",-b/2).attr("text-anchor","middle").attr("dominant-baseline","middle").text(W)},"draw"),Ft={draw:Et},Vt=s(()=>{const t=ot(),e=Q();return U(t,e.themeVariables).cynefin},"getCynefinTheme"),Gt=s(()=>{const t=Vt();return`
+import{p as xt}from"./chunk-JWPE2WC7-DjA09kFS.js";import{s as gt,g as $t,q as bt,p as wt,a as Ct,b as vt,_ as s,l as Y,G as Dt,d as kt,r as At,D as U,A as Q,E as Tt,X as ot}from"./mermaid.core-BLsmN-lt.js";import{p as Bt}from"./cynefin-OW5HDTMX-BygTY4j3.js";import"./index-XmhyfFRf.js";import"./purify.es-5AjVNlXF.js";var rt=s(()=>({domains:new Map,transitions:[]}),"createDefaultData"),G=rt(),St=s(()=>G.domains,"getDomains"),Mt=s(()=>G.transitions,"getTransitions"),zt=s(t=>{if(t)for(const e of t){const n=e.domain,a=(e.items??[]).map(c=>({label:c.label}));G.domains.set(n,{name:n,items:a})}},"setDomains"),Lt=s(t=>{t&&(G.transitions=t.filter(e=>e.from===e.to?(Y.warn(`Cynefin: self-loop transition on domain "${e.from}" is not meaningful and will be skipped.`),!1):!0).map(e=>({from:e.from,to:e.to,label:e.label||void 0})))},"setTransitions"),Nt=s(()=>U({...Tt.cynefin,...Q().cynefin}),"getConfig"),Pt=s(()=>{At(),G=rt()},"clear"),X={getDomains:St,getTransitions:Mt,setDomains:zt,setTransitions:Lt,getConfig:Nt,clear:Pt,setAccTitle:vt,getAccTitle:Ct,setDiagramTitle:wt,getDiagramTitle:bt,getAccDescription:$t,setAccDescription:gt},It=s(t=>{xt(t,X),X.setDomains(t.domains),X.setTransitions(t.transitions)},"populate"),Wt={parse:s(async t=>{const e=await Bt("cynefin",t);Y.debug(e),It(e)},"parse")};function V(t){let e=t+1831565813|0;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}s(V,"seededRandom");function st(t){let e=0;for(let n=0;n{const n=t/2,a=e/2;return{complex:{cx:n/2,cy:a/2,x:0,y:0,w:n,h:a},complicated:{cx:n+n/2,cy:a/2,x:n,y:0,w:n,h:a},chaotic:{cx:n/2,cy:a+a/2,x:0,y:a,w:n,h:a},clear:{cx:n+n/2,cy:a+a/2,x:n,y:a,w:n,h:a},confusion:{cx:n,cy:a,x:n*.7,y:a*.7,w:n*.6,h:a*.6}}},"getDomainLayouts"),_t=s(()=>{const t=ot(),e=Q();return U(t,e.themeVariables).cynefin},"getCynefinDomainColors"),q=3,Et=s((t,e,n,a)=>{const c=a.db,m=c.getDomains(),v=c.getTransitions(),W=c.getDiagramTitle(),d=c.getAccTitle(),D=c.getAccDescription(),o=c.getConfig(),p=_t();Y.debug("Rendering Cynefin diagram");const i=o.width,f=o.height,b=o.padding,h=o.showDomainDescriptions,R=o.boundaryAmplitude,_=i+b*2,E=f+b*2,z={complex:p.complexBg,complicated:p.complicatedBg,clear:p.clearBg,chaotic:p.chaoticBg,confusion:p.confusionBg},k=Dt(e);kt(k,E,_,o.useMaxWidth??!0),k.attr("viewBox",`0 0 ${_} ${E}`),d&&k.append("title").text(d),D&&k.append("desc").text(D);const A=k.append("g").attr("transform",`translate(${b}, ${b})`),F=Rt(i,f),Z=it(o.seed,e),mt=A.append("g").attr("class","cynefin-backgrounds"),O=["complex","complicated","chaotic","clear"];for(const l of O){const r=F[l];mt.append("rect").attr("class","cynefinDomain").attr("x",r.x).attr("y",r.y).attr("width",r.w).attr("height",r.h).attr("fill",z[l]).attr("fill-opacity",.4).attr("stroke","none")}const j=A.append("g").attr("class","cynefin-boundaries");j.append("path").attr("class","cynefinBoundary").attr("d",ct(i,f,Z,R)).attr("fill","none"),j.append("path").attr("class","cynefinBoundary").attr("d",lt(i,f,Z+100,R)).attr("fill","none"),j.append("path").attr("class","cynefinCliff").attr("d",dt(i,f)).attr("fill","none");const pt=i*.15,yt=f*.15;A.append("path").attr("class","cynefinConfusion").attr("d",ft(i/2,f/2,pt,yt)).attr("fill",z.confusion).attr("fill-opacity",.5);const J=A.append("g").attr("class","cynefin-labels");for(const l of O){const r=F[l];J.append("text").attr("class","cynefinDomainLabel").attr("x",r.cx).attr("y",h?r.cy-30:r.cy).attr("text-anchor","middle").attr("dominant-baseline","middle").text(l.charAt(0).toUpperCase()+l.slice(1))}if(J.append("text").attr("class","cynefinDomainLabel").attr("x",i/2).attr("y",h?f/2-10:f/2).attr("text-anchor","middle").attr("dominant-baseline","middle").text("Confusion"),h){const l=A.append("g").attr("class","cynefin-subtitles");for(const r of O){const u=F[r],y=at[r];l.append("text").attr("class","cynefinSubtitle").attr("x",u.cx).attr("y",u.cy-10).attr("text-anchor","middle").attr("dominant-baseline","middle").text(y.model),l.append("text").attr("class","cynefinSubtitle").attr("x",u.cx).attr("y",u.cy+5).attr("text-anchor","middle").attr("dominant-baseline","middle").text(y.practice)}l.append("text").attr("class","cynefinSubtitle").attr("x",i/2).attr("y",f/2+8).attr("text-anchor","middle").attr("dominant-baseline","middle").text(at.confusion.practice)}const K=A.append("g").attr("class","cynefin-items"),T=26,tt=10,ut=["complex","complicated","chaotic","clear","confusion"];for(const l of ut){const r=m.get(l);if(!r||r.items.length===0)continue;const u=F[l],y=l==="confusion";let L=r.items,N=0;y&&r.items.length>q&&(N=r.items.length-q,L=r.items.slice(0,q));let B;if(y){const g=h?22:14;B=u.cy+g}else B=u.cy+(h?25:15);if([...L].forEach((g,S)=>{const w=B+S*(T+4),M=K.append("g"),P=M.append("text").attr("class","cynefinItemText").attr("x",0).attr("y",T/2).attr("text-anchor","middle").attr("dominant-baseline","central").text(g.label);let $=g.label.length*7;const x=P.node();if(x&&typeof x.getBBox=="function"){const H=x.getBBox();H.width>0&&($=H.width)}const C=$+tt*2,I=u.cx-C/2;M.attr("transform",`translate(${I}, ${w})`),M.insert("rect","text").attr("class","cynefinItem").attr("x",0).attr("y",0).attr("width",C).attr("height",T).attr("rx",4).attr("ry",4).attr("fill",z[l]).attr("fill-opacity",.95),P.attr("x",C/2).attr("y",T/2)}),N>0){const g=B+L.length*(T+4),S=`+${N} more`,w=K.append("g"),M=w.append("text").attr("class","cynefinItemText").attr("x",0).attr("y",T/2).attr("text-anchor","middle").attr("dominant-baseline","central").text(S);let P=S.length*7;const $=M.node();if($&&typeof $.getBBox=="function"){const I=$.getBBox();I.width>0&&(P=I.width)}const x=P+tt*2,C=u.cx-x/2;w.attr("transform",`translate(${C}, ${g})`),w.insert("rect","text").attr("class","cynefinItemOverflow").attr("x",0).attr("y",0).attr("width",x).attr("height",T).attr("rx",4).attr("ry",4).attr("fill",z[l]).attr("fill-opacity",.6),M.attr("x",x/2).attr("y",T/2)}}if(v.length>0){const l=k.select("defs").empty()?k.append("defs"):k.select("defs"),r=`cynefin-arrow-${e}`;l.append("marker").attr("id",r).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","cynefinArrowHead");const u=A.append("g").attr("class","cynefin-arrows");v.forEach(y=>{const L=F[y.from],N=F[y.to];if(!L||!N)return;if(y.from===y.to){Y.warn(`Cynefin renderer: skipping self-loop on domain "${y.from}"`);return}const B=L.cx,g=L.cy,S=N.cx,w=N.cy,M=(B+S)/2,P=(g+w)/2,$=S-B,x=w-g,C=Math.sqrt($*$+x*x),I=C*.15,H=-x/C,ht=$/C,et=M+H*I,nt=P+ht*I;u.append("path").attr("class","cynefinArrowLine").attr("d",`M${B},${g} Q${et},${nt} ${S},${w}`).attr("fill","none").attr("marker-end",`url(#${r})`),y.label&&u.append("text").attr("class","cynefinArrowLabel").attr("x",et).attr("y",nt-6).attr("text-anchor","middle").attr("dominant-baseline","auto").text(y.label)})}W&&A.append("text").attr("class","cynefinTitle").attr("x",i/2).attr("y",-b/2).attr("text-anchor","middle").attr("dominant-baseline","middle").text(W)},"draw"),Ft={draw:Et},Vt=s(()=>{const t=ot(),e=Q();return U(t,e.themeVariables).cynefin},"getCynefinTheme"),Gt=s(()=>{const t=Vt();return`
 	.cynefinDomain {
 		stroke: none;
 	}
diff --git a/apps/pythinker-code/dist-web/assets/dagre-3AP2YEHR-u-A10G9p.js b/apps/pythinker-code/dist-web/assets/dagre-3AP2YEHR-ZCbhDzTA.js
similarity index 98%
rename from apps/pythinker-code/dist-web/assets/dagre-3AP2YEHR-u-A10G9p.js
rename to apps/pythinker-code/dist-web/assets/dagre-3AP2YEHR-ZCbhDzTA.js
index 4f1ec8d9f..2e5158365 100644
--- a/apps/pythinker-code/dist-web/assets/dagre-3AP2YEHR-u-A10G9p.js
+++ b/apps/pythinker-code/dist-web/assets/dagre-3AP2YEHR-ZCbhDzTA.js
@@ -1,4 +1,4 @@
-import{_ as m,an as x,c as k,a7 as O,l as p,ao as A,ap as Y,aq as b,ar as _,as as z,at as H,au as D,av as J,aw as T,ax as X,ai as R,ag as F,ay as q,az as W}from"./mermaid.core-D6Xg32pF.js";import{l as j}from"./layout-BZTUGqmN.js";import"./index-D9Nz1t7z.js";import"./purify.es-5AjVNlXF.js";var C=m((t,e,r)=>Math.max(e,Math.min(r,t)),"clamp"),P=m((t="TB")=>{switch(t){case"BT":return"bottom";case"LR":return"right";case"RL":return"left";case"TB":default:return"top"}},"getDefaultSelfLoopSide"),U=m(t=>t==="flowchart"||t==="flowchart-v2"||t==="stateDiagram"||t==="er"||t==="classDiagram","shouldMergeSelfLoopSegments"),K=["x","y","width","height","labelBBox","intersect","calcIntersect","diff","clusterNode"],Q=m((t,e,r,d,a)=>{const f=[],u=new Set;if(r.forEach(({start:i,end:o})=>{i!==d&&u.add(i),o!==d&&u.add(o)}),u.forEach(i=>{const o=t.node(i);typeof o?.x=="number"&&typeof o?.y=="number"&&f.push(o)}),f.length===0&&r.forEach(({edge:i})=>{(i.points??[]).forEach(o=>{typeof o?.x=="number"&&typeof o?.y=="number"&&f.push(o)})}),f.length===0)return P(a);const c=f.reduce((i,o)=>({x:i.x+o.x/f.length,y:i.y+o.y/f.length}),{x:0,y:0}),l=c.x-e.x,s=c.y-e.y;return Math.abs(l)>Math.abs(s)?l>0?"right":"left":Math.abs(s)>0?s>0?"bottom":"top":P(a)},"getSelfLoopSide"),V=m((t,e="top",r=0,d=0)=>{const a=t.x,f=t.y-r,u=t.width/2,c=t.height/2,l=Math.max(36,Math.min(100,t.width*.8)),s=C(Math.max(d,t.width*.35),36,l),i=C(Math.min(t.width,t.height)*.45,24,48);switch(e){case"bottom":{const o=f+c;return[{x:a-s/2,y:o},{x:a-s/2,y:o+i},{x:a+s/2,y:o+i},{x:a+s/2,y:o}]}case"right":{const o=a+u;return[{x:o,y:f-s/2},{x:o+i,y:f-s/2},{x:o+i,y:f+s/2},{x:o,y:f+s/2}]}case"left":{const o=a-u;return[{x:o,y:f-s/2},{x:o-i,y:f-s/2},{x:o-i,y:f+s/2},{x:o,y:f+s/2}]}case"top":default:{const o=f-c;return[{x:a-s/2,y:o},{x:a-s/2,y:o-i},{x:a+s/2,y:o-i},{x:a+s/2,y:o}]}}},"getSelfLoopPoints"),Z=m((t,e,r="top",d=0,a={})=>{const u=t.x,c=t.y-d,l=a.width??0,s=a.height??0;switch(r){case"bottom":return{x:u,y:Math.max(...e.map(i=>i.y))+s/2+4};case"right":return{x:Math.max(...e.map(i=>i.x))+l/2+4,y:c};case"left":return{x:Math.min(...e.map(i=>i.x))-l/2-4,y:c};case"top":default:return{x:u,y:Math.min(...e.map(i=>i.y))-s/2-4}}},"getSelfLoopLabelPosition"),B=m((t,e=0,{mergeSelfLoops:r=!0}={})=>{const d=new Map,a=[],f=t.graph()?.rankdir;return t.edges().forEach(u=>{const c=t.edge(u);if(r&&c.selfLoop){const l=c.selfLoop.id;d.has(l)||d.set(l,[]),d.get(l).push({edge:c,start:u.v,end:u.w})}else a.push({edge:c,start:u.v,end:u.w})}),d.forEach(u=>{if(u.length!==3){u.forEach(h=>a.push(h));return}u.sort((h,E)=>h.edge.selfLoop.order-E.edge.selfLoop.order);const[c,l,s]=u,i=c.edge.originalEdge??l.edge.originalEdge??s.edge.originalEdge??l.edge,o=t.node(i.start);if(!o){u.forEach(h=>a.push(h));return}const n={width:l.edge.width,height:l.edge.height},L=Q(t,o,u,i.start,f),w=V(o,L,e,n.width??0),y=Z(o,w,L,e,n),g={...l.edge,...i,id:i.id,points:w,start:i.start,end:i.end,x:y.x,y:y.y,width:n.width,height:n.height,labelStyle:l.edge.labelStyle,fromCluster:c.edge.fromCluster??l.edge.fromCluster??s.edge.fromCluster,toCluster:c.edge.toCluster??l.edge.toCluster??s.edge.toCluster};delete g.selfLoop,delete g.originalEdge,a.push({edge:g,start:g.start,end:g.end})}),a},"getEdgesToRender"),I=m(async({element:t,graph:e,diagramType:r,id:d,parentCluster:a,siteConfig:f})=>{const u=e.graph().rankdir;p.trace("Dir in recursive render - dir:",u);const{clusters:c,edgePaths:l,edgeLabels:s,nodes:i,rootGroups:o}=_(t,{edgePathsClass:"edgePaths"});e.nodes()?p.info("Recursive render XXX",e.nodes()):p.info("No nodes found for",e),e.edges().length>0&&p.info("Recursive edges",e.edge(e.edges()[0]));const n=U(r);await Promise.all(e.nodes().map(async function(y){const g=e.node(y);if(a!==void 0){const h=JSON.parse(JSON.stringify(a.clusterData));p.trace(`Setting data for parent cluster XXX
+import{_ as m,an as x,c as k,a7 as O,l as p,ao as A,ap as Y,aq as b,ar as _,as as z,at as H,au as D,av as J,aw as T,ax as X,ai as R,ag as F,ay as q,az as W}from"./mermaid.core-BLsmN-lt.js";import{l as j}from"./layout-DDdzyvtG.js";import"./index-XmhyfFRf.js";import"./purify.es-5AjVNlXF.js";var C=m((t,e,r)=>Math.max(e,Math.min(r,t)),"clamp"),P=m((t="TB")=>{switch(t){case"BT":return"bottom";case"LR":return"right";case"RL":return"left";case"TB":default:return"top"}},"getDefaultSelfLoopSide"),U=m(t=>t==="flowchart"||t==="flowchart-v2"||t==="stateDiagram"||t==="er"||t==="classDiagram","shouldMergeSelfLoopSegments"),K=["x","y","width","height","labelBBox","intersect","calcIntersect","diff","clusterNode"],Q=m((t,e,r,d,a)=>{const f=[],u=new Set;if(r.forEach(({start:i,end:o})=>{i!==d&&u.add(i),o!==d&&u.add(o)}),u.forEach(i=>{const o=t.node(i);typeof o?.x=="number"&&typeof o?.y=="number"&&f.push(o)}),f.length===0&&r.forEach(({edge:i})=>{(i.points??[]).forEach(o=>{typeof o?.x=="number"&&typeof o?.y=="number"&&f.push(o)})}),f.length===0)return P(a);const c=f.reduce((i,o)=>({x:i.x+o.x/f.length,y:i.y+o.y/f.length}),{x:0,y:0}),l=c.x-e.x,s=c.y-e.y;return Math.abs(l)>Math.abs(s)?l>0?"right":"left":Math.abs(s)>0?s>0?"bottom":"top":P(a)},"getSelfLoopSide"),V=m((t,e="top",r=0,d=0)=>{const a=t.x,f=t.y-r,u=t.width/2,c=t.height/2,l=Math.max(36,Math.min(100,t.width*.8)),s=C(Math.max(d,t.width*.35),36,l),i=C(Math.min(t.width,t.height)*.45,24,48);switch(e){case"bottom":{const o=f+c;return[{x:a-s/2,y:o},{x:a-s/2,y:o+i},{x:a+s/2,y:o+i},{x:a+s/2,y:o}]}case"right":{const o=a+u;return[{x:o,y:f-s/2},{x:o+i,y:f-s/2},{x:o+i,y:f+s/2},{x:o,y:f+s/2}]}case"left":{const o=a-u;return[{x:o,y:f-s/2},{x:o-i,y:f-s/2},{x:o-i,y:f+s/2},{x:o,y:f+s/2}]}case"top":default:{const o=f-c;return[{x:a-s/2,y:o},{x:a-s/2,y:o-i},{x:a+s/2,y:o-i},{x:a+s/2,y:o}]}}},"getSelfLoopPoints"),Z=m((t,e,r="top",d=0,a={})=>{const u=t.x,c=t.y-d,l=a.width??0,s=a.height??0;switch(r){case"bottom":return{x:u,y:Math.max(...e.map(i=>i.y))+s/2+4};case"right":return{x:Math.max(...e.map(i=>i.x))+l/2+4,y:c};case"left":return{x:Math.min(...e.map(i=>i.x))-l/2-4,y:c};case"top":default:return{x:u,y:Math.min(...e.map(i=>i.y))-s/2-4}}},"getSelfLoopLabelPosition"),B=m((t,e=0,{mergeSelfLoops:r=!0}={})=>{const d=new Map,a=[],f=t.graph()?.rankdir;return t.edges().forEach(u=>{const c=t.edge(u);if(r&&c.selfLoop){const l=c.selfLoop.id;d.has(l)||d.set(l,[]),d.get(l).push({edge:c,start:u.v,end:u.w})}else a.push({edge:c,start:u.v,end:u.w})}),d.forEach(u=>{if(u.length!==3){u.forEach(h=>a.push(h));return}u.sort((h,E)=>h.edge.selfLoop.order-E.edge.selfLoop.order);const[c,l,s]=u,i=c.edge.originalEdge??l.edge.originalEdge??s.edge.originalEdge??l.edge,o=t.node(i.start);if(!o){u.forEach(h=>a.push(h));return}const n={width:l.edge.width,height:l.edge.height},L=Q(t,o,u,i.start,f),w=V(o,L,e,n.width??0),y=Z(o,w,L,e,n),g={...l.edge,...i,id:i.id,points:w,start:i.start,end:i.end,x:y.x,y:y.y,width:n.width,height:n.height,labelStyle:l.edge.labelStyle,fromCluster:c.edge.fromCluster??l.edge.fromCluster??s.edge.fromCluster,toCluster:c.edge.toCluster??l.edge.toCluster??s.edge.toCluster};delete g.selfLoop,delete g.originalEdge,a.push({edge:g,start:g.start,end:g.end})}),a},"getEdgesToRender"),I=m(async({element:t,graph:e,diagramType:r,id:d,parentCluster:a,siteConfig:f})=>{const u=e.graph().rankdir;p.trace("Dir in recursive render - dir:",u);const{clusters:c,edgePaths:l,edgeLabels:s,nodes:i,rootGroups:o}=_(t,{edgePathsClass:"edgePaths"});e.nodes()?p.info("Recursive render XXX",e.nodes()):p.info("No nodes found for",e),e.edges().length>0&&p.info("Recursive edges",e.edge(e.edges()[0]));const n=U(r);await Promise.all(e.nodes().map(async function(y){const g=e.node(y);if(a!==void 0){const h=JSON.parse(JSON.stringify(a.clusterData));p.trace(`Setting data for parent cluster XXX
  Node.id = `,y,`
  data=`,h.height,`
 Parent cluster`,a.height),e.setNode(a.id,h),e.parent(y)||(p.trace("Setting parent",y,a.id),e.setParent(y,a.id,h))}if(p.info("(Insert) Node XXX"+y+": "+JSON.stringify(e.node(y))),g?.clusterNode){p.info("Cluster identified XBX",y,g.width,e.node(y));const{ranksep:h,nodesep:E}=e.graph();g.graph.setGraph({...g.graph.graph(),ranksep:h+25,nodesep:E});const S=await oe({element:i,graph:g.graph,diagramType:r,id:d,parentCluster:e.node(y),siteConfig:f}),N=S.elem;z(g,N),g.diff=S.diff||0,p.info("New compound node after recursive render XAX",y,"width",g.width,"height",g.height),H(N,g)}else e.children(y).length>0?(p.trace("Cluster - the non recursive path XBX",y,g.id,g,g.width,"Graph:",e),p.trace(D(g.id,e)),b.set(g.id,{id:D(g.id,e),node:g})):(p.trace("Node - the non recursive path XAX",y,i,e.node(y),u),await J(i,e.node(y),{config:f,dir:u}))})),await m(async()=>{const y=e.edges().map(async function(g){const h=e.edge(g.v,g.w,g.name);if(p.info("Edge "+g.v+" -> "+g.w+": "+JSON.stringify(g)),p.info("Edge "+g.v+" -> "+g.w+": ",g," ",JSON.stringify(e.edge(g))),p.info("Fix",b,"ids:",g.v,g.w,"Translating: ",b.get(g.v),b.get(g.w)),n&&h.selfLoop){if(h.selfLoop.order!==1)return;const E={...h.originalEdge,...h,id:h.selfLoop.id,startLabelLeft:h.originalEdge?.startLabelLeft??h.startLabelLeft,startLabelRight:h.originalEdge?.startLabelRight??h.startLabelRight,endLabelLeft:h.originalEdge?.endLabelLeft??h.endLabelLeft,endLabelRight:h.originalEdge?.endLabelRight??h.endLabelRight};await X(s,E),h.width=E.width,h.height=E.height,h.labelStyle=E.labelStyle;return}await X(s,h)});await Promise.all(y)},"processEdges")();const{subGraphTitleTotalMargin:w}=T(f);return{elem:o,graph:e,groups:{clusters:c,edgePaths:l,edgeLabels:s,nodes:i,rootGroups:o},diagramType:r,id:d,mergeSelfLoops:n,subGraphTitleTotalMargin:w}},"measureDagreGraph"),M=m(t=>{p.info("############################################# XXX"),p.info("###                Layout                 ### XXX"),p.info("############################################# XXX"),j(t)},"runDagreGraphLayout"),$=m((t,e,r)=>{const d=t.node(e);if(!d)return;const a={...d};return d?.clusterNode?a.y=(d.y??0)+r:t.children(e).length>0?a.height=(d.height??0)+r:a.y=(d.y??0)+r/2,a},"normalizeDagreNode"),v=m((t,e)=>{K.forEach(r=>{e[r]!==void 0&&(t[r]=e[r])})},"applyDagreNodeLayout"),ee=m((t,e,r,d)=>({...t,start:t.start??e,end:t.end??r,points:(t.points??[]).map(a=>({...a,y:typeof a.y=="number"?a.y+d:a.y}))}),"normalizeDagreEdge"),te=m((t,e)=>{const{graph:r,mergeSelfLoops:d,subGraphTitleTotalMargin:a=0}=e,f=new Map(t.nodes.map(c=>[c.id,c]));x(r).forEach(c=>{const l=$(r,c,a);if(!l)return;v(r.node(c),l);const s=f.get(c);s&&v(s,l)});const u=a/2;return t.edges=B(r,u,{mergeSelfLoops:d}).map(({edge:c,start:l,end:s})=>ee(c,l,s,u)),t},"applyDagreLayoutResult"),re=m(async({elem:t,graph:e,groups:{clusters:r,edgePaths:d},diagramType:a,id:f,mergeSelfLoops:u,subGraphTitleTotalMargin:c})=>{let l=0;await Promise.all(x(e).map(async function(o){const n=e.node(o);if(p.info("Position XBX => "+o+": ("+n.x,","+n.y,") width: ",n.width," height: ",n.height),n?.clusterNode)n.y+=c,p.info("A tainted cluster node XBX1",o,n.id,n.width,n.height,n.x,n.y,e.parent(o)),b.get(n.id).node=n,R(n);else if(e.children(o).length>0){p.info("A pure cluster node XBX1",o,n.id,n.x,n.y,n.width,n.height,e.parent(o)),n.height+=c,e.node(n.parentId);const L=n?.padding/2||0,w=n?.labelBBox?.height||0,y=w-L||0;p.debug("OffsetY",y,"labelHeight",w,"halfPadding",L),await F(r,n),b.get(n.id).node=n}else{const L=e.node(n.parentId);n.y+=c/2,p.info("A regular node XBX1 - using the padding",n.id,"parent",n.parentId,n.width,n.height,n.x,n.y,"offsetY",n.offsetY,"parent",L,L?.offsetY,n),R(n)}}));const s=c/2;return B(e,s,{mergeSelfLoops:u}).forEach(function({edge:o,start:n,end:L}){p.info("Edge "+n+" -> "+L+": "+JSON.stringify(o),o),o.points.forEach(h=>h.y+=s);const w=e.node(n),y=e.node(L),g=q(d,o,b,a,w,y,f);W(o,g)}),e.nodes().forEach(function(o){const n=e.node(o);p.info(o,n.type,n.diff),n.isGroup&&(l=n.diff)}),p.warn("Returning from recursive render XAX",t,l),{elem:t,diff:l}},"paintDagreLayoutCore"),oe=m(async t=>{const e=await I(t);return M(e.graph),await re(e)},"renderDagreSubgraph"),G=m(t=>{const e=new O({multigraph:!0,compound:!0}).setGraph({rankdir:t.direction,nodesep:t.config?.nodeSpacing||t.nodeSpacing||t.config?.flowchart?.nodeSpacing,ranksep:t.config?.rankSpacing||t.rankSpacing||t.config?.flowchart?.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});return t.nodes.forEach(r=>{e.setNode(r.id,{...r}),r.parentId&&e.setParent(r.id,r.parentId)}),p.debug("Edges:",t.edges),t.edges.forEach(r=>{if(r.start===r.end){const d=r.start,a=d+"---"+d+"---1",f=d+"---"+d+"---2",u=e.node(d);e.setNode(a,{domId:a,id:a,parentId:u.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),e.setParent(a,u.parentId),e.setNode(f,{domId:f,id:f,parentId:u.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),e.setParent(f,u.parentId);const c=structuredClone(r),l=structuredClone(r),s=structuredClone(r),i=structuredClone(r);l.originalEdge=c,l.selfLoop={id:c.id,order:0},s.originalEdge=c,s.selfLoop={id:c.id,order:1},i.originalEdge=c,i.selfLoop={id:c.id,order:2},l.label="",l.arrowTypeEnd="none",l.endLabelLeft="",l.endLabelRight="",l.startLabelLeft="",l.id=d+"-cyclic-special-1",s.startLabelRight="",s.startLabelLeft="",s.endLabelLeft="",s.endLabelRight="",s.arrowTypeStart="none",s.arrowTypeEnd="none",s.id=d+"-cyclic-special-mid",i.label="",i.startLabelRight="",i.startLabelLeft="",i.arrowTypeStart="none",u.isGroup&&(l.fromCluster=d,i.toCluster=d),i.id=d+"-cyclic-special-2",i.arrowTypeStart="none",e.setEdge(d,a,l,d+"-cyclic-special-0"),e.setEdge(a,f,s,d+"-cyclic-special-1"),e.setEdge(f,d,i,d+"-cyclic-special-2")}else e.setEdge(r.start,r.end,{...r},r.id)}),A(e),{graph:e}},"prepareLayoutForDagre"),ae=m(async(t,{element:e,preparedLayout:r})=>{const d=r??G(t),a=k(),f=await I({element:e,graph:d.graph,diagramType:t.type,id:t.diagramId,parentCluster:void 0,siteConfig:a});return d.measuredLayout=f,f},"measureDagreLayout"),ne=m((t,e)=>{const r=e.preparedLayout?.measuredLayout;if(!r)throw new Error("runDagreLayoutCore requires measureDagreLayout to run first");return M(r.graph),te(t,r),r},"runDagreLayoutCore"),se=m((t,{measure:e})=>x(e.graph).map(r=>e.graph.node(r)).filter(Boolean),"getDagrePaintNodes"),ie=m((t,e,{measure:r})=>t?r.graph.node(t):void 0,"getDagreEdgeNode"),fe=Y({prepareLayout:G,measureLayout:ae,runLayoutCore:ne,paintOptions:{clusterDb:b,getNodes:se,getEdgeNode:ie,skipNode:m((t,{measure:e})=>!e.graph.hasNode(t.id),"skipNode"),isCluster:m((t,{measure:e})=>e.graph.hasNode(t.id)&&(e.graph.children(t.id)??[]).length>0,"isCluster")}});export{te as applyDagreLayoutResult,B as getEdgesToRender,ae as measureDagreLayout,G as prepareLayoutForDagre,fe as render,ne as runDagreLayoutCore};
diff --git a/apps/pythinker-code/dist-web/assets/diagram-S7CK7UJ4-a3q2B2N3.js b/apps/pythinker-code/dist-web/assets/diagram-S7CK7UJ4-DGAJHyux.js
similarity index 96%
rename from apps/pythinker-code/dist-web/assets/diagram-S7CK7UJ4-a3q2B2N3.js
rename to apps/pythinker-code/dist-web/assets/diagram-S7CK7UJ4-DGAJHyux.js
index 58db2b10b..13bcfb5a0 100644
--- a/apps/pythinker-code/dist-web/assets/diagram-S7CK7UJ4-a3q2B2N3.js
+++ b/apps/pythinker-code/dist-web/assets/diagram-S7CK7UJ4-DGAJHyux.js
@@ -1,4 +1,4 @@
-import{I as X}from"./chunk-2Q5K7J3B-DcbCvFbW.js";import{p as z}from"./chunk-JWPE2WC7-DsFB3Fti.js";import{p as O,b as G,s as Y,q as P,g as F,a as q,_ as g,D as N,l as A,G as Z,d as j,A as E,r as U,i as J,aj as K,E as Q,ak as ee}from"./mermaid.core-D6Xg32pF.js";import{p as te}from"./cynefin-OW5HDTMX-Byg0NdnJ.js";import"./index-D9Nz1t7z.js";import"./purify.es-5AjVNlXF.js";var D=/[─━│┃└┗├┣]/,L=/[└┗├┣]/,ne=/[─━]/,k=/^[\s│┃]+$/,T=/^\s*(title[\t ]|accTitle[\t ]*:|accDescr[\t ]*[:{])/,V=/^\s*%%/,re="    ";function _(n){return n.some(t=>D.test(t))}g(_,"isBoxDrawingFormat");function M(n){for(const t of n){const e=L.exec(t);if(e?.index&&e.index>0)return e.index}return 4}g(M,"inferSegmentWidth");function S(n,t){return n.replace(/\bline\s+(\d+)\b/gi,(e,r)=>{const s=parseInt(r,10),i=t.get(s);return i?`line ${i}`:e})}g(S,"remapErrorLines");function R(n){const t=n.split(`
+import{I as X}from"./chunk-2Q5K7J3B-C5dXVEvr.js";import{p as z}from"./chunk-JWPE2WC7-DjA09kFS.js";import{p as O,b as G,s as Y,q as P,g as F,a as q,_ as g,D as N,l as A,G as Z,d as j,A as E,r as U,i as J,aj as K,E as Q,ak as ee}from"./mermaid.core-BLsmN-lt.js";import{p as te}from"./cynefin-OW5HDTMX-BygTY4j3.js";import"./index-XmhyfFRf.js";import"./purify.es-5AjVNlXF.js";var D=/[─━│┃└┗├┣]/,L=/[└┗├┣]/,ne=/[─━]/,k=/^[\s│┃]+$/,T=/^\s*(title[\t ]|accTitle[\t ]*:|accDescr[\t ]*[:{])/,V=/^\s*%%/,re="    ";function _(n){return n.some(t=>D.test(t))}g(_,"isBoxDrawingFormat");function M(n){for(const t of n){const e=L.exec(t);if(e?.index&&e.index>0)return e.index}return 4}g(M,"inferSegmentWidth");function S(n,t){return n.replace(/\bline\s+(\d+)\b/gi,(e,r)=>{const s=parseInt(r,10),i=t.get(s);return i?`line ${i}`:e})}g(S,"remapErrorLines");function R(n){const t=n.split(`
 `),e=new Map;let r=-1;for(const[p,c]of t.entries())if(c.trim()==="treeView-beta"){r=p;break}if(r===-1)return{text:n,lineMap:e};const s=[];for(let p=r+1;p({cnt:1,stack:[{id:0,level:-1,name:"/",nodeType:"directory",children:[]}]})),ie=g(()=>{x.reset(),U()},"clear"),oe=g(()=>x.records.stack[0],"getRoot"),se=g(()=>x.records.cnt,"getCount"),ae=Q.treeView,ce=g(()=>N(ae,E().treeView),"getConfig"),le=g((n,t,e,r,s,i)=>{for(;n<=x.records.stack[x.records.stack.length-1].level;)x.records.stack.pop();const o={id:x.records.cnt++,level:n,name:t,nodeType:e,icon:s,cssClass:r,description:i,children:[]};x.records.stack[x.records.stack.length-1].children.push(o),x.records.stack.push(o)},"addNode"),de={clear:ie,addNode:le,getRoot:oe,getCount:se,getConfig:ce,getAccTitle:q,getAccDescription:F,getDiagramTitle:P,setAccDescription:Y,setAccTitle:G,setDiagramTitle:O},I=de,he=g(n=>{z(n,I);for(const t of n.nodes){const e=typeof t.indent=="number"?t.indent:0;let r=t.name;const s=r.endsWith("/");s&&(r=r.slice(0,-1));const i=s?"directory":"file",o=t.classAnnotation||void 0,a=t.iconAnnotation,p=a!==void 0?a||"none":void 0,c=t.descAnnotation||void 0,d=c?J(c,E()):void 0;I.addNode(e,r,i,o,p,d)}},"populate"),pe={parse:g(async n=>{const{text:t,lineMap:e}=R(n);try{const r=await te("treeView",t);A.debug(r),he(r)}catch(r){throw e.size>0&&r instanceof Error&&(r.message=S(r.message,e)),r}},"parse")},b={prefix:"mermaid-treeview",height:24,width:24,icons:{folder:{body:''},file:{body:''}}};function H(n,t){const e=t?.filenameIcons?.[n];if(e)return e;const r=n.lastIndexOf(".");if(r>0){const s=n.substring(r).toLowerCase(),i=t?.extensionIcons;return i?.[s]??i?.[s.slice(1)]}}g(H,"detectIcon");function C(n,t){return n.includes(":")?n:n in b.icons||!t?`${b.prefix}:${n}`:`${t}:${n}`}g(C,"qualifyIcon");function B(n,t){if(n.icon!=="none"){if(n.icon)return C(n.icon,t.defaultIconPack);if(t.showIcons){if(n.nodeType==="file"){const e=H(n.name,t);if(e==="none")return;if(e)return C(e,t.defaultIconPack)}return`${b.prefix}:${n.nodeType==="directory"?"folder":"file"}`}}}g(B,"getNodeIcon");ee([{name:b.prefix,icons:b}]);var y=14,ge=4,fe=16,ue=g(async(n,t)=>{const e=[],r=g(i=>{const o=B(i,t);o&&e.push({icon:o,node:i}),i.children.forEach(r)},"collect");r(n);const s=await Promise.all(e.map(async({icon:i,node:o})=>({id:o.id,svg:await K(i,{height:y,width:y})})));return new Map(s.map(({id:i,svg:o})=>[i,o]))},"resolveNodeIcons"),we=g((n,t,e,r,s,i)=>{const o=r.append("g");let a="treeView-node-label";e.nodeType==="directory"&&(a+=" treeView-node-dir"),e.cssClass&&(a+=` ${e.cssClass}`);const p=y+ge,c=B(e,s),d=c!==void 0;c&&o.append("g").attr("class","treeView-node-icon").attr("transform",`translate(${n+s.paddingX}, ${t+s.paddingY})`).html(i.get(e.id)??"");const h=o.append("text").text(e.name).attr("dominant-baseline","middle").attr("class",a),{height:l,width:w}=h.node().getBBox(),f=l+s.paddingY*2,m=n+s.paddingX+(d?p:0);h.attr("x",m),h.attr("y",t+f/2);const u=m+w,v=w+s.paddingX*2+(d?p:0);return e.BBox={x:n,y:t,width:v,height:f},e.cssClass?.split(/\s+/).includes("highlight")&&o.insert("rect",":first-child").attr("x",n).attr("y",t+1).attr("width",0).attr("height",f-2).attr("rx",3).attr("class","treeView-highlight-bg"),{node:e,nodeGroup:o,labelRightEdge:u,centerY:t+f/2}},"positionLabel"),$=g((n,t,e,r,s,i)=>n.append("line").attr("x1",t).attr("y1",e).attr("x2",r).attr("y2",s).attr("stroke-width",i).attr("class","treeView-node-line"),"positionLine"),me=g((n,t,e,r)=>{let s=0,i=0;const o=[],a=g((d,h,l,w)=>{const f=w*(l.rowIndent+l.paddingX),m=we(f,s,h,d,l,r);o.push(m);const{height:u,width:v}=h.BBox;$(d,f-l.rowIndent,s+u/2,f,s+u/2,l.lineThickness),i=Math.max(i,f+v),s+=u},"drawNode"),p=g((d,h=0)=>{a(n,d,e,h),d.children.forEach(m=>{p(m,h+1)});const{x:l,y:w,height:f}=d.BBox;if(d.children.length){const{y:m,height:u}=d.children[d.children.length-1].BBox;$(n,l+e.paddingX,w+f,l+e.paddingX,m+u/2+e.lineThickness/2,e.lineThickness)}},"processNode");p(t);const c=o.filter(d=>d.node.description);if(c.length>0){const h=Math.max(...o.map(l=>l.labelRightEdge))+fe;for(const l of c){const f=l.nodeGroup.append("text").text(l.node.description).attr("dominant-baseline","middle").attr("class","treeView-node-description").attr("x",h).attr("y",l.centerY).node().getBBox();i=Math.max(i,h+f.width+e.paddingX)}}for(const d of o)if(d.node.cssClass?.split(/\s+/).includes("highlight")){const h=d.nodeGroup.select(".treeView-highlight-bg");if(!h.empty()){const l=i-d.node.BBox.x+8;h.attr("width",l),i=Math.max(i,d.node.BBox.x+l+2)}}return{totalHeight:s,totalWidth:i}},"drawTree"),xe=g(async(n,t,e,r)=>{A.debug(`Rendering treeView diagram
 `+n);const s=r.db,i=s.getRoot(),o=s.getConfig(),a=Z(t),p=a.append("g");p.attr("class","tree-view");const c=await ue(i,o),{totalHeight:d,totalWidth:h}=me(p,i,o,c);a.attr("viewBox",`-${o.lineThickness/2} 0 ${h} ${d}`),j(a,d,h,o.useMaxWidth)},"draw"),ve={draw:xe},be=ve,Ie={labelFontSize:"16px",labelColor:"black",lineColor:"black",iconColor:"#546e7a",descriptionColor:"#6a9955",highlightBg:"rgba(255, 193, 7, 0.15)",highlightStroke:"#ffc107"},Ce=g(({treeView:n})=>{const{labelFontSize:t,labelColor:e,lineColor:r,iconColor:s,descriptionColor:i,highlightBg:o,highlightStroke:a}=N(Ie,n);return`
diff --git a/apps/pythinker-code/dist-web/assets/diagram-UQ7AKVKN-B3tc4iew.js b/apps/pythinker-code/dist-web/assets/diagram-UQ7AKVKN-YHKPBSmY.js
similarity index 95%
rename from apps/pythinker-code/dist-web/assets/diagram-UQ7AKVKN-B3tc4iew.js
rename to apps/pythinker-code/dist-web/assets/diagram-UQ7AKVKN-YHKPBSmY.js
index 7bf1074b9..576ebb6d8 100644
--- a/apps/pythinker-code/dist-web/assets/diagram-UQ7AKVKN-B3tc4iew.js
+++ b/apps/pythinker-code/dist-web/assets/diagram-UQ7AKVKN-YHKPBSmY.js
@@ -1,4 +1,4 @@
-import{p as I}from"./chunk-JWPE2WC7-DsFB3Fti.js";import{s as _,g as E,q as D,p as F,a as G,b as P,_ as c,G as z,r as B,D as w,A as C,E as W,l as b,X as V,d as H}from"./mermaid.core-D6Xg32pF.js";import{p as X}from"./cynefin-OW5HDTMX-Byg0NdnJ.js";import"./index-D9Nz1t7z.js";import"./purify.es-5AjVNlXF.js";var x={showLegend:!0,ticks:5,max:null,min:0,graticule:"circle"},y=32,A={axes:[],curves:[],options:x},m=structuredClone(A),j=W.radar,U=c(()=>w({...j,...C().radar}),"getConfig"),M=c(()=>m.axes,"getAxes"),q=c(()=>m.curves,"getCurves"),K=c(()=>m.options,"getOptions"),N=c(a=>{m.axes=a.map(t=>({name:t.name,label:t.label??t.name}))},"setAxes"),Y=c(a=>{m.curves=a.map(t=>({name:t.name,label:t.label??t.name,entries:Z(t.entries)}))},"setCurves"),Z=c(a=>{if(a[0].axis==null)return a.map(e=>e.value);const t=M();if(t.length===0)throw new Error("Axes must be populated before curves for reference entries");return t.map(e=>{const r=a.find(s=>s.axis?.$refText===e.name);if(r===void 0)throw new Error("Missing entry for axis "+e.label);return r.value})},"computeCurveEntries"),J=c(a=>{const t=a.reduce((e,r)=>(e[r.name]=r,e),{});m.options={showLegend:t.showLegend?.value??x.showLegend,ticks:t.ticks?.value??x.ticks,max:t.max?.value??x.max,min:t.min?.value??x.min,graticule:t.graticule?.value??x.graticule},m.options.ticks>y&&(b.warn(`Radar diagram ticks (${m.options.ticks}) exceeds maximum allowed (${y}). Using ${y} instead.`),m.options.ticks=y)},"setOptions"),Q=c(()=>{B(),m=structuredClone(A)},"clear"),$={getAxes:M,getCurves:q,getOptions:K,setAxes:N,setCurves:Y,setOptions:J,getConfig:U,clear:Q,setAccTitle:P,getAccTitle:G,setDiagramTitle:F,getDiagramTitle:D,getAccDescription:E,setAccDescription:_},tt=c(a=>{I(a,$);const{axes:t,curves:e,options:r}=a;$.setAxes(t),$.setCurves(e),$.setOptions(r)},"populate"),et={parse:c(async a=>{const t=await X("radar",a);b.debug(t),tt(t)},"parse")},at=c((a,t,e,r)=>{const s=r.db,i=s.getAxes(),l=s.getCurves(),n=s.getOptions(),o=s.getConfig(),d=s.getDiagramTitle(),p=z(t),u=rt(p,o),g=n.max??Math.max(...l.map(f=>Math.max(...f.entries))),h=n.min,v=Math.min(o.width,o.height)/2;st(u,i,v,n.ticks,n.graticule),nt(u,i,v,o),L(u,i,l,h,g,n.graticule,o),k(u,l,n.showLegend,o),u.append("text").attr("class","radarTitle").text(d).attr("x",0).attr("y",-o.height/2-o.marginTop)},"draw"),rt=c((a,t)=>{const e=t.width+t.marginLeft+t.marginRight,r=t.height+t.marginTop+t.marginBottom,s={x:t.marginLeft+t.width/2,y:t.marginTop+t.height/2};return H(a,r,e,t.useMaxWidth??!0),a.attr("viewBox",`0 0 ${e} ${r}`).attr("overflow","visible"),a.append("g").attr("transform",`translate(${s.x}, ${s.y})`)},"drawFrame"),st=c((a,t,e,r,s)=>{if(s==="circle")for(let i=0;i{const u=2*p*Math.PI/i-Math.PI/2,g=n*Math.cos(u),h=n*Math.sin(u);return`${g},${h}`}).join(" ");a.append("polygon").attr("points",o).attr("class","radarGraticule")}}},"drawGraticule"),nt=c((a,t,e,r)=>{const s=t.length;for(let i=0;i.01?"start":o<-.01?"end":"middle",u=d>.01?"hanging":d<-.01?"auto":"central",g=4;a.append("text").text(l).attr("x",e*r.axisLabelFactor*o+g*o).attr("y",e*r.axisLabelFactor*d+g*d).attr("text-anchor",p).attr("dominant-baseline",u).attr("class","radarAxisLabel")}},"drawAxes");function L(a,t,e,r,s,i,l){const n=t.length,o=Math.min(l.width,l.height)/2;e.forEach((d,p)=>{if(d.entries.length!==n)return;const u=d.entries.map((g,h)=>{const v=2*Math.PI*h/n-Math.PI/2,f=T(g,r,s,o),O=f*Math.cos(v),R=f*Math.sin(v);return{x:O,y:R}});i==="circle"?a.append("path").attr("d",S(u,l.curveTension)).attr("class",`radarCurve-${p}`):i==="polygon"&&a.append("polygon").attr("points",u.map(g=>`${g.x},${g.y}`).join(" ")).attr("class",`radarCurve-${p}`)})}c(L,"drawCurves");function T(a,t,e,r){const s=Math.min(Math.max(a,t),e);return r*(s-t)/(e-t)}c(T,"relativeRadius");function S(a,t){const e=a.length;let r=`M${a[0].x},${a[0].y}`;for(let s=0;s{const d=a.append("g").attr("transform",`translate(${s}, ${i+o*l})`);d.append("rect").attr("width",12).attr("height",12).attr("class",`radarLegendBox-${o}`),d.append("text").attr("x",16).attr("y",0).attr("class","radarLegendText").text(n.label)})}c(k,"drawLegend");var ot={draw:at},it=c((a,t)=>{let e="";for(let r=0;rw({...j,...C().radar}),"getConfig"),M=c(()=>m.axes,"getAxes"),q=c(()=>m.curves,"getCurves"),K=c(()=>m.options,"getOptions"),N=c(a=>{m.axes=a.map(t=>({name:t.name,label:t.label??t.name}))},"setAxes"),Y=c(a=>{m.curves=a.map(t=>({name:t.name,label:t.label??t.name,entries:Z(t.entries)}))},"setCurves"),Z=c(a=>{if(a[0].axis==null)return a.map(e=>e.value);const t=M();if(t.length===0)throw new Error("Axes must be populated before curves for reference entries");return t.map(e=>{const r=a.find(s=>s.axis?.$refText===e.name);if(r===void 0)throw new Error("Missing entry for axis "+e.label);return r.value})},"computeCurveEntries"),J=c(a=>{const t=a.reduce((e,r)=>(e[r.name]=r,e),{});m.options={showLegend:t.showLegend?.value??x.showLegend,ticks:t.ticks?.value??x.ticks,max:t.max?.value??x.max,min:t.min?.value??x.min,graticule:t.graticule?.value??x.graticule},m.options.ticks>y&&(b.warn(`Radar diagram ticks (${m.options.ticks}) exceeds maximum allowed (${y}). Using ${y} instead.`),m.options.ticks=y)},"setOptions"),Q=c(()=>{B(),m=structuredClone(A)},"clear"),$={getAxes:M,getCurves:q,getOptions:K,setAxes:N,setCurves:Y,setOptions:J,getConfig:U,clear:Q,setAccTitle:P,getAccTitle:G,setDiagramTitle:F,getDiagramTitle:D,getAccDescription:E,setAccDescription:_},tt=c(a=>{I(a,$);const{axes:t,curves:e,options:r}=a;$.setAxes(t),$.setCurves(e),$.setOptions(r)},"populate"),et={parse:c(async a=>{const t=await X("radar",a);b.debug(t),tt(t)},"parse")},at=c((a,t,e,r)=>{const s=r.db,i=s.getAxes(),l=s.getCurves(),n=s.getOptions(),o=s.getConfig(),d=s.getDiagramTitle(),p=z(t),u=rt(p,o),g=n.max??Math.max(...l.map(f=>Math.max(...f.entries))),h=n.min,v=Math.min(o.width,o.height)/2;st(u,i,v,n.ticks,n.graticule),nt(u,i,v,o),L(u,i,l,h,g,n.graticule,o),k(u,l,n.showLegend,o),u.append("text").attr("class","radarTitle").text(d).attr("x",0).attr("y",-o.height/2-o.marginTop)},"draw"),rt=c((a,t)=>{const e=t.width+t.marginLeft+t.marginRight,r=t.height+t.marginTop+t.marginBottom,s={x:t.marginLeft+t.width/2,y:t.marginTop+t.height/2};return H(a,r,e,t.useMaxWidth??!0),a.attr("viewBox",`0 0 ${e} ${r}`).attr("overflow","visible"),a.append("g").attr("transform",`translate(${s.x}, ${s.y})`)},"drawFrame"),st=c((a,t,e,r,s)=>{if(s==="circle")for(let i=0;i{const u=2*p*Math.PI/i-Math.PI/2,g=n*Math.cos(u),h=n*Math.sin(u);return`${g},${h}`}).join(" ");a.append("polygon").attr("points",o).attr("class","radarGraticule")}}},"drawGraticule"),nt=c((a,t,e,r)=>{const s=t.length;for(let i=0;i.01?"start":o<-.01?"end":"middle",u=d>.01?"hanging":d<-.01?"auto":"central",g=4;a.append("text").text(l).attr("x",e*r.axisLabelFactor*o+g*o).attr("y",e*r.axisLabelFactor*d+g*d).attr("text-anchor",p).attr("dominant-baseline",u).attr("class","radarAxisLabel")}},"drawAxes");function L(a,t,e,r,s,i,l){const n=t.length,o=Math.min(l.width,l.height)/2;e.forEach((d,p)=>{if(d.entries.length!==n)return;const u=d.entries.map((g,h)=>{const v=2*Math.PI*h/n-Math.PI/2,f=T(g,r,s,o),O=f*Math.cos(v),R=f*Math.sin(v);return{x:O,y:R}});i==="circle"?a.append("path").attr("d",S(u,l.curveTension)).attr("class",`radarCurve-${p}`):i==="polygon"&&a.append("polygon").attr("points",u.map(g=>`${g.x},${g.y}`).join(" ")).attr("class",`radarCurve-${p}`)})}c(L,"drawCurves");function T(a,t,e,r){const s=Math.min(Math.max(a,t),e);return r*(s-t)/(e-t)}c(T,"relativeRadius");function S(a,t){const e=a.length;let r=`M${a[0].x},${a[0].y}`;for(let s=0;s{const d=a.append("g").attr("transform",`translate(${s}, ${i+o*l})`);d.append("rect").attr("width",12).attr("height",12).attr("class",`radarLegendBox-${o}`),d.append("text").attr("x",16).attr("y",0).attr("class","radarLegendText").text(n.label)})}c(k,"drawLegend");var ot={draw:at},it=c((a,t)=>{let e="";for(let r=0;rge({...Se,...M().eventmodeling}),"getConfig"),B={};function O(){let e=Fe;const{ast:n}=B,t=E();if(!n)throw new Error("No data for EventModel");return n.frames.forEach((i,a)=>{const r=G(i,n.dataEntities,t);e=v(e,{$kind:T,index:a,frame:i,textProps:r});let l;K(i)?(g.debug("source frame",i.sourceFrames),l=n.frames.filter(d=>i.sourceFrames.some(c=>c.$refText===d.name)),l.forEach(d=>{e=v(e,{$kind:S,index:a,frame:i,sourceFrame:d})})):e=v(e,{$kind:S,index:a,frame:i})}),e={...e,sortedSwimlanesArray:A(e.swimlanes)},e}o(O,"getState");function I(e){B.ast=e}o(I,"setAst");var s={swimlaneMinHeight:70,swimlanePadding:15,swimlaneGap:10,boxPadding:10,boxOverlap:90,boxDefaultY:0,boxMinWidth:80,boxMaxWidth:450,boxMinHeight:80,boxMaxHeight:750,contentStartX:250,textMaxWidth:430,boxTextFontWeight:"bold",boxTextPadding:10,swimlaneTextFontWeight:"bold",labelUiAutomation:"UI/Automation",labelUiAutomationPrefix:"UI/A: ",labelCommandReadModel:"Command/Read Model",labelCommandReadModelPrefix:"C/RM: ",labelEvents:"Events",labelEventsPrefix:"Stream: "};function E(){return s}o(E,"getDiagramProps");var Fe={boxes:[],swimlanes:{},relations:[],maxR:0,sortedSwimlanesArray:[]};function W(e){const n=e.split(".");if(n.length===2)return n[0]}o(W,"extractNamespace");function H(e){const n=e.split(".");return n.length===2?n[1]:e}o(H,"extractName");function U(e,n){if(!(!n||n.length===0))return Object.values(e).find(t=>t.namespace===n)}o(U,"findSwimlaneByNamespace");function b(e,n,t){return Math.max(n,...Object.keys(e).filter(i=>{const a=Number.parseInt(i);return a>n&&aNumber.parseInt(i)))+1}o(b,"findNextAvailableIndex");function _(e,n){const t=W(e.entityIdentifier),i=U(n,t);switch(e.modelEntityType){case"ui":case"pcr":case"processor":return i?{index:i.index,label:i.namespace||s.labelUiAutomation}:t?{index:b(n,0,100),label:s.labelUiAutomationPrefix+t}:{index:0,label:s.labelUiAutomation};case"rmo":case"readmodel":case"cmd":case"command":return i?{index:i.index,label:i.namespace||s.labelCommandReadModel}:t?{index:b(n,100,200),label:s.labelCommandReadModelPrefix+t}:{index:100,label:s.labelCommandReadModel};case"evt":case"event":default:return i?{index:i.index,label:i.namespace||s.labelEvents}:t?{index:b(n,200,300),label:s.labelEventsPrefix+t}:{index:200,label:s.labelEvents}}}o(_,"calculateSwimlaneProps");function L(e){const{themeVariables:n}=M();switch(e.modelEntityType){case"ui":return{fill:n.emUiFill??"white",stroke:n.emUiStroke??"#dbdada"};case"pcr":case"processor":return{fill:n.emProcessorFill??"#edb3f6",stroke:n.emProcessorStroke??"#b88cbf"};case"rmo":case"readmodel":return{fill:n.emReadModelFill??"#d3f1a2",stroke:n.emReadModelStroke??"#a3b732"};case"cmd":case"command":return{fill:n.emCommandFill??"#bcd6fe",stroke:n.emCommandStroke??"#679ac3"};case"evt":case"event":return{fill:n.emEventFill??"#ffb778",stroke:n.emEventStroke??"#c19a0f"};default:return{fill:"red",stroke:"black"}}}o(L,"calculateEntityVisualProps");function G(e,n,t){const i=M(),a=y(H(e.entityIdentifier)??"",i);let r;const l={fontSize:16,fontWeight:700,fontFamily:'"trebuchet ms", verdana, arial, sans-serif',joinWith:"
"};let c=`${P(a,t.textMaxWidth,l)}`;if(e.dataInlineValue&&(r=e.dataInlineValue,r=r.substring(r.indexOf("{")+1),r=r.substring(0,r.lastIndexOf("}")-1),r=y(r,i),r=P(r,t.textMaxWidth,l),r=r.replaceAll(" "," ")),e.dataReference){const p=n.find(w=>w.name===e.dataReference?.$refText);p&&(r=p.dataBlockValue,r=r.substring(r.indexOf(`{ +import{p as re}from"./chunk-JWPE2WC7-DjA09kFS.js";import{q as oe,p as se,s as le,g as de,a as ce,b as me,_ as o,l as g,c as D,j as ue,B as xe,r as fe,D as ge,A as M,E as he,i as y,w as P,al as pe}from"./mermaid.core-BLsmN-lt.js";import{p as be,i as ve}from"./cynefin-OW5HDTMX-BygTY4j3.js";import"./index-XmhyfFRf.js";import"./purify.es-5AjVNlXF.js";var T="position frame",$="frame positioned",S="position relation",N="relation positioned",we=o(function(e){g.debug("options str",e)},"setOptions"),ye=o(function(){return{}},"getOptions"),Pe=o(function(){C(),fe()},"clear");function C(){B={}}o(C,"reset");var Se=he.eventmodeling,ke=o(()=>ge({...Se,...M().eventmodeling}),"getConfig"),B={};function O(){let e=Fe;const{ast:n}=B,t=E();if(!n)throw new Error("No data for EventModel");return n.frames.forEach((i,a)=>{const r=G(i,n.dataEntities,t);e=v(e,{$kind:T,index:a,frame:i,textProps:r});let l;K(i)?(g.debug("source frame",i.sourceFrames),l=n.frames.filter(d=>i.sourceFrames.some(c=>c.$refText===d.name)),l.forEach(d=>{e=v(e,{$kind:S,index:a,frame:i,sourceFrame:d})})):e=v(e,{$kind:S,index:a,frame:i})}),e={...e,sortedSwimlanesArray:A(e.swimlanes)},e}o(O,"getState");function I(e){B.ast=e}o(I,"setAst");var s={swimlaneMinHeight:70,swimlanePadding:15,swimlaneGap:10,boxPadding:10,boxOverlap:90,boxDefaultY:0,boxMinWidth:80,boxMaxWidth:450,boxMinHeight:80,boxMaxHeight:750,contentStartX:250,textMaxWidth:430,boxTextFontWeight:"bold",boxTextPadding:10,swimlaneTextFontWeight:"bold",labelUiAutomation:"UI/Automation",labelUiAutomationPrefix:"UI/A: ",labelCommandReadModel:"Command/Read Model",labelCommandReadModelPrefix:"C/RM: ",labelEvents:"Events",labelEventsPrefix:"Stream: "};function E(){return s}o(E,"getDiagramProps");var Fe={boxes:[],swimlanes:{},relations:[],maxR:0,sortedSwimlanesArray:[]};function W(e){const n=e.split(".");if(n.length===2)return n[0]}o(W,"extractNamespace");function H(e){const n=e.split(".");return n.length===2?n[1]:e}o(H,"extractName");function U(e,n){if(!(!n||n.length===0))return Object.values(e).find(t=>t.namespace===n)}o(U,"findSwimlaneByNamespace");function b(e,n,t){return Math.max(n,...Object.keys(e).filter(i=>{const a=Number.parseInt(i);return a>n&&aNumber.parseInt(i)))+1}o(b,"findNextAvailableIndex");function _(e,n){const t=W(e.entityIdentifier),i=U(n,t);switch(e.modelEntityType){case"ui":case"pcr":case"processor":return i?{index:i.index,label:i.namespace||s.labelUiAutomation}:t?{index:b(n,0,100),label:s.labelUiAutomationPrefix+t}:{index:0,label:s.labelUiAutomation};case"rmo":case"readmodel":case"cmd":case"command":return i?{index:i.index,label:i.namespace||s.labelCommandReadModel}:t?{index:b(n,100,200),label:s.labelCommandReadModelPrefix+t}:{index:100,label:s.labelCommandReadModel};case"evt":case"event":default:return i?{index:i.index,label:i.namespace||s.labelEvents}:t?{index:b(n,200,300),label:s.labelEventsPrefix+t}:{index:200,label:s.labelEvents}}}o(_,"calculateSwimlaneProps");function L(e){const{themeVariables:n}=M();switch(e.modelEntityType){case"ui":return{fill:n.emUiFill??"white",stroke:n.emUiStroke??"#dbdada"};case"pcr":case"processor":return{fill:n.emProcessorFill??"#edb3f6",stroke:n.emProcessorStroke??"#b88cbf"};case"rmo":case"readmodel":return{fill:n.emReadModelFill??"#d3f1a2",stroke:n.emReadModelStroke??"#a3b732"};case"cmd":case"command":return{fill:n.emCommandFill??"#bcd6fe",stroke:n.emCommandStroke??"#679ac3"};case"evt":case"event":return{fill:n.emEventFill??"#ffb778",stroke:n.emEventStroke??"#c19a0f"};default:return{fill:"red",stroke:"black"}}}o(L,"calculateEntityVisualProps");function G(e,n,t){const i=M(),a=y(H(e.entityIdentifier)??"",i);let r;const l={fontSize:16,fontWeight:700,fontFamily:'"trebuchet ms", verdana, arial, sans-serif',joinWith:"
"};let c=`${P(a,t.textMaxWidth,l)}`;if(e.dataInlineValue&&(r=e.dataInlineValue,r=r.substring(r.indexOf("{")+1),r=r.substring(0,r.lastIndexOf("}")-1),r=y(r,i),r=P(r,t.textMaxWidth,l),r=r.replaceAll(" "," ")),e.dataReference){const p=n.find(w=>w.name===e.dataReference?.$refText);p&&(r=p.dataBlockValue,r=r.substring(r.indexOf(`{ `)+2),r=r.substring(0,r.lastIndexOf("}")-1),r=y(r,i),r=P(r,t.textMaxWidth,l),r=r.replaceAll(" "," "),r+="
")}const m=r!==void 0;m&&(c+=`

${r}`);const x={fontSize:l.fontSize,fontWeight:l.fontWeight,fontFamily:l.fontFamily},u=pe(c,x),h=m?u.width/3:u.width,f={content:c,width:h,height:u.height};return g.debug(`[${e.name}] ${e.entityIdentifier} text`,f),f}o(G,"calculateTextProps");function V(e,n){const t=n,i=L(t.frame),a={width:t.textProps.width+2*s.boxTextPadding,height:t.textProps.height+2*s.boxTextPadding};return[{$kind:$,frame:t.frame,index:t.index,visual:i,dimension:a,textProps:t.textProps}]}o(V,"decidePositionFrame");function X(e,n,t){return n===void 0?s.contentStartX:n.index===e.index&&e.r?e.r+s.boxPadding:t===void 0?s.contentStartX:t.r-s.boxOverlap+s.boxPadding}o(X,"calculateX");function j(e,n){const t=[...e.map(i=>i.r),n];return Math.max(...t)}o(j,"calculateMaxRight");function A(e){return Object.values(e).sort((n,t)=>n.index-t.index)}o(A,"sortedSwimlanesArray");function Y(e,n){const t=n,i=_(t.frame,e.swimlanes);let a;i.index in e.swimlanes?a=e.swimlanes[i.index]:a={index:i.index,label:i.label,r:0,y:i.index*s.swimlaneMinHeight+s.swimlaneGap,height:s.swimlaneMinHeight,maxHeight:s.swimlaneMinHeight};const r=e.boxes.length>0?e.boxes[e.boxes.length-1]:void 0,l=e.previousSwimlaneNumber!==void 0?e.swimlanes[e.previousSwimlaneNumber]:void 0,d={width:Math.max(s.boxMinWidth,Math.min(s.boxMaxWidth,t.dimension.width))+2*s.boxPadding,height:Math.max(s.boxMinHeight,Math.min(s.boxMaxHeight,t.dimension.height))+2*s.boxPadding},c=X(a,l,r),m=c+d.width+s.boxPadding,x=j(Object.values(e.swimlanes),m);a.r=c+d.width,a.maxHeight=Math.max(a.maxHeight,d.height),a.height=Math.max(s.swimlaneMinHeight,a.maxHeight)+2*s.swimlanePadding;const u={x:c,y:s.swimlanePadding+a.y,r:m,dimension:d,leftSibling:!1,swimlane:a,visual:t.visual,text:t.textProps.content,frame:t.frame,index:t.index},h={...e,boxes:[...e.boxes,u],swimlanes:{...e.swimlanes,[`${a.index}`]:a},previousSwimlaneNumber:i.index,previousFrame:t.frame,maxR:x},f=A(h.swimlanes);f.length>0&&(f[0].y=0);for(let p=1;p0}o(K,"hasSourceFrame");function k(e,n){if(n!=null)return e.find(t=>t.frame.name===n.name)}o(k,"findBoxByFrame");function q(e,n,t){if(!(t<0))for(let i=t;i>=0;i--){const a=e[i];if(a.swimlane.index!==n)return a}}o(q,"findBoxByLineIndex");function J(e,n){const t=n;if(ve(t.frame)||z(t.index,t.frame))return[];const i=k(e.boxes,t.frame);if(i===void 0)throw new Error(`Target box not found for frame ${t.frame.name}`);let a;return t.sourceFrame?a=k(e.boxes,t.sourceFrame):a=q(e.boxes,i.swimlane.index,t.index-1),a===void 0?[]:[{$kind:N,frame:t.frame,index:t.index,sourceBox:a,targetBox:i}]}o(J,"decidePositionRelation");function Q(e,n){const t=n,i={visual:{fill:"none",stroke:"#000"},source:{x:t.sourceBox.x,y:t.sourceBox.y},target:{x:t.targetBox.x,y:t.targetBox.y},sourceBox:t.sourceBox,targetBox:t.targetBox};return{...e,relations:[...e.relations,i]}}o(Q,"evolveRelationPositioned");var Me={[T]:V,[S]:J},Be={[$]:Y,[N]:Q};function Z(e,n){const t=Me[n.$kind];if(t==null)return[];const i=t(e,n);return g.debug("decided events",i),i}o(Z,"decide");function ee(e,n){const t=n.reduce((i,a)=>{const r=Be[a.$kind];return r==null?i:r(i,a)},e);return g.debug("evolve events",{state:e,newState:t,events:n}),t}o(ee,"evolve");function v(e,n){const t=Z(e,n);return ee(e,t)}o(v,"dispatch");var F={getConfig:ke,setOptions:we,getOptions:ye,clear:Pe,setAccTitle:me,getAccTitle:ce,getAccDescription:de,setAccDescription:le,setDiagramTitle:se,getDiagramTitle:oe,setAst:I,getDiagramProps:E,getState:O},Ee={parse:o(async e=>{const n=await be("eventmodeling",e);g.debug(n),F.setAst(n),re(n,F)},"parse")},Ae=D(),Re=Ae?.eventmodeling;function te(e,n){return t=>{const i=t.swimlane.y+n.swimlanePadding,a=e.append("g").attr("class","em-box");a.append("rect").attr("x",t.x).attr("y",i).attr("rx","3").attr("width",t.dimension.width).attr("height",t.dimension.height).attr("stroke",t.visual.stroke).attr("fill",t.visual.fill),a.append("foreignObject").attr("x",t.x+n.boxPadding).attr("y",i+10).attr("width",t.dimension.width-2*n.boxPadding).attr("height",t.dimension.height-2*n.boxPadding).append("xhtml:div").style("display","table").style("height","100%").style("width","100%").append("span").style("display","table-cell").style("text-align","center").style("vertical-align","middle").html(t.text)}}o(te,"renderD3Box");function ne(e,n){return e>n}o(ne,"dirUpwards");function ie(e,n,t,i){return a=>{const r=a.sourceBox.swimlane.y+n.swimlanePadding,l=a.targetBox.swimlane.y+n.swimlanePadding,d=ne(r,l),c=a.sourceBox.x+a.sourceBox.dimension.width*2/3,m=a.targetBox.x+a.targetBox.dimension.width/3;let x,u;g.debug(`rendering relation up=${d} for `,{sourceBox:a.sourceBox,targetBox:a.targetBox}),d?(x=r,u=l+a.targetBox.dimension.height):(x=r+a.sourceBox.dimension.height,u=l);const h=i.emRelationStroke??a.visual.stroke;e.append("path").attr("class","em-relation").attr("fill",a.visual.fill).attr("stroke",h).attr("stroke-width","1").attr("marker-end",`url(#${t})`).attr("d",`M${c} ${x} L${m} ${u}`)}}o(ie,"renderD3Relation");function ae(e,n,t,i){return a=>{const r=e.append("g").attr("class","em-swimlane"),l=i.emSwimlaneBackgroundOdd??"rgb(250,250,250)",d=i.emSwimlaneBackgroundStroke??"rgb(240,240,240)";r.append("rect").attr("x",0).attr("y",a.y).attr("rx","3").attr("width",n+t.swimlanePadding).attr("height",a.height).attr("fill",l).attr("stroke",d),r.append("text").attr("font-weight",t.swimlaneTextFontWeight).attr("x",30).attr("y",a.y+30).text(a.label)}}o(ae,"renderD3Swimlane");var De=o(function(e,n,t,i){if(g.debug("in eventmodeling renderer",e+` `,"id:",n,t),!Re)throw new Error("EventModeling config not found");const a=i.db,{themeVariables:r,eventmodeling:l}=D(),d=ue(`[id="${n}"]`),c=a.getDiagramProps(),m=a.getState(),x=`em-arrowhead-${n}`,u=r.emArrowhead??"#000000";m.sortedSwimlanesArray.forEach(ae(d,m.maxR,c,r)),m.boxes.forEach(te(d,c)),m.relations.forEach(ie(d,c,x,r)),d.append("defs").append("marker").attr("id",x).attr("markerWidth","10").attr("markerHeight","7").attr("refX","10").attr("refY","3.5").attr("orient","auto").append("polygon").attr("points","0 0, 10 3.5, 0 7").attr("fill",u),xe(void 0,d,l?.padding??30,l?.useMaxWidth)},"draw"),Te={draw:De},$e=o(e=>"","getStyles"),Ne=$e,Ue={parser:Ee,db:F,renderer:Te,styles:Ne};export{Ue as diagram}; diff --git a/apps/pythinker-code/dist-web/assets/diagram-VX7I27RA-ano3VTet.js b/apps/pythinker-code/dist-web/assets/diagram-VX7I27RA-LaTgw-sA.js similarity index 97% rename from apps/pythinker-code/dist-web/assets/diagram-VX7I27RA-ano3VTet.js rename to apps/pythinker-code/dist-web/assets/diagram-VX7I27RA-LaTgw-sA.js index 2432c6947..4dae95792 100644 --- a/apps/pythinker-code/dist-web/assets/diagram-VX7I27RA-ano3VTet.js +++ b/apps/pythinker-code/dist-web/assets/diagram-VX7I27RA-LaTgw-sA.js @@ -1,4 +1,4 @@ -import{p as me}from"./chunk-JWPE2WC7-DsFB3Fti.js";import{_ as w,X as ge,A as te,D as Q,G as ye,d as Se,l as ee,bd as B,j as Y,b as ve,a as xe,p as be,q as we,g as Ce,s as Te,E as Le,be as $e,r as Ae}from"./mermaid.core-D6Xg32pF.js";import{s as Fe}from"./chunk-POPQ4Y6H-Tp7S0w--.js";import{p as Ne}from"./cynefin-OW5HDTMX-Byg0NdnJ.js";import{b as I}from"./defaultLocale-DX6XiGOO.js";import{o as K}from"./ordinal-Cboi1Yqb.js";import"./index-D9Nz1t7z.js";import"./purify.es-5AjVNlXF.js";import"./init-Gi6I4Gst.js";function Me(e){var a=0,n=e.children,l=n&&n.length;if(!l)a=1;else for(;--l>=0;)a+=n[l].value;e.value=a}function _e(){return this.eachAfter(Me)}function ke(e,a){let n=-1;for(const l of this)e.call(a,l,++n,this);return this}function ze(e,a){for(var n=this,l=[n],r,o,h=-1;n=l.pop();)if(e.call(a,n,++h,this),r=n.children)for(o=r.length-1;o>=0;--o)l.push(r[o]);return this}function Ve(e,a){for(var n=this,l=[n],r=[],o,h,d,g=-1;n=l.pop();)if(r.push(n),o=n.children)for(h=0,d=o.length;h=0;)n+=l[r].value;a.value=n})}function Be(e){return this.eachBefore(function(a){a.children&&a.children.sort(e)})}function Ee(e){for(var a=this,n=Re(a,e),l=[a];a!==n;)a=a.parent,l.push(a);for(var r=l.length;e!==n;)l.splice(r,0,e),e=e.parent;return l}function Re(e,a){if(e===a)return e;var n=e.ancestors(),l=a.ancestors(),r=null;for(e=n.pop(),a=l.pop();e===a;)r=e,e=n.pop(),a=l.pop();return r}function We(){for(var e=this,a=[e];e=e.parent;)a.push(e);return a}function He(){return Array.from(this)}function Ie(){var e=[];return this.eachBefore(function(a){a.children||e.push(a)}),e}function Oe(){var e=this,a=[];return e.each(function(n){n!==e&&a.push({source:n.parent,target:n})}),a}function*Ge(){var e=this,a,n=[e],l,r,o;do for(a=n.reverse(),n=[];e=a.pop();)if(yield e,l=e.children)for(r=0,o=l.length;r=0;--d)r.push(o=h[d]=new U(h[d])),o.parent=l,o.depth=l.depth+1;return n.eachBefore(Ue)}function qe(){return ae(this).eachBefore(Ye)}function Xe(e){return e.children}function je(e){return Array.isArray(e)?e[1]:null}function Ye(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function Ue(e){var a=0;do e.height=a;while((e=e.parent)&&e.height<++a)}function U(e){this.data=e,this.depth=this.height=0,this.parent=null}U.prototype=ae.prototype={constructor:U,count:_e,each:ke,eachAfter:Ve,eachBefore:ze,find:De,sum:Pe,sort:Be,path:Ee,ancestors:We,descendants:He,leaves:Ie,links:Oe,copy:qe,[Symbol.iterator]:Ge};function Ze(e){if(typeof e!="function")throw new Error;return e}function O(){return 0}function G(e){return function(){return e}}function Je(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function Ke(e,a,n,l,r){for(var o=e.children,h,d=-1,g=o.length,c=e.value&&(l-a)/e.value;++dN&&(N=c),M=u*u*R,$=Math.max(N/M,M/y),$>V){u-=c;break}V=$}h.push(g={value:u,dice:x1?l:1)},n})(et);function nt(){var e=at,a=!1,n=1,l=1,r=[0],o=O,h=O,d=O,g=O,c=O;function p(s){return s.x0=s.y0=0,s.x1=n,s.y1=l,s.eachBefore(b),r=[0],a&&s.eachBefore(Je),s}function b(s){var x=r[s.depth],S=s.x0+x,v=s.y0+x,u=s.x1-x,y=s.y1-x;u{$e(r)&&(n?.textStyles?n.textStyles.push(r):n.textStyles=[r]),n?.styles?n.styles.push(r):n.styles=[r]}),this.classes.set(e,n)}getClasses(){return this.classes}getStylesForClass(e){return this.classes.get(e)?.styles??[]}clear(){Ae(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}};function oe(e){if(!e.length)return[];const a=[],n=[];return e.forEach(l=>{const r={name:l.name,children:l.type==="Leaf"?void 0:[]};for(r.classSelector=l?.classSelector,l?.cssCompiledStyles&&(r.cssCompiledStyles=l.cssCompiledStyles),l.type==="Leaf"&&l.value!==void 0&&(r.value=l.value);n.length>0&&n[n.length-1].level>=l.level;)n.pop();if(n.length===0)a.push(r);else{const o=n[n.length-1].node;o.children?o.children.push(r):o.children=[r]}l.type!=="Leaf"&&n.push({node:r,level:l.level})}),a}w(oe,"buildHierarchy");var lt=w((e,a)=>{me(e,a);const n=[];for(const o of e.TreemapRows??[])o.$type==="ClassDefStatement"&&a.addClass(o.className??"",o.styleText??"");for(const o of e.TreemapRows??[]){const h=o.item;if(!h)continue;const d=o.indent?parseInt(o.indent):0,g=rt(h),c=h.classSelector?a.getStylesForClass(h.classSelector):[],p=c.length>0?c:void 0,b={level:d,name:g,type:h.$type,value:h.value,classSelector:h.classSelector,cssCompiledStyles:p};n.push(b)}const l=oe(n),r=w((o,h)=>{for(const d of o)a.addNode(d,h),d.children&&d.children.length>0&&r(d.children,h+1)},"addNodesRecursively");r(l,0)},"populate"),rt=w(e=>e.name?String(e.name):"","getItemName"),ce={parser:{yy:void 0},parse:w(async e=>{try{const n=await Ne("treemap",e);ee.debug("Treemap AST:",n);const l=ce.parser?.yy;if(!(l instanceof ie))throw new Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");lt(n,l)}catch(a){throw ee.error("Error parsing treemap:",a),a}},"parse")},st=10,E=10,q=25,it=w((e,a,n,l)=>{const r=l.db,o=r.getConfig(),h=o.padding??st,d=r.getDiagramTitle(),g=r.getRoot(),{themeVariables:c}=te();if(!g)return;const p=d?30:0,b=ye(a),s=o.nodeWidth?o.nodeWidth*E:960,x=o.nodeHeight?o.nodeHeight*E:500,S=s,v=x+p;b.attr("viewBox",`0 0 ${S} ${v}`),Se(b,v,S,o.useMaxWidth);let u;try{const t=o.valueFormat||",";if(t==="$0,0")u=w(i=>"$"+I(",")(i),"valueFormat");else if(t.startsWith("$")&&t.includes(",")){const i=/\.\d+/.exec(t),f=i?i[0]:"";u=w(C=>"$"+I(","+f)(C),"valueFormat")}else if(t.startsWith("$")){const i=t.substring(1);u=w(f=>"$"+I(i||"")(f),"valueFormat")}else u=I(t)}catch(t){ee.error("Error creating format function:",t),u=I(",")}const y=K().range(["transparent",c.cScale0,c.cScale1,c.cScale2,c.cScale3,c.cScale4,c.cScale5,c.cScale6,c.cScale7,c.cScale8,c.cScale9,c.cScale10,c.cScale11]),N=K().range(["transparent",c.cScalePeer0,c.cScalePeer1,c.cScalePeer2,c.cScalePeer3,c.cScalePeer4,c.cScalePeer5,c.cScalePeer6,c.cScalePeer7,c.cScalePeer8,c.cScalePeer9,c.cScalePeer10,c.cScalePeer11]),$=K().range([c.cScaleLabel0,c.cScaleLabel1,c.cScaleLabel2,c.cScaleLabel3,c.cScaleLabel4,c.cScaleLabel5,c.cScaleLabel6,c.cScaleLabel7,c.cScaleLabel8,c.cScaleLabel9,c.cScaleLabel10,c.cScaleLabel11]);d&&b.append("text").attr("x",S/2).attr("y",p/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(d);const V=b.append("g").attr("transform",`translate(0, ${p})`).attr("class","treemapContainer"),R=ae(g).sum(t=>t.value??0).sort((t,i)=>(i.value??0)-(t.value??0)),ne=nt().size([s,x]).paddingTop(t=>t.children&&t.children.length>0?q+E:0).paddingInner(h).paddingLeft(t=>t.children&&t.children.length>0?E:0).paddingRight(t=>t.children&&t.children.length>0?E:0).paddingBottom(t=>t.children&&t.children.length>0?E:0).round(!0)(R),he=ne.descendants().filter(t=>t.children&&t.children.length>0),W=V.selectAll(".treemapSection").data(he).enter().append("g").attr("class","treemapSection").attr("transform",t=>`translate(${t.x0},${t.y0})`);W.append("rect").attr("width",t=>t.x1-t.x0).attr("height",q).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",t=>t.depth===0?"display: none;":""),W.append("clipPath").attr("id",(t,i)=>`clip-section-${a}-${i}`).append("rect").attr("width",t=>Math.max(0,t.x1-t.x0-12)).attr("height",q),W.append("rect").attr("width",t=>t.x1-t.x0).attr("height",t=>t.y1-t.y0).attr("class",(t,i)=>`treemapSection section${i}`).attr("fill",t=>y(t.data.name)).attr("fill-opacity",.6).attr("stroke",t=>N(t.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",t=>{if(t.depth===0)return"display: none;";const i=B({cssCompiledStyles:t.data.cssCompiledStyles});return i.nodeStyles+";"+i.borderStyles.join(";")}),W.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",q/2).attr("dominant-baseline","middle").text(t=>t.depth===0?"":t.data.name).attr("font-weight","bold").attr("clip-path",(t,i)=>`url(#clip-section-${a}-${i})`).attr("style",t=>{if(t.depth===0)return"display: none;";const i="dominant-baseline: middle; font-size: 12px; fill:"+$(t.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",f=B({cssCompiledStyles:t.data.cssCompiledStyles});return i+f.labelStyles.replace("color:","fill:")}).each(function(t){if(t.depth===0)return;const i=Y(this),f=t.data.name;i.text(f);const C=t.x1-t.x0,L=6;let T;o.showValues!==!1&&t.value?T=C-10-30-10-L:T=C-L-6;const m=Math.max(15,T),_=i.node();if(_.getComputedTextLength()>m){let z=f;for(;z.length>0;){if(z=f.substring(0,z.length-1),z.length===0){i.text("..."),_.getComputedTextLength()>m&&i.text("");break}if(i.text(z+"..."),_.getComputedTextLength()<=m)break}}}),o.showValues!==!1&&W.append("text").attr("class","treemapSectionValue").attr("x",t=>t.x1-t.x0-10).attr("y",q/2).attr("text-anchor","end").attr("dominant-baseline","middle").text(t=>t.value?u(t.value):"").attr("font-style","italic").attr("style",t=>{if(t.depth===0)return"display: none;";const i="text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+$(t.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",f=B({cssCompiledStyles:t.data.cssCompiledStyles});return i+f.labelStyles.replace("color:","fill:")});const le=ne.leaves(),A=le.length>20,de=A?16:38,X=A?14:28,D=A?4:8,H=A?4:6,Z=A?2:4,re=A?8:10,J=A?1:2,j=V.selectAll(".treemapLeafGroup").data(le).enter().append("g").attr("class",(t,i)=>`treemapNode treemapLeafGroup leaf${i}${t.data.classSelector?` ${t.data.classSelector}`:""}x`).attr("transform",t=>`translate(${t.x0},${t.y0})`);j.append("rect").attr("width",t=>t.x1-t.x0).attr("height",t=>t.y1-t.y0).attr("class","treemapLeaf").attr("fill",t=>t.parent?y(t.parent.data.name):y(t.data.name)).attr("style",t=>B({cssCompiledStyles:t.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",t=>t.parent?y(t.parent.data.name):y(t.data.name)).attr("stroke-width",3),j.append("clipPath").attr("id",(t,i)=>`clip-${a}-${i}`).append("rect").attr("width",t=>Math.max(0,t.x1-t.x0-4)).attr("height",t=>Math.max(0,t.y1-t.y0-4)),j.append("text").attr("class","treemapLabel").attr("x",t=>(t.x1-t.x0)/2).attr("y",t=>(t.y1-t.y0)/2).attr("style",t=>{const i=`text-anchor: middle; dominant-baseline: middle; font-size: ${de}px;fill:`+$(t.data.name)+";",f=B({cssCompiledStyles:t.data.cssCompiledStyles});return i+f.labelStyles.replace("color:","fill:")}).attr("clip-path",(t,i)=>`url(#clip-${a}-${i})`).text(t=>t.data.name).each(function(t){const i=Y(this),f=t.x1-t.x0,C=t.y1-t.y0,L=i.node(),T=f-2*Z,P=C-2*Z;if(TT&&m>D;)m--,i.style("font-size",`${m}px`);let F=Math.max(H,Math.min(X,Math.round(m*_))),k=m+J+F;for(;k>P&&m>D&&(m--,F=Math.max(H,Math.min(X,Math.round(m*_))),!(FT||m(i.x1-i.x0)/2).attr("y",function(i){return(i.y1-i.y0)/2}).attr("style",i=>{const f=`text-anchor: middle; dominant-baseline: hanging; font-size: ${X}px;fill:`+$(i.data.name)+";",C=B({cssCompiledStyles:i.data.cssCompiledStyles});return f+C.labelStyles.replace("color:","fill:")}).attr("clip-path",(i,f)=>`url(#clip-${a}-${f})`).text(i=>i.value?u(i.value):"").each(function(i){const f=Y(this),C=this.parentNode;if(!C){f.style("display","none");return}const L=Y(C).select(".treemapLabel");if(L.empty()||L.style("display")==="none"){f.style("display","none");return}const T=parseFloat(L.style("font-size")),m=Math.max(H,Math.min(X,Math.round(T*.6)));f.style("font-size",`${m}px`);const F=(i.y1-i.y0)/2+T/2+J;f.attr("y",F);const k=i.x1-i.x0,se=i.y1-i.y0-4,fe=k-2*Z;f.node().getComputedTextLength()>fe||F+m>se||m{const a=ge(),n=te(),l=Q(a,n.themeVariables),r=Q(ht,e),o=r.titleColor??l.titleColor,h=r.labelColor??l.textColor,d=r.valueColor??l.textColor;return` +import{p as me}from"./chunk-JWPE2WC7-DjA09kFS.js";import{_ as w,X as ge,A as te,D as Q,G as ye,d as Se,l as ee,bd as B,j as Y,b as ve,a as xe,p as be,q as we,g as Ce,s as Te,E as Le,be as $e,r as Ae}from"./mermaid.core-BLsmN-lt.js";import{s as Fe}from"./chunk-POPQ4Y6H-B7iG5qn5.js";import{p as Ne}from"./cynefin-OW5HDTMX-BygTY4j3.js";import{b as I}from"./defaultLocale-DX6XiGOO.js";import{o as K}from"./ordinal-Cboi1Yqb.js";import"./index-XmhyfFRf.js";import"./purify.es-5AjVNlXF.js";import"./init-Gi6I4Gst.js";function Me(e){var a=0,n=e.children,l=n&&n.length;if(!l)a=1;else for(;--l>=0;)a+=n[l].value;e.value=a}function _e(){return this.eachAfter(Me)}function ke(e,a){let n=-1;for(const l of this)e.call(a,l,++n,this);return this}function ze(e,a){for(var n=this,l=[n],r,o,h=-1;n=l.pop();)if(e.call(a,n,++h,this),r=n.children)for(o=r.length-1;o>=0;--o)l.push(r[o]);return this}function Ve(e,a){for(var n=this,l=[n],r=[],o,h,d,g=-1;n=l.pop();)if(r.push(n),o=n.children)for(h=0,d=o.length;h=0;)n+=l[r].value;a.value=n})}function Be(e){return this.eachBefore(function(a){a.children&&a.children.sort(e)})}function Ee(e){for(var a=this,n=Re(a,e),l=[a];a!==n;)a=a.parent,l.push(a);for(var r=l.length;e!==n;)l.splice(r,0,e),e=e.parent;return l}function Re(e,a){if(e===a)return e;var n=e.ancestors(),l=a.ancestors(),r=null;for(e=n.pop(),a=l.pop();e===a;)r=e,e=n.pop(),a=l.pop();return r}function We(){for(var e=this,a=[e];e=e.parent;)a.push(e);return a}function He(){return Array.from(this)}function Ie(){var e=[];return this.eachBefore(function(a){a.children||e.push(a)}),e}function Oe(){var e=this,a=[];return e.each(function(n){n!==e&&a.push({source:n.parent,target:n})}),a}function*Ge(){var e=this,a,n=[e],l,r,o;do for(a=n.reverse(),n=[];e=a.pop();)if(yield e,l=e.children)for(r=0,o=l.length;r=0;--d)r.push(o=h[d]=new U(h[d])),o.parent=l,o.depth=l.depth+1;return n.eachBefore(Ue)}function qe(){return ae(this).eachBefore(Ye)}function Xe(e){return e.children}function je(e){return Array.isArray(e)?e[1]:null}function Ye(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function Ue(e){var a=0;do e.height=a;while((e=e.parent)&&e.height<++a)}function U(e){this.data=e,this.depth=this.height=0,this.parent=null}U.prototype=ae.prototype={constructor:U,count:_e,each:ke,eachAfter:Ve,eachBefore:ze,find:De,sum:Pe,sort:Be,path:Ee,ancestors:We,descendants:He,leaves:Ie,links:Oe,copy:qe,[Symbol.iterator]:Ge};function Ze(e){if(typeof e!="function")throw new Error;return e}function O(){return 0}function G(e){return function(){return e}}function Je(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function Ke(e,a,n,l,r){for(var o=e.children,h,d=-1,g=o.length,c=e.value&&(l-a)/e.value;++dN&&(N=c),M=u*u*R,$=Math.max(N/M,M/y),$>V){u-=c;break}V=$}h.push(g={value:u,dice:x1?l:1)},n})(et);function nt(){var e=at,a=!1,n=1,l=1,r=[0],o=O,h=O,d=O,g=O,c=O;function p(s){return s.x0=s.y0=0,s.x1=n,s.y1=l,s.eachBefore(b),r=[0],a&&s.eachBefore(Je),s}function b(s){var x=r[s.depth],S=s.x0+x,v=s.y0+x,u=s.x1-x,y=s.y1-x;u{$e(r)&&(n?.textStyles?n.textStyles.push(r):n.textStyles=[r]),n?.styles?n.styles.push(r):n.styles=[r]}),this.classes.set(e,n)}getClasses(){return this.classes}getStylesForClass(e){return this.classes.get(e)?.styles??[]}clear(){Ae(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}};function oe(e){if(!e.length)return[];const a=[],n=[];return e.forEach(l=>{const r={name:l.name,children:l.type==="Leaf"?void 0:[]};for(r.classSelector=l?.classSelector,l?.cssCompiledStyles&&(r.cssCompiledStyles=l.cssCompiledStyles),l.type==="Leaf"&&l.value!==void 0&&(r.value=l.value);n.length>0&&n[n.length-1].level>=l.level;)n.pop();if(n.length===0)a.push(r);else{const o=n[n.length-1].node;o.children?o.children.push(r):o.children=[r]}l.type!=="Leaf"&&n.push({node:r,level:l.level})}),a}w(oe,"buildHierarchy");var lt=w((e,a)=>{me(e,a);const n=[];for(const o of e.TreemapRows??[])o.$type==="ClassDefStatement"&&a.addClass(o.className??"",o.styleText??"");for(const o of e.TreemapRows??[]){const h=o.item;if(!h)continue;const d=o.indent?parseInt(o.indent):0,g=rt(h),c=h.classSelector?a.getStylesForClass(h.classSelector):[],p=c.length>0?c:void 0,b={level:d,name:g,type:h.$type,value:h.value,classSelector:h.classSelector,cssCompiledStyles:p};n.push(b)}const l=oe(n),r=w((o,h)=>{for(const d of o)a.addNode(d,h),d.children&&d.children.length>0&&r(d.children,h+1)},"addNodesRecursively");r(l,0)},"populate"),rt=w(e=>e.name?String(e.name):"","getItemName"),ce={parser:{yy:void 0},parse:w(async e=>{try{const n=await Ne("treemap",e);ee.debug("Treemap AST:",n);const l=ce.parser?.yy;if(!(l instanceof ie))throw new Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");lt(n,l)}catch(a){throw ee.error("Error parsing treemap:",a),a}},"parse")},st=10,E=10,q=25,it=w((e,a,n,l)=>{const r=l.db,o=r.getConfig(),h=o.padding??st,d=r.getDiagramTitle(),g=r.getRoot(),{themeVariables:c}=te();if(!g)return;const p=d?30:0,b=ye(a),s=o.nodeWidth?o.nodeWidth*E:960,x=o.nodeHeight?o.nodeHeight*E:500,S=s,v=x+p;b.attr("viewBox",`0 0 ${S} ${v}`),Se(b,v,S,o.useMaxWidth);let u;try{const t=o.valueFormat||",";if(t==="$0,0")u=w(i=>"$"+I(",")(i),"valueFormat");else if(t.startsWith("$")&&t.includes(",")){const i=/\.\d+/.exec(t),f=i?i[0]:"";u=w(C=>"$"+I(","+f)(C),"valueFormat")}else if(t.startsWith("$")){const i=t.substring(1);u=w(f=>"$"+I(i||"")(f),"valueFormat")}else u=I(t)}catch(t){ee.error("Error creating format function:",t),u=I(",")}const y=K().range(["transparent",c.cScale0,c.cScale1,c.cScale2,c.cScale3,c.cScale4,c.cScale5,c.cScale6,c.cScale7,c.cScale8,c.cScale9,c.cScale10,c.cScale11]),N=K().range(["transparent",c.cScalePeer0,c.cScalePeer1,c.cScalePeer2,c.cScalePeer3,c.cScalePeer4,c.cScalePeer5,c.cScalePeer6,c.cScalePeer7,c.cScalePeer8,c.cScalePeer9,c.cScalePeer10,c.cScalePeer11]),$=K().range([c.cScaleLabel0,c.cScaleLabel1,c.cScaleLabel2,c.cScaleLabel3,c.cScaleLabel4,c.cScaleLabel5,c.cScaleLabel6,c.cScaleLabel7,c.cScaleLabel8,c.cScaleLabel9,c.cScaleLabel10,c.cScaleLabel11]);d&&b.append("text").attr("x",S/2).attr("y",p/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(d);const V=b.append("g").attr("transform",`translate(0, ${p})`).attr("class","treemapContainer"),R=ae(g).sum(t=>t.value??0).sort((t,i)=>(i.value??0)-(t.value??0)),ne=nt().size([s,x]).paddingTop(t=>t.children&&t.children.length>0?q+E:0).paddingInner(h).paddingLeft(t=>t.children&&t.children.length>0?E:0).paddingRight(t=>t.children&&t.children.length>0?E:0).paddingBottom(t=>t.children&&t.children.length>0?E:0).round(!0)(R),he=ne.descendants().filter(t=>t.children&&t.children.length>0),W=V.selectAll(".treemapSection").data(he).enter().append("g").attr("class","treemapSection").attr("transform",t=>`translate(${t.x0},${t.y0})`);W.append("rect").attr("width",t=>t.x1-t.x0).attr("height",q).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",t=>t.depth===0?"display: none;":""),W.append("clipPath").attr("id",(t,i)=>`clip-section-${a}-${i}`).append("rect").attr("width",t=>Math.max(0,t.x1-t.x0-12)).attr("height",q),W.append("rect").attr("width",t=>t.x1-t.x0).attr("height",t=>t.y1-t.y0).attr("class",(t,i)=>`treemapSection section${i}`).attr("fill",t=>y(t.data.name)).attr("fill-opacity",.6).attr("stroke",t=>N(t.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",t=>{if(t.depth===0)return"display: none;";const i=B({cssCompiledStyles:t.data.cssCompiledStyles});return i.nodeStyles+";"+i.borderStyles.join(";")}),W.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",q/2).attr("dominant-baseline","middle").text(t=>t.depth===0?"":t.data.name).attr("font-weight","bold").attr("clip-path",(t,i)=>`url(#clip-section-${a}-${i})`).attr("style",t=>{if(t.depth===0)return"display: none;";const i="dominant-baseline: middle; font-size: 12px; fill:"+$(t.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",f=B({cssCompiledStyles:t.data.cssCompiledStyles});return i+f.labelStyles.replace("color:","fill:")}).each(function(t){if(t.depth===0)return;const i=Y(this),f=t.data.name;i.text(f);const C=t.x1-t.x0,L=6;let T;o.showValues!==!1&&t.value?T=C-10-30-10-L:T=C-L-6;const m=Math.max(15,T),_=i.node();if(_.getComputedTextLength()>m){let z=f;for(;z.length>0;){if(z=f.substring(0,z.length-1),z.length===0){i.text("..."),_.getComputedTextLength()>m&&i.text("");break}if(i.text(z+"..."),_.getComputedTextLength()<=m)break}}}),o.showValues!==!1&&W.append("text").attr("class","treemapSectionValue").attr("x",t=>t.x1-t.x0-10).attr("y",q/2).attr("text-anchor","end").attr("dominant-baseline","middle").text(t=>t.value?u(t.value):"").attr("font-style","italic").attr("style",t=>{if(t.depth===0)return"display: none;";const i="text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+$(t.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",f=B({cssCompiledStyles:t.data.cssCompiledStyles});return i+f.labelStyles.replace("color:","fill:")});const le=ne.leaves(),A=le.length>20,de=A?16:38,X=A?14:28,D=A?4:8,H=A?4:6,Z=A?2:4,re=A?8:10,J=A?1:2,j=V.selectAll(".treemapLeafGroup").data(le).enter().append("g").attr("class",(t,i)=>`treemapNode treemapLeafGroup leaf${i}${t.data.classSelector?` ${t.data.classSelector}`:""}x`).attr("transform",t=>`translate(${t.x0},${t.y0})`);j.append("rect").attr("width",t=>t.x1-t.x0).attr("height",t=>t.y1-t.y0).attr("class","treemapLeaf").attr("fill",t=>t.parent?y(t.parent.data.name):y(t.data.name)).attr("style",t=>B({cssCompiledStyles:t.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",t=>t.parent?y(t.parent.data.name):y(t.data.name)).attr("stroke-width",3),j.append("clipPath").attr("id",(t,i)=>`clip-${a}-${i}`).append("rect").attr("width",t=>Math.max(0,t.x1-t.x0-4)).attr("height",t=>Math.max(0,t.y1-t.y0-4)),j.append("text").attr("class","treemapLabel").attr("x",t=>(t.x1-t.x0)/2).attr("y",t=>(t.y1-t.y0)/2).attr("style",t=>{const i=`text-anchor: middle; dominant-baseline: middle; font-size: ${de}px;fill:`+$(t.data.name)+";",f=B({cssCompiledStyles:t.data.cssCompiledStyles});return i+f.labelStyles.replace("color:","fill:")}).attr("clip-path",(t,i)=>`url(#clip-${a}-${i})`).text(t=>t.data.name).each(function(t){const i=Y(this),f=t.x1-t.x0,C=t.y1-t.y0,L=i.node(),T=f-2*Z,P=C-2*Z;if(TT&&m>D;)m--,i.style("font-size",`${m}px`);let F=Math.max(H,Math.min(X,Math.round(m*_))),k=m+J+F;for(;k>P&&m>D&&(m--,F=Math.max(H,Math.min(X,Math.round(m*_))),!(FT||m(i.x1-i.x0)/2).attr("y",function(i){return(i.y1-i.y0)/2}).attr("style",i=>{const f=`text-anchor: middle; dominant-baseline: hanging; font-size: ${X}px;fill:`+$(i.data.name)+";",C=B({cssCompiledStyles:i.data.cssCompiledStyles});return f+C.labelStyles.replace("color:","fill:")}).attr("clip-path",(i,f)=>`url(#clip-${a}-${f})`).text(i=>i.value?u(i.value):"").each(function(i){const f=Y(this),C=this.parentNode;if(!C){f.style("display","none");return}const L=Y(C).select(".treemapLabel");if(L.empty()||L.style("display")==="none"){f.style("display","none");return}const T=parseFloat(L.style("font-size")),m=Math.max(H,Math.min(X,Math.round(T*.6)));f.style("font-size",`${m}px`);const F=(i.y1-i.y0)/2+T/2+J;f.attr("y",F);const k=i.x1-i.x0,se=i.y1-i.y0-4,fe=k-2*Z;f.node().getComputedTextLength()>fe||F+m>se||m{const a=ge(),n=te(),l=Q(a,n.themeVariables),r=Q(ht,e),o=r.titleColor??l.titleColor,h=r.labelColor??l.textColor,d=r.valueColor??l.textColor;return` .treemapNode.section { stroke: ${r.sectionStrokeColor}; stroke-width: ${r.sectionStrokeWidth}; diff --git a/apps/pythinker-code/dist-web/assets/diagram-Z3DM3KII-DwH3hi_j.js b/apps/pythinker-code/dist-web/assets/diagram-Z3DM3KII-BU9sCzbb.js similarity index 95% rename from apps/pythinker-code/dist-web/assets/diagram-Z3DM3KII-DwH3hi_j.js rename to apps/pythinker-code/dist-web/assets/diagram-Z3DM3KII-BU9sCzbb.js index a0af4b99f..dea367c9f 100644 --- a/apps/pythinker-code/dist-web/assets/diagram-Z3DM3KII-DwH3hi_j.js +++ b/apps/pythinker-code/dist-web/assets/diagram-Z3DM3KII-BU9sCzbb.js @@ -1,4 +1,4 @@ -import{p as $}from"./chunk-JWPE2WC7-DsFB3Fti.js";import{_ as b,D as u,G as B,d as C,l as m,b as S,a as D,p as T,q as E,g as P,s as z,A,E as F,r as W}from"./mermaid.core-D6Xg32pF.js";import{p as _}from"./cynefin-OW5HDTMX-Byg0NdnJ.js";import"./index-D9Nz1t7z.js";import"./purify.es-5AjVNlXF.js";var N=F.packet,w=class{constructor(){this.packet=[],this.setAccTitle=S,this.getAccTitle=D,this.setDiagramTitle=T,this.getDiagramTitle=E,this.getAccDescription=P,this.setAccDescription=z}static{b(this,"PacketDB")}getConfig(){const t=u({...N,...A().packet});return t.showBits&&(t.paddingY+=10),t}getPacket(){return this.packet}pushWord(t){t.length>0&&this.packet.push(t)}clear(){W(),this.packet=[]}},L=1e4,M=b((t,e)=>{$(t,e);let r=-1,s=[],n=1;const{bitsPerRow:l}=e.getConfig();for(let{start:a,end:i,bits:d,label:c}of t.blocks){if(a!==void 0&&i!==void 0&&i{if(t.start===void 0)throw new Error("start should have been set during first phase");if(t.end===void 0)throw new Error("end should have been set during first phase");if(t.start>t.end)throw new Error(`Block start ${t.start} is greater than block end ${t.end}.`);if(t.end+1<=e*r)return[t,void 0];const s=e*r-1,n=e*r;return[{start:t.start,end:s,label:t.label,bits:s-t.start},{start:n,end:t.end,label:t.label,bits:t.end-n}]},"getNextFittingBlock"),v={parser:{yy:void 0},parse:b(async t=>{const e=await _("packet",t),r=v.parser?.yy;if(!(r instanceof w))throw new Error("parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");m.debug(e),M(e,r)},"parse")},G=b((t,e,r,s)=>{const n=s.db,l=n.getConfig(),{rowHeight:a,paddingY:i,bitWidth:d,bitsPerRow:c}=l,p=n.getPacket(),o=n.getDiagramTitle(),h=a+i,g=h*(p.length+1)-(o?0:a),k=d*c+2,f=B(e);f.attr("viewBox",`0 0 ${k} ${g}`),C(f,g,k,l.useMaxWidth);for(const[x,y]of p.entries())I(f,y,x,l);f.append("text").text(o).attr("x",k/2).attr("y",g-h/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),I=b((t,e,r,{rowHeight:s,paddingX:n,paddingY:l,bitWidth:a,bitsPerRow:i,showBits:d})=>{const c=t.append("g"),p=r*(s+l)+l;for(const o of e){const h=o.start%i*a+1,g=(o.end-o.start+1)*a-n;if(c.append("rect").attr("x",h).attr("y",p).attr("width",g).attr("height",s).attr("class","packetBlock"),c.append("text").attr("x",h+g/2).attr("y",p+s/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(o.label),!d)continue;const k=o.end===o.start,f=p-2;c.append("text").attr("x",h+(k?g/2:0)).attr("y",f).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",k?"middle":"start").text(o.start),k||c.append("text").attr("x",h+g).attr("y",f).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(o.end)}},"drawWord"),O={draw:G},j={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},q=b(({packet:t}={})=>{const e=u(j,t);return` +import{p as $}from"./chunk-JWPE2WC7-DjA09kFS.js";import{_ as b,D as u,G as B,d as C,l as m,b as S,a as D,p as T,q as E,g as P,s as z,A,E as F,r as W}from"./mermaid.core-BLsmN-lt.js";import{p as _}from"./cynefin-OW5HDTMX-BygTY4j3.js";import"./index-XmhyfFRf.js";import"./purify.es-5AjVNlXF.js";var N=F.packet,w=class{constructor(){this.packet=[],this.setAccTitle=S,this.getAccTitle=D,this.setDiagramTitle=T,this.getDiagramTitle=E,this.getAccDescription=P,this.setAccDescription=z}static{b(this,"PacketDB")}getConfig(){const t=u({...N,...A().packet});return t.showBits&&(t.paddingY+=10),t}getPacket(){return this.packet}pushWord(t){t.length>0&&this.packet.push(t)}clear(){W(),this.packet=[]}},L=1e4,M=b((t,e)=>{$(t,e);let r=-1,s=[],n=1;const{bitsPerRow:l}=e.getConfig();for(let{start:a,end:i,bits:d,label:c}of t.blocks){if(a!==void 0&&i!==void 0&&i{if(t.start===void 0)throw new Error("start should have been set during first phase");if(t.end===void 0)throw new Error("end should have been set during first phase");if(t.start>t.end)throw new Error(`Block start ${t.start} is greater than block end ${t.end}.`);if(t.end+1<=e*r)return[t,void 0];const s=e*r-1,n=e*r;return[{start:t.start,end:s,label:t.label,bits:s-t.start},{start:n,end:t.end,label:t.label,bits:t.end-n}]},"getNextFittingBlock"),v={parser:{yy:void 0},parse:b(async t=>{const e=await _("packet",t),r=v.parser?.yy;if(!(r instanceof w))throw new Error("parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");m.debug(e),M(e,r)},"parse")},G=b((t,e,r,s)=>{const n=s.db,l=n.getConfig(),{rowHeight:a,paddingY:i,bitWidth:d,bitsPerRow:c}=l,p=n.getPacket(),o=n.getDiagramTitle(),h=a+i,g=h*(p.length+1)-(o?0:a),k=d*c+2,f=B(e);f.attr("viewBox",`0 0 ${k} ${g}`),C(f,g,k,l.useMaxWidth);for(const[x,y]of p.entries())I(f,y,x,l);f.append("text").text(o).attr("x",k/2).attr("y",g-h/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),I=b((t,e,r,{rowHeight:s,paddingX:n,paddingY:l,bitWidth:a,bitsPerRow:i,showBits:d})=>{const c=t.append("g"),p=r*(s+l)+l;for(const o of e){const h=o.start%i*a+1,g=(o.end-o.start+1)*a-n;if(c.append("rect").attr("x",h).attr("y",p).attr("width",g).attr("height",s).attr("class","packetBlock"),c.append("text").attr("x",h+g/2).attr("y",p+s/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(o.label),!d)continue;const k=o.end===o.start,f=p-2;c.append("text").attr("x",h+(k?g/2:0)).attr("y",f).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",k?"middle":"start").text(o.start),k||c.append("text").attr("x",h+g).attr("y",f).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(o.end)}},"drawWord"),O={draw:G},j={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},q=b(({packet:t}={})=>{const e=u(j,t);return` .packetByte { font-size: ${e.byteFontSize}; } diff --git a/apps/pythinker-code/dist-web/assets/ebnfDiagram-PWID7BFC-fqbVOO6I.js b/apps/pythinker-code/dist-web/assets/ebnfDiagram-PWID7BFC-DmCUeX09.js similarity index 87% rename from apps/pythinker-code/dist-web/assets/ebnfDiagram-PWID7BFC-fqbVOO6I.js rename to apps/pythinker-code/dist-web/assets/ebnfDiagram-PWID7BFC-DmCUeX09.js index a8bec386c..00e60c055 100644 --- a/apps/pythinker-code/dist-web/assets/ebnfDiagram-PWID7BFC-fqbVOO6I.js +++ b/apps/pythinker-code/dist-web/assets/ebnfDiagram-PWID7BFC-DmCUeX09.js @@ -1 +1 @@ -import{g as l,r as m,d as n}from"./chunk-SVP7TREG-D_60I4PC.js";import{p}from"./chunk-JWPE2WC7-DsFB3Fti.js";import{_ as t,l as o}from"./mermaid.core-D6Xg32pF.js";import{M as u,a as f}from"./cynefin-OW5HDTMX-Byg0NdnJ.js";import"./index-D9Nz1t7z.js";import"./purify.es-5AjVNlXF.js";var c=f().RailroadEbnf.parser.LangiumParser,s=t(e=>{const r=e.alternatives.map(E);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformChoice"),E=t(e=>{const r=e.elements.map(d);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformSequence"),i=t(e=>{switch(e.$type){case"EbnfTerminal":return{type:"terminal",value:e.value};case"EbnfNonTerminal":return{type:"nonterminal",name:e.name};case"EbnfSpecial":return{type:"special",text:e.text};case"EbnfGroup":return s(e.element);case"EbnfOptional":return{type:"optional",element:s(e.element)};case"EbnfRepetition":return{type:"repetition",element:s(e.element),min:0,max:1/0};default:throw new Error(`Unsupported EBNF primary node: ${e.$type}`)}},"transformPrimary"),b=t((e,r)=>{switch(r.$type){case"EbnfOptionalPostfix":return{type:"optional",element:e};case"EbnfZeroOrMorePostfix":return{type:"repetition",element:e,min:0,max:1/0};case"EbnfOneOrMorePostfix":return{type:"repetition",element:e,min:1,max:1/0};case"EbnfExceptionPostfix":return{type:"sequence",elements:[e,{type:"terminal",value:"-"},i(r.except)]};default:throw new Error(`Unsupported EBNF postfix node: ${r.$type}`)}},"transformPostfix"),d=t(e=>e.postfixes.reduce((r,a)=>b(r,a),i(e.base)),"transformTerm"),y=t(e=>({name:e.name,definition:s(e.definition)}),"transformRule"),v=t(e=>{p(e,n),e.title&&n.setTitle(e.title),e.rules.map(r=>n.addRule(y(r)))},"populateDb"),g={parse:t(e=>{n.clear(),o.debug("[EBNF Parser] Starting Langium parse");const r=c.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new u(r);const a=r.value;o.debug("[EBNF Parser] Parsed rules:",a.rules.length),v(a),o.debug("[EBNF Parser] Parse complete")},"parse"),parser:{yy:n}},S={parser:g,db:n,renderer:m,styles:l};export{S as diagram}; +import{g as l,r as m,d as n}from"./chunk-SVP7TREG-B4Y-lvg8.js";import{p}from"./chunk-JWPE2WC7-DjA09kFS.js";import{_ as t,l as o}from"./mermaid.core-BLsmN-lt.js";import{M as u,a as f}from"./cynefin-OW5HDTMX-BygTY4j3.js";import"./index-XmhyfFRf.js";import"./purify.es-5AjVNlXF.js";var c=f().RailroadEbnf.parser.LangiumParser,s=t(e=>{const r=e.alternatives.map(E);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformChoice"),E=t(e=>{const r=e.elements.map(d);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformSequence"),i=t(e=>{switch(e.$type){case"EbnfTerminal":return{type:"terminal",value:e.value};case"EbnfNonTerminal":return{type:"nonterminal",name:e.name};case"EbnfSpecial":return{type:"special",text:e.text};case"EbnfGroup":return s(e.element);case"EbnfOptional":return{type:"optional",element:s(e.element)};case"EbnfRepetition":return{type:"repetition",element:s(e.element),min:0,max:1/0};default:throw new Error(`Unsupported EBNF primary node: ${e.$type}`)}},"transformPrimary"),b=t((e,r)=>{switch(r.$type){case"EbnfOptionalPostfix":return{type:"optional",element:e};case"EbnfZeroOrMorePostfix":return{type:"repetition",element:e,min:0,max:1/0};case"EbnfOneOrMorePostfix":return{type:"repetition",element:e,min:1,max:1/0};case"EbnfExceptionPostfix":return{type:"sequence",elements:[e,{type:"terminal",value:"-"},i(r.except)]};default:throw new Error(`Unsupported EBNF postfix node: ${r.$type}`)}},"transformPostfix"),d=t(e=>e.postfixes.reduce((r,a)=>b(r,a),i(e.base)),"transformTerm"),y=t(e=>({name:e.name,definition:s(e.definition)}),"transformRule"),v=t(e=>{p(e,n),e.title&&n.setTitle(e.title),e.rules.map(r=>n.addRule(y(r)))},"populateDb"),g={parse:t(e=>{n.clear(),o.debug("[EBNF Parser] Starting Langium parse");const r=c.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new u(r);const a=r.value;o.debug("[EBNF Parser] Parsed rules:",a.rules.length),v(a),o.debug("[EBNF Parser] Parse complete")},"parse"),parser:{yy:n}},S={parser:g,db:n,renderer:m,styles:l};export{S as diagram}; diff --git a/apps/pythinker-code/dist-web/assets/editor.main-CUgPnB4r.js b/apps/pythinker-code/dist-web/assets/editor.main-CSd5xoJU.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/editor.main-CUgPnB4r.js rename to apps/pythinker-code/dist-web/assets/editor.main-CSd5xoJU.js index 92c7e1674..24f0a7e31 100644 --- a/apps/pythinker-code/dist-web/assets/editor.main-CUgPnB4r.js +++ b/apps/pythinker-code/dist-web/assets/editor.main-CSd5xoJU.js @@ -1,5 +1,5 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/cssMode-gWA3VTCg.js","assets/lspLanguageFeatures-BxKarwGx.js","assets/index-D9Nz1t7z.js","assets/index-CZhX7oJU.css","assets/purify.es-5AjVNlXF.js","assets/htmlMode-CNwKQEFk.js","assets/jsonMode-DBSMQpjf.js","assets/tsMode-DVpap0Ub.js","assets/freemarker2-BLqTDIvk.js","assets/handlebars-Dt6_fHq4.js","assets/html-DNZRtspS.js","assets/javascript-BsIpPAMU.js","assets/typescript-Cev6QPda.js","assets/liquid-PbV9SRs8.js","assets/mdx-6vkE1AZK.js","assets/python-OQiB2MoN.js","assets/razor-C5WSpCq4.js","assets/xml-CSRj6A38.js","assets/yaml-dB1gSO3c.js"])))=>i.map(i=>d[i]); -import{bR as we}from"./index-D9Nz1t7z.js";import{p as Gf}from"./purify.es-5AjVNlXF.js";function pV(){return globalThis._VSCODE_NLS_MESSAGES}function AA(){return globalThis._VSCODE_NLS_LANGUAGE}const TX=AA()==="pseudo"||typeof document<"u"&&document.location&&typeof document.location.hash=="string"&&document.location.hash.indexOf("pseudo=true")>=0;function g0(o,e){let t;return e.length===0?t=o:t=o.replace(/\{(\d+)\}/g,(i,n)=>{const s=n[0],r=e[s];let a=i;return typeof r=="string"?a=r:(typeof r=="number"||typeof r=="boolean"||r===void 0||r===null)&&(a=String(r)),a}),TX&&(t="["+t.replace(/[aouei]/g,"$&$&")+"]"),t}function m(o,e,...t){return g0(typeof o=="number"?mV(o,e):e,t)}function mV(o,e){const t=pV()?.[o];if(typeof t!="string"){if(typeof e=="string")return e;throw new Error(`!!! NLS MISSING: ${o} !!!`)}return t}function H(o,e,...t){let i;typeof o=="number"?i=mV(o,e):i=e;const n=g0(i,t);return{value:n,original:e===i?n:g0(e,t)}}function RX(o,e){const t=o;typeof t.vscodeWindowId!="number"&&Object.defineProperty(t,"vscodeWindowId",{get:()=>e})}const wt=window;class OA{constructor(){this.mapWindowIdToZoomFactor=new Map}static{this.INSTANCE=new OA}getZoomFactor(e){return this.mapWindowIdToZoomFactor.get(this.getWindowId(e))??1}getWindowId(e){return e.vscodeWindowId}}function _V(o,e,t){typeof e=="string"&&(e=o.matchMedia(e)),e.addEventListener("change",t)}function PE(o){return OA.INSTANCE.getZoomFactor(o)}const Xm=navigator.userAgent,Ks=Xm.indexOf("Firefox")>=0,rL=Xm.indexOf("AppleWebKit")>=0,sw=Xm.indexOf("Chrome")>=0,vg=!sw&&Xm.indexOf("Safari")>=0,bV=!sw&&!vg&&rL;Xm.indexOf("Electron/")>=0;const L3=Xm.indexOf("Android")>=0;let _D=!1;if(typeof wt.matchMedia=="function"){const o=wt.matchMedia("(display-mode: standalone) or (display-mode: window-controls-overlay)"),e=wt.matchMedia("(display-mode: fullscreen)");_D=o.matches,_V(wt,o,({matches:t})=>{_D&&e.matches||(_D=t)})}function FA(){return globalThis.MonacoEnvironment}class MX{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?dm.isErrorNoTelemetry(e)?new dm(e.message+` +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/cssMode-43LALI1D.js","assets/lspLanguageFeatures-DIQkkUvS.js","assets/index-XmhyfFRf.js","assets/index-CZhX7oJU.css","assets/purify.es-5AjVNlXF.js","assets/htmlMode-CKzw1Cpu.js","assets/jsonMode-rJNh1ua1.js","assets/tsMode-lkHgywyY.js","assets/freemarker2-B2ItDy_k.js","assets/handlebars-F3r5eIuq.js","assets/html-Blg47oPG.js","assets/javascript-0aB6uObk.js","assets/typescript-CXVXTJLh.js","assets/liquid-DfF3yH_T.js","assets/mdx-Bm2432IE.js","assets/python-CXTzAVtR.js","assets/razor-BhweegTo.js","assets/xml-BI24_P4u.js","assets/yaml-CM5JPzfY.js"])))=>i.map(i=>d[i]); +import{bR as we}from"./index-XmhyfFRf.js";import{p as Gf}from"./purify.es-5AjVNlXF.js";function pV(){return globalThis._VSCODE_NLS_MESSAGES}function AA(){return globalThis._VSCODE_NLS_LANGUAGE}const TX=AA()==="pseudo"||typeof document<"u"&&document.location&&typeof document.location.hash=="string"&&document.location.hash.indexOf("pseudo=true")>=0;function g0(o,e){let t;return e.length===0?t=o:t=o.replace(/\{(\d+)\}/g,(i,n)=>{const s=n[0],r=e[s];let a=i;return typeof r=="string"?a=r:(typeof r=="number"||typeof r=="boolean"||r===void 0||r===null)&&(a=String(r)),a}),TX&&(t="["+t.replace(/[aouei]/g,"$&$&")+"]"),t}function m(o,e,...t){return g0(typeof o=="number"?mV(o,e):e,t)}function mV(o,e){const t=pV()?.[o];if(typeof t!="string"){if(typeof e=="string")return e;throw new Error(`!!! NLS MISSING: ${o} !!!`)}return t}function H(o,e,...t){let i;typeof o=="number"?i=mV(o,e):i=e;const n=g0(i,t);return{value:n,original:e===i?n:g0(e,t)}}function RX(o,e){const t=o;typeof t.vscodeWindowId!="number"&&Object.defineProperty(t,"vscodeWindowId",{get:()=>e})}const wt=window;class OA{constructor(){this.mapWindowIdToZoomFactor=new Map}static{this.INSTANCE=new OA}getZoomFactor(e){return this.mapWindowIdToZoomFactor.get(this.getWindowId(e))??1}getWindowId(e){return e.vscodeWindowId}}function _V(o,e,t){typeof e=="string"&&(e=o.matchMedia(e)),e.addEventListener("change",t)}function PE(o){return OA.INSTANCE.getZoomFactor(o)}const Xm=navigator.userAgent,Ks=Xm.indexOf("Firefox")>=0,rL=Xm.indexOf("AppleWebKit")>=0,sw=Xm.indexOf("Chrome")>=0,vg=!sw&&Xm.indexOf("Safari")>=0,bV=!sw&&!vg&&rL;Xm.indexOf("Electron/")>=0;const L3=Xm.indexOf("Android")>=0;let _D=!1;if(typeof wt.matchMedia=="function"){const o=wt.matchMedia("(display-mode: standalone) or (display-mode: window-controls-overlay)"),e=wt.matchMedia("(display-mode: fullscreen)");_D=o.matches,_V(wt,o,({matches:t})=>{_D&&e.matches||(_D=t)})}function FA(){return globalThis.MonacoEnvironment}class MX{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?dm.isErrorNoTelemetry(e)?new dm(e.message+` `+e.stack):new Error(e.message+` @@ -900,7 +900,7 @@ ${e.toString()}`}}class Xx{constructor(e=new f_,t=!1,i,n=dMe){this._services=e,t `:`\r `}};mA=ql([Ti(0,Pe)],mA);class SMe{publicLog2(){}}class eL{static{this.SCHEME="inmemory"}constructor(){const e=_e.from({scheme:eL.SCHEME,authority:"model",path:"/"});this.workspace={id:Sq,folders:[new F_e({uri:e,name:"",index:0})]}}getWorkspace(){return this.workspace}getWorkspaceFolder(e){return e&&e.scheme===eL.SCHEME?this.workspace.folders[0]:null}}function tL(o,e,t){if(!e||!(o instanceof Jx))return;const i=[];Object.keys(e).forEach(n=>{tbe(n)&&i.push([`editor.${n}`,e[n]]),t&&ibe(n)&&i.push([`diffEditor.${n}`,e[n]])}),i.length>0&&o.updateValues(i)}let _A=class{constructor(e){this._modelService=e}hasPreviewHandler(){return!1}async apply(e,t){const i=Array.isArray(e)?e:aF.convert(e),n=new Map;for(const a of i){if(!(a instanceof fh))throw new Error("bad edit - only text edits are supported");const l=this._modelService.getModel(a.resource);if(!l)throw new Error("bad edit - model not found");if(typeof a.versionId=="number"&&l.getVersionId()!==a.versionId)throw new Error("bad state - model changed in the meantime");let c=n.get(l);c||(c=[],n.set(l,c)),c.push(gi.replaceMove(L.lift(a.textEdit.range),a.textEdit.text))}let s=0,r=0;for(const[a,l]of n)a.pushStackElement(),a.pushEditOperations([],l,()=>[]),a.pushStackElement(),r+=1,s+=l.length;return{ariaSummary:Lg(k2.bulkEditServiceSummary,s,r),isApplied:s>0}}};_A=ql([Ti(0,ei)],_A);class yMe{getUriLabel(e,t){return e.scheme==="file"?e.fsPath:e.path}getUriBasenameLabel(e){return Lr(e)}}let bA=class extends BTe{constructor(e,t){super(e),this._codeEditorService=t}showContextView(e,t,i){if(!t){const n=this._codeEditorService.getFocusedCodeEditor()||this._codeEditorService.getActiveCodeEditor();n&&(t=n.getContainerDomNode())}return super.showContextView(e,t,i)}};bA=ql([Ti(0,Ul),Ti(1,et)],bA);class xMe{constructor(){this._neverEmitter=new P,this.onDidChangeTrust=this._neverEmitter.event}isWorkspaceTrusted(){return!0}}class LMe extends $x{constructor(){super()}}class kMe extends pMe{constructor(){super(new Yee)}}let CA=class extends UP{constructor(e,t,i,n,s,r){super(e,t,i,n,s,r),this.configure({blockMouse:!1})}};CA=ql([Ti(0,ts),Ti(1,bi),Ti(2,ud),Ti(3,st),Ti(4,Er),Ti(5,Ie)],CA);const DMe={esmModuleLocation:void 0,label:"editorWorkerService"};let vA=class extends TP{constructor(e,t,i,n,s){super(DMe,e,t,i,n,s)}};vA=ql([Ti(0,ei),Ti(1,Xk),Ti(2,Mt),Ti(3,ti),Ti(4,he)],vA);class IMe{async playSignal(e,t){}}$e(Mt,kMe,0);$e(Pe,Jx,0);$e(Xk,pA,0);$e(SZ,mA,0);$e(sd,eL,0);$e(Zg,yMe,0);$e(ts,SMe,0);$e(Xw,vMe,0);$e(bF,CMe,0);$e(bi,Qx,0);$e($l,Fu,0);$e(_i,LMe,0);$e(er,NNe,0);$e(ei,ZP,0);$e(MO,GP,0);$e(Ie,uA,0);$e(ej,bMe,0);$e(id,p3,0);$e(ps,vme,0);$e(eo,vA,0);$e(Ow,_A,0);$e(PZ,xMe,0);$e(fs,gA,0);$e(kn,cA,0);$e(Mr,Iwe,0);$e(Pt,fA,0);$e(st,Ym,0);$e(Jn,lA,0);$e(ud,bA,0);$e(gd,KP,0);$e(Co,hA,0);$e(Jo,CA,0);$e(Er,AT,0);$e(dd,IMe,0);$e(S4,mMe,0);$e(Iz,ete,0);$e(g5,$0e,0);var Ne;(function(o){const e=new f_;for(const[l,c]of _7())e.set(l,c);const t=new Xx(e,!0);e.set(fe,t);function i(l){n||r({});const c=e.get(l);if(!c)throw new Error("Missing service "+l);return c instanceof hl?t.invokeFunction(d=>d.get(l)):c}o.get=i;let n=!1;const s=new P;function r(l){if(n)return t;n=!0;for(const[d,h]of _7())e.get(d)||e.set(d,h);for(const d in l)if(l.hasOwnProperty(d)){const h=We(d);e.get(h)instanceof hl&&e.set(h,l[d])}const c=Fbe();for(const d of c)try{t.createInstance(d)}catch(h){Ee(h)}return s.fire(),t}o.initialize=r;function a(l){if(n)return l();const c=new z,d=c.add(s.event(()=>{d.dispose(),c.add(l())}));return c}o.withServices=a})(Ne||(Ne={}));var EMe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},j6=function(o,e){return function(t,i){e(t,i,o)}},d0;let wA=class{static{d0=this}static{this._ttpTokenizer=Vl("tokenizeToString",{createHTML(e){return e}})}constructor(e,t){this._configurationService=e,this._languageService=t}async renderCodeBlock(e,t,i){const n=Ha(i.context)?i.context:void 0;let s;e?s=this._languageService.getLanguageIdByLanguageName(e):n&&(s=n.getModel()?.getLanguageId()),s||(s=qo);const r=await nue(this._languageService,t,s),a=d0._ttpTokenizer?d0._ttpTokenizer.createHTML(r)??r:r,l=document.createElement("span");l.innerHTML=a;const c=l.querySelector(".monaco-tokenized-source");return mi(c)?(gn(c,this.getFontInfo(n)),l):document.createElement("span")}getFontInfo(e){return e?e.getOption(59):Mne({fontFamily:this._configurationService.getValue("editor").fontFamily},1)}};wA=d0=EMe([j6(0,Pe),j6(1,_i)],wA);var m3=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},It=function(o,e){return function(t,i){e(t,i,o)}};let NMe=0,q6=!1;function TMe(o){if(!o){if(q6)return;q6=!0}pee(o||wt.document.body)}let iL=class extends Pg{constructor(e,t,i,n,s,r,a,l,c,d,h,u,g,f){const p={...t};p.ariaLabel=p.ariaLabel||x2.editorViewAccessibleLabel,super(e,p,{},i,n,s,r,c,d,h,u,g),l instanceof Ym?this._standaloneKeybindingService=l:this._standaloneKeybindingService=null,TMe(p.ariaContainerElement),Uue((_,b)=>i.createInstance(Tm,_,{instantHover:b},{})),Rfe(a),f.setDefaultCodeBlockRenderer(i.createInstance(wA))}addCommand(e,t,i){if(!this._standaloneKeybindingService)return console.warn("Cannot add command because the editor is configured with an unrecognized KeybindingService"),null;const n="DYNAMIC_"+ ++NMe,s=q.deserialize(i);return this._standaloneKeybindingService.addDynamicKeybinding(n,e,t,s),n}createContextKey(e,t){return this._contextKeyService.createKey(e,t)}addAction(e){if(typeof e.id!="string"||typeof e.label!="string"||typeof e.run!="function")throw new Error("Invalid action descriptor, `id`, `label` and `run` are required properties!");if(!this._standaloneKeybindingService)return console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService"),A.None;const t=e.id,i=e.label,n=q.and(q.equals("editorId",this.getId()),q.deserialize(e.precondition)),s=e.keybindings,r=q.and(n,q.deserialize(e.keybindingContext)),a=e.contextMenuGroupId||null,l=e.contextMenuOrder||0,c=(g,...f)=>Promise.resolve(e.run(this,...f)),d=new z,h=this.getId()+":"+t;if(d.add(Ye.registerCommand(h,c)),a){const g={command:{id:h,title:i},when:n,group:a,order:l};d.add(un.appendMenuItem(M.EditorContext,g))}if(Array.isArray(s))for(const g of s)d.add(this._standaloneKeybindingService.addDynamicKeybinding(h,g,c,r));const u=new x$(h,i,i,void 0,n,(...g)=>Promise.resolve(e.run(this,...g)),this._contextKeyService);return this._actions.set(t,u),d.add(ue(()=>{this._actions.delete(t)})),d}_triggerCommand(e,t){if(this._codeEditorService instanceof Wx)try{this._codeEditorService.setActiveCodeEditor(this),super._triggerCommand(e,t)}finally{this._codeEditorService.setActiveCodeEditor(null)}else super._triggerCommand(e,t)}};iL=m3([It(2,fe),It(3,et),It(4,Pt),It(5,Ie),It(6,Ms),It(7,st),It(8,ci),It(9,bi),It(10,kn),It(11,ti),It(12,he),It(13,aa)],iL);let SA=class extends iL{constructor(e,t,i,n,s,r,a,l,c,d,h,u,g,f,p,_,b){const C={...t};tL(h,C,!1);const w=c.registerEditorContainer(e);typeof C.theme=="string"&&c.setTheme(C.theme),typeof C.autoDetectHighContrast<"u"&&c.setAutoDetectHighContrast(!!C.autoDetectHighContrast);const v=C.model;delete C.model,super(e,C,i,n,s,r,a,l,c,d,u,p,_,b),this._configurationService=h,this._standaloneThemeService=c,this._register(w);let S;if(typeof v>"u"){const x=f.getLanguageIdByMimeType(C.language)||C.language||qo;S=DY(g,f,C.value||"",x,void 0),this._ownsModel=!0}else S=v,this._ownsModel=!1;if(this._attachModel(S),S){const x={oldModelUrl:null,newModelUrl:S.uri};this._onDidChangeModel.fire(x)}}dispose(){super.dispose()}updateOptions(e){tL(this._configurationService,e,!1),typeof e.theme=="string"&&this._standaloneThemeService.setTheme(e.theme),typeof e.autoDetectHighContrast<"u"&&this._standaloneThemeService.setAutoDetectHighContrast(!!e.autoDetectHighContrast),super.updateOptions(e)}_postDetachModelCleanup(e){super._postDetachModelCleanup(e),e&&this._ownsModel&&(e.dispose(),this._ownsModel=!1)}};SA=m3([It(2,fe),It(3,et),It(4,Pt),It(5,Ie),It(6,Ms),It(7,st),It(8,er),It(9,bi),It(10,Pe),It(11,kn),It(12,ei),It(13,_i),It(14,ti),It(15,he),It(16,aa)],SA);let yA=class extends Pl{constructor(e,t,i,n,s,r,a,l,c,d,h,u){const g={...t};tL(l,g,!0);const f=r.registerEditorContainer(e);typeof g.theme=="string"&&r.setTheme(g.theme),typeof g.autoDetectHighContrast<"u"&&r.setAutoDetectHighContrast(!!g.autoDetectHighContrast),super(e,g,{},n,i,s,u,d),this._configurationService=l,this._standaloneThemeService=r,this._register(f)}dispose(){super.dispose()}updateOptions(e){tL(this._configurationService,e,!0),typeof e.theme=="string"&&this._standaloneThemeService.setTheme(e.theme),typeof e.autoDetectHighContrast<"u"&&this._standaloneThemeService.setAutoDetectHighContrast(!!e.autoDetectHighContrast),super.updateOptions(e)}_createInnerEditor(e,t,i){return e.createInstance(iL,t,i)}getOriginalEditor(){return super.getOriginalEditor()}getModifiedEditor(){return super.getModifiedEditor()}addCommand(e,t,i){return this.getModifiedEditor().addCommand(e,t,i)}createContextKey(e,t){return this.getModifiedEditor().createContextKey(e,t)}addAction(e){return this.getModifiedEditor().addAction(e)}};yA=m3([It(2,fe),It(3,Ie),It(4,et),It(5,er),It(6,bi),It(7,Pe),It(8,Jo),It(9,id),It(10,Co),It(11,dd)],yA);function DY(o,e,t,i,n){if(t=t||"",!i){const s=t.indexOf(` `);let r=t;return s!==-1&&(r=t.substring(0,s)),K6(o,t,e.createByFilepathOrFirstLine(n||null,r),n)}return K6(o,t,e.createById(i),n)}function K6(o,e,t,i){return o.createModel(e,t,i)}E("multiDiffEditor.headerBackground",{dark:"#262626",light:"tab.inactiveBackground",hcDark:"tab.inactiveBackground",hcLight:"tab.inactiveBackground"},m(142,"The background color of the diff editor's header"));E("multiDiffEditor.background",ki,m(143,"The background color of the multi file diff editor"));E("multiDiffEditor.border",{dark:"sideBarSectionHeader.border",light:"#cccccc",hcDark:"sideBarSectionHeader.border",hcLight:"#cccccc"},m(144,"The border color of the multi file diff editor"));var RMe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},G6=function(o,e){return function(t,i){e(t,i,o)}};class MMe{constructor(e,t){this.viewModel=e,this.deltaScrollVertical=t}getId(){return this.viewModel}}let xA=class extends A{constructor(e,t,i,n,s){super(),this._container=e,this._overflowWidgetsDomNode=t,this._workbenchUIElementFactory=i,this._instantiationService=n,this._viewModel=De(this,void 0),this._collapsed=$(this,l=>this._viewModel.read(l)?.collapsed.read(l)),this._editorContentHeight=De(this,500),this.contentHeight=$(this,l=>(this._collapsed.read(l)?0:this._editorContentHeight.read(l))+this._outerEditorHeight),this._modifiedContentWidth=De(this,0),this._modifiedWidth=De(this,0),this._originalContentWidth=De(this,0),this._originalWidth=De(this,0),this.maxScroll=$(this,l=>{const c=this._modifiedContentWidth.read(l)-this._modifiedWidth.read(l),d=this._originalContentWidth.read(l)-this._originalWidth.read(l);return c>d?{maxScroll:c,width:this._modifiedWidth.read(l)}:{maxScroll:d,width:this._originalWidth.read(l)}}),this._elements=Qe("div.multiDiffEntry",[Qe("div.header@header",[Qe("div.header-content",[Qe("div.collapse-button@collapseButton"),Qe("div.file-path",[Qe("div.title.modified.show-file-icons@primaryPath",[]),Qe("div.status.deleted@status",["R"]),Qe("div.title.original.show-file-icons@secondaryPath",[])]),Qe("div.actions@actions")])]),Qe("div.editorParent",[Qe("div.editorContainer@editor")])]),this.editor=this._register(this._instantiationService.createInstance(Pl,this._elements.editor,{overflowWidgetsDomNode:this._overflowWidgetsDomNode,fixedOverflowWidgets:!0},{})),this.isModifedFocused=Jt(this.editor.getModifiedEditor()).isFocused,this.isOriginalFocused=Jt(this.editor.getOriginalEditor()).isFocused,this.isFocused=$(this,l=>this.isModifedFocused.read(l)||this.isOriginalFocused.read(l)),this._resourceLabel=this._workbenchUIElementFactory.createResourceLabel?this._register(this._workbenchUIElementFactory.createResourceLabel(this._elements.primaryPath)):void 0,this._resourceLabel2=this._workbenchUIElementFactory.createResourceLabel?this._register(this._workbenchUIElementFactory.createResourceLabel(this._elements.secondaryPath)):void 0,this._dataStore=this._register(new z),this._headerHeight=40,this._lastScrollTop=-1,this._isSettingScrollTop=!1;const r=new Wy(this._elements.collapseButton,{});this._register(xe(l=>{r.element.className="",r.icon=this._collapsed.read(l)?G.chevronRight:G.chevronDown})),this._register(r.onDidClick(()=>{this._viewModel.get()?.collapsed.set(!this._collapsed.get(),void 0)})),this._register(xe(l=>{this._elements.editor.style.display=this._collapsed.read(l)?"none":"block"})),this._register(this.editor.getModifiedEditor().onDidLayoutChange(l=>{const c=this.editor.getModifiedEditor().getLayoutInfo().contentWidth;this._modifiedWidth.set(c,void 0)})),this._register(this.editor.getOriginalEditor().onDidLayoutChange(l=>{const c=this.editor.getOriginalEditor().getLayoutInfo().contentWidth;this._originalWidth.set(c,void 0)})),this._register(this.editor.onDidContentSizeChange(l=>{tb(c=>{this._editorContentHeight.set(l.contentHeight,c),this._modifiedContentWidth.set(this.editor.getModifiedEditor().getContentWidth(),c),this._originalContentWidth.set(this.editor.getOriginalEditor().getContentWidth(),c)})})),this._register(this.editor.getOriginalEditor().onDidScrollChange(l=>{if(this._isSettingScrollTop||!l.scrollTopChanged||!this._data)return;const c=l.scrollTop-this._lastScrollTop;this._data.deltaScrollVertical(c)})),this._register(xe(l=>{const c=this._viewModel.read(l)?.isActive.read(l);this._elements.root.classList.toggle("active",c)})),this._container.appendChild(this._elements.root),this._outerEditorHeight=this._headerHeight,this._contextKeyService=this._register(s.createScoped(this._elements.actions));const a=this._register(this._instantiationService.createChild(new f_([Ie,this._contextKeyService])));this._register(a.createInstance(pv,this._elements.actions,M.MultiDiffEditorFileToolbar,{actionRunner:this._register(new lq(()=>this._viewModel.get()?.modifiedUri??this._viewModel.get()?.originalUri)),menuOptions:{shouldForwardArgs:!0},toolbarOptions:{primaryGroup:l=>l.startsWith("navigation")},actionViewItemProvider:(l,c)=>oF(a,l,c)}))}setScrollLeft(e){this._modifiedContentWidth.get()-this._modifiedWidth.get()>this._originalContentWidth.get()-this._originalWidth.get()?this.editor.getModifiedEditor().setScrollLeft(e):this.editor.getOriginalEditor().setScrollLeft(e)}setData(e){this._data=e;function t(n){return{...n,scrollBeyondLastLine:!1,hideUnchangedRegions:{enabled:!0},scrollbar:{vertical:"hidden",horizontal:"hidden",handleMouseWheel:!1,useShadows:!1},renderOverviewRuler:!1,fixedOverflowWidgets:!0,overviewRulerBorder:!1}}if(!e){tb(n=>{this._viewModel.set(void 0,n),this.editor.setDiffModel(null,n),this._dataStore.clear()});return}const i=e.viewModel.documentDiffItem;if(tb(n=>{this._resourceLabel?.setUri(e.viewModel.modifiedUri??e.viewModel.originalUri,{strikethrough:e.viewModel.modifiedUri===void 0});let s=!1,r=!1,a=!1,l="";e.viewModel.modifiedUri&&e.viewModel.originalUri&&e.viewModel.modifiedUri.path!==e.viewModel.originalUri.path?(l="R",s=!0):e.viewModel.modifiedUri?e.viewModel.originalUri||(l="A",a=!0):(l="D",r=!0),this._elements.status.classList.toggle("renamed",s),this._elements.status.classList.toggle("deleted",r),this._elements.status.classList.toggle("added",a),this._elements.status.innerText=l,this._resourceLabel2?.setUri(s?e.viewModel.originalUri:void 0,{strikethrough:!0}),this._dataStore.clear(),this._viewModel.set(e.viewModel,n),this.editor.setDiffModel(e.viewModel.diffEditorViewModelRef,n),this.editor.updateOptions(t(i.options??{}))}),i.onOptionsDidChange&&this._dataStore.add(i.onOptionsDidChange(()=>{this.editor.updateOptions(t(i.options??{}))})),e.viewModel.isAlive.recomputeInitiallyAndOnChange(this._dataStore,n=>{n||this.setData(void 0)}),e.viewModel.documentDiffItem.contextKeys)for(const[n,s]of Object.entries(e.viewModel.documentDiffItem.contextKeys))this._contextKeyService.createKey(n,s)}render(e,t,i,n){this._elements.root.style.visibility="visible",this._elements.root.style.top=`${e.start}px`,this._elements.root.style.height=`${e.length}px`,this._elements.root.style.width=`${t}px`,this._elements.root.style.position="absolute";const s=e.length-this._headerHeight,r=Math.max(0,Math.min(n.start-e.start,s));this._elements.header.style.transform=`translateY(${r}px)`,tb(a=>{this.editor.layout({width:t-16-2,height:e.length-this._outerEditorHeight})});try{this._isSettingScrollTop=!0,this._lastScrollTop=i,this.editor.getOriginalEditor().setScrollTop(i)}finally{this._isSettingScrollTop=!1}this._elements.header.classList.toggle("shadow",r>0||i>0),this._elements.header.classList.toggle("collapsed",r===s)}hide(){this._elements.root.style.top="-100000px",this._elements.root.style.visibility="hidden"}};xA=RMe([G6(3,fe),G6(4,Ie)],xA);class PMe{constructor(e){this._create=e,this._unused=new Set,this._used=new Set,this._itemData=new Map}getUnusedObj(e){let t;if(this._unused.size===0)t=this._create(e),this._itemData.set(t,e);else{const i=[...this._unused.values()];t=i.find(n=>this._itemData.get(n).getId()===e.getId())??i[0],this._unused.delete(t),this._itemData.set(t,e),t.setData(e)}return this._used.add(t),{object:t,dispose:()=>{this._used.delete(t),this._unused.size>5?t.dispose():this._unused.add(t)}}}dispose(){for(const e of this._used)e.dispose();for(const e of this._unused)e.dispose();this._used.clear(),this._unused.clear()}}var AMe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Z6=function(o,e){return function(t,i){e(t,i,o)}};let LA=class extends A{constructor(e,t,i,n,s,r){super(),this._element=e,this._dimension=t,this._viewModel=i,this._workbenchUIElementFactory=n,this._parentContextKeyService=s,this._parentInstantiationService=r,this._scrollableElements=Qe("div.scrollContent",[Qe("div@content",{style:{overflow:"hidden"}}),Qe("div.monaco-editor@overflowWidgetsDomNode",{})]),this._scrollable=this._register(new u_({forceIntegerValues:!1,scheduleAtNextAnimationFrame:c=>Zs(pe(this._element),c),smoothScrollDuration:100})),this._scrollableElement=this._register(new KL(this._scrollableElements.root,{vertical:1,horizontal:1,useShadows:!1},this._scrollable)),this._elements=Qe("div.monaco-component.multiDiffEditor",{},[Qe("div",{},[this._scrollableElement.getDomNode()]),Qe("div.placeholder@placeholder",{},[Qe("div")])]),this._sizeObserver=this._register(new zj(this._element,void 0)),this._objectPool=this._register(new PMe(c=>{const d=this._instantiationService.createInstance(xA,this._scrollableElements.content,this._scrollableElements.overflowWidgetsDomNode,this._workbenchUIElementFactory);return d.setData(c),d})),this.scrollTop=dt(this,this._scrollableElement.onScroll,()=>this._scrollableElement.getScrollPosition().scrollTop),this.scrollLeft=dt(this,this._scrollableElement.onScroll,()=>this._scrollableElement.getScrollPosition().scrollLeft),this._viewItemsInfo=$(this,c=>{const d=this._viewModel.read(c);if(!d)return{items:[],getItem:f=>{throw new Ce}};const h=d.items.read(c),u=new Map;return{items:h.map(f=>{const p=c.store.add(new FMe(f,this._objectPool,this.scrollLeft,b=>{this._scrollableElement.setScrollPosition({scrollTop:this._scrollableElement.getScrollPosition().scrollTop+b})})),_=this._lastDocStates?.[p.getKey()];return _&&Et(b=>{p.setViewState(_,b)}),u.set(f,p),p}),getItem:f=>u.get(f)}}),this._viewItems=this._viewItemsInfo.map(this,c=>c.items),this._spaceBetweenPx=0,this._totalHeight=this._viewItems.map(this,(c,d)=>c.reduce((h,u)=>h+u.contentHeight.read(d)+this._spaceBetweenPx,0)),this.activeControl=$(this,c=>{const d=this._viewModel.read(c)?.activeDiffItem.read(c);return d?this._viewItemsInfo.read(c).getItem(d).template.read(c)?.editor:void 0}),this._contextKeyService=this._register(this._parentContextKeyService.createScoped(this._element)),this._instantiationService=this._register(this._parentInstantiationService.createChild(new f_([Ie,this._contextKeyService]))),this._contextKeyService.createKey(N.inMultiDiffEditor.key,!0),this._lastDocStates={},this._register(Xn((c,d)=>{const h=this._viewModel.read(c);if(h&&h.contextKeys)for(const[u,g]of Object.entries(h.contextKeys)){const f=this._contextKeyService.createKey(u,void 0);f.set(g),d.add(ue(()=>f.reset()))}}));const a=this._parentContextKeyService.createKey(N.multiDiffEditorAllCollapsed.key,!1);this._register(xe(c=>{const d=this._viewModel.read(c);if(d){const h=d.items.read(c).every(u=>u.collapsed.read(c));a.set(h)}})),this._register(xe(c=>{const d=this._dimension.read(c);this._sizeObserver.observe(d)}));const l=$(c=>{if(this._viewItems.read(c).length>0)return;const h=this._viewModel.read(c);return!h||h.isLoading.read(c)?m(145,"Loading..."):m(146,"No Changed Files")});this._register(xe(c=>{const d=l.read(c);this._elements.placeholder.innerText=d??"",this._elements.placeholder.classList.toggle("visible",!!d)})),this._scrollableElements.content.style.position="relative",this._register(xe(c=>{const d=this._sizeObserver.height.read(c);this._scrollableElements.root.style.height=`${d}px`;const h=this._totalHeight.read(c);this._scrollableElements.content.style.height=`${h}px`;const u=this._sizeObserver.width.read(c);let g=u;const f=this._viewItems.read(c),p=JO(f,Bn(_=>_.maxScroll.read(c).maxScroll,uo));if(p){const _=p.maxScroll.read(c);g=u+_.maxScroll}this._scrollableElement.setScrollDimensions({width:u,height:d,scrollHeight:h,scrollWidth:g})})),e.replaceChildren(this._elements.root),this._register(ue(()=>{e.replaceChildren()})),this._register(xe(c=>{const d=this._viewModel.read(c);if(d&&!d.isLoading.read(c)){if(d.items.read(c).length===0||d.activeDiffItem.read(c))return;this.goToNextChange()}})),this._register(this._register(xe(c=>{tb(d=>{this.render(c)})})))}reveal(e,t){const i=this._viewItems.get(),n=i.findIndex(c=>c.viewModel.originalUri?.toString()===e.original?.toString()&&c.viewModel.modifiedUri?.toString()===e.modified?.toString());if(n===-1)throw new Ce("Resource not found in diff editor");const s=i[n];this._viewModel.get().activeDiffItem.setCache(s.viewModel,void 0);let r=0;for(let c=0;cl.viewModel===i):-1;if(n===-1){this._goToFile(0,"first");return}const s=t[n];s.viewModel.collapsed.get()&&s.viewModel.collapsed.set(!1,void 0);const r=s.template.get()?.editor;if(r?.getDiffComputationResult()?.changes2?.length){const l=r.getModifiedEditor().getPosition()?.lineNumber||1,c=r.getDiffComputationResult().changes2;if(e==="next"?c.some(h=>h.modified.startLineNumber>l):c.some(h=>h.modified.endLineNumberExclusive<=l)){r.goToDiff(e);return}}const a=(n+(e==="next"?1:-1)+t.length)%t.length;this._goToFile(a,e==="next"?"first":"last")}_goToFile(e,t){const i=this._viewItems.get()[e];i.viewModel.collapsed.get()&&i.viewModel.collapsed.set(!1,void 0),this.reveal({original:i.viewModel.originalUri,modified:i.viewModel.modifiedUri});const n=i.template.get()?.editor;if(n?.getDiffComputationResult()?.changes2?.length)if(t==="first")n.revealFirstDiff();else{const s=n.getDiffComputationResult().changes2.at(-1),r=n.getModifiedEditor();r.setPosition({lineNumber:s.modified.startLineNumber,column:1}),r.revealLineInCenter(s.modified.startLineNumber)}n?.focus()}render(e){const t=this.scrollTop.read(e);let i=0,n=0,s=0;const r=this._sizeObserver.height.read(e),a=ge.ofStartAndLength(t,r),l=this._sizeObserver.width.read(e);for(const c of this._viewItems.read(e)){const d=c.contentHeight.read(e),h=Math.min(d,r),u=ge.ofStartAndLength(n,h),g=ge.ofStartAndLength(s,d);if(g.isBefore(a))i-=d-h,c.hide();else if(g.isAfter(a))c.hide();else{const f=Math.max(0,Math.min(a.start-g.start,d-h));i-=f;const p=ge.ofStartAndLength(t+i,r);c.render(u,f,l,p)}n+=h+this._spaceBetweenPx,s+=d+this._spaceBetweenPx}this._scrollableElements.content.style.transform=`translateY(${-(t+i)}px)`}};LA=AMe([Z6(4,Ie),Z6(5,fe)],LA);function OMe(o,e){const t=o.getModel(),i=o.createDecorationsCollection([{range:e,options:{description:"symbol-navigate-action-highlight",className:"symbolHighlight"}}]);setTimeout(()=>{o.getModel()===t&&i.clear()},350)}class FMe extends A{constructor(e,t,i,n){super(),this.viewModel=e,this._objectPool=t,this._scrollLeft=i,this._deltaScrollVertical=n,this._templateRef=this._register(gO(this,void 0)),this.contentHeight=$(this,s=>this._templateRef.read(s)?.object.contentHeight?.read(s)??this.viewModel.lastTemplateData.read(s).contentHeight),this.maxScroll=$(this,s=>this._templateRef.read(s)?.object.maxScroll.read(s)??{maxScroll:0,scrollWidth:0}),this.template=$(this,s=>this._templateRef.read(s)?.object),this._isHidden=De(this,!1),this._isFocused=$(this,s=>this.template.read(s)?.isFocused.read(s)??!1),this.viewModel.setIsFocused(this._isFocused,void 0),this._register(xe(s=>{const r=this._scrollLeft.read(s);this._templateRef.read(s)?.object.setScrollLeft(r)})),this._register(xe(s=>{const r=this._templateRef.read(s);!r||!this._isHidden.read(s)||r.object.isFocused.read(s)||this._clear()}))}dispose(){this._clear(),super.dispose()}toString(){return`VirtualViewItem(${this.viewModel.documentDiffItem.modified?.uri.toString()})`}getKey(){return this.viewModel.getKey()}setViewState(e,t){this.viewModel.collapsed.set(e.collapsed,t),this._updateTemplateData(t);const i=this.viewModel.lastTemplateData.get(),n=e.selections?.map(ae.liftSelection);this.viewModel.lastTemplateData.set({...i,selections:n},t);const s=this._templateRef.get();s&&n&&s.object.editor.setSelections(n)}_updateTemplateData(e){const t=this._templateRef.get();t&&this.viewModel.lastTemplateData.set({contentHeight:t.object.contentHeight.get(),selections:t.object.editor.getSelections()??void 0},e)}_clear(){const e=this._templateRef.get();e&&Et(t=>{this._updateTemplateData(t),e.object.hide(),this._templateRef.set(void 0,t)})}hide(){this._isHidden.set(!0,void 0)}render(e,t,i,n){this._isHidden.set(!1,void 0);let s=this._templateRef.get();if(!s){s=this._objectPool.getUnusedObj(new MMe(this.viewModel,this._deltaScrollVertical)),this._templateRef.set(s,void 0);const r=this.viewModel.lastTemplateData.get().selections;r&&s.object.editor.setSelections(r)}s.object.render(e,i,t,n)}}var WMe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},BMe=function(o,e){return function(t,i){e(t,i,o)}};let kA=class extends A{constructor(e,t,i){super(),this._element=e,this._workbenchUIElementFactory=t,this._instantiationService=i,this._dimension=De(this,void 0),this._viewModel=De(this,void 0),this._widgetImpl=$(this,n=>n.store.add(this._instantiationService.createInstance(ac(LA),this._element,this._dimension,this._viewModel,this._workbenchUIElementFactory))),this._register(fm(this._widgetImpl))}};kA=WMe([BMe(2,fe)],kA);function HMe(o,e,t){return Ne.initialize(t||{}).createInstance(SA,o,e)}function VMe(o){return Ne.get(et).onCodeEditorAdd(t=>{o(t)})}function zMe(o){return Ne.get(et).onDiffEditorAdd(t=>{o(t)})}function UMe(){return Ne.get(et).listCodeEditors()}function $Me(){return Ne.get(et).listDiffEditors()}function jMe(o,e,t){return Ne.initialize(t||{}).createInstance(yA,o,e)}function qMe(o,e){const t=Ne.initialize(e||{});return new kA(o,{},t)}function KMe(o){if(typeof o.id!="string"||typeof o.run!="function")throw new Error("Invalid command descriptor, `id` and `run` are required properties!");return Ye.registerCommand(o.id,o.run)}function GMe(o){if(typeof o.id!="string"||typeof o.label!="string"||typeof o.run!="function")throw new Error("Invalid action descriptor, `id`, `label` and `run` are required properties!");const e=q.deserialize(o.precondition),t=(n,...s)=>Ki.runEditorCommand(n,s,e,(r,a,l)=>Promise.resolve(o.run(a,...l))),i=new z;if(i.add(Ye.registerCommand(o.id,t)),o.contextMenuGroupId){const n={command:{id:o.id,title:o.label},when:e,group:o.contextMenuGroupId,order:o.contextMenuOrder||0};i.add(un.appendMenuItem(M.EditorContext,n))}if(Array.isArray(o.keybindings)){const n=Ne.get(st);if(!(n instanceof Ym))console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService");else{const s=q.and(e,q.deserialize(o.keybindingContext));i.add(n.addDynamicKeybindings(o.keybindings.map(r=>({keybinding:r,command:o.id,when:s}))))}}return i}function ZMe(o){return IY([o])}function IY(o){const e=Ne.get(st);return e instanceof Ym?e.addDynamicKeybindings(o.map(t=>({keybinding:t.keybinding,command:t.command,commandArgs:t.commandArgs,when:q.deserialize(t.when)}))):(console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService"),A.None)}function YMe(o,e,t){const i=Ne.get(_i),n=i.getLanguageIdByMimeType(e)||e;return DY(Ne.get(ei),i,o,n,t)}function XMe(o,e){const t=Ne.get(_i),i=t.getLanguageIdByMimeType(e)||e||qo;o.setLanguage(t.createById(i))}function QMe(o,e,t){o&&Ne.get($l).changeOne(e,o.uri,t)}function JMe(o){Ne.get($l).changeAll(o,[])}function e2e(o){return Ne.get($l).read(o)}function t2e(o){return Ne.get($l).onMarkerChanged(o)}function i2e(o){return Ne.get(ei).getModel(o)}function n2e(){return Ne.get(ei).getModels()}function s2e(o){return Ne.get(ei).onModelAdded(o)}function o2e(o){return Ne.get(ei).onModelRemoved(o)}function r2e(o){return Ne.get(ei).onModelLanguageChanged(t=>{o({model:t.model,oldLanguage:t.oldLanguageId})})}function a2e(o){return uTe(Ne.get(ei),o)}function l2e(o,e){const t=Ne.get(_i),i=Ne.get(er);return a3.colorizeElement(i,t,o,e).then(()=>{i.registerEditorContainer(o)})}function c2e(o,e,t){const i=Ne.get(_i);return Ne.get(er).registerEditorContainer(wt.document.body),a3.colorize(i,o,e,t)}function d2e(o,e,t=4){return Ne.get(er).registerEditorContainer(wt.document.body),a3.colorizeModelLine(o,e,t)}function h2e(o){const e=ui.get(o);return e||{getInitialState:()=>Im,tokenize:(t,i,n)=>w4(o,n)}}function u2e(o,e){ui.getOrCreate(e);const t=h2e(e),i=bo(o),n=[];let s=t.getInitialState();for(let r=0,a=i.length;r{if(!i)return null;const s=t.options?.selection;let r;return s&&typeof s.endLineNumber=="number"&&typeof s.endColumn=="number"?r=s:s&&(r={lineNumber:s.startLineNumber,column:s.startColumn}),await o.openCodeEditor(i,t.resource,r)?i:null})}function C2e(){return{create:HMe,getEditors:UMe,getDiffEditors:$Me,onDidCreateEditor:VMe,onDidCreateDiffEditor:zMe,createDiffEditor:jMe,addCommand:KMe,addEditorAction:GMe,addKeybindingRule:ZMe,addKeybindingRules:IY,createModel:YMe,setModelLanguage:XMe,setModelMarkers:QMe,getModelMarkers:e2e,removeAllMarkers:JMe,onDidChangeMarkers:t2e,getModels:n2e,getModel:i2e,onDidCreateModel:s2e,onWillDisposeModel:o2e,onDidChangeModelLanguage:r2e,createWebWorker:a2e,colorizeElement:l2e,colorize:c2e,colorizeModelLine:d2e,tokenize:u2e,defineTheme:g2e,setTheme:f2e,remeasureFonts:p2e,registerCommand:m2e,registerLinkOpener:_2e,registerEditorOpener:b2e,AccessibilitySupport:O2,ContentWidgetPositionPreference:z2,CursorChangeReason:U2,DefaultEndOfLine:$2,EditorAutoIndentStrategy:q2,EditorOption:K2,EndOfLinePreference:G2,EndOfLineSequence:Z2,MinimapPosition:aP,MinimapSectionHeaderStyle:lP,MouseTargetType:cP,OverlayWidgetPositionPreference:uP,OverviewRulerLane:gP,GlyphMarginLane:Y2,RenderLineNumbersType:mP,RenderMinimap:_P,ScrollbarVisibility:CP,ScrollType:bP,TextEditorCursorBlinkingStyle:kP,TextEditorCursorStyle:DP,TrackedRangeStickiness:IP,WrappingIndent:EP,InjectedTextCursorStops:J2,PositionAffinity:pP,ShowLightbulbIconMode:wP,TextDirection:LP,ConfigurationChangedEvent:oU,BareFontInfo:Ig,FontInfo:U0,TextModelResolvedOptions:PS,FindMatch:MC,ApplyUpdateResult:Db,EditorZoom:hr,createMultiFileDiffEditor:qMe,EditorType:xw,EditorOptions:rs}}function v2e(o,e){if(!e||!Array.isArray(e))return!1;for(const t of e)if(!o(t))return!1;return!0}function vS(o,e){return typeof o=="boolean"?o:e}function Y6(o,e){return typeof o=="string"?o:e}function w2e(o){const e={};for(const t of o)e[t]=!0;return e}function X6(o,e=!1){e&&(o=o.map(function(i){return i.toLowerCase()}));const t=w2e(o);return e?function(i){return t[i.toLowerCase()]!==void 0&&t.hasOwnProperty(i.toLowerCase())}:function(i){return t[i]!==void 0&&t.hasOwnProperty(i)}}function DA(o,e,t){e=e.replace(/@@/g,"");let i=0,n;do n=!1,e=e.replace(/@(\w+)/g,function(r,a){n=!0;let l="";if(typeof o[a]=="string")l=o[a];else if(o[a]&&o[a]instanceof RegExp)l=o[a].source;else throw o[a]===void 0?zt(o,"language definition does not contain attribute '"+a+"', used at: "+e):zt(o,"attribute reference '"+a+"' must be a string, used at: "+e);return Au(l)?"":"(?:"+l+")"}),i++;while(n&&i<5);e=e.replace(/\x01/g,"@");const s=(o.ignoreCase?"i":"")+(o.unicode?"u":"");if(t&&e.match(/\$[sS](\d\d?)/g)){let a=null,l=null;return c=>(l&&a===c||(a=c,l=new RegExp(_Te(o,e,c),s)),l)}return new RegExp(e,s)}function S2e(o,e,t,i){if(i<0)return o;if(i=100){i=i-100;const n=t.split(".");if(n.unshift(t),i=0&&(i.tokenSubst=!0),typeof t.bracket=="string")if(t.bracket==="@open")i.bracket=1;else if(t.bracket==="@close")i.bracket=-1;else throw zt(o,"a 'bracket' attribute must be either '@open' or '@close', in rule: "+e);if(t.next){if(typeof t.next!="string")throw zt(o,"the next state must be a string value in rule: "+e);{let n=t.next;if(!/^(@pop|@push|@popall)$/.test(n)&&(n[0]==="@"&&(n=n.substr(1)),n.indexOf("$")<0&&!bTe(o,Vd(o,n,"",[],""))))throw zt(o,"the next state '"+t.next+"' is not defined in rule: "+e);i.next=n}}return typeof t.goBack=="number"&&(i.goBack=t.goBack),typeof t.switchTo=="string"&&(i.switchTo=t.switchTo),typeof t.log=="string"&&(i.log=t.log),typeof t.nextEmbedded=="string"&&(i.nextEmbedded=t.nextEmbedded,o.usesEmbedded=!0),i}}else if(Array.isArray(t)){const i=[];for(let n=0,s=t.length;n0&&i[0]==="^",this.name=this.name+": "+i,this.regex=DA(e,"^(?:"+(this.matchOnlyAtLineStart?i.substr(1):i)+")",!0)}setAction(e,t){this.action=IA(e,this.name,t)}resolveRegex(e){return this.regex instanceof RegExp?this.regex:this.regex(e)}}function EY(o,e){if(!e||typeof e!="object")throw new Error("Monarch: expecting a language definition object");const t={languageId:o,includeLF:vS(e.includeLF,!1),noThrow:!1,maxStack:100,start:typeof e.start=="string"?e.start:null,ignoreCase:vS(e.ignoreCase,!1),unicode:vS(e.unicode,!1),tokenPostfix:Y6(e.tokenPostfix,"."+o),defaultToken:Y6(e.defaultToken,"source"),usesEmbedded:!1,stateNames:{},tokenizer:{},brackets:[]},i=e;i.languageId=o,i.includeLF=t.includeLF,i.ignoreCase=t.ignoreCase,i.unicode=t.unicode,i.noThrow=t.noThrow,i.usesEmbedded=t.usesEmbedded,i.stateNames=e.tokenizer,i.defaultToken=t.defaultToken;function n(r,a,l){for(const c of l){let d=c.include;if(d){if(typeof d!="string")throw zt(t,"an 'include' attribute must be a string at: "+r);if(d[0]==="@"&&(d=d.substr(1)),!e.tokenizer[d])throw zt(t,"include target '"+d+"' is not defined at: "+r);n(r+"."+d,a,e.tokenizer[d])}else{const h=new x2e(r);if(Array.isArray(c)&&c.length>=1&&c.length<=3)if(h.setRegex(i,c[0]),c.length>=3)if(typeof c[1]=="string")h.setAction(i,{token:c[1],next:c[2]});else if(typeof c[1]=="object"){const u=c[1];u.next=c[2],h.setAction(i,u)}else throw zt(t,"a next state as the last element of a rule can only be given if the action is either an object or a string, at: "+r);else h.setAction(i,c[1]);else{if(!c.regex)throw zt(t,"a rule must either be an array, or an object with a 'regex' or 'include' field at: "+r);c.name&&typeof c.name=="string"&&(h.name=c.name),c.matchOnlyAtStart&&(h.matchOnlyAtLineStart=vS(c.matchOnlyAtLineStart,!1)),h.setRegex(i,c.regex),h.setAction(i,c.action)}a.push(h)}}}if(!e.tokenizer||typeof e.tokenizer!="object")throw zt(t,"a language definition must define the 'tokenizer' attribute as an object");t.tokenizer=[];for(const r in e.tokenizer)if(e.tokenizer.hasOwnProperty(r)){t.start||(t.start=r);const a=e.tokenizer[r];t.tokenizer[r]=new Array,n("tokenizer."+r,t.tokenizer[r],a)}if(t.usesEmbedded=i.usesEmbedded,e.brackets){if(!Array.isArray(e.brackets))throw zt(t,"the 'brackets' attribute must be defined as an array")}else e.brackets=[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}];const s=[];for(const r of e.brackets){let a=r;if(a&&Array.isArray(a)&&a.length===3&&(a={token:a[2],open:a[0],close:a[1]}),a.open===a.close)throw zt(t,"open and close brackets in a 'brackets' attribute must be different: "+a.open+` - hint: use the 'bracket' attribute if matching on equal brackets is required.`);if(typeof a.open=="string"&&typeof a.token=="string"&&typeof a.close=="string")s.push({token:a.token+t.tokenPostfix,open:jc(t,a.open),close:jc(t,a.close)});else throw zt(t,"every element in the 'brackets' array must be a '{open,close,token}' object or array")}return t.brackets=s,t.noThrow=!0,t}function L2e(o){mm.registerLanguage(o)}function k2e(){let o=[];return o=o.concat(mm.getLanguages()),o}function D2e(o){return Ne.get(_i).languageIdCodec.encodeLanguageId(o)}function I2e(o,e){return Ne.withServices(()=>{const i=Ne.get(_i).onDidRequestRichLanguageFeatures(n=>{n===o&&(i.dispose(),e())});return i})}function E2e(o,e){return Ne.withServices(()=>{const i=Ne.get(_i).onDidRequestBasicLanguageFeatures(n=>{n===o&&(i.dispose(),e())});return i})}function N2e(o,e){if(!Ne.get(_i).isRegisteredLanguageId(o))throw new Error(`Cannot set configuration for unknown language ${o}`);return Ne.get(ti).register(o,e,100)}class T2e{constructor(e,t){this._languageId=e,this._actual=t}dispose(){}getInitialState(){return this._actual.getInitialState()}tokenize(e,t,i){if(typeof this._actual.tokenize=="function")return iw.adaptTokenize(this._languageId,this._actual,e,i);throw new Error("Not supported!")}tokenizeEncoded(e,t,i){const n=this._actual.tokenizeEncoded(e,i);return new JL(n.tokens,n.endState)}}class iw{constructor(e,t,i,n){this._languageId=e,this._actual=t,this._languageService=i,this._standaloneThemeService=n}dispose(){}getInitialState(){return this._actual.getInitialState()}static _toClassicTokens(e,t){const i=[];let n=0;for(let s=0,r=e.length;s0&&s[r-1]===u)continue;let g=h.startIndex;c===0?g=0:g{const i=await Promise.resolve(e.create());return i?R2e(i)?TY(o,i):new Zv(Ne.get(_i),Ne.get(er),o,EY(o,i),Ne.get(Pe)):null});return ui.registerFactory(o,t)}function A2e(o,e){if(!Ne.get(_i).isRegisteredLanguageId(o))throw new Error(`Cannot set tokens provider for unknown language ${o}`);return NY(e)?_3(o,{create:()=>e}):ui.register(o,TY(o,e))}function O2e(o,e){const t=i=>new Zv(Ne.get(_i),Ne.get(er),o,EY(o,i),Ne.get(Pe));return NY(e)?_3(o,{create:()=>e}):ui.register(o,t(e))}function F2e(o,e){return Ne.get(he).referenceProvider.register(o,e)}function W2e(o,e){return Ne.get(he).renameProvider.register(o,e)}function B2e(o,e){return Ne.get(he).newSymbolNamesProvider.register(o,e)}function H2e(o,e){return Ne.get(he).signatureHelpProvider.register(o,e)}function V2e(o,e){return Ne.get(he).hoverProvider.register(o,{provideHover:async(i,n,s,r)=>{const a=i.getWordAtPosition(n);return Promise.resolve(e.provideHover(i,n,s,r)).then(l=>{if(l)return!l.range&&a&&(l.range=new L(n.lineNumber,a.startColumn,n.lineNumber,a.endColumn)),l.range||(l.range=new L(n.lineNumber,n.column,n.lineNumber,n.column)),l})}})}function z2e(o,e){return Ne.get(he).documentSymbolProvider.register(o,e)}function U2e(o,e){return Ne.get(he).documentHighlightProvider.register(o,e)}function $2e(o,e){return Ne.get(he).linkedEditingRangeProvider.register(o,e)}function j2e(o,e){return Ne.get(he).definitionProvider.register(o,e)}function q2e(o,e){return Ne.get(he).implementationProvider.register(o,e)}function K2e(o,e){return Ne.get(he).typeDefinitionProvider.register(o,e)}function G2e(o,e){return Ne.get(he).codeLensProvider.register(o,e)}function Z2e(o,e,t){return Ne.get(he).codeActionProvider.register(o,{providedCodeActionKinds:t?.providedCodeActionKinds,documentation:t?.documentation,provideCodeActions:(n,s,r,a)=>{const c=Ne.get($l).read({resource:n.uri}).filter(d=>L.areIntersectingOrTouching(d,s));return e.provideCodeActions(n,s,{markers:c,only:r.only,trigger:r.trigger},a)},resolveCodeAction:e.resolveCodeAction})}function Y2e(o,e){return Ne.get(he).documentFormattingEditProvider.register(o,e)}function X2e(o,e){return Ne.get(he).documentRangeFormattingEditProvider.register(o,e)}function Q2e(o,e){return Ne.get(he).onTypeFormattingEditProvider.register(o,e)}function J2e(o,e){return Ne.get(he).linkProvider.register(o,e)}function ePe(o,e){return Ne.get(he).completionProvider.register(o,e)}function tPe(o,e){return Ne.get(he).colorProvider.register(o,e)}function iPe(o,e){return Ne.get(he).foldingRangeProvider.register(o,e)}function nPe(o,e){return Ne.get(he).declarationProvider.register(o,e)}function sPe(o,e){return Ne.get(he).selectionRangeProvider.register(o,e)}function oPe(o,e){return Ne.get(he).documentSemanticTokensProvider.register(o,e)}function rPe(o,e){return Ne.get(he).documentRangeSemanticTokensProvider.register(o,e)}function aPe(o,e){return Ne.get(he).inlineCompletionsProvider.register(o,e)}function lPe(o,e){return Ne.get(he).inlayHintsProvider.register(o,e)}function cPe(){return{register:L2e,getLanguages:k2e,onLanguage:I2e,onLanguageEncountered:E2e,getEncodedLanguageId:D2e,setLanguageConfiguration:N2e,setColorMap:P2e,registerTokensProviderFactory:_3,setTokensProvider:A2e,setMonarchTokensProvider:O2e,registerReferenceProvider:F2e,registerRenameProvider:W2e,registerNewSymbolNameProvider:B2e,registerCompletionItemProvider:ePe,registerSignatureHelpProvider:H2e,registerHoverProvider:V2e,registerDocumentSymbolProvider:z2e,registerDocumentHighlightProvider:U2e,registerLinkedEditingRangeProvider:$2e,registerDefinitionProvider:j2e,registerImplementationProvider:q2e,registerTypeDefinitionProvider:K2e,registerCodeLensProvider:G2e,registerCodeActionProvider:Z2e,registerDocumentFormattingEditProvider:Y2e,registerDocumentRangeFormattingEditProvider:X2e,registerOnTypeFormattingEditProvider:Q2e,registerLinkProvider:J2e,registerColorProvider:tPe,registerFoldingRangeProvider:iPe,registerDeclarationProvider:nPe,registerSelectionRangeProvider:sPe,registerDocumentSemanticTokensProvider:oPe,registerDocumentRangeSemanticTokensProvider:rPe,registerInlineCompletionsProvider:aPe,registerInlayHintsProvider:lPe,DocumentHighlightKind:j2,CompletionItemKind:B2,CompletionItemTag:H2,CompletionItemInsertTextRule:W2,SymbolKind:yP,SymbolTag:xP,IndentAction:Q2,CompletionTriggerKind:V2,SignatureHelpTriggerKind:SP,InlayHintKind:eP,InlineCompletionTriggerKind:nP,CodeActionTriggerType:F2,NewSymbolNameTag:dP,NewSymbolNameTriggerKind:hP,PartialAcceptTriggerKind:fP,HoverVerbosityAction:X2,InlineCompletionEndOfLifeReasonKind:tP,InlineCompletionHintStyle:iP,FoldingRangeKind:df,SelectedSuggestionInfo:c$,EditDeltaInfo:ov}}rs.wrappingIndent.defaultValue=0;rs.glyphMargin.defaultValue=!1;rs.autoIndent.defaultValue=3;rs.overviewRulerLanes.defaultValue=2;Vm.setFormatterSelector((o,e,t)=>Promise.resolve(o[0]));const As=sY();As.editor=C2e();As.languages=cPe();const RY=As.CancellationTokenSource,Ph=As.Emitter,MY=As.KeyCode,PY=As.KeyMod,_d=As.Position,x_=As.Range,AY=As.Selection,OY=As.SelectionDirection,Zr=As.MarkerSeverity,nL=As.MarkerTag,hD=As.Uri,FY=As.Token,Dl=As.editor,de=As.languages,dPe=FA(),rm=globalThis;(dPe?.globalAPI||typeof rm.define=="function"&&rm.define.amd)&&(rm.monaco=As);typeof rm.require<"u"&&typeof rm.require.config=="function"&&rm.require.config({ignoreDuplicateModules:["vscode-languageserver-types","vscode-languageserver-types/main","vscode-languageserver-textdocument","vscode-languageserver-textdocument/main","vscode-nls","vscode-nls/vscode-nls","jsonc-parser","jsonc-parser/main","vscode-uri","vscode-uri/index","vs/basic-languages/typescript/typescript"]});const hPe=Object.freeze(Object.defineProperty({__proto__:null,CancellationTokenSource:RY,Emitter:Ph,KeyCode:MY,KeyMod:PY,MarkerSeverity:Zr,MarkerTag:nL,Position:_d,Range:x_,Selection:AY,SelectionDirection:OY,Token:FY,Uri:hD,editor:Dl,languages:de},Symbol.toStringTag,{value:"Module"}));let b3=class{constructor(e,t,i){this._onDidChange=new Ph,this._languageId=e,this.setOptions(t),this.setModeConfiguration(i)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this.options}get options(){return this._options}setOptions(e){this._options=e||Object.create(null),this._onDidChange.fire(this)}setDiagnosticsOptions(e){this.setOptions(e)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}};const C3={validate:!0,lint:{compatibleVendorPrefixes:"ignore",vendorPrefix:"warning",duplicateProperties:"warning",emptyRules:"warning",importStatement:"ignore",boxModel:"ignore",universalSelector:"ignore",zeroUnits:"ignore",fontFaceProperties:"warning",hexColorLength:"error",argumentsInColorFunction:"error",unknownProperties:"warning",ieHack:"ignore",unknownVendorSpecificProperties:"ignore",propertyIgnoredDueToDisplay:"warning",important:"ignore",float:"ignore",idSelector:"ignore"},data:{useDefaultDataProvider:!0},format:{newlineBetweenSelectors:!0,newlineBetweenRules:!0,spaceAroundSelectorSeparator:!1,braceStyle:"collapse",maxPreserveNewLines:void 0,preserveNewLines:!0}},v3={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0,documentFormattingEdits:!0,documentRangeFormattingEdits:!0},WY=new b3("css",C3,v3),BY=new b3("scss",C3,v3),HY=new b3("less",C3,v3);function w3(){return we(()=>import("./cssMode-gWA3VTCg.js"),__vite__mapDeps([0,1,2,3,4]))}de.onLanguage("less",()=>{w3().then(o=>o.setupMode(HY))});de.onLanguage("scss",()=>{w3().then(o=>o.setupMode(BY))});de.onLanguage("css",()=>{w3().then(o=>o.setupMode(WY))});const VY=Object.freeze(Object.defineProperty({__proto__:null,cssDefaults:WY,lessDefaults:HY,scssDefaults:BY},Symbol.toStringTag,{value:"Module"}));let uPe=class{constructor(e,t,i){this._onDidChange=new Ph,this._languageId=e,this.setOptions(t),this.setModeConfiguration(i)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get options(){return this._options}get modeConfiguration(){return this._modeConfiguration}setOptions(e){this._options=e||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}};const gPe={tabSize:4,insertSpaces:!1,wrapLineLength:120,unformatted:'default": "a, abbr, acronym, b, bdo, big, br, button, cite, code, dfn, em, i, img, input, kbd, label, map, object, q, samp, select, small, span, strong, sub, sup, textarea, tt, var',contentUnformatted:"pre",indentInnerHtml:!1,preserveNewLines:!0,maxPreserveNewLines:void 0,indentHandlebars:!1,endWithNewline:!1,extraLiners:"head, body, /html",wrapAttributes:"auto"},uD={format:gPe,suggest:{},data:{useDefaultDataProvider:!0}};function gD(o){return{completionItems:!0,hovers:!0,documentSymbols:!0,links:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,selectionRanges:!0,diagnostics:o===bC,documentFormattingEdits:o===bC,documentRangeFormattingEdits:o===bC}}const bC="html",Q6="handlebars",J6="razor",zY=fD(bC,uD,gD(bC)),fPe=zY.defaults,UY=fD(Q6,uD,gD(Q6)),pPe=UY.defaults,$Y=fD(J6,uD,gD(J6)),mPe=$Y.defaults;function _Pe(){return we(()=>import("./htmlMode-CNwKQEFk.js"),__vite__mapDeps([5,1,2,3,4]))}function fD(o,e=uD,t=gD(o)){const i=new uPe(o,e,t);let n;const s=de.onLanguage(o,async()=>{n=(await _Pe()).setupMode(i)});return{defaults:i,dispose(){s.dispose(),n?.dispose(),n=void 0}}}const jY=Object.freeze(Object.defineProperty({__proto__:null,handlebarDefaults:pPe,handlebarLanguageService:UY,htmlDefaults:fPe,htmlLanguageService:zY,razorDefaults:mPe,razorLanguageService:$Y,registerHTMLLanguageService:fD},Symbol.toStringTag,{value:"Module"}));let bPe=class{constructor(e,t,i){this._onDidChange=new Ph,this._languageId=e,this.setDiagnosticsOptions(t),this.setModeConfiguration(i)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(e){this._diagnosticsOptions=e||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}};const CPe={validate:!0,allowComments:!0,schemas:[],enableSchemaRequest:!1,schemaRequest:"warning",schemaValidation:"warning",comments:"error",trailingCommas:"error"},vPe={documentFormattingEdits:!0,documentRangeFormattingEdits:!0,completionItems:!0,hovers:!0,documentSymbols:!0,tokens:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0},qY=new bPe("json",CPe,vPe),wPe=()=>KY().then(o=>o.getWorker());function KY(){return we(()=>import("./jsonMode-DBSMQpjf.js"),__vite__mapDeps([6,1,2,3,4]))}de.register({id:"json",extensions:[".json",".bowerrc",".jshintrc",".jscsrc",".eslintrc",".babelrc",".har"],aliases:["JSON","json"],mimetypes:["application/json"]});de.onLanguage("json",()=>{KY().then(o=>o.setupMode(qY))});const GY=Object.freeze(Object.defineProperty({__proto__:null,getWorker:wPe,jsonDefaults:qY},Symbol.toStringTag,{value:"Module"})),SPe="5.9.3";var ZY=(o=>(o[o.None=0]="None",o[o.CommonJS=1]="CommonJS",o[o.AMD=2]="AMD",o[o.UMD=3]="UMD",o[o.System=4]="System",o[o.ES2015=5]="ES2015",o[o.ESNext=99]="ESNext",o))(ZY||{}),YY=(o=>(o[o.None=0]="None",o[o.Preserve=1]="Preserve",o[o.React=2]="React",o[o.ReactNative=3]="ReactNative",o[o.ReactJSX=4]="ReactJSX",o[o.ReactJSXDev=5]="ReactJSXDev",o))(YY||{}),XY=(o=>(o[o.CarriageReturnLineFeed=0]="CarriageReturnLineFeed",o[o.LineFeed=1]="LineFeed",o))(XY||{}),QY=(o=>(o[o.ES3=0]="ES3",o[o.ES5=1]="ES5",o[o.ES2015=2]="ES2015",o[o.ES2016=3]="ES2016",o[o.ES2017=4]="ES2017",o[o.ES2018=5]="ES2018",o[o.ES2019=6]="ES2019",o[o.ES2020=7]="ES2020",o[o.ESNext=99]="ESNext",o[o.JSON=100]="JSON",o[o.Latest=99]="Latest",o))(QY||{}),JY=(o=>(o[o.Classic=1]="Classic",o[o.NodeJs=2]="NodeJs",o))(JY||{});class eX{constructor(e,t,i,n,s){this._onDidChange=new Ph,this._onDidExtraLibsChange=new Ph,this._extraLibs=Object.create(null),this._removedExtraLibs=Object.create(null),this._eagerModelSync=!1,this.setCompilerOptions(e),this.setDiagnosticsOptions(t),this.setWorkerOptions(i),this.setInlayHintsOptions(n),this.setModeConfiguration(s),this._onDidExtraLibsChangeTimeout=-1}get onDidChange(){return this._onDidChange.event}get onDidExtraLibsChange(){return this._onDidExtraLibsChange.event}get modeConfiguration(){return this._modeConfiguration}get workerOptions(){return this._workerOptions}get inlayHintsOptions(){return this._inlayHintsOptions}getExtraLibs(){return this._extraLibs}addExtraLib(e,t){let i;if(typeof t>"u"?i=`ts:extralib-${Math.random().toString(36).substring(2,15)}`:i=t,this._extraLibs[i]&&this._extraLibs[i].content===e)return{dispose:()=>{}};let n=1;return this._removedExtraLibs[i]&&(n=this._removedExtraLibs[i]+1),this._extraLibs[i]&&(n=this._extraLibs[i].version+1),this._extraLibs[i]={content:e,version:n},this._fireOnDidExtraLibsChangeSoon(),{dispose:()=>{let s=this._extraLibs[i];s&&s.version===n&&(delete this._extraLibs[i],this._removedExtraLibs[i]=n,this._fireOnDidExtraLibsChangeSoon())}}}setExtraLibs(e){for(const t in this._extraLibs)this._removedExtraLibs[t]=this._extraLibs[t].version;if(this._extraLibs=Object.create(null),e&&e.length>0)for(const t of e){const i=t.filePath||`ts:extralib-${Math.random().toString(36).substring(2,15)}`,n=t.content;let s=1;this._removedExtraLibs[i]&&(s=this._removedExtraLibs[i]+1),this._extraLibs[i]={content:n,version:s}}this._fireOnDidExtraLibsChangeSoon()}_fireOnDidExtraLibsChangeSoon(){this._onDidExtraLibsChangeTimeout===-1&&(this._onDidExtraLibsChangeTimeout=window.setTimeout(()=>{this._onDidExtraLibsChangeTimeout=-1,this._onDidExtraLibsChange.fire(void 0)},0))}getCompilerOptions(){return this._compilerOptions}setCompilerOptions(e){this._compilerOptions=e||Object.create(null),this._onDidChange.fire(void 0)}getDiagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(e){this._diagnosticsOptions=e||Object.create(null),this._onDidChange.fire(void 0)}setWorkerOptions(e){this._workerOptions=e||Object.create(null),this._onDidChange.fire(void 0)}setInlayHintsOptions(e){this._inlayHintsOptions=e||Object.create(null),this._onDidChange.fire(void 0)}setMaximumWorkerIdleTime(e){}setEagerModelSync(e){this._eagerModelSync=e}getEagerModelSync(){return this._eagerModelSync}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(void 0)}}const yPe=SPe,tX={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,diagnostics:!0,documentRangeFormattingEdits:!0,signatureHelp:!0,onTypeFormattingEdits:!0,codeActions:!0,inlayHints:!0},iX=new eX({allowNonTsExtensions:!0,target:99},{noSemanticValidation:!1,noSyntaxValidation:!1,onlyVisible:!1},{},{},tX),nX=new eX({allowNonTsExtensions:!0,allowJs:!0,target:99},{noSemanticValidation:!0,noSyntaxValidation:!1,onlyVisible:!1},{},{},tX),xPe=()=>pD().then(o=>o.getTypeScriptWorker()),LPe=()=>pD().then(o=>o.getJavaScriptWorker());function pD(){return we(()=>import("./tsMode-DVpap0Ub.js"),__vite__mapDeps([7,2,3,4]))}de.onLanguage("typescript",()=>pD().then(o=>o.setupTypeScript(iX)));de.onLanguage("javascript",()=>pD().then(o=>o.setupJavaScript(nX)));const sX=Object.freeze(Object.defineProperty({__proto__:null,JsxEmit:YY,ModuleKind:ZY,ModuleResolutionKind:JY,NewLineKind:XY,ScriptTarget:QY,getJavaScriptWorker:LPe,getTypeScriptWorker:xPe,javascriptDefaults:nX,typescriptDefaults:iX,typescriptVersion:yPe},Symbol.toStringTag,{value:"Module"})),oX={},NE={};class S3{static getOrCreate(e){return NE[e]||(NE[e]=new S3(e)),NE[e]}constructor(e){this._languageId=e,this._loadingTriggered=!1,this._lazyLoadPromise=new Promise((t,i)=>{this._lazyLoadPromiseResolve=t,this._lazyLoadPromiseReject=i})}load(){return this._loadingTriggered||(this._loadingTriggered=!0,oX[this._languageId].loader().then(e=>this._lazyLoadPromiseResolve(e),e=>this._lazyLoadPromiseReject(e))),this._lazyLoadPromise}}function ye(o){const e=o.id;oX[e]=o,de.register(o);const t=S3.getOrCreate(e);de.registerTokensProviderFactory(e,{create:async()=>(await t.load()).language}),de.onLanguageEncountered(e,async()=>{const i=await t.load();de.setLanguageConfiguration(e,i.conf)})}ye({id:"abap",extensions:[".abap"],aliases:["abap","ABAP"],loader:()=>we(()=>import("./abap-DLDM7-KI.js"),[])});ye({id:"apex",extensions:[".cls"],aliases:["Apex","apex"],mimetypes:["text/x-apex-source","text/x-apex"],loader:()=>we(()=>import("./apex-DNDY2TF8.js"),[])});ye({id:"azcli",extensions:[".azcli"],aliases:["Azure CLI","azcli"],loader:()=>we(()=>import("./azcli-Y6nb8tq_.js"),[])});ye({id:"bat",extensions:[".bat",".cmd"],aliases:["Batch","bat"],loader:()=>we(()=>import("./bat-BwHxbl9M.js"),[])});ye({id:"bicep",extensions:[".bicep"],aliases:["Bicep"],loader:()=>we(()=>import("./bicep-CFznDFnq.js"),[])});ye({id:"cameligo",extensions:[".mligo"],aliases:["Cameligo"],loader:()=>we(()=>import("./cameligo-Bf6VGUru.js"),[])});ye({id:"clojure",extensions:[".clj",".cljs",".cljc",".edn"],aliases:["clojure","Clojure"],loader:()=>we(()=>import("./clojure-Dnu-v4kV.js"),[])});ye({id:"coffeescript",extensions:[".coffee"],aliases:["CoffeeScript","coffeescript","coffee"],mimetypes:["text/x-coffeescript","text/coffeescript"],loader:()=>we(()=>import("./coffee-Bd8akH9Z.js"),[])});ye({id:"c",extensions:[".c",".h"],aliases:["C","c"],loader:()=>we(()=>import("./cpp-BbWJElDN.js"),[])});ye({id:"cpp",extensions:[".cpp",".cc",".cxx",".hpp",".hh",".hxx"],aliases:["C++","Cpp","cpp"],loader:()=>we(()=>import("./cpp-BbWJElDN.js"),[])});ye({id:"csharp",extensions:[".cs",".csx",".cake"],aliases:["C#","csharp"],loader:()=>we(()=>import("./csharp-Co3qMtFm.js"),[])});ye({id:"csp",extensions:[".csp"],aliases:["CSP","csp"],loader:()=>we(()=>import("./csp-D-4FJmMZ.js"),[])});ye({id:"css",extensions:[".css"],aliases:["CSS","css"],mimetypes:["text/css"],loader:()=>we(()=>import("./css-DdJfP1eB.js"),[])});ye({id:"cypher",extensions:[".cypher",".cyp"],aliases:["Cypher","OpenCypher"],loader:()=>we(()=>import("./cypher-cTPe9QuQ.js"),[])});ye({id:"dart",extensions:[".dart"],aliases:["Dart","dart"],mimetypes:["text/x-dart-source","text/x-dart"],loader:()=>we(()=>import("./dart-BOtBlQCF.js"),[])});ye({id:"dockerfile",extensions:[".dockerfile"],filenames:["Dockerfile"],aliases:["Dockerfile"],loader:()=>we(()=>import("./dockerfile-BG73LgW2.js"),[])});ye({id:"ecl",extensions:[".ecl"],aliases:["ECL","Ecl","ecl"],loader:()=>we(()=>import("./ecl-BEgZUVRK.js"),[])});ye({id:"elixir",extensions:[".ex",".exs"],aliases:["Elixir","elixir","ex"],loader:()=>we(()=>import("./elixir-BkW5O-1t.js"),[])});ye({id:"flow9",extensions:[".flow"],aliases:["Flow9","Flow","flow9","flow"],loader:()=>we(()=>import("./flow9-BeJ5waoc.js"),[])});ye({id:"fsharp",extensions:[".fs",".fsi",".ml",".mli",".fsx",".fsscript"],aliases:["F#","FSharp","fsharp"],loader:()=>we(()=>import("./fsharp-PahG7c26.js"),[])});ye({id:"freemarker2",extensions:[".ftl",".ftlh",".ftlx"],aliases:["FreeMarker2","Apache FreeMarker2"],loader:()=>we(()=>import("./freemarker2-BLqTDIvk.js"),__vite__mapDeps([8,2,3,4])).then(o=>o.TagAutoInterpolationDollar)});ye({id:"freemarker2.tag-angle.interpolation-dollar",aliases:["FreeMarker2 (Angle/Dollar)","Apache FreeMarker2 (Angle/Dollar)"],loader:()=>we(()=>import("./freemarker2-BLqTDIvk.js"),__vite__mapDeps([8,2,3,4])).then(o=>o.TagAngleInterpolationDollar)});ye({id:"freemarker2.tag-bracket.interpolation-dollar",aliases:["FreeMarker2 (Bracket/Dollar)","Apache FreeMarker2 (Bracket/Dollar)"],loader:()=>we(()=>import("./freemarker2-BLqTDIvk.js"),__vite__mapDeps([8,2,3,4])).then(o=>o.TagBracketInterpolationDollar)});ye({id:"freemarker2.tag-angle.interpolation-bracket",aliases:["FreeMarker2 (Angle/Bracket)","Apache FreeMarker2 (Angle/Bracket)"],loader:()=>we(()=>import("./freemarker2-BLqTDIvk.js"),__vite__mapDeps([8,2,3,4])).then(o=>o.TagAngleInterpolationBracket)});ye({id:"freemarker2.tag-bracket.interpolation-bracket",aliases:["FreeMarker2 (Bracket/Bracket)","Apache FreeMarker2 (Bracket/Bracket)"],loader:()=>we(()=>import("./freemarker2-BLqTDIvk.js"),__vite__mapDeps([8,2,3,4])).then(o=>o.TagBracketInterpolationBracket)});ye({id:"freemarker2.tag-auto.interpolation-dollar",aliases:["FreeMarker2 (Auto/Dollar)","Apache FreeMarker2 (Auto/Dollar)"],loader:()=>we(()=>import("./freemarker2-BLqTDIvk.js"),__vite__mapDeps([8,2,3,4])).then(o=>o.TagAutoInterpolationDollar)});ye({id:"freemarker2.tag-auto.interpolation-bracket",aliases:["FreeMarker2 (Auto/Bracket)","Apache FreeMarker2 (Auto/Bracket)"],loader:()=>we(()=>import("./freemarker2-BLqTDIvk.js"),__vite__mapDeps([8,2,3,4])).then(o=>o.TagAutoInterpolationBracket)});ye({id:"go",extensions:[".go"],aliases:["Go"],loader:()=>we(()=>import("./go-acbASCJo.js"),[])});ye({id:"graphql",extensions:[".graphql",".gql"],aliases:["GraphQL","graphql","gql"],mimetypes:["application/graphql"],loader:()=>we(()=>import("./graphql-BxJiqAUM.js"),[])});ye({id:"handlebars",extensions:[".handlebars",".hbs"],aliases:["Handlebars","handlebars","hbs"],mimetypes:["text/x-handlebars-template"],loader:()=>we(()=>import("./handlebars-Dt6_fHq4.js"),__vite__mapDeps([9,2,3,4]))});ye({id:"hcl",extensions:[".tf",".tfvars",".hcl"],aliases:["Terraform","tf","HCL","hcl"],loader:()=>we(()=>import("./hcl-DtV1sZF8.js"),[])});ye({id:"html",extensions:[".html",".htm",".shtml",".xhtml",".mdoc",".jsp",".asp",".aspx",".jshtm"],aliases:["HTML","htm","html","xhtml"],mimetypes:["text/html","text/x-jshtm","text/template","text/ng-template"],loader:()=>we(()=>import("./html-DNZRtspS.js"),__vite__mapDeps([10,2,3,4]))});ye({id:"ini",extensions:[".ini",".properties",".gitconfig"],filenames:["config",".gitattributes",".gitconfig",".editorconfig"],aliases:["Ini","ini"],loader:()=>we(()=>import("./ini-Kd9XrMLS.js"),[])});ye({id:"java",extensions:[".java",".jav"],aliases:["Java","java"],mimetypes:["text/x-java-source","text/x-java"],loader:()=>we(()=>import("./java-CXBNlu9o.js"),[])});ye({id:"javascript",extensions:[".js",".es6",".jsx",".mjs",".cjs"],firstLine:"^#!.*\\bnode",filenames:["jakefile"],aliases:["JavaScript","javascript","js"],mimetypes:["text/javascript"],loader:()=>we(()=>import("./javascript-BsIpPAMU.js"),__vite__mapDeps([11,12,2,3,4]))});ye({id:"julia",extensions:[".jl"],aliases:["julia","Julia"],loader:()=>we(()=>import("./julia-cl7-CwDS.js"),[])});ye({id:"kotlin",extensions:[".kt",".kts"],aliases:["Kotlin","kotlin"],mimetypes:["text/x-kotlin-source","text/x-kotlin"],loader:()=>we(()=>import("./kotlin-s7OhZKlX.js"),[])});ye({id:"less",extensions:[".less"],aliases:["Less","less"],mimetypes:["text/x-less","text/less"],loader:()=>we(()=>import("./less-9HpZscsL.js"),[])});ye({id:"lexon",extensions:[".lex"],aliases:["Lexon"],loader:()=>we(()=>import("./lexon-OrD6JF1K.js"),[])});ye({id:"lua",extensions:[".lua"],aliases:["Lua","lua"],loader:()=>we(()=>import("./lua-Cyyb5UIc.js"),[])});ye({id:"liquid",extensions:[".liquid",".html.liquid"],aliases:["Liquid","liquid"],mimetypes:["application/liquid"],loader:()=>we(()=>import("./liquid-PbV9SRs8.js"),__vite__mapDeps([13,2,3,4]))});ye({id:"m3",extensions:[".m3",".i3",".mg",".ig"],aliases:["Modula-3","Modula3","modula3","m3"],loader:()=>we(()=>import("./m3-B8OfTtLu.js"),[])});ye({id:"markdown",extensions:[".md",".markdown",".mdown",".mkdn",".mkd",".mdwn",".mdtxt",".mdtext"],aliases:["Markdown","markdown"],loader:()=>we(()=>import("./markdown-BFxVWTOG.js"),[])});ye({id:"mdx",extensions:[".mdx"],aliases:["MDX","mdx"],loader:()=>we(()=>import("./mdx-6vkE1AZK.js"),__vite__mapDeps([14,2,3,4]))});ye({id:"mips",extensions:[".s"],aliases:["MIPS","MIPS-V"],mimetypes:["text/x-mips","text/mips","text/plaintext"],loader:()=>we(()=>import("./mips-CiqrrVzr.js"),[])});ye({id:"msdax",extensions:[".dax",".msdax"],aliases:["DAX","MSDAX"],loader:()=>we(()=>import("./msdax-DmeGPVcC.js"),[])});ye({id:"mysql",extensions:[],aliases:["MySQL","mysql"],loader:()=>we(()=>import("./mysql-C_tMU-Nz.js"),[])});ye({id:"objective-c",extensions:[".m"],aliases:["Objective-C"],loader:()=>we(()=>import("./objective-c-BDtDVThU.js"),[])});ye({id:"pascal",extensions:[".pas",".p",".pp"],aliases:["Pascal","pas"],mimetypes:["text/x-pascal-source","text/x-pascal"],loader:()=>we(()=>import("./pascal-vHIfCaH5.js"),[])});ye({id:"pascaligo",extensions:[".ligo"],aliases:["Pascaligo","ligo"],loader:()=>we(()=>import("./pascaligo-DtZ0uQbO.js"),[])});ye({id:"perl",extensions:[".pl",".pm"],aliases:["Perl","pl"],loader:()=>we(()=>import("./perl-Ub6l9XKa.js"),[])});ye({id:"pgsql",extensions:[],aliases:["PostgreSQL","postgres","pg","postgre"],loader:()=>we(()=>import("./pgsql-BlNEE0v7.js"),[])});ye({id:"php",extensions:[".php",".php4",".php5",".phtml",".ctp"],aliases:["PHP","php"],mimetypes:["application/x-php"],loader:()=>we(()=>import("./php-BBUBE1dy.js"),[])});ye({id:"pla",extensions:[".pla"],loader:()=>we(()=>import("./pla-DSh2-awV.js"),[])});ye({id:"postiats",extensions:[".dats",".sats",".hats"],aliases:["ATS","ATS/Postiats"],loader:()=>we(()=>import("./postiats-CocnycG-.js"),[])});ye({id:"powerquery",extensions:[".pq",".pqm"],aliases:["PQ","M","Power Query","Power Query M"],loader:()=>we(()=>import("./powerquery-tScXyioY.js"),[])});ye({id:"powershell",extensions:[".ps1",".psm1",".psd1"],aliases:["PowerShell","powershell","ps","ps1"],loader:()=>we(()=>import("./powershell-COWaemsV.js"),[])});ye({id:"proto",extensions:[".proto"],aliases:["protobuf","Protocol Buffers"],loader:()=>we(()=>import("./protobuf-Brw8urJB.js"),[])});ye({id:"pug",extensions:[".jade",".pug"],aliases:["Pug","Jade","jade"],loader:()=>we(()=>import("./pug-8SOpv6rk.js"),[])});ye({id:"python",extensions:[".py",".rpy",".pyw",".cpy",".gyp",".gypi"],aliases:["Python","py"],firstLine:"^#!/.*\\bpython[0-9.-]*\\b",loader:()=>we(()=>import("./python-OQiB2MoN.js"),__vite__mapDeps([15,2,3,4]))});ye({id:"qsharp",extensions:[".qs"],aliases:["Q#","qsharp"],loader:()=>we(()=>import("./qsharp-Bw9ernYp.js"),[])});ye({id:"r",extensions:[".r",".rhistory",".rmd",".rprofile",".rt"],aliases:["R","r"],loader:()=>we(()=>import("./r-j7ic8hl3.js"),[])});ye({id:"razor",extensions:[".cshtml"],aliases:["Razor","razor"],mimetypes:["text/x-cshtml"],loader:()=>we(()=>import("./razor-C5WSpCq4.js"),__vite__mapDeps([16,2,3,4]))});ye({id:"redis",extensions:[".redis"],aliases:["redis"],loader:()=>we(()=>import("./redis-Bu5POkcn.js"),[])});ye({id:"redshift",extensions:[],aliases:["Redshift","redshift"],loader:()=>we(()=>import("./redshift-Bs9aos_-.js"),[])});ye({id:"restructuredtext",extensions:[".rst"],aliases:["reStructuredText","restructuredtext"],loader:()=>we(()=>import("./restructuredtext-CqXO7rUv.js"),[])});ye({id:"ruby",extensions:[".rb",".rbx",".rjs",".gemspec",".pp"],filenames:["rakefile","Gemfile"],aliases:["Ruby","rb"],loader:()=>we(()=>import("./ruby-zBfavPgS.js"),[])});ye({id:"rust",extensions:[".rs",".rlib"],aliases:["Rust","rust"],loader:()=>we(()=>import("./rust-BzKRNQWT.js"),[])});ye({id:"sb",extensions:[".sb"],aliases:["Small Basic","sb"],loader:()=>we(()=>import("./sb-BBc9UKZt.js"),[])});ye({id:"scala",extensions:[".scala",".sc",".sbt"],aliases:["Scala","scala","SBT","Sbt","sbt","Dotty","dotty"],mimetypes:["text/x-scala-source","text/x-scala","text/x-sbt","text/x-dotty"],loader:()=>we(()=>import("./scala-D9hQfWCl.js"),[])});ye({id:"scheme",extensions:[".scm",".ss",".sch",".rkt"],aliases:["scheme","Scheme"],loader:()=>we(()=>import("./scheme-BPhDTwHR.js"),[])});ye({id:"scss",extensions:[".scss"],aliases:["Sass","sass","scss"],mimetypes:["text/x-scss","text/scss"],loader:()=>we(()=>import("./scss-CBJaRo0y.js"),[])});ye({id:"shell",extensions:[".sh",".bash"],aliases:["Shell","sh"],loader:()=>we(()=>import("./shell-DiJ1NA_G.js"),[])});ye({id:"sol",extensions:[".sol"],aliases:["sol","solidity","Solidity"],loader:()=>we(()=>import("./solidity-Db0IVjzk.js"),[])});ye({id:"aes",extensions:[".aes"],aliases:["aes","sophia","Sophia"],loader:()=>we(()=>import("./sophia-CnS9iZB_.js"),[])});ye({id:"sparql",extensions:[".rq"],aliases:["sparql","SPARQL"],loader:()=>we(()=>import("./sparql-CJmd_6j2.js"),[])});ye({id:"sql",extensions:[".sql"],aliases:["SQL"],loader:()=>we(()=>import("./sql-ClhHkBeG.js"),[])});ye({id:"st",extensions:[".st",".iecst",".iecplc",".lc3lib",".TcPOU",".TcDUT",".TcGVL",".TcIO"],aliases:["StructuredText","scl","stl"],loader:()=>we(()=>import("./st-CHwy0fLd.js"),[])});ye({id:"swift",aliases:["Swift","swift"],extensions:[".swift"],mimetypes:["text/swift"],loader:()=>we(()=>import("./swift-Bqt4WxQ4.js"),[])});ye({id:"systemverilog",extensions:[".sv",".svh"],aliases:["SV","sv","SystemVerilog","systemverilog"],loader:()=>we(()=>import("./systemverilog-Bs9z6M-B.js"),[])});ye({id:"verilog",extensions:[".v",".vh"],aliases:["V","v","Verilog","verilog"],loader:()=>we(()=>import("./systemverilog-Bs9z6M-B.js"),[])});ye({id:"tcl",extensions:[".tcl"],aliases:["tcl","Tcl","tcltk","TclTk","tcl/tk","Tcl/Tk"],loader:()=>we(()=>import("./tcl-Dm6ycUr_.js"),[])});ye({id:"twig",extensions:[".twig"],aliases:["Twig","twig"],mimetypes:["text/x-twig"],loader:()=>we(()=>import("./twig-Csy3S7wG.js"),[])});ye({id:"typescript",extensions:[".ts",".tsx",".cts",".mts"],aliases:["TypeScript","ts","typescript"],mimetypes:["text/typescript"],loader:()=>we(()=>import("./typescript-Cev6QPda.js"),__vite__mapDeps([12,2,3,4]))});ye({id:"typespec",extensions:[".tsp"],aliases:["TypeSpec"],loader:()=>we(()=>import("./typespec-Btyra-wh.js"),[])});ye({id:"vb",extensions:[".vb"],aliases:["Visual Basic","vb"],loader:()=>we(()=>import("./vb-Db0cS2oM.js"),[])});ye({id:"wgsl",extensions:[".wgsl"],aliases:["WebGPU Shading Language","WGSL","wgsl"],loader:()=>we(()=>import("./wgsl-DumH7NcR.js"),[])});ye({id:"xml",extensions:[".xml",".xsd",".dtd",".ascx",".csproj",".config",".props",".targets",".wxi",".wxl",".wxs",".xaml",".svg",".svgz",".opf",".xslt",".xsl"],firstLine:"(\\<\\?xml.*)|(\\we(()=>import("./xml-CSRj6A38.js"),__vite__mapDeps([17,2,3,4]))});ye({id:"yaml",extensions:[".yaml",".yml"],aliases:["YAML","yaml","YML","yml"],mimetypes:["application/x-yaml","text/x-yaml"],loader:()=>we(()=>import("./yaml-dB1gSO3c.js"),__vite__mapDeps([18,2,3,4]))});var kPe=Object.defineProperty,DPe=(o,e,t)=>e in o?kPe(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t,ve=(o,e,t)=>DPe(o,typeof e!="symbol"?e+"":e,t),wS,eV,SS,TE,yS;function IPe(o){return o.method!==void 0}var tV;(function(o){function e(t){return t}o.create=e})(tV||(tV={}));var Kr;(function(o){o.parseError=-32700,o.invalidRequest=-32600,o.methodNotFound=-32601,o.invalidParams=-32602,o.internalError=-32603;function e(s){return-32099<=s&&s<=-32e3}o.isServerError=e;function t(s){if(!e(s))throw new Error("Invalid range for a server error.");return s}o.serverError=t,o.unexpectedServerError=-32e3;function i(s){return!0}o.isApplicationError=i;function n(s){return s}o.applicationError=n,o.genericApplicationError=-320100})(Kr||(Kr={}));var y3=class{constructor(){ve(this,"listeners",new Set),ve(this,"event",o=>(this.listeners.add(o),{dispose:()=>{this.listeners.delete(o)}}))}fire(o){this.listeners.forEach(e=>e(o))}},EPe=class{constructor(o){ve(this,"_value"),ve(this,"eventEmitter"),this._value=o,this.eventEmitter=new y3}get value(){return this._value}set value(o){this._value!==o&&(this._value=o,this.eventEmitter.fire(o))}get onChange(){return this.eventEmitter.event}};function NPe(o,e){const t=setTimeout(e,o);return{dispose:()=>clearTimeout(t)}}function RE(o,e,t){return o instanceof Set?(o.add(e),{dispose:()=>o.delete(e)}):(o.set(e,t),{dispose:()=>o.delete(e)})}var TPe=class{constructor(){ve(this,"_state","none"),ve(this,"promise"),ve(this,"resolve",()=>{}),ve(this,"reject",()=>{}),this.promise=new Promise((o,e)=>{this.resolve=o,this.reject=e})}get state(){return this._state}},rX=(wS=class{constructor(){ve(this,"_unprocessedMessages",[]),ve(this,"_messageListener"),ve(this,"id",wS.id++),ve(this,"_state",new EPe({state:"open"})),ve(this,"state",this._state)}setListener(o){if(this._messageListener=o,!!o)for(;this._unprocessedMessages.length>0&&this._messageListener!==void 0;){const e=this._unprocessedMessages.shift();this._messageListener(e)}}send(o){return this._sendImpl(o)}_dispatchReceivedMessage(o){this._unprocessedMessages.length===0&&this._messageListener?this._messageListener(o):this._unprocessedMessages.push(o)}_onConnectionClosed(){this._state.value={state:"closed",error:void 0}}log(o){return new RPe(this,o??new MPe)}},ve(wS,"id",0),wS),RPe=class{constructor(o,e){ve(this,"baseStream"),ve(this,"logger"),this.baseStream=o,this.logger=e}get state(){return this.baseStream.state}setListener(o){if(o===void 0){this.baseStream.setListener(void 0);return}this.baseStream.setListener(e=>{this.logger.log(this.baseStream,"incoming",e),o(e)})}send(o){return this.logger.log(this.baseStream,"outgoing",o),this.baseStream.send(o)}toString(){return`StreamLogger/${this.baseStream.toString()}`}},MPe=class{log(o,e,t){console.log(`${e==="incoming"?"<-":"->"} [${o.toString()}] ${JSON.stringify(t)}`)}},PPe=class aX{constructor(e){ve(this,"connect"),this.connect=e}mapContext(e){return new aX(t=>this.connect(t?APe(t,e):void 0))}};function APe(o,e){return{handleNotification:(t,i)=>o.handleNotification(t,e(i)),handleRequest:(t,i,n)=>o.handleRequest(t,i,e(n))}}var OPe=class lX{constructor(e,t,i){ve(this,"_stream"),ve(this,"_listener"),ve(this,"_logger"),ve(this,"_unprocessedResponses",new Map),ve(this,"_lastUsedRequestId",0),this._stream=e,this._listener=t,this._logger=i,this._stream.setListener(n=>{IPe(n)?n.id===void 0?this._processNotification(n):this._processRequest(n):this._processResponse(n)})}static createChannel(e,t){let i=!1;return new PPe(n=>{if(i)throw new Error(`A channel to the stream ${e} was already constructed!`);return i=!0,new lX(e,n,t)})}get state(){return this._stream.state}async _processNotification(e){if(e.id!==void 0)throw new Error;if(!this._listener){this._logger&&this._logger.debug({text:"Notification ignored",message:e});return}try{await this._listener.handleNotification({method:e.method,params:e.params||null})}catch(t){this._logger&&this._logger.warn({text:`Exception was thrown while handling notification: ${t}`,exception:t,message:e})}}async _processRequest(e){if(e.id===void 0)throw new Error;let t;if(this._listener)try{t=await this._listener.handleRequest({method:e.method,params:e.params||null},e.id)}catch(n){this._logger&&this._logger.warn({text:`Exception was thrown while handling request: ${n}`,message:e,exception:n}),t={error:{code:Kr.internalError,message:"An unexpected exception was thrown.",data:void 0}}}else this._logger&&this._logger.debug({text:"Received request even though not listening for requests",message:e}),t={error:{code:Kr.methodNotFound,message:"This endpoint does not listen for requests or notifications.",data:void 0}};let i;"result"in t?i={jsonrpc:"2.0",id:e.id,result:t.result}:i={jsonrpc:"2.0",id:e.id,error:t.error},await this._stream.send(i)}_processResponse(e){const t=""+e.id,i=this._unprocessedResponses.get(t);if(!i){this._logger&&this._logger.debug({text:"Got an unexpected response message",message:e});return}this._unprocessedResponses.delete(t),i(e)}_newRequestId(){return this._lastUsedRequestId++}sendRequest(e,t,i){const n={jsonrpc:"2.0",id:this._newRequestId(),method:e.method,params:e.params||void 0};return i&&i(n.id),new Promise((s,r)=>{const a=""+n.id;this._unprocessedResponses.set(a,l=>{"result"in l?s({result:l.result}):(l.error||r(new Error("Response had neither 'result' nor 'error' field set.")),s({error:l.error}))}),this._stream.send(n).then(void 0,l=>{this._unprocessedResponses.delete(a),r(l)})})}sendNotification(e,t){const i={jsonrpc:"2.0",id:void 0,method:e.method,params:e.params||void 0};return this._stream.send(i)}toString(){return"StreamChannel/"+this._stream.toString()}},am;(function(o){function e(){return{deserializeFromJson:n=>({hasErrors:!1,value:n}),serializeToJson:n=>n}}o.sAny=e;function t(){return{deserializeFromJson:n=>({hasErrors:!1,value:{}}),serializeToJson:n=>({})}}o.sEmptyObject=t;function i(){return{deserializeFromJson:n=>({hasErrors:!1,value:void 0}),serializeToJson:n=>null}}o.sVoidFromNull=i})(am||(am={}));const cX=Symbol("OptionalMethodNotFound");var dX=class{contextualize(o){return new FPe(this,o)}},FPe=class extends dX{constructor(o,e){super(),ve(this,"underylingTypedChannel"),ve(this,"converters"),this.underylingTypedChannel=o,this.converters=e}async request(o,e,t){const i=await this.converters.getSendContext(t);return this.underylingTypedChannel.request(o,e,i)}async notify(o,e,t){const i=await this.converters.getSendContext(t);return this.underylingTypedChannel.notify(o,e,i)}registerNotificationHandler(o,e){return this.underylingTypedChannel.registerNotificationHandler(o,async(t,i)=>await e(t,await this.converters.getNewContext(i)))}registerRequestHandler(o,e){return this.underylingTypedChannel.registerRequestHandler(o,async(t,i,n)=>await e(t,i,await this.converters.getNewContext(n)))}},EA=class hX extends dX{constructor(e,t={}){super(),ve(this,"channelCtor"),ve(this,"_requestSender"),ve(this,"_handler",new Map),ve(this,"_unknownNotificationHandler",new Set),ve(this,"_timeout"),ve(this,"sendExceptionDetails",!1),ve(this,"_logger"),ve(this,"listeningDeferred",new TPe),ve(this,"onListening",this.listeningDeferred.promise),ve(this,"_requestDidErrorEventEmitter",new y3),ve(this,"onRequestDidError",this._requestDidErrorEventEmitter.event),this.channelCtor=e,this._logger=t.logger,this.sendExceptionDetails=!!t.sendExceptionDetails,this._timeout=NPe(1e3,()=>{this._requestSender||console.warn(`"${this.startListen.name}" has not been called within 1 second after construction of this channel. Did you forget to call it?`,this)})}static fromTransport(e,t={}){return new hX(OPe.createChannel(e,t.logger),t)}startListen(){if(this._requestSender)throw new Error(`"${this.startListen.name}" can be called only once, but it already has been called.`);this._timeout&&(this._timeout.dispose(),this._timeout=void 0),this._requestSender=this.channelCtor.connect({handleRequest:(e,t,i)=>this.handleRequest(e,t,i),handleNotification:(e,t)=>this.handleNotification(e,t)}),this.listeningDeferred.resolve()}checkChannel(e){if(!e)throw new Error(`"${this.startListen.name}" must be called before any messages can be sent or received.`);return!0}async handleRequest(e,t,i){const n=this._handler.get(e.method);if(!n)return this._logger&&this._logger.debug({text:`No request handler for "${e.method}".`,data:{requestObject:e}}),{error:{code:Kr.methodNotFound,message:`No request handler for "${e.method}".`,data:{method:e.method}}};if(n.kind!="request"){const r=`"${e.method}" is registered as notification, but was sent as request.`;return this._logger&&this._logger.debug({text:r,data:{requestObject:e}}),{error:{code:Kr.invalidRequest,message:r,data:{method:e.method}}}}const s=n.requestType.paramsSerializer.deserializeFromJson(e.params);if(s.hasErrors){const r=`Got invalid params: ${s.errorMessage}`;return this._logger&&this._logger.debug({text:r,data:{requestObject:e,errorMessage:s.errorMessage}}),{error:{code:Kr.invalidParams,message:r,data:{errors:s.errorMessage}}}}else{const r=s.value;let a;try{const l=await n.handler(r,t,i);if("error"in l||"errorMessage"in l){const c=l.error?n.requestType.errorSerializer.serializeToJson(l.error):void 0;a={error:{code:l.errorCode||Kr.genericApplicationError,message:l.errorMessage||"An error was returned",data:c}}}else a={result:n.requestType.resultSerializer.serializeToJson(l.ok)}}catch(l){l instanceof nV?a={error:{code:l.code,message:l.message}}:(this._logger&&this._logger.warn({text:`An exception was thrown while handling a request: ${l}.`,exception:l,data:{requestObject:e}}),a={error:{code:Kr.unexpectedServerError,message:this.sendExceptionDetails?`An exception was thrown while handling a request: ${l}.`:"Server has thrown an unexpected exception"}})}return a}}async handleNotification(e,t){const i=this._handler.get(e.method);if(!i){for(const r of this._unknownNotificationHandler)r(e);this._unknownNotificationHandler.size===0&&this._logger&&this._logger.debug({text:`Unhandled notification "${e.method}"`,data:{requestObject:e}});return}if(i.kind!="notification"){this._logger&&this._logger.debug({text:`"${e.method}" is registered as request, but was sent as notification.`,data:{requestObject:e}});return}const n=i.notificationType.paramsSerializer.deserializeFromJson(e.params);if(n.hasErrors){this._logger&&this._logger.debug({text:`Got invalid params: ${n}`,data:{requestObject:e,errorMessage:n.errorMessage}});return}const s=n.value;for(const r of i.handlers)try{r(s,t)}catch(a){this._logger&&this._logger.warn({text:`An exception was thrown while handling a notification: ${a}.`,exception:a,data:{requestObject:e}})}}registerUnknownNotificationHandler(e){return RE(this._unknownNotificationHandler,e)}registerRequestHandler(e,t){if(this._handler.get(e.method))throw new Error(`Handler with method "${e.method}" already registered.`);return RE(this._handler,e.method,{kind:"request",requestType:e,handler:t})}registerNotificationHandler(e,t){let i=this._handler.get(e.method);if(!i)i={kind:"notification",notificationType:e,handlers:new Set},this._handler.set(e.method,i);else{if(i.kind!=="notification")throw new Error(`Method "${e.method}" was already registered as request handler.`);if(i.notificationType!==e)throw new Error(`Method "${e.method}" was registered for a different type.`)}return RE(i.handlers,t)}getRegisteredTypes(){const e=[];for(const t of this._handler.values())t.kind==="notification"?e.push(t.notificationType):t.kind==="request"&&e.push(t.requestType);return e}async request(e,t,i){if(!this.checkChannel(this._requestSender))throw new Error("Impossible");const n=e.paramsSerializer.serializeToJson(t);iV(n);const s=await this._requestSender.sendRequest({method:e.method,params:n},i);if("error"in s){if(e.isOptional&&s.error.code===Kr.methodNotFound)return cX;let r;if(s.error.data!==void 0){const l=e.errorSerializer.deserializeFromJson(s.error.data);if(l.hasErrors)throw new Error(l.errorMessage);r=l.value}else r=void 0;const a=new nV(s.error.message,r,s.error.code);throw this._requestDidErrorEventEmitter.fire({error:a}),a}else{const r=e.resultSerializer.deserializeFromJson(s.result);if(r.hasErrors)throw new Error("Could not deserialize response: "+r.errorMessage+` + hint: use the 'bracket' attribute if matching on equal brackets is required.`);if(typeof a.open=="string"&&typeof a.token=="string"&&typeof a.close=="string")s.push({token:a.token+t.tokenPostfix,open:jc(t,a.open),close:jc(t,a.close)});else throw zt(t,"every element in the 'brackets' array must be a '{open,close,token}' object or array")}return t.brackets=s,t.noThrow=!0,t}function L2e(o){mm.registerLanguage(o)}function k2e(){let o=[];return o=o.concat(mm.getLanguages()),o}function D2e(o){return Ne.get(_i).languageIdCodec.encodeLanguageId(o)}function I2e(o,e){return Ne.withServices(()=>{const i=Ne.get(_i).onDidRequestRichLanguageFeatures(n=>{n===o&&(i.dispose(),e())});return i})}function E2e(o,e){return Ne.withServices(()=>{const i=Ne.get(_i).onDidRequestBasicLanguageFeatures(n=>{n===o&&(i.dispose(),e())});return i})}function N2e(o,e){if(!Ne.get(_i).isRegisteredLanguageId(o))throw new Error(`Cannot set configuration for unknown language ${o}`);return Ne.get(ti).register(o,e,100)}class T2e{constructor(e,t){this._languageId=e,this._actual=t}dispose(){}getInitialState(){return this._actual.getInitialState()}tokenize(e,t,i){if(typeof this._actual.tokenize=="function")return iw.adaptTokenize(this._languageId,this._actual,e,i);throw new Error("Not supported!")}tokenizeEncoded(e,t,i){const n=this._actual.tokenizeEncoded(e,i);return new JL(n.tokens,n.endState)}}class iw{constructor(e,t,i,n){this._languageId=e,this._actual=t,this._languageService=i,this._standaloneThemeService=n}dispose(){}getInitialState(){return this._actual.getInitialState()}static _toClassicTokens(e,t){const i=[];let n=0;for(let s=0,r=e.length;s0&&s[r-1]===u)continue;let g=h.startIndex;c===0?g=0:g{const i=await Promise.resolve(e.create());return i?R2e(i)?TY(o,i):new Zv(Ne.get(_i),Ne.get(er),o,EY(o,i),Ne.get(Pe)):null});return ui.registerFactory(o,t)}function A2e(o,e){if(!Ne.get(_i).isRegisteredLanguageId(o))throw new Error(`Cannot set tokens provider for unknown language ${o}`);return NY(e)?_3(o,{create:()=>e}):ui.register(o,TY(o,e))}function O2e(o,e){const t=i=>new Zv(Ne.get(_i),Ne.get(er),o,EY(o,i),Ne.get(Pe));return NY(e)?_3(o,{create:()=>e}):ui.register(o,t(e))}function F2e(o,e){return Ne.get(he).referenceProvider.register(o,e)}function W2e(o,e){return Ne.get(he).renameProvider.register(o,e)}function B2e(o,e){return Ne.get(he).newSymbolNamesProvider.register(o,e)}function H2e(o,e){return Ne.get(he).signatureHelpProvider.register(o,e)}function V2e(o,e){return Ne.get(he).hoverProvider.register(o,{provideHover:async(i,n,s,r)=>{const a=i.getWordAtPosition(n);return Promise.resolve(e.provideHover(i,n,s,r)).then(l=>{if(l)return!l.range&&a&&(l.range=new L(n.lineNumber,a.startColumn,n.lineNumber,a.endColumn)),l.range||(l.range=new L(n.lineNumber,n.column,n.lineNumber,n.column)),l})}})}function z2e(o,e){return Ne.get(he).documentSymbolProvider.register(o,e)}function U2e(o,e){return Ne.get(he).documentHighlightProvider.register(o,e)}function $2e(o,e){return Ne.get(he).linkedEditingRangeProvider.register(o,e)}function j2e(o,e){return Ne.get(he).definitionProvider.register(o,e)}function q2e(o,e){return Ne.get(he).implementationProvider.register(o,e)}function K2e(o,e){return Ne.get(he).typeDefinitionProvider.register(o,e)}function G2e(o,e){return Ne.get(he).codeLensProvider.register(o,e)}function Z2e(o,e,t){return Ne.get(he).codeActionProvider.register(o,{providedCodeActionKinds:t?.providedCodeActionKinds,documentation:t?.documentation,provideCodeActions:(n,s,r,a)=>{const c=Ne.get($l).read({resource:n.uri}).filter(d=>L.areIntersectingOrTouching(d,s));return e.provideCodeActions(n,s,{markers:c,only:r.only,trigger:r.trigger},a)},resolveCodeAction:e.resolveCodeAction})}function Y2e(o,e){return Ne.get(he).documentFormattingEditProvider.register(o,e)}function X2e(o,e){return Ne.get(he).documentRangeFormattingEditProvider.register(o,e)}function Q2e(o,e){return Ne.get(he).onTypeFormattingEditProvider.register(o,e)}function J2e(o,e){return Ne.get(he).linkProvider.register(o,e)}function ePe(o,e){return Ne.get(he).completionProvider.register(o,e)}function tPe(o,e){return Ne.get(he).colorProvider.register(o,e)}function iPe(o,e){return Ne.get(he).foldingRangeProvider.register(o,e)}function nPe(o,e){return Ne.get(he).declarationProvider.register(o,e)}function sPe(o,e){return Ne.get(he).selectionRangeProvider.register(o,e)}function oPe(o,e){return Ne.get(he).documentSemanticTokensProvider.register(o,e)}function rPe(o,e){return Ne.get(he).documentRangeSemanticTokensProvider.register(o,e)}function aPe(o,e){return Ne.get(he).inlineCompletionsProvider.register(o,e)}function lPe(o,e){return Ne.get(he).inlayHintsProvider.register(o,e)}function cPe(){return{register:L2e,getLanguages:k2e,onLanguage:I2e,onLanguageEncountered:E2e,getEncodedLanguageId:D2e,setLanguageConfiguration:N2e,setColorMap:P2e,registerTokensProviderFactory:_3,setTokensProvider:A2e,setMonarchTokensProvider:O2e,registerReferenceProvider:F2e,registerRenameProvider:W2e,registerNewSymbolNameProvider:B2e,registerCompletionItemProvider:ePe,registerSignatureHelpProvider:H2e,registerHoverProvider:V2e,registerDocumentSymbolProvider:z2e,registerDocumentHighlightProvider:U2e,registerLinkedEditingRangeProvider:$2e,registerDefinitionProvider:j2e,registerImplementationProvider:q2e,registerTypeDefinitionProvider:K2e,registerCodeLensProvider:G2e,registerCodeActionProvider:Z2e,registerDocumentFormattingEditProvider:Y2e,registerDocumentRangeFormattingEditProvider:X2e,registerOnTypeFormattingEditProvider:Q2e,registerLinkProvider:J2e,registerColorProvider:tPe,registerFoldingRangeProvider:iPe,registerDeclarationProvider:nPe,registerSelectionRangeProvider:sPe,registerDocumentSemanticTokensProvider:oPe,registerDocumentRangeSemanticTokensProvider:rPe,registerInlineCompletionsProvider:aPe,registerInlayHintsProvider:lPe,DocumentHighlightKind:j2,CompletionItemKind:B2,CompletionItemTag:H2,CompletionItemInsertTextRule:W2,SymbolKind:yP,SymbolTag:xP,IndentAction:Q2,CompletionTriggerKind:V2,SignatureHelpTriggerKind:SP,InlayHintKind:eP,InlineCompletionTriggerKind:nP,CodeActionTriggerType:F2,NewSymbolNameTag:dP,NewSymbolNameTriggerKind:hP,PartialAcceptTriggerKind:fP,HoverVerbosityAction:X2,InlineCompletionEndOfLifeReasonKind:tP,InlineCompletionHintStyle:iP,FoldingRangeKind:df,SelectedSuggestionInfo:c$,EditDeltaInfo:ov}}rs.wrappingIndent.defaultValue=0;rs.glyphMargin.defaultValue=!1;rs.autoIndent.defaultValue=3;rs.overviewRulerLanes.defaultValue=2;Vm.setFormatterSelector((o,e,t)=>Promise.resolve(o[0]));const As=sY();As.editor=C2e();As.languages=cPe();const RY=As.CancellationTokenSource,Ph=As.Emitter,MY=As.KeyCode,PY=As.KeyMod,_d=As.Position,x_=As.Range,AY=As.Selection,OY=As.SelectionDirection,Zr=As.MarkerSeverity,nL=As.MarkerTag,hD=As.Uri,FY=As.Token,Dl=As.editor,de=As.languages,dPe=FA(),rm=globalThis;(dPe?.globalAPI||typeof rm.define=="function"&&rm.define.amd)&&(rm.monaco=As);typeof rm.require<"u"&&typeof rm.require.config=="function"&&rm.require.config({ignoreDuplicateModules:["vscode-languageserver-types","vscode-languageserver-types/main","vscode-languageserver-textdocument","vscode-languageserver-textdocument/main","vscode-nls","vscode-nls/vscode-nls","jsonc-parser","jsonc-parser/main","vscode-uri","vscode-uri/index","vs/basic-languages/typescript/typescript"]});const hPe=Object.freeze(Object.defineProperty({__proto__:null,CancellationTokenSource:RY,Emitter:Ph,KeyCode:MY,KeyMod:PY,MarkerSeverity:Zr,MarkerTag:nL,Position:_d,Range:x_,Selection:AY,SelectionDirection:OY,Token:FY,Uri:hD,editor:Dl,languages:de},Symbol.toStringTag,{value:"Module"}));let b3=class{constructor(e,t,i){this._onDidChange=new Ph,this._languageId=e,this.setOptions(t),this.setModeConfiguration(i)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this.options}get options(){return this._options}setOptions(e){this._options=e||Object.create(null),this._onDidChange.fire(this)}setDiagnosticsOptions(e){this.setOptions(e)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}};const C3={validate:!0,lint:{compatibleVendorPrefixes:"ignore",vendorPrefix:"warning",duplicateProperties:"warning",emptyRules:"warning",importStatement:"ignore",boxModel:"ignore",universalSelector:"ignore",zeroUnits:"ignore",fontFaceProperties:"warning",hexColorLength:"error",argumentsInColorFunction:"error",unknownProperties:"warning",ieHack:"ignore",unknownVendorSpecificProperties:"ignore",propertyIgnoredDueToDisplay:"warning",important:"ignore",float:"ignore",idSelector:"ignore"},data:{useDefaultDataProvider:!0},format:{newlineBetweenSelectors:!0,newlineBetweenRules:!0,spaceAroundSelectorSeparator:!1,braceStyle:"collapse",maxPreserveNewLines:void 0,preserveNewLines:!0}},v3={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0,documentFormattingEdits:!0,documentRangeFormattingEdits:!0},WY=new b3("css",C3,v3),BY=new b3("scss",C3,v3),HY=new b3("less",C3,v3);function w3(){return we(()=>import("./cssMode-43LALI1D.js"),__vite__mapDeps([0,1,2,3,4]))}de.onLanguage("less",()=>{w3().then(o=>o.setupMode(HY))});de.onLanguage("scss",()=>{w3().then(o=>o.setupMode(BY))});de.onLanguage("css",()=>{w3().then(o=>o.setupMode(WY))});const VY=Object.freeze(Object.defineProperty({__proto__:null,cssDefaults:WY,lessDefaults:HY,scssDefaults:BY},Symbol.toStringTag,{value:"Module"}));let uPe=class{constructor(e,t,i){this._onDidChange=new Ph,this._languageId=e,this.setOptions(t),this.setModeConfiguration(i)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get options(){return this._options}get modeConfiguration(){return this._modeConfiguration}setOptions(e){this._options=e||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}};const gPe={tabSize:4,insertSpaces:!1,wrapLineLength:120,unformatted:'default": "a, abbr, acronym, b, bdo, big, br, button, cite, code, dfn, em, i, img, input, kbd, label, map, object, q, samp, select, small, span, strong, sub, sup, textarea, tt, var',contentUnformatted:"pre",indentInnerHtml:!1,preserveNewLines:!0,maxPreserveNewLines:void 0,indentHandlebars:!1,endWithNewline:!1,extraLiners:"head, body, /html",wrapAttributes:"auto"},uD={format:gPe,suggest:{},data:{useDefaultDataProvider:!0}};function gD(o){return{completionItems:!0,hovers:!0,documentSymbols:!0,links:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,selectionRanges:!0,diagnostics:o===bC,documentFormattingEdits:o===bC,documentRangeFormattingEdits:o===bC}}const bC="html",Q6="handlebars",J6="razor",zY=fD(bC,uD,gD(bC)),fPe=zY.defaults,UY=fD(Q6,uD,gD(Q6)),pPe=UY.defaults,$Y=fD(J6,uD,gD(J6)),mPe=$Y.defaults;function _Pe(){return we(()=>import("./htmlMode-CKzw1Cpu.js"),__vite__mapDeps([5,1,2,3,4]))}function fD(o,e=uD,t=gD(o)){const i=new uPe(o,e,t);let n;const s=de.onLanguage(o,async()=>{n=(await _Pe()).setupMode(i)});return{defaults:i,dispose(){s.dispose(),n?.dispose(),n=void 0}}}const jY=Object.freeze(Object.defineProperty({__proto__:null,handlebarDefaults:pPe,handlebarLanguageService:UY,htmlDefaults:fPe,htmlLanguageService:zY,razorDefaults:mPe,razorLanguageService:$Y,registerHTMLLanguageService:fD},Symbol.toStringTag,{value:"Module"}));let bPe=class{constructor(e,t,i){this._onDidChange=new Ph,this._languageId=e,this.setDiagnosticsOptions(t),this.setModeConfiguration(i)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(e){this._diagnosticsOptions=e||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}};const CPe={validate:!0,allowComments:!0,schemas:[],enableSchemaRequest:!1,schemaRequest:"warning",schemaValidation:"warning",comments:"error",trailingCommas:"error"},vPe={documentFormattingEdits:!0,documentRangeFormattingEdits:!0,completionItems:!0,hovers:!0,documentSymbols:!0,tokens:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0},qY=new bPe("json",CPe,vPe),wPe=()=>KY().then(o=>o.getWorker());function KY(){return we(()=>import("./jsonMode-rJNh1ua1.js"),__vite__mapDeps([6,1,2,3,4]))}de.register({id:"json",extensions:[".json",".bowerrc",".jshintrc",".jscsrc",".eslintrc",".babelrc",".har"],aliases:["JSON","json"],mimetypes:["application/json"]});de.onLanguage("json",()=>{KY().then(o=>o.setupMode(qY))});const GY=Object.freeze(Object.defineProperty({__proto__:null,getWorker:wPe,jsonDefaults:qY},Symbol.toStringTag,{value:"Module"})),SPe="5.9.3";var ZY=(o=>(o[o.None=0]="None",o[o.CommonJS=1]="CommonJS",o[o.AMD=2]="AMD",o[o.UMD=3]="UMD",o[o.System=4]="System",o[o.ES2015=5]="ES2015",o[o.ESNext=99]="ESNext",o))(ZY||{}),YY=(o=>(o[o.None=0]="None",o[o.Preserve=1]="Preserve",o[o.React=2]="React",o[o.ReactNative=3]="ReactNative",o[o.ReactJSX=4]="ReactJSX",o[o.ReactJSXDev=5]="ReactJSXDev",o))(YY||{}),XY=(o=>(o[o.CarriageReturnLineFeed=0]="CarriageReturnLineFeed",o[o.LineFeed=1]="LineFeed",o))(XY||{}),QY=(o=>(o[o.ES3=0]="ES3",o[o.ES5=1]="ES5",o[o.ES2015=2]="ES2015",o[o.ES2016=3]="ES2016",o[o.ES2017=4]="ES2017",o[o.ES2018=5]="ES2018",o[o.ES2019=6]="ES2019",o[o.ES2020=7]="ES2020",o[o.ESNext=99]="ESNext",o[o.JSON=100]="JSON",o[o.Latest=99]="Latest",o))(QY||{}),JY=(o=>(o[o.Classic=1]="Classic",o[o.NodeJs=2]="NodeJs",o))(JY||{});class eX{constructor(e,t,i,n,s){this._onDidChange=new Ph,this._onDidExtraLibsChange=new Ph,this._extraLibs=Object.create(null),this._removedExtraLibs=Object.create(null),this._eagerModelSync=!1,this.setCompilerOptions(e),this.setDiagnosticsOptions(t),this.setWorkerOptions(i),this.setInlayHintsOptions(n),this.setModeConfiguration(s),this._onDidExtraLibsChangeTimeout=-1}get onDidChange(){return this._onDidChange.event}get onDidExtraLibsChange(){return this._onDidExtraLibsChange.event}get modeConfiguration(){return this._modeConfiguration}get workerOptions(){return this._workerOptions}get inlayHintsOptions(){return this._inlayHintsOptions}getExtraLibs(){return this._extraLibs}addExtraLib(e,t){let i;if(typeof t>"u"?i=`ts:extralib-${Math.random().toString(36).substring(2,15)}`:i=t,this._extraLibs[i]&&this._extraLibs[i].content===e)return{dispose:()=>{}};let n=1;return this._removedExtraLibs[i]&&(n=this._removedExtraLibs[i]+1),this._extraLibs[i]&&(n=this._extraLibs[i].version+1),this._extraLibs[i]={content:e,version:n},this._fireOnDidExtraLibsChangeSoon(),{dispose:()=>{let s=this._extraLibs[i];s&&s.version===n&&(delete this._extraLibs[i],this._removedExtraLibs[i]=n,this._fireOnDidExtraLibsChangeSoon())}}}setExtraLibs(e){for(const t in this._extraLibs)this._removedExtraLibs[t]=this._extraLibs[t].version;if(this._extraLibs=Object.create(null),e&&e.length>0)for(const t of e){const i=t.filePath||`ts:extralib-${Math.random().toString(36).substring(2,15)}`,n=t.content;let s=1;this._removedExtraLibs[i]&&(s=this._removedExtraLibs[i]+1),this._extraLibs[i]={content:n,version:s}}this._fireOnDidExtraLibsChangeSoon()}_fireOnDidExtraLibsChangeSoon(){this._onDidExtraLibsChangeTimeout===-1&&(this._onDidExtraLibsChangeTimeout=window.setTimeout(()=>{this._onDidExtraLibsChangeTimeout=-1,this._onDidExtraLibsChange.fire(void 0)},0))}getCompilerOptions(){return this._compilerOptions}setCompilerOptions(e){this._compilerOptions=e||Object.create(null),this._onDidChange.fire(void 0)}getDiagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(e){this._diagnosticsOptions=e||Object.create(null),this._onDidChange.fire(void 0)}setWorkerOptions(e){this._workerOptions=e||Object.create(null),this._onDidChange.fire(void 0)}setInlayHintsOptions(e){this._inlayHintsOptions=e||Object.create(null),this._onDidChange.fire(void 0)}setMaximumWorkerIdleTime(e){}setEagerModelSync(e){this._eagerModelSync=e}getEagerModelSync(){return this._eagerModelSync}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(void 0)}}const yPe=SPe,tX={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,diagnostics:!0,documentRangeFormattingEdits:!0,signatureHelp:!0,onTypeFormattingEdits:!0,codeActions:!0,inlayHints:!0},iX=new eX({allowNonTsExtensions:!0,target:99},{noSemanticValidation:!1,noSyntaxValidation:!1,onlyVisible:!1},{},{},tX),nX=new eX({allowNonTsExtensions:!0,allowJs:!0,target:99},{noSemanticValidation:!0,noSyntaxValidation:!1,onlyVisible:!1},{},{},tX),xPe=()=>pD().then(o=>o.getTypeScriptWorker()),LPe=()=>pD().then(o=>o.getJavaScriptWorker());function pD(){return we(()=>import("./tsMode-lkHgywyY.js"),__vite__mapDeps([7,2,3,4]))}de.onLanguage("typescript",()=>pD().then(o=>o.setupTypeScript(iX)));de.onLanguage("javascript",()=>pD().then(o=>o.setupJavaScript(nX)));const sX=Object.freeze(Object.defineProperty({__proto__:null,JsxEmit:YY,ModuleKind:ZY,ModuleResolutionKind:JY,NewLineKind:XY,ScriptTarget:QY,getJavaScriptWorker:LPe,getTypeScriptWorker:xPe,javascriptDefaults:nX,typescriptDefaults:iX,typescriptVersion:yPe},Symbol.toStringTag,{value:"Module"})),oX={},NE={};class S3{static getOrCreate(e){return NE[e]||(NE[e]=new S3(e)),NE[e]}constructor(e){this._languageId=e,this._loadingTriggered=!1,this._lazyLoadPromise=new Promise((t,i)=>{this._lazyLoadPromiseResolve=t,this._lazyLoadPromiseReject=i})}load(){return this._loadingTriggered||(this._loadingTriggered=!0,oX[this._languageId].loader().then(e=>this._lazyLoadPromiseResolve(e),e=>this._lazyLoadPromiseReject(e))),this._lazyLoadPromise}}function ye(o){const e=o.id;oX[e]=o,de.register(o);const t=S3.getOrCreate(e);de.registerTokensProviderFactory(e,{create:async()=>(await t.load()).language}),de.onLanguageEncountered(e,async()=>{const i=await t.load();de.setLanguageConfiguration(e,i.conf)})}ye({id:"abap",extensions:[".abap"],aliases:["abap","ABAP"],loader:()=>we(()=>import("./abap-DLDM7-KI.js"),[])});ye({id:"apex",extensions:[".cls"],aliases:["Apex","apex"],mimetypes:["text/x-apex-source","text/x-apex"],loader:()=>we(()=>import("./apex-DNDY2TF8.js"),[])});ye({id:"azcli",extensions:[".azcli"],aliases:["Azure CLI","azcli"],loader:()=>we(()=>import("./azcli-Y6nb8tq_.js"),[])});ye({id:"bat",extensions:[".bat",".cmd"],aliases:["Batch","bat"],loader:()=>we(()=>import("./bat-BwHxbl9M.js"),[])});ye({id:"bicep",extensions:[".bicep"],aliases:["Bicep"],loader:()=>we(()=>import("./bicep-CFznDFnq.js"),[])});ye({id:"cameligo",extensions:[".mligo"],aliases:["Cameligo"],loader:()=>we(()=>import("./cameligo-Bf6VGUru.js"),[])});ye({id:"clojure",extensions:[".clj",".cljs",".cljc",".edn"],aliases:["clojure","Clojure"],loader:()=>we(()=>import("./clojure-Dnu-v4kV.js"),[])});ye({id:"coffeescript",extensions:[".coffee"],aliases:["CoffeeScript","coffeescript","coffee"],mimetypes:["text/x-coffeescript","text/coffeescript"],loader:()=>we(()=>import("./coffee-Bd8akH9Z.js"),[])});ye({id:"c",extensions:[".c",".h"],aliases:["C","c"],loader:()=>we(()=>import("./cpp-BbWJElDN.js"),[])});ye({id:"cpp",extensions:[".cpp",".cc",".cxx",".hpp",".hh",".hxx"],aliases:["C++","Cpp","cpp"],loader:()=>we(()=>import("./cpp-BbWJElDN.js"),[])});ye({id:"csharp",extensions:[".cs",".csx",".cake"],aliases:["C#","csharp"],loader:()=>we(()=>import("./csharp-Co3qMtFm.js"),[])});ye({id:"csp",extensions:[".csp"],aliases:["CSP","csp"],loader:()=>we(()=>import("./csp-D-4FJmMZ.js"),[])});ye({id:"css",extensions:[".css"],aliases:["CSS","css"],mimetypes:["text/css"],loader:()=>we(()=>import("./css-DdJfP1eB.js"),[])});ye({id:"cypher",extensions:[".cypher",".cyp"],aliases:["Cypher","OpenCypher"],loader:()=>we(()=>import("./cypher-cTPe9QuQ.js"),[])});ye({id:"dart",extensions:[".dart"],aliases:["Dart","dart"],mimetypes:["text/x-dart-source","text/x-dart"],loader:()=>we(()=>import("./dart-BOtBlQCF.js"),[])});ye({id:"dockerfile",extensions:[".dockerfile"],filenames:["Dockerfile"],aliases:["Dockerfile"],loader:()=>we(()=>import("./dockerfile-BG73LgW2.js"),[])});ye({id:"ecl",extensions:[".ecl"],aliases:["ECL","Ecl","ecl"],loader:()=>we(()=>import("./ecl-BEgZUVRK.js"),[])});ye({id:"elixir",extensions:[".ex",".exs"],aliases:["Elixir","elixir","ex"],loader:()=>we(()=>import("./elixir-BkW5O-1t.js"),[])});ye({id:"flow9",extensions:[".flow"],aliases:["Flow9","Flow","flow9","flow"],loader:()=>we(()=>import("./flow9-BeJ5waoc.js"),[])});ye({id:"fsharp",extensions:[".fs",".fsi",".ml",".mli",".fsx",".fsscript"],aliases:["F#","FSharp","fsharp"],loader:()=>we(()=>import("./fsharp-PahG7c26.js"),[])});ye({id:"freemarker2",extensions:[".ftl",".ftlh",".ftlx"],aliases:["FreeMarker2","Apache FreeMarker2"],loader:()=>we(()=>import("./freemarker2-B2ItDy_k.js"),__vite__mapDeps([8,2,3,4])).then(o=>o.TagAutoInterpolationDollar)});ye({id:"freemarker2.tag-angle.interpolation-dollar",aliases:["FreeMarker2 (Angle/Dollar)","Apache FreeMarker2 (Angle/Dollar)"],loader:()=>we(()=>import("./freemarker2-B2ItDy_k.js"),__vite__mapDeps([8,2,3,4])).then(o=>o.TagAngleInterpolationDollar)});ye({id:"freemarker2.tag-bracket.interpolation-dollar",aliases:["FreeMarker2 (Bracket/Dollar)","Apache FreeMarker2 (Bracket/Dollar)"],loader:()=>we(()=>import("./freemarker2-B2ItDy_k.js"),__vite__mapDeps([8,2,3,4])).then(o=>o.TagBracketInterpolationDollar)});ye({id:"freemarker2.tag-angle.interpolation-bracket",aliases:["FreeMarker2 (Angle/Bracket)","Apache FreeMarker2 (Angle/Bracket)"],loader:()=>we(()=>import("./freemarker2-B2ItDy_k.js"),__vite__mapDeps([8,2,3,4])).then(o=>o.TagAngleInterpolationBracket)});ye({id:"freemarker2.tag-bracket.interpolation-bracket",aliases:["FreeMarker2 (Bracket/Bracket)","Apache FreeMarker2 (Bracket/Bracket)"],loader:()=>we(()=>import("./freemarker2-B2ItDy_k.js"),__vite__mapDeps([8,2,3,4])).then(o=>o.TagBracketInterpolationBracket)});ye({id:"freemarker2.tag-auto.interpolation-dollar",aliases:["FreeMarker2 (Auto/Dollar)","Apache FreeMarker2 (Auto/Dollar)"],loader:()=>we(()=>import("./freemarker2-B2ItDy_k.js"),__vite__mapDeps([8,2,3,4])).then(o=>o.TagAutoInterpolationDollar)});ye({id:"freemarker2.tag-auto.interpolation-bracket",aliases:["FreeMarker2 (Auto/Bracket)","Apache FreeMarker2 (Auto/Bracket)"],loader:()=>we(()=>import("./freemarker2-B2ItDy_k.js"),__vite__mapDeps([8,2,3,4])).then(o=>o.TagAutoInterpolationBracket)});ye({id:"go",extensions:[".go"],aliases:["Go"],loader:()=>we(()=>import("./go-acbASCJo.js"),[])});ye({id:"graphql",extensions:[".graphql",".gql"],aliases:["GraphQL","graphql","gql"],mimetypes:["application/graphql"],loader:()=>we(()=>import("./graphql-BxJiqAUM.js"),[])});ye({id:"handlebars",extensions:[".handlebars",".hbs"],aliases:["Handlebars","handlebars","hbs"],mimetypes:["text/x-handlebars-template"],loader:()=>we(()=>import("./handlebars-F3r5eIuq.js"),__vite__mapDeps([9,2,3,4]))});ye({id:"hcl",extensions:[".tf",".tfvars",".hcl"],aliases:["Terraform","tf","HCL","hcl"],loader:()=>we(()=>import("./hcl-DtV1sZF8.js"),[])});ye({id:"html",extensions:[".html",".htm",".shtml",".xhtml",".mdoc",".jsp",".asp",".aspx",".jshtm"],aliases:["HTML","htm","html","xhtml"],mimetypes:["text/html","text/x-jshtm","text/template","text/ng-template"],loader:()=>we(()=>import("./html-Blg47oPG.js"),__vite__mapDeps([10,2,3,4]))});ye({id:"ini",extensions:[".ini",".properties",".gitconfig"],filenames:["config",".gitattributes",".gitconfig",".editorconfig"],aliases:["Ini","ini"],loader:()=>we(()=>import("./ini-Kd9XrMLS.js"),[])});ye({id:"java",extensions:[".java",".jav"],aliases:["Java","java"],mimetypes:["text/x-java-source","text/x-java"],loader:()=>we(()=>import("./java-CXBNlu9o.js"),[])});ye({id:"javascript",extensions:[".js",".es6",".jsx",".mjs",".cjs"],firstLine:"^#!.*\\bnode",filenames:["jakefile"],aliases:["JavaScript","javascript","js"],mimetypes:["text/javascript"],loader:()=>we(()=>import("./javascript-0aB6uObk.js"),__vite__mapDeps([11,12,2,3,4]))});ye({id:"julia",extensions:[".jl"],aliases:["julia","Julia"],loader:()=>we(()=>import("./julia-cl7-CwDS.js"),[])});ye({id:"kotlin",extensions:[".kt",".kts"],aliases:["Kotlin","kotlin"],mimetypes:["text/x-kotlin-source","text/x-kotlin"],loader:()=>we(()=>import("./kotlin-s7OhZKlX.js"),[])});ye({id:"less",extensions:[".less"],aliases:["Less","less"],mimetypes:["text/x-less","text/less"],loader:()=>we(()=>import("./less-9HpZscsL.js"),[])});ye({id:"lexon",extensions:[".lex"],aliases:["Lexon"],loader:()=>we(()=>import("./lexon-OrD6JF1K.js"),[])});ye({id:"lua",extensions:[".lua"],aliases:["Lua","lua"],loader:()=>we(()=>import("./lua-Cyyb5UIc.js"),[])});ye({id:"liquid",extensions:[".liquid",".html.liquid"],aliases:["Liquid","liquid"],mimetypes:["application/liquid"],loader:()=>we(()=>import("./liquid-DfF3yH_T.js"),__vite__mapDeps([13,2,3,4]))});ye({id:"m3",extensions:[".m3",".i3",".mg",".ig"],aliases:["Modula-3","Modula3","modula3","m3"],loader:()=>we(()=>import("./m3-B8OfTtLu.js"),[])});ye({id:"markdown",extensions:[".md",".markdown",".mdown",".mkdn",".mkd",".mdwn",".mdtxt",".mdtext"],aliases:["Markdown","markdown"],loader:()=>we(()=>import("./markdown-BFxVWTOG.js"),[])});ye({id:"mdx",extensions:[".mdx"],aliases:["MDX","mdx"],loader:()=>we(()=>import("./mdx-Bm2432IE.js"),__vite__mapDeps([14,2,3,4]))});ye({id:"mips",extensions:[".s"],aliases:["MIPS","MIPS-V"],mimetypes:["text/x-mips","text/mips","text/plaintext"],loader:()=>we(()=>import("./mips-CiqrrVzr.js"),[])});ye({id:"msdax",extensions:[".dax",".msdax"],aliases:["DAX","MSDAX"],loader:()=>we(()=>import("./msdax-DmeGPVcC.js"),[])});ye({id:"mysql",extensions:[],aliases:["MySQL","mysql"],loader:()=>we(()=>import("./mysql-C_tMU-Nz.js"),[])});ye({id:"objective-c",extensions:[".m"],aliases:["Objective-C"],loader:()=>we(()=>import("./objective-c-BDtDVThU.js"),[])});ye({id:"pascal",extensions:[".pas",".p",".pp"],aliases:["Pascal","pas"],mimetypes:["text/x-pascal-source","text/x-pascal"],loader:()=>we(()=>import("./pascal-vHIfCaH5.js"),[])});ye({id:"pascaligo",extensions:[".ligo"],aliases:["Pascaligo","ligo"],loader:()=>we(()=>import("./pascaligo-DtZ0uQbO.js"),[])});ye({id:"perl",extensions:[".pl",".pm"],aliases:["Perl","pl"],loader:()=>we(()=>import("./perl-Ub6l9XKa.js"),[])});ye({id:"pgsql",extensions:[],aliases:["PostgreSQL","postgres","pg","postgre"],loader:()=>we(()=>import("./pgsql-BlNEE0v7.js"),[])});ye({id:"php",extensions:[".php",".php4",".php5",".phtml",".ctp"],aliases:["PHP","php"],mimetypes:["application/x-php"],loader:()=>we(()=>import("./php-BBUBE1dy.js"),[])});ye({id:"pla",extensions:[".pla"],loader:()=>we(()=>import("./pla-DSh2-awV.js"),[])});ye({id:"postiats",extensions:[".dats",".sats",".hats"],aliases:["ATS","ATS/Postiats"],loader:()=>we(()=>import("./postiats-CocnycG-.js"),[])});ye({id:"powerquery",extensions:[".pq",".pqm"],aliases:["PQ","M","Power Query","Power Query M"],loader:()=>we(()=>import("./powerquery-tScXyioY.js"),[])});ye({id:"powershell",extensions:[".ps1",".psm1",".psd1"],aliases:["PowerShell","powershell","ps","ps1"],loader:()=>we(()=>import("./powershell-COWaemsV.js"),[])});ye({id:"proto",extensions:[".proto"],aliases:["protobuf","Protocol Buffers"],loader:()=>we(()=>import("./protobuf-Brw8urJB.js"),[])});ye({id:"pug",extensions:[".jade",".pug"],aliases:["Pug","Jade","jade"],loader:()=>we(()=>import("./pug-8SOpv6rk.js"),[])});ye({id:"python",extensions:[".py",".rpy",".pyw",".cpy",".gyp",".gypi"],aliases:["Python","py"],firstLine:"^#!/.*\\bpython[0-9.-]*\\b",loader:()=>we(()=>import("./python-CXTzAVtR.js"),__vite__mapDeps([15,2,3,4]))});ye({id:"qsharp",extensions:[".qs"],aliases:["Q#","qsharp"],loader:()=>we(()=>import("./qsharp-Bw9ernYp.js"),[])});ye({id:"r",extensions:[".r",".rhistory",".rmd",".rprofile",".rt"],aliases:["R","r"],loader:()=>we(()=>import("./r-j7ic8hl3.js"),[])});ye({id:"razor",extensions:[".cshtml"],aliases:["Razor","razor"],mimetypes:["text/x-cshtml"],loader:()=>we(()=>import("./razor-BhweegTo.js"),__vite__mapDeps([16,2,3,4]))});ye({id:"redis",extensions:[".redis"],aliases:["redis"],loader:()=>we(()=>import("./redis-Bu5POkcn.js"),[])});ye({id:"redshift",extensions:[],aliases:["Redshift","redshift"],loader:()=>we(()=>import("./redshift-Bs9aos_-.js"),[])});ye({id:"restructuredtext",extensions:[".rst"],aliases:["reStructuredText","restructuredtext"],loader:()=>we(()=>import("./restructuredtext-CqXO7rUv.js"),[])});ye({id:"ruby",extensions:[".rb",".rbx",".rjs",".gemspec",".pp"],filenames:["rakefile","Gemfile"],aliases:["Ruby","rb"],loader:()=>we(()=>import("./ruby-zBfavPgS.js"),[])});ye({id:"rust",extensions:[".rs",".rlib"],aliases:["Rust","rust"],loader:()=>we(()=>import("./rust-BzKRNQWT.js"),[])});ye({id:"sb",extensions:[".sb"],aliases:["Small Basic","sb"],loader:()=>we(()=>import("./sb-BBc9UKZt.js"),[])});ye({id:"scala",extensions:[".scala",".sc",".sbt"],aliases:["Scala","scala","SBT","Sbt","sbt","Dotty","dotty"],mimetypes:["text/x-scala-source","text/x-scala","text/x-sbt","text/x-dotty"],loader:()=>we(()=>import("./scala-D9hQfWCl.js"),[])});ye({id:"scheme",extensions:[".scm",".ss",".sch",".rkt"],aliases:["scheme","Scheme"],loader:()=>we(()=>import("./scheme-BPhDTwHR.js"),[])});ye({id:"scss",extensions:[".scss"],aliases:["Sass","sass","scss"],mimetypes:["text/x-scss","text/scss"],loader:()=>we(()=>import("./scss-CBJaRo0y.js"),[])});ye({id:"shell",extensions:[".sh",".bash"],aliases:["Shell","sh"],loader:()=>we(()=>import("./shell-DiJ1NA_G.js"),[])});ye({id:"sol",extensions:[".sol"],aliases:["sol","solidity","Solidity"],loader:()=>we(()=>import("./solidity-Db0IVjzk.js"),[])});ye({id:"aes",extensions:[".aes"],aliases:["aes","sophia","Sophia"],loader:()=>we(()=>import("./sophia-CnS9iZB_.js"),[])});ye({id:"sparql",extensions:[".rq"],aliases:["sparql","SPARQL"],loader:()=>we(()=>import("./sparql-CJmd_6j2.js"),[])});ye({id:"sql",extensions:[".sql"],aliases:["SQL"],loader:()=>we(()=>import("./sql-ClhHkBeG.js"),[])});ye({id:"st",extensions:[".st",".iecst",".iecplc",".lc3lib",".TcPOU",".TcDUT",".TcGVL",".TcIO"],aliases:["StructuredText","scl","stl"],loader:()=>we(()=>import("./st-CHwy0fLd.js"),[])});ye({id:"swift",aliases:["Swift","swift"],extensions:[".swift"],mimetypes:["text/swift"],loader:()=>we(()=>import("./swift-Bqt4WxQ4.js"),[])});ye({id:"systemverilog",extensions:[".sv",".svh"],aliases:["SV","sv","SystemVerilog","systemverilog"],loader:()=>we(()=>import("./systemverilog-Bs9z6M-B.js"),[])});ye({id:"verilog",extensions:[".v",".vh"],aliases:["V","v","Verilog","verilog"],loader:()=>we(()=>import("./systemverilog-Bs9z6M-B.js"),[])});ye({id:"tcl",extensions:[".tcl"],aliases:["tcl","Tcl","tcltk","TclTk","tcl/tk","Tcl/Tk"],loader:()=>we(()=>import("./tcl-Dm6ycUr_.js"),[])});ye({id:"twig",extensions:[".twig"],aliases:["Twig","twig"],mimetypes:["text/x-twig"],loader:()=>we(()=>import("./twig-Csy3S7wG.js"),[])});ye({id:"typescript",extensions:[".ts",".tsx",".cts",".mts"],aliases:["TypeScript","ts","typescript"],mimetypes:["text/typescript"],loader:()=>we(()=>import("./typescript-CXVXTJLh.js"),__vite__mapDeps([12,2,3,4]))});ye({id:"typespec",extensions:[".tsp"],aliases:["TypeSpec"],loader:()=>we(()=>import("./typespec-Btyra-wh.js"),[])});ye({id:"vb",extensions:[".vb"],aliases:["Visual Basic","vb"],loader:()=>we(()=>import("./vb-Db0cS2oM.js"),[])});ye({id:"wgsl",extensions:[".wgsl"],aliases:["WebGPU Shading Language","WGSL","wgsl"],loader:()=>we(()=>import("./wgsl-DumH7NcR.js"),[])});ye({id:"xml",extensions:[".xml",".xsd",".dtd",".ascx",".csproj",".config",".props",".targets",".wxi",".wxl",".wxs",".xaml",".svg",".svgz",".opf",".xslt",".xsl"],firstLine:"(\\<\\?xml.*)|(\\we(()=>import("./xml-BI24_P4u.js"),__vite__mapDeps([17,2,3,4]))});ye({id:"yaml",extensions:[".yaml",".yml"],aliases:["YAML","yaml","YML","yml"],mimetypes:["application/x-yaml","text/x-yaml"],loader:()=>we(()=>import("./yaml-CM5JPzfY.js"),__vite__mapDeps([18,2,3,4]))});var kPe=Object.defineProperty,DPe=(o,e,t)=>e in o?kPe(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t,ve=(o,e,t)=>DPe(o,typeof e!="symbol"?e+"":e,t),wS,eV,SS,TE,yS;function IPe(o){return o.method!==void 0}var tV;(function(o){function e(t){return t}o.create=e})(tV||(tV={}));var Kr;(function(o){o.parseError=-32700,o.invalidRequest=-32600,o.methodNotFound=-32601,o.invalidParams=-32602,o.internalError=-32603;function e(s){return-32099<=s&&s<=-32e3}o.isServerError=e;function t(s){if(!e(s))throw new Error("Invalid range for a server error.");return s}o.serverError=t,o.unexpectedServerError=-32e3;function i(s){return!0}o.isApplicationError=i;function n(s){return s}o.applicationError=n,o.genericApplicationError=-320100})(Kr||(Kr={}));var y3=class{constructor(){ve(this,"listeners",new Set),ve(this,"event",o=>(this.listeners.add(o),{dispose:()=>{this.listeners.delete(o)}}))}fire(o){this.listeners.forEach(e=>e(o))}},EPe=class{constructor(o){ve(this,"_value"),ve(this,"eventEmitter"),this._value=o,this.eventEmitter=new y3}get value(){return this._value}set value(o){this._value!==o&&(this._value=o,this.eventEmitter.fire(o))}get onChange(){return this.eventEmitter.event}};function NPe(o,e){const t=setTimeout(e,o);return{dispose:()=>clearTimeout(t)}}function RE(o,e,t){return o instanceof Set?(o.add(e),{dispose:()=>o.delete(e)}):(o.set(e,t),{dispose:()=>o.delete(e)})}var TPe=class{constructor(){ve(this,"_state","none"),ve(this,"promise"),ve(this,"resolve",()=>{}),ve(this,"reject",()=>{}),this.promise=new Promise((o,e)=>{this.resolve=o,this.reject=e})}get state(){return this._state}},rX=(wS=class{constructor(){ve(this,"_unprocessedMessages",[]),ve(this,"_messageListener"),ve(this,"id",wS.id++),ve(this,"_state",new EPe({state:"open"})),ve(this,"state",this._state)}setListener(o){if(this._messageListener=o,!!o)for(;this._unprocessedMessages.length>0&&this._messageListener!==void 0;){const e=this._unprocessedMessages.shift();this._messageListener(e)}}send(o){return this._sendImpl(o)}_dispatchReceivedMessage(o){this._unprocessedMessages.length===0&&this._messageListener?this._messageListener(o):this._unprocessedMessages.push(o)}_onConnectionClosed(){this._state.value={state:"closed",error:void 0}}log(o){return new RPe(this,o??new MPe)}},ve(wS,"id",0),wS),RPe=class{constructor(o,e){ve(this,"baseStream"),ve(this,"logger"),this.baseStream=o,this.logger=e}get state(){return this.baseStream.state}setListener(o){if(o===void 0){this.baseStream.setListener(void 0);return}this.baseStream.setListener(e=>{this.logger.log(this.baseStream,"incoming",e),o(e)})}send(o){return this.logger.log(this.baseStream,"outgoing",o),this.baseStream.send(o)}toString(){return`StreamLogger/${this.baseStream.toString()}`}},MPe=class{log(o,e,t){console.log(`${e==="incoming"?"<-":"->"} [${o.toString()}] ${JSON.stringify(t)}`)}},PPe=class aX{constructor(e){ve(this,"connect"),this.connect=e}mapContext(e){return new aX(t=>this.connect(t?APe(t,e):void 0))}};function APe(o,e){return{handleNotification:(t,i)=>o.handleNotification(t,e(i)),handleRequest:(t,i,n)=>o.handleRequest(t,i,e(n))}}var OPe=class lX{constructor(e,t,i){ve(this,"_stream"),ve(this,"_listener"),ve(this,"_logger"),ve(this,"_unprocessedResponses",new Map),ve(this,"_lastUsedRequestId",0),this._stream=e,this._listener=t,this._logger=i,this._stream.setListener(n=>{IPe(n)?n.id===void 0?this._processNotification(n):this._processRequest(n):this._processResponse(n)})}static createChannel(e,t){let i=!1;return new PPe(n=>{if(i)throw new Error(`A channel to the stream ${e} was already constructed!`);return i=!0,new lX(e,n,t)})}get state(){return this._stream.state}async _processNotification(e){if(e.id!==void 0)throw new Error;if(!this._listener){this._logger&&this._logger.debug({text:"Notification ignored",message:e});return}try{await this._listener.handleNotification({method:e.method,params:e.params||null})}catch(t){this._logger&&this._logger.warn({text:`Exception was thrown while handling notification: ${t}`,exception:t,message:e})}}async _processRequest(e){if(e.id===void 0)throw new Error;let t;if(this._listener)try{t=await this._listener.handleRequest({method:e.method,params:e.params||null},e.id)}catch(n){this._logger&&this._logger.warn({text:`Exception was thrown while handling request: ${n}`,message:e,exception:n}),t={error:{code:Kr.internalError,message:"An unexpected exception was thrown.",data:void 0}}}else this._logger&&this._logger.debug({text:"Received request even though not listening for requests",message:e}),t={error:{code:Kr.methodNotFound,message:"This endpoint does not listen for requests or notifications.",data:void 0}};let i;"result"in t?i={jsonrpc:"2.0",id:e.id,result:t.result}:i={jsonrpc:"2.0",id:e.id,error:t.error},await this._stream.send(i)}_processResponse(e){const t=""+e.id,i=this._unprocessedResponses.get(t);if(!i){this._logger&&this._logger.debug({text:"Got an unexpected response message",message:e});return}this._unprocessedResponses.delete(t),i(e)}_newRequestId(){return this._lastUsedRequestId++}sendRequest(e,t,i){const n={jsonrpc:"2.0",id:this._newRequestId(),method:e.method,params:e.params||void 0};return i&&i(n.id),new Promise((s,r)=>{const a=""+n.id;this._unprocessedResponses.set(a,l=>{"result"in l?s({result:l.result}):(l.error||r(new Error("Response had neither 'result' nor 'error' field set.")),s({error:l.error}))}),this._stream.send(n).then(void 0,l=>{this._unprocessedResponses.delete(a),r(l)})})}sendNotification(e,t){const i={jsonrpc:"2.0",id:void 0,method:e.method,params:e.params||void 0};return this._stream.send(i)}toString(){return"StreamChannel/"+this._stream.toString()}},am;(function(o){function e(){return{deserializeFromJson:n=>({hasErrors:!1,value:n}),serializeToJson:n=>n}}o.sAny=e;function t(){return{deserializeFromJson:n=>({hasErrors:!1,value:{}}),serializeToJson:n=>({})}}o.sEmptyObject=t;function i(){return{deserializeFromJson:n=>({hasErrors:!1,value:void 0}),serializeToJson:n=>null}}o.sVoidFromNull=i})(am||(am={}));const cX=Symbol("OptionalMethodNotFound");var dX=class{contextualize(o){return new FPe(this,o)}},FPe=class extends dX{constructor(o,e){super(),ve(this,"underylingTypedChannel"),ve(this,"converters"),this.underylingTypedChannel=o,this.converters=e}async request(o,e,t){const i=await this.converters.getSendContext(t);return this.underylingTypedChannel.request(o,e,i)}async notify(o,e,t){const i=await this.converters.getSendContext(t);return this.underylingTypedChannel.notify(o,e,i)}registerNotificationHandler(o,e){return this.underylingTypedChannel.registerNotificationHandler(o,async(t,i)=>await e(t,await this.converters.getNewContext(i)))}registerRequestHandler(o,e){return this.underylingTypedChannel.registerRequestHandler(o,async(t,i,n)=>await e(t,i,await this.converters.getNewContext(n)))}},EA=class hX extends dX{constructor(e,t={}){super(),ve(this,"channelCtor"),ve(this,"_requestSender"),ve(this,"_handler",new Map),ve(this,"_unknownNotificationHandler",new Set),ve(this,"_timeout"),ve(this,"sendExceptionDetails",!1),ve(this,"_logger"),ve(this,"listeningDeferred",new TPe),ve(this,"onListening",this.listeningDeferred.promise),ve(this,"_requestDidErrorEventEmitter",new y3),ve(this,"onRequestDidError",this._requestDidErrorEventEmitter.event),this.channelCtor=e,this._logger=t.logger,this.sendExceptionDetails=!!t.sendExceptionDetails,this._timeout=NPe(1e3,()=>{this._requestSender||console.warn(`"${this.startListen.name}" has not been called within 1 second after construction of this channel. Did you forget to call it?`,this)})}static fromTransport(e,t={}){return new hX(OPe.createChannel(e,t.logger),t)}startListen(){if(this._requestSender)throw new Error(`"${this.startListen.name}" can be called only once, but it already has been called.`);this._timeout&&(this._timeout.dispose(),this._timeout=void 0),this._requestSender=this.channelCtor.connect({handleRequest:(e,t,i)=>this.handleRequest(e,t,i),handleNotification:(e,t)=>this.handleNotification(e,t)}),this.listeningDeferred.resolve()}checkChannel(e){if(!e)throw new Error(`"${this.startListen.name}" must be called before any messages can be sent or received.`);return!0}async handleRequest(e,t,i){const n=this._handler.get(e.method);if(!n)return this._logger&&this._logger.debug({text:`No request handler for "${e.method}".`,data:{requestObject:e}}),{error:{code:Kr.methodNotFound,message:`No request handler for "${e.method}".`,data:{method:e.method}}};if(n.kind!="request"){const r=`"${e.method}" is registered as notification, but was sent as request.`;return this._logger&&this._logger.debug({text:r,data:{requestObject:e}}),{error:{code:Kr.invalidRequest,message:r,data:{method:e.method}}}}const s=n.requestType.paramsSerializer.deserializeFromJson(e.params);if(s.hasErrors){const r=`Got invalid params: ${s.errorMessage}`;return this._logger&&this._logger.debug({text:r,data:{requestObject:e,errorMessage:s.errorMessage}}),{error:{code:Kr.invalidParams,message:r,data:{errors:s.errorMessage}}}}else{const r=s.value;let a;try{const l=await n.handler(r,t,i);if("error"in l||"errorMessage"in l){const c=l.error?n.requestType.errorSerializer.serializeToJson(l.error):void 0;a={error:{code:l.errorCode||Kr.genericApplicationError,message:l.errorMessage||"An error was returned",data:c}}}else a={result:n.requestType.resultSerializer.serializeToJson(l.ok)}}catch(l){l instanceof nV?a={error:{code:l.code,message:l.message}}:(this._logger&&this._logger.warn({text:`An exception was thrown while handling a request: ${l}.`,exception:l,data:{requestObject:e}}),a={error:{code:Kr.unexpectedServerError,message:this.sendExceptionDetails?`An exception was thrown while handling a request: ${l}.`:"Server has thrown an unexpected exception"}})}return a}}async handleNotification(e,t){const i=this._handler.get(e.method);if(!i){for(const r of this._unknownNotificationHandler)r(e);this._unknownNotificationHandler.size===0&&this._logger&&this._logger.debug({text:`Unhandled notification "${e.method}"`,data:{requestObject:e}});return}if(i.kind!="notification"){this._logger&&this._logger.debug({text:`"${e.method}" is registered as request, but was sent as notification.`,data:{requestObject:e}});return}const n=i.notificationType.paramsSerializer.deserializeFromJson(e.params);if(n.hasErrors){this._logger&&this._logger.debug({text:`Got invalid params: ${n}`,data:{requestObject:e,errorMessage:n.errorMessage}});return}const s=n.value;for(const r of i.handlers)try{r(s,t)}catch(a){this._logger&&this._logger.warn({text:`An exception was thrown while handling a notification: ${a}.`,exception:a,data:{requestObject:e}})}}registerUnknownNotificationHandler(e){return RE(this._unknownNotificationHandler,e)}registerRequestHandler(e,t){if(this._handler.get(e.method))throw new Error(`Handler with method "${e.method}" already registered.`);return RE(this._handler,e.method,{kind:"request",requestType:e,handler:t})}registerNotificationHandler(e,t){let i=this._handler.get(e.method);if(!i)i={kind:"notification",notificationType:e,handlers:new Set},this._handler.set(e.method,i);else{if(i.kind!=="notification")throw new Error(`Method "${e.method}" was already registered as request handler.`);if(i.notificationType!==e)throw new Error(`Method "${e.method}" was registered for a different type.`)}return RE(i.handlers,t)}getRegisteredTypes(){const e=[];for(const t of this._handler.values())t.kind==="notification"?e.push(t.notificationType):t.kind==="request"&&e.push(t.requestType);return e}async request(e,t,i){if(!this.checkChannel(this._requestSender))throw new Error("Impossible");const n=e.paramsSerializer.serializeToJson(t);iV(n);const s=await this._requestSender.sendRequest({method:e.method,params:n},i);if("error"in s){if(e.isOptional&&s.error.code===Kr.methodNotFound)return cX;let r;if(s.error.data!==void 0){const l=e.errorSerializer.deserializeFromJson(s.error.data);if(l.hasErrors)throw new Error(l.errorMessage);r=l.value}else r=void 0;const a=new nV(s.error.message,r,s.error.code);throw this._requestDidErrorEventEmitter.fire({error:a}),a}else{const r=e.resultSerializer.deserializeFromJson(s.result);if(r.hasErrors)throw new Error("Could not deserialize response: "+r.errorMessage+` ${JSON.stringify(s,null,2)}`);return r.value}}async notify(e,t,i){if(!this.checkChannel(this._requestSender))throw new Error;const n=e.paramsSerializer.serializeToJson(t);iV(n),this._requestSender.sendNotification({method:e.method,params:n},i)}};function iV(o){if(o!==null&&Array.isArray(o)&&typeof o!="object")throw new Error("Invalid value! Only null, array and object is allowed.")}var nV=class uX extends Error{constructor(e,t,i=Kr.genericApplicationError){super(e),ve(this,"data"),ve(this,"code"),this.data=t,this.code=i,Object.setPrototypeOf(this,uX.prototype)}},WPe=class NA{constructor(e,t,i,n,s=!1){ve(this,"method"),ve(this,"paramsSerializer"),ve(this,"resultSerializer"),ve(this,"errorSerializer"),ve(this,"isOptional"),ve(this,"kind","request"),this.method=e,this.paramsSerializer=t,this.resultSerializer=i,this.errorSerializer=n,this.isOptional=s}withMethod(e){return new NA(e,this.paramsSerializer,this.resultSerializer,this.errorSerializer)}optional(){return new NA(this.method,this.paramsSerializer,this.resultSerializer,this.errorSerializer,!0)}},BPe=class gX{constructor(e,t){ve(this,"method"),ve(this,"paramsSerializer"),ve(this,"kind","notification"),this.method=e,this.paramsSerializer=t}withMethod(e){return new gX(e,this.paramsSerializer)}};function Oe(o){return new WPe((o||{}).method,am.sAny(),am.sAny(),am.sAny())}function yi(o){return new BPe((o||{}).method,am.sAny())}const HPe=Symbol();var sV=(eV=HPe,SS=class{constructor(o){ve(this,"error"),ve(this,eV),this.error=o}},ve(SS,"factory",o=>new SS(o)),SS);function VPe(o){const e=oV(o.server),t=oV(o.client);return new zPe(o.tags||[],e,t)}function oV(o){const e={};for(const[t,i]of Object.entries(o)){const n=i.method?i.method:t;e[t]=i.withMethod(n)}return e}var zPe=class fX{constructor(e=[],t,i){ve(this,"tags"),ve(this,"server"),ve(this,"client"),this.tags=e,this.server=t,this.client=i}_onlyDesignTime(){return new Error("This property is not meant to be accessed at runtime")}get TContractObject(){throw this._onlyDesignTime()}get TClientInterface(){throw this._onlyDesignTime()}get TServerInterface(){throw this._onlyDesignTime()}get TClientHandler(){throw this._onlyDesignTime()}get TServerHandler(){throw this._onlyDesignTime()}get TTags(){throw this._onlyDesignTime()}getInterface(e,t,i,n){const s=this.buildCounterpart(e,i),r=this.registerHandlers(e,t,n,s);return{counterpart:s,dispose:()=>r.dispose()}}buildCounterpart(e,t){const i={};for(const[n,s]of Object.entries(t)){let r;s.kind==="request"?s.isOptional?r=async(a,l)=>{a===void 0&&(a={});try{return await e.request(s,a,l)}catch(c){if(c&&c.code===Kr.methodNotFound)return cX;throw c}}:r=(a,l)=>(a===void 0&&(a={}),e.request(s,a,l)):r=(a,l)=>(a===void 0&&(a={}),e.notify(s,a,l)),i[n]=r}return i}registerHandlers(e,t,i,n){const s=[];for(const[r,a]of Object.entries(t))if(a.kind==="request"){let l=i[r];if(!l)continue;const c=this.createRequestHandler(n,l);s.push(e.registerRequestHandler(a,c))}else{const l=i[r];l&&s.push(e.registerNotificationHandler(a,(c,d)=>{l(c,{context:d,counterpart:n})}))}return{dispose:()=>s.forEach(r=>r.dispose())}}createRequestHandler(e,t){return async(i,n,s)=>{const r=await t(i,{context:s,counterpart:e,newErr:sV.factory,requestId:n});return r instanceof sV?r.error:{ok:r}}}static getServerFromStream(e,t,i,n){const s=EA.fromTransport(t,i),{server:r}=e.getServer(s,n);return s.startListen(),{channel:s,server:r}}static registerServerToStream(e,t,i,n){const s=EA.fromTransport(t,i),{client:r}=e.registerServer(s,n);return s.startListen(),{channel:s,client:r}}getServer(e,t){const{counterpart:i,dispose:n}=this.getInterface(e,this.client,this.server,t);return{server:i,dispose:n}}registerServer(e,t){const{counterpart:i,dispose:n}=this.getInterface(e,this.server,this.client,t);return{client:i,dispose:n}}withContext(){return new fX(this.tags,this.server,this.client)}};let lm=(function(o){return o.Comment="comment",o.Imports="imports",o.Region="region",o})({}),Pi=(function(o){return o[o.File=1]="File",o[o.Module=2]="Module",o[o.Namespace=3]="Namespace",o[o.Package=4]="Package",o[o.Class=5]="Class",o[o.Method=6]="Method",o[o.Property=7]="Property",o[o.Field=8]="Field",o[o.Constructor=9]="Constructor",o[o.Enum=10]="Enum",o[o.Interface=11]="Interface",o[o.Function=12]="Function",o[o.Variable=13]="Variable",o[o.Constant=14]="Constant",o[o.String=15]="String",o[o.Number=16]="Number",o[o.Boolean=17]="Boolean",o[o.Array=18]="Array",o[o.Object=19]="Object",o[o.Key=20]="Key",o[o.Null=21]="Null",o[o.EnumMember=22]="EnumMember",o[o.Struct=23]="Struct",o[o.Event=24]="Event",o[o.Operator=25]="Operator",o[o.TypeParameter=26]="TypeParameter",o})({}),pX=(function(o){return o[o.Deprecated=1]="Deprecated",o})({}),rV=(function(o){return o[o.Type=1]="Type",o[o.Parameter=2]="Parameter",o})({}),UPe=(function(o){return o[o.None=0]="None",o[o.Full=1]="Full",o[o.Incremental=2]="Incremental",o})({}),Bi=(function(o){return o[o.Text=1]="Text",o[o.Method=2]="Method",o[o.Function=3]="Function",o[o.Constructor=4]="Constructor",o[o.Field=5]="Field",o[o.Variable=6]="Variable",o[o.Class=7]="Class",o[o.Interface=8]="Interface",o[o.Module=9]="Module",o[o.Property=10]="Property",o[o.Unit=11]="Unit",o[o.Value=12]="Value",o[o.Enum=13]="Enum",o[o.Keyword=14]="Keyword",o[o.Snippet=15]="Snippet",o[o.Color=16]="Color",o[o.File=17]="File",o[o.Reference=18]="Reference",o[o.Folder=19]="Folder",o[o.EnumMember=20]="EnumMember",o[o.Constant=21]="Constant",o[o.Struct=22]="Struct",o[o.Event=23]="Event",o[o.Operator=24]="Operator",o[o.TypeParameter=25]="TypeParameter",o})({}),$Pe=(function(o){return o[o.Deprecated=1]="Deprecated",o})({}),jPe=(function(o){return o[o.PlainText=1]="PlainText",o[o.Snippet=2]="Snippet",o})({}),ME=(function(o){return o[o.Text=1]="Text",o[o.Read=2]="Read",o[o.Write=3]="Write",o})({}),sc=(function(o){return o.Empty="",o.QuickFix="quickfix",o.Refactor="refactor",o.RefactorExtract="refactor.extract",o.RefactorInline="refactor.inline",o.RefactorRewrite="refactor.rewrite",o.Source="source",o.SourceOrganizeImports="source.organizeImports",o.SourceFixAll="source.fixAll",o})({}),sL=(function(o){return o.PlainText="plaintext",o.Markdown="markdown",o})({}),Pc=(function(o){return o[o.Error=1]="Error",o[o.Warning=2]="Warning",o[o.Information=3]="Information",o[o.Hint=4]="Hint",o})({}),aV=(function(o){return o[o.Unnecessary=1]="Unnecessary",o[o.Deprecated=2]="Deprecated",o})({}),h0=(function(o){return o[o.Invoked=1]="Invoked",o[o.TriggerCharacter=2]="TriggerCharacter",o[o.TriggerForIncompleteCompletions=3]="TriggerForIncompleteCompletions",o})({}),u0=(function(o){return o[o.Invoked=1]="Invoked",o[o.TriggerCharacter=2]="TriggerCharacter",o[o.ContentChange=3]="ContentChange",o})({}),TA=(function(o){return o[o.Invoked=1]="Invoked",o[o.Automatic=2]="Automatic",o})({}),qPe=(function(o){return o.Relative="relative",o})({});var rt=class{constructor(o){this.method=o}};const qe={textDocumentImplementation:new rt("textDocument/implementation"),textDocumentTypeDefinition:new rt("textDocument/typeDefinition"),textDocumentDocumentColor:new rt("textDocument/documentColor"),textDocumentColorPresentation:new rt("textDocument/colorPresentation"),textDocumentFoldingRange:new rt("textDocument/foldingRange"),textDocumentDeclaration:new rt("textDocument/declaration"),textDocumentSelectionRange:new rt("textDocument/selectionRange"),textDocumentPrepareCallHierarchy:new rt("textDocument/prepareCallHierarchy"),textDocumentSemanticTokensFull:new rt("textDocument/semanticTokens/full"),textDocumentSemanticTokensFullDelta:new rt("textDocument/semanticTokens/full/delta"),textDocumentLinkedEditingRange:new rt("textDocument/linkedEditingRange"),workspaceWillCreateFiles:new rt("workspace/willCreateFiles"),workspaceWillRenameFiles:new rt("workspace/willRenameFiles"),workspaceWillDeleteFiles:new rt("workspace/willDeleteFiles"),textDocumentMoniker:new rt("textDocument/moniker"),textDocumentPrepareTypeHierarchy:new rt("textDocument/prepareTypeHierarchy"),textDocumentInlineValue:new rt("textDocument/inlineValue"),textDocumentInlayHint:new rt("textDocument/inlayHint"),textDocumentDiagnostic:new rt("textDocument/diagnostic"),textDocumentInlineCompletion:new rt("textDocument/inlineCompletion"),textDocumentWillSaveWaitUntil:new rt("textDocument/willSaveWaitUntil"),textDocumentCompletion:new rt("textDocument/completion"),textDocumentHover:new rt("textDocument/hover"),textDocumentSignatureHelp:new rt("textDocument/signatureHelp"),textDocumentDefinition:new rt("textDocument/definition"),textDocumentReferences:new rt("textDocument/references"),textDocumentDocumentHighlight:new rt("textDocument/documentHighlight"),textDocumentDocumentSymbol:new rt("textDocument/documentSymbol"),textDocumentCodeAction:new rt("textDocument/codeAction"),workspaceSymbol:new rt("workspace/symbol"),textDocumentCodeLens:new rt("textDocument/codeLens"),textDocumentDocumentLink:new rt("textDocument/documentLink"),textDocumentFormatting:new rt("textDocument/formatting"),textDocumentRangeFormatting:new rt("textDocument/rangeFormatting"),textDocumentRangesFormatting:new rt("textDocument/rangesFormatting"),textDocumentOnTypeFormatting:new rt("textDocument/onTypeFormatting"),textDocumentRename:new rt("textDocument/rename"),workspaceExecuteCommand:new rt("workspace/executeCommand"),workspaceDidCreateFiles:new rt("workspace/didCreateFiles"),workspaceDidRenameFiles:new rt("workspace/didRenameFiles"),workspaceDidDeleteFiles:new rt("workspace/didDeleteFiles"),workspaceDidChangeConfiguration:new rt("workspace/didChangeConfiguration"),textDocumentDidOpen:new rt("textDocument/didOpen"),textDocumentDidChange:new rt("textDocument/didChange"),textDocumentDidClose:new rt("textDocument/didClose"),textDocumentDidSave:new rt("textDocument/didSave"),textDocumentWillSave:new rt("textDocument/willSave"),workspaceDidChangeWatchedFiles:new rt("workspace/didChangeWatchedFiles")},nw=VPe({server:{textDocumentImplementation:Oe({method:"textDocument/implementation"}),textDocumentTypeDefinition:Oe({method:"textDocument/typeDefinition"}),textDocumentDocumentColor:Oe({method:"textDocument/documentColor"}),textDocumentColorPresentation:Oe({method:"textDocument/colorPresentation"}),textDocumentFoldingRange:Oe({method:"textDocument/foldingRange"}),textDocumentDeclaration:Oe({method:"textDocument/declaration"}),textDocumentSelectionRange:Oe({method:"textDocument/selectionRange"}),textDocumentPrepareCallHierarchy:Oe({method:"textDocument/prepareCallHierarchy"}),callHierarchyIncomingCalls:Oe({method:"callHierarchy/incomingCalls"}),callHierarchyOutgoingCalls:Oe({method:"callHierarchy/outgoingCalls"}),textDocumentSemanticTokensFull:Oe({method:"textDocument/semanticTokens/full"}),textDocumentSemanticTokensFullDelta:Oe({method:"textDocument/semanticTokens/full/delta"}),textDocumentSemanticTokensRange:Oe({method:"textDocument/semanticTokens/range"}),textDocumentLinkedEditingRange:Oe({method:"textDocument/linkedEditingRange"}),workspaceWillCreateFiles:Oe({method:"workspace/willCreateFiles"}),workspaceWillRenameFiles:Oe({method:"workspace/willRenameFiles"}),workspaceWillDeleteFiles:Oe({method:"workspace/willDeleteFiles"}),textDocumentMoniker:Oe({method:"textDocument/moniker"}),textDocumentPrepareTypeHierarchy:Oe({method:"textDocument/prepareTypeHierarchy"}),typeHierarchySupertypes:Oe({method:"typeHierarchy/supertypes"}),typeHierarchySubtypes:Oe({method:"typeHierarchy/subtypes"}),textDocumentInlineValue:Oe({method:"textDocument/inlineValue"}),textDocumentInlayHint:Oe({method:"textDocument/inlayHint"}),inlayHintResolve:Oe({method:"inlayHint/resolve"}),textDocumentDiagnostic:Oe({method:"textDocument/diagnostic"}),workspaceDiagnostic:Oe({method:"workspace/diagnostic"}),textDocumentInlineCompletion:Oe({method:"textDocument/inlineCompletion"}),initialize:Oe({method:"initialize"}),shutdown:Oe({method:"shutdown"}),textDocumentWillSaveWaitUntil:Oe({method:"textDocument/willSaveWaitUntil"}),textDocumentCompletion:Oe({method:"textDocument/completion"}),completionItemResolve:Oe({method:"completionItem/resolve"}),textDocumentHover:Oe({method:"textDocument/hover"}),textDocumentSignatureHelp:Oe({method:"textDocument/signatureHelp"}),textDocumentDefinition:Oe({method:"textDocument/definition"}),textDocumentReferences:Oe({method:"textDocument/references"}),textDocumentDocumentHighlight:Oe({method:"textDocument/documentHighlight"}),textDocumentDocumentSymbol:Oe({method:"textDocument/documentSymbol"}),textDocumentCodeAction:Oe({method:"textDocument/codeAction"}),codeActionResolve:Oe({method:"codeAction/resolve"}),workspaceSymbol:Oe({method:"workspace/symbol"}),workspaceSymbolResolve:Oe({method:"workspaceSymbol/resolve"}),textDocumentCodeLens:Oe({method:"textDocument/codeLens"}),codeLensResolve:Oe({method:"codeLens/resolve"}),textDocumentDocumentLink:Oe({method:"textDocument/documentLink"}),documentLinkResolve:Oe({method:"documentLink/resolve"}),textDocumentFormatting:Oe({method:"textDocument/formatting"}),textDocumentRangeFormatting:Oe({method:"textDocument/rangeFormatting"}),textDocumentRangesFormatting:Oe({method:"textDocument/rangesFormatting"}),textDocumentOnTypeFormatting:Oe({method:"textDocument/onTypeFormatting"}),textDocumentRename:Oe({method:"textDocument/rename"}),textDocumentPrepareRename:Oe({method:"textDocument/prepareRename"}),workspaceExecuteCommand:Oe({method:"workspace/executeCommand"}),workspaceDidChangeWorkspaceFolders:yi({method:"workspace/didChangeWorkspaceFolders"}),windowWorkDoneProgressCancel:yi({method:"window/workDoneProgress/cancel"}),workspaceDidCreateFiles:yi({method:"workspace/didCreateFiles"}),workspaceDidRenameFiles:yi({method:"workspace/didRenameFiles"}),workspaceDidDeleteFiles:yi({method:"workspace/didDeleteFiles"}),notebookDocumentDidOpen:yi({method:"notebookDocument/didOpen"}),notebookDocumentDidChange:yi({method:"notebookDocument/didChange"}),notebookDocumentDidSave:yi({method:"notebookDocument/didSave"}),notebookDocumentDidClose:yi({method:"notebookDocument/didClose"}),initialized:yi({method:"initialized"}),exit:yi({method:"exit"}),workspaceDidChangeConfiguration:yi({method:"workspace/didChangeConfiguration"}),textDocumentDidOpen:yi({method:"textDocument/didOpen"}),textDocumentDidChange:yi({method:"textDocument/didChange"}),textDocumentDidClose:yi({method:"textDocument/didClose"}),textDocumentDidSave:yi({method:"textDocument/didSave"}),textDocumentWillSave:yi({method:"textDocument/willSave"}),workspaceDidChangeWatchedFiles:yi({method:"workspace/didChangeWatchedFiles"}),setTrace:yi({method:"$/setTrace"}),cancelRequest:yi({method:"$/cancelRequest"}),progress:yi({method:"$/progress"})},client:{workspaceWorkspaceFolders:Oe({method:"workspace/workspaceFolders"}).optional(),workspaceConfiguration:Oe({method:"workspace/configuration"}).optional(),workspaceFoldingRangeRefresh:Oe({method:"workspace/foldingRange/refresh"}).optional(),windowWorkDoneProgressCreate:Oe({method:"window/workDoneProgress/create"}).optional(),workspaceSemanticTokensRefresh:Oe({method:"workspace/semanticTokens/refresh"}).optional(),windowShowDocument:Oe({method:"window/showDocument"}).optional(),workspaceInlineValueRefresh:Oe({method:"workspace/inlineValue/refresh"}).optional(),workspaceInlayHintRefresh:Oe({method:"workspace/inlayHint/refresh"}).optional(),workspaceDiagnosticRefresh:Oe({method:"workspace/diagnostic/refresh"}).optional(),clientRegisterCapability:Oe({method:"client/registerCapability"}).optional(),clientUnregisterCapability:Oe({method:"client/unregisterCapability"}).optional(),windowShowMessageRequest:Oe({method:"window/showMessageRequest"}).optional(),workspaceCodeLensRefresh:Oe({method:"workspace/codeLens/refresh"}).optional(),workspaceApplyEdit:Oe({method:"workspace/applyEdit"}).optional(),windowShowMessage:yi({method:"window/showMessage"}),windowLogMessage:yi({method:"window/logMessage"}),telemetryEvent:yi({method:"telemetry/event"}),textDocumentPublishDiagnostics:yi({method:"textDocument/publishDiagnostics"}),logTrace:yi({method:"$/logTrace"}),cancelRequest:yi({method:"$/cancelRequest"}),progress:yi({method:"$/progress"})}});function Cg(o,e){if(o.textModel!==e)throw new Error(`Expected text model to be ${e}, but got ${o.textModel}`);return o}var Wi=(TE=class{constructor(){ve(this,"_store",new x3)}dispose(){this._store.dispose()}_register(o){if(o===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(o)}},ve(TE,"None",Object.freeze({dispose(){}})),TE),x3=(yS=class{constructor(){ve(this,"_toDispose",new Set),ve(this,"_isDisposed",!1)}dispose(){this._isDisposed||(this._isDisposed=!0,this.clear())}clear(){if(this._toDispose.size!==0)try{for(const o of this._toDispose)o.dispose()}finally{this._toDispose.clear()}}add(o){if(!o)return o;if(o===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?yS.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(o),o}},ve(yS,"DISABLE_DISPOSED_WARNING",!1),yS);const mX=new Map([[sc.Empty,""],[sc.QuickFix,"quickfix"],[sc.Refactor,"refactor"],[sc.RefactorExtract,"refactor.extract"],[sc.RefactorInline,"refactor.inline"],[sc.RefactorRewrite,"refactor.rewrite"],[sc.Source,"source"],[sc.SourceOrganizeImports,"source.organizeImports"],[sc.SourceFixAll,"source.fixAll"]]);function KPe(o){if(o)return mX.get(o)??o}const GPe=new Map([[de.CodeActionTriggerType.Invoke,TA.Invoked],[de.CodeActionTriggerType.Auto,TA.Automatic]]);function ZPe(o){return GPe.get(o)??TA.Invoked}const _X=new Map([[Bi.Text,de.CompletionItemKind.Text],[Bi.Method,de.CompletionItemKind.Method],[Bi.Function,de.CompletionItemKind.Function],[Bi.Constructor,de.CompletionItemKind.Constructor],[Bi.Field,de.CompletionItemKind.Field],[Bi.Variable,de.CompletionItemKind.Variable],[Bi.Class,de.CompletionItemKind.Class],[Bi.Interface,de.CompletionItemKind.Interface],[Bi.Module,de.CompletionItemKind.Module],[Bi.Property,de.CompletionItemKind.Property],[Bi.Unit,de.CompletionItemKind.Unit],[Bi.Value,de.CompletionItemKind.Value],[Bi.Enum,de.CompletionItemKind.Enum],[Bi.Keyword,de.CompletionItemKind.Keyword],[Bi.Snippet,de.CompletionItemKind.Snippet],[Bi.Color,de.CompletionItemKind.Color],[Bi.File,de.CompletionItemKind.File],[Bi.Reference,de.CompletionItemKind.Reference],[Bi.Folder,de.CompletionItemKind.Folder],[Bi.EnumMember,de.CompletionItemKind.EnumMember],[Bi.Constant,de.CompletionItemKind.Constant],[Bi.Struct,de.CompletionItemKind.Struct],[Bi.Event,de.CompletionItemKind.Event],[Bi.Operator,de.CompletionItemKind.Operator],[Bi.TypeParameter,de.CompletionItemKind.TypeParameter]]);function YPe(o){return o?_X.get(o)??de.CompletionItemKind.Text:de.CompletionItemKind.Text}const bX=new Map([[$Pe.Deprecated,de.CompletionItemTag.Deprecated]]);function XPe(o){return bX.get(o)}const QPe=new Map([[de.CompletionTriggerKind.Invoke,h0.Invoked],[de.CompletionTriggerKind.TriggerCharacter,h0.TriggerCharacter],[de.CompletionTriggerKind.TriggerForIncompleteCompletions,h0.TriggerForIncompleteCompletions]]);function JPe(o){return QPe.get(o)??h0.Invoked}const eAe=new Map([[jPe.Snippet,de.CompletionItemInsertTextRule.InsertAsSnippet]]);function tAe(o){if(o)return eAe.get(o)}const CX=new Map([[Pi.File,de.SymbolKind.File],[Pi.Module,de.SymbolKind.Module],[Pi.Namespace,de.SymbolKind.Namespace],[Pi.Package,de.SymbolKind.Package],[Pi.Class,de.SymbolKind.Class],[Pi.Method,de.SymbolKind.Method],[Pi.Property,de.SymbolKind.Property],[Pi.Field,de.SymbolKind.Field],[Pi.Constructor,de.SymbolKind.Constructor],[Pi.Enum,de.SymbolKind.Enum],[Pi.Interface,de.SymbolKind.Interface],[Pi.Function,de.SymbolKind.Function],[Pi.Variable,de.SymbolKind.Variable],[Pi.Constant,de.SymbolKind.Constant],[Pi.String,de.SymbolKind.String],[Pi.Number,de.SymbolKind.Number],[Pi.Boolean,de.SymbolKind.Boolean],[Pi.Array,de.SymbolKind.Array],[Pi.Object,de.SymbolKind.Object],[Pi.Key,de.SymbolKind.Key],[Pi.Null,de.SymbolKind.Null],[Pi.EnumMember,de.SymbolKind.EnumMember],[Pi.Struct,de.SymbolKind.Struct],[Pi.Event,de.SymbolKind.Event],[Pi.Operator,de.SymbolKind.Operator],[Pi.TypeParameter,de.SymbolKind.TypeParameter]]);function vX(o){return CX.get(o)??de.SymbolKind.File}const iAe=new Map([[pX.Deprecated,de.SymbolTag.Deprecated]]);function wX(o){return iAe.get(o)}const nAe=new Map([[ME.Text,de.DocumentHighlightKind.Text],[ME.Read,de.DocumentHighlightKind.Read],[ME.Write,de.DocumentHighlightKind.Write]]);function sAe(o){return o?nAe.get(o)??de.DocumentHighlightKind.Text:de.DocumentHighlightKind.Text}const oAe=new Map([[lm.Comment,de.FoldingRangeKind.Comment],[lm.Imports,de.FoldingRangeKind.Imports],[lm.Region,de.FoldingRangeKind.Region]]);function rAe(o){if(o)return oAe.get(o)}const aAe=new Map([[Zr.Error,Pc.Error],[Zr.Warning,Pc.Warning],[Zr.Info,Pc.Information],[Zr.Hint,Pc.Hint]]);function lAe(o){return aAe.get(o)??Pc.Error}const cAe=new Map([[Pc.Error,Zr.Error],[Pc.Warning,Zr.Warning],[Pc.Information,Zr.Info],[Pc.Hint,Zr.Hint]]);function dAe(o){return o?cAe.get(o)??Zr.Error:Zr.Error}const SX=new Map([[aV.Unnecessary,nL.Unnecessary],[aV.Deprecated,nL.Deprecated]]);function hAe(o){return SX.get(o)}const uAe=new Map([[de.SignatureHelpTriggerKind.Invoke,u0.Invoked],[de.SignatureHelpTriggerKind.TriggerCharacter,u0.TriggerCharacter],[de.SignatureHelpTriggerKind.ContentChange,u0.ContentChange]]);function gAe(o){return uAe.get(o)??u0.Invoked}function cm(o){if(o)return{id:o.command,title:o.title,arguments:o.arguments}}const fAe=new Map([[rV.Type,de.InlayHintKind.Type],[rV.Parameter,de.InlayHintKind.Parameter]]);function pAe(o){return o?fAe.get(o)??de.InlayHintKind.Type:de.InlayHintKind.Type}function Ah(o,e){if("targetUri"in o){const t=e.bridge.translateBackRange({uri:o.targetUri},o.targetRange);return{uri:t.textModel.uri,range:t.range,originSelectionRange:o.originSelectionRange?e.bridge.translateBackRange({uri:o.targetUri},o.originSelectionRange).range:void 0,targetSelectionRange:o.targetSelectionRange?e.bridge.translateBackRange({uri:o.targetUri},o.targetSelectionRange).range:void 0}}else{const t=e.bridge.translateBackRange({uri:o.uri},o.range);return{uri:t.textModel.uri,range:t.range}}}function In(o){return!o||o.length===0?{language:"*"}:o.map(e=>"notebook"in e?typeof e.notebook=="string"?{notebookType:e.notebook,language:e.language}:{notebookType:e.notebook.notebookType,language:e.language,pattern:e.notebook.pattern,scheme:e.notebook.scheme}:{language:e.language,pattern:e.pattern,scheme:e.scheme})}function mAe(o,e){if(!e)return!0;const t=o.getLanguageId();if(o.uri.toString(!0),!e||e.length===0)return!0;for(const i of e)if(!(i.language&&i.language!=="*"&&i.language!==t))return!0;return!1}function RA(o){const e={severity:dAe(o.severity),startLineNumber:o.range.start.line+1,startColumn:o.range.start.character+1,endLineNumber:o.range.end.line+1,endColumn:o.range.end.character+1,message:o.message,source:o.source,code:typeof o.code=="string"?o.code:o.code?.toString()};return o.tags&&(e.tags=o.tags.map(t=>hAe(t)).filter(t=>t!==void 0)),o.relatedInformation&&(e.relatedInformation=o.relatedInformation.map(t=>({resource:hD.parse(t.location.uri),startLineNumber:t.location.range.start.line+1,startColumn:t.location.range.start.character+1,endLineNumber:t.location.range.end.line+1,endColumn:t.location.range.end.character+1,message:t.message}))),e}var _Ae=class extends Wi{constructor(o){super(),this._connection=o,this._register(this._connection.capabilities.addStaticClientCapabilities({textDocument:{completion:{dynamicRegistration:!0,contextSupport:!0,completionItemKind:{valueSet:Array.from(_X.keys())},completionItem:{tagSupport:{valueSet:Array.from(bX.keys())},commitCharactersSupport:!0,deprecatedSupport:!0,preselectSupport:!0}}}})),this._register(this._connection.capabilities.registerCapabilityHandler(qe.textDocumentCompletion,!0,e=>de.registerCompletionItemProvider(In(e.documentSelector),new bAe(this._connection,e))))}},bAe=class{constructor(o,e){ve(this,"resolveCompletionItem"),this._client=o,this._capabilities=e,e.resolveProvider&&(this.resolveCompletionItem=async(t,i)=>(yX(t,await this._client.server.completionItemResolve(t._lspItem),this._client.bridge,t._translated,t._model),t))}get triggerCharacters(){return this._capabilities.triggerCharacters}async provideCompletionItems(o,e,t,i){const n=this._client.bridge.translate(o,e),s=await this._client.server.textDocumentCompletion({textDocument:n.textDocument,position:n.position,context:t.triggerCharacter?{triggerKind:JPe(t.triggerKind),triggerCharacter:t.triggerCharacter}:void 0});return s?{suggestions:(Array.isArray(s)?s:s.items).map(r=>({...CAe(r,this._client.bridge,n,o,e),_lspItem:r,_translated:n,_model:o}))}:{suggestions:[]}}};function CAe(o,e,t,i,n){let s=o.insertText||o.label,r;o.textEdit&&("range"in o.textEdit?(s=o.textEdit.newText,r=Cg(e.translateBackRange(t.textDocument,o.textEdit.range),i).range):(s=o.textEdit.newText,r={insert:Cg(e.translateBackRange(t.textDocument,o.textEdit.insert),i).range,replace:Cg(e.translateBackRange(t.textDocument,o.textEdit.replace),i).range})),r||(r=x_.fromPositions(n,n));const a={label:o.label,kind:YPe(o.kind),insertText:s,sortText:o.sortText,filterText:o.filterText,preselect:o.preselect,commitCharacters:o.commitCharacters,range:r};return yX(a,o,e,t,i),a}function yX(o,e,t,i,n){e.detail!==void 0&&(o.detail=e.detail),e.documentation!==void 0&&(o.documentation=vAe(e.documentation)),e.insertTextFormat!==void 0&&(o.insertTextRules=tAe(e.insertTextFormat)),e.tags&&e.tags.length>0&&(o.tags=e.tags.map(XPe).filter(s=>s!==void 0)),e.additionalTextEdits&&e.additionalTextEdits.length>0&&(o.additionalTextEdits=e.additionalTextEdits.map(s=>({range:Cg(t.translateBackRange(i.textDocument,s.range),n).range,text:s.newText}))),e.command&&(o.command=cm(e.command))}function vAe(o){if(o)return typeof o=="string"?o:{value:o.value,isTrusted:!0}}var wAe=class extends Wi{constructor(o){super(),this._connection=o,this._register(this._connection.capabilities.addStaticClientCapabilities({textDocument:{hover:{dynamicRegistration:!0,contentFormat:[sL.Markdown,sL.PlainText]}}})),this._register(this._connection.capabilities.registerCapabilityHandler(qe.textDocumentHover,!0,e=>de.registerHoverProvider(In(e.documentSelector),new SAe(this._connection,e))))}},SAe=class{constructor(o,e){this._client=o,this._capabilities=e}async provideHover(o,e,t){const i=this._client.bridge.translate(o,e),n=await this._client.server.textDocumentHover({textDocument:i.textDocument,position:i.position});return!n||!n.contents?null:{contents:yAe(n.contents),range:n.range?this._client.bridge.translateBackRange(i.textDocument,n.range).range:void 0}}};function yAe(o){return Array.isArray(o)?o.map(e=>lV(e)):[lV(o)]}function lV(o){return typeof o=="string"?{value:o,isTrusted:!0}:"kind"in o?{value:o.value,isTrusted:!0}:{value:`\`\`\`${o.language} ${o.value} diff --git a/apps/pythinker-code/dist-web/assets/erDiagram-SSCWMZ5O-DBkUSbm0.js b/apps/pythinker-code/dist-web/assets/erDiagram-SSCWMZ5O-CB9IV2Kp.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/erDiagram-SSCWMZ5O-DBkUSbm0.js rename to apps/pythinker-code/dist-web/assets/erDiagram-SSCWMZ5O-CB9IV2Kp.js index a509182b2..dfa977c08 100644 --- a/apps/pythinker-code/dist-web/assets/erDiagram-SSCWMZ5O-DBkUSbm0.js +++ b/apps/pythinker-code/dist-web/assets/erDiagram-SSCWMZ5O-CB9IV2Kp.js @@ -1,4 +1,4 @@ -import{g as zt}from"./chunk-XXDRQBXY-BOyQwG-7.js";import{s as Ut}from"./chunk-POPQ4Y6H-Tp7S0w--.js";import{_ as p,b as Kt,a as Zt,s as jt,g as qt,p as Wt,q as Ht,c as $,l as M,k as Qt,r as Xt,t as Jt,u as $t,v as te,x as ee,y as se,j as ie,z as re}from"./mermaid.core-D6Xg32pF.js";import{c as ne}from"./channel-CRmZXxAS.js";import"./index-D9Nz1t7z.js";import"./purify.es-5AjVNlXF.js";var Tt=(function(){var e=p(function(V,n,o,h){for(o=o||{},h=V.length;h--;o[V[h]]=n);return o},"o"),a=[6,9,21,23,25,27,34,37,38,39,40,41,43,46,47,51,53,54,55],u=[2,2],r=[1,7],c=[1,9],b=[1,10],k=[1,11],f=[1,12],S=[1,30],d=[1,23],g=[1,24],x=[1,25],B=[1,26],Y=[1,27],m=[1,19],A=[1,28],U=[1,29],N=[1,20],I=[1,18],R=[1,21],v=[1,22],Ot=[2,6],l=[6,9,21,23,25,27,33,34,37,38,39,40,41,43,46,47,51,53,54,55],dt=[1,36],pt=[1,37],ft=[1,38],bt=[1,39],gt=[1,40],K=[6,9,12,14,16,19,20,21,23,25,27,33,34,37,38,39,40,41,43,46,47,50,51,53,54,55,69,70,71,72,73],D=[1,46],L=[1,47],Z=[1,57],j=[43,51,53,54,55,74,75],q=[1,70],W=[1,68],w=[1,65],H=[1,69],Q=[1,71],tt=[6,9,12,16,21,23,25,27,33,34,37,38,39,40,41,43,44,45,46,47,51,52,53,54,55,69,70,71,72,73],et=[1,78],st=[1,77],it=[1,76],xt=[69,70,71,72,73],Nt=[1,91],Ct=[6,9,45,50],P=[6,9,12,44,45,50,51,52],rt=[1,101],nt=[1,100],at=[1,99],X=[18,61],At=[1,110],It=[1,109],Rt=[20,43,51,53,54,55],yt=[18,61,64,66],_t={trace:p(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,statement:8,NEWLINE:9,entityName:10,relSpec:11,COLON:12,role:13,STYLE_SEPARATOR:14,idList:15,BLOCK_START:16,attributes:17,BLOCK_STOP:18,SQS:19,SQE:20,title:21,title_value:22,acc_title:23,acc_title_value:24,acc_descr:25,acc_descr_value:26,acc_descr_multiline_value:27,direction:28,classDefStatement:29,classStatement:30,styleStatement:31,subgraphHeader:32,END:33,SUBGRAPH:34,separator:35,subgraphTitle:36,direction_tb:37,direction_bt:38,direction_rl:39,direction_lr:40,CLASSDEF:41,stylesOpt:42,UNICODE_TEXT:43,STYLE_TEXT:44,COMMA:45,CLASS:46,STYLE:47,style:48,styleComponent:49,SEMI:50,NUM:51,BRKT:52,ENTITY_NAME:53,DECIMAL_NUM:54,ENTITY_ONE:55,attribute:56,attributeType:57,attributeName:58,attributeKeyTypeList:59,attributeComment:60,ATTRIBUTE_WORD:61,"?":62,attributeKeyType:63,",":64,ATTRIBUTE_KEY:65,COMMENT:66,cardinality:67,relType:68,ZERO_OR_ONE:69,ZERO_OR_MORE:70,ONE_OR_MORE:71,ONLY_ONE:72,MD_PARENT:73,NON_IDENTIFYING:74,IDENTIFYING:75,WORD:76,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",9:"NEWLINE",12:"COLON",14:"STYLE_SEPARATOR",16:"BLOCK_START",18:"BLOCK_STOP",19:"SQS",20:"SQE",21:"title",22:"title_value",23:"acc_title",24:"acc_title_value",25:"acc_descr",26:"acc_descr_value",27:"acc_descr_multiline_value",33:"END",34:"SUBGRAPH",37:"direction_tb",38:"direction_bt",39:"direction_rl",40:"direction_lr",41:"CLASSDEF",43:"UNICODE_TEXT",44:"STYLE_TEXT",45:"COMMA",46:"CLASS",47:"STYLE",50:"SEMI",51:"NUM",52:"BRKT",53:"ENTITY_NAME",54:"DECIMAL_NUM",55:"ENTITY_ONE",61:"ATTRIBUTE_WORD",62:"?",64:",",65:"ATTRIBUTE_KEY",66:"COMMENT",69:"ZERO_OR_ONE",70:"ZERO_OR_MORE",71:"ONE_OR_MORE",72:"ONLY_ONE",73:"MD_PARENT",74:"NON_IDENTIFYING",75:"IDENTIFYING",76:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[7,1],[8,5],[8,9],[8,7],[8,7],[8,4],[8,6],[8,3],[8,5],[8,1],[8,3],[8,7],[8,9],[8,6],[8,8],[8,4],[8,6],[8,2],[8,2],[8,2],[8,1],[8,1],[8,1],[8,1],[8,1],[8,3],[32,3],[32,6],[36,1],[36,2],[28,1],[28,1],[28,1],[28,1],[29,4],[15,1],[15,1],[15,3],[15,3],[30,3],[31,4],[42,1],[42,3],[48,1],[48,2],[35,1],[35,1],[35,1],[49,1],[49,1],[49,1],[49,1],[10,1],[10,1],[10,1],[10,1],[10,1],[17,1],[17,2],[56,2],[56,3],[56,3],[56,4],[57,1],[57,2],[58,1],[59,1],[59,3],[63,1],[60,1],[11,3],[67,1],[67,1],[67,1],[67,1],[67,1],[68,1],[68,1],[13,1],[13,1],[13,1]],performAction:p(function(n,o,h,i,y,t,J){var s=t.length-1;switch(y){case 1:break;case 2:this.$=[];break;case 3:this.$=t[s-1].concat(t[s]);break;case 4:this.$=t[s];break;case 5:case 6:this.$=[];break;case 7:i.addEntity(t[s-4]),i.addEntity(t[s-2]),i.addRelationship(t[s-4],t[s],t[s-2],t[s-3]),this.$=[t[s-4],t[s-2]];break;case 8:i.addEntity(t[s-8]),i.addEntity(t[s-4]),i.addRelationship(t[s-8],t[s],t[s-4],t[s-5]),i.setClass([t[s-8]],t[s-6]),i.setClass([t[s-4]],t[s-2]),this.$=[t[s-8],t[s-4]];break;case 9:i.addEntity(t[s-6]),i.addEntity(t[s-2]),i.addRelationship(t[s-6],t[s],t[s-2],t[s-3]),i.setClass([t[s-6]],t[s-4]),this.$=[t[s-6],t[s-2]];break;case 10:i.addEntity(t[s-6]),i.addEntity(t[s-4]),i.addRelationship(t[s-6],t[s],t[s-4],t[s-5]),i.setClass([t[s-4]],t[s-2]),this.$=[t[s-6],t[s-4]];break;case 11:i.addEntity(t[s-3]),i.addAttributes(t[s-3],t[s-1]),this.$=[t[s-3]];break;case 12:i.addEntity(t[s-5]),i.addAttributes(t[s-5],t[s-1]),i.setClass([t[s-5]],t[s-3]),this.$=[t[s-5]];break;case 13:i.addEntity(t[s-2]),this.$=[t[s-2]];break;case 14:i.addEntity(t[s-4]),i.setClass([t[s-4]],t[s-2]),this.$=[t[s-4]];break;case 15:i.addEntity(t[s]),this.$=[t[s]];break;case 16:i.addEntity(t[s-2]),i.setClass([t[s-2]],t[s]),this.$=[t[s-2]];break;case 17:i.addEntity(t[s-6],t[s-4]),i.addAttributes(t[s-6],t[s-1]),this.$=[t[s-6]];break;case 18:i.addEntity(t[s-8],t[s-6]),i.addAttributes(t[s-8],t[s-1]),i.setClass([t[s-8]],t[s-3]),this.$=[t[s-8]];break;case 19:i.addEntity(t[s-5],t[s-3]),this.$=[t[s-5]];break;case 20:i.addEntity(t[s-7],t[s-5]),i.setClass([t[s-7]],t[s-2]),this.$=[t[s-7]];break;case 21:i.addEntity(t[s-3],t[s-1]);break;case 22:i.addEntity(t[s-5],t[s-3]),i.setClass([t[s-5]],t[s]);break;case 23:case 24:this.$=t[s].trim(),i.setAccTitle(this.$);break;case 25:case 26:this.$=t[s].trim(),i.setAccDescription(this.$);break;case 27:i.subgraphDepth?this.$=t[s]:(i.setDirection(t[s].value),this.$=[]);break;case 31:i.subgraphDepth=(i.subgraphDepth||1)-1,this.$=i.addSubGraph({text:t[s-2].id},t[s-1],{text:t[s-2].text});break;case 32:i.subgraphDepth=(i.subgraphDepth||0)+1,this.$={id:t[s-1],text:t[s-1]};break;case 33:i.subgraphDepth=(i.subgraphDepth||0)+1,this.$={id:t[s-4],text:t[s-2]};break;case 34:case 59:case 60:case 61:case 62:case 86:this.$=t[s];break;case 35:this.$=t[s-1]+" "+t[s];break;case 36:this.$={stmt:"dir",value:"TB"};break;case 37:this.$={stmt:"dir",value:"BT"};break;case 38:this.$={stmt:"dir",value:"RL"};break;case 39:this.$={stmt:"dir",value:"LR"};break;case 40:this.$=t[s-3],i.addClass(t[s-2],t[s-1]);break;case 41:case 42:case 63:case 72:this.$=[t[s]];break;case 43:case 44:this.$=t[s-2].concat([t[s]]);break;case 45:this.$=t[s-2],i.setClass(t[s-1],t[s]);break;case 46:this.$=t[s-3],i.addCssStyles(t[s-2],t[s-1]);break;case 47:this.$=[t[s]];break;case 48:t[s-2].push(t[s]),this.$=t[s-2];break;case 50:this.$=t[s-1]+t[s];break;case 58:case 84:case 85:this.$=t[s].replace(/"/g,"");break;case 64:t[s].push(t[s-1]),this.$=t[s];break;case 65:this.$={type:t[s-1],name:t[s]};break;case 66:this.$={type:t[s-2],name:t[s-1],keys:t[s]};break;case 67:this.$={type:t[s-2],name:t[s-1],comment:t[s]};break;case 68:this.$={type:t[s-3],name:t[s-2],keys:t[s-1],comment:t[s]};break;case 69:case 71:case 74:this.$=t[s];break;case 70:this.$=t[s-1]+t[s];break;case 73:t[s-2].push(t[s]),this.$=t[s-2];break;case 75:this.$=t[s].replace(/"/g,"");break;case 76:this.$={cardA:t[s],relType:t[s-1],cardB:t[s-2]};break;case 77:this.$=i.Cardinality.ZERO_OR_ONE;break;case 78:this.$=i.Cardinality.ZERO_OR_MORE;break;case 79:this.$=i.Cardinality.ONE_OR_MORE;break;case 80:this.$=i.Cardinality.ONLY_ONE;break;case 81:this.$=i.Cardinality.MD_PARENT;break;case 82:this.$=i.Identification.NON_IDENTIFYING;break;case 83:this.$=i.Identification.IDENTIFYING;break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},e(a,u,{5:3}),{6:[1,4],7:5,8:6,9:r,10:8,21:c,23:b,25:k,27:f,28:13,29:14,30:15,31:16,32:17,34:S,37:d,38:g,39:x,40:B,41:Y,43:m,46:A,47:U,51:N,53:I,54:R,55:v},e(a,Ot,{1:[2,1]}),e(l,[2,3]),e(l,[2,4]),e(l,[2,5]),e(l,[2,15],{11:31,67:35,14:[1,32],16:[1,33],19:[1,34],69:dt,70:pt,71:ft,72:bt,73:gt}),{22:[1,41]},{24:[1,42]},{26:[1,43]},e(l,[2,26]),e(l,[2,27]),e(l,[2,28]),e(l,[2,29]),e(l,[2,30]),e(l,u,{5:44}),e(K,[2,58]),e(K,[2,59]),e(K,[2,60]),e(K,[2,61]),e(K,[2,62]),e(l,[2,36]),e(l,[2,37]),e(l,[2,38]),e(l,[2,39]),{15:45,43:D,44:L},{15:48,43:D,44:L},{15:49,43:D,44:L},{10:50,43:m,51:N,53:I,54:R,55:v},{10:51,43:m,51:N,53:I,54:R,55:v},{15:52,43:D,44:L},{17:53,18:[1,54],56:55,57:56,61:Z},{10:58,43:m,51:N,53:I,54:R,55:v},{68:59,74:[1,60],75:[1,61]},e(j,[2,77]),e(j,[2,78]),e(j,[2,79]),e(j,[2,80]),e(j,[2,81]),e(l,[2,23]),e(l,[2,24]),e(l,[2,25]),{6:[1,63],7:5,8:6,9:r,10:8,21:c,23:b,25:k,27:f,28:13,29:14,30:15,31:16,32:17,33:[1,62],34:S,37:d,38:g,39:x,40:B,41:Y,43:m,46:A,47:U,51:N,53:I,54:R,55:v},{12:q,42:64,44:W,45:w,48:66,49:67,51:H,52:Q},e(tt,[2,41]),e(tt,[2,42]),{15:72,43:D,44:L,45:w},{12:q,42:73,44:W,45:w,48:66,49:67,51:H,52:Q},{6:et,9:st,19:[1,75],35:74,50:it},{12:[1,79],14:[1,80]},e(l,[2,16],{67:35,11:81,16:[1,82],45:w,69:dt,70:pt,71:ft,72:bt,73:gt}),{18:[1,83]},e(l,[2,13]),{17:84,18:[2,63],56:55,57:56,61:Z},{58:85,61:[1,86]},{61:[2,69],62:[1,87]},{20:[1,88]},{67:89,69:dt,70:pt,71:ft,72:bt,73:gt},e(xt,[2,82]),e(xt,[2,83]),e(l,[2,31]),e(l,Ot),{6:et,9:st,35:90,45:Nt,50:it},{43:[1,92],44:[1,93]},e(Ct,[2,47],{49:94,12:q,44:W,51:H,52:Q}),e(P,[2,49]),e(P,[2,54]),e(P,[2,55]),e(P,[2,56]),e(P,[2,57]),e(l,[2,45],{45:w}),{6:et,9:st,35:95,45:Nt,50:it},e(l,[2,32]),{10:97,36:96,43:m,51:N,53:I,54:R,55:v},e(l,[2,51]),e(l,[2,52]),e(l,[2,53]),{13:98,43:rt,53:nt,76:at},{15:102,43:D,44:L},{10:103,43:m,51:N,53:I,54:R,55:v},{17:104,18:[1,105],56:55,57:56,61:Z},e(l,[2,11]),{18:[2,64]},e(X,[2,65],{59:106,60:107,63:108,65:At,66:It}),e([18,61,65,66],[2,71]),{61:[2,70]},e(l,[2,21],{14:[1,112],16:[1,111]}),e([43,51,53,54,55],[2,76]),e(l,[2,40]),{12:q,44:W,48:113,49:67,51:H,52:Q},e(tt,[2,43]),e(tt,[2,44]),e(P,[2,50]),e(l,[2,46]),{10:115,20:[1,114],43:m,51:N,53:I,54:R,55:v},e(Rt,[2,34]),e(l,[2,7]),e(l,[2,84]),e(l,[2,85]),e(l,[2,86]),{12:[1,116],45:w},{12:[1,118],14:[1,117]},{18:[1,119]},e(l,[2,14]),e(X,[2,66],{60:120,64:[1,121],66:It}),e(X,[2,67]),e(yt,[2,72]),e(X,[2,75]),e(yt,[2,74]),{17:122,18:[1,123],56:55,57:56,61:Z},{15:124,43:D,44:L},e(Ct,[2,48],{49:94,12:q,44:W,51:H,52:Q}),{6:et,9:st,35:125,50:it},e(Rt,[2,35]),{13:126,43:rt,53:nt,76:at},{15:127,43:D,44:L},{13:128,43:rt,53:nt,76:at},e(l,[2,12]),e(X,[2,68]),{63:129,65:At},{18:[1,130]},e(l,[2,19]),e(l,[2,22],{16:[1,131],45:w}),e(l,[2,33]),e(l,[2,10]),{12:[1,132],45:w},e(l,[2,9]),e(yt,[2,73]),e(l,[2,17]),{17:133,18:[1,134],56:55,57:56,61:Z},{13:135,43:rt,53:nt,76:at},{18:[1,136]},e(l,[2,20]),e(l,[2,8]),e(l,[2,18])],defaultActions:{84:[2,64],87:[2,70]},parseError:p(function(n,o){if(o.recoverable)this.trace(n);else{var h=new Error(n);throw h.hash=o,h}},"parseError"),parse:p(function(n){var o=this,h=[0],i=[],y=[null],t=[],J=this.table,s="",ct=0,vt=0,Gt=2,Dt=1,Ft=t.slice.call(arguments,1),_=Object.create(this.lexer),G={yy:{}};for(var kt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,kt)&&(G.yy[kt]=this.yy[kt]);_.setInput(n,G.yy),G.yy.lexer=_,G.yy.parser=this,typeof _.yylloc>"u"&&(_.yylloc={});var mt=_.yylloc;t.push(mt);var Yt=_.options&&_.options.ranges;typeof G.yy.parseError=="function"?this.parseError=G.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Pt(T){h.length=h.length-2*T,y.length=y.length-T,t.length=t.length-T}p(Pt,"popStack");function Lt(){var T;return T=i.pop()||_.lex()||Dt,typeof T!="number"&&(T instanceof Array&&(i=T,T=i.pop()),T=o.symbols_[T]||T),T}p(Lt,"lex");for(var E,F,O,Et,z={},lt,C,wt,ht;;){if(F=h[h.length-1],this.defaultActions[F]?O=this.defaultActions[F]:((E===null||typeof E>"u")&&(E=Lt()),O=J[F]&&J[F][E]),typeof O>"u"||!O.length||!O[0]){var St="";ht=[];for(lt in J[F])this.terminals_[lt]&<>Gt&&ht.push("'"+this.terminals_[lt]+"'");_.showPosition?St="Parse error on line "+(ct+1)+`: +import{g as zt}from"./chunk-XXDRQBXY-Pj2mkOow.js";import{s as Ut}from"./chunk-POPQ4Y6H-B7iG5qn5.js";import{_ as p,b as Kt,a as Zt,s as jt,g as qt,p as Wt,q as Ht,c as $,l as M,k as Qt,r as Xt,t as Jt,u as $t,v as te,x as ee,y as se,j as ie,z as re}from"./mermaid.core-BLsmN-lt.js";import{c as ne}from"./channel-Bm0H2vxn.js";import"./index-XmhyfFRf.js";import"./purify.es-5AjVNlXF.js";var Tt=(function(){var e=p(function(V,n,o,h){for(o=o||{},h=V.length;h--;o[V[h]]=n);return o},"o"),a=[6,9,21,23,25,27,34,37,38,39,40,41,43,46,47,51,53,54,55],u=[2,2],r=[1,7],c=[1,9],b=[1,10],k=[1,11],f=[1,12],S=[1,30],d=[1,23],g=[1,24],x=[1,25],B=[1,26],Y=[1,27],m=[1,19],A=[1,28],U=[1,29],N=[1,20],I=[1,18],R=[1,21],v=[1,22],Ot=[2,6],l=[6,9,21,23,25,27,33,34,37,38,39,40,41,43,46,47,51,53,54,55],dt=[1,36],pt=[1,37],ft=[1,38],bt=[1,39],gt=[1,40],K=[6,9,12,14,16,19,20,21,23,25,27,33,34,37,38,39,40,41,43,46,47,50,51,53,54,55,69,70,71,72,73],D=[1,46],L=[1,47],Z=[1,57],j=[43,51,53,54,55,74,75],q=[1,70],W=[1,68],w=[1,65],H=[1,69],Q=[1,71],tt=[6,9,12,16,21,23,25,27,33,34,37,38,39,40,41,43,44,45,46,47,51,52,53,54,55,69,70,71,72,73],et=[1,78],st=[1,77],it=[1,76],xt=[69,70,71,72,73],Nt=[1,91],Ct=[6,9,45,50],P=[6,9,12,44,45,50,51,52],rt=[1,101],nt=[1,100],at=[1,99],X=[18,61],At=[1,110],It=[1,109],Rt=[20,43,51,53,54,55],yt=[18,61,64,66],_t={trace:p(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,statement:8,NEWLINE:9,entityName:10,relSpec:11,COLON:12,role:13,STYLE_SEPARATOR:14,idList:15,BLOCK_START:16,attributes:17,BLOCK_STOP:18,SQS:19,SQE:20,title:21,title_value:22,acc_title:23,acc_title_value:24,acc_descr:25,acc_descr_value:26,acc_descr_multiline_value:27,direction:28,classDefStatement:29,classStatement:30,styleStatement:31,subgraphHeader:32,END:33,SUBGRAPH:34,separator:35,subgraphTitle:36,direction_tb:37,direction_bt:38,direction_rl:39,direction_lr:40,CLASSDEF:41,stylesOpt:42,UNICODE_TEXT:43,STYLE_TEXT:44,COMMA:45,CLASS:46,STYLE:47,style:48,styleComponent:49,SEMI:50,NUM:51,BRKT:52,ENTITY_NAME:53,DECIMAL_NUM:54,ENTITY_ONE:55,attribute:56,attributeType:57,attributeName:58,attributeKeyTypeList:59,attributeComment:60,ATTRIBUTE_WORD:61,"?":62,attributeKeyType:63,",":64,ATTRIBUTE_KEY:65,COMMENT:66,cardinality:67,relType:68,ZERO_OR_ONE:69,ZERO_OR_MORE:70,ONE_OR_MORE:71,ONLY_ONE:72,MD_PARENT:73,NON_IDENTIFYING:74,IDENTIFYING:75,WORD:76,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",9:"NEWLINE",12:"COLON",14:"STYLE_SEPARATOR",16:"BLOCK_START",18:"BLOCK_STOP",19:"SQS",20:"SQE",21:"title",22:"title_value",23:"acc_title",24:"acc_title_value",25:"acc_descr",26:"acc_descr_value",27:"acc_descr_multiline_value",33:"END",34:"SUBGRAPH",37:"direction_tb",38:"direction_bt",39:"direction_rl",40:"direction_lr",41:"CLASSDEF",43:"UNICODE_TEXT",44:"STYLE_TEXT",45:"COMMA",46:"CLASS",47:"STYLE",50:"SEMI",51:"NUM",52:"BRKT",53:"ENTITY_NAME",54:"DECIMAL_NUM",55:"ENTITY_ONE",61:"ATTRIBUTE_WORD",62:"?",64:",",65:"ATTRIBUTE_KEY",66:"COMMENT",69:"ZERO_OR_ONE",70:"ZERO_OR_MORE",71:"ONE_OR_MORE",72:"ONLY_ONE",73:"MD_PARENT",74:"NON_IDENTIFYING",75:"IDENTIFYING",76:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[7,1],[8,5],[8,9],[8,7],[8,7],[8,4],[8,6],[8,3],[8,5],[8,1],[8,3],[8,7],[8,9],[8,6],[8,8],[8,4],[8,6],[8,2],[8,2],[8,2],[8,1],[8,1],[8,1],[8,1],[8,1],[8,3],[32,3],[32,6],[36,1],[36,2],[28,1],[28,1],[28,1],[28,1],[29,4],[15,1],[15,1],[15,3],[15,3],[30,3],[31,4],[42,1],[42,3],[48,1],[48,2],[35,1],[35,1],[35,1],[49,1],[49,1],[49,1],[49,1],[10,1],[10,1],[10,1],[10,1],[10,1],[17,1],[17,2],[56,2],[56,3],[56,3],[56,4],[57,1],[57,2],[58,1],[59,1],[59,3],[63,1],[60,1],[11,3],[67,1],[67,1],[67,1],[67,1],[67,1],[68,1],[68,1],[13,1],[13,1],[13,1]],performAction:p(function(n,o,h,i,y,t,J){var s=t.length-1;switch(y){case 1:break;case 2:this.$=[];break;case 3:this.$=t[s-1].concat(t[s]);break;case 4:this.$=t[s];break;case 5:case 6:this.$=[];break;case 7:i.addEntity(t[s-4]),i.addEntity(t[s-2]),i.addRelationship(t[s-4],t[s],t[s-2],t[s-3]),this.$=[t[s-4],t[s-2]];break;case 8:i.addEntity(t[s-8]),i.addEntity(t[s-4]),i.addRelationship(t[s-8],t[s],t[s-4],t[s-5]),i.setClass([t[s-8]],t[s-6]),i.setClass([t[s-4]],t[s-2]),this.$=[t[s-8],t[s-4]];break;case 9:i.addEntity(t[s-6]),i.addEntity(t[s-2]),i.addRelationship(t[s-6],t[s],t[s-2],t[s-3]),i.setClass([t[s-6]],t[s-4]),this.$=[t[s-6],t[s-2]];break;case 10:i.addEntity(t[s-6]),i.addEntity(t[s-4]),i.addRelationship(t[s-6],t[s],t[s-4],t[s-5]),i.setClass([t[s-4]],t[s-2]),this.$=[t[s-6],t[s-4]];break;case 11:i.addEntity(t[s-3]),i.addAttributes(t[s-3],t[s-1]),this.$=[t[s-3]];break;case 12:i.addEntity(t[s-5]),i.addAttributes(t[s-5],t[s-1]),i.setClass([t[s-5]],t[s-3]),this.$=[t[s-5]];break;case 13:i.addEntity(t[s-2]),this.$=[t[s-2]];break;case 14:i.addEntity(t[s-4]),i.setClass([t[s-4]],t[s-2]),this.$=[t[s-4]];break;case 15:i.addEntity(t[s]),this.$=[t[s]];break;case 16:i.addEntity(t[s-2]),i.setClass([t[s-2]],t[s]),this.$=[t[s-2]];break;case 17:i.addEntity(t[s-6],t[s-4]),i.addAttributes(t[s-6],t[s-1]),this.$=[t[s-6]];break;case 18:i.addEntity(t[s-8],t[s-6]),i.addAttributes(t[s-8],t[s-1]),i.setClass([t[s-8]],t[s-3]),this.$=[t[s-8]];break;case 19:i.addEntity(t[s-5],t[s-3]),this.$=[t[s-5]];break;case 20:i.addEntity(t[s-7],t[s-5]),i.setClass([t[s-7]],t[s-2]),this.$=[t[s-7]];break;case 21:i.addEntity(t[s-3],t[s-1]);break;case 22:i.addEntity(t[s-5],t[s-3]),i.setClass([t[s-5]],t[s]);break;case 23:case 24:this.$=t[s].trim(),i.setAccTitle(this.$);break;case 25:case 26:this.$=t[s].trim(),i.setAccDescription(this.$);break;case 27:i.subgraphDepth?this.$=t[s]:(i.setDirection(t[s].value),this.$=[]);break;case 31:i.subgraphDepth=(i.subgraphDepth||1)-1,this.$=i.addSubGraph({text:t[s-2].id},t[s-1],{text:t[s-2].text});break;case 32:i.subgraphDepth=(i.subgraphDepth||0)+1,this.$={id:t[s-1],text:t[s-1]};break;case 33:i.subgraphDepth=(i.subgraphDepth||0)+1,this.$={id:t[s-4],text:t[s-2]};break;case 34:case 59:case 60:case 61:case 62:case 86:this.$=t[s];break;case 35:this.$=t[s-1]+" "+t[s];break;case 36:this.$={stmt:"dir",value:"TB"};break;case 37:this.$={stmt:"dir",value:"BT"};break;case 38:this.$={stmt:"dir",value:"RL"};break;case 39:this.$={stmt:"dir",value:"LR"};break;case 40:this.$=t[s-3],i.addClass(t[s-2],t[s-1]);break;case 41:case 42:case 63:case 72:this.$=[t[s]];break;case 43:case 44:this.$=t[s-2].concat([t[s]]);break;case 45:this.$=t[s-2],i.setClass(t[s-1],t[s]);break;case 46:this.$=t[s-3],i.addCssStyles(t[s-2],t[s-1]);break;case 47:this.$=[t[s]];break;case 48:t[s-2].push(t[s]),this.$=t[s-2];break;case 50:this.$=t[s-1]+t[s];break;case 58:case 84:case 85:this.$=t[s].replace(/"/g,"");break;case 64:t[s].push(t[s-1]),this.$=t[s];break;case 65:this.$={type:t[s-1],name:t[s]};break;case 66:this.$={type:t[s-2],name:t[s-1],keys:t[s]};break;case 67:this.$={type:t[s-2],name:t[s-1],comment:t[s]};break;case 68:this.$={type:t[s-3],name:t[s-2],keys:t[s-1],comment:t[s]};break;case 69:case 71:case 74:this.$=t[s];break;case 70:this.$=t[s-1]+t[s];break;case 73:t[s-2].push(t[s]),this.$=t[s-2];break;case 75:this.$=t[s].replace(/"/g,"");break;case 76:this.$={cardA:t[s],relType:t[s-1],cardB:t[s-2]};break;case 77:this.$=i.Cardinality.ZERO_OR_ONE;break;case 78:this.$=i.Cardinality.ZERO_OR_MORE;break;case 79:this.$=i.Cardinality.ONE_OR_MORE;break;case 80:this.$=i.Cardinality.ONLY_ONE;break;case 81:this.$=i.Cardinality.MD_PARENT;break;case 82:this.$=i.Identification.NON_IDENTIFYING;break;case 83:this.$=i.Identification.IDENTIFYING;break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},e(a,u,{5:3}),{6:[1,4],7:5,8:6,9:r,10:8,21:c,23:b,25:k,27:f,28:13,29:14,30:15,31:16,32:17,34:S,37:d,38:g,39:x,40:B,41:Y,43:m,46:A,47:U,51:N,53:I,54:R,55:v},e(a,Ot,{1:[2,1]}),e(l,[2,3]),e(l,[2,4]),e(l,[2,5]),e(l,[2,15],{11:31,67:35,14:[1,32],16:[1,33],19:[1,34],69:dt,70:pt,71:ft,72:bt,73:gt}),{22:[1,41]},{24:[1,42]},{26:[1,43]},e(l,[2,26]),e(l,[2,27]),e(l,[2,28]),e(l,[2,29]),e(l,[2,30]),e(l,u,{5:44}),e(K,[2,58]),e(K,[2,59]),e(K,[2,60]),e(K,[2,61]),e(K,[2,62]),e(l,[2,36]),e(l,[2,37]),e(l,[2,38]),e(l,[2,39]),{15:45,43:D,44:L},{15:48,43:D,44:L},{15:49,43:D,44:L},{10:50,43:m,51:N,53:I,54:R,55:v},{10:51,43:m,51:N,53:I,54:R,55:v},{15:52,43:D,44:L},{17:53,18:[1,54],56:55,57:56,61:Z},{10:58,43:m,51:N,53:I,54:R,55:v},{68:59,74:[1,60],75:[1,61]},e(j,[2,77]),e(j,[2,78]),e(j,[2,79]),e(j,[2,80]),e(j,[2,81]),e(l,[2,23]),e(l,[2,24]),e(l,[2,25]),{6:[1,63],7:5,8:6,9:r,10:8,21:c,23:b,25:k,27:f,28:13,29:14,30:15,31:16,32:17,33:[1,62],34:S,37:d,38:g,39:x,40:B,41:Y,43:m,46:A,47:U,51:N,53:I,54:R,55:v},{12:q,42:64,44:W,45:w,48:66,49:67,51:H,52:Q},e(tt,[2,41]),e(tt,[2,42]),{15:72,43:D,44:L,45:w},{12:q,42:73,44:W,45:w,48:66,49:67,51:H,52:Q},{6:et,9:st,19:[1,75],35:74,50:it},{12:[1,79],14:[1,80]},e(l,[2,16],{67:35,11:81,16:[1,82],45:w,69:dt,70:pt,71:ft,72:bt,73:gt}),{18:[1,83]},e(l,[2,13]),{17:84,18:[2,63],56:55,57:56,61:Z},{58:85,61:[1,86]},{61:[2,69],62:[1,87]},{20:[1,88]},{67:89,69:dt,70:pt,71:ft,72:bt,73:gt},e(xt,[2,82]),e(xt,[2,83]),e(l,[2,31]),e(l,Ot),{6:et,9:st,35:90,45:Nt,50:it},{43:[1,92],44:[1,93]},e(Ct,[2,47],{49:94,12:q,44:W,51:H,52:Q}),e(P,[2,49]),e(P,[2,54]),e(P,[2,55]),e(P,[2,56]),e(P,[2,57]),e(l,[2,45],{45:w}),{6:et,9:st,35:95,45:Nt,50:it},e(l,[2,32]),{10:97,36:96,43:m,51:N,53:I,54:R,55:v},e(l,[2,51]),e(l,[2,52]),e(l,[2,53]),{13:98,43:rt,53:nt,76:at},{15:102,43:D,44:L},{10:103,43:m,51:N,53:I,54:R,55:v},{17:104,18:[1,105],56:55,57:56,61:Z},e(l,[2,11]),{18:[2,64]},e(X,[2,65],{59:106,60:107,63:108,65:At,66:It}),e([18,61,65,66],[2,71]),{61:[2,70]},e(l,[2,21],{14:[1,112],16:[1,111]}),e([43,51,53,54,55],[2,76]),e(l,[2,40]),{12:q,44:W,48:113,49:67,51:H,52:Q},e(tt,[2,43]),e(tt,[2,44]),e(P,[2,50]),e(l,[2,46]),{10:115,20:[1,114],43:m,51:N,53:I,54:R,55:v},e(Rt,[2,34]),e(l,[2,7]),e(l,[2,84]),e(l,[2,85]),e(l,[2,86]),{12:[1,116],45:w},{12:[1,118],14:[1,117]},{18:[1,119]},e(l,[2,14]),e(X,[2,66],{60:120,64:[1,121],66:It}),e(X,[2,67]),e(yt,[2,72]),e(X,[2,75]),e(yt,[2,74]),{17:122,18:[1,123],56:55,57:56,61:Z},{15:124,43:D,44:L},e(Ct,[2,48],{49:94,12:q,44:W,51:H,52:Q}),{6:et,9:st,35:125,50:it},e(Rt,[2,35]),{13:126,43:rt,53:nt,76:at},{15:127,43:D,44:L},{13:128,43:rt,53:nt,76:at},e(l,[2,12]),e(X,[2,68]),{63:129,65:At},{18:[1,130]},e(l,[2,19]),e(l,[2,22],{16:[1,131],45:w}),e(l,[2,33]),e(l,[2,10]),{12:[1,132],45:w},e(l,[2,9]),e(yt,[2,73]),e(l,[2,17]),{17:133,18:[1,134],56:55,57:56,61:Z},{13:135,43:rt,53:nt,76:at},{18:[1,136]},e(l,[2,20]),e(l,[2,8]),e(l,[2,18])],defaultActions:{84:[2,64],87:[2,70]},parseError:p(function(n,o){if(o.recoverable)this.trace(n);else{var h=new Error(n);throw h.hash=o,h}},"parseError"),parse:p(function(n){var o=this,h=[0],i=[],y=[null],t=[],J=this.table,s="",ct=0,vt=0,Gt=2,Dt=1,Ft=t.slice.call(arguments,1),_=Object.create(this.lexer),G={yy:{}};for(var kt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,kt)&&(G.yy[kt]=this.yy[kt]);_.setInput(n,G.yy),G.yy.lexer=_,G.yy.parser=this,typeof _.yylloc>"u"&&(_.yylloc={});var mt=_.yylloc;t.push(mt);var Yt=_.options&&_.options.ranges;typeof G.yy.parseError=="function"?this.parseError=G.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Pt(T){h.length=h.length-2*T,y.length=y.length-T,t.length=t.length-T}p(Pt,"popStack");function Lt(){var T;return T=i.pop()||_.lex()||Dt,typeof T!="number"&&(T instanceof Array&&(i=T,T=i.pop()),T=o.symbols_[T]||T),T}p(Lt,"lex");for(var E,F,O,Et,z={},lt,C,wt,ht;;){if(F=h[h.length-1],this.defaultActions[F]?O=this.defaultActions[F]:((E===null||typeof E>"u")&&(E=Lt()),O=J[F]&&J[F][E]),typeof O>"u"||!O.length||!O[0]){var St="";ht=[];for(lt in J[F])this.terminals_[lt]&<>Gt&&ht.push("'"+this.terminals_[lt]+"'");_.showPosition?St="Parse error on line "+(ct+1)+`: `+_.showPosition()+` Expecting `+ht.join(", ")+", got '"+(this.terminals_[E]||E)+"'":St="Parse error on line "+(ct+1)+": Unexpected "+(E==Dt?"end of input":"'"+(this.terminals_[E]||E)+"'"),this.parseError(St,{text:_.match,token:this.terminals_[E]||E,line:_.yylineno,loc:mt,expected:ht})}if(O[0]instanceof Array&&O.length>1)throw new Error("Parse Error: multiple actions possible at state: "+F+", token: "+E);switch(O[0]){case 1:h.push(E),y.push(_.yytext),t.push(_.yylloc),h.push(O[1]),E=null,vt=_.yyleng,s=_.yytext,ct=_.yylineno,mt=_.yylloc;break;case 2:if(C=this.productions_[O[1]][1],z.$=y[y.length-C],z._$={first_line:t[t.length-(C||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(C||1)].first_column,last_column:t[t.length-1].last_column},Yt&&(z._$.range=[t[t.length-(C||1)].range[0],t[t.length-1].range[1]]),Et=this.performAction.apply(z,[s,vt,ct,G.yy,O[1],y,t].concat(Ft)),typeof Et<"u")return Et;C&&(h=h.slice(0,-1*C*2),y=y.slice(0,-1*C),t=t.slice(0,-1*C)),h.push(this.productions_[O[1]][0]),y.push(z.$),t.push(z._$),wt=J[h[h.length-2]][h[h.length-1]],h.push(wt);break;case 3:return!0}}return!0},"parse")},Bt=(function(){var V={EOF:1,parseError:p(function(o,h){if(this.yy.parser)this.yy.parser.parseError(o,h);else throw new Error(o)},"parseError"),setInput:p(function(n,o){return this.yy=o||this.yy||{},this._input=n,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:p(function(){var n=this._input[0];this.yytext+=n,this.yyleng++,this.offset++,this.match+=n,this.matched+=n;var o=n.match(/(?:\r\n?|\n).*/g);return o?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),n},"input"),unput:p(function(n){var o=n.length,h=n.split(/(?:\r\n?|\n)/g);this._input=n+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-o),this.offset-=o;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),h.length-1&&(this.yylineno-=h.length-1);var y=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:h?(h.length===i.length?this.yylloc.first_column:0)+i[i.length-h.length].length-h[0].length:this.yylloc.first_column-o},this.options.ranges&&(this.yylloc.range=[y[0],y[0]+this.yyleng-o]),this.yyleng=this.yytext.length,this},"unput"),more:p(function(){return this._more=!0,this},"more"),reject:p(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:p(function(n){this.unput(this.match.slice(n))},"less"),pastInput:p(function(){var n=this.matched.substr(0,this.matched.length-this.match.length);return(n.length>20?"...":"")+n.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:p(function(){var n=this.match;return n.length<20&&(n+=this._input.substr(0,20-n.length)),(n.substr(0,20)+(n.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:p(function(){var n=this.pastInput(),o=new Array(n.length+1).join("-");return n+this.upcomingInput()+` diff --git a/apps/pythinker-code/dist-web/assets/flowDiagram-A5DVABFB-B55b-50s.js b/apps/pythinker-code/dist-web/assets/flowDiagram-A5DVABFB-DeIptUeR.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/flowDiagram-A5DVABFB-B55b-50s.js rename to apps/pythinker-code/dist-web/assets/flowDiagram-A5DVABFB-DeIptUeR.js index d78bee9bb..3304f5380 100644 --- a/apps/pythinker-code/dist-web/assets/flowDiagram-A5DVABFB-B55b-50s.js +++ b/apps/pythinker-code/dist-web/assets/flowDiagram-A5DVABFB-DeIptUeR.js @@ -1,4 +1,4 @@ -import{g as Ht}from"./chunk-5VM5RSS4-baBluNR7.js";import{g as Xt}from"./chunk-XXDRQBXY-BOyQwG-7.js";import{s as Qt}from"./chunk-POPQ4Y6H-Tp7S0w--.js";import{_ as k,b3 as Zt,Y as Ot,l as J,c as Ae,x as Jt,y as $t,z as it,b as e1,s as t1,p as s1,a as i1,g as r1,q as a1,k as n1,Z as u1,$ as o1,ca as l1,t as tt,j as st,r as c1,b7 as h1,u as d1}from"./mermaid.core-D6Xg32pF.js";import{f as p1}from"./chunk-F27PBJKO-B_4WdsPc.js";import{p as f1}from"./purify.es-5AjVNlXF.js";import{c as g1}from"./channel-CRmZXxAS.js";var b1="flowchart-",A1=class{constructor(){this.vertexCounter=0,this.config=Ae(),this.diagramId="",this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=e1,this.setAccDescription=t1,this.setDiagramTitle=s1,this.getAccTitle=i1,this.getAccDescription=r1,this.getDiagramTitle=a1,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}static{k(this,"FlowDB")}sanitizeText(e){return n1.sanitizeText(e,this.config)}sanitizeNodeLabelType(e){switch(e){case"markdown":case"string":case"text":return e;default:return"markdown"}}setDiagramId(e){this.diagramId=e}lookUpDomId(e){for(const i of this.vertices.values())if(i.id===e)return this.diagramId?`${this.diagramId}-${i.domId}`:i.domId;return this.diagramId?`${this.diagramId}-${e}`:e}addVertex(e,i,r,a,u,f,l={},b){if(!e||e.trim().length===0)return;let h;if(b!==void 0){let o;b.includes(` +import{g as Ht}from"./chunk-5VM5RSS4-D8DHuAth.js";import{g as Xt}from"./chunk-XXDRQBXY-Pj2mkOow.js";import{s as Qt}from"./chunk-POPQ4Y6H-B7iG5qn5.js";import{_ as k,b3 as Zt,Y as Ot,l as J,c as Ae,x as Jt,y as $t,z as it,b as e1,s as t1,p as s1,a as i1,g as r1,q as a1,k as n1,Z as u1,$ as o1,ca as l1,t as tt,j as st,r as c1,b7 as h1,u as d1}from"./mermaid.core-BLsmN-lt.js";import{f as p1}from"./chunk-F27PBJKO-DtNIaJ4B.js";import{p as f1}from"./purify.es-5AjVNlXF.js";import{c as g1}from"./channel-Bm0H2vxn.js";var b1="flowchart-",A1=class{constructor(){this.vertexCounter=0,this.config=Ae(),this.diagramId="",this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=e1,this.setAccDescription=t1,this.setDiagramTitle=s1,this.getAccTitle=i1,this.getAccDescription=r1,this.getDiagramTitle=a1,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}static{k(this,"FlowDB")}sanitizeText(e){return n1.sanitizeText(e,this.config)}sanitizeNodeLabelType(e){switch(e){case"markdown":case"string":case"text":return e;default:return"markdown"}}setDiagramId(e){this.diagramId=e}lookUpDomId(e){for(const i of this.vertices.values())if(i.id===e)return this.diagramId?`${this.diagramId}-${i.domId}`:i.domId;return this.diagramId?`${this.diagramId}-${e}`:e}addVertex(e,i,r,a,u,f,l={},b){if(!e||e.trim().length===0)return;let h;if(b!==void 0){let o;b.includes(` `)?o=b+` `:o=`{ `+b+` diff --git a/apps/pythinker-code/dist-web/assets/freemarker2-BLqTDIvk.js b/apps/pythinker-code/dist-web/assets/freemarker2-B2ItDy_k.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/freemarker2-BLqTDIvk.js rename to apps/pythinker-code/dist-web/assets/freemarker2-B2ItDy_k.js index f55ccf1a6..88808ceb4 100644 --- a/apps/pythinker-code/dist-web/assets/freemarker2-BLqTDIvk.js +++ b/apps/pythinker-code/dist-web/assets/freemarker2-B2ItDy_k.js @@ -1,3 +1,3 @@ -import{l as c}from"./editor.main-CUgPnB4r.js";import"./index-D9Nz1t7z.js";import"./purify.es-5AjVNlXF.js";const s=["assign","flush","ftl","return","global","import","include","break","continue","local","nested","nt","setting","stop","t","lt","rt","fallback"],d=["attempt","autoesc","autoEsc","compress","comment","escape","noescape","function","if","list","items","sep","macro","noparse","noParse","noautoesc","noAutoEsc","outputformat","switch","visit","recurse"],r={close:">",id:"angle",open:"<"},a={close:"\\]",id:"bracket",open:"\\["},F={close:"[>\\]]",id:"auto",open:"[<\\[]"},k={close:"\\}",id:"dollar",open1:"\\$",open2:"\\{"},p={close:"\\]",id:"bracket",open1:"\\[",open2:"="};function l(t){return{brackets:[["<",">"],["[","]"],["(",")"],["{","}"]],comments:{blockComment:[`${t.open}--`,`--${t.close}`]},autoCloseBefore:` +import{l as c}from"./editor.main-CSd5xoJU.js";import"./index-XmhyfFRf.js";import"./purify.es-5AjVNlXF.js";const s=["assign","flush","ftl","return","global","import","include","break","continue","local","nested","nt","setting","stop","t","lt","rt","fallback"],d=["attempt","autoesc","autoEsc","compress","comment","escape","noescape","function","if","list","items","sep","macro","noparse","noParse","noautoesc","noAutoEsc","outputformat","switch","visit","recurse"],r={close:">",id:"angle",open:"<"},a={close:"\\]",id:"bracket",open:"\\["},F={close:"[>\\]]",id:"auto",open:"[<\\[]"},k={close:"\\}",id:"dollar",open1:"\\$",open2:"\\{"},p={close:"\\]",id:"bracket",open1:"\\[",open2:"="};function l(t){return{brackets:[["<",">"],["[","]"],["(",")"],["{","}"]],comments:{blockComment:[`${t.open}--`,`--${t.close}`]},autoCloseBefore:` \r }]),.:;=`,autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string"]}],surroundingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"}],folding:{markers:{start:new RegExp(`${t.open}#(?:${d.join("|")})([^/${t.close}]*(?!/)${t.close})[^${t.open}]*$`),end:new RegExp(`${t.open}/#(?:${d.join("|")})[\\r\\n\\t ]*>`)}},onEnterRules:[{beforeText:new RegExp(`${t.open}#(?!(?:${s.join("|")}))([a-zA-Z_]+)([^/${t.close}]*(?!/)${t.close})[^${t.open}]*$`),afterText:new RegExp(`^${t.open}/#([a-zA-Z_]+)[\\r\\n\\t ]*${t.close}$`),action:{indentAction:c.IndentAction.IndentOutdent}},{beforeText:new RegExp(`${t.open}#(?!(?:${s.join("|")}))([a-zA-Z_]+)([^/${t.close}]*(?!/)${t.close})[^${t.open}]*$`),action:{indentAction:c.IndentAction.Indent}}]}}function g(){return{brackets:[["<",">"],["[","]"],["(",")"],["{","}"]],autoCloseBefore:` \r }]),.:;=`,autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string"]}],surroundingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"}],folding:{markers:{start:new RegExp(`[<\\[]#(?:${d.join("|")})([^/>\\]]*(?!/)[>\\]])[^<\\[]*$`),end:new RegExp(`[<\\[]/#(?:${d.join("|")})[\\r\\n\\t ]*>`)}},onEnterRules:[{beforeText:new RegExp(`[<\\[]#(?!(?:${s.join("|")}))([a-zA-Z_]+)([^/>\\]]*(?!/)[>\\]])[^[<\\[]]*$`),afterText:new RegExp("^[<\\[]/#([a-zA-Z_]+)[\\r\\n\\t ]*[>\\]]$"),action:{indentAction:c.IndentAction.IndentOutdent}},{beforeText:new RegExp(`[<\\[]#(?!(?:${s.join("|")}))([a-zA-Z_]+)([^/>\\]]*(?!/)[>\\]])[^[<\\[]]*$`),action:{indentAction:c.IndentAction.Indent}}]}}function _(t,n){const i=`_${t.id}_${n.id}`,e=u=>u.replace(/__id__/g,i),o=u=>{const m=u.source.replace(/__id__/g,i);return new RegExp(m,u.flags)};return{unicode:!0,includeLF:!1,start:e("default__id__"),ignoreCase:!1,defaultToken:"invalid",tokenPostfix:".freemarker2",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],[e("open__id__")]:new RegExp(t.open),[e("close__id__")]:new RegExp(t.close),[e("iOpen1__id__")]:new RegExp(n.open1),[e("iOpen2__id__")]:new RegExp(n.open2),[e("iClose__id__")]:new RegExp(n.close),[e("startTag__id__")]:o(/(@open__id__)(#)/),[e("endTag__id__")]:o(/(@open__id__)(\/#)/),[e("startOrEndTag__id__")]:o(/(@open__id__)(\/?#)/),[e("closeTag1__id__")]:o(/((?:@blank)*)(@close__id__)/),[e("closeTag2__id__")]:o(/((?:@blank)*\/?)(@close__id__)/),blank:/[ \t\n\r]/,keywords:["false","true","in","as","using"],directiveStartCloseTag1:/attempt|recover|sep|auto[eE]sc|no(?:autoe|AutoE)sc|compress|default|no[eE]scape|comment|no[pP]arse/,directiveStartCloseTag2:/else|break|continue|return|stop|flush|t|lt|rt|nt|nested|recurse|fallback|ftl/,directiveStartBlank:/if|else[iI]f|list|for[eE]ach|switch|case|assign|global|local|include|import|function|macro|transform|visit|stop|return|call|setting|output[fF]ormat|nested|recurse|escape|ftl|items/,directiveEndCloseTag1:/if|list|items|sep|recover|attempt|for[eE]ach|local|global|assign|function|macro|output[fF]ormat|auto[eE]sc|no(?:autoe|AutoE)sc|compress|transform|switch|escape|no[eE]scape/,escapedChar:/\\(?:[ntrfbgla\\'"\{=]|(?:x[0-9A-Fa-f]{1,4}))/,asciiDigit:/[0-9]/,integer:/[0-9]+/,nonEscapedIdStartChar:/[\$@-Z_a-z\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u1FFF\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183-\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3006\u3031-\u3035\u303B-\u303C\u3040-\u318F\u31A0-\u31BA\u31F0-\u31FF\u3300-\u337F\u3400-\u4DB5\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5-\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40-\uFB41\uFB43-\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,escapedIdChar:/\\[\-\.:#]/,idStartChar:/(?:@nonEscapedIdStartChar)|(?:@escapedIdChar)/,id:/(?:@idStartChar)(?:(?:@idStartChar)|(?:@asciiDigit))*/,specialHashKeys:/\*\*|\*|false|true|in|as|using/,namedSymbols:/<=|>=|\\lte|\\lt|<|\\gte|\\gt|>|&&|\\and|->|->|==|!=|\+=|-=|\*=|\/=|%=|\+\+|--|<=|&&|\|\||:|\.\.\.|\.\.\*|\.\.<|\.\.!|\?\?|=|<|\+|-|\*|\/|%|\||\.\.|\?|!|&|\.|,|;/,arrows:["->","->"],delimiters:[";",":",",","."],stringOperators:["lte","lt","gte","gt"],noParseTags:["noparse","noParse","comment"],tokenizer:{[e("default__id__")]:[{include:e("@directive_token__id__")},{include:e("@interpolation_and_text_token__id__")}],[e("fmExpression__id__.directive")]:[{include:e("@blank_and_expression_comment_token__id__")},{include:e("@directive_end_token__id__")},{include:e("@expression_token__id__")}],[e("fmExpression__id__.interpolation")]:[{include:e("@blank_and_expression_comment_token__id__")},{include:e("@expression_token__id__")},{include:e("@greater_operators_token__id__")}],[e("inParen__id__.plain")]:[{include:e("@blank_and_expression_comment_token__id__")},{include:e("@directive_end_token__id__")},{include:e("@expression_token__id__")}],[e("inParen__id__.gt")]:[{include:e("@blank_and_expression_comment_token__id__")},{include:e("@expression_token__id__")},{include:e("@greater_operators_token__id__")}],[e("noSpaceExpression__id__")]:[{include:e("@no_space_expression_end_token__id__")},{include:e("@directive_end_token__id__")},{include:e("@expression_token__id__")}],[e("unifiedCall__id__")]:[{include:e("@unified_call_token__id__")}],[e("singleString__id__")]:[{include:e("@string_single_token__id__")}],[e("doubleString__id__")]:[{include:e("@string_double_token__id__")}],[e("rawSingleString__id__")]:[{include:e("@string_single_raw_token__id__")}],[e("rawDoubleString__id__")]:[{include:e("@string_double_raw_token__id__")}],[e("expressionComment__id__")]:[{include:e("@expression_comment_token__id__")}],[e("noParse__id__")]:[{include:e("@no_parse_token__id__")}],[e("terseComment__id__")]:[{include:e("@terse_comment_token__id__")}],[e("directive_token__id__")]:[[o(/(?:@startTag__id__)(@directiveStartCloseTag1)(?:@closeTag1__id__)/),t.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${n.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${n.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive"},{cases:{"@noParseTags":{token:"tag",next:e("@noParse__id__.$3")},"@default":{token:"tag"}}},{token:"delimiter.directive"},{token:"@brackets.directive"}]],[o(/(?:@startTag__id__)(@directiveStartCloseTag2)(?:@closeTag2__id__)/),t.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${n.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${n.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag"},{token:"delimiter.directive"},{token:"@brackets.directive"}]],[o(/(?:@startTag__id__)(@directiveStartBlank)(@blank)/),t.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${n.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${n.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag"},{token:"",next:e("@fmExpression__id__.directive")}]],[o(/(?:@endTag__id__)(@directiveEndCloseTag1)(?:@closeTag1__id__)/),t.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${n.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${n.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag"},{token:"delimiter.directive"},{token:"@brackets.directive"}]],[o(/(@open__id__)(@)/),t.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${n.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${n.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive",next:e("@unifiedCall__id__")}]],[o(/(@open__id__)(\/@)((?:(?:@id)(?:\.(?:@id))*)?)(?:@closeTag1__id__)/),[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag"},{token:"delimiter.directive"},{token:"@brackets.directive"}]],[o(/(@open__id__)#--/),t.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${n.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${n.id}`}}}:{token:"comment",next:e("@terseComment__id__")}],[o(/(?:@startOrEndTag__id__)([a-zA-Z_]+)/),t.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${n.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${n.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag.invalid",next:e("@fmExpression__id__.directive")}]]],[e("interpolation_and_text_token__id__")]:[[o(/(@iOpen1__id__)(@iOpen2__id__)/),[{token:n.id==="bracket"?"@brackets.interpolation":"delimiter.interpolation"},{token:n.id==="bracket"?"delimiter.interpolation":"@brackets.interpolation",next:e("@fmExpression__id__.interpolation")}]],[/[\$#<\[\{]|(?:@blank)+|[^\$<#\[\{\n\r\t ]+/,{token:"source"}]],[e("string_single_token__id__")]:[[/[^'\\]/,{token:"string"}],[/@escapedChar/,{token:"string.escape"}],[/'/,{token:"string",next:"@pop"}]],[e("string_double_token__id__")]:[[/[^"\\]/,{token:"string"}],[/@escapedChar/,{token:"string.escape"}],[/"/,{token:"string",next:"@pop"}]],[e("string_single_raw_token__id__")]:[[/[^']+/,{token:"string.raw"}],[/'/,{token:"string.raw",next:"@pop"}]],[e("string_double_raw_token__id__")]:[[/[^"]+/,{token:"string.raw"}],[/"/,{token:"string.raw",next:"@pop"}]],[e("expression_token__id__")]:[[/(r?)(['"])/,{cases:{"r'":[{token:"keyword"},{token:"string.raw",next:e("@rawSingleString__id__")}],'r"':[{token:"keyword"},{token:"string.raw",next:e("@rawDoubleString__id__")}],"'":[{token:"source"},{token:"string",next:e("@singleString__id__")}],'"':[{token:"source"},{token:"string",next:e("@doubleString__id__")}]}}],[/(?:@integer)(?:\.(?:@integer))?/,{cases:{"(?:@integer)":{token:"number"},"@default":{token:"number.float"}}}],[/(\.)(@blank*)(@specialHashKeys)/,[{token:"delimiter"},{token:""},{token:"identifier"}]],[/(?:@namedSymbols)/,{cases:{"@arrows":{token:"meta.arrow"},"@delimiters":{token:"delimiter"},"@default":{token:"operators"}}}],[/@id/,{cases:{"@keywords":{token:"keyword.$0"},"@stringOperators":{token:"operators"},"@default":{token:"identifier"}}}],[/[\[\]\(\)\{\}]/,{cases:{"\\[":{cases:{"$S2==gt":{token:"@brackets",next:e("@inParen__id__.gt")},"@default":{token:"@brackets",next:e("@inParen__id__.plain")}}},"\\]":{cases:{...n.id==="bracket"?{"$S2==interpolation":{token:"@brackets.interpolation",next:"@popall"}}:{},...t.id==="bracket"?{"$S2==directive":{token:"@brackets.directive",next:"@popall"}}:{},[e("$S1==inParen__id__")]:{token:"@brackets",next:"@pop"},"@default":{token:"@brackets"}}},"\\(":{token:"@brackets",next:e("@inParen__id__.gt")},"\\)":{cases:{[e("$S1==inParen__id__")]:{token:"@brackets",next:"@pop"},"@default":{token:"@brackets"}}},"\\{":{cases:{"$S2==gt":{token:"@brackets",next:e("@inParen__id__.gt")},"@default":{token:"@brackets",next:e("@inParen__id__.plain")}}},"\\}":{cases:{...n.id==="bracket"?{}:{"$S2==interpolation":{token:"@brackets.interpolation",next:"@popall"}},[e("$S1==inParen__id__")]:{token:"@brackets",next:"@pop"},"@default":{token:"@brackets"}}}}}],[/\$\{/,{token:"delimiter.invalid"}]],[e("blank_and_expression_comment_token__id__")]:[[/(?:@blank)+/,{token:""}],[/[<\[][#!]--/,{token:"comment",next:e("@expressionComment__id__")}]],[e("directive_end_token__id__")]:[[/>/,t.id==="bracket"?{token:"operators"}:{token:"@brackets.directive",next:"@popall"}],[o(/(\/)(@close__id__)/),[{token:"delimiter.directive"},{token:"@brackets.directive",next:"@popall"}]]],[e("greater_operators_token__id__")]:[[/>/,{token:"operators"}],[/>=/,{token:"operators"}]],[e("no_space_expression_end_token__id__")]:[[/(?:@blank)+/,{token:"",switchTo:e("@fmExpression__id__.directive")}]],[e("unified_call_token__id__")]:[[/(@id)((?:@blank)+)/,[{token:"tag"},{token:"",next:e("@fmExpression__id__.directive")}]],[o(/(@id)(\/?)(@close__id__)/),[{token:"tag"},{token:"delimiter.directive"},{token:"@brackets.directive",next:"@popall"}]],[/./,{token:"@rematch",next:e("@noSpaceExpression__id__")}]],[e("no_parse_token__id__")]:[[o(/(@open__id__)(\/#?)([a-zA-Z]+)((?:@blank)*)(@close__id__)/),{cases:{"$S2==$3":[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag"},{token:""},{token:"@brackets.directive",next:"@popall"}],"$S2==comment":[{token:"comment"},{token:"comment"},{token:"comment"},{token:"comment"},{token:"comment"}],"@default":[{token:"source"},{token:"source"},{token:"source"},{token:"source"},{token:"source"}]}}],[/[^<\[\-]+|[<\[\-]/,{cases:{"$S2==comment":{token:"comment"},"@default":{token:"source"}}}]],[e("expression_comment_token__id__")]:[[/--[>\]]/,{token:"comment",next:"@pop"}],[/[^\->\]]+|[>\]\-]/,{token:"comment"}]],[e("terse_comment_token__id__")]:[[o(/--(?:@close__id__)/),{token:"comment",next:"@popall"}],[/[^<\[\-]+|[<\[\-]/,{token:"comment"}]]}}}function A(t){const n=_(r,t),i=_(a,t),e=_(F,t);return{...n,...i,...e,unicode:!0,includeLF:!1,start:`default_auto_${t.id}`,ignoreCase:!1,defaultToken:"invalid",tokenPostfix:".freemarker2",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],tokenizer:{...n.tokenizer,...i.tokenizer,...e.tokenizer}}}const $={conf:l(r),language:_(r,k)},E={conf:l(a),language:_(a,k)},B={conf:l(r),language:_(r,p)},D={conf:l(a),language:_(a,p)},C={conf:g(),language:A(k)},v={conf:g(),language:A(p)};export{B as TagAngleInterpolationBracket,$ as TagAngleInterpolationDollar,v as TagAutoInterpolationBracket,C as TagAutoInterpolationDollar,D as TagBracketInterpolationBracket,E as TagBracketInterpolationDollar}; diff --git a/apps/pythinker-code/dist-web/assets/ganttDiagram-EL5Y4UJY-DkUtPT3S.js b/apps/pythinker-code/dist-web/assets/ganttDiagram-EL5Y4UJY-BZZaZJ0c.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/ganttDiagram-EL5Y4UJY-DkUtPT3S.js rename to apps/pythinker-code/dist-web/assets/ganttDiagram-EL5Y4UJY-BZZaZJ0c.js index 59fecf000..54a6757ac 100644 --- a/apps/pythinker-code/dist-web/assets/ganttDiagram-EL5Y4UJY-DkUtPT3S.js +++ b/apps/pythinker-code/dist-web/assets/ganttDiagram-EL5Y4UJY-BZZaZJ0c.js @@ -1,4 +1,4 @@ -import{bf as on,bg as On,bh as cn,bi as un,bj as ln,bk as ue,bl as Hn,b4 as oe,g as Nn,s as Pn,q as Vn,p as Rn,a as zn,b as qn,_ as d,c as Yt,j as Zt,d as Bn,bm as it,l as Tt,k as Zn,o as Xn,r as Gn,z as jn}from"./mermaid.core-D6Xg32pF.js";import{b as Qn,t as Ne,c as Jn,a as Kn,l as tr}from"./linear-DnyH2I-x.js";import{i as er}from"./init-Gi6I4Gst.js";import"./index-D9Nz1t7z.js";import"./purify.es-5AjVNlXF.js";import"./defaultLocale-DX6XiGOO.js";function nr(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n=i)&&(n=i)}return n}function rr(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function ir(t){return t}var Gt=1,le=2,xe=3,Xt=4,Pe=1e-6;function sr(t){return"translate("+t+",0)"}function ar(t){return"translate(0,"+t+")"}function or(t){return e=>+t(e)}function cr(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function ur(){return!this.__axis}function fn(t,e){var n=[],r=null,i=null,s=6,a=6,y=3,F=typeof window<"u"&&window.devicePixelRatio>1?0:.5,S=t===Gt||t===Xt?-1:1,w=t===Xt||t===le?"x":"y",P=t===Gt||t===xe?sr:ar;function _(Y){var X=r??(e.ticks?e.ticks.apply(e,n):e.domain()),B=i??(e.tickFormat?e.tickFormat.apply(e,n):ir),v=Math.max(s,0)+y,U=e.range(),R=+U[0]+F,E=+U[U.length-1]+F,z=(e.bandwidth?cr:or)(e.copy(),F),G=Y.selection?Y.selection():Y,T=G.selectAll(".domain").data([null]),k=G.selectAll(".tick").data(X,e).order(),p=k.exit(),L=k.enter().append("g").attr("class","tick"),x=k.select("line"),C=k.select("text");T=T.merge(T.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),k=k.merge(L),x=x.merge(L.append("line").attr("stroke","currentColor").attr(w+"2",S*s)),C=C.merge(L.append("text").attr("fill","currentColor").attr(w,S*v).attr("dy",t===Gt?"0em":t===xe?"0.71em":"0.32em")),Y!==G&&(T=T.transition(Y),k=k.transition(Y),x=x.transition(Y),C=C.transition(Y),p=p.transition(Y).attr("opacity",Pe).attr("transform",function(M){return isFinite(M=z(M))?P(M+F):this.getAttribute("transform")}),L.attr("opacity",Pe).attr("transform",function(M){var D=this.parentNode.__axis;return P((D&&isFinite(D=D(M))?D:z(M))+F)})),p.remove(),T.attr("d",t===Xt||t===le?a?"M"+S*a+","+R+"H"+F+"V"+E+"H"+S*a:"M"+F+","+R+"V"+E:a?"M"+R+","+S*a+"V"+F+"H"+E+"V"+S*a:"M"+R+","+F+"H"+E),k.attr("opacity",1).attr("transform",function(M){return P(z(M)+F)}),x.attr(w+"2",S*s),C.attr(w,S*v).text(B),G.filter(ur).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===le?"start":t===Xt?"end":"middle"),G.each(function(){this.__axis=z})}return _.scale=function(Y){return arguments.length?(e=Y,_):e},_.ticks=function(){return n=Array.from(arguments),_},_.tickArguments=function(Y){return arguments.length?(n=Y==null?[]:Array.from(Y),_):n.slice()},_.tickValues=function(Y){return arguments.length?(r=Y==null?null:Array.from(Y),_):r&&r.slice()},_.tickFormat=function(Y){return arguments.length?(i=Y,_):i},_.tickSize=function(Y){return arguments.length?(s=a=+Y,_):s},_.tickSizeInner=function(Y){return arguments.length?(s=+Y,_):s},_.tickSizeOuter=function(Y){return arguments.length?(a=+Y,_):a},_.tickPadding=function(Y){return arguments.length?(y=+Y,_):y},_.offset=function(Y){return arguments.length?(F=+Y,_):F},_}function lr(t){return fn(Gt,t)}function fr(t){return fn(xe,t)}const dr=Math.PI/180,hr=180/Math.PI,ne=18,dn=.96422,hn=1,mn=.82521,gn=4/29,Ft=6/29,yn=3*Ft*Ft,mr=Ft*Ft*Ft;function kn(t){if(t instanceof ft)return new ft(t.l,t.a,t.b,t.opacity);if(t instanceof ht)return pn(t);t instanceof on||(t=On(t));var e=me(t.r),n=me(t.g),r=me(t.b),i=fe((.2225045*e+.7168786*n+.0606169*r)/hn),s,a;return e===n&&n===r?s=a=i:(s=fe((.4360747*e+.3850649*n+.1430804*r)/dn),a=fe((.0139322*e+.0971045*n+.7141733*r)/mn)),new ft(116*i-16,500*(s-i),200*(i-a),t.opacity)}function gr(t,e,n,r){return arguments.length===1?kn(t):new ft(t,e,n,r??1)}function ft(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}cn(ft,gr,un(ln,{brighter(t){return new ft(this.l+ne*(t??1),this.a,this.b,this.opacity)},darker(t){return new ft(this.l-ne*(t??1),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return e=dn*de(e),t=hn*de(t),n=mn*de(n),new on(he(3.1338561*e-1.6168667*t-.4906146*n),he(-.9787684*e+1.9161415*t+.033454*n),he(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}}));function fe(t){return t>mr?Math.pow(t,1/3):t/yn+gn}function de(t){return t>Ft?t*t*t:yn*(t-gn)}function he(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function me(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function yr(t){if(t instanceof ht)return new ht(t.h,t.c,t.l,t.opacity);if(t instanceof ft||(t=kn(t)),t.a===0&&t.b===0)return new ht(NaN,0(t(s=new Date(+s)),s),i.ceil=s=>(t(s=new Date(s-1)),e(s,1),t(s),s),i.round=s=>{const a=i(s),y=i.ceil(s);return s-a(e(s=new Date(+s),a==null?1:Math.floor(a)),s),i.range=(s,a,y)=>{const F=[];if(s=i.ceil(s),y=y==null?1:Math.floor(y),!(s0))return F;let S;do F.push(S=new Date(+s)),e(s,y),t(s);while(Snt(a=>{if(a>=a)for(;t(a),!s(a);)a.setTime(a-1)},(a,y)=>{if(a>=a)if(y<0)for(;++y<=0;)for(;e(a,-1),!s(a););else for(;--y>=0;)for(;e(a,1),!s(a););}),n&&(i.count=(s,a)=>(ge.setTime(+s),ye.setTime(+a),t(ge),t(ye),Math.floor(n(ge,ye))),i.every=s=>(s=Math.floor(s),!isFinite(s)||!(s>0)?null:s>1?i.filter(r?a=>r(a)%s===0:a=>i.count(0,a)%s===0):i)),i}const Et=nt(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Et.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?nt(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):Et);Et.range;const mt=1e3,ct=mt*60,gt=ct*60,yt=gt*24,Se=yt*7,Ve=yt*30,ke=yt*365,vt=nt(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*mt)},(t,e)=>(e-t)/mt,t=>t.getUTCSeconds());vt.range;const Nt=nt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*mt)},(t,e)=>{t.setTime(+t+e*ct)},(t,e)=>(e-t)/ct,t=>t.getMinutes());Nt.range;const Tr=nt(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*ct)},(t,e)=>(e-t)/ct,t=>t.getUTCMinutes());Tr.range;const Pt=nt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*mt-t.getMinutes()*ct)},(t,e)=>{t.setTime(+t+e*gt)},(t,e)=>(e-t)/gt,t=>t.getHours());Pt.range;const xr=nt(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*gt)},(t,e)=>(e-t)/gt,t=>t.getUTCHours());xr.range;const xt=nt(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*ct)/yt,t=>t.getDate()-1);xt.range;const _e=nt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/yt,t=>t.getUTCDate()-1);_e.range;const br=nt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/yt,t=>Math.floor(t/yt));br.range;function Dt(t){return nt(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,n)=>{e.setDate(e.getDate()+n*7)},(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*ct)/Se)}const zt=Dt(0),Vt=Dt(1),vn=Dt(2),Tn=Dt(3),bt=Dt(4),xn=Dt(5),bn=Dt(6);zt.range;Vt.range;vn.range;Tn.range;bt.range;xn.range;bn.range;function Mt(t){return nt(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n*7)},(e,n)=>(n-e)/Se)}const wn=Mt(0),re=Mt(1),wr=Mt(2),Dr=Mt(3),It=Mt(4),Mr=Mt(5),Cr=Mt(6);wn.range;re.range;wr.range;Dr.range;It.range;Mr.range;Cr.range;const Rt=nt(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth());Rt.range;const Sr=nt(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth());Sr.range;const kt=nt(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());kt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:nt(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n*t)});kt.range;const wt=nt(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());wt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:nt(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)});wt.range;function _r(t,e,n,r,i,s){const a=[[vt,1,mt],[vt,5,5*mt],[vt,15,15*mt],[vt,30,30*mt],[s,1,ct],[s,5,5*ct],[s,15,15*ct],[s,30,30*ct],[i,1,gt],[i,3,3*gt],[i,6,6*gt],[i,12,12*gt],[r,1,yt],[r,2,2*yt],[n,1,Se],[e,1,Ve],[e,3,3*Ve],[t,1,ke]];function y(S,w,P){const _=wv).right(a,_);if(Y===a.length)return t.every(Ne(S/ke,w/ke,P));if(Y===0)return Et.every(Math.max(Ne(S,w,P),1));const[X,B]=a[_/a[Y-1][2]53)return null;"w"in f||(f.w=1),"Z"in f?(A=ve($t(f.y,0,1)),Q=A.getUTCDay(),A=Q>4||Q===0?re.ceil(A):re(A),A=_e.offset(A,(f.V-1)*7),f.y=A.getUTCFullYear(),f.m=A.getUTCMonth(),f.d=A.getUTCDate()+(f.w+6)%7):(A=pe($t(f.y,0,1)),Q=A.getDay(),A=Q>4||Q===0?Vt.ceil(A):Vt(A),A=xt.offset(A,(f.V-1)*7),f.y=A.getFullYear(),f.m=A.getMonth(),f.d=A.getDate()+(f.w+6)%7)}else("W"in f||"U"in f)&&("w"in f||(f.w="u"in f?f.u%7:"W"in f?1:0),Q="Z"in f?ve($t(f.y,0,1)).getUTCDay():pe($t(f.y,0,1)).getDay(),f.m=0,f.d="W"in f?(f.w+6)%7+f.W*7-(Q+5)%7:f.w+f.U*7-(Q+6)%7);return"Z"in f?(f.H+=f.Z/100|0,f.M+=f.Z%100,ve(f)):pe(f)}}function p(h,N,V,f){for(var tt=0,A=N.length,Q=V.length,Z,st;tt=Q)return-1;if(Z=N.charCodeAt(tt++),Z===37){if(Z=N.charAt(tt++),st=G[Z in Re?N.charAt(tt++):Z],!st||(f=st(h,V,f))<0)return-1}else if(Z!=V.charCodeAt(f++))return-1}return f}function L(h,N,V){var f=S.exec(N.slice(V));return f?(h.p=w.get(f[0].toLowerCase()),V+f[0].length):-1}function x(h,N,V){var f=Y.exec(N.slice(V));return f?(h.w=X.get(f[0].toLowerCase()),V+f[0].length):-1}function C(h,N,V){var f=P.exec(N.slice(V));return f?(h.w=_.get(f[0].toLowerCase()),V+f[0].length):-1}function M(h,N,V){var f=U.exec(N.slice(V));return f?(h.m=R.get(f[0].toLowerCase()),V+f[0].length):-1}function D(h,N,V){var f=B.exec(N.slice(V));return f?(h.m=v.get(f[0].toLowerCase()),V+f[0].length):-1}function c(h,N,V){return p(h,e,N,V)}function g(h,N,V){return p(h,n,N,V)}function b(h,N,V){return p(h,r,N,V)}function m(h){return a[h.getDay()]}function I(h){return s[h.getDay()]}function o(h){return F[h.getMonth()]}function W(h){return y[h.getMonth()]}function u(h){return i[+(h.getHours()>=12)]}function K(h){return 1+~~(h.getMonth()/3)}function l(h){return a[h.getUTCDay()]}function $(h){return s[h.getUTCDay()]}function O(h){return F[h.getUTCMonth()]}function j(h){return y[h.getUTCMonth()]}function H(h){return i[+(h.getUTCHours()>=12)]}function J(h){return 1+~~(h.getUTCMonth()/3)}return{format:function(h){var N=T(h+="",E);return N.toString=function(){return h},N},parse:function(h){var N=k(h+="",!1);return N.toString=function(){return h},N},utcFormat:function(h){var N=T(h+="",z);return N.toString=function(){return h},N},utcParse:function(h){var N=k(h+="",!0);return N.toString=function(){return h},N}}}var Re={"-":"",_:" ",0:"0"},rt=/^\s*\d+/,Er=/^%/,Ir=/[\\^$*+?|[\]().{}]/g;function q(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",s=i.length;return r+(s[e.toLowerCase(),n]))}function Ar(t,e,n){var r=rt.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function Wr(t,e,n){var r=rt.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function $r(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function Or(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function Hr(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function ze(t,e,n){var r=rt.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function qe(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Nr(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Pr(t,e,n){var r=rt.exec(e.slice(n,n+1));return r?(t.q=r[0]*3-3,n+r[0].length):-1}function Vr(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function Be(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function Rr(t,e,n){var r=rt.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function Ze(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function zr(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function qr(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Br(t,e,n){var r=rt.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Zr(t,e,n){var r=rt.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Xr(t,e,n){var r=Er.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function Gr(t,e,n){var r=rt.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function jr(t,e,n){var r=rt.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function Xe(t,e){return q(t.getDate(),e,2)}function Qr(t,e){return q(t.getHours(),e,2)}function Jr(t,e){return q(t.getHours()%12||12,e,2)}function Kr(t,e){return q(1+xt.count(kt(t),t),e,3)}function Dn(t,e){return q(t.getMilliseconds(),e,3)}function ti(t,e){return Dn(t,e)+"000"}function ei(t,e){return q(t.getMonth()+1,e,2)}function ni(t,e){return q(t.getMinutes(),e,2)}function ri(t,e){return q(t.getSeconds(),e,2)}function ii(t){var e=t.getDay();return e===0?7:e}function si(t,e){return q(zt.count(kt(t)-1,t),e,2)}function Mn(t){var e=t.getDay();return e>=4||e===0?bt(t):bt.ceil(t)}function ai(t,e){return t=Mn(t),q(bt.count(kt(t),t)+(kt(t).getDay()===4),e,2)}function oi(t){return t.getDay()}function ci(t,e){return q(Vt.count(kt(t)-1,t),e,2)}function ui(t,e){return q(t.getFullYear()%100,e,2)}function li(t,e){return t=Mn(t),q(t.getFullYear()%100,e,2)}function fi(t,e){return q(t.getFullYear()%1e4,e,4)}function di(t,e){var n=t.getDay();return t=n>=4||n===0?bt(t):bt.ceil(t),q(t.getFullYear()%1e4,e,4)}function hi(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+q(e/60|0,"0",2)+q(e%60,"0",2)}function Ge(t,e){return q(t.getUTCDate(),e,2)}function mi(t,e){return q(t.getUTCHours(),e,2)}function gi(t,e){return q(t.getUTCHours()%12||12,e,2)}function yi(t,e){return q(1+_e.count(wt(t),t),e,3)}function Cn(t,e){return q(t.getUTCMilliseconds(),e,3)}function ki(t,e){return Cn(t,e)+"000"}function pi(t,e){return q(t.getUTCMonth()+1,e,2)}function vi(t,e){return q(t.getUTCMinutes(),e,2)}function Ti(t,e){return q(t.getUTCSeconds(),e,2)}function xi(t){var e=t.getUTCDay();return e===0?7:e}function bi(t,e){return q(wn.count(wt(t)-1,t),e,2)}function Sn(t){var e=t.getUTCDay();return e>=4||e===0?It(t):It.ceil(t)}function wi(t,e){return t=Sn(t),q(It.count(wt(t),t)+(wt(t).getUTCDay()===4),e,2)}function Di(t){return t.getUTCDay()}function Mi(t,e){return q(re.count(wt(t)-1,t),e,2)}function Ci(t,e){return q(t.getUTCFullYear()%100,e,2)}function Si(t,e){return t=Sn(t),q(t.getUTCFullYear()%100,e,2)}function _i(t,e){return q(t.getUTCFullYear()%1e4,e,4)}function Yi(t,e){var n=t.getUTCDay();return t=n>=4||n===0?It(t):It.ceil(t),q(t.getUTCFullYear()%1e4,e,4)}function Fi(){return"+0000"}function je(){return"%"}function Qe(t){return+t}function Je(t){return Math.floor(+t/1e3)}var St,ie;Ui({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Ui(t){return St=Ur(t),ie=St.format,St.parse,St.utcFormat,St.utcParse,St}function Ei(t){return new Date(t)}function Ii(t){return t instanceof Date?+t:+new Date(+t)}function _n(t,e,n,r,i,s,a,y,F,S){var w=Jn(),P=w.invert,_=w.domain,Y=S(".%L"),X=S(":%S"),B=S("%I:%M"),v=S("%I %p"),U=S("%a %d"),R=S("%b %d"),E=S("%B"),z=S("%Y");function G(T){return(F(T)4&&(Y+=7),_.add(Y,n));return X.diff(B,"week")+1},y.isoWeekday=function(S){return this.$utils().u(S)?this.day()||7:this.day(this.day()%7?S:S-7)};var F=y.startOf;y.startOf=function(S,w){var P=this.$utils(),_=!!P.u(w)||w;return P.p(S)==="isoweek"?_?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):F.bind(this)(S,w)}}}))})(jt)),jt.exports}var $i=Wi();const Oi=oe($i);var Qt={exports:{}},Hi=Qt.exports,tn;function Ni(){return tn||(tn=1,(function(t,e){(function(n,r){t.exports=r()})(Hi,(function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},r=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,i=/\d/,s=/\d\d/,a=/\d\d?/,y=/\d*[^-_:/,()\s\d]+/,F={},S=function(v){return(v=+v)+(v>68?1900:2e3)},w=function(v){return function(U){this[v]=+U}},P=[/[+-]\d\d:?(\d\d)?|Z/,function(v){(this.zone||(this.zone={})).offset=(function(U){if(!U||U==="Z")return 0;var R=U.match(/([+-]|\d\d)/g),E=60*R[1]+(+R[2]||0);return E===0?0:R[0]==="+"?-E:E})(v)}],_=function(v){var U=F[v];return U&&(U.indexOf?U:U.s.concat(U.f))},Y=function(v,U){var R,E=F.meridiem;if(E){for(var z=1;z<=24;z+=1)if(v.indexOf(E(z,0,U))>-1){R=z>12;break}}else R=v===(U?"pm":"PM");return R},X={A:[y,function(v){this.afternoon=Y(v,!1)}],a:[y,function(v){this.afternoon=Y(v,!0)}],Q:[i,function(v){this.month=3*(v-1)+1}],S:[i,function(v){this.milliseconds=100*+v}],SS:[s,function(v){this.milliseconds=10*+v}],SSS:[/\d{3}/,function(v){this.milliseconds=+v}],s:[a,w("seconds")],ss:[a,w("seconds")],m:[a,w("minutes")],mm:[a,w("minutes")],H:[a,w("hours")],h:[a,w("hours")],HH:[a,w("hours")],hh:[a,w("hours")],D:[a,w("day")],DD:[s,w("day")],Do:[y,function(v){var U=F.ordinal,R=v.match(/\d+/);if(this.day=R[0],U)for(var E=1;E<=31;E+=1)U(E).replace(/\[|\]/g,"")===v&&(this.day=E)}],w:[a,w("week")],ww:[s,w("week")],M:[a,w("month")],MM:[s,w("month")],MMM:[y,function(v){var U=_("months"),R=(_("monthsShort")||U.map((function(E){return E.slice(0,3)}))).indexOf(v)+1;if(R<1)throw new Error;this.month=R%12||R}],MMMM:[y,function(v){var U=_("months").indexOf(v)+1;if(U<1)throw new Error;this.month=U%12||U}],Y:[/[+-]?\d+/,w("year")],YY:[s,function(v){this.year=S(v)}],YYYY:[/\d{4}/,w("year")],Z:P,ZZ:P};function B(v){var U,R;U=v,R=F&&F.formats;for(var E=(v=U.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(x,C,M){var D=M&&M.toUpperCase();return C||R[M]||n[M]||R[D].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(c,g,b){return g||b.slice(1)}))}))).match(r),z=E.length,G=0;G-1)return new Date((I==="X"?1e3:1)*m);var u=B(I)(m),K=u.year,l=u.month,$=u.day,O=u.hours,j=u.minutes,H=u.seconds,J=u.milliseconds,h=u.zone,N=u.week,V=new Date,f=$||(K||l?1:V.getDate()),tt=K||V.getFullYear(),A=0;K&&!l||(A=l>0?l-1:V.getMonth());var Q,Z=O||0,st=j||0,at=H||0,pt=J||0;return h?new Date(Date.UTC(tt,A,f,Z,st,at,pt+60*h.offset*1e3)):o?new Date(Date.UTC(tt,A,f,Z,st,at,pt)):(Q=new Date(tt,A,f,Z,st,at,pt),N&&(Q=W(Q).week(N).toDate()),Q)}catch{return new Date("")}})(T,L,k,R),this.init(),D&&D!==!0&&(this.$L=this.locale(D).$L),M&&T!=this.format(L)&&(this.$d=new Date("")),F={}}else if(L instanceof Array)for(var c=L.length,g=1;g<=c;g+=1){p[1]=L[g-1];var b=R.apply(this,p);if(b.isValid()){this.$d=b.$d,this.$L=b.$L,this.init();break}g===c&&(this.$d=new Date(""))}else z.call(this,G)}}}))})(Qt)),Qt.exports}var Pi=Ni();const Vi=oe(Pi);var Jt={exports:{}},Ri=Jt.exports,en;function zi(){return en||(en=1,(function(t,e){(function(n,r){t.exports=r()})(Ri,(function(){return function(n,r){var i=r.prototype,s=i.format;i.format=function(a){var y=this,F=this.$locale();if(!this.isValid())return s.bind(this)(a);var S=this.$utils(),w=(a||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(P){switch(P){case"Q":return Math.ceil((y.$M+1)/3);case"Do":return F.ordinal(y.$D);case"gggg":return y.weekYear();case"GGGG":return y.isoWeekYear();case"wo":return F.ordinal(y.week(),"W");case"w":case"ww":return S.s(y.week(),P==="w"?1:2,"0");case"W":case"WW":return S.s(y.isoWeek(),P==="W"?1:2,"0");case"k":case"kk":return S.s(String(y.$H===0?24:y.$H),P==="k"?1:2,"0");case"X":return Math.floor(y.$d.getTime()/1e3);case"x":return y.$d.getTime();case"z":return"["+y.offsetName()+"]";case"zzz":return"["+y.offsetName("long")+"]";default:return P}}));return s.bind(this)(w)}}}))})(Jt)),Jt.exports}var qi=zi();const Bi=oe(qi);var Kt={exports:{}},Zi=Kt.exports,nn;function Xi(){return nn||(nn=1,(function(t,e){(function(n,r){t.exports=r()})(Zi,(function(){var n,r,i=1e3,s=6e4,a=36e5,y=864e5,F=31536e6,S=2628e6,w=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,P=/\[([^\]]+)]|YYYY|YY|Y|M{1,2}|D{1,2}|H{1,2}|m{1,2}|s{1,2}|SSS/g,_={years:F,months:S,days:y,hours:a,minutes:s,seconds:i,milliseconds:1,weeks:6048e5},Y=function(T){return T instanceof z},X=function(T,k,p){return new z(T,p,k.$l)},B=function(T){return r.p(T)+"s"},v=function(T){return T<0},U=function(T){return v(T)?Math.ceil(T):Math.floor(T)},R=function(T){return Math.abs(T)},E=function(T,k){return T?v(T)?{negative:!0,format:""+R(T)+k}:{negative:!1,format:""+T+k}:{negative:!1,format:""}},z=(function(){function T(p,L,x){var C=this;if(this.$d={},this.$l=x,p===void 0&&(this.$ms=0,this.parseFromMilliseconds()),L)return X(p*_[B(L)],this);if(typeof p=="number")return this.$ms=p,this.parseFromMilliseconds(),this;if(typeof p=="object")return Object.keys(p).forEach((function(c){C.$d[B(c)]=p[c]})),this.calMilliseconds(),this;if(typeof p=="string"){var M=p.match(w);if(M){var D=M.slice(2).map((function(c){return c!=null?Number(c):0}));return this.$d.years=D[0],this.$d.months=D[1],this.$d.weeks=D[2],this.$d.days=D[3],this.$d.hours=D[4],this.$d.minutes=D[5],this.$d.seconds=D[6],this.calMilliseconds(),this}}return this}var k=T.prototype;return k.calMilliseconds=function(){var p=this;this.$ms=Object.keys(this.$d).reduce((function(L,x){return L+(p.$d[x]||0)*_[x]}),0)},k.parseFromMilliseconds=function(){var p=this.$ms;this.$d.years=U(p/F),p%=F,this.$d.months=U(p/S),p%=S,this.$d.days=U(p/y),p%=y,this.$d.hours=U(p/a),p%=a,this.$d.minutes=U(p/s),p%=s,this.$d.seconds=U(p/i),p%=i,this.$d.milliseconds=p},k.toISOString=function(){var p=E(this.$d.years,"Y"),L=E(this.$d.months,"M"),x=+this.$d.days||0;this.$d.weeks&&(x+=7*this.$d.weeks);var C=E(x,"D"),M=E(this.$d.hours,"H"),D=E(this.$d.minutes,"M"),c=this.$d.seconds||0;this.$d.milliseconds&&(c+=this.$d.milliseconds/1e3,c=Math.round(1e3*c)/1e3);var g=E(c,"S"),b=p.negative||L.negative||C.negative||M.negative||D.negative||g.negative,m=M.format||D.format||g.format?"T":"",I=(b?"-":"")+"P"+p.format+L.format+C.format+m+M.format+D.format+g.format;return I==="P"||I==="-P"?"P0D":I},k.toJSON=function(){return this.toISOString()},k.format=function(p){var L=p||"YYYY-MM-DDTHH:mm:ss",x={Y:this.$d.years,YY:r.s(this.$d.years,2,"0"),YYYY:r.s(this.$d.years,4,"0"),M:this.$d.months,MM:r.s(this.$d.months,2,"0"),D:this.$d.days,DD:r.s(this.$d.days,2,"0"),H:this.$d.hours,HH:r.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:r.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:r.s(this.$d.seconds,2,"0"),SSS:r.s(this.$d.milliseconds,3,"0")};return L.replace(P,(function(C,M){return M||String(x[C])}))},k.as=function(p){return this.$ms/_[B(p)]},k.get=function(p){var L=this.$ms,x=B(p);return x==="milliseconds"?L%=1e3:L=x==="weeks"?U(L/_[x]):this.$d[x],L||0},k.add=function(p,L,x){var C;return C=L?p*_[B(L)]:Y(p)?p.$ms:X(p,this).$ms,X(this.$ms+C*(x?-1:1),this)},k.subtract=function(p,L){return this.add(p,L,!0)},k.locale=function(p){var L=this.clone();return L.$l=p,L},k.clone=function(){return X(this.$ms,this)},k.humanize=function(p){return n().add(this.$ms,"ms").locale(this.$l).fromNow(!p)},k.valueOf=function(){return this.asMilliseconds()},k.milliseconds=function(){return this.get("milliseconds")},k.asMilliseconds=function(){return this.as("milliseconds")},k.seconds=function(){return this.get("seconds")},k.asSeconds=function(){return this.as("seconds")},k.minutes=function(){return this.get("minutes")},k.asMinutes=function(){return this.as("minutes")},k.hours=function(){return this.get("hours")},k.asHours=function(){return this.as("hours")},k.days=function(){return this.get("days")},k.asDays=function(){return this.as("days")},k.weeks=function(){return this.get("weeks")},k.asWeeks=function(){return this.as("weeks")},k.months=function(){return this.get("months")},k.asMonths=function(){return this.as("months")},k.years=function(){return this.get("years")},k.asYears=function(){return this.as("years")},T})(),G=function(T,k,p){return T.add(k.years()*p,"y").add(k.months()*p,"M").add(k.days()*p,"d").add(k.hours()*p,"h").add(k.minutes()*p,"m").add(k.seconds()*p,"s").add(k.milliseconds()*p,"ms")};return function(T,k,p){n=p,r=p().$utils(),p.duration=function(C,M){var D=p.locale();return X(C,{$l:D},M)},p.isDuration=Y;var L=k.prototype.add,x=k.prototype.subtract;k.prototype.add=function(C,M){return Y(C)?G(this,C,1):L.bind(this)(C,M)},k.prototype.subtract=function(C,M){return Y(C)?G(this,C,-1):x.bind(this)(C,M)}}}))})(Kt)),Kt.exports}var Gi=Xi();const ji=oe(Gi);var we=(function(){var t=d(function(D,c,g,b){for(g=g||{},b=D.length;b--;g[D[b]]=c);return g},"o"),e=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],n=[1,26],r=[1,27],i=[1,28],s=[1,29],a=[1,30],y=[1,31],F=[1,32],S=[1,33],w=[1,34],P=[1,9],_=[1,10],Y=[1,11],X=[1,12],B=[1,13],v=[1,14],U=[1,15],R=[1,16],E=[1,19],z=[1,20],G=[1,21],T=[1,22],k=[1,23],p=[1,25],L=[1,35],x={trace:d(function(){},"trace"),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",12:"weekday_monday",13:"weekday_tuesday",14:"weekday_wednesday",15:"weekday_thursday",16:"weekday_friday",17:"weekday_saturday",18:"weekday_sunday",20:"weekend_friday",21:"weekend_saturday",22:"dateFormat",23:"inclusiveEndDates",24:"topAxis",25:"axisFormat",26:"tickInterval",27:"excludes",28:"includes",29:"todayMarker",30:"title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"section",38:"taskTxt",39:"taskData",40:"click",41:"callbackname",42:"callbackargs",43:"href"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:d(function(c,g,b,m,I,o,W){var u=o.length-1;switch(I){case 1:return o[u-1];case 2:this.$=[];break;case 3:o[u-1].push(o[u]),this.$=o[u-1];break;case 4:case 5:this.$=o[u];break;case 6:case 7:this.$=[];break;case 8:m.setWeekday("monday");break;case 9:m.setWeekday("tuesday");break;case 10:m.setWeekday("wednesday");break;case 11:m.setWeekday("thursday");break;case 12:m.setWeekday("friday");break;case 13:m.setWeekday("saturday");break;case 14:m.setWeekday("sunday");break;case 15:m.setWeekend("friday");break;case 16:m.setWeekend("saturday");break;case 17:m.setDateFormat(o[u].substr(11)),this.$=o[u].substr(11);break;case 18:m.enableInclusiveEndDates(),this.$=o[u].substr(18);break;case 19:m.TopAxis(),this.$=o[u].substr(8);break;case 20:m.setAxisFormat(o[u].substr(11)),this.$=o[u].substr(11);break;case 21:m.setTickInterval(o[u].substr(13)),this.$=o[u].substr(13);break;case 22:m.setExcludes(o[u].substr(9)),this.$=o[u].substr(9);break;case 23:m.setIncludes(o[u].substr(9)),this.$=o[u].substr(9);break;case 24:m.setTodayMarker(o[u].substr(12)),this.$=o[u].substr(12);break;case 27:m.setDiagramTitle(o[u].substr(6)),this.$=o[u].substr(6);break;case 28:this.$=o[u].trim(),m.setAccTitle(this.$);break;case 29:case 30:this.$=o[u].trim(),m.setAccDescription(this.$);break;case 31:m.addSection(o[u].substr(8)),this.$=o[u].substr(8);break;case 33:m.addTask(o[u-1],o[u]),this.$="task";break;case 34:this.$=o[u-1],m.setClickEvent(o[u-1],o[u],null);break;case 35:this.$=o[u-2],m.setClickEvent(o[u-2],o[u-1],o[u]);break;case 36:this.$=o[u-2],m.setClickEvent(o[u-2],o[u-1],null),m.setLink(o[u-2],o[u]);break;case 37:this.$=o[u-3],m.setClickEvent(o[u-3],o[u-2],o[u-1]),m.setLink(o[u-3],o[u]);break;case 38:this.$=o[u-2],m.setClickEvent(o[u-2],o[u],null),m.setLink(o[u-2],o[u-1]);break;case 39:this.$=o[u-3],m.setClickEvent(o[u-3],o[u-1],o[u]),m.setLink(o[u-3],o[u-2]);break;case 40:this.$=o[u-1],m.setLink(o[u-1],o[u]);break;case 41:case 47:this.$=o[u-1]+" "+o[u];break;case 42:case 43:case 45:this.$=o[u-2]+" "+o[u-1]+" "+o[u];break;case 44:case 46:this.$=o[u-3]+" "+o[u-2]+" "+o[u-1]+" "+o[u];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:n,13:r,14:i,15:s,16:a,17:y,18:F,19:18,20:S,21:w,22:P,23:_,24:Y,25:X,26:B,27:v,28:U,29:R,30:E,31:z,33:G,35:T,36:k,37:24,38:p,40:L},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:36,11:17,12:n,13:r,14:i,15:s,16:a,17:y,18:F,19:18,20:S,21:w,22:P,23:_,24:Y,25:X,26:B,27:v,28:U,29:R,30:E,31:z,33:G,35:T,36:k,37:24,38:p,40:L},t(e,[2,5]),t(e,[2,6]),t(e,[2,17]),t(e,[2,18]),t(e,[2,19]),t(e,[2,20]),t(e,[2,21]),t(e,[2,22]),t(e,[2,23]),t(e,[2,24]),t(e,[2,25]),t(e,[2,26]),t(e,[2,27]),{32:[1,37]},{34:[1,38]},t(e,[2,30]),t(e,[2,31]),t(e,[2,32]),{39:[1,39]},t(e,[2,8]),t(e,[2,9]),t(e,[2,10]),t(e,[2,11]),t(e,[2,12]),t(e,[2,13]),t(e,[2,14]),t(e,[2,15]),t(e,[2,16]),{41:[1,40],43:[1,41]},t(e,[2,4]),t(e,[2,28]),t(e,[2,29]),t(e,[2,33]),t(e,[2,34],{42:[1,42],43:[1,43]}),t(e,[2,40],{41:[1,44]}),t(e,[2,35],{43:[1,45]}),t(e,[2,36]),t(e,[2,38],{42:[1,46]}),t(e,[2,37]),t(e,[2,39])],defaultActions:{},parseError:d(function(c,g){if(g.recoverable)this.trace(c);else{var b=new Error(c);throw b.hash=g,b}},"parseError"),parse:d(function(c){var g=this,b=[0],m=[],I=[null],o=[],W=this.table,u="",K=0,l=0,$=2,O=1,j=o.slice.call(arguments,1),H=Object.create(this.lexer),J={yy:{}};for(var h in this.yy)Object.prototype.hasOwnProperty.call(this.yy,h)&&(J.yy[h]=this.yy[h]);H.setInput(c,J.yy),J.yy.lexer=H,J.yy.parser=this,typeof H.yylloc>"u"&&(H.yylloc={});var N=H.yylloc;o.push(N);var V=H.options&&H.options.ranges;typeof J.yy.parseError=="function"?this.parseError=J.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function f(ot){b.length=b.length-2*ot,I.length=I.length-ot,o.length=o.length-ot}d(f,"popStack");function tt(){var ot;return ot=m.pop()||H.lex()||O,typeof ot!="number"&&(ot instanceof Array&&(m=ot,ot=m.pop()),ot=g.symbols_[ot]||ot),ot}d(tt,"lex");for(var A,Q,Z,st,at={},pt,ut,He,Bt;;){if(Q=b[b.length-1],this.defaultActions[Q]?Z=this.defaultActions[Q]:((A===null||typeof A>"u")&&(A=tt()),Z=W[Q]&&W[Q][A]),typeof Z>"u"||!Z.length||!Z[0]){var ce="";Bt=[];for(pt in W[Q])this.terminals_[pt]&&pt>$&&Bt.push("'"+this.terminals_[pt]+"'");H.showPosition?ce="Parse error on line "+(K+1)+`: +import{bf as on,bg as On,bh as cn,bi as un,bj as ln,bk as ue,bl as Hn,b4 as oe,g as Nn,s as Pn,q as Vn,p as Rn,a as zn,b as qn,_ as d,c as Yt,j as Zt,d as Bn,bm as it,l as Tt,k as Zn,o as Xn,r as Gn,z as jn}from"./mermaid.core-BLsmN-lt.js";import{b as Qn,t as Ne,c as Jn,a as Kn,l as tr}from"./linear-C02hJRDE.js";import{i as er}from"./init-Gi6I4Gst.js";import"./index-XmhyfFRf.js";import"./purify.es-5AjVNlXF.js";import"./defaultLocale-DX6XiGOO.js";function nr(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n=i)&&(n=i)}return n}function rr(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function ir(t){return t}var Gt=1,le=2,xe=3,Xt=4,Pe=1e-6;function sr(t){return"translate("+t+",0)"}function ar(t){return"translate(0,"+t+")"}function or(t){return e=>+t(e)}function cr(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function ur(){return!this.__axis}function fn(t,e){var n=[],r=null,i=null,s=6,a=6,y=3,F=typeof window<"u"&&window.devicePixelRatio>1?0:.5,S=t===Gt||t===Xt?-1:1,w=t===Xt||t===le?"x":"y",P=t===Gt||t===xe?sr:ar;function _(Y){var X=r??(e.ticks?e.ticks.apply(e,n):e.domain()),B=i??(e.tickFormat?e.tickFormat.apply(e,n):ir),v=Math.max(s,0)+y,U=e.range(),R=+U[0]+F,E=+U[U.length-1]+F,z=(e.bandwidth?cr:or)(e.copy(),F),G=Y.selection?Y.selection():Y,T=G.selectAll(".domain").data([null]),k=G.selectAll(".tick").data(X,e).order(),p=k.exit(),L=k.enter().append("g").attr("class","tick"),x=k.select("line"),C=k.select("text");T=T.merge(T.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),k=k.merge(L),x=x.merge(L.append("line").attr("stroke","currentColor").attr(w+"2",S*s)),C=C.merge(L.append("text").attr("fill","currentColor").attr(w,S*v).attr("dy",t===Gt?"0em":t===xe?"0.71em":"0.32em")),Y!==G&&(T=T.transition(Y),k=k.transition(Y),x=x.transition(Y),C=C.transition(Y),p=p.transition(Y).attr("opacity",Pe).attr("transform",function(M){return isFinite(M=z(M))?P(M+F):this.getAttribute("transform")}),L.attr("opacity",Pe).attr("transform",function(M){var D=this.parentNode.__axis;return P((D&&isFinite(D=D(M))?D:z(M))+F)})),p.remove(),T.attr("d",t===Xt||t===le?a?"M"+S*a+","+R+"H"+F+"V"+E+"H"+S*a:"M"+F+","+R+"V"+E:a?"M"+R+","+S*a+"V"+F+"H"+E+"V"+S*a:"M"+R+","+F+"H"+E),k.attr("opacity",1).attr("transform",function(M){return P(z(M)+F)}),x.attr(w+"2",S*s),C.attr(w,S*v).text(B),G.filter(ur).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===le?"start":t===Xt?"end":"middle"),G.each(function(){this.__axis=z})}return _.scale=function(Y){return arguments.length?(e=Y,_):e},_.ticks=function(){return n=Array.from(arguments),_},_.tickArguments=function(Y){return arguments.length?(n=Y==null?[]:Array.from(Y),_):n.slice()},_.tickValues=function(Y){return arguments.length?(r=Y==null?null:Array.from(Y),_):r&&r.slice()},_.tickFormat=function(Y){return arguments.length?(i=Y,_):i},_.tickSize=function(Y){return arguments.length?(s=a=+Y,_):s},_.tickSizeInner=function(Y){return arguments.length?(s=+Y,_):s},_.tickSizeOuter=function(Y){return arguments.length?(a=+Y,_):a},_.tickPadding=function(Y){return arguments.length?(y=+Y,_):y},_.offset=function(Y){return arguments.length?(F=+Y,_):F},_}function lr(t){return fn(Gt,t)}function fr(t){return fn(xe,t)}const dr=Math.PI/180,hr=180/Math.PI,ne=18,dn=.96422,hn=1,mn=.82521,gn=4/29,Ft=6/29,yn=3*Ft*Ft,mr=Ft*Ft*Ft;function kn(t){if(t instanceof ft)return new ft(t.l,t.a,t.b,t.opacity);if(t instanceof ht)return pn(t);t instanceof on||(t=On(t));var e=me(t.r),n=me(t.g),r=me(t.b),i=fe((.2225045*e+.7168786*n+.0606169*r)/hn),s,a;return e===n&&n===r?s=a=i:(s=fe((.4360747*e+.3850649*n+.1430804*r)/dn),a=fe((.0139322*e+.0971045*n+.7141733*r)/mn)),new ft(116*i-16,500*(s-i),200*(i-a),t.opacity)}function gr(t,e,n,r){return arguments.length===1?kn(t):new ft(t,e,n,r??1)}function ft(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}cn(ft,gr,un(ln,{brighter(t){return new ft(this.l+ne*(t??1),this.a,this.b,this.opacity)},darker(t){return new ft(this.l-ne*(t??1),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return e=dn*de(e),t=hn*de(t),n=mn*de(n),new on(he(3.1338561*e-1.6168667*t-.4906146*n),he(-.9787684*e+1.9161415*t+.033454*n),he(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}}));function fe(t){return t>mr?Math.pow(t,1/3):t/yn+gn}function de(t){return t>Ft?t*t*t:yn*(t-gn)}function he(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function me(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function yr(t){if(t instanceof ht)return new ht(t.h,t.c,t.l,t.opacity);if(t instanceof ft||(t=kn(t)),t.a===0&&t.b===0)return new ht(NaN,0(t(s=new Date(+s)),s),i.ceil=s=>(t(s=new Date(s-1)),e(s,1),t(s),s),i.round=s=>{const a=i(s),y=i.ceil(s);return s-a(e(s=new Date(+s),a==null?1:Math.floor(a)),s),i.range=(s,a,y)=>{const F=[];if(s=i.ceil(s),y=y==null?1:Math.floor(y),!(s0))return F;let S;do F.push(S=new Date(+s)),e(s,y),t(s);while(Snt(a=>{if(a>=a)for(;t(a),!s(a);)a.setTime(a-1)},(a,y)=>{if(a>=a)if(y<0)for(;++y<=0;)for(;e(a,-1),!s(a););else for(;--y>=0;)for(;e(a,1),!s(a););}),n&&(i.count=(s,a)=>(ge.setTime(+s),ye.setTime(+a),t(ge),t(ye),Math.floor(n(ge,ye))),i.every=s=>(s=Math.floor(s),!isFinite(s)||!(s>0)?null:s>1?i.filter(r?a=>r(a)%s===0:a=>i.count(0,a)%s===0):i)),i}const Et=nt(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Et.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?nt(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):Et);Et.range;const mt=1e3,ct=mt*60,gt=ct*60,yt=gt*24,Se=yt*7,Ve=yt*30,ke=yt*365,vt=nt(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*mt)},(t,e)=>(e-t)/mt,t=>t.getUTCSeconds());vt.range;const Nt=nt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*mt)},(t,e)=>{t.setTime(+t+e*ct)},(t,e)=>(e-t)/ct,t=>t.getMinutes());Nt.range;const Tr=nt(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*ct)},(t,e)=>(e-t)/ct,t=>t.getUTCMinutes());Tr.range;const Pt=nt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*mt-t.getMinutes()*ct)},(t,e)=>{t.setTime(+t+e*gt)},(t,e)=>(e-t)/gt,t=>t.getHours());Pt.range;const xr=nt(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*gt)},(t,e)=>(e-t)/gt,t=>t.getUTCHours());xr.range;const xt=nt(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*ct)/yt,t=>t.getDate()-1);xt.range;const _e=nt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/yt,t=>t.getUTCDate()-1);_e.range;const br=nt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/yt,t=>Math.floor(t/yt));br.range;function Dt(t){return nt(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,n)=>{e.setDate(e.getDate()+n*7)},(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*ct)/Se)}const zt=Dt(0),Vt=Dt(1),vn=Dt(2),Tn=Dt(3),bt=Dt(4),xn=Dt(5),bn=Dt(6);zt.range;Vt.range;vn.range;Tn.range;bt.range;xn.range;bn.range;function Mt(t){return nt(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n*7)},(e,n)=>(n-e)/Se)}const wn=Mt(0),re=Mt(1),wr=Mt(2),Dr=Mt(3),It=Mt(4),Mr=Mt(5),Cr=Mt(6);wn.range;re.range;wr.range;Dr.range;It.range;Mr.range;Cr.range;const Rt=nt(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth());Rt.range;const Sr=nt(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth());Sr.range;const kt=nt(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());kt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:nt(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n*t)});kt.range;const wt=nt(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());wt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:nt(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)});wt.range;function _r(t,e,n,r,i,s){const a=[[vt,1,mt],[vt,5,5*mt],[vt,15,15*mt],[vt,30,30*mt],[s,1,ct],[s,5,5*ct],[s,15,15*ct],[s,30,30*ct],[i,1,gt],[i,3,3*gt],[i,6,6*gt],[i,12,12*gt],[r,1,yt],[r,2,2*yt],[n,1,Se],[e,1,Ve],[e,3,3*Ve],[t,1,ke]];function y(S,w,P){const _=wv).right(a,_);if(Y===a.length)return t.every(Ne(S/ke,w/ke,P));if(Y===0)return Et.every(Math.max(Ne(S,w,P),1));const[X,B]=a[_/a[Y-1][2]53)return null;"w"in f||(f.w=1),"Z"in f?(A=ve($t(f.y,0,1)),Q=A.getUTCDay(),A=Q>4||Q===0?re.ceil(A):re(A),A=_e.offset(A,(f.V-1)*7),f.y=A.getUTCFullYear(),f.m=A.getUTCMonth(),f.d=A.getUTCDate()+(f.w+6)%7):(A=pe($t(f.y,0,1)),Q=A.getDay(),A=Q>4||Q===0?Vt.ceil(A):Vt(A),A=xt.offset(A,(f.V-1)*7),f.y=A.getFullYear(),f.m=A.getMonth(),f.d=A.getDate()+(f.w+6)%7)}else("W"in f||"U"in f)&&("w"in f||(f.w="u"in f?f.u%7:"W"in f?1:0),Q="Z"in f?ve($t(f.y,0,1)).getUTCDay():pe($t(f.y,0,1)).getDay(),f.m=0,f.d="W"in f?(f.w+6)%7+f.W*7-(Q+5)%7:f.w+f.U*7-(Q+6)%7);return"Z"in f?(f.H+=f.Z/100|0,f.M+=f.Z%100,ve(f)):pe(f)}}function p(h,N,V,f){for(var tt=0,A=N.length,Q=V.length,Z,st;tt=Q)return-1;if(Z=N.charCodeAt(tt++),Z===37){if(Z=N.charAt(tt++),st=G[Z in Re?N.charAt(tt++):Z],!st||(f=st(h,V,f))<0)return-1}else if(Z!=V.charCodeAt(f++))return-1}return f}function L(h,N,V){var f=S.exec(N.slice(V));return f?(h.p=w.get(f[0].toLowerCase()),V+f[0].length):-1}function x(h,N,V){var f=Y.exec(N.slice(V));return f?(h.w=X.get(f[0].toLowerCase()),V+f[0].length):-1}function C(h,N,V){var f=P.exec(N.slice(V));return f?(h.w=_.get(f[0].toLowerCase()),V+f[0].length):-1}function M(h,N,V){var f=U.exec(N.slice(V));return f?(h.m=R.get(f[0].toLowerCase()),V+f[0].length):-1}function D(h,N,V){var f=B.exec(N.slice(V));return f?(h.m=v.get(f[0].toLowerCase()),V+f[0].length):-1}function c(h,N,V){return p(h,e,N,V)}function g(h,N,V){return p(h,n,N,V)}function b(h,N,V){return p(h,r,N,V)}function m(h){return a[h.getDay()]}function I(h){return s[h.getDay()]}function o(h){return F[h.getMonth()]}function W(h){return y[h.getMonth()]}function u(h){return i[+(h.getHours()>=12)]}function K(h){return 1+~~(h.getMonth()/3)}function l(h){return a[h.getUTCDay()]}function $(h){return s[h.getUTCDay()]}function O(h){return F[h.getUTCMonth()]}function j(h){return y[h.getUTCMonth()]}function H(h){return i[+(h.getUTCHours()>=12)]}function J(h){return 1+~~(h.getUTCMonth()/3)}return{format:function(h){var N=T(h+="",E);return N.toString=function(){return h},N},parse:function(h){var N=k(h+="",!1);return N.toString=function(){return h},N},utcFormat:function(h){var N=T(h+="",z);return N.toString=function(){return h},N},utcParse:function(h){var N=k(h+="",!0);return N.toString=function(){return h},N}}}var Re={"-":"",_:" ",0:"0"},rt=/^\s*\d+/,Er=/^%/,Ir=/[\\^$*+?|[\]().{}]/g;function q(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",s=i.length;return r+(s[e.toLowerCase(),n]))}function Ar(t,e,n){var r=rt.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function Wr(t,e,n){var r=rt.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function $r(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function Or(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function Hr(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function ze(t,e,n){var r=rt.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function qe(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Nr(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Pr(t,e,n){var r=rt.exec(e.slice(n,n+1));return r?(t.q=r[0]*3-3,n+r[0].length):-1}function Vr(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function Be(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function Rr(t,e,n){var r=rt.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function Ze(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function zr(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function qr(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Br(t,e,n){var r=rt.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Zr(t,e,n){var r=rt.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Xr(t,e,n){var r=Er.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function Gr(t,e,n){var r=rt.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function jr(t,e,n){var r=rt.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function Xe(t,e){return q(t.getDate(),e,2)}function Qr(t,e){return q(t.getHours(),e,2)}function Jr(t,e){return q(t.getHours()%12||12,e,2)}function Kr(t,e){return q(1+xt.count(kt(t),t),e,3)}function Dn(t,e){return q(t.getMilliseconds(),e,3)}function ti(t,e){return Dn(t,e)+"000"}function ei(t,e){return q(t.getMonth()+1,e,2)}function ni(t,e){return q(t.getMinutes(),e,2)}function ri(t,e){return q(t.getSeconds(),e,2)}function ii(t){var e=t.getDay();return e===0?7:e}function si(t,e){return q(zt.count(kt(t)-1,t),e,2)}function Mn(t){var e=t.getDay();return e>=4||e===0?bt(t):bt.ceil(t)}function ai(t,e){return t=Mn(t),q(bt.count(kt(t),t)+(kt(t).getDay()===4),e,2)}function oi(t){return t.getDay()}function ci(t,e){return q(Vt.count(kt(t)-1,t),e,2)}function ui(t,e){return q(t.getFullYear()%100,e,2)}function li(t,e){return t=Mn(t),q(t.getFullYear()%100,e,2)}function fi(t,e){return q(t.getFullYear()%1e4,e,4)}function di(t,e){var n=t.getDay();return t=n>=4||n===0?bt(t):bt.ceil(t),q(t.getFullYear()%1e4,e,4)}function hi(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+q(e/60|0,"0",2)+q(e%60,"0",2)}function Ge(t,e){return q(t.getUTCDate(),e,2)}function mi(t,e){return q(t.getUTCHours(),e,2)}function gi(t,e){return q(t.getUTCHours()%12||12,e,2)}function yi(t,e){return q(1+_e.count(wt(t),t),e,3)}function Cn(t,e){return q(t.getUTCMilliseconds(),e,3)}function ki(t,e){return Cn(t,e)+"000"}function pi(t,e){return q(t.getUTCMonth()+1,e,2)}function vi(t,e){return q(t.getUTCMinutes(),e,2)}function Ti(t,e){return q(t.getUTCSeconds(),e,2)}function xi(t){var e=t.getUTCDay();return e===0?7:e}function bi(t,e){return q(wn.count(wt(t)-1,t),e,2)}function Sn(t){var e=t.getUTCDay();return e>=4||e===0?It(t):It.ceil(t)}function wi(t,e){return t=Sn(t),q(It.count(wt(t),t)+(wt(t).getUTCDay()===4),e,2)}function Di(t){return t.getUTCDay()}function Mi(t,e){return q(re.count(wt(t)-1,t),e,2)}function Ci(t,e){return q(t.getUTCFullYear()%100,e,2)}function Si(t,e){return t=Sn(t),q(t.getUTCFullYear()%100,e,2)}function _i(t,e){return q(t.getUTCFullYear()%1e4,e,4)}function Yi(t,e){var n=t.getUTCDay();return t=n>=4||n===0?It(t):It.ceil(t),q(t.getUTCFullYear()%1e4,e,4)}function Fi(){return"+0000"}function je(){return"%"}function Qe(t){return+t}function Je(t){return Math.floor(+t/1e3)}var St,ie;Ui({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Ui(t){return St=Ur(t),ie=St.format,St.parse,St.utcFormat,St.utcParse,St}function Ei(t){return new Date(t)}function Ii(t){return t instanceof Date?+t:+new Date(+t)}function _n(t,e,n,r,i,s,a,y,F,S){var w=Jn(),P=w.invert,_=w.domain,Y=S(".%L"),X=S(":%S"),B=S("%I:%M"),v=S("%I %p"),U=S("%a %d"),R=S("%b %d"),E=S("%B"),z=S("%Y");function G(T){return(F(T)4&&(Y+=7),_.add(Y,n));return X.diff(B,"week")+1},y.isoWeekday=function(S){return this.$utils().u(S)?this.day()||7:this.day(this.day()%7?S:S-7)};var F=y.startOf;y.startOf=function(S,w){var P=this.$utils(),_=!!P.u(w)||w;return P.p(S)==="isoweek"?_?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):F.bind(this)(S,w)}}}))})(jt)),jt.exports}var $i=Wi();const Oi=oe($i);var Qt={exports:{}},Hi=Qt.exports,tn;function Ni(){return tn||(tn=1,(function(t,e){(function(n,r){t.exports=r()})(Hi,(function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},r=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,i=/\d/,s=/\d\d/,a=/\d\d?/,y=/\d*[^-_:/,()\s\d]+/,F={},S=function(v){return(v=+v)+(v>68?1900:2e3)},w=function(v){return function(U){this[v]=+U}},P=[/[+-]\d\d:?(\d\d)?|Z/,function(v){(this.zone||(this.zone={})).offset=(function(U){if(!U||U==="Z")return 0;var R=U.match(/([+-]|\d\d)/g),E=60*R[1]+(+R[2]||0);return E===0?0:R[0]==="+"?-E:E})(v)}],_=function(v){var U=F[v];return U&&(U.indexOf?U:U.s.concat(U.f))},Y=function(v,U){var R,E=F.meridiem;if(E){for(var z=1;z<=24;z+=1)if(v.indexOf(E(z,0,U))>-1){R=z>12;break}}else R=v===(U?"pm":"PM");return R},X={A:[y,function(v){this.afternoon=Y(v,!1)}],a:[y,function(v){this.afternoon=Y(v,!0)}],Q:[i,function(v){this.month=3*(v-1)+1}],S:[i,function(v){this.milliseconds=100*+v}],SS:[s,function(v){this.milliseconds=10*+v}],SSS:[/\d{3}/,function(v){this.milliseconds=+v}],s:[a,w("seconds")],ss:[a,w("seconds")],m:[a,w("minutes")],mm:[a,w("minutes")],H:[a,w("hours")],h:[a,w("hours")],HH:[a,w("hours")],hh:[a,w("hours")],D:[a,w("day")],DD:[s,w("day")],Do:[y,function(v){var U=F.ordinal,R=v.match(/\d+/);if(this.day=R[0],U)for(var E=1;E<=31;E+=1)U(E).replace(/\[|\]/g,"")===v&&(this.day=E)}],w:[a,w("week")],ww:[s,w("week")],M:[a,w("month")],MM:[s,w("month")],MMM:[y,function(v){var U=_("months"),R=(_("monthsShort")||U.map((function(E){return E.slice(0,3)}))).indexOf(v)+1;if(R<1)throw new Error;this.month=R%12||R}],MMMM:[y,function(v){var U=_("months").indexOf(v)+1;if(U<1)throw new Error;this.month=U%12||U}],Y:[/[+-]?\d+/,w("year")],YY:[s,function(v){this.year=S(v)}],YYYY:[/\d{4}/,w("year")],Z:P,ZZ:P};function B(v){var U,R;U=v,R=F&&F.formats;for(var E=(v=U.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(x,C,M){var D=M&&M.toUpperCase();return C||R[M]||n[M]||R[D].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(c,g,b){return g||b.slice(1)}))}))).match(r),z=E.length,G=0;G-1)return new Date((I==="X"?1e3:1)*m);var u=B(I)(m),K=u.year,l=u.month,$=u.day,O=u.hours,j=u.minutes,H=u.seconds,J=u.milliseconds,h=u.zone,N=u.week,V=new Date,f=$||(K||l?1:V.getDate()),tt=K||V.getFullYear(),A=0;K&&!l||(A=l>0?l-1:V.getMonth());var Q,Z=O||0,st=j||0,at=H||0,pt=J||0;return h?new Date(Date.UTC(tt,A,f,Z,st,at,pt+60*h.offset*1e3)):o?new Date(Date.UTC(tt,A,f,Z,st,at,pt)):(Q=new Date(tt,A,f,Z,st,at,pt),N&&(Q=W(Q).week(N).toDate()),Q)}catch{return new Date("")}})(T,L,k,R),this.init(),D&&D!==!0&&(this.$L=this.locale(D).$L),M&&T!=this.format(L)&&(this.$d=new Date("")),F={}}else if(L instanceof Array)for(var c=L.length,g=1;g<=c;g+=1){p[1]=L[g-1];var b=R.apply(this,p);if(b.isValid()){this.$d=b.$d,this.$L=b.$L,this.init();break}g===c&&(this.$d=new Date(""))}else z.call(this,G)}}}))})(Qt)),Qt.exports}var Pi=Ni();const Vi=oe(Pi);var Jt={exports:{}},Ri=Jt.exports,en;function zi(){return en||(en=1,(function(t,e){(function(n,r){t.exports=r()})(Ri,(function(){return function(n,r){var i=r.prototype,s=i.format;i.format=function(a){var y=this,F=this.$locale();if(!this.isValid())return s.bind(this)(a);var S=this.$utils(),w=(a||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(P){switch(P){case"Q":return Math.ceil((y.$M+1)/3);case"Do":return F.ordinal(y.$D);case"gggg":return y.weekYear();case"GGGG":return y.isoWeekYear();case"wo":return F.ordinal(y.week(),"W");case"w":case"ww":return S.s(y.week(),P==="w"?1:2,"0");case"W":case"WW":return S.s(y.isoWeek(),P==="W"?1:2,"0");case"k":case"kk":return S.s(String(y.$H===0?24:y.$H),P==="k"?1:2,"0");case"X":return Math.floor(y.$d.getTime()/1e3);case"x":return y.$d.getTime();case"z":return"["+y.offsetName()+"]";case"zzz":return"["+y.offsetName("long")+"]";default:return P}}));return s.bind(this)(w)}}}))})(Jt)),Jt.exports}var qi=zi();const Bi=oe(qi);var Kt={exports:{}},Zi=Kt.exports,nn;function Xi(){return nn||(nn=1,(function(t,e){(function(n,r){t.exports=r()})(Zi,(function(){var n,r,i=1e3,s=6e4,a=36e5,y=864e5,F=31536e6,S=2628e6,w=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,P=/\[([^\]]+)]|YYYY|YY|Y|M{1,2}|D{1,2}|H{1,2}|m{1,2}|s{1,2}|SSS/g,_={years:F,months:S,days:y,hours:a,minutes:s,seconds:i,milliseconds:1,weeks:6048e5},Y=function(T){return T instanceof z},X=function(T,k,p){return new z(T,p,k.$l)},B=function(T){return r.p(T)+"s"},v=function(T){return T<0},U=function(T){return v(T)?Math.ceil(T):Math.floor(T)},R=function(T){return Math.abs(T)},E=function(T,k){return T?v(T)?{negative:!0,format:""+R(T)+k}:{negative:!1,format:""+T+k}:{negative:!1,format:""}},z=(function(){function T(p,L,x){var C=this;if(this.$d={},this.$l=x,p===void 0&&(this.$ms=0,this.parseFromMilliseconds()),L)return X(p*_[B(L)],this);if(typeof p=="number")return this.$ms=p,this.parseFromMilliseconds(),this;if(typeof p=="object")return Object.keys(p).forEach((function(c){C.$d[B(c)]=p[c]})),this.calMilliseconds(),this;if(typeof p=="string"){var M=p.match(w);if(M){var D=M.slice(2).map((function(c){return c!=null?Number(c):0}));return this.$d.years=D[0],this.$d.months=D[1],this.$d.weeks=D[2],this.$d.days=D[3],this.$d.hours=D[4],this.$d.minutes=D[5],this.$d.seconds=D[6],this.calMilliseconds(),this}}return this}var k=T.prototype;return k.calMilliseconds=function(){var p=this;this.$ms=Object.keys(this.$d).reduce((function(L,x){return L+(p.$d[x]||0)*_[x]}),0)},k.parseFromMilliseconds=function(){var p=this.$ms;this.$d.years=U(p/F),p%=F,this.$d.months=U(p/S),p%=S,this.$d.days=U(p/y),p%=y,this.$d.hours=U(p/a),p%=a,this.$d.minutes=U(p/s),p%=s,this.$d.seconds=U(p/i),p%=i,this.$d.milliseconds=p},k.toISOString=function(){var p=E(this.$d.years,"Y"),L=E(this.$d.months,"M"),x=+this.$d.days||0;this.$d.weeks&&(x+=7*this.$d.weeks);var C=E(x,"D"),M=E(this.$d.hours,"H"),D=E(this.$d.minutes,"M"),c=this.$d.seconds||0;this.$d.milliseconds&&(c+=this.$d.milliseconds/1e3,c=Math.round(1e3*c)/1e3);var g=E(c,"S"),b=p.negative||L.negative||C.negative||M.negative||D.negative||g.negative,m=M.format||D.format||g.format?"T":"",I=(b?"-":"")+"P"+p.format+L.format+C.format+m+M.format+D.format+g.format;return I==="P"||I==="-P"?"P0D":I},k.toJSON=function(){return this.toISOString()},k.format=function(p){var L=p||"YYYY-MM-DDTHH:mm:ss",x={Y:this.$d.years,YY:r.s(this.$d.years,2,"0"),YYYY:r.s(this.$d.years,4,"0"),M:this.$d.months,MM:r.s(this.$d.months,2,"0"),D:this.$d.days,DD:r.s(this.$d.days,2,"0"),H:this.$d.hours,HH:r.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:r.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:r.s(this.$d.seconds,2,"0"),SSS:r.s(this.$d.milliseconds,3,"0")};return L.replace(P,(function(C,M){return M||String(x[C])}))},k.as=function(p){return this.$ms/_[B(p)]},k.get=function(p){var L=this.$ms,x=B(p);return x==="milliseconds"?L%=1e3:L=x==="weeks"?U(L/_[x]):this.$d[x],L||0},k.add=function(p,L,x){var C;return C=L?p*_[B(L)]:Y(p)?p.$ms:X(p,this).$ms,X(this.$ms+C*(x?-1:1),this)},k.subtract=function(p,L){return this.add(p,L,!0)},k.locale=function(p){var L=this.clone();return L.$l=p,L},k.clone=function(){return X(this.$ms,this)},k.humanize=function(p){return n().add(this.$ms,"ms").locale(this.$l).fromNow(!p)},k.valueOf=function(){return this.asMilliseconds()},k.milliseconds=function(){return this.get("milliseconds")},k.asMilliseconds=function(){return this.as("milliseconds")},k.seconds=function(){return this.get("seconds")},k.asSeconds=function(){return this.as("seconds")},k.minutes=function(){return this.get("minutes")},k.asMinutes=function(){return this.as("minutes")},k.hours=function(){return this.get("hours")},k.asHours=function(){return this.as("hours")},k.days=function(){return this.get("days")},k.asDays=function(){return this.as("days")},k.weeks=function(){return this.get("weeks")},k.asWeeks=function(){return this.as("weeks")},k.months=function(){return this.get("months")},k.asMonths=function(){return this.as("months")},k.years=function(){return this.get("years")},k.asYears=function(){return this.as("years")},T})(),G=function(T,k,p){return T.add(k.years()*p,"y").add(k.months()*p,"M").add(k.days()*p,"d").add(k.hours()*p,"h").add(k.minutes()*p,"m").add(k.seconds()*p,"s").add(k.milliseconds()*p,"ms")};return function(T,k,p){n=p,r=p().$utils(),p.duration=function(C,M){var D=p.locale();return X(C,{$l:D},M)},p.isDuration=Y;var L=k.prototype.add,x=k.prototype.subtract;k.prototype.add=function(C,M){return Y(C)?G(this,C,1):L.bind(this)(C,M)},k.prototype.subtract=function(C,M){return Y(C)?G(this,C,-1):x.bind(this)(C,M)}}}))})(Kt)),Kt.exports}var Gi=Xi();const ji=oe(Gi);var we=(function(){var t=d(function(D,c,g,b){for(g=g||{},b=D.length;b--;g[D[b]]=c);return g},"o"),e=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],n=[1,26],r=[1,27],i=[1,28],s=[1,29],a=[1,30],y=[1,31],F=[1,32],S=[1,33],w=[1,34],P=[1,9],_=[1,10],Y=[1,11],X=[1,12],B=[1,13],v=[1,14],U=[1,15],R=[1,16],E=[1,19],z=[1,20],G=[1,21],T=[1,22],k=[1,23],p=[1,25],L=[1,35],x={trace:d(function(){},"trace"),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",12:"weekday_monday",13:"weekday_tuesday",14:"weekday_wednesday",15:"weekday_thursday",16:"weekday_friday",17:"weekday_saturday",18:"weekday_sunday",20:"weekend_friday",21:"weekend_saturday",22:"dateFormat",23:"inclusiveEndDates",24:"topAxis",25:"axisFormat",26:"tickInterval",27:"excludes",28:"includes",29:"todayMarker",30:"title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"section",38:"taskTxt",39:"taskData",40:"click",41:"callbackname",42:"callbackargs",43:"href"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:d(function(c,g,b,m,I,o,W){var u=o.length-1;switch(I){case 1:return o[u-1];case 2:this.$=[];break;case 3:o[u-1].push(o[u]),this.$=o[u-1];break;case 4:case 5:this.$=o[u];break;case 6:case 7:this.$=[];break;case 8:m.setWeekday("monday");break;case 9:m.setWeekday("tuesday");break;case 10:m.setWeekday("wednesday");break;case 11:m.setWeekday("thursday");break;case 12:m.setWeekday("friday");break;case 13:m.setWeekday("saturday");break;case 14:m.setWeekday("sunday");break;case 15:m.setWeekend("friday");break;case 16:m.setWeekend("saturday");break;case 17:m.setDateFormat(o[u].substr(11)),this.$=o[u].substr(11);break;case 18:m.enableInclusiveEndDates(),this.$=o[u].substr(18);break;case 19:m.TopAxis(),this.$=o[u].substr(8);break;case 20:m.setAxisFormat(o[u].substr(11)),this.$=o[u].substr(11);break;case 21:m.setTickInterval(o[u].substr(13)),this.$=o[u].substr(13);break;case 22:m.setExcludes(o[u].substr(9)),this.$=o[u].substr(9);break;case 23:m.setIncludes(o[u].substr(9)),this.$=o[u].substr(9);break;case 24:m.setTodayMarker(o[u].substr(12)),this.$=o[u].substr(12);break;case 27:m.setDiagramTitle(o[u].substr(6)),this.$=o[u].substr(6);break;case 28:this.$=o[u].trim(),m.setAccTitle(this.$);break;case 29:case 30:this.$=o[u].trim(),m.setAccDescription(this.$);break;case 31:m.addSection(o[u].substr(8)),this.$=o[u].substr(8);break;case 33:m.addTask(o[u-1],o[u]),this.$="task";break;case 34:this.$=o[u-1],m.setClickEvent(o[u-1],o[u],null);break;case 35:this.$=o[u-2],m.setClickEvent(o[u-2],o[u-1],o[u]);break;case 36:this.$=o[u-2],m.setClickEvent(o[u-2],o[u-1],null),m.setLink(o[u-2],o[u]);break;case 37:this.$=o[u-3],m.setClickEvent(o[u-3],o[u-2],o[u-1]),m.setLink(o[u-3],o[u]);break;case 38:this.$=o[u-2],m.setClickEvent(o[u-2],o[u],null),m.setLink(o[u-2],o[u-1]);break;case 39:this.$=o[u-3],m.setClickEvent(o[u-3],o[u-1],o[u]),m.setLink(o[u-3],o[u-2]);break;case 40:this.$=o[u-1],m.setLink(o[u-1],o[u]);break;case 41:case 47:this.$=o[u-1]+" "+o[u];break;case 42:case 43:case 45:this.$=o[u-2]+" "+o[u-1]+" "+o[u];break;case 44:case 46:this.$=o[u-3]+" "+o[u-2]+" "+o[u-1]+" "+o[u];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:n,13:r,14:i,15:s,16:a,17:y,18:F,19:18,20:S,21:w,22:P,23:_,24:Y,25:X,26:B,27:v,28:U,29:R,30:E,31:z,33:G,35:T,36:k,37:24,38:p,40:L},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:36,11:17,12:n,13:r,14:i,15:s,16:a,17:y,18:F,19:18,20:S,21:w,22:P,23:_,24:Y,25:X,26:B,27:v,28:U,29:R,30:E,31:z,33:G,35:T,36:k,37:24,38:p,40:L},t(e,[2,5]),t(e,[2,6]),t(e,[2,17]),t(e,[2,18]),t(e,[2,19]),t(e,[2,20]),t(e,[2,21]),t(e,[2,22]),t(e,[2,23]),t(e,[2,24]),t(e,[2,25]),t(e,[2,26]),t(e,[2,27]),{32:[1,37]},{34:[1,38]},t(e,[2,30]),t(e,[2,31]),t(e,[2,32]),{39:[1,39]},t(e,[2,8]),t(e,[2,9]),t(e,[2,10]),t(e,[2,11]),t(e,[2,12]),t(e,[2,13]),t(e,[2,14]),t(e,[2,15]),t(e,[2,16]),{41:[1,40],43:[1,41]},t(e,[2,4]),t(e,[2,28]),t(e,[2,29]),t(e,[2,33]),t(e,[2,34],{42:[1,42],43:[1,43]}),t(e,[2,40],{41:[1,44]}),t(e,[2,35],{43:[1,45]}),t(e,[2,36]),t(e,[2,38],{42:[1,46]}),t(e,[2,37]),t(e,[2,39])],defaultActions:{},parseError:d(function(c,g){if(g.recoverable)this.trace(c);else{var b=new Error(c);throw b.hash=g,b}},"parseError"),parse:d(function(c){var g=this,b=[0],m=[],I=[null],o=[],W=this.table,u="",K=0,l=0,$=2,O=1,j=o.slice.call(arguments,1),H=Object.create(this.lexer),J={yy:{}};for(var h in this.yy)Object.prototype.hasOwnProperty.call(this.yy,h)&&(J.yy[h]=this.yy[h]);H.setInput(c,J.yy),J.yy.lexer=H,J.yy.parser=this,typeof H.yylloc>"u"&&(H.yylloc={});var N=H.yylloc;o.push(N);var V=H.options&&H.options.ranges;typeof J.yy.parseError=="function"?this.parseError=J.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function f(ot){b.length=b.length-2*ot,I.length=I.length-ot,o.length=o.length-ot}d(f,"popStack");function tt(){var ot;return ot=m.pop()||H.lex()||O,typeof ot!="number"&&(ot instanceof Array&&(m=ot,ot=m.pop()),ot=g.symbols_[ot]||ot),ot}d(tt,"lex");for(var A,Q,Z,st,at={},pt,ut,He,Bt;;){if(Q=b[b.length-1],this.defaultActions[Q]?Z=this.defaultActions[Q]:((A===null||typeof A>"u")&&(A=tt()),Z=W[Q]&&W[Q][A]),typeof Z>"u"||!Z.length||!Z[0]){var ce="";Bt=[];for(pt in W[Q])this.terminals_[pt]&&pt>$&&Bt.push("'"+this.terminals_[pt]+"'");H.showPosition?ce="Parse error on line "+(K+1)+`: `+H.showPosition()+` Expecting `+Bt.join(", ")+", got '"+(this.terminals_[A]||A)+"'":ce="Parse error on line "+(K+1)+": Unexpected "+(A==O?"end of input":"'"+(this.terminals_[A]||A)+"'"),this.parseError(ce,{text:H.match,token:this.terminals_[A]||A,line:H.yylineno,loc:N,expected:Bt})}if(Z[0]instanceof Array&&Z.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Q+", token: "+A);switch(Z[0]){case 1:b.push(A),I.push(H.yytext),o.push(H.yylloc),b.push(Z[1]),A=null,l=H.yyleng,u=H.yytext,K=H.yylineno,N=H.yylloc;break;case 2:if(ut=this.productions_[Z[1]][1],at.$=I[I.length-ut],at._$={first_line:o[o.length-(ut||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(ut||1)].first_column,last_column:o[o.length-1].last_column},V&&(at._$.range=[o[o.length-(ut||1)].range[0],o[o.length-1].range[1]]),st=this.performAction.apply(at,[u,l,K,J.yy,Z[1],I,o].concat(j)),typeof st<"u")return st;ut&&(b=b.slice(0,-1*ut*2),I=I.slice(0,-1*ut),o=o.slice(0,-1*ut)),b.push(this.productions_[Z[1]][0]),I.push(at.$),o.push(at._$),He=W[b[b.length-2]][b[b.length-1]],b.push(He);break;case 3:return!0}}return!0},"parse")},C=(function(){var D={EOF:1,parseError:d(function(g,b){if(this.yy.parser)this.yy.parser.parseError(g,b);else throw new Error(g)},"parseError"),setInput:d(function(c,g){return this.yy=g||this.yy||{},this._input=c,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:d(function(){var c=this._input[0];this.yytext+=c,this.yyleng++,this.offset++,this.match+=c,this.matched+=c;var g=c.match(/(?:\r\n?|\n).*/g);return g?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),c},"input"),unput:d(function(c){var g=c.length,b=c.split(/(?:\r\n?|\n)/g);this._input=c+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-g),this.offset-=g;var m=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),b.length-1&&(this.yylineno-=b.length-1);var I=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:b?(b.length===m.length?this.yylloc.first_column:0)+m[m.length-b.length].length-b[0].length:this.yylloc.first_column-g},this.options.ranges&&(this.yylloc.range=[I[0],I[0]+this.yyleng-g]),this.yyleng=this.yytext.length,this},"unput"),more:d(function(){return this._more=!0,this},"more"),reject:d(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:d(function(c){this.unput(this.match.slice(c))},"less"),pastInput:d(function(){var c=this.matched.substr(0,this.matched.length-this.match.length);return(c.length>20?"...":"")+c.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:d(function(){var c=this.match;return c.length<20&&(c+=this._input.substr(0,20-c.length)),(c.substr(0,20)+(c.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:d(function(){var c=this.pastInput(),g=new Array(c.length+1).join("-");return c+this.upcomingInput()+` diff --git a/apps/pythinker-code/dist-web/assets/gitGraphDiagram-WWUBYQGX-BwFh1DGV.js b/apps/pythinker-code/dist-web/assets/gitGraphDiagram-WWUBYQGX-CeTwA67W.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/gitGraphDiagram-WWUBYQGX-BwFh1DGV.js rename to apps/pythinker-code/dist-web/assets/gitGraphDiagram-WWUBYQGX-CeTwA67W.js index bd85dbc6b..e2e4f1e44 100644 --- a/apps/pythinker-code/dist-web/assets/gitGraphDiagram-WWUBYQGX-BwFh1DGV.js +++ b/apps/pythinker-code/dist-web/assets/gitGraphDiagram-WWUBYQGX-CeTwA67W.js @@ -1,4 +1,4 @@ -import{I as le}from"./chunk-2Q5K7J3B-DcbCvFbW.js";import{p as he}from"./chunk-JWPE2WC7-DsFB3Fti.js";import{q as $e,p as fe,s as ge,g as ue,a as ye,b as xe,_ as h,A as J,l as w,j as me,c as W,z as pe,B as be,r as we,k as B,D as ke,E as ve,F as Ce}from"./mermaid.core-D6Xg32pF.js";import{p as Ee}from"./cynefin-OW5HDTMX-Byg0NdnJ.js";import"./index-D9Nz1t7z.js";import"./purify.es-5AjVNlXF.js";var m={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},Be=ve.gitGraph,S=h(()=>ke({...Be,...J().gitGraph}),"getConfig"),d=new le(()=>{const e=S(),r=e.mainBranchName,t=e.mainBranchOrder;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:t}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}});function Y(){return Ce({length:7})}h(Y,"getID");function te(e,r){const t=Object.create(null);return e.reduce((s,o)=>{const i=r(o);return t[i]||(t[i]=!0,s.push(o)),s},[])}h(te,"uniqBy");var Te=h(function(e){d.records.direction=e},"setDirection"),Le=h(function(e){w.debug("options str",e),e=e?.trim(),e=e||"{}";try{d.records.options=JSON.parse(e)}catch(r){w.error("error while parsing gitGraph options",r.message)}},"setOptions"),Me=h(function(){return d.records.options},"getOptions"),Re=h(function(e){let r=e.msg,t=e.id;const s=e.type;let o=e.tags;w.info("commit",r,t,s,o),w.debug("Entering commit:",r,t,s,o);const i=S();t=B.sanitizeText(t,i),r=B.sanitizeText(r,i),o=o?.map(a=>B.sanitizeText(a,i));const n={id:t||d.records.seq+"-"+Y(),message:r,seq:d.records.seq++,type:s??m.NORMAL,tags:o??[],parents:d.records.head==null?[]:[d.records.head.id],branch:d.records.currBranch};d.records.head=n,w.info("main branch",i.mainBranchName),d.records.commits.has(n.id)&&w.warn(`Commit ID ${n.id} already exists`),d.records.commits.set(n.id,n),d.records.branches.set(d.records.currBranch,n.id),w.debug("in pushCommit "+n.id)},"commit"),Ie=h(function(e){let r=e.name;const t=e.order;if(r=B.sanitizeText(r,S()),d.records.branches.has(r))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${r}")`);d.records.branches.set(r,d.records.head!=null?d.records.head.id:null),d.records.branchConfig.set(r,{name:r,order:t}),ae(r),w.debug("in createBranch")},"branch"),Oe=h(e=>{let r=e.branch,t=e.id;const s=e.type,o=e.tags,i=S();r=B.sanitizeText(r,i),t&&(t=B.sanitizeText(t,i));const n=d.records.branches.get(d.records.currBranch),a=d.records.branches.get(r),l=n?d.records.commits.get(n):void 0,f=a?d.records.commits.get(a):void 0;if(l&&f&&l.branch===r)throw new Error(`Cannot merge branch '${r}' into itself.`);if(d.records.currBranch===r){const c=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(l===void 0||!l){const c=new Error(`Incorrect usage of "merge". Current branch (${d.records.currBranch})has no commits`);throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},c}if(!d.records.branches.has(r)){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},c}if(f===void 0||!f){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},c}if(l===f){const c=new Error('Incorrect usage of "merge". Both branches have same head');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(t&&d.records.commits.has(t)){const c=new Error('Incorrect usage of "merge". Commit with id:'+t+" already exists, use different custom id");throw c.hash={text:`merge ${r} ${t} ${s} ${o?.join(" ")}`,token:`merge ${r} ${t} ${s} ${o?.join(" ")}`,expected:[`merge ${r} ${t}_UNIQUE ${s} ${o?.join(" ")}`]},c}const g=a||"",$={id:t||`${d.records.seq}-${Y()}`,message:`merged branch ${r} into ${d.records.currBranch}`,seq:d.records.seq++,parents:d.records.head==null?[]:[d.records.head.id,g],branch:d.records.currBranch,type:m.MERGE,customType:s,customId:!!t,tags:o??[]};d.records.head=$,d.records.commits.set($.id,$),d.records.branches.set(d.records.currBranch,$.id),w.debug(d.records.branches),w.debug("in mergeBranch")},"merge"),_e=h(function(e){let r=e.id,t=e.targetId,s=e.tags,o=e.parent;w.debug("Entering cherryPick:",r,t,s);const i=S();if(r=B.sanitizeText(r,i),t=B.sanitizeText(t,i),s=s?.map(l=>B.sanitizeText(l,i)),o=B.sanitizeText(o,i),!r||!d.records.commits.has(r)){const l=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw l.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},l}const n=d.records.commits.get(r);if(n===void 0||!n)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(o&&!(Array.isArray(n.parents)&&n.parents.includes(o)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");const a=n.branch;if(n.type===m.MERGE&&!o)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!t||!d.records.commits.has(t)){if(a===d.records.currBranch){const $=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const l=d.records.branches.get(d.records.currBranch);if(l===void 0||!l){const $=new Error(`Incorrect usage of "cherry-pick". Current branch (${d.records.currBranch})has no commits`);throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const f=d.records.commits.get(l);if(f===void 0||!f){const $=new Error(`Incorrect usage of "cherry-pick". Current branch (${d.records.currBranch})has no commits`);throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const g={id:d.records.seq+"-"+Y(),message:`cherry-picked ${n?.message} into ${d.records.currBranch}`,seq:d.records.seq++,parents:d.records.head==null?[]:[d.records.head.id,n.id],branch:d.records.currBranch,type:m.CHERRY_PICK,tags:s?s.filter(Boolean):[`cherry-pick:${n.id}${n.type===m.MERGE?`|parent:${o}`:""}`]};d.records.head=g,d.records.commits.set(g.id,g),d.records.branches.set(d.records.currBranch,g.id),w.debug(d.records.branches),w.debug("in cherryPick")}},"cherryPick"),ae=h(function(e){if(e=B.sanitizeText(e,S()),d.records.branches.has(e)){d.records.currBranch=e;const r=d.records.branches.get(d.records.currBranch);r===void 0||!r?d.records.head=null:d.records.head=d.records.commits.get(r)??null}else{const r=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw r.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},r}},"checkout");function V(e,r,t){const s=e.indexOf(r);s===-1?e.push(t):e.splice(s,1,t)}h(V,"upsert");function Q(e){const r=e.reduce((o,i)=>o.seq>i.seq?o:i,e[0]);let t="";e.forEach(function(o){o===r?t+=" *":t+=" |"});const s=[t,r.id,r.seq];for(const o in d.records.branches)d.records.branches.get(o)===r.id&&s.push(o);if(w.debug(s.join(" ")),r.parents&&r.parents.length==2&&r.parents[0]&&r.parents[1]){const o=d.records.commits.get(r.parents[0]);V(e,r,o),r.parents[1]&&e.push(d.records.commits.get(r.parents[1]))}else{if(r.parents.length==0)return;if(r.parents[0]){const o=d.records.commits.get(r.parents[0]);V(e,r,o)}}e=te(e,o=>o.id),Q(e)}h(Q,"prettyPrintCommitHistory");var Ge=h(function(){w.debug(d.records.commits);const e=ne()[0];Q([e])},"prettyPrint"),He=h(function(){d.reset(),we()},"clear"),Se=h(function(){return[...d.records.branchConfig.values()].map((r,t)=>r.order!==null&&r.order!==void 0?r:{...r,order:parseFloat(`0.${t}`)}).sort((r,t)=>(r.order??0)-(t.order??0)).map(({name:r})=>({name:r}))},"getBranchesAsObjArray"),Ae=h(function(){return d.records.branches},"getBranches"),De=h(function(){return d.records.commits},"getCommits"),ne=h(function(){const e=[...d.records.commits.values()];return e.forEach(function(r){w.debug(r.id)}),e.sort((r,t)=>r.seq-t.seq),e},"getCommitsArray"),qe=h(function(){return d.records.currBranch},"getCurrentBranch"),Pe=h(function(){return d.records.direction},"getDirection"),We=h(function(){return d.records.head},"getHead"),se={commitType:m,getConfig:S,setDirection:Te,setOptions:Le,getOptions:Me,commit:Re,branch:Ie,merge:Oe,cherryPick:_e,checkout:ae,prettyPrint:Ge,clear:He,getBranchesAsObjArray:Se,getBranches:Ae,getCommits:De,getCommitsArray:ne,getCurrentBranch:qe,getDirection:Pe,getHead:We,setAccTitle:xe,getAccTitle:ye,getAccDescription:ue,setAccDescription:ge,setDiagramTitle:fe,getDiagramTitle:$e},Ne=h((e,r)=>{he(e,r),e.dir&&r.setDirection(e.dir);for(const t of e.statements)Fe(t,r)},"populate"),Fe=h((e,r)=>{const s={Commit:h(o=>r.commit(ze(o)),"Commit"),Branch:h(o=>r.branch(Ye(o)),"Branch"),Merge:h(o=>r.merge(je(o)),"Merge"),Checkout:h(o=>r.checkout(Ue(o)),"Checkout"),CherryPicking:h(o=>r.cherryPick(Ke(o)),"CherryPicking")}[e.$type];s?s(e):w.error(`Unknown statement type: ${e.$type}`)},"parseStatement"),ze=h(e=>({id:e.id,msg:e.message??"",type:e.type!==void 0?m[e.type]:m.NORMAL,tags:e.tags??void 0}),"parseCommit"),Ye=h(e=>({name:e.name,order:e.order??0}),"parseBranch"),je=h(e=>({branch:e.branch,id:e.id??"",type:e.type!==void 0?m[e.type]:void 0,tags:e.tags??void 0}),"parseMerge"),Ue=h(e=>e.branch,"parseCheckout"),Ke=h(e=>({id:e.id,targetId:"",tags:e.tags?.length===0?void 0:e.tags,parent:e.parent}),"parseCherryPicking"),Ve={parse:h(async e=>{const r=await Ee("gitGraph",e);w.debug(r),Ne(r,se)},"parse")},O=10,_=40,L=4,R=2,G=8,j=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),X=12,Z=new Set(["redux-color","redux-dark-color"]),Xe=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),H=h((e,r,t=!1)=>t&&e>0?(e-1)%(r-1)+1:e%r,"calcColorIndex"),C=new Map,E=new Map,F=30,q=new Map,z=[],I=0,y="LR",Je=h(()=>{C.clear(),E.clear(),q.clear(),I=0,z=[],y="LR"},"clear"),oe=h(e=>{const r=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof e=="string"?e.split(/\\n|\n|/gi):e).forEach(s=>{const o=document.createElementNS("http://www.w3.org/2000/svg","tspan");o.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),o.setAttribute("dy","1em"),o.setAttribute("x","0"),o.setAttribute("class","row"),o.textContent=s.trim(),r.appendChild(o)}),r},"drawText"),ce=h(e=>{let r,t,s;return y==="BT"?(t=h((o,i)=>o<=i,"comparisonFunc"),s=1/0):(t=h((o,i)=>o>=i,"comparisonFunc"),s=0),e.forEach(o=>{const i=y==="TB"||y=="BT"?E.get(o)?.y:E.get(o)?.x;i!==void 0&&t(i,s)&&(r=o,s=i)}),r},"findClosestParent"),Qe=h(e=>{let r="",t=1/0;return e.forEach(s=>{const o=E.get(s).y;o<=t&&(r=s,t=o)}),r||void 0},"findClosestParentBT"),Ze=h((e,r,t)=>{let s=t,o=t;const i=[];e.forEach(n=>{const a=r.get(n);if(!a)throw new Error(`Commit not found for key ${n}`);a.parents.length?(s=rr(a),o=Math.max(s,o)):i.push(a),tr(a,s)}),s=o,i.forEach(n=>{ar(n,s,t)}),e.forEach(n=>{const a=r.get(n);if(a?.parents.length){const l=Qe(a.parents);s=E.get(l).y-_,s<=o&&(o=s);const f=C.get(a.branch).pos,g=s-O;E.set(a.id,{x:f,y:g})}})},"setParallelBTPos"),er=h(e=>{const r=ce(e.parents.filter(s=>s!==null));if(!r)throw new Error(`Closest parent not found for commit ${e.id}`);const t=E.get(r)?.y;if(t===void 0)throw new Error(`Closest parent position not found for commit ${e.id}`);return t},"findClosestParentPos"),rr=h(e=>er(e)+_,"calculateCommitPosition"),tr=h((e,r)=>{const t=C.get(e.branch);if(!t)throw new Error(`Branch not found for commit ${e.id}`);const s=t.pos,o=r+O;return E.set(e.id,{x:s,y:o}),{x:s,y:o}},"setCommitPosition"),ar=h((e,r,t)=>{const s=C.get(e.branch);if(!s)throw new Error(`Branch not found for commit ${e.id}`);const o=r+t,i=s.pos;E.set(e.id,{x:i,y:o})},"setRootPosition"),nr=h((e,r,t,s,o,i)=>{const{theme:n}=W(),a=j.has(n??""),l=Z.has(n??""),f=Xe.has(n??"");if(i===m.HIGHLIGHT)e.append("rect").attr("x",t.x-10+(a?3:0)).attr("y",t.y-10+(a?3:0)).attr("width",a?14:20).attr("height",a?14:20).attr("class",`commit ${r.id} commit-highlight${H(o,G,l)} ${s}-outer`),e.append("rect").attr("x",t.x-6+(a?2:0)).attr("y",t.y-6+(a?2:0)).attr("width",a?8:12).attr("height",a?8:12).attr("class",`commit ${r.id} commit${H(o,G,l)} ${s}-inner`);else if(i===m.CHERRY_PICK)e.append("circle").attr("cx",t.x).attr("cy",t.y).attr("r",a?7:10).attr("class",`commit ${r.id} ${s}`),e.append("circle").attr("cx",t.x-3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("circle").attr("cx",t.x+3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("line").attr("x1",t.x+3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("line").attr("x1",t.x-3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`);else{const g=e.append("circle");if(g.attr("cx",t.x),g.attr("cy",t.y),g.attr("r",a?7:10),g.attr("class",`commit ${r.id} commit${H(o,G,l)}`),i===m.MERGE){const $=e.append("circle");$.attr("cx",t.x),$.attr("cy",t.y),$.attr("r",a?5:6),$.attr("class",`commit ${s} ${r.id} commit${H(o,G,l)}`)}if(i===m.REVERSE){const $=e.append("path"),c=a?4:5;$.attr("d",`M ${t.x-c},${t.y-c}L${t.x+c},${t.y+c}M${t.x-c},${t.y+c}L${t.x+c},${t.y-c}`).attr("class",`commit ${s} ${r.id} commit${H(o,G,l)}`)}}},"drawCommitBullet"),sr=h((e,r,t,s,o)=>{if(r.type!==m.CHERRY_PICK&&(r.customId&&r.type===m.MERGE||r.type!==m.MERGE)&&o.showCommitLabel){const i=e.append("g"),n=i.insert("rect").attr("class","commit-label-bkg"),a=i.append("text").attr("x",s).attr("y",t.y+25).attr("class","commit-label").text(r.id),l=a.node()?.getBBox();if(l&&(n.attr("x",t.posWithOffset-l.width/2-R).attr("y",t.y+13.5).attr("width",l.width+2*R).attr("height",l.height+2*R),y==="TB"||y==="BT"?(n.attr("x",t.x-(l.width+4*L+5)).attr("y",t.y-12),a.attr("x",t.x-(l.width+4*L)).attr("y",t.y+l.height-12)):a.attr("x",t.posWithOffset-l.width/2),o.rotateCommitLabel))if(y==="TB"||y==="BT")a.attr("transform","rotate(-45, "+t.x+", "+t.y+")"),n.attr("transform","rotate(-45, "+t.x+", "+t.y+")");else{const f=-7.5-(l.width+10)/25*9.5,g=10+l.width/25*8.5;i.attr("transform","translate("+f+", "+g+") rotate(-45, "+s+", "+t.y+")")}}},"drawCommitLabel"),or=h((e,r,t,s)=>{if(r.tags.length>0){let o=0,i=0,n=0;const a=[];for(const l of r.tags.reverse()){const f=e.insert("polygon"),g=e.append("circle"),$=e.append("text").attr("y",t.y-16-o).attr("class","tag-label").text(l),c=$.node()?.getBBox();if(!c)throw new Error("Tag bbox not found");i=Math.max(i,c.width),n=Math.max(n,c.height),$.attr("x",t.posWithOffset-c.width/2),a.push({tag:$,hole:g,rect:f,yOffset:o}),o+=20}for(const{tag:l,hole:f,rect:g,yOffset:$}of a){const c=n/2,x=t.y-19.2-$;if(g.attr("class","tag-label-bkg").attr("points",` +import{I as le}from"./chunk-2Q5K7J3B-C5dXVEvr.js";import{p as he}from"./chunk-JWPE2WC7-DjA09kFS.js";import{q as $e,p as fe,s as ge,g as ue,a as ye,b as xe,_ as h,A as J,l as w,j as me,c as W,z as pe,B as be,r as we,k as B,D as ke,E as ve,F as Ce}from"./mermaid.core-BLsmN-lt.js";import{p as Ee}from"./cynefin-OW5HDTMX-BygTY4j3.js";import"./index-XmhyfFRf.js";import"./purify.es-5AjVNlXF.js";var m={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},Be=ve.gitGraph,S=h(()=>ke({...Be,...J().gitGraph}),"getConfig"),d=new le(()=>{const e=S(),r=e.mainBranchName,t=e.mainBranchOrder;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:t}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}});function Y(){return Ce({length:7})}h(Y,"getID");function te(e,r){const t=Object.create(null);return e.reduce((s,o)=>{const i=r(o);return t[i]||(t[i]=!0,s.push(o)),s},[])}h(te,"uniqBy");var Te=h(function(e){d.records.direction=e},"setDirection"),Le=h(function(e){w.debug("options str",e),e=e?.trim(),e=e||"{}";try{d.records.options=JSON.parse(e)}catch(r){w.error("error while parsing gitGraph options",r.message)}},"setOptions"),Me=h(function(){return d.records.options},"getOptions"),Re=h(function(e){let r=e.msg,t=e.id;const s=e.type;let o=e.tags;w.info("commit",r,t,s,o),w.debug("Entering commit:",r,t,s,o);const i=S();t=B.sanitizeText(t,i),r=B.sanitizeText(r,i),o=o?.map(a=>B.sanitizeText(a,i));const n={id:t||d.records.seq+"-"+Y(),message:r,seq:d.records.seq++,type:s??m.NORMAL,tags:o??[],parents:d.records.head==null?[]:[d.records.head.id],branch:d.records.currBranch};d.records.head=n,w.info("main branch",i.mainBranchName),d.records.commits.has(n.id)&&w.warn(`Commit ID ${n.id} already exists`),d.records.commits.set(n.id,n),d.records.branches.set(d.records.currBranch,n.id),w.debug("in pushCommit "+n.id)},"commit"),Ie=h(function(e){let r=e.name;const t=e.order;if(r=B.sanitizeText(r,S()),d.records.branches.has(r))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${r}")`);d.records.branches.set(r,d.records.head!=null?d.records.head.id:null),d.records.branchConfig.set(r,{name:r,order:t}),ae(r),w.debug("in createBranch")},"branch"),Oe=h(e=>{let r=e.branch,t=e.id;const s=e.type,o=e.tags,i=S();r=B.sanitizeText(r,i),t&&(t=B.sanitizeText(t,i));const n=d.records.branches.get(d.records.currBranch),a=d.records.branches.get(r),l=n?d.records.commits.get(n):void 0,f=a?d.records.commits.get(a):void 0;if(l&&f&&l.branch===r)throw new Error(`Cannot merge branch '${r}' into itself.`);if(d.records.currBranch===r){const c=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(l===void 0||!l){const c=new Error(`Incorrect usage of "merge". Current branch (${d.records.currBranch})has no commits`);throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},c}if(!d.records.branches.has(r)){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},c}if(f===void 0||!f){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},c}if(l===f){const c=new Error('Incorrect usage of "merge". Both branches have same head');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(t&&d.records.commits.has(t)){const c=new Error('Incorrect usage of "merge". Commit with id:'+t+" already exists, use different custom id");throw c.hash={text:`merge ${r} ${t} ${s} ${o?.join(" ")}`,token:`merge ${r} ${t} ${s} ${o?.join(" ")}`,expected:[`merge ${r} ${t}_UNIQUE ${s} ${o?.join(" ")}`]},c}const g=a||"",$={id:t||`${d.records.seq}-${Y()}`,message:`merged branch ${r} into ${d.records.currBranch}`,seq:d.records.seq++,parents:d.records.head==null?[]:[d.records.head.id,g],branch:d.records.currBranch,type:m.MERGE,customType:s,customId:!!t,tags:o??[]};d.records.head=$,d.records.commits.set($.id,$),d.records.branches.set(d.records.currBranch,$.id),w.debug(d.records.branches),w.debug("in mergeBranch")},"merge"),_e=h(function(e){let r=e.id,t=e.targetId,s=e.tags,o=e.parent;w.debug("Entering cherryPick:",r,t,s);const i=S();if(r=B.sanitizeText(r,i),t=B.sanitizeText(t,i),s=s?.map(l=>B.sanitizeText(l,i)),o=B.sanitizeText(o,i),!r||!d.records.commits.has(r)){const l=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw l.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},l}const n=d.records.commits.get(r);if(n===void 0||!n)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(o&&!(Array.isArray(n.parents)&&n.parents.includes(o)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");const a=n.branch;if(n.type===m.MERGE&&!o)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!t||!d.records.commits.has(t)){if(a===d.records.currBranch){const $=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const l=d.records.branches.get(d.records.currBranch);if(l===void 0||!l){const $=new Error(`Incorrect usage of "cherry-pick". Current branch (${d.records.currBranch})has no commits`);throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const f=d.records.commits.get(l);if(f===void 0||!f){const $=new Error(`Incorrect usage of "cherry-pick". Current branch (${d.records.currBranch})has no commits`);throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const g={id:d.records.seq+"-"+Y(),message:`cherry-picked ${n?.message} into ${d.records.currBranch}`,seq:d.records.seq++,parents:d.records.head==null?[]:[d.records.head.id,n.id],branch:d.records.currBranch,type:m.CHERRY_PICK,tags:s?s.filter(Boolean):[`cherry-pick:${n.id}${n.type===m.MERGE?`|parent:${o}`:""}`]};d.records.head=g,d.records.commits.set(g.id,g),d.records.branches.set(d.records.currBranch,g.id),w.debug(d.records.branches),w.debug("in cherryPick")}},"cherryPick"),ae=h(function(e){if(e=B.sanitizeText(e,S()),d.records.branches.has(e)){d.records.currBranch=e;const r=d.records.branches.get(d.records.currBranch);r===void 0||!r?d.records.head=null:d.records.head=d.records.commits.get(r)??null}else{const r=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw r.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},r}},"checkout");function V(e,r,t){const s=e.indexOf(r);s===-1?e.push(t):e.splice(s,1,t)}h(V,"upsert");function Q(e){const r=e.reduce((o,i)=>o.seq>i.seq?o:i,e[0]);let t="";e.forEach(function(o){o===r?t+=" *":t+=" |"});const s=[t,r.id,r.seq];for(const o in d.records.branches)d.records.branches.get(o)===r.id&&s.push(o);if(w.debug(s.join(" ")),r.parents&&r.parents.length==2&&r.parents[0]&&r.parents[1]){const o=d.records.commits.get(r.parents[0]);V(e,r,o),r.parents[1]&&e.push(d.records.commits.get(r.parents[1]))}else{if(r.parents.length==0)return;if(r.parents[0]){const o=d.records.commits.get(r.parents[0]);V(e,r,o)}}e=te(e,o=>o.id),Q(e)}h(Q,"prettyPrintCommitHistory");var Ge=h(function(){w.debug(d.records.commits);const e=ne()[0];Q([e])},"prettyPrint"),He=h(function(){d.reset(),we()},"clear"),Se=h(function(){return[...d.records.branchConfig.values()].map((r,t)=>r.order!==null&&r.order!==void 0?r:{...r,order:parseFloat(`0.${t}`)}).sort((r,t)=>(r.order??0)-(t.order??0)).map(({name:r})=>({name:r}))},"getBranchesAsObjArray"),Ae=h(function(){return d.records.branches},"getBranches"),De=h(function(){return d.records.commits},"getCommits"),ne=h(function(){const e=[...d.records.commits.values()];return e.forEach(function(r){w.debug(r.id)}),e.sort((r,t)=>r.seq-t.seq),e},"getCommitsArray"),qe=h(function(){return d.records.currBranch},"getCurrentBranch"),Pe=h(function(){return d.records.direction},"getDirection"),We=h(function(){return d.records.head},"getHead"),se={commitType:m,getConfig:S,setDirection:Te,setOptions:Le,getOptions:Me,commit:Re,branch:Ie,merge:Oe,cherryPick:_e,checkout:ae,prettyPrint:Ge,clear:He,getBranchesAsObjArray:Se,getBranches:Ae,getCommits:De,getCommitsArray:ne,getCurrentBranch:qe,getDirection:Pe,getHead:We,setAccTitle:xe,getAccTitle:ye,getAccDescription:ue,setAccDescription:ge,setDiagramTitle:fe,getDiagramTitle:$e},Ne=h((e,r)=>{he(e,r),e.dir&&r.setDirection(e.dir);for(const t of e.statements)Fe(t,r)},"populate"),Fe=h((e,r)=>{const s={Commit:h(o=>r.commit(ze(o)),"Commit"),Branch:h(o=>r.branch(Ye(o)),"Branch"),Merge:h(o=>r.merge(je(o)),"Merge"),Checkout:h(o=>r.checkout(Ue(o)),"Checkout"),CherryPicking:h(o=>r.cherryPick(Ke(o)),"CherryPicking")}[e.$type];s?s(e):w.error(`Unknown statement type: ${e.$type}`)},"parseStatement"),ze=h(e=>({id:e.id,msg:e.message??"",type:e.type!==void 0?m[e.type]:m.NORMAL,tags:e.tags??void 0}),"parseCommit"),Ye=h(e=>({name:e.name,order:e.order??0}),"parseBranch"),je=h(e=>({branch:e.branch,id:e.id??"",type:e.type!==void 0?m[e.type]:void 0,tags:e.tags??void 0}),"parseMerge"),Ue=h(e=>e.branch,"parseCheckout"),Ke=h(e=>({id:e.id,targetId:"",tags:e.tags?.length===0?void 0:e.tags,parent:e.parent}),"parseCherryPicking"),Ve={parse:h(async e=>{const r=await Ee("gitGraph",e);w.debug(r),Ne(r,se)},"parse")},O=10,_=40,L=4,R=2,G=8,j=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),X=12,Z=new Set(["redux-color","redux-dark-color"]),Xe=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),H=h((e,r,t=!1)=>t&&e>0?(e-1)%(r-1)+1:e%r,"calcColorIndex"),C=new Map,E=new Map,F=30,q=new Map,z=[],I=0,y="LR",Je=h(()=>{C.clear(),E.clear(),q.clear(),I=0,z=[],y="LR"},"clear"),oe=h(e=>{const r=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof e=="string"?e.split(/\\n|\n|/gi):e).forEach(s=>{const o=document.createElementNS("http://www.w3.org/2000/svg","tspan");o.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),o.setAttribute("dy","1em"),o.setAttribute("x","0"),o.setAttribute("class","row"),o.textContent=s.trim(),r.appendChild(o)}),r},"drawText"),ce=h(e=>{let r,t,s;return y==="BT"?(t=h((o,i)=>o<=i,"comparisonFunc"),s=1/0):(t=h((o,i)=>o>=i,"comparisonFunc"),s=0),e.forEach(o=>{const i=y==="TB"||y=="BT"?E.get(o)?.y:E.get(o)?.x;i!==void 0&&t(i,s)&&(r=o,s=i)}),r},"findClosestParent"),Qe=h(e=>{let r="",t=1/0;return e.forEach(s=>{const o=E.get(s).y;o<=t&&(r=s,t=o)}),r||void 0},"findClosestParentBT"),Ze=h((e,r,t)=>{let s=t,o=t;const i=[];e.forEach(n=>{const a=r.get(n);if(!a)throw new Error(`Commit not found for key ${n}`);a.parents.length?(s=rr(a),o=Math.max(s,o)):i.push(a),tr(a,s)}),s=o,i.forEach(n=>{ar(n,s,t)}),e.forEach(n=>{const a=r.get(n);if(a?.parents.length){const l=Qe(a.parents);s=E.get(l).y-_,s<=o&&(o=s);const f=C.get(a.branch).pos,g=s-O;E.set(a.id,{x:f,y:g})}})},"setParallelBTPos"),er=h(e=>{const r=ce(e.parents.filter(s=>s!==null));if(!r)throw new Error(`Closest parent not found for commit ${e.id}`);const t=E.get(r)?.y;if(t===void 0)throw new Error(`Closest parent position not found for commit ${e.id}`);return t},"findClosestParentPos"),rr=h(e=>er(e)+_,"calculateCommitPosition"),tr=h((e,r)=>{const t=C.get(e.branch);if(!t)throw new Error(`Branch not found for commit ${e.id}`);const s=t.pos,o=r+O;return E.set(e.id,{x:s,y:o}),{x:s,y:o}},"setCommitPosition"),ar=h((e,r,t)=>{const s=C.get(e.branch);if(!s)throw new Error(`Branch not found for commit ${e.id}`);const o=r+t,i=s.pos;E.set(e.id,{x:i,y:o})},"setRootPosition"),nr=h((e,r,t,s,o,i)=>{const{theme:n}=W(),a=j.has(n??""),l=Z.has(n??""),f=Xe.has(n??"");if(i===m.HIGHLIGHT)e.append("rect").attr("x",t.x-10+(a?3:0)).attr("y",t.y-10+(a?3:0)).attr("width",a?14:20).attr("height",a?14:20).attr("class",`commit ${r.id} commit-highlight${H(o,G,l)} ${s}-outer`),e.append("rect").attr("x",t.x-6+(a?2:0)).attr("y",t.y-6+(a?2:0)).attr("width",a?8:12).attr("height",a?8:12).attr("class",`commit ${r.id} commit${H(o,G,l)} ${s}-inner`);else if(i===m.CHERRY_PICK)e.append("circle").attr("cx",t.x).attr("cy",t.y).attr("r",a?7:10).attr("class",`commit ${r.id} ${s}`),e.append("circle").attr("cx",t.x-3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("circle").attr("cx",t.x+3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("line").attr("x1",t.x+3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("line").attr("x1",t.x-3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`);else{const g=e.append("circle");if(g.attr("cx",t.x),g.attr("cy",t.y),g.attr("r",a?7:10),g.attr("class",`commit ${r.id} commit${H(o,G,l)}`),i===m.MERGE){const $=e.append("circle");$.attr("cx",t.x),$.attr("cy",t.y),$.attr("r",a?5:6),$.attr("class",`commit ${s} ${r.id} commit${H(o,G,l)}`)}if(i===m.REVERSE){const $=e.append("path"),c=a?4:5;$.attr("d",`M ${t.x-c},${t.y-c}L${t.x+c},${t.y+c}M${t.x-c},${t.y+c}L${t.x+c},${t.y-c}`).attr("class",`commit ${s} ${r.id} commit${H(o,G,l)}`)}}},"drawCommitBullet"),sr=h((e,r,t,s,o)=>{if(r.type!==m.CHERRY_PICK&&(r.customId&&r.type===m.MERGE||r.type!==m.MERGE)&&o.showCommitLabel){const i=e.append("g"),n=i.insert("rect").attr("class","commit-label-bkg"),a=i.append("text").attr("x",s).attr("y",t.y+25).attr("class","commit-label").text(r.id),l=a.node()?.getBBox();if(l&&(n.attr("x",t.posWithOffset-l.width/2-R).attr("y",t.y+13.5).attr("width",l.width+2*R).attr("height",l.height+2*R),y==="TB"||y==="BT"?(n.attr("x",t.x-(l.width+4*L+5)).attr("y",t.y-12),a.attr("x",t.x-(l.width+4*L)).attr("y",t.y+l.height-12)):a.attr("x",t.posWithOffset-l.width/2),o.rotateCommitLabel))if(y==="TB"||y==="BT")a.attr("transform","rotate(-45, "+t.x+", "+t.y+")"),n.attr("transform","rotate(-45, "+t.x+", "+t.y+")");else{const f=-7.5-(l.width+10)/25*9.5,g=10+l.width/25*8.5;i.attr("transform","translate("+f+", "+g+") rotate(-45, "+s+", "+t.y+")")}}},"drawCommitLabel"),or=h((e,r,t,s)=>{if(r.tags.length>0){let o=0,i=0,n=0;const a=[];for(const l of r.tags.reverse()){const f=e.insert("polygon"),g=e.append("circle"),$=e.append("text").attr("y",t.y-16-o).attr("class","tag-label").text(l),c=$.node()?.getBBox();if(!c)throw new Error("Tag bbox not found");i=Math.max(i,c.width),n=Math.max(n,c.height),$.attr("x",t.posWithOffset-c.width/2),a.push({tag:$,hole:g,rect:f,yOffset:o}),o+=20}for(const{tag:l,hole:f,rect:g,yOffset:$}of a){const c=n/2,x=t.y-19.2-$;if(g.attr("class","tag-label-bkg").attr("points",` ${s-i/2-L/2},${x+R} ${s-i/2-L/2},${x-R} ${t.posWithOffset-i/2-L},${x-c-R} diff --git a/apps/pythinker-code/dist-web/assets/handlebars-Dt6_fHq4.js b/apps/pythinker-code/dist-web/assets/handlebars-F3r5eIuq.js similarity index 97% rename from apps/pythinker-code/dist-web/assets/handlebars-Dt6_fHq4.js rename to apps/pythinker-code/dist-web/assets/handlebars-F3r5eIuq.js index a1e225940..07b4779f0 100644 --- a/apps/pythinker-code/dist-web/assets/handlebars-Dt6_fHq4.js +++ b/apps/pythinker-code/dist-web/assets/handlebars-F3r5eIuq.js @@ -1 +1 @@ -import{l as e}from"./editor.main-CUgPnB4r.js";import"./index-D9Nz1t7z.js";import"./purify.es-5AjVNlXF.js";const t=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"],r={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:["{{!--","--}}"]},brackets:[[""],["<",">"],["{{","}}"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"}],onEnterRules:[{beforeText:new RegExp(`<(?!(?:${t.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),afterText:/^<\/(\w[\w\d]*)\s*>$/i,action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:new RegExp(`<(?!(?:${t.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),action:{indentAction:e.IndentAction.Indent}}]},i={defaultToken:"",tokenPostfix:"",tokenizer:{root:[[/\{\{!--/,"comment.block.start.handlebars","@commentBlock"],[/\{\{!/,"comment.start.handlebars","@comment"],[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.root"}],[/)/,["delimiter.html","tag.html","delimiter.html"]],[/(<)(script)/,["delimiter.html",{token:"tag.html",next:"@script"}]],[/(<)(style)/,["delimiter.html",{token:"tag.html",next:"@style"}]],[/(<)([:\w]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/(<\/)(\w+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/]+/,"metatag.content.html"],[/>/,"metatag.html","@pop"]],comment:[[/\}\}/,"comment.end.handlebars","@pop"],[/./,"comment.content.handlebars"]],commentBlock:[[/--\}\}/,"comment.block.end.handlebars","@pop"],[/./,"comment.content.handlebars"]],commentHtml:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.comment"}],[/-->/,"comment.html","@pop"],[/[^-]+/,"comment.content.html"],[/./,"comment.content.html"]],otherTag:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.otherTag"}],[/\/?>/,"delimiter.html","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.script"}],[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],scriptAfterType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptAfterType"}],[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInEmbeddedState.scriptEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],style:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.style"}],[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],styleAfterType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleAfterType"}],[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInEmbeddedState.styleEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],handlebarsInSimpleState:[[/\{\{\{?/,"delimiter.handlebars"],[/\}\}\}?/,{token:"delimiter.handlebars",switchTo:"@$S2.$S3"}],{include:"handlebarsRoot"}],handlebarsInEmbeddedState:[[/\{\{\{?/,"delimiter.handlebars"],[/\}\}\}?/,{token:"delimiter.handlebars",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}],{include:"handlebarsRoot"}],handlebarsRoot:[[/"[^"]*"/,"string.handlebars"],[/[#/][^\s}]+/,"keyword.helper.handlebars"],[/else\b/,"keyword.helper.handlebars"],[/[\s]+/],[/[^}]/,"variable.parameter.handlebars"]]}};export{r as conf,i as language}; +import{l as e}from"./editor.main-CSd5xoJU.js";import"./index-XmhyfFRf.js";import"./purify.es-5AjVNlXF.js";const t=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"],r={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:["{{!--","--}}"]},brackets:[[""],["<",">"],["{{","}}"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"}],onEnterRules:[{beforeText:new RegExp(`<(?!(?:${t.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),afterText:/^<\/(\w[\w\d]*)\s*>$/i,action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:new RegExp(`<(?!(?:${t.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),action:{indentAction:e.IndentAction.Indent}}]},i={defaultToken:"",tokenPostfix:"",tokenizer:{root:[[/\{\{!--/,"comment.block.start.handlebars","@commentBlock"],[/\{\{!/,"comment.start.handlebars","@comment"],[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.root"}],[/)/,["delimiter.html","tag.html","delimiter.html"]],[/(<)(script)/,["delimiter.html",{token:"tag.html",next:"@script"}]],[/(<)(style)/,["delimiter.html",{token:"tag.html",next:"@style"}]],[/(<)([:\w]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/(<\/)(\w+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/]+/,"metatag.content.html"],[/>/,"metatag.html","@pop"]],comment:[[/\}\}/,"comment.end.handlebars","@pop"],[/./,"comment.content.handlebars"]],commentBlock:[[/--\}\}/,"comment.block.end.handlebars","@pop"],[/./,"comment.content.handlebars"]],commentHtml:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.comment"}],[/-->/,"comment.html","@pop"],[/[^-]+/,"comment.content.html"],[/./,"comment.content.html"]],otherTag:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.otherTag"}],[/\/?>/,"delimiter.html","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.script"}],[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],scriptAfterType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptAfterType"}],[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInEmbeddedState.scriptEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],style:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.style"}],[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],styleAfterType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleAfterType"}],[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInEmbeddedState.styleEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],handlebarsInSimpleState:[[/\{\{\{?/,"delimiter.handlebars"],[/\}\}\}?/,{token:"delimiter.handlebars",switchTo:"@$S2.$S3"}],{include:"handlebarsRoot"}],handlebarsInEmbeddedState:[[/\{\{\{?/,"delimiter.handlebars"],[/\}\}\}?/,{token:"delimiter.handlebars",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}],{include:"handlebarsRoot"}],handlebarsRoot:[[/"[^"]*"/,"string.handlebars"],[/[#/][^\s}]+/,"keyword.helper.handlebars"],[/else\b/,"keyword.helper.handlebars"],[/[\s]+/],[/[^}]/,"variable.parameter.handlebars"]]}};export{r as conf,i as language}; diff --git a/apps/pythinker-code/dist-web/assets/html-DNZRtspS.js b/apps/pythinker-code/dist-web/assets/html-Blg47oPG.js similarity index 97% rename from apps/pythinker-code/dist-web/assets/html-DNZRtspS.js rename to apps/pythinker-code/dist-web/assets/html-Blg47oPG.js index c78351706..b259f0821 100644 --- a/apps/pythinker-code/dist-web/assets/html-DNZRtspS.js +++ b/apps/pythinker-code/dist-web/assets/html-Blg47oPG.js @@ -1 +1 @@ -import{l as e}from"./editor.main-CUgPnB4r.js";import"./index-D9Nz1t7z.js";import"./purify.es-5AjVNlXF.js";const t=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"],o={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:[""]},brackets:[[""],["<",">"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"}],onEnterRules:[{beforeText:new RegExp(`<(?!(?:${t.join("|")}))([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),afterText:/^<\/([_:\w][_:\w-.\d]*)\s*>$/i,action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:new RegExp(`<(?!(?:${t.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),action:{indentAction:e.IndentAction.Indent}}],folding:{markers:{start:new RegExp("^\\s*"),end:new RegExp("^\\s*")}}},s={defaultToken:"",tokenPostfix:".html",ignoreCase:!0,tokenizer:{root:[[/)/,["delimiter","tag","","delimiter"]],[/(<)(script)/,["delimiter",{token:"tag",next:"@script"}]],[/(<)(style)/,["delimiter",{token:"tag",next:"@style"}]],[/(<)((?:[\w\-]+:)?[\w\-]+)/,["delimiter",{token:"tag",next:"@otherTag"}]],[/(<\/)((?:[\w\-]+:)?[\w\-]+)/,["delimiter",{token:"tag",next:"@otherTag"}]],[/]+/,"metatag.content"],[/>/,"metatag","@pop"]],comment:[[/-->/,"comment","@pop"],[/[^-]+/,"comment.content"],[/./,"comment.content"]],otherTag:[[/\/?>/,"delimiter","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter","tag",{token:"delimiter",next:"@pop"}]]],scriptAfterType:[[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/"module"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.text/javascript"}],[/'module'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.text/javascript"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/>/,{token:"delimiter",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/[^<]+/,""]],style:[[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter","tag",{token:"delimiter",next:"@pop"}]]],styleAfterType:[[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/>/,{token:"delimiter",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/[^<]+/,""]]}};export{o as conf,s as language}; +import{l as e}from"./editor.main-CSd5xoJU.js";import"./index-XmhyfFRf.js";import"./purify.es-5AjVNlXF.js";const t=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"],o={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:[""]},brackets:[[""],["<",">"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"}],onEnterRules:[{beforeText:new RegExp(`<(?!(?:${t.join("|")}))([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),afterText:/^<\/([_:\w][_:\w-.\d]*)\s*>$/i,action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:new RegExp(`<(?!(?:${t.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),action:{indentAction:e.IndentAction.Indent}}],folding:{markers:{start:new RegExp("^\\s*"),end:new RegExp("^\\s*")}}},s={defaultToken:"",tokenPostfix:".html",ignoreCase:!0,tokenizer:{root:[[/)/,["delimiter","tag","","delimiter"]],[/(<)(script)/,["delimiter",{token:"tag",next:"@script"}]],[/(<)(style)/,["delimiter",{token:"tag",next:"@style"}]],[/(<)((?:[\w\-]+:)?[\w\-]+)/,["delimiter",{token:"tag",next:"@otherTag"}]],[/(<\/)((?:[\w\-]+:)?[\w\-]+)/,["delimiter",{token:"tag",next:"@otherTag"}]],[/]+/,"metatag.content"],[/>/,"metatag","@pop"]],comment:[[/-->/,"comment","@pop"],[/[^-]+/,"comment.content"],[/./,"comment.content"]],otherTag:[[/\/?>/,"delimiter","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter","tag",{token:"delimiter",next:"@pop"}]]],scriptAfterType:[[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/"module"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.text/javascript"}],[/'module'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.text/javascript"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/>/,{token:"delimiter",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/[^<]+/,""]],style:[[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter","tag",{token:"delimiter",next:"@pop"}]]],styleAfterType:[[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/>/,{token:"delimiter",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/[^<]+/,""]]}};export{o as conf,s as language}; diff --git a/apps/pythinker-code/dist-web/assets/htmlMode-CNwKQEFk.js b/apps/pythinker-code/dist-web/assets/htmlMode-CKzw1Cpu.js similarity index 94% rename from apps/pythinker-code/dist-web/assets/htmlMode-CNwKQEFk.js rename to apps/pythinker-code/dist-web/assets/htmlMode-CKzw1Cpu.js index b8fe7d1b1..d3ac97b27 100644 --- a/apps/pythinker-code/dist-web/assets/htmlMode-CNwKQEFk.js +++ b/apps/pythinker-code/dist-web/assets/htmlMode-CKzw1Cpu.js @@ -1 +1 @@ -import{c as D,l as t}from"./editor.main-CUgPnB4r.js";import{H as d,D as l,h as c,F as u,b as h,S as m,c as p,f as w,g as _,C as R}from"./lspLanguageFeatures-BxKarwGx.js";import{a as b,e as y,d as T,R as U,i as x,j as M,t as j,k as O}from"./lspLanguageFeatures-BxKarwGx.js";import"./index-D9Nz1t7z.js";import"./purify.es-5AjVNlXF.js";const I=120*1e3;class f{constructor(n){this._defaults=n,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval(()=>this._checkIfIdle(),30*1e3),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker())}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){if(!this._worker)return;Date.now()-this._lastUsedTime>I&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||(this._worker=D({moduleId:"vs/language/html/htmlWorker",createWorker:()=>new Worker(new URL("/assets/html.worker-C8KWqYYR.js",import.meta.url),{type:"module"}),createData:{languageSettings:this._defaults.options,languageId:this._defaults.languageId},label:this._defaults.languageId}),this._client=this._worker.getProxy()),this._client}getLanguageServiceWorker(...n){let e;return this._getClient().then(r=>{e=r}).then(r=>{if(this._worker)return this._worker.withSyncedResources(n)}).then(r=>e)}}class v extends R{constructor(n){super(n,[".",":","<",'"',"=","/"])}}function F(i){const n=new f(i),e=(...o)=>n.getLanguageServiceWorker(...o);let r=i.languageId;t.registerCompletionItemProvider(r,new v(e)),t.registerHoverProvider(r,new d(e)),t.registerDocumentHighlightProvider(r,new l(e)),t.registerLinkProvider(r,new c(e)),t.registerFoldingRangeProvider(r,new u(e)),t.registerDocumentSymbolProvider(r,new h(e)),t.registerSelectionRangeProvider(r,new m(e)),t.registerRenameProvider(r,new p(e)),r==="html"&&(t.registerDocumentFormattingEditProvider(r,new w(e)),t.registerDocumentRangeFormattingEditProvider(r,new _(e)))}function L(i){const n=[],e=[],r=new f(i);n.push(r);const o=(...s)=>r.getLanguageServiceWorker(...s);function P(){const{languageId:s,modeConfiguration:a}=i;k(e),a.completionItems&&e.push(t.registerCompletionItemProvider(s,new v(o))),a.hovers&&e.push(t.registerHoverProvider(s,new d(o))),a.documentHighlights&&e.push(t.registerDocumentHighlightProvider(s,new l(o))),a.links&&e.push(t.registerLinkProvider(s,new c(o))),a.documentSymbols&&e.push(t.registerDocumentSymbolProvider(s,new h(o))),a.rename&&e.push(t.registerRenameProvider(s,new p(o))),a.foldingRanges&&e.push(t.registerFoldingRangeProvider(s,new u(o))),a.selectionRanges&&e.push(t.registerSelectionRangeProvider(s,new m(o))),a.documentFormattingEdits&&e.push(t.registerDocumentFormattingEditProvider(s,new w(o))),a.documentRangeFormattingEdits&&e.push(t.registerDocumentRangeFormattingEditProvider(s,new _(o)))}return P(),n.push(g(e)),g(n)}function g(i){return{dispose:()=>k(i)}}function k(i){for(;i.length;)i.pop().dispose()}export{R as CompletionAdapter,b as DefinitionAdapter,y as DiagnosticsAdapter,T as DocumentColorAdapter,w as DocumentFormattingEditProvider,l as DocumentHighlightAdapter,c as DocumentLinkAdapter,_ as DocumentRangeFormattingEditProvider,h as DocumentSymbolAdapter,u as FoldingRangeAdapter,d as HoverAdapter,U as ReferenceAdapter,p as RenameAdapter,m as SelectionRangeAdapter,f as WorkerManager,x as fromPosition,M as fromRange,L as setupMode,F as setupMode1,j as toRange,O as toTextEdit}; +import{c as D,l as t}from"./editor.main-CSd5xoJU.js";import{H as d,D as l,h as c,F as u,b as h,S as m,c as p,f as w,g as _,C as R}from"./lspLanguageFeatures-DIQkkUvS.js";import{a as b,e as y,d as T,R as U,i as x,j as M,t as j,k as O}from"./lspLanguageFeatures-DIQkkUvS.js";import"./index-XmhyfFRf.js";import"./purify.es-5AjVNlXF.js";const I=120*1e3;class f{constructor(n){this._defaults=n,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval(()=>this._checkIfIdle(),30*1e3),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker())}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){if(!this._worker)return;Date.now()-this._lastUsedTime>I&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||(this._worker=D({moduleId:"vs/language/html/htmlWorker",createWorker:()=>new Worker(new URL("/assets/html.worker-C8KWqYYR.js",import.meta.url),{type:"module"}),createData:{languageSettings:this._defaults.options,languageId:this._defaults.languageId},label:this._defaults.languageId}),this._client=this._worker.getProxy()),this._client}getLanguageServiceWorker(...n){let e;return this._getClient().then(r=>{e=r}).then(r=>{if(this._worker)return this._worker.withSyncedResources(n)}).then(r=>e)}}class v extends R{constructor(n){super(n,[".",":","<",'"',"=","/"])}}function F(i){const n=new f(i),e=(...o)=>n.getLanguageServiceWorker(...o);let r=i.languageId;t.registerCompletionItemProvider(r,new v(e)),t.registerHoverProvider(r,new d(e)),t.registerDocumentHighlightProvider(r,new l(e)),t.registerLinkProvider(r,new c(e)),t.registerFoldingRangeProvider(r,new u(e)),t.registerDocumentSymbolProvider(r,new h(e)),t.registerSelectionRangeProvider(r,new m(e)),t.registerRenameProvider(r,new p(e)),r==="html"&&(t.registerDocumentFormattingEditProvider(r,new w(e)),t.registerDocumentRangeFormattingEditProvider(r,new _(e)))}function L(i){const n=[],e=[],r=new f(i);n.push(r);const o=(...s)=>r.getLanguageServiceWorker(...s);function P(){const{languageId:s,modeConfiguration:a}=i;k(e),a.completionItems&&e.push(t.registerCompletionItemProvider(s,new v(o))),a.hovers&&e.push(t.registerHoverProvider(s,new d(o))),a.documentHighlights&&e.push(t.registerDocumentHighlightProvider(s,new l(o))),a.links&&e.push(t.registerLinkProvider(s,new c(o))),a.documentSymbols&&e.push(t.registerDocumentSymbolProvider(s,new h(o))),a.rename&&e.push(t.registerRenameProvider(s,new p(o))),a.foldingRanges&&e.push(t.registerFoldingRangeProvider(s,new u(o))),a.selectionRanges&&e.push(t.registerSelectionRangeProvider(s,new m(o))),a.documentFormattingEdits&&e.push(t.registerDocumentFormattingEditProvider(s,new w(o))),a.documentRangeFormattingEdits&&e.push(t.registerDocumentRangeFormattingEditProvider(s,new _(o)))}return P(),n.push(g(e)),g(n)}function g(i){return{dispose:()=>k(i)}}function k(i){for(;i.length;)i.pop().dispose()}export{R as CompletionAdapter,b as DefinitionAdapter,y as DiagnosticsAdapter,T as DocumentColorAdapter,w as DocumentFormattingEditProvider,l as DocumentHighlightAdapter,c as DocumentLinkAdapter,_ as DocumentRangeFormattingEditProvider,h as DocumentSymbolAdapter,u as FoldingRangeAdapter,d as HoverAdapter,U as ReferenceAdapter,p as RenameAdapter,m as SelectionRangeAdapter,f as WorkerManager,x as fromPosition,M as fromRange,L as setupMode,F as setupMode1,j as toRange,O as toTextEdit}; diff --git a/apps/pythinker-code/dist-web/assets/index-tKxZRbcu.js b/apps/pythinker-code/dist-web/assets/index-B-GhLu-7.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/index-tKxZRbcu.js rename to apps/pythinker-code/dist-web/assets/index-B-GhLu-7.js index d91b19b38..78e5e87e7 100644 --- a/apps/pythinker-code/dist-web/assets/index-tKxZRbcu.js +++ b/apps/pythinker-code/dist-web/assets/index-B-GhLu-7.js @@ -1,5 +1,5 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-CKVuDqnW.js","assets/index-at2nKQ9b.js","assets/index-D9Nz1t7z.js","assets/index-CZhX7oJU.css"])))=>i.map(i=>d[i]); -import{bR as Q}from"./index-D9Nz1t7z.js";var Y=class{chunks=[];cached="";dirty=!1;length=0;append(e){e&&(this.chunks.push(e),this.length+=e.length,this.dirty=!0,this.chunks.length>256&&this.compact())}clear(e=""){this.chunks=e?[e]:[],this.cached=e,this.dirty=!1,this.length=e.length}toString(){return this.dirty&&(this.cached=this.chunks.join(""),this.dirty=!1),this.cached}compact(){this.chunks=[this.chunks.join("")]}};function $(e,i){e.replaceChildren();const t=document.createElement("div");t.className="stream-diffs-shell",t.style.overflow="auto",t.style.maxHeight=typeof i=="number"?`${i}px`:i??"none";const n=document.createElement("div");return n.className="stream-diffs-surface",t.appendChild(n),e.appendChild(t),{shell:t,surface:n}}function E(e,i,t){return{name:e,contents:i,lang:t}}var Z=class{input;container;surface;instance;diff;selectedLines=null;disposed=!1;renderListeners=new Set;visualRevision=0;visualReadyPromise=Promise.resolve(!1);resolveVisualReady;constructor(e){this.input=e}async mount(e){this.disposed=!1,this.container=e,this.surface=$(e).surface,await this.render()}async update(e){this.input=e,this.surface&&await this.render(!0)}updateFile(e,i){return this.update({kind:"file",file:e,annotations:i,options:this.input.kind==="file"?this.input.options:void 0,workerManager:this.input.kind==="file"?this.input.workerManager:void 0})}updateDiff(e,i,t){return this.update({kind:"diff",oldFile:e,newFile:i,annotations:t,options:z(this.input)?this.input.options:void 0,workerManager:z(this.input)?this.input.workerManager:void 0})}updateParsedDiff(e,i){return this.update({kind:"diff",fileDiff:e,annotations:i,options:z(this.input)?this.input.options:void 0,workerManager:z(this.input)?this.input.workerManager:void 0})}updatePatch(e,i=0,t,n=0){return this.update({kind:"patch",patch:e,patchIndex:n,fileIndex:i,annotations:t,options:this.input.kind==="patch"?this.input.options:void 0,workerManager:this.input.kind==="patch"?this.input.workerManager:void 0})}updateMergeConflict(e,i){return this.update({kind:"merge-conflict",file:e,annotations:i,options:this.input.kind==="merge-conflict"?this.input.options:void 0,workerManager:this.input.kind==="merge-conflict"?this.input.workerManager:void 0})}setSelectedLines(e){this.selectedLines=e,this.instance?.setSelectedLines(e)}setAnnotations(e){this.instance&&(this.input.kind==="file"?(this.input.annotations=e,this.instance.setLineAnnotations(this.input.annotations)):(this.input.annotations=e,this.instance.setLineAnnotations(this.input.annotations)),this.emitRender())}setThemeType(e){this.input.options?this.input.options={...this.input.options,themeType:e}:this.input.options={themeType:e},this.instance?.setThemeType(e)}async setTheme(e){this.input.options?this.input.options={...this.input.options,theme:e}:this.input.options={theme:e},this.surface&&await this.render(!1)}async setOptions(e){this.input.options=e,this.surface&&await this.render(!1)}acceptReject(e,i){if(!z(this.input)||!this.diff)throw new Error("acceptReject() requires a diff view");const{diffAcceptRejectHunk:t}=this.module;return this.diff=t(this.diff,e,i),this.instance.render({fileDiff:this.diff,containerWrapper:this.surface,lineAnnotations:this.input.annotations}),this.diff}resolveConflict(e,i){if(this.input.kind!=="merge-conflict")throw new Error("resolveConflict() requires a merge-conflict view");const t=this.instance.resolveConflict(e,i);return t&&(this.input.file=t.file,this.diff=t.fileDiff),t?.file}getResolvedFile(){if(!z(this.input)||!this.diff||this.diff.isPartial)return;const e="newFile"in this.input?this.input.newFile:void 0;return{name:e?.name??this.diff.name,contents:this.diff.additionLines.join(""),lang:e?.lang??this.diff.lang}}getDiff(){return this.diff}getInput(){return this.input}getNativeInstance(){return this.instance}onDidRender(e){return this.renderListeners.add(e),{dispose:()=>this.renderListeners.delete(e)}}async whenVisualReady(){let e=this.visualReadyPromise;for(;;){const i=await e;if(e===this.visualReadyPromise)return i;e=this.visualReadyPromise}}dispose(){this.disposed=!0,this.invalidateVisualReady(),this.instance?.cleanUp(),this.instance=void 0,this.surface=void 0,this.container?.replaceChildren(),this.container=void 0,this.renderListeners.clear()}module;async render(e=!0){const i=this.surface;if(!i||this.disposed)return;const t=this.beginVisualRender(),n=this.module??=await Q(()=>import("./index-CKVuDqnW.js"),__vite__mapDeps([0,1,2,3]));if(this.disposed||i!==this.surface)return;if(this.instance?.cleanUp(),i.replaceChildren(),this.input.kind==="file"){const o=new n.File(b(this.input.options,()=>this.markVisualReady(t)),this.input.workerManager);o.render({file:this.input.file,containerWrapper:i,lineAnnotations:this.input.annotations}),this.instance=o,o.setSelectedLines(this.selectedLines),this.diff=void 0;return}if(z(this.input)){if(e||!this.diff)if(this.input.kind==="patch"){const a=n.parsePatchFiles(this.input.patch)[this.input.patchIndex??0];if(!a)throw new Error(`Patch does not contain patch index ${this.input.patchIndex??0}`);const d=a.files[this.input.fileIndex??0];if(!d)throw new Error(`Patch does not contain file index ${this.input.fileIndex??0}`);this.diff=d}else"fileDiff"in this.input?this.diff=this.input.fileDiff:this.diff=n.parseDiffFromFile(this.input.oldFile,this.input.newFile,this.input.options?.parseDiffOptions);const o=new n.FileDiff(b(this.input.options,()=>this.markVisualReady(t)),this.input.workerManager);o.render({fileDiff:this.diff,containerWrapper:i,lineAnnotations:this.input.annotations}),this.instance=o,o.setSelectedLines(this.selectedLines);return}const r=new n.UnresolvedFile(b(this.input.options,()=>this.markVisualReady(t)),this.input.workerManager);r.render({file:this.input.file,containerWrapper:i,lineAnnotations:this.input.annotations}),this.instance=r,r.setSelectedLines(this.selectedLines),this.diff=r.fileDiff}emitRender(){for(const e of this.renderListeners)e()}beginVisualRender(){this.resolveVisualReady?.(!1);const e=++this.visualRevision;return this.visualReadyPromise=new Promise(i=>{this.resolveVisualReady=i}),e}markVisualReady(e){this.disposed||e!==this.visualRevision||(this.resolveVisualReady?.(!0),this.resolveVisualReady=void 0,this.emitRender())}invalidateVisualReady(){this.visualRevision++,this.resolveVisualReady?.(!1),this.resolveVisualReady=void 0}};function x(e){return new Z(e)}function ee(e){return!e||e.useTokenTransformer===!0||!e.onTokenClick&&!e.onTokenEnter&&!e.onTokenLeave?e:{...e,useTokenTransformer:!0}}function b(e,i){const t=ee(e),n=t?.onPostRender;return{...t,onPostRender(...r){n?.(...r),i()}}}function z(e){return e.kind==="diff"||e.kind==="patch"}var K=class{options;state="idle";stats={characters:0,lines:0,writes:0,resets:0,renderMode:"plain-text",overflowed:!1};text=new Y;pending=[];scheduled;generation=0;container;shell;surface;finalizedSurface;plainText;finalizePromise;renderListeners=new Set;finalizedRenderSubscription;constructor(e={}){this.options=e}async mount(e){if(this.state==="disposed")throw new Error("Cannot mount a disposed code stream. Create a new controller instead.");++this.generation,this.cancelScheduledFlush(),this.finalizedSurface?.dispose(),this.finalizedRenderSubscription?.dispose(),this.container?.replaceChildren(),this.finalizedSurface=void 0,this.finalizedRenderSubscription=void 0,this.plainText=void 0,this.pending=[],this.setState("mounting"),this.container=e;const{shell:i,surface:t}=$(e,this.options.maxHeight);this.shell=i,this.surface=t,this.mountPlainText(t),this.stats.startedAt??=performance.now(),this.setState("streaming")}append(e){if(e){if(this.state==="finalized"||this.state==="finalizing"||this.state==="disposed")throw new Error(`Cannot append while stream is ${this.state}`);this.text.append(e),this.stats.characters=this.text.length,this.stats.lines+=ie(e)+(this.stats.lines===0?1:0),this.pending.push(e),this.scheduleFlush()}}updateSnapshot(e){const i=this.text.toString();if(e.startsWith(i)){this.append(e.slice(i.length));return}const t=this.options.nonAppendBehavior??"reset";if(t!=="ignore"){if(t==="throw")throw new Error("Snapshot violates the append-only stream contract");return this.reset(e)}}async consume(e){try{if(Symbol.asyncIterator in e)for await(const i of e)this.append(i);else{const i=e.getReader();try{for(;;){const{done:t,value:n}=await i.read();if(t)break;this.append(n)}}finally{i.releaseLock()}}}catch(i){throw this.fail(i),i}}async flush(){if(this.cancelScheduledFlush(),!this.pending.length)return;const e=this.shouldFollowViewport(),i=this.pending.join("");this.pending.length=0,this.plainText?.append(i),this.stats.writes++,this.followViewport(e),this.emitRender()}finalize(e={view:"stream"}){if(this.state==="finalized")return Promise.resolve();if(this.finalizePromise)return this.finalizePromise;const i=this.performFinalize(e).finally(()=>{this.finalizePromise===i&&(this.finalizePromise=void 0)});return this.finalizePromise=i,i}async performFinalize(e){if(this.state==="disposed")throw new Error("Cannot finalize a disposed code stream");const i=this.generation;if(this.setState("finalizing"),await this.flush(),i!==this.generation)return;if(this.stats.finalizedAt=performance.now(),!e.view||e.view==="stream"){this.setState("finalized");return}const t=this.surface;if(!t)throw new Error("Mount the stream before finalizing to a file or diff view");const n=this.options.fileName??`code.${this.options.language??"txt"}`,r=E(n,this.getText(),this.options.language);let o;if(e.view==="file"){const{annotations:c,workerManager:g,view:S,...T}=e;o=x({kind:"file",file:r,annotations:c,options:{theme:this.options.theme,themeType:this.options.themeType,...T},workerManager:g??this.options.workerManager})}else{const{annotations:c,original:g,workerManager:S,view:T,...L}=e;o=x({kind:"diff",oldFile:E(n,g,this.options.language),newFile:r,annotations:c,options:{theme:this.options.theme,themeType:this.options.themeType,...L},workerManager:S??this.options.workerManager})}const a=document.createElement("div");if(a.className="stream-diffs-finalized",await o.mount(a),i!==this.generation){o.dispose();return}const d=this.shell,p=d?.scrollTop??0,h=d?d.scrollHeight-d.scrollTop-d.clientHeight:0;t.replaceWith(a),this.surface=a,this.plainText=void 0,this.finalizedSurface=o,this.finalizedRenderSubscription=o.onDidRender(()=>this.emitRender()),d&&(this.options.autoScroll==="always"||this.options.autoScroll!=="never"&&h<=(this.options.autoScrollThresholdPx??32)?d.scrollTop=d.scrollHeight:d.scrollTop=p),this.setState("finalized"),this.emitRender()}async reset(e=""){const i=this.container;++this.generation,this.cancelScheduledFlush(),this.finalizedSurface?.dispose(),this.finalizedRenderSubscription?.dispose(),this.finalizedSurface=void 0,this.finalizedRenderSubscription=void 0,this.plainText=void 0,this.pending=[],this.finalizePromise=void 0,this.text.clear(),this.stats.resets++,this.stats.characters=0,this.stats.lines=0,this.stats.renderMode="plain-text",this.stats.overflowed=!1,this.setState("idle"),e&&this.append(e),i&&await this.mount(i)}setThemeType(e){this.options.themeType=e,this.finalizedSurface?.setThemeType(e)}async setTheme(e){this.options.theme=e,this.finalizedSurface&&await this.finalizedSurface.setTheme(e)}async setLanguage(e){if(e===this.options.language||(this.options.language=e,!this.finalizedSurface))return;const i=this.finalizedSurface.getInput();i.kind==="file"?await this.finalizedSurface.updateFile({...i.file,lang:e},i.annotations):i.kind==="diff"&&"oldFile"in i&&await this.finalizedSurface.updateDiff({...i.oldFile,lang:e},{...i.newFile,lang:e},i.annotations)}getText(){return this.text.toString()}getState(){return this.state}getStats(){return{...this.stats}}getElement(){return this.shell}getFinalizedSurface(){return this.finalizedSurface}onDidRender(e){return this.renderListeners.add(e),{dispose:()=>this.renderListeners.delete(e)}}dispose(){++this.generation,this.cancelScheduledFlush(),this.finalizedSurface?.dispose(),this.finalizedRenderSubscription?.dispose(),this.container?.replaceChildren(),this.plainText=void 0,this.container=void 0,this.surface=void 0,this.shell=void 0,this.finalizedSurface=void 0,this.finalizedRenderSubscription=void 0,this.finalizePromise=void 0,this.renderListeners.clear(),this.setState("disposed")}scheduleFlush(){if(this.scheduled!=null||!this.plainText)return;const e=this.options.flushStrategy??"raf";e==="raf"&&typeof requestAnimationFrame=="function"?this.scheduled=requestAnimationFrame(()=>void this.flush()):this.scheduled=globalThis.setTimeout(()=>void this.flush(),e==="raf"?0:e.intervalMs)}cancelScheduledFlush(){this.scheduled!=null&&(typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(this.scheduled),clearTimeout(this.scheduled),this.scheduled=void 0)}shouldFollowViewport(){const e=this.shell;return!e||this.options.autoScroll==="never"?!1:this.options.autoScroll==="always"?!0:e.scrollHeight-e.scrollTop-e.clientHeight<=(this.options.autoScrollThresholdPx??32)}followViewport(e=this.shouldFollowViewport()){this.shell&&e&&(this.shell.scrollTop=this.shell.scrollHeight)}mountPlainText(e){const i=document.createElement("pre");i.className="stream-diffs-plain-text",i.dataset.streamDiffsState="streaming",i.style.margin="0",i.style.whiteSpace=this.options.wrap?"pre-wrap":"pre",i.style.overflowWrap=this.options.wrap?"anywhere":"normal",i.textContent=this.getText(),e.replaceChildren(i),this.plainText=i}setState(e){this.state=e,this.options.onStateChange?.(e)}emitRender(){for(const e of this.renderListeners)e()}fail(e){this.state!=="disposed"&&(this.setState("error"),this.options.onError?.(e))}};function ie(e){let i=0;for(let t=0;t{this.finalizePromise===i&&(this.finalizePromise=void 0)});return this.finalizePromise=i,i}async performFinalize(e){if(this.state==="disposed")throw new Error("Cannot finalize a disposed diff stream");const i=this.surface;if(!i)throw new Error("Mount the diff stream before finalizing it");const t=this.generation;this.setState("finalizing");const n=x({kind:"diff",oldFile:this.asFile(this.original),newFile:this.asFile(this.modified),annotations:e,options:{...this.options,diffStyle:this.options.diffStyle??"unified"},workerManager:this.options.workerManager}),r=document.createElement("div");if(r.className="stream-diffs-finalized",await n.mount(r),t!==this.generation){n.dispose();return}const o=this.shell,a=o?.scrollTop??0;return i.replaceWith(r),this.surface=r,this.finalizedSurface=n,this.finalizedRenderSubscription=n.onDidRender(()=>this.emitRender()),o&&(o.scrollTop=a),this.setState("finalized"),this.emitRender(),n}setThemeType(e){this.options.themeType=e,this.finalizedSurface?.setThemeType(e)}async setTheme(e){this.options.theme=e,this.finalizedSurface&&await this.finalizedSurface.setTheme(e)}async setLanguage(e){if(e!==this.options.language){if(this.options.language=e,this.finalizedSurface){const i=this.finalizedSurface.getInput();i.kind==="diff"&&"oldFile"in i&&await this.finalizedSurface.updateDiff({...i.oldFile,lang:e},{...i.newFile,lang:e},i.annotations);return}this.renderPre()}}getOriginal(){return this.original}getModified(){return this.modified}getState(){return this.state}getElement(){return this.shell}getFinalizedSurface(){return this.finalizedSurface}onDidRender(e){return this.renderListeners.add(e),{dispose:()=>this.renderListeners.delete(e)}}dispose(){++this.generation,this.finalizedSurface?.dispose(),this.finalizedRenderSubscription?.dispose(),this.container?.replaceChildren(),this.container=void 0,this.shell=void 0,this.surface=void 0,this.finalizedSurface=void 0,this.finalizedRenderSubscription=void 0,this.finalizePromise=void 0,this.renderListeners.clear(),this.setState("disposed")}renderPre(){const e=this.surface;if(!e||this.finalizedSurface)return;const i=document.createElement("div");i.className=`stream-diffs-diff-pre stream-diffs-diff-pre--${this.options.diffStyle??"unified"}`,i.dataset.streamDiffsState="streaming",i.style.minWidth="max-content",(this.options.diffStyle??"unified")==="split"?(i.style.display="grid",i.style.gridTemplateColumns="minmax(0, 1fr) minmax(0, 1fr)",i.append(this.createPre(this.original,"deletions"),this.createPre(this.modified,"additions"))):i.append(this.createPre(te(this.original,this.modified),"unified")),e.replaceChildren(i)}createPre(e,i){const t=document.createElement("pre");return t.className=`stream-diffs-diff-pre__pane stream-diffs-diff-pre__pane--${i}`,t.dataset.side=i,t.style.margin="0",t.style.whiteSpace=this.options.wrap?"pre-wrap":"pre",t.style.overflowWrap=this.options.wrap?"anywhere":"normal",t.textContent=e,t}asFile(e){return E(this.options.fileName??`code.${this.options.language??"txt"}`,e,this.options.language)}setState(e){this.state=e,this.options.onStateChange?.(e)}emitRender(){for(const e of this.renderListeners)e()}};function te(e,i){const t=e.split(` +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-CXJs_0Yn.js","assets/index-CzEepPxd.js","assets/index-XmhyfFRf.js","assets/index-CZhX7oJU.css"])))=>i.map(i=>d[i]); +import{bR as Q}from"./index-XmhyfFRf.js";var Y=class{chunks=[];cached="";dirty=!1;length=0;append(e){e&&(this.chunks.push(e),this.length+=e.length,this.dirty=!0,this.chunks.length>256&&this.compact())}clear(e=""){this.chunks=e?[e]:[],this.cached=e,this.dirty=!1,this.length=e.length}toString(){return this.dirty&&(this.cached=this.chunks.join(""),this.dirty=!1),this.cached}compact(){this.chunks=[this.chunks.join("")]}};function $(e,i){e.replaceChildren();const t=document.createElement("div");t.className="stream-diffs-shell",t.style.overflow="auto",t.style.maxHeight=typeof i=="number"?`${i}px`:i??"none";const n=document.createElement("div");return n.className="stream-diffs-surface",t.appendChild(n),e.appendChild(t),{shell:t,surface:n}}function E(e,i,t){return{name:e,contents:i,lang:t}}var Z=class{input;container;surface;instance;diff;selectedLines=null;disposed=!1;renderListeners=new Set;visualRevision=0;visualReadyPromise=Promise.resolve(!1);resolveVisualReady;constructor(e){this.input=e}async mount(e){this.disposed=!1,this.container=e,this.surface=$(e).surface,await this.render()}async update(e){this.input=e,this.surface&&await this.render(!0)}updateFile(e,i){return this.update({kind:"file",file:e,annotations:i,options:this.input.kind==="file"?this.input.options:void 0,workerManager:this.input.kind==="file"?this.input.workerManager:void 0})}updateDiff(e,i,t){return this.update({kind:"diff",oldFile:e,newFile:i,annotations:t,options:z(this.input)?this.input.options:void 0,workerManager:z(this.input)?this.input.workerManager:void 0})}updateParsedDiff(e,i){return this.update({kind:"diff",fileDiff:e,annotations:i,options:z(this.input)?this.input.options:void 0,workerManager:z(this.input)?this.input.workerManager:void 0})}updatePatch(e,i=0,t,n=0){return this.update({kind:"patch",patch:e,patchIndex:n,fileIndex:i,annotations:t,options:this.input.kind==="patch"?this.input.options:void 0,workerManager:this.input.kind==="patch"?this.input.workerManager:void 0})}updateMergeConflict(e,i){return this.update({kind:"merge-conflict",file:e,annotations:i,options:this.input.kind==="merge-conflict"?this.input.options:void 0,workerManager:this.input.kind==="merge-conflict"?this.input.workerManager:void 0})}setSelectedLines(e){this.selectedLines=e,this.instance?.setSelectedLines(e)}setAnnotations(e){this.instance&&(this.input.kind==="file"?(this.input.annotations=e,this.instance.setLineAnnotations(this.input.annotations)):(this.input.annotations=e,this.instance.setLineAnnotations(this.input.annotations)),this.emitRender())}setThemeType(e){this.input.options?this.input.options={...this.input.options,themeType:e}:this.input.options={themeType:e},this.instance?.setThemeType(e)}async setTheme(e){this.input.options?this.input.options={...this.input.options,theme:e}:this.input.options={theme:e},this.surface&&await this.render(!1)}async setOptions(e){this.input.options=e,this.surface&&await this.render(!1)}acceptReject(e,i){if(!z(this.input)||!this.diff)throw new Error("acceptReject() requires a diff view");const{diffAcceptRejectHunk:t}=this.module;return this.diff=t(this.diff,e,i),this.instance.render({fileDiff:this.diff,containerWrapper:this.surface,lineAnnotations:this.input.annotations}),this.diff}resolveConflict(e,i){if(this.input.kind!=="merge-conflict")throw new Error("resolveConflict() requires a merge-conflict view");const t=this.instance.resolveConflict(e,i);return t&&(this.input.file=t.file,this.diff=t.fileDiff),t?.file}getResolvedFile(){if(!z(this.input)||!this.diff||this.diff.isPartial)return;const e="newFile"in this.input?this.input.newFile:void 0;return{name:e?.name??this.diff.name,contents:this.diff.additionLines.join(""),lang:e?.lang??this.diff.lang}}getDiff(){return this.diff}getInput(){return this.input}getNativeInstance(){return this.instance}onDidRender(e){return this.renderListeners.add(e),{dispose:()=>this.renderListeners.delete(e)}}async whenVisualReady(){let e=this.visualReadyPromise;for(;;){const i=await e;if(e===this.visualReadyPromise)return i;e=this.visualReadyPromise}}dispose(){this.disposed=!0,this.invalidateVisualReady(),this.instance?.cleanUp(),this.instance=void 0,this.surface=void 0,this.container?.replaceChildren(),this.container=void 0,this.renderListeners.clear()}module;async render(e=!0){const i=this.surface;if(!i||this.disposed)return;const t=this.beginVisualRender(),n=this.module??=await Q(()=>import("./index-CXJs_0Yn.js"),__vite__mapDeps([0,1,2,3]));if(this.disposed||i!==this.surface)return;if(this.instance?.cleanUp(),i.replaceChildren(),this.input.kind==="file"){const o=new n.File(b(this.input.options,()=>this.markVisualReady(t)),this.input.workerManager);o.render({file:this.input.file,containerWrapper:i,lineAnnotations:this.input.annotations}),this.instance=o,o.setSelectedLines(this.selectedLines),this.diff=void 0;return}if(z(this.input)){if(e||!this.diff)if(this.input.kind==="patch"){const a=n.parsePatchFiles(this.input.patch)[this.input.patchIndex??0];if(!a)throw new Error(`Patch does not contain patch index ${this.input.patchIndex??0}`);const d=a.files[this.input.fileIndex??0];if(!d)throw new Error(`Patch does not contain file index ${this.input.fileIndex??0}`);this.diff=d}else"fileDiff"in this.input?this.diff=this.input.fileDiff:this.diff=n.parseDiffFromFile(this.input.oldFile,this.input.newFile,this.input.options?.parseDiffOptions);const o=new n.FileDiff(b(this.input.options,()=>this.markVisualReady(t)),this.input.workerManager);o.render({fileDiff:this.diff,containerWrapper:i,lineAnnotations:this.input.annotations}),this.instance=o,o.setSelectedLines(this.selectedLines);return}const r=new n.UnresolvedFile(b(this.input.options,()=>this.markVisualReady(t)),this.input.workerManager);r.render({file:this.input.file,containerWrapper:i,lineAnnotations:this.input.annotations}),this.instance=r,r.setSelectedLines(this.selectedLines),this.diff=r.fileDiff}emitRender(){for(const e of this.renderListeners)e()}beginVisualRender(){this.resolveVisualReady?.(!1);const e=++this.visualRevision;return this.visualReadyPromise=new Promise(i=>{this.resolveVisualReady=i}),e}markVisualReady(e){this.disposed||e!==this.visualRevision||(this.resolveVisualReady?.(!0),this.resolveVisualReady=void 0,this.emitRender())}invalidateVisualReady(){this.visualRevision++,this.resolveVisualReady?.(!1),this.resolveVisualReady=void 0}};function x(e){return new Z(e)}function ee(e){return!e||e.useTokenTransformer===!0||!e.onTokenClick&&!e.onTokenEnter&&!e.onTokenLeave?e:{...e,useTokenTransformer:!0}}function b(e,i){const t=ee(e),n=t?.onPostRender;return{...t,onPostRender(...r){n?.(...r),i()}}}function z(e){return e.kind==="diff"||e.kind==="patch"}var K=class{options;state="idle";stats={characters:0,lines:0,writes:0,resets:0,renderMode:"plain-text",overflowed:!1};text=new Y;pending=[];scheduled;generation=0;container;shell;surface;finalizedSurface;plainText;finalizePromise;renderListeners=new Set;finalizedRenderSubscription;constructor(e={}){this.options=e}async mount(e){if(this.state==="disposed")throw new Error("Cannot mount a disposed code stream. Create a new controller instead.");++this.generation,this.cancelScheduledFlush(),this.finalizedSurface?.dispose(),this.finalizedRenderSubscription?.dispose(),this.container?.replaceChildren(),this.finalizedSurface=void 0,this.finalizedRenderSubscription=void 0,this.plainText=void 0,this.pending=[],this.setState("mounting"),this.container=e;const{shell:i,surface:t}=$(e,this.options.maxHeight);this.shell=i,this.surface=t,this.mountPlainText(t),this.stats.startedAt??=performance.now(),this.setState("streaming")}append(e){if(e){if(this.state==="finalized"||this.state==="finalizing"||this.state==="disposed")throw new Error(`Cannot append while stream is ${this.state}`);this.text.append(e),this.stats.characters=this.text.length,this.stats.lines+=ie(e)+(this.stats.lines===0?1:0),this.pending.push(e),this.scheduleFlush()}}updateSnapshot(e){const i=this.text.toString();if(e.startsWith(i)){this.append(e.slice(i.length));return}const t=this.options.nonAppendBehavior??"reset";if(t!=="ignore"){if(t==="throw")throw new Error("Snapshot violates the append-only stream contract");return this.reset(e)}}async consume(e){try{if(Symbol.asyncIterator in e)for await(const i of e)this.append(i);else{const i=e.getReader();try{for(;;){const{done:t,value:n}=await i.read();if(t)break;this.append(n)}}finally{i.releaseLock()}}}catch(i){throw this.fail(i),i}}async flush(){if(this.cancelScheduledFlush(),!this.pending.length)return;const e=this.shouldFollowViewport(),i=this.pending.join("");this.pending.length=0,this.plainText?.append(i),this.stats.writes++,this.followViewport(e),this.emitRender()}finalize(e={view:"stream"}){if(this.state==="finalized")return Promise.resolve();if(this.finalizePromise)return this.finalizePromise;const i=this.performFinalize(e).finally(()=>{this.finalizePromise===i&&(this.finalizePromise=void 0)});return this.finalizePromise=i,i}async performFinalize(e){if(this.state==="disposed")throw new Error("Cannot finalize a disposed code stream");const i=this.generation;if(this.setState("finalizing"),await this.flush(),i!==this.generation)return;if(this.stats.finalizedAt=performance.now(),!e.view||e.view==="stream"){this.setState("finalized");return}const t=this.surface;if(!t)throw new Error("Mount the stream before finalizing to a file or diff view");const n=this.options.fileName??`code.${this.options.language??"txt"}`,r=E(n,this.getText(),this.options.language);let o;if(e.view==="file"){const{annotations:c,workerManager:g,view:S,...T}=e;o=x({kind:"file",file:r,annotations:c,options:{theme:this.options.theme,themeType:this.options.themeType,...T},workerManager:g??this.options.workerManager})}else{const{annotations:c,original:g,workerManager:S,view:T,...L}=e;o=x({kind:"diff",oldFile:E(n,g,this.options.language),newFile:r,annotations:c,options:{theme:this.options.theme,themeType:this.options.themeType,...L},workerManager:S??this.options.workerManager})}const a=document.createElement("div");if(a.className="stream-diffs-finalized",await o.mount(a),i!==this.generation){o.dispose();return}const d=this.shell,p=d?.scrollTop??0,h=d?d.scrollHeight-d.scrollTop-d.clientHeight:0;t.replaceWith(a),this.surface=a,this.plainText=void 0,this.finalizedSurface=o,this.finalizedRenderSubscription=o.onDidRender(()=>this.emitRender()),d&&(this.options.autoScroll==="always"||this.options.autoScroll!=="never"&&h<=(this.options.autoScrollThresholdPx??32)?d.scrollTop=d.scrollHeight:d.scrollTop=p),this.setState("finalized"),this.emitRender()}async reset(e=""){const i=this.container;++this.generation,this.cancelScheduledFlush(),this.finalizedSurface?.dispose(),this.finalizedRenderSubscription?.dispose(),this.finalizedSurface=void 0,this.finalizedRenderSubscription=void 0,this.plainText=void 0,this.pending=[],this.finalizePromise=void 0,this.text.clear(),this.stats.resets++,this.stats.characters=0,this.stats.lines=0,this.stats.renderMode="plain-text",this.stats.overflowed=!1,this.setState("idle"),e&&this.append(e),i&&await this.mount(i)}setThemeType(e){this.options.themeType=e,this.finalizedSurface?.setThemeType(e)}async setTheme(e){this.options.theme=e,this.finalizedSurface&&await this.finalizedSurface.setTheme(e)}async setLanguage(e){if(e===this.options.language||(this.options.language=e,!this.finalizedSurface))return;const i=this.finalizedSurface.getInput();i.kind==="file"?await this.finalizedSurface.updateFile({...i.file,lang:e},i.annotations):i.kind==="diff"&&"oldFile"in i&&await this.finalizedSurface.updateDiff({...i.oldFile,lang:e},{...i.newFile,lang:e},i.annotations)}getText(){return this.text.toString()}getState(){return this.state}getStats(){return{...this.stats}}getElement(){return this.shell}getFinalizedSurface(){return this.finalizedSurface}onDidRender(e){return this.renderListeners.add(e),{dispose:()=>this.renderListeners.delete(e)}}dispose(){++this.generation,this.cancelScheduledFlush(),this.finalizedSurface?.dispose(),this.finalizedRenderSubscription?.dispose(),this.container?.replaceChildren(),this.plainText=void 0,this.container=void 0,this.surface=void 0,this.shell=void 0,this.finalizedSurface=void 0,this.finalizedRenderSubscription=void 0,this.finalizePromise=void 0,this.renderListeners.clear(),this.setState("disposed")}scheduleFlush(){if(this.scheduled!=null||!this.plainText)return;const e=this.options.flushStrategy??"raf";e==="raf"&&typeof requestAnimationFrame=="function"?this.scheduled=requestAnimationFrame(()=>void this.flush()):this.scheduled=globalThis.setTimeout(()=>void this.flush(),e==="raf"?0:e.intervalMs)}cancelScheduledFlush(){this.scheduled!=null&&(typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(this.scheduled),clearTimeout(this.scheduled),this.scheduled=void 0)}shouldFollowViewport(){const e=this.shell;return!e||this.options.autoScroll==="never"?!1:this.options.autoScroll==="always"?!0:e.scrollHeight-e.scrollTop-e.clientHeight<=(this.options.autoScrollThresholdPx??32)}followViewport(e=this.shouldFollowViewport()){this.shell&&e&&(this.shell.scrollTop=this.shell.scrollHeight)}mountPlainText(e){const i=document.createElement("pre");i.className="stream-diffs-plain-text",i.dataset.streamDiffsState="streaming",i.style.margin="0",i.style.whiteSpace=this.options.wrap?"pre-wrap":"pre",i.style.overflowWrap=this.options.wrap?"anywhere":"normal",i.textContent=this.getText(),e.replaceChildren(i),this.plainText=i}setState(e){this.state=e,this.options.onStateChange?.(e)}emitRender(){for(const e of this.renderListeners)e()}fail(e){this.state!=="disposed"&&(this.setState("error"),this.options.onError?.(e))}};function ie(e){let i=0;for(let t=0;t{this.finalizePromise===i&&(this.finalizePromise=void 0)});return this.finalizePromise=i,i}async performFinalize(e){if(this.state==="disposed")throw new Error("Cannot finalize a disposed diff stream");const i=this.surface;if(!i)throw new Error("Mount the diff stream before finalizing it");const t=this.generation;this.setState("finalizing");const n=x({kind:"diff",oldFile:this.asFile(this.original),newFile:this.asFile(this.modified),annotations:e,options:{...this.options,diffStyle:this.options.diffStyle??"unified"},workerManager:this.options.workerManager}),r=document.createElement("div");if(r.className="stream-diffs-finalized",await n.mount(r),t!==this.generation){n.dispose();return}const o=this.shell,a=o?.scrollTop??0;return i.replaceWith(r),this.surface=r,this.finalizedSurface=n,this.finalizedRenderSubscription=n.onDidRender(()=>this.emitRender()),o&&(o.scrollTop=a),this.setState("finalized"),this.emitRender(),n}setThemeType(e){this.options.themeType=e,this.finalizedSurface?.setThemeType(e)}async setTheme(e){this.options.theme=e,this.finalizedSurface&&await this.finalizedSurface.setTheme(e)}async setLanguage(e){if(e!==this.options.language){if(this.options.language=e,this.finalizedSurface){const i=this.finalizedSurface.getInput();i.kind==="diff"&&"oldFile"in i&&await this.finalizedSurface.updateDiff({...i.oldFile,lang:e},{...i.newFile,lang:e},i.annotations);return}this.renderPre()}}getOriginal(){return this.original}getModified(){return this.modified}getState(){return this.state}getElement(){return this.shell}getFinalizedSurface(){return this.finalizedSurface}onDidRender(e){return this.renderListeners.add(e),{dispose:()=>this.renderListeners.delete(e)}}dispose(){++this.generation,this.finalizedSurface?.dispose(),this.finalizedRenderSubscription?.dispose(),this.container?.replaceChildren(),this.container=void 0,this.shell=void 0,this.surface=void 0,this.finalizedSurface=void 0,this.finalizedRenderSubscription=void 0,this.finalizePromise=void 0,this.renderListeners.clear(),this.setState("disposed")}renderPre(){const e=this.surface;if(!e||this.finalizedSurface)return;const i=document.createElement("div");i.className=`stream-diffs-diff-pre stream-diffs-diff-pre--${this.options.diffStyle??"unified"}`,i.dataset.streamDiffsState="streaming",i.style.minWidth="max-content",(this.options.diffStyle??"unified")==="split"?(i.style.display="grid",i.style.gridTemplateColumns="minmax(0, 1fr) minmax(0, 1fr)",i.append(this.createPre(this.original,"deletions"),this.createPre(this.modified,"additions"))):i.append(this.createPre(te(this.original,this.modified),"unified")),e.replaceChildren(i)}createPre(e,i){const t=document.createElement("pre");return t.className=`stream-diffs-diff-pre__pane stream-diffs-diff-pre__pane--${i}`,t.dataset.side=i,t.style.margin="0",t.style.whiteSpace=this.options.wrap?"pre-wrap":"pre",t.style.overflowWrap=this.options.wrap?"anywhere":"normal",t.textContent=e,t}asFile(e){return E(this.options.fileName??`code.${this.options.language??"txt"}`,e,this.options.language)}setState(e){this.state=e,this.options.onStateChange?.(e)}emitRender(){for(const e of this.renderListeners)e()}};function te(e,i){const t=e.split(` `),n=i.split(` `);let r=0;for(;r` ${a}`),...t.slice(r,t.length-o).map(a=>`- ${a}`),...n.slice(r,n.length-o).map(a=>`+ ${a}`),...t.slice(t.length-o).map(a=>` ${a}`)].join(` `)}function he(e){return new G(e)}function ue(e={}){let i,t,n,r,o,a="text",d="",p="",h,c=0,g="system",S=U(e),T=q(e);const L={disableLineNumbers:e.lineNumbers===!1,overflow:e.wordWrap==="on"?"wrap":"scroll",enableLineSelection:e.enableLineSelection},M=()=>({...L,theme:S,themeType:g});async function H(s,l,u){k();const w=c;if(N(s,e),h=s,a=R(u),_(l))return V(s,l,a);if(e.stream===!1)return O(s,l,a);const f=new K({...M(),...F(e),fileName:`code.${a}`,language:a,maxHeight:e.MAX_HEIGHT,autoScroll:e.autoScrollOnUpdate===!1?"never":"near-bottom",autoScrollThresholdPx:e.autoScrollThresholdPx,workerManager:e.workerManager});if(i=f,f.append(l),await f.mount(s),w!==c||i!==f||h!==s)throw f.dispose(),new Error("Editor creation was cancelled");return e.onController?.(f),r=C(()=>f.getText(),s,()=>f.getFinalizedSurface(),m=>f.onDidRender(m)),r}async function I(s,l,u,w){k();const f=c;N(s,e),h=s,a=R(w),d=l,p=u;let m,v;if(e.stream===!1){if(m=x({kind:"diff",oldFile:y(l),newFile:y(u),annotations:e.lineAnnotations,workerManager:e.workerManager,options:{...M(),diffStyle:e.diffStyle??(e.renderSideBySide===!1?"unified":"split"),...F(e)}}),n=m,await m.mount(s),f!==c||n!==m||h!==s)throw m.dispose(),new Error("Editor creation was cancelled");e.onController?.(m)}else{if(v=new G({...M(),...F(e),fileName:`code.${a}`,language:a,diffStyle:e.diffStyle??(e.renderSideBySide===!1?"unified":"split"),maxHeight:e.MAX_HEIGHT,wrap:e.wordWrap==="on",workerManager:e.workerManager}),t=v,await v.mount(s,l,u),f!==c||t!==v||h!==s)throw v.dispose(),new Error("Editor creation was cancelled");e.onController?.(v)}return o=oe(()=>d,()=>p,s,()=>m??v?.getFinalizedSurface()),o}async function X(s,l=a){const u=R(l);if(_(s)){n?.getInput().kind==="merge-conflict"?(a=u,await n.updateMergeConflict(y(s),e.lineAnnotations)):h&&await V(h,s,u);return}if(e.stream===!1){n?.getInput().kind==="file"?(a=u,await n.updateFile(y(s),e.lineAnnotations)):h&&await O(h,s,u);return}if(!i){h&&await H(h,s,u);return}if(i.getState()==="finalized"){s!==i.getText()&&await i.reset(s);return}if(u!==a){a=u,await i.setLanguage(u),s!==i.getText()&&await i.reset(s);return}const w=i.getText();s.startsWith(w)?i.append(s.slice(w.length)):await i.reset(s)}async function P(s,l,u=a){if(d=s,p=l,a=R(u),t){await t.update(s,l);return}if(!n){h&&await I(h,s,l,u);return}await n.updateDiff(y(s),y(l))}function k(){c++,i?.dispose(),t?.dispose(),t||n?.dispose(),i=void 0,t=void 0,n=void 0,r=void 0,o=void 0,h=void 0}async function O(s,l,u){k();const w=c;h=s,a=u;const f=x({kind:"file",file:y(l),annotations:e.lineAnnotations,workerManager:e.workerManager,options:{...M(),...F(e)}});if(n=f,await f.mount(s),w!==c||n!==f||h!==s)throw f.dispose(),new Error("Editor creation was cancelled");return e.onController?.(f),r=C(()=>B(f)??l,s,()=>f,m=>f.onDidRender(m)),r}async function V(s,l,u){k();const w=c;h=s,a=u;const f=x({kind:"merge-conflict",file:y(l),annotations:e.lineAnnotations,workerManager:e.workerManager,options:{...M(),...F(e)}});if(n=f,await f.mount(s),w!==c||n!==f||h!==s)throw f.dispose(),new Error("Editor creation was cancelled");return e.onController?.(f),r=C(()=>B(f)??l,s,()=>f,m=>f.onDidRender(m)),r}function _(s){return e.mergeConflict===!1?!1:/^<<<<<<< .+$/m.test(s)&&/^=======$/m.test(s)&&/^>>>>>>> .+$/m.test(s)}async function J(s){if(s){if(typeof s=="string"){const l=e.themes;if(l?.[0]===s){await W(),g="dark",i?.setThemeType("dark"),t?.setThemeType("dark"),n?.setThemeType("dark");return}if(l?.[1]===s){await W(),g="light",i?.setThemeType("light"),t?.setThemeType("light"),n?.setThemeType("light");return}}T=void 0,S=s,await j(s)}}async function W(){const s=q(e);!s||s===T||(T=s,S=U(e),await j(S))}async function j(s){await i?.setTheme(s),await t?.setTheme(s),await n?.setTheme(s)}function y(s){return E(`code.${a||"txt"}`,s,a)}return{runtimeKind:"stream-diffs",createEditor:H,createDiffEditor:I,updateCode:X,appendCode(s){i?.append(s)},async finalizeCode(){if(!i||i.getState()==="finalized")return i?.getFinalizedSurface();const s=F(e);return delete s.lineAnnotations,await i.finalize({view:"file",...s,theme:S,themeType:g,annotations:e.lineAnnotations,workerManager:e.workerManager}),i.getFinalizedSurface()},async finalizeDiff(){return t&&(n=await t.finalize(e.lineAnnotations)),n},updateDiff:P,updateOriginal(s,l=a){return P(s,p,l)},updateModified(s,l=a){return P(d,s,l)},appendOriginal(s,l=a){return P(d+s,p,l)},appendModified(s,l=a){return P(d,p+s,l)},cleanupEditor:k,safeClean:k,setTheme:J,async setLanguage(s){if(a=R(s),await i?.setLanguage(a),await t?.setLanguage(a),n&&!t){const l=n.getInput();l.kind==="file"||l.kind==="merge-conflict"?await n.update({...l,file:{...l.file,lang:a}}):l.kind==="diff"&&"oldFile"in l&&await n.update({...l,oldFile:{...l.oldFile,lang:a},newFile:{...l.newFile,lang:a}})}},getCurrentTheme:()=>S,getEditor:()=>le,getEditorView:()=>r??null,getDiffEditorView:()=>o??null,getDiffModels:()=>({original:D(()=>d),modified:D(()=>n?.getResolvedFile()?.contents??t?.getModified()??p)}),getCode:()=>{const s=n?.getInput();return s?.kind==="diff"||s?.kind==="patch"?{original:d,modified:n?.getResolvedFile()?.contents??p}:s?.kind==="file"||s?.kind==="merge-conflict"?s.file.contents:t?{original:t.getOriginal(),modified:t.getModified()}:i?.getText()??null},refreshDiffPresentation:()=>n?.update(n.getInput()),whenVisualReady:async()=>{const s=h,l=c,u=n??i?.getFinalizedSurface()??t?.getFinalizedSurface();return!u||!await u.whenVisualReady()?!1:ne(s,()=>l===c&&s===h&&u===(n??i?.getFinalizedSurface()??t?.getFinalizedSurface()),()=>se(n??i?.getFinalizedSurface()??t?.getFinalizedSurface()))}}}async function ne(e,i,t){if(!e||typeof window>"u")return!1;let n="",r,o=0;for(let a=0;a<120;a+=1){if(!i())return!1;const d=e.querySelector(".stream-diffs-shell"),p=d?.querySelector("diffs-container")?.shadowRoot?.querySelector("pre"),h=d?.getBoundingClientRect(),c=p?.textContent??"";if(h&&h.width>0&&h.height>0&&p&&t()){const g=`${Math.round(h.width)}:${Math.round(h.height)}:${p.scrollWidth}:${p.scrollHeight}:${c.length}`;if(o=p===r&&g===n?o+1:1,r=p,n=g,o>=2)return!0}else n="",r=void 0,o=0;await ae()}return!1}function se(e){if(!e)return!0;const i=e.getNativeInstance(),t=i?.fileRenderer??i?.hunksRenderer;if(!t)return!0;const n=t.renderCache;if(!n?.result)return!1;if(n.highlighted===!0)return!0;const r=e.getInput();if(R(r.kind==="file"||r.kind==="merge-conflict"?r.file.lang:"oldFile"in r?r.oldFile.lang??r.newFile.lang:e.getDiff()?.lang)==="text")return!0;const o=Number(t.getTokenizeMaxLength?.()??1e5);if(r.kind==="file"||r.kind==="merge-conflict")return re(r.file.contents)>o;const a=e.getDiff();return!!a&&Math.max(a.additionLines.length,a.deletionLines.length)>o}function R(e){return!e||/^(?:text|txt|plain|plaintext)$/i.test(e)?"text":e}function re(e){if(!e)return 0;let i=1;for(let t=0;t{let i=!1;const t=()=>{i||(i=!0,window.clearTimeout(r),window.cancelAnimationFrame(n),e())},n=window.requestAnimationFrame(t),r=window.setTimeout(t,50)})}function U(e){return e.themes?.length&&typeof e.themes[0]=="string"&&typeof e.themes[1]=="string"?{dark:e.themes[0],light:e.themes[1]}:e.theme??void 0}function q(e){if(!(typeof e.themes?.[0]!="string"||typeof e.themes?.[1]!="string"))return`${e.themes[0]} diff --git a/apps/pythinker-code/dist-web/assets/index-CKVuDqnW.js b/apps/pythinker-code/dist-web/assets/index-CXJs_0Yn.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/index-CKVuDqnW.js rename to apps/pythinker-code/dist-web/assets/index-CXJs_0Yn.js index 80b5bafe5..835d62466 100644 --- a/apps/pythinker-code/dist-web/assets/index-CKVuDqnW.js +++ b/apps/pythinker-code/dist-web/assets/index-CXJs_0Yn.js @@ -1,4 +1,4 @@ -import{t as ee,b as Jn,n as Do,c as Po,a as _o,d as Fo,s as Oo,g as No,e as zo}from"./index-at2nKQ9b.js";import{f as Rc}from"./index-at2nKQ9b.js";import{bR as w}from"./index-D9Nz1t7z.js";const ur="diffs-container",Uo=(()=>{try{return!1}catch{return!1}})(),Vo=/(?=^From [a-f0-9]+ .+$)/m,fr=/(?=^diff --git)/gm,$h=/(?=^---\s+\S)/gm,Wh=/(?=^@@ )/gm,Bo=/^@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@(?: (.*))?/m,$o=/(?<=\n)/,Wo=/^(---|\+\+\+)\s+([^\t\r\n]+)/,Go=/^(---|\+\+\+)\s+[ab]\/([^\t\r\n]+)/,jo=/^diff --git (?:"a\/(.+?)"|a\/(.+?)) (?:"b\/(.+?)"|b\/(.+?))$/,qo=/^index ([0-9a-f]+)\.\.([0-9a-f]+)(?: (\d+))?$/i,Gh=/^<{7,}(?:\s.*)?$/,jh=/^\|{7,}(?:\s.*)?$/,qh=/^={7,}$/,Kh=/^>{7,}(?:\s.*)?$/,Hn="header-prefix",Mn="header-filename-suffix",Dn="header-metadata",Pn="header-custom",O={dark:"pierre-dark",light:"pierre-light"},pr="data-theme-css",gr="data-unsafe-css",Ko="data-core-css",Yo="data-diffs-scrollbar-measure",Xo="data-diffs-code-view-header",Qo="data-diffs-code-view-footer",mr="--diffs-scrollbar-gutter-measured",Yh=1,Zo=1e5,_n={hunkLineCount:50,lineHeight:20,diffHeaderHeight:44,spacing:8},et={..._n,hunkLineCount:1},Jo={paddingTop:8,paddingBottom:8,gap:8},es={omega:.015,positionEpsilon:.5,velocityEpsilon:.05},ts=Object.freeze({fromStart:0,fromEnd:0}),Xe={startingLine:0,totalLines:1/0,bufferBefore:0,bufferAfter:0},vr={startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:0},Oe=new Set;let we=null;function G(e){Oe.add(e),we??=requestAnimationFrame(Cr)}function ze(e){Oe.delete(e)&&Oe.size===0&&we!=null&&(cancelAnimationFrame(we),we=null)}function Xh(){Oe.clear(),we!=null&&typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(we),we=null}function Cr(e){const t=new Set(Oe);Oe.clear();for(const n of t)try{n(e)}catch(i){console.error(i)}Oe.size>0?we=requestAnimationFrame(Cr):we=null}function Qe(e,t,n){if(e===t||e==null||t==null)return e===t;const i=new Set(n),r=Object.keys(e),o=new Set(Object.keys(t));for(const s of r)if(o.delete(s),!i.has(s)&&(!(s in t)||e[s]!==t[s]))return!1;for(const s of Array.from(o))if(!i.has(s))return!1;return!0}function Je(e,t){return e==null||t==null||typeof e=="string"||typeof t=="string"?e===t:e.dark===t.dark&&e.light===t.light}function Fn(e,t){const n=e?.theme??O,i=t?.theme??O,r=ei(e),o=ei(t);return Je(n,i)&&Qe(e,t,["theme","parseDiffOptions"])&&Qe(r,o)}function ei(e){if(e!=null&&"parseDiffOptions"in e)return e.parseDiffOptions}function _t(e,t){return e?.start===t?.start&&e?.end===t?.end&&e?.side===t?.side&&e?.endSide===t?.endSide}function cn({scrollTop:e,scrollHeight:t,height:n,fitPerfectly:i=!1,fitPerfectlyOverscroll:r=0,overscrollSize:o}){const s=n+o*2,l=i?n+r*2:s;if(t=Math.max(t,l),s>=t||i){const d=Math.max(e-r,0),c=Math.min(e+l,t);return{top:d,bottom:Math.max(c,d)}}let a=e+n/2-s/2,h=a+s;return a<0&&(a=0),h>t&&(h=t),a=Math.floor(Math.max(a,0)),{top:a,bottom:Math.ceil(Math.max(Math.min(h,t),a))}}function Te(e){let t=e.length;return e.charCodeAt(t-1)===10&&(t--,e.charCodeAt(t-1)===13&&t--),e.slice(0,t)}const ns=new TextEncoder,is=new TextDecoder("utf-8",{ignoreBOM:!0}),rs=/[\uD800-\uDFFF]/,un=1024;let qe=new Uint8Array(un);function Sr(){qe.length!==un&&(qe=new Uint8Array(un))}function B(e){if(e.length===0)return e;if(rs.test(e))return JSON.parse(JSON.stringify(e));const t=e.length*3;qe.length0&&r.deletions>0||o.type!=="context")continue;const s=r.additions>0,l=s?t.additionLines:t.deletionLines,a=s?r.additionLineIndex:r.deletionLineIndex,h=s?r.additions:r.deletions,d=l[a]??"";if(d.trim()!=="")continue;let c=!0;for(let C=1;Cos)return null;const a=[];for(let g=0;gn;let c=0,u=-1;for(let g=0;g<=l;g++){let C=0;for(let m=0;mu&&(u=C,c=g)}if(c===0)return null;const f=[],p=(g,C,m,v)=>{(g>0||C>0)&&f.push({type:"change",deletions:g,additions:C,deletionLineIndex:m,additionLineIndex:v})};return d?(p(0,c,r,o),p(s,s,r,o+c),p(0,i-s-c,r+s,o+c+s)):(p(c,0,r,o),p(s,s,r+c,o),p(n-s-c,0,r+c+s,o+s)),f}const hs=/\s+/g;function ti(e){return e.replace(hs,"")}function cs(e,t){if(e===t)return 1;const n=Math.max(e.length,t.length),i=Math.min(e.length,t.length);if(i===0)return 0;let r=0;for(;r0&&(f[f.length-1]===` +import{t as ee,b as Jn,n as Do,c as Po,a as _o,d as Fo,s as Oo,g as No,e as zo}from"./index-CzEepPxd.js";import{f as Rc}from"./index-CzEepPxd.js";import{bR as w}from"./index-XmhyfFRf.js";const ur="diffs-container",Uo=(()=>{try{return!1}catch{return!1}})(),Vo=/(?=^From [a-f0-9]+ .+$)/m,fr=/(?=^diff --git)/gm,$h=/(?=^---\s+\S)/gm,Wh=/(?=^@@ )/gm,Bo=/^@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@(?: (.*))?/m,$o=/(?<=\n)/,Wo=/^(---|\+\+\+)\s+([^\t\r\n]+)/,Go=/^(---|\+\+\+)\s+[ab]\/([^\t\r\n]+)/,jo=/^diff --git (?:"a\/(.+?)"|a\/(.+?)) (?:"b\/(.+?)"|b\/(.+?))$/,qo=/^index ([0-9a-f]+)\.\.([0-9a-f]+)(?: (\d+))?$/i,Gh=/^<{7,}(?:\s.*)?$/,jh=/^\|{7,}(?:\s.*)?$/,qh=/^={7,}$/,Kh=/^>{7,}(?:\s.*)?$/,Hn="header-prefix",Mn="header-filename-suffix",Dn="header-metadata",Pn="header-custom",O={dark:"pierre-dark",light:"pierre-light"},pr="data-theme-css",gr="data-unsafe-css",Ko="data-core-css",Yo="data-diffs-scrollbar-measure",Xo="data-diffs-code-view-header",Qo="data-diffs-code-view-footer",mr="--diffs-scrollbar-gutter-measured",Yh=1,Zo=1e5,_n={hunkLineCount:50,lineHeight:20,diffHeaderHeight:44,spacing:8},et={..._n,hunkLineCount:1},Jo={paddingTop:8,paddingBottom:8,gap:8},es={omega:.015,positionEpsilon:.5,velocityEpsilon:.05},ts=Object.freeze({fromStart:0,fromEnd:0}),Xe={startingLine:0,totalLines:1/0,bufferBefore:0,bufferAfter:0},vr={startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:0},Oe=new Set;let we=null;function G(e){Oe.add(e),we??=requestAnimationFrame(Cr)}function ze(e){Oe.delete(e)&&Oe.size===0&&we!=null&&(cancelAnimationFrame(we),we=null)}function Xh(){Oe.clear(),we!=null&&typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(we),we=null}function Cr(e){const t=new Set(Oe);Oe.clear();for(const n of t)try{n(e)}catch(i){console.error(i)}Oe.size>0?we=requestAnimationFrame(Cr):we=null}function Qe(e,t,n){if(e===t||e==null||t==null)return e===t;const i=new Set(n),r=Object.keys(e),o=new Set(Object.keys(t));for(const s of r)if(o.delete(s),!i.has(s)&&(!(s in t)||e[s]!==t[s]))return!1;for(const s of Array.from(o))if(!i.has(s))return!1;return!0}function Je(e,t){return e==null||t==null||typeof e=="string"||typeof t=="string"?e===t:e.dark===t.dark&&e.light===t.light}function Fn(e,t){const n=e?.theme??O,i=t?.theme??O,r=ei(e),o=ei(t);return Je(n,i)&&Qe(e,t,["theme","parseDiffOptions"])&&Qe(r,o)}function ei(e){if(e!=null&&"parseDiffOptions"in e)return e.parseDiffOptions}function _t(e,t){return e?.start===t?.start&&e?.end===t?.end&&e?.side===t?.side&&e?.endSide===t?.endSide}function cn({scrollTop:e,scrollHeight:t,height:n,fitPerfectly:i=!1,fitPerfectlyOverscroll:r=0,overscrollSize:o}){const s=n+o*2,l=i?n+r*2:s;if(t=Math.max(t,l),s>=t||i){const d=Math.max(e-r,0),c=Math.min(e+l,t);return{top:d,bottom:Math.max(c,d)}}let a=e+n/2-s/2,h=a+s;return a<0&&(a=0),h>t&&(h=t),a=Math.floor(Math.max(a,0)),{top:a,bottom:Math.ceil(Math.max(Math.min(h,t),a))}}function Te(e){let t=e.length;return e.charCodeAt(t-1)===10&&(t--,e.charCodeAt(t-1)===13&&t--),e.slice(0,t)}const ns=new TextEncoder,is=new TextDecoder("utf-8",{ignoreBOM:!0}),rs=/[\uD800-\uDFFF]/,un=1024;let qe=new Uint8Array(un);function Sr(){qe.length!==un&&(qe=new Uint8Array(un))}function B(e){if(e.length===0)return e;if(rs.test(e))return JSON.parse(JSON.stringify(e));const t=e.length*3;qe.length0&&r.deletions>0||o.type!=="context")continue;const s=r.additions>0,l=s?t.additionLines:t.deletionLines,a=s?r.additionLineIndex:r.deletionLineIndex,h=s?r.additions:r.deletions,d=l[a]??"";if(d.trim()!=="")continue;let c=!0;for(let C=1;Cos)return null;const a=[];for(let g=0;gn;let c=0,u=-1;for(let g=0;g<=l;g++){let C=0;for(let m=0;mu&&(u=C,c=g)}if(c===0)return null;const f=[],p=(g,C,m,v)=>{(g>0||C>0)&&f.push({type:"change",deletions:g,additions:C,deletionLineIndex:m,additionLineIndex:v})};return d?(p(0,c,r,o),p(s,s,r,o+c),p(0,i-s-c,r+s,o+c+s)):(p(c,0,r,o),p(s,s,r+c,o),p(n-s-c,0,r+c+s,o+s)),f}const hs=/\s+/g;function ti(e){return e.replace(hs,"")}function cs(e,t){if(e===t)return 1;const n=Math.max(e.length,t.length),i=Math.min(e.length,t.length);if(i===0)return 0;let r=0;for(;r0&&(f[f.length-1]===` `||f[f.length-1]==="\r"||f[f.length-1]===`\r `||f[f.length-1]==="");)f.pop();const{additionStart:y,deletionStart:S}=g;d=h?d:S-1,c=h?c:y-1;const L={collapsedBefore:0,splitLineCount:0,splitLineStart:0,unifiedLineCount:0,unifiedLineStart:0,additionCount:g.additionCount,additionStart:y,additionLines:C,deletionCount:g.deletionCount,deletionStart:S,deletionLines:m,deletionLineIndex:d,additionLineIndex:c,hunkContent:[],hunkContext:oi(g.hunkContext),hunkSpecs:B(p),noEOFCRAdditions:!1,noEOFCRDeletions:!1};let x=0,E=0;for(let k=1;k=L.additionCount&&E>=L.deletionCount&&!R.startsWith("\\")){if(o&&bs(R)&&!ys(R))throw Error("parsePatchContent: hunk has more lines than expected");break}const F=R[0];if(F!=="+"&&F!=="-"&&F!==" "&&F!=="\\"){if(o)throw Error("parsePatchContent: invalid hunk line");console.error(`parseLineType: Invalid firstChar: "${F}", full line: "${R}"`),console.error("processFile: invalid rawLine:",R);continue}const T=ks(F);if(T==="addition"){if(o&&x>=L.additionCount)throw Error("parsePatchContent: hunk has too many addition lines");const I=Kt(R);(v==null||v.type!=="change")&&(v=Yt("change",d,c),L.hunkContent.push(v)),c++,x++,h&&a.additionLines.push(I),v.additions++,C++,b="addition"}else if(T==="deletion"){if(o&&E>=L.deletionCount)throw Error("parsePatchContent: hunk has too many deletion lines");const I=Kt(R);(v==null||v.type!=="change")&&(v=Yt("change",d,c),L.hunkContent.push(v)),d++,E++,h&&a.deletionLines.push(I),v.deletions++,m++,b="deletion"}else if(T==="context"){if(o&&(E>=L.deletionCount||x>=L.additionCount))throw Error("parsePatchContent: hunk has too many context lines");const I=Kt(R);(v==null||v.type!=="context")&&(v=Yt("context",d,c),L.hunkContent.push(v)),c++,d++,x++,E++,h&&(a.deletionLines.push(I),a.additionLines.push(I)),v.lines++,b="context"}else if(T==="metadata"&&v!=null){if(v.type==="context"?(L.noEOFCRAdditions=!0,L.noEOFCRDeletions=!0):b==="deletion"?L.noEOFCRDeletions=!0:b==="addition"&&(L.noEOFCRAdditions=!0),h&&(b==="addition"||b==="context")){const I=a.additionLines.length-1;I>=0&&(a.additionLines[I]=Te(a.additionLines[I]))}if(h&&(b==="deletion"||b==="context")){const I=a.deletionLines.length-1;I>=0&&(a.deletionLines[I]=Te(a.deletionLines[I]))}}}if(o&&(x!==L.additionCount||E!==L.deletionCount))throw Error("parsePatchContent: hunk line count mismatch");L.additionLines=C,L.deletionLines=m,L.collapsedBefore=Math.max(oe(L.additionStart,L.additionCount)-s,0),a.hunks.push(L),s=W(L.additionStart,L.additionCount);for(const k of L.hunkContent)k.type==="context"?(L.splitLineCount+=k.lines,L.unifiedLineCount+=k.lines):(L.splitLineCount+=Math.max(k.additions,k.deletions),L.unifiedLineCount+=k.deletions+k.additions);L.splitLineStart=a.splitLineCount+L.collapsedBefore,L.unifiedLineStart=a.unifiedLineCount+L.collapsedBefore,a.splitLineCount+=L.collapsedBefore+L.splitLineCount,a.unifiedLineCount+=L.collapsedBefore+L.unifiedLineCount}if(a!=null){if(o&&h&&!n&&a.hunks.length===0)throw Error("parsePatchContent: unified file has no hunks");if(a.hunks.length>0&&!h&&a.additionLines.length>0&&a.deletionLines.length>0){const u=a.hunks[a.hunks.length-1],f=W(u.additionStart,u.additionCount),p=a.additionLines.length,g=Math.max(p-f,0);a.splitLineCount+=g,a.unifiedLineCount+=g}return n||(a.prevName!=null&&a.name!==a.prevName?a.hunks.length>0?a.type="rename-changed":a.type="rename-pure":(i==null||i.contents==="")&&r!=null&&r.contents!==""?a.type="new":i!=null&&i.contents!==""&&(r==null||r.contents==="")&&(a.type="deleted")),a.type!=="rename-pure"&&a.type!=="rename-changed"&&(a.prevName=void 0),as(a),a}}function gs(e,t,n=!1){const i=[],r=ms(e)?e.split(Vo):[e];for(const o of r)try{i.push(us(o,t!=null?`${t}-${i.length}`:void 0,n))}catch(s){if(n)throw s;console.error(s)}return i}function ms(e){return e.startsWith("From ")||e.includes(` From `)}function ni(e){const t=yr(e);for(let n=0;ni.map(i=>d[i]); -import{bR as c}from"./index-D9Nz1t7z.js";var Dt=Object.defineProperty,Hi=Object.getOwnPropertyDescriptor,Wi=Object.getOwnPropertyNames,zi=Object.prototype.hasOwnProperty,qi=(e,t)=>{let n={};for(var r in e)Dt(n,r,{get:e[r],enumerable:!0});return Dt(n,Symbol.toStringTag,{value:"Module"}),n},Xi=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(var i=Wi(t),o=0,s=i.length,a;ot[l]).bind(null,a),enumerable:!(r=Hi(t,a))||r.enumerable});return e},Ki=(e,t,n)=>(Xi(e,t,"default"),n);const Yt=[{id:"abap",name:"ABAP",import:(()=>c(()=>import("./abap-BdImnpbu.js"),[]))},{id:"actionscript-3",name:"ActionScript",aliases:["actionscript","as3"],import:(()=>c(()=>import("./actionscript-3-B3316cI-.js"),[]))},{id:"ada",name:"Ada",import:(()=>c(()=>import("./ada-bCR0ucgS.js"),[]))},{id:"ahk",name:"AutoHotkey",aliases:["ahk1"],import:(()=>c(()=>import("./ahk-CsyLZFj1.js"),[]))},{id:"ahk2",name:"AutoHotkey2",import:(()=>c(()=>import("./ahk2-8Zs4aa1G.js"),[]))},{id:"angular-html",name:"Angular HTML",import:(()=>c(()=>import("./angular-html-DA-rfuFy.js").then(e=>e.f),__vite__mapDeps([0,1,2,3])))},{id:"angular-ts",name:"Angular TypeScript",import:(()=>c(()=>import("./angular-ts-BrjP3tb8.js"),__vite__mapDeps([4,0,1,2,3,5])))},{id:"apache",name:"Apache Conf",import:(()=>c(()=>import("./apache-Pmp26Uib.js"),[]))},{id:"apex",name:"Apex",import:(()=>c(()=>import("./apex-DhZFqWV2.js"),[]))},{id:"apl",name:"APL",import:(()=>c(()=>import("./apl-CORt7UWP.js"),__vite__mapDeps([6,1,2,3,7,8,9])))},{id:"applescript",name:"AppleScript",import:(()=>c(()=>import("./applescript-Co6uUVPk.js"),[]))},{id:"ara",name:"Ara",import:(()=>c(()=>import("./ara-BRHolxvo.js"),[]))},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:(()=>c(()=>import("./asciidoc-CSVQ5wI8.js"),[]))},{id:"asm",name:"Assembly",import:(()=>c(()=>import("./asm-D_Q5rh1f.js"),[]))},{id:"astro",name:"Astro",import:(()=>c(()=>import("./astro-HNnZUWAn.js"),__vite__mapDeps([10,9,2,11,3,12,13])))},{id:"awk",name:"AWK",import:(()=>c(()=>import("./awk-DMzUqQB5.js"),[]))},{id:"ballerina",name:"Ballerina",import:(()=>c(()=>import("./ballerina-BFfxhgS-.js"),[]))},{id:"bat",name:"Batch File",aliases:["batch","cmd"],import:(()=>c(()=>import("./bat-CickPsom.js"),[]))},{id:"beancount",name:"Beancount",import:(()=>c(()=>import("./beancount-k_qm7-4y.js"),[]))},{id:"berry",name:"Berry",aliases:["be"],import:(()=>c(()=>import("./berry-uYugtg8r.js"),[]))},{id:"bibtex",name:"BibTeX",import:(()=>c(()=>import("./bibtex-CHM0blh-.js"),[]))},{id:"bicep",name:"Bicep",import:(()=>c(()=>import("./bicep-Bmn6On1c.js"),[]))},{id:"bird2",name:"BIRD2 Configuration",aliases:["bird"],import:(()=>c(()=>import("./bird2-Bx8U0n9b.js"),[]))},{id:"blade",name:"Blade",import:(()=>c(()=>import("./blade-2xfisSek.js"),__vite__mapDeps([14,15,1,2,3,7,8,16,9])))},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:(()=>c(()=>import("./bsl-DlhNcFeZ.js"),__vite__mapDeps([17,18])))},{id:"c",name:"C",import:(()=>c(()=>import("./c-BIGW1oBm.js"),[]))},{id:"c3",name:"C3",import:(()=>c(()=>import("./c3-Dp5svz6Z.js"),[]))},{id:"cadence",name:"Cadence",aliases:["cdc"],import:(()=>c(()=>import("./cadence-Bv_4Rxtq.js"),[]))},{id:"cairo",name:"Cairo",import:(()=>c(()=>import("./cairo-KRGpt6FW.js"),__vite__mapDeps([19,20])))},{id:"chapel",name:"Chapel",aliases:["chpl"],import:(()=>c(()=>import("./chapel-DTp_pixX.js"),__vite__mapDeps([21,22])))},{id:"clarity",name:"Clarity",import:(()=>c(()=>import("./clarity-Dn5IMItf.js"),[]))},{id:"clojure",name:"Clojure",aliases:["clj"],import:(()=>c(()=>import("./clojure-P80f7IUj.js"),[]))},{id:"cmake",name:"CMake",import:(()=>c(()=>import("./cmake-D1j8_8rp.js"),[]))},{id:"cobol",name:"COBOL",import:(()=>c(()=>import("./cobol-nBiQ_Alo.js"),__vite__mapDeps([23,1,2,3,8])))},{id:"codeowners",name:"CODEOWNERS",import:(()=>c(()=>import("./codeowners-Bp6g37R7.js"),[]))},{id:"codeql",name:"CodeQL",aliases:["ql"],import:(()=>c(()=>import("./codeql-DsOJ9woJ.js"),[]))},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:(()=>c(()=>import("./coffee-Ch7k5sss.js"),__vite__mapDeps([24,2])))},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:(()=>c(()=>import("./common-lisp-Cg-RD9OK.js"),[]))},{id:"coq",name:"Rocq",import:(()=>c(()=>import("./coq-C7JzOVbR.js"),[]))},{id:"cpp",name:"C++",aliases:["c++"],import:(()=>c(()=>import("./cpp-BMRokrvK.js"),__vite__mapDeps([25,26,27,22])))},{id:"crystal",name:"Crystal",import:(()=>c(()=>import("./crystal-DGywbUpC.js"),__vite__mapDeps([28,1,2,3,16,22,29])))},{id:"csharp",name:"C#",aliases:["c#","cs"],import:(()=>c(()=>import("./csharp-DSvCPggb.js"),[]))},{id:"css",name:"CSS",import:(()=>c(()=>import("./css-CLj8gQPS.js"),[]))},{id:"csv",name:"CSV",import:(()=>c(()=>import("./csv-fuZLfV_i.js"),[]))},{id:"cue",name:"CUE",import:(()=>c(()=>import("./cue-D82EKSYY.js"),[]))},{id:"cypher",name:"Cypher",aliases:["cql"],import:(()=>c(()=>import("./cypher-COkxafJQ.js"),[]))},{id:"d",name:"D",import:(()=>c(()=>import("./d-85-TOEBH.js"),[]))},{id:"dart",name:"Dart",import:(()=>c(()=>import("./dart-bE4Kk8sk.js"),[]))},{id:"dax",name:"DAX",import:(()=>c(()=>import("./dax-CEL-wOlO.js"),[]))},{id:"desktop",name:"Desktop",import:(()=>c(()=>import("./desktop-BmXAJ9_W.js"),[]))},{id:"diff",name:"Diff",import:(()=>c(()=>import("./diff-D97Zzqfu.js"),[]))},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:(()=>c(()=>import("./docker-BcOcwvcX.js"),[]))},{id:"dotenv",name:"dotEnv",import:(()=>c(()=>import("./dotenv-Da5cRb03.js"),[]))},{id:"dream-maker",name:"Dream Maker",import:(()=>c(()=>import("./dream-maker-BtqSS_iP.js"),[]))},{id:"edge",name:"Edge",import:(()=>c(()=>import("./edge-FbVlp4U3.js"),__vite__mapDeps([30,11,1,2,3,15])))},{id:"elixir",name:"Elixir",import:(()=>c(()=>import("./elixir-CkH2-t6x.js"),__vite__mapDeps([31,1,2,3])))},{id:"elm",name:"Elm",import:(()=>c(()=>import("./elm-DbKCFpqz.js"),__vite__mapDeps([32,27,22])))},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:(()=>c(()=>import("./emacs-lisp-C_m_b--Z.js"),[]))},{id:"erb",name:"ERB",import:(()=>c(()=>import("./erb-DXfck5VN.js"),__vite__mapDeps([33,1,2,3,34,35,7,8,16,36,11,37,13,25,26,27,22,29,38,39])))},{id:"erlang",name:"Erlang",aliases:["erl"],import:(()=>c(()=>import("./erlang-DsQrWhSR.js"),__vite__mapDeps([40,41])))},{id:"fennel",name:"Fennel",import:(()=>c(()=>import("./fennel-BYunw83y.js"),[]))},{id:"fish",name:"Fish",import:(()=>c(()=>import("./fish-BvzEVeQv.js"),[]))},{id:"fluent",name:"Fluent",aliases:["ftl"],import:(()=>c(()=>import("./fluent-C4IJs8-o.js"),[]))},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:(()=>c(()=>import("./fortran-fixed-form-CkoXwp7k.js"),__vite__mapDeps([42,43])))},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:(()=>c(()=>import("./fortran-free-form-BxgE0vQu.js"),[]))},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:(()=>c(()=>import("./fsharp-CXgrBDvD.js"),__vite__mapDeps([44,41])))},{id:"gdresource",name:"GDResource",aliases:["tscn","tres"],import:(()=>c(()=>import("./gdresource-TyuKm33G.js"),__vite__mapDeps([45,46,47])))},{id:"gdscript",name:"GDScript",aliases:["gd"],import:(()=>c(()=>import("./gdscript-DqcFQ5yU.js"),[]))},{id:"gdshader",name:"GDShader",import:(()=>c(()=>import("./gdshader-DkwncUOv.js"),[]))},{id:"genie",name:"Genie",import:(()=>c(()=>import("./genie-D0YGMca9.js"),[]))},{id:"gherkin",name:"Gherkin",import:(()=>c(()=>import("./gherkin-DyxjwDmM.js"),[]))},{id:"git-commit",name:"Git Commit Message",import:(()=>c(()=>import("./git-commit-F4YmCXRG.js"),__vite__mapDeps([48,49])))},{id:"git-rebase",name:"Git Rebase Message",import:(()=>c(()=>import("./git-rebase-r7XF79zn.js"),__vite__mapDeps([50,29])))},{id:"gleam",name:"Gleam",import:(()=>c(()=>import("./gleam-BspZqrRM.js"),[]))},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:(()=>c(()=>import("./glimmer-js-ByusRIyA.js"),__vite__mapDeps([51,2,11,3,1])))},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:(()=>c(()=>import("./glimmer-ts-BfAWNZQY.js"),__vite__mapDeps([52,11,3,2,1])))},{id:"glsl",name:"GLSL",import:(()=>c(()=>import("./glsl-DplSGwfg.js"),__vite__mapDeps([27,22])))},{id:"gn",name:"GN",import:(()=>c(()=>import("./gn-n2N0HUVH.js"),[]))},{id:"gnuplot",name:"Gnuplot",import:(()=>c(()=>import("./gnuplot-DdkO51Og.js"),[]))},{id:"go",name:"Go",import:(()=>c(()=>import("./go-C27-OAKa.js"),[]))},{id:"graphql",name:"GraphQL",aliases:["gql"],import:(()=>c(()=>import("./graphql-ChdNCCLP.js"),__vite__mapDeps([36,2,11,37,13])))},{id:"groovy",name:"Groovy",import:(()=>c(()=>import("./groovy-gcz8RCvz.js"),[]))},{id:"hack",name:"Hack",import:(()=>c(()=>import("./hack-BWmVpMyf.js"),__vite__mapDeps([53,1,2,3,16])))},{id:"haml",name:"Ruby Haml",import:(()=>c(()=>import("./haml-D5jkg6IW.js"),__vite__mapDeps([35,2,3])))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:(()=>c(()=>import("./handlebars-BpdQsYii.js"),__vite__mapDeps([54,1,2,3,39])))},{id:"haskell",name:"Haskell",aliases:["hs"],import:(()=>c(()=>import("./haskell-Df6bDoY_.js"),[]))},{id:"haxe",name:"Haxe",import:(()=>c(()=>import("./haxe-CfZj7gIn.js"),[]))},{id:"hcl",name:"HashiCorp HCL",import:(()=>c(()=>import("./hcl-BWvSN4gD.js"),[]))},{id:"hjson",name:"Hjson",import:(()=>c(()=>import("./hjson-D5-asLiD.js"),[]))},{id:"hlsl",name:"HLSL",import:(()=>c(()=>import("./hlsl-D3lLCCz7.js"),[]))},{id:"html",name:"HTML",import:(()=>c(()=>import("./html-pp8916En.js"),__vite__mapDeps([1,2,3])))},{id:"html-derivative",name:"HTML (Derivative)",import:(()=>c(()=>import("./html-derivative-DlHx6ybY.js"),__vite__mapDeps([15,1,2,3])))},{id:"http",name:"HTTP",import:(()=>c(()=>import("./http-jrhK8wxY.js"),__vite__mapDeps([55,29,9,7,8,36,2,11,37,13])))},{id:"hurl",name:"Hurl",import:(()=>c(()=>import("./hurl-irOxFIW8.js"),__vite__mapDeps([56,36,2,11,37,13,7,8,57])))},{id:"hxml",name:"HXML",import:(()=>c(()=>import("./hxml-2-FPmUDs.js"),__vite__mapDeps([58,59])))},{id:"hy",name:"Hy",import:(()=>c(()=>import("./hy-DFXneXwc.js"),[]))},{id:"imba",name:"Imba",import:(()=>c(()=>import("./imba-DGztddWO.js"),[]))},{id:"ini",name:"INI",aliases:["properties"],import:(()=>c(()=>import("./ini-BEwlwnbL.js"),[]))},{id:"java",name:"Java",import:(()=>c(()=>import("./java-CylS5w8V.js"),[]))},{id:"javascript",name:"JavaScript",aliases:["js","cjs","mjs"],import:(()=>c(()=>import("./javascript-wDzz0qaB.js"),[]))},{id:"jinja",name:"Jinja",import:(()=>c(()=>import("./jinja-f2NsQr07.js"),__vite__mapDeps([60,1,2,3])))},{id:"jison",name:"Jison",import:(()=>c(()=>import("./jison-wvAkD_A8.js"),__vite__mapDeps([61,2])))},{id:"json",name:"JSON",import:(()=>c(()=>import("./json-Cp-IABpG.js"),[]))},{id:"json5",name:"JSON5",import:(()=>c(()=>import("./json5-C9tS-k6U.js"),[]))},{id:"jsonc",name:"JSON with Comments",import:(()=>c(()=>import("./jsonc-Des-eS-w.js"),[]))},{id:"jsonl",name:"JSON Lines",import:(()=>c(()=>import("./jsonl-DcaNXYhu.js"),[]))},{id:"jsonnet",name:"Jsonnet",import:(()=>c(()=>import("./jsonnet-DFQXde-d.js"),[]))},{id:"jssm",name:"JSSM",aliases:["fsl"],import:(()=>c(()=>import("./jssm-C2t-YnRu.js"),[]))},{id:"jsx",name:"JSX",import:(()=>c(()=>import("./jsx-g9-lgVsj.js"),[]))},{id:"julia",name:"Julia",aliases:["jl"],import:(()=>c(()=>import("./julia-5Bft2YPA.js"),__vite__mapDeps([62,25,26,27,22,20,2,63,16])))},{id:"just",name:"Just",aliases:["justfile"],import:(()=>c(()=>import("./just-Cwhn7H3k.js"),__vite__mapDeps([64,29,2,11,65,1,3,7,8,16,20,34,35,36,37,13,25,26,27,22,38,39])))},{id:"kdl",name:"KDL",import:(()=>c(()=>import("./kdl-DV7GczEv.js"),[]))},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:(()=>c(()=>import("./kotlin-BdnUsdx6.js"),[]))},{id:"kusto",name:"Kusto",aliases:["kql"],import:(()=>c(()=>import("./kusto-wEQ09or8.js"),[]))},{id:"latex",name:"LaTeX",import:(()=>c(()=>import("./latex-D5pSuvFb.js"),__vite__mapDeps([66,67,63])))},{id:"lean",name:"Lean 4",aliases:["lean4"],import:(()=>c(()=>import("./lean-BZvkOJ9d.js"),[]))},{id:"less",name:"Less",import:(()=>c(()=>import("./less-B1dDrJ26.js"),[]))},{id:"liquid",name:"Liquid",import:(()=>c(()=>import("./liquid-C0sCDyMI.js"),__vite__mapDeps([68,1,2,3,9])))},{id:"llvm",name:"LLVM IR",import:(()=>c(()=>import("./llvm-BZoOZj88.js"),[]))},{id:"log",name:"Log file",import:(()=>c(()=>import("./log-2UxHyX5q.js"),[]))},{id:"logo",name:"Logo",import:(()=>c(()=>import("./logo-BtOb2qkB.js"),[]))},{id:"lua",name:"Lua",import:(()=>c(()=>import("./lua-BaeVxFsk.js"),__vite__mapDeps([38,22])))},{id:"luau",name:"Luau",import:(()=>c(()=>import("./luau-BnpPk5vE.js"),[]))},{id:"make",name:"Makefile",aliases:["makefile"],import:(()=>c(()=>import("./make-CHLpvVh8.js"),[]))},{id:"markdown",name:"Markdown",aliases:["md"],import:(()=>c(()=>import("./markdown-Cvjx9yec.js"),[]))},{id:"marko",name:"Marko",import:(()=>c(()=>import("./marko-DjSrsDqO.js"),__vite__mapDeps([69,3,70,5,11])))},{id:"matlab",name:"MATLAB",import:(()=>c(()=>import("./matlab-D7o27uSR.js"),[]))},{id:"mdc",name:"MDC",import:(()=>c(()=>import("./mdc-D1_yUvq7.js"),__vite__mapDeps([71,41,39,15,1,2,3])))},{id:"mdx",name:"MDX",import:(()=>c(()=>import("./mdx-Cmh6b_Ma.js"),[]))},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:(()=>c(()=>import("./mermaid-CQcHuHx7.js"),[]))},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:(()=>c(()=>import("./mipsasm-CKIfxQSi.js"),[]))},{id:"mojo",name:"Mojo",import:(()=>c(()=>import("./mojo-DJz3ZmWd.js"),[]))},{id:"moonbit",name:"MoonBit",aliases:["mbt","mbti"],import:(()=>c(()=>import("./moonbit-CHtswR0a.js"),[]))},{id:"move",name:"Move",import:(()=>c(()=>import("./move-el3G9tDJ.js"),[]))},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:(()=>c(()=>import("./narrat-DRg8JJMk.js"),[]))},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:(()=>c(()=>import("./nextflow-C-mBbutL.js"),__vite__mapDeps([72,73])))},{id:"nextflow-groovy",name:"Nextflow Groovy",import:(()=>c(()=>import("./nextflow-groovy-vE_lwT2v.js"),[]))},{id:"nginx",name:"Nginx",import:(()=>c(()=>import("./nginx-BpAMiNFr.js"),__vite__mapDeps([74,38,22])))},{id:"nim",name:"Nim",import:(()=>c(()=>import("./nim-BIad80T-.js"),__vite__mapDeps([75,22,1,2,3,7,8,27,41])))},{id:"nix",name:"Nix",import:(()=>c(()=>import("./nix-CwoSXNpI.js"),[]))},{id:"nsis",name:"NSIS",import:(()=>c(()=>import("./nsis-BlV79W_Q.js"),[]))},{id:"nushell",name:"nushell",aliases:["nu"],import:(()=>c(()=>import("./nushell-D3jzshHO.js"),[]))},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:(()=>c(()=>import("./objective-c-DXmwc3jG.js"),[]))},{id:"objective-cpp",name:"Objective-C++",import:(()=>c(()=>import("./objective-cpp-CLxacb5B.js"),[]))},{id:"ocaml",name:"OCaml",import:(()=>c(()=>import("./ocaml-C0hk2d4L.js"),[]))},{id:"odin",name:"Odin",import:(()=>c(()=>import("./odin-BBf5iR-q.js"),[]))},{id:"openscad",name:"OpenSCAD",aliases:["scad"],import:(()=>c(()=>import("./openscad-C4EeE6gA.js"),[]))},{id:"org",name:"Org Markup",import:(()=>c(()=>import("./org-DM6o9KBp.js"),__vite__mapDeps([76,2,11,13,8,20,26,3,38,22,77,78,65,1,7,16,63,34,35,36,37,25,27,29,39,79,9,80,81,24,82,49,83,84,85,70,5,86,87,88,89,90,75,41,31,40,91,92,93,48,50,66,67])))},{id:"pascal",name:"Pascal",import:(()=>c(()=>import("./pascal-D93ZcfNL.js"),[]))},{id:"perl",name:"Perl",import:(()=>c(()=>import("./perl-B9cMNwum.js"),__vite__mapDeps([65,1,2,3,7,8,16])))},{id:"php",name:"PHP",import:(()=>c(()=>import("./php-Csjmro_R.js"),__vite__mapDeps([79,1,2,3,7,8,16,9])))},{id:"pkl",name:"Pkl",import:(()=>c(()=>import("./pkl-u5AG7uiY.js"),[]))},{id:"plsql",name:"PL/SQL",import:(()=>c(()=>import("./plsql-ChMvpjG-.js"),[]))},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:(()=>c(()=>import("./po-BTJTHyun.js"),[]))},{id:"polar",name:"Polar",import:(()=>c(()=>import("./polar-C0HS_06l.js"),[]))},{id:"postcss",name:"PostCSS",import:(()=>c(()=>import("./postcss-CXtECtnM.js"),[]))},{id:"powerquery",name:"PowerQuery",import:(()=>c(()=>import("./powerquery-CEu0bR-o.js"),[]))},{id:"powershell",name:"PowerShell",aliases:["ps","ps1","pwsh"],import:(()=>c(()=>import("./powershell-BmBUJMz7.js"),[]))},{id:"prisma",name:"Prisma",import:(()=>c(()=>import("./prisma-Vru482bI.js"),[]))},{id:"prolog",name:"Prolog",import:(()=>c(()=>import("./prolog-CbFg5uaA.js"),[]))},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:(()=>c(()=>import("./proto-C7zT0LnQ.js"),[]))},{id:"pug",name:"Pug",aliases:["jade"],import:(()=>c(()=>import("./pug-DKIMFp6K.js"),__vite__mapDeps([94,2,3,1])))},{id:"puppet",name:"Puppet",import:(()=>c(()=>import("./puppet-BMWR74SV.js"),[]))},{id:"purescript",name:"PureScript",import:(()=>c(()=>import("./purescript-CklMAg4u.js"),[]))},{id:"python",name:"Python",aliases:["py"],import:(()=>c(()=>import("./python-B6aJPvgy.js"),[]))},{id:"qml",name:"QML",import:(()=>c(()=>import("./qml-3beO22l8.js"),__vite__mapDeps([95,2])))},{id:"qmldir",name:"QML Directory",import:(()=>c(()=>import("./qmldir-C8lEn-DE.js"),[]))},{id:"qss",name:"Qt Style Sheets",import:(()=>c(()=>import("./qss-IeuSbFQv.js"),[]))},{id:"r",name:"R",import:(()=>c(()=>import("./r-Cf5RLm7j.js"),[]))},{id:"racket",name:"Racket",import:(()=>c(()=>import("./racket-BqYA7rlc.js"),[]))},{id:"raku",name:"Raku",aliases:["perl6"],import:(()=>c(()=>import("./raku-DXvB9xmW.js"),[]))},{id:"razor",name:"ASP.NET Razor",import:(()=>c(()=>import("./razor-BjBPvh-w.js"),__vite__mapDeps([96,1,2,3,89])))},{id:"rbs",name:"RBS",aliases:["ruby-signature"],import:(()=>c(()=>import("./rbs-CpoqiR4B.js"),[]))},{id:"reg",name:"Windows Registry Script",import:(()=>c(()=>import("./reg-C-SQnVFl.js"),[]))},{id:"regexp",name:"RegExp",aliases:["regex"],import:(()=>c(()=>import("./regexp-CDVJQ6XC.js"),[]))},{id:"rel",name:"Rel",import:(()=>c(()=>import("./rel-C3B-1QV4.js"),[]))},{id:"riscv",name:"RISC-V",import:(()=>c(()=>import("./riscv-BM1_JUlF.js"),[]))},{id:"ron",name:"RON",import:(()=>c(()=>import("./ron-D8l8udqQ.js"),[]))},{id:"rosmsg",name:"ROS Interface",import:(()=>c(()=>import("./rosmsg-BJDFO7_C.js"),[]))},{id:"rst",name:"reStructuredText",import:(()=>c(()=>import("./rst-bs7f0vWN.js"),__vite__mapDeps([97,15,1,2,3,25,26,27,22,20,29,39,98,34,35,7,8,16,36,11,37,13,38])))},{id:"ruby",name:"Ruby",aliases:["rb"],import:(()=>c(()=>import("./ruby-C0TQ7zu5.js"),__vite__mapDeps([34,1,2,3,35,7,8,16,36,11,37,13,25,26,27,22,29,38,39])))},{id:"rust",name:"Rust",aliases:["rs"],import:(()=>c(()=>import("./rust-B1yitclQ.js"),[]))},{id:"sas",name:"SAS",import:(()=>c(()=>import("./sas-DEy46yEz.js"),__vite__mapDeps([99,16])))},{id:"sass",name:"Sass",import:(()=>c(()=>import("./sass-Cj5Yp3dK.js"),[]))},{id:"scala",name:"Scala",import:(()=>c(()=>import("./scala-CqE71os6.js"),[]))},{id:"scheme",name:"Scheme",import:(()=>c(()=>import("./scheme-C98Dy4si.js"),[]))},{id:"scss",name:"SCSS",import:(()=>c(()=>import("./scss-D5BDwBP9.js"),__vite__mapDeps([5,3])))},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:(()=>c(()=>import("./sdbl-DVxCFoDh.js"),[]))},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:(()=>c(()=>import("./shaderlab-Dg9Lc6iA.js"),__vite__mapDeps([100,101])))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:(()=>c(()=>import("./shellscript-Yzrsuije.js"),[]))},{id:"shellsession",name:"Shell Session",aliases:["console"],import:(()=>c(()=>import("./shellsession-BADoaaVG.js"),__vite__mapDeps([102,29])))},{id:"smalltalk",name:"GNU Smalltalk",import:(()=>c(()=>import("./smalltalk-BOQMe2GC.js"),[]))},{id:"smithy",name:"Smithy",import:(()=>c(()=>import("./smithy-cds9vsN8.js"),[]))},{id:"solidity",name:"Solidity",import:(()=>c(()=>import("./solidity-DijEV5ha.js"),[]))},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:(()=>c(()=>import("./soy-8wufbnw4.js"),__vite__mapDeps([103,1,2,3])))},{id:"sparql",name:"SPARQL",import:(()=>c(()=>import("./sparql-rVzFXLq3.js"),__vite__mapDeps([104,105])))},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:(()=>c(()=>import("./splunk-BtCnVYZw.js"),[]))},{id:"sql",name:"SQL",import:(()=>c(()=>import("./sql-CRqJ_cUM.js"),[]))},{id:"ssh-config",name:"SSH Config",import:(()=>c(()=>import("./ssh-config-_ykCGR6B.js"),[]))},{id:"stata",name:"Stata",import:(()=>c(()=>import("./stata-DI20mbqo.js"),__vite__mapDeps([106,16])))},{id:"stylus",name:"Stylus",aliases:["styl"],import:(()=>c(()=>import("./stylus-BEDo0Tqx.js"),[]))},{id:"surrealql",name:"SurrealQL",aliases:["surql"],import:(()=>c(()=>import("./surrealql-Cjom0U5J.js"),__vite__mapDeps([107,2])))},{id:"svelte",name:"Svelte",import:(()=>c(()=>import("./svelte-Cy7k_4gC.js"),__vite__mapDeps([108,2,11,3,12])))},{id:"swift",name:"Swift",import:(()=>c(()=>import("./swift-C2oV4EkX.js"),[]))},{id:"system-verilog",name:"SystemVerilog",import:(()=>c(()=>import("./system-verilog-0hqHdDBg.js"),[]))},{id:"systemd",name:"Systemd Units",import:(()=>c(()=>import("./systemd-4A_iFExJ.js"),[]))},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:(()=>c(()=>import("./talonscript-CkByrt1z.js"),[]))},{id:"tasl",name:"Tasl",import:(()=>c(()=>import("./tasl-QIJgUcNo.js"),[]))},{id:"tcl",name:"Tcl",import:(()=>c(()=>import("./tcl-dwOrl1Do.js"),[]))},{id:"templ",name:"Templ",import:(()=>c(()=>import("./templ-DhtptRzy.js"),__vite__mapDeps([109,84,2,3])))},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:(()=>c(()=>import("./terraform-BETggiCN.js"),[]))},{id:"tex",name:"TeX",import:(()=>c(()=>import("./tex-D96PA37w.js"),__vite__mapDeps([67,63])))},{id:"toml",name:"TOML",import:(()=>c(()=>import("./toml-vGWfd6FD.js"),[]))},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:(()=>c(()=>import("./ts-tags-D351s5mN.js"),__vite__mapDeps([110,11,3,2,27,22,1,16,7,8])))},{id:"tsv",name:"TSV",import:(()=>c(()=>import("./tsv-B_m7g4N7.js"),[]))},{id:"tsx",name:"TSX",import:(()=>c(()=>import("./tsx-COt5Ahok.js"),[]))},{id:"turtle",name:"Turtle",import:(()=>c(()=>import("./turtle-BsS91CYL.js"),[]))},{id:"twig",name:"Twig",import:(()=>c(()=>import("./twig-27uCiNez.js"),__vite__mapDeps([111,3,2,5,79,1,7,8,16,9,20,34,35,36,11,37,13,25,26,27,22,29,38,39])))},{id:"typescript",name:"TypeScript",aliases:["ts","cts","mts"],import:(()=>c(()=>import("./typescript-BPQ3VLAy.js"),[]))},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:(()=>c(()=>import("./typespec-CAFt9gP4.js"),[]))},{id:"typst",name:"Typst",aliases:["typ"],import:(()=>c(()=>import("./typst-BUadGCkm.js"),__vite__mapDeps([112,113,114,22,81,24,2,25,26,27,3,89,90,49,83,31,1,40,41,44,48,50,29,84,85,54,39,77,8,115,9,62,20,63,16,66,67,70,116,38,78,82,65,7,86,79,117,94,34,35,36,11,37,13,5,118,93,87,88,111,119,120,80])))},{id:"v",name:"V",import:(()=>c(()=>import("./v-BGw2Nkan.js"),[]))},{id:"vala",name:"Vala",import:(()=>c(()=>import("./vala-CsfeWuGM.js"),[]))},{id:"vb",name:"Visual Basic",import:(()=>c(()=>import("./vb-Cu-pLBUe.js"),[]))},{id:"verilog",name:"Verilog",import:(()=>c(()=>import("./verilog-nZwndyjY.js"),[]))},{id:"vhdl",name:"VHDL",import:(()=>c(()=>import("./vhdl-CeAyd5Ju.js"),[]))},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:(()=>c(()=>import("./viml-CJc9bBzg.js"),[]))},{id:"vue",name:"Vue",import:(()=>c(()=>import("./vue-BqiEGhQt.js"),__vite__mapDeps([121,3,2,11,9,1,15])))},{id:"vue-html",name:"Vue HTML",import:(()=>c(()=>import("./vue-html-AaS7Mt5G.js"),__vite__mapDeps([122,2])))},{id:"vue-vine",name:"Vue Vine",import:(()=>c(()=>import("./vue-vine-BoDAl6tE.js"),__vite__mapDeps([123,3,5,70,124,12,2])))},{id:"vyper",name:"Vyper",aliases:["vy"],import:(()=>c(()=>import("./vyper-CDx5xZoG.js"),[]))},{id:"wasm",name:"WebAssembly",import:(()=>c(()=>import("./wasm-MzD3tlZU.js"),[]))},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:(()=>c(()=>import("./wenyan-BV7otONQ.js"),[]))},{id:"wgsl",name:"WGSL",import:(()=>c(()=>import("./wgsl-Dx-B1_4e.js"),[]))},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:(()=>c(()=>import("./wikitext-BhOHFoWU.js"),[]))},{id:"wit",name:"WebAssembly Interface Types",import:(()=>c(()=>import("./wit-5i3qLPDT.js"),[]))},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:(()=>c(()=>import("./wolfram-lXgVvXCa.js"),[]))},{id:"xml",name:"XML",import:(()=>c(()=>import("./xml-sdJ4AIDG.js"),__vite__mapDeps([7,8])))},{id:"xsl",name:"XSL",import:(()=>c(()=>import("./xsl-CtQFsRM5.js"),__vite__mapDeps([93,7,8])))},{id:"yaml",name:"YAML",aliases:["yml"],import:(()=>c(()=>import("./yaml-Buea-lGh.js"),[]))},{id:"zenscript",name:"ZenScript",import:(()=>c(()=>import("./zenscript-DVFEvuxE.js"),[]))},{id:"zig",name:"Zig",import:(()=>c(()=>import("./zig-VOosw3JB.js"),[]))}],cr=Object.fromEntries(Yt.map(e=>[e.id,e.import])),dr=Object.fromEntries(Yt.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),pr={...cr,...dr},hr=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:(()=>c(()=>import("./andromeeda-C4gqWexZ.js"),[]))},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:(()=>c(()=>import("./aurora-x-D-2ljcwZ.js"),[]))},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:(()=>c(()=>import("./ayu-dark-DYE7WIF3.js"),[]))},{id:"ayu-light",displayName:"Ayu Light",type:"light",import:(()=>c(()=>import("./ayu-light-BA47KaF1.js"),[]))},{id:"ayu-mirage",displayName:"Ayu Mirage",type:"dark",import:(()=>c(()=>import("./ayu-mirage-32ctXXKs.js"),[]))},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:(()=>c(()=>import("./catppuccin-frappe-CZL1YF0i.js"),[]))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:(()=>c(()=>import("./catppuccin-latte-DH-8KZSZ.js"),[]))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:(()=>c(()=>import("./catppuccin-macchiato-B7yYVSCf.js"),[]))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:(()=>c(()=>import("./catppuccin-mocha-Ct7hS0mc.js"),[]))},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:(()=>c(()=>import("./dark-plus-C3mMm8J8.js"),[]))},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:(()=>c(()=>import("./dracula-BzJJZx-M.js"),[]))},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:(()=>c(()=>import("./dracula-soft-BXkSAIEj.js"),[]))},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:(()=>c(()=>import("./everforest-dark-BgDCqdQA.js"),[]))},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:(()=>c(()=>import("./everforest-light-C8M2exoo.js"),[]))},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:(()=>c(()=>import("./github-dark-DHJKELXO.js"),[]))},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:(()=>c(()=>import("./github-dark-default-Cuk6v7N8.js"),[]))},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:(()=>c(()=>import("./github-dark-dimmed-DH5Ifo-i.js"),[]))},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:(()=>c(()=>import("./github-dark-high-contrast-E3gJ1_iC.js"),[]))},{id:"github-light",displayName:"GitHub Light",type:"light",import:(()=>c(()=>import("./github-light-DAi9KRSo.js"),[]))},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:(()=>c(()=>import("./github-light-default-D7oLnXFd.js"),[]))},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:(()=>c(()=>import("./github-light-high-contrast-BfjtVDDH.js"),[]))},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:(()=>c(()=>import("./gruvbox-dark-hard-CFHQjOhq.js"),[]))},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:(()=>c(()=>import("./gruvbox-dark-medium-GsRaNv29.js"),[]))},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:(()=>c(()=>import("./gruvbox-dark-soft-CVdnzihN.js"),[]))},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:(()=>c(()=>import("./gruvbox-light-hard-CH1njM8p.js"),[]))},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:(()=>c(()=>import("./gruvbox-light-medium-DRw_LuNl.js"),[]))},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:(()=>c(()=>import("./gruvbox-light-soft-hJgmCMqR.js"),[]))},{id:"horizon",displayName:"Horizon",type:"dark",import:(()=>c(()=>import("./horizon-BUw7H-hv.js"),[]))},{id:"horizon-bright",displayName:"Horizon Bright",type:"light",import:(()=>c(()=>import("./horizon-bright-CUuTKBJd.js"),[]))},{id:"houston",displayName:"Houston",type:"dark",import:(()=>c(()=>import("./houston-DnULxvSX.js"),[]))},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:(()=>c(()=>import("./kanagawa-dragon-BuwD2xS4.js"),[]))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:(()=>c(()=>import("./kanagawa-lotus-C3DzagqV.js"),[]))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:(()=>c(()=>import("./kanagawa-wave-DFGoQZhC.js"),[]))},{id:"laserwave",displayName:"LaserWave",type:"dark",import:(()=>c(()=>import("./laserwave-DUszq2jm.js"),[]))},{id:"light-plus",displayName:"Light Plus",type:"light",import:(()=>c(()=>import("./light-plus-B7mTdjB0.js"),[]))},{id:"material-theme",displayName:"Material Theme",type:"dark",import:(()=>c(()=>import("./material-theme-D5KoaKCx.js"),[]))},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:(()=>c(()=>import("./material-theme-darker-BfHTSMKl.js"),[]))},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:(()=>c(()=>import("./material-theme-lighter-B0m2ddpp.js"),[]))},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:(()=>c(()=>import("./material-theme-ocean-CyktbL80.js"),[]))},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:(()=>c(()=>import("./material-theme-palenight-Csfq5Kiy.js"),[]))},{id:"min-dark",displayName:"Min Dark",type:"dark",import:(()=>c(()=>import("./min-dark-CafNBF8u.js"),[]))},{id:"min-light",displayName:"Min Light",type:"light",import:(()=>c(()=>import("./min-light-CTRr51gU.js"),[]))},{id:"monokai",displayName:"Monokai",type:"dark",import:(()=>c(()=>import("./monokai-BRVnQi9A.js"),[]))},{id:"night-owl",displayName:"Night Owl",type:"dark",import:(()=>c(()=>import("./night-owl-C39BiMTA.js"),[]))},{id:"night-owl-light",displayName:"Night Owl Light",type:"light",import:(()=>c(()=>import("./night-owl-light-CMTm3GFP.js"),[]))},{id:"nord",displayName:"Nord",type:"dark",import:(()=>c(()=>import("./nord-Ddv68eIx.js"),[]))},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:(()=>c(()=>import("./one-dark-pro-DVMEJ2y_.js"),[]))},{id:"one-light",displayName:"One Light",type:"light",import:(()=>c(()=>import("./one-light-C3Wv6jpd.js"),[]))},{id:"plastic",displayName:"Plastic",type:"dark",import:(()=>c(()=>import("./plastic-3e1v2bzS.js"),[]))},{id:"poimandres",displayName:"Poimandres",type:"dark",import:(()=>c(()=>import("./poimandres-CS3Unz2-.js"),[]))},{id:"red",displayName:"Red",type:"dark",import:(()=>c(()=>import("./red-hvxz__6c.js"),[]))},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:(()=>c(()=>import("./rose-pine-5qJOZa0Y.js"),[]))},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:(()=>c(()=>import("./rose-pine-dawn-zx0QlTCp.js"),[]))},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:(()=>c(()=>import("./rose-pine-moon-C9pEdX9L.js"),[]))},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:(()=>c(()=>import("./slack-dark-BthQWCQV.js"),[]))},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:(()=>c(()=>import("./slack-ochin-DqwNpetd.js"),[]))},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:(()=>c(()=>import("./snazzy-light-Bw305WKR.js"),[]))},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:(()=>c(()=>import("./solarized-dark-CpvCGNkr.js"),[]))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:(()=>c(()=>import("./solarized-light-Dlz6yCKv.js"),[]))},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:(()=>c(()=>import("./synthwave-84-CbfX1IO0.js"),[]))},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:(()=>c(()=>import("./tokyo-night-hegEt444.js"),[]))},{id:"vesper",displayName:"Vesper",type:"dark",import:(()=>c(()=>import("./vesper-DRje8inN.js"),[]))},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:(()=>c(()=>import("./vitesse-black-Bkuqu6BP.js"),[]))},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:(()=>c(()=>import("./vitesse-dark-D0r3Knsf.js"),[]))},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:(()=>c(()=>import("./vitesse-light-CVO1_9PV.js"),[]))}],fr=Object.fromEntries(hr.map(e=>[e.id,e.import]));var Zt=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function Qi(){return 2147483648}function Ji(){return typeof performance<"u"?performance.now():Date.now()}const Yi=(e,t)=>e+(t-e%t)%t;async function Zi(e){let t,n;const r={};function i(h){n=h,r.HEAPU8=new Uint8Array(h),r.HEAPU32=new Uint32Array(h)}function o(h,m,E){r.HEAPU8.copyWithin(h,m,m+E)}function s(h){try{return t.grow(h-n.byteLength+65535>>>16),i(t.buffer),1}catch{}}function a(h){const m=r.HEAPU8.length;h=h>>>0;const E=Qi();if(h>E)return!1;for(let b=1;b<=4;b*=2){let g=m*(1+.2/b);g=Math.min(g,h+100663296);const _=Math.min(E,Yi(Math.max(h,g),65536));if(s(_))return!0}return!1}const l=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function u(h,m,E=1024){const b=m+E;let g=m;for(;h[g]&&!(g>=b);)++g;if(g-m>16&&h.buffer&&l)return l.decode(h.subarray(m,g));let _="";for(;m>10,56320|I&1023)}}return _}function p(h,m){return h?u(r.HEAPU8,h,m):""}const d={emscripten_get_now:Ji,emscripten_memcpy_big:o,emscripten_resize_heap:a,fd_write:()=>0};async function f(){const m=await e({env:d,wasi_snapshot_preview1:d});t=m.memory,i(t.buffer),Object.assign(r,m),r.UTF8ToString=p}return await f(),r}var eo=Object.defineProperty,to=(e,t,n)=>t in e?eo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,P=(e,t,n)=>to(e,typeof t!="symbol"?t+"":t,n);let D=null;function no(e){throw new Zt(e.UTF8ToString(e.getLastOnigError()))}class st{constructor(t){P(this,"utf16Length"),P(this,"utf8Length"),P(this,"utf16Value"),P(this,"utf8Value"),P(this,"utf16OffsetToUtf8"),P(this,"utf8OffsetToUtf16");const n=t.length,r=st._utf8ByteLength(t),i=r!==n,o=i?new Uint32Array(n+1):null;i&&(o[n]=r);const s=i?new Uint32Array(r+1):null;i&&(s[r]=n);const a=new Uint8Array(r);let l=0;for(let u=0;u=55296&&p<=56319&&u+1=56320&&h<=57343&&(d=(p-55296<<10)+65536|h-56320,f=!0)}i&&(o[u]=l,f&&(o[u+1]=l),d<=127?s[l+0]=u:d<=2047?(s[l+0]=u,s[l+1]=u):d<=65535?(s[l+0]=u,s[l+1]=u,s[l+2]=u):(s[l+0]=u,s[l+1]=u,s[l+2]=u,s[l+3]=u)),d<=127?a[l++]=d:d<=2047?(a[l++]=192|(d&1984)>>>6,a[l++]=128|(d&63)>>>0):d<=65535?(a[l++]=224|(d&61440)>>>12,a[l++]=128|(d&4032)>>>6,a[l++]=128|(d&63)>>>0):(a[l++]=240|(d&1835008)>>>18,a[l++]=128|(d&258048)>>>12,a[l++]=128|(d&4032)>>>6,a[l++]=128|(d&63)>>>0),f&&u++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=t,this.utf8Value=a,this.utf16OffsetToUtf8=o,this.utf8OffsetToUtf16=s}static _utf8ByteLength(t){let n=0;for(let r=0,i=t.length;r=55296&&o<=56319&&r+1=56320&&l<=57343&&(s=(o-55296<<10)+65536|l-56320,a=!0)}s<=127?n+=1:s<=2047?n+=2:s<=65535?n+=3:n+=4,a&&r++}return n}createString(t){const n=t.omalloc(this.utf8Length);return t.HEAPU8.set(this.utf8Value,n),n}}const at=class X{constructor(t){if(P(this,"id",++X.LAST_ID),P(this,"_onigBinding"),P(this,"content"),P(this,"utf16Length"),P(this,"utf8Length"),P(this,"utf16OffsetToUtf8"),P(this,"utf8OffsetToUtf16"),P(this,"ptr"),!D)throw new Zt("Must invoke loadWasm first.");this._onigBinding=D,this.content=t;const n=new st(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!X._sharedPtrInUse?(X._sharedPtr||(X._sharedPtr=D.omalloc(1e4)),X._sharedPtrInUse=!0,D.HEAPU8.set(n.utf8Value,X._sharedPtr),this.ptr=X._sharedPtr):this.ptr=n.createString(D)}convertUtf8OffsetToUtf16(t){return this.utf8OffsetToUtf16?t<0?0:t>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[t]:t}convertUtf16OffsetToUtf8(t){return this.utf16OffsetToUtf8?t<0?0:t>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[t]:t}dispose(){this.ptr===X._sharedPtr?X._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};P(at,"LAST_ID",0);P(at,"_sharedPtr",0);P(at,"_sharedPtrInUse",!1);let mr=at;class ro{constructor(t){if(P(this,"_onigBinding"),P(this,"_ptr"),!D)throw new Zt("Must invoke loadWasm first.");const n=[],r=[];for(let a=0,l=t.length;a{let r=e;return r=await r,typeof r=="function"&&(r=await r(n)),typeof r=="function"&&(r=await r(n)),io(r)?r=await r.instantiator(n):oo(r)?r=await r.default(n):(so(r)&&(r=r.data),ao(r)?typeof WebAssembly.instantiateStreaming=="function"?r=await uo(r)(n):r=await co(r)(n):lo(r)?r=await Et(r)(n):r instanceof WebAssembly.Module?r=await Et(r)(n):"default"in r&&r.default instanceof WebAssembly.Module&&(r=await Et(r.default)(n))),"instance"in r&&(r=r.instance),"exports"in r&&(r=r.exports),r})}return Ue=t(),Ue}function Et(e){return t=>WebAssembly.instantiate(e,t)}function uo(e){return t=>WebAssembly.instantiateStreaming(e,t)}function co(e){return async t=>{const n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}let gr;function po(e){gr=e}function ho(){return gr}async function _r(e){return e&&await en(e),{createScanner(t){return new ro(t.map(n=>typeof n=="string"?n:n.source))},createString(t){return new mr(t)}}}const fo=Object.freeze(Object.defineProperty({__proto__:null,createOnigurumaEngine:_r,getDefaultWasmLoader:ho,loadWasm:en,setDefaultWasmLoader:po},Symbol.toStringTag,{value:"Module"}));var yr=qi({});Ki(yr,fo);var S=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function mo(e){return tn(e)}function tn(e){return Array.isArray(e)?go(e):e instanceof RegExp?e:typeof e=="object"?_o(e):e}function go(e){let t=[];for(let n=0,r=e.length;n{for(let r in n)e[r]=n[r]}),e}function br(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return t===0?e:~t===e.length-1?br(e.substring(0,e.length-1)):e.substr(~t+1)}var bt=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,Fe=class{static hasCaptures(e){return e===null?!1:(bt.lastIndex=0,bt.test(e))}static replaceCaptures(e,t,n){return e.replace(bt,(r,i,o,s)=>{let a=n[parseInt(i||o,10)];if(a){let l=t.substring(a.start,a.end);for(;l[0]===".";)l=l.substring(1);switch(s){case"downcase":return l.toLowerCase();case"upcase":return l.toUpperCase();default:return l}}else return r})}};function wr(e,t){return et?1:0}function vr(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let i=0;ithis._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;const t=e.scopeName,r=this._cachedMatchRoot.get(t).find(i=>yo(e.parent,i.parentScopes));return r?new kr(r.fontStyle,r.foreground,r.background):null}},wt=class Xe{constructor(t,n){this.parent=t,this.scopeName=n}static push(t,n){for(const r of n)t=new Xe(t,r);return t}static from(...t){let n=null;for(let r=0;r"){if(n===t.length-1)return!1;r=t[++n],i=!0}for(;e&&!Eo(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function Eo(e,t){return t===e||e.startsWith(t)&&e[t.length]==="."}var kr=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function bo(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let i=0,o=t.length;i1&&(b=m.slice(0,m.length-1),b.reverse()),n[r++]=new wo(E,b,i,l,u,p)}}return n}var wo=class{constructor(e,t,n,r,i,o){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=i,this.background=o}},$=(e=>(e[e.NotSet=-1]="NotSet",e[e.None=0]="None",e[e.Italic=1]="Italic",e[e.Bold=2]="Bold",e[e.Underline=4]="Underline",e[e.Strikethrough=8]="Strikethrough",e))($||{});function vo(e,t){e.sort((l,u)=>{let p=wr(l.scope,u.scope);return p!==0||(p=vr(l.parentScopes,u.parentScopes),p!==0)?p:l.index-u.index});let n=0,r="#000000",i="#ffffff";for(;e.length>=1&&e[0].scope==="";){let l=e.shift();l.fontStyle!==-1&&(n=l.fontStyle),l.foreground!==null&&(r=l.foreground),l.background!==null&&(i=l.background)}let o=new Co(t),s=new kr(n,o.getId(r),o.getId(i)),a=new ko(new Nt(0,null,-1,0,0),[]);for(let l=0,u=e.length;lt?console.log("how did this happen?"):this.scopeDepth=t,n!==-1&&(this.fontStyle=n),r!==0&&(this.foreground=r),i!==0&&(this.background=i)}},ko=class Vt{constructor(t,n=[],r={}){this._mainRule=t,this._children=r,this._rulesWithParentScopes=n}_rulesWithParentScopes;static _cmpBySpecificity(t,n){if(t.scopeDepth!==n.scopeDepth)return n.scopeDepth-t.scopeDepth;let r=0,i=0;for(;t.parentScopes[r]===">"&&r++,n.parentScopes[i]===">"&&i++,!(r>=t.parentScopes.length||i>=n.parentScopes.length);){const o=n.parentScopes[i].length-t.parentScopes[r].length;if(o!==0)return o;r++,i++}return n.parentScopes.length-t.parentScopes.length}match(t){if(t!==""){let r=t.indexOf("."),i,o;if(r===-1?(i=t,o=""):(i=t.substring(0,r),o=t.substring(r+1)),this._children.hasOwnProperty(i))return this._children[i].match(o)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(Vt._cmpBySpecificity),n}insert(t,n,r,i,o,s){if(n===""){this._doInsertHere(t,r,i,o,s);return}let a=n.indexOf("."),l,u;a===-1?(l=n,u=""):(l=n.substring(0,a),u=n.substring(a+1));let p;this._children.hasOwnProperty(l)?p=this._children[l]:(p=new Vt(this._mainRule.clone(),Nt.cloneArr(this._rulesWithParentScopes)),this._children[l]=p),p.insert(t+1,u,r,i,o,s)}_doInsertHere(t,n,r,i,o){if(n===null){this._mainRule.acceptOverwrite(t,r,i,o);return}for(let s=0,a=this._rulesWithParentScopes.length;s>>0}static getTokenType(t){return(t&768)>>>8}static containsBalancedBrackets(t){return(t&1024)!==0}static getFontStyle(t){return(t&30720)>>>11}static getForeground(t){return(t&16744448)>>>15}static getBackground(t){return(t&4278190080)>>>24}static set(t,n,r,i,o,s,a){let l=U.getLanguageId(t),u=U.getTokenType(t),p=U.containsBalancedBrackets(t)?1:0,d=U.getFontStyle(t),f=U.getForeground(t),h=U.getBackground(t);return n!==0&&(l=n),r!==8&&(u=r),i!==null&&(p=i?1:0),o!==-1&&(d=o),s!==0&&(f=s),a!==0&&(h=a),(l<<0|u<<8|p<<10|d<<11|f<<15|h<<24)>>>0}};function Ye(e,t){const n=[],r=So(e);let i=r.next();for(;i!==null;){let l=0;if(i.length===2&&i.charAt(1)===":"){switch(i.charAt(0)){case"R":l=1;break;case"L":l=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=r.next()}let u=s();if(n.push({matcher:u,priority:l}),i!==",")break;i=r.next()}return n;function o(){if(i==="-"){i=r.next();const l=o();return u=>!!l&&!l(u)}if(i==="("){i=r.next();const l=a();return i===")"&&(i=r.next()),l}if(vn(i)){const l=[];do l.push(i),i=r.next();while(vn(i));return u=>t(l,u)}return null}function s(){const l=[];let u=o();for(;u;)l.push(u),u=o();return p=>l.every(d=>d(p))}function a(){const l=[];let u=s();for(;u&&(l.push(u),i==="|"||i===",");){do i=r.next();while(i==="|"||i===",");u=s()}return p=>l.some(d=>d(p))}}function vn(e){return!!e&&!!e.match(/[\w\.:]+/)}function So(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;const r=n[0];return n=t.exec(e),r}}}function Lr(e){typeof e.dispose=="function"&&e.dispose()}var Se=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},Lo=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},Ro=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){const t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},Io=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Se(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){const e=this.Q;this.Q=[];const t=new Ro;for(const n of e)To(n,this.initialScopeName,this.repo,t);for(const n of t.references)if(n instanceof Se){if(this.seenFullScopeRequests.has(n.scopeName))continue;this.seenFullScopeRequests.add(n.scopeName),this.Q.push(n)}else{if(this.seenFullScopeRequests.has(n.scopeName)||this.seenPartialScopeRequests.has(n.toKey()))continue;this.seenPartialScopeRequests.add(n.toKey()),this.Q.push(n)}}};function To(e,t,n,r){const i=n.lookup(e.scopeName);if(!i){if(e.scopeName===t)throw new Error(`No grammar provided for <${t}>`);return}const o=n.lookup(t);e instanceof Se?Ke({baseGrammar:o,selfGrammar:i},r):$t(e.ruleName,{baseGrammar:o,selfGrammar:i,repository:i.repository},r);const s=n.injections(e.scopeName);if(s)for(const a of s)r.add(new Se(a))}function $t(e,t,n){if(t.repository&&t.repository[e]){const r=t.repository[e];Ze([r],t,n)}}function Ke(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&Ze(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&Ze(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function Ze(e,t,n){for(const r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);const i=r.repository?Er({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&Ze(r.patterns,{...t,repository:i},n);const o=r.include;if(!o)continue;const s=Rr(o);switch(s.kind){case 0:Ke({...t,selfGrammar:t.baseGrammar},n);break;case 1:Ke(t,n);break;case 2:$t(s.ruleName,{...t,repository:i},n);break;case 3:case 4:const a=s.scopeName===t.selfGrammar.scopeName?t.selfGrammar:s.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(a){const l={baseGrammar:t.baseGrammar,selfGrammar:a,repository:i};s.kind===4?$t(s.ruleName,l,n):Ke(l,n)}else s.kind===4?n.add(new Lo(s.scopeName,s.ruleName)):n.add(new Se(s.scopeName));break}}}var Po=class{kind=0},Oo=class{kind=1},xo=class{constructor(e){this.ruleName=e}kind=2},Do=class{constructor(e){this.scopeName=e}kind=3},No=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function Rr(e){if(e==="$base")return new Po;if(e==="$self")return new Oo;const t=e.indexOf("#");if(t===-1)return new Do(e);if(t===0)return new xo(e.substring(1));{const n=e.substring(0,t),r=e.substring(t+1);return new No(n,r)}}var Vo=/\\(\d+)/,Cn=/\\(\d+)/g,$o=-1,Ir=-2;var Ne=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=Fe.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=Fe.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${br(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:Fe.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:Fe.replaceCaptures(this._contentName,e,t)}},Mo=class extends Ne{retokenizeCapturedWithRuleId;constructor(e,t,n,r,i){super(e,t,n,r),this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(e,t){throw new Error("Not supported!")}compile(e,t){throw new Error("Not supported!")}compileAG(e,t,n,r){throw new Error("Not supported!")}},Go=class extends Ne{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new Le(r,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Re,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},An=class extends Ne{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,r),this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(const n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Re,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Mt=class extends Ne{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i,o,s,a,l,u){super(e,t,n,r),this._begin=new Le(i,this.id),this.beginCaptures=o,this._end=new Le(s||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=a,this.applyEndPatternLast=l||!1,this.patterns=u.patterns,this.hasMissingPatterns=u.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Re;for(const n of this.patterns)e.getRule(n).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},et=class extends Ne{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,i,o,s,a,l){super(e,t,n,r),this._begin=new Le(i,this.id),this.beginCaptures=o,this.whileCaptures=a,this._while=new Le(s,Ir),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Re;for(const t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new Re,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||"￿"),this._cachedCompiledWhilePatterns}},Tr=class V{static createCaptureRule(t,n,r,i,o){return t.registerRule(s=>new Mo(n,s,r,i,o))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new Go(t.$vscodeTextmateLocation,t.id,t.name,t.match,V._compileCaptures(t.captures,n,r));if(typeof t.begin>"u"){t.repository&&(r=Er({},r,t.repository));let o=t.patterns;return typeof o>"u"&&t.include&&(o=[{include:t.include}]),new An(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,V._compilePatterns(o,n,r))}return t.while?new et(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,V._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,V._compileCaptures(t.whileCaptures||t.captures,n,r),V._compilePatterns(t.patterns,n,r)):new Mt(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,V._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,V._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,V._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let i=[];if(t){let o=0;for(const s in t){if(s==="$vscodeTextmateLocation")continue;const a=parseInt(s,10);a>o&&(o=a)}for(let s=0;s<=o;s++)i[s]=null;for(const s in t){if(s==="$vscodeTextmateLocation")continue;const a=parseInt(s,10);let l=0;t[s].patterns&&(l=V.getCompiledRuleId(t[s],n,r)),i[a]=V.createCaptureRule(n,t[s].$vscodeTextmateLocation,t[s].name,t[s].contentName,l)}}return i}static _compilePatterns(t,n,r){let i=[];if(t)for(let o=0,s=t.length;ot.substring(i.start,i.end));return Cn.lastIndex=0,this.source.replace(Cn,(i,o)=>Cr(r[parseInt(o,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let t=[],n=[],r=[],i=[],o,s,a,l;for(o=0,s=this.source.length;on.source);this._cached=new kn(e,t,this._items.map(n=>n.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){let r=this._items.map(i=>i.resolveAnchors(t,n));return new kn(e,r,this._items.map(i=>i.ruleId))}},kn=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const e=[];for(let t=0,n=this.rules.length;t{let n={};for(var r in e)Dt(n,r,{get:e[r],enumerable:!0});return Dt(n,Symbol.toStringTag,{value:"Module"}),n},Xi=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(var i=Wi(t),o=0,s=i.length,a;ot[l]).bind(null,a),enumerable:!(r=Hi(t,a))||r.enumerable});return e},Ki=(e,t,n)=>(Xi(e,t,"default"),n);const Yt=[{id:"abap",name:"ABAP",import:(()=>c(()=>import("./abap-BdImnpbu.js"),[]))},{id:"actionscript-3",name:"ActionScript",aliases:["actionscript","as3"],import:(()=>c(()=>import("./actionscript-3-B3316cI-.js"),[]))},{id:"ada",name:"Ada",import:(()=>c(()=>import("./ada-bCR0ucgS.js"),[]))},{id:"ahk",name:"AutoHotkey",aliases:["ahk1"],import:(()=>c(()=>import("./ahk-CsyLZFj1.js"),[]))},{id:"ahk2",name:"AutoHotkey2",import:(()=>c(()=>import("./ahk2-8Zs4aa1G.js"),[]))},{id:"angular-html",name:"Angular HTML",import:(()=>c(()=>import("./angular-html-DA-rfuFy.js").then(e=>e.f),__vite__mapDeps([0,1,2,3])))},{id:"angular-ts",name:"Angular TypeScript",import:(()=>c(()=>import("./angular-ts-BrjP3tb8.js"),__vite__mapDeps([4,0,1,2,3,5])))},{id:"apache",name:"Apache Conf",import:(()=>c(()=>import("./apache-Pmp26Uib.js"),[]))},{id:"apex",name:"Apex",import:(()=>c(()=>import("./apex-DhZFqWV2.js"),[]))},{id:"apl",name:"APL",import:(()=>c(()=>import("./apl-CORt7UWP.js"),__vite__mapDeps([6,1,2,3,7,8,9])))},{id:"applescript",name:"AppleScript",import:(()=>c(()=>import("./applescript-Co6uUVPk.js"),[]))},{id:"ara",name:"Ara",import:(()=>c(()=>import("./ara-BRHolxvo.js"),[]))},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:(()=>c(()=>import("./asciidoc-CSVQ5wI8.js"),[]))},{id:"asm",name:"Assembly",import:(()=>c(()=>import("./asm-D_Q5rh1f.js"),[]))},{id:"astro",name:"Astro",import:(()=>c(()=>import("./astro-HNnZUWAn.js"),__vite__mapDeps([10,9,2,11,3,12,13])))},{id:"awk",name:"AWK",import:(()=>c(()=>import("./awk-DMzUqQB5.js"),[]))},{id:"ballerina",name:"Ballerina",import:(()=>c(()=>import("./ballerina-BFfxhgS-.js"),[]))},{id:"bat",name:"Batch File",aliases:["batch","cmd"],import:(()=>c(()=>import("./bat-CickPsom.js"),[]))},{id:"beancount",name:"Beancount",import:(()=>c(()=>import("./beancount-k_qm7-4y.js"),[]))},{id:"berry",name:"Berry",aliases:["be"],import:(()=>c(()=>import("./berry-uYugtg8r.js"),[]))},{id:"bibtex",name:"BibTeX",import:(()=>c(()=>import("./bibtex-CHM0blh-.js"),[]))},{id:"bicep",name:"Bicep",import:(()=>c(()=>import("./bicep-Bmn6On1c.js"),[]))},{id:"bird2",name:"BIRD2 Configuration",aliases:["bird"],import:(()=>c(()=>import("./bird2-Bx8U0n9b.js"),[]))},{id:"blade",name:"Blade",import:(()=>c(()=>import("./blade-2xfisSek.js"),__vite__mapDeps([14,15,1,2,3,7,8,16,9])))},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:(()=>c(()=>import("./bsl-DlhNcFeZ.js"),__vite__mapDeps([17,18])))},{id:"c",name:"C",import:(()=>c(()=>import("./c-BIGW1oBm.js"),[]))},{id:"c3",name:"C3",import:(()=>c(()=>import("./c3-Dp5svz6Z.js"),[]))},{id:"cadence",name:"Cadence",aliases:["cdc"],import:(()=>c(()=>import("./cadence-Bv_4Rxtq.js"),[]))},{id:"cairo",name:"Cairo",import:(()=>c(()=>import("./cairo-KRGpt6FW.js"),__vite__mapDeps([19,20])))},{id:"chapel",name:"Chapel",aliases:["chpl"],import:(()=>c(()=>import("./chapel-DTp_pixX.js"),__vite__mapDeps([21,22])))},{id:"clarity",name:"Clarity",import:(()=>c(()=>import("./clarity-Dn5IMItf.js"),[]))},{id:"clojure",name:"Clojure",aliases:["clj"],import:(()=>c(()=>import("./clojure-P80f7IUj.js"),[]))},{id:"cmake",name:"CMake",import:(()=>c(()=>import("./cmake-D1j8_8rp.js"),[]))},{id:"cobol",name:"COBOL",import:(()=>c(()=>import("./cobol-nBiQ_Alo.js"),__vite__mapDeps([23,1,2,3,8])))},{id:"codeowners",name:"CODEOWNERS",import:(()=>c(()=>import("./codeowners-Bp6g37R7.js"),[]))},{id:"codeql",name:"CodeQL",aliases:["ql"],import:(()=>c(()=>import("./codeql-DsOJ9woJ.js"),[]))},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:(()=>c(()=>import("./coffee-Ch7k5sss.js"),__vite__mapDeps([24,2])))},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:(()=>c(()=>import("./common-lisp-Cg-RD9OK.js"),[]))},{id:"coq",name:"Rocq",import:(()=>c(()=>import("./coq-C7JzOVbR.js"),[]))},{id:"cpp",name:"C++",aliases:["c++"],import:(()=>c(()=>import("./cpp-BMRokrvK.js"),__vite__mapDeps([25,26,27,22])))},{id:"crystal",name:"Crystal",import:(()=>c(()=>import("./crystal-DGywbUpC.js"),__vite__mapDeps([28,1,2,3,16,22,29])))},{id:"csharp",name:"C#",aliases:["c#","cs"],import:(()=>c(()=>import("./csharp-DSvCPggb.js"),[]))},{id:"css",name:"CSS",import:(()=>c(()=>import("./css-CLj8gQPS.js"),[]))},{id:"csv",name:"CSV",import:(()=>c(()=>import("./csv-fuZLfV_i.js"),[]))},{id:"cue",name:"CUE",import:(()=>c(()=>import("./cue-D82EKSYY.js"),[]))},{id:"cypher",name:"Cypher",aliases:["cql"],import:(()=>c(()=>import("./cypher-COkxafJQ.js"),[]))},{id:"d",name:"D",import:(()=>c(()=>import("./d-85-TOEBH.js"),[]))},{id:"dart",name:"Dart",import:(()=>c(()=>import("./dart-bE4Kk8sk.js"),[]))},{id:"dax",name:"DAX",import:(()=>c(()=>import("./dax-CEL-wOlO.js"),[]))},{id:"desktop",name:"Desktop",import:(()=>c(()=>import("./desktop-BmXAJ9_W.js"),[]))},{id:"diff",name:"Diff",import:(()=>c(()=>import("./diff-D97Zzqfu.js"),[]))},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:(()=>c(()=>import("./docker-BcOcwvcX.js"),[]))},{id:"dotenv",name:"dotEnv",import:(()=>c(()=>import("./dotenv-Da5cRb03.js"),[]))},{id:"dream-maker",name:"Dream Maker",import:(()=>c(()=>import("./dream-maker-BtqSS_iP.js"),[]))},{id:"edge",name:"Edge",import:(()=>c(()=>import("./edge-FbVlp4U3.js"),__vite__mapDeps([30,11,1,2,3,15])))},{id:"elixir",name:"Elixir",import:(()=>c(()=>import("./elixir-CkH2-t6x.js"),__vite__mapDeps([31,1,2,3])))},{id:"elm",name:"Elm",import:(()=>c(()=>import("./elm-DbKCFpqz.js"),__vite__mapDeps([32,27,22])))},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:(()=>c(()=>import("./emacs-lisp-C_m_b--Z.js"),[]))},{id:"erb",name:"ERB",import:(()=>c(()=>import("./erb-DXfck5VN.js"),__vite__mapDeps([33,1,2,3,34,35,7,8,16,36,11,37,13,25,26,27,22,29,38,39])))},{id:"erlang",name:"Erlang",aliases:["erl"],import:(()=>c(()=>import("./erlang-DsQrWhSR.js"),__vite__mapDeps([40,41])))},{id:"fennel",name:"Fennel",import:(()=>c(()=>import("./fennel-BYunw83y.js"),[]))},{id:"fish",name:"Fish",import:(()=>c(()=>import("./fish-BvzEVeQv.js"),[]))},{id:"fluent",name:"Fluent",aliases:["ftl"],import:(()=>c(()=>import("./fluent-C4IJs8-o.js"),[]))},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:(()=>c(()=>import("./fortran-fixed-form-CkoXwp7k.js"),__vite__mapDeps([42,43])))},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:(()=>c(()=>import("./fortran-free-form-BxgE0vQu.js"),[]))},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:(()=>c(()=>import("./fsharp-CXgrBDvD.js"),__vite__mapDeps([44,41])))},{id:"gdresource",name:"GDResource",aliases:["tscn","tres"],import:(()=>c(()=>import("./gdresource-TyuKm33G.js"),__vite__mapDeps([45,46,47])))},{id:"gdscript",name:"GDScript",aliases:["gd"],import:(()=>c(()=>import("./gdscript-DqcFQ5yU.js"),[]))},{id:"gdshader",name:"GDShader",import:(()=>c(()=>import("./gdshader-DkwncUOv.js"),[]))},{id:"genie",name:"Genie",import:(()=>c(()=>import("./genie-D0YGMca9.js"),[]))},{id:"gherkin",name:"Gherkin",import:(()=>c(()=>import("./gherkin-DyxjwDmM.js"),[]))},{id:"git-commit",name:"Git Commit Message",import:(()=>c(()=>import("./git-commit-F4YmCXRG.js"),__vite__mapDeps([48,49])))},{id:"git-rebase",name:"Git Rebase Message",import:(()=>c(()=>import("./git-rebase-r7XF79zn.js"),__vite__mapDeps([50,29])))},{id:"gleam",name:"Gleam",import:(()=>c(()=>import("./gleam-BspZqrRM.js"),[]))},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:(()=>c(()=>import("./glimmer-js-ByusRIyA.js"),__vite__mapDeps([51,2,11,3,1])))},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:(()=>c(()=>import("./glimmer-ts-BfAWNZQY.js"),__vite__mapDeps([52,11,3,2,1])))},{id:"glsl",name:"GLSL",import:(()=>c(()=>import("./glsl-DplSGwfg.js"),__vite__mapDeps([27,22])))},{id:"gn",name:"GN",import:(()=>c(()=>import("./gn-n2N0HUVH.js"),[]))},{id:"gnuplot",name:"Gnuplot",import:(()=>c(()=>import("./gnuplot-DdkO51Og.js"),[]))},{id:"go",name:"Go",import:(()=>c(()=>import("./go-C27-OAKa.js"),[]))},{id:"graphql",name:"GraphQL",aliases:["gql"],import:(()=>c(()=>import("./graphql-ChdNCCLP.js"),__vite__mapDeps([36,2,11,37,13])))},{id:"groovy",name:"Groovy",import:(()=>c(()=>import("./groovy-gcz8RCvz.js"),[]))},{id:"hack",name:"Hack",import:(()=>c(()=>import("./hack-BWmVpMyf.js"),__vite__mapDeps([53,1,2,3,16])))},{id:"haml",name:"Ruby Haml",import:(()=>c(()=>import("./haml-D5jkg6IW.js"),__vite__mapDeps([35,2,3])))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:(()=>c(()=>import("./handlebars-BpdQsYii.js"),__vite__mapDeps([54,1,2,3,39])))},{id:"haskell",name:"Haskell",aliases:["hs"],import:(()=>c(()=>import("./haskell-Df6bDoY_.js"),[]))},{id:"haxe",name:"Haxe",import:(()=>c(()=>import("./haxe-CfZj7gIn.js"),[]))},{id:"hcl",name:"HashiCorp HCL",import:(()=>c(()=>import("./hcl-BWvSN4gD.js"),[]))},{id:"hjson",name:"Hjson",import:(()=>c(()=>import("./hjson-D5-asLiD.js"),[]))},{id:"hlsl",name:"HLSL",import:(()=>c(()=>import("./hlsl-D3lLCCz7.js"),[]))},{id:"html",name:"HTML",import:(()=>c(()=>import("./html-pp8916En.js"),__vite__mapDeps([1,2,3])))},{id:"html-derivative",name:"HTML (Derivative)",import:(()=>c(()=>import("./html-derivative-DlHx6ybY.js"),__vite__mapDeps([15,1,2,3])))},{id:"http",name:"HTTP",import:(()=>c(()=>import("./http-jrhK8wxY.js"),__vite__mapDeps([55,29,9,7,8,36,2,11,37,13])))},{id:"hurl",name:"Hurl",import:(()=>c(()=>import("./hurl-irOxFIW8.js"),__vite__mapDeps([56,36,2,11,37,13,7,8,57])))},{id:"hxml",name:"HXML",import:(()=>c(()=>import("./hxml-2-FPmUDs.js"),__vite__mapDeps([58,59])))},{id:"hy",name:"Hy",import:(()=>c(()=>import("./hy-DFXneXwc.js"),[]))},{id:"imba",name:"Imba",import:(()=>c(()=>import("./imba-DGztddWO.js"),[]))},{id:"ini",name:"INI",aliases:["properties"],import:(()=>c(()=>import("./ini-BEwlwnbL.js"),[]))},{id:"java",name:"Java",import:(()=>c(()=>import("./java-CylS5w8V.js"),[]))},{id:"javascript",name:"JavaScript",aliases:["js","cjs","mjs"],import:(()=>c(()=>import("./javascript-wDzz0qaB.js"),[]))},{id:"jinja",name:"Jinja",import:(()=>c(()=>import("./jinja-f2NsQr07.js"),__vite__mapDeps([60,1,2,3])))},{id:"jison",name:"Jison",import:(()=>c(()=>import("./jison-wvAkD_A8.js"),__vite__mapDeps([61,2])))},{id:"json",name:"JSON",import:(()=>c(()=>import("./json-Cp-IABpG.js"),[]))},{id:"json5",name:"JSON5",import:(()=>c(()=>import("./json5-C9tS-k6U.js"),[]))},{id:"jsonc",name:"JSON with Comments",import:(()=>c(()=>import("./jsonc-Des-eS-w.js"),[]))},{id:"jsonl",name:"JSON Lines",import:(()=>c(()=>import("./jsonl-DcaNXYhu.js"),[]))},{id:"jsonnet",name:"Jsonnet",import:(()=>c(()=>import("./jsonnet-DFQXde-d.js"),[]))},{id:"jssm",name:"JSSM",aliases:["fsl"],import:(()=>c(()=>import("./jssm-C2t-YnRu.js"),[]))},{id:"jsx",name:"JSX",import:(()=>c(()=>import("./jsx-g9-lgVsj.js"),[]))},{id:"julia",name:"Julia",aliases:["jl"],import:(()=>c(()=>import("./julia-5Bft2YPA.js"),__vite__mapDeps([62,25,26,27,22,20,2,63,16])))},{id:"just",name:"Just",aliases:["justfile"],import:(()=>c(()=>import("./just-Cwhn7H3k.js"),__vite__mapDeps([64,29,2,11,65,1,3,7,8,16,20,34,35,36,37,13,25,26,27,22,38,39])))},{id:"kdl",name:"KDL",import:(()=>c(()=>import("./kdl-DV7GczEv.js"),[]))},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:(()=>c(()=>import("./kotlin-BdnUsdx6.js"),[]))},{id:"kusto",name:"Kusto",aliases:["kql"],import:(()=>c(()=>import("./kusto-wEQ09or8.js"),[]))},{id:"latex",name:"LaTeX",import:(()=>c(()=>import("./latex-D5pSuvFb.js"),__vite__mapDeps([66,67,63])))},{id:"lean",name:"Lean 4",aliases:["lean4"],import:(()=>c(()=>import("./lean-BZvkOJ9d.js"),[]))},{id:"less",name:"Less",import:(()=>c(()=>import("./less-B1dDrJ26.js"),[]))},{id:"liquid",name:"Liquid",import:(()=>c(()=>import("./liquid-C0sCDyMI.js"),__vite__mapDeps([68,1,2,3,9])))},{id:"llvm",name:"LLVM IR",import:(()=>c(()=>import("./llvm-BZoOZj88.js"),[]))},{id:"log",name:"Log file",import:(()=>c(()=>import("./log-2UxHyX5q.js"),[]))},{id:"logo",name:"Logo",import:(()=>c(()=>import("./logo-BtOb2qkB.js"),[]))},{id:"lua",name:"Lua",import:(()=>c(()=>import("./lua-BaeVxFsk.js"),__vite__mapDeps([38,22])))},{id:"luau",name:"Luau",import:(()=>c(()=>import("./luau-BnpPk5vE.js"),[]))},{id:"make",name:"Makefile",aliases:["makefile"],import:(()=>c(()=>import("./make-CHLpvVh8.js"),[]))},{id:"markdown",name:"Markdown",aliases:["md"],import:(()=>c(()=>import("./markdown-Cvjx9yec.js"),[]))},{id:"marko",name:"Marko",import:(()=>c(()=>import("./marko-DjSrsDqO.js"),__vite__mapDeps([69,3,70,5,11])))},{id:"matlab",name:"MATLAB",import:(()=>c(()=>import("./matlab-D7o27uSR.js"),[]))},{id:"mdc",name:"MDC",import:(()=>c(()=>import("./mdc-D1_yUvq7.js"),__vite__mapDeps([71,41,39,15,1,2,3])))},{id:"mdx",name:"MDX",import:(()=>c(()=>import("./mdx-Cmh6b_Ma.js"),[]))},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:(()=>c(()=>import("./mermaid-CQcHuHx7.js"),[]))},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:(()=>c(()=>import("./mipsasm-CKIfxQSi.js"),[]))},{id:"mojo",name:"Mojo",import:(()=>c(()=>import("./mojo-DJz3ZmWd.js"),[]))},{id:"moonbit",name:"MoonBit",aliases:["mbt","mbti"],import:(()=>c(()=>import("./moonbit-CHtswR0a.js"),[]))},{id:"move",name:"Move",import:(()=>c(()=>import("./move-el3G9tDJ.js"),[]))},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:(()=>c(()=>import("./narrat-DRg8JJMk.js"),[]))},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:(()=>c(()=>import("./nextflow-C-mBbutL.js"),__vite__mapDeps([72,73])))},{id:"nextflow-groovy",name:"Nextflow Groovy",import:(()=>c(()=>import("./nextflow-groovy-vE_lwT2v.js"),[]))},{id:"nginx",name:"Nginx",import:(()=>c(()=>import("./nginx-BpAMiNFr.js"),__vite__mapDeps([74,38,22])))},{id:"nim",name:"Nim",import:(()=>c(()=>import("./nim-BIad80T-.js"),__vite__mapDeps([75,22,1,2,3,7,8,27,41])))},{id:"nix",name:"Nix",import:(()=>c(()=>import("./nix-CwoSXNpI.js"),[]))},{id:"nsis",name:"NSIS",import:(()=>c(()=>import("./nsis-BlV79W_Q.js"),[]))},{id:"nushell",name:"nushell",aliases:["nu"],import:(()=>c(()=>import("./nushell-D3jzshHO.js"),[]))},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:(()=>c(()=>import("./objective-c-DXmwc3jG.js"),[]))},{id:"objective-cpp",name:"Objective-C++",import:(()=>c(()=>import("./objective-cpp-CLxacb5B.js"),[]))},{id:"ocaml",name:"OCaml",import:(()=>c(()=>import("./ocaml-C0hk2d4L.js"),[]))},{id:"odin",name:"Odin",import:(()=>c(()=>import("./odin-BBf5iR-q.js"),[]))},{id:"openscad",name:"OpenSCAD",aliases:["scad"],import:(()=>c(()=>import("./openscad-C4EeE6gA.js"),[]))},{id:"org",name:"Org Markup",import:(()=>c(()=>import("./org-DM6o9KBp.js"),__vite__mapDeps([76,2,11,13,8,20,26,3,38,22,77,78,65,1,7,16,63,34,35,36,37,25,27,29,39,79,9,80,81,24,82,49,83,84,85,70,5,86,87,88,89,90,75,41,31,40,91,92,93,48,50,66,67])))},{id:"pascal",name:"Pascal",import:(()=>c(()=>import("./pascal-D93ZcfNL.js"),[]))},{id:"perl",name:"Perl",import:(()=>c(()=>import("./perl-B9cMNwum.js"),__vite__mapDeps([65,1,2,3,7,8,16])))},{id:"php",name:"PHP",import:(()=>c(()=>import("./php-Csjmro_R.js"),__vite__mapDeps([79,1,2,3,7,8,16,9])))},{id:"pkl",name:"Pkl",import:(()=>c(()=>import("./pkl-u5AG7uiY.js"),[]))},{id:"plsql",name:"PL/SQL",import:(()=>c(()=>import("./plsql-ChMvpjG-.js"),[]))},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:(()=>c(()=>import("./po-BTJTHyun.js"),[]))},{id:"polar",name:"Polar",import:(()=>c(()=>import("./polar-C0HS_06l.js"),[]))},{id:"postcss",name:"PostCSS",import:(()=>c(()=>import("./postcss-CXtECtnM.js"),[]))},{id:"powerquery",name:"PowerQuery",import:(()=>c(()=>import("./powerquery-CEu0bR-o.js"),[]))},{id:"powershell",name:"PowerShell",aliases:["ps","ps1","pwsh"],import:(()=>c(()=>import("./powershell-BmBUJMz7.js"),[]))},{id:"prisma",name:"Prisma",import:(()=>c(()=>import("./prisma-Vru482bI.js"),[]))},{id:"prolog",name:"Prolog",import:(()=>c(()=>import("./prolog-CbFg5uaA.js"),[]))},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:(()=>c(()=>import("./proto-C7zT0LnQ.js"),[]))},{id:"pug",name:"Pug",aliases:["jade"],import:(()=>c(()=>import("./pug-DKIMFp6K.js"),__vite__mapDeps([94,2,3,1])))},{id:"puppet",name:"Puppet",import:(()=>c(()=>import("./puppet-BMWR74SV.js"),[]))},{id:"purescript",name:"PureScript",import:(()=>c(()=>import("./purescript-CklMAg4u.js"),[]))},{id:"python",name:"Python",aliases:["py"],import:(()=>c(()=>import("./python-B6aJPvgy.js"),[]))},{id:"qml",name:"QML",import:(()=>c(()=>import("./qml-3beO22l8.js"),__vite__mapDeps([95,2])))},{id:"qmldir",name:"QML Directory",import:(()=>c(()=>import("./qmldir-C8lEn-DE.js"),[]))},{id:"qss",name:"Qt Style Sheets",import:(()=>c(()=>import("./qss-IeuSbFQv.js"),[]))},{id:"r",name:"R",import:(()=>c(()=>import("./r-Cf5RLm7j.js"),[]))},{id:"racket",name:"Racket",import:(()=>c(()=>import("./racket-BqYA7rlc.js"),[]))},{id:"raku",name:"Raku",aliases:["perl6"],import:(()=>c(()=>import("./raku-DXvB9xmW.js"),[]))},{id:"razor",name:"ASP.NET Razor",import:(()=>c(()=>import("./razor-BjBPvh-w.js"),__vite__mapDeps([96,1,2,3,89])))},{id:"rbs",name:"RBS",aliases:["ruby-signature"],import:(()=>c(()=>import("./rbs-CpoqiR4B.js"),[]))},{id:"reg",name:"Windows Registry Script",import:(()=>c(()=>import("./reg-C-SQnVFl.js"),[]))},{id:"regexp",name:"RegExp",aliases:["regex"],import:(()=>c(()=>import("./regexp-CDVJQ6XC.js"),[]))},{id:"rel",name:"Rel",import:(()=>c(()=>import("./rel-C3B-1QV4.js"),[]))},{id:"riscv",name:"RISC-V",import:(()=>c(()=>import("./riscv-BM1_JUlF.js"),[]))},{id:"ron",name:"RON",import:(()=>c(()=>import("./ron-D8l8udqQ.js"),[]))},{id:"rosmsg",name:"ROS Interface",import:(()=>c(()=>import("./rosmsg-BJDFO7_C.js"),[]))},{id:"rst",name:"reStructuredText",import:(()=>c(()=>import("./rst-bs7f0vWN.js"),__vite__mapDeps([97,15,1,2,3,25,26,27,22,20,29,39,98,34,35,7,8,16,36,11,37,13,38])))},{id:"ruby",name:"Ruby",aliases:["rb"],import:(()=>c(()=>import("./ruby-C0TQ7zu5.js"),__vite__mapDeps([34,1,2,3,35,7,8,16,36,11,37,13,25,26,27,22,29,38,39])))},{id:"rust",name:"Rust",aliases:["rs"],import:(()=>c(()=>import("./rust-B1yitclQ.js"),[]))},{id:"sas",name:"SAS",import:(()=>c(()=>import("./sas-DEy46yEz.js"),__vite__mapDeps([99,16])))},{id:"sass",name:"Sass",import:(()=>c(()=>import("./sass-Cj5Yp3dK.js"),[]))},{id:"scala",name:"Scala",import:(()=>c(()=>import("./scala-CqE71os6.js"),[]))},{id:"scheme",name:"Scheme",import:(()=>c(()=>import("./scheme-C98Dy4si.js"),[]))},{id:"scss",name:"SCSS",import:(()=>c(()=>import("./scss-D5BDwBP9.js"),__vite__mapDeps([5,3])))},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:(()=>c(()=>import("./sdbl-DVxCFoDh.js"),[]))},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:(()=>c(()=>import("./shaderlab-Dg9Lc6iA.js"),__vite__mapDeps([100,101])))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:(()=>c(()=>import("./shellscript-Yzrsuije.js"),[]))},{id:"shellsession",name:"Shell Session",aliases:["console"],import:(()=>c(()=>import("./shellsession-BADoaaVG.js"),__vite__mapDeps([102,29])))},{id:"smalltalk",name:"GNU Smalltalk",import:(()=>c(()=>import("./smalltalk-BOQMe2GC.js"),[]))},{id:"smithy",name:"Smithy",import:(()=>c(()=>import("./smithy-cds9vsN8.js"),[]))},{id:"solidity",name:"Solidity",import:(()=>c(()=>import("./solidity-DijEV5ha.js"),[]))},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:(()=>c(()=>import("./soy-8wufbnw4.js"),__vite__mapDeps([103,1,2,3])))},{id:"sparql",name:"SPARQL",import:(()=>c(()=>import("./sparql-rVzFXLq3.js"),__vite__mapDeps([104,105])))},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:(()=>c(()=>import("./splunk-BtCnVYZw.js"),[]))},{id:"sql",name:"SQL",import:(()=>c(()=>import("./sql-CRqJ_cUM.js"),[]))},{id:"ssh-config",name:"SSH Config",import:(()=>c(()=>import("./ssh-config-_ykCGR6B.js"),[]))},{id:"stata",name:"Stata",import:(()=>c(()=>import("./stata-DI20mbqo.js"),__vite__mapDeps([106,16])))},{id:"stylus",name:"Stylus",aliases:["styl"],import:(()=>c(()=>import("./stylus-BEDo0Tqx.js"),[]))},{id:"surrealql",name:"SurrealQL",aliases:["surql"],import:(()=>c(()=>import("./surrealql-Cjom0U5J.js"),__vite__mapDeps([107,2])))},{id:"svelte",name:"Svelte",import:(()=>c(()=>import("./svelte-Cy7k_4gC.js"),__vite__mapDeps([108,2,11,3,12])))},{id:"swift",name:"Swift",import:(()=>c(()=>import("./swift-C2oV4EkX.js"),[]))},{id:"system-verilog",name:"SystemVerilog",import:(()=>c(()=>import("./system-verilog-0hqHdDBg.js"),[]))},{id:"systemd",name:"Systemd Units",import:(()=>c(()=>import("./systemd-4A_iFExJ.js"),[]))},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:(()=>c(()=>import("./talonscript-CkByrt1z.js"),[]))},{id:"tasl",name:"Tasl",import:(()=>c(()=>import("./tasl-QIJgUcNo.js"),[]))},{id:"tcl",name:"Tcl",import:(()=>c(()=>import("./tcl-dwOrl1Do.js"),[]))},{id:"templ",name:"Templ",import:(()=>c(()=>import("./templ-DhtptRzy.js"),__vite__mapDeps([109,84,2,3])))},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:(()=>c(()=>import("./terraform-BETggiCN.js"),[]))},{id:"tex",name:"TeX",import:(()=>c(()=>import("./tex-D96PA37w.js"),__vite__mapDeps([67,63])))},{id:"toml",name:"TOML",import:(()=>c(()=>import("./toml-vGWfd6FD.js"),[]))},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:(()=>c(()=>import("./ts-tags-D351s5mN.js"),__vite__mapDeps([110,11,3,2,27,22,1,16,7,8])))},{id:"tsv",name:"TSV",import:(()=>c(()=>import("./tsv-B_m7g4N7.js"),[]))},{id:"tsx",name:"TSX",import:(()=>c(()=>import("./tsx-COt5Ahok.js"),[]))},{id:"turtle",name:"Turtle",import:(()=>c(()=>import("./turtle-BsS91CYL.js"),[]))},{id:"twig",name:"Twig",import:(()=>c(()=>import("./twig-27uCiNez.js"),__vite__mapDeps([111,3,2,5,79,1,7,8,16,9,20,34,35,36,11,37,13,25,26,27,22,29,38,39])))},{id:"typescript",name:"TypeScript",aliases:["ts","cts","mts"],import:(()=>c(()=>import("./typescript-BPQ3VLAy.js"),[]))},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:(()=>c(()=>import("./typespec-CAFt9gP4.js"),[]))},{id:"typst",name:"Typst",aliases:["typ"],import:(()=>c(()=>import("./typst-BUadGCkm.js"),__vite__mapDeps([112,113,114,22,81,24,2,25,26,27,3,89,90,49,83,31,1,40,41,44,48,50,29,84,85,54,39,77,8,115,9,62,20,63,16,66,67,70,116,38,78,82,65,7,86,79,117,94,34,35,36,11,37,13,5,118,93,87,88,111,119,120,80])))},{id:"v",name:"V",import:(()=>c(()=>import("./v-BGw2Nkan.js"),[]))},{id:"vala",name:"Vala",import:(()=>c(()=>import("./vala-CsfeWuGM.js"),[]))},{id:"vb",name:"Visual Basic",import:(()=>c(()=>import("./vb-Cu-pLBUe.js"),[]))},{id:"verilog",name:"Verilog",import:(()=>c(()=>import("./verilog-nZwndyjY.js"),[]))},{id:"vhdl",name:"VHDL",import:(()=>c(()=>import("./vhdl-CeAyd5Ju.js"),[]))},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:(()=>c(()=>import("./viml-CJc9bBzg.js"),[]))},{id:"vue",name:"Vue",import:(()=>c(()=>import("./vue-BqiEGhQt.js"),__vite__mapDeps([121,3,2,11,9,1,15])))},{id:"vue-html",name:"Vue HTML",import:(()=>c(()=>import("./vue-html-AaS7Mt5G.js"),__vite__mapDeps([122,2])))},{id:"vue-vine",name:"Vue Vine",import:(()=>c(()=>import("./vue-vine-BoDAl6tE.js"),__vite__mapDeps([123,3,5,70,124,12,2])))},{id:"vyper",name:"Vyper",aliases:["vy"],import:(()=>c(()=>import("./vyper-CDx5xZoG.js"),[]))},{id:"wasm",name:"WebAssembly",import:(()=>c(()=>import("./wasm-MzD3tlZU.js"),[]))},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:(()=>c(()=>import("./wenyan-BV7otONQ.js"),[]))},{id:"wgsl",name:"WGSL",import:(()=>c(()=>import("./wgsl-Dx-B1_4e.js"),[]))},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:(()=>c(()=>import("./wikitext-BhOHFoWU.js"),[]))},{id:"wit",name:"WebAssembly Interface Types",import:(()=>c(()=>import("./wit-5i3qLPDT.js"),[]))},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:(()=>c(()=>import("./wolfram-lXgVvXCa.js"),[]))},{id:"xml",name:"XML",import:(()=>c(()=>import("./xml-sdJ4AIDG.js"),__vite__mapDeps([7,8])))},{id:"xsl",name:"XSL",import:(()=>c(()=>import("./xsl-CtQFsRM5.js"),__vite__mapDeps([93,7,8])))},{id:"yaml",name:"YAML",aliases:["yml"],import:(()=>c(()=>import("./yaml-Buea-lGh.js"),[]))},{id:"zenscript",name:"ZenScript",import:(()=>c(()=>import("./zenscript-DVFEvuxE.js"),[]))},{id:"zig",name:"Zig",import:(()=>c(()=>import("./zig-VOosw3JB.js"),[]))}],cr=Object.fromEntries(Yt.map(e=>[e.id,e.import])),dr=Object.fromEntries(Yt.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),pr={...cr,...dr},hr=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:(()=>c(()=>import("./andromeeda-C4gqWexZ.js"),[]))},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:(()=>c(()=>import("./aurora-x-D-2ljcwZ.js"),[]))},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:(()=>c(()=>import("./ayu-dark-DYE7WIF3.js"),[]))},{id:"ayu-light",displayName:"Ayu Light",type:"light",import:(()=>c(()=>import("./ayu-light-BA47KaF1.js"),[]))},{id:"ayu-mirage",displayName:"Ayu Mirage",type:"dark",import:(()=>c(()=>import("./ayu-mirage-32ctXXKs.js"),[]))},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:(()=>c(()=>import("./catppuccin-frappe-CZL1YF0i.js"),[]))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:(()=>c(()=>import("./catppuccin-latte-DH-8KZSZ.js"),[]))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:(()=>c(()=>import("./catppuccin-macchiato-B7yYVSCf.js"),[]))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:(()=>c(()=>import("./catppuccin-mocha-Ct7hS0mc.js"),[]))},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:(()=>c(()=>import("./dark-plus-C3mMm8J8.js"),[]))},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:(()=>c(()=>import("./dracula-BzJJZx-M.js"),[]))},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:(()=>c(()=>import("./dracula-soft-BXkSAIEj.js"),[]))},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:(()=>c(()=>import("./everforest-dark-BgDCqdQA.js"),[]))},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:(()=>c(()=>import("./everforest-light-C8M2exoo.js"),[]))},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:(()=>c(()=>import("./github-dark-DHJKELXO.js"),[]))},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:(()=>c(()=>import("./github-dark-default-Cuk6v7N8.js"),[]))},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:(()=>c(()=>import("./github-dark-dimmed-DH5Ifo-i.js"),[]))},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:(()=>c(()=>import("./github-dark-high-contrast-E3gJ1_iC.js"),[]))},{id:"github-light",displayName:"GitHub Light",type:"light",import:(()=>c(()=>import("./github-light-DAi9KRSo.js"),[]))},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:(()=>c(()=>import("./github-light-default-D7oLnXFd.js"),[]))},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:(()=>c(()=>import("./github-light-high-contrast-BfjtVDDH.js"),[]))},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:(()=>c(()=>import("./gruvbox-dark-hard-CFHQjOhq.js"),[]))},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:(()=>c(()=>import("./gruvbox-dark-medium-GsRaNv29.js"),[]))},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:(()=>c(()=>import("./gruvbox-dark-soft-CVdnzihN.js"),[]))},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:(()=>c(()=>import("./gruvbox-light-hard-CH1njM8p.js"),[]))},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:(()=>c(()=>import("./gruvbox-light-medium-DRw_LuNl.js"),[]))},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:(()=>c(()=>import("./gruvbox-light-soft-hJgmCMqR.js"),[]))},{id:"horizon",displayName:"Horizon",type:"dark",import:(()=>c(()=>import("./horizon-BUw7H-hv.js"),[]))},{id:"horizon-bright",displayName:"Horizon Bright",type:"light",import:(()=>c(()=>import("./horizon-bright-CUuTKBJd.js"),[]))},{id:"houston",displayName:"Houston",type:"dark",import:(()=>c(()=>import("./houston-DnULxvSX.js"),[]))},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:(()=>c(()=>import("./kanagawa-dragon-BuwD2xS4.js"),[]))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:(()=>c(()=>import("./kanagawa-lotus-C3DzagqV.js"),[]))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:(()=>c(()=>import("./kanagawa-wave-DFGoQZhC.js"),[]))},{id:"laserwave",displayName:"LaserWave",type:"dark",import:(()=>c(()=>import("./laserwave-DUszq2jm.js"),[]))},{id:"light-plus",displayName:"Light Plus",type:"light",import:(()=>c(()=>import("./light-plus-B7mTdjB0.js"),[]))},{id:"material-theme",displayName:"Material Theme",type:"dark",import:(()=>c(()=>import("./material-theme-D5KoaKCx.js"),[]))},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:(()=>c(()=>import("./material-theme-darker-BfHTSMKl.js"),[]))},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:(()=>c(()=>import("./material-theme-lighter-B0m2ddpp.js"),[]))},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:(()=>c(()=>import("./material-theme-ocean-CyktbL80.js"),[]))},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:(()=>c(()=>import("./material-theme-palenight-Csfq5Kiy.js"),[]))},{id:"min-dark",displayName:"Min Dark",type:"dark",import:(()=>c(()=>import("./min-dark-CafNBF8u.js"),[]))},{id:"min-light",displayName:"Min Light",type:"light",import:(()=>c(()=>import("./min-light-CTRr51gU.js"),[]))},{id:"monokai",displayName:"Monokai",type:"dark",import:(()=>c(()=>import("./monokai-BRVnQi9A.js"),[]))},{id:"night-owl",displayName:"Night Owl",type:"dark",import:(()=>c(()=>import("./night-owl-C39BiMTA.js"),[]))},{id:"night-owl-light",displayName:"Night Owl Light",type:"light",import:(()=>c(()=>import("./night-owl-light-CMTm3GFP.js"),[]))},{id:"nord",displayName:"Nord",type:"dark",import:(()=>c(()=>import("./nord-Ddv68eIx.js"),[]))},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:(()=>c(()=>import("./one-dark-pro-DVMEJ2y_.js"),[]))},{id:"one-light",displayName:"One Light",type:"light",import:(()=>c(()=>import("./one-light-C3Wv6jpd.js"),[]))},{id:"plastic",displayName:"Plastic",type:"dark",import:(()=>c(()=>import("./plastic-3e1v2bzS.js"),[]))},{id:"poimandres",displayName:"Poimandres",type:"dark",import:(()=>c(()=>import("./poimandres-CS3Unz2-.js"),[]))},{id:"red",displayName:"Red",type:"dark",import:(()=>c(()=>import("./red-hvxz__6c.js"),[]))},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:(()=>c(()=>import("./rose-pine-5qJOZa0Y.js"),[]))},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:(()=>c(()=>import("./rose-pine-dawn-zx0QlTCp.js"),[]))},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:(()=>c(()=>import("./rose-pine-moon-C9pEdX9L.js"),[]))},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:(()=>c(()=>import("./slack-dark-BthQWCQV.js"),[]))},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:(()=>c(()=>import("./slack-ochin-DqwNpetd.js"),[]))},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:(()=>c(()=>import("./snazzy-light-Bw305WKR.js"),[]))},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:(()=>c(()=>import("./solarized-dark-CpvCGNkr.js"),[]))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:(()=>c(()=>import("./solarized-light-Dlz6yCKv.js"),[]))},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:(()=>c(()=>import("./synthwave-84-CbfX1IO0.js"),[]))},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:(()=>c(()=>import("./tokyo-night-hegEt444.js"),[]))},{id:"vesper",displayName:"Vesper",type:"dark",import:(()=>c(()=>import("./vesper-DRje8inN.js"),[]))},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:(()=>c(()=>import("./vitesse-black-Bkuqu6BP.js"),[]))},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:(()=>c(()=>import("./vitesse-dark-D0r3Knsf.js"),[]))},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:(()=>c(()=>import("./vitesse-light-CVO1_9PV.js"),[]))}],fr=Object.fromEntries(hr.map(e=>[e.id,e.import]));var Zt=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function Qi(){return 2147483648}function Ji(){return typeof performance<"u"?performance.now():Date.now()}const Yi=(e,t)=>e+(t-e%t)%t;async function Zi(e){let t,n;const r={};function i(h){n=h,r.HEAPU8=new Uint8Array(h),r.HEAPU32=new Uint32Array(h)}function o(h,m,E){r.HEAPU8.copyWithin(h,m,m+E)}function s(h){try{return t.grow(h-n.byteLength+65535>>>16),i(t.buffer),1}catch{}}function a(h){const m=r.HEAPU8.length;h=h>>>0;const E=Qi();if(h>E)return!1;for(let b=1;b<=4;b*=2){let g=m*(1+.2/b);g=Math.min(g,h+100663296);const _=Math.min(E,Yi(Math.max(h,g),65536));if(s(_))return!0}return!1}const l=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function u(h,m,E=1024){const b=m+E;let g=m;for(;h[g]&&!(g>=b);)++g;if(g-m>16&&h.buffer&&l)return l.decode(h.subarray(m,g));let _="";for(;m>10,56320|I&1023)}}return _}function p(h,m){return h?u(r.HEAPU8,h,m):""}const d={emscripten_get_now:Ji,emscripten_memcpy_big:o,emscripten_resize_heap:a,fd_write:()=>0};async function f(){const m=await e({env:d,wasi_snapshot_preview1:d});t=m.memory,i(t.buffer),Object.assign(r,m),r.UTF8ToString=p}return await f(),r}var eo=Object.defineProperty,to=(e,t,n)=>t in e?eo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,P=(e,t,n)=>to(e,typeof t!="symbol"?t+"":t,n);let D=null;function no(e){throw new Zt(e.UTF8ToString(e.getLastOnigError()))}class st{constructor(t){P(this,"utf16Length"),P(this,"utf8Length"),P(this,"utf16Value"),P(this,"utf8Value"),P(this,"utf16OffsetToUtf8"),P(this,"utf8OffsetToUtf16");const n=t.length,r=st._utf8ByteLength(t),i=r!==n,o=i?new Uint32Array(n+1):null;i&&(o[n]=r);const s=i?new Uint32Array(r+1):null;i&&(s[r]=n);const a=new Uint8Array(r);let l=0;for(let u=0;u=55296&&p<=56319&&u+1=56320&&h<=57343&&(d=(p-55296<<10)+65536|h-56320,f=!0)}i&&(o[u]=l,f&&(o[u+1]=l),d<=127?s[l+0]=u:d<=2047?(s[l+0]=u,s[l+1]=u):d<=65535?(s[l+0]=u,s[l+1]=u,s[l+2]=u):(s[l+0]=u,s[l+1]=u,s[l+2]=u,s[l+3]=u)),d<=127?a[l++]=d:d<=2047?(a[l++]=192|(d&1984)>>>6,a[l++]=128|(d&63)>>>0):d<=65535?(a[l++]=224|(d&61440)>>>12,a[l++]=128|(d&4032)>>>6,a[l++]=128|(d&63)>>>0):(a[l++]=240|(d&1835008)>>>18,a[l++]=128|(d&258048)>>>12,a[l++]=128|(d&4032)>>>6,a[l++]=128|(d&63)>>>0),f&&u++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=t,this.utf8Value=a,this.utf16OffsetToUtf8=o,this.utf8OffsetToUtf16=s}static _utf8ByteLength(t){let n=0;for(let r=0,i=t.length;r=55296&&o<=56319&&r+1=56320&&l<=57343&&(s=(o-55296<<10)+65536|l-56320,a=!0)}s<=127?n+=1:s<=2047?n+=2:s<=65535?n+=3:n+=4,a&&r++}return n}createString(t){const n=t.omalloc(this.utf8Length);return t.HEAPU8.set(this.utf8Value,n),n}}const at=class X{constructor(t){if(P(this,"id",++X.LAST_ID),P(this,"_onigBinding"),P(this,"content"),P(this,"utf16Length"),P(this,"utf8Length"),P(this,"utf16OffsetToUtf8"),P(this,"utf8OffsetToUtf16"),P(this,"ptr"),!D)throw new Zt("Must invoke loadWasm first.");this._onigBinding=D,this.content=t;const n=new st(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!X._sharedPtrInUse?(X._sharedPtr||(X._sharedPtr=D.omalloc(1e4)),X._sharedPtrInUse=!0,D.HEAPU8.set(n.utf8Value,X._sharedPtr),this.ptr=X._sharedPtr):this.ptr=n.createString(D)}convertUtf8OffsetToUtf16(t){return this.utf8OffsetToUtf16?t<0?0:t>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[t]:t}convertUtf16OffsetToUtf8(t){return this.utf16OffsetToUtf8?t<0?0:t>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[t]:t}dispose(){this.ptr===X._sharedPtr?X._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};P(at,"LAST_ID",0);P(at,"_sharedPtr",0);P(at,"_sharedPtrInUse",!1);let mr=at;class ro{constructor(t){if(P(this,"_onigBinding"),P(this,"_ptr"),!D)throw new Zt("Must invoke loadWasm first.");const n=[],r=[];for(let a=0,l=t.length;a{let r=e;return r=await r,typeof r=="function"&&(r=await r(n)),typeof r=="function"&&(r=await r(n)),io(r)?r=await r.instantiator(n):oo(r)?r=await r.default(n):(so(r)&&(r=r.data),ao(r)?typeof WebAssembly.instantiateStreaming=="function"?r=await uo(r)(n):r=await co(r)(n):lo(r)?r=await Et(r)(n):r instanceof WebAssembly.Module?r=await Et(r)(n):"default"in r&&r.default instanceof WebAssembly.Module&&(r=await Et(r.default)(n))),"instance"in r&&(r=r.instance),"exports"in r&&(r=r.exports),r})}return Ue=t(),Ue}function Et(e){return t=>WebAssembly.instantiate(e,t)}function uo(e){return t=>WebAssembly.instantiateStreaming(e,t)}function co(e){return async t=>{const n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}let gr;function po(e){gr=e}function ho(){return gr}async function _r(e){return e&&await en(e),{createScanner(t){return new ro(t.map(n=>typeof n=="string"?n:n.source))},createString(t){return new mr(t)}}}const fo=Object.freeze(Object.defineProperty({__proto__:null,createOnigurumaEngine:_r,getDefaultWasmLoader:ho,loadWasm:en,setDefaultWasmLoader:po},Symbol.toStringTag,{value:"Module"}));var yr=qi({});Ki(yr,fo);var S=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function mo(e){return tn(e)}function tn(e){return Array.isArray(e)?go(e):e instanceof RegExp?e:typeof e=="object"?_o(e):e}function go(e){let t=[];for(let n=0,r=e.length;n{for(let r in n)e[r]=n[r]}),e}function br(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return t===0?e:~t===e.length-1?br(e.substring(0,e.length-1)):e.substr(~t+1)}var bt=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,Fe=class{static hasCaptures(e){return e===null?!1:(bt.lastIndex=0,bt.test(e))}static replaceCaptures(e,t,n){return e.replace(bt,(r,i,o,s)=>{let a=n[parseInt(i||o,10)];if(a){let l=t.substring(a.start,a.end);for(;l[0]===".";)l=l.substring(1);switch(s){case"downcase":return l.toLowerCase();case"upcase":return l.toUpperCase();default:return l}}else return r})}};function wr(e,t){return et?1:0}function vr(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let i=0;ithis._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;const t=e.scopeName,r=this._cachedMatchRoot.get(t).find(i=>yo(e.parent,i.parentScopes));return r?new kr(r.fontStyle,r.foreground,r.background):null}},wt=class Xe{constructor(t,n){this.parent=t,this.scopeName=n}static push(t,n){for(const r of n)t=new Xe(t,r);return t}static from(...t){let n=null;for(let r=0;r"){if(n===t.length-1)return!1;r=t[++n],i=!0}for(;e&&!Eo(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function Eo(e,t){return t===e||e.startsWith(t)&&e[t.length]==="."}var kr=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function bo(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let i=0,o=t.length;i1&&(b=m.slice(0,m.length-1),b.reverse()),n[r++]=new wo(E,b,i,l,u,p)}}return n}var wo=class{constructor(e,t,n,r,i,o){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=i,this.background=o}},$=(e=>(e[e.NotSet=-1]="NotSet",e[e.None=0]="None",e[e.Italic=1]="Italic",e[e.Bold=2]="Bold",e[e.Underline=4]="Underline",e[e.Strikethrough=8]="Strikethrough",e))($||{});function vo(e,t){e.sort((l,u)=>{let p=wr(l.scope,u.scope);return p!==0||(p=vr(l.parentScopes,u.parentScopes),p!==0)?p:l.index-u.index});let n=0,r="#000000",i="#ffffff";for(;e.length>=1&&e[0].scope==="";){let l=e.shift();l.fontStyle!==-1&&(n=l.fontStyle),l.foreground!==null&&(r=l.foreground),l.background!==null&&(i=l.background)}let o=new Co(t),s=new kr(n,o.getId(r),o.getId(i)),a=new ko(new Nt(0,null,-1,0,0),[]);for(let l=0,u=e.length;lt?console.log("how did this happen?"):this.scopeDepth=t,n!==-1&&(this.fontStyle=n),r!==0&&(this.foreground=r),i!==0&&(this.background=i)}},ko=class Vt{constructor(t,n=[],r={}){this._mainRule=t,this._children=r,this._rulesWithParentScopes=n}_rulesWithParentScopes;static _cmpBySpecificity(t,n){if(t.scopeDepth!==n.scopeDepth)return n.scopeDepth-t.scopeDepth;let r=0,i=0;for(;t.parentScopes[r]===">"&&r++,n.parentScopes[i]===">"&&i++,!(r>=t.parentScopes.length||i>=n.parentScopes.length);){const o=n.parentScopes[i].length-t.parentScopes[r].length;if(o!==0)return o;r++,i++}return n.parentScopes.length-t.parentScopes.length}match(t){if(t!==""){let r=t.indexOf("."),i,o;if(r===-1?(i=t,o=""):(i=t.substring(0,r),o=t.substring(r+1)),this._children.hasOwnProperty(i))return this._children[i].match(o)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(Vt._cmpBySpecificity),n}insert(t,n,r,i,o,s){if(n===""){this._doInsertHere(t,r,i,o,s);return}let a=n.indexOf("."),l,u;a===-1?(l=n,u=""):(l=n.substring(0,a),u=n.substring(a+1));let p;this._children.hasOwnProperty(l)?p=this._children[l]:(p=new Vt(this._mainRule.clone(),Nt.cloneArr(this._rulesWithParentScopes)),this._children[l]=p),p.insert(t+1,u,r,i,o,s)}_doInsertHere(t,n,r,i,o){if(n===null){this._mainRule.acceptOverwrite(t,r,i,o);return}for(let s=0,a=this._rulesWithParentScopes.length;s>>0}static getTokenType(t){return(t&768)>>>8}static containsBalancedBrackets(t){return(t&1024)!==0}static getFontStyle(t){return(t&30720)>>>11}static getForeground(t){return(t&16744448)>>>15}static getBackground(t){return(t&4278190080)>>>24}static set(t,n,r,i,o,s,a){let l=U.getLanguageId(t),u=U.getTokenType(t),p=U.containsBalancedBrackets(t)?1:0,d=U.getFontStyle(t),f=U.getForeground(t),h=U.getBackground(t);return n!==0&&(l=n),r!==8&&(u=r),i!==null&&(p=i?1:0),o!==-1&&(d=o),s!==0&&(f=s),a!==0&&(h=a),(l<<0|u<<8|p<<10|d<<11|f<<15|h<<24)>>>0}};function Ye(e,t){const n=[],r=So(e);let i=r.next();for(;i!==null;){let l=0;if(i.length===2&&i.charAt(1)===":"){switch(i.charAt(0)){case"R":l=1;break;case"L":l=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=r.next()}let u=s();if(n.push({matcher:u,priority:l}),i!==",")break;i=r.next()}return n;function o(){if(i==="-"){i=r.next();const l=o();return u=>!!l&&!l(u)}if(i==="("){i=r.next();const l=a();return i===")"&&(i=r.next()),l}if(vn(i)){const l=[];do l.push(i),i=r.next();while(vn(i));return u=>t(l,u)}return null}function s(){const l=[];let u=o();for(;u;)l.push(u),u=o();return p=>l.every(d=>d(p))}function a(){const l=[];let u=s();for(;u&&(l.push(u),i==="|"||i===",");){do i=r.next();while(i==="|"||i===",");u=s()}return p=>l.some(d=>d(p))}}function vn(e){return!!e&&!!e.match(/[\w\.:]+/)}function So(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;const r=n[0];return n=t.exec(e),r}}}function Lr(e){typeof e.dispose=="function"&&e.dispose()}var Se=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},Lo=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},Ro=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){const t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},Io=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Se(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){const e=this.Q;this.Q=[];const t=new Ro;for(const n of e)To(n,this.initialScopeName,this.repo,t);for(const n of t.references)if(n instanceof Se){if(this.seenFullScopeRequests.has(n.scopeName))continue;this.seenFullScopeRequests.add(n.scopeName),this.Q.push(n)}else{if(this.seenFullScopeRequests.has(n.scopeName)||this.seenPartialScopeRequests.has(n.toKey()))continue;this.seenPartialScopeRequests.add(n.toKey()),this.Q.push(n)}}};function To(e,t,n,r){const i=n.lookup(e.scopeName);if(!i){if(e.scopeName===t)throw new Error(`No grammar provided for <${t}>`);return}const o=n.lookup(t);e instanceof Se?Ke({baseGrammar:o,selfGrammar:i},r):$t(e.ruleName,{baseGrammar:o,selfGrammar:i,repository:i.repository},r);const s=n.injections(e.scopeName);if(s)for(const a of s)r.add(new Se(a))}function $t(e,t,n){if(t.repository&&t.repository[e]){const r=t.repository[e];Ze([r],t,n)}}function Ke(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&Ze(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&Ze(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function Ze(e,t,n){for(const r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);const i=r.repository?Er({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&Ze(r.patterns,{...t,repository:i},n);const o=r.include;if(!o)continue;const s=Rr(o);switch(s.kind){case 0:Ke({...t,selfGrammar:t.baseGrammar},n);break;case 1:Ke(t,n);break;case 2:$t(s.ruleName,{...t,repository:i},n);break;case 3:case 4:const a=s.scopeName===t.selfGrammar.scopeName?t.selfGrammar:s.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(a){const l={baseGrammar:t.baseGrammar,selfGrammar:a,repository:i};s.kind===4?$t(s.ruleName,l,n):Ke(l,n)}else s.kind===4?n.add(new Lo(s.scopeName,s.ruleName)):n.add(new Se(s.scopeName));break}}}var Po=class{kind=0},Oo=class{kind=1},xo=class{constructor(e){this.ruleName=e}kind=2},Do=class{constructor(e){this.scopeName=e}kind=3},No=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function Rr(e){if(e==="$base")return new Po;if(e==="$self")return new Oo;const t=e.indexOf("#");if(t===-1)return new Do(e);if(t===0)return new xo(e.substring(1));{const n=e.substring(0,t),r=e.substring(t+1);return new No(n,r)}}var Vo=/\\(\d+)/,Cn=/\\(\d+)/g,$o=-1,Ir=-2;var Ne=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=Fe.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=Fe.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${br(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:Fe.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:Fe.replaceCaptures(this._contentName,e,t)}},Mo=class extends Ne{retokenizeCapturedWithRuleId;constructor(e,t,n,r,i){super(e,t,n,r),this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(e,t){throw new Error("Not supported!")}compile(e,t){throw new Error("Not supported!")}compileAG(e,t,n,r){throw new Error("Not supported!")}},Go=class extends Ne{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new Le(r,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Re,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},An=class extends Ne{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,r),this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(const n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Re,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Mt=class extends Ne{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i,o,s,a,l,u){super(e,t,n,r),this._begin=new Le(i,this.id),this.beginCaptures=o,this._end=new Le(s||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=a,this.applyEndPatternLast=l||!1,this.patterns=u.patterns,this.hasMissingPatterns=u.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Re;for(const n of this.patterns)e.getRule(n).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},et=class extends Ne{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,i,o,s,a,l){super(e,t,n,r),this._begin=new Le(i,this.id),this.beginCaptures=o,this.whileCaptures=a,this._while=new Le(s,Ir),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Re;for(const t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new Re,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||"￿"),this._cachedCompiledWhilePatterns}},Tr=class V{static createCaptureRule(t,n,r,i,o){return t.registerRule(s=>new Mo(n,s,r,i,o))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new Go(t.$vscodeTextmateLocation,t.id,t.name,t.match,V._compileCaptures(t.captures,n,r));if(typeof t.begin>"u"){t.repository&&(r=Er({},r,t.repository));let o=t.patterns;return typeof o>"u"&&t.include&&(o=[{include:t.include}]),new An(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,V._compilePatterns(o,n,r))}return t.while?new et(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,V._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,V._compileCaptures(t.whileCaptures||t.captures,n,r),V._compilePatterns(t.patterns,n,r)):new Mt(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,V._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,V._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,V._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let i=[];if(t){let o=0;for(const s in t){if(s==="$vscodeTextmateLocation")continue;const a=parseInt(s,10);a>o&&(o=a)}for(let s=0;s<=o;s++)i[s]=null;for(const s in t){if(s==="$vscodeTextmateLocation")continue;const a=parseInt(s,10);let l=0;t[s].patterns&&(l=V.getCompiledRuleId(t[s],n,r)),i[a]=V.createCaptureRule(n,t[s].$vscodeTextmateLocation,t[s].name,t[s].contentName,l)}}return i}static _compilePatterns(t,n,r){let i=[];if(t)for(let o=0,s=t.length;ot.substring(i.start,i.end));return Cn.lastIndex=0,this.source.replace(Cn,(i,o)=>Cr(r[parseInt(o,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let t=[],n=[],r=[],i=[],o,s,a,l;for(o=0,s=this.source.length;on.source);this._cached=new kn(e,t,this._items.map(n=>n.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){let r=this._items.map(i=>i.resolveAnchors(t,n));return new kn(e,r,this._items.map(i=>i.ruleId))}},kn=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const e=[];for(let t=0,n=this.rules.length;t{const n=this._scopeToLanguage(t),r=this._toStandardTokenType(t);return new vt(n,r)});_scopeToLanguage(t){return this._embeddedLanguagesMatcher.match(t)||0}_toStandardTokenType(t){const n=t.match(Gt.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},Uo=class{values;scopesRegExp;constructor(e){if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);const t=e.map(([n,r])=>Cr(n));t.sort(),t.reverse(),this.scopesRegExp=new RegExp(`^((${t.join(")|(")}))($|\\.)`,"")}}match(e){if(!this.scopesRegExp)return;const t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}},Sn=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function Or(e,t,n,r,i,o,s,a){const l=t.content.length;let u=!1,p=-1;if(s){const h=Fo(e,t,n,r,i,o);i=h.stack,r=h.linePos,n=h.isFirstLine,p=h.anchorPosition}const d=Date.now();for(;!u;){if(a!==0&&Date.now()-d>a)return new Sn(i,!0);f()}return new Sn(i,!1);function f(){const h=jo(e,t,n,r,i,p);if(!h){o.produce(i,l),u=!0;return}const m=h.captureIndices,E=h.matchedRuleId,b=m&&m.length>0?m[0].end>r:!1;if(E===$o){const g=i.getRule(e);o.produce(i,m[0].start),i=i.withContentNameScopesList(i.nameScopesList),Ce(e,t,n,i,o,g.endCaptures,m),o.produce(i,m[0].end);const _=i;if(i=i.parent,p=_.getAnchorPos(),!b&&_.getEnterPos()===r){i=_,o.produce(i,l),u=!0;return}}else{const g=e.getRule(E);o.produce(i,m[0].start);const _=i,w=g.getName(t.content,m),A=i.contentNameScopesList.pushAttributed(w,e);if(i=i.push(E,r,p,m[0].end===l,null,A,A),g instanceof Mt){const k=g;Ce(e,t,n,i,o,k.beginCaptures,m),o.produce(i,m[0].end),p=m[0].end;const I=k.getContentName(t.content,m),M=A.pushAttributed(I,e);if(i=i.withContentNameScopesList(M),k.endHasBackReferences&&(i=i.withEndRule(k.getEndWithResolvedBackReferences(t.content,m))),!b&&_.hasSameRuleAs(i)){i=i.pop(),o.produce(i,l),u=!0;return}}else if(g instanceof et){const k=g;Ce(e,t,n,i,o,k.beginCaptures,m),o.produce(i,m[0].end),p=m[0].end;const I=k.getContentName(t.content,m),M=A.pushAttributed(I,e);if(i=i.withContentNameScopesList(M),k.whileHasBackReferences&&(i=i.withEndRule(k.getWhileWithResolvedBackReferences(t.content,m))),!b&&_.hasSameRuleAs(i)){i=i.pop(),o.produce(i,l),u=!0;return}}else if(Ce(e,t,n,i,o,g.captures,m),o.produce(i,m[0].end),i=i.pop(),!b){i=i.safePop(),o.produce(i,l),u=!0;return}}m[0].end>r&&(r=m[0].end,n=!1)}}function Fo(e,t,n,r,i,o){let s=i.beginRuleCapturedEOL?0:-1;const a=[];for(let l=i;l;l=l.pop()){const u=l.getRule(e);u instanceof et&&a.push({rule:u,stack:l})}for(let l=a.pop();l;l=a.pop()){const{ruleScanner:u,findOptions:p}=zo(l.rule,e,l.stack.endRule,n,r===s),d=u.findNextMatchSync(t,r,p);if(d){if(d.ruleId!==Ir){i=l.stack.pop();break}d.captureIndices&&d.captureIndices.length&&(o.produce(l.stack,d.captureIndices[0].start),Ce(e,t,n,l.stack,o,l.rule.whileCaptures,d.captureIndices),o.produce(l.stack,d.captureIndices[0].end),s=d.captureIndices[0].end,d.captureIndices[0].end>r&&(r=d.captureIndices[0].end,n=!1))}else{i=l.stack.pop();break}}return{stack:i,linePos:r,anchorPosition:s,isFirstLine:n}}function jo(e,t,n,r,i,o){const s=Ho(e,t,n,r,i,o),a=e.getInjections();if(a.length===0)return s;const l=Wo(a,e,t,n,r,i,o);if(!l)return s;if(!s)return l;const u=s.captureIndices[0].start,p=l.captureIndices[0].start;return p=a)&&(a=w,l=_.captureIndices,u=_.ruleId,p=m.priority,a===i))break}return l?{priorityMatch:p===-1,captureIndices:l,matchedRuleId:u}:null}function xr(e,t,n,r,i){return{ruleScanner:e.compileAG(t,n,r,i),findOptions:0}}function zo(e,t,n,r,i){return{ruleScanner:e.compileWhileAG(t,n,r,i),findOptions:0}}function Ce(e,t,n,r,i,o,s){if(o.length===0)return;const a=t.content,l=Math.min(o.length,s.length),u=[],p=s[0].end;for(let d=0;dp)break;for(;u.length>0&&u[u.length-1].endPos<=h.start;)i.produceFromScopes(u[u.length-1].scopes,u[u.length-1].endPos),u.pop();if(u.length>0?i.produceFromScopes(u[u.length-1].scopes,h.start):i.produce(r,h.start),f.retokenizeCapturedWithRuleId){const E=f.getName(a,s),b=r.contentNameScopesList.pushAttributed(E,e),g=f.getContentName(a,s),_=b.pushAttributed(g,e),w=r.push(f.retokenizeCapturedWithRuleId,h.start,-1,!1,null,b,_),A=e.createOnigString(a.substring(0,h.end));Or(e,A,n&&h.start===0,h.start,w,i,!1,0),Lr(A);continue}const m=f.getName(a,s);if(m!==null){const b=(u.length>0?u[u.length-1].scopes:r.contentNameScopesList).pushAttributed(m,e);u.push(new qo(b,h.end))}}for(;u.length>0;)i.produceFromScopes(u[u.length-1].scopes,u[u.length-1].endPos),u.pop()}var qo=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function Xo(e,t,n,r,i,o,s,a){return new Qo(e,t,n,r,i,o,s,a)}function Ln(e,t,n,r,i){const o=Ye(t,tt),s=Tr.getCompiledRuleId(n,r,i.repository);for(const a of o)e.push({debugSelector:t,matcher:a.matcher,ruleId:s,grammar:i,priority:a.priority})}function tt(e,t){if(t.length{for(let i=n;in&&e.substr(0,n)===t&&e[n]==="."}var Qo=class{constructor(e,t,n,r,i,o,s,a){if(this._rootScopeName=e,this.balancedBracketSelectors=o,this._onigLib=a,this._basicScopeAttributesProvider=new Bo(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=s,this._grammar=Rn(t,null),this._injections=null,this._tokenTypeMatchers=[],i)for(const l of Object.keys(i)){const u=Ye(l,tt);for(const p of u)this._tokenTypeMatchers.push({matcher:p.matcher,type:i[l]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(const e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){const e={lookup:i=>i===this._rootScopeName?this._grammar:this.getExternalGrammar(i),injections:i=>this._grammarRepository.injections(i)},t=[],n=this._rootScopeName,r=e.lookup(n);if(r){const i=r.injections;if(i)for(let s in i)Ln(t,s,i[s],this,r);const o=this._grammarRepository.injections(n);o&&o.forEach(s=>{const a=this.getExternalGrammar(s);if(a){const l=a.injectionSelector;l&&Ln(t,l,a,this,a)}})}return t.sort((i,o)=>i.priority-o.priority),t}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(e){const t=++this._lastRuleId,n=e(t);return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[e]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){const n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=Rn(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){const r=this._tokenize(e,t,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(e,t,n=0){const r=this._tokenize(e,t,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(e,t,n,r){this._rootId===-1&&(this._rootId=Tr.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let i;if(!t||t===Bt.NULL){i=!0;const u=this._basicScopeAttributesProvider.getDefaultAttributes(),p=this.themeProvider.getDefaults(),d=le.set(0,u.languageId,u.tokenType,null,p.fontStyle,p.foregroundId,p.backgroundId),f=this.getRule(this._rootId).getName(null,null);let h;f?h=Ae.createRootAndLookUpScopeName(f,d,this):h=Ae.createRoot("unknown",d),t=new Bt(null,this._rootId,-1,-1,!1,null,h,h)}else i=!1,t.reset();e=e+` `;const o=this.createOnigString(e),s=o.content.length,a=new Yo(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),l=Or(this,o,i,0,t,a,!0,r);return Lr(o),{lineLength:s,lineTokens:a,ruleStack:l.stack,stoppedEarly:l.stoppedEarly}}};function Rn(e,t){return e=mo(e),e.repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var Ae=class K{constructor(t,n,r){this.parent=t,this.scopePath=n,this.tokenAttributes=r}static fromExtension(t,n){let r=t,i=t?.scopePath??null;for(const o of n)i=wt.push(i,o.scopeNames),r=new K(r,i,o.encodedTokenAttributes);return r}static createRoot(t,n){return new K(null,new wt(null,t),n)}static createRootAndLookUpScopeName(t,n,r){const i=r.getMetadataForScope(t),o=new wt(null,t),s=r.themeProvider.themeMatch(o),a=K.mergeAttributes(n,i,s);return new K(null,o,a)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return K.equals(this,t)}static equals(t,n){do{if(t===n||!t&&!n)return!0;if(!t||!n||t.scopeName!==n.scopeName||t.tokenAttributes!==n.tokenAttributes)return!1;t=t.parent,n=n.parent}while(!0)}static mergeAttributes(t,n,r){let i=-1,o=0,s=0;return r!==null&&(i=r.fontStyle,o=r.foregroundId,s=r.backgroundId),le.set(t,n.languageId,n.tokenType,null,i,o,s)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(" ")===-1)return K._pushAttributed(this,t,n);const r=t.split(/ /g);let i=this;for(const o of r)i=K._pushAttributed(i,o,n);return i}static _pushAttributed(t,n,r){const i=r.getMetadataForScope(n),o=t.scopePath.push(n),s=r.themeProvider.themeMatch(o),a=K.mergeAttributes(t.tokenAttributes,i,s);return new K(t,o,a)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(t){const n=[];let r=this;for(;r&&r!==t;)n.push({encodedTokenAttributes:r.tokenAttributes,scopeNames:r.scopePath.getExtensionIfDefined(r.parent?.scopePath??null)}),r=r.parent;return r===t?n.reverse():void 0}},Bt=class ie{constructor(t,n,r,i,o,s,a,l){this.parent=t,this.ruleId=n,this.beginRuleCapturedEOL=o,this.endRule=s,this.nameScopesList=a,this.contentNameScopesList=l,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=r,this._anchorPos=i}_stackElementBrand=void 0;static NULL=new ie(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return t===null?!1:ie._equals(this,t)}static _equals(t,n){return t===n?!0:this._structuralEquals(t,n)?Ae.equals(t.contentNameScopesList,n.contentNameScopesList):!1}static _structuralEquals(t,n){do{if(t===n||!t&&!n)return!0;if(!t||!n||t.depth!==n.depth||t.ruleId!==n.ruleId||t.endRule!==n.endRule)return!1;t=t.parent,n=n.parent}while(!0)}clone(){return this}static _reset(t){for(;t;)t._enterPos=-1,t._anchorPos=-1,t=t.parent}reset(){ie._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,i,o,s,a){return new ie(this,t,n,r,i,o,s,a)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(t){return t.getRule(this.ruleId)}toString(){const t=[];return this._writeString(t,0),"["+t.join(",")+"]"}_writeString(t,n){return this.parent&&(n=this.parent._writeString(t,n)),t[n++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,n}withContentNameScopesList(t){return this.contentNameScopesList===t?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,t)}withEndRule(t){return this.endRule===t?this:new ie(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(t){let n=this;for(;n&&n._enterPos===t._enterPos;){if(n.ruleId===t.ruleId)return!0;n=n.parent}return!1}toStateStackFrame(){return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(t,n){const r=Ae.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new ie(t,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,Ae.fromExtension(r,n.contentNameScopesList))}},Jo=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(n=>n==="*"?(this.allowAny=!0,[]):Ye(n,tt).map(r=>r.matcher)),this.unbalancedBracketScopes=t.flatMap(n=>Ye(n,tt).map(r=>r.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(const t of this.unbalancedBracketScopes)if(t(e))return!1;for(const t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},Yo=class{constructor(e,t,n,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let r=e?.tokenAttributes??0,i=!1;if(this.balancedBracketSelectors?.matchesAlways&&(i=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const o=e?.getScopeNames()??[];for(const s of this._tokenTypeOverrides)s.matcher(o)&&(r=le.set(r,0,s.type,null,-1,0,0));this.balancedBracketSelectors&&(i=this.balancedBracketSelectors.match(o))}if(i&&(r=le.set(r,0,8,i,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===r){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(r),this._lastTokenEndIndex=t;return}const n=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);const n=new Uint32Array(this._binaryTokens.length);for(let r=0,i=this._binaryTokens.length;r0;)s.Q.map(a=>this._loadSingleGrammar(a.scopeName)),s.processQueue();return this._grammarForScopeName(t,n,r,i,o)}_loadSingleGrammar(t){this._ensureGrammarCache.has(t)||(this._doLoadSingleGrammar(t),this._ensureGrammarCache.set(t,!0))}_doLoadSingleGrammar(t){const n=this._options.loadGrammar(t);if(n){const r=typeof this._options.getInjections=="function"?this._options.getInjections(t):void 0;this._syncRegistry.addGrammar(n,r)}}addGrammar(t,n=[],r=0,i=null){return this._syncRegistry.addGrammar(t,n),this._grammarForScopeName(t.scopeName,r,i)}_grammarForScopeName(t,n=0,r=null,i=null,o=null){return this._syncRegistry.grammarForScopeName(t,n,r,i,o)}},Ut=Bt.NULL;function Ie(e,t){const n=typeof e=="string"?{}:{...e.colorReplacements},r=typeof e=="string"?e:e.name;for(const[i,o]of Object.entries(t?.colorReplacements||{}))typeof o=="string"?n[i]=o:i===r&&Object.assign(n,o);return n}function ee(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function Dr(e){return Array.isArray(e)?e:[e]}async function nn(e){return Promise.resolve(typeof e=="function"?e():e).then(t=>t.default||t)}function Ve(e){return!e||["plaintext","txt","text","plain"].includes(e)}function rn(e){return e==="ansi"||Ve(e)}function $e(e){return e==="none"}function on(e){return $e(e)}const ts=/(\r?\n)/g;function Me(e,t=!1){if(e.length===0)return[["",0]];const n=e.split(ts);let r=0;const i=[];for(let o=0;o!l.name&&!l.scope):void 0;a?.settings?.foreground&&(r=a.settings.foreground),a?.settings?.background&&(n=a.settings.background),!r&&t?.colors?.["editor.foreground"]&&(r=t.colors["editor.foreground"]),!n&&t?.colors?.["editor.background"]&&(n=t.colors["editor.background"]),r||(r=t.type==="light"?In.light:In.dark),n||(n=t.type==="light"?Tn.light:Tn.dark),t.fg=r,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let i=0;const o=new Map;function s(a){if(o.has(a))return o.get(a);i+=1;const l=`#${i.toString(16).padStart(8,"0").toLowerCase()}`;return t.colorReplacements?.[`#${l}`]?s(a):(o.set(a,l),l)}t.settings=t.settings.map(a=>{const l=a.settings?.foreground&&!a.settings.foreground.startsWith("#"),u=a.settings?.background&&!a.settings.background.startsWith("#");if(!l&&!u)return a;const p={...a,settings:{...a.settings}};if(l){const d=s(a.settings.foreground);t.colorReplacements[d]=a.settings.foreground,p.settings.foreground=d}if(u){const d=s(a.settings.background);t.colorReplacements[d]=a.settings.background,p.settings.background=d}return p});for(const a of Object.keys(t.colors||{}))if((a==="editor.foreground"||a==="editor.background"||a.startsWith("terminal.ansi"))&&!t.colors[a]?.startsWith("#")){const l=s(t.colors[a]);t.colorReplacements[l]=t.colors[a],t.colors[a]=l}return Object.defineProperty(t,Pn,{enumerable:!1,writable:!1,value:!0}),t}async function Nr(e){return[...new Set((await Promise.all(e.filter(t=>!rn(t)).map(async t=>await nn(t).then(n=>Array.isArray(n)?n:[n])))).flat())]}async function Vr(e){return(await Promise.all(e.map(async t=>on(t)?null:lt(await nn(t))))).filter(t=>!!t)}function $r(e,t){if(!t)return e;if(t[e]){const n=new Set([e]);for(;t[e];){if(e=t[e],n.has(e))throw new S(`Circular alias \`${[...n].join(" -> ")} -> ${e}\``);n.add(e)}}return e}var ns=class extends es{_resolver;_themes;_langs;_alias;_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;constructor(e,t,n,r={}){super(e),this._resolver=e,this._themes=t,this._langs=n,this._alias=r,this._themes.map(i=>this.loadTheme(i)),this.loadLanguages(this._langs)}getTheme(e){return typeof e=="string"?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){const t=lt(e);return t.name&&(this._resolvedThemes.set(t.name,t),this._loadedThemesCache=null),t}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(e){let t=this._textmateThemeCache.get(e);t||(t=Je.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=$r(e,this._alias),this._resolvedGrammars.get(e)}loadLanguage(e){if(this.getGrammar(e.name))return;const t=new Set([...this._langMap.values()].filter(i=>i.embeddedLangsLazy?.includes(e.name)));this._resolver.addLanguage(e);const n={balancedBracketSelectors:e.balancedBracketSelectors||["*"],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);const r=this.loadGrammarWithConfiguration(e.scopeName,1,n);if(r.name=e.name,this._resolvedGrammars.set(e.name,r),e.aliases&&e.aliases.forEach(i=>{this._alias[i]=e.name}),this._loadedLanguagesCache=null,t.size)for(const i of t)this._resolvedGrammars.delete(i.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(i.scopeName),this._syncRegistry?._grammars?.delete(i.scopeName),this.loadLanguage(this._langMap.get(i.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(const r of e)this.resolveEmbeddedLanguages(r);const t=[...this._langGraph.entries()],n=t.filter(([r,i])=>!i);if(n.length){const r=t.filter(([i,o])=>o?(o.embeddedLanguages||o.embeddedLangs)?.some(s=>n.map(([a])=>a).includes(s)):!1).filter(i=>!n.includes(i));throw new S(`Missing languages ${n.map(([i])=>`\`${i}\``).join(", ")}, required by ${r.map(([i])=>`\`${i}\``).join(", ")}`)}for(const[r,i]of t)this._resolver.addLanguage(i);for(const[r,i]of t)this.loadLanguage(i)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(e){this._langMap.set(e.name,e),this._langGraph.set(e.name,e);const t=e.embeddedLanguages??e.embeddedLangs;if(t)for(const n of t)this._langGraph.set(n,this._langMap.get(n))}},rs=class{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(e,t){this._onigLib={createOnigScanner:n=>e.createScanner(n),createOnigString:n=>e.createString(n)},t.forEach(n=>this.addLanguage(n))}get onigLib(){return this._onigLib}getLangRegistration(e){return this._langs.get(e)}loadGrammar(e){return this._scopeToLang.get(e)}addLanguage(e){this._langs.set(e.name,e),e.aliases&&e.aliases.forEach(t=>{this._langs.set(t,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(t=>{this._injections.get(t)||this._injections.set(t,[]),this._injections.get(t).push(e.scopeName)})}getInjections(e){const t=e.split(".");let n=[];for(let r=1;r<=t.length;r++){const i=t.slice(0,r).join(".");n=[...n,...this._injections.get(i)||[]]}return n}};let ve=0;function ut(e){ve+=1,e.warnings!==!1&&ve>=10&&ve%10===0&&console.warn(`[Shiki] ${ve} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let t=!1;if(!e.engine)throw new S("`engine` option is required for synchronous mode");const n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(lt),i=new ns(new rs(e.engine,n),r,n,e.langAlias);let o;function s(_){return $r(_,e.langAlias)}function a(_){b();const w=i.getGrammar(typeof _=="string"?_:_.name);if(!w)throw new S(`Language \`${_}\` not found, you may need to load it first`);return w}function l(_){if(_==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};b();const w=i.getTheme(_);if(!w)throw new S(`Theme \`${_}\` not found, you may need to load it first`);return w}function u(_){b();const w=l(_);return o!==_&&(i.setTheme(w),o=_),{theme:w,colorMap:i.getColorMap()}}function p(){return b(),i.getLoadedThemes()}function d(){return b(),i.getLoadedLanguages()}function f(..._){b(),i.loadLanguages(_.flat(1))}async function h(..._){return f(await Nr(_))}function m(..._){b();for(const w of _.flat(1))i.loadTheme(w)}async function E(..._){return b(),m(await Vr(_))}function b(){if(t)throw new S("Shiki instance has been disposed")}function g(){t||(t=!0,i.dispose(),ve-=1)}return{setTheme:u,getTheme:l,getLanguage:a,getLoadedThemes:p,getLoadedLanguages:d,resolveLangAlias:s,loadLanguage:h,loadLanguageSync:f,loadTheme:E,loadThemeSync:m,dispose:g,[Symbol.dispose]:g}}const is=ut;async function sn(e){e.engine||console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[t,n,r]=await Promise.all([Vr(e.themes||[]),Nr(e.langs||[]),e.engine]);return ut({...e,themes:t,langs:n,engine:r})}const os=sn,Mr=new WeakMap;function ct(e,t){Mr.set(e,t)}function Te(e){return Mr.get(e)}var dt=class Gr{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(t,n){return new Gr(Object.fromEntries(Dr(n).map(r=>[r,Ut])),t)}constructor(...t){if(t.length===2){const[n,r]=t;this.lang=r,this._stacks=n}else{const[n,r,i]=t;this.lang=r,this._stacks={[i]:n}}}getInternalStack(t=this.theme){return this._stacks[t]}getScopes(t=this.theme){return ss(this._stacks[t])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function ss(e){const t=[],n=new Set;function r(i){if(n.has(i))return;n.add(i);const o=i?.nameScopesList?.scopeName;o&&t.push(o),i.parent&&r(i.parent)}return r(e),t}function as(e,t){if(!(e instanceof dt))throw new S("Invalid grammar state");return e.getInternalStack(t)}const ls=/,/,us=/ /;function Br(e,t,n={}){const{theme:r=e.getLoadedThemes()[0]}=n;if(Ve(e.resolveLangAlias(n.lang||"text"))||$e(r))return Me(t).map(a=>[{content:a[0],offset:a[1]}]);const{theme:i,colorMap:o}=e.setTheme(r),s=e.getLanguage(n.lang||"text");if(n.grammarState){if(n.grammarState.lang!==s.name)throw new S(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${s.name}"`);if(!n.grammarState.themes.includes(i.name))throw new S(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${i.name}"`)}return Fr(t,s,i,o,n)}function Ur(...e){if(e.length===2)return Te(e[1]);const[t,n,r={}]=e,{lang:i="text",theme:o=t.getLoadedThemes()[0]}=r;if(Ve(i)||$e(o))throw new S("Plain language does not have grammar state");if(i==="ansi")throw new S("ANSI language does not have grammar state");const{theme:s,colorMap:a}=t.setTheme(o),l=t.getLanguage(i);return new dt(an(n,l,s,a,r).stateStack,l.name,s.name)}function Fr(e,t,n,r,i){const o=an(e,t,n,r,i),s=new dt(o.stateStack,t.name,n.name);return ct(o.tokens,s),o.tokens}function an(e,t,n,r,i){const o=Ie(n,i),{tokenizeMaxLineLength:s=0,tokenizeTimeLimit:a=500,includeExplanation:l=!1}=i,u=Me(e);let p=i.grammarState?as(i.grammarState,n.name)??Ut:i.grammarContextCode!=null?an(i.grammarContextCode,t,n,r,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack:Ut,d=[];const f=[];for(let h=0,m=u.length;h0&&E.length>=s){d=[],f.push([{content:E,offset:b,color:"",fontStyle:0}]);continue}let g,_,w;l&&l!=="tokenType"&&(g=t.tokenizeLine(E,p,a),_=g.tokens,w=0);const A=t.tokenizeLine2(E,p,a),k=A.tokens.length/2;for(let I=0;Iyt.trim());break;case"object":pe=Q.scope;break;default:continue}En.push({settings:Q,selectors:pe.map(yt=>yt.split(us))})}q.explanation=[];let bn=0;for(;M+bn({scopeName:t}))}function ds(e,t){const n=[];for(let r=0,i=t.length;r=0&&i>=0;)On(e[r],n[i])&&(r-=1),i-=1;return r===-1}function hs(e,t,n){const r=[];for(const{selectors:i,settings:o}of e)for(const s of i)if(ps(s,t,n)){r.push(o);break}return r}function ln(e,t,n,r=Br){const i=Object.entries(n.themes).filter(u=>u[1]).map(u=>({color:u[0],theme:u[1]})),o=i.map(u=>{const p=r(e,t,{...n,theme:u.theme});return{tokens:p,state:Te(p),theme:typeof u.theme=="string"?u.theme:u.theme.name}}),s=fs(...o.map(u=>u.tokens)),a=s[0].map((u,p)=>u.map((d,f)=>{const h={content:d.content,variants:{},offset:d.offset};return"includeExplanation"in n&&n.includeExplanation&&(h.explanation=d.explanation),s.forEach((m,E)=>{const{content:b,explanation:g,offset:_,...w}=m[p][f];h.variants[i[E].color]=w}),h})),l=o[0].state?new dt(Object.fromEntries(o.map(u=>[u.theme,u.state?.getInternalStack(u.theme)])),o[0].state.lang):void 0;return l&&ct(a,l),a}function fs(...e){const t=e.map(()=>[]),n=e.length;for(let r=0;rl[r]),o=t.map(()=>[]);t.forEach((l,u)=>l.push(o[u]));const s=i.map(()=>0),a=i.map(l=>l[0]);for(;a.every(l=>l);){const l=Math.min(...a.map(u=>u.content.length));for(let u=0;u4&&n.slice(0,4)==="data"&&bs.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(Dn,Cs);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!Dn.test(o)){let s=o.replace(Es,vs);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=un}return new i(r,t)}function vs(e){return"-"+e.toLowerCase()}function Cs(e){return e.charAt(1).toUpperCase()}const As=jr([Hr,_s,qr,Xr,Kr],"html"),Qr=jr([Hr,ys,qr,Xr,Kr],"svg"),Nn={}.hasOwnProperty;function ks(e,t){const n=t||{};function r(i,...o){let s=r.invalid;const a=r.handlers;if(i&&Nn.call(i,e)){const l=String(i[e]);s=Nn.call(a,l)?a[l]:r.unknown}if(s)return s.call(this,i,...o)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const Ss=/["&'<>`]/g,Ls=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Rs=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,Is=/[|\\{}()[\]^$+*?.]/g,Vn=new WeakMap;function Ts(e,t){if(e=e.replace(t.subset?Ps(t.subset):Ss,r),t.subset||t.escapeOnly)return e;return e.replace(Ls,n).replace(Rs,r);function n(i,o,s){return t.format((i.charCodeAt(0)-55296)*1024+i.charCodeAt(1)-56320+65536,s.charCodeAt(o+2),t)}function r(i,o,s){return t.format(i.charCodeAt(0),s.charCodeAt(o+1),t)}}function Ps(e){let t=Vn.get(e);return t||(t=Os(e),Vn.set(e,t)),t}function Os(e){const t=[];let n=-1;for(;++n",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},Ms=["cent","copy","divide","gt","lt","not","para","times"],Jr={}.hasOwnProperty,Wt={};let je;for(je in At)Jr.call(At,je)&&(Wt[At[je]]=je);const Gs=/[^\dA-Za-z]/;function Bs(e,t,n,r){const i=String.fromCharCode(e);if(Jr.call(Wt,i)){const o=Wt[i],s="&"+o;return n&&$s.includes(o)&&!Ms.includes(o)&&(!r||t&&t!==61&&Gs.test(String.fromCharCode(t)))?s:s+";"}return""}function Us(e,t,n){let r=Ds(e,t,n.omitOptionalSemicolons),i;if((n.useNamedReferences||n.useShortestReferences)&&(i=Bs(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){const o=Vs(e,t,n.omitOptionalSemicolons);o.length|^->||--!>|"],Hs=["<",">"];function Ws(e,t,n,r){return r.settings.bogusComments?"":"";function i(o){return ye(o,Object.assign({},r.settings.characterReferences,{subset:Hs}))}}function zs(e,t,n,r){return""}function $n(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function qs(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function Xs(e){return e.join(" ").trim()}const Ks=/[ \t\n\f\r]/g;function cn(e){return typeof e=="object"?e.type==="text"?Mn(e.value):!1:Mn(e)}function Mn(e){return e.replace(Ks,"")===""}const x=Zr(1),Yr=Zr(-1),Qs=[];function Zr(e){return t;function t(n,r,i){const o=n?n.children:Qs;let s=(r||0)+e,a=o[s];if(!i)for(;a&&cn(a);)s+=e,a=o[s];return a}}const Js={}.hasOwnProperty;function ei(e){return t;function t(n,r,i){return Js.call(e,n.tagName)&&e[n.tagName](n,r,i)}}const dn=ei({body:Zs,caption:kt,colgroup:kt,dd:ra,dt:na,head:kt,html:Ys,li:ta,optgroup:ia,option:oa,p:ea,rp:Gn,rt:Gn,tbody:aa,td:Bn,tfoot:la,th:Bn,thead:sa,tr:ua});function kt(e,t,n){const r=x(n,t,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&cn(r.value.charAt(0)))}function Ys(e,t,n){const r=x(n,t);return!r||r.type!=="comment"}function Zs(e,t,n){const r=x(n,t);return!r||r.type!=="comment"}function ea(e,t,n){const r=x(n,t);return r?r.type==="element"&&(r.tagName==="address"||r.tagName==="article"||r.tagName==="aside"||r.tagName==="blockquote"||r.tagName==="details"||r.tagName==="div"||r.tagName==="dl"||r.tagName==="fieldset"||r.tagName==="figcaption"||r.tagName==="figure"||r.tagName==="footer"||r.tagName==="form"||r.tagName==="h1"||r.tagName==="h2"||r.tagName==="h3"||r.tagName==="h4"||r.tagName==="h5"||r.tagName==="h6"||r.tagName==="header"||r.tagName==="hgroup"||r.tagName==="hr"||r.tagName==="main"||r.tagName==="menu"||r.tagName==="nav"||r.tagName==="ol"||r.tagName==="p"||r.tagName==="pre"||r.tagName==="section"||r.tagName==="table"||r.tagName==="ul"):!n||!(n.type==="element"&&(n.tagName==="a"||n.tagName==="audio"||n.tagName==="del"||n.tagName==="ins"||n.tagName==="map"||n.tagName==="noscript"||n.tagName==="video"))}function ta(e,t,n){const r=x(n,t);return!r||r.type==="element"&&r.tagName==="li"}function na(e,t,n){const r=x(n,t);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function ra(e,t,n){const r=x(n,t);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function Gn(e,t,n){const r=x(n,t);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function ia(e,t,n){const r=x(n,t);return!r||r.type==="element"&&r.tagName==="optgroup"}function oa(e,t,n){const r=x(n,t);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function sa(e,t,n){const r=x(n,t);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function aa(e,t,n){const r=x(n,t);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function la(e,t,n){return!x(n,t)}function ua(e,t,n){const r=x(n,t);return!r||r.type==="element"&&r.tagName==="tr"}function Bn(e,t,n){const r=x(n,t);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}const ca=ei({body:ha,colgroup:fa,head:pa,html:da,tbody:ma});function da(e){const t=x(e,-1);return!t||t.type!=="comment"}function pa(e){const t=new Set;for(const r of e.children)if(r.type==="element"&&(r.tagName==="base"||r.tagName==="title")){if(t.has(r.tagName))return!1;t.add(r.tagName)}const n=e.children[0];return!n||n.type==="element"}function ha(e){const t=x(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&cn(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function fa(e,t,n){const r=Yr(n,t),i=x(e,-1,!0);return n&&r&&r.type==="element"&&r.tagName==="colgroup"&&dn(r,n.children.indexOf(r),n)?!1:!!(i&&i.type==="element"&&i.tagName==="col")}function ma(e,t,n){const r=Yr(n,t),i=x(e,-1);return n&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&dn(r,n.children.indexOf(r),n)?!1:!!(i&&i.type==="element"&&i.tagName==="tr")}const He={name:[[` \f\r &/=>`.split(""),` diff --git a/apps/pythinker-code/dist-web/assets/index-D9Nz1t7z.js b/apps/pythinker-code/dist-web/assets/index-XmhyfFRf.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/index-D9Nz1t7z.js rename to apps/pythinker-code/dist-web/assets/index-XmhyfFRf.js index 389e86117..0bb29b6f4 100644 --- a/apps/pythinker-code/dist-web/assets/index-D9Nz1t7z.js +++ b/apps/pythinker-code/dist-web/assets/index-XmhyfFRf.js @@ -1,4 +1,4 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DesignSystemView-CNvCSVFt.js","assets/DesignSystemView-I872M2Sr.css","assets/mhchem-DtR62fUK.js","assets/katex-DnlPpQZa.js","assets/mermaid.core-D6Xg32pF.js","assets/purify.es-5AjVNlXF.js","assets/CodeBlockNode-DAbIT1YQ.js","assets/safeRaf-DGuzXxDK.js","assets/index5-DA0ZmzsV.js","assets/index11-D2xpmxp_.js","assets/editor.main-CUgPnB4r.js","assets/editor-Ck3IbhyB.css"])))=>i.map(i=>d[i]); +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DesignSystemView-DX1VEaZQ.js","assets/DesignSystemView-I872M2Sr.css","assets/mhchem-DtR62fUK.js","assets/katex-DnlPpQZa.js","assets/mermaid.core-BLsmN-lt.js","assets/purify.es-5AjVNlXF.js","assets/CodeBlockNode-Bm1R5aPP.js","assets/safeRaf-DGuzXxDK.js","assets/index5-DqwQmWqe.js","assets/index11-Cvy8ghv4.js","assets/editor.main-CSd5xoJU.js","assets/editor-Ck3IbhyB.css"])))=>i.map(i=>d[i]); (function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))o(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const r of i.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&o(r)}).observe(document,{childList:!0,subtree:!0});function n(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function o(s){if(s.ep)return;s.ep=!0;const i=n(s);fetch(s.href,i)}})();/** * @vue/shared v3.5.35 * (c) 2018-present Yuxi (Evan) You and Vue contributors @@ -11,7 +11,7 @@ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DesignSystemVie * @vue/runtime-core v3.5.35 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/const $M=[];function _R(e){$M.push(e)}function xR(){$M.pop()}function TVe(e,t){}const IVe={SETUP_FUNCTION:0,0:"SETUP_FUNCTION",RENDER_FUNCTION:1,1:"RENDER_FUNCTION",NATIVE_EVENT_HANDLER:5,5:"NATIVE_EVENT_HANDLER",COMPONENT_EVENT_HANDLER:6,6:"COMPONENT_EVENT_HANDLER",VNODE_HOOK:7,7:"VNODE_HOOK",DIRECTIVE_HOOK:8,8:"DIRECTIVE_HOOK",TRANSITION_HOOK:9,9:"TRANSITION_HOOK",APP_ERROR_HANDLER:10,10:"APP_ERROR_HANDLER",APP_WARN_HANDLER:11,11:"APP_WARN_HANDLER",FUNCTION_REF:12,12:"FUNCTION_REF",ASYNC_COMPONENT_LOADER:13,13:"ASYNC_COMPONENT_LOADER",SCHEDULER:14,14:"SCHEDULER",COMPONENT_UPDATE:15,15:"COMPONENT_UPDATE",APP_UNMOUNT_CLEANUP:16,16:"APP_UNMOUNT_CLEANUP"},SR={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush",15:"component update",16:"app unmount cleanup function"};function Vd(e,t,n,o){try{return o?e(...o):e()}catch(s){f2(s,t,n)}}function br(e,t,n,o){if(wn(e)){const s=Vd(e,t,n,o);return s&&G7(s)&&s.catch(i=>{f2(i,t,n)}),s}if(en(e)){const s=[];for(let i=0;i>>1,s=ai[o],i=ad(s);i=ad(n)?ai.push(e):ai.splice(MR(t),0,e),e.flags|=1,zM()}}function zM(){L4||(L4=NM.then(BM))}function $4(e){en(e)?Nc.push(...e):za&&e.id===-1?za.splice(dc+1,0,e):e.flags&1||(Nc.push(e),e.flags|=1),zM()}function Yw(e,t,n=al+1){for(;nad(n)-ad(o));if(Nc.length=0,za){za.push(...t);return}for(za=t,dc=0;dce.id==null?e.flags&2?-1:1/0:e.id;function BM(e){try{for(al=0;alfc.emit(s,...i)),Zf=[]):typeof window<"u"&&window.HTMLElement&&!((o=(n=window.navigator)==null?void 0:n.userAgent)!=null&&o.includes("jsdom"))?((t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(i=>{RM(i,t)}),setTimeout(()=>{fc||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,Zf=[])},3e3)):Zf=[]}let Vs=null,fp=null;function cd(e){const t=Vs;return Vs=e,fp=e&&e.type.__scopeId||null,t}function LVe(e){fp=e}function $Ve(){fp=null}const NVe=e=>ue;function ue(e,t=Vs,n){if(!t||e._n)return e;const o=(...s)=>{o._d&&F4(-1);const i=cd(t);let r;try{r=e(...s)}finally{cd(i),o._d&&F4(1)}return r};return o._n=!0,o._c=!0,o._d=!0,o}function Un(e,t){if(Vs===null)return e;const n=Zd(Vs),o=e.dirs||(e.dirs=[]);for(let s=0;s1)return n&&wn(t)?t.call(o&&o.proxy):t}}function zVe(){return!!(fs()||u0)}const AR=Symbol.for("v-scx"),ER=()=>hn(AR);function jM(e,t){return Wd(e,null,t)}function BVe(e,t){return Wd(e,null,{flush:"post"})}function TR(e,t){return Wd(e,null,{flush:"sync"})}function Ze(e,t,n){return Wd(e,t,n)}function Wd(e,t,n=Fn){const{immediate:o,deep:s,flush:i,once:r}=n,l=lo({},n),a=t&&o||!t&&i!=="post";let c;if(v0){if(i==="sync"){const p=ER();c=p.__watcherHandles||(p.__watcherHandles=[])}else if(!a){const p=()=>{};return p.stop=yr,p.resume=yr,p.pause=yr,p}}const u=Ds;l.call=(p,h,m)=>br(p,u,h,m);let d=!1;i==="post"?l.scheduler=p=>{ss(p,u&&u.suspense)}:i!=="sync"&&(d=!0,l.scheduler=(p,h)=>{h?p():eg(p)}),l.augmentJob=p=>{t&&(p.flags|=4),d&&(p.flags|=2,u&&(p.id=u.uid,p.i=u))};const f=bR(e,t,l);return v0&&(c?c.push(f):a&&f()),f}function IR(e,t,n){const o=this.proxy,s=po(e)?e.includes(".")?FM(o,e):()=>o[e]:e.bind(o,o);let i;wn(t)?i=t:(i=t.handler,n=t);const r=p2(this),l=Wd(s,i.bind(o),n);return r(),l}function FM(e,t){const n=t.split(".");return()=>{let o=e;for(let s=0;se.__isTeleport,K1=e=>e&&(e.disabled||e.disabled===""),LR=e=>e&&(e.defer||e.defer===""),Xw=e=>typeof SVGElement<"u"&&e instanceof SVGElement,Jw=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Y8=(e,t)=>{const n=e&&e.to;return po(n)?t?t(n):null:n},$R={name:"Teleport",__isTeleport:!0,process(e,t,n,o,s,i,r,l,a,c){const{mc:u,pc:d,pbc:f,o:{insert:p,querySelector:h,createText:m,createComment:k,parentNode:x}}=c,v=K1(t.props);let{dynamicChildren:w}=t;const b=($,N,E)=>{$.shapeFlag&16&&u($.children,N,E,s,i,r,l,a)},M=($=t)=>{const N=K1($.props),E=$.target=Y8($.props,h),L=X8(E,$,m,p);E&&(r!=="svg"&&Xw(E)?r="svg":r!=="mathml"&&Jw(E)&&(r="mathml"),s&&s.isCE&&(s.ce._teleportTargets||(s.ce._teleportTargets=new Set)).add(E),N||(b($,E,L),yu($,!1)))},R=$=>{const N=()=>{if(Ta.get($)===N){if(Ta.delete($),K1($.props)){const E=x($.el)||n;b($,E,$.anchor),yu($,!0)}M($)}};Ta.set($,N),ss(N,i)};if(e==null){const $=t.el=m(""),N=t.anchor=m("");if(p($,n,o),p(N,n,o),LR(t.props)||i&&i.pendingBranch){R(t);return}v&&(b(t,n,N),yu(t,!0)),M()}else{t.el=e.el;const $=t.anchor=e.anchor,N=Ta.get(e);if(N){N.flags|=8,Ta.delete(e),R(t);return}t.targetStart=e.targetStart;const E=t.target=e.target,L=t.targetAnchor=e.targetAnchor,B=K1(e.props),C=B?n:E,O=B?$:L;if(r==="svg"||Xw(E)?r="svg":(r==="mathml"||Jw(E))&&(r="mathml"),w?(f(e.dynamicChildren,w,C,s,i,r,l),ug(e,t,!0)):a||d(e,t,C,O,s,i,r,l,!1),v)B?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Kf(t,n,$,c,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const W=t.target=Y8(t.props,h);W&&Kf(t,W,null,c,0)}else B&&Kf(t,E,L,c,1);yu(t,v)}},remove(e,t,n,{um:o,o:{remove:s}},i){const{shapeFlag:r,children:l,anchor:a,targetStart:c,targetAnchor:u,target:d,props:f}=e,p=i||!K1(f),h=Ta.get(e);if(h&&(h.flags|=8,Ta.delete(e)),d&&(s(c),s(u)),i&&s(a),!h&&r&16)for(let m=0;m{e.isMounted=!0}),ao(()=>{e.isUnmounting=!0}),e}const ir=[Function,Array],DM={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:ir,onEnter:ir,onAfterEnter:ir,onEnterCancelled:ir,onBeforeLeave:ir,onLeave:ir,onAfterLeave:ir,onLeaveCancelled:ir,onBeforeAppear:ir,onAppear:ir,onAfterAppear:ir,onAppearCancelled:ir},VM=e=>{const t=e.subTree;return t.component?VM(t.component):t},zR={name:"BaseTransition",props:DM,setup(e,{slots:t}){const n=fs(),o=HM();return()=>{const s=t.default&&tg(t.default(),!0),i=s&&s.length?WM(s):n.subTree?Q():void 0;if(!i)return;const r=Vn(e),{mode:l}=r;if(o.isLeaving)return eh(i);const a=Qw(i);if(!a)return eh(i);let c=ud(a,r,o,n,d=>c=d);a.type!==ls&&e1(a,c);let u=n.subTree&&Qw(n.subTree);if(u&&u.type!==ls&&!Or(u,a)&&VM(n).type!==ls){let d=ud(u,r,o,n);if(e1(u,d),l==="out-in"&&a.type!==ls)return o.isLeaving=!0,d.afterLeave=()=>{o.isLeaving=!1,n.job.flags&8||n.update(),delete d.afterLeave,u=void 0},eh(i);l==="in-out"&&a.type!==ls?d.delayLeave=(f,p,h)=>{const m=qM(o,u);m[String(u.key)]=u,f[dr]=()=>{p(),f[dr]=void 0,delete c.delayedLeave,u=void 0},c.delayedLeave=()=>{h(),delete c.delayedLeave,u=void 0}}:u=void 0}else u&&(u=void 0);return i}}};function WM(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==ls){t=n;break}}return t}const BR=zR;function qM(e,t){const{leavingVNodes:n}=e;let o=n.get(t.type);return o||(o=Object.create(null),n.set(t.type,o)),o}function ud(e,t,n,o,s){const{appear:i,mode:r,persisted:l=!1,onBeforeEnter:a,onEnter:c,onAfterEnter:u,onEnterCancelled:d,onBeforeLeave:f,onLeave:p,onAfterLeave:h,onLeaveCancelled:m,onBeforeAppear:k,onAppear:x,onAfterAppear:v,onAppearCancelled:w}=t,b=String(e.key),M=qM(n,e),R=(E,L)=>{E&&br(E,o,9,L)},$=(E,L)=>{const B=L[1];R(E,L),en(E)?E.every(C=>C.length<=1)&&B():E.length<=1&&B()},N={mode:r,persisted:l,beforeEnter(E){let L=a;if(!n.isMounted)if(i)L=k||a;else return;E[dr]&&E[dr](!0);const B=M[b];B&&Or(e,B)&&B.el[dr]&&B.el[dr](),R(L,[E])},enter(E){if(M[b]===e)return;let L=c,B=u,C=d;if(!n.isMounted)if(i)L=x||c,B=v||u,C=w||d;else return;let O=!1;E[X2]=D=>{O||(O=!0,D?R(C,[E]):R(B,[E]),N.delayedLeave&&N.delayedLeave(),E[X2]=void 0)};const W=E[X2].bind(null,!1);L?$(L,[E,W]):W()},leave(E,L){const B=String(e.key);if(E[X2]&&E[X2](!0),n.isUnmounting)return L();R(f,[E]);let C=!1;E[dr]=W=>{C||(C=!0,L(),W?R(m,[E]):R(h,[E]),E[dr]=void 0,M[B]===e&&delete M[B])};const O=E[dr].bind(null,!1);M[B]=e,p?$(p,[E,O]):O()},clone(E){const L=ud(E,t,n,o,s);return s&&s(L),L}};return N}function eh(e){if(qd(e))return e=ea(e),e.children=null,e}function Qw(e){if(!qd(e))return PM(e.type)&&e.children?WM(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&wn(n.default))return n.default()}}function e1(e,t){e.shapeFlag&6&&e.component?(e.transition=t,e1(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function tg(e,t=!1,n){let o=[],s=0;for(let i=0;i1)for(let i=0;in.value,set:i=>n.value=i})}return n}function ey(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}const z4=new WeakMap;function zc(e,t,n,o,s=!1){if(en(e)){e.forEach((m,k)=>zc(m,t&&(en(t)?t[k]:t),n,o,s));return}if(Gl(o)&&!s){o.shapeFlag&512&&o.type.__asyncResolved&&o.component.subTree.component&&zc(e,t,n,o.component.subTree);return}const i=o.shapeFlag&4?Zd(o.component):o.el,r=s?null:i,{i:l,r:a}=e,c=t&&t.r,u=l.refs===Fn?l.refs={}:l.refs,d=l.setupState,f=Vn(d),p=d===Fn?lM:m=>ey(u,m)?!1:Yn(f,m),h=(m,k)=>!(k&&ey(u,k));if(c!=null&&c!==a){if(ty(t),po(c))u[c]=null,p(c)&&(d[c]=null);else if(es(c)){const m=t;h(c,m.k)&&(c.value=null),m.k&&(u[m.k]=null)}}if(wn(a))Vd(a,l,12,[r,u]);else{const m=po(a),k=es(a);if(m||k){const x=()=>{if(e.f){const v=m?p(a)?d[a]:u[a]:h()||!e.k?a.value:u[e.k];if(s)en(v)&&K7(v,i);else if(en(v))v.includes(i)||v.push(i);else if(m)u[a]=[i],p(a)&&(d[a]=u[a]);else{const w=[i];h(a,e.k)&&(a.value=w),e.k&&(u[e.k]=w)}}else m?(u[a]=r,p(a)&&(d[a]=r)):k&&(h(a,e.k)&&(a.value=r),e.k&&(u[e.k]=r))};if(r){const v=()=>{x(),z4.delete(e)};v.id=-1,z4.set(e,v),ss(v,n)}else ty(e),x()}}}function ty(e){const t=z4.get(e);t&&(t.flags|=8,z4.delete(e))}let ny=!1;const J0=()=>{ny||(console.error("Hydration completed but contains mismatches."),ny=!0)},RR=e=>e.namespaceURI.includes("svg")&&e.tagName!=="foreignObject",jR=e=>e.namespaceURI.includes("MathML"),Gf=e=>{if(e.nodeType===1){if(RR(e))return"svg";if(jR(e))return"mathml"}},kc=e=>e.nodeType===8;function FR(e){const{mt:t,p:n,o:{patchProp:o,createText:s,nextSibling:i,parentNode:r,remove:l,insert:a,createComment:c}}=e,u=(w,b)=>{if(!b.hasChildNodes()){n(null,w,b),N4(),b._vnode=w;return}d(b.firstChild,w,null,null,null),N4(),b._vnode=w},d=(w,b,M,R,$,N=!1)=>{N=N||!!b.dynamicChildren;const E=kc(w)&&w.data==="[",L=()=>m(w,b,M,R,$,E),{type:B,ref:C,shapeFlag:O,patchFlag:W}=b;let D=w.nodeType;b.el=w,W===-2&&(N=!1,b.dynamicChildren=null);let A=null;switch(B){case Ua:D!==3?b.children===""?(a(b.el=s(""),r(w),w),A=w):A=L():(w.data!==b.children&&(J0(),w.data=b.children),A=i(w));break;case ls:v(w)?(A=i(w),x(b.el=w.content.firstChild,w,M)):D!==8||E?A=L():A=i(w);break;case Rc:if(E&&(w=i(w),D=w.nodeType),D===1||D===3){A=w;const j=!b.children.length;for(let F=0;F{N=N||!!b.dynamicChildren;const{type:E,props:L,patchFlag:B,shapeFlag:C,dirs:O,transition:W}=b,D=E==="input"||E==="option";if(D||B!==-1){O&&cl(b,null,M,"created");let A=!1;if(v(w)){A=uA(null,W)&&M&&M.vnode.props&&M.vnode.props.appear;const F=w.content.firstChild;if(A){const q=F.getAttribute("class");q&&(F.$cls=q),W.beforeEnter(F)}x(F,w,M),b.el=w=F}if(C&16&&!(L&&(L.innerHTML||L.textContent))){let F=p(w.firstChild,b,w,M,R,$,N);for(F&&!Yf(w,1)&&J0();F;){const q=F;F=F.nextSibling,l(q)}}else if(C&8){let F=b.children;F[0]===` +**/const $M=[];function _R(e){$M.push(e)}function xR(){$M.pop()}function TVe(e,t){}const IVe={SETUP_FUNCTION:0,0:"SETUP_FUNCTION",RENDER_FUNCTION:1,1:"RENDER_FUNCTION",NATIVE_EVENT_HANDLER:5,5:"NATIVE_EVENT_HANDLER",COMPONENT_EVENT_HANDLER:6,6:"COMPONENT_EVENT_HANDLER",VNODE_HOOK:7,7:"VNODE_HOOK",DIRECTIVE_HOOK:8,8:"DIRECTIVE_HOOK",TRANSITION_HOOK:9,9:"TRANSITION_HOOK",APP_ERROR_HANDLER:10,10:"APP_ERROR_HANDLER",APP_WARN_HANDLER:11,11:"APP_WARN_HANDLER",FUNCTION_REF:12,12:"FUNCTION_REF",ASYNC_COMPONENT_LOADER:13,13:"ASYNC_COMPONENT_LOADER",SCHEDULER:14,14:"SCHEDULER",COMPONENT_UPDATE:15,15:"COMPONENT_UPDATE",APP_UNMOUNT_CLEANUP:16,16:"APP_UNMOUNT_CLEANUP"},SR={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush",15:"component update",16:"app unmount cleanup function"};function Vd(e,t,n,o){try{return o?e(...o):e()}catch(s){f2(s,t,n)}}function br(e,t,n,o){if(wn(e)){const s=Vd(e,t,n,o);return s&&G7(s)&&s.catch(i=>{f2(i,t,n)}),s}if(en(e)){const s=[];for(let i=0;i>>1,s=ai[o],i=ad(s);i=ad(n)?ai.push(e):ai.splice(MR(t),0,e),e.flags|=1,zM()}}function zM(){L4||(L4=NM.then(BM))}function $4(e){en(e)?Nc.push(...e):za&&e.id===-1?za.splice(dc+1,0,e):e.flags&1||(Nc.push(e),e.flags|=1),zM()}function Yw(e,t,n=al+1){for(;nad(n)-ad(o));if(Nc.length=0,za){za.push(...t);return}for(za=t,dc=0;dce.id==null?e.flags&2?-1:1/0:e.id;function BM(e){try{for(al=0;alfc.emit(s,...i)),Zf=[]):typeof window<"u"&&window.HTMLElement&&!((o=(n=window.navigator)==null?void 0:n.userAgent)!=null&&o.includes("jsdom"))?((t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(i=>{RM(i,t)}),setTimeout(()=>{fc||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,Zf=[])},3e3)):Zf=[]}let Vs=null,fp=null;function cd(e){const t=Vs;return Vs=e,fp=e&&e.type.__scopeId||null,t}function LVe(e){fp=e}function $Ve(){fp=null}const NVe=e=>ue;function ue(e,t=Vs,n){if(!t||e._n)return e;const o=(...s)=>{o._d&&F4(-1);const i=cd(t);let r;try{r=e(...s)}finally{cd(i),o._d&&F4(1)}return r};return o._n=!0,o._c=!0,o._d=!0,o}function Zn(e,t){if(Vs===null)return e;const n=Zd(Vs),o=e.dirs||(e.dirs=[]);for(let s=0;s1)return n&&wn(t)?t.call(o&&o.proxy):t}}function zVe(){return!!(fs()||u0)}const AR=Symbol.for("v-scx"),ER=()=>hn(AR);function jM(e,t){return Wd(e,null,t)}function BVe(e,t){return Wd(e,null,{flush:"post"})}function TR(e,t){return Wd(e,null,{flush:"sync"})}function Ze(e,t,n){return Wd(e,t,n)}function Wd(e,t,n=Fn){const{immediate:o,deep:s,flush:i,once:r}=n,l=lo({},n),a=t&&o||!t&&i!=="post";let c;if(v0){if(i==="sync"){const p=ER();c=p.__watcherHandles||(p.__watcherHandles=[])}else if(!a){const p=()=>{};return p.stop=yr,p.resume=yr,p.pause=yr,p}}const u=Ds;l.call=(p,h,m)=>br(p,u,h,m);let d=!1;i==="post"?l.scheduler=p=>{ss(p,u&&u.suspense)}:i!=="sync"&&(d=!0,l.scheduler=(p,h)=>{h?p():eg(p)}),l.augmentJob=p=>{t&&(p.flags|=4),d&&(p.flags|=2,u&&(p.id=u.uid,p.i=u))};const f=bR(e,t,l);return v0&&(c?c.push(f):a&&f()),f}function IR(e,t,n){const o=this.proxy,s=po(e)?e.includes(".")?FM(o,e):()=>o[e]:e.bind(o,o);let i;wn(t)?i=t:(i=t.handler,n=t);const r=p2(this),l=Wd(s,i.bind(o),n);return r(),l}function FM(e,t){const n=t.split(".");return()=>{let o=e;for(let s=0;se.__isTeleport,K1=e=>e&&(e.disabled||e.disabled===""),LR=e=>e&&(e.defer||e.defer===""),Xw=e=>typeof SVGElement<"u"&&e instanceof SVGElement,Jw=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Y8=(e,t)=>{const n=e&&e.to;return po(n)?t?t(n):null:n},$R={name:"Teleport",__isTeleport:!0,process(e,t,n,o,s,i,r,l,a,c){const{mc:u,pc:d,pbc:f,o:{insert:p,querySelector:h,createText:m,createComment:k,parentNode:x}}=c,v=K1(t.props);let{dynamicChildren:w}=t;const b=($,N,E)=>{$.shapeFlag&16&&u($.children,N,E,s,i,r,l,a)},M=($=t)=>{const N=K1($.props),E=$.target=Y8($.props,h),L=X8(E,$,m,p);E&&(r!=="svg"&&Xw(E)?r="svg":r!=="mathml"&&Jw(E)&&(r="mathml"),s&&s.isCE&&(s.ce._teleportTargets||(s.ce._teleportTargets=new Set)).add(E),N||(b($,E,L),yu($,!1)))},R=$=>{const N=()=>{if(Ta.get($)===N){if(Ta.delete($),K1($.props)){const E=x($.el)||n;b($,E,$.anchor),yu($,!0)}M($)}};Ta.set($,N),ss(N,i)};if(e==null){const $=t.el=m(""),N=t.anchor=m("");if(p($,n,o),p(N,n,o),LR(t.props)||i&&i.pendingBranch){R(t);return}v&&(b(t,n,N),yu(t,!0)),M()}else{t.el=e.el;const $=t.anchor=e.anchor,N=Ta.get(e);if(N){N.flags|=8,Ta.delete(e),R(t);return}t.targetStart=e.targetStart;const E=t.target=e.target,L=t.targetAnchor=e.targetAnchor,B=K1(e.props),C=B?n:E,O=B?$:L;if(r==="svg"||Xw(E)?r="svg":(r==="mathml"||Jw(E))&&(r="mathml"),w?(f(e.dynamicChildren,w,C,s,i,r,l),ug(e,t,!0)):a||d(e,t,C,O,s,i,r,l,!1),v)B?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Kf(t,n,$,c,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const W=t.target=Y8(t.props,h);W&&Kf(t,W,null,c,0)}else B&&Kf(t,E,L,c,1);yu(t,v)}},remove(e,t,n,{um:o,o:{remove:s}},i){const{shapeFlag:r,children:l,anchor:a,targetStart:c,targetAnchor:u,target:d,props:f}=e,p=i||!K1(f),h=Ta.get(e);if(h&&(h.flags|=8,Ta.delete(e)),d&&(s(c),s(u)),i&&s(a),!h&&r&16)for(let m=0;m{e.isMounted=!0}),ao(()=>{e.isUnmounting=!0}),e}const ir=[Function,Array],DM={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:ir,onEnter:ir,onAfterEnter:ir,onEnterCancelled:ir,onBeforeLeave:ir,onLeave:ir,onAfterLeave:ir,onLeaveCancelled:ir,onBeforeAppear:ir,onAppear:ir,onAfterAppear:ir,onAppearCancelled:ir},VM=e=>{const t=e.subTree;return t.component?VM(t.component):t},zR={name:"BaseTransition",props:DM,setup(e,{slots:t}){const n=fs(),o=HM();return()=>{const s=t.default&&tg(t.default(),!0),i=s&&s.length?WM(s):n.subTree?Q():void 0;if(!i)return;const r=Vn(e),{mode:l}=r;if(o.isLeaving)return eh(i);const a=Qw(i);if(!a)return eh(i);let c=ud(a,r,o,n,d=>c=d);a.type!==ls&&e1(a,c);let u=n.subTree&&Qw(n.subTree);if(u&&u.type!==ls&&!Or(u,a)&&VM(n).type!==ls){let d=ud(u,r,o,n);if(e1(u,d),l==="out-in"&&a.type!==ls)return o.isLeaving=!0,d.afterLeave=()=>{o.isLeaving=!1,n.job.flags&8||n.update(),delete d.afterLeave,u=void 0},eh(i);l==="in-out"&&a.type!==ls?d.delayLeave=(f,p,h)=>{const m=qM(o,u);m[String(u.key)]=u,f[dr]=()=>{p(),f[dr]=void 0,delete c.delayedLeave,u=void 0},c.delayedLeave=()=>{h(),delete c.delayedLeave,u=void 0}}:u=void 0}else u&&(u=void 0);return i}}};function WM(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==ls){t=n;break}}return t}const BR=zR;function qM(e,t){const{leavingVNodes:n}=e;let o=n.get(t.type);return o||(o=Object.create(null),n.set(t.type,o)),o}function ud(e,t,n,o,s){const{appear:i,mode:r,persisted:l=!1,onBeforeEnter:a,onEnter:c,onAfterEnter:u,onEnterCancelled:d,onBeforeLeave:f,onLeave:p,onAfterLeave:h,onLeaveCancelled:m,onBeforeAppear:k,onAppear:x,onAfterAppear:v,onAppearCancelled:w}=t,b=String(e.key),M=qM(n,e),R=(E,L)=>{E&&br(E,o,9,L)},$=(E,L)=>{const B=L[1];R(E,L),en(E)?E.every(C=>C.length<=1)&&B():E.length<=1&&B()},N={mode:r,persisted:l,beforeEnter(E){let L=a;if(!n.isMounted)if(i)L=k||a;else return;E[dr]&&E[dr](!0);const B=M[b];B&&Or(e,B)&&B.el[dr]&&B.el[dr](),R(L,[E])},enter(E){if(M[b]===e)return;let L=c,B=u,C=d;if(!n.isMounted)if(i)L=x||c,B=v||u,C=w||d;else return;let O=!1;E[X2]=D=>{O||(O=!0,D?R(C,[E]):R(B,[E]),N.delayedLeave&&N.delayedLeave(),E[X2]=void 0)};const W=E[X2].bind(null,!1);L?$(L,[E,W]):W()},leave(E,L){const B=String(e.key);if(E[X2]&&E[X2](!0),n.isUnmounting)return L();R(f,[E]);let C=!1;E[dr]=W=>{C||(C=!0,L(),W?R(m,[E]):R(h,[E]),E[dr]=void 0,M[B]===e&&delete M[B])};const O=E[dr].bind(null,!1);M[B]=e,p?$(p,[E,O]):O()},clone(E){const L=ud(E,t,n,o,s);return s&&s(L),L}};return N}function eh(e){if(qd(e))return e=ea(e),e.children=null,e}function Qw(e){if(!qd(e))return PM(e.type)&&e.children?WM(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&wn(n.default))return n.default()}}function e1(e,t){e.shapeFlag&6&&e.component?(e.transition=t,e1(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function tg(e,t=!1,n){let o=[],s=0;for(let i=0;i1)for(let i=0;in.value,set:i=>n.value=i})}return n}function ey(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}const z4=new WeakMap;function zc(e,t,n,o,s=!1){if(en(e)){e.forEach((m,k)=>zc(m,t&&(en(t)?t[k]:t),n,o,s));return}if(Gl(o)&&!s){o.shapeFlag&512&&o.type.__asyncResolved&&o.component.subTree.component&&zc(e,t,n,o.component.subTree);return}const i=o.shapeFlag&4?Zd(o.component):o.el,r=s?null:i,{i:l,r:a}=e,c=t&&t.r,u=l.refs===Fn?l.refs={}:l.refs,d=l.setupState,f=Vn(d),p=d===Fn?lM:m=>ey(u,m)?!1:Yn(f,m),h=(m,k)=>!(k&&ey(u,k));if(c!=null&&c!==a){if(ty(t),po(c))u[c]=null,p(c)&&(d[c]=null);else if(es(c)){const m=t;h(c,m.k)&&(c.value=null),m.k&&(u[m.k]=null)}}if(wn(a))Vd(a,l,12,[r,u]);else{const m=po(a),k=es(a);if(m||k){const x=()=>{if(e.f){const v=m?p(a)?d[a]:u[a]:h()||!e.k?a.value:u[e.k];if(s)en(v)&&K7(v,i);else if(en(v))v.includes(i)||v.push(i);else if(m)u[a]=[i],p(a)&&(d[a]=u[a]);else{const w=[i];h(a,e.k)&&(a.value=w),e.k&&(u[e.k]=w)}}else m?(u[a]=r,p(a)&&(d[a]=r)):k&&(h(a,e.k)&&(a.value=r),e.k&&(u[e.k]=r))};if(r){const v=()=>{x(),z4.delete(e)};v.id=-1,z4.set(e,v),ss(v,n)}else ty(e),x()}}}function ty(e){const t=z4.get(e);t&&(t.flags|=8,z4.delete(e))}let ny=!1;const J0=()=>{ny||(console.error("Hydration completed but contains mismatches."),ny=!0)},RR=e=>e.namespaceURI.includes("svg")&&e.tagName!=="foreignObject",jR=e=>e.namespaceURI.includes("MathML"),Gf=e=>{if(e.nodeType===1){if(RR(e))return"svg";if(jR(e))return"mathml"}},kc=e=>e.nodeType===8;function FR(e){const{mt:t,p:n,o:{patchProp:o,createText:s,nextSibling:i,parentNode:r,remove:l,insert:a,createComment:c}}=e,u=(w,b)=>{if(!b.hasChildNodes()){n(null,w,b),N4(),b._vnode=w;return}d(b.firstChild,w,null,null,null),N4(),b._vnode=w},d=(w,b,M,R,$,N=!1)=>{N=N||!!b.dynamicChildren;const E=kc(w)&&w.data==="[",L=()=>m(w,b,M,R,$,E),{type:B,ref:C,shapeFlag:O,patchFlag:W}=b;let D=w.nodeType;b.el=w,W===-2&&(N=!1,b.dynamicChildren=null);let A=null;switch(B){case Ua:D!==3?b.children===""?(a(b.el=s(""),r(w),w),A=w):A=L():(w.data!==b.children&&(J0(),w.data=b.children),A=i(w));break;case ls:v(w)?(A=i(w),x(b.el=w.content.firstChild,w,M)):D!==8||E?A=L():A=i(w);break;case Rc:if(E&&(w=i(w),D=w.nodeType),D===1||D===3){A=w;const j=!b.children.length;for(let F=0;F{N=N||!!b.dynamicChildren;const{type:E,props:L,patchFlag:B,shapeFlag:C,dirs:O,transition:W}=b,D=E==="input"||E==="option";if(D||B!==-1){O&&cl(b,null,M,"created");let A=!1;if(v(w)){A=uA(null,W)&&M&&M.vnode.props&&M.vnode.props.appear;const F=w.content.firstChild;if(A){const q=F.getAttribute("class");q&&(F.$cls=q),W.beforeEnter(F)}x(F,w,M),b.el=w=F}if(C&16&&!(L&&(L.innerHTML||L.textContent))){let F=p(w.firstChild,b,w,M,R,$,N);for(F&&!Yf(w,1)&&J0();F;){const q=F;F=F.nextSibling,l(q)}}else if(C&8){let F=b.children;F[0]===` `&&(w.tagName==="PRE"||w.tagName==="TEXTAREA")&&(F=F.slice(1));const{textContent:q}=w;q!==F&&q!==F.replace(/\r\n|\r/g,` `)&&(Yf(w,0)||J0(),w.textContent=b.children)}if(L){if(D||!N||B&48){const F=w.tagName.includes("-");for(const q in L)(D&&(q.endsWith("value")||q==="indeterminate")||Dd(q)&&!a0(q)||q[0]==="."||F&&!a0(q))&&o(w,q,null,L[q],void 0,M)}else if(L.onClick)o(w,"onClick",null,L.onClick,void 0,M);else if(B&4&&qa(L.style))for(const F in L.style)L.style[F]}let j;(j=L&&L.onVnodeBeforeMount)&&ki(j,M,b),O&&cl(b,null,M,"beforeMount"),((j=L&&L.onVnodeMounted)||O||A)&&hA(()=>{j&&ki(j,M,b),A&&W.enter(w),O&&cl(b,null,M,"mounted")},R)}return w.nextSibling},p=(w,b,M,R,$,N,E)=>{E=E||!!b.dynamicChildren;const L=b.children,B=L.length;let C=!1;for(let O=0;O{const{slotScopeIds:E}=b;E&&($=$?$.concat(E):E);const L=r(w),B=p(i(w),b,L,M,R,$,N);return B&&kc(B)&&B.data==="]"?i(b.anchor=B):(J0(),a(b.anchor=c("]"),L,B),B)},m=(w,b,M,R,$,N)=>{if(Yf(w.parentElement,1)||J0(),b.el=null,N){const B=k(w);for(;;){const C=i(w);if(C&&C!==B)l(C);else break}}const E=i(w),L=r(w);return l(w),n(null,b,L,E,M,R,Gf(L),$),M&&(M.vnode.el=b.el,mp(M,b.el)),E},k=(w,b="[",M="]")=>{let R=0;for(;w;)if(w=i(w),w&&kc(w)&&(w.data===b&&R++,w.data===M)){if(R===0)return i(w);R--}return w},x=(w,b,M)=>{const R=b.parentNode;R&&R.replaceChild(w,b);let $=M;for(;$;)$.vnode.el===b&&($.vnode.el=$.subTree.el=w),$=$.parent},v=w=>w.nodeType===1&&w.tagName==="TEMPLATE";return[u,d]}const oy="data-allow-mismatch",OR={0:"text",1:"children",2:"class",3:"style",4:"attribute"};function Yf(e,t){if(t===0||t===1)for(;e&&!e.hasAttribute(oy);)e=e.parentElement;const n=e&&e.getAttribute(oy);if(n==null)return!1;if(n==="")return!0;{const o=n.split(",");return t===0&&o.includes("children")?!0:o.includes(OR[t])}}const PR=ip().requestIdleCallback||(e=>setTimeout(e,1)),HR=ip().cancelIdleCallback||(e=>clearTimeout(e)),jVe=(e=1e4)=>t=>{const n=PR(t,{timeout:e});return()=>HR(n)};function DR(e){const{top:t,left:n,bottom:o,right:s}=e.getBoundingClientRect(),{innerHeight:i,innerWidth:r}=window;return(t>0&&t0&&o0&&n0&&s(t,n)=>{const o=new IntersectionObserver(s=>{for(const i of s)if(i.isIntersecting){o.disconnect(),t();break}},e);return n(s=>{if(s instanceof Element){if(DR(s))return t(),o.disconnect(),!1;o.observe(s)}}),()=>o.disconnect()},OVe=e=>t=>{if(e){const n=matchMedia(e);if(n.matches)t();else return n.addEventListener("change",t,{once:!0}),()=>n.removeEventListener("change",t)}},PVe=(e=[])=>(t,n)=>{po(e)&&(e=[e]);let o=!1;const s=r=>{o||(o=!0,i(),t(),r.target.dispatchEvent(new r.constructor(r.type,r)))},i=()=>{n(r=>{for(const l of e)r.removeEventListener(l,s)})};return n(r=>{for(const l of e)r.addEventListener(l,s,{once:!0})}),i};function VR(e,t){if(kc(e)&&e.data==="["){let n=1,o=e.nextSibling;for(;o;){if(o.nodeType===1){if(t(o)===!1)break}else if(kc(o))if(o.data==="]"){if(--n===0)break}else o.data==="["&&n++;o=o.nextSibling}}else t(e)}const Gl=e=>!!e.type.__asyncLoader;function mr(e){wn(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:o,delay:s=200,hydrate:i,timeout:r,suspensible:l=!0,onError:a}=e;let c=null,u,d=0;const f=()=>(d++,c=null,p()),p=()=>{let h;return c||(h=c=t().catch(m=>{if(m=m instanceof Error?m:new Error(String(m)),a)return new Promise((k,x)=>{a(m,()=>k(f()),()=>x(m),d+1)});throw m}).then(m=>h!==c&&c?c:(m&&(m.__esModule||m[Symbol.toStringTag]==="Module")&&(m=m.default),u=m,m)))};return Ge({name:"AsyncComponentWrapper",__asyncLoader:p,__asyncHydrate(h,m,k){let x=!1;(m.bu||(m.bu=[])).push(()=>x=!0);const v=()=>{x||k()},w=i?()=>{const b=i(v,M=>VR(h,M));b&&(m.bum||(m.bum=[])).push(b)}:v;u?w():p().then(()=>!m.isUnmounted&&w())},get __asyncResolved(){return u},setup(){const h=Ds;if(ng(h),u)return()=>Xf(u,h);const m=w=>{c=null,f2(w,h,13,!o)};if(l&&h.suspense||v0)return p().then(w=>()=>Xf(w,h)).catch(w=>(m(w),()=>o?Z(o,{error:w}):null));const k=U(!1),x=U(),v=U(!!s);return s&&setTimeout(()=>{v.value=!1},s),r!=null&&setTimeout(()=>{if(!k.value&&!x.value){const w=new Error(`Async component timed out after ${r}ms.`);m(w),x.value=w}},r),p().then(()=>{k.value=!0,h.parent&&qd(h.parent.vnode)&&h.parent.update()}).catch(w=>{m(w),x.value=w}),()=>{if(k.value&&u)return Xf(u,h);if(x.value&&o)return Z(o,{error:x.value});if(n&&!v.value)return Xf(n,h)}}})}function Xf(e,t){const{ref:n,props:o,children:s,ce:i}=t.vnode,r=Z(e,o,s);return r.ref=n,r.ce=i,delete t.vnode.ce,r}const qd=e=>e.type.__isKeepAlive,WR={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const n=fs(),o=n.ctx;if(!o.renderer)return()=>{const v=t.default&&t.default();return v&&v.length===1?v[0]:v};const s=new Map,i=new Set;let r=null;const l=n.suspense,{renderer:{p:a,m:c,um:u,o:{createElement:d}}}=o,f=d("div");o.activate=(v,w,b,M,R)=>{const $=v.component;c(v,w,b,0,l),a($.vnode,v,w,b,$,l,M,v.slotScopeIds,R),ss(()=>{$.isDeactivated=!1,$.a&&$c($.a);const N=v.props&&v.props.onVnodeMounted;N&&ki(N,$.parent,v)},l)},o.deactivate=v=>{const w=v.component;R4(w.m),R4(w.a),c(v,f,null,1,l),ss(()=>{w.da&&$c(w.da);const b=v.props&&v.props.onVnodeUnmounted;b&&ki(b,w.parent,v),w.isDeactivated=!0},l)};function p(v){th(v),u(v,n,l,!0)}function h(v){s.forEach((w,b)=>{const M=rm(Gl(w)?w.type.__asyncResolved||{}:w.type);M&&!v(M)&&m(b)})}function m(v){const w=s.get(v);w&&(!r||!Or(w,r))?p(w):r&&th(r),s.delete(v),i.delete(v)}Ze(()=>[e.include,e.exclude],([v,w])=>{v&&h(b=>ku(v,b)),w&&h(b=>!ku(w,b))},{flush:"post",deep:!0});let k=null;const x=()=>{k!=null&&(j4(n.subTree.type)?ss(()=>{s.set(k,Jf(n.subTree))},n.subTree.suspense):s.set(k,Jf(n.subTree)))};return xn(x),og(x),ao(()=>{s.forEach(v=>{const{subTree:w,suspense:b}=n,M=Jf(w);if(v.type===M.type&&v.key===M.key){th(M);const R=M.component.da;R&&ss(R,b);return}p(v)})}),()=>{if(k=null,!t.default)return r=null;const v=t.default(),w=v[0];if(v.length>1)return r=null,v;if(!t1(w)||!(w.shapeFlag&4)&&!(w.shapeFlag&128))return r=null,w;let b=Jf(w);if(b.type===ls)return r=null,b;const M=b.type,R=rm(Gl(b)?b.type.__asyncResolved||{}:M),{include:$,exclude:N,max:E}=e;if($&&(!R||!ku($,R))||N&&R&&ku(N,R))return b.shapeFlag&=-257,r=b,w;const L=b.key==null?M:b.key,B=s.get(L);return b.el&&(b=ea(b),w.shapeFlag&128&&(w.ssContent=b)),k=L,B?(b.el=B.el,b.component=B.component,b.transition&&e1(b,b.transition),b.shapeFlag|=512,i.delete(L),i.add(L)):(i.add(L),E&&i.size>parseInt(E,10)&&m(i.values().next().value)),b.shapeFlag|=256,r=b,j4(w.type)?w:b}}},HVe=WR;function ku(e,t){return en(e)?e.some(n=>ku(n,t)):po(e)?e.split(",").includes(t):IB(e)?(e.lastIndex=0,e.test(t)):!1}function qR(e,t){UM(e,"a",t)}function UR(e,t){UM(e,"da",t)}function UM(e,t,n=Ds){const o=e.__wdc||(e.__wdc=()=>{let s=n;for(;s;){if(s.isDeactivated)return;s=s.parent}return e()});if(pp(t,o,n),n){let s=n.parent;for(;s&&s.parent;)qd(s.parent.vnode)&&ZR(o,t,n,s),s=s.parent}}function ZR(e,t,n,o){const s=pp(t,e,o,!0);An(()=>{K7(o[t],s)},n)}function th(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function Jf(e){return e.shapeFlag&128?e.ssContent:e}function pp(e,t,n=Ds,o=!1){if(n){const s=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...r)=>{Xl();const l=p2(n),a=br(t,n,e,r);return l(),Jl(),a});return o?s.unshift(i):s.push(i),i}}const aa=e=>(t,n=Ds)=>{(!v0||e==="sp")&&pp(e,(...o)=>t(...o),n)},KR=aa("bm"),xn=aa("m"),ZM=aa("bu"),og=aa("u"),ao=aa("bum"),An=aa("um"),GR=aa("sp"),YR=aa("rtg"),XR=aa("rtc");function JR(e,t=Ds){pp("ec",e,t)}const sg="components",QR="directives";function ej(e,t){return ig(sg,e,!0,t)||e}const KM=Symbol.for("v-ndc");function Xo(e){return po(e)?ig(sg,e,!1)||e:e||KM}function DVe(e){return ig(QR,e)}function ig(e,t,n=!0,o=!1){const s=Vs||Ds;if(s){const i=s.type;if(e===sg){const l=rm(i,!1);if(l&&(l===t||l===bs(t)||l===op(bs(t))))return i}const r=sy(s[e]||i[e],t)||sy(s.appContext[e],t);return!r&&o?i:r}}function sy(e,t){return e&&(e[t]||e[bs(t)]||e[op(bs(t))])}function it(e,t,n,o){let s;const i=n&&n[o],r=en(e);if(r||po(e)){const l=r&&qa(e);let a=!1,c=!1;l&&(a=!Ui(e),c=Ql(e),e=ap(e)),s=new Array(e.length);for(let u=0,d=e.length;ut(l,a,void 0,i&&i[a]));else{const l=Object.keys(e);s=new Array(l.length);for(let a=0,c=l.length;a{const i=o.fn(...s);return i&&(i.key=o.key),i}:o.fn)}return e}function Tn(e,t,n={},o,s){if(Vs.ce||Vs.parent&&Gl(Vs.parent)&&Vs.parent.ce){const c=Object.keys(n).length>0;return t!=="default"&&(n.name=t),g(),ce(Me,null,[Z("slot",n,o&&o())],c?-2:64)}let i=e[t];i&&i._c&&(i._d=!1),g();const r=i&&rg(i(n)),l=n.key||r&&r.key,a=ce(Me,{key:(l&&!Ji(l)?l:`_${t}`)+(!r&&o?"_fb":"")},r||(o?o():[]),r&&e._===1?64:-2);return!s&&a.scopeId&&(a.slotScopeIds=[a.scopeId+"-s"]),i&&i._c&&(i._d=!0),a}function rg(e){return e.some(t=>t1(t)?!(t.type===ls||t.type===Me&&!rg(t.children)):!0)?e:null}function VVe(e,t){const n={};for(const o in e)n[t&&/[A-Z]/.test(o)?`on:${o}`:K3(o)]=e[o];return n}const J8=e=>e?kA(e)?Zd(e):J8(e.parent):null,Fu=lo(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>J8(e.parent),$root:e=>J8(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>lg(e),$forceUpdate:e=>e.f||(e.f=()=>{eg(e.update)}),$nextTick:e=>e.n||(e.n=yt.bind(e.proxy)),$watch:e=>IR.bind(e)}),nh=(e,t)=>e!==Fn&&!e.__isScriptSetup&&Yn(e,t),Q8={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:o,data:s,props:i,accessCache:r,type:l,appContext:a}=e;if(t[0]!=="$"){const f=r[t];if(f!==void 0)switch(f){case 1:return o[t];case 2:return s[t];case 4:return n[t];case 3:return i[t]}else{if(nh(o,t))return r[t]=1,o[t];if(s!==Fn&&Yn(s,t))return r[t]=2,s[t];if(Yn(i,t))return r[t]=3,i[t];if(n!==Fn&&Yn(n,t))return r[t]=4,n[t];em&&(r[t]=0)}}const c=Fu[t];let u,d;if(c)return t==="$attrs"&&Xs(e.attrs,"get",""),c(e);if((u=l.__cssModules)&&(u=u[t]))return u;if(n!==Fn&&Yn(n,t))return r[t]=4,n[t];if(d=a.config.globalProperties,Yn(d,t))return d[t]},set({_:e},t,n){const{data:o,setupState:s,ctx:i}=e;return nh(s,t)?(s[t]=n,!0):o!==Fn&&Yn(o,t)?(o[t]=n,!0):Yn(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:o,appContext:s,props:i,type:r}},l){let a;return!!(n[l]||e!==Fn&&l[0]!=="$"&&Yn(e,l)||nh(t,l)||Yn(i,l)||Yn(o,l)||Yn(Fu,l)||Yn(s.config.globalProperties,l)||(a=r.__cssModules)&&a[l])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:Yn(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}},tj=lo({},Q8,{get(e,t){if(t!==Symbol.unscopables)return Q8.get(e,t,e)},has(e,t){return t[0]!=="_"&&!BB(t)}});function WVe(){return null}function qVe(){return null}function UVe(e){}function ZVe(e){}function KVe(){return null}function GVe(){}function YVe(e,t){return null}function XVe(){return GM().slots}function Ud(){return GM().attrs}function GM(e){const t=fs();return t.setupContext||(t.setupContext=xA(t))}function fd(e){return en(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}function JVe(e,t){const n=fd(e);for(const o in t){if(o.startsWith("__skip"))continue;let s=n[o];s?en(s)||wn(s)?s=n[o]={type:s,default:t[o]}:s.default=t[o]:s===null&&(s=n[o]={default:t[o]}),s&&t[`__skip_${o}`]&&(s.skipFactory=!0)}return n}function QVe(e,t){return!e||!t?e||t:en(e)&&en(t)?e.concat(t):lo({},fd(e),fd(t))}function eWe(e,t){const n={};for(const o in e)t.includes(o)||Object.defineProperty(n,o,{enumerable:!0,get:()=>e[o]});return n}function tWe(e){const t=fs(),n=v0;let o=e();hd(),n&&jc(!1);const s=()=>{p2(t),n&&jc(!0)},i=()=>{fs()!==t&&t.scope.off(),hd(),n&&jc(!1)};return G7(o)&&(o=o.catch(r=>{throw s(),Promise.resolve().then(()=>Promise.resolve().then(i)),r})),[o,()=>{s(),Promise.resolve().then(i)}]}let em=!0;function nj(e){const t=lg(e),n=e.proxy,o=e.ctx;em=!1,t.beforeCreate&&iy(t.beforeCreate,e,"bc");const{data:s,computed:i,methods:r,watch:l,provide:a,inject:c,created:u,beforeMount:d,mounted:f,beforeUpdate:p,updated:h,activated:m,deactivated:k,beforeDestroy:x,beforeUnmount:v,destroyed:w,unmounted:b,render:M,renderTracked:R,renderTriggered:$,errorCaptured:N,serverPrefetch:E,expose:L,inheritAttrs:B,components:C,directives:O,filters:W}=t;if(c&&oj(c,o,null),r)for(const j in r){const F=r[j];wn(F)&&(o[j]=F.bind(n))}if(s){const j=s.call(n,n);Xn(j)&&(e.data=Ls(j))}if(em=!0,i)for(const j in i){const F=i[j],q=wn(F)?F.bind(n,n):wn(F.get)?F.get.bind(n,n):yr,P=!wn(F)&&wn(F.set)?F.set.bind(n):yr,V=z({get:q,set:P});Object.defineProperty(o,j,{enumerable:!0,configurable:!0,get:()=>V.value,set:Y=>V.value=Y})}if(l)for(const j in l)YM(l[j],o,n,j);if(a){const j=wn(a)?a.call(n):a;Reflect.ownKeys(j).forEach(F=>{Pn(F,j[F])})}u&&iy(u,e,"c");function A(j,F){en(F)?F.forEach(q=>j(q.bind(n))):F&&j(F.bind(n))}if(A(KR,d),A(xn,f),A(ZM,p),A(og,h),A(qR,m),A(UR,k),A(JR,N),A(XR,R),A(YR,$),A(ao,v),A(An,b),A(GR,E),en(L))if(L.length){const j=e.exposed||(e.exposed={});L.forEach(F=>{Object.defineProperty(j,F,{get:()=>n[F],set:q=>n[F]=q,enumerable:!0})})}else e.exposed||(e.exposed={});M&&e.render===yr&&(e.render=M),B!=null&&(e.inheritAttrs=B),C&&(e.components=C),O&&(e.directives=O),E&&ng(e)}function oj(e,t,n=yr){en(e)&&(e=tm(e));for(const o in e){const s=e[o];let i;Xn(s)?"default"in s?i=hn(s.from||o,s.default,!0):i=hn(s.from||o):i=hn(s),es(i)?Object.defineProperty(t,o,{enumerable:!0,configurable:!0,get:()=>i.value,set:r=>i.value=r}):t[o]=i}}function iy(e,t,n){br(en(e)?e.map(o=>o.bind(t.proxy)):e.bind(t.proxy),t,n)}function YM(e,t,n,o){let s=o.includes(".")?FM(n,o):()=>n[o];if(po(e)){const i=t[e];wn(i)&&Ze(s,i)}else if(wn(e))Ze(s,e.bind(n));else if(Xn(e))if(en(e))e.forEach(i=>YM(i,t,n,o));else{const i=wn(e.handler)?e.handler.bind(n):t[e.handler];wn(i)&&Ze(s,i,e)}}function lg(e){const t=e.type,{mixins:n,extends:o}=t,{mixins:s,optionsCache:i,config:{optionMergeStrategies:r}}=e.appContext,l=i.get(t);let a;return l?a=l:!s.length&&!n&&!o?a=t:(a={},s.length&&s.forEach(c=>B4(a,c,r,!0)),B4(a,t,r)),Xn(t)&&i.set(t,a),a}function B4(e,t,n,o=!1){const{mixins:s,extends:i}=t;i&&B4(e,i,n,!0),s&&s.forEach(r=>B4(e,r,n,!0));for(const r in t)if(!(o&&r==="expose")){const l=sj[r]||n&&n[r];e[r]=l?l(e[r],t[r]):t[r]}return e}const sj={data:ry,props:ly,emits:ly,methods:bu,computed:bu,beforeCreate:si,created:si,beforeMount:si,mounted:si,beforeUpdate:si,updated:si,beforeDestroy:si,beforeUnmount:si,destroyed:si,unmounted:si,activated:si,deactivated:si,errorCaptured:si,serverPrefetch:si,components:bu,directives:bu,watch:rj,provide:ry,inject:ij};function ry(e,t){return t?e?function(){return lo(wn(e)?e.call(this,this):e,wn(t)?t.call(this,this):t)}:t:e}function ij(e,t){return bu(tm(e),tm(t))}function tm(e){if(en(e)){const t={};for(let n=0;n{let u,d=Fn,f;return TR(()=>{const p=e[s];Hs(u,p)&&(u=p,c())}),{get(){return a(),n.get?n.get(u):u},set(p){const h=n.set?n.set(p):p;if(!Hs(h,u)&&!(d!==Fn&&Hs(p,d)))return;const m=o.vnode.props;m&&(t in m||s in m||i in m)&&(`onUpdate:${t}`in m||`onUpdate:${s}`in m||`onUpdate:${i}`in m)||(u=p,c()),o.emit(`update:${t}`,h),Hs(p,h)&&Hs(p,d)&&!Hs(h,f)&&c(),d=p,f=h}}});return l[Symbol.iterator]=()=>{let a=0;return{next(){return a<2?{value:a++?r||Fn:l,done:!1}:{done:!0}}}},l}const JM=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${bs(t)}Modifiers`]||e[`${Mi(t)}Modifiers`];function cj(e,t,...n){if(e.isUnmounted)return;const o=e.vnode.props||Fn;let s=n;const i=t.startsWith("update:"),r=i&&JM(o,t.slice(7));r&&(r.trim&&(s=n.map(u=>po(u)?u.trim():u)),r.number&&(s=n.map(sp)));let l,a=o[l=K3(t)]||o[l=K3(bs(t))];!a&&i&&(a=o[l=K3(Mi(t))]),a&&br(a,e,6,s);const c=o[l+"Once"];if(c){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,br(c,e,6,s)}}const uj=new WeakMap;function QM(e,t,n=!1){const o=n?uj:t.emitsCache,s=o.get(e);if(s!==void 0)return s;const i=e.emits;let r={},l=!1;if(!wn(e)){const a=c=>{const u=QM(c,t,!0);u&&(l=!0,lo(r,u))};!n&&t.mixins.length&&t.mixins.forEach(a),e.extends&&a(e.extends),e.mixins&&e.mixins.forEach(a)}return!i&&!l?(Xn(e)&&o.set(e,null),null):(en(i)?i.forEach(a=>r[a]=null):lo(r,i),Xn(e)&&o.set(e,r),r)}function hp(e,t){return!e||!Dd(t)?!1:(t=t.slice(2).replace(/Once$/,""),Yn(e,t[0].toLowerCase()+t.slice(1))||Yn(e,Mi(t))||Yn(e,t))}function Y3(e){const{type:t,vnode:n,proxy:o,withProxy:s,propsOptions:[i],slots:r,attrs:l,emit:a,render:c,renderCache:u,props:d,data:f,setupState:p,ctx:h,inheritAttrs:m}=e,k=cd(e);let x,v;try{if(n.shapeFlag&4){const b=s||o,M=b;x=Ci(c.call(M,b,u,d,p,f,h)),v=l}else{const b=t;x=Ci(b.length>1?b(d,{attrs:l,slots:r,emit:a}):b(d,null)),v=t.props?l:fj(l)}}catch(b){Ou.length=0,f2(b,e,1),x=Z(ls)}let w=x;if(v&&m!==!1){const b=Object.keys(v),{shapeFlag:M}=w;b.length&&M&7&&(i&&b.some(Q5)&&(v=pj(v,i)),w=ea(w,v,!1,!0))}return n.dirs&&(w=ea(w,null,!1,!0),w.dirs=w.dirs?w.dirs.concat(n.dirs):n.dirs),n.transition&&e1(w,n.transition),x=w,cd(k),x}function dj(e,t=!0){let n;for(let o=0;o{let t;for(const n in e)(n==="class"||n==="style"||Dd(n))&&((t||(t={}))[n]=e[n]);return t},pj=(e,t)=>{const n={};for(const o in e)(!Q5(o)||!(o.slice(9)in t))&&(n[o]=e[o]);return n};function hj(e,t,n){const{props:o,children:s,component:i}=e,{props:r,children:l,patchFlag:a}=t,c=i.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&a>=0){if(a&1024)return!0;if(a&16)return o?ay(o,r,c):!!r;if(a&8){const u=t.dynamicProps;for(let d=0;dObject.create(tA),oA=e=>Object.getPrototypeOf(e)===tA;function mj(e,t,n,o=!1){const s={},i=nA();e.propsDefaults=Object.create(null),sA(e,t,s,i);for(const r in e.propsOptions[0])r in s||(s[r]=void 0);n?e.props=o?s:uR(s):e.type.props?e.props=s:e.props=i,e.attrs=i}function gj(e,t,n,o){const{props:s,attrs:i,vnode:{patchFlag:r}}=e,l=Vn(s),[a]=e.propsOptions;let c=!1;if((o||r>0)&&!(r&16)){if(r&8){const u=e.vnode.dynamicProps;for(let d=0;d{a=!0;const[f,p]=iA(d,t,!0);lo(r,f),p&&l.push(...p)};!n&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}if(!i&&!a)return Xn(e)&&o.set(e,Ic),Ic;if(en(i))for(let u=0;ue==="_"||e==="_ctx"||e==="$stable",cg=e=>en(e)?e.map(Ci):[Ci(e)],wj=(e,t,n)=>{if(t._n)return t;const o=ue((...s)=>cg(t(...s)),n);return o._c=!1,o},rA=(e,t,n)=>{const o=e._ctx;for(const s in e){if(ag(s))continue;const i=e[s];if(wn(i))t[s]=wj(s,i,o);else if(i!=null){const r=cg(i);t[s]=()=>r}}},lA=(e,t)=>{const n=cg(t);e.slots.default=()=>n},aA=(e,t,n)=>{for(const o in t)(n||!ag(o))&&(e[o]=t[o])},yj=(e,t,n)=>{const o=e.slots=nA();if(e.vnode.shapeFlag&32){const s=t._;s?(aA(o,t,n),n&&cM(o,"_",s,!0)):rA(t,o)}else t&&lA(e,t)},kj=(e,t,n)=>{const{vnode:o,slots:s}=e;let i=!0,r=Fn;if(o.shapeFlag&32){const l=t._;l?n&&l===1?i=!1:aA(s,t,n):(i=!t.$stable,rA(t,s)),r=t}else t&&(lA(e,t),r={default:1});if(i)for(const l in s)!ag(l)&&r[l]==null&&delete s[l]},ss=hA;function bj(e){return cA(e)}function _j(e){return cA(e,FR)}function cA(e,t){const n=ip();n.__VUE__=!0;const{insert:o,remove:s,patchProp:i,createElement:r,createText:l,createComment:a,setText:c,setElementText:u,parentNode:d,nextSibling:f,setScopeId:p=yr,insertStaticContent:h}=e,m=(H,X,ve,pe=null,he=null,te=null,de=void 0,ke=null,_e=!!X.dynamicChildren)=>{if(H===X)return;H&&!Or(H,X)&&(pe=me(H),Y(H,he,te,!0),H=null),X.patchFlag===-2&&(_e=!1,X.dynamicChildren=null);const{type:fe,ref:xe,shapeFlag:le}=X;switch(fe){case Ua:k(H,X,ve,pe);break;case ls:x(H,X,ve,pe);break;case Rc:H==null&&v(X,ve,pe,de);break;case Me:C(H,X,ve,pe,he,te,de,ke,_e);break;default:le&1?M(H,X,ve,pe,he,te,de,ke,_e):le&6?O(H,X,ve,pe,he,te,de,ke,_e):(le&64||le&128)&&fe.process(H,X,ve,pe,he,te,de,ke,_e,Qe)}xe!=null&&he?zc(xe,H&&H.ref,te,X||H,!X):xe==null&&H&&H.ref!=null&&zc(H.ref,null,te,H,!0)},k=(H,X,ve,pe)=>{if(H==null)o(X.el=l(X.children),ve,pe);else{const he=X.el=H.el;X.children!==H.children&&c(he,X.children)}},x=(H,X,ve,pe)=>{H==null?o(X.el=a(X.children||""),ve,pe):X.el=H.el},v=(H,X,ve,pe)=>{[H.el,H.anchor]=h(H.children,X,ve,pe,H.el,H.anchor)},w=({el:H,anchor:X},ve,pe)=>{let he;for(;H&&H!==X;)he=f(H),o(H,ve,pe),H=he;o(X,ve,pe)},b=({el:H,anchor:X})=>{let ve;for(;H&&H!==X;)ve=f(H),s(H),H=ve;s(X)},M=(H,X,ve,pe,he,te,de,ke,_e)=>{if(X.type==="svg"?de="svg":X.type==="math"&&(de="mathml"),H==null)R(X,ve,pe,he,te,de,ke,_e);else{const fe=H.el&&H.el._isVueCE?H.el:null;try{fe&&fe._beginPatch(),E(H,X,he,te,de,ke,_e)}finally{fe&&fe._endPatch()}}},R=(H,X,ve,pe,he,te,de,ke)=>{let _e,fe;const{props:xe,shapeFlag:le,transition:ye,dirs:Re}=H;if(_e=H.el=r(H.type,te,xe&&xe.is,xe),le&8?u(_e,H.children):le&16&&N(H.children,_e,null,pe,he,oh(H,te),de,ke),Re&&cl(H,null,pe,"created"),$(_e,H,H.scopeId,de,pe),xe){for(const dt in xe)dt!=="value"&&!a0(dt)&&i(_e,dt,null,xe[dt],te,pe);"value"in xe&&i(_e,"value",null,xe.value,te),(fe=xe.onVnodeBeforeMount)&&ki(fe,pe,H)}Re&&cl(H,null,pe,"beforeMount");const at=uA(he,ye);at&&ye.beforeEnter(_e),o(_e,X,ve),((fe=xe&&xe.onVnodeMounted)||at||Re)&&ss(()=>{try{fe&&ki(fe,pe,H),at&&ye.enter(_e),Re&&cl(H,null,pe,"mounted")}finally{}},he)},$=(H,X,ve,pe,he)=>{if(ve&&p(H,ve),pe)for(let te=0;te{for(let fe=_e;fe{const ke=X.el=H.el;let{patchFlag:_e,dynamicChildren:fe,dirs:xe}=X;_e|=H.patchFlag&16;const le=H.props||Fn,ye=X.props||Fn;let Re;if(ve&&N1(ve,!1),(Re=ye.onVnodeBeforeUpdate)&&ki(Re,ve,X,H),xe&&cl(X,H,ve,"beforeUpdate"),ve&&N1(ve,!0),(le.innerHTML&&ye.innerHTML==null||le.textContent&&ye.textContent==null)&&u(ke,""),fe?L(H.dynamicChildren,fe,ke,ve,pe,oh(X,he),te):de||F(H,X,ke,null,ve,pe,oh(X,he),te,!1),_e>0){if(_e&16)B(ke,le,ye,ve,he);else if(_e&2&&le.class!==ye.class&&i(ke,"class",null,ye.class,he),_e&4&&i(ke,"style",le.style,ye.style,he),_e&8){const at=X.dynamicProps;for(let dt=0;dt{Re&&ki(Re,ve,X,H),xe&&cl(X,H,ve,"updated")},pe)},L=(H,X,ve,pe,he,te,de)=>{for(let ke=0;ke{if(X!==ve){if(X!==Fn)for(const te in X)!a0(te)&&!(te in ve)&&i(H,te,X[te],null,he,pe);for(const te in ve){if(a0(te))continue;const de=ve[te],ke=X[te];de!==ke&&te!=="value"&&i(H,te,ke,de,he,pe)}"value"in ve&&i(H,"value",X.value,ve.value,he)}},C=(H,X,ve,pe,he,te,de,ke,_e)=>{const fe=X.el=H?H.el:l(""),xe=X.anchor=H?H.anchor:l("");let{patchFlag:le,dynamicChildren:ye,slotScopeIds:Re}=X;Re&&(ke=ke?ke.concat(Re):Re),H==null?(o(fe,ve,pe),o(xe,ve,pe),N(X.children||[],ve,xe,he,te,de,ke,_e)):le>0&&le&64&&ye&&H.dynamicChildren&&H.dynamicChildren.length===ye.length?(L(H.dynamicChildren,ye,ve,he,te,de,ke),(X.key!=null||he&&X===he.subTree)&&ug(H,X,!0)):F(H,X,ve,xe,he,te,de,ke,_e)},O=(H,X,ve,pe,he,te,de,ke,_e)=>{X.slotScopeIds=ke,H==null?X.shapeFlag&512?he.ctx.activate(X,ve,pe,de,_e):W(X,ve,pe,he,te,de,_e):D(H,X,_e)},W=(H,X,ve,pe,he,te,de)=>{const ke=H.component=yA(H,pe,he);if(qd(H)&&(ke.ctx.renderer=Qe),bA(ke,!1,de),ke.asyncDep){if(he&&he.registerDep(ke,A,de),!H.el){const _e=ke.subTree=Z(ls);x(null,_e,X,ve),H.placeholder=_e.el}}else A(ke,H,X,ve,he,te,de)},D=(H,X,ve)=>{const pe=X.component=H.component;if(hj(H,X,ve))if(pe.asyncDep&&!pe.asyncResolved){j(pe,X,ve);return}else pe.next=X,pe.update();else X.el=H.el,pe.vnode=X},A=(H,X,ve,pe,he,te,de)=>{const ke=()=>{if(H.isMounted){let{next:le,bu:ye,u:Re,parent:at,vnode:dt}=H;{const Dt=dA(H);if(Dt){le&&(le.el=dt.el,j(H,le,de)),Dt.asyncDep.then(()=>{ss(()=>{H.isUnmounted||fe()},he)});return}}let At=le,$t;N1(H,!1),le?(le.el=dt.el,j(H,le,de)):le=dt,ye&&$c(ye),($t=le.props&&le.props.onVnodeBeforeUpdate)&&ki($t,at,le,dt),N1(H,!0);const Ot=Y3(H),Yt=H.subTree;H.subTree=Ot,m(Yt,Ot,d(Yt.el),me(Yt),H,he,te),le.el=Ot.el,At===null&&mp(H,Ot.el),Re&&ss(Re,he),($t=le.props&&le.props.onVnodeUpdated)&&ss(()=>ki($t,at,le,dt),he)}else{let le;const{el:ye,props:Re}=X,{bm:at,m:dt,parent:At,root:$t,type:Ot}=H,Yt=Gl(X);if(N1(H,!1),at&&$c(at),!Yt&&(le=Re&&Re.onVnodeBeforeMount)&&ki(le,At,X),N1(H,!0),ye&&ne){const Dt=()=>{H.subTree=Y3(H),ne(ye,H.subTree,H,he,null)};Yt&&Ot.__asyncHydrate?Ot.__asyncHydrate(ye,H,Dt):Dt()}else{$t.ce&&$t.ce._hasShadowRoot()&&$t.ce._injectChildStyle(Ot,H.parent?H.parent.type:void 0);const Dt=H.subTree=Y3(H);m(null,Dt,ve,pe,H,he,te),X.el=Dt.el}if(dt&&ss(dt,he),!Yt&&(le=Re&&Re.onVnodeMounted)){const Dt=X;ss(()=>ki(le,At,Dt),he)}(X.shapeFlag&256||At&&Gl(At.vnode)&&At.vnode.shapeFlag&256)&&H.a&&ss(H.a,he),H.isMounted=!0,X=ve=pe=null}};H.scope.on();const _e=H.effect=new E4(ke);H.scope.off();const fe=H.update=_e.run.bind(_e),xe=H.job=_e.runIfDirty.bind(_e);xe.i=H,xe.id=H.uid,_e.scheduler=()=>eg(xe),N1(H,!0),fe()},j=(H,X,ve)=>{X.component=H;const pe=H.vnode.props;H.vnode=X,H.next=null,gj(H,X.props,pe,ve),kj(H,X.children,ve),Xl(),Yw(H),Jl()},F=(H,X,ve,pe,he,te,de,ke,_e=!1)=>{const fe=H&&H.children,xe=H?H.shapeFlag:0,le=X.children,{patchFlag:ye,shapeFlag:Re}=X;if(ye>0){if(ye&128){P(fe,le,ve,pe,he,te,de,ke,_e);return}else if(ye&256){q(fe,le,ve,pe,he,te,de,ke,_e);return}}Re&8?(xe&16&&J(fe,he,te),le!==fe&&u(ve,le)):xe&16?Re&16?P(fe,le,ve,pe,he,te,de,ke,_e):J(fe,he,te,!0):(xe&8&&u(ve,""),Re&16&&N(le,ve,pe,he,te,de,ke,_e))},q=(H,X,ve,pe,he,te,de,ke,_e)=>{H=H||Ic,X=X||Ic;const fe=H.length,xe=X.length,le=Math.min(fe,xe);let ye;for(ye=0;yexe?J(H,he,te,!0,!1,le):N(X,ve,pe,he,te,de,ke,_e,le)},P=(H,X,ve,pe,he,te,de,ke,_e)=>{let fe=0;const xe=X.length;let le=H.length-1,ye=xe-1;for(;fe<=le&&fe<=ye;){const Re=H[fe],at=X[fe]=_e?Fl(X[fe]):Ci(X[fe]);if(Or(Re,at))m(Re,at,ve,null,he,te,de,ke,_e);else break;fe++}for(;fe<=le&&fe<=ye;){const Re=H[le],at=X[ye]=_e?Fl(X[ye]):Ci(X[ye]);if(Or(Re,at))m(Re,at,ve,null,he,te,de,ke,_e);else break;le--,ye--}if(fe>le){if(fe<=ye){const Re=ye+1,at=Reye)for(;fe<=le;)Y(H[fe],he,te,!0),fe++;else{const Re=fe,at=fe,dt=new Map;for(fe=at;fe<=ye;fe++){const bn=X[fe]=_e?Fl(X[fe]):Ci(X[fe]);bn.key!=null&&dt.set(bn.key,fe)}let At,$t=0;const Ot=ye-at+1;let Yt=!1,Dt=0;const On=new Array(Ot);for(fe=0;fe=Ot){Y(bn,he,te,!0);continue}let Be;if(bn.key!=null)Be=dt.get(bn.key);else for(At=at;At<=ye;At++)if(On[At-at]===0&&Or(bn,X[At])){Be=At;break}Be===void 0?Y(bn,he,te,!0):(On[Be-at]=fe+1,Be>=Dt?Dt=Be:Yt=!0,m(bn,X[Be],ve,null,he,te,de,ke,_e),$t++)}const En=Yt?xj(On):Ic;for(At=En.length-1,fe=Ot-1;fe>=0;fe--){const bn=at+fe,Be=X[bn],rt=X[bn+1],lt=bn+1{const{el:te,type:de,transition:ke,children:_e,shapeFlag:fe}=H;if(fe&6){V(H.component.subTree,X,ve,pe);return}if(fe&128){H.suspense.move(X,ve,pe);return}if(fe&64){de.move(H,X,ve,Qe);return}if(de===Me){o(te,X,ve);for(let le=0;le<_e.length;le++)V(_e[le],X,ve,pe);o(H.anchor,X,ve);return}if(de===Rc){w(H,X,ve);return}if(pe!==2&&fe&1&&ke)if(pe===0)ke.persisted&&!te[dr]?o(te,X,ve):(ke.beforeEnter(te),o(te,X,ve),ss(()=>ke.enter(te),he));else{const{leave:le,delayLeave:ye,afterLeave:Re}=ke,at=()=>{H.ctx.isUnmounted?s(te):o(te,X,ve)},dt=()=>{const At=te._isLeaving||!!te[dr];te._isLeaving&&te[dr](!0),ke.persisted&&!At?at():le(te,()=>{at(),Re&&Re()})};ye?ye(te,at,dt):dt()}else o(te,X,ve)},Y=(H,X,ve,pe=!1,he=!1)=>{const{type:te,props:de,ref:ke,children:_e,dynamicChildren:fe,shapeFlag:xe,patchFlag:le,dirs:ye,cacheIndex:Re,memo:at}=H;if(le===-2&&(he=!1),ke!=null&&(Xl(),zc(ke,null,ve,H,!0),Jl()),Re!=null&&(X.renderCache[Re]=void 0),xe&256){X.ctx.deactivate(H);return}const dt=xe&1&&ye,At=!Gl(H);let $t;if(At&&($t=de&&de.onVnodeBeforeUnmount)&&ki($t,X,H),xe&6)oe(H.component,ve,pe);else{if(xe&128){H.suspense.unmount(ve,pe);return}dt&&cl(H,null,X,"beforeUnmount"),xe&64?H.type.remove(H,X,ve,Qe,pe):fe&&!fe.hasOnce&&(te!==Me||le>0&&le&64)?J(fe,X,ve,!1,!0):(te===Me&&le&384||!he&&xe&16)&&J(_e,X,ve),pe&&ee(H)}const Ot=at!=null&&Re==null;(At&&($t=de&&de.onVnodeUnmounted)||dt||Ot)&&ss(()=>{$t&&ki($t,X,H),dt&&cl(H,null,X,"unmounted"),Ot&&(H.el=null)},ve)},ee=H=>{const{type:X,el:ve,anchor:pe,transition:he}=H;if(X===Me){se(ve,pe);return}if(X===Rc){b(H);return}const te=()=>{s(ve),he&&!he.persisted&&he.afterLeave&&he.afterLeave()};if(H.shapeFlag&1&&he&&!he.persisted){const{leave:de,delayLeave:ke}=he,_e=()=>de(ve,te);ke?ke(H.el,te,_e):_e()}else te()},se=(H,X)=>{let ve;for(;H!==X;)ve=f(H),s(H),H=ve;s(X)},oe=(H,X,ve)=>{const{bum:pe,scope:he,job:te,subTree:de,um:ke,m:_e,a:fe}=H;R4(_e),R4(fe),pe&&$c(pe),he.stop(),te&&(te.flags|=8,Y(de,H,X,ve)),ke&&ss(ke,X),ss(()=>{H.isUnmounted=!0},X)},J=(H,X,ve,pe=!1,he=!1,te=0)=>{for(let de=te;de{if(H.shapeFlag&6)return me(H.component.subTree);if(H.shapeFlag&128)return H.suspense.next();const X=f(H.anchor||H.el),ve=X&&X[OM];return ve?f(ve):X};let be=!1;const Ke=(H,X,ve)=>{let pe;H==null?X._vnode&&(Y(X._vnode,null,null,!0),pe=X._vnode.component):m(X._vnode||null,H,X,null,null,null,ve),X._vnode=H,be||(be=!0,Yw(pe),N4(),be=!1)},Qe={p:m,um:Y,m:V,r:ee,mt:W,mc:N,pc:F,pbc:L,n:me,o:e};let K,ne;return t&&([K,ne]=t(Qe)),{render:Ke,hydrate:K,createApp:aj(Ke,K)}}function oh({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function N1({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function uA(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function ug(e,t,n=!1){const o=e.children,s=t.children;if(en(o)&&en(s))for(let i=0;i>1,e[n[l]]0&&(t[o]=n[i-1]),n[i]=o)}}for(i=n.length,r=n[i-1];i-- >0;)n[i]=r,r=t[r];return n}function dA(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:dA(t)}function R4(e){if(e)for(let t=0;te.__isSuspense;let om=0;const Sj={name:"Suspense",__isSuspense:!0,process(e,t,n,o,s,i,r,l,a,c){if(e==null)Cj(t,n,o,s,i,r,l,a,c);else{if(i&&i.deps>0&&!e.suspense.isInFallback){t.suspense=e.suspense,t.suspense.vnode=t,t.el=e.el;return}Mj(e,t,n,o,s,r,l,a,c)}},hydrate:Aj,normalize:Ej},oWe=Sj;function pd(e,t){const n=e.props&&e.props[t];wn(n)&&n()}function Cj(e,t,n,o,s,i,r,l,a){const{p:c,o:{createElement:u}}=a,d=u("div"),f=e.suspense=pA(e,s,o,t,d,n,i,r,l,a);c(null,f.pendingBranch=e.ssContent,d,null,o,f,i,r),f.deps>0?(pd(e,"onPending"),pd(e,"onFallback"),c(null,e.ssFallback,t,n,o,null,i,r),Bc(f,e.ssFallback)):f.resolve(!1,!0)}function Mj(e,t,n,o,s,i,r,l,{p:a,um:c,o:{createElement:u}}){const d=t.suspense=e.suspense;d.vnode=t,t.el=e.el;const f=t.ssContent,p=t.ssFallback,{activeBranch:h,pendingBranch:m,isInFallback:k,isHydrating:x}=d;if(m)d.pendingBranch=f,Or(m,f)?(a(m,f,d.hiddenContainer,null,s,d,i,r,l),d.deps<=0?d.resolve():k&&(x||(a(h,p,n,o,s,null,i,r,l),Bc(d,p)))):(d.pendingId=om++,x?(d.isHydrating=!1,d.activeBranch=m):c(m,s,d),d.deps=0,d.effects.length=0,d.hiddenContainer=u("div"),k?(a(null,f,d.hiddenContainer,null,s,d,i,r,l),d.deps<=0?d.resolve():(a(h,p,n,o,s,null,i,r,l),Bc(d,p))):h&&Or(h,f)?(a(h,f,n,o,s,d,i,r,l),d.resolve(!0)):(a(null,f,d.hiddenContainer,null,s,d,i,r,l),d.deps<=0&&d.resolve()));else if(h&&Or(h,f))a(h,f,n,o,s,d,i,r,l),Bc(d,f);else if(pd(t,"onPending"),d.pendingBranch=f,f.shapeFlag&512?d.pendingId=f.component.suspenseId:d.pendingId=om++,a(null,f,d.hiddenContainer,null,s,d,i,r,l),d.deps<=0)d.resolve();else{const{timeout:v,pendingId:w}=d;v>0?setTimeout(()=>{d.pendingId===w&&d.fallback(p)},v):v===0&&d.fallback(p)}}function pA(e,t,n,o,s,i,r,l,a,c,u=!1){const{p:d,m:f,um:p,n:h,o:{parentNode:m,remove:k}}=c;let x;const v=Tj(e);v&&t&&t.pendingBranch&&(x=t.pendingId,t.deps++);const w=e.props?A4(e.props.timeout):void 0,b=i,M={vnode:e,parent:t,parentComponent:n,namespace:r,container:o,hiddenContainer:s,deps:0,pendingId:om++,timeout:typeof w=="number"?w:-1,activeBranch:null,isFallbackMountPending:!1,pendingBranch:null,isInFallback:!u,isHydrating:u,isUnmounted:!1,effects:[],resolve(R=!1,$=!1){const{vnode:N,activeBranch:E,pendingBranch:L,pendingId:B,effects:C,parentComponent:O,container:W,isInFallback:D}=M;let A=!1;if(M.isHydrating)M.isHydrating=!1;else if(!R){A=E&&L.transition&&L.transition.mode==="out-in";let q=!1;A&&(E.transition.afterLeave=()=>{B===M.pendingId&&(f(L,W,i===b&&!q?h(E):i,0),$4(C),D&&N.ssFallback&&(N.ssFallback.el=null))}),E&&!M.isFallbackMountPending&&(m(E.el)===W&&(i=h(E),q=!0),p(E,O,M,!0),!A&&D&&N.ssFallback&&ss(()=>N.ssFallback.el=null,M)),A||f(L,W,i,0)}M.isFallbackMountPending=!1,Bc(M,L),M.pendingBranch=null,M.isInFallback=!1;let j=M.parent,F=!1;for(;j;){if(j.pendingBranch){j.effects.push(...C),F=!0;break}j=j.parent}!F&&!A&&$4(C),M.effects=[],v&&t&&t.pendingBranch&&x===t.pendingId&&(t.deps--,t.deps===0&&!$&&t.resolve()),pd(N,"onResolve")},fallback(R){if(!M.pendingBranch)return;const{vnode:$,activeBranch:N,parentComponent:E,container:L,namespace:B}=M;pd($,"onFallback");const C=h(N),O=()=>{M.isFallbackMountPending=!1,M.isInFallback&&(d(null,R,L,C,E,null,B,l,a),Bc(M,R))},W=R.transition&&R.transition.mode==="out-in";W&&(M.isFallbackMountPending=!0,N.transition.afterLeave=O),M.isInFallback=!0,p(N,E,null,!0),W||O()},move(R,$,N){M.activeBranch&&f(M.activeBranch,R,$,N),M.container=R},next(){return M.activeBranch&&h(M.activeBranch)},registerDep(R,$,N){const E=!!M.pendingBranch;E&&M.deps++;const L=R.vnode.el;R.asyncDep.catch(B=>{f2(B,R,0)}).then(B=>{if(R.isUnmounted||M.isUnmounted||M.pendingId!==R.suspenseId)return;hd(),R.asyncResolved=!0;const{vnode:C}=R;sm(R,B,!1),L&&(C.el=L);const O=!L&&R.subTree.el;$(R,C,m(L||R.subTree.el),L?null:h(R.subTree),M,r,N),O&&(C.placeholder=null,k(O)),mp(R,C.el),E&&--M.deps===0&&M.resolve()})},unmount(R,$){M.isUnmounted=!0,M.activeBranch&&p(M.activeBranch,n,R,$),M.pendingBranch&&p(M.pendingBranch,n,R,$)}};return M}function Aj(e,t,n,o,s,i,r,l,a){const c=t.suspense=pA(t,o,n,e.parentNode,document.createElement("div"),null,s,i,r,l,!0),u=a(e,c.pendingBranch=t.ssContent,n,c,i,r);return c.deps===0&&c.resolve(!1,!0),u}function Ej(e){const{shapeFlag:t,children:n}=e,o=t&32;e.ssContent=uy(o?n.default:n),e.ssFallback=o?uy(n.fallback):Z(ls)}function uy(e){let t;if(wn(e)){const n=g0&&e._c;n&&(e._d=!1,g()),e=e(),n&&(e._d=!0,t=Qs,mA())}return en(e)&&(e=dj(e)),e=Ci(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(n=>n!==e)),e}function hA(e,t){t&&t.pendingBranch?en(e)?t.effects.push(...e):t.effects.push(e):$4(e)}function Bc(e,t){e.activeBranch=t;const{vnode:n,parentComponent:o}=e;let s=t.el;for(;!s&&t.component;)t=t.component.subTree,s=t.el;n.el=s,o&&o.subTree===n&&(o.vnode.el=s,mp(o,s))}function Tj(e){const t=e.props&&e.props.suspensible;return t!=null&&t!==!1}const Me=Symbol.for("v-fgt"),Ua=Symbol.for("v-txt"),ls=Symbol.for("v-cmt"),Rc=Symbol.for("v-stc"),Ou=[];let Qs=null;function g(e=!1){Ou.push(Qs=e?null:[])}function mA(){Ou.pop(),Qs=Ou[Ou.length-1]||null}let g0=1;function F4(e,t=!1){g0+=e,e<0&&Qs&&t&&(Qs.hasOnce=!0)}function gA(e){return e.dynamicChildren=g0>0?Qs||Ic:null,mA(),g0>0&&Qs&&Qs.push(e),e}function S(e,t,n,o,s,i){return gA(_(e,t,n,o,s,i,!0))}function ce(e,t,n,o,s){return gA(Z(e,t,n,o,s,!0))}function t1(e){return e?e.__v_isVNode===!0:!1}function Or(e,t){return e.type===t.type&&e.key===t.key}function sWe(e){}const vA=({key:e})=>e??null,X3=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?po(e)||es(e)||wn(e)?{i:Vs,r:e,k:t,f:!!n}:e:null);function _(e,t=null,n=null,o=0,s=null,i=e===Me?0:1,r=!1,l=!1){const a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&vA(t),ref:t&&X3(t),scopeId:fp,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:o,dynamicProps:s,dynamicChildren:null,appContext:null,ctx:Vs};return l?(dg(a,n),i&128&&e.normalize(a)):n&&(a.shapeFlag|=po(n)?8:16),g0>0&&!r&&Qs&&(a.patchFlag>0||i&6)&&a.patchFlag!==32&&Qs.push(a),a}const Z=Ij;function Ij(e,t=null,n=null,o=0,s=null,i=!1){if((!e||e===KM)&&(e=ls),t1(e)){const l=ea(e,t,!0);return n&&dg(l,n),g0>0&&!i&&Qs&&(l.shapeFlag&6?Qs[Qs.indexOf(e)]=l:Qs.push(l)),l.patchFlag=-2,l}if(Bj(e)&&(e=e.__vccOpts),t){t=wA(t);let{class:l,style:a}=t;l&&!po(l)&&(t.class=ze(l)),Xn(a)&&(dp(a)&&!en(a)&&(a=lo({},a)),t.style=Zt(a))}const r=po(e)?1:j4(e)?128:PM(e)?64:Xn(e)?4:wn(e)?2:0;return _(e,t,n,o,s,r,i,!0)}function wA(e){return e?dp(e)||oA(e)?lo({},e):e:null}function ea(e,t,n=!1,o=!1){const{props:s,ref:i,patchFlag:r,children:l,transition:a}=e,c=t?Wn(s||{},t):s,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:c,key:c&&vA(c),ref:t&&t.ref?n&&i?en(i)?i.concat(X3(t)):[i,X3(t)]:X3(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Me?r===-1?16:r|16:r,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:a,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&ea(e.ssContent),ssFallback:e.ssFallback&&ea(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return a&&o&&e1(u,a.clone(u)),u}function He(e=" ",t=0){return Z(Ua,null,e,t)}function Pu(e,t){const n=Z(Rc,null,e);return n.staticCount=t,n}function Q(e="",t=!1){return t?(g(),ce(ls,null,e)):Z(ls,null,e)}function Ci(e){return e==null||typeof e=="boolean"?Z(ls):en(e)?Z(Me,null,e.slice()):t1(e)?Fl(e):Z(Ua,null,String(e))}function Fl(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:ea(e)}function dg(e,t){let n=0;const{shapeFlag:o}=e;if(t==null)t=null;else if(en(t))n=16;else if(typeof t=="object")if(o&65){const s=t.default;s&&(s._c&&(s._d=!1),dg(e,s()),s._c&&(s._d=!0));return}else{n=32;const s=t._;!s&&!oA(t)?t._ctx=Vs:s===3&&Vs&&(Vs.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else wn(t)?(t={default:t,_ctx:Vs},n=32):(t=String(t),o&64?(n=16,t=[He(t)]):n=8);e.children=t,e.shapeFlag|=n}function Wn(...e){const t={};for(let n=0;nDs||Vs;let O4,jc;{const e=ip(),t=(n,o)=>{let s;return(s=e[n])||(s=e[n]=[]),s.push(o),i=>{s.length>1?s.forEach(r=>r(i)):s[0](i)}};O4=t("__VUE_INSTANCE_SETTERS__",n=>Ds=n),jc=t("__VUE_SSR_SETTERS__",n=>v0=n)}const p2=e=>{const t=Ds;return O4(e),e.scope.on(),()=>{e.scope.off(),O4(t)}},hd=()=>{Ds&&Ds.scope.off(),O4(null)};function kA(e){return e.vnode.shapeFlag&4}let v0=!1;function bA(e,t=!1,n=!1){t&&jc(t);const{props:o,children:s}=e.vnode,i=kA(e);mj(e,o,i,t),yj(e,s,n||t);const r=i?Nj(e,t):void 0;return t&&jc(!1),r}function Nj(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Q8);const{setup:o}=n;if(o){Xl();const s=e.setupContext=o.length>1?xA(e):null,i=p2(e),r=Vd(o,e,0,[e.props,s]),l=G7(r);if(Jl(),i(),(l||e.sp)&&!Gl(e)&&ng(e),l){if(r.then(hd,hd),t)return r.then(a=>{sm(e,a,t)}).catch(a=>{f2(a,e,0)});e.asyncDep=r}else sm(e,r,t)}else _A(e,t)}function sm(e,t,n){wn(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Xn(t)&&(e.setupState=IM(t)),_A(e,n)}let P4,im;function iWe(e){P4=e,im=t=>{t.render._rc&&(t.withProxy=new Proxy(t.ctx,tj))}}const rWe=()=>!P4;function _A(e,t,n){const o=e.type;if(!e.render){if(!t&&P4&&!o.render){const s=o.template||lg(e).template;if(s){const{isCustomElement:i,compilerOptions:r}=e.appContext.config,{delimiters:l,compilerOptions:a}=o,c=lo(lo({isCustomElement:i,delimiters:l},r),a);o.render=P4(s,c)}}e.render=o.render||yr,im&&im(e)}{const s=p2(e);Xl();try{nj(e)}finally{Jl(),s()}}}const zj={get(e,t){return Xs(e,"get",""),e[t]}};function xA(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,zj),slots:e.slots,emit:e.emit,expose:t}}function Zd(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(IM(Lt(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Fu)return Fu[n](e)},has(t,n){return n in t||n in Fu}})):e.proxy}function rm(e,t=!0){return wn(e)?e.displayName||e.name:e.name||t&&e.__name}function Bj(e){return wn(e)&&"__vccOpts"in e}const z=(e,t)=>yR(e,t,v0);function pn(e,t,n){try{F4(-1);const o=arguments.length;return o===2?Xn(t)&&!en(t)?t1(t)?Z(e,null,[t]):Z(e,t):Z(e,null,t):(o>3?n=Array.prototype.slice.call(arguments,2):o===3&&t1(n)&&(n=[n]),Z(e,t,n))}finally{F4(1)}}function lWe(){}function aWe(e,t,n,o){const s=n[o];if(s&&Rj(s,e))return s;const i=t();return i.memo=e.slice(),i.cacheIndex=o,n[o]=i}function Rj(e,t){const n=e.memo;if(n.length!=t.length)return!1;for(let o=0;o0&&Qs&&Qs.push(e),!0}const jj="3.5.35",cWe=yr,uWe=SR,dWe=fc,fWe=RM,Fj={createComponentInstance:yA,setupComponent:bA,renderComponentRoot:Y3,setCurrentRenderingInstance:cd,isVNode:t1,normalizeVNode:Ci,getComponentPublicInstance:Zd,ensureValidVNode:rg,pushWarningContext:_R,popWarningContext:xR},pWe=Fj,hWe=null,mWe=null,gWe=null;/** * @vue/runtime-dom v3.5.35 @@ -504,15 +504,15 @@ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DesignSystemVie -`,Tq='',Iq='',Lq='',$q='',Nq='',zq='',Bq='',Rq='',jq='',Fq='',Oq='',Pq='',Hq='',Dq='',Mk='',Vq='',Wq='',qq='',Uq='',Zq='',Kq='',Gq='',Yq='',Xq='',Jq='',Qq='',eU='',tU='',nU='',oU='',sU='',iU='',rU='',lU='',aU='',Ak='',cU='',uU='',dU='',fU='',pU='',hU='',mU='',gU='',vU='',Ek='',wU='',yU='',kU='',bU='',_U='',xU='',SU='',CU='',MU='',AU='',EU='',TU='',IU='',LU='',$U='',NU='',zU='',BU='',RU='',jU='',FU='',OU='',PU='',HU='',DU='',VU='',WU='',G4={sm:14,md:16,lg:20};function Rt(e,t){return{component:e,svg:t}}function B1(e){return{svg:e,animated:!0}}const _E={plus:Rt(BH,zq),"chat-new":Rt(aH,wq),"calendar-close":Rt(gD,qq),"calendar-schedule":Rt(yD,Uq),"calendar-todo":Rt(_D,Zq),close:Rt(ED,Gq),check:Rt(CD,Kq),archive:Rt(WH,jq),search:B1(Sq),copy:Rt(uV,lU),link:Rt(YV,yU),"external-link":Rt(JD,oU),download:Rt(PD,Qq),undo:Rt(QH,Pq),send:Rt(xk,Mk),image:Rt(Ck,Ek),settings:B1(Cq),sliders:Rt(UD,tU),"cute-bot":B1(yq),microscope:Rt(hW,CU),flask:Rt(bV,uU),eye:Rt(tV,sU),"eye-off":Rt(sV,iU),"log-in":Rt(iW,_U),"chevron-down":Rt(YH,Oq),"chevron-right":Rt(iD,Dq),"chevron-up":Rt(uD,Vq),"update-available":B1(Eq),"arrow-up":Rt(xk,Mk),"arrow-down":Rt(ZH,Fq),"arrow-right":Rt(nD,Hq),minus:Rt(iq,PU),"panel-collapse":Rt(MH,Lq),"panel-expand":Rt(TH,$q),expand:Rt(GD,nU),collapse:Rt(zD,Xq),list:Rt(nW,bU),sort:Rt(WW,BU),grip:Rt(VD,eU),folder:B1(bq),"folder-closed":Rt(dH,kq),"folder-plus":Rt(AV,fU),"folder-solid":Rt(IV,pU),file:Rt(Sk,Ak),"file-text":Rt(wV,cU),"file-edit":Rt(pV,aU),"file-plus":Rt(lV,rU),"file-off":Rt(Sk,Ak),attachment:Rt($H,Nq),"image-off":Rt(Ck,Ek),code:Rt(LD,Yq),terminal:B1(Mq),pencil:Rt(kW,AU),tool:Rt(hq,VU),glob:Rt(pD,Wq),globe:Rt(DV,vU),"check-list":Rt(QV,kU),bolt:Rt(SV,dU),"git-fork":Rt(NV,hU),"git-pull-request":Rt(RV,mU),message:Rt(dW,SU),mail:Rt(aW,xU),user:Rt(vq,WU),info:Rt(ZV,wU),"help-circle":Rt($W,LU),"alert-triangle":Rt(HH,Rq),fingerprint:Rt(OV,gU),"shield-question":Rt(FW,NU),"full-access":Rt(BW,$U),trash:Rt(jD,Jq),clock:Rt(dq,DU),"loading-spinner":B1(_q),sparkles:Rt(ZW,RU),thinking:Rt(vH,Aq),target:Rt(aq,HU),pause:Rt(vW,MU),play:Rt(xW,EU),power:Rt(HW,zU),stop:Rt(nq,OU),star:Rt(YW,jU),"star-outline":Rt(QW,FU),"dots-horizontal":Rt(hH,xq),"circle-check":Rt(kH,Tq),"circle-dashed":Rt(xH,Iq),"pushpin-line":Rt(TW,IU),"pushpin-fill":Rt(MW,TU),"gen-title":Rt(FH,Bq)};function xE(e){return _E[e]}function qU(e,t){return e.replaceAll(/\s(?:width|height)="[^"]*"/g,"").replace(/^